@cedarjs/vite 4.1.1-next.1 → 4.1.1-next.55

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 (52) hide show
  1. package/dist/apiDevMiddleware.d.ts +15 -0
  2. package/dist/apiDevMiddleware.d.ts.map +1 -0
  3. package/dist/{apiDevServer.js → apiDevMiddleware.js} +95 -107
  4. package/dist/build/build.d.ts +1 -1
  5. package/dist/build/build.d.ts.map +1 -1
  6. package/dist/build/build.js +2 -0
  7. package/dist/buildApp.d.ts +15 -0
  8. package/dist/buildApp.d.ts.map +1 -0
  9. package/dist/buildApp.js +150 -0
  10. package/dist/buildUDApiServer.d.ts +7 -5
  11. package/dist/buildUDApiServer.d.ts.map +1 -1
  12. package/dist/buildUDApiServer.js +8 -26
  13. package/dist/cedar-unified-dev.js +59 -5
  14. package/dist/cjs/{apiDevServer.js → apiDevMiddleware.js} +102 -110
  15. package/dist/cjs/build/build.js +3 -0
  16. package/dist/cjs/buildApp.js +181 -0
  17. package/dist/cjs/buildUDApiServer.js +8 -26
  18. package/dist/cjs/cedar-unified-dev.js +59 -5
  19. package/dist/cjs/index.js +3 -3
  20. package/dist/cjs/plugins/vite-plugin-cedar-cjs-compat.js +341 -0
  21. package/dist/cjs/plugins/vite-plugin-cedar-universal-deploy.js +114 -19
  22. package/dist/cjs/plugins/vite-plugin-cedar-wait-for-api-server.js +2 -1
  23. package/dist/cjs/ud-handlers/catch-all.js +65 -0
  24. package/dist/cjs/ud-handlers/function.js +47 -0
  25. package/dist/cjs/ud-handlers/graphql.js +59 -0
  26. package/dist/index.d.ts +1 -1
  27. package/dist/index.d.ts.map +1 -1
  28. package/dist/index.js +2 -2
  29. package/dist/plugins/vite-plugin-cedar-cjs-compat.d.ts +23 -0
  30. package/dist/plugins/vite-plugin-cedar-cjs-compat.d.ts.map +1 -0
  31. package/dist/plugins/vite-plugin-cedar-cjs-compat.js +307 -0
  32. package/dist/plugins/vite-plugin-cedar-universal-deploy.d.ts.map +1 -1
  33. package/dist/plugins/vite-plugin-cedar-universal-deploy.js +105 -20
  34. package/dist/plugins/vite-plugin-cedar-wait-for-api-server.d.ts.map +1 -1
  35. package/dist/plugins/vite-plugin-cedar-wait-for-api-server.js +2 -1
  36. package/dist/ud-handlers/catch-all.d.ts +15 -0
  37. package/dist/ud-handlers/catch-all.d.ts.map +1 -0
  38. package/dist/ud-handlers/catch-all.js +41 -0
  39. package/dist/ud-handlers/function.d.ts +5 -0
  40. package/dist/ud-handlers/function.d.ts.map +1 -0
  41. package/dist/ud-handlers/function.js +23 -0
  42. package/dist/ud-handlers/graphql.d.ts +7 -0
  43. package/dist/ud-handlers/graphql.d.ts.map +1 -0
  44. package/dist/ud-handlers/graphql.js +35 -0
  45. package/package.json +52 -23
  46. package/LICENSE +0 -21
  47. package/dist/apiDevServer.d.ts +0 -18
  48. package/dist/apiDevServer.d.ts.map +0 -1
  49. package/dist/cjs/plugins/vite-plugin-cedar-dev-dispatcher.js +0 -223
  50. package/dist/plugins/vite-plugin-cedar-dev-dispatcher.d.ts +0 -3
  51. package/dist/plugins/vite-plugin-cedar-dev-dispatcher.d.ts.map +0 -1
  52. package/dist/plugins/vite-plugin-cedar-dev-dispatcher.js +0 -189
