Compare commits

...

19 Commits
master ... dev

Author SHA1 Message Date
843f779010 changes, ok? 2022-12-24 03:43:09 +01:00
78fd88654d update gitignore 2022-12-24 03:42:51 +01:00
853f5eba26 fixed some minor stuff, might need some additional work. 2022-10-13 12:47:44 +02:00
6962885582 kk 2022-10-07 17:22:05 +02:00
edc1ea081f fixed syntactical error 2022-10-05 13:59:01 +02:00
87a3014c8d Various changes 2022-09-29 10:21:36 +02:00
5e0768263f Bit Bucket is down. What should I do now? 2022-09-26 15:43:29 +02:00
6bf0ca0d74 Argh! About to give up :( 2022-09-26 15:43:19 +02:00
3bcb921032 dockerino 2022-09-12 12:11:37 +02:00
963d4d1750 updated libs 2022-09-09 12:40:38 +02:00
afebaf0ee6 added readme 2022-06-04 09:27:56 +02:00
2d1eb509f1 various changes 2022-06-04 09:27:49 +02:00
0409c28e4c updated build config 2022-06-04 09:27:39 +02:00
47680dff22 updated gitignore 2022-06-04 09:27:23 +02:00
32a5491472 added lix haxerc 2022-06-04 09:26:59 +02:00
34ef078dfe added lix libraries 2022-06-04 09:26:40 +02:00
28506fd3f0 renamed Document 2022-06-04 09:15:41 +02:00
85d5e342c1 Added current project files 2021-05-19 10:40:28 +02:00
bfabca1845 Added gitignore 2021-05-19 10:39:29 +02:00
52 changed files with 95531 additions and 0 deletions

6
.gitignore vendored Normal file
View File

@ -0,0 +1,6 @@
api2/
**/build/
out.js
api/node_modules/
**/*.sqlite
**/.vscode/

34
Dockerfile Normal file
View File

@ -0,0 +1,34 @@
FROM node:latest AS Build
RUN npm install haxe --global
RUN npm install lix --global --force
COPY ./api /app
WORKDIR /app
RUN lix scope
RUN lix download
RUN lix use haxe stable
# RUN lix install haxelib:hxnodejs
RUN haxe build.hxml
FROM node:latest
COPY --from=Build /app/build /app
COPY --from=Build /app/package.json /app/package.json
COPY --from=Build /app/res /app/res
WORKDIR /app/
RUN npm install
EXPOSE 8080
# CMD ["node", "out.js"]
CMD ["node", "out.js"]
# CMD ["/bin/bash"]

4
api/.haxerc Normal file
View File

@ -0,0 +1,4 @@
{
"version": "4.2.5",
"resolveLibs": "scoped"
}

11
api/build.hxml Normal file
View File

@ -0,0 +1,11 @@
-lib tink_http
-lib tink_web
-lib tink_core
#-lib tink_hxx
-lib tink_json
-lib tink_sql
-lib hxnodejs
# -D await_catch_none
-cp src
--main Server
-js build/out.js

View File

@ -0,0 +1,3 @@
# @install: lix --silent download "haxelib:/http-status#1.3.1" into http-status/1.3.1/haxelib
-cp ${HAXE_LIBCACHE}/http-status/1.3.1/haxelib/src
-D http-status=1.3.1

View File

@ -0,0 +1,7 @@
# @install: lix --silent download "haxelib:/hxnodejs#12.1.0" into hxnodejs/12.1.0/haxelib
-cp ${HAXE_LIBCACHE}/hxnodejs/12.1.0/haxelib/src
-D hxnodejs=12.1.0
--macro allowPackage('sys')
# should behave like other target defines and not be defined in macro context
--macro define('nodejs')
--macro _internal.SuppressDeprecated.run()

View File

@ -0,0 +1,4 @@
# @install: lix --silent download "haxelib:/tink_anon#0.7.0" into tink_anon/0.7.0/haxelib
-lib tink_macro
-cp ${HAXE_LIBCACHE}/tink_anon/0.7.0/haxelib/src
-D tink_anon=0.7.0

View File

@ -0,0 +1,7 @@
# @install: lix --silent download "haxelib:/tink_await#0.6.0" into tink_await/0.6.0/haxelib
-lib tink_core
-lib tink_macro
-lib tink_syntaxhub
-cp ${HAXE_LIBCACHE}/tink_await/0.6.0/haxelib/src
-D tink_await=0.6.0
--macro tink.await.Await.use()

View File

@ -0,0 +1,3 @@
# @install: lix --silent download "haxelib:/tink_chunk#0.4.0" into tink_chunk/0.4.0/haxelib
-cp ${HAXE_LIBCACHE}/tink_chunk/0.4.0/haxelib/src
-D tink_chunk=0.4.0

View File

@ -0,0 +1,3 @@
# @install: lix --silent download "gh://github.com/haxetink/tink_core#8fb0b9aa4de933614b5a04cc88da871b89cb8c6a" into tink_core/2.0.2/github/8fb0b9aa4de933614b5a04cc88da871b89cb8c6a
-cp ${HAXE_LIBCACHE}/tink_core/2.0.2/github/8fb0b9aa4de933614b5a04cc88da871b89cb8c6a/src
-D tink_core=2.0.2

View File

@ -0,0 +1,7 @@
# @install: lix --silent download "haxelib:/tink_http#0.10.0" into tink_http/0.10.0/haxelib
-lib http-status
-lib tink_anon
-lib tink_io
-lib tink_url
-cp ${HAXE_LIBCACHE}/tink_http/0.10.0/haxelib/src
-D tink_http=0.10.0

View File

@ -0,0 +1,5 @@
# @install: lix --silent download "haxelib:/tink_io#0.9.0" into tink_io/0.9.0/haxelib
-lib tink_chunk
-lib tink_streams
-cp ${HAXE_LIBCACHE}/tink_io/0.9.0/haxelib/src
-D tink_io=0.9.0

View File

@ -0,0 +1,4 @@
# @install: lix --silent download "haxelib:/tink_json#0.11.0" into tink_json/0.11.0/haxelib
-lib tink_typecrawler
-cp ${HAXE_LIBCACHE}/tink_json/0.11.0/haxelib/src
-D tink_json=0.11.0

View File

@ -0,0 +1,4 @@
# @install: lix --silent download "gh://github.com/haxetink/tink_macro#f3ddaa6496e3d0e82696c3ac9a7ccefac16954d4" into tink_macro/0.21.1/github/f3ddaa6496e3d0e82696c3ac9a7ccefac16954d4
-lib tink_core
-cp ${HAXE_LIBCACHE}/tink_macro/0.21.1/github/f3ddaa6496e3d0e82696c3ac9a7ccefac16954d4/src
-D tink_macro=0.21.1

View File

@ -0,0 +1,3 @@
# @install: lix --silent download "haxelib:/tink_priority#0.1.4" into tink_priority/0.1.4/haxelib
-cp ${HAXE_LIBCACHE}/tink_priority/0.1.4/haxelib/src
-D tink_priority=0.1.4

View File

@ -0,0 +1,5 @@
# @install: lix --silent download "haxelib:/tink_querystring#0.7.0" into tink_querystring/0.7.0/haxelib
-lib tink_typecrawler
-lib tink_url
-cp ${HAXE_LIBCACHE}/tink_querystring/0.7.0/haxelib/src
-D tink_querystring=0.7.0

View File

@ -0,0 +1,3 @@
# @install: lix --silent download "gh://github.com/haxetink/tink_spatial#fb0d0a02ceed49325709215b5da0062fd8316c62" into tink_spatial/0.1.0/github/fb0d0a02ceed49325709215b5da0062fd8316c62
-cp ${HAXE_LIBCACHE}/tink_spatial/0.1.0/github/fb0d0a02ceed49325709215b5da0062fd8316c62/src
-D tink_spatial=0.1.0

View File

@ -0,0 +1,7 @@
# @install: lix --silent download "gh://github.com/haxetink/tink_sql#9470dc0bd5557449992fbbfb15b3621e00c77e76" into tink_sql/0.0.0-alpha.0/github/9470dc0bd5557449992fbbfb15b3621e00c77e76
-lib tink_macro
-lib tink_spatial
-lib tink_streams
-lib tink_url
-cp ${HAXE_LIBCACHE}/tink_sql/0.0.0-alpha.0/github/9470dc0bd5557449992fbbfb15b3621e00c77e76/src
-D tink_sql=0.0.0-alpha.0

View File

@ -0,0 +1,6 @@
# @install: lix --silent download "gh://github.com/haxetink/tink_streams#c51ff28d69ea844995696f10575d1a150ce47159" into tink_streams/0.3.3/github/c51ff28d69ea844995696f10575d1a150ce47159
-lib tink_core
-cp ${HAXE_LIBCACHE}/tink_streams/0.3.3/github/c51ff28d69ea844995696f10575d1a150ce47159/src
-D tink_streams=0.3.3
# temp for development, delete this file when pure branch merged
-D pure

View File

@ -0,0 +1,4 @@
# @install: lix --silent download "haxelib:/tink_stringly#0.4.0" into tink_stringly/0.4.0/haxelib
-lib tink_core
-cp ${HAXE_LIBCACHE}/tink_stringly/0.4.0/haxelib/src
-D tink_stringly=0.4.0

View File

@ -0,0 +1,6 @@
# @install: lix --silent download "haxelib:/tink_syntaxhub#0.5.0" into tink_syntaxhub/0.5.0/haxelib
-lib tink_macro
-lib tink_priority
-cp ${HAXE_LIBCACHE}/tink_syntaxhub/0.5.0/haxelib/src
-D tink_syntaxhub=0.5.0
--macro tink.SyntaxHub.use()

View File

@ -0,0 +1,4 @@
# @install: lix --silent download "haxelib:/tink_typecrawler#0.7.0" into tink_typecrawler/0.7.0/haxelib
-lib tink_macro
-cp ${HAXE_LIBCACHE}/tink_typecrawler/0.7.0/haxelib/src
-D tink_typecrawler=0.7.0

View File

@ -0,0 +1,5 @@
# @install: lix --silent download https://github.com/haxetink/tink_url/archive/7c98a2ea212c3a2f8d9ff41c1450eae98eee812f.tar.gz into tink_url/0.3.1/github/7c98a2ea212c3a2f8d9ff41c1450eae98eee812f
-D tink_url=0.3.1
-cp ${HAXESHIM_LIBCACHE}/tink_url/0.3.1/github/7c98a2ea212c3a2f8d9ff41c1450eae98eee812f/src
-lib tink_stringly

View File

@ -0,0 +1,6 @@
# @install: lix --silent download "haxelib:/tink_web#0.3.0" into tink_web/0.3.0/haxelib
-lib tink_http
-lib tink_json
-lib tink_querystring
-cp ${HAXE_LIBCACHE}/tink_web/0.3.0/haxelib/src
-D tink_web=0.3.0

922
api/package-lock.json generated Normal file
View File

@ -0,0 +1,922 @@
{
"name": "drivebyapi",
"version": "1.0.0",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
"@gar/promisify": {
"version": "1.1.3",
"resolved": "https://registry.npmjs.org/@gar/promisify/-/promisify-1.1.3.tgz",
"integrity": "sha512-k2Ty1JcVojjJFwrg/ThKi2ujJ7XNLYaFGNB/bWT9wGR+oSMJHMa5w+CUq6p/pVrKeNNgA7pCqEcjSnHVoqJQFw==",
"optional": true
},
"@mapbox/node-pre-gyp": {
"version": "1.0.10",
"resolved": "https://registry.npmjs.org/@mapbox/node-pre-gyp/-/node-pre-gyp-1.0.10.tgz",
"integrity": "sha512-4ySo4CjzStuprMwk35H5pPbkymjv1SF3jGLj6rAHp/xT/RF7TL7bd9CTm1xDY49K2qF7jmR/g7k+SkLETP6opA==",
"requires": {
"detect-libc": "^2.0.0",
"https-proxy-agent": "^5.0.0",
"make-dir": "^3.1.0",
"node-fetch": "^2.6.7",
"nopt": "^5.0.0",
"npmlog": "^5.0.1",
"rimraf": "^3.0.2",
"semver": "^7.3.5",
"tar": "^6.1.11"
}
},
"@npmcli/fs": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/@npmcli/fs/-/fs-1.1.1.tgz",
"integrity": "sha512-8KG5RD0GVP4ydEzRn/I4BNDuxDtqVbOdm8675T49OIG/NGhaK0pjPX7ZcDlvKYbA+ulvVK3ztfcF4uBdOxuJbQ==",
"optional": true,
"requires": {
"@gar/promisify": "^1.0.1",
"semver": "^7.3.5"
}
},
"@npmcli/move-file": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/@npmcli/move-file/-/move-file-1.1.2.tgz",
"integrity": "sha512-1SUf/Cg2GzGDyaf15aR9St9TWlb+XvbZXWpDx8YKs7MLzMH/BCeopv+y9vzrzgkfykCGuWOlSu3mZhj2+FQcrg==",
"optional": true,
"requires": {
"mkdirp": "^1.0.4",
"rimraf": "^3.0.2"
}
},
"@tootallnate/once": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-1.1.2.tgz",
"integrity": "sha512-RbzJvlNzmRq5c3O09UipeuXno4tA1FE6ikOjxZK0tuxVv3412l64l5t1W5pj4+rJq9vpkm/kwiR07aZXnsKPxw==",
"optional": true
},
"abbrev": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz",
"integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q=="
},
"agent-base": {
"version": "6.0.2",
"resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz",
"integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==",
"requires": {
"debug": "4"
}
},
"agentkeepalive": {
"version": "4.2.1",
"resolved": "https://registry.npmjs.org/agentkeepalive/-/agentkeepalive-4.2.1.tgz",
"integrity": "sha512-Zn4cw2NEqd+9fiSVWMscnjyQ1a8Yfoc5oBajLeo5w+YBHgDUcEBY2hS4YpTz6iN5f/2zQiktcuM6tS8x1p9dpA==",
"optional": true,
"requires": {
"debug": "^4.1.0",
"depd": "^1.1.2",
"humanize-ms": "^1.2.1"
}
},
"aggregate-error": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.1.0.tgz",
"integrity": "sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==",
"optional": true,
"requires": {
"clean-stack": "^2.0.0",
"indent-string": "^4.0.0"
}
},
"ansi-regex": {
"version": "5.0.1",
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz",
"integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ=="
},
"aproba": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/aproba/-/aproba-2.0.0.tgz",
"integrity": "sha512-lYe4Gx7QT+MKGbDsA+Z+he/Wtef0BiwDOlK/XkBrdfsh9J/jPPXbX0tE9x9cl27Tmu5gg3QUbUrQYa/y+KOHPQ=="
},
"are-we-there-yet": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-2.0.0.tgz",
"integrity": "sha512-Ci/qENmwHnsYo9xKIcUJN5LeDKdJ6R1Z1j9V/J5wyq8nh/mYPEpIKJbBZXtZjG04HiK7zV/p6Vs9952MrMeUIw==",
"requires": {
"delegates": "^1.0.0",
"readable-stream": "^3.6.0"
},
"dependencies": {
"readable-stream": {
"version": "3.6.0",
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz",
"integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==",
"requires": {
"inherits": "^2.0.3",
"string_decoder": "^1.1.1",
"util-deprecate": "^1.0.1"
}
}
}
},
"balanced-match": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz",
"integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw=="
},
"bignumber.js": {
"version": "9.0.0",
"resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.0.0.tgz",
"integrity": "sha512-t/OYhhJ2SD+YGBQcjY8GzzDHEk9f3nerxjtfa6tlMXfe7frs/WozhvCNoGvpM0P3bNf3Gq5ZRMlGr5f3r4/N8A=="
},
"brace-expansion": {
"version": "1.1.11",
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
"integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
"requires": {
"balanced-match": "^1.0.0",
"concat-map": "0.0.1"
}
},
"cacache": {
"version": "15.3.0",
"resolved": "https://registry.npmjs.org/cacache/-/cacache-15.3.0.tgz",
"integrity": "sha512-VVdYzXEn+cnbXpFgWs5hTT7OScegHVmLhJIR8Ufqk3iFD6A6j5iSX1KuBTfNEv4tdJWE2PzA6IVFtcLC7fN9wQ==",
"optional": true,
"requires": {
"@npmcli/fs": "^1.0.0",
"@npmcli/move-file": "^1.0.1",
"chownr": "^2.0.0",
"fs-minipass": "^2.0.0",
"glob": "^7.1.4",
"infer-owner": "^1.0.4",
"lru-cache": "^6.0.0",
"minipass": "^3.1.1",
"minipass-collect": "^1.0.2",
"minipass-flush": "^1.0.5",
"minipass-pipeline": "^1.2.2",
"mkdirp": "^1.0.3",
"p-map": "^4.0.0",
"promise-inflight": "^1.0.1",
"rimraf": "^3.0.2",
"ssri": "^8.0.1",
"tar": "^6.0.2",
"unique-filename": "^1.1.1"
}
},
"chownr": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/chownr/-/chownr-2.0.0.tgz",
"integrity": "sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ=="
},
"clean-stack": {
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz",
"integrity": "sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==",
"optional": true
},
"color-support": {
"version": "1.1.3",
"resolved": "https://registry.npmjs.org/color-support/-/color-support-1.1.3.tgz",
"integrity": "sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg=="
},
"concat-map": {
"version": "0.0.1",
"resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
"integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg=="
},
"console-control-strings": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz",
"integrity": "sha512-ty/fTekppD2fIwRvnZAVdeOiGd1c7YXEixbgJTNzqcxJWKQnjJ/V1bNEEE6hygpM3WjwHFUVK6HTjWSzV4a8sQ=="
},
"core-util-is": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz",
"integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ=="
},
"debug": {
"version": "4.3.4",
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz",
"integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==",
"requires": {
"ms": "2.1.2"
}
},
"delegates": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz",
"integrity": "sha512-bd2L678uiWATM6m5Z1VzNCErI3jiGzt6HGY8OVICs40JQq/HALfbyNJmp0UDakEY4pMMaN0Ly5om/B1VI/+xfQ=="
},
"depd": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz",
"integrity": "sha512-7emPTl6Dpo6JRXOXjLRxck+FlLRX5847cLKEn00PLAgc3g2hTZZgr+e4c2v6QpSmLeFP3n5yUo7ft6avBK/5jQ==",
"optional": true
},
"detect-libc": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.0.1.tgz",
"integrity": "sha512-463v3ZeIrcWtdgIg6vI6XUncguvr2TnGl4SzDXinkt9mSLpBJKXT3mW6xT3VQdDN11+WVs29pgvivTc4Lp8v+w=="
},
"emoji-regex": {
"version": "8.0.0",
"resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz",
"integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A=="
},
"encoding": {
"version": "0.1.13",
"resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.13.tgz",
"integrity": "sha512-ETBauow1T35Y/WZMkio9jiM0Z5xjHHmJ4XmjZOq1l/dXz3lr2sRn87nJy20RupqSh1F2m3HHPSp8ShIPQJrJ3A==",
"optional": true,
"requires": {
"iconv-lite": "^0.6.2"
}
},
"env-paths": {
"version": "2.2.1",
"resolved": "https://registry.npmjs.org/env-paths/-/env-paths-2.2.1.tgz",
"integrity": "sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A==",
"optional": true
},
"err-code": {
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/err-code/-/err-code-2.0.3.tgz",
"integrity": "sha512-2bmlRpNKBxT/CRmPOlyISQpNj+qSeYvcym/uT0Jx2bMOlKLtSy1ZmLuVxSEKKyor/N5yhvp/ZiG1oE3DEYMSFA==",
"optional": true
},
"fs-minipass": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.1.0.tgz",
"integrity": "sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==",
"requires": {
"minipass": "^3.0.0"
}
},
"fs.realpath": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
"integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw=="
},
"gauge": {
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/gauge/-/gauge-3.0.2.tgz",
"integrity": "sha512-+5J6MS/5XksCuXq++uFRsnUd7Ovu1XenbeuIuNRJxYWjgQbPuFhT14lAvsWfqfAmnwluf1OwMjz39HjfLPci0Q==",
"requires": {
"aproba": "^1.0.3 || ^2.0.0",
"color-support": "^1.1.2",
"console-control-strings": "^1.0.0",
"has-unicode": "^2.0.1",
"object-assign": "^4.1.1",
"signal-exit": "^3.0.0",
"string-width": "^4.2.3",
"strip-ansi": "^6.0.1",
"wide-align": "^1.1.2"
}
},
"glob": {
"version": "7.2.3",
"resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz",
"integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==",
"requires": {
"fs.realpath": "^1.0.0",
"inflight": "^1.0.4",
"inherits": "2",
"minimatch": "^3.1.1",
"once": "^1.3.0",
"path-is-absolute": "^1.0.0"
}
},
"graceful-fs": {
"version": "4.2.10",
"resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz",
"integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==",
"optional": true
},
"has-unicode": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz",
"integrity": "sha512-8Rf9Y83NBReMnx0gFzA8JImQACstCYWUplepDa9xprwwtmgEZUF0h/i5xSA625zB/I37EtrswSST6OXxwaaIJQ=="
},
"http-cache-semantics": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.0.tgz",
"integrity": "sha512-carPklcUh7ROWRK7Cv27RPtdhYhUsela/ue5/jKzjegVvXDqM2ILE9Q2BGn9JZJh1g87cp56su/FgQSzcWS8cQ==",
"optional": true
},
"http-proxy-agent": {
"version": "4.0.1",
"resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-4.0.1.tgz",
"integrity": "sha512-k0zdNgqWTGA6aeIRVpvfVob4fL52dTfaehylg0Y4UvSySvOq/Y+BOyPrgpUrA7HylqvU8vIZGsRuXmspskV0Tg==",
"optional": true,
"requires": {
"@tootallnate/once": "1",
"agent-base": "6",
"debug": "4"
}
},
"https-proxy-agent": {
"version": "5.0.1",
"resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz",
"integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==",
"requires": {
"agent-base": "6",
"debug": "4"
}
},
"humanize-ms": {
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/humanize-ms/-/humanize-ms-1.2.1.tgz",
"integrity": "sha512-Fl70vYtsAFb/C06PTS9dZBo7ihau+Tu/DNCk/OyHhea07S+aeMWpFFkUaXRa8fI+ScZbEI8dfSxwY7gxZ9SAVQ==",
"optional": true,
"requires": {
"ms": "^2.0.0"
}
},
"iconv-lite": {
"version": "0.6.3",
"resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz",
"integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==",
"optional": true,
"requires": {
"safer-buffer": ">= 2.1.2 < 3.0.0"
}
},
"imurmurhash": {
"version": "0.1.4",
"resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz",
"integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==",
"optional": true
},
"indent-string": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz",
"integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==",
"optional": true
},
"infer-owner": {
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/infer-owner/-/infer-owner-1.0.4.tgz",
"integrity": "sha512-IClj+Xz94+d7irH5qRyfJonOdfTzuDaifE6ZPWfx0N0+/ATZCbuTPq2prFl526urkQd90WyUKIh1DfBQ2hMz9A==",
"optional": true
},
"inflight": {
"version": "1.0.6",
"resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
"integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==",
"requires": {
"once": "^1.3.0",
"wrappy": "1"
}
},
"inherits": {
"version": "2.0.4",
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
"integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ=="
},
"ip": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/ip/-/ip-2.0.0.tgz",
"integrity": "sha512-WKa+XuLG1A1R0UWhl2+1XQSi+fZWMsYKffMZTTYsiZaUD8k2yDAj5atimTUD2TZkyCkNEeYE5NhFZmupOGtjYQ==",
"optional": true
},
"is-fullwidth-code-point": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
"integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg=="
},
"is-lambda": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/is-lambda/-/is-lambda-1.0.1.tgz",
"integrity": "sha512-z7CMFGNrENq5iFB9Bqo64Xk6Y9sg+epq1myIcdHaGnbMTYOxvzsEtdYqQUylB7LxfkvgrrjP32T6Ywciio9UIQ==",
"optional": true
},
"isarray": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
"integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ=="
},
"isexe": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz",
"integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==",
"optional": true
},
"lru-cache": {
"version": "6.0.0",
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz",
"integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==",
"requires": {
"yallist": "^4.0.0"
}
},
"make-dir": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz",
"integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==",
"requires": {
"semver": "^6.0.0"
},
"dependencies": {
"semver": {
"version": "6.3.0",
"resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz",
"integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw=="
}
}
},
"make-fetch-happen": {
"version": "9.1.0",
"resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-9.1.0.tgz",
"integrity": "sha512-+zopwDy7DNknmwPQplem5lAZX/eCOzSvSNNcSKm5eVwTkOBzoktEfXsa9L23J/GIRhxRsaxzkPEhrJEpE2F4Gg==",
"optional": true,
"requires": {
"agentkeepalive": "^4.1.3",
"cacache": "^15.2.0",
"http-cache-semantics": "^4.1.0",
"http-proxy-agent": "^4.0.1",
"https-proxy-agent": "^5.0.0",
"is-lambda": "^1.0.1",
"lru-cache": "^6.0.0",
"minipass": "^3.1.3",
"minipass-collect": "^1.0.2",
"minipass-fetch": "^1.3.2",
"minipass-flush": "^1.0.5",
"minipass-pipeline": "^1.2.4",
"negotiator": "^0.6.2",
"promise-retry": "^2.0.1",
"socks-proxy-agent": "^6.0.0",
"ssri": "^8.0.0"
}
},
"minimatch": {
"version": "3.1.2",
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",
"integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",
"requires": {
"brace-expansion": "^1.1.7"
}
},
"minipass": {
"version": "3.3.4",
"resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.4.tgz",
"integrity": "sha512-I9WPbWHCGu8W+6k1ZiGpPu0GkoKBeorkfKNuAFBNS1HNFJvke82sxvI5bzcCNpWPorkOO5QQ+zomzzwRxejXiw==",
"requires": {
"yallist": "^4.0.0"
}
},
"minipass-collect": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/minipass-collect/-/minipass-collect-1.0.2.tgz",
"integrity": "sha512-6T6lH0H8OG9kITm/Jm6tdooIbogG9e0tLgpY6mphXSm/A9u8Nq1ryBG+Qspiub9LjWlBPsPS3tWQ/Botq4FdxA==",
"optional": true,
"requires": {
"minipass": "^3.0.0"
}
},
"minipass-fetch": {
"version": "1.4.1",
"resolved": "https://registry.npmjs.org/minipass-fetch/-/minipass-fetch-1.4.1.tgz",
"integrity": "sha512-CGH1eblLq26Y15+Azk7ey4xh0J/XfJfrCox5LDJiKqI2Q2iwOLOKrlmIaODiSQS8d18jalF6y2K2ePUm0CmShw==",
"optional": true,
"requires": {
"encoding": "^0.1.12",
"minipass": "^3.1.0",
"minipass-sized": "^1.0.3",
"minizlib": "^2.0.0"
}
},
"minipass-flush": {
"version": "1.0.5",
"resolved": "https://registry.npmjs.org/minipass-flush/-/minipass-flush-1.0.5.tgz",
"integrity": "sha512-JmQSYYpPUqX5Jyn1mXaRwOda1uQ8HP5KAT/oDSLCzt1BYRhQU0/hDtsB1ufZfEEzMZ9aAVmsBw8+FWsIXlClWw==",
"optional": true,
"requires": {
"minipass": "^3.0.0"
}
},
"minipass-pipeline": {
"version": "1.2.4",
"resolved": "https://registry.npmjs.org/minipass-pipeline/-/minipass-pipeline-1.2.4.tgz",
"integrity": "sha512-xuIq7cIOt09RPRJ19gdi4b+RiNvDFYe5JH+ggNvBqGqpQXcru3PcRmOZuHBKWK1Txf9+cQ+HMVN4d6z46LZP7A==",
"optional": true,
"requires": {
"minipass": "^3.0.0"
}
},
"minipass-sized": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/minipass-sized/-/minipass-sized-1.0.3.tgz",
"integrity": "sha512-MbkQQ2CTiBMlA2Dm/5cY+9SWFEN8pzzOXi6rlM5Xxq0Yqbda5ZQy9sU75a673FE9ZK0Zsbr6Y5iP6u9nktfg2g==",
"optional": true,
"requires": {
"minipass": "^3.0.0"
}
},
"minizlib": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/minizlib/-/minizlib-2.1.2.tgz",
"integrity": "sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg==",
"requires": {
"minipass": "^3.0.0",
"yallist": "^4.0.0"
}
},
"mkdirp": {
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz",
"integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw=="
},
"ms": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
"integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="
},
"mysql": {
"version": "2.18.1",
"resolved": "https://registry.npmjs.org/mysql/-/mysql-2.18.1.tgz",
"integrity": "sha512-Bca+gk2YWmqp2Uf6k5NFEurwY/0td0cpebAucFpY/3jhrwrVGuxU2uQFCHjU19SJfje0yQvi+rVWdq78hR5lig==",
"requires": {
"bignumber.js": "9.0.0",
"readable-stream": "2.3.7",
"safe-buffer": "5.1.2",
"sqlstring": "2.3.1"
}
},
"negotiator": {
"version": "0.6.3",
"resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz",
"integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==",
"optional": true
},
"node-addon-api": {
"version": "4.3.0",
"resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-4.3.0.tgz",
"integrity": "sha512-73sE9+3UaLYYFmDsFZnqCInzPyh3MqIwZO9cw58yIqAZhONrrabrYyYe3TuIqtIiOuTXVhsGau8hcrhhwSsDIQ=="
},
"node-fetch": {
"version": "2.6.7",
"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz",
"integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==",
"requires": {
"whatwg-url": "^5.0.0"
}
},
"node-gyp": {
"version": "8.4.1",
"resolved": "https://registry.npmjs.org/node-gyp/-/node-gyp-8.4.1.tgz",
"integrity": "sha512-olTJRgUtAb/hOXG0E93wZDs5YiJlgbXxTwQAFHyNlRsXQnYzUaF2aGgujZbw+hR8aF4ZG/rST57bWMWD16jr9w==",
"optional": true,
"requires": {
"env-paths": "^2.2.0",
"glob": "^7.1.4",
"graceful-fs": "^4.2.6",
"make-fetch-happen": "^9.1.0",
"nopt": "^5.0.0",
"npmlog": "^6.0.0",
"rimraf": "^3.0.2",
"semver": "^7.3.5",
"tar": "^6.1.2",
"which": "^2.0.2"
},
"dependencies": {
"are-we-there-yet": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-3.0.1.tgz",
"integrity": "sha512-QZW4EDmGwlYur0Yyf/b2uGucHQMa8aFUP7eu9ddR73vvhFyt4V0Vl3QHPcTNJ8l6qYOBdxgXdnBXQrHilfRQBg==",
"optional": true,
"requires": {
"delegates": "^1.0.0",
"readable-stream": "^3.6.0"
}
},
"gauge": {
"version": "4.0.4",
"resolved": "https://registry.npmjs.org/gauge/-/gauge-4.0.4.tgz",
"integrity": "sha512-f9m+BEN5jkg6a0fZjleidjN51VE1X+mPFQ2DJ0uv1V39oCLCbsGe6yjbBnp7eK7z/+GAon99a3nHuqbuuthyPg==",
"optional": true,
"requires": {
"aproba": "^1.0.3 || ^2.0.0",
"color-support": "^1.1.3",
"console-control-strings": "^1.1.0",
"has-unicode": "^2.0.1",
"signal-exit": "^3.0.7",
"string-width": "^4.2.3",
"strip-ansi": "^6.0.1",
"wide-align": "^1.1.5"
}
},
"npmlog": {
"version": "6.0.2",
"resolved": "https://registry.npmjs.org/npmlog/-/npmlog-6.0.2.tgz",
"integrity": "sha512-/vBvz5Jfr9dT/aFWd0FIRf+T/Q2WBsLENygUaFUqstqsycmZAP/t5BvFJTK0viFmSUxiUKTUplWy5vt+rvKIxg==",
"optional": true,
"requires": {
"are-we-there-yet": "^3.0.0",
"console-control-strings": "^1.1.0",
"gauge": "^4.0.3",
"set-blocking": "^2.0.0"
}
},
"readable-stream": {
"version": "3.6.0",
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz",
"integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==",
"optional": true,
"requires": {
"inherits": "^2.0.3",
"string_decoder": "^1.1.1",
"util-deprecate": "^1.0.1"
}
}
}
},
"nopt": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/nopt/-/nopt-5.0.0.tgz",
"integrity": "sha512-Tbj67rffqceeLpcRXrT7vKAN8CwfPeIBgM7E6iBkmKLV7bEMwpGgYLGv0jACUsECaa/vuxP0IjEont6umdMgtQ==",
"requires": {
"abbrev": "1"
}
},
"npmlog": {
"version": "5.0.1",
"resolved": "https://registry.npmjs.org/npmlog/-/npmlog-5.0.1.tgz",
"integrity": "sha512-AqZtDUWOMKs1G/8lwylVjrdYgqA4d9nu8hc+0gzRxlDb1I10+FHBGMXs6aiQHFdCUUlqH99MUMuLfzWDNDtfxw==",
"requires": {
"are-we-there-yet": "^2.0.0",
"console-control-strings": "^1.1.0",
"gauge": "^3.0.0",
"set-blocking": "^2.0.0"
}
},
"object-assign": {
"version": "4.1.1",
"resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",
"integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg=="
},
"once": {
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
"integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==",
"requires": {
"wrappy": "1"
}
},
"p-map": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/p-map/-/p-map-4.0.0.tgz",
"integrity": "sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ==",
"optional": true,
"requires": {
"aggregate-error": "^3.0.0"
}
},
"path-is-absolute": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
"integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg=="
},
"process-nextick-args": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz",
"integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag=="
},
"promise-inflight": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/promise-inflight/-/promise-inflight-1.0.1.tgz",
"integrity": "sha512-6zWPyEOFaQBJYcGMHBKTKJ3u6TBsnMFOIZSa6ce1e/ZrrsOlnHRHbabMjLiBYKp+n44X9eUI6VUPaukCXHuG4g==",
"optional": true
},
"promise-retry": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/promise-retry/-/promise-retry-2.0.1.tgz",
"integrity": "sha512-y+WKFlBR8BGXnsNlIHFGPZmyDf3DFMoLhaflAnyZgV6rG6xu+JwesTo2Q9R6XwYmtmwAFCkAk3e35jEdoeh/3g==",
"optional": true,
"requires": {
"err-code": "^2.0.2",
"retry": "^0.12.0"
}
},
"readable-stream": {
"version": "2.3.7",
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz",
"integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==",
"requires": {
"core-util-is": "~1.0.0",
"inherits": "~2.0.3",
"isarray": "~1.0.0",
"process-nextick-args": "~2.0.0",
"safe-buffer": "~5.1.1",
"string_decoder": "~1.1.1",
"util-deprecate": "~1.0.1"
}
},
"retry": {
"version": "0.12.0",
"resolved": "https://registry.npmjs.org/retry/-/retry-0.12.0.tgz",
"integrity": "sha512-9LkiTwjUh6rT555DtE9rTX+BKByPfrMzEAtnlEtdEwr3Nkffwiihqe2bWADg+OQRjt9gl6ICdmB/ZFDCGAtSow==",
"optional": true
},
"rimraf": {
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz",
"integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==",
"requires": {
"glob": "^7.1.3"
}
},
"safe-buffer": {
"version": "5.1.2",
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
"integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g=="
},
"safer-buffer": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
"integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==",
"optional": true
},
"semver": {
"version": "7.3.7",
"resolved": "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz",
"integrity": "sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==",
"requires": {
"lru-cache": "^6.0.0"
}
},
"set-blocking": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz",
"integrity": "sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw=="
},
"signal-exit": {
"version": "3.0.7",
"resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz",
"integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ=="
},
"smart-buffer": {
"version": "4.2.0",
"resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.2.0.tgz",
"integrity": "sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg==",
"optional": true
},
"socks": {
"version": "2.7.0",
"resolved": "https://registry.npmjs.org/socks/-/socks-2.7.0.tgz",
"integrity": "sha512-scnOe9y4VuiNUULJN72GrM26BNOjVsfPXI+j+98PkyEfsIXroa5ofyjT+FzGvn/xHs73U2JtoBYAVx9Hl4quSA==",
"optional": true,
"requires": {
"ip": "^2.0.0",
"smart-buffer": "^4.2.0"
}
},
"socks-proxy-agent": {
"version": "6.2.1",
"resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-6.2.1.tgz",
"integrity": "sha512-a6KW9G+6B3nWZ1yB8G7pJwL3ggLy1uTzKAgCb7ttblwqdz9fMGJUuTy3uFzEP48FAs9FLILlmzDlE2JJhVQaXQ==",
"optional": true,
"requires": {
"agent-base": "^6.0.2",
"debug": "^4.3.3",
"socks": "^2.6.2"
}
},
"sqlite": {
"version": "4.1.2",
"resolved": "https://registry.npmjs.org/sqlite/-/sqlite-4.1.2.tgz",
"integrity": "sha512-FlBG51gHbux5vPjwnoqFEghNGvnTMTbHyiI09U3qFTQs9AtWuwd4i++6+WCusCXKrVdIDLzfdGekrolr3m4U4A=="
},
"sqlite3": {
"version": "5.1.1",
"resolved": "https://registry.npmjs.org/sqlite3/-/sqlite3-5.1.1.tgz",
"integrity": "sha512-mMinkrQr/LKJqFiFF+AF7imPSzRCCpTCreusZO3D/ssJHVjZOrbu2Caz+zPH5KTmGGXBxXMGSRDssL+44CLxvg==",
"requires": {
"@mapbox/node-pre-gyp": "^1.0.0",
"node-addon-api": "^4.2.0",
"node-gyp": "8.x",
"tar": "^6.1.11"
}
},
"sqlstring": {
"version": "2.3.1",
"resolved": "https://registry.npmjs.org/sqlstring/-/sqlstring-2.3.1.tgz",
"integrity": "sha512-ooAzh/7dxIG5+uDik1z/Rd1vli0+38izZhGzSa34FwR7IbelPWCCKSNIl8jlL/F7ERvy8CB2jNeM1E9i9mXMAQ=="
},
"ssri": {
"version": "8.0.1",
"resolved": "https://registry.npmjs.org/ssri/-/ssri-8.0.1.tgz",
"integrity": "sha512-97qShzy1AiyxvPNIkLWoGua7xoQzzPjQ0HAH4B0rWKo7SZ6USuPcrUiAFrws0UH8RrbWmgq3LMTObhPIHbbBeQ==",
"optional": true,
"requires": {
"minipass": "^3.1.1"
}
},
"string-width": {
"version": "4.2.3",
"resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz",
"integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==",
"requires": {
"emoji-regex": "^8.0.0",
"is-fullwidth-code-point": "^3.0.0",
"strip-ansi": "^6.0.1"
}
},
"string_decoder": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
"integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
"requires": {
"safe-buffer": "~5.1.0"
}
},
"strip-ansi": {
"version": "6.0.1",
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz",
"integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",
"requires": {
"ansi-regex": "^5.0.1"
}
},
"tar": {
"version": "6.1.11",
"resolved": "https://registry.npmjs.org/tar/-/tar-6.1.11.tgz",
"integrity": "sha512-an/KZQzQUkZCkuoAA64hM92X0Urb6VpRhAFllDzz44U2mcD5scmT3zBc4VgVpkugF580+DQn8eAFSyoQt0tznA==",
"requires": {
"chownr": "^2.0.0",
"fs-minipass": "^2.0.0",
"minipass": "^3.0.0",
"minizlib": "^2.1.1",
"mkdirp": "^1.0.3",
"yallist": "^4.0.0"
}
},
"tr46": {
"version": "0.0.3",
"resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz",
"integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw=="
},
"unique-filename": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/unique-filename/-/unique-filename-1.1.1.tgz",
"integrity": "sha512-Vmp0jIp2ln35UTXuryvjzkjGdRyf9b2lTXuSYUiPmzRcl3FDtYqAwOnTJkAngD9SWhnoJzDbTKwaOrZ+STtxNQ==",
"optional": true,
"requires": {
"unique-slug": "^2.0.0"
}
},
"unique-slug": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/unique-slug/-/unique-slug-2.0.2.tgz",
"integrity": "sha512-zoWr9ObaxALD3DOPfjPSqxt4fnZiWblxHIgeWqW8x7UqDzEtHEQLzji2cuJYQFCU6KmoJikOYAZlrTHHebjx2w==",
"optional": true,
"requires": {
"imurmurhash": "^0.1.4"
}
},
"util-deprecate": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
"integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw=="
},
"webidl-conversions": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz",
"integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ=="
},
"whatwg-url": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz",
"integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==",
"requires": {
"tr46": "~0.0.3",
"webidl-conversions": "^3.0.0"
}
},
"which": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz",
"integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==",
"optional": true,
"requires": {
"isexe": "^2.0.0"
}
},
"wide-align": {
"version": "1.1.5",
"resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.5.tgz",
"integrity": "sha512-eDMORYaPNZ4sQIuuYPDHdQvf4gyCF9rEEV/yPxGfwPkRodwEgiMUUXTx/dex+Me0wxx53S+NgUHaP7y3MGlDmg==",
"requires": {
"string-width": "^1.0.2 || 2 || 3 || 4"
}
},
"wrappy": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
"integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ=="
},
"yallist": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz",
"integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A=="
}
}
}

