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.
Files changed (233) hide show
  1. package/core/README.md +1 -1
  2. package/core/actions/dist/src/deploy/index.js +1 -1
  3. package/core/actions/dist/src/dev/components.js +1 -1
  4. package/core/actions/dist/src/dev/index.js +10 -0
  5. package/core/actions/dist/src/generate/lib-entries.js +3 -3
  6. package/core/actions/dist/src/helpers/lib-entries.js +3 -3
  7. package/core/actions/dist/src/index.js +10 -0
  8. package/core/actions/dist/src/lint/fix.js +1 -1
  9. package/core/actions/dist/src/release.js +8 -0
  10. package/core/actions/dist/src/upgrade.js +1 -1
  11. package/core/actions/package.json +1 -1
  12. package/core/actions/src/build/docs.ts +7 -0
  13. package/core/actions/src/deploy/index.ts +1 -1
  14. package/core/actions/src/dev/api.ts +2 -2
  15. package/core/actions/src/dev/components.ts +1 -1
  16. package/core/actions/src/dev/dashboard.ts +7 -0
  17. package/core/actions/src/dev/desktop.ts +3 -3
  18. package/core/actions/src/dev/index.ts +10 -0
  19. package/core/actions/src/dev/system-tray.ts +6 -0
  20. package/core/actions/src/helpers/lib-entries.ts +3 -3
  21. package/core/actions/src/lint/fix.ts +1 -1
  22. package/core/ai/package.json +3 -3
  23. package/core/alias/package.json +1 -1
  24. package/core/analytics/package.json +1 -1
  25. package/core/api/package.json +1 -1
  26. package/core/arrays/package.json +1 -1
  27. package/core/auth/package.json +1 -1
  28. package/core/buddy/README.md +2 -2
  29. package/core/buddy/dist/{chunk-b75e6db0012faa55.js → chunk-0455e53fab4244b1.js} +1 -4
  30. package/core/buddy/dist/{chunk-fd47b42fb923a4be.js → chunk-61e8f138963fc709.js} +173 -137
  31. package/core/buddy/dist/cli.js +2 -2
  32. package/core/buddy/dist/index.js +2 -2
  33. package/core/buddy/package.json +1 -1
  34. package/core/buddy/src/commands/add.ts +4 -0
  35. package/core/buddy/src/commands/build.ts +12 -1
  36. package/core/buddy/src/commands/changelog.ts +2 -0
  37. package/core/buddy/src/commands/clean.ts +2 -0
  38. package/core/buddy/src/commands/cloud.ts +6 -0
  39. package/core/buddy/src/commands/commit.ts +2 -0
  40. package/core/buddy/src/commands/configure.ts +3 -0
  41. package/core/buddy/src/commands/create.ts +8 -8
  42. package/core/buddy/src/commands/deploy.ts +24 -23
  43. package/core/buddy/src/commands/dev.ts +50 -10
  44. package/core/buddy/src/commands/dns.ts +2 -0
  45. package/core/buddy/src/commands/domains.ts +2 -0
  46. package/core/buddy/src/commands/example.ts +4 -0
  47. package/core/buddy/src/commands/fresh.ts +2 -0
  48. package/core/buddy/src/commands/generate.ts +12 -3
  49. package/core/buddy/src/commands/http.ts +2 -0
  50. package/core/buddy/src/commands/install.ts +2 -0
  51. package/core/buddy/src/commands/key.ts +4 -2
  52. package/core/buddy/src/commands/lint.ts +3 -0
  53. package/core/buddy/src/commands/make.ts +11 -1
  54. package/core/buddy/src/commands/migrate.ts +3 -0
  55. package/core/buddy/src/commands/prepublish.ts +2 -0
  56. package/core/buddy/src/commands/release.ts +2 -0
  57. package/core/buddy/src/commands/seed.ts +2 -0
  58. package/core/buddy/src/commands/setup.ts +33 -34
  59. package/core/buddy/src/commands/test.ts +2 -0
  60. package/core/buddy/src/commands/tinker.ts +2 -0
  61. package/core/buddy/src/commands/types.ts +3 -0
  62. package/core/buddy/src/commands/upgrade.ts +6 -0
  63. package/core/build/package.json +1 -1
  64. package/core/bun-create/bud/package.json +3 -2
  65. package/core/bun-create/buddy/package.json +2 -2
  66. package/core/bun-create/stack/package.json +2 -2
  67. package/core/bun-create/stacks/package.json +2 -2
  68. package/core/bun-create/stx/package.json +2 -2
  69. package/core/bun-plugin-yaml/dist/index.js +1 -19
  70. package/core/bun-plugin-yaml/package.json +1 -1
  71. package/core/bun-plugin-yaml/src/index.ts +1 -1
  72. package/core/cache/package.json +2 -2
  73. package/core/chat/package.json +1 -1
  74. package/core/cli/dist/index.js +24 -23
  75. package/core/cli/package.json +1 -1
  76. package/core/cli/src/helpers.ts +21 -31
  77. package/core/cli/src/run.ts +9 -7
  78. package/core/cloud/buddy +2 -0
  79. package/core/cloud/package.json +33 -33
  80. package/core/cloud/src/cloud/ai.ts +45 -36
  81. package/core/cloud/src/cloud/aws-sdk-layer/nodejs/package-lock.json +10 -10
  82. package/core/cloud/src/cloud/aws-sdk-layer/nodejs/package.json +2 -2
  83. package/core/cloud/src/cloud/cdn.ts +44 -5
  84. package/core/cloud/src/cloud/cli.ts +45 -0
  85. package/core/cloud/src/cloud/compute.ts +1 -1
  86. package/core/cloud/src/cloud/index.ts +6 -1
  87. package/core/cloud/src/cloud/lambda/cli-setup/index.js +67 -0
  88. package/core/cloud/src/index.ts +1 -0
  89. package/core/cloud/src/runtime/example/lambda.ts +1 -1
  90. package/core/cloud/src/runtime/runtime.ts +1 -0
  91. package/core/cloud/src/runtime/server.ts +1 -1
  92. package/core/collections/package.json +1 -1
  93. package/core/config/dist/index.js +130 -122
  94. package/core/config/package.json +1 -1
  95. package/core/config/src/overrides.ts +0 -2
  96. package/core/database/package.json +2 -2
  97. package/core/database/src/kysely-bun-worker/driver.ts +1 -0
  98. package/core/database/src/kysely-bun-worker/worker.ts +1 -1
  99. package/core/datetime/package.json +1 -1
  100. package/core/desktop/dist/index.js +6 -0
  101. package/core/desktop/package.json +5 -5
  102. package/core/desktop/src/index.ts +2 -0
  103. package/core/desktop/src/system-tray.ts +1 -0
  104. package/core/development/package.json +1 -1
  105. package/core/dns/package.json +7 -7
  106. package/core/docs/build.ts +1 -1
  107. package/core/docs/dist/index.js +29878 -9995
  108. package/core/docs/package.json +6 -5
  109. package/core/docs/src/index.ts +7 -1
  110. package/core/docs/src/meta.ts +32 -0
  111. package/core/docs/src/scripts/pwa.ts +116 -0
  112. package/core/email/email-forwarder.cjs +1 -0
  113. package/core/email/package.json +3 -3
  114. package/core/email/src/server/converter.ts +1 -0
  115. package/core/email/src/server/inbound.ts +1 -0
  116. package/core/email/src/server/outbound.ts +6 -4
  117. package/core/enums/dist/index.js +4 -2
  118. package/core/enums/package.json +1 -1
  119. package/core/enums/src/index.ts +4 -2
  120. package/core/env/package.json +1 -1
  121. package/core/error-handling/package.json +1 -1
  122. package/core/eslint-config/package.json +18 -18
  123. package/core/eslint-config/src/configs/comments.ts +1 -1
  124. package/core/eslint-config/src/configs/imports.ts +9 -0
  125. package/core/eslint-config/src/configs/svelte.ts +1 -0
  126. package/core/eslint-config/src/configs/unicorn.ts +1 -1
  127. package/core/eslint-config/src/configs/vue.ts +0 -1
  128. package/core/eslint-config/src/factory.ts +2 -8
  129. package/core/events/package.json +1 -1
  130. package/core/faker/package.json +2 -2
  131. package/core/git/dist/index.js +40 -0
  132. package/core/git/package.json +3 -3
  133. package/core/git/src/index.ts +62 -0
  134. package/core/health/package.json +1 -1
  135. package/core/http/package.json +1 -1
  136. package/core/lint/package.json +1 -1
  137. package/core/logging/dist/index.js +0 -6
  138. package/core/logging/package.json +1 -1
  139. package/core/music/package.json +3 -3
  140. package/core/notifications/package.json +2 -2
  141. package/core/objects/package.json +1 -1
  142. package/core/orm/package.json +1 -1
  143. package/core/path/dist/index.js +6 -3
  144. package/core/path/package.json +1 -1
  145. package/core/path/src/index.ts +7 -3
  146. package/core/payments/dist/index.js +2 -5
  147. package/core/payments/package.json +3 -3
  148. package/core/push/package.json +1 -1
  149. package/core/query-builder/package.json +1 -1
  150. package/core/queue/package.json +1 -1
  151. package/core/raycast/package.json +5 -0
  152. package/core/raycast/src/index.ts +0 -0
  153. package/core/realtime/package.json +1 -1
  154. package/core/repl/package.json +1 -1
  155. package/core/router/dist/index.js +16 -496
  156. package/core/router/package.json +1 -1
  157. package/core/router/src/middleware.ts +16 -14
  158. package/core/scheduler/package.json +1 -1
  159. package/core/search-engine/package.json +2 -2
  160. package/core/security/dist/index.js +3 -6
  161. package/core/security/package.json +2 -2
  162. package/core/server/dist/index.js +6 -2
  163. package/core/server/package.json +2 -2
  164. package/core/server/src/config.ts +14 -9
  165. package/core/signals/package.json +1 -1
  166. package/core/slug/package.json +1 -1
  167. package/core/sms/package.json +1 -1
  168. package/core/storage/dist/index.js +28 -10
  169. package/core/storage/package.json +1 -1
  170. package/core/storage/src/files.ts +10 -2
  171. package/core/storage/src/zip.ts +1 -1
  172. package/core/strings/package.json +3 -3
  173. package/core/stx +2 -0
  174. package/core/tables/package.json +3 -3
  175. package/core/testing/package.json +3 -3
  176. package/core/tinker/package.json +1 -1
  177. package/core/tsconfig.json +4 -9
  178. package/core/tunnel/package.json +1 -1
  179. package/core/types/dist/index.js +3 -1
  180. package/core/types/package.json +13 -13
  181. package/core/types/src/cli.ts +3 -3
  182. package/core/types/src/cloud.ts +4 -1
  183. package/core/types/src/dns.ts +1 -1
  184. package/core/types/src/native.ts +0 -0
  185. package/core/types/src/stacks.ts +0 -10
  186. package/core/ui/package.json +8 -8
  187. package/core/utils/dist/index.js +1 -1
  188. package/core/utils/package.json +1 -1
  189. package/core/validation/package.json +1 -1
  190. package/core/vite/README.md +1 -1
  191. package/core/vite/build.ts +1 -1
  192. package/core/vite/dist/index.js +211 -203
  193. package/core/vite/package.json +5 -5
  194. package/core/vite/src/components.ts +1 -1
  195. package/core/vite/src/dashboard.ts +100 -0
  196. package/core/vite/src/desktop.ts +2 -58
  197. package/core/vite/src/example-vue.ts +1 -1
  198. package/core/vite/src/example-wc.ts +1 -1
  199. package/core/vite/src/functions.ts +1 -1
  200. package/core/vite/src/index.ts +9 -11
  201. package/core/vite/src/plugin/auto-imports.ts +1 -1
  202. package/core/vite/src/plugin/layouts.ts +6 -7
  203. package/core/vite/src/plugin/router.ts +3 -1
  204. package/core/vite/src/system-tray.ts +100 -0
  205. package/core/vite/src/views.ts +13 -2
  206. package/core/vite/src/web-components.ts +1 -1
  207. package/core/whois/dist/index.js +1 -2
  208. package/core/whois/package.json +1 -1
  209. package/core/whois/src/index.ts +10 -8
  210. package/core/x-ray/package.json +1 -1
  211. package/core/zsh-buddy/README.md +51 -0
  212. package/core/zsh-buddy/package.json +29 -0
  213. package/ide/dictionary.txt +12 -0
  214. package/ide/jetbrains/.idea/stacks.iml +0 -1
  215. package/ide/vscode/.vscode/settings.json +7 -2
  216. package/ide/vscode/package.json +2 -4
  217. package/package.json +12 -7
  218. package/core/cloud/src/server/.dockerignore +0 -15
  219. package/core/cloud/src/server/Dockerfile +0 -21
  220. package/core/cloud/src/server/index.ts +0 -3
  221. package/core/cloud/src/server/package.json +0 -12
  222. package/core/cloud/src/server/runtime.ts +0 -828
  223. package/core/scripts/build +0 -58
  224. package/core/scripts/ensure +0 -33
  225. package/core/scripts/fresh +0 -14
  226. package/core/scripts/link +0 -14
  227. package/core/scripts/move-built-src-files.ts +0 -28
  228. package/core/scripts/move-dts-files.ts +0 -35
  229. package/core/scripts/publish +0 -43
  230. package/core/scripts/setup +0 -176
  231. package/core/tables/vite.config.ts +0 -84
  232. package/core/vite/src/plugin/index.ts +0 -21
  233. /package/core/vite/src/{stacks.ts → plugins.ts} +0 -0
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@stacksjs/utils",
3
3
  "type": "module",