@@ -1,39 +1,124 @@
1
- import { addEntry, catchAllEntry } from "@universal-deploy/store";
2
- const VIRTUAL_CEDAR_API = "virtual:cedar-api";
3
- const RESOLVED_VIRTUAL_CEDAR_API = "\0virtual:cedar-api";
1
+ import path from "node:path";
2
+ import { addEntry } from "@universal-deploy/store";
3
+ import { findApiServerFunctions } from "@cedarjs/internal/dist/files.js";
4
+ import { getPaths } from "@cedarjs/project-config";
5
+ const VIRTUAL_CEDAR_FN_PREFIX = "virtual:cedar-api:fn:";
6
+ const RESOLVED_CEDAR_FN_PREFIX = "\0virtual:cedar-api:fn:";
7
+ const GRAPHQL_METHODS = ["GET", "POST", "OPTIONS"];
8
+ function normaliseApiPrefix(apiPrefix) {
9
+ apiPrefix = apiPrefix.trim();
10
+ while (apiPrefix.startsWith("/")) {
11
+ apiPrefix = apiPrefix.slice(1);
12
+ }
13
+ while (apiPrefix.endsWith("/")) {
14
+ apiPrefix = apiPrefix.slice(0, -1);
15
+ }
16
+ return apiPrefix ? "/" + apiPrefix : "";
17
+ }
18
+ function discoverCedarRoutes(apiRootPath) {
19
+ const srcFunctions = getPaths().api.functions;
20
+ const distFunctions = path.join(getPaths().api.base, "dist", "functions");
21
+ const sourceFiles = findApiServerFunctions(srcFunctions);
22
+ const routes = [];
23
+ for (const sourcePath of sourceFiles) {
24
+ const relative = path.relative(srcFunctions, sourcePath);
25
+ const { dir, name, ext: _ext } = path.parse(relative);
26
+ let routeName;
27
+ if (dir === name) {
28
+ routeName = dir;
29
+ } else if (dir === "") {
30
+ routeName = name;
31
+ } else if (dir.length && name === "index") {
32
+ routeName = dir;
33
+ } else {
34
+ continue;
35
+ }
36
+ const apiPrefix = normaliseApiPrefix(apiRootPath);
37
+ const routePath = routeName === "graphql" ? `${apiPrefix}/graphql` : `${apiPrefix}/${routeName}`;
38
+ const methods = routeName === "graphql" ? [...GRAPHQL_METHODS] : [];
39
+ const type = routeName === "graphql" ? "graphql" : routeName === "health" ? "health" : routeName.toLowerCase().includes("auth") ? "auth" : "function";
40
+ const distPath = path.join(distFunctions, dir, name + ".js");
41
+ routes.push({
42
+ id: routePath,
43
+ path: routePath,
44
+ methods,
45
+ type,
46
+ entry: distPath
47
+ });
48
+ }
49
+ const gqlIndex = routes.findIndex((r) => r.type === "graphql");
50
+ if (gqlIndex > 0) {
51
+ const [gqlRoute] = routes.splice(gqlIndex, 1);
52
+ routes.unshift(gqlRoute);
53
+ }
54
+ return routes;
55
+ }
56
+ function toEntryMeta(route) {
57
+ const routePatterns = route.path === "/**" ? ["/**"] : [route.path, `${route.path}/**`];
58
+ return {
59
+ id: `${VIRTUAL_CEDAR_FN_PREFIX}${route.id}`,
60
+ route: routePatterns,
61
+ ...route.methods.length > 0 && {
62
+ method: route.methods
63
+ }
64
+ };
65
+ }
4
66
  function cedarUniversalDeployPlugin(options = {}) {
5
67
  const { apiRootPath } = options;
68
+ const routes = discoverCedarRoutes(apiRootPath ?? "/");
69
+ let entriesInjected = false;
6
70
  return {
7
71
  name: "cedar-universal-deploy",
8
72
  apply: "build",
9
- buildStart() {
10
- addEntry({
11
- id: VIRTUAL_CEDAR_API,
12
- route: "/**"
13
- });
73
+ config: {
74
+ order: "pre",
75
+ handler() {
76
+ if (entriesInjected) {
77
+ return;
78
+ }
79
+ entriesInjected = true;
80
+ for (const route of routes) {
81
+ addEntry(toEntryMeta(route));
82
+ }
83
+ }
14
84
  },
15
85
  resolveId(id) {
16
- if (id === catchAllEntry) {
17
- return RESOLVED_VIRTUAL_CEDAR_API;
86
+ if (id.startsWith(RESOLVED_CEDAR_FN_PREFIX)) {
87
+ return id;
18
88
  }
19
- if (id === VIRTUAL_CEDAR_API) {
20
- return RESOLVED_VIRTUAL_CEDAR_API;
89
+ if (id.startsWith(VIRTUAL_CEDAR_FN_PREFIX)) {
90
+ return "\0" + id;
21
91
  }
22
92
  return void 0;
23
93
  },
24
94
  load(id) {
25
- if (id !== RESOLVED_VIRTUAL_CEDAR_API) {
26
- return void 0;
95
+ if (id.startsWith(RESOLVED_CEDAR_FN_PREFIX)) {
96
+ const routeId = id.slice(RESOLVED_CEDAR_FN_PREFIX.length);
97
+ const route = routes.find((r) => r.id === routeId);
98
+ if (!route) {
99
+ return void 0;
100
+ }
101
+ if (route.type === "graphql") {
102
+ return generateGraphQLModule(route.entry);
103
+ }
104
+ return generateFunctionModule(route.entry);
27
105
  }
28
- const apiRootPathArg = apiRootPath !== void 0 ? `{ apiRootPath: ${JSON.stringify(apiRootPath)} }` : "undefined";
29
- return `
30
- import { buildCedarDispatcher } from '@cedarjs/api-server/udDispatcher';
31
- const { fetchable } = await buildCedarDispatcher(${apiRootPathArg});
32
- export default fetchable;
33
- `;
106
+ return void 0;
34
107
  }
35
108
  };
36
109
  }
110
+ function generateGraphQLModule(distPath) {
111
+ return `
112
+ import { createGraphQLHandler } from '@cedarjs/vite/ud-handlers/graphql';
113
+ export default createGraphQLHandler({ distPath: ${JSON.stringify(distPath)} });
114
+ `;
115
+ }
116
+ function generateFunctionModule(distPath) {
117
+ return `
118
+ import { createFunctionHandler } from '@cedarjs/vite/ud-handlers/function';
119
+ export default createFunctionHandler({ distPath: ${JSON.stringify(distPath)} });
120
+ `;
121
+ }
37
122
  export {
38
123
  cedarUniversalDeployPlugin
39
124
  };
@@ -1 +1 @@
1
- {"version":3,"file":"vite-plugin-cedar-wait-for-api-server.d.ts","sourceRoot":"","sources":["../../src/plugins/vite-plugin-cedar-wait-for-api-server.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAiB,MAAM,MAAM,CAAA;AAOvD,wBAAgB,qBAAqB,IAAI,YAAY,CA8FpD"}
1
+ {"version":3,"file":"vite-plugin-cedar-wait-for-api-server.d.ts","sourceRoot":"","sources":["../../src/plugins/vite-plugin-cedar-wait-for-api-server.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAiB,MAAM,MAAM,CAAA;AAOvD,wBAAgB,qBAAqB,IAAI,YAAY,CAkGpD"}
@@ -6,6 +6,7 @@ function cedarWaitForApiServer() {
6
6
  const cedarConfig = getConfig();
7
7
  const apiPort = cedarConfig.api.port;
8
8
  const apiHost = cedarConfig.api.host || "localhost";
9
+ const isUnifiedDev = process.env.__CEDAR_UNIFIED_DEV === "true";
9
10
  return {
10
11
  name: "cedar-wait-for-api-server",
11
12
  apply: "serve",
@@ -18,7 +19,7 @@ function cedarWaitForApiServer() {
18
19
  // don't use startsWith here
19
20
  url === apiGqlUrl || // The two checks below are for when we support GraphQL-over-HTTP
20
21
  url.startsWith(apiGqlUrl + "/") || url.startsWith(apiGqlUrl + "?"));
21
- if (!isApiRequest || serverHasBeenUp) {
22
+ if (!isApiRequest || serverHasBeenUp || isUnifiedDev) {
22
23
  return next();
23
24
  }
24
25
  try {
@@ -0,0 +1,15 @@
1
+ export interface CatchAllRoute {
2
+ path: string;
3
+ methods: string[];
4
+ module: {
5
+ fetch: (request: Request) => Promise<Response> | Response;
6
+ };
7
+ }
8
+ export interface CatchAllHandlerOptions {
9
+ routes: CatchAllRoute[];
10
+ apiRootPath: string;
11
+ }
12
+ export declare function createCatchAllHandler(options: CatchAllHandlerOptions): {
13
+ fetch(request: Request): Promise<Response>;
14
+ };
15
+ //# sourceMappingURL=catch-all.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"catch-all.d.ts","sourceRoot":"","sources":["../../src/ud-handlers/catch-all.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,MAAM,EAAE,CAAA;IACjB,MAAM,EAAE;QAAE,KAAK,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,OAAO,CAAC,QAAQ,CAAC,GAAG,QAAQ,CAAA;KAAE,CAAA;CACtE;AAED,MAAM,WAAW,sBAAsB;IACrC,MAAM,EAAE,aAAa,EAAE,CAAA;IACvB,WAAW,EAAE,MAAM,CAAA;CACpB;AAED,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,sBAAsB;mBAiC5C,OAAO,GAAG,OAAO,CAAC,QAAQ,CAAC;EAgBnD"}
@@ -0,0 +1,41 @@
1
+ import { createRouter, addRoute, findRoute } from "rou3";
2
+ function createCatchAllHandler(options) {
3
+ const router = createRouter();
4
+ for (const route of options.routes) {
5
+ const methods = route.methods.length > 0 ? route.methods : ["GET", "HEAD", "POST", "PUT", "DELETE", "PATCH", "OPTIONS"];
6
+ for (const method of methods) {
7
+ addRoute(router, method, route.path, route.module);
8
+ addRoute(router, method, `${route.path}/**`, route.module);
9
+ }
10
+ }
11
+ const apiRootPath = options.apiRootPath;
12
+ function normalizePathname(requestUrl) {
13
+ const url = new URL(requestUrl);
14
+ let pathname = url.pathname;
15
+ if (apiRootPath !== "/" && pathname.startsWith(apiRootPath)) {
16
+ pathname = pathname.slice(apiRootPath.length - 1);
17
+ }
18
+ if (!pathname.startsWith("/")) {
19
+ pathname = "/" + pathname;
20
+ }
21
+ return pathname;
22
+ }
23
+ return {
24
+ async fetch(request) {
25
+ const pathname = normalizePathname(request.url);
26
+ const match = findRoute(router, request.method, pathname);
27
+ if (!match) {
28
+ return new Response("Not Found", { status: 404 });
29
+ }
30
+ try {
31
+ return await match.data.fetch(request);
32
+ } catch (err) {
33
+ console.error("Unhandled error in fetch handler for", pathname, err);
34
+ return new Response("Internal Server Error", { status: 500 });
35
+ }
36
+ }
37
+ };
38
+ }
39
+ export {
40
+ createCatchAllHandler
41
+ };
@@ -0,0 +1,5 @@
1
+ export interface FunctionHandlerOptions {
2
+ distPath: string;
3
+ }
4
+ export declare function createFunctionHandler(options: FunctionHandlerOptions): import("@cedarjs/api-server/udFetchable").Fetchable;
5
+ //# sourceMappingURL=function.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"function.d.ts","sourceRoot":"","sources":["../../src/ud-handlers/function.ts"],"names":[],"mappings":"AAMA,MAAM,WAAW,sBAAsB;IACrC,QAAQ,EAAE,MAAM,CAAA;CACjB;AAED,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,sBAAsB,uDAyBpE"}
@@ -0,0 +1,23 @@
1
+ import { pathToFileURL } from "node:url";
2
+ import { wrapLegacyHandler } from "@cedarjs/api/runtime";
3
+ import { createCedarFetchable } from "@cedarjs/api-server/udFetchable";
4
+ function createFunctionHandler(options) {
5
+ const handleRequest = async (request, ctx) => {
6
+ const mod = await import(pathToFileURL(options.distPath).href);
7
+ const nativeHandler = mod.handleRequest || mod.default?.handleRequest;
8
+ if (nativeHandler) {
9
+ return nativeHandler(request, ctx);
10
+ }
11
+ const legacyHandler = mod.handler || mod.default?.handler;
12
+ if (legacyHandler) {
13
+ return wrapLegacyHandler(legacyHandler)(request, ctx);
14
+ }
15
+ throw new Error(
16
+ `Handler not found in ${options.distPath}. Expected \`export async function handleRequest(request, ctx)\`, \`export default { handleRequest }\`, or a legacy Lambda-shaped \`handler\`.`
17
+ );
18
+ };
19
+ return createCedarFetchable(handleRequest);
20
+ }
21
+ export {
22
+ createFunctionHandler
23
+ };
@@ -0,0 +1,7 @@
1
+ export interface GraphQLHandlerOptions {
2
+ distPath: string;
3
+ }
4
+ export declare function createGraphQLHandler(options: GraphQLHandlerOptions): {
5
+ fetch(request: Request): Promise<Response>;
6
+ };
7
+ //# sourceMappingURL=graphql.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"graphql.d.ts","sourceRoot":"","sources":["../../src/ud-handlers/graphql.ts"],"names":[],"mappings":"AAKA,MAAM,WAAW,qBAAqB;IACpC,QAAQ,EAAE,MAAM,CAAA;CACjB;AAED,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,qBAAqB;mBAiB1C,OAAO,GAAG,OAAO,CAAC,QAAQ,CAAC;EAenD"}
@@ -0,0 +1,35 @@
1
+ import { pathToFileURL } from "node:url";
2
+ import { buildCedarContext, requestToLegacyEvent } from "@cedarjs/api/runtime";
3
+ import { createGraphQLYoga } from "@cedarjs/graphql-server";
4
+ function createGraphQLHandler(options) {
5
+ let yogaInitPromise = null;
6
+ async function getYoga() {
7
+ if (!yogaInitPromise) {
8
+ yogaInitPromise = (async () => {
9
+ const mod = await import(pathToFileURL(options.distPath).href);
10
+ const opts = mod.__rw_graphqlOptions;
11
+ const { yoga } = await createGraphQLYoga(opts);
12
+ return { yoga, graphqlOptions: opts };
13
+ })();
14
+ }
15
+ return yogaInitPromise;
16
+ }
17
+ return {
18
+ async fetch(request) {
19
+ const { yoga, graphqlOptions } = await getYoga();
20
+ const cedarContext = await buildCedarContext(request, {
21
+ authDecoder: graphqlOptions?.authDecoder
22
+ });
23
+ const event = await requestToLegacyEvent(request, cedarContext);
24
+ return yoga.handle(request, {
25
+ request,
26
+ cedarContext,
27
+ event,
28
+ requestContext: void 0
29
+ });
30
+ }
31
+ };
32
+ }
33
+ export {
34
+ createGraphQLHandler
35
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cedarjs/vite",
3
- "version": "4.1.1-next.1+a867fc51b4",
3
+ "version": "4.1.1-next.55",
4
4
  "description": "Vite configuration package for CedarJS",
5
5
  "repository": {
6
6
  "type": "git",
@@ -25,12 +25,6 @@
25
25
  "types": "./dist/api/vite-plugin-cedar-vitest-api-preset.d.ts",
26
26
  "default": "./dist/api/vite-plugin-cedar-vitest-api-preset.js"
27
27
  },
28
- "./apiDevServer": {
29
- "import": {
30
- "types": "./dist/apiDevServer.d.ts",
31
- "default": "./dist/apiDevServer.js"
32
- }
33
- },
34
28
  "./client": {
35
29
  "require": "./dist/cjs/client.js",
36
30
  "import": "./dist/client.js"
@@ -46,7 +40,37 @@
46
40
  "import": "./dist/build/build.js",
47
41
  "default": "./dist/cjs/build/build.js"
48
42
  },
49
- "./bins/cedar-vite-build.mjs": "./bins/cedar-vite-build.mjs"
43
+ "./bins/cedar-vite-build.mjs": "./bins/cedar-vite-build.mjs",
44
+ "./ud-handlers/graphql": {
45
+ "import": {
46
+ "types": "./dist/ud-handlers/graphql.d.ts",
47
+ "default": "./dist/ud-handlers/graphql.js"
48
+ },
49
+ "require": {
50
+ "types": "./dist/cjs/ud-handlers/graphql.d.ts",
51
+ "default": "./dist/cjs/ud-handlers/graphql.js"
52
+ }
53
+ },
54
+ "./ud-handlers/function": {
55
+ "import": {
56
+ "types": "./dist/ud-handlers/function.d.ts",
57
+ "default": "./dist/ud-handlers/function.js"
58
+ },
59
+ "require": {
60
+ "types": "./dist/cjs/ud-handlers/function.d.ts",
61
+ "default": "./dist/cjs/ud-handlers/function.js"
62
+ }
63
+ },
64
+ "./ud-handlers/catch-all": {
65
+ "import": {
66
+ "types": "./dist/ud-handlers/catch-all.d.ts",
67
+ "default": "./dist/ud-handlers/catch-all.js"
68
+ },
69
+ "require": {
70
+ "types": "./dist/cjs/ud-handlers/catch-all.d.ts",
71
+ "default": "./dist/cjs/ud-handlers/catch-all.js"
72
+ }
73
+ }
50
74
  },
51
75
  "bin": {
52
76
  "cedar-dev-fe": "./dist/devFeServer.js",
@@ -73,25 +97,29 @@
73
97
  "dependencies": {
74
98
  "@ast-grep/napi": "0.42.1",
75
99
  "@babel/generator": "7.29.1",
76
- "@babel/parser": "7.29.2",
100
+ "@babel/parser": "7.29.3",
77
101
  "@babel/traverse": "7.29.0",
78
- "@cedarjs/api-server": "4.1.1-next.1+a867fc51b4",
79
- "@cedarjs/auth": "4.1.1-next.1+a867fc51b4",
80
- "@cedarjs/babel-config": "4.1.1-next.1+a867fc51b4",
81
- "@cedarjs/context": "4.1.1-next.1+a867fc51b4",
82
- "@cedarjs/cookie-jar": "4.1.1-next.1+a867fc51b4",
83
- "@cedarjs/graphql-server": "4.1.1-next.1+a867fc51b4",
84
- "@cedarjs/internal": "4.1.1-next.1+a867fc51b4",
85
- "@cedarjs/project-config": "4.1.1-next.1+a867fc51b4",
86
- "@cedarjs/server-store": "4.1.1-next.1+a867fc51b4",
87
- "@cedarjs/testing": "4.1.1-next.1+a867fc51b4",
88
- "@cedarjs/web": "4.1.1-next.1+a867fc51b4",
102
+ "@cedarjs/api": "4.1.0",
103
+ "@cedarjs/api-server": "4.1.0",
104
+ "@cedarjs/auth": "4.1.0",
105
+ "@cedarjs/babel-config": "4.1.0",
106
+ "@cedarjs/context": "4.1.0",
107
+ "@cedarjs/cookie-jar": "4.1.0",
108
+ "@cedarjs/graphql-server": "4.1.0",
109
+ "@cedarjs/internal": "4.1.0",
110
+ "@cedarjs/project-config": "4.1.0",
111
+ "@cedarjs/server-store": "4.1.0",
112
+ "@cedarjs/testing": "4.1.0",
113
+ "@cedarjs/web": "4.1.0",
89
114
  "@fastify/url-data": "6.0.3",
90
- "@swc/core": "1.15.30",
115
+ "@swc/core": "1.15.32",
91
116
  "@universal-deploy/node": "^0.1.6",
117
+ "@universal-deploy/store": "^0.2.1",
118
+ "@universal-deploy/vite": "^0.1.9",
92
119
  "@vitejs/plugin-react": "4.7.0",
93
120
  "@whatwg-node/fetch": "0.10.13",
94
121
  "@whatwg-node/server": "0.10.18",
122
+ "acorn": "8.16.0",
95
123
  "acorn-loose": "8.5.2",
96
124
  "ansis": "4.2.0",
97
125
  "buffer": "6.0.3",
@@ -108,6 +136,7 @@
108
136
  "react": "18.3.1",
109
137
  "react-server-dom-webpack": "19.2.4",
110
138
  "rimraf": "6.1.3",
139
+ "rou3": "^0.8.1",
111
140
  "vite": "7.3.2",
112
141
  "vite-plugin-cjs-interop": "2.4.4",
113
142
  "vite-plugin-node-polyfills": "0.26.0",
@@ -126,7 +155,7 @@
126
155
  "concurrently": "9.2.1",
127
156
  "glob": "11.1.0",
128
157
  "memfs": "4.57.2",
129
- "publint": "0.3.18",
158
+ "publint": "0.3.19",
130
159
  "rollup": "4.60.2",
131
160
  "tsx": "4.21.0",
132
161
  "typescript": "5.9.3",
@@ -138,5 +167,5 @@
138
167
  "publishConfig": {
139
168
  "access": "public"
140
169
  },
141
- "gitHead": "a867fc51b46741c77baddf329bc84e7339b75ddc"
170
+ "gitHead": "3905ed045508b861b495f8d5630d76c7a157d8f1"
142
171
  }
package/LICENSE DELETED
@@ -1,21 +0,0 @@
1
- MIT License
2
-
3
- Copyright (c) 2025 Cedar
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
@@ -1,18 +0,0 @@
1
- import type { ViteDevServer } from 'vite';
2
- /**
3
- * Start the Cedar API dev server using Vite's SSR module runner for HMR.
4
- *
5
- * This replaces the previous system of:
6
- * nodemon → api-server-watch (chokidar + esbuild + forked child process)
7
- *
8
- * With:
9
- * Vite SSR dev server (module graph + HMR) + Fastify (same process)
10
- *
11
- * When API source files change, Vite invalidates the affected modules and
12
- * re-loads them on the next call – no process restart needed.
13
- */
14
- export declare function startApiDevServer(port: number): Promise<{
15
- viteServer: ViteDevServer;
16
- close: () => Promise<void>;
17
- }>;
18
- //# sourceMappingURL=apiDevServer.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"apiDevServer.d.ts","sourceRoot":"","sources":["../src/apiDevServer.ts"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAc,aAAa,EAAE,MAAM,MAAM,CAAA;AAsLrD;;;;;;;;;;;GAWG;AACH,wBAAsB,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC;IAC7D,UAAU,EAAE,aAAa,CAAA;IACzB,KAAK,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAA;CAC3B,CAAC,CAiCD"}