16
api/package.json Normal file
View File

@ -0,0 +1,16 @@
{
"name": "drivebyapi",
"version": "1.0.0",
"description": "api",
"main": "out.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "ISC",
"dependencies": {
"mysql": "^2.18.1",
"sqlite": "^4.1.2",
"sqlite3": "^5.0.11"
}
}

0
api/readme.md Normal file
View File

0
api/res/html/index.html Normal file
View File

0
api/res/html/index.js Normal file
View File

View File

@ -0,0 +1,20 @@
{
"version" : 1,
"projects" : [
{
"name": "subsonicsnl",
"description": "subsonics.nl website",
"url": "https://subsonics.nl"
},
{
"name": "drivebycool",
"description": "driveby.cool website",
"url": "https://driveby.cool"
},
{
"name": "VaV Arena",
"description": "Q3 CPMA inspired arena shooter",
"url": "https://vav.driveby.cool"
}
]
}

4945
api/res/txt/first-names.txt Normal file

File diff suppressed because it is too large Load Diff

88799
api/res/txt/last-names.txt Normal file

File diff suppressed because it is too large Load Diff

120
api/src/Server.hx Normal file
View File

@ -0,0 +1,120 @@
import html.WebDocument;
import tink.http.containers.*;
import tink.http.Response;
import tink.web.routing.*;
import tink.sql.drivers.Sqlite;
import db.Db;
import haxe.Json;
import model.MUser;
import controller.IDGen;
import controller.User;
typedef T_project = {
name : String,
description : String,
url : String
}
typedef T_projects = {
version : Int,
projects : Array<T_project>
}
class Server {
@await public static var db:Db;
static function main() {
var container = new NodeContainer(8080);
//var container = PhpContainer.inst; //use PhpContainer instead of NodeContainer when targeting PHP
var router = new Router<Root>(new Root());
Db.createTables();
container.run(function(req) {
return router.route(Context.ofRequest(req))
.recover(OutgoingResponse.reportError);
});
}
}
class Root {
public function new() {}
@:get('/')
@:produces('text/html')
public function root(){
//return "yeet";
return WebDocument.render();
}
// @:get('/test')
// @:produces('text/html')
// @async
// public function create(){
// //return "yeet";
// var yeet = "yote";
// var driver = new tink.sql.drivers.Sqlite();
// @await var db = new Db('daba2', driver);
// @await var one = db.MUser.create();
// @await var two = db.MUser.insertOne({
// id: cast null,
// name: 'Alice',
// email: 'alice@example.com',
// password: 'jew'
// });
// @await var three = db.MUser.select({name: MUser.name, email: MUser.email}).where(MUser.email == 'alice@example.com').first().next(function(row) {
// trace(row.name);return "";
// });
// // trace(@await one);
// // trace(@await two);
// trace(@await three);
// return '$yeet';
// }
@:sub('/user')
@:produces('application/json')
public function user()
return new User();
@:sub('/projects')
@:produces('application/json')
public function projects()
return new Projects();
@:get('/hello')
@:produces('application/json')
public function hello(name = 'world'){
var greeting = { hello: name, foo: 42 };
var strout:String = tink.Json.stringify(greeting);
return strout;
}
@:sub('/idgen')
@:produces('application/json')
public function idGen()
return new IDGen();
}
class Projects {
public function new() {}
public var path:String = "./res/json/projects.json";
@:get('/')
@:produces('application/json')
public function projects(){
var json:String = Utils.getJson(path);
return json;
}
@:get('/project/by_name/$name')
@:produces('application/json')
public function project(name:String){
var json:String = Utils.getJson(path);
var _projects:T_projects = Json.parse(json);
json = "{}";
for(_project in _projects.projects){
if(_project.name == name){
json = tink.Json.stringify(_project);
}
}
return json;
}
}

