@cedarjs/vite 5.0.3 → 5.0.4-next.167

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (143) hide show
  1. package/dist/api/vite-plugin-cedar-vitest-api-preset.d.ts.map +1 -1
  2. package/dist/api/vite-plugin-cedar-vitest-api-preset.js +4 -0
  3. package/dist/apiDevMiddleware.d.ts.map +1 -1
  4. package/dist/apiDevMiddleware.js +105 -9
  5. package/dist/buildApp.d.ts.map +1 -1
  6. package/dist/buildApp.js +79 -18
  7. package/dist/buildRouteHooks.d.ts.map +1 -1
  8. package/dist/buildRouteHooks.js +36 -4
  9. package/dist/bundled/react-server-dom-webpack.server.js +192 -99
  10. package/dist/cedar-unified-dev.d.ts +18 -0
  11. package/dist/cedar-unified-dev.d.ts.map +1 -1
  12. package/dist/cedar-unified-dev.js +39 -5
  13. package/dist/devFeServer.js +3 -8
  14. package/dist/index.d.ts +10 -4
  15. package/dist/index.d.ts.map +1 -1
  16. package/dist/index.js +45 -19
  17. package/dist/lib/generateDiffSourceMap.d.ts +18 -0
  18. package/dist/lib/generateDiffSourceMap.d.ts.map +1 -0
  19. package/dist/lib/generateDiffSourceMap.js +151 -0
  20. package/dist/lib/getMergedConfig.d.ts.map +1 -1
  21. package/dist/lib/getMergedConfig.js +4 -0
  22. package/dist/plugins/vite-plugin-cedar-auto-import.d.ts +1 -1
  23. package/dist/plugins/vite-plugin-cedar-auto-import.d.ts.map +1 -1
  24. package/dist/plugins/vite-plugin-cedar-auto-import.js +8 -1
  25. package/dist/plugins/vite-plugin-cedar-cell.d.ts.map +1 -1
  26. package/dist/plugins/vite-plugin-cedar-cell.js +2 -1
  27. package/dist/plugins/vite-plugin-cedar-data-uri-shim.d.ts +3 -0
  28. package/dist/plugins/vite-plugin-cedar-data-uri-shim.d.ts.map +1 -0
  29. package/dist/plugins/vite-plugin-cedar-data-uri-shim.js +43 -0
  30. package/dist/plugins/vite-plugin-cedar-directory-named-import.d.ts +12 -0
  31. package/dist/plugins/vite-plugin-cedar-directory-named-import.d.ts.map +1 -0
  32. package/dist/plugins/vite-plugin-cedar-directory-named-import.js +35 -0
  33. package/dist/plugins/vite-plugin-cedar-gqlorm-inject.d.ts +29 -0
  34. package/dist/plugins/vite-plugin-cedar-gqlorm-inject.d.ts.map +1 -0
  35. package/dist/plugins/vite-plugin-cedar-gqlorm-inject.js +76 -0
  36. package/dist/plugins/vite-plugin-cedar-graphql-options-extract.d.ts +42 -0
  37. package/dist/plugins/vite-plugin-cedar-graphql-options-extract.d.ts.map +1 -0
  38. package/dist/plugins/vite-plugin-cedar-graphql-options-extract.js +93 -0
  39. package/dist/plugins/vite-plugin-cedar-import-dir.d.ts.map +1 -1
  40. package/dist/plugins/vite-plugin-cedar-import-dir.js +33 -15
  41. package/dist/plugins/vite-plugin-cedar-log-formatter-dev.d.ts +28 -0
  42. package/dist/plugins/vite-plugin-cedar-log-formatter-dev.d.ts.map +1 -0
  43. package/dist/plugins/vite-plugin-cedar-log-formatter-dev.js +67 -0
  44. package/dist/plugins/vite-plugin-cedar-mock-cell-data.d.ts +28 -0
  45. package/dist/plugins/vite-plugin-cedar-mock-cell-data.d.ts.map +1 -0
  46. package/dist/plugins/vite-plugin-cedar-mock-cell-data.js +247 -0
  47. package/dist/plugins/vite-plugin-cedar-otel-wrapping.d.ts +39 -0
  48. package/dist/plugins/vite-plugin-cedar-otel-wrapping.d.ts.map +1 -0
  49. package/dist/plugins/vite-plugin-cedar-otel-wrapping.js +200 -0
  50. package/dist/plugins/vite-plugin-cedar-universal-deploy.js +1 -1
  51. package/dist/plugins/vite-plugin-cedarjs-resolve-cedar-style-imports.d.ts.map +1 -1
  52. package/dist/plugins/vite-plugin-cedarjs-resolve-cedar-style-imports.js +14 -0
  53. package/dist/plugins/{vite-plugin-cedar-context-wrapping.d.ts → vite-plugin-handler-als-wrapping.d.ts} +12 -12
  54. package/dist/plugins/vite-plugin-handler-als-wrapping.d.ts.map +1 -0
  55. package/dist/plugins/{vite-plugin-cedar-context-wrapping.js → vite-plugin-handler-als-wrapping.js} +16 -16
  56. package/dist/plugins/vite-plugin-swap-apollo-provider.d.ts +3 -0
  57. package/dist/plugins/vite-plugin-swap-apollo-provider.d.ts.map +1 -1
  58. package/dist/plugins/vite-plugin-swap-apollo-provider.js +2 -2
  59. package/dist/rsc/rscBuildForSsr.d.ts.map +1 -1
  60. package/dist/rsc/rscBuildForSsr.js +3 -5
  61. package/dist/streaming/buildForStreamingServer.d.ts.map +1 -1
  62. package/dist/streaming/buildForStreamingServer.js +3 -5
  63. package/package.json +42 -52
  64. package/dist/cjs/ClientRouter.d.ts +0 -1
  65. package/dist/cjs/api/vite-plugin-cedar-vitest-api-preset.js +0 -37
  66. package/dist/cjs/apiDevMiddleware.js +0 -371
  67. package/dist/cjs/build/build.d.ts +0 -1
  68. package/dist/cjs/build/build.js +0 -58
  69. package/dist/cjs/buildApp.js +0 -306
  70. package/dist/cjs/buildFeServer.d.ts +0 -1
  71. package/dist/cjs/buildFeServer.js +0 -63
  72. package/dist/cjs/buildRouteHooks.js +0 -80
  73. package/dist/cjs/buildRouteManifest.js +0 -92
  74. package/dist/cjs/buildRscClientAndServer.js +0 -54
  75. package/dist/cjs/cedar-unified-dev.js +0 -310
  76. package/dist/cjs/client.d.ts +0 -1
  77. package/dist/cjs/clientSsr.d.ts +0 -1
  78. package/dist/cjs/devFeServer.js +0 -157
  79. package/dist/cjs/index.d.ts +0 -1
  80. package/dist/cjs/index.js +0 -141
  81. package/dist/cjs/lib/StatusError.js +0 -37
  82. package/dist/cjs/lib/entries.js +0 -52
  83. package/dist/cjs/lib/getMergedConfig.js +0 -185
  84. package/dist/cjs/lib/onWarn.js +0 -36
  85. package/dist/cjs/lib/registerFwGlobalsAndShims.js +0 -102
  86. package/dist/cjs/lib/workspacePackageAliases.js +0 -107
  87. package/dist/cjs/middleware/index.js +0 -22
  88. package/dist/cjs/middleware/invokeMiddleware.js +0 -52
  89. package/dist/cjs/middleware/register.js +0 -105
  90. package/dist/cjs/middleware/types.js +0 -16
  91. package/dist/cjs/package.json +0 -1
  92. package/dist/cjs/plugins/vite-plugin-cedar-auto-import.js +0 -107
  93. package/dist/cjs/plugins/vite-plugin-cedar-cell.js +0 -183
  94. package/dist/cjs/plugins/vite-plugin-cedar-cjs-compat.js +0 -341
  95. package/dist/cjs/plugins/vite-plugin-cedar-context-wrapping.js +0 -95
  96. package/dist/cjs/plugins/vite-plugin-cedar-entry-injection.js +0 -107
  97. package/dist/cjs/plugins/vite-plugin-cedar-html-env.js +0 -67
  98. package/dist/cjs/plugins/vite-plugin-cedar-import-dir.js +0 -118
  99. package/dist/cjs/plugins/vite-plugin-cedar-node-polyfills.js +0 -43
  100. package/dist/cjs/plugins/vite-plugin-cedar-remove-dev-fatal-error-page.js +0 -61
  101. package/dist/cjs/plugins/vite-plugin-cedar-remove-from-bundle.js +0 -76
  102. package/dist/cjs/plugins/vite-plugin-cedar-routes-auto-loader.js +0 -126
  103. package/dist/cjs/plugins/vite-plugin-cedar-universal-deploy.js +0 -346
  104. package/dist/cjs/plugins/vite-plugin-cedar-wait-for-api-server.js +0 -134
  105. package/dist/cjs/plugins/vite-plugin-cedarjs-job-path-injector.js +0 -134
  106. package/dist/cjs/plugins/vite-plugin-cedarjs-resolve-cedar-style-imports.js +0 -106
  107. package/dist/cjs/plugins/vite-plugin-jsx-loader.js +0 -42
  108. package/dist/cjs/plugins/vite-plugin-merged-config.js +0 -39
  109. package/dist/cjs/plugins/vite-plugin-rsc-analyze.js +0 -104
  110. package/dist/cjs/plugins/vite-plugin-rsc-reload.js +0 -75
  111. package/dist/cjs/plugins/vite-plugin-rsc-routes-auto-loader.js +0 -159
  112. package/dist/cjs/plugins/vite-plugin-rsc-routes-imports.js +0 -125
  113. package/dist/cjs/plugins/vite-plugin-rsc-ssr-router-import.js +0 -75
  114. package/dist/cjs/plugins/vite-plugin-rsc-transform-client.js +0 -228
  115. package/dist/cjs/plugins/vite-plugin-rsc-transform-server.js +0 -398
  116. package/dist/cjs/plugins/vite-plugin-swap-apollo-provider.js +0 -46
  117. package/dist/cjs/rsc/rscBuildAnalyze.js +0 -126
  118. package/dist/cjs/rsc/rscBuildClient.js +0 -91
  119. package/dist/cjs/rsc/rscBuildCopyCssAssets.js +0 -56
  120. package/dist/cjs/rsc/rscBuildEntriesFile.js +0 -115
  121. package/dist/cjs/rsc/rscBuildForServer.js +0 -168
  122. package/dist/cjs/rsc/rscBuildForSsr.js +0 -173
  123. package/dist/cjs/rsc/rscBuildRwEnvVars.js +0 -56
  124. package/dist/cjs/rsc/rscRenderer.js +0 -165
  125. package/dist/cjs/rsc/rscRequestHandler.js +0 -162
  126. package/dist/cjs/rsc/rscStudioHandlers.js +0 -156
  127. package/dist/cjs/runFeServer.js +0 -165
  128. package/dist/cjs/streaming/buildForStreamingServer.js +0 -65
  129. package/dist/cjs/streaming/collectCss.js +0 -52
  130. package/dist/cjs/streaming/createReactStreamingHandler.js +0 -173
  131. package/dist/cjs/streaming/streamHelpers.js +0 -230
  132. package/dist/cjs/streaming/transforms/bufferedTransform.js +0 -61
  133. package/dist/cjs/streaming/transforms/cancelTimeoutTransform.js +0 -34
  134. package/dist/cjs/streaming/transforms/encode-decode.js +0 -36
  135. package/dist/cjs/streaming/transforms/serverInjectionTransform.js +0 -84
  136. package/dist/cjs/streaming/triggerRouteHooks.js +0 -96
  137. package/dist/cjs/types.js +0 -16
  138. package/dist/cjs/utils.js +0 -92
  139. package/dist/package.json +0 -1
  140. package/dist/plugins/vite-plugin-cedar-context-wrapping.d.ts.map +0 -1
  141. package/dist/plugins/vite-plugin-cedar-node-polyfills.d.ts +0 -3
  142. package/dist/plugins/vite-plugin-cedar-node-polyfills.d.ts.map +0 -1
  143. package/dist/plugins/vite-plugin-cedar-node-polyfills.js +0 -19
