@antelopejs/dms-frontend 0.8.0 → 0.9.1
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/dist/commands/build-action.js +3 -0
- package/dist/commands/dev-action.d.ts +2 -0
- package/dist/commands/dev-action.js +12 -5
- package/dist/commands/dev.js +3 -1
- package/dist/commands/start-action.js +36 -5
- package/dist/common.d.ts +1 -0
- package/dist/common.js +1 -0
- package/dist/config.js +3 -0
- package/dist/derived-outputs.d.ts +1 -5
- package/dist/derived-outputs.js +46 -33
- package/dist/dev-modules.d.ts +5 -0
- package/dist/dev-modules.js +88 -0
- package/dist/entry-weight.d.ts +24 -0
- package/dist/entry-weight.js +86 -0
- package/dist/help.js +5 -1
- package/dist/layer-watch.js +3 -2
- package/dist/layers.d.ts +1 -0
- package/dist/locale-files.d.ts +6 -0
- package/dist/locale-files.js +75 -0
- package/dist/manifest.js +2 -0
- package/dist/private-values.d.ts +1 -0
- package/dist/private-values.js +16 -0
- package/dist/project-modules-child.d.ts +13 -0
- package/dist/project-modules-child.js +26 -0
- package/dist/project-modules.d.ts +1 -0
- package/dist/project-modules.js +73 -38
- package/dist/workspace-setup.js +41 -3
- package/dist/workspace.d.ts +6 -0
- package/package.json +24 -7
- package/skills/dms-frontend/SKILL.md +1 -0
- package/templates/vue/app-runtime.ts +8 -1
- package/templates/vue/entry-weight.mjs +132 -0
- package/templates/vue/frontend-build-loader.ts +227 -9
- package/templates/vue/frontend-build.ts +34 -1
- package/templates/vue/frontend-module.ts +144 -1
- package/templates/vue/gitignore +1 -0
- package/templates/vue/main.ts +21 -0
- package/templates/vue/network-error.ts +3 -1
- package/templates/vue/package.json +1 -1
- package/templates/vue/patches/@vueuse__core@14.4.0.patch +24 -0
- package/templates/vue/pnpm-workspace.yaml +5 -0
- package/templates/vue/server/client-manifest.mjs +12 -0
- package/templates/vue/server/in-place-render.mjs +110 -0
- package/templates/vue/server/page-props.mjs +10 -0
- package/templates/vue/server/proxy-transfers.mjs +35 -9
- package/templates/vue/server.mjs +39 -29
- package/templates/vue/sfc-global-types.mjs +119 -0
- package/templates/vue/ssr-renderer.ts +8 -0
- package/templates/vue/ui-kbd.mjs +45 -0
- package/templates/vue/vite.config.ts +34 -2
|
@@ -10,16 +10,24 @@ import {
|
|
|
10
10
|
type Plugin,
|
|
11
11
|
} from "vite";
|
|
12
12
|
import { clientCodeSplitting, onBuildLog } from "./client-chunking.mjs";
|
|
13
|
+
import { recordEntryWeight } from "./entry-weight.mjs";
|
|
13
14
|
import { rejectServerSourcesInClient } from "./client-server-guard.mjs";
|
|
14
15
|
import { uiInertiaPage } from "./ui-inertia-page.mjs";
|
|
16
|
+
import { uiKbd } from "./ui-kbd.mjs";
|
|
15
17
|
import { uiRequestState } from "./ui-request-state.mjs";
|
|
16
|
-
import { autoImportDirectories } from "./frontend-build-loader.ts";
|
|
18
|
+
import { autoImportDirectories, vitePlugins } from "./frontend-build-loader.ts";
|
|
17
19
|
import { frontendBuilds } from "./frontend-builds.generated.ts";
|
|
18
20
|
import { orderHeadForFirstPaint } from "./head-order.mjs";
|
|
19
21
|
import { iconScanGlobs } from "./icon-scan.mjs";
|
|
22
|
+
import {
|
|
23
|
+
sfcGlobalTypesWatcher,
|
|
24
|
+
writeSfcGlobalTypes,
|
|
25
|
+
} from "./sfc-global-types.mjs";
|
|
20
26
|
|
|
21
27
|
interface FrontendModuleRegistryEntry {
|
|
22
28
|
id: string;
|
|
29
|
+
name?: string;
|
|
30
|
+
packageName?: string;
|
|
23
31
|
root: string;
|
|
24
32
|
priority: number;
|
|
25
33
|
}
|
|
@@ -69,6 +77,19 @@ const importDirectories = autoImportDirectories(
|
|
|
69
77
|
frontendBuilds,
|
|
70
78
|
(message) => logger.warn(message),
|
|
71
79
|
);
|
|
80
|
+
/**
|
|
81
|
+
* The auto-imported types, as declarations Vue's SFC compiler reads: without
|
|
82
|
+
* them a prop typed with one compiles to the wrong runtime type.
|
|
83
|
+
*/
|
|
84
|
+
const sfcGlobalTypesFile = resolve(
|
|
85
|
+
import.meta.dirname,
|
|
86
|
+
"sfc-global-types.generated.d.ts",
|
|
87
|
+
);
|
|
88
|
+
await writeSfcGlobalTypes(
|
|
89
|
+
importDirectories,
|
|
90
|
+
import.meta.dirname,
|
|
91
|
+
sfcGlobalTypesFile,
|
|
92
|
+
);
|
|
72
93
|
/**
|
|
73
94
|
* Dependencies pre-bundled by name. A module's own dependencies need no entry:
|
|
74
95
|
* the startup crawl below (`optimizerEntries`) finds them in its sources. A
|
|
@@ -153,6 +174,8 @@ export default defineConfig({
|
|
|
153
174
|
// Fails a client build that imports a dms.server.ts or a file under a
|
|
154
175
|
// module's server/ directory, however it is imported.
|
|
155
176
|
rejectServerSourcesInClient(moduleRoots),
|
|
177
|
+
// What each module adds to the client entry, which `ajs dms build` reports.
|
|
178
|
+
recordEntryWeight(registry.modules),
|
|
156
179
|
{
|
|
157
180
|
name: "dms-ui-inertia-link",
|
|
158
181
|
enforce: "pre",
|
|
@@ -160,9 +183,15 @@ export default defineConfig({
|
|
|
160
183
|
return id === uiLinkImport ? uiInertiaLinkImport : null;
|
|
161
184
|
},
|
|
162
185
|
},
|
|
186
|
+
uiKbd(isNuxtUiFile),
|
|
163
187
|
uiInertiaPage(isNuxtUiFile),
|
|
164
188
|
uiRequestState(isNuxtUiFile),
|
|
165
|
-
vue(),
|
|
189
|
+
vue({ script: { globalTypeFiles: [sfcGlobalTypesFile] } }),
|
|
190
|
+
sfcGlobalTypesWatcher(
|
|
191
|
+
importDirectories,
|
|
192
|
+
import.meta.dirname,
|
|
193
|
+
sfcGlobalTypesFile,
|
|
194
|
+
),
|
|
166
195
|
ui({
|
|
167
196
|
router: "inertia",
|
|
168
197
|
icon: {
|
|
@@ -214,6 +243,7 @@ export default defineConfig({
|
|
|
214
243
|
"useDmsError",
|
|
215
244
|
"useDmsPagedData",
|
|
216
245
|
"useDmsPageLoading",
|
|
246
|
+
"isDmsHydrating",
|
|
217
247
|
"useDmsApp",
|
|
218
248
|
"useDmsRoute",
|
|
219
249
|
"useDmsRouter",
|
|
@@ -224,6 +254,7 @@ export default defineConfig({
|
|
|
224
254
|
"DmsClientOnly",
|
|
225
255
|
"DmsLink",
|
|
226
256
|
"useDmsUserSession",
|
|
257
|
+
"provideDmsKbdPlatform",
|
|
227
258
|
],
|
|
228
259
|
},
|
|
229
260
|
],
|
|
@@ -232,6 +263,7 @@ export default defineConfig({
|
|
|
232
263
|
},
|
|
233
264
|
}),
|
|
234
265
|
paintBeforeHydrate(),
|
|
266
|
+
...vitePlugins(registry.modules, frontendBuilds),
|
|
235
267
|
],
|
|
236
268
|
resolve: {
|
|
237
269
|
// `@iconify/vue` keeps its API providers in module state: `main.ts` and
|