48
api/src/Utils.hx Normal file
View File

@ -0,0 +1,48 @@
package;
import sys.io.File;
import sys.FileSystem;
class Utils{
public static function getHTML(path:String):String
{
var strout:String = "<html></html>";
if(FileSystem.exists(path)){
strout = File.getContent(path);
}
return strout;
}
public static function getJson(path:String):String
{
var strout:String = "{}";
if(FileSystem.exists(path)){
strout = File.getContent(path);
}
return strout;
}
public static function getTXT(path:String):String
{
var strout:String = "";
if(FileSystem.exists(path)){
strout = File.getContent(path);
}
return strout;
}
public static function parseLines(str:String):Array<String>
{
var lineArray:Array<String> = [];
if(str.indexOf("\r") == -1)
lineArray = str.split("\n");
else if(str.indexOf("\n") == -1){
lineArray = str.split("\r");
}
else if(str.indexOf("\r\n") == -1){
lineArray = str.split("\n\r");
}
else{
lineArray = str.split("\r\n");
}
return lineArray;
}
}

0
api/src/VDom.hx Normal file
View File

View File

@ -0,0 +1,67 @@
package controller;
import haxe.Json;
import Utils;
typedef T_IDInfo = {
var firstname:String;
var lastname:String;
var birthDay:String;
var email:String;
var password:String;
}
class IDGen{
public function new() {}
public static var path:String = "./res/txt/first-names.txt";
public static var path2:String = "./res/txt/last-names.txt";
public static function genID()
{
var firstnames = Utils.parseLines(Utils.getTXT(path));
var lastnames = Utils.parseLines(Utils.getTXT(path2));
var firstname:String = firstnames[ Math.floor(Math.random()*firstnames.length)].toLowerCase();
var lastname:String = lastnames[ Math.floor(Math.random()*lastnames.length)].toLowerCase();
var birthyear:Int = 2003-Math.floor(Math.random()*60);
var birthyear2dig:Int = birthyear - 1900;
while(birthyear2dig >100){
birthyear2dig -=100;
}
var id:T_IDInfo = {
firstname: firstname,
lastname: lastname,
birthDay: "01/01/"+birthyear,
email: firstname+lastname+(birthyear2dig)+"@gmail.com",
password: "4123jk54jhejkrtsdr"
};
return id;
}
@:get('/')
@:produces('application/json')
public function id(){
var json:String = Json.stringify(genID());
return json;
}
@:get('/firstnames')
@:produces('text/plain')
public function listfirstnames(){
var json:String = Utils.getTXT(path);
return json;
}
@:get('/lastnames')
@:produces('text/plain')
public function listlastnames(){
var json:String = Utils.getTXT(path2);
return json;
}
}