@@ -1,84 +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 serverInjectionTransform_exports = {};
20
- __export(serverInjectionTransform_exports, {
21
- createServerInjectionTransform: () => createServerInjectionTransform
22
- });
23
- module.exports = __toCommonJS(serverInjectionTransform_exports);
24
- var import_encode_decode = require("./encode-decode.js");
25
- function createServerInjectionTransform({
26
- injectionState,
27
- createElement,
28
- ServerInjectedHtml,
29
- renderToString,
30
- onlyOnFlush = false
31
- }) {
32
- const transformStream = new TransformStream({
33
- transform(chunk, controller) {
34
- if (onlyOnFlush) {
35
- controller.enqueue(chunk);
36
- } else {
37
- const mergedBytes = insertHtml(chunk);
38
- controller.enqueue(mergedBytes);
39
- }
40
- },
41
- flush(controller) {
42
- const mergedBytes = insertHtml();
43
- controller.enqueue(mergedBytes);
44
- const moveTagsScript = (0, import_encode_decode.encodeText)(`<script>document.querySelectorAll('body [data-rwjs-head]').forEach((el) => {
45
- document.querySelectorAll('head ' + el.tagName).forEach((e) => {
46
- if (
47
- el.tagName === 'TITLE' ||
48
- (el.tagName === 'META' &&
49
- el.getAttribute('name') === e.getAttribute('name') &&
50
- el.getAttribute('property') === e.getAttribute('property'))
51
- ) {
52
- e.remove();
53
- }
54
- document.head.appendChild(el);
55
- });
56
- });
57
- </script>`);
58
- controller.enqueue(moveTagsScript);
59
- }
60
- });
61
- return transformStream;
62
- function insertHtml(chunk) {
63
- const serverHtmlOutput = renderToString(
64
- createElement(ServerInjectedHtml, {
65
- injectionState
66
- })
67
- );
68
- const injectedBytes = (0, import_encode_decode.encodeText)(serverHtmlOutput);
69
- if (chunk !== void 0) {
70
- const mergedBytes = new Uint8Array(chunk.length + injectedBytes.length);
71
- mergedBytes.set(chunk);
72
- mergedBytes.set(injectedBytes, chunk.length);
73
- return mergedBytes;
74
- } else {
75
- const injectedHtmlOutput = new Uint8Array(injectedBytes.length);
76
- injectedHtmlOutput.set(injectedBytes);
77
- return injectedHtmlOutput;
78
- }
79
- }
80
- }
81
- // Annotate the CommonJS export names for ESM import in node:
82
- 0 && (module.exports = {
83
- createServerInjectionTransform
84
- });
@@ -1,96 +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 triggerRouteHooks_exports = {};
20
- __export(triggerRouteHooks_exports, {
21
- loadAndRunRouteHooks: () => loadAndRunRouteHooks,
22
- triggerRouteHooks: () => triggerRouteHooks
23
- });
24
- module.exports = __toCommonJS(triggerRouteHooks_exports);
25
- var import_util = require("@cedarjs/router/util");
26
- const triggerRouteHooks = async ({
27
- routeHooks,
28
- req,
29
- parsedParams = {},
30
- previousOutput
31
- }) => {
32
- const event = {
33
- params: parsedParams,
34
- headers: req.headers || {},
35
- query: (0, import_util.parseSearch)(req.url),
36
- // cookies: req.cookies || {}, // TODO (STREAMING) we probably need some sort of cookie parser
37
- // TODO (STREAMING) called app routeHook, but its just the previous output
38
- appRouteHook: previousOutput
39
- };
40
- let meta = previousOutput?.meta || [];
41
- try {
42
- const metaRouteHookOutput = await routeHooks?.meta?.(event) || [];
43
- const currentMeta = Array.isArray(metaRouteHookOutput) ? metaRouteHookOutput : [metaRouteHookOutput];
44
- meta = [...meta, ...currentMeta];
45
- } catch (e) {
46
- throw new Error(`Error in meta hook: ${e.message}`);
47
- }
48
- return {
49
- meta
50
- };
51
- };
52
- const defaultRouteHookOutput = {
53
- meta: []
54
- };
55
- const loadAndRunRouteHooks = async ({
56
- paths = [],
57
- reqMeta,
58
- viteDevServer,
59
- previousOutput = defaultRouteHookOutput
60
- }) => {
61
- const loadModule = async (path) => {
62
- return viteDevServer ? viteDevServer.ssrLoadModule(path) : import(path);
63
- };
64
- let currentRouteHooks;
65
- let rhOutput = defaultRouteHookOutput;
66
- const routeHookPath = paths.shift();
67
- try {
68
- if (routeHookPath) {
69
- currentRouteHooks = await loadModule(routeHookPath);
70
- rhOutput = await triggerRouteHooks({
71
- routeHooks: currentRouteHooks,
72
- req: reqMeta.req,
73
- parsedParams: reqMeta.parsedParams,
74
- previousOutput
75
- });
76
- }
77
- if (paths.length > 0) {
78
- return loadAndRunRouteHooks({
79
- paths,
80
- reqMeta,
81
- previousOutput: rhOutput,
82
- viteDevServer
83
- });
84
- } else {
85
- return rhOutput;
86
- }
87
- } catch (e) {
88
- console.error(`Error loading route hooks in ${routeHookPath}}`);
89
- throw e;
90
- }
91
- };
92
- // Annotate the CommonJS export names for ESM import in node:
93
- 0 && (module.exports = {
94
- loadAndRunRouteHooks,
95
- triggerRouteHooks
96
- });
package/dist/cjs/types.js DELETED
@@ -1,16 +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 __copyProps = (to, from, except, desc) => {
7
- if (from && typeof from === "object" || typeof from === "function") {
8
- for (let key of __getOwnPropNames(from))
9
- if (!__hasOwnProp.call(to, key) && key !== except)
10
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
11
- }
12
- return to;
13
- };
14
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
15
- var types_exports = {};
16
- module.exports = __toCommonJS(types_exports);
package/dist/cjs/utils.js DELETED
@@ -1,92 +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 utils_exports = {};
20
- __export(utils_exports, {
21
- convertExpressHeaders: () => convertExpressHeaders,
22
- ensureProcessDirWeb: () => ensureProcessDirWeb,
23
- getFullUrl: () => getFullUrl,
24
- makeFilePath: () => makeFilePath,
25
- ssrLoadEntryServer: () => ssrLoadEntryServer,
26
- stripQueryStringAndHashFromPath: () => stripQueryStringAndHashFromPath
27
- });
28
- module.exports = __toCommonJS(utils_exports);
29
- var import_node_url = require("node:url");
30
- var import_project_config = require("@cedarjs/project-config");
31
- var import_packageManager = require("@cedarjs/project-config/packageManager");
32
- function stripQueryStringAndHashFromPath(url) {
33
- return url.split("?")[0].split("#")[0];
34
- }
35
- function ensureProcessDirWeb(webDir = (0, import_project_config.getPaths)().web.base) {
36
- if (process.cwd() !== webDir) {
37
- console.error("\u26A0\uFE0F Warning: CWD is ", process.cwd());
38
- console.warn("~".repeat(50));
39
- console.warn(
40
- `The cwd must be web/. Please use \`${(0, import_packageManager.prettyPrintCedarCommand)(["<command>"])}\` or run the command from the web/ directory.`
41
- );
42
- console.log(`Changing cwd to ${webDir}....`);
43
- console.log();
44
- process.chdir(webDir);
45
- }
46
- }
47
- function makeFilePath(path) {
48
- return (0, import_node_url.pathToFileURL)(path).href;
49
- }
50
- async function ssrLoadEntryServer(viteDevServer) {
51
- const rwPaths = (0, import_project_config.getPaths)();
52
- if (!rwPaths.web.entryServer) {
53
- throw new Error("entryServer not defined");
54
- }
55
- return viteDevServer.ssrLoadModule(
56
- rwPaths.web.entryServer
57
- // Have to type cast here because ssrLoadModule just returns a generic
58
- // Record<string, any> type
59
- );
60
- }
61
- function convertExpressHeaders(expressDistinctHeaders) {
62
- const headers = new Headers();
63
- for (const name in expressDistinctHeaders) {
64
- const values = expressDistinctHeaders[name];
65
- if (Array.isArray(values)) {
66
- for (const value of values) {
67
- headers.append(name, value);
68
- }
69
- }
70
- }
71
- return headers;
72
- }
73
- const getFullUrl = (req, rscEnabled) => {
74
- const baseUrl = req.protocol + "://" + req.headers.host;
75
- const url = new URL(req.originalUrl || "", baseUrl);
76
- const pathname = url.searchParams.get("__cedarjs__pathname");
77
- const search = url.searchParams.get("__cedarjs__search");
78
- let pathnamePlusSearch = req.originalUrl;
79
- if (rscEnabled && pathname !== null && search !== null) {
80
- pathnamePlusSearch = pathname + "?" + search;
81
- }
82
- return baseUrl + pathnamePlusSearch;
83
- };
84
- // Annotate the CommonJS export names for ESM import in node:
85
- 0 && (module.exports = {
86
- convertExpressHeaders,
87
- ensureProcessDirWeb,
88
- getFullUrl,
89
- makeFilePath,
90
- ssrLoadEntryServer,
91
- stripQueryStringAndHashFromPath
92
- });
package/dist/package.json DELETED
@@ -1 +0,0 @@
1
- {"type":"module"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"vite-plugin-cedar-context-wrapping.d.ts","sourceRoot":"","sources":["../../src/plugins/vite-plugin-cedar-context-wrapping.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,MAAM,CAAA;AAKlC;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAAgB,0BAA0B,CAAC,EACzC,YAAoB,GACrB,GAAE;IACD,YAAY,CAAC,EAAE,OAAO,CAAA;CAClB,GAAG,MAAM,CAuBd;AAED;;;;;;;;;GASG;AACH,wBAAgB,oBAAoB,CAClC,IAAI,EAAE,MAAM,EACZ,EAAE,YAAoB,EAAE,GAAE;IAAE,YAAY,CAAC,EAAE,OAAO,CAAA;CAAO,GACxD,MAAM,GAAG,IAAI,CAsDf"}
@@ -1,3 +0,0 @@
1
- import type { Plugin } from 'vite';
2
- export declare function cedarNodePolyfills(): Plugin | undefined;
3
- //# sourceMappingURL=vite-plugin-cedar-node-polyfills.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"vite-plugin-cedar-node-polyfills.d.ts","sourceRoot":"","sources":["../../src/plugins/vite-plugin-cedar-node-polyfills.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,MAAM,CAAA;AAKlC,wBAAgB,kBAAkB,IAAI,MAAM,GAAG,SAAS,CAiBvD"}
@@ -1,19 +0,0 @@
1
- import { nodePolyfills } from "vite-plugin-node-polyfills";
2
- import { getConfig } from "@cedarjs/project-config";
3
- function cedarNodePolyfills() {
4
- if (getConfig().experimental?.rsc?.enabled) {
5
- return void 0;
6
- }
7
- return {
8
- ...nodePolyfills({
9
- include: ["buffer"],
10
- globals: {
11
- Buffer: true
12
- }
13
- }),
14
- apply: "serve"
15
- };
16
- }
17
- export {
18
- cedarNodePolyfills
19
- };