stacks 0.52.0 → 0.52.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/auto-imports.d.ts +1595 -651
- package/components.d.ts +4 -2
- package/core/actions/build.config.ts +2 -0
- package/core/actions/package.json +14 -2
- package/core/actions/src/clean.ts +9 -12
- package/core/actions/src/deploy/domains.ts +1 -1
- package/core/actions/src/helpers/package-json.ts +1 -2
- package/core/actions/src/helpers/utils.ts +1 -2
- package/core/actions/src/release.ts +1 -1
- package/core/actions/src/tinker.ts +1 -0
- package/core/ai/build.config.ts +2 -0
- package/core/ai/package.json +1 -1
- package/core/alias/build.config.ts +2 -0
- package/core/alias/package.json +1 -2
- package/core/analytics/build.config.ts +2 -0
- package/core/analytics/package.json +1 -1
- package/core/arrays/build.config.ts +2 -0
- package/core/arrays/package.json +1 -1
- package/core/auth/build.config.ts +2 -0
- package/core/auth/package.json +1 -1
- package/core/auth/src/index.ts +1 -3
- package/core/buddy/README.md +1 -1
- package/core/buddy/package.json +1 -1
- package/core/buddy/src/commands/build.ts +8 -11
- package/core/buddy/src/commands/changelog.ts +4 -5
- package/core/buddy/src/commands/clean.ts +2 -3
- package/core/buddy/src/commands/deploy.ts +4 -5
- package/core/buddy/src/commands/dev.ts +2 -1
- package/core/buddy/src/commands/fresh.ts +2 -2
- package/core/buddy/src/commands/inspire.ts +4 -5
- package/core/buddy/src/commands/key.ts +4 -5
- package/core/buddy/src/commands/lint.ts +8 -10
- package/core/buddy/src/commands/make.ts +4 -5
- package/core/buddy/src/commands/migrate.ts +4 -5
- package/core/buddy/src/commands/onboarding.ts +4 -5
- package/core/buddy/src/commands/release.ts +4 -12
- package/core/buddy/src/commands/seed.ts +14 -14
- package/core/buddy/src/commands/setting.ts +4 -5
- package/core/buddy/src/commands/test.ts +29 -34
- package/core/buddy/src/commands/upgrade.ts +13 -16
- package/core/buddy/src/commands/version.ts +25 -16
- package/core/build/build.config.ts +2 -0
- package/core/build/node_modules/.bin/vite +4 -4
- package/core/build/node_modules/.bin/vite-ssg +4 -4
- package/core/build/node_modules/.bin/vue-docgen-web-types +4 -4
- package/core/build/package.json +5 -5
- package/core/build/src/stacks.ts +8 -14
- package/core/build/src/vue-components.ts +6 -4
- package/core/cache/build.config.ts +2 -0
- package/core/cache/package.json +2 -2
- package/core/chat/build.config.ts +2 -0
- package/core/chat/package.json +6 -6
- package/core/cli/package.json +1 -1
- package/core/cli/src/actions/install.ts +20 -2
- package/core/cli/src/helpers.ts +6 -1
- package/core/cli/src/run.ts +5 -8
- package/core/cloud/build.config.ts +2 -0
- package/core/cloud/package.json +1 -1
- package/core/collections/build.config.ts +2 -0
- package/core/collections/package.json +1 -1
- package/core/config/package.json +1 -1
- package/core/config/src/defaults.ts +0 -2
- package/core/config/src/stacks.ts +9 -2
- package/core/database/package.json +1 -1
- package/core/database/src/migrations/index.ts +2 -1
- package/core/datetime/package.json +1 -1
- package/core/desktop/build.config.ts +2 -0
- package/core/desktop/package.json +2 -2
- package/core/development/build.config.ts +2 -0
- package/core/development/package.json +6 -6
- package/core/docs/build.config.ts +1 -0
- package/core/docs/node_modules/.bin/vitepress +4 -4
- package/core/docs/package.json +2 -2
- package/core/domains/build.config.ts +2 -0
- package/core/domains/package.json +1 -1
- package/core/email/package.json +12 -12
- package/core/email/src/drivers/mailjet.ts +1 -0
- package/core/email/src/tailwind.config.ts +1 -1
- package/core/error-handling/package.json +2 -2
- package/core/events/package.json +1 -1
- package/core/faker/build.config.ts +2 -0
- package/core/faker/package.json +1 -1
- package/core/git/build.config.ts +2 -0
- package/core/git/package.json +1 -1
- package/core/health/build.config.ts +2 -0
- package/core/health/package.json +1 -1
- package/core/lint/build.config.ts +2 -0
- package/core/lint/node_modules/.bin/eslint +4 -4
- package/core/lint/package.json +3 -3
- package/core/lint/src/index.ts +1 -1
- package/core/logging/package.json +5 -5
- package/core/modules/build.config.ts +2 -0
- package/core/modules/package.json +1 -1
- package/core/notifications/package.json +22 -22
- package/core/notifications/src/index.ts +5 -8
- package/core/objects/build.config.ts +2 -0
- package/core/objects/package.json +1 -1
- package/core/orm/package.json +1 -1
- package/core/pages/build.config.ts +2 -0
- package/core/pages/package.json +1 -1
- package/core/path/build.config.ts +1 -0
- package/core/path/package.json +1 -1
- package/core/payments/build.config.ts +2 -0
- package/core/payments/package.json +2 -2
- package/core/push/build.config.ts +2 -0
- package/core/push/package.json +3 -3
- package/core/query-builder/build.config.ts +2 -0
- package/core/query-builder/package.json +1 -1
- package/core/queue/build.config.ts +2 -0
- package/core/queue/package.json +1 -1
- package/core/realtime/build.config.ts +2 -0
- package/core/realtime/package.json +1 -1
- package/core/router/build.config.ts +2 -0
- package/core/router/package.json +2 -2
- package/core/router/src/index.ts +114 -11
- package/core/scheduler/build.config.ts +2 -0
- package/core/scheduler/package.json +1 -1
- package/core/search-engine/build.config.ts +1 -0
- package/core/search-engine/package.json +1 -1
- package/core/search-engine/src/index.ts +1 -22
- package/core/security/build.config.ts +2 -0
- package/core/security/package.json +1 -1
- package/core/server/build.config.ts +2 -0
- package/core/server/node_modules/.bin/nitro +4 -4
- package/core/server/node_modules/.bin/nitropack +4 -4
- package/core/server/node_modules/.bin/vite +4 -4
- package/core/server/package.json +3 -3
- package/core/signals/build.config.ts +2 -0
- package/core/signals/package.json +1 -1
- package/core/slug/build.config.ts +2 -0
- package/core/slug/package.json +1 -1
- package/core/sms/build.config.ts +2 -0
- package/core/sms/package.json +11 -11
- package/core/storage/build.config.ts +2 -0
- package/core/storage/package.json +1 -1
- package/core/storage/src/index.ts +11 -1
- package/core/strings/package.json +1 -1
- package/core/strings/src/index.ts +0 -1
- package/core/testing/build.config.ts +2 -0
- package/core/testing/node_modules/.bin/vitest +4 -4
- package/core/testing/package.json +4 -4
- package/core/testing/src/index.ts +1 -0
- package/core/tinker/package.json +1 -1
- package/core/types/build.config.ts +2 -0
- package/core/types/node_modules/.bin/vite +4 -4
- package/core/types/node_modules/.bin/vite-ssg +4 -4
- package/core/types/node_modules/.bin/vitepress +4 -4
- package/core/types/package.json +7 -7
- package/core/types/src/cli.ts +10 -9
- package/core/types/src/fs.ts +8 -0
- package/core/types/src/router.ts +22 -0
- package/core/types/src/stacks.ts +3 -3
- package/core/ui/build.config.ts +2 -0
- package/core/ui/package.json +3 -3
- package/core/ui/src/index.ts +1 -1
- package/core/utils/build.config.ts +2 -0
- package/core/utils/node_modules/.bin/rimraf +4 -4
- package/core/utils/package.json +3 -3
- package/core/utils/src/base.ts +6 -5
- package/core/utils/src/config.ts +2 -3
- package/core/utils/src/currency.ts +26 -0
- package/core/utils/src/delete.ts +3 -0
- package/core/utils/src/helpers.ts +2 -2
- package/core/utils/src/index.ts +7 -9
- package/core/utils/src/math.ts +30 -0
- package/core/utils/src/throttle.ts +3 -6
- package/core/utils/src/vendors.ts +221 -0
- package/core/utils/src/versions.ts +1 -0
- package/core/validation/build.config.ts +2 -0
- package/core/validation/package.json +1 -1
- package/core/validation/src/index.ts +2 -29
- package/core/{strings/src/validation.ts → validation/src/is.ts} +83 -8
- package/core/validation/src/validate.ts +29 -0
- package/docs/node_modules/.bin/rimraf +4 -4
- package/docs/node_modules/.bin/vitepress +4 -4
- package/docs/package.json +2 -2
- package/package.json +93 -46
- package/vitest.config.ts +25 -17
- package/core/utils/src/is.ts +0 -83
- package/tests/feature/example.spec.ts +0 -20
- package/tests/unit/example.test.ts +0 -7
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { fileURLToPath } from 'node:url'
|
|
2
2
|
import fs from 'fs-extra'
|
|
3
3
|
import { detectIndent, detectNewline } from '@stacksjs/utils'
|
|
4
|
-
import type { JsonFile, TextFile } from '@stacksjs/types'
|
|
4
|
+
import type { JsonFile, TextFile, PackageJson } from '@stacksjs/types'
|
|
5
5
|
import { componentsPath, dirname, functionsPath, join, projectPath } from '@stacksjs/path'
|
|
6
6
|
import { contains } from '@stacksjs/arrays'
|
|
7
7
|
|
|
@@ -21,6 +21,16 @@ export async function readJsonFile(name: string, cwd?: string): Promise<JsonFile
|
|
|
21
21
|
return { ...file, data, indent, newline }
|
|
22
22
|
}
|
|
23
23
|
|
|
24
|
+
/**
|
|
25
|
+
* Reads a package.json file and returns the parsed data.
|
|
26
|
+
*/
|
|
27
|
+
export async function readPackageJson(name: string, cwd?: string) {
|
|
28
|
+
const file = await readJsonFile(name, cwd)
|
|
29
|
+
const data = file.data as PackageJson
|
|
30
|
+
|
|
31
|
+
return data
|
|
32
|
+
}
|
|
33
|
+
|
|
24
34
|
/**
|
|
25
35
|
* Writes the given data to the specified JSON file.
|
|
26
36
|
*/
|
|
@@ -6,12 +6,12 @@ case `uname` in
|
|
|
6
6
|
esac
|
|
7
7
|
|
|
8
8
|
if [ -z "$NODE_PATH" ]; then
|
|
9
|
-
export NODE_PATH="/home/runner/work/stacks/stacks/node_modules/.pnpm/vitest@0.31.
|
|
9
|
+
export NODE_PATH="/home/runner/work/stacks/stacks/node_modules/.pnpm/vitest@0.31.1_@vitest+ui@0.31.1/node_modules/vitest/node_modules:/home/runner/work/stacks/stacks/node_modules/.pnpm/vitest@0.31.1_@vitest+ui@0.31.1/node_modules:/home/runner/work/stacks/stacks/node_modules/.pnpm/node_modules"
|
|
10
10
|
else
|
|
11
|
-
export NODE_PATH="/home/runner/work/stacks/stacks/node_modules/.pnpm/vitest@0.31.
|
|
11
|
+
export NODE_PATH="/home/runner/work/stacks/stacks/node_modules/.pnpm/vitest@0.31.1_@vitest+ui@0.31.1/node_modules/vitest/node_modules:/home/runner/work/stacks/stacks/node_modules/.pnpm/vitest@0.31.1_@vitest+ui@0.31.1/node_modules:/home/runner/work/stacks/stacks/node_modules/.pnpm/node_modules:$NODE_PATH"
|
|
12
12
|
fi
|
|
13
13
|
if [ -x "$basedir/node" ]; then
|
|
14
|
-
exec "$basedir/node" "$basedir/../../../../../node_modules/.pnpm/vitest@0.31.
|
|
14
|
+
exec "$basedir/node" "$basedir/../../../../../node_modules/.pnpm/vitest@0.31.1_@vitest+ui@0.31.1/node_modules/vitest/vitest.mjs" "$@"
|
|
15
15
|
else
|
|
16
|
-
exec node "$basedir/../../../../../node_modules/.pnpm/vitest@0.31.
|
|
16
|
+
exec node "$basedir/../../../../../node_modules/.pnpm/vitest@0.31.1_@vitest+ui@0.31.1/node_modules/vitest/vitest.mjs" "$@"
|
|
17
17
|
fi
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stacksjs/testing",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.52.
|
|
4
|
+
"version": "0.52.2",
|
|
5
5
|
"packageManager": "pnpm@8.5.1",
|
|
6
6
|
"description": "The Stacks way of testing.",
|
|
7
7
|
"author": "Chris Breuer",
|
|
@@ -51,9 +51,9 @@
|
|
|
51
51
|
},
|
|
52
52
|
"peerDependencies": {
|
|
53
53
|
"@playwright/test": "^1.33.0",
|
|
54
|
-
"@vitest/coverage-istanbul": "^0.31.
|
|
55
|
-
"@vitest/ui": "^0.31.
|
|
56
|
-
"vitest": "^0.31.
|
|
54
|
+
"@vitest/coverage-istanbul": "^0.31.1",
|
|
55
|
+
"@vitest/ui": "^0.31.1",
|
|
56
|
+
"vitest": "^0.31.1"
|
|
57
57
|
},
|
|
58
58
|
"devDependencies": {
|
|
59
59
|
"typescript": "^5.0.4",
|
package/core/tinker/package.json
CHANGED
|
@@ -6,12 +6,12 @@ case `uname` in
|
|
|
6
6
|
esac
|
|
7
7
|
|
|
8
8
|
if [ -z "$NODE_PATH" ]; then
|
|
9
|
-
export NODE_PATH="/home/runner/work/stacks/stacks/node_modules/.pnpm/vite@4.3.
|
|
9
|
+
export NODE_PATH="/home/runner/work/stacks/stacks/node_modules/.pnpm/vite@4.3.8_@types+node@18.16.13/node_modules/vite/bin/node_modules:/home/runner/work/stacks/stacks/node_modules/.pnpm/vite@4.3.8_@types+node@18.16.13/node_modules/vite/node_modules:/home/runner/work/stacks/stacks/node_modules/.pnpm/vite@4.3.8_@types+node@18.16.13/node_modules:/home/runner/work/stacks/stacks/node_modules/.pnpm/node_modules"
|
|
10
10
|
else
|
|
11
|
-
export NODE_PATH="/home/runner/work/stacks/stacks/node_modules/.pnpm/vite@4.3.
|
|
11
|
+
export NODE_PATH="/home/runner/work/stacks/stacks/node_modules/.pnpm/vite@4.3.8_@types+node@18.16.13/node_modules/vite/bin/node_modules:/home/runner/work/stacks/stacks/node_modules/.pnpm/vite@4.3.8_@types+node@18.16.13/node_modules/vite/node_modules:/home/runner/work/stacks/stacks/node_modules/.pnpm/vite@4.3.8_@types+node@18.16.13/node_modules:/home/runner/work/stacks/stacks/node_modules/.pnpm/node_modules:$NODE_PATH"
|
|
12
12
|
fi
|
|
13
13
|
if [ -x "$basedir/node" ]; then
|
|
14
|
-
exec "$basedir/node" "$basedir/../../../../../node_modules/.pnpm/vite@4.3.
|
|
14
|
+
exec "$basedir/node" "$basedir/../../../../../node_modules/.pnpm/vite@4.3.8_@types+node@18.16.13/node_modules/vite/bin/vite.js" "$@"
|
|
15
15
|
else
|
|
16
|
-
exec node "$basedir/../../../../../node_modules/.pnpm/vite@4.3.
|
|
16
|
+
exec node "$basedir/../../../../../node_modules/.pnpm/vite@4.3.8_@types+node@18.16.13/node_modules/vite/bin/vite.js" "$@"
|
|
17
17
|
fi
|
|
@@ -6,12 +6,12 @@ case `uname` in
|
|
|
6
6
|
esac
|
|
7
7
|
|
|
8
8
|
if [ -z "$NODE_PATH" ]; then
|
|
9
|
-
export NODE_PATH="/home/runner/work/stacks/stacks/node_modules/.pnpm/vite-ssg@0.22.2_@vueuse+head@1.1.26_vite@4.3.
|
|
9
|
+
export NODE_PATH="/home/runner/work/stacks/stacks/node_modules/.pnpm/vite-ssg@0.22.2_@vueuse+head@1.1.26_vite@4.3.8_vue-router@4.2.1_vue@3.3.4/node_modules/vite-ssg/bin/node_modules:/home/runner/work/stacks/stacks/node_modules/.pnpm/vite-ssg@0.22.2_@vueuse+head@1.1.26_vite@4.3.8_vue-router@4.2.1_vue@3.3.4/node_modules/vite-ssg/node_modules:/home/runner/work/stacks/stacks/node_modules/.pnpm/vite-ssg@0.22.2_@vueuse+head@1.1.26_vite@4.3.8_vue-router@4.2.1_vue@3.3.4/node_modules:/home/runner/work/stacks/stacks/node_modules/.pnpm/node_modules"
|
|
10
10
|
else
|
|
11
|
-
export NODE_PATH="/home/runner/work/stacks/stacks/node_modules/.pnpm/vite-ssg@0.22.2_@vueuse+head@1.1.26_vite@4.3.
|
|
11
|
+
export NODE_PATH="/home/runner/work/stacks/stacks/node_modules/.pnpm/vite-ssg@0.22.2_@vueuse+head@1.1.26_vite@4.3.8_vue-router@4.2.1_vue@3.3.4/node_modules/vite-ssg/bin/node_modules:/home/runner/work/stacks/stacks/node_modules/.pnpm/vite-ssg@0.22.2_@vueuse+head@1.1.26_vite@4.3.8_vue-router@4.2.1_vue@3.3.4/node_modules/vite-ssg/node_modules:/home/runner/work/stacks/stacks/node_modules/.pnpm/vite-ssg@0.22.2_@vueuse+head@1.1.26_vite@4.3.8_vue-router@4.2.1_vue@3.3.4/node_modules:/home/runner/work/stacks/stacks/node_modules/.pnpm/node_modules:$NODE_PATH"
|
|
12
12
|
fi
|
|
13
13
|
if [ -x "$basedir/node" ]; then
|
|
14
|
-
exec "$basedir/node" "$basedir/../../../../../node_modules/.pnpm/vite-ssg@0.22.2_@vueuse+head@1.1.26_vite@4.3.
|
|
14
|
+
exec "$basedir/node" "$basedir/../../../../../node_modules/.pnpm/vite-ssg@0.22.2_@vueuse+head@1.1.26_vite@4.3.8_vue-router@4.2.1_vue@3.3.4/node_modules/vite-ssg/bin/vite-ssg.js" "$@"
|
|
15
15
|
else
|
|
16
|
-
exec node "$basedir/../../../../../node_modules/.pnpm/vite-ssg@0.22.2_@vueuse+head@1.1.26_vite@4.3.
|
|
16
|
+
exec node "$basedir/../../../../../node_modules/.pnpm/vite-ssg@0.22.2_@vueuse+head@1.1.26_vite@4.3.8_vue-router@4.2.1_vue@3.3.4/node_modules/vite-ssg/bin/vite-ssg.js" "$@"
|
|
17
17
|
fi
|
|
@@ -6,12 +6,12 @@ case `uname` in
|
|
|
6
6
|
esac
|
|
7
7
|
|
|
8
8
|
if [ -z "$NODE_PATH" ]; then
|
|
9
|
-
export NODE_PATH="/home/runner/work/stacks/stacks/node_modules/.pnpm/vitepress@1.0.0-alpha.
|
|
9
|
+
export NODE_PATH="/home/runner/work/stacks/stacks/node_modules/.pnpm/vitepress@1.0.0-alpha.76_@algolia+client-search@4.17.0_@types+node@18.16.13/node_modules/vitepress/bin/node_modules:/home/runner/work/stacks/stacks/node_modules/.pnpm/vitepress@1.0.0-alpha.76_@algolia+client-search@4.17.0_@types+node@18.16.13/node_modules/vitepress/node_modules:/home/runner/work/stacks/stacks/node_modules/.pnpm/vitepress@1.0.0-alpha.76_@algolia+client-search@4.17.0_@types+node@18.16.13/node_modules:/home/runner/work/stacks/stacks/node_modules/.pnpm/node_modules"
|
|
10
10
|
else
|
|
11
|
-
export NODE_PATH="/home/runner/work/stacks/stacks/node_modules/.pnpm/vitepress@1.0.0-alpha.
|
|
11
|
+
export NODE_PATH="/home/runner/work/stacks/stacks/node_modules/.pnpm/vitepress@1.0.0-alpha.76_@algolia+client-search@4.17.0_@types+node@18.16.13/node_modules/vitepress/bin/node_modules:/home/runner/work/stacks/stacks/node_modules/.pnpm/vitepress@1.0.0-alpha.76_@algolia+client-search@4.17.0_@types+node@18.16.13/node_modules/vitepress/node_modules:/home/runner/work/stacks/stacks/node_modules/.pnpm/vitepress@1.0.0-alpha.76_@algolia+client-search@4.17.0_@types+node@18.16.13/node_modules:/home/runner/work/stacks/stacks/node_modules/.pnpm/node_modules:$NODE_PATH"
|
|
12
12
|
fi
|
|
13
13
|
if [ -x "$basedir/node" ]; then
|
|
14
|
-
exec "$basedir/node" "$basedir/../../../../../node_modules/.pnpm/vitepress@1.0.0-alpha.
|
|
14
|
+
exec "$basedir/node" "$basedir/../../../../../node_modules/.pnpm/vitepress@1.0.0-alpha.76_@algolia+client-search@4.17.0_@types+node@18.16.13/node_modules/vitepress/bin/vitepress.js" "$@"
|
|
15
15
|
else
|
|
16
|
-
exec node "$basedir/../../../../../node_modules/.pnpm/vitepress@1.0.0-alpha.
|
|
16
|
+
exec node "$basedir/../../../../../node_modules/.pnpm/vitepress@1.0.0-alpha.76_@algolia+client-search@4.17.0_@types+node@18.16.13/node_modules/vitepress/bin/vitepress.js" "$@"
|
|
17
17
|
fi
|
package/core/types/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stacksjs/types",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.52.
|
|
4
|
+
"version": "0.52.2",
|
|
5
5
|
"packageManager": "pnpm@8.5.1",
|
|
6
6
|
"description": "The Stacks framework types.",
|
|
7
7
|
"author": "Chris Breuer",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"@mdit-vue/plugin-component": "^0.12.0",
|
|
49
49
|
"@mdit-vue/plugin-frontmatter": "^0.12.0",
|
|
50
50
|
"@mdit-vue/types": "^0.12.0",
|
|
51
|
-
"@novu/stateless": "^0.
|
|
51
|
+
"@novu/stateless": "^0.15.0",
|
|
52
52
|
"@rollup/pluginutils": "^5.0.2",
|
|
53
53
|
"@stacksjs/development": "workspace:*",
|
|
54
54
|
"@types/bcryptjs": "^2.4.2",
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
"@types/fs-extra": "^11.0.1",
|
|
58
58
|
"@types/markdown-it-link-attributes": "^3.0.1",
|
|
59
59
|
"@types/minimatch": "^5.1.2",
|
|
60
|
-
"@types/node": "^18.16.
|
|
60
|
+
"@types/node": "^18.16.13",
|
|
61
61
|
"@types/nprogress": "^0.2.0",
|
|
62
62
|
"@types/pluralize": "^0.0.29",
|
|
63
63
|
"cac": "^6.7.14",
|
|
@@ -69,13 +69,13 @@
|
|
|
69
69
|
"unocss": "^0.51.13",
|
|
70
70
|
"unplugin-auto-import": "^0.16.0",
|
|
71
71
|
"unplugin-vue-components": "^0.24.1",
|
|
72
|
-
"vite": "^4.3.
|
|
72
|
+
"vite": "^4.3.8",
|
|
73
73
|
"vite-plugin-inspect": "^0.7.26",
|
|
74
|
-
"vite-plugin-pwa": "^0.
|
|
74
|
+
"vite-plugin-pwa": "^0.15.0",
|
|
75
75
|
"vite-plugin-vue-layouts": "^0.8.0",
|
|
76
76
|
"vite-ssg": "^0.22.2",
|
|
77
|
-
"vitepress": "1.0.0-alpha.
|
|
78
|
-
"vue": "^3.3.
|
|
77
|
+
"vitepress": "1.0.0-alpha.76",
|
|
78
|
+
"vue": "^3.3.4",
|
|
79
79
|
"zod": "^3.21.4"
|
|
80
80
|
}
|
|
81
81
|
}
|
package/core/types/src/cli.ts
CHANGED
|
@@ -10,6 +10,7 @@ export type CommandReturnValue = ExecaReturnValue<string>
|
|
|
10
10
|
export type CommandResult = Ok<ExecaReturnValue<string>, Error | void> | Err<ExecaReturnValue<string>, Error | string | void>
|
|
11
11
|
|
|
12
12
|
export interface OutroOptions {
|
|
13
|
+
type?: 'success' | 'error' | 'warning' | 'info'
|
|
13
14
|
startTime?: number
|
|
14
15
|
useSeconds?: boolean
|
|
15
16
|
isError?: boolean
|
|
@@ -131,8 +132,8 @@ export type CreateBooleanOption = 'ui' | 'components' | 'web-components' | 'vue'
|
|
|
131
132
|
export type CreateOptions = {
|
|
132
133
|
[key in CreateBooleanOption]: boolean
|
|
133
134
|
} & {
|
|
134
|
-
|
|
135
|
-
|
|
135
|
+
[key in CreateStringOption]: string
|
|
136
|
+
} & CliOptions
|
|
136
137
|
|
|
137
138
|
export type DevOption = 'components' | 'docs' | 'pages' | 'functions' | 'desktop' | 'all'
|
|
138
139
|
export type DevOptions = {
|
|
@@ -154,8 +155,8 @@ export type MakeBooleanOption = 'component' | 'page' | 'function' | 'language' |
|
|
|
154
155
|
export type MakeOptions = {
|
|
155
156
|
[key in MakeBooleanOption]: boolean
|
|
156
157
|
} & {
|
|
157
|
-
|
|
158
|
-
|
|
158
|
+
[key in MakeStringOption]: string
|
|
159
|
+
} & CliOptions
|
|
159
160
|
|
|
160
161
|
export type UpgradeBoolean = 'framework' | 'dependencies' | 'packageManager' | 'node' | 'all' | 'force'
|
|
161
162
|
export type UpgradeString = 'version'
|
|
@@ -163,8 +164,8 @@ export type UpgradeString = 'version'
|
|
|
163
164
|
export type UpgradeOptions = {
|
|
164
165
|
[key in UpgradeBoolean]: boolean;
|
|
165
166
|
} & {
|
|
166
|
-
|
|
167
|
-
|
|
167
|
+
[key in UpgradeString]: string;
|
|
168
|
+
} & CliOptions
|
|
168
169
|
|
|
169
170
|
export type ExamplesString = 'version'
|
|
170
171
|
export type ExamplesBoolean = 'components' | 'vue' | 'webComponents' | 'elements' | 'all' | 'force'
|
|
@@ -172,8 +173,8 @@ export type ExamplesOption = ExamplesString & ExamplesBoolean | void
|
|
|
172
173
|
export type ExamplesOptions = {
|
|
173
174
|
[key in ExamplesString]: string;
|
|
174
175
|
} & {
|
|
175
|
-
|
|
176
|
-
|
|
176
|
+
[key in ExamplesBoolean]: boolean;
|
|
177
|
+
} & CliOptions
|
|
177
178
|
export type TestOptions = CliOptions & {
|
|
178
179
|
showReport?: boolean
|
|
179
180
|
}
|
|
@@ -201,7 +202,7 @@ export const enum NpmScript {
|
|
|
201
202
|
BuildFunctions = 'build:functions',
|
|
202
203
|
BuildDocs = 'build:docs',
|
|
203
204
|
BuildStacks = 'build:stacks',
|
|
204
|
-
Clean = 'rimraf
|
|
205
|
+
Clean = 'rimraf pnpm-lock.yaml node_modules/ .stacks/**/node_modules .stacks/**/dist',
|
|
205
206
|
Dev = 'dev',
|
|
206
207
|
DevComponents = 'vite --config ./core/build/src/vue-components.ts',
|
|
207
208
|
DevDocs = 'npx vitepress dev ./docs/src',
|
package/core/types/src/fs.ts
CHANGED
package/core/types/src/router.ts
CHANGED
|
@@ -28,3 +28,25 @@ export interface NitroEventHandler {
|
|
|
28
28
|
*/
|
|
29
29
|
method?: string
|
|
30
30
|
}
|
|
31
|
+
|
|
32
|
+
// need to refactor before, after, view to be a part of some other type
|
|
33
|
+
export type HttpMethod = 'get' | 'post' | 'put' | 'patch' | 'delete' | 'before' | 'after' | 'view'
|
|
34
|
+
|
|
35
|
+
export type RouteCallback = (params: Record<string, any>) => any
|
|
36
|
+
|
|
37
|
+
export interface Route {
|
|
38
|
+
method: HttpMethod
|
|
39
|
+
pattern: RegExp
|
|
40
|
+
callback: RouteCallback
|
|
41
|
+
paramNames: string[]
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export interface Middleware {
|
|
45
|
+
before?: RouteCallback
|
|
46
|
+
after?: RouteCallback
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export interface RouteGroupOptions {
|
|
50
|
+
prefix?: string
|
|
51
|
+
middleware?: Middleware[]
|
|
52
|
+
}
|
package/core/types/src/stacks.ts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type {
|
|
2
2
|
AppOptions,
|
|
3
3
|
CacheOptions,
|
|
4
4
|
CdnOptions,
|
|
5
|
-
UserCliOptions,
|
|
6
5
|
DatabaseOptions,
|
|
7
6
|
DebugOptions,
|
|
8
7
|
DnsOptions,
|
|
@@ -18,7 +17,8 @@ import {
|
|
|
18
17
|
ServicesOptions,
|
|
19
18
|
StorageOptions,
|
|
20
19
|
UiOptions,
|
|
21
|
-
|
|
20
|
+
UserCliOptions,
|
|
21
|
+
} from './'
|
|
22
22
|
|
|
23
23
|
/**
|
|
24
24
|
* **Stacks Options**
|
package/core/ui/build.config.ts
CHANGED
package/core/ui/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stacksjs/ui",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.52.
|
|
4
|
+
"version": "0.52.2",
|
|
5
5
|
"packageManager": "pnpm@8.5.1",
|
|
6
6
|
"description": "The Stacks atomic UI engine, powered by UnoCSS.",
|
|
7
7
|
"author": "Chris Breuer",
|
|
@@ -58,9 +58,9 @@
|
|
|
58
58
|
"@stacksjs/build": "workspace:*",
|
|
59
59
|
"@stacksjs/config": "workspace:*",
|
|
60
60
|
"@unocss/transformer-compile-class": "^0.51.13",
|
|
61
|
-
"pinia": "^2.
|
|
61
|
+
"pinia": "^2.1.3",
|
|
62
62
|
"unocss": "^0.51.13",
|
|
63
|
-
"vue": "^3.3.
|
|
63
|
+
"vue": "^3.3.4",
|
|
64
64
|
"vue-tsc": "^1.6.5"
|
|
65
65
|
},
|
|
66
66
|
"devDependencies": {
|
package/core/ui/src/index.ts
CHANGED
|
@@ -6,12 +6,12 @@ case `uname` in
|
|
|
6
6
|
esac
|
|
7
7
|
|
|
8
8
|
if [ -z "$NODE_PATH" ]; then
|
|
9
|
-
export NODE_PATH="/home/runner/work/stacks/stacks/node_modules/.pnpm/rimraf@5.0.
|
|
9
|
+
export NODE_PATH="/home/runner/work/stacks/stacks/node_modules/.pnpm/rimraf@5.0.1/node_modules/rimraf/dist/cjs/src/node_modules:/home/runner/work/stacks/stacks/node_modules/.pnpm/rimraf@5.0.1/node_modules/rimraf/dist/cjs/node_modules:/home/runner/work/stacks/stacks/node_modules/.pnpm/rimraf@5.0.1/node_modules/rimraf/dist/node_modules:/home/runner/work/stacks/stacks/node_modules/.pnpm/rimraf@5.0.1/node_modules/rimraf/node_modules:/home/runner/work/stacks/stacks/node_modules/.pnpm/rimraf@5.0.1/node_modules:/home/runner/work/stacks/stacks/node_modules/.pnpm/node_modules"
|
|
10
10
|
else
|
|
11
|
-
export NODE_PATH="/home/runner/work/stacks/stacks/node_modules/.pnpm/rimraf@5.0.
|
|
11
|
+
export NODE_PATH="/home/runner/work/stacks/stacks/node_modules/.pnpm/rimraf@5.0.1/node_modules/rimraf/dist/cjs/src/node_modules:/home/runner/work/stacks/stacks/node_modules/.pnpm/rimraf@5.0.1/node_modules/rimraf/dist/cjs/node_modules:/home/runner/work/stacks/stacks/node_modules/.pnpm/rimraf@5.0.1/node_modules/rimraf/dist/node_modules:/home/runner/work/stacks/stacks/node_modules/.pnpm/rimraf@5.0.1/node_modules/rimraf/node_modules:/home/runner/work/stacks/stacks/node_modules/.pnpm/rimraf@5.0.1/node_modules:/home/runner/work/stacks/stacks/node_modules/.pnpm/node_modules:$NODE_PATH"
|
|
12
12
|
fi
|
|
13
13
|
if [ -x "$basedir/node" ]; then
|
|
14
|
-
exec "$basedir/node" "$basedir/../../../../../node_modules/.pnpm/rimraf@5.0.
|
|
14
|
+
exec "$basedir/node" "$basedir/../../../../../node_modules/.pnpm/rimraf@5.0.1/node_modules/rimraf/dist/cjs/src/bin.js" "$@"
|
|
15
15
|
else
|
|
16
|
-
exec node "$basedir/../../../../../node_modules/.pnpm/rimraf@5.0.
|
|
16
|
+
exec node "$basedir/../../../../../node_modules/.pnpm/rimraf@5.0.1/node_modules/rimraf/dist/cjs/src/bin.js" "$@"
|
|
17
17
|
fi
|
package/core/utils/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stacksjs/utils",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.52.
|
|
4
|
+
"version": "0.52.2",
|
|
5
5
|
"packageManager": "pnpm@8.5.1",
|
|
6
6
|
"description": "The Stacks helper functions.",
|
|
7
7
|
"author": "Chris Breuer",
|
|
@@ -68,7 +68,7 @@
|
|
|
68
68
|
"fast-glob": "^3.2.12",
|
|
69
69
|
"kolorist": "1.8.0",
|
|
70
70
|
"p-limit": "^4.0.0",
|
|
71
|
-
"rimraf": "^5.0.
|
|
71
|
+
"rimraf": "^5.0.1",
|
|
72
72
|
"semver": "^7.5.1",
|
|
73
73
|
"yaml": "^2.2.2"
|
|
74
74
|
},
|
|
@@ -92,7 +92,7 @@
|
|
|
92
92
|
"kolorist": "1.8.0",
|
|
93
93
|
"p-limit": "^4.0.0",
|
|
94
94
|
"perfect-debounce": "^1.0.0",
|
|
95
|
-
"rimraf": "^5.0.
|
|
95
|
+
"rimraf": "^5.0.1",
|
|
96
96
|
"semver": "^7.5.1",
|
|
97
97
|
"yaml": "^2.2.2"
|
|
98
98
|
},
|
package/core/utils/src/base.ts
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
// imported through vitest already
|
|
2
|
+
// export function assert(condition: boolean, message: string): asserts condition {
|
|
3
|
+
// if (!condition)
|
|
4
|
+
// throw new Error(message)
|
|
5
|
+
// }
|
|
5
6
|
|
|
6
7
|
export function toString(v: any) {
|
|
7
8
|
return Object.prototype.toString.call(v)
|
|
8
9
|
}
|
|
9
10
|
|
|
10
|
-
export function noop() {}
|
|
11
|
+
// export function noop() {}
|
|
11
12
|
|
|
12
13
|
export function loop(times: number, callback: any) {
|
|
13
14
|
[...Array(times)].forEach((item, i) => callback(i))
|
package/core/utils/src/config.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { AppOptions, CacheOptions, CdnOptions, CronJobOptions, DatabaseOptions, DebugOptions, DnsOptions, EmailOptions, Events, GitOptions, HashingOptions, LibraryOptions, Model, NotificationOptions, PagesOption, PaymentOptions, SearchEngineOptions, ServicesOptions, StorageOptions, UiOptions, UserCliOptions } from '@stacksjs/types'
|
|
2
2
|
|
|
3
|
-
export function env(key: any,
|
|
4
|
-
// console.log('isClient', isClient)
|
|
3
|
+
export function env(key: any, _fallback?: any) {
|
|
5
4
|
// if (key && import.meta?.env)
|
|
6
5
|
// return import.meta.env[key]
|
|
7
6
|
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export {
|
|
2
|
+
add,
|
|
3
|
+
allocate,
|
|
4
|
+
compare,
|
|
5
|
+
convert,
|
|
6
|
+
equal,
|
|
7
|
+
greaterThan,
|
|
8
|
+
greaterThanOrEqual,
|
|
9
|
+
hasSubUnits,
|
|
10
|
+
isZero,
|
|
11
|
+
lessThan,
|
|
12
|
+
lessThanOrEqual,
|
|
13
|
+
maximum,
|
|
14
|
+
minimum,
|
|
15
|
+
multiply,
|
|
16
|
+
normalizeScale,
|
|
17
|
+
dinero,
|
|
18
|
+
dinero as money,
|
|
19
|
+
subtract,
|
|
20
|
+
toSnapshot,
|
|
21
|
+
toUnits,
|
|
22
|
+
toDecimal,
|
|
23
|
+
trimScale,
|
|
24
|
+
haveSameCurrency,
|
|
25
|
+
haveSameAmount,
|
|
26
|
+
} from 'dinero.js'
|
|
@@ -4,7 +4,7 @@ import { frameworkPath, projectPath } from '@stacksjs/path'
|
|
|
4
4
|
import { parse } from 'yaml'
|
|
5
5
|
import { log, runCommand, spawn } from '@stacksjs/cli'
|
|
6
6
|
import storage from '@stacksjs/storage'
|
|
7
|
-
import {
|
|
7
|
+
import { app, ui } from '@stacksjs/config'
|
|
8
8
|
|
|
9
9
|
export async function isProjectCreated() {
|
|
10
10
|
if (storage.isFile('.env'))
|
|
@@ -140,6 +140,6 @@ export function determineDebugLevel(options?: CliOptions) {
|
|
|
140
140
|
}
|
|
141
141
|
|
|
142
142
|
// export { SemVer } from 'semver'
|
|
143
|
-
|
|
143
|
+
|
|
144
144
|
export { detectIndent }
|
|
145
145
|
export { detectNewline } from 'detect-newline'
|
package/core/utils/src/index.ts
CHANGED
|
@@ -1,17 +1,15 @@
|
|
|
1
|
-
export
|
|
1
|
+
export * from './base'
|
|
2
2
|
export * from './config'
|
|
3
|
+
export * from './currency'
|
|
3
4
|
export * from './debounce'
|
|
5
|
+
export * from './delete'
|
|
4
6
|
export * from './equal'
|
|
5
7
|
export * from './function'
|
|
6
8
|
export * from './guards'
|
|
7
9
|
export * from './helpers'
|
|
8
|
-
export
|
|
10
|
+
export * from './math'
|
|
9
11
|
export * from './p'
|
|
10
|
-
export
|
|
11
|
-
export { createSingletonPromise, createPromiseLock, createControlledPromise, sleep } from './promise'
|
|
12
|
-
export * as semver from 'semver'
|
|
12
|
+
export * from './promise'
|
|
13
13
|
export * from './throttle'
|
|
14
|
-
|
|
15
|
-
export * from '
|
|
16
|
-
export * from '@vueuse/math'
|
|
17
|
-
export * from '@vueuse/shared'
|
|
14
|
+
export * from './vendors'
|
|
15
|
+
export * from './versions'
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export const clamp = (n: number, min: number, max: number) => Math.min(max, Math.max(min, n))
|
|
2
|
+
|
|
3
|
+
export function rand(min: number, max: number) {
|
|
4
|
+
min = Math.ceil(min)
|
|
5
|
+
max = Math.floor(max)
|
|
6
|
+
return Math.floor(Math.random() * (max - min + 1)) + min
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export {
|
|
10
|
+
and,
|
|
11
|
+
createGenericProjection,
|
|
12
|
+
createProjection,
|
|
13
|
+
logicNot,
|
|
14
|
+
logicOr,
|
|
15
|
+
not,
|
|
16
|
+
or,
|
|
17
|
+
useAbs,
|
|
18
|
+
useAverage,
|
|
19
|
+
useCeil,
|
|
20
|
+
useClamp,
|
|
21
|
+
useFloor,
|
|
22
|
+
useMath,
|
|
23
|
+
useMax,
|
|
24
|
+
useMin,
|
|
25
|
+
usePrecision,
|
|
26
|
+
useProjection,
|
|
27
|
+
useRound,
|
|
28
|
+
useSum,
|
|
29
|
+
useTrunc,
|
|
30
|
+
} from '@vueuse/math'
|
|
@@ -21,12 +21,9 @@ export function throttle(fn: Function, wait = 300) {
|
|
|
21
21
|
let lastFn: ReturnType<typeof setTimeout>
|
|
22
22
|
let lastTime: number
|
|
23
23
|
|
|
24
|
-
return function (this: any) {
|
|
25
|
-
const context = this
|
|
26
|
-
const args = arguments
|
|
27
|
-
|
|
24
|
+
return function (this: unknown, ...args: any[]) {
|
|
28
25
|
if (!inThrottle) {
|
|
29
|
-
fn.apply(
|
|
26
|
+
fn.apply(this, args)
|
|
30
27
|
|
|
31
28
|
lastTime = Date.now()
|
|
32
29
|
inThrottle = true
|
|
@@ -36,7 +33,7 @@ export function throttle(fn: Function, wait = 300) {
|
|
|
36
33
|
|
|
37
34
|
lastFn = setTimeout(() => {
|
|
38
35
|
if (Date.now() - lastTime >= wait) {
|
|
39
|
-
fn.apply(
|
|
36
|
+
fn.apply(this, args) // Use 'this' directly
|
|
40
37
|
lastTime = Date.now()
|
|
41
38
|
}
|
|
42
39
|
}, Math.max(wait - (Date.now() - lastTime), 0))
|