125
api/src/controller/User.hx Normal file
View File

@ -0,0 +1,125 @@
package controller;
import haxe.Json;
import Utils;
import db.Db;
import tink.sql.Fields;
import model.MUser;
import tink.core.*;
using Lambda;
using tink.CoreApi;
class User{
private static var driver = new tink.sql.drivers.Sqlite();
@await private static var db:Db = new Db('db.sqlite', driver);
public function new() {}
@:get('/')
@:produces('text/plain')
public function id(){
var json:String = "test";
return json;
}
// @await public function createUserTable():Promise<Bool>
// {
// // @await var status:Promise<Bool> =;
// @await var op = db.MUser.create();
// op.handle(function(outcome){
// switch outcome {
// case Success(data):
// trace(data);
// return data;
// case Failure(e):
// trace("failure: "+e);
// return e.data;
// }
// });
// return true;
// }
@await public function createUserTable():Promise<Bool>
{
// @await var status:Promise<Bool> =;
@await var op = db.MUser.create();
op.handle(function(outcome){
switch outcome {
case Success(data):
trace(data);
//return data;
case Failure(e):
trace("failure: "+e);
//return e.data;
}
});
return true;
}
@:get('/registerDummyUser')
@:produces('application/json')
public function registerdummyuser(){
//@await var db = new Db('db.sqlite', driver);
// var failed:tink.core.Next<tink.sql.Id<model.MUser>> = null
return createUserTable().next(function(_){
return db.MUser.insertOne({
id: cast null,
name: 'Alice',
email: 'alice@example.com',
password: 'jew'
});
}).next(function(_){
return db.MUser.select({id: MUser.id, name: MUser.name, email: MUser.email, password: MUser.password}).where(MUser.id == _).first().next(function(row) {
return row;
});
});
// @await var createTable = db.MUser.create().handle(function(outcome) {
// @await var insert = db.MUser.insertOne({
// id: cast null,
// name: 'Alice',
// email: 'alice@example.com',
// password: 'jew'
// }).next(function(_){
// trace(_);
// trace("wat");
// return { name: "klaas" };
// });
// trace(@await result);
// switch outcome {
// case Success(data):
// trace(data);
// return data;
// case Failure(e):
// trace("failure: "+e);
// return e.data;
// }
// return outcome;
// });
// trace(@await result);
// trace("kak");
// trace(result.status);
//return result;
// return {name: "Kees"};
//@await return result.next.;
//@await return result;
// @await var three = ;
// trace(@await one);
// trace(@await two);
// trace(three);
//return '$yeet';
// var json:String = Json.stringify(three);
// @await return json;
}
@:get('/fetchalice')
@:produces('application/json')
public function fetchalice(){
return db.MUser.select({name: MUser.name, email: MUser.email}).where(MUser.email == 'alice@example.com').first().next(function(row) {
return row;
});
}
}

