stacks 0.58.28 → 0.58.30
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/core/README.md +1 -1
- package/core/actions/dist/src/deploy/index.js +1 -1
- package/core/actions/dist/src/dev/components.js +1 -1
- package/core/actions/dist/src/dev/index.js +10 -0
- package/core/actions/dist/src/generate/lib-entries.js +3 -3
- package/core/actions/dist/src/helpers/lib-entries.js +3 -3
- package/core/actions/dist/src/index.js +10 -0
- package/core/actions/dist/src/lint/fix.js +1 -1
- package/core/actions/dist/src/release.js +8 -0
- package/core/actions/dist/src/upgrade.js +1 -1
- package/core/actions/package.json +1 -1
- package/core/actions/src/build/docs.ts +7 -0
- package/core/actions/src/deploy/index.ts +1 -1
- package/core/actions/src/dev/api.ts +2 -2
- package/core/actions/src/dev/components.ts +1 -1
- package/core/actions/src/dev/dashboard.ts +7 -0
- package/core/actions/src/dev/desktop.ts +3 -3
- package/core/actions/src/dev/index.ts +10 -0
- package/core/actions/src/dev/system-tray.ts +6 -0
- package/core/actions/src/helpers/lib-entries.ts +3 -3
- package/core/actions/src/lint/fix.ts +1 -1
- package/core/ai/package.json +3 -3
- package/core/alias/package.json +1 -1
- package/core/analytics/package.json +1 -1
- package/core/api/package.json +1 -1
- package/core/arrays/package.json +1 -1
- package/core/auth/package.json +1 -1
- package/core/buddy/README.md +2 -2
- package/core/buddy/dist/{chunk-b75e6db0012faa55.js → chunk-0455e53fab4244b1.js} +1 -4
- package/core/buddy/dist/{chunk-fd47b42fb923a4be.js → chunk-61e8f138963fc709.js} +173 -137
- package/core/buddy/dist/cli.js +2 -2
- package/core/buddy/dist/index.js +2 -2
- package/core/buddy/package.json +1 -1
- package/core/buddy/src/commands/add.ts +4 -0
- package/core/buddy/src/commands/build.ts +12 -1
- package/core/buddy/src/commands/changelog.ts +2 -0
- package/core/buddy/src/commands/clean.ts +2 -0
- package/core/buddy/src/commands/cloud.ts +6 -0
- package/core/buddy/src/commands/commit.ts +2 -0
- package/core/buddy/src/commands/configure.ts +3 -0
- package/core/buddy/src/commands/create.ts +8 -8
- package/core/buddy/src/commands/deploy.ts +24 -23
- package/core/buddy/src/commands/dev.ts +50 -10
- package/core/buddy/src/commands/dns.ts +2 -0
- package/core/buddy/src/commands/domains.ts +2 -0
- package/core/buddy/src/commands/example.ts +4 -0
- package/core/buddy/src/commands/fresh.ts +2 -0
- package/core/buddy/src/commands/generate.ts +12 -3
- package/core/buddy/src/commands/http.ts +2 -0
- package/core/buddy/src/commands/install.ts +2 -0
- package/core/buddy/src/commands/key.ts +4 -2
- package/core/buddy/src/commands/lint.ts +3 -0
- package/core/buddy/src/commands/make.ts +11 -1
- package/core/buddy/src/commands/migrate.ts +3 -0
- package/core/buddy/src/commands/prepublish.ts +2 -0
- package/core/buddy/src/commands/release.ts +2 -0
- package/core/buddy/src/commands/seed.ts +2 -0
- package/core/buddy/src/commands/setup.ts +33 -34
- package/core/buddy/src/commands/test.ts +2 -0
- package/core/buddy/src/commands/tinker.ts +2 -0
- package/core/buddy/src/commands/types.ts +3 -0
- package/core/buddy/src/commands/upgrade.ts +6 -0
- package/core/build/package.json +1 -1
- package/core/bun-create/bud/package.json +3 -2
- package/core/bun-create/buddy/package.json +2 -2
- package/core/bun-create/stack/package.json +2 -2
- package/core/bun-create/stacks/package.json +2 -2
- package/core/bun-create/stx/package.json +2 -2
- package/core/bun-plugin-yaml/dist/index.js +1 -19
- package/core/bun-plugin-yaml/package.json +1 -1
- package/core/bun-plugin-yaml/src/index.ts +1 -1
- package/core/cache/package.json +2 -2
- package/core/chat/package.json +1 -1
- package/core/cli/dist/index.js +24 -23
- package/core/cli/package.json +1 -1
- package/core/cli/src/helpers.ts +21 -31
- package/core/cli/src/run.ts +9 -7
- package/core/cloud/buddy +2 -0
- package/core/cloud/package.json +33 -33
- package/core/cloud/src/cloud/ai.ts +45 -36
- package/core/cloud/src/cloud/aws-sdk-layer/nodejs/package-lock.json +10 -10
- package/core/cloud/src/cloud/aws-sdk-layer/nodejs/package.json +2 -2
- package/core/cloud/src/cloud/cdn.ts +44 -5
- package/core/cloud/src/cloud/cli.ts +45 -0
- package/core/cloud/src/cloud/compute.ts +1 -1
- package/core/cloud/src/cloud/index.ts +6 -1
- package/core/cloud/src/cloud/lambda/cli-setup/index.js +67 -0
- package/core/cloud/src/index.ts +1 -0
- package/core/cloud/src/runtime/example/lambda.ts +1 -1
- package/core/cloud/src/runtime/runtime.ts +1 -0
- package/core/cloud/src/runtime/server.ts +1 -1
- package/core/collections/package.json +1 -1
- package/core/config/dist/index.js +130 -122
- package/core/config/package.json +1 -1
- package/core/config/src/overrides.ts +0 -2
- package/core/database/package.json +2 -2
- package/core/database/src/kysely-bun-worker/driver.ts +1 -0
- package/core/database/src/kysely-bun-worker/worker.ts +1 -1
- package/core/datetime/package.json +1 -1
- package/core/desktop/dist/index.js +6 -0
- package/core/desktop/package.json +5 -5
- package/core/desktop/src/index.ts +2 -0
- package/core/desktop/src/system-tray.ts +1 -0
- package/core/development/package.json +1 -1
- package/core/dns/package.json +7 -7
- package/core/docs/build.ts +1 -1
- package/core/docs/dist/index.js +29878 -9995
- package/core/docs/package.json +6 -5
- package/core/docs/src/index.ts +7 -1
- package/core/docs/src/meta.ts +32 -0
- package/core/docs/src/scripts/pwa.ts +116 -0
- package/core/email/email-forwarder.cjs +1 -0
- package/core/email/package.json +3 -3
- package/core/email/src/server/converter.ts +1 -0
- package/core/email/src/server/inbound.ts +1 -0
- package/core/email/src/server/outbound.ts +6 -4
- package/core/enums/dist/index.js +4 -2
- package/core/enums/package.json +1 -1
- package/core/enums/src/index.ts +4 -2
- package/core/env/package.json +1 -1
- package/core/error-handling/package.json +1 -1
- package/core/eslint-config/package.json +18 -18
- package/core/eslint-config/src/configs/comments.ts +1 -1
- package/core/eslint-config/src/configs/imports.ts +9 -0
- package/core/eslint-config/src/configs/svelte.ts +1 -0
- package/core/eslint-config/src/configs/unicorn.ts +1 -1
- package/core/eslint-config/src/configs/vue.ts +0 -1
- package/core/eslint-config/src/factory.ts +2 -8
- package/core/events/package.json +1 -1
- package/core/faker/package.json +2 -2
- package/core/git/dist/index.js +40 -0
- package/core/git/package.json +3 -3
- package/core/git/src/index.ts +62 -0
- package/core/health/package.json +1 -1
- package/core/http/package.json +1 -1
- package/core/lint/package.json +1 -1
- package/core/logging/dist/index.js +0 -6
- package/core/logging/package.json +1 -1
- package/core/music/package.json +3 -3
- package/core/notifications/package.json +2 -2
- package/core/objects/package.json +1 -1
- package/core/orm/package.json +1 -1
- package/core/path/dist/index.js +6 -3
- package/core/path/package.json +1 -1
- package/core/path/src/index.ts +7 -3
- package/core/payments/dist/index.js +2 -5
- package/core/payments/package.json +3 -3
- package/core/push/package.json +1 -1
- package/core/query-builder/package.json +1 -1
- package/core/queue/package.json +1 -1
- package/core/raycast/package.json +5 -0
- package/core/raycast/src/index.ts +0 -0
- package/core/realtime/package.json +1 -1
- package/core/repl/package.json +1 -1
- package/core/router/dist/index.js +16 -496
- package/core/router/package.json +1 -1
- package/core/router/src/middleware.ts +16 -14
- package/core/scheduler/package.json +1 -1
- package/core/search-engine/package.json +2 -2
- package/core/security/dist/index.js +3 -6
- package/core/security/package.json +2 -2
- package/core/server/dist/index.js +6 -2
- package/core/server/package.json +2 -2
- package/core/server/src/config.ts +14 -9
- package/core/signals/package.json +1 -1
- package/core/slug/package.json +1 -1
- package/core/sms/package.json +1 -1
- package/core/storage/dist/index.js +28 -10
- package/core/storage/package.json +1 -1
- package/core/storage/src/files.ts +10 -2
- package/core/storage/src/zip.ts +1 -1
- package/core/strings/package.json +3 -3
- package/core/stx +2 -0
- package/core/tables/package.json +3 -3
- package/core/testing/package.json +3 -3
- package/core/tinker/package.json +1 -1
- package/core/tsconfig.json +4 -9
- package/core/tunnel/package.json +1 -1
- package/core/types/dist/index.js +3 -1
- package/core/types/package.json +13 -13
- package/core/types/src/cli.ts +3 -3
- package/core/types/src/cloud.ts +4 -1
- package/core/types/src/dns.ts +1 -1
- package/core/types/src/native.ts +0 -0
- package/core/types/src/stacks.ts +0 -10
- package/core/ui/package.json +8 -8
- package/core/utils/dist/index.js +1 -1
- package/core/utils/package.json +1 -1
- package/core/validation/package.json +1 -1
- package/core/vite/README.md +1 -1
- package/core/vite/build.ts +1 -1
- package/core/vite/dist/index.js +211 -203
- package/core/vite/package.json +5 -5
- package/core/vite/src/components.ts +1 -1
- package/core/vite/src/dashboard.ts +100 -0
- package/core/vite/src/desktop.ts +2 -58
- package/core/vite/src/example-vue.ts +1 -1
- package/core/vite/src/example-wc.ts +1 -1
- package/core/vite/src/functions.ts +1 -1
- package/core/vite/src/index.ts +9 -11
- package/core/vite/src/plugin/auto-imports.ts +1 -1
- package/core/vite/src/plugin/layouts.ts +6 -7
- package/core/vite/src/plugin/router.ts +3 -1
- package/core/vite/src/system-tray.ts +100 -0
- package/core/vite/src/views.ts +13 -2
- package/core/vite/src/web-components.ts +1 -1
- package/core/whois/dist/index.js +1 -2
- package/core/whois/package.json +1 -1
- package/core/whois/src/index.ts +10 -8
- package/core/x-ray/package.json +1 -1
- package/core/zsh-buddy/README.md +51 -0
- package/core/zsh-buddy/package.json +29 -0
- package/ide/dictionary.txt +12 -0
- package/ide/jetbrains/.idea/stacks.iml +0 -1
- package/ide/vscode/.vscode/settings.json +7 -2
- package/ide/vscode/package.json +2 -4
- package/package.json +12 -7
- package/core/cloud/src/server/.dockerignore +0 -15
- package/core/cloud/src/server/Dockerfile +0 -21
- package/core/cloud/src/server/index.ts +0 -3
- package/core/cloud/src/server/package.json +0 -12
- package/core/cloud/src/server/runtime.ts +0 -828
- package/core/scripts/build +0 -58
- package/core/scripts/ensure +0 -33
- package/core/scripts/fresh +0 -14
- package/core/scripts/link +0 -14
- package/core/scripts/move-built-src-files.ts +0 -28
- package/core/scripts/move-dts-files.ts +0 -35
- package/core/scripts/publish +0 -43
- package/core/scripts/setup +0 -176
- package/core/tables/vite.config.ts +0 -84
- package/core/vite/src/plugin/index.ts +0 -21
- /package/core/vite/src/{stacks.ts → plugins.ts} +0 -0
package/core/utils/package.json
CHANGED
package/core/vite/README.md
CHANGED
package/core/vite/build.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { runCommand } from '@stacksjs/cli'
|
|
2
2
|
import { handleError } from '@stacksjs/error-handling'
|
|
3
3
|
|
|
4
|
-
const result = await runCommand('bun build ./src/index.ts --outdir dist --format esm --external markdown-it-shikiji --external unplugin-vue-macros/vite --external vite-plugin-webfont-dl --external unplugin-vue-markdown/vite --external unplugin-auto-import/vite --external @intlify/unplugin-vue-i18n/vite --external defu --external @stacksjs/types --external @stacksjs/path --external
|
|
4
|
+
const result = await runCommand('bun build ./src/index.ts --outdir dist --format esm --external markdown-it-shikiji --external unplugin-vue-macros/vite --external vite-plugin-webfont-dl --external unplugin-vue-markdown/vite --external unplugin-auto-import/vite --external @intlify/unplugin-vue-i18n/vite --external defu --external @stacksjs/types --external @stacksjs/path --external unplugin-vue-components/vite --external unocss/vite --external @stacksjs/config --external @stacksjs/cli --external vitepress --external vite --external vite-plugin-inspect --external vite-plugin-vue-layouts --external unplugin-vue-router --external unplugin-vue-router/vite --external vite-plugin-pwa --external @vitejs/plugin-vue --external @stacksjs/alias --external vite-ssg-sitemap --external @stacksjs/server --external @stacksjs/env --external @unhead/vue --external markdown-it-link-attributes --external vite-plugin-vue-devtools --external vite-plugin-pages --target bun', {
|
|
5
5
|
cwd: import.meta.dir,
|
|
6
6
|
})
|
|
7
7
|
|
package/core/vite/dist/index.js
CHANGED
|
@@ -10,9 +10,6 @@ var __export = (target, all) => {
|
|
|
10
10
|
});
|
|
11
11
|
};
|
|
12
12
|
|
|
13
|
-
// src/index.ts
|
|
14
|
-
import {defineConfig, loadEnv as viteLoadEnv} from "vite";
|
|
15
|
-
|
|
16
13
|
// src/example-vue.ts
|
|
17
14
|
var exports_example_vue = {};
|
|
18
15
|
__export(exports_example_vue, {
|
|
@@ -30,6 +27,7 @@ __export(exports_example_vue, {
|
|
|
30
27
|
import {examplesPath} from "@stacksjs/path";
|
|
31
28
|
import {server as server2} from "@stacksjs/server";
|
|
32
29
|
import {alias as alias2} from "@stacksjs/alias";
|
|
30
|
+
import {defineConfig} from "vite";
|
|
33
31
|
var vueComponentsExampleConfig = {
|
|
34
32
|
root: examplesPath("vue-components"),
|
|
35
33
|
resolve: {
|
|
@@ -59,6 +57,7 @@ __export(exports_example_wc, {
|
|
|
59
57
|
import {examplesPath as examplesPath2} from "@stacksjs/path";
|
|
60
58
|
import {server as server4} from "@stacksjs/server";
|
|
61
59
|
import {alias as alias4} from "@stacksjs/alias";
|
|
60
|
+
import {defineConfig as defineConfig2} from "vite";
|
|
62
61
|
var webComponentsExampleConfig = {
|
|
63
62
|
root: examplesPath2("web-components"),
|
|
64
63
|
resolve: {
|
|
@@ -68,7 +67,7 @@ var webComponentsExampleConfig = {
|
|
|
68
67
|
type: "example"
|
|
69
68
|
})
|
|
70
69
|
};
|
|
71
|
-
var example_wc_default =
|
|
70
|
+
var example_wc_default = defineConfig2(() => {
|
|
72
71
|
return webComponentsExampleConfig;
|
|
73
72
|
});
|
|
74
73
|
// src/functions.ts
|
|
@@ -92,6 +91,7 @@ __export(exports_functions, {
|
|
|
92
91
|
});
|
|
93
92
|
import {frameworkPath, functionsPath, libraryEntryPath, projectPath} from "@stacksjs/path";
|
|
94
93
|
import {alias as alias6} from "@stacksjs/alias";
|
|
94
|
+
import {defineConfig as defineConfig3} from "vite";
|
|
95
95
|
function functionsBuildOptions() {
|
|
96
96
|
return {
|
|
97
97
|
outDir: frameworkPath("functions/dist"),
|
|
@@ -120,7 +120,7 @@ var functionsConfig = {
|
|
|
120
120
|
},
|
|
121
121
|
build: functionsBuildOptions()
|
|
122
122
|
};
|
|
123
|
-
var functions_default =
|
|
123
|
+
var functions_default = defineConfig3(({ command }) => {
|
|
124
124
|
if (command === "serve")
|
|
125
125
|
return functionsConfig;
|
|
126
126
|
return functionsConfig;
|
|
@@ -135,95 +135,13 @@ __export(exports_views, {
|
|
|
135
135
|
}
|
|
136
136
|
});
|
|
137
137
|
import {path as p7} from "@stacksjs/path";
|
|
138
|
-
import {defineConfig as
|
|
139
|
-
import
|
|
138
|
+
import {defineConfig as defineConfig4} from "vite";
|
|
139
|
+
import Vue from "@vitejs/plugin-vue";
|
|
140
140
|
import generateSitemap from "vite-ssg-sitemap";
|
|
141
141
|
import {server as server6} from "@stacksjs/server";
|
|
142
142
|
import {alias as alias8} from "@stacksjs/alias";
|
|
143
143
|
import VueMacros from "unplugin-vue-macros/vite";
|
|
144
144
|
|
|
145
|
-
// src/stacks.ts
|
|
146
|
-
var exports_stacks = {};
|
|
147
|
-
__export(exports_stacks, {
|
|
148
|
-
uiEngine: () => {
|
|
149
|
-
{
|
|
150
|
-
return uiEngine;
|
|
151
|
-
}
|
|
152
|
-
},
|
|
153
|
-
router: () => {
|
|
154
|
-
{
|
|
155
|
-
return router;
|
|
156
|
-
}
|
|
157
|
-
},
|
|
158
|
-
pwa: () => {
|
|
159
|
-
{
|
|
160
|
-
return pwa;
|
|
161
|
-
}
|
|
162
|
-
},
|
|
163
|
-
pages: () => {
|
|
164
|
-
{
|
|
165
|
-
return pages;
|
|
166
|
-
}
|
|
167
|
-
},
|
|
168
|
-
markdown: () => {
|
|
169
|
-
{
|
|
170
|
-
return markdown;
|
|
171
|
-
}
|
|
172
|
-
},
|
|
173
|
-
layouts: () => {
|
|
174
|
-
{
|
|
175
|
-
return layouts;
|
|
176
|
-
}
|
|
177
|
-
},
|
|
178
|
-
inspect: () => {
|
|
179
|
-
{
|
|
180
|
-
return inspect;
|
|
181
|
-
}
|
|
182
|
-
},
|
|
183
|
-
i18n: () => {
|
|
184
|
-
{
|
|
185
|
-
return i18n;
|
|
186
|
-
}
|
|
187
|
-
},
|
|
188
|
-
devtools: () => {
|
|
189
|
-
{
|
|
190
|
-
return default2;
|
|
191
|
-
}
|
|
192
|
-
},
|
|
193
|
-
cssEngine: () => {
|
|
194
|
-
{
|
|
195
|
-
return cssEngine;
|
|
196
|
-
}
|
|
197
|
-
},
|
|
198
|
-
components: () => {
|
|
199
|
-
{
|
|
200
|
-
return components;
|
|
201
|
-
}
|
|
202
|
-
},
|
|
203
|
-
autoImports: () => {
|
|
204
|
-
{
|
|
205
|
-
return autoImports;
|
|
206
|
-
}
|
|
207
|
-
}
|
|
208
|
-
});
|
|
209
|
-
|
|
210
|
-
// src/plugin/ui-engine.ts
|
|
211
|
-
import Vue from "@vitejs/plugin-vue";
|
|
212
|
-
function uiEngine(isWebComponent = false) {
|
|
213
|
-
if (isWebComponent) {
|
|
214
|
-
return Vue({
|
|
215
|
-
include: /\.(stx|vue|md)($|\?)/,
|
|
216
|
-
template: {
|
|
217
|
-
compilerOptions: {
|
|
218
|
-
isCustomElement: () => true
|
|
219
|
-
}
|
|
220
|
-
}
|
|
221
|
-
});
|
|
222
|
-
}
|
|
223
|
-
return Vue({
|
|
224
|
-
include: /\.(stx|vue|md)($|\?)/
|
|
225
|
-
});
|
|
226
|
-
}
|
|
227
145
|
// src/plugin/auto-imports.ts
|
|
228
146
|
import {path as p} from "@stacksjs/path";
|
|
229
147
|
import {unheadVueComposablesImports as VueHeadImports} from "@unhead/vue";
|
|
@@ -231,7 +149,7 @@ import AutoImport from "unplugin-auto-import/vite";
|
|
|
231
149
|
import {VueRouterAutoImports} from "unplugin-vue-router";
|
|
232
150
|
function autoImports(options) {
|
|
233
151
|
return AutoImport({
|
|
234
|
-
include: /\.(stx|
|
|
152
|
+
include: /\.(stx|js|ts|mdx?|elm|html)($|\?)/,
|
|
235
153
|
imports: [
|
|
236
154
|
"pinia",
|
|
237
155
|
"vue",
|
|
@@ -253,17 +171,29 @@ function autoImports(options) {
|
|
|
253
171
|
...options
|
|
254
172
|
});
|
|
255
173
|
}
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
174
|
+
|
|
175
|
+
// src/plugin/components.ts
|
|
176
|
+
import Components from "unplugin-vue-components/vite";
|
|
177
|
+
import {path as p2} from "@stacksjs/path";
|
|
178
|
+
function components(options) {
|
|
179
|
+
return Components({
|
|
180
|
+
extensions: ["stx", "vue", "md"],
|
|
181
|
+
include: /\.(stx|vue|md)($|\?)/,
|
|
182
|
+
dirs: [
|
|
183
|
+
p2.componentsPath(),
|
|
184
|
+
p2.uiPath("src/components/")
|
|
185
|
+
],
|
|
186
|
+
dts: p2.frameworkPath("types/components.d.ts"),
|
|
187
|
+
...options
|
|
188
|
+
});
|
|
260
189
|
}
|
|
190
|
+
|
|
261
191
|
// src/plugin/css-engine.ts
|
|
262
192
|
import UnoCSS from "unocss/vite";
|
|
263
|
-
import {path as
|
|
193
|
+
import {path as p3} from "@stacksjs/path";
|
|
264
194
|
function cssEngine(isWebComponent = false) {
|
|
265
195
|
return UnoCSS({
|
|
266
|
-
configFile:
|
|
196
|
+
configFile: p3.uiPath("src/uno.config.ts"),
|
|
267
197
|
mode: isWebComponent ? "shadow-dom" : "vue-scoped",
|
|
268
198
|
content: {
|
|
269
199
|
pipeline: {
|
|
@@ -272,91 +202,41 @@ function cssEngine(isWebComponent = false) {
|
|
|
272
202
|
}
|
|
273
203
|
});
|
|
274
204
|
}
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
import {
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
// src/plugin/pages.ts
|
|
291
|
-
import {defu} from "defu";
|
|
292
|
-
import VueRouter from "unplugin-vue-router/vite";
|
|
293
|
-
function pages(options) {
|
|
294
|
-
const defaultOptions = {
|
|
295
|
-
extensions: [".stx", ".vue", ".md"],
|
|
296
|
-
getRouteName: (routeNode) => getFileBasedRouteName(routeNode)
|
|
297
|
-
};
|
|
298
|
-
const newOptions = defu(options, defaultOptions);
|
|
299
|
-
return VueRouter(newOptions);
|
|
300
|
-
}
|
|
301
|
-
var getFileBasedRouteName = function(node) {
|
|
302
|
-
if (!node.parent)
|
|
303
|
-
return "";
|
|
304
|
-
const segment = node.value.rawSegment === "index" ? "" : node.value.rawSegment;
|
|
305
|
-
const path7 = getFileBasedRouteName(node.parent) + (segment ? `/${segment}` : "");
|
|
306
|
-
const cleanedPath = path7.replace(/^\//, "").replace(/\//g, ".").replace(/\[|\]/g, "");
|
|
307
|
-
return cleanedPath;
|
|
308
|
-
};
|
|
309
|
-
// src/plugin/pwa.ts
|
|
310
|
-
import {path as path8} from "@stacksjs/path";
|
|
311
|
-
import {VitePWA} from "vite-plugin-pwa";
|
|
312
|
-
function pwa() {
|
|
313
|
-
return VitePWA({
|
|
314
|
-
srcDir: path8.publicPath(),
|
|
315
|
-
registerType: "autoUpdate",
|
|
316
|
-
includeAssets: ["favicon.svg", "safari-pinned-tab.svg"],
|
|
317
|
-
manifest: {
|
|
318
|
-
name: "Stacks",
|
|
319
|
-
short_name: "Stacks",
|
|
320
|
-
theme_color: "#ffffff",
|
|
321
|
-
icons: [
|
|
322
|
-
{
|
|
323
|
-
src: "/pwa-192x192.png",
|
|
324
|
-
sizes: "192x192",
|
|
325
|
-
type: "image/png"
|
|
326
|
-
},
|
|
327
|
-
{
|
|
328
|
-
src: "/pwa-512x512.png",
|
|
329
|
-
sizes: "512x512",
|
|
330
|
-
type: "image/png"
|
|
331
|
-
},
|
|
332
|
-
{
|
|
333
|
-
src: "/pwa-512x512.png",
|
|
334
|
-
sizes: "512x512",
|
|
335
|
-
type: "image/png",
|
|
336
|
-
purpose: "any maskable"
|
|
337
|
-
}
|
|
338
|
-
]
|
|
339
|
-
}
|
|
205
|
+
|
|
206
|
+
// src/plugin/devtools.ts
|
|
207
|
+
import {default as default2} from "vite-plugin-vue-devtools";
|
|
208
|
+
|
|
209
|
+
// src/plugin/i18n.ts
|
|
210
|
+
import VueI18n from "@intlify/unplugin-vue-i18n/vite";
|
|
211
|
+
import {path as p4} from "@stacksjs/path";
|
|
212
|
+
function i18n() {
|
|
213
|
+
return VueI18n({
|
|
214
|
+
runtimeOnly: true,
|
|
215
|
+
compositionOnly: true,
|
|
216
|
+
fullInstall: true,
|
|
217
|
+
include: [
|
|
218
|
+
p4.resolve(__dirname, "../../../../../../../lang/**")
|
|
219
|
+
]
|
|
340
220
|
});
|
|
341
221
|
}
|
|
222
|
+
var __dirname = "/home/runner/work/stacks/stacks/storage/framework/core/vite/src/plugin";
|
|
223
|
+
|
|
342
224
|
// src/plugin/layouts.ts
|
|
343
|
-
import {path as
|
|
225
|
+
import {path as p5} from "@stacksjs/path";
|
|
344
226
|
import Layouts from "vite-plugin-vue-layouts";
|
|
345
|
-
function layouts(options
|
|
346
|
-
|
|
347
|
-
return Layouts(options);
|
|
348
|
-
return Layouts({
|
|
227
|
+
function layouts(options) {
|
|
228
|
+
const opts = {
|
|
349
229
|
extensions: ["stx", "vue"],
|
|
350
|
-
layoutsDirs:
|
|
351
|
-
defaultLayout: p4.layoutsPath("default.stx"),
|
|
230
|
+
layoutsDirs: p5.layoutsPath(),
|
|
352
231
|
exclude: [
|
|
353
|
-
|
|
232
|
+
p5.layoutsPath("dashboard"),
|
|
233
|
+
p5.layoutsPath("mails")
|
|
354
234
|
],
|
|
355
235
|
...options
|
|
356
|
-
}
|
|
236
|
+
};
|
|
237
|
+
return Layouts(opts);
|
|
357
238
|
}
|
|
358
|
-
|
|
359
|
-
import {default as default2} from "vite-plugin-vue-devtools";
|
|
239
|
+
|
|
360
240
|
// src/plugin/markdown.ts
|
|
361
241
|
import Markdown from "unplugin-vue-markdown/vite";
|
|
362
242
|
import LinkAttributes from "markdown-it-link-attributes";
|
|
@@ -383,36 +263,59 @@ function markdown() {
|
|
|
383
263
|
}
|
|
384
264
|
});
|
|
385
265
|
}
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
import {path as
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
266
|
+
|
|
267
|
+
// src/plugin/pwa.ts
|
|
268
|
+
import {path as path10} from "@stacksjs/path";
|
|
269
|
+
import {VitePWA} from "vite-plugin-pwa";
|
|
270
|
+
function pwa() {
|
|
271
|
+
return VitePWA({
|
|
272
|
+
srcDir: path10.publicPath(),
|
|
273
|
+
registerType: "autoUpdate",
|
|
274
|
+
includeAssets: ["favicon.svg", "safari-pinned-tab.svg"],
|
|
275
|
+
manifest: {
|
|
276
|
+
name: "Stacks",
|
|
277
|
+
short_name: "Stacks",
|
|
278
|
+
theme_color: "#ffffff",
|
|
279
|
+
icons: [
|
|
280
|
+
{
|
|
281
|
+
src: "/pwa-192x192.png",
|
|
282
|
+
sizes: "192x192",
|
|
283
|
+
type: "image/png"
|
|
284
|
+
},
|
|
285
|
+
{
|
|
286
|
+
src: "/pwa-512x512.png",
|
|
287
|
+
sizes: "512x512",
|
|
288
|
+
type: "image/png"
|
|
289
|
+
},
|
|
290
|
+
{
|
|
291
|
+
src: "/pwa-512x512.png",
|
|
292
|
+
sizes: "512x512",
|
|
293
|
+
type: "image/png",
|
|
294
|
+
purpose: "any maskable"
|
|
295
|
+
}
|
|
296
|
+
]
|
|
297
|
+
}
|
|
397
298
|
});
|
|
398
299
|
}
|
|
399
|
-
|
|
300
|
+
|
|
400
301
|
// src/plugin/router.ts
|
|
401
302
|
import {config as config2} from "@stacksjs/config";
|
|
402
|
-
import
|
|
303
|
+
import VueRouter from "unplugin-vue-router/vite";
|
|
403
304
|
import {path as p6} from "@stacksjs/path";
|
|
404
|
-
function router() {
|
|
405
|
-
return
|
|
305
|
+
function router(options) {
|
|
306
|
+
return VueRouter({
|
|
406
307
|
extensions: [".stx", ".md"],
|
|
407
308
|
dts: p6.frameworkPath("types/router.d.ts"),
|
|
408
309
|
routesFolder: [
|
|
409
310
|
p6.resourcesPath("views")
|
|
410
311
|
],
|
|
411
|
-
logs: config2.app.debug || false
|
|
312
|
+
logs: config2.app.debug || false,
|
|
313
|
+
...options
|
|
412
314
|
});
|
|
413
315
|
}
|
|
316
|
+
|
|
414
317
|
// src/views.ts
|
|
415
|
-
var views_default =
|
|
318
|
+
var views_default = defineConfig4({
|
|
416
319
|
build: {
|
|
417
320
|
rollupOptions: {
|
|
418
321
|
external: ["path", "fs", "net", "tls", "stream", "node:process", "constants", "node:dns/promises", "node:util"]
|
|
@@ -438,13 +341,16 @@ var views_default = defineConfig2({
|
|
|
438
341
|
plugins: [
|
|
439
342
|
VueMacros({
|
|
440
343
|
plugins: {
|
|
441
|
-
vue:
|
|
344
|
+
vue: Vue({
|
|
442
345
|
include: /\.(stx|vue|md)($|\?)/
|
|
443
346
|
})
|
|
444
347
|
}
|
|
445
348
|
}),
|
|
446
349
|
router(),
|
|
447
|
-
layouts(
|
|
350
|
+
layouts({
|
|
351
|
+
extensions: ["stx", "vue"],
|
|
352
|
+
layoutsDirs: p7.layoutsPath("", { relative: true })
|
|
353
|
+
}),
|
|
448
354
|
autoImports(),
|
|
449
355
|
components(),
|
|
450
356
|
cssEngine(),
|
|
@@ -485,7 +391,115 @@ import {alias as alias10} from "@stacksjs/alias";
|
|
|
485
391
|
import {server as server8} from "@stacksjs/server";
|
|
486
392
|
import {config as c} from "@stacksjs/config";
|
|
487
393
|
import {path as p8} from "@stacksjs/path";
|
|
488
|
-
import {defineConfig as
|
|
394
|
+
import {defineConfig as defineConfig5} from "vite";
|
|
395
|
+
|
|
396
|
+
// src/plugins.ts
|
|
397
|
+
var exports_plugins = {};
|
|
398
|
+
__export(exports_plugins, {
|
|
399
|
+
uiEngine: () => {
|
|
400
|
+
{
|
|
401
|
+
return uiEngine;
|
|
402
|
+
}
|
|
403
|
+
},
|
|
404
|
+
router: () => {
|
|
405
|
+
{
|
|
406
|
+
return router;
|
|
407
|
+
}
|
|
408
|
+
},
|
|
409
|
+
pwa: () => {
|
|
410
|
+
{
|
|
411
|
+
return pwa;
|
|
412
|
+
}
|
|
413
|
+
},
|
|
414
|
+
pages: () => {
|
|
415
|
+
{
|
|
416
|
+
return pages;
|
|
417
|
+
}
|
|
418
|
+
},
|
|
419
|
+
markdown: () => {
|
|
420
|
+
{
|
|
421
|
+
return markdown;
|
|
422
|
+
}
|
|
423
|
+
},
|
|
424
|
+
layouts: () => {
|
|
425
|
+
{
|
|
426
|
+
return layouts;
|
|
427
|
+
}
|
|
428
|
+
},
|
|
429
|
+
inspect: () => {
|
|
430
|
+
{
|
|
431
|
+
return inspect;
|
|
432
|
+
}
|
|
433
|
+
},
|
|
434
|
+
i18n: () => {
|
|
435
|
+
{
|
|
436
|
+
return i18n;
|
|
437
|
+
}
|
|
438
|
+
},
|
|
439
|
+
devtools: () => {
|
|
440
|
+
{
|
|
441
|
+
return default2;
|
|
442
|
+
}
|
|
443
|
+
},
|
|
444
|
+
cssEngine: () => {
|
|
445
|
+
{
|
|
446
|
+
return cssEngine;
|
|
447
|
+
}
|
|
448
|
+
},
|
|
449
|
+
components: () => {
|
|
450
|
+
{
|
|
451
|
+
return components;
|
|
452
|
+
}
|
|
453
|
+
},
|
|
454
|
+
autoImports: () => {
|
|
455
|
+
{
|
|
456
|
+
return autoImports;
|
|
457
|
+
}
|
|
458
|
+
}
|
|
459
|
+
});
|
|
460
|
+
|
|
461
|
+
// src/plugin/ui-engine.ts
|
|
462
|
+
import Vue2 from "@vitejs/plugin-vue";
|
|
463
|
+
function uiEngine(isWebComponent = false) {
|
|
464
|
+
if (isWebComponent) {
|
|
465
|
+
return Vue2({
|
|
466
|
+
include: /\.(stx|vue|md)($|\?)/,
|
|
467
|
+
template: {
|
|
468
|
+
compilerOptions: {
|
|
469
|
+
isCustomElement: () => true
|
|
470
|
+
}
|
|
471
|
+
}
|
|
472
|
+
});
|
|
473
|
+
}
|
|
474
|
+
return Vue2({
|
|
475
|
+
include: /\.(stx|vue|md)($|\?)/
|
|
476
|
+
});
|
|
477
|
+
}
|
|
478
|
+
// src/plugin/inspect.ts
|
|
479
|
+
import Inspect from "vite-plugin-inspect";
|
|
480
|
+
function inspect(options) {
|
|
481
|
+
return Inspect(options);
|
|
482
|
+
}
|
|
483
|
+
// src/plugin/pages.ts
|
|
484
|
+
import {defu} from "defu";
|
|
485
|
+
import VueRouter2 from "unplugin-vue-router/vite";
|
|
486
|
+
function pages(options) {
|
|
487
|
+
const defaultOptions = {
|
|
488
|
+
extensions: [".stx", ".vue", ".md"],
|
|
489
|
+
getRouteName: (routeNode) => getFileBasedRouteName(routeNode)
|
|
490
|
+
};
|
|
491
|
+
const newOptions = defu(options, defaultOptions);
|
|
492
|
+
return VueRouter2(newOptions);
|
|
493
|
+
}
|
|
494
|
+
var getFileBasedRouteName = function(node) {
|
|
495
|
+
if (!node.parent)
|
|
496
|
+
return "";
|
|
497
|
+
const segment = node.value.rawSegment === "index" ? "" : node.value.rawSegment;
|
|
498
|
+
const path13 = getFileBasedRouteName(node.parent) + (segment ? `/${segment}` : "");
|
|
499
|
+
const cleanedPath = path13.replace(/^\//, "").replace(/\//g, ".").replace(/\[|\]/g, "");
|
|
500
|
+
return cleanedPath;
|
|
501
|
+
};
|
|
502
|
+
// src/components.ts
|
|
489
503
|
function vueComponentsBuildOptions() {
|
|
490
504
|
return {
|
|
491
505
|
outDir: p8.libsPath("components/vue/dist"),
|
|
@@ -539,7 +553,7 @@ var config4 = {
|
|
|
539
553
|
],
|
|
540
554
|
build: vueComponentsBuildOptions()
|
|
541
555
|
};
|
|
542
|
-
var components_default =
|
|
556
|
+
var components_default = defineConfig5(({ command }) => {
|
|
543
557
|
if (command === "serve")
|
|
544
558
|
return config4;
|
|
545
559
|
return config4;
|
|
@@ -566,6 +580,7 @@ __export(exports_web_components, {
|
|
|
566
580
|
import {path as p9} from "@stacksjs/path";
|
|
567
581
|
import {server as server10} from "@stacksjs/server";
|
|
568
582
|
import {alias as alias12} from "@stacksjs/alias";
|
|
583
|
+
import {defineConfig as defineConfig6} from "vite";
|
|
569
584
|
function webComponentsBuildOptions() {
|
|
570
585
|
return {
|
|
571
586
|
outDir: p9.frameworkPath("components/web/dist"),
|
|
@@ -600,7 +615,7 @@ var webComponentsConfig = {
|
|
|
600
615
|
plugins: [],
|
|
601
616
|
build: webComponentsBuildOptions()
|
|
602
617
|
};
|
|
603
|
-
var web_components_default =
|
|
618
|
+
var web_components_default = defineConfig6(({ command }) => {
|
|
604
619
|
if (command === "serve")
|
|
605
620
|
return webComponentsConfig;
|
|
606
621
|
return webComponentsConfig;
|
|
@@ -608,7 +623,7 @@ var web_components_default = defineConfig(({ command }) => {
|
|
|
608
623
|
// src/plugin/docs.ts
|
|
609
624
|
import {kolorist as c2} from "@stacksjs/cli";
|
|
610
625
|
// package.json
|
|
611
|
-
var version = "0.58.
|
|
626
|
+
var version = "0.58.30";
|
|
612
627
|
|
|
613
628
|
// src/plugin/docs.ts
|
|
614
629
|
var docsEngine = {
|
|
@@ -619,11 +634,6 @@ var docsEngine = {
|
|
|
619
634
|
};
|
|
620
635
|
}
|
|
621
636
|
};
|
|
622
|
-
|
|
623
|
-
// src/index.ts
|
|
624
|
-
var loadEnv = function(...args) {
|
|
625
|
-
return viteLoadEnv(...args);
|
|
626
|
-
};
|
|
627
637
|
export {
|
|
628
638
|
exports_web_components as webComponents,
|
|
629
639
|
exports_example_wc as webComponentExample,
|
|
@@ -631,19 +641,17 @@ export {
|
|
|
631
641
|
exports_example_vue as vueComponentExample,
|
|
632
642
|
exports_views as views,
|
|
633
643
|
uiEngine,
|
|
634
|
-
|
|
644
|
+
exports_plugins as stacks,
|
|
635
645
|
router,
|
|
636
646
|
pwa,
|
|
637
647
|
pages,
|
|
638
648
|
markdown,
|
|
639
|
-
loadEnv,
|
|
640
649
|
layouts,
|
|
641
650
|
inspect,
|
|
642
651
|
i18n,
|
|
643
652
|
exports_functions as functions,
|
|
644
653
|
docsEngine,
|
|
645
654
|
default2 as devtools,
|
|
646
|
-
defineConfig,
|
|
647
655
|
cssEngine,
|
|
648
656
|
components,
|
|
649
657
|
autoImports
|
package/core/vite/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stacksjs/vite",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.58.
|
|
4
|
+
"version": "0.58.30",
|
|
5
5
|
"description": "The Stacks Vite plugin.",
|
|
6
6
|
"author": "Chris Breuer",
|
|
7
7
|
"license": "MIT",
|
|
@@ -103,13 +103,13 @@
|
|
|
103
103
|
"@vitejs/plugin-vue": "^5.0.3",
|
|
104
104
|
"markdown-it-link-attributes": "^4.0.1",
|
|
105
105
|
"markdown-it-shiki": "^0.9.0",
|
|
106
|
-
"unplugin-auto-import": "^0.17.
|
|
106
|
+
"unplugin-auto-import": "^0.17.5",
|
|
107
107
|
"unplugin-vue-components": "^0.26.0",
|
|
108
|
-
"vite": "^5.0.
|
|
108
|
+
"vite": "^5.0.12",
|
|
109
109
|
"vite-plugin-full-reload": "^1.1.0",
|
|
110
|
-
"vite-plugin-inspect": "^0.8.
|
|
110
|
+
"vite-plugin-inspect": "^0.8.3",
|
|
111
111
|
"vite-plugin-pages": "^0.32.0",
|
|
112
|
-
"vite-plugin-pwa": "^0.17.
|
|
112
|
+
"vite-plugin-pwa": "^0.17.5",
|
|
113
113
|
"vite-plugin-vue-markdown": "^0.23.8",
|
|
114
114
|
"vite-ssg": "^0.23.6",
|
|
115
115
|
"vite-ssg-sitemap": "^0.6.1"
|
|
@@ -4,7 +4,7 @@ import { config as c } from '@stacksjs/config'
|
|
|
4
4
|
import { path as p } from '@stacksjs/path'
|
|
5
5
|
import { defineConfig } from 'vite'
|
|
6
6
|
import type { ViteConfig } from '@stacksjs/types'
|
|
7
|
-
import { autoImports, components, cssEngine, devtools, inspect, uiEngine } from './
|
|
7
|
+
import { autoImports, components, cssEngine, devtools, inspect, uiEngine } from './plugins'
|
|
8
8
|
import type { ViteBuildOptions } from '.'
|
|
9
9
|
|
|
10
10
|
const config = {
|