@jasonshimmy/vite-plugin-cer-app 0.1.5 → 0.2.0
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/.github/workflows/publish.yml +56 -5
- package/CHANGELOG.md +8 -0
- package/README.md +5 -2
- package/commits.txt +1 -1
- package/dist/cli/commands/build.d.ts.map +1 -1
- package/dist/cli/commands/build.js +19 -5
- package/dist/cli/commands/build.js.map +1 -1
- package/dist/cli/commands/dev.js +1 -1
- package/dist/cli/commands/dev.js.map +1 -1
- package/dist/cli/commands/preview.d.ts.map +1 -1
- package/dist/cli/commands/preview.js +0 -1
- package/dist/cli/commands/preview.js.map +1 -1
- package/dist/cli/create/templates/spa/app/app.ts.tpl +93 -0
- package/dist/cli/create/templates/spa/app/layouts/default.ts.tpl +15 -0
- package/dist/cli/create/templates/spa/app/pages/index.ts.tpl +8 -0
- package/dist/cli/create/templates/spa/cer.config.ts.tpl +6 -0
- package/{e2e/kitchen-sink/index.html → dist/cli/create/templates/spa/index.html.tpl} +3 -3
- package/dist/cli/create/templates/spa/package.json.tpl +18 -0
- package/dist/cli/create/templates/ssg/app/app.ts.tpl +97 -0
- package/dist/cli/create/templates/ssg/app/layouts/default.ts.tpl +15 -0
- package/dist/cli/create/templates/ssg/app/pages/index.ts.tpl +8 -0
- package/dist/cli/create/templates/ssg/cer.config.ts.tpl +13 -0
- package/dist/cli/create/templates/ssg/index.html.tpl +12 -0
- package/dist/cli/create/templates/ssg/package.json.tpl +19 -0
- package/dist/cli/create/templates/ssr/app/app.ts.tpl +97 -0
- package/dist/cli/create/templates/ssr/app/layouts/default.ts.tpl +15 -0
- package/dist/cli/create/templates/ssr/app/pages/index.ts.tpl +8 -0
- package/dist/cli/create/templates/ssr/cer.config.ts.tpl +10 -0
- package/dist/cli/create/templates/ssr/index.html.tpl +12 -0
- package/dist/cli/create/templates/ssr/package.json.tpl +18 -0
- package/dist/plugin/build-ssg.d.ts.map +1 -1
- package/dist/plugin/build-ssg.js.map +1 -1
- package/dist/plugin/build-ssr.d.ts +10 -0
- package/dist/plugin/build-ssr.d.ts.map +1 -1
- package/dist/plugin/build-ssr.js +21 -8
- package/dist/plugin/build-ssr.js.map +1 -1
- package/dist/plugin/dev-server.d.ts.map +1 -1
- package/dist/plugin/dev-server.js +0 -2
- package/dist/plugin/dev-server.js.map +1 -1
- package/dist/plugin/dts-generator.d.ts +4 -4
- package/dist/plugin/dts-generator.d.ts.map +1 -1
- package/dist/plugin/dts-generator.js +39 -19
- package/dist/plugin/dts-generator.js.map +1 -1
- package/dist/plugin/generated-dir.d.ts +34 -0
- package/dist/plugin/generated-dir.d.ts.map +1 -0
- package/dist/plugin/generated-dir.js +94 -0
- package/dist/plugin/generated-dir.js.map +1 -0
- package/dist/plugin/index.d.ts.map +1 -1
- package/dist/plugin/index.js +27 -0
- package/dist/plugin/index.js.map +1 -1
- package/dist/plugin/path-utils.js.map +1 -1
- package/dist/plugin/virtual/loading.d.ts.map +1 -1
- package/dist/plugin/virtual/loading.js.map +1 -1
- package/dist/runtime/app-template.d.ts +8 -0
- package/dist/runtime/app-template.d.ts.map +1 -0
- package/dist/runtime/app-template.js +158 -0
- package/dist/runtime/app-template.js.map +1 -0
- package/docs/cli.md +10 -8
- package/docs/configuration.md +6 -4
- package/docs/getting-started.md +2 -2
- package/docs/rendering-modes.md +2 -2
- package/docs/routing.md +1 -1
- package/e2e/kitchen-sink/tsconfig.json +3 -0
- package/eslint.config.ts +22 -0
- package/package.json +7 -2
- package/src/__tests__/plugin/build-ssr.test.ts +24 -10
- package/src/__tests__/plugin/cer-app-plugin.test.ts +35 -0
- package/src/__tests__/plugin/dts-generator.test.ts +15 -6
- package/src/__tests__/plugin/generated-dir.test.ts +168 -0
- package/src/cli/commands/build.ts +19 -5
- package/src/cli/commands/dev.ts +2 -2
- package/src/cli/commands/preview.ts +7 -5
- package/src/plugin/build-ssg.ts +2 -2
- package/src/plugin/build-ssr.ts +22 -8
- package/src/plugin/dev-server.ts +4 -3
- package/src/plugin/dts-generator.ts +43 -19
- package/src/plugin/generated-dir.ts +102 -0
- package/src/plugin/index.ts +32 -1
- package/src/plugin/path-utils.ts +1 -1
- package/src/plugin/virtual/loading.ts +0 -1
- package/{e2e/kitchen-sink/app/app.ts → src/runtime/app-template.ts} +23 -7
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generated-dir.js","sourceRoot":"","sources":["../../src/plugin/generated-dir.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,SAAS,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAC5F,OAAO,EAAE,IAAI,EAAE,MAAM,OAAO,CAAA;AAE5B,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAA;AAE/D,wEAAwE;AACxE,MAAM,CAAC,MAAM,kBAAkB,GAAG,MAAM,CAAA;AAExC;;GAEG;AACH,MAAM,UAAU,eAAe,CAAC,IAAY;IAC1C,OAAO,IAAI,CAAC,IAAI,EAAE,kBAAkB,CAAC,CAAA;AACvC,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,eAAe,CAAC,MAAyB;IACvD,MAAM,SAAS,GAAG,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAA;IAC/C,IAAI,UAAU,CAAC,SAAS,CAAC;QAAE,OAAO,SAAS,CAAA;IAC3C,OAAO,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,QAAQ,CAAC,CAAA;AACrD,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,gBAAgB,CAAC,MAAyB;IACxD,MAAM,QAAQ,GAAG,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,YAAY,CAAC,CAAA;IAChD,IAAI,UAAU,CAAC,QAAQ,CAAC;QAAE,OAAO,QAAQ,CAAA;IACzC,OAAO,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC,IAAI,CAAC,EAA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C,MAAM,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAA;IAC/C,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC,EAAE,CAAC;QAC3B,aAAa,CAAC,IAAI,CAAC,GAAG,EAAE,QAAQ,CAAC,EAAE,kBAAkB,EAAE,OAAO,CAAC,CAAA;IACjE,CAAC;IAED,+EAA+E;IAC/E,aAAa,CAAC,IAAI,CAAC,GAAG,EAAE,YAAY,CAAC,EAAE,mBAAmB,CAAC,MAAM,CAAC,EAAE,OAAO,CAAC,CAAA;IAE5E,eAAe,CAAC,MAAM,CAAC,IAAI,CAAC,CAAA;AAC9B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/plugin/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/plugin/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAiB,MAAM,MAAM,CAAA;AACjD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AACtD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAA;AAsCxD;;GAEG;AACH,wBAAgB,aAAa,CAAC,UAAU,EAAE,YAAY,EAAE,IAAI,GAAE,MAAsB,GAAG,iBAAiB,CA6CvG;AAqFD;;;GAGG;AACH,wBAAgB,MAAM,CAAC,UAAU,GAAE,YAAiB,GAAG,MAAM,EAAE,CAyL9D"}
|
package/dist/plugin/index.js
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { resolve, join } from 'pathe';
|
|
2
|
+
import { existsSync, readFileSync } from 'node:fs';
|
|
2
3
|
import { cerPlugin } from '@jasonshimmy/custom-elements-runtime/vite-plugin';
|
|
3
4
|
import { autoImportTransform } from './transforms/auto-import.js';
|
|
4
5
|
import { scanComposableExports, writeAutoImportDts, writeTsconfigPaths } from './dts-generator.js';
|
|
5
6
|
import { configureCerDevServer } from './dev-server.js';
|
|
7
|
+
import { writeGeneratedDir, getGeneratedDir } from './generated-dir.js';
|
|
6
8
|
import { generateRoutesCode } from './virtual/routes.js';
|
|
7
9
|
import { generateLayoutsCode } from './virtual/layouts.js';
|
|
8
10
|
import { generateComponentsCode } from './virtual/components.js';
|
|
@@ -229,10 +231,33 @@ export function cerApp(userConfig = {}) {
|
|
|
229
231
|
// config might not be set yet; resolve with cwd
|
|
230
232
|
config = resolveConfig(userConfig, process.cwd());
|
|
231
233
|
}
|
|
234
|
+
// Write .cer/ generated files (app.ts fallback, index.html, .gitignore)
|
|
235
|
+
writeGeneratedDir(config);
|
|
232
236
|
// Scan composables and write .d.ts + tsconfig paths on dev server start
|
|
233
237
|
composableExports = await scanComposableExports(config.composablesDir);
|
|
234
238
|
await writeAutoImportDts(config.root, config.composablesDir, composableExports);
|
|
235
239
|
writeTsconfigPaths(config.root, config.srcDir);
|
|
240
|
+
// Serve a generated index.html for HTML requests when the consumer has
|
|
241
|
+
// not provided one. This runs BEFORE configureCerDevServer so that the
|
|
242
|
+
// Vite HTML pipeline (HMR injection, module preprocessing) is applied.
|
|
243
|
+
const userHtml = resolve(config.root, 'index.html');
|
|
244
|
+
if (!existsSync(userHtml)) {
|
|
245
|
+
const cerHtmlPath = join(getGeneratedDir(config.root), 'index.html');
|
|
246
|
+
server.middlewares.use(async (req, res, next) => {
|
|
247
|
+
const url = req.url ?? '/';
|
|
248
|
+
const isHtmlRequest = url === '/' ||
|
|
249
|
+
url === '/index.html' ||
|
|
250
|
+
(!url.includes('.') && !url.startsWith('/api/'));
|
|
251
|
+
if (isHtmlRequest && existsSync(cerHtmlPath)) {
|
|
252
|
+
const rawHtml = readFileSync(cerHtmlPath, 'utf-8');
|
|
253
|
+
const transformed = await server.transformIndexHtml(url, rawHtml);
|
|
254
|
+
res.setHeader('Content-Type', 'text/html; charset=utf-8');
|
|
255
|
+
res.end(transformed);
|
|
256
|
+
return;
|
|
257
|
+
}
|
|
258
|
+
next();
|
|
259
|
+
});
|
|
260
|
+
}
|
|
236
261
|
// Watch app/ and server/ directories for file changes
|
|
237
262
|
const watchDirs = [
|
|
238
263
|
config.pagesDir,
|
|
@@ -271,6 +296,8 @@ export function cerApp(userConfig = {}) {
|
|
|
271
296
|
if (!config) {
|
|
272
297
|
config = resolveConfig(userConfig, process.cwd());
|
|
273
298
|
}
|
|
299
|
+
// Write .cer/ generated files before the build begins
|
|
300
|
+
writeGeneratedDir(config);
|
|
274
301
|
// Scan composables and generate type declarations + tsconfig paths
|
|
275
302
|
composableExports = await scanComposableExports(config.composablesDir);
|
|
276
303
|
await writeAutoImportDts(config.root, config.composablesDir, composableExports);
|
package/dist/plugin/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/plugin/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,OAAO,CAAA;AAIrC,OAAO,EAAE,SAAS,EAAE,MAAM,kDAAkD,CAAA;AAC5E,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAA;AACjE,OAAO,EAAE,qBAAqB,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAA;AAClG,OAAO,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAA;AACvD,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAA;AACxD,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAA;AAC1D,OAAO,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAA;AAChE,OAAO,EAAE,uBAAuB,EAAE,MAAM,0BAA0B,CAAA;AAClE,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAA;AAC1D,OAAO,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAA;AAChE,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAA;AAC/D,OAA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AC,IAAI,EAAE,MAAM,CAAC,cAAc,EAAE,iBAAiB,CAAC,CAAA;YAC/E,kBAAkB,CAAC,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,CAAC,CAAA;YAC9C,gCAAgC;YAChC,KAAK,MAAM,UAAU,IAAI,MAAM,CAAC,MAAM,CAAC,YAAY,CAAC,EAAE,CAAC;gBACrD,MAAM,IAAI,GAAG,MAAM,qBAAqB,CAAC,UAAU,EAAE,MAAM,CAAC,CAAA;gBAC5D,IAAI,IAAI,KAAK,IAAI,EAAE,CAAC;oBAClB,WAAW,CAAC,GAAG,CAAC,UAAU,EAAE,IAAI,CAAC,CAAA;gBACnC,CAAC;YACH,CAAC;QACH,CAAC;KACF,CAAA;IAED,yDAAyD;IACzD,wEAAwE;IACxE,MAAM,cAAc,GAAG,aAAa,CAAC,UAAU,CAAC,CAAA;IAChD,MAAM,EAAE,GAAG,EAAE,GAAG,cAAc,CAAC,GAAG,CAAA;IAClC,MAAM,EAAE,OAAO,EAAE,GAAG,UAAU,EAAE,GAAG,cAAc,CAAC,MAAM,CAAA;IACxD,MAAM,UAAU,GAAG,SAAS,CAAC;QAC3B,OAAO;QACP,GAAG,UAAU;QACb,GAAG,EAAE;YACH,GAAG;YACH,GAAG,EAAE,UAAU;SAChB;KACF,CAAC,CAAA;IAEF,OAAO,CAAC,YAAY,EAAE,GAAG,UAAU,CAAC,CAAA;AACtC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"path-utils.js","sourceRoot":"","sources":["../../src/plugin/path-utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,
|
|
1
|
+
{"version":3,"file":"path-utils.js","sourceRoot":"","sources":["../../src/plugin/path-utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAU1C;;;GAGG;AACH,MAAM,UAAU,eAAe,CAAC,QAAgB,EAAE,SAAiB;IACjE,k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K,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE;QAC9B,MAAM,MAAM,GAAG,kBAAkB,CAAC,CAAC,CAAC,CAAA;QACpC,MAAM,MAAM,GAAG,kBAAkB,CAAC,CAAC,CAAC,CAAA;QACpC,IAAI,MAAM,KAAK,MAAM;YAAE,OAAO,MAAM,GAAG,MAAM,CAAA;QAC7C,OAAO,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,CAAA;IAC3B,CAAC,CAAC,CAAA;AACJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loading.d.ts","sourceRoot":"","sources":["../../../src/plugin/virtual/loading.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"loading.d.ts","sourceRoot":"","sources":["../../../src/plugin/virtual/loading.ts"],"names":[],"mappings":"AAGA;;;;;;;;GAQG;AACH,wBAAsB,mBAAmB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAmBzE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loading.js","sourceRoot":"","sources":["../../../src/plugin/virtual/loading.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AACpC,OAAO,EAAE,IAAI,EAAE,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"loading.js","sourceRoot":"","sources":["../../../src/plugin/virtual/loading.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AACpC,OAAO,EAAE,IAAI,EAAE,MAAM,OAAO,CAAA;AAE5B;;;;;;;;GAQG;AACH,MAAM,CAAC,KAAK,UAAU,mBAAmB,CAAC,MAAc;IACtD,MAAM,WAAW,GAAG,IAAI,CAAC,MAAM,EAAE,YAAY,CAAC,CAAA;IAE9C,IAAI,CAAC,UAAU,CAAC,WAAW,CAAC,EAAE,CAAC;QAC7B,OAAO;YACL,uDAAuD;YACvD,iCAAiC;YACjC,gCAAgC;YAChC,EAAE;SACH,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;IACd,CAAC;IAED,OAAO;QACL,uDAAuD;QACvD,UAAU,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC,EAAE;QACvC,gCAAgC;QAChC,0CAA0C;QAC1C,EAAE;KACH,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;AACd,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Template string for the default `.cer/app.ts` client entry point.
|
|
3
|
+
*
|
|
4
|
+
* Written to `.cer/app.ts` when the consumer does not provide `app/app.ts`.
|
|
5
|
+
* Consumers can override by creating their own `app/app.ts`.
|
|
6
|
+
*/
|
|
7
|
+
export declare const APP_ENTRY_TEMPLATE = "// AUTO-GENERATED by @jasonshimmy/vite-plugin-cer-app\n// This is the default client entry point. Create app/app.ts to override it.\n\nimport '@jasonshimmy/custom-elements-runtime/css'\nimport 'virtual:cer-jit-css'\nimport 'virtual:cer-components'\nimport routes from 'virtual:cer-routes'\nimport layouts from 'virtual:cer-layouts'\nimport plugins from 'virtual:cer-plugins'\nimport { hasLoading, loadingTag } from 'virtual:cer-loading'\nimport { hasError, errorTag } from 'virtual:cer-error'\nimport {\n component,\n ref,\n provide,\n useOnConnected,\n useOnDisconnected,\n registerBuiltinComponents,\n} from '@jasonshimmy/custom-elements-runtime'\nimport { initRouter } from '@jasonshimmy/custom-elements-runtime/router'\nimport { enableJITCSS } from '@jasonshimmy/custom-elements-runtime/jit-css'\n\nregisterBuiltinComponents()\nenableJITCSS()\n\nconst router = initRouter({ routes })\n\n// \u2500\u2500\u2500 Navigation state \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\nconst isNavigating = ref(false)\nconst currentError = ref(null)\n\nconst resetError = (): void => {\n currentError.value = null\n void router.replace(router.getCurrent().path)\n}\n;(globalThis as Record<string, unknown>).resetError = resetError\n\nconst _push = router.push.bind(router)\nconst _replace = router.replace.bind(router)\n\nrouter.push = async (path) => {\n isNavigating.value = true\n currentError.value = null\n try {\n await _push(path)\n } catch (err) {\n currentError.value = err instanceof Error ? err.message : String(err)\n } finally {\n isNavigating.value = false\n }\n}\n\nrouter.replace = async (path) => {\n isNavigating.value = true\n currentError.value = null\n try {\n await _replace(path)\n } catch (err) {\n currentError.value = err instanceof Error ? err.message : String(err)\n } finally {\n isNavigating.value = false\n }\n}\n\n// \u2500\u2500\u2500 Plugins \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\n// Collect plugin-provided values so cer-layout-view can forward them into\n// the component context tree via the real provide() hook (which inject() walks).\n// Declared BEFORE component('cer-layout-view') to avoid a temporal dead zone\n// ReferenceError: customElements.define() upgrades existing DOM elements\n// synchronously, calling the render function immediately.\nconst _pluginProvides = new Map<string, unknown>()\n// Expose plugin provides globally so page components can read them synchronously\n// regardless of render order.\n;(globalThis as Record<string, unknown>).__cerPluginProvides = _pluginProvides\n\n// \u2500\u2500\u2500 <cer-layout-view> \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\ncomponent('cer-layout-view', () => {\n // Forward plugin-provided values into the component context so inject() in\n // any descendant component can resolve them by walking up the DOM tree.\n for (const [key, value] of _pluginProvides) {\n provide(key, value)\n }\n\n const current = ref(router.getCurrent())\n let unsub: (() => void) | undefined\n\n useOnConnected(() => {\n unsub = router.subscribe((s: typeof current.value) => { current.value = s })\n })\n useOnDisconnected(() => { unsub?.(); unsub = undefined })\n\n if (currentError.value !== null) {\n if (hasError && errorTag) {\n return { tag: errorTag, props: { attrs: { error: String(currentError.value) } }, children: [] }\n }\n return { tag: 'div', props: { attrs: { style: 'padding:2rem;font-family:monospace' } }, children: String(currentError.value) }\n }\n\n if (isNavigating.value && hasLoading && loadingTag) {\n return { tag: loadingTag, props: {}, children: [] }\n }\n\n const matched = router.matchRoute(current.value.path)\n const routeMeta = matched?.route?.meta as { layout?: string } | undefined\n const layoutName = routeMeta?.layout ?? 'default'\n const layoutTag = (layouts as Record<string, string>)[layoutName]\n const routerView = { tag: 'router-view', props: {}, children: [] }\n\n if (layoutTag) return { tag: layoutTag, props: {}, children: [routerView] }\n return routerView\n})\n\nfor (const plugin of plugins) {\n if (plugin && typeof plugin.setup === 'function') {\n await plugin.setup({\n router,\n provide: (key: string, value: unknown) => { _pluginProvides.set(key, value) },\n config: {},\n })\n }\n}\n\n// \u2500\u2500\u2500 Pre-load initial route \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n// Download the current page's route chunk AFTER plugins run so that\n// cer-layout-view's first render (which calls provide()) completes before\n// page components are defined and their renders are scheduled. This ensures\n// inject() in child components can find values stored by provide().\n\nif (typeof window !== 'undefined') {\n const _initMatch = router.matchRoute(window.location.pathname)\n if (_initMatch?.route?.load) {\n try { await _initMatch.route.load() } catch { /* non-fatal */ }\n }\n}\n\n// \u2500\u2500\u2500 Initial navigation \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\nif (typeof window !== 'undefined') {\n // Use the original (unwrapped) replace so isNavigating stays false during\n // the initial paint \u2014 the loading component must not flash over pre-rendered content.\n await _replace(window.location.pathname + window.location.search + window.location.hash)\n // Clear SSR loader data after initial navigation so subsequent client-side\n // navigations don't accidentally reuse stale server data.\n delete (globalThis as Record<string, unknown>).__CER_DATA__\n}\n\nexport { router }\n";
|
|
8
|
+
//# sourceMappingURL=app-template.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"app-template.d.ts","sourceRoot":"","sources":["../../src/runtime/app-template.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,eAAO,MAAM,kBAAkB,82NAsJ9B,CAAA"}
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Template string for the default `.cer/app.ts` client entry point.
|
|
3
|
+
*
|
|
4
|
+
* Written to `.cer/app.ts` when the consumer does not provide `app/app.ts`.
|
|
5
|
+
* Consumers can override by creating their own `app/app.ts`.
|
|
6
|
+
*/
|
|
7
|
+
export const APP_ENTRY_TEMPLATE = `// AUTO-GENERATED by @jasonshimmy/vite-plugin-cer-app
|
|
8
|
+
// This is the default client entry point. Create app/app.ts to override it.
|
|
9
|
+
|
|
10
|
+
import '@jasonshimmy/custom-elements-runtime/css'
|
|
11
|
+
import 'virtual:cer-jit-css'
|
|
12
|
+
import 'virtual:cer-components'
|
|
13
|
+
import routes from 'virtual:cer-routes'
|
|
14
|
+
import layouts from 'virtual:cer-layouts'
|
|
15
|
+
import plugins from 'virtual:cer-plugins'
|
|
16
|
+
import { hasLoading, loadingTag } from 'virtual:cer-loading'
|
|
17
|
+
import { hasError, errorTag } from 'virtual:cer-error'
|
|
18
|
+
import {
|
|
19
|
+
component,
|
|
20
|
+
ref,
|
|
21
|
+
provide,
|
|
22
|
+
useOnConnected,
|
|
23
|
+
useOnDisconnected,
|
|
24
|
+
registerBuiltinComponents,
|
|
25
|
+
} from '@jasonshimmy/custom-elements-runtime'
|
|
26
|
+
import { initRouter } from '@jasonshimmy/custom-elements-runtime/router'
|
|
27
|
+
import { enableJITCSS } from '@jasonshimmy/custom-elements-runtime/jit-css'
|
|
28
|
+
|
|
29
|
+
registerBuiltinComponents()
|
|
30
|
+
enableJITCSS()
|
|
31
|
+
|
|
32
|
+
const router = initRouter({ routes })
|
|
33
|
+
|
|
34
|
+
// ─── Navigation state ────────────────────────────────────────────────────────
|
|
35
|
+
|
|
36
|
+
const isNavigating = ref(false)
|
|
37
|
+
const currentError = ref(null)
|
|
38
|
+
|
|
39
|
+
const resetError = (): void => {
|
|
40
|
+
currentError.value = null
|
|
41
|
+
void router.replace(router.getCurrent().path)
|
|
42
|
+
}
|
|
43
|
+
;(globalThis as Record<string, unknown>).resetError = resetError
|
|
44
|
+
|
|
45
|
+
const _push = router.push.bind(router)
|
|
46
|
+
const _replace = router.replace.bind(router)
|
|
47
|
+
|
|
48
|
+
router.push = async (path) => {
|
|
49
|
+
isNavigating.value = true
|
|
50
|
+
currentError.value = null
|
|
51
|
+
try {
|
|
52
|
+
await _push(path)
|
|
53
|
+
} catch (err) {
|
|
54
|
+
currentError.value = err instanceof Error ? err.message : String(err)
|
|
55
|
+
} finally {
|
|
56
|
+
isNavigating.value = false
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
router.replace = async (path) => {
|
|
61
|
+
isNavigating.value = true
|
|
62
|
+
currentError.value = null
|
|
63
|
+
try {
|
|
64
|
+
await _replace(path)
|
|
65
|
+
} catch (err) {
|
|
66
|
+
currentError.value = err instanceof Error ? err.message : String(err)
|
|
67
|
+
} finally {
|
|
68
|
+
isNavigating.value = false
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
// ─── Plugins ─────────────────────────────────────────────────────────────────
|
|
73
|
+
|
|
74
|
+
// Collect plugin-provided values so cer-layout-view can forward them into
|
|
75
|
+
// the component context tree via the real provide() hook (which inject() walks).
|
|
76
|
+
// Declared BEFORE component('cer-layout-view') to avoid a temporal dead zone
|
|
77
|
+
// ReferenceError: customElements.define() upgrades existing DOM elements
|
|
78
|
+
// synchronously, calling the render function immediately.
|
|
79
|
+
const _pluginProvides = new Map<string, unknown>()
|
|
80
|
+
// Expose plugin provides globally so page components can read them synchronously
|
|
81
|
+
// regardless of render order.
|
|
82
|
+
;(globalThis as Record<string, unknown>).__cerPluginProvides = _pluginProvides
|
|
83
|
+
|
|
84
|
+
// ─── <cer-layout-view> ───────────────────────────────────────────────────────
|
|
85
|
+
|
|
86
|
+
component('cer-layout-view', () => {
|
|
87
|
+
// Forward plugin-provided values into the component context so inject() in
|
|
88
|
+
// any descendant component can resolve them by walking up the DOM tree.
|
|
89
|
+
for (const [key, value] of _pluginProvides) {
|
|
90
|
+
provide(key, value)
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
const current = ref(router.getCurrent())
|
|
94
|
+
let unsub: (() => void) | undefined
|
|
95
|
+
|
|
96
|
+
useOnConnected(() => {
|
|
97
|
+
unsub = router.subscribe((s: typeof current.value) => { current.value = s })
|
|
98
|
+
})
|
|
99
|
+
useOnDisconnected(() => { unsub?.(); unsub = undefined })
|
|
100
|
+
|
|
101
|
+
if (currentError.value !== null) {
|
|
102
|
+
if (hasError && errorTag) {
|
|
103
|
+
return { tag: errorTag, props: { attrs: { error: String(currentError.value) } }, children: [] }
|
|
104
|
+
}
|
|
105
|
+
return { tag: 'div', props: { attrs: { style: 'padding:2rem;font-family:monospace' } }, children: String(currentError.value) }
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
if (isNavigating.value && hasLoading && loadingTag) {
|
|
109
|
+
return { tag: loadingTag, props: {}, children: [] }
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
const matched = router.matchRoute(current.value.path)
|
|
113
|
+
const routeMeta = matched?.route?.meta as { layout?: string } | undefined
|
|
114
|
+
const layoutName = routeMeta?.layout ?? 'default'
|
|
115
|
+
const layoutTag = (layouts as Record<string, string>)[layoutName]
|
|
116
|
+
const routerView = { tag: 'router-view', props: {}, children: [] }
|
|
117
|
+
|
|
118
|
+
if (layoutTag) return { tag: layoutTag, props: {}, children: [routerView] }
|
|
119
|
+
return routerView
|
|
120
|
+
})
|
|
121
|
+
|
|
122
|
+
for (const plugin of plugins) {
|
|
123
|
+
if (plugin && typeof plugin.setup === 'function') {
|
|
124
|
+
await plugin.setup({
|
|
125
|
+
router,
|
|
126
|
+
provide: (key: string, value: unknown) => { _pluginProvides.set(key, value) },
|
|
127
|
+
config: {},
|
|
128
|
+
})
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
// ─── Pre-load initial route ───────────────────────────────────────────────────
|
|
133
|
+
// Download the current page's route chunk AFTER plugins run so that
|
|
134
|
+
// cer-layout-view's first render (which calls provide()) completes before
|
|
135
|
+
// page components are defined and their renders are scheduled. This ensures
|
|
136
|
+
// inject() in child components can find values stored by provide().
|
|
137
|
+
|
|
138
|
+
if (typeof window !== 'undefined') {
|
|
139
|
+
const _initMatch = router.matchRoute(window.location.pathname)
|
|
140
|
+
if (_initMatch?.route?.load) {
|
|
141
|
+
try { await _initMatch.route.load() } catch { /* non-fatal */ }
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
// ─── Initial navigation ──────────────────────────────────────────────────────
|
|
146
|
+
|
|
147
|
+
if (typeof window !== 'undefined') {
|
|
148
|
+
// Use the original (unwrapped) replace so isNavigating stays false during
|
|
149
|
+
// the initial paint — the loading component must not flash over pre-rendered content.
|
|
150
|
+
await _replace(window.location.pathname + window.location.search + window.location.hash)
|
|
151
|
+
// Clear SSR loader data after initial navigation so subsequent client-side
|
|
152
|
+
// navigations don't accidentally reuse stale server data.
|
|
153
|
+
delete (globalThis as Record<string, unknown>).__CER_DATA__
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
export { router }
|
|
157
|
+
`;
|
|
158
|
+
//# sourceMappingURL=app-template.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"app-template.js","sourceRoot":"","sources":["../../src/runtime/app-template.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsJjC,CAAA"}
|
package/docs/cli.md
CHANGED
|
@@ -148,9 +148,11 @@ dist/
|
|
|
148
148
|
|
|
149
149
|
Scaffolds a new project from a template.
|
|
150
150
|
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
```
|
|
151
|
+
> **Note:** Because the scaffolder is bundled inside `@jasonshimmy/vite-plugin-cer-app` rather than published as a standalone `create-cer-app` package, you must use the `--package` flag with `npx`:
|
|
152
|
+
>
|
|
153
|
+
> ```sh
|
|
154
|
+
> npx --package @jasonshimmy/vite-plugin-cer-app create-cer-app [project-name] [options]
|
|
155
|
+
> ```
|
|
154
156
|
|
|
155
157
|
| Argument / Option | Description |
|
|
156
158
|
|---|---|
|
|
@@ -161,10 +163,10 @@ create-cer-app [project-name] [options]
|
|
|
161
163
|
**Examples:**
|
|
162
164
|
|
|
163
165
|
```sh
|
|
164
|
-
create-cer-app # interactive prompts
|
|
165
|
-
create-cer-app my-app # prompts for mode
|
|
166
|
-
create-cer-app my-app --mode ssr # no prompts
|
|
167
|
-
create-cer-app my-blog --mode ssg --dir ./sites/blog
|
|
166
|
+
npx --package @jasonshimmy/vite-plugin-cer-app create-cer-app # interactive prompts
|
|
167
|
+
npx --package @jasonshimmy/vite-plugin-cer-app create-cer-app my-app # prompts for mode
|
|
168
|
+
npx --package @jasonshimmy/vite-plugin-cer-app create-cer-app my-app --mode ssr # no prompts
|
|
169
|
+
npx --package @jasonshimmy/vite-plugin-cer-app create-cer-app my-blog --mode ssg --dir ./sites/blog
|
|
168
170
|
```
|
|
169
171
|
|
|
170
172
|
**Scaffolded files (all modes):**
|
|
@@ -231,5 +233,5 @@ npm run preview
|
|
|
231
233
|
```sh
|
|
232
234
|
npx cer-app dev
|
|
233
235
|
npx cer-app build
|
|
234
|
-
npx create-cer-app my-app
|
|
236
|
+
npx --package @jasonshimmy/vite-plugin-cer-app create-cer-app my-app
|
|
235
237
|
```
|
package/docs/configuration.md
CHANGED
|
@@ -88,7 +88,7 @@ Controls SSR rendering behavior.
|
|
|
88
88
|
```ts
|
|
89
89
|
ssr: {
|
|
90
90
|
dsd: true, // Emit Declarative Shadow DOM
|
|
91
|
-
streaming: false //
|
|
91
|
+
streaming: false // Reserved for future use
|
|
92
92
|
}
|
|
93
93
|
```
|
|
94
94
|
|
|
@@ -104,7 +104,7 @@ When `true`, renders components with [Declarative Shadow DOM](https://developer.
|
|
|
104
104
|
**Type:** `boolean`
|
|
105
105
|
**Default:** `false`
|
|
106
106
|
|
|
107
|
-
|
|
107
|
+
Reserved for future use. Currently, the SSR renderer always collects the full HTML string before sending the response.
|
|
108
108
|
|
|
109
109
|
---
|
|
110
110
|
|
|
@@ -217,8 +217,10 @@ When `runtime: true`, the following are injected if used and not already importe
|
|
|
217
217
|
```ts
|
|
218
218
|
import { component, html, css, ref, computed, watch, watchEffect,
|
|
219
219
|
useProps, useEmit, useOnConnected, useOnDisconnected,
|
|
220
|
-
useOnAttributeChanged, useOnError, useStyle,
|
|
221
|
-
useSlots, provide, inject,
|
|
220
|
+
useOnAttributeChanged, useOnError, useStyle, useDesignTokens,
|
|
221
|
+
useGlobalStyle, useExpose, useSlots, provide, inject,
|
|
222
|
+
createComposable, nextTick, defineModel, getCurrentComponentContext,
|
|
223
|
+
isReactiveState, unsafeHTML, decodeEntities, useTeleport
|
|
222
224
|
} from '@jasonshimmy/custom-elements-runtime'
|
|
223
225
|
```
|
|
224
226
|
|
package/docs/getting-started.md
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
## Option A — Scaffold with `create-cer-app` (recommended)
|
|
12
12
|
|
|
13
13
|
```sh
|
|
14
|
-
npx create-cer-app my-app
|
|
14
|
+
npx --package @jasonshimmy/vite-plugin-cer-app create-cer-app my-app
|
|
15
15
|
```
|
|
16
16
|
|
|
17
17
|
The interactive prompt asks for a project name and rendering mode:
|
|
@@ -39,7 +39,7 @@ Project created! To get started:
|
|
|
39
39
|
You can also skip the prompts with flags:
|
|
40
40
|
|
|
41
41
|
```sh
|
|
42
|
-
npx create-cer-app my-app --mode ssr
|
|
42
|
+
npx --package @jasonshimmy/vite-plugin-cer-app create-cer-app my-app --mode ssr
|
|
43
43
|
```
|
|
44
44
|
|
|
45
45
|
---
|
package/docs/rendering-modes.md
CHANGED
|
@@ -63,9 +63,9 @@ The server renders HTML for each request. Uses Declarative Shadow DOM (DSD) to e
|
|
|
63
63
|
3. API route handlers run if the URL matches `/api/`
|
|
64
64
|
4. For HTML requests, the router matches the URL to a page
|
|
65
65
|
5. The page's `loader` is called (if present)
|
|
66
|
-
6. The component tree is rendered to HTML via `
|
|
66
|
+
6. The component tree is rendered to HTML with Declarative Shadow DOM via `renderToStringWithJITCSSDSD`
|
|
67
67
|
7. `useHead()` calls are collected and injected before `</head>`
|
|
68
|
-
8. The
|
|
68
|
+
8. The rendered HTML is merged with the Vite client bundle shell and sent as a full response
|
|
69
69
|
|
|
70
70
|
### Build output
|
|
71
71
|
|
package/docs/routing.md
CHANGED
|
@@ -10,7 +10,7 @@ Routes are automatically derived from files in the `app/pages/` directory. No ma
|
|
|
10
10
|
|---|---|---|
|
|
11
11
|
| `app/pages/index.ts` | `/` | `page-index` |
|
|
12
12
|
| `app/pages/about.ts` | `/about` | `page-about` |
|
|
13
|
-
| `app/pages/blog/index.ts` | `/blog` | `page-blog
|
|
13
|
+
| `app/pages/blog/index.ts` | `/blog` | `page-blog` |
|
|
14
14
|
| `app/pages/blog/[slug].ts` | `/blog/:slug` | `page-blog-slug` |
|
|
15
15
|
| `app/pages/users/[id]/edit.ts` | `/users/:id/edit` | `page-users-id-edit` |
|
|
16
16
|
| `app/pages/404.ts` | `/:all*` (catch-all) | `page-404` |
|
package/eslint.config.ts
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import tseslint from 'typescript-eslint'
|
|
2
|
+
|
|
3
|
+
export default tseslint.config(
|
|
4
|
+
{
|
|
5
|
+
ignores: [
|
|
6
|
+
'dist/**',
|
|
7
|
+
'node_modules/**',
|
|
8
|
+
'coverage/**',
|
|
9
|
+
'e2e/**',
|
|
10
|
+
'src/__tests__/**',
|
|
11
|
+
'src/cli/create/templates/**',
|
|
12
|
+
],
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
files: ['src/**/*.ts'],
|
|
16
|
+
extends: [...tseslint.configs.recommended],
|
|
17
|
+
rules: {
|
|
18
|
+
'@typescript-eslint/no-explicit-any': 'error',
|
|
19
|
+
'@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_', varsIgnorePattern: '^_' }],
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jasonshimmy/vite-plugin-cer-app",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "Nuxt-style meta-framework for @jasonshimmy/custom-elements-runtime",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"keywords": [
|
|
@@ -44,8 +44,10 @@
|
|
|
44
44
|
"create-cer-app": "./dist/cli/create/index.js"
|
|
45
45
|
},
|
|
46
46
|
"scripts": {
|
|
47
|
-
"
|
|
47
|
+
"validate": "npm run lint && npm test && npm run build && npm run e2e",
|
|
48
|
+
"build": "tsc -p tsconfig.build.json && cp -r src/cli/create/templates dist/cli/create/templates",
|
|
48
49
|
"dev": "tsc -p tsconfig.build.json --watch",
|
|
50
|
+
"lint": "eslint",
|
|
49
51
|
"test": "vitest run",
|
|
50
52
|
"test:watch": "vitest",
|
|
51
53
|
"test:coverage": "vitest run --coverage",
|
|
@@ -80,9 +82,12 @@
|
|
|
80
82
|
"@types/node": "^25.5.0",
|
|
81
83
|
"@vitest/coverage-v8": "^4.1.0",
|
|
82
84
|
"cypress": "^15.12.0",
|
|
85
|
+
"eslint": "^10.0.3",
|
|
83
86
|
"happy-dom": "^20.8.4",
|
|
87
|
+
"jiti": "^2.6.1",
|
|
84
88
|
"start-server-and-test": "^2.1.5",
|
|
85
89
|
"typescript": "^5.9.3",
|
|
90
|
+
"typescript-eslint": "^8.57.1",
|
|
86
91
|
"vite": "^8.0.1",
|
|
87
92
|
"vitest": "^4.1.0"
|
|
88
93
|
},
|
|
@@ -6,11 +6,16 @@ import { resolve } from 'pathe'
|
|
|
6
6
|
// The `buildSSR` function itself invokes Vite's `build` API which we don't
|
|
7
7
|
// need to exercise in unit tests (it's an integration concern).
|
|
8
8
|
vi.mock('vite', () => ({ build: vi.fn().mockResolvedValue(undefined) }))
|
|
9
|
+
vi.mock('../../plugin/generated-dir.js', () => ({
|
|
10
|
+
writeGeneratedDir: vi.fn(),
|
|
11
|
+
getGeneratedDir: vi.fn().mockReturnValue('/project/.cer'),
|
|
12
|
+
GENERATED_DIR_NAME: '.cer',
|
|
13
|
+
}))
|
|
9
14
|
// Partial mock: keep the real readFileSync/existsSync but allow overrides in
|
|
10
15
|
// individual describe blocks if needed.
|
|
11
16
|
vi.mock('node:fs', async (importOriginal) => {
|
|
12
17
|
const actual = await importOriginal<typeof import('node:fs')>()
|
|
13
|
-
return { ...actual, existsSync: vi.fn().mockReturnValue(true) }
|
|
18
|
+
return { ...actual, existsSync: vi.fn().mockReturnValue(true), renameSync: vi.fn() }
|
|
14
19
|
})
|
|
15
20
|
|
|
16
21
|
import type { ResolvedCerConfig } from '../../plugin/dev-server.js'
|
|
@@ -202,24 +207,33 @@ describe('buildSSR — resolveClientEntry fallbacks', () => {
|
|
|
202
207
|
})
|
|
203
208
|
|
|
204
209
|
it('uses index.html when it exists', async () => {
|
|
205
|
-
existsSyncMock.
|
|
210
|
+
existsSyncMock.mockImplementation((p: unknown) => String(p).endsWith('index.html'))
|
|
206
211
|
await buildSSR(makeConfig())
|
|
207
|
-
const clientInput = (buildMock.mock.calls[0][0] as
|
|
208
|
-
expect(clientInput).toMatch(/index\.html$/)
|
|
212
|
+
const clientInput = (buildMock.mock.calls[0][0] as Record<string, unknown>)
|
|
213
|
+
expect(((clientInput.build as Record<string, unknown>).rollupOptions as Record<string, unknown>).input).toMatch(/(?<!\.cer\/)index\.html$/)
|
|
209
214
|
})
|
|
210
215
|
|
|
211
|
-
it('falls back to
|
|
216
|
+
it('falls back to .cer/index.html when root index.html is absent', async () => {
|
|
217
|
+
existsSyncMock.mockImplementation((p: unknown) =>
|
|
218
|
+
String(p).endsWith('.cer/index.html'),
|
|
219
|
+
)
|
|
220
|
+
await buildSSR(makeConfig())
|
|
221
|
+
const clientInput = (buildMock.mock.calls[0][0] as Record<string, unknown>)
|
|
222
|
+
expect(((clientInput.build as Record<string, unknown>).rollupOptions as Record<string, unknown>).input).toMatch(/\.cer\/index\.html$/)
|
|
223
|
+
})
|
|
224
|
+
|
|
225
|
+
it('falls back to entry-client.ts when no index.html exists', async () => {
|
|
212
226
|
existsSyncMock.mockImplementation((p: unknown) => String(p).endsWith('entry-client.ts'))
|
|
213
227
|
await buildSSR(makeConfig())
|
|
214
|
-
const clientInput = (buildMock.mock.calls[0][0] as
|
|
215
|
-
expect(clientInput).toMatch(/entry-client\.ts$/)
|
|
228
|
+
const clientInput = (buildMock.mock.calls[0][0] as Record<string, unknown>)
|
|
229
|
+
expect(((clientInput.build as Record<string, unknown>).rollupOptions as Record<string, unknown>).input).toMatch(/entry-client\.ts$/)
|
|
216
230
|
})
|
|
217
231
|
|
|
218
|
-
it('falls back to app.ts when
|
|
232
|
+
it('falls back to app.ts when nothing else exists', async () => {
|
|
219
233
|
existsSyncMock.mockReturnValue(false)
|
|
220
234
|
await buildSSR(makeConfig())
|
|
221
|
-
const clientInput = (buildMock.mock.calls[0][0] as
|
|
222
|
-
expect(clientInput).toMatch(/app\.ts$/)
|
|
235
|
+
const clientInput = (buildMock.mock.calls[0][0] as Record<string, unknown>)
|
|
236
|
+
expect(((clientInput.build as Record<string, unknown>).rollupOptions as Record<string, unknown>).input).toMatch(/app\.ts$/)
|
|
223
237
|
})
|
|
224
238
|
})
|
|
225
239
|
|