10
api/src/db/Connection.hx Normal file
View File

@ -0,0 +1,10 @@
package db;
import tink.sql.drivers.sys.Sqlite;
import tink.sql.drivers.MySql;
import db.Db;
class Connection{
private static var driver = new tink.sql.drivers.Sqlite();
public static var db = new Db('daba', driver);
}

84
api/src/db/Db.hx Normal file
View File

@ -0,0 +1,84 @@
package db;
import tink.sql.drivers.Sqlite;
import tink.sql.Database;
import tink.sql.Types;
import model.MUser;
import model.services.DrivebyCool;
import tink.CoreApi;
@:tables(MUser)
@:tables(MProject)
// Post related Tables
@:tables(MPost)
@:tables(MTag)
@:tables(MTaggedPost)
interface DbDef_DrivebyCool extends tink.sql.DatabaseDefinition {
//@:procedure var func:Int->{x:Int, point:tink.s2d.Point};
@:table('user') var UserTbl:MUser;
// @:table('project') var ProjectTbl:DrivebyCool.MProject;
}
class Db extends tink.sql.Database<DbDef_DrivebyCool> {
public function new(__name:String,driver:tink.sql.Driver){
super(__name, driver);
}
private static var driver = new tink.sql.drivers.Sqlite();
@async private static var db:Db = new Db('db.sqlite', driver);
@async public static function getDb()
{
return @await db;
}
public static function createTables():Void
{
var db = Db.getDb();
@async var execute = function(){
return db.MUser.create(true).next(function(_){
trace("aids");
return db.MProject.create(true);
}).next(function(_){
trace("aids");
return db.MPost.create(true);
}).next(function(_){
trace("aids");
return db.MTag.create(true);
}).next(function(_){
trace("aids");
return db.MTaggedPost.create(true);
});
}
@await execute().next(function(_){
trace(_);
return _;
}).handle(function(_){
trace(_);
});
// trace(two());
// @async var yeet = db.next(function(_db){
// return db.MUser.create();
// });
// yeet.next(function(_){
// trace("kanker");
// var test = @await db;
// return test.MProject.create(true);
// });
// .next(function(_){
// trace("kanker");
// return db.MPost.create(true);
// }).next(function(_){
// return db.MTag.create(true);
// }).next(function(_){
// return db.MTaggedPost.create(true);
// }).next(function(_){
// trace(_);
// });
// @await db.MProject.create(true);
// @await db.MPost.create(true);
// @await db.MTag.create(true);
// @await db.MTaggedPost.create(true);
}
}

