Spaces:
Running
Running
Add a simple populate script (#880)
Browse files* Add a simple populate script
* readme changes
* add `all` flag
* add logging everywhere
- README.md +34 -0
- package-lock.json +748 -38
- package.json +6 -1
- scripts/populate.ts +264 -0
README.md
CHANGED
|
@@ -616,3 +616,37 @@ npm run updateLocalEnv
|
|
| 616 |
```
|
| 617 |
|
| 618 |
This will replace your `.env.local` file with the one that will be used in prod (simply taking `.env.template + .env.SECRET_CONFIG`).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 616 |
```
|
| 617 |
|
| 618 |
This will replace your `.env.local` file with the one that will be used in prod (simply taking `.env.template + .env.SECRET_CONFIG`).
|
| 619 |
+
|
| 620 |
+
### Populate database
|
| 621 |
+
|
| 622 |
+
> [!WARNING]
|
| 623 |
+
> The `MONGODB_URL` used for this script will be fetched from `.env.local`. Make sure it's correct! The command runs directly on the database.
|
| 624 |
+
|
| 625 |
+
You can populate the database using faker data using the `populate` script:
|
| 626 |
+
|
| 627 |
+
```bash
|
| 628 |
+
npm run populate <flags here>
|
| 629 |
+
```
|
| 630 |
+
|
| 631 |
+
At least one flag must be specified, the following flags are available:
|
| 632 |
+
|
| 633 |
+
- `reset` - resets the database
|
| 634 |
+
- `all` - populates all tables
|
| 635 |
+
- `users` - populates the users table
|
| 636 |
+
- `settings` - populates the settings table for existing users
|
| 637 |
+
- `assistants` - populates the assistants table for existing users
|
| 638 |
+
- `conversations` - populates the conversations table for existing users
|
| 639 |
+
|
| 640 |
+
For example, you could use it like so:
|
| 641 |
+
|
| 642 |
+
```bash
|
| 643 |
+
npm run populate reset
|
| 644 |
+
```
|
| 645 |
+
|
| 646 |
+
to clear out the database. Then login in the app to create your user and run the following command:
|
| 647 |
+
|
| 648 |
+
```bash
|
| 649 |
+
npm run populate users settings assistants conversations
|
| 650 |
+
```
|
| 651 |
+
|
| 652 |
+
to populate the database with fake data, including fake conversations and assistants for your user.
|
package-lock.json
CHANGED
|
@@ -39,6 +39,7 @@
|
|
| 39 |
"zod": "^3.22.3"
|
| 40 |
},
|
| 41 |
"devDependencies": {
|
|
|
|
| 42 |
"@iconify-json/carbon": "^1.1.16",
|
| 43 |
"@iconify-json/eos-icons": "^1.1.6",
|
| 44 |
"@sveltejs/adapter-node": "^1.3.1",
|
|
@@ -46,6 +47,7 @@
|
|
| 46 |
"@tailwindcss/typography": "^0.5.9",
|
| 47 |
"@types/jsdom": "^21.1.1",
|
| 48 |
"@types/marked": "^4.0.8",
|
|
|
|
| 49 |
"@types/parquetjs": "^0.10.3",
|
| 50 |
"@types/uuid": "^9.0.8",
|
| 51 |
"@typescript-eslint/eslint-plugin": "^6.x",
|
|
@@ -54,6 +56,7 @@
|
|
| 54 |
"eslint-config-prettier": "^8.5.0",
|
| 55 |
"eslint-plugin-svelte": "^2.30.0",
|
| 56 |
"marked-katex-extension": "^3.0.6",
|
|
|
|
| 57 |
"prettier": "^2.8.0",
|
| 58 |
"prettier-plugin-svelte": "^2.10.1",
|
| 59 |
"prettier-plugin-tailwindcss": "^0.2.7",
|
|
@@ -64,6 +67,7 @@
|
|
| 64 |
"typescript": "^5.0.0",
|
| 65 |
"unplugin-icons": "^0.16.1",
|
| 66 |
"vite": "^4.5.2",
|
|
|
|
| 67 |
"vitest": "^0.31.0"
|
| 68 |
},
|
| 69 |
"optionalDependencies": {
|
|
@@ -148,6 +152,22 @@
|
|
| 148 |
"tslib": "^2.4.0"
|
| 149 |
}
|
| 150 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 151 |
"node_modules/@esbuild/android-arm": {
|
| 152 |
"version": "0.18.20",
|
| 153 |
"resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.18.20.tgz",
|
|
@@ -556,6 +576,22 @@
|
|
| 556 |
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
|
| 557 |
}
|
| 558 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 559 |
"node_modules/@fastify/busboy": {
|
| 560 |
"version": "2.0.0",
|
| 561 |
"resolved": "https://registry.npmjs.org/@fastify/busboy/-/busboy-2.0.0.tgz",
|
|
@@ -1570,6 +1606,175 @@
|
|
| 1570 |
}
|
| 1571 |
}
|
| 1572 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1573 |
"node_modules/@shuding/opentype.js": {
|
| 1574 |
"version": "1.4.0-beta.0",
|
| 1575 |
"resolved": "https://registry.npmjs.org/@shuding/opentype.js/-/opentype.js-1.4.0-beta.0.tgz",
|
|
@@ -1753,9 +1958,9 @@
|
|
| 1753 |
"dev": true
|
| 1754 |
},
|
| 1755 |
"node_modules/@types/estree": {
|
| 1756 |
-
"version": "1.0.
|
| 1757 |
-
"resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.
|
| 1758 |
-
"integrity": "sha512
|
| 1759 |
"dev": true
|
| 1760 |
},
|
| 1761 |
"node_modules/@types/jsdom": {
|
|
@@ -1792,6 +1997,12 @@
|
|
| 1792 |
"integrity": "sha512-HVNzMT5QlWCOdeuBsgXP8EZzKUf0+AXzN+sLmjvaB3ZlLqO+e4u0uXrdw9ub69wBKFs+c6/pA4r9sy6cCDvImw==",
|
| 1793 |
"dev": true
|
| 1794 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1795 |
"node_modules/@types/node": {
|
| 1796 |
"version": "18.13.0",
|
| 1797 |
"resolved": "https://registry.npmjs.org/@types/node/-/node-18.13.0.tgz",
|
|
@@ -2206,9 +2417,9 @@
|
|
| 2206 |
}
|
| 2207 |
},
|
| 2208 |
"node_modules/acorn": {
|
| 2209 |
-
"version": "8.
|
| 2210 |
-
"resolved": "https://registry.npmjs.org/acorn/-/acorn-8.
|
| 2211 |
-
"integrity": "sha512-
|
| 2212 |
"devOptional": true,
|
| 2213 |
"bin": {
|
| 2214 |
"acorn": "bin/acorn"
|
|
@@ -3734,9 +3945,9 @@
|
|
| 3734 |
"integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw=="
|
| 3735 |
},
|
| 3736 |
"node_modules/fsevents": {
|
| 3737 |
-
"version": "2.3.
|
| 3738 |
-
"resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.
|
| 3739 |
-
"integrity": "sha512-
|
| 3740 |
"hasInstallScript": true,
|
| 3741 |
"optional": true,
|
| 3742 |
"os": [
|
|
@@ -4375,9 +4586,9 @@
|
|
| 4375 |
}
|
| 4376 |
},
|
| 4377 |
"node_modules/jsonc-parser": {
|
| 4378 |
-
"version": "3.2.
|
| 4379 |
-
"resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.2.
|
| 4380 |
-
"integrity": "sha512-
|
| 4381 |
"dev": true
|
| 4382 |
},
|
| 4383 |
"node_modules/katex": {
|
|
@@ -4748,15 +4959,15 @@
|
|
| 4748 |
"integrity": "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A=="
|
| 4749 |
},
|
| 4750 |
"node_modules/mlly": {
|
| 4751 |
-
"version": "1.
|
| 4752 |
-
"resolved": "https://registry.npmjs.org/mlly/-/mlly-1.
|
| 4753 |
-
"integrity": "sha512-
|
| 4754 |
"dev": true,
|
| 4755 |
"dependencies": {
|
| 4756 |
-
"acorn": "^8.
|
| 4757 |
-
"pathe": "^1.1.
|
| 4758 |
"pkg-types": "^1.0.3",
|
| 4759 |
-
"ufo": "^1.
|
| 4760 |
}
|
| 4761 |
},
|
| 4762 |
"node_modules/mongodb": {
|
|
@@ -5305,9 +5516,9 @@
|
|
| 5305 |
}
|
| 5306 |
},
|
| 5307 |
"node_modules/pathe": {
|
| 5308 |
-
"version": "1.1.
|
| 5309 |
-
"resolved": "https://registry.npmjs.org/pathe/-/pathe-1.1.
|
| 5310 |
-
"integrity": "sha512-
|
| 5311 |
"dev": true
|
| 5312 |
},
|
| 5313 |
"node_modules/pathval": {
|
|
@@ -5397,9 +5608,9 @@
|
|
| 5397 |
"integrity": "sha512-fnWVljUchTro6RiCFvCXBbNhJc2NijN7oIQxbwsyL0buWJPG85v81ehlHI9fXrJsMNgTofEoWIQeClKpgxFLrg=="
|
| 5398 |
},
|
| 5399 |
"node_modules/postcss": {
|
| 5400 |
-
"version": "8.4.
|
| 5401 |
-
"resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.
|
| 5402 |
-
"integrity": "sha512-
|
| 5403 |
"funding": [
|
| 5404 |
{
|
| 5405 |
"type": "opencollective",
|
|
@@ -5415,7 +5626,7 @@
|
|
| 5415 |
}
|
| 5416 |
],
|
| 5417 |
"dependencies": {
|
| 5418 |
-
"nanoid": "^3.3.
|
| 5419 |
"picocolors": "^1.0.0",
|
| 5420 |
"source-map-js": "^1.0.2"
|
| 5421 |
},
|
|
@@ -5564,9 +5775,9 @@
|
|
| 5564 |
"integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ=="
|
| 5565 |
},
|
| 5566 |
"node_modules/postcss/node_modules/nanoid": {
|
| 5567 |
-
"version": "3.3.
|
| 5568 |
-
"resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.
|
| 5569 |
-
"integrity": "sha512-
|
| 5570 |
"funding": [
|
| 5571 |
{
|
| 5572 |
"type": "github",
|
|
@@ -7109,9 +7320,9 @@
|
|
| 7109 |
}
|
| 7110 |
},
|
| 7111 |
"node_modules/ufo": {
|
| 7112 |
-
"version": "1.
|
| 7113 |
-
"resolved": "https://registry.npmjs.org/ufo/-/ufo-1.
|
| 7114 |
-
"integrity": "sha512-
|
| 7115 |
"dev": true
|
| 7116 |
},
|
| 7117 |
"node_modules/uglify-js": {
|
|
@@ -7336,28 +7547,504 @@
|
|
| 7336 |
}
|
| 7337 |
},
|
| 7338 |
"node_modules/vite-node": {
|
| 7339 |
-
"version": "
|
| 7340 |
-
"resolved": "https://registry.npmjs.org/vite-node/-/vite-node-
|
| 7341 |
-
"integrity": "sha512-
|
| 7342 |
"dev": true,
|
| 7343 |
"dependencies": {
|
| 7344 |
"cac": "^6.7.14",
|
| 7345 |
"debug": "^4.3.4",
|
| 7346 |
-
"
|
| 7347 |
-
"pathe": "^1.1.0",
|
| 7348 |
"picocolors": "^1.0.0",
|
| 7349 |
-
"vite": "^
|
| 7350 |
},
|
| 7351 |
"bin": {
|
| 7352 |
"vite-node": "vite-node.mjs"
|
| 7353 |
},
|
| 7354 |
"engines": {
|
| 7355 |
-
"node": ">=
|
| 7356 |
},
|
| 7357 |
"funding": {
|
| 7358 |
"url": "https://opencollective.com/vitest"
|
| 7359 |
}
|
| 7360 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 7361 |
"node_modules/vitefu": {
|
| 7362 |
"version": "0.2.5",
|
| 7363 |
"resolved": "https://registry.npmjs.org/vitefu/-/vitefu-0.2.5.tgz",
|
|
@@ -7450,6 +8137,29 @@
|
|
| 7450 |
}
|
| 7451 |
}
|
| 7452 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 7453 |
"node_modules/w3c-xmlserializer": {
|
| 7454 |
"version": "4.0.0",
|
| 7455 |
"resolved": "https://registry.npmjs.org/w3c-xmlserializer/-/w3c-xmlserializer-4.0.0.tgz",
|
|
|
|
| 39 |
"zod": "^3.22.3"
|
| 40 |
},
|
| 41 |
"devDependencies": {
|
| 42 |
+
"@faker-js/faker": "^8.4.1",
|
| 43 |
"@iconify-json/carbon": "^1.1.16",
|
| 44 |
"@iconify-json/eos-icons": "^1.1.6",
|
| 45 |
"@sveltejs/adapter-node": "^1.3.1",
|
|
|
|
| 47 |
"@tailwindcss/typography": "^0.5.9",
|
| 48 |
"@types/jsdom": "^21.1.1",
|
| 49 |
"@types/marked": "^4.0.8",
|
| 50 |
+
"@types/minimist": "^1.2.5",
|
| 51 |
"@types/parquetjs": "^0.10.3",
|
| 52 |
"@types/uuid": "^9.0.8",
|
| 53 |
"@typescript-eslint/eslint-plugin": "^6.x",
|
|
|
|
| 56 |
"eslint-config-prettier": "^8.5.0",
|
| 57 |
"eslint-plugin-svelte": "^2.30.0",
|
| 58 |
"marked-katex-extension": "^3.0.6",
|
| 59 |
+
"minimist": "^1.2.8",
|
| 60 |
"prettier": "^2.8.0",
|
| 61 |
"prettier-plugin-svelte": "^2.10.1",
|
| 62 |
"prettier-plugin-tailwindcss": "^0.2.7",
|
|
|
|
| 67 |
"typescript": "^5.0.0",
|
| 68 |
"unplugin-icons": "^0.16.1",
|
| 69 |
"vite": "^4.5.2",
|
| 70 |
+
"vite-node": "^1.3.1",
|
| 71 |
"vitest": "^0.31.0"
|
| 72 |
},
|
| 73 |
"optionalDependencies": {
|
|
|
|
| 152 |
"tslib": "^2.4.0"
|
| 153 |
}
|
| 154 |
},
|
| 155 |
+
"node_modules/@esbuild/aix-ppc64": {
|
| 156 |
+
"version": "0.19.12",
|
| 157 |
+
"resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.19.12.tgz",
|
| 158 |
+
"integrity": "sha512-bmoCYyWdEL3wDQIVbcyzRyeKLgk2WtWLTWz1ZIAZF/EGbNOwSA6ew3PftJ1PqMiOOGu0OyFMzG53L0zqIpPeNA==",
|
| 159 |
+
"cpu": [
|
| 160 |
+
"ppc64"
|
| 161 |
+
],
|
| 162 |
+
"dev": true,
|
| 163 |
+
"optional": true,
|
| 164 |
+
"os": [
|
| 165 |
+
"aix"
|
| 166 |
+
],
|
| 167 |
+
"engines": {
|
| 168 |
+
"node": ">=12"
|
| 169 |
+
}
|
| 170 |
+
},
|
| 171 |
"node_modules/@esbuild/android-arm": {
|
| 172 |
"version": "0.18.20",
|
| 173 |
"resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.18.20.tgz",
|
|
|
|
| 576 |
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
|
| 577 |
}
|
| 578 |
},
|
| 579 |
+
"node_modules/@faker-js/faker": {
|
| 580 |
+
"version": "8.4.1",
|
| 581 |
+
"resolved": "https://registry.npmjs.org/@faker-js/faker/-/faker-8.4.1.tgz",
|
| 582 |
+
"integrity": "sha512-XQ3cU+Q8Uqmrbf2e0cIC/QN43sTBSC8KF12u29Mb47tWrt2hAgBXSgpZMj4Ao8Uk0iJcU99QsOCaIL8934obCg==",
|
| 583 |
+
"dev": true,
|
| 584 |
+
"funding": [
|
| 585 |
+
{
|
| 586 |
+
"type": "opencollective",
|
| 587 |
+
"url": "https://opencollective.com/fakerjs"
|
| 588 |
+
}
|
| 589 |
+
],
|
| 590 |
+
"engines": {
|
| 591 |
+
"node": "^14.17.0 || ^16.13.0 || >=18.0.0",
|
| 592 |
+
"npm": ">=6.14.13"
|
| 593 |
+
}
|
| 594 |
+
},
|
| 595 |
"node_modules/@fastify/busboy": {
|
| 596 |
"version": "2.0.0",
|
| 597 |
"resolved": "https://registry.npmjs.org/@fastify/busboy/-/busboy-2.0.0.tgz",
|
|
|
|
| 1606 |
}
|
| 1607 |
}
|
| 1608 |
},
|
| 1609 |
+
"node_modules/@rollup/rollup-android-arm-eabi": {
|
| 1610 |
+
"version": "4.12.0",
|
| 1611 |
+
"resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.12.0.tgz",
|
| 1612 |
+
"integrity": "sha512-+ac02NL/2TCKRrJu2wffk1kZ+RyqxVUlbjSagNgPm94frxtr+XDL12E5Ll1enWskLrtrZ2r8L3wED1orIibV/w==",
|
| 1613 |
+
"cpu": [
|
| 1614 |
+
"arm"
|
| 1615 |
+
],
|
| 1616 |
+
"dev": true,
|
| 1617 |
+
"optional": true,
|
| 1618 |
+
"os": [
|
| 1619 |
+
"android"
|
| 1620 |
+
]
|
| 1621 |
+
},
|
| 1622 |
+
"node_modules/@rollup/rollup-android-arm64": {
|
| 1623 |
+
"version": "4.12.0",
|
| 1624 |
+
"resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.12.0.tgz",
|
| 1625 |
+
"integrity": "sha512-OBqcX2BMe6nvjQ0Nyp7cC90cnumt8PXmO7Dp3gfAju/6YwG0Tj74z1vKrfRz7qAv23nBcYM8BCbhrsWqO7PzQQ==",
|
| 1626 |
+
"cpu": [
|
| 1627 |
+
"arm64"
|
| 1628 |
+
],
|
| 1629 |
+
"dev": true,
|
| 1630 |
+
"optional": true,
|
| 1631 |
+
"os": [
|
| 1632 |
+
"android"
|
| 1633 |
+
]
|
| 1634 |
+
},
|
| 1635 |
+
"node_modules/@rollup/rollup-darwin-arm64": {
|
| 1636 |
+
"version": "4.12.0",
|
| 1637 |
+
"resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.12.0.tgz",
|
| 1638 |
+
"integrity": "sha512-X64tZd8dRE/QTrBIEs63kaOBG0b5GVEd3ccoLtyf6IdXtHdh8h+I56C2yC3PtC9Ucnv0CpNFJLqKFVgCYe0lOQ==",
|
| 1639 |
+
"cpu": [
|
| 1640 |
+
"arm64"
|
| 1641 |
+
],
|
| 1642 |
+
"dev": true,
|
| 1643 |
+
"optional": true,
|
| 1644 |
+
"os": [
|
| 1645 |
+
"darwin"
|
| 1646 |
+
]
|
| 1647 |
+
},
|
| 1648 |
+
"node_modules/@rollup/rollup-darwin-x64": {
|
| 1649 |
+
"version": "4.12.0",
|
| 1650 |
+
"resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.12.0.tgz",
|
| 1651 |
+
"integrity": "sha512-cc71KUZoVbUJmGP2cOuiZ9HSOP14AzBAThn3OU+9LcA1+IUqswJyR1cAJj3Mg55HbjZP6OLAIscbQsQLrpgTOg==",
|
| 1652 |
+
"cpu": [
|
| 1653 |
+
"x64"
|
| 1654 |
+
],
|
| 1655 |
+
"dev": true,
|
| 1656 |
+
"optional": true,
|
| 1657 |
+
"os": [
|
| 1658 |
+
"darwin"
|
| 1659 |
+
]
|
| 1660 |
+
},
|
| 1661 |
+
"node_modules/@rollup/rollup-linux-arm-gnueabihf": {
|
| 1662 |
+
"version": "4.12.0",
|
| 1663 |
+
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.12.0.tgz",
|
| 1664 |
+
"integrity": "sha512-a6w/Y3hyyO6GlpKL2xJ4IOh/7d+APaqLYdMf86xnczU3nurFTaVN9s9jOXQg97BE4nYm/7Ga51rjec5nfRdrvA==",
|
| 1665 |
+
"cpu": [
|
| 1666 |
+
"arm"
|
| 1667 |
+
],
|
| 1668 |
+
"dev": true,
|
| 1669 |
+
"optional": true,
|
| 1670 |
+
"os": [
|
| 1671 |
+
"linux"
|
| 1672 |
+
]
|
| 1673 |
+
},
|
| 1674 |
+
"node_modules/@rollup/rollup-linux-arm64-gnu": {
|
| 1675 |
+
"version": "4.12.0",
|
| 1676 |
+
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.12.0.tgz",
|
| 1677 |
+
"integrity": "sha512-0fZBq27b+D7Ar5CQMofVN8sggOVhEtzFUwOwPppQt0k+VR+7UHMZZY4y+64WJ06XOhBTKXtQB/Sv0NwQMXyNAA==",
|
| 1678 |
+
"cpu": [
|
| 1679 |
+
"arm64"
|
| 1680 |
+
],
|
| 1681 |
+
"dev": true,
|
| 1682 |
+
"optional": true,
|
| 1683 |
+
"os": [
|
| 1684 |
+
"linux"
|
| 1685 |
+
]
|
| 1686 |
+
},
|
| 1687 |
+
"node_modules/@rollup/rollup-linux-arm64-musl": {
|
| 1688 |
+
"version": "4.12.0",
|
| 1689 |
+
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.12.0.tgz",
|
| 1690 |
+
"integrity": "sha512-eTvzUS3hhhlgeAv6bfigekzWZjaEX9xP9HhxB0Dvrdbkk5w/b+1Sxct2ZuDxNJKzsRStSq1EaEkVSEe7A7ipgQ==",
|
| 1691 |
+
"cpu": [
|
| 1692 |
+
"arm64"
|
| 1693 |
+
],
|
| 1694 |
+
"dev": true,
|
| 1695 |
+
"optional": true,
|
| 1696 |
+
"os": [
|
| 1697 |
+
"linux"
|
| 1698 |
+
]
|
| 1699 |
+
},
|
| 1700 |
+
"node_modules/@rollup/rollup-linux-riscv64-gnu": {
|
| 1701 |
+
"version": "4.12.0",
|
| 1702 |
+
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.12.0.tgz",
|
| 1703 |
+
"integrity": "sha512-ix+qAB9qmrCRiaO71VFfY8rkiAZJL8zQRXveS27HS+pKdjwUfEhqo2+YF2oI+H/22Xsiski+qqwIBxVewLK7sw==",
|
| 1704 |
+
"cpu": [
|
| 1705 |
+
"riscv64"
|
| 1706 |
+
],
|
| 1707 |
+
"dev": true,
|
| 1708 |
+
"optional": true,
|
| 1709 |
+
"os": [
|
| 1710 |
+
"linux"
|
| 1711 |
+
]
|
| 1712 |
+
},
|
| 1713 |
+
"node_modules/@rollup/rollup-linux-x64-gnu": {
|
| 1714 |
+
"version": "4.12.0",
|
| 1715 |
+
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.12.0.tgz",
|
| 1716 |
+
"integrity": "sha512-TenQhZVOtw/3qKOPa7d+QgkeM6xY0LtwzR8OplmyL5LrgTWIXpTQg2Q2ycBf8jm+SFW2Wt/DTn1gf7nFp3ssVA==",
|
| 1717 |
+
"cpu": [
|
| 1718 |
+
"x64"
|
| 1719 |
+
],
|
| 1720 |
+
"dev": true,
|
| 1721 |
+
"optional": true,
|
| 1722 |
+
"os": [
|
| 1723 |
+
"linux"
|
| 1724 |
+
]
|
| 1725 |
+
},
|
| 1726 |
+
"node_modules/@rollup/rollup-linux-x64-musl": {
|
| 1727 |
+
"version": "4.12.0",
|
| 1728 |
+
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.12.0.tgz",
|
| 1729 |
+
"integrity": "sha512-LfFdRhNnW0zdMvdCb5FNuWlls2WbbSridJvxOvYWgSBOYZtgBfW9UGNJG//rwMqTX1xQE9BAodvMH9tAusKDUw==",
|
| 1730 |
+
"cpu": [
|
| 1731 |
+
"x64"
|
| 1732 |
+
],
|
| 1733 |
+
"dev": true,
|
| 1734 |
+
"optional": true,
|
| 1735 |
+
"os": [
|
| 1736 |
+
"linux"
|
| 1737 |
+
]
|
| 1738 |
+
},
|
| 1739 |
+
"node_modules/@rollup/rollup-win32-arm64-msvc": {
|
| 1740 |
+
"version": "4.12.0",
|
| 1741 |
+
"resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.12.0.tgz",
|
| 1742 |
+
"integrity": "sha512-JPDxovheWNp6d7AHCgsUlkuCKvtu3RB55iNEkaQcf0ttsDU/JZF+iQnYcQJSk/7PtT4mjjVG8N1kpwnI9SLYaw==",
|
| 1743 |
+
"cpu": [
|
| 1744 |
+
"arm64"
|
| 1745 |
+
],
|
| 1746 |
+
"dev": true,
|
| 1747 |
+
"optional": true,
|
| 1748 |
+
"os": [
|
| 1749 |
+
"win32"
|
| 1750 |
+
]
|
| 1751 |
+
},
|
| 1752 |
+
"node_modules/@rollup/rollup-win32-ia32-msvc": {
|
| 1753 |
+
"version": "4.12.0",
|
| 1754 |
+
"resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.12.0.tgz",
|
| 1755 |
+
"integrity": "sha512-fjtuvMWRGJn1oZacG8IPnzIV6GF2/XG+h71FKn76OYFqySXInJtseAqdprVTDTyqPxQOG9Exak5/E9Z3+EJ8ZA==",
|
| 1756 |
+
"cpu": [
|
| 1757 |
+
"ia32"
|
| 1758 |
+
],
|
| 1759 |
+
"dev": true,
|
| 1760 |
+
"optional": true,
|
| 1761 |
+
"os": [
|
| 1762 |
+
"win32"
|
| 1763 |
+
]
|
| 1764 |
+
},
|
| 1765 |
+
"node_modules/@rollup/rollup-win32-x64-msvc": {
|
| 1766 |
+
"version": "4.12.0",
|
| 1767 |
+
"resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.12.0.tgz",
|
| 1768 |
+
"integrity": "sha512-ZYmr5mS2wd4Dew/JjT0Fqi2NPB/ZhZ2VvPp7SmvPZb4Y1CG/LRcS6tcRo2cYU7zLK5A7cdbhWnnWmUjoI4qapg==",
|
| 1769 |
+
"cpu": [
|
| 1770 |
+
"x64"
|
| 1771 |
+
],
|
| 1772 |
+
"dev": true,
|
| 1773 |
+
"optional": true,
|
| 1774 |
+
"os": [
|
| 1775 |
+
"win32"
|
| 1776 |
+
]
|
| 1777 |
+
},
|
| 1778 |
"node_modules/@shuding/opentype.js": {
|
| 1779 |
"version": "1.4.0-beta.0",
|
| 1780 |
"resolved": "https://registry.npmjs.org/@shuding/opentype.js/-/opentype.js-1.4.0-beta.0.tgz",
|
|
|
|
| 1958 |
"dev": true
|
| 1959 |
},
|
| 1960 |
"node_modules/@types/estree": {
|
| 1961 |
+
"version": "1.0.5",
|
| 1962 |
+
"resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.5.tgz",
|
| 1963 |
+
"integrity": "sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==",
|
| 1964 |
"dev": true
|
| 1965 |
},
|
| 1966 |
"node_modules/@types/jsdom": {
|
|
|
|
| 1997 |
"integrity": "sha512-HVNzMT5QlWCOdeuBsgXP8EZzKUf0+AXzN+sLmjvaB3ZlLqO+e4u0uXrdw9ub69wBKFs+c6/pA4r9sy6cCDvImw==",
|
| 1998 |
"dev": true
|
| 1999 |
},
|
| 2000 |
+
"node_modules/@types/minimist": {
|
| 2001 |
+
"version": "1.2.5",
|
| 2002 |
+
"resolved": "https://registry.npmjs.org/@types/minimist/-/minimist-1.2.5.tgz",
|
| 2003 |
+
"integrity": "sha512-hov8bUuiLiyFPGyFPE1lwWhmzYbirOXQNNo40+y3zow8aFVTeyn3VWL0VFFfdNddA8S4Vf0Tc062rzyNr7Paag==",
|
| 2004 |
+
"dev": true
|
| 2005 |
+
},
|
| 2006 |
"node_modules/@types/node": {
|
| 2007 |
"version": "18.13.0",
|
| 2008 |
"resolved": "https://registry.npmjs.org/@types/node/-/node-18.13.0.tgz",
|
|
|
|
| 2417 |
}
|
| 2418 |
},
|
| 2419 |
"node_modules/acorn": {
|
| 2420 |
+
"version": "8.11.3",
|
| 2421 |
+
"resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.3.tgz",
|
| 2422 |
+
"integrity": "sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==",
|
| 2423 |
"devOptional": true,
|
| 2424 |
"bin": {
|
| 2425 |
"acorn": "bin/acorn"
|
|
|
|
| 3945 |
"integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw=="
|
| 3946 |
},
|
| 3947 |
"node_modules/fsevents": {
|
| 3948 |
+
"version": "2.3.3",
|
| 3949 |
+
"resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz",
|
| 3950 |
+
"integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==",
|
| 3951 |
"hasInstallScript": true,
|
| 3952 |
"optional": true,
|
| 3953 |
"os": [
|
|
|
|
| 4586 |
}
|
| 4587 |
},
|
| 4588 |
"node_modules/jsonc-parser": {
|
| 4589 |
+
"version": "3.2.1",
|
| 4590 |
+
"resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.2.1.tgz",
|
| 4591 |
+
"integrity": "sha512-AilxAyFOAcK5wA1+LeaySVBrHsGQvUFCDWXKpZjzaL0PqW+xfBOttn8GNtWKFWqneyMZj41MWF9Kl6iPWLwgOA==",
|
| 4592 |
"dev": true
|
| 4593 |
},
|
| 4594 |
"node_modules/katex": {
|
|
|
|
| 4959 |
"integrity": "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A=="
|
| 4960 |
},
|
| 4961 |
"node_modules/mlly": {
|
| 4962 |
+
"version": "1.6.1",
|
| 4963 |
+
"resolved": "https://registry.npmjs.org/mlly/-/mlly-1.6.1.tgz",
|
| 4964 |
+
"integrity": "sha512-vLgaHvaeunuOXHSmEbZ9izxPx3USsk8KCQ8iC+aTlp5sKRSoZvwhHh5L9VbKSaVC6sJDqbyohIS76E2VmHIPAA==",
|
| 4965 |
"dev": true,
|
| 4966 |
"dependencies": {
|
| 4967 |
+
"acorn": "^8.11.3",
|
| 4968 |
+
"pathe": "^1.1.2",
|
| 4969 |
"pkg-types": "^1.0.3",
|
| 4970 |
+
"ufo": "^1.3.2"
|
| 4971 |
}
|
| 4972 |
},
|
| 4973 |
"node_modules/mongodb": {
|
|
|
|
| 5516 |
}
|
| 5517 |
},
|
| 5518 |
"node_modules/pathe": {
|
| 5519 |
+
"version": "1.1.2",
|
| 5520 |
+
"resolved": "https://registry.npmjs.org/pathe/-/pathe-1.1.2.tgz",
|
| 5521 |
+
"integrity": "sha512-whLdWMYL2TwI08hn8/ZqAbrVemu0LNaNNJZX73O6qaIdCTfXutsLhMkjdENX0qhsQ9uIimo4/aQOmXkoon2nDQ==",
|
| 5522 |
"dev": true
|
| 5523 |
},
|
| 5524 |
"node_modules/pathval": {
|
|
|
|
| 5608 |
"integrity": "sha512-fnWVljUchTro6RiCFvCXBbNhJc2NijN7oIQxbwsyL0buWJPG85v81ehlHI9fXrJsMNgTofEoWIQeClKpgxFLrg=="
|
| 5609 |
},
|
| 5610 |
"node_modules/postcss": {
|
| 5611 |
+
"version": "8.4.35",
|
| 5612 |
+
"resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.35.tgz",
|
| 5613 |
+
"integrity": "sha512-u5U8qYpBCpN13BsiEB0CbR1Hhh4Gc0zLFuedrHJKMctHCHAGrMdG0PRM/KErzAL3CU6/eckEtmHNB3x6e3c0vA==",
|
| 5614 |
"funding": [
|
| 5615 |
{
|
| 5616 |
"type": "opencollective",
|
|
|
|
| 5626 |
}
|
| 5627 |
],
|
| 5628 |
"dependencies": {
|
| 5629 |
+
"nanoid": "^3.3.7",
|
| 5630 |
"picocolors": "^1.0.0",
|
| 5631 |
"source-map-js": "^1.0.2"
|
| 5632 |
},
|
|
|
|
| 5775 |
"integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ=="
|
| 5776 |
},
|
| 5777 |
"node_modules/postcss/node_modules/nanoid": {
|
| 5778 |
+
"version": "3.3.7",
|
| 5779 |
+
"resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.7.tgz",
|
| 5780 |
+
"integrity": "sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==",
|
| 5781 |
"funding": [
|
| 5782 |
{
|
| 5783 |
"type": "github",
|
|
|
|
| 7320 |
}
|
| 7321 |
},
|
| 7322 |
"node_modules/ufo": {
|
| 7323 |
+
"version": "1.4.0",
|
| 7324 |
+
"resolved": "https://registry.npmjs.org/ufo/-/ufo-1.4.0.tgz",
|
| 7325 |
+
"integrity": "sha512-Hhy+BhRBleFjpJ2vchUNN40qgkh0366FWJGqVLYBHev0vpHTrXSA0ryT+74UiW6KWsldNurQMKGqCm1M2zBciQ==",
|
| 7326 |
"dev": true
|
| 7327 |
},
|
| 7328 |
"node_modules/uglify-js": {
|
|
|
|
| 7547 |
}
|
| 7548 |
},
|
| 7549 |
"node_modules/vite-node": {
|
| 7550 |
+
"version": "1.3.1",
|
| 7551 |
+
"resolved": "https://registry.npmjs.org/vite-node/-/vite-node-1.3.1.tgz",
|
| 7552 |
+
"integrity": "sha512-azbRrqRxlWTJEVbzInZCTchx0X69M/XPTCz4H+TLvlTcR/xH/3hkRqhOakT41fMJCMzXTu4UvegkZiEoJAWvng==",
|
| 7553 |
"dev": true,
|
| 7554 |
"dependencies": {
|
| 7555 |
"cac": "^6.7.14",
|
| 7556 |
"debug": "^4.3.4",
|
| 7557 |
+
"pathe": "^1.1.1",
|
|
|
|
| 7558 |
"picocolors": "^1.0.0",
|
| 7559 |
+
"vite": "^5.0.0"
|
| 7560 |
},
|
| 7561 |
"bin": {
|
| 7562 |
"vite-node": "vite-node.mjs"
|
| 7563 |
},
|
| 7564 |
"engines": {
|
| 7565 |
+
"node": "^18.0.0 || >=20.0.0"
|
| 7566 |
},
|
| 7567 |
"funding": {
|
| 7568 |
"url": "https://opencollective.com/vitest"
|
| 7569 |
}
|
| 7570 |
},
|
| 7571 |
+
"node_modules/vite-node/node_modules/@esbuild/android-arm": {
|
| 7572 |
+
"version": "0.19.12",
|
| 7573 |
+
"resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.19.12.tgz",
|
| 7574 |
+
"integrity": "sha512-qg/Lj1mu3CdQlDEEiWrlC4eaPZ1KztwGJ9B6J+/6G+/4ewxJg7gqj8eVYWvao1bXrqGiW2rsBZFSX3q2lcW05w==",
|
| 7575 |
+
"cpu": [
|
| 7576 |
+
"arm"
|
| 7577 |
+
],
|
| 7578 |
+
"dev": true,
|
| 7579 |
+
"optional": true,
|
| 7580 |
+
"os": [
|
| 7581 |
+
"android"
|
| 7582 |
+
],
|
| 7583 |
+
"engines": {
|
| 7584 |
+
"node": ">=12"
|
| 7585 |
+
}
|
| 7586 |
+
},
|
| 7587 |
+
"node_modules/vite-node/node_modules/@esbuild/android-arm64": {
|
| 7588 |
+
"version": "0.19.12",
|
| 7589 |
+
"resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.19.12.tgz",
|
| 7590 |
+
"integrity": "sha512-P0UVNGIienjZv3f5zq0DP3Nt2IE/3plFzuaS96vihvD0Hd6H/q4WXUGpCxD/E8YrSXfNyRPbpTq+T8ZQioSuPA==",
|
| 7591 |
+
"cpu": [
|
| 7592 |
+
"arm64"
|
| 7593 |
+
],
|
| 7594 |
+
"dev": true,
|
| 7595 |
+
"optional": true,
|
| 7596 |
+
"os": [
|
| 7597 |
+
"android"
|
| 7598 |
+
],
|
| 7599 |
+
"engines": {
|
| 7600 |
+
"node": ">=12"
|
| 7601 |
+
}
|
| 7602 |
+
},
|
| 7603 |
+
"node_modules/vite-node/node_modules/@esbuild/android-x64": {
|
| 7604 |
+
"version": "0.19.12",
|
| 7605 |
+
"resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.19.12.tgz",
|
| 7606 |
+
"integrity": "sha512-3k7ZoUW6Q6YqhdhIaq/WZ7HwBpnFBlW905Fa4s4qWJyiNOgT1dOqDiVAQFwBH7gBRZr17gLrlFCRzF6jFh7Kew==",
|
| 7607 |
+
"cpu": [
|
| 7608 |
+
"x64"
|
| 7609 |
+
],
|
| 7610 |
+
"dev": true,
|
| 7611 |
+
"optional": true,
|
| 7612 |
+
"os": [
|
| 7613 |
+
"android"
|
| 7614 |
+
],
|
| 7615 |
+
"engines": {
|
| 7616 |
+
"node": ">=12"
|
| 7617 |
+
}
|
| 7618 |
+
},
|
| 7619 |
+
"node_modules/vite-node/node_modules/@esbuild/darwin-arm64": {
|
| 7620 |
+
"version": "0.19.12",
|
| 7621 |
+
"resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.19.12.tgz",
|
| 7622 |
+
"integrity": "sha512-B6IeSgZgtEzGC42jsI+YYu9Z3HKRxp8ZT3cqhvliEHovq8HSX2YX8lNocDn79gCKJXOSaEot9MVYky7AKjCs8g==",
|
| 7623 |
+
"cpu": [
|
| 7624 |
+
"arm64"
|
| 7625 |
+
],
|
| 7626 |
+
"dev": true,
|
| 7627 |
+
"optional": true,
|
| 7628 |
+
"os": [
|
| 7629 |
+
"darwin"
|
| 7630 |
+
],
|
| 7631 |
+
"engines": {
|
| 7632 |
+
"node": ">=12"
|
| 7633 |
+
}
|
| 7634 |
+
},
|
| 7635 |
+
"node_modules/vite-node/node_modules/@esbuild/darwin-x64": {
|
| 7636 |
+
"version": "0.19.12",
|
| 7637 |
+
"resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.19.12.tgz",
|
| 7638 |
+
"integrity": "sha512-hKoVkKzFiToTgn+41qGhsUJXFlIjxI/jSYeZf3ugemDYZldIXIxhvwN6erJGlX4t5h417iFuheZ7l+YVn05N3A==",
|
| 7639 |
+
"cpu": [
|
| 7640 |
+
"x64"
|
| 7641 |
+
],
|
| 7642 |
+
"dev": true,
|
| 7643 |
+
"optional": true,
|
| 7644 |
+
"os": [
|
| 7645 |
+
"darwin"
|
| 7646 |
+
],
|
| 7647 |
+
"engines": {
|
| 7648 |
+
"node": ">=12"
|
| 7649 |
+
}
|
| 7650 |
+
},
|
| 7651 |
+
"node_modules/vite-node/node_modules/@esbuild/freebsd-arm64": {
|
| 7652 |
+
"version": "0.19.12",
|
| 7653 |
+
"resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.19.12.tgz",
|
| 7654 |
+
"integrity": "sha512-4aRvFIXmwAcDBw9AueDQ2YnGmz5L6obe5kmPT8Vd+/+x/JMVKCgdcRwH6APrbpNXsPz+K653Qg8HB/oXvXVukA==",
|
| 7655 |
+
"cpu": [
|
| 7656 |
+
"arm64"
|
| 7657 |
+
],
|
| 7658 |
+
"dev": true,
|
| 7659 |
+
"optional": true,
|
| 7660 |
+
"os": [
|
| 7661 |
+
"freebsd"
|
| 7662 |
+
],
|
| 7663 |
+
"engines": {
|
| 7664 |
+
"node": ">=12"
|
| 7665 |
+
}
|
| 7666 |
+
},
|
| 7667 |
+
"node_modules/vite-node/node_modules/@esbuild/freebsd-x64": {
|
| 7668 |
+
"version": "0.19.12",
|
| 7669 |
+
"resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.19.12.tgz",
|
| 7670 |
+
"integrity": "sha512-EYoXZ4d8xtBoVN7CEwWY2IN4ho76xjYXqSXMNccFSx2lgqOG/1TBPW0yPx1bJZk94qu3tX0fycJeeQsKovA8gg==",
|
| 7671 |
+
"cpu": [
|
| 7672 |
+
"x64"
|
| 7673 |
+
],
|
| 7674 |
+
"dev": true,
|
| 7675 |
+
"optional": true,
|
| 7676 |
+
"os": [
|
| 7677 |
+
"freebsd"
|
| 7678 |
+
],
|
| 7679 |
+
"engines": {
|
| 7680 |
+
"node": ">=12"
|
| 7681 |
+
}
|
| 7682 |
+
},
|
| 7683 |
+
"node_modules/vite-node/node_modules/@esbuild/linux-arm": {
|
| 7684 |
+
"version": "0.19.12",
|
| 7685 |
+
"resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.19.12.tgz",
|
| 7686 |
+
"integrity": "sha512-J5jPms//KhSNv+LO1S1TX1UWp1ucM6N6XuL6ITdKWElCu8wXP72l9MM0zDTzzeikVyqFE6U8YAV9/tFyj0ti+w==",
|
| 7687 |
+
"cpu": [
|
| 7688 |
+
"arm"
|
| 7689 |
+
],
|
| 7690 |
+
"dev": true,
|
| 7691 |
+
"optional": true,
|
| 7692 |
+
"os": [
|
| 7693 |
+
"linux"
|
| 7694 |
+
],
|
| 7695 |
+
"engines": {
|
| 7696 |
+
"node": ">=12"
|
| 7697 |
+
}
|
| 7698 |
+
},
|
| 7699 |
+
"node_modules/vite-node/node_modules/@esbuild/linux-arm64": {
|
| 7700 |
+
"version": "0.19.12",
|
| 7701 |
+
"resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.19.12.tgz",
|
| 7702 |
+
"integrity": "sha512-EoTjyYyLuVPfdPLsGVVVC8a0p1BFFvtpQDB/YLEhaXyf/5bczaGeN15QkR+O4S5LeJ92Tqotve7i1jn35qwvdA==",
|
| 7703 |
+
"cpu": [
|
| 7704 |
+
"arm64"
|
| 7705 |
+
],
|
| 7706 |
+
"dev": true,
|
| 7707 |
+
"optional": true,
|
| 7708 |
+
"os": [
|
| 7709 |
+
"linux"
|
| 7710 |
+
],
|
| 7711 |
+
"engines": {
|
| 7712 |
+
"node": ">=12"
|
| 7713 |
+
}
|
| 7714 |
+
},
|
| 7715 |
+
"node_modules/vite-node/node_modules/@esbuild/linux-ia32": {
|
| 7716 |
+
"version": "0.19.12",
|
| 7717 |
+
"resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.19.12.tgz",
|
| 7718 |
+
"integrity": "sha512-Thsa42rrP1+UIGaWz47uydHSBOgTUnwBwNq59khgIwktK6x60Hivfbux9iNR0eHCHzOLjLMLfUMLCypBkZXMHA==",
|
| 7719 |
+
"cpu": [
|
| 7720 |
+
"ia32"
|
| 7721 |
+
],
|
| 7722 |
+
"dev": true,
|
| 7723 |
+
"optional": true,
|
| 7724 |
+
"os": [
|
| 7725 |
+
"linux"
|
| 7726 |
+
],
|
| 7727 |
+
"engines": {
|
| 7728 |
+
"node": ">=12"
|
| 7729 |
+
}
|
| 7730 |
+
},
|
| 7731 |
+
"node_modules/vite-node/node_modules/@esbuild/linux-loong64": {
|
| 7732 |
+
"version": "0.19.12",
|
| 7733 |
+
"resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.19.12.tgz",
|
| 7734 |
+
"integrity": "sha512-LiXdXA0s3IqRRjm6rV6XaWATScKAXjI4R4LoDlvO7+yQqFdlr1Bax62sRwkVvRIrwXxvtYEHHI4dm50jAXkuAA==",
|
| 7735 |
+
"cpu": [
|
| 7736 |
+
"loong64"
|
| 7737 |
+
],
|
| 7738 |
+
"dev": true,
|
| 7739 |
+
"optional": true,
|
| 7740 |
+
"os": [
|
| 7741 |
+
"linux"
|
| 7742 |
+
],
|
| 7743 |
+
"engines": {
|
| 7744 |
+
"node": ">=12"
|
| 7745 |
+
}
|
| 7746 |
+
},
|
| 7747 |
+
"node_modules/vite-node/node_modules/@esbuild/linux-mips64el": {
|
| 7748 |
+
"version": "0.19.12",
|
| 7749 |
+
"resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.19.12.tgz",
|
| 7750 |
+
"integrity": "sha512-fEnAuj5VGTanfJ07ff0gOA6IPsvrVHLVb6Lyd1g2/ed67oU1eFzL0r9WL7ZzscD+/N6i3dWumGE1Un4f7Amf+w==",
|
| 7751 |
+
"cpu": [
|
| 7752 |
+
"mips64el"
|
| 7753 |
+
],
|
| 7754 |
+
"dev": true,
|
| 7755 |
+
"optional": true,
|
| 7756 |
+
"os": [
|
| 7757 |
+
"linux"
|
| 7758 |
+
],
|
| 7759 |
+
"engines": {
|
| 7760 |
+
"node": ">=12"
|
| 7761 |
+
}
|
| 7762 |
+
},
|
| 7763 |
+
"node_modules/vite-node/node_modules/@esbuild/linux-ppc64": {
|
| 7764 |
+
"version": "0.19.12",
|
| 7765 |
+
"resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.19.12.tgz",
|
| 7766 |
+
"integrity": "sha512-nYJA2/QPimDQOh1rKWedNOe3Gfc8PabU7HT3iXWtNUbRzXS9+vgB0Fjaqr//XNbd82mCxHzik2qotuI89cfixg==",
|
| 7767 |
+
"cpu": [
|
| 7768 |
+
"ppc64"
|
| 7769 |
+
],
|
| 7770 |
+
"dev": true,
|
| 7771 |
+
"optional": true,
|
| 7772 |
+
"os": [
|
| 7773 |
+
"linux"
|
| 7774 |
+
],
|
| 7775 |
+
"engines": {
|
| 7776 |
+
"node": ">=12"
|
| 7777 |
+
}
|
| 7778 |
+
},
|
| 7779 |
+
"node_modules/vite-node/node_modules/@esbuild/linux-riscv64": {
|
| 7780 |
+
"version": "0.19.12",
|
| 7781 |
+
"resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.19.12.tgz",
|
| 7782 |
+
"integrity": "sha512-2MueBrlPQCw5dVJJpQdUYgeqIzDQgw3QtiAHUC4RBz9FXPrskyyU3VI1hw7C0BSKB9OduwSJ79FTCqtGMWqJHg==",
|
| 7783 |
+
"cpu": [
|
| 7784 |
+
"riscv64"
|
| 7785 |
+
],
|
| 7786 |
+
"dev": true,
|
| 7787 |
+
"optional": true,
|
| 7788 |
+
"os": [
|
| 7789 |
+
"linux"
|
| 7790 |
+
],
|
| 7791 |
+
"engines": {
|
| 7792 |
+
"node": ">=12"
|
| 7793 |
+
}
|
| 7794 |
+
},
|
| 7795 |
+
"node_modules/vite-node/node_modules/@esbuild/linux-s390x": {
|
| 7796 |
+
"version": "0.19.12",
|
| 7797 |
+
"resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.19.12.tgz",
|
| 7798 |
+
"integrity": "sha512-+Pil1Nv3Umes4m3AZKqA2anfhJiVmNCYkPchwFJNEJN5QxmTs1uzyy4TvmDrCRNT2ApwSari7ZIgrPeUx4UZDg==",
|
| 7799 |
+
"cpu": [
|
| 7800 |
+
"s390x"
|
| 7801 |
+
],
|
| 7802 |
+
"dev": true,
|
| 7803 |
+
"optional": true,
|
| 7804 |
+
"os": [
|
| 7805 |
+
"linux"
|
| 7806 |
+
],
|
| 7807 |
+
"engines": {
|
| 7808 |
+
"node": ">=12"
|
| 7809 |
+
}
|
| 7810 |
+
},
|
| 7811 |
+
"node_modules/vite-node/node_modules/@esbuild/linux-x64": {
|
| 7812 |
+
"version": "0.19.12",
|
| 7813 |
+
"resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.19.12.tgz",
|
| 7814 |
+
"integrity": "sha512-B71g1QpxfwBvNrfyJdVDexenDIt1CiDN1TIXLbhOw0KhJzE78KIFGX6OJ9MrtC0oOqMWf+0xop4qEU8JrJTwCg==",
|
| 7815 |
+
"cpu": [
|
| 7816 |
+
"x64"
|
| 7817 |
+
],
|
| 7818 |
+
"dev": true,
|
| 7819 |
+
"optional": true,
|
| 7820 |
+
"os": [
|
| 7821 |
+
"linux"
|
| 7822 |
+
],
|
| 7823 |
+
"engines": {
|
| 7824 |
+
"node": ">=12"
|
| 7825 |
+
}
|
| 7826 |
+
},
|
| 7827 |
+
"node_modules/vite-node/node_modules/@esbuild/netbsd-x64": {
|
| 7828 |
+
"version": "0.19.12",
|
| 7829 |
+
"resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.19.12.tgz",
|
| 7830 |
+
"integrity": "sha512-3ltjQ7n1owJgFbuC61Oj++XhtzmymoCihNFgT84UAmJnxJfm4sYCiSLTXZtE00VWYpPMYc+ZQmB6xbSdVh0JWA==",
|
| 7831 |
+
"cpu": [
|
| 7832 |
+
"x64"
|
| 7833 |
+
],
|
| 7834 |
+
"dev": true,
|
| 7835 |
+
"optional": true,
|
| 7836 |
+
"os": [
|
| 7837 |
+
"netbsd"
|
| 7838 |
+
],
|
| 7839 |
+
"engines": {
|
| 7840 |
+
"node": ">=12"
|
| 7841 |
+
}
|
| 7842 |
+
},
|
| 7843 |
+
"node_modules/vite-node/node_modules/@esbuild/openbsd-x64": {
|
| 7844 |
+
"version": "0.19.12",
|
| 7845 |
+
"resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.19.12.tgz",
|
| 7846 |
+
"integrity": "sha512-RbrfTB9SWsr0kWmb9srfF+L933uMDdu9BIzdA7os2t0TXhCRjrQyCeOt6wVxr79CKD4c+p+YhCj31HBkYcXebw==",
|
| 7847 |
+
"cpu": [
|
| 7848 |
+
"x64"
|
| 7849 |
+
],
|
| 7850 |
+
"dev": true,
|
| 7851 |
+
"optional": true,
|
| 7852 |
+
"os": [
|
| 7853 |
+
"openbsd"
|
| 7854 |
+
],
|
| 7855 |
+
"engines": {
|
| 7856 |
+
"node": ">=12"
|
| 7857 |
+
}
|
| 7858 |
+
},
|
| 7859 |
+
"node_modules/vite-node/node_modules/@esbuild/sunos-x64": {
|
| 7860 |
+
"version": "0.19.12",
|
| 7861 |
+
"resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.19.12.tgz",
|
| 7862 |
+
"integrity": "sha512-HKjJwRrW8uWtCQnQOz9qcU3mUZhTUQvi56Q8DPTLLB+DawoiQdjsYq+j+D3s9I8VFtDr+F9CjgXKKC4ss89IeA==",
|
| 7863 |
+
"cpu": [
|
| 7864 |
+
"x64"
|
| 7865 |
+
],
|
| 7866 |
+
"dev": true,
|
| 7867 |
+
"optional": true,
|
| 7868 |
+
"os": [
|
| 7869 |
+
"sunos"
|
| 7870 |
+
],
|
| 7871 |
+
"engines": {
|
| 7872 |
+
"node": ">=12"
|
| 7873 |
+
}
|
| 7874 |
+
},
|
| 7875 |
+
"node_modules/vite-node/node_modules/@esbuild/win32-arm64": {
|
| 7876 |
+
"version": "0.19.12",
|
| 7877 |
+
"resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.19.12.tgz",
|
| 7878 |
+
"integrity": "sha512-URgtR1dJnmGvX864pn1B2YUYNzjmXkuJOIqG2HdU62MVS4EHpU2946OZoTMnRUHklGtJdJZ33QfzdjGACXhn1A==",
|
| 7879 |
+
"cpu": [
|
| 7880 |
+
"arm64"
|
| 7881 |
+
],
|
| 7882 |
+
"dev": true,
|
| 7883 |
+
"optional": true,
|
| 7884 |
+
"os": [
|
| 7885 |
+
"win32"
|
| 7886 |
+
],
|
| 7887 |
+
"engines": {
|
| 7888 |
+
"node": ">=12"
|
| 7889 |
+
}
|
| 7890 |
+
},
|
| 7891 |
+
"node_modules/vite-node/node_modules/@esbuild/win32-ia32": {
|
| 7892 |
+
"version": "0.19.12",
|
| 7893 |
+
"resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.19.12.tgz",
|
| 7894 |
+
"integrity": "sha512-+ZOE6pUkMOJfmxmBZElNOx72NKpIa/HFOMGzu8fqzQJ5kgf6aTGrcJaFsNiVMH4JKpMipyK+7k0n2UXN7a8YKQ==",
|
| 7895 |
+
"cpu": [
|
| 7896 |
+
"ia32"
|
| 7897 |
+
],
|
| 7898 |
+
"dev": true,
|
| 7899 |
+
"optional": true,
|
| 7900 |
+
"os": [
|
| 7901 |
+
"win32"
|
| 7902 |
+
],
|
| 7903 |
+
"engines": {
|
| 7904 |
+
"node": ">=12"
|
| 7905 |
+
}
|
| 7906 |
+
},
|
| 7907 |
+
"node_modules/vite-node/node_modules/@esbuild/win32-x64": {
|
| 7908 |
+
"version": "0.19.12",
|
| 7909 |
+
"resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.19.12.tgz",
|
| 7910 |
+
"integrity": "sha512-T1QyPSDCyMXaO3pzBkF96E8xMkiRYbUEZADd29SyPGabqxMViNoii+NcK7eWJAEoU6RZyEm5lVSIjTmcdoB9HA==",
|
| 7911 |
+
"cpu": [
|
| 7912 |
+
"x64"
|
| 7913 |
+
],
|
| 7914 |
+
"dev": true,
|
| 7915 |
+
"optional": true,
|
| 7916 |
+
"os": [
|
| 7917 |
+
"win32"
|
| 7918 |
+
],
|
| 7919 |
+
"engines": {
|
| 7920 |
+
"node": ">=12"
|
| 7921 |
+
}
|
| 7922 |
+
},
|
| 7923 |
+
"node_modules/vite-node/node_modules/esbuild": {
|
| 7924 |
+
"version": "0.19.12",
|
| 7925 |
+
"resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.19.12.tgz",
|
| 7926 |
+
"integrity": "sha512-aARqgq8roFBj054KvQr5f1sFu0D65G+miZRCuJyJ0G13Zwx7vRar5Zhn2tkQNzIXcBrNVsv/8stehpj+GAjgbg==",
|
| 7927 |
+
"dev": true,
|
| 7928 |
+
"hasInstallScript": true,
|
| 7929 |
+
"bin": {
|
| 7930 |
+
"esbuild": "bin/esbuild"
|
| 7931 |
+
},
|
| 7932 |
+
"engines": {
|
| 7933 |
+
"node": ">=12"
|
| 7934 |
+
},
|
| 7935 |
+
"optionalDependencies": {
|
| 7936 |
+
"@esbuild/aix-ppc64": "0.19.12",
|
| 7937 |
+
"@esbuild/android-arm": "0.19.12",
|
| 7938 |
+
"@esbuild/android-arm64": "0.19.12",
|
| 7939 |
+
"@esbuild/android-x64": "0.19.12",
|
| 7940 |
+
"@esbuild/darwin-arm64": "0.19.12",
|
| 7941 |
+
"@esbuild/darwin-x64": "0.19.12",
|
| 7942 |
+
"@esbuild/freebsd-arm64": "0.19.12",
|
| 7943 |
+
"@esbuild/freebsd-x64": "0.19.12",
|
| 7944 |
+
"@esbuild/linux-arm": "0.19.12",
|
| 7945 |
+
"@esbuild/linux-arm64": "0.19.12",
|
| 7946 |
+
"@esbuild/linux-ia32": "0.19.12",
|
| 7947 |
+
"@esbuild/linux-loong64": "0.19.12",
|
| 7948 |
+
"@esbuild/linux-mips64el": "0.19.12",
|
| 7949 |
+
"@esbuild/linux-ppc64": "0.19.12",
|
| 7950 |
+
"@esbuild/linux-riscv64": "0.19.12",
|
| 7951 |
+
"@esbuild/linux-s390x": "0.19.12",
|
| 7952 |
+
"@esbuild/linux-x64": "0.19.12",
|
| 7953 |
+
"@esbuild/netbsd-x64": "0.19.12",
|
| 7954 |
+
"@esbuild/openbsd-x64": "0.19.12",
|
| 7955 |
+
"@esbuild/sunos-x64": "0.19.12",
|
| 7956 |
+
"@esbuild/win32-arm64": "0.19.12",
|
| 7957 |
+
"@esbuild/win32-ia32": "0.19.12",
|
| 7958 |
+
"@esbuild/win32-x64": "0.19.12"
|
| 7959 |
+
}
|
| 7960 |
+
},
|
| 7961 |
+
"node_modules/vite-node/node_modules/rollup": {
|
| 7962 |
+
"version": "4.12.0",
|
| 7963 |
+
"resolved": "https://registry.npmjs.org/rollup/-/rollup-4.12.0.tgz",
|
| 7964 |
+
"integrity": "sha512-wz66wn4t1OHIJw3+XU7mJJQV/2NAfw5OAk6G6Hoo3zcvz/XOfQ52Vgi+AN4Uxoxi0KBBwk2g8zPrTDA4btSB/Q==",
|
| 7965 |
+
"dev": true,
|
| 7966 |
+
"dependencies": {
|
| 7967 |
+
"@types/estree": "1.0.5"
|
| 7968 |
+
},
|
| 7969 |
+
"bin": {
|
| 7970 |
+
"rollup": "dist/bin/rollup"
|
| 7971 |
+
},
|
| 7972 |
+
"engines": {
|
| 7973 |
+
"node": ">=18.0.0",
|
| 7974 |
+
"npm": ">=8.0.0"
|
| 7975 |
+
},
|
| 7976 |
+
"optionalDependencies": {
|
| 7977 |
+
"@rollup/rollup-android-arm-eabi": "4.12.0",
|
| 7978 |
+
"@rollup/rollup-android-arm64": "4.12.0",
|
| 7979 |
+
"@rollup/rollup-darwin-arm64": "4.12.0",
|
| 7980 |
+
"@rollup/rollup-darwin-x64": "4.12.0",
|
| 7981 |
+
"@rollup/rollup-linux-arm-gnueabihf": "4.12.0",
|
| 7982 |
+
"@rollup/rollup-linux-arm64-gnu": "4.12.0",
|
| 7983 |
+
"@rollup/rollup-linux-arm64-musl": "4.12.0",
|
| 7984 |
+
"@rollup/rollup-linux-riscv64-gnu": "4.12.0",
|
| 7985 |
+
"@rollup/rollup-linux-x64-gnu": "4.12.0",
|
| 7986 |
+
"@rollup/rollup-linux-x64-musl": "4.12.0",
|
| 7987 |
+
"@rollup/rollup-win32-arm64-msvc": "4.12.0",
|
| 7988 |
+
"@rollup/rollup-win32-ia32-msvc": "4.12.0",
|
| 7989 |
+
"@rollup/rollup-win32-x64-msvc": "4.12.0",
|
| 7990 |
+
"fsevents": "~2.3.2"
|
| 7991 |
+
}
|
| 7992 |
+
},
|
| 7993 |
+
"node_modules/vite-node/node_modules/vite": {
|
| 7994 |
+
"version": "5.1.4",
|
| 7995 |
+
"resolved": "https://registry.npmjs.org/vite/-/vite-5.1.4.tgz",
|
| 7996 |
+
"integrity": "sha512-n+MPqzq+d9nMVTKyewqw6kSt+R3CkvF9QAKY8obiQn8g1fwTscKxyfaYnC632HtBXAQGc1Yjomphwn1dtwGAHg==",
|
| 7997 |
+
"dev": true,
|
| 7998 |
+
"dependencies": {
|
| 7999 |
+
"esbuild": "^0.19.3",
|
| 8000 |
+
"postcss": "^8.4.35",
|
| 8001 |
+
"rollup": "^4.2.0"
|
| 8002 |
+
},
|
| 8003 |
+
"bin": {
|
| 8004 |
+
"vite": "bin/vite.js"
|
| 8005 |
+
},
|
| 8006 |
+
"engines": {
|
| 8007 |
+
"node": "^18.0.0 || >=20.0.0"
|
| 8008 |
+
},
|
| 8009 |
+
"funding": {
|
| 8010 |
+
"url": "https://github.com/vitejs/vite?sponsor=1"
|
| 8011 |
+
},
|
| 8012 |
+
"optionalDependencies": {
|
| 8013 |
+
"fsevents": "~2.3.3"
|
| 8014 |
+
},
|
| 8015 |
+
"peerDependencies": {
|
| 8016 |
+
"@types/node": "^18.0.0 || >=20.0.0",
|
| 8017 |
+
"less": "*",
|
| 8018 |
+
"lightningcss": "^1.21.0",
|
| 8019 |
+
"sass": "*",
|
| 8020 |
+
"stylus": "*",
|
| 8021 |
+
"sugarss": "*",
|
| 8022 |
+
"terser": "^5.4.0"
|
| 8023 |
+
},
|
| 8024 |
+
"peerDependenciesMeta": {
|
| 8025 |
+
"@types/node": {
|
| 8026 |
+
"optional": true
|
| 8027 |
+
},
|
| 8028 |
+
"less": {
|
| 8029 |
+
"optional": true
|
| 8030 |
+
},
|
| 8031 |
+
"lightningcss": {
|
| 8032 |
+
"optional": true
|
| 8033 |
+
},
|
| 8034 |
+
"sass": {
|
| 8035 |
+
"optional": true
|
| 8036 |
+
},
|
| 8037 |
+
"stylus": {
|
| 8038 |
+
"optional": true
|
| 8039 |
+
},
|
| 8040 |
+
"sugarss": {
|
| 8041 |
+
"optional": true
|
| 8042 |
+
},
|
| 8043 |
+
"terser": {
|
| 8044 |
+
"optional": true
|
| 8045 |
+
}
|
| 8046 |
+
}
|
| 8047 |
+
},
|
| 8048 |
"node_modules/vitefu": {
|
| 8049 |
"version": "0.2.5",
|
| 8050 |
"resolved": "https://registry.npmjs.org/vitefu/-/vitefu-0.2.5.tgz",
|
|
|
|
| 8137 |
}
|
| 8138 |
}
|
| 8139 |
},
|
| 8140 |
+
"node_modules/vitest/node_modules/vite-node": {
|
| 8141 |
+
"version": "0.31.0",
|
| 8142 |
+
"resolved": "https://registry.npmjs.org/vite-node/-/vite-node-0.31.0.tgz",
|
| 8143 |
+
"integrity": "sha512-8x1x1LNuPvE2vIvkSB7c1mApX5oqlgsxzHQesYF7l5n1gKrEmrClIiZuOFbFDQcjLsmcWSwwmrWrcGWm9Fxc/g==",
|
| 8144 |
+
"dev": true,
|
| 8145 |
+
"dependencies": {
|
| 8146 |
+
"cac": "^6.7.14",
|
| 8147 |
+
"debug": "^4.3.4",
|
| 8148 |
+
"mlly": "^1.2.0",
|
| 8149 |
+
"pathe": "^1.1.0",
|
| 8150 |
+
"picocolors": "^1.0.0",
|
| 8151 |
+
"vite": "^3.0.0 || ^4.0.0"
|
| 8152 |
+
},
|
| 8153 |
+
"bin": {
|
| 8154 |
+
"vite-node": "vite-node.mjs"
|
| 8155 |
+
},
|
| 8156 |
+
"engines": {
|
| 8157 |
+
"node": ">=v14.18.0"
|
| 8158 |
+
},
|
| 8159 |
+
"funding": {
|
| 8160 |
+
"url": "https://opencollective.com/vitest"
|
| 8161 |
+
}
|
| 8162 |
+
},
|
| 8163 |
"node_modules/w3c-xmlserializer": {
|
| 8164 |
"version": "4.0.0",
|
| 8165 |
"resolved": "https://registry.npmjs.org/w3c-xmlserializer/-/w3c-xmlserializer-4.0.0.tgz",
|
package.json
CHANGED
|
@@ -13,9 +13,11 @@
|
|
| 13 |
"format": "prettier --plugin-search-dir . --write .",
|
| 14 |
"test": "MONGODB_URL=mongodb://127.0.0.1:27017/ vitest",
|
| 15 |
"updateLocalEnv": "node --loader ts-node/esm scripts/updateLocalEnv.ts",
|
| 16 |
-
"updateProdEnv": "node --loader ts-node/esm scripts/updateProdEnv.ts"
|
|
|
|
| 17 |
},
|
| 18 |
"devDependencies": {
|
|
|
|
| 19 |
"@iconify-json/carbon": "^1.1.16",
|
| 20 |
"@iconify-json/eos-icons": "^1.1.6",
|
| 21 |
"@sveltejs/adapter-node": "^1.3.1",
|
|
@@ -23,6 +25,7 @@
|
|
| 23 |
"@tailwindcss/typography": "^0.5.9",
|
| 24 |
"@types/jsdom": "^21.1.1",
|
| 25 |
"@types/marked": "^4.0.8",
|
|
|
|
| 26 |
"@types/parquetjs": "^0.10.3",
|
| 27 |
"@types/uuid": "^9.0.8",
|
| 28 |
"@typescript-eslint/eslint-plugin": "^6.x",
|
|
@@ -31,6 +34,7 @@
|
|
| 31 |
"eslint-config-prettier": "^8.5.0",
|
| 32 |
"eslint-plugin-svelte": "^2.30.0",
|
| 33 |
"marked-katex-extension": "^3.0.6",
|
|
|
|
| 34 |
"prettier": "^2.8.0",
|
| 35 |
"prettier-plugin-svelte": "^2.10.1",
|
| 36 |
"prettier-plugin-tailwindcss": "^0.2.7",
|
|
@@ -41,6 +45,7 @@
|
|
| 41 |
"typescript": "^5.0.0",
|
| 42 |
"unplugin-icons": "^0.16.1",
|
| 43 |
"vite": "^4.5.2",
|
|
|
|
| 44 |
"vitest": "^0.31.0"
|
| 45 |
},
|
| 46 |
"type": "module",
|
|
|
|
| 13 |
"format": "prettier --plugin-search-dir . --write .",
|
| 14 |
"test": "MONGODB_URL=mongodb://127.0.0.1:27017/ vitest",
|
| 15 |
"updateLocalEnv": "node --loader ts-node/esm scripts/updateLocalEnv.ts",
|
| 16 |
+
"updateProdEnv": "node --loader ts-node/esm scripts/updateProdEnv.ts",
|
| 17 |
+
"populate": "vite-node --options.transformMode.ssr='/.*/' scripts/populate.ts"
|
| 18 |
},
|
| 19 |
"devDependencies": {
|
| 20 |
+
"@faker-js/faker": "^8.4.1",
|
| 21 |
"@iconify-json/carbon": "^1.1.16",
|
| 22 |
"@iconify-json/eos-icons": "^1.1.6",
|
| 23 |
"@sveltejs/adapter-node": "^1.3.1",
|
|
|
|
| 25 |
"@tailwindcss/typography": "^0.5.9",
|
| 26 |
"@types/jsdom": "^21.1.1",
|
| 27 |
"@types/marked": "^4.0.8",
|
| 28 |
+
"@types/minimist": "^1.2.5",
|
| 29 |
"@types/parquetjs": "^0.10.3",
|
| 30 |
"@types/uuid": "^9.0.8",
|
| 31 |
"@typescript-eslint/eslint-plugin": "^6.x",
|
|
|
|
| 34 |
"eslint-config-prettier": "^8.5.0",
|
| 35 |
"eslint-plugin-svelte": "^2.30.0",
|
| 36 |
"marked-katex-extension": "^3.0.6",
|
| 37 |
+
"minimist": "^1.2.8",
|
| 38 |
"prettier": "^2.8.0",
|
| 39 |
"prettier-plugin-svelte": "^2.10.1",
|
| 40 |
"prettier-plugin-tailwindcss": "^0.2.7",
|
|
|
|
| 45 |
"typescript": "^5.0.0",
|
| 46 |
"unplugin-icons": "^0.16.1",
|
| 47 |
"vite": "^4.5.2",
|
| 48 |
+
"vite-node": "^1.3.1",
|
| 49 |
"vitest": "^0.31.0"
|
| 50 |
},
|
| 51 |
"type": "module",
|
scripts/populate.ts
ADDED
|
@@ -0,0 +1,264 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import readline from "readline";
|
| 2 |
+
import minimist from "minimist";
|
| 3 |
+
|
| 4 |
+
// @ts-expect-error: vite-node makes the var available but the typescript compiler doesn't see them
|
| 5 |
+
import { MONGODB_URL } from "$env/static/private";
|
| 6 |
+
|
| 7 |
+
import { faker } from "@faker-js/faker";
|
| 8 |
+
import { ObjectId } from "mongodb";
|
| 9 |
+
|
| 10 |
+
import { collections } from "../src/lib/server/database.ts";
|
| 11 |
+
import { models } from "../src/lib/server/models.ts";
|
| 12 |
+
import type { User } from "../src/lib/types/User";
|
| 13 |
+
import type { Assistant } from "../src/lib/types/Assistant";
|
| 14 |
+
import type { Conversation } from "../src/lib/types/Conversation";
|
| 15 |
+
import type { Settings } from "../src/lib/types/Settings";
|
| 16 |
+
import { defaultEmbeddingModel } from "../src/lib/server/embeddingModels.ts";
|
| 17 |
+
import { Message } from "../src/lib/types/Message.ts";
|
| 18 |
+
|
| 19 |
+
import { addChildren } from "../src/lib/utils/tree/addChildren.ts";
|
| 20 |
+
|
| 21 |
+
const rl = readline.createInterface({
|
| 22 |
+
input: process.stdin,
|
| 23 |
+
output: process.stdout,
|
| 24 |
+
});
|
| 25 |
+
|
| 26 |
+
rl.on("close", function () {
|
| 27 |
+
process.exit(0);
|
| 28 |
+
});
|
| 29 |
+
|
| 30 |
+
const possibleFlags = ["reset", "all", "users", "settings", "assistants", "conversations"];
|
| 31 |
+
const argv = minimist(process.argv.slice(2));
|
| 32 |
+
const flags = argv["_"].filter((flag) => possibleFlags.includes(flag));
|
| 33 |
+
|
| 34 |
+
async function generateMessages(preprompt?: string): Promise<Message[]> {
|
| 35 |
+
const isLinear = faker.datatype.boolean(0.5);
|
| 36 |
+
const isInterrupted = faker.datatype.boolean(0.05);
|
| 37 |
+
|
| 38 |
+
const messages: Message[] = [];
|
| 39 |
+
|
| 40 |
+
messages.push({
|
| 41 |
+
id: crypto.randomUUID(),
|
| 42 |
+
from: "system",
|
| 43 |
+
content: preprompt ?? "",
|
| 44 |
+
createdAt: faker.date.recent({ days: 30 }),
|
| 45 |
+
updatedAt: faker.date.recent({ days: 30 }),
|
| 46 |
+
});
|
| 47 |
+
|
| 48 |
+
let isUser = true;
|
| 49 |
+
let lastId = messages[0].id;
|
| 50 |
+
if (isLinear) {
|
| 51 |
+
const convLength = faker.number.int({ min: 1, max: 25 }) * 2; // must always be even
|
| 52 |
+
|
| 53 |
+
for (let i = 0; i < convLength; i++) {
|
| 54 |
+
lastId = addChildren(
|
| 55 |
+
{
|
| 56 |
+
messages,
|
| 57 |
+
rootMessageId: messages[0].id,
|
| 58 |
+
},
|
| 59 |
+
{
|
| 60 |
+
from: isUser ? "user" : "assistant",
|
| 61 |
+
content: faker.lorem.sentence({
|
| 62 |
+
min: 10,
|
| 63 |
+
max: isUser ? 50 : 200,
|
| 64 |
+
}),
|
| 65 |
+
createdAt: faker.date.recent({ days: 30 }),
|
| 66 |
+
updatedAt: faker.date.recent({ days: 30 }),
|
| 67 |
+
interrupted: i === convLength - 1 && isInterrupted,
|
| 68 |
+
},
|
| 69 |
+
lastId
|
| 70 |
+
);
|
| 71 |
+
isUser = !isUser;
|
| 72 |
+
}
|
| 73 |
+
} else {
|
| 74 |
+
const convLength = faker.number.int({ min: 2, max: 200 });
|
| 75 |
+
|
| 76 |
+
for (let i = 0; i < convLength; i++) {
|
| 77 |
+
addChildren(
|
| 78 |
+
{
|
| 79 |
+
messages,
|
| 80 |
+
rootMessageId: messages[0].id,
|
| 81 |
+
},
|
| 82 |
+
{
|
| 83 |
+
from: isUser ? "user" : "assistant",
|
| 84 |
+
content: faker.lorem.sentence({
|
| 85 |
+
min: 10,
|
| 86 |
+
max: isUser ? 50 : 200,
|
| 87 |
+
}),
|
| 88 |
+
createdAt: faker.date.recent({ days: 30 }),
|
| 89 |
+
updatedAt: faker.date.recent({ days: 30 }),
|
| 90 |
+
interrupted: i === convLength - 1 && isInterrupted,
|
| 91 |
+
},
|
| 92 |
+
faker.helpers.arrayElement([
|
| 93 |
+
messages[0].id,
|
| 94 |
+
...messages.filter((m) => m.from === (isUser ? "assistant" : "user")).map((m) => m.id),
|
| 95 |
+
])
|
| 96 |
+
);
|
| 97 |
+
|
| 98 |
+
isUser = !isUser;
|
| 99 |
+
}
|
| 100 |
+
}
|
| 101 |
+
return messages;
|
| 102 |
+
}
|
| 103 |
+
|
| 104 |
+
async function seed() {
|
| 105 |
+
console.log("Seeding...");
|
| 106 |
+
const modelIds = models.map((model) => model.id);
|
| 107 |
+
|
| 108 |
+
if (flags.includes("reset")) {
|
| 109 |
+
console.log("Starting reset of DB");
|
| 110 |
+
await collections.users.deleteMany({});
|
| 111 |
+
await collections.settings.deleteMany({});
|
| 112 |
+
await collections.assistants.deleteMany({});
|
| 113 |
+
await collections.conversations.deleteMany({});
|
| 114 |
+
console.log("Reset done");
|
| 115 |
+
}
|
| 116 |
+
|
| 117 |
+
if (flags.includes("users") || flags.includes("all")) {
|
| 118 |
+
console.log("Creating 100 new users");
|
| 119 |
+
const newUsers: User[] = Array.from({ length: 100 }, () => ({
|
| 120 |
+
_id: new ObjectId(),
|
| 121 |
+
createdAt: faker.date.recent({ days: 30 }),
|
| 122 |
+
updatedAt: faker.date.recent({ days: 30 }),
|
| 123 |
+
username: faker.internet.userName(),
|
| 124 |
+
name: faker.person.fullName(),
|
| 125 |
+
hfUserId: faker.string.alphanumeric(24),
|
| 126 |
+
avatarUrl: faker.image.avatar(),
|
| 127 |
+
}));
|
| 128 |
+
|
| 129 |
+
await collections.users.insertMany(newUsers);
|
| 130 |
+
console.log("Done creating users.");
|
| 131 |
+
}
|
| 132 |
+
|
| 133 |
+
const users = await collections.users.find().toArray();
|
| 134 |
+
if (flags.includes("settings") || flags.includes("all")) {
|
| 135 |
+
console.log("Updating settings for all users");
|
| 136 |
+
users.forEach(async (user) => {
|
| 137 |
+
const settings: Settings = {
|
| 138 |
+
userId: user._id,
|
| 139 |
+
shareConversationsWithModelAuthors: faker.datatype.boolean(0.25),
|
| 140 |
+
hideEmojiOnSidebar: faker.datatype.boolean(0.25),
|
| 141 |
+
ethicsModalAcceptedAt: faker.date.recent({ days: 30 }),
|
| 142 |
+
activeModel: faker.helpers.arrayElement(modelIds),
|
| 143 |
+
createdAt: faker.date.recent({ days: 30 }),
|
| 144 |
+
updatedAt: faker.date.recent({ days: 30 }),
|
| 145 |
+
customPrompts: {},
|
| 146 |
+
assistants: [],
|
| 147 |
+
};
|
| 148 |
+
await collections.settings.updateOne(
|
| 149 |
+
{ userId: user._id },
|
| 150 |
+
{ $set: { ...settings } },
|
| 151 |
+
{ upsert: true }
|
| 152 |
+
);
|
| 153 |
+
});
|
| 154 |
+
console.log("Done updating settings.");
|
| 155 |
+
}
|
| 156 |
+
|
| 157 |
+
if (flags.includes("assistants") || flags.includes("all")) {
|
| 158 |
+
console.log("Creating assistants for all users");
|
| 159 |
+
await Promise.all(
|
| 160 |
+
users.map(async (user) => {
|
| 161 |
+
const assistants = faker.helpers.multiple<Assistant>(
|
| 162 |
+
() => ({
|
| 163 |
+
_id: new ObjectId(),
|
| 164 |
+
name: faker.animal.insect(),
|
| 165 |
+
createdById: user._id,
|
| 166 |
+
createdByName: user.username,
|
| 167 |
+
createdAt: faker.date.recent({ days: 30 }),
|
| 168 |
+
updatedAt: faker.date.recent({ days: 30 }),
|
| 169 |
+
userCount: faker.number.int({ min: 1, max: 100000 }),
|
| 170 |
+
featured: faker.datatype.boolean(0.25),
|
| 171 |
+
modelId: faker.helpers.arrayElement(modelIds),
|
| 172 |
+
description: faker.lorem.sentence(),
|
| 173 |
+
preprompt: faker.hacker.phrase(),
|
| 174 |
+
exampleInputs: faker.helpers.multiple(() => faker.lorem.sentence(), {
|
| 175 |
+
count: faker.number.int({ min: 0, max: 4 }),
|
| 176 |
+
}),
|
| 177 |
+
}),
|
| 178 |
+
{ count: faker.number.int({ min: 3, max: 10 }) }
|
| 179 |
+
);
|
| 180 |
+
await collections.assistants.insertMany(assistants);
|
| 181 |
+
await collections.settings.updateOne(
|
| 182 |
+
{ userId: user._id },
|
| 183 |
+
{ $set: { assistants: assistants.map((a) => a._id.toString()) } },
|
| 184 |
+
{ upsert: true }
|
| 185 |
+
);
|
| 186 |
+
})
|
| 187 |
+
);
|
| 188 |
+
console.log("Done creating assistants.");
|
| 189 |
+
}
|
| 190 |
+
|
| 191 |
+
if (flags.includes("conversations") || flags.includes("all")) {
|
| 192 |
+
console.log("Creating conversations for all users");
|
| 193 |
+
await Promise.all(
|
| 194 |
+
users.map(async (user) => {
|
| 195 |
+
const conversations = faker.helpers.multiple(
|
| 196 |
+
async () => {
|
| 197 |
+
const settings = await collections.settings.findOne<Settings>({ userId: user._id });
|
| 198 |
+
|
| 199 |
+
const assistantId =
|
| 200 |
+
settings?.assistants && settings.assistants.length > 0 && faker.datatype.boolean(0.1)
|
| 201 |
+
? faker.helpers.arrayElement<ObjectId>(settings.assistants)
|
| 202 |
+
: undefined;
|
| 203 |
+
|
| 204 |
+
const preprompt =
|
| 205 |
+
(assistantId
|
| 206 |
+
? await collections.assistants
|
| 207 |
+
.findOne({ _id: assistantId })
|
| 208 |
+
.then((assistant: Assistant) => assistant?.preprompt ?? "")
|
| 209 |
+
: faker.helpers.maybe(() => faker.hacker.phrase(), { probability: 0.5 })) ?? "";
|
| 210 |
+
|
| 211 |
+
const messages = await generateMessages(preprompt);
|
| 212 |
+
|
| 213 |
+
const conv = {
|
| 214 |
+
_id: new ObjectId(),
|
| 215 |
+
userId: user._id,
|
| 216 |
+
assistantId,
|
| 217 |
+
preprompt,
|
| 218 |
+
createdAt: faker.date.recent({ days: 145 }),
|
| 219 |
+
updatedAt: faker.date.recent({ days: 145 }),
|
| 220 |
+
model: faker.helpers.arrayElement(modelIds),
|
| 221 |
+
title: faker.internet.emoji() + " " + faker.hacker.phrase(),
|
| 222 |
+
embeddingModel: defaultEmbeddingModel.id,
|
| 223 |
+
messages,
|
| 224 |
+
rootMessageId: messages[0].id,
|
| 225 |
+
} satisfies Conversation;
|
| 226 |
+
|
| 227 |
+
return conv;
|
| 228 |
+
},
|
| 229 |
+
{ count: faker.number.int({ min: 10, max: 200 }) }
|
| 230 |
+
);
|
| 231 |
+
|
| 232 |
+
await collections.conversations.insertMany(await Promise.all(conversations));
|
| 233 |
+
})
|
| 234 |
+
);
|
| 235 |
+
console.log("Done creating conversations.");
|
| 236 |
+
}
|
| 237 |
+
}
|
| 238 |
+
|
| 239 |
+
// run seed
|
| 240 |
+
(async () => {
|
| 241 |
+
try {
|
| 242 |
+
rl.question(
|
| 243 |
+
"You're about to run a seeding script on the following MONGODB_URL: \x1b[31m" +
|
| 244 |
+
MONGODB_URL +
|
| 245 |
+
"\x1b[0m\n\n With the following flags: \x1b[31m" +
|
| 246 |
+
flags.join("\x1b[0m , \x1b[31m") +
|
| 247 |
+
"\x1b[0m\n \n\n Are you sure you want to continue? (yes/no): ",
|
| 248 |
+
async (confirm) => {
|
| 249 |
+
if (confirm !== "yes") {
|
| 250 |
+
console.log("Not 'yes', exiting.");
|
| 251 |
+
rl.close();
|
| 252 |
+
process.exit(0);
|
| 253 |
+
}
|
| 254 |
+
console.log("Starting seeding...");
|
| 255 |
+
await seed();
|
| 256 |
+
console.log("Seeding done.");
|
| 257 |
+
rl.close();
|
| 258 |
+
}
|
| 259 |
+
);
|
| 260 |
+
} catch (e) {
|
| 261 |
+
console.error(e);
|
| 262 |
+
process.exit(1);
|
| 263 |
+
}
|
| 264 |
+
})();
|