@cedarjs/vite 5.0.6 → 5.0.7-next.186
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/api/vite-plugin-cedar-vitest-api-preset.d.ts.map +1 -1
- package/dist/api/vite-plugin-cedar-vitest-api-preset.js +4 -0
- package/dist/apiDevMiddleware.d.ts.map +1 -1
- package/dist/apiDevMiddleware.js +117 -15
- package/dist/buildApp.d.ts.map +1 -1
- package/dist/buildApp.js +79 -18
- package/dist/buildRouteHooks.d.ts.map +1 -1
- package/dist/buildRouteHooks.js +36 -4
- package/dist/bundled/react-server-dom-webpack.server.js +192 -99
- package/dist/cedar-unified-dev.d.ts +18 -0
- package/dist/cedar-unified-dev.d.ts.map +1 -1
- package/dist/cedar-unified-dev.js +39 -5
- package/dist/devFeServer.js +3 -8
- package/dist/index.d.ts +11 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +51 -19
- package/dist/lib/generateDiffSourceMap.d.ts +18 -0
- package/dist/lib/generateDiffSourceMap.d.ts.map +1 -0
- package/dist/lib/generateDiffSourceMap.js +151 -0
- package/dist/lib/getMergedConfig.d.ts.map +1 -1
- package/dist/lib/getMergedConfig.js +4 -0
- package/dist/plugins/vite-plugin-cedar-api-import-guard.d.ts +13 -0
- package/dist/plugins/vite-plugin-cedar-api-import-guard.d.ts.map +1 -0
- package/dist/plugins/vite-plugin-cedar-api-import-guard.js +17 -0
- package/dist/plugins/vite-plugin-cedar-auto-import.d.ts +1 -1
- package/dist/plugins/vite-plugin-cedar-auto-import.d.ts.map +1 -1
- package/dist/plugins/vite-plugin-cedar-auto-import.js +8 -1
- package/dist/plugins/vite-plugin-cedar-cell.d.ts.map +1 -1
- package/dist/plugins/vite-plugin-cedar-cell.js +2 -1
- package/dist/plugins/vite-plugin-cedar-data-uri-shim.d.ts +3 -0
- package/dist/plugins/vite-plugin-cedar-data-uri-shim.d.ts.map +1 -0
- package/dist/plugins/vite-plugin-cedar-data-uri-shim.js +43 -0
- package/dist/plugins/vite-plugin-cedar-directory-named-import.d.ts +12 -0
- package/dist/plugins/vite-plugin-cedar-directory-named-import.d.ts.map +1 -0
- package/dist/plugins/vite-plugin-cedar-directory-named-import.js +35 -0
- package/dist/plugins/vite-plugin-cedar-gqlorm-inject.d.ts +29 -0
- package/dist/plugins/vite-plugin-cedar-gqlorm-inject.d.ts.map +1 -0
- package/dist/plugins/vite-plugin-cedar-gqlorm-inject.js +76 -0
- package/dist/plugins/vite-plugin-cedar-graphql-options-extract.d.ts +42 -0
- package/dist/plugins/vite-plugin-cedar-graphql-options-extract.d.ts.map +1 -0
- package/dist/plugins/vite-plugin-cedar-graphql-options-extract.js +93 -0
- package/dist/plugins/vite-plugin-cedar-import-dir.d.ts.map +1 -1
- package/dist/plugins/vite-plugin-cedar-import-dir.js +44 -31
- package/dist/plugins/vite-plugin-cedar-log-formatter-dev.d.ts +28 -0
- package/dist/plugins/vite-plugin-cedar-log-formatter-dev.d.ts.map +1 -0
- package/dist/plugins/vite-plugin-cedar-log-formatter-dev.js +67 -0
- package/dist/plugins/vite-plugin-cedar-mock-cell-data.d.ts +28 -0
- package/dist/plugins/vite-plugin-cedar-mock-cell-data.d.ts.map +1 -0
- package/dist/plugins/vite-plugin-cedar-mock-cell-data.js +247 -0
- package/dist/plugins/vite-plugin-cedar-otel-wrapping.d.ts +39 -0
- package/dist/plugins/vite-plugin-cedar-otel-wrapping.d.ts.map +1 -0
- package/dist/plugins/vite-plugin-cedar-otel-wrapping.js +200 -0
- package/dist/plugins/vite-plugin-cedar-universal-deploy.d.ts.map +1 -1
- package/dist/plugins/vite-plugin-cedar-universal-deploy.js +92 -90
- package/dist/plugins/vite-plugin-cedarjs-job-path-injector.d.ts +29 -0
- package/dist/plugins/vite-plugin-cedarjs-job-path-injector.d.ts.map +1 -1
- package/dist/plugins/vite-plugin-cedarjs-job-path-injector.js +63 -81
- package/dist/plugins/vite-plugin-cedarjs-resolve-cedar-style-imports.d.ts.map +1 -1
- package/dist/plugins/vite-plugin-cedarjs-resolve-cedar-style-imports.js +14 -0
- package/dist/plugins/{vite-plugin-cedar-context-wrapping.d.ts → vite-plugin-handler-als-wrapping.d.ts} +12 -12
- package/dist/plugins/vite-plugin-handler-als-wrapping.d.ts.map +1 -0
- package/dist/plugins/{vite-plugin-cedar-context-wrapping.js → vite-plugin-handler-als-wrapping.js} +16 -16
- package/dist/plugins/vite-plugin-swap-apollo-provider.d.ts +3 -0
- package/dist/plugins/vite-plugin-swap-apollo-provider.d.ts.map +1 -1
- package/dist/plugins/vite-plugin-swap-apollo-provider.js +2 -2
- package/dist/rsc/rscBuildForSsr.d.ts.map +1 -1
- package/dist/rsc/rscBuildForSsr.js +3 -5
- package/dist/streaming/buildForStreamingServer.d.ts.map +1 -1
- package/dist/streaming/buildForStreamingServer.js +3 -5
- package/package.json +41 -52
- package/dist/cjs/ClientRouter.d.ts +0 -1
- package/dist/cjs/api/vite-plugin-cedar-vitest-api-preset.js +0 -37
- package/dist/cjs/apiDevMiddleware.js +0 -371
- package/dist/cjs/build/build.d.ts +0 -1
- package/dist/cjs/build/build.js +0 -58
- package/dist/cjs/buildApp.js +0 -306
- package/dist/cjs/buildFeServer.d.ts +0 -1
- package/dist/cjs/buildFeServer.js +0 -63
- package/dist/cjs/buildRouteHooks.js +0 -80
- package/dist/cjs/buildRouteManifest.js +0 -92
- package/dist/cjs/buildRscClientAndServer.js +0 -54
- package/dist/cjs/cedar-unified-dev.js +0 -310
- package/dist/cjs/client.d.ts +0 -1
- package/dist/cjs/clientSsr.d.ts +0 -1
- package/dist/cjs/devFeServer.js +0 -157
- package/dist/cjs/index.d.ts +0 -1
- package/dist/cjs/index.js +0 -141
- package/dist/cjs/lib/StatusError.js +0 -37
- package/dist/cjs/lib/entries.js +0 -52
- package/dist/cjs/lib/getMergedConfig.js +0 -185
- package/dist/cjs/lib/onWarn.js +0 -36
- package/dist/cjs/lib/registerFwGlobalsAndShims.js +0 -102
- package/dist/cjs/lib/workspacePackageAliases.js +0 -107
- package/dist/cjs/middleware/index.js +0 -22
- package/dist/cjs/middleware/invokeMiddleware.js +0 -52
- package/dist/cjs/middleware/register.js +0 -105
- package/dist/cjs/middleware/types.js +0 -16
- package/dist/cjs/package.json +0 -1
- package/dist/cjs/plugins/vite-plugin-cedar-auto-import.js +0 -107
- package/dist/cjs/plugins/vite-plugin-cedar-cell.js +0 -183
- package/dist/cjs/plugins/vite-plugin-cedar-cjs-compat.js +0 -341
- package/dist/cjs/plugins/vite-plugin-cedar-context-wrapping.js +0 -95
- package/dist/cjs/plugins/vite-plugin-cedar-entry-injection.js +0 -107
- package/dist/cjs/plugins/vite-plugin-cedar-html-env.js +0 -67
- package/dist/cjs/plugins/vite-plugin-cedar-import-dir.js +0 -118
- package/dist/cjs/plugins/vite-plugin-cedar-node-polyfills.js +0 -43
- package/dist/cjs/plugins/vite-plugin-cedar-remove-dev-fatal-error-page.js +0 -61
- package/dist/cjs/plugins/vite-plugin-cedar-remove-from-bundle.js +0 -76
- package/dist/cjs/plugins/vite-plugin-cedar-routes-auto-loader.js +0 -126
- package/dist/cjs/plugins/vite-plugin-cedar-universal-deploy.js +0 -346
- package/dist/cjs/plugins/vite-plugin-cedar-wait-for-api-server.js +0 -134
- package/dist/cjs/plugins/vite-plugin-cedarjs-job-path-injector.js +0 -134
- package/dist/cjs/plugins/vite-plugin-cedarjs-resolve-cedar-style-imports.js +0 -106
- package/dist/cjs/plugins/vite-plugin-jsx-loader.js +0 -42
- package/dist/cjs/plugins/vite-plugin-merged-config.js +0 -39
- package/dist/cjs/plugins/vite-plugin-rsc-analyze.js +0 -104
- package/dist/cjs/plugins/vite-plugin-rsc-reload.js +0 -75
- package/dist/cjs/plugins/vite-plugin-rsc-routes-auto-loader.js +0 -159
- package/dist/cjs/plugins/vite-plugin-rsc-routes-imports.js +0 -125
- package/dist/cjs/plugins/vite-plugin-rsc-ssr-router-import.js +0 -75
- package/dist/cjs/plugins/vite-plugin-rsc-transform-client.js +0 -228
- package/dist/cjs/plugins/vite-plugin-rsc-transform-server.js +0 -398
- package/dist/cjs/plugins/vite-plugin-swap-apollo-provider.js +0 -46
- package/dist/cjs/rsc/rscBuildAnalyze.js +0 -126
- package/dist/cjs/rsc/rscBuildClient.js +0 -91
- package/dist/cjs/rsc/rscBuildCopyCssAssets.js +0 -56
- package/dist/cjs/rsc/rscBuildEntriesFile.js +0 -115
- package/dist/cjs/rsc/rscBuildForServer.js +0 -168
- package/dist/cjs/rsc/rscBuildForSsr.js +0 -173
- package/dist/cjs/rsc/rscBuildRwEnvVars.js +0 -56
- package/dist/cjs/rsc/rscRenderer.js +0 -165
- package/dist/cjs/rsc/rscRequestHandler.js +0 -162
- package/dist/cjs/rsc/rscStudioHandlers.js +0 -156
- package/dist/cjs/runFeServer.js +0 -165
- package/dist/cjs/streaming/buildForStreamingServer.js +0 -65
- package/dist/cjs/streaming/collectCss.js +0 -52
- package/dist/cjs/streaming/createReactStreamingHandler.js +0 -173
- package/dist/cjs/streaming/streamHelpers.js +0 -230
- package/dist/cjs/streaming/transforms/bufferedTransform.js +0 -61
- package/dist/cjs/streaming/transforms/cancelTimeoutTransform.js +0 -34
- package/dist/cjs/streaming/transforms/encode-decode.js +0 -36
- package/dist/cjs/streaming/transforms/serverInjectionTransform.js +0 -84
- package/dist/cjs/streaming/triggerRouteHooks.js +0 -96
- package/dist/cjs/types.js +0 -16
- package/dist/cjs/utils.js +0 -92
- package/dist/package.json +0 -1
- package/dist/plugins/vite-plugin-cedar-context-wrapping.d.ts.map +0 -1
- package/dist/plugins/vite-plugin-cedar-node-polyfills.d.ts +0 -3
- package/dist/plugins/vite-plugin-cedar-node-polyfills.d.ts.map +0 -1
- package/dist/plugins/vite-plugin-cedar-node-polyfills.js +0 -19
|
@@ -1,3 +1,32 @@
|
|
|
1
|
+
import type { SourceMap } from 'magic-string';
|
|
1
2
|
import type { Plugin } from 'vite';
|
|
3
|
+
/**
|
|
4
|
+
* Vite plugin that injects `path` and `name` properties into `createJob()`
|
|
5
|
+
* definitions so the jobs runner can locate and identify the job's module at
|
|
6
|
+
* runtime.
|
|
7
|
+
*
|
|
8
|
+
* Transforms:
|
|
9
|
+
* export const myJob = jobs.createJob({ perform: ... })
|
|
10
|
+
* into:
|
|
11
|
+
* export const myJob = jobs.createJob({ perform: ..., path: "...", name: "myJob" })
|
|
12
|
+
*
|
|
13
|
+
* The extraction uses an oxc-parser AST walk so the transform is robust
|
|
14
|
+
* against nested object properties, aliased imports, and TypeScript syntax.
|
|
15
|
+
* The same logic is duplicated in `@cedarjs/internal`
|
|
16
|
+
* (`applyJobPathInjector`) for the standalone esbuild API build.
|
|
17
|
+
*/
|
|
2
18
|
export declare function cedarjsJobPathInjectorPlugin(): Plugin;
|
|
19
|
+
/**
|
|
20
|
+
* Injects `path` and `name` properties into `createJob()` definitions.
|
|
21
|
+
* Returns the transformed code with a sourcemap, or null if no
|
|
22
|
+
* transformation was needed.
|
|
23
|
+
*
|
|
24
|
+
* Duplicate of `@cedarjs/internal`'s `applyJobPathInjector` so this logic can
|
|
25
|
+
* run inside the Vite plugin pipeline without depending on internal's build
|
|
26
|
+
* output.
|
|
27
|
+
*/
|
|
28
|
+
export declare function applyJobPathInjector(code: string, filePath: string, jobsDir: string): {
|
|
29
|
+
code: string;
|
|
30
|
+
map: SourceMap;
|
|
31
|
+
} | null;
|
|
3
32
|
//# sourceMappingURL=vite-plugin-cedarjs-job-path-injector.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vite-plugin-cedarjs-job-path-injector.d.ts","sourceRoot":"","sources":["../../src/plugins/vite-plugin-cedarjs-job-path-injector.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,MAAM,CAAA;AAIlC,wBAAgB,4BAA4B,IAAI,MAAM,
|
|
1
|
+
{"version":3,"file":"vite-plugin-cedarjs-job-path-injector.d.ts","sourceRoot":"","sources":["../../src/plugins/vite-plugin-cedarjs-job-path-injector.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AAE7C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,MAAM,CAAA;AAIlC;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,4BAA4B,IAAI,MAAM,CAoBrD;AAED;;;;;;;;GAQG;AACH,wBAAgB,oBAAoB,CAClC,IAAI,EAAE,MAAM,EACZ,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,MAAM,GACd;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,SAAS,CAAA;CAAE,GAAG,IAAI,CAiFzC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import path from "node:path";
|
|
2
|
-
import
|
|
2
|
+
import MagicString from "magic-string";
|
|
3
|
+
import { parseSync } from "oxc-parser";
|
|
3
4
|
import { getPaths } from "@cedarjs/project-config";
|
|
4
5
|
function cedarjsJobPathInjectorPlugin() {
|
|
5
6
|
return {
|
|
@@ -8,93 +9,74 @@ function cedarjsJobPathInjectorPlugin() {
|
|
|
8
9
|
if (!code.includes("createJob")) {
|
|
9
10
|
return null;
|
|
10
11
|
}
|
|
11
|
-
const
|
|
12
|
-
|
|
13
|
-
let ast;
|
|
14
|
-
try {
|
|
15
|
-
ast = parse(language, code);
|
|
16
|
-
} catch (error) {
|
|
17
|
-
console.warn("Failed to parse file:", id);
|
|
18
|
-
console.warn(error);
|
|
12
|
+
const result = applyJobPathInjector(code, id, getPaths().api.jobs);
|
|
13
|
+
if (!result) {
|
|
19
14
|
return null;
|
|
20
15
|
}
|
|
21
|
-
const paths = getPaths();
|
|
22
|
-
const edits = [];
|
|
23
|
-
const root = ast.root();
|
|
24
|
-
const createJobCalls = root.findAll({
|
|
25
|
-
rule: {
|
|
26
|
-
pattern: "export const $VAR_NAME = $OBJ.createJob({ $$$PROPS })"
|
|
27
|
-
}
|
|
28
|
-
});
|
|
29
|
-
for (const callNode of createJobCalls) {
|
|
30
|
-
const varNameNode = callNode.getMatch("VAR_NAME");
|
|
31
|
-
const propsNodes = callNode.getMultipleMatches("PROPS");
|
|
32
|
-
if (!varNameNode) {
|
|
33
|
-
continue;
|
|
34
|
-
}
|
|
35
|
-
const importName = varNameNode.text();
|
|
36
|
-
const importPath = path.relative(paths.api.jobs, id);
|
|
37
|
-
const importPathWithoutExtension = importPath.replace(/\.[^/.]+$/, "");
|
|
38
|
-
const pathProperty = `path: ${JSON.stringify(importPathWithoutExtension)}`;
|
|
39
|
-
const nameProperty = `name: ${JSON.stringify(importName)}`;
|
|
40
|
-
let insertText = "";
|
|
41
|
-
if (propsNodes.length > 0) {
|
|
42
|
-
const objectLiteral = callNode.find({
|
|
43
|
-
rule: {
|
|
44
|
-
kind: "object",
|
|
45
|
-
inside: {
|
|
46
|
-
kind: "arguments"
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
});
|
|
50
|
-
if (objectLiteral) {
|
|
51
|
-
insertText = `, ${pathProperty}, ${nameProperty}`;
|
|
52
|
-
const objectText = objectLiteral.text();
|
|
53
|
-
const closeBraceIndex = objectText.lastIndexOf("}");
|
|
54
|
-
if (closeBraceIndex !== -1) {
|
|
55
|
-
const range = objectLiteral.range();
|
|
56
|
-
edits.push({
|
|
57
|
-
startPos: range.start.index + closeBraceIndex,
|
|
58
|
-
endPos: range.start.index + closeBraceIndex,
|
|
59
|
-
insertedText: insertText
|
|
60
|
-
});
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
} else {
|
|
64
|
-
const objectLiteral = callNode.find({
|
|
65
|
-
rule: {
|
|
66
|
-
kind: "object",
|
|
67
|
-
inside: {
|
|
68
|
-
kind: "arguments"
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
});
|
|
72
|
-
if (objectLiteral) {
|
|
73
|
-
insertText = `${pathProperty}, ${nameProperty}`;
|
|
74
|
-
const objectText = objectLiteral.text();
|
|
75
|
-
const openBraceIndex = objectText.indexOf("{");
|
|
76
|
-
if (openBraceIndex !== -1) {
|
|
77
|
-
const range = objectLiteral.range();
|
|
78
|
-
edits.push({
|
|
79
|
-
startPos: range.start.index + openBraceIndex + 1,
|
|
80
|
-
endPos: range.start.index + openBraceIndex + 1,
|
|
81
|
-
insertedText: insertText
|
|
82
|
-
});
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
if (edits.length === 0) {
|
|
88
|
-
return null;
|
|
89
|
-
}
|
|
90
|
-
const modifiedCode = root.commitEdits(edits);
|
|
91
16
|
return {
|
|
92
|
-
code:
|
|
93
|
-
map:
|
|
17
|
+
code: result.code,
|
|
18
|
+
map: result.map
|
|
94
19
|
};
|
|
95
20
|
}
|
|
96
21
|
};
|
|
97
22
|
}
|
|
23
|
+
function applyJobPathInjector(code, filePath, jobsDir) {
|
|
24
|
+
let program;
|
|
25
|
+
try {
|
|
26
|
+
program = parseSync(filePath, code, { sourceType: "module" }).program;
|
|
27
|
+
} catch (error) {
|
|
28
|
+
console.warn("Failed to parse file:", filePath);
|
|
29
|
+
console.warn(error);
|
|
30
|
+
return null;
|
|
31
|
+
}
|
|
32
|
+
const importPath = path.relative(jobsDir, filePath);
|
|
33
|
+
const importPathWithoutExtension = importPath.replace(/\.[^/.]+$/, "");
|
|
34
|
+
const s = new MagicString(code);
|
|
35
|
+
let hasTransformations = false;
|
|
36
|
+
for (const node of program.body) {
|
|
37
|
+
if (node.type !== "ExportNamedDeclaration") {
|
|
38
|
+
continue;
|
|
39
|
+
}
|
|
40
|
+
const decl = node.declaration;
|
|
41
|
+
if (decl?.type !== "VariableDeclaration") {
|
|
42
|
+
continue;
|
|
43
|
+
}
|
|
44
|
+
for (const declarator of decl.declarations) {
|
|
45
|
+
if (declarator.id.type !== "Identifier") {
|
|
46
|
+
continue;
|
|
47
|
+
}
|
|
48
|
+
const init = declarator.init;
|
|
49
|
+
if (init?.type !== "CallExpression") {
|
|
50
|
+
continue;
|
|
51
|
+
}
|
|
52
|
+
const callee = init.callee;
|
|
53
|
+
if (callee.type !== "MemberExpression" || callee.computed || callee.property.type !== "Identifier" || callee.property.name !== "createJob") {
|
|
54
|
+
continue;
|
|
55
|
+
}
|
|
56
|
+
const configArg = init.arguments[0];
|
|
57
|
+
if (configArg?.type !== "ObjectExpression") {
|
|
58
|
+
continue;
|
|
59
|
+
}
|
|
60
|
+
hasTransformations = true;
|
|
61
|
+
const pathProperty = `path: ${JSON.stringify(importPathWithoutExtension)}`;
|
|
62
|
+
const nameProperty = `name: ${JSON.stringify(declarator.id.name)}`;
|
|
63
|
+
const lastProperty = configArg.properties.at(-1);
|
|
64
|
+
if (lastProperty) {
|
|
65
|
+
s.appendLeft(lastProperty.end, `, ${pathProperty}, ${nameProperty}`);
|
|
66
|
+
} else {
|
|
67
|
+
s.appendLeft(configArg.start + 1, `${pathProperty}, ${nameProperty}`);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
if (!hasTransformations) {
|
|
72
|
+
return null;
|
|
73
|
+
}
|
|
74
|
+
return {
|
|
75
|
+
code: s.toString(),
|
|
76
|
+
map: s.generateMap({ hires: true })
|
|
77
|
+
};
|
|
78
|
+
}
|
|
98
79
|
export {
|
|
80
|
+
applyJobPathInjector,
|
|
99
81
|
cedarjsJobPathInjectorPlugin
|
|
100
82
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vite-plugin-cedarjs-resolve-cedar-style-imports.d.ts","sourceRoot":"","sources":["../../src/plugins/vite-plugin-cedarjs-resolve-cedar-style-imports.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,MAAM,CAAA;AAiClC,wBAAgB,qCAAqC,IAAI,MAAM,
|
|
1
|
+
{"version":3,"file":"vite-plugin-cedarjs-resolve-cedar-style-imports.d.ts","sourceRoot":"","sources":["../../src/plugins/vite-plugin-cedarjs-resolve-cedar-style-imports.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,MAAM,CAAA;AAiClC,wBAAgB,qCAAqC,IAAI,MAAM,CAwG9D"}
|
|
@@ -52,6 +52,20 @@ function cedarjsResolveCedarStyleImportsPlugin() {
|
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
54
|
}
|
|
55
|
+
if (cedarPaths && id.startsWith("$api/") && this.environment?.name !== "client") {
|
|
56
|
+
const resolved = resolveFromAbsolutePath(
|
|
57
|
+
path.join(cedarPaths.api.base, id.slice("$api/".length))
|
|
58
|
+
);
|
|
59
|
+
if (resolved) {
|
|
60
|
+
return normalizePath(resolved);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
if (cedarPaths && id.startsWith("api/")) {
|
|
64
|
+
const resolved = resolveFromAbsolutePath(path.join(cedarPaths.base, id));
|
|
65
|
+
if (resolved) {
|
|
66
|
+
return normalizePath(resolved);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
55
69
|
const resolvedPath = path.resolve(path.dirname(importer), id);
|
|
56
70
|
if (fs.existsSync(resolvedPath)) {
|
|
57
71
|
const stats = fs.statSync(resolvedPath);
|
|
@@ -8,24 +8,24 @@ import type { Plugin } from 'vite';
|
|
|
8
8
|
* For each file in `api/src/functions/` that exports a `handler`, this plugin:
|
|
9
9
|
*
|
|
10
10
|
* 1. Adds an import at the top of the file:
|
|
11
|
-
* import { getAsyncStoreInstance as
|
|
11
|
+
* import { getAsyncStoreInstance as __cedar_getAsyncStoreInstance } from '@cedarjs/context/dist/store'
|
|
12
12
|
*
|
|
13
13
|
* 2. Renames the original handler:
|
|
14
|
-
* const
|
|
14
|
+
* const __cedar_handler = <original handler value>
|
|
15
15
|
*
|
|
16
16
|
* 3. Replaces the handler export with a wrapper that checks context isolation:
|
|
17
|
-
* export const handler = (
|
|
18
|
-
* const
|
|
19
|
-
* if (
|
|
20
|
-
* return
|
|
17
|
+
* export const handler = (__cedar_event, __cedar_context) => {
|
|
18
|
+
* const __cedar_contextStore = __cedar_getAsyncStoreInstance().getStore()
|
|
19
|
+
* if (__cedar_contextStore === undefined) {
|
|
20
|
+
* return __cedar_getAsyncStoreInstance().run(new Map(), __cedar_handler, __cedar_event, __cedar_context)
|
|
21
21
|
* }
|
|
22
|
-
* return
|
|
22
|
+
* return __cedar_handler(__cedar_event, __cedar_context)
|
|
23
23
|
* }
|
|
24
24
|
*
|
|
25
|
-
* This replaces `babel-plugin-
|
|
25
|
+
* This replaces `babel-plugin-handler-als-wrapping` for Vite builds.
|
|
26
26
|
* The babel plugin is still used for Jest and prerender.
|
|
27
27
|
*/
|
|
28
|
-
export declare function
|
|
28
|
+
export declare function handlerAlsWrappingPlugin({ projectIsEsm, }?: {
|
|
29
29
|
projectIsEsm?: boolean;
|
|
30
30
|
}): Plugin;
|
|
31
31
|
/**
|
|
@@ -34,11 +34,11 @@ export declare function cedarContextWrappingPlugin({ projectIsEsm, }?: {
|
|
|
34
34
|
* export a `handler`.
|
|
35
35
|
*
|
|
36
36
|
* This is the context-isolation safeguard that used to be performed by
|
|
37
|
-
* `babel-plugin-
|
|
37
|
+
* `babel-plugin-handler-als-wrapping`. It is exported as a standalone
|
|
38
38
|
* function so it can be applied from build pipelines that don't go through
|
|
39
39
|
* Vite's plugin pipeline (e.g. the legacy esbuild API build).
|
|
40
40
|
*/
|
|
41
|
-
export declare function
|
|
41
|
+
export declare function applyHandlerAlsWrapping(code: string, { projectIsEsm }?: {
|
|
42
42
|
projectIsEsm?: boolean;
|
|
43
43
|
}): string | null;
|
|
44
|
-
//# sourceMappingURL=vite-plugin-
|
|
44
|
+
//# sourceMappingURL=vite-plugin-handler-als-wrapping.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vite-plugin-handler-als-wrapping.d.ts","sourceRoot":"","sources":["../../src/plugins/vite-plugin-handler-als-wrapping.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,MAAM,CAAA;AAKlC;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAAgB,wBAAwB,CAAC,EACvC,YAAoB,GACrB,GAAE;IACD,YAAY,CAAC,EAAE,OAAO,CAAA;CAClB,GAAG,MAAM,CAuBd;AAED;;;;;;;;;GASG;AACH,wBAAgB,uBAAuB,CACrC,IAAI,EAAE,MAAM,EACZ,EAAE,YAAoB,EAAE,GAAE;IAAE,YAAY,CAAC,EAAE,OAAO,CAAA;CAAO,GACxD,MAAM,GAAG,IAAI,CAsDf"}
|
package/dist/plugins/{vite-plugin-cedar-context-wrapping.js → vite-plugin-handler-als-wrapping.js}
RENAMED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import path from "node:path";
|
|
2
2
|
import { normalizePath } from "vite";
|
|
3
3
|
import { getPaths } from "@cedarjs/project-config";
|
|
4
|
-
function
|
|
4
|
+
function handlerAlsWrappingPlugin({
|
|
5
5
|
projectIsEsm = false
|
|
6
6
|
} = {}) {
|
|
7
7
|
return {
|
|
8
|
-
name: "
|
|
8
|
+
name: "handler-als-wrapping",
|
|
9
9
|
transform(code, id) {
|
|
10
10
|
let paths;
|
|
11
11
|
try {
|
|
@@ -17,12 +17,12 @@ function cedarContextWrappingPlugin({
|
|
|
17
17
|
if (!normalizePath(id).startsWith(functionsDir + "/")) {
|
|
18
18
|
return null;
|
|
19
19
|
}
|
|
20
|
-
const wrapped =
|
|
20
|
+
const wrapped = applyHandlerAlsWrapping(code, { projectIsEsm });
|
|
21
21
|
return wrapped ? { code: wrapped, map: null } : null;
|
|
22
22
|
}
|
|
23
23
|
};
|
|
24
24
|
}
|
|
25
|
-
function
|
|
25
|
+
function applyHandlerAlsWrapping(code, { projectIsEsm = false } = {}) {
|
|
26
26
|
const handlerRe = /^export\s+(?:const|let|var)\s+handler(?:[^=]|=>)*?=(?![>=])/m;
|
|
27
27
|
const handlerMatch = handlerRe.exec(code);
|
|
28
28
|
if (!handlerMatch) {
|
|
@@ -31,30 +31,30 @@ function applyContextWrapping(code, { projectIsEsm = false } = {}) {
|
|
|
31
31
|
const afterEquals = code.slice(handlerMatch.index + handlerMatch[0].length).trimStart();
|
|
32
32
|
const isAsync = /^async(?:\s*[\(\*]|\s+function)/.test(afterEquals);
|
|
33
33
|
const storePath = projectIsEsm ? "@cedarjs/context/dist/store.js" : "@cedarjs/context/dist/store";
|
|
34
|
-
const importStatement = `import { getAsyncStoreInstance as
|
|
34
|
+
const importStatement = `import { getAsyncStoreInstance as __cedar_getAsyncStoreInstance } from '${storePath}'
|
|
35
35
|
`;
|
|
36
36
|
const handlerStart = handlerMatch.index;
|
|
37
37
|
const before = code.slice(0, handlerStart);
|
|
38
38
|
const after = code.slice(handlerStart);
|
|
39
|
-
const renamed = after.replace(handlerRe, "const
|
|
39
|
+
const renamed = after.replace(handlerRe, "const __cedar_handler =");
|
|
40
40
|
const wrappedHandler = `
|
|
41
|
-
export const handler = ${isAsync ? "async " : ""}(
|
|
41
|
+
export const handler = ${isAsync ? "async " : ""}(__cedar_event, __cedar_context) => {
|
|
42
42
|
// The store will be undefined if no context isolation has been performed yet
|
|
43
|
-
const
|
|
44
|
-
if (
|
|
45
|
-
return
|
|
43
|
+
const __cedar_contextStore = __cedar_getAsyncStoreInstance().getStore()
|
|
44
|
+
if (__cedar_contextStore === undefined) {
|
|
45
|
+
return __cedar_getAsyncStoreInstance().run(
|
|
46
46
|
new Map(),
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
47
|
+
__cedar_handler,
|
|
48
|
+
__cedar_event,
|
|
49
|
+
__cedar_context
|
|
50
50
|
)
|
|
51
51
|
}
|
|
52
|
-
return
|
|
52
|
+
return __cedar_handler(__cedar_event, __cedar_context)
|
|
53
53
|
}
|
|
54
54
|
`;
|
|
55
55
|
return before + importStatement + renamed + wrappedHandler;
|
|
56
56
|
}
|
|
57
57
|
export {
|
|
58
|
-
|
|
59
|
-
|
|
58
|
+
applyHandlerAlsWrapping,
|
|
59
|
+
handlerAlsWrappingPlugin
|
|
60
60
|
};
|
|
@@ -5,6 +5,9 @@ import type { Plugin } from 'vite';
|
|
|
5
5
|
*
|
|
6
6
|
* import { RedwoodApolloProvider } from "@cedarjs/web/apollo" ->
|
|
7
7
|
* import { RedwoodApolloProvider } from "@cedarjs/web/dist/apollo/suspense"
|
|
8
|
+
*
|
|
9
|
+
* import { CedarApolloProvider } from "@cedarjs/web/apollo/CedarApolloProvider" ->
|
|
10
|
+
* import { CedarApolloProvider } from "@cedarjs/web/dist/apollo/suspense"
|
|
8
11
|
*/
|
|
9
12
|
export declare function cedarSwapApolloProvider(): Plugin | undefined;
|
|
10
13
|
//# sourceMappingURL=vite-plugin-swap-apollo-provider.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vite-plugin-swap-apollo-provider.d.ts","sourceRoot":"","sources":["../../src/plugins/vite-plugin-swap-apollo-provider.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,MAAM,CAAA;AAKlC
|
|
1
|
+
{"version":3,"file":"vite-plugin-swap-apollo-provider.d.ts","sourceRoot":"","sources":["../../src/plugins/vite-plugin-swap-apollo-provider.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,MAAM,CAAA;AAKlC;;;;;;;;;GASG;AACH,wBAAgB,uBAAuB,IAAI,MAAM,GAAG,SAAS,CAyB5D"}
|
|
@@ -5,11 +5,11 @@ function cedarSwapApolloProvider() {
|
|
|
5
5
|
return void 0;
|
|
6
6
|
}
|
|
7
7
|
return {
|
|
8
|
-
name: "
|
|
8
|
+
name: "cedar-swap-apollo-provider",
|
|
9
9
|
async transform(code, id) {
|
|
10
10
|
if (/web\/src\/App\.(ts|tsx|js|jsx)$/.test(id)) {
|
|
11
11
|
return code.replace(
|
|
12
|
-
|
|
12
|
+
/@cedarjs\/web\/apollo(?:\/CedarApolloProvider)?/g,
|
|
13
13
|
"@cedarjs/web/dist/apollo/suspense"
|
|
14
14
|
);
|
|
15
15
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rscBuildForSsr.d.ts","sourceRoot":"","sources":["../../src/rsc/rscBuildForSsr.ts"],"names":[],"mappings":"AAWA;;;GAGG;AACH,wBAAsB,cAAc,CAAC,EACnC,gBAAgB,EAChB,OAAe,GAChB,EAAE;IACD,gBAAgB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IACxC,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB,+
|
|
1
|
+
{"version":3,"file":"rscBuildForSsr.d.ts","sourceRoot":"","sources":["../../src/rsc/rscBuildForSsr.ts"],"names":[],"mappings":"AAWA;;;GAGG;AACH,wBAAsB,cAAc,CAAC,EACnC,gBAAgB,EAChB,OAAe,GAChB,EAAE;IACD,gBAAgB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IACxC,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB,+GA6IA"}
|
|
@@ -51,11 +51,9 @@ async function rscBuildForSsr({
|
|
|
51
51
|
plugins: [
|
|
52
52
|
cjsInterop({
|
|
53
53
|
dependencies: [
|
|
54
|
-
// Skip ESM modules: rwjs/auth, rwjs/web, rwjs/auth-*-middleware,
|
|
55
|
-
|
|
56
|
-
"@cedarjs/prerender/*"
|
|
57
|
-
"@cedarjs/auth-*-api",
|
|
58
|
-
"@cedarjs/auth-!(dbauth)-web"
|
|
54
|
+
// Skip ESM modules: rwjs/auth, rwjs/web, rwjs/auth-*-middleware,
|
|
55
|
+
// rwjs/router, rwjs/auth-*-api, rwjs/auth-*-web, rwjs/forms
|
|
56
|
+
"@cedarjs/prerender/*"
|
|
59
57
|
]
|
|
60
58
|
}),
|
|
61
59
|
rscRoutesAutoLoader(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"buildForStreamingServer.d.ts","sourceRoot":"","sources":["../../src/streaming/buildForStreamingServer.ts"],"names":[],"mappings":"AAKA,wBAAsB,uBAAuB,CAAC,EAC5C,OAAe,GAChB,EAAE;IACD,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB,
|
|
1
|
+
{"version":3,"file":"buildForStreamingServer.d.ts","sourceRoot":"","sources":["../../src/streaming/buildForStreamingServer.ts"],"names":[],"mappings":"AAKA,wBAAsB,uBAAuB,CAAC,EAC5C,OAAe,GAChB,EAAE;IACD,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB,iBAgCA"}
|
|
@@ -14,11 +14,9 @@ async function buildForStreamingServer({
|
|
|
14
14
|
plugins: [
|
|
15
15
|
cjsInterop({
|
|
16
16
|
dependencies: [
|
|
17
|
-
// Skip ESM modules: rwjs/auth, rwjs/web, rwjs/auth-*-middleware,
|
|
18
|
-
|
|
19
|
-
"@cedarjs/prerender/*"
|
|
20
|
-
"@cedarjs/auth-*-api",
|
|
21
|
-
"@cedarjs/auth-!(dbauth)-web"
|
|
17
|
+
// Skip ESM modules: rwjs/auth, rwjs/web, rwjs/auth-*-middleware,
|
|
18
|
+
// rwjs/router, rwjs/auth-*-api, rwjs/auth-*-web, rwjs/forms
|
|
19
|
+
"@cedarjs/prerender/*"
|
|
22
20
|
]
|
|
23
21
|
})
|
|
24
22
|
],
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cedarjs/vite",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.7-next.186",
|
|
4
4
|
"description": "Vite configuration package for CedarJS",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -12,27 +12,17 @@
|
|
|
12
12
|
"exports": {
|
|
13
13
|
"./package.json": "./package.json",
|
|
14
14
|
".": {
|
|
15
|
-
"
|
|
15
|
+
"default": {
|
|
16
16
|
"types": "./dist/index.d.ts",
|
|
17
17
|
"default": "./dist/index.js"
|
|
18
|
-
},
|
|
19
|
-
"require": {
|
|
20
|
-
"types": "./dist/cjs/index.d.ts",
|
|
21
|
-
"default": "./dist/cjs/index.js"
|
|
22
18
|
}
|
|
23
19
|
},
|
|
24
20
|
"./api": {
|
|
25
21
|
"types": "./dist/api/vite-plugin-cedar-vitest-api-preset.d.ts",
|
|
26
22
|
"default": "./dist/api/vite-plugin-cedar-vitest-api-preset.js"
|
|
27
23
|
},
|
|
28
|
-
"./buildFeServer":
|
|
29
|
-
|
|
30
|
-
"import": "./dist/buildFeServer.js"
|
|
31
|
-
},
|
|
32
|
-
"./build": {
|
|
33
|
-
"import": "./dist/build/build.js",
|
|
34
|
-
"default": "./dist/cjs/build/build.js"
|
|
35
|
-
},
|
|
24
|
+
"./buildFeServer": "./dist/buildFeServer.js",
|
|
25
|
+
"./build": "./dist/build/build.js",
|
|
36
26
|
"./bins/cedar-vite-build.mjs": "./bins/cedar-vite-build.mjs"
|
|
37
27
|
},
|
|
38
28
|
"bin": {
|
|
@@ -49,67 +39,67 @@
|
|
|
49
39
|
"inject"
|
|
50
40
|
],
|
|
51
41
|
"scripts": {
|
|
52
|
-
"build": "node ./build.ts
|
|
42
|
+
"build": "node ./build.ts",
|
|
53
43
|
"build:pack": "yarn pack -o cedarjs-vite.tgz",
|
|
54
44
|
"build:types": "tsc --build --verbose ./tsconfig.build.json",
|
|
55
|
-
"check:attw": "
|
|
45
|
+
"check:attw": "yarn cedar-fwtools-attw --exclude-entrypoints ./bins/cedar-vite-build.mjs",
|
|
56
46
|
"check:package": "concurrently npm:check:attw yarn:publint",
|
|
57
47
|
"test": "vitest run",
|
|
58
48
|
"test:watch": "vitest watch"
|
|
59
49
|
},
|
|
60
50
|
"dependencies": {
|
|
61
|
-
"@ast-grep/napi": "0.43.0",
|
|
62
51
|
"@babel/generator": "7.29.7",
|
|
63
52
|
"@babel/parser": "7.29.7",
|
|
64
53
|
"@babel/traverse": "7.29.7",
|
|
65
54
|
"@babel/types": "7.29.7",
|
|
66
|
-
"@cedarjs/api": "5.0.
|
|
67
|
-
"@cedarjs/
|
|
68
|
-
"@cedarjs/
|
|
69
|
-
"@cedarjs/
|
|
70
|
-
"@cedarjs/graphql-server": "5.0.
|
|
71
|
-
"@cedarjs/internal": "5.0.
|
|
72
|
-
"@cedarjs/project-config": "5.0.
|
|
73
|
-
"@cedarjs/server-store": "5.0.
|
|
74
|
-
"@cedarjs/
|
|
75
|
-
"@
|
|
76
|
-
"@swc/core": "1.15.
|
|
55
|
+
"@cedarjs/api": "5.0.7-next.186",
|
|
56
|
+
"@cedarjs/api-server": "5.0.7-next.186",
|
|
57
|
+
"@cedarjs/babel-config": "5.0.7-next.186",
|
|
58
|
+
"@cedarjs/context": "5.0.7-next.186",
|
|
59
|
+
"@cedarjs/graphql-server": "5.0.7-next.186",
|
|
60
|
+
"@cedarjs/internal": "5.0.7-next.186",
|
|
61
|
+
"@cedarjs/project-config": "5.0.7-next.186",
|
|
62
|
+
"@cedarjs/server-store": "5.0.7-next.186",
|
|
63
|
+
"@cedarjs/structure": "5.0.7-next.186",
|
|
64
|
+
"@cedarjs/testing": "5.0.7-next.186",
|
|
65
|
+
"@swc/core": "1.15.46",
|
|
77
66
|
"@universal-deploy/store": "^0.2.1",
|
|
78
67
|
"@universal-deploy/vite": "^0.1.9",
|
|
79
68
|
"@vitejs/plugin-react": "4.7.0",
|
|
80
69
|
"@whatwg-node/fetch": "0.10.13",
|
|
81
|
-
"@whatwg-node/server": "0.
|
|
82
|
-
"acorn": "8.
|
|
70
|
+
"@whatwg-node/server": "0.11.0",
|
|
71
|
+
"acorn": "8.17.0",
|
|
83
72
|
"acorn-loose": "8.5.2",
|
|
84
|
-
"ansis": "4.
|
|
85
|
-
"buffer": "6.0.3",
|
|
73
|
+
"ansis": "4.3.1",
|
|
86
74
|
"busboy": "^1.6.0",
|
|
87
|
-
"cookie": "1.1.1",
|
|
88
75
|
"dotenv-defaults": "5.0.2",
|
|
89
|
-
"execa": "5.1.1",
|
|
90
76
|
"express": "4.22.2",
|
|
91
|
-
"
|
|
92
|
-
"fastify-raw-body": "5.0.0",
|
|
77
|
+
"fast-glob": "3.3.3",
|
|
93
78
|
"find-my-way": "8.2.2",
|
|
94
79
|
"http-proxy-middleware": "3.0.7",
|
|
95
|
-
"isbot": "5.1
|
|
80
|
+
"isbot": "5.2.1",
|
|
81
|
+
"magic-string": "0.30.21",
|
|
82
|
+
"oxc-parser": "0.141.0",
|
|
96
83
|
"react": "18.3.1",
|
|
97
|
-
"react-server-dom-webpack": "19.2.
|
|
98
|
-
"
|
|
99
|
-
"
|
|
100
|
-
"vite": "7.3.
|
|
84
|
+
"react-server-dom-webpack": "19.2.7",
|
|
85
|
+
"unimport": "5.7.0",
|
|
86
|
+
"unplugin-auto-import": "19.3.0",
|
|
87
|
+
"vite": "7.3.6",
|
|
101
88
|
"vite-plugin-cjs-interop": "2.4.4",
|
|
102
|
-
"vite-plugin-
|
|
89
|
+
"vite-plugin-graphql-tag": "0.1.1",
|
|
90
|
+
"vite-tsconfig-paths": "^6.1.1",
|
|
103
91
|
"ws": "8.20.0",
|
|
104
92
|
"yargs-parser": "21.1.1"
|
|
105
93
|
},
|
|
106
94
|
"devDependencies": {
|
|
107
|
-
"@
|
|
108
|
-
"@cedarjs/
|
|
109
|
-
"@cedarjs/router": "5.0.
|
|
110
|
-
"@cedarjs/web": "5.0.
|
|
95
|
+
"@cedarjs/auth": "5.0.7-next.186",
|
|
96
|
+
"@cedarjs/framework-tools": "5.0.7-next.186",
|
|
97
|
+
"@cedarjs/router": "5.0.7-next.186",
|
|
98
|
+
"@cedarjs/web": "5.0.7-next.186",
|
|
99
|
+
"@dr.pogodin/react-helmet": "2.0.4",
|
|
111
100
|
"@hyrious/esbuild-plugin-commonjs": "0.2.6",
|
|
112
101
|
"@jridgewell/trace-mapping": "0.3.31",
|
|
102
|
+
"@oxc-project/types": "^0.141.0",
|
|
113
103
|
"@types/aws-lambda": "8.10.162",
|
|
114
104
|
"@types/busboy": "^1",
|
|
115
105
|
"@types/express": "4",
|
|
@@ -117,18 +107,17 @@
|
|
|
117
107
|
"@types/ws": "^8",
|
|
118
108
|
"@types/yargs-parser": "21.0.3",
|
|
119
109
|
"concurrently": "9.2.4",
|
|
120
|
-
"glob": "11.1.0",
|
|
121
110
|
"memfs": "4.64.0",
|
|
122
|
-
"publint": "0.3.
|
|
111
|
+
"publint": "0.3.22",
|
|
123
112
|
"rollup": "4.60.4",
|
|
124
113
|
"ts-dedent": "2.3.0",
|
|
125
114
|
"typescript": "5.9.3",
|
|
126
|
-
"vitest": "
|
|
115
|
+
"vitest": "4.1.10"
|
|
127
116
|
},
|
|
128
117
|
"peerDependencies": {
|
|
129
|
-
"@cedarjs/auth": "5.0.
|
|
130
|
-
"@cedarjs/router": "5.0.
|
|
131
|
-
"@cedarjs/web": "5.0.
|
|
118
|
+
"@cedarjs/auth": "5.0.7-next.186",
|
|
119
|
+
"@cedarjs/router": "5.0.7-next.186",
|
|
120
|
+
"@cedarjs/web": "5.0.7-next.186"
|
|
132
121
|
},
|
|
133
122
|
"engines": {
|
|
134
123
|
"node": ">=24"
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export type * from "../ClientRouter.d.ts"
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
var vite_plugin_cedar_vitest_api_preset_exports = {};
|
|
20
|
-
__export(vite_plugin_cedar_vitest_api_preset_exports, {
|
|
21
|
-
cedarVitestPreset: () => cedarVitestPreset
|
|
22
|
-
});
|
|
23
|
-
module.exports = __toCommonJS(vite_plugin_cedar_vitest_api_preset_exports);
|
|
24
|
-
var import_vitest = require("@cedarjs/testing/api/vitest");
|
|
25
|
-
var import_vite_plugin_cedarjs_resolve_cedar_style_imports = require("../plugins/vite-plugin-cedarjs-resolve-cedar-style-imports.js");
|
|
26
|
-
function cedarVitestPreset() {
|
|
27
|
-
return [
|
|
28
|
-
(0, import_vitest.cedarVitestApiConfigPlugin)(),
|
|
29
|
-
(0, import_vitest.autoImportsPlugin)(),
|
|
30
|
-
(0, import_vite_plugin_cedarjs_resolve_cedar_style_imports.cedarjsResolveCedarStyleImportsPlugin)(),
|
|
31
|
-
(0, import_vitest.trackDbImportsPlugin)()
|
|
32
|
-
];
|
|
33
|
-
}
|
|
34
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
35
|
-
0 && (module.exports = {
|
|
36
|
-
cedarVitestPreset
|
|
37
|
-
});
|