11
api/src/db/Models.hx Normal file
View File

@ -0,0 +1,11 @@
// package db;
// import tink.sql.Types;
// typedef User = {
// @:autoIncrement @:primary public var id(default, null):Id<User>;
// var name:VarChar<255>;
// @:unique var email:VarChar<255>;
// var password:VarChar<255>;
// }

View File

@ -0,0 +1,8 @@
package html;
class BaseRenderable{
public var bIsContainer:Bool = true;
public function render(){
}
}

View File

@ -0,0 +1,7 @@
package html;
class RenderableContainer extends BaseRenderable{
override function render() {
super.render();
}
}

44
api/src/html/Tag.hx Normal file
View File

@ -0,0 +1,44 @@
package html;
class Tag{
public var children:Array<Tag> = [];
public var name:String = "";
public var props:Array<String>;
public var textonly:Bool;
public var text:String = "";
public static var dochead:Tag;
public function new(_name:String, _props:Array<String>=null, _text = "", _textonly=false){
name = _name;
textonly = _textonly;
if(_props != null) props = _props;
text = _text;
}
public static function createTextElement(_text:String):Tag
{
var tag = new Tag("t",null,_text,true);
tag.text = _text;
return tag;
}
public function render():String
{
var strout:String = "";
if(!textonly){
var strProps:String = "";
if(props != null){
for(prop in props) strProps+=prop+" ";
}
strout+="<"+name+" "+strProps+" "+">";
strout+=text;
trace(text);
for(tag in children){
strout+=tag.render();
}
strout+="</"+name+">";
}
else{
strout = text;
}
trace(strout);
return strout;
}
}

