@jasonshimmy/vite-plugin-cer-app 0.1.6 → 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 +4 -0
- 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/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/configuration.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 +6 -1
- 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
- package/e2e/kitchen-sink/index.html +0 -12
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { ResolvedCerConfig } from './dev-server.js';
|
|
2
|
+
/** The name of the generated directory relative to the project root. */
|
|
3
|
+
export declare const GENERATED_DIR_NAME = ".cer";
|
|
4
|
+
/**
|
|
5
|
+
* Returns the absolute path to the .cer/ generated directory.
|
|
6
|
+
*/
|
|
7
|
+
export declare function getGeneratedDir(root: string): string;
|
|
8
|
+
/**
|
|
9
|
+
* Returns the app entry file path to use for builds and the dev server.
|
|
10
|
+
* Prefers the consumer's `app/app.ts` when it exists; falls back to `.cer/app.ts`.
|
|
11
|
+
*/
|
|
12
|
+
export declare function resolveAppEntry(config: ResolvedCerConfig): string;
|
|
13
|
+
/**
|
|
14
|
+
* Returns the HTML entry path to use for builds.
|
|
15
|
+
* Prefers the consumer's root-level `index.html` when it exists;
|
|
16
|
+
* falls back to `.cer/index.html`.
|
|
17
|
+
*/
|
|
18
|
+
export declare function resolveHtmlEntry(config: ResolvedCerConfig): string;
|
|
19
|
+
/**
|
|
20
|
+
* Generates the content for a default `index.html`.
|
|
21
|
+
* The script src points to the consumer's `app/app.ts` if it exists,
|
|
22
|
+
* otherwise to the generated `.cer/app.ts`.
|
|
23
|
+
*/
|
|
24
|
+
export declare function generateDefaultHtml(config: ResolvedCerConfig): string;
|
|
25
|
+
/**
|
|
26
|
+
* Writes all generated files to `.cer/`:
|
|
27
|
+
* - `.cer/app.ts` — default entry (only when `app/app.ts` does not exist)
|
|
28
|
+
* - `.cer/index.html` — default HTML shell
|
|
29
|
+
* - `.cer/tsconfig.json` — written by dts-generator via writeTsconfigPaths
|
|
30
|
+
*
|
|
31
|
+
* Also ensures `.cer/` is listed in `.gitignore`.
|
|
32
|
+
*/
|
|
33
|
+
export declare function writeGeneratedDir(config: ResolvedCerConfig): void;
|
|
34
|
+
//# sourceMappingURL=generated-dir.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generated-dir.d.ts","sourceRoot":"","sources":["../../src/plugin/generated-dir.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAA;AAGxD,wEAAwE;AACxE,eAAO,MAAM,kBAAkB,SAAS,CAAA;AAExC;;GAEG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEpD;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,iBAAiB,GAAG,MAAM,CAIjE;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,iBAAiB,GAAG,MAAM,CAIlE;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,iBAAiB,GAAG,MAAM,CAgBrE;AAoBD;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,iBAAiB,GAAG,IAAI,CAgBjE"}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { writeFileSync, existsSync, mkdirSync, readFileSync, appendFileSync } from 'node:fs';
|
|
2
|
+
import { join } from 'pathe';
|
|
3
|
+
import { APP_ENTRY_TEMPLATE } from '../runtime/app-template.js';
|
|
4
|
+
/** The name of the generated directory relative to the project root. */
|
|
5
|
+
export const GENERATED_DIR_NAME = '.cer';
|
|
6
|
+
/**
|
|
7
|
+
* Returns the absolute path to the .cer/ generated directory.
|
|
8
|
+
*/
|
|
9
|
+
export function getGeneratedDir(root) {
|
|
10
|
+
return join(root, GENERATED_DIR_NAME);
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Returns the app entry file path to use for builds and the dev server.
|
|
14
|
+
* Prefers the consumer's `app/app.ts` when it exists; falls back to `.cer/app.ts`.
|
|
15
|
+
*/
|
|
16
|
+
export function resolveAppEntry(config) {
|
|
17
|
+
const userEntry = join(config.srcDir, 'app.ts');
|
|
18
|
+
if (existsSync(userEntry))
|
|
19
|
+
return userEntry;
|
|
20
|
+
return join(getGeneratedDir(config.root), 'app.ts');
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Returns the HTML entry path to use for builds.
|
|
24
|
+
* Prefers the consumer's root-level `index.html` when it exists;
|
|
25
|
+
* falls back to `.cer/index.html`.
|
|
26
|
+
*/
|
|
27
|
+
export function resolveHtmlEntry(config) {
|
|
28
|
+
const userHtml = join(config.root, 'index.html');
|
|
29
|
+
if (existsSync(userHtml))
|
|
30
|
+
return userHtml;
|
|
31
|
+
return join(getGeneratedDir(config.root), 'index.html');
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Generates the content for a default `index.html`.
|
|
35
|
+
* The script src points to the consumer's `app/app.ts` if it exists,
|
|
36
|
+
* otherwise to the generated `.cer/app.ts`.
|
|
37
|
+
*/
|
|
38
|
+
export function generateDefaultHtml(config) {
|
|
39
|
+
const userEntry = join(config.srcDir, 'app.ts');
|
|
40
|
+
const scriptSrc = existsSync(userEntry) ? '/app/app.ts' : '/.cer/app.ts';
|
|
41
|
+
return `<!DOCTYPE html>
|
|
42
|
+
<html lang="en">
|
|
43
|
+
<head>
|
|
44
|
+
<meta charset="UTF-8" />
|
|
45
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
46
|
+
<title>CER App</title>
|
|
47
|
+
</head>
|
|
48
|
+
<body>
|
|
49
|
+
<cer-layout-view></cer-layout-view>
|
|
50
|
+
<script type="module" src="${scriptSrc}"></script>
|
|
51
|
+
</body>
|
|
52
|
+
</html>
|
|
53
|
+
`;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Ensures `.cer/` is listed in the project's `.gitignore`.
|
|
57
|
+
* Creates `.gitignore` if it does not exist.
|
|
58
|
+
*/
|
|
59
|
+
function ensureGitignore(root) {
|
|
60
|
+
const gitignorePath = join(root, '.gitignore');
|
|
61
|
+
const entry = `${GENERATED_DIR_NAME}/`;
|
|
62
|
+
if (existsSync(gitignorePath)) {
|
|
63
|
+
const content = readFileSync(gitignorePath, 'utf-8');
|
|
64
|
+
if (!content.includes(entry) && !content.includes(`${GENERATED_DIR_NAME}\n`)) {
|
|
65
|
+
appendFileSync(gitignorePath, `\n# CER App generated directory\n${entry}\n`);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
else {
|
|
69
|
+
writeFileSync(gitignorePath, `# CER App generated directory\n${entry}\n`);
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Writes all generated files to `.cer/`:
|
|
74
|
+
* - `.cer/app.ts` — default entry (only when `app/app.ts` does not exist)
|
|
75
|
+
* - `.cer/index.html` — default HTML shell
|
|
76
|
+
* - `.cer/tsconfig.json` — written by dts-generator via writeTsconfigPaths
|
|
77
|
+
*
|
|
78
|
+
* Also ensures `.cer/` is listed in `.gitignore`.
|
|
79
|
+
*/
|
|
80
|
+
export function writeGeneratedDir(config) {
|
|
81
|
+
const dir = getGeneratedDir(config.root);
|
|
82
|
+
if (!existsSync(dir)) {
|
|
83
|
+
mkdirSync(dir, { recursive: true });
|
|
84
|
+
}
|
|
85
|
+
// Write default app.ts only when the consumer has not provided one.
|
|
86
|
+
const userEntry = join(config.srcDir, 'app.ts');
|
|
87
|
+
if (!existsSync(userEntry)) {
|
|
88
|
+
writeFileSync(join(dir, 'app.ts'), APP_ENTRY_TEMPLATE, 'utf-8');
|
|
89
|
+
}
|
|
90
|
+
// Always write the default index.html so builds and the dev server can use it.
|
|
91
|
+
writeFileSync(join(dir, 'index.html'), generateDefaultHtml(config), 'utf-8');
|
|
92
|
+
ensureGitignore(config.root);
|
|
93
|
+
}
|
|
94
|
+
//# sourceMappingURL=generated-dir.js.map
|
|
@@ -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,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AC,MAAM,CAAC,IAAI,CAAC,CAAA;IACxC,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE,CAAC;QACrB,SAAS,CAAC,GAAG,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAA;IACrC,CAAC;IAED,oEAAoE;IACpE,MAAM,SAAS,GAAG,IAAI,CAAC,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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C,CAAA;IAClD,OAAO,KAAK,CAAC,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAA;AAClD,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,eAAe,CAAC,KAAe;IAC7C,OAAO,CAAC,GAAG,KAAK,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/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
|
|
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
|
+
"validate": "npm run lint && npm test && npm run build && npm run e2e",
|
|
47
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
|
},
|