4
- "version": "0.58.28",
4
+ "version": "0.58.30",
5
5
  "description": "The Stacks helper functions.",
6
6
  "author": "Chris Breuer",
7
7
  "license": "MIT",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@stacksjs/validation",
3
3
  "type": "module",
4
- "version": "0.58.28",
4
+ "version": "0.58.30",
5
5
  "description": "The Stacks Validation ways.",
6
6
  "author": "Chris Breuer",
7
7
  "license": "MIT",
@@ -21,7 +21,7 @@ bun install -d @stacksjs/vite-plugin
21
21
  Now, you can use it in your project:
22
22
 
23
23
  ```js
24
- import vitePlugin from '@stacksjs/vite-plugin'
24
+ import vite from '@stacksjs/vite'
25
25
 
26
26
  // wip
27
27
  ```
@@ -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 vite --external unplugin-vue-components/vite --external unocss/vite --external @stacksjs/config --external @stacksjs/cli --external vitepress --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', {
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
 
@@ -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 = defineConfig(() => {
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 = defineConfig(({ command }) => {
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 defineConfig2} from "vite";
139
- import Vue2 from "@vitejs/plugin-vue";
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|vue|js|ts|mdx?|elm|html)($|\?)/,
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
- // src/plugin/inspect.ts
257
- import Inspect from "vite-plugin-inspect";
258
- function inspect(options) {
259
- return Inspect(options);
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 p2} from "@stacksjs/path";
193
+ import {path as p3} from "@stacksjs/path";
264
194
  function cssEngine(isWebComponent = false) {
265
195
  return UnoCSS({
266
- configFile: p2.uiPath("src/uno.config.ts"),
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
- // src/plugin/components.ts
276
- import Components from "unplugin-vue-components/vite";
277
- import {path as p3} from "@stacksjs/path";
278
- function components(options) {
279
- return Components({
280
- extensions: ["stx", "vue", "md"],
281
- include: /\.(stx|vue|md)($|\?)/,
282
- dirs: [
283
- p3.componentsPath(),
284
- p3.uiPath("src/components/")
285
- ],
286
- dts: p3.frameworkPath("types/components.d.ts"),
287
- ...options
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 p4} from "@stacksjs/path";
225
+ import {path as p5} from "@stacksjs/path";
344
226
  import Layouts from "vite-plugin-vue-layouts";
345
- function layouts(options, isMain = true) {
346
- if (!isMain)
347
- return Layouts(options);
348
- return Layouts({
227
+ function layouts(options) {
228
+ const opts = {
349
229
  extensions: ["stx", "vue"],
350
- layoutsDirs: p4.layoutsPath(),
351
- defaultLayout: p4.layoutsPath("default.stx"),
230
+ layoutsDirs: p5.layoutsPath(),
352
231
  exclude: [
353
- p4.layoutsPath("mails")
232
+ p5.layoutsPath("dashboard"),
233
+ p5.layoutsPath("mails")
354
234
  ],
355
235
  ...options
356
- });
236
+ };
237
+ return Layouts(opts);
357
238
  }
358
- // src/plugin/devtools.ts
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
- // src/plugin/i18n.ts
387
- import VueI18n from "@intlify/unplugin-vue-i18n/vite";
388
- import {path as p5} from "@stacksjs/path";
389
- function i18n() {
390
- return VueI18n({
391
- runtimeOnly: true,
392
- compositionOnly: true,
393
- fullInstall: true,
394
- include: [
395
- p5.resolve(__dirname, "../../../../../../../lang/**")
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
- var __dirname = "/home/runner/work/stacks/stacks/storage/framework/core/vite/src/plugin";
300
+
400
301
  // src/plugin/router.ts
401
302
  import {config as config2} from "@stacksjs/config";
402
- import VueRouter2 from "unplugin-vue-router/vite";
303
+ import VueRouter from "unplugin-vue-router/vite";
403
304
  import {path as p6} from "@stacksjs/path";
404
- function router() {
405
- return VueRouter2({
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 = defineConfig2({
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: Vue2({
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 defineConfig3} from "vite";
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 = defineConfig3(({ command }) => {
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 = defineConfig(({ command }) => {
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.28";
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
- exports_stacks as stacks,
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
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@stacksjs/vite",
3
3
  "type": "module",
4
- "version": "0.58.28",
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.3",
106
+ "unplugin-auto-import": "^0.17.5",
107
107
  "unplugin-vue-components": "^0.26.0",
108
- "vite": "^5.0.11",
108
+ "vite": "^5.0.12",
109
109
  "vite-plugin-full-reload": "^1.1.0",
110
- "vite-plugin-inspect": "^0.8.1",
110
+ "vite-plugin-inspect": "^0.8.3",
111
111
  "vite-plugin-pages": "^0.32.0",
112
- "vite-plugin-pwa": "^0.17.4",
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 './stacks'
7
+ import { autoImports, components, cssEngine, devtools, inspect, uiEngine } from './plugins'
8
8
  import type { ViteBuildOptions } from '.'
9
9
 
10
10
  const config = {