View File

@ -0,0 +1,24 @@
package html;
//import tink.web.macros.Routing;
import tink.web.routing.*;
import tink.web.routing.Router;
class WebDocument{
public static function render():String
{
var docroot:Tag = new Tag("html");
var head:Tag = new Tag("head");
var body:Tag = new Tag("body");
var h1:Tag = new Tag("h1",['class="yeet"'],"Api endpoints:");
var a_yeet:Tag = new Tag("a",['href="projects"'],"projects");
var a_yeet:Tag = new Tag("a",['href="projects/project/by_name/"'],"projects");
docroot.children.push(head);
docroot.children.push(body);
body.children.push(h1);
body.children.push(a_yeet);
return docroot.render();
}
}

View File

@ -0,0 +1,9 @@
package model;
import tink.sql.Types;
typedef MService = {
@:autoIncrement @:primary public var id(default, null):Id<MService>;
public var name:VarChar<50>;
public var description:VarChar<1024>;
}

View File

@ -0,0 +1,10 @@
package model;
import tink.sql.Types;
typedef MSubscription = {
@:autoIncrement @:primary public var id(default, null):Id<MSubscription>;
public var subscriber:Id<MUser>;
public var service:Id<MService>;
}

11
api/src/model/MUser.hx Normal file
View File

