arangodb
This commit is contained in:
14
docker-compose.yaml
Normal file
14
docker-compose.yaml
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
version: "3.8"
|
||||||
|
services:
|
||||||
|
arangodb:
|
||||||
|
image: arangodb/arangodb:latest
|
||||||
|
ports:
|
||||||
|
- "8529:8529"
|
||||||
|
environment:
|
||||||
|
ARANGO_ROOT_PASSWORD: pass
|
||||||
|
volumes:
|
||||||
|
- arangodb_data:/var/lib/arangodb3
|
||||||
|
- arangodb_apps:/var/lib/arangodb3-apps
|
||||||
|
volumes:
|
||||||
|
arangodb_data:
|
||||||
|
arangodb_apps:
|
||||||
11
package.json
11
package.json
@@ -5,14 +5,13 @@
|
|||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vinxi dev",
|
"dev": "vinxi dev",
|
||||||
"build": "vinxi build",
|
"build": "vinxi build",
|
||||||
"start": "vinxi start"
|
"start": "vinxi start",
|
||||||
|
"sync_db": "tsx ./sync_db.ts"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@solidjs/router": "^0.15.3",
|
"@solidjs/router": "^0.15.3",
|
||||||
"@solidjs/start": "^1.1.0",
|
"@solidjs/start": "^1.1.0",
|
||||||
"kefir": "^3.8.8",
|
"arangojs": "^10.1.2",
|
||||||
"kefir-bus": "^2.3.1",
|
|
||||||
"lowdb": "^7.0.1",
|
|
||||||
"solid-js": "^1.9.5",
|
"solid-js": "^1.9.5",
|
||||||
"vinxi": "^0.5.7"
|
"vinxi": "^0.5.7"
|
||||||
},
|
},
|
||||||
@@ -20,6 +19,8 @@
|
|||||||
"node": ">=22"
|
"node": ">=22"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/kefir": "^3.8.11"
|
"@types/json-schema": "^7.0.15",
|
||||||
|
"json-schema": "^0.4.0",
|
||||||
|
"tsx": "^4.20.3"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
169
pnpm-lock.yaml
generated
169
pnpm-lock.yaml
generated
@@ -13,26 +13,26 @@ importers:
|
|||||||
version: 0.15.3(solid-js@1.9.7)
|
version: 0.15.3(solid-js@1.9.7)
|
||||||
'@solidjs/start':
|
'@solidjs/start':
|
||||||
specifier: ^1.1.0
|
specifier: ^1.1.0
|
||||||
version: 1.1.7(solid-js@1.9.7)(vinxi@0.5.8(@netlify/blobs@9.1.2)(@types/node@24.1.0)(db0@0.3.2)(ioredis@5.6.1)(jiti@2.5.1)(terser@5.43.1))(vite@6.3.5(@types/node@24.1.0)(jiti@2.5.1)(terser@5.43.1))
|
version: 1.1.7(solid-js@1.9.7)(vinxi@0.5.8(@netlify/blobs@9.1.2)(@types/node@24.1.0)(db0@0.3.2)(ioredis@5.6.1)(jiti@2.5.1)(terser@5.43.1)(tsx@4.20.3))(vite@6.3.5(@types/node@24.1.0)(jiti@2.5.1)(terser@5.43.1)(tsx@4.20.3))
|
||||||
kefir:
|
arangojs:
|
||||||
specifier: ^3.8.8
|
specifier: ^10.1.2
|
||||||
version: 3.8.8
|
version: 10.1.2
|
||||||
kefir-bus:
|
|
||||||
specifier: ^2.3.1
|
|
||||||
version: 2.3.1(kefir@3.8.8)
|
|
||||||
lowdb:
|
|
||||||
specifier: ^7.0.1
|
|
||||||
version: 7.0.1
|
|
||||||
solid-js:
|
solid-js:
|
||||||
specifier: ^1.9.5
|
specifier: ^1.9.5
|
||||||
version: 1.9.7
|
version: 1.9.7
|
||||||
vinxi:
|
vinxi:
|
||||||
specifier: ^0.5.7
|
specifier: ^0.5.7
|
||||||
version: 0.5.8(@netlify/blobs@9.1.2)(@types/node@24.1.0)(db0@0.3.2)(ioredis@5.6.1)(jiti@2.5.1)(terser@5.43.1)
|
version: 0.5.8(@netlify/blobs@9.1.2)(@types/node@24.1.0)(db0@0.3.2)(ioredis@5.6.1)(jiti@2.5.1)(terser@5.43.1)(tsx@4.20.3)
|
||||||
devDependencies:
|
devDependencies:
|
||||||
'@types/kefir':
|
'@types/json-schema':
|
||||||
specifier: ^3.8.11
|
specifier: ^7.0.15
|
||||||
version: 3.8.11
|
version: 7.0.15
|
||||||
|
json-schema:
|
||||||
|
specifier: ^0.4.0
|
||||||
|
version: 0.4.0
|
||||||
|
tsx:
|
||||||
|
specifier: ^4.20.3
|
||||||
|
version: 4.20.3
|
||||||
|
|
||||||
packages:
|
packages:
|
||||||
|
|
||||||
@@ -947,8 +947,8 @@ packages:
|
|||||||
'@types/hast@3.0.4':
|
'@types/hast@3.0.4':
|
||||||
resolution: {integrity: sha512-WPs+bbQw5aCj+x6laNGWLH3wviHtoCv/P3+otBhbOhJgG8qtpdAMlTCxLtsTWA7LH1Oh/bFCHsBn0TPS5m30EQ==}
|
resolution: {integrity: sha512-WPs+bbQw5aCj+x6laNGWLH3wviHtoCv/P3+otBhbOhJgG8qtpdAMlTCxLtsTWA7LH1Oh/bFCHsBn0TPS5m30EQ==}
|
||||||
|
|
||||||
'@types/kefir@3.8.11':
|
'@types/json-schema@7.0.15':
|
||||||
resolution: {integrity: sha512-5TRdFXQYsVUvqIH6nYjslHzBgn4hnptcutXnqAhfbKdWD/799c44hFhQGF3887E2t/Q4jSp3RvNFCaQ+b9w6vQ==}
|
resolution: {integrity: sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==}
|
||||||
|
|
||||||
'@types/mdast@4.0.4':
|
'@types/mdast@4.0.4':
|
||||||
resolution: {integrity: sha512-kGaNbPh1k7AFzgpud/gMdvIm5xuECykRR+JnWKQno9TAXVa6WIVCGTPvYGekIDL4uwCZQSYbUxNBSb1aUo79oA==}
|
resolution: {integrity: sha512-kGaNbPh1k7AFzgpud/gMdvIm5xuECykRR+JnWKQno9TAXVa6WIVCGTPvYGekIDL4uwCZQSYbUxNBSb1aUo79oA==}
|
||||||
@@ -956,6 +956,9 @@ packages:
|
|||||||
'@types/micromatch@4.0.9':
|
'@types/micromatch@4.0.9':
|
||||||
resolution: {integrity: sha512-7V+8ncr22h4UoYRLnLXSpTxjQrNUXtWHGeMPRJt1nULXI57G9bIcpyrHlmrQ7QK24EyyuXvYcSSWAM8GA9nqCg==}
|
resolution: {integrity: sha512-7V+8ncr22h4UoYRLnLXSpTxjQrNUXtWHGeMPRJt1nULXI57G9bIcpyrHlmrQ7QK24EyyuXvYcSSWAM8GA9nqCg==}
|
||||||
|
|
||||||
|
'@types/node@20.19.9':
|
||||||
|
resolution: {integrity: sha512-cuVNgarYWZqxRJDQHEB58GEONhOK79QVR/qYx4S7kcUObQvUwvFnYxJuuHUKm2aieN9X3yZB4LZsuYNU1Qphsw==}
|
||||||
|
|
||||||
'@types/node@24.1.0':
|
'@types/node@24.1.0':
|
||||||
resolution: {integrity: sha512-ut5FthK5moxFKH2T1CUOC6ctR67rQRvvHdFLCD2Ql6KXmMuCrjsSsRI9UsLCm9M18BMwClv4pn327UvB7eeO1w==}
|
resolution: {integrity: sha512-ut5FthK5moxFKH2T1CUOC6ctR67rQRvvHdFLCD2Ql6KXmMuCrjsSsRI9UsLCm9M18BMwClv4pn327UvB7eeO1w==}
|
||||||
|
|
||||||
@@ -1120,6 +1123,15 @@ packages:
|
|||||||
resolution: {integrity: sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==}
|
resolution: {integrity: sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==}
|
||||||
engines: {node: '>= 8'}
|
engines: {node: '>= 8'}
|
||||||
|
|
||||||
|
arangojs@10.1.2:
|
||||||
|
resolution: {integrity: sha512-25Gy2dwSYOaKNWJixpGZXCSeOxS+k/E0sFuADcYm9ZhywFYwsTgh2hOB83fZy0ZOhC7Xc/zEhOL+tR6wujoyfQ==}
|
||||||
|
engines: {node: '>=20'}
|
||||||
|
peerDependencies:
|
||||||
|
undici: '>=5.21.0'
|
||||||
|
peerDependenciesMeta:
|
||||||
|
undici:
|
||||||
|
optional: true
|
||||||
|
|
||||||
archiver-utils@5.0.2:
|
archiver-utils@5.0.2:
|
||||||
resolution: {integrity: sha512-wuLJMmIBQYCsGZgYLTy5FIB2pF6Lfb6cXMSF8Qywwk3t20zWnAi7zLcQFdKQmIB8wyZpY5ER38x08GbwtR2cLA==}
|
resolution: {integrity: sha512-wuLJMmIBQYCsGZgYLTy5FIB2pF6Lfb6cXMSF8Qywwk3t20zWnAi7zLcQFdKQmIB8wyZpY5ER38x08GbwtR2cLA==}
|
||||||
engines: {node: '>= 14'}
|
engines: {node: '>= 14'}
|
||||||
@@ -1795,6 +1807,9 @@ packages:
|
|||||||
resolution: {integrity: sha512-VaUJspBffn/LMCJVoMvSAdmscJyS1auj5Zulnn5UoYcY531UWmdwhRWkcGKnGU93m5HSXP9LP2usOryrBtQowA==}
|
resolution: {integrity: sha512-VaUJspBffn/LMCJVoMvSAdmscJyS1auj5Zulnn5UoYcY531UWmdwhRWkcGKnGU93m5HSXP9LP2usOryrBtQowA==}
|
||||||
engines: {node: '>=16'}
|
engines: {node: '>=16'}
|
||||||
|
|
||||||
|
get-tsconfig@4.10.1:
|
||||||
|
resolution: {integrity: sha512-auHyJ4AgMz7vgS8Hp3N6HXSmlMdUyhSUrfBF16w153rxtLIEOE+HGqaBppczZvnHLqQJfiHotCYpNhl0lUROFQ==}
|
||||||
|
|
||||||
giget@2.0.0:
|
giget@2.0.0:
|
||||||
resolution: {integrity: sha512-L5bGsVkxJbJgdnwyuheIunkGatUF/zssUoxxjACCseZYAVbaqdh9Tsmmlkl8vYan09H7sbvKt4pS8GqKLBrEzA==}
|
resolution: {integrity: sha512-L5bGsVkxJbJgdnwyuheIunkGatUF/zssUoxxjACCseZYAVbaqdh9Tsmmlkl8vYan09H7sbvKt4pS8GqKLBrEzA==}
|
||||||
hasBin: true
|
hasBin: true
|
||||||
@@ -2031,6 +2046,9 @@ packages:
|
|||||||
engines: {node: '>=6'}
|
engines: {node: '>=6'}
|
||||||
hasBin: true
|
hasBin: true
|
||||||
|
|
||||||
|
json-schema@0.4.0:
|
||||||
|
resolution: {integrity: sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==}
|
||||||
|
|
||||||
json5@2.2.3:
|
json5@2.2.3:
|
||||||
resolution: {integrity: sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==}
|
resolution: {integrity: sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==}
|
||||||
engines: {node: '>=6'}
|
engines: {node: '>=6'}
|
||||||
@@ -2044,14 +2062,6 @@ packages:
|
|||||||
resolution: {integrity: sha512-+KJGIyHgkGuIq3IEBNftfhW/LfWhXUIY6OmyVWjliu5KH1y0fw7VQ8YndE2O4qZdMSd9SqbnC8GOcZEy0Om7sA==}
|
resolution: {integrity: sha512-+KJGIyHgkGuIq3IEBNftfhW/LfWhXUIY6OmyVWjliu5KH1y0fw7VQ8YndE2O4qZdMSd9SqbnC8GOcZEy0Om7sA==}
|
||||||
engines: {node: '>=18'}
|
engines: {node: '>=18'}
|
||||||
|
|
||||||
kefir-bus@2.3.1:
|
|
||||||
resolution: {integrity: sha512-wLCQfEw8PddSNeyjDCH2WNgNg3Rb/c+OaG5WEPfEwod+LQfGX4isHcHRWsYNLmdFEw3/KyA+9qDSy+VC4NsifA==}
|
|
||||||
peerDependencies:
|
|
||||||
kefir: ^3.5.1
|
|
||||||
|
|
||||||
kefir@3.8.8:
|
|
||||||
resolution: {integrity: sha512-xWga7QCZsR2Wjy2vNL3Kq/irT+IwxwItEWycRRlT5yhqHZK2fmEhziP+LzcJBWSTAMranGKtGTQ6lFpyJS3+jA==}
|
|
||||||
|
|
||||||
kleur@4.1.5:
|
kleur@4.1.5:
|
||||||
resolution: {integrity: sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ==}
|
resolution: {integrity: sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ==}
|
||||||
engines: {node: '>=6'}
|
engines: {node: '>=6'}
|
||||||
@@ -2106,10 +2116,6 @@ packages:
|
|||||||
resolution: {integrity: sha512-TFYA4jnP7PVbmlBIfhlSe+WKxs9dklXMTEGcBCIvLhE/Tn3H6Gk1norupVW7m5Cnd4bLcr08AytbyV/xj7f/kQ==}
|
resolution: {integrity: sha512-TFYA4jnP7PVbmlBIfhlSe+WKxs9dklXMTEGcBCIvLhE/Tn3H6Gk1norupVW7m5Cnd4bLcr08AytbyV/xj7f/kQ==}
|
||||||
engines: {node: '>= 12.0.0'}
|
engines: {node: '>= 12.0.0'}
|
||||||
|
|
||||||
lowdb@7.0.1:
|
|
||||||
resolution: {integrity: sha512-neJAj8GwF0e8EpycYIDFqEPcx9Qz4GUho20jWFR7YiFeXzF1YMLdxB36PypcTSPMA+4+LvgyMacYhlr18Zlymw==}
|
|
||||||
engines: {node: '>=18'}
|
|
||||||
|
|
||||||
lru-cache@10.4.3:
|
lru-cache@10.4.3:
|
||||||
resolution: {integrity: sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==}
|
resolution: {integrity: sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==}
|
||||||
|
|
||||||
@@ -2575,6 +2581,9 @@ packages:
|
|||||||
resolution: {integrity: sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==}
|
resolution: {integrity: sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==}
|
||||||
engines: {node: '>=8'}
|
engines: {node: '>=8'}
|
||||||
|
|
||||||
|
resolve-pkg-maps@1.0.0:
|
||||||
|
resolution: {integrity: sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==}
|
||||||
|
|
||||||
resolve@1.22.10:
|
resolve@1.22.10:
|
||||||
resolution: {integrity: sha512-NPRy+/ncIMeDlTAsuqwKIiferiawhefFJtkNSW0qZJEqMEb+qBt/77B/jGeeek+F0uOeN05CDa6HXbbIgtVX4w==}
|
resolution: {integrity: sha512-NPRy+/ncIMeDlTAsuqwKIiferiawhefFJtkNSW0qZJEqMEb+qBt/77B/jGeeek+F0uOeN05CDa6HXbbIgtVX4w==}
|
||||||
engines: {node: '>= 0.4'}
|
engines: {node: '>= 0.4'}
|
||||||
@@ -2771,10 +2780,6 @@ packages:
|
|||||||
std-env@3.9.0:
|
std-env@3.9.0:
|
||||||
resolution: {integrity: sha512-UGvjygr6F6tpH7o2qyqR6QYpwraIjKSdtzyBdyytFOHmPZY917kwdwLG0RbOjWOnKmnm3PeHjaoLLMie7kPLQw==}
|
resolution: {integrity: sha512-UGvjygr6F6tpH7o2qyqR6QYpwraIjKSdtzyBdyytFOHmPZY917kwdwLG0RbOjWOnKmnm3PeHjaoLLMie7kPLQw==}
|
||||||
|
|
||||||
steno@4.0.2:
|
|
||||||
resolution: {integrity: sha512-yhPIQXjrlt1xv7dyPQg2P17URmXbuM5pdGkpiMB3RenprfiBlvK415Lctfe0eshk90oA7/tNq7WEiMK8RSP39A==}
|
|
||||||
engines: {node: '>=18'}
|
|
||||||
|
|
||||||
streamx@2.22.1:
|
streamx@2.22.1:
|
||||||
resolution: {integrity: sha512-znKXEBxfatz2GBNK02kRnCXjV+AA4kjZIUxeWSr3UGirZMJfTE9uiwKHobnbgxWyL/JWro8tTq+vOqAK1/qbSA==}
|
resolution: {integrity: sha512-znKXEBxfatz2GBNK02kRnCXjV+AA4kjZIUxeWSr3UGirZMJfTE9uiwKHobnbgxWyL/JWro8tTq+vOqAK1/qbSA==}
|
||||||
|
|
||||||
@@ -2897,6 +2902,11 @@ packages:
|
|||||||
tslib@2.8.1:
|
tslib@2.8.1:
|
||||||
resolution: {integrity: sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==}
|
resolution: {integrity: sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==}
|
||||||
|
|
||||||
|
tsx@4.20.3:
|
||||||
|
resolution: {integrity: sha512-qjbnuR9Tr+FJOMBqJCW5ehvIo/buZq7vH7qD7JziU98h6l3qGy0a/yPFjwO+y0/T7GFpNgNAvEcPPVfyT8rrPQ==}
|
||||||
|
engines: {node: '>=18.0.0'}
|
||||||
|
hasBin: true
|
||||||
|
|
||||||
type-fest@4.41.0:
|
type-fest@4.41.0:
|
||||||
resolution: {integrity: sha512-TeTSQ6H5YHvpqVwBRcnLDCBnDOHWYu7IvGbHT6N8AOymcr9PJGjc1GTtiWZTYg0NCgYwvnYWEkVChQAr9bjfwA==}
|
resolution: {integrity: sha512-TeTSQ6H5YHvpqVwBRcnLDCBnDOHWYu7IvGbHT6N8AOymcr9PJGjc1GTtiWZTYg0NCgYwvnYWEkVChQAr9bjfwA==}
|
||||||
engines: {node: '>=16'}
|
engines: {node: '>=16'}
|
||||||
@@ -2921,6 +2931,9 @@ packages:
|
|||||||
undici-types@5.28.4:
|
undici-types@5.28.4:
|
||||||
resolution: {integrity: sha512-3OeMF5Lyowe8VW0skf5qaIE7Or3yS9LS7fvMUI0gg4YxpIBVg0L8BxCmROw2CcYhSkpR68Epz7CGc8MPj94Uww==}
|
resolution: {integrity: sha512-3OeMF5Lyowe8VW0skf5qaIE7Or3yS9LS7fvMUI0gg4YxpIBVg0L8BxCmROw2CcYhSkpR68Epz7CGc8MPj94Uww==}
|
||||||
|
|
||||||
|
undici-types@6.21.0:
|
||||||
|
resolution: {integrity: sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==}
|
||||||
|
|
||||||
undici-types@7.8.0:
|
undici-types@7.8.0:
|
||||||
resolution: {integrity: sha512-9UJ2xGDvQ43tYyVMpuHlsgApydB8ZKfVYTsLDhXkFL/6gfkp+U8xTGdh8pMJv1SpZna0zxG1DwsKZsreLbXBxw==}
|
resolution: {integrity: sha512-9UJ2xGDvQ43tYyVMpuHlsgApydB8ZKfVYTsLDhXkFL/6gfkp+U8xTGdh8pMJv1SpZna0zxG1DwsKZsreLbXBxw==}
|
||||||
|
|
||||||
@@ -4021,11 +4034,11 @@ snapshots:
|
|||||||
dependencies:
|
dependencies:
|
||||||
solid-js: 1.9.7
|
solid-js: 1.9.7
|
||||||
|
|
||||||
'@solidjs/start@1.1.7(solid-js@1.9.7)(vinxi@0.5.8(@netlify/blobs@9.1.2)(@types/node@24.1.0)(db0@0.3.2)(ioredis@5.6.1)(jiti@2.5.1)(terser@5.43.1))(vite@6.3.5(@types/node@24.1.0)(jiti@2.5.1)(terser@5.43.1))':
|
'@solidjs/start@1.1.7(solid-js@1.9.7)(vinxi@0.5.8(@netlify/blobs@9.1.2)(@types/node@24.1.0)(db0@0.3.2)(ioredis@5.6.1)(jiti@2.5.1)(terser@5.43.1)(tsx@4.20.3))(vite@6.3.5(@types/node@24.1.0)(jiti@2.5.1)(terser@5.43.1)(tsx@4.20.3))':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@tanstack/server-functions-plugin': 1.121.21(vite@6.3.5(@types/node@24.1.0)(jiti@2.5.1)(terser@5.43.1))
|
'@tanstack/server-functions-plugin': 1.121.21(vite@6.3.5(@types/node@24.1.0)(jiti@2.5.1)(terser@5.43.1)(tsx@4.20.3))
|
||||||
'@vinxi/plugin-directives': 0.5.1(vinxi@0.5.8(@netlify/blobs@9.1.2)(@types/node@24.1.0)(db0@0.3.2)(ioredis@5.6.1)(jiti@2.5.1)(terser@5.43.1))
|
'@vinxi/plugin-directives': 0.5.1(vinxi@0.5.8(@netlify/blobs@9.1.2)(@types/node@24.1.0)(db0@0.3.2)(ioredis@5.6.1)(jiti@2.5.1)(terser@5.43.1)(tsx@4.20.3))
|
||||||
'@vinxi/server-components': 0.5.1(vinxi@0.5.8(@netlify/blobs@9.1.2)(@types/node@24.1.0)(db0@0.3.2)(ioredis@5.6.1)(jiti@2.5.1)(terser@5.43.1))
|
'@vinxi/server-components': 0.5.1(vinxi@0.5.8(@netlify/blobs@9.1.2)(@types/node@24.1.0)(db0@0.3.2)(ioredis@5.6.1)(jiti@2.5.1)(terser@5.43.1)(tsx@4.20.3))
|
||||||
defu: 6.1.4
|
defu: 6.1.4
|
||||||
error-stack-parser: 2.1.4
|
error-stack-parser: 2.1.4
|
||||||
html-to-image: 1.11.13
|
html-to-image: 1.11.13
|
||||||
@@ -4036,8 +4049,8 @@ snapshots:
|
|||||||
source-map-js: 1.2.1
|
source-map-js: 1.2.1
|
||||||
terracotta: 1.0.6(solid-js@1.9.7)
|
terracotta: 1.0.6(solid-js@1.9.7)
|
||||||
tinyglobby: 0.2.14
|
tinyglobby: 0.2.14
|
||||||
vinxi: 0.5.8(@netlify/blobs@9.1.2)(@types/node@24.1.0)(db0@0.3.2)(ioredis@5.6.1)(jiti@2.5.1)(terser@5.43.1)
|
vinxi: 0.5.8(@netlify/blobs@9.1.2)(@types/node@24.1.0)(db0@0.3.2)(ioredis@5.6.1)(jiti@2.5.1)(terser@5.43.1)(tsx@4.20.3)
|
||||||
vite-plugin-solid: 2.11.8(solid-js@1.9.7)(vite@6.3.5(@types/node@24.1.0)(jiti@2.5.1)(terser@5.43.1))
|
vite-plugin-solid: 2.11.8(solid-js@1.9.7)(vite@6.3.5(@types/node@24.1.0)(jiti@2.5.1)(terser@5.43.1)(tsx@4.20.3))
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- '@testing-library/jest-dom'
|
- '@testing-library/jest-dom'
|
||||||
- solid-js
|
- solid-js
|
||||||
@@ -4046,7 +4059,7 @@ snapshots:
|
|||||||
|
|
||||||
'@speed-highlight/core@1.2.7': {}
|
'@speed-highlight/core@1.2.7': {}
|
||||||
|
|
||||||
'@tanstack/directive-functions-plugin@1.121.21(vite@6.3.5(@types/node@24.1.0)(jiti@2.5.1)(terser@5.43.1))':
|
'@tanstack/directive-functions-plugin@1.121.21(vite@6.3.5(@types/node@24.1.0)(jiti@2.5.1)(terser@5.43.1)(tsx@4.20.3))':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@babel/code-frame': 7.26.2
|
'@babel/code-frame': 7.26.2
|
||||||
'@babel/core': 7.28.0
|
'@babel/core': 7.28.0
|
||||||
@@ -4055,7 +4068,7 @@ snapshots:
|
|||||||
'@tanstack/router-utils': 1.129.7
|
'@tanstack/router-utils': 1.129.7
|
||||||
babel-dead-code-elimination: 1.0.10
|
babel-dead-code-elimination: 1.0.10
|
||||||
tiny-invariant: 1.3.3
|
tiny-invariant: 1.3.3
|
||||||
vite: 6.3.5(@types/node@24.1.0)(jiti@2.5.1)(terser@5.43.1)
|
vite: 6.3.5(@types/node@24.1.0)(jiti@2.5.1)(terser@5.43.1)(tsx@4.20.3)
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- supports-color
|
- supports-color
|
||||||
|
|
||||||
@@ -4070,7 +4083,7 @@ snapshots:
|
|||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- supports-color
|
- supports-color
|
||||||
|
|
||||||
'@tanstack/server-functions-plugin@1.121.21(vite@6.3.5(@types/node@24.1.0)(jiti@2.5.1)(terser@5.43.1))':
|
'@tanstack/server-functions-plugin@1.121.21(vite@6.3.5(@types/node@24.1.0)(jiti@2.5.1)(terser@5.43.1)(tsx@4.20.3))':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@babel/code-frame': 7.26.2
|
'@babel/code-frame': 7.26.2
|
||||||
'@babel/core': 7.28.0
|
'@babel/core': 7.28.0
|
||||||
@@ -4079,7 +4092,7 @@ snapshots:
|
|||||||
'@babel/template': 7.27.2
|
'@babel/template': 7.27.2
|
||||||
'@babel/traverse': 7.28.0
|
'@babel/traverse': 7.28.0
|
||||||
'@babel/types': 7.28.2
|
'@babel/types': 7.28.2
|
||||||
'@tanstack/directive-functions-plugin': 1.121.21(vite@6.3.5(@types/node@24.1.0)(jiti@2.5.1)(terser@5.43.1))
|
'@tanstack/directive-functions-plugin': 1.121.21(vite@6.3.5(@types/node@24.1.0)(jiti@2.5.1)(terser@5.43.1)(tsx@4.20.3))
|
||||||
babel-dead-code-elimination: 1.0.10
|
babel-dead-code-elimination: 1.0.10
|
||||||
tiny-invariant: 1.3.3
|
tiny-invariant: 1.3.3
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
@@ -4115,9 +4128,7 @@ snapshots:
|
|||||||
dependencies:
|
dependencies:
|
||||||
'@types/unist': 3.0.3
|
'@types/unist': 3.0.3
|
||||||
|
|
||||||
'@types/kefir@3.8.11':
|
'@types/json-schema@7.0.15': {}
|
||||||
dependencies:
|
|
||||||
'@types/node': 24.1.0
|
|
||||||
|
|
||||||
'@types/mdast@4.0.4':
|
'@types/mdast@4.0.4':
|
||||||
dependencies:
|
dependencies:
|
||||||
@@ -4127,9 +4138,14 @@ snapshots:
|
|||||||
dependencies:
|
dependencies:
|
||||||
'@types/braces': 3.0.5
|
'@types/braces': 3.0.5
|
||||||
|
|
||||||
|
'@types/node@20.19.9':
|
||||||
|
dependencies:
|
||||||
|
undici-types: 6.21.0
|
||||||
|
|
||||||
'@types/node@24.1.0':
|
'@types/node@24.1.0':
|
||||||
dependencies:
|
dependencies:
|
||||||
undici-types: 7.8.0
|
undici-types: 7.8.0
|
||||||
|
optional: true
|
||||||
|
|
||||||
'@types/normalize-package-data@2.4.4': {}
|
'@types/normalize-package-data@2.4.4': {}
|
||||||
|
|
||||||
@@ -4221,7 +4237,7 @@ snapshots:
|
|||||||
untun: 0.1.3
|
untun: 0.1.3
|
||||||
uqr: 0.1.2
|
uqr: 0.1.2
|
||||||
|
|
||||||
'@vinxi/plugin-directives@0.5.1(vinxi@0.5.8(@netlify/blobs@9.1.2)(@types/node@24.1.0)(db0@0.3.2)(ioredis@5.6.1)(jiti@2.5.1)(terser@5.43.1))':
|
'@vinxi/plugin-directives@0.5.1(vinxi@0.5.8(@netlify/blobs@9.1.2)(@types/node@24.1.0)(db0@0.3.2)(ioredis@5.6.1)(jiti@2.5.1)(terser@5.43.1)(tsx@4.20.3))':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@babel/parser': 7.28.0
|
'@babel/parser': 7.28.0
|
||||||
acorn: 8.15.0
|
acorn: 8.15.0
|
||||||
@@ -4232,18 +4248,18 @@ snapshots:
|
|||||||
magicast: 0.2.11
|
magicast: 0.2.11
|
||||||
recast: 0.23.11
|
recast: 0.23.11
|
||||||
tslib: 2.8.1
|
tslib: 2.8.1
|
||||||
vinxi: 0.5.8(@netlify/blobs@9.1.2)(@types/node@24.1.0)(db0@0.3.2)(ioredis@5.6.1)(jiti@2.5.1)(terser@5.43.1)
|
vinxi: 0.5.8(@netlify/blobs@9.1.2)(@types/node@24.1.0)(db0@0.3.2)(ioredis@5.6.1)(jiti@2.5.1)(terser@5.43.1)(tsx@4.20.3)
|
||||||
|
|
||||||
'@vinxi/server-components@0.5.1(vinxi@0.5.8(@netlify/blobs@9.1.2)(@types/node@24.1.0)(db0@0.3.2)(ioredis@5.6.1)(jiti@2.5.1)(terser@5.43.1))':
|
'@vinxi/server-components@0.5.1(vinxi@0.5.8(@netlify/blobs@9.1.2)(@types/node@24.1.0)(db0@0.3.2)(ioredis@5.6.1)(jiti@2.5.1)(terser@5.43.1)(tsx@4.20.3))':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@vinxi/plugin-directives': 0.5.1(vinxi@0.5.8(@netlify/blobs@9.1.2)(@types/node@24.1.0)(db0@0.3.2)(ioredis@5.6.1)(jiti@2.5.1)(terser@5.43.1))
|
'@vinxi/plugin-directives': 0.5.1(vinxi@0.5.8(@netlify/blobs@9.1.2)(@types/node@24.1.0)(db0@0.3.2)(ioredis@5.6.1)(jiti@2.5.1)(terser@5.43.1)(tsx@4.20.3))
|
||||||
acorn: 8.15.0
|
acorn: 8.15.0
|
||||||
acorn-loose: 8.5.2
|
acorn-loose: 8.5.2
|
||||||
acorn-typescript: 1.4.13(acorn@8.15.0)
|
acorn-typescript: 1.4.13(acorn@8.15.0)
|
||||||
astring: 1.9.0
|
astring: 1.9.0
|
||||||
magicast: 0.2.11
|
magicast: 0.2.11
|
||||||
recast: 0.23.11
|
recast: 0.23.11
|
||||||
vinxi: 0.5.8(@netlify/blobs@9.1.2)(@types/node@24.1.0)(db0@0.3.2)(ioredis@5.6.1)(jiti@2.5.1)(terser@5.43.1)
|
vinxi: 0.5.8(@netlify/blobs@9.1.2)(@types/node@24.1.0)(db0@0.3.2)(ioredis@5.6.1)(jiti@2.5.1)(terser@5.43.1)(tsx@4.20.3)
|
||||||
|
|
||||||
'@vue/compiler-core@3.5.18':
|
'@vue/compiler-core@3.5.18':
|
||||||
dependencies:
|
dependencies:
|
||||||
@@ -4352,6 +4368,10 @@ snapshots:
|
|||||||
normalize-path: 3.0.0
|
normalize-path: 3.0.0
|
||||||
picomatch: 2.3.1
|
picomatch: 2.3.1
|
||||||
|
|
||||||
|
arangojs@10.1.2:
|
||||||
|
dependencies:
|
||||||
|
'@types/node': 20.19.9
|
||||||
|
|
||||||
archiver-utils@5.0.2:
|
archiver-utils@5.0.2:
|
||||||
dependencies:
|
dependencies:
|
||||||
glob: 10.4.5
|
glob: 10.4.5
|
||||||
@@ -5006,6 +5026,10 @@ snapshots:
|
|||||||
|
|
||||||
get-stream@8.0.1: {}
|
get-stream@8.0.1: {}
|
||||||
|
|
||||||
|
get-tsconfig@4.10.1:
|
||||||
|
dependencies:
|
||||||
|
resolve-pkg-maps: 1.0.0
|
||||||
|
|
||||||
giget@2.0.0:
|
giget@2.0.0:
|
||||||
dependencies:
|
dependencies:
|
||||||
citty: 0.1.6
|
citty: 0.1.6
|
||||||
@@ -5236,18 +5260,14 @@ snapshots:
|
|||||||
|
|
||||||
jsesc@3.1.0: {}
|
jsesc@3.1.0: {}
|
||||||
|
|
||||||
|
json-schema@0.4.0: {}
|
||||||
|
|
||||||
json5@2.2.3: {}
|
json5@2.2.3: {}
|
||||||
|
|
||||||
junk@4.0.1: {}
|
junk@4.0.1: {}
|
||||||
|
|
||||||
jwt-decode@4.0.0: {}
|
jwt-decode@4.0.0: {}
|
||||||
|
|
||||||
kefir-bus@2.3.1(kefir@3.8.8):
|
|
||||||
dependencies:
|
|
||||||
kefir: 3.8.8
|
|
||||||
|
|
||||||
kefir@3.8.8: {}
|
|
||||||
|
|
||||||
kleur@4.1.5: {}
|
kleur@4.1.5: {}
|
||||||
|
|
||||||
klona@2.0.6: {}
|
klona@2.0.6: {}
|
||||||
@@ -5316,10 +5336,6 @@ snapshots:
|
|||||||
safe-stable-stringify: 2.5.0
|
safe-stable-stringify: 2.5.0
|
||||||
triple-beam: 1.4.1
|
triple-beam: 1.4.1
|
||||||
|
|
||||||
lowdb@7.0.1:
|
|
||||||
dependencies:
|
|
||||||
steno: 4.0.2
|
|
||||||
|
|
||||||
lru-cache@10.4.3: {}
|
lru-cache@10.4.3: {}
|
||||||
|
|
||||||
lru-cache@5.1.1:
|
lru-cache@5.1.1:
|
||||||
@@ -5874,6 +5890,8 @@ snapshots:
|
|||||||
|
|
||||||
resolve-from@5.0.0: {}
|
resolve-from@5.0.0: {}
|
||||||
|
|
||||||
|
resolve-pkg-maps@1.0.0: {}
|
||||||
|
|
||||||
resolve@1.22.10:
|
resolve@1.22.10:
|
||||||
dependencies:
|
dependencies:
|
||||||
is-core-module: 2.16.1
|
is-core-module: 2.16.1
|
||||||
@@ -6120,8 +6138,6 @@ snapshots:
|
|||||||
|
|
||||||
std-env@3.9.0: {}
|
std-env@3.9.0: {}
|
||||||
|
|
||||||
steno@4.0.2: {}
|
|
||||||
|
|
||||||
streamx@2.22.1:
|
streamx@2.22.1:
|
||||||
dependencies:
|
dependencies:
|
||||||
fast-fifo: 1.3.2
|
fast-fifo: 1.3.2
|
||||||
@@ -6248,6 +6264,13 @@ snapshots:
|
|||||||
|
|
||||||
tslib@2.8.1: {}
|
tslib@2.8.1: {}
|
||||||
|
|
||||||
|
tsx@4.20.3:
|
||||||
|
dependencies:
|
||||||
|
esbuild: 0.25.8
|
||||||
|
get-tsconfig: 4.10.1
|
||||||
|
optionalDependencies:
|
||||||
|
fsevents: 2.3.3
|
||||||
|
|
||||||
type-fest@4.41.0: {}
|
type-fest@4.41.0: {}
|
||||||
|
|
||||||
typescript@5.8.3: {}
|
typescript@5.8.3: {}
|
||||||
@@ -6267,7 +6290,10 @@ snapshots:
|
|||||||
|
|
||||||
undici-types@5.28.4: {}
|
undici-types@5.28.4: {}
|
||||||
|
|
||||||
undici-types@7.8.0: {}
|
undici-types@6.21.0: {}
|
||||||
|
|
||||||
|
undici-types@7.8.0:
|
||||||
|
optional: true
|
||||||
|
|
||||||
unenv@1.10.0:
|
unenv@1.10.0:
|
||||||
dependencies:
|
dependencies:
|
||||||
@@ -6420,7 +6446,7 @@ snapshots:
|
|||||||
'@types/unist': 3.0.3
|
'@types/unist': 3.0.3
|
||||||
vfile-message: 4.0.3
|
vfile-message: 4.0.3
|
||||||
|
|
||||||
vinxi@0.5.8(@netlify/blobs@9.1.2)(@types/node@24.1.0)(db0@0.3.2)(ioredis@5.6.1)(jiti@2.5.1)(terser@5.43.1):
|
vinxi@0.5.8(@netlify/blobs@9.1.2)(@types/node@24.1.0)(db0@0.3.2)(ioredis@5.6.1)(jiti@2.5.1)(terser@5.43.1)(tsx@4.20.3):
|
||||||
dependencies:
|
dependencies:
|
||||||
'@babel/core': 7.28.0
|
'@babel/core': 7.28.0
|
||||||
'@babel/plugin-syntax-jsx': 7.27.1(@babel/core@7.28.0)
|
'@babel/plugin-syntax-jsx': 7.27.1(@babel/core@7.28.0)
|
||||||
@@ -6454,7 +6480,7 @@ snapshots:
|
|||||||
unctx: 2.4.1
|
unctx: 2.4.1
|
||||||
unenv: 1.10.0
|
unenv: 1.10.0
|
||||||
unstorage: 1.16.1(@netlify/blobs@9.1.2)(db0@0.3.2)(ioredis@5.6.1)
|
unstorage: 1.16.1(@netlify/blobs@9.1.2)(db0@0.3.2)(ioredis@5.6.1)
|
||||||
vite: 6.3.5(@types/node@24.1.0)(jiti@2.5.1)(terser@5.43.1)
|
vite: 6.3.5(@types/node@24.1.0)(jiti@2.5.1)(terser@5.43.1)(tsx@4.20.3)
|
||||||
zod: 3.25.76
|
zod: 3.25.76
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- '@azure/app-configuration'
|
- '@azure/app-configuration'
|
||||||
@@ -6498,7 +6524,7 @@ snapshots:
|
|||||||
- xml2js
|
- xml2js
|
||||||
- yaml
|
- yaml
|
||||||
|
|
||||||
vite-plugin-solid@2.11.8(solid-js@1.9.7)(vite@6.3.5(@types/node@24.1.0)(jiti@2.5.1)(terser@5.43.1)):
|
vite-plugin-solid@2.11.8(solid-js@1.9.7)(vite@6.3.5(@types/node@24.1.0)(jiti@2.5.1)(terser@5.43.1)(tsx@4.20.3)):
|
||||||
dependencies:
|
dependencies:
|
||||||
'@babel/core': 7.28.0
|
'@babel/core': 7.28.0
|
||||||
'@types/babel__core': 7.20.5
|
'@types/babel__core': 7.20.5
|
||||||
@@ -6506,12 +6532,12 @@ snapshots:
|
|||||||
merge-anything: 5.1.7
|
merge-anything: 5.1.7
|
||||||
solid-js: 1.9.7
|
solid-js: 1.9.7
|
||||||
solid-refresh: 0.6.3(solid-js@1.9.7)
|
solid-refresh: 0.6.3(solid-js@1.9.7)
|
||||||
vite: 6.3.5(@types/node@24.1.0)(jiti@2.5.1)(terser@5.43.1)
|
vite: 6.3.5(@types/node@24.1.0)(jiti@2.5.1)(terser@5.43.1)(tsx@4.20.3)
|
||||||
vitefu: 1.1.1(vite@6.3.5(@types/node@24.1.0)(jiti@2.5.1)(terser@5.43.1))
|
vitefu: 1.1.1(vite@6.3.5(@types/node@24.1.0)(jiti@2.5.1)(terser@5.43.1)(tsx@4.20.3))
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- supports-color
|
- supports-color
|
||||||
|
|
||||||
vite@6.3.5(@types/node@24.1.0)(jiti@2.5.1)(terser@5.43.1):
|
vite@6.3.5(@types/node@24.1.0)(jiti@2.5.1)(terser@5.43.1)(tsx@4.20.3):
|
||||||
dependencies:
|
dependencies:
|
||||||
esbuild: 0.25.8
|
esbuild: 0.25.8
|
||||||
fdir: 6.4.6(picomatch@4.0.3)
|
fdir: 6.4.6(picomatch@4.0.3)
|
||||||
@@ -6524,10 +6550,11 @@ snapshots:
|
|||||||
fsevents: 2.3.3
|
fsevents: 2.3.3
|
||||||
jiti: 2.5.1
|
jiti: 2.5.1
|
||||||
terser: 5.43.1
|
terser: 5.43.1
|
||||||
|
tsx: 4.20.3
|
||||||
|
|
||||||
vitefu@1.1.1(vite@6.3.5(@types/node@24.1.0)(jiti@2.5.1)(terser@5.43.1)):
|
vitefu@1.1.1(vite@6.3.5(@types/node@24.1.0)(jiti@2.5.1)(terser@5.43.1)(tsx@4.20.3)):
|
||||||
optionalDependencies:
|
optionalDependencies:
|
||||||
vite: 6.3.5(@types/node@24.1.0)(jiti@2.5.1)(terser@5.43.1)
|
vite: 6.3.5(@types/node@24.1.0)(jiti@2.5.1)(terser@5.43.1)(tsx@4.20.3)
|
||||||
|
|
||||||
web-streams-polyfill@3.3.3: {}
|
web-streams-polyfill@3.3.3: {}
|
||||||
|
|
||||||
|
|||||||
32
src/db.ts
32
src/db.ts
@@ -1,23 +1,17 @@
|
|||||||
"use server";
|
"use server";
|
||||||
import { JSONFilePreset } from "lowdb/node";
|
|
||||||
import { GameState, newGame } from "./types/cards";
|
|
||||||
|
|
||||||
type schema = {
|
import { Database } from "arangojs";
|
||||||
games: {
|
import { GameState, newGame } from "./types/cards";
|
||||||
[key: string]: {
|
import { AqlQuery } from "arangojs/aql";
|
||||||
name: string;
|
|
||||||
rules: string;
|
const db = new Database({
|
||||||
instances: { [id: string]: GameState };
|
url: "http://localhost:8529",
|
||||||
};
|
auth: {
|
||||||
};
|
username: "root",
|
||||||
};
|
password: "pass",
|
||||||
const _db = await JSONFilePreset<schema>("db.json", {
|
|
||||||
games: {
|
|
||||||
renaissance: {
|
|
||||||
name: "renaissance",
|
|
||||||
rules: "",
|
|
||||||
instances: { test: newGame() },
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
|
databaseName: "prod",
|
||||||
});
|
});
|
||||||
export const db = async () => _db.read().then(() => _db.data);
|
|
||||||
|
export const query = async <T>(q: AqlQuery<T>) =>
|
||||||
|
await db.query(q).then((c) => c.all());
|
||||||
|
|||||||
@@ -1,14 +1,15 @@
|
|||||||
import { useParams } from "@solidjs/router";
|
import { useParams } from "@solidjs/router";
|
||||||
import { db } from "../../db";
|
|
||||||
import { createEffect, createResource, Show, Suspense } from "solid-js";
|
import { createEffect, createResource, Show, Suspense } from "solid-js";
|
||||||
import Game from "../../components/Game";
|
import Game from "../../components/Game";
|
||||||
|
import { aql } from "arangojs";
|
||||||
|
|
||||||
export default () => {
|
export default () => {
|
||||||
const params = useParams();
|
const params = useParams();
|
||||||
|
|
||||||
const [instance] = createResource(() =>
|
const [instance] = createResource(async () => {
|
||||||
db().then((data) => data.games[params.game].instances[params.instance])
|
return null;
|
||||||
);
|
});
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Show when={instance() != null}>
|
<Show when={instance() != null}>
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
import { A, useParams } from "@solidjs/router";
|
import { A, useParams } from "@solidjs/router";
|
||||||
|
|
||||||
import { createEffect, createResource, For, Suspense } from "solid-js";
|
import { createEffect, createResource, For, Suspense } from "solid-js";
|
||||||
import { db } from "../../db";
|
import { query } from "../../db";
|
||||||
|
import { aql } from "arangojs";
|
||||||
|
|
||||||
export default () => {
|
export default () => {
|
||||||
const params = useParams();
|
const params = useParams();
|
||||||
@@ -11,22 +12,26 @@ export default () => {
|
|||||||
const [instances] = createResource(
|
const [instances] = createResource(
|
||||||
() => params.game,
|
() => params.game,
|
||||||
() =>
|
() =>
|
||||||
db().then((data) => {
|
query<{ _id: string }>(
|
||||||
if (params.game == null) {
|
aql`
|
||||||
return {};
|
FOR i IN instances
|
||||||
}
|
FILTER i.name == ${params.game}
|
||||||
return data.games[params.game].instances;
|
RETURN i
|
||||||
})
|
`
|
||||||
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
createEffect(() => console.log(instances()));
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Suspense>
|
<Suspense>
|
||||||
<div style={{ padding: "20px" }}>
|
<div style={{ padding: "20px" }}>
|
||||||
<h1 style={{ margin: 0 }}>{params.game}</h1>
|
<h1 style={{ margin: 0 }}>{params.game}</h1>
|
||||||
<ul>
|
<ul>
|
||||||
<For each={Object.entries(instances() ?? {})}>
|
<For each={instances() ?? []}>
|
||||||
{([instanceId]) => (
|
{(instance) => (
|
||||||
<A href={`/${params.game}/${instanceId}`}>
|
<A href={`/${params.game}/${instance._id}`}>
|
||||||
{instanceId}
|
{instance._id}
|
||||||
</A>
|
</A>
|
||||||
)}
|
)}
|
||||||
</For>
|
</For>
|
||||||
|
|||||||
@@ -1,14 +1,16 @@
|
|||||||
import { A } from "@solidjs/router";
|
import { A } from "@solidjs/router";
|
||||||
import Game from "../components/Game";
|
import { For } from "solid-js";
|
||||||
import { createResource, For } from "solid-js";
|
|
||||||
import { db } from "../db";
|
|
||||||
|
|
||||||
export default () => {
|
export default () => {
|
||||||
const [games] = createResource(() => db().then((data) => data.games));
|
const games = [
|
||||||
|
{
|
||||||
|
name: "renaissance",
|
||||||
|
},
|
||||||
|
];
|
||||||
return (
|
return (
|
||||||
<div style={{ padding: "20px" }}>
|
<div style={{ padding: "20px" }}>
|
||||||
<For each={Object.entries(games() ?? {})}>
|
<For each={games}>
|
||||||
{([gameId, game]) => <A href={`/${gameId}`}>{game.name}</A>}
|
{(game) => <A href={`/${game.name}`}>{game.name}</A>}
|
||||||
</For>
|
</For>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
43
sync_db.ts
Normal file
43
sync_db.ts
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
import { Database, aql } from "arangojs";
|
||||||
|
import { DocumentCollection, SchemaOptions } from "arangojs/collections";
|
||||||
|
import { EnsurePersistentIndexOptions } from "arangojs/indexes";
|
||||||
|
import { JSONSchema7 } from "json-schema";
|
||||||
|
// It's good practice to specify the URL.
|
||||||
|
// We connect to the _system database first to check if our target DB exists.
|
||||||
|
const sysdb = new Database({
|
||||||
|
url: "http://localhost:8529",
|
||||||
|
auth: {
|
||||||
|
username: "root",
|
||||||
|
password: "pass",
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
const db = sysdb.database("prod");
|
||||||
|
|
||||||
|
const ent = async (
|
||||||
|
name: string,
|
||||||
|
schema?: SchemaOptions,
|
||||||
|
index?: EnsurePersistentIndexOptions
|
||||||
|
) => {
|
||||||
|
const col = db.collection(name);
|
||||||
|
|
||||||
|
// @ts-ignore
|
||||||
|
|
||||||
|
await col.exists().then((e) => e || db.createCollection(name));
|
||||||
|
|
||||||
|
schema && col.properties({ schema });
|
||||||
|
index && col.ensureIndex(index);
|
||||||
|
|
||||||
|
return col;
|
||||||
|
};
|
||||||
|
|
||||||
|
const Games = ent("games", {
|
||||||
|
rule: {
|
||||||
|
type: "object",
|
||||||
|
properties: {
|
||||||
|
name: { type: "string" },
|
||||||
|
},
|
||||||
|
} as JSONSchema7,
|
||||||
|
});
|
||||||
|
const Instances = ent("instances");
|
||||||
|
const Humans = ent("humans");
|
||||||
Reference in New Issue
Block a user