@ -0,0 +1,11 @@
package model;
import tink.sql.Types;
import model.MService;
typedef MUser = {
@:autoIncrement @:primary public var id(default, null):Id<MUser>;
public var name:VarChar<50>;
public var email:VarChar<256>;
public var password:VarChar<256>;
}

View File

@ -0,0 +1,9 @@
package model.cctweaked;
import tink.sql.Types;
typedef HTurtle = {
@:autoIncrement @:primary public var id(default, null):Id<HTurtle>;
public var name:VarChar<50>;
public var password:VarChar<50>;
}

View File

@ -0,0 +1,55 @@
package model.services;
import tink.sql.Types;
import model.MSubscription;
/*
* Project related models
*/
//Defines a Project to be listed on the projects page
typedef MProject = {
@:autoIncrement @:primary public var id(default, null):Id<MProject>;
// Properties
public var name:VarChar<50>;
public var owner:Id<MUser>;
public var description:VarChar<1024>;
}
// Defines a relationship between a Project and a User. The User will be added as a member of the project and can author blogposts
typedef MMembership = {
@:autoIncrement @:primary public var id(default, null):Id<MMembership>;
// relationships
public var project:Id<MProject>;
public var user:Id<MUser>;
}
// Defines a Post
typedef MPost = {
@:autoIncrement @:primary public var id(default, null):Id<MPost>;
// Relationships
public var project:Id<MProject>;
public var owner:Id<MUser>;
// Properties
public var title:VarChar<1024>;
public var description:Text;
public var content:Text;
}
// Defines a tag that can be added to any post.
typedef MTag = {
@:autoIncrement @:primary public var id(default, null):Id<MTag>;
public var title:VarChar<32>;
}
// Defines a relationship between a tag and a post.
typedef MTaggedPost = {
@:autoIncrement @:primary public var id(default, null):Id<MTaggedPost>;
public var post:Id<MPost>;
public var tag:Id<MTag>;
}

View File

@ -0,0 +1,16 @@
package model.services;
import tink.sql.Types;
typedef MMembership = {
@:autoIncrement @:primary public var id(default, null):Id<MMembership>;
public var project:Id<MProject>;
public var user:Id<MUser>;
}
typedef MProject = {
@:autoIncrement @:primary public var id(default, null):Id<MProject>;
public var name:VarChar<50>;
public var owner:Id<MUser>;
public var members:Id<MMembership>;
}

0
api/src/res/a Normal file
View File

View File

@ -0,0 +1,20 @@
{
"version" : 1,
"projects" : [
{
"name": "subsonicsnl",
"description": "subsonics.nl website",
"url": "https://subsonics.nl"
},
{
"name": "drivebycool",
"description": "driveby.cool website",
"url": "https://driveby.cool"
},
{
"name": "VaV Arena",
"description": "Q3 CPMA inspired arena shooter",
"url": "https://vav.driveby.cool"
}
]
}