camox 0.36.2 → 0.36.3

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.
@@ -50,7 +50,7 @@ function resolveSdkAlias(id, importer) {
50
50
  ].find((candidate) => existsSync(candidate));
51
51
  }
52
52
  function resolveCamoxSourceImport(id) {
53
- return {
53
+ const sourceImport = {
54
54
  "camox/createApp": resolve(sdkRoot, "src/core/createApp.ts"),
55
55
  "camox/createBlock": resolve(sdkRoot, "src/core/createBlock.tsx"),
56
56
  "camox/createLayout": resolve(sdkRoot, "src/core/createLayout.tsx"),
@@ -64,6 +64,8 @@ function resolveCamoxSourceImport(id) {
64
64
  "camox/_internal/studioServer": resolve(sdkRoot, "src/features/runtime/studioServer.tsx"),
65
65
  "camox/_internal/runtime": resolve(sdkRoot, "src/features/runtime/runtime.ts")
66
66
  }[id];
67
+ if (!sourceImport || !existsSync(sourceImport)) return;
68
+ return sourceImport;
67
69
  }
68
70
  function generateVirtualCamoxApp() {
69
71
  return `import { createApp } from "camox/createApp";
@@ -6,6 +6,7 @@ interface CamoxNitro {
6
6
  hook: (name: "compiled", callback: (nitro: CamoxNitro) => void) => void;
7
7
  };
8
8
  options: {
9
+ noExternals?: boolean | (string | RegExp)[];
9
10
  output: {
10
11
  publicDir: string;
11
12
  serverDir: string;
@@ -103,6 +103,10 @@ function camox(options) {
103
103
  return loadRuntimeDevModule(id, { runtimeBasePath });
104
104
  },
105
105
  nitro: { setup(nitro) {
106
+ if (nitro.options.noExternals !== true) {
107
+ const noExternals = Array.isArray(nitro.options.noExternals) ? nitro.options.noExternals : [];
108
+ nitro.options.noExternals = [...noExternals, "camox"];
109
+ }
106
110
  installRuntimeNitroRoutes(nitro, { runtimeBasePath });
107
111
  nitro.hooks.hook("compiled", ({ options }) => {
108
112
  const serverAssets = join(options.output.serverDir, "assets");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "camox",
3
- "version": "0.36.2",
3
+ "version": "0.36.3",
4
4
  "license": "MIT",
5
5
  "bin": {
6
6
  "camox": "./bin/camox.mjs"
@@ -13,103 +13,83 @@
13
13
  "type": "module",
14
14
  "exports": {
15
15
  "./createApp": {
16
- "source": "./src/core/createApp.ts",
17
16
  "types": "./dist/core/createApp.d.ts",
18
17
  "import": "./dist/core/createApp.js"
19
18
  },
20
19
  "./createBlock": {
21
- "source": "./src/core/createBlock.tsx",
22
20
  "types": "./dist/core/createBlock.d.ts",
23
21
  "import": "./dist/core/createBlock.js"
24
22
  },
25
23
  "./createLayout": {
26
- "source": "./src/core/createLayout.tsx",
27
24
  "types": "./dist/core/createLayout.d.ts",
28
25
  "import": "./dist/core/createLayout.js"
29
26
  },
30
27
  "./document": {
31
- "source": "./src/core/defineDocument.ts",
32
28
  "types": "./dist/core/defineDocument.d.ts",
33
29
  "import": "./dist/core/defineDocument.js"
34
30
  },
35
31
  "./CamoxPreview": {
36
- "source": "./src/features/preview/CamoxPreview.tsx",
37
32
  "types": "./dist/features/preview/CamoxPreview.d.ts",
38
33
  "import": "./dist/features/preview/CamoxPreview.js"
39
34
  },
40
35
  "./CamoxContent": {
41
- "source": "./src/features/content/CamoxContent.tsx",
42
36
  "types": "./dist/features/content/CamoxContent.d.ts",
43
37
  "import": "./dist/features/content/CamoxContent.js"
44
38
  },
45
39
  "./CamoxProvider": {
46
- "source": "./src/features/provider/CamoxProvider.tsx",
47
40
  "types": "./dist/features/provider/CamoxProvider.d.ts",
48
41
  "import": "./dist/features/provider/CamoxProvider.js"
49
42
  },
50
43
  "./CamoxStudio": {
51
- "source": "./src/features/studio/CamoxStudio.tsx",
52
44
  "types": "./dist/features/studio/CamoxStudio.d.ts",
53
45
  "import": "./dist/features/studio/CamoxStudio.js"
54
46
  },
55
47
  "./navigation": {
56
- "source": "./src/features/navigation/navigation.tsx",
57
48
  "types": "./dist/features/navigation/navigation.d.ts",
58
49
  "import": "./dist/features/navigation/navigation.js"
59
50
  },
60
51
  "./vite": {
61
- "source": "./src/features/vite/vite.ts",
62
52
  "types": "./dist/features/vite/vite.d.ts",
63
53
  "import": "./dist/features/vite/vite.js"
64
54
  },
65
55
  "./metadata": {
66
- "source": "./src/features/metadata/sitemap.ts",
67
56
  "types": "./dist/features/metadata/sitemap.d.ts",
68
57
  "import": "./dist/features/metadata/sitemap.js"
69
58
  },
70
59
  "./_internal/pageServer": {
71
- "source": "./src/features/runtime/pageServer.tsx",
72
60
  "types": "./dist/features/runtime/pageServer.d.ts",
73
61
  "import": "./dist/features/runtime/pageServer.js"
74
62
  },
75
63
  "./_internal/pageClient": {
76
- "source": "./src/features/runtime/pageClient.tsx",
77
64
  "types": "./dist/features/runtime/pageClient.d.ts",
78
65
  "import": "./dist/features/runtime/pageClient.js"
79
66
  },
80
67
  "./_internal/studioClient": {
81
- "source": "./src/features/runtime/studioClient.tsx",
82
68
  "types": "./dist/features/runtime/studioClient.d.ts",
83
69
  "import": "./dist/features/runtime/studioClient.js"
84
70
  },
85
71
  "./_internal/studioServer": {
86
- "source": "./src/features/runtime/studioServer.tsx",
87
72
  "types": "./dist/features/runtime/studioServer.d.ts",
88
73
  "import": "./dist/features/runtime/studioServer.js"
89
74
  },
90
75
  "./_internal/runtime": {
91
- "source": "./src/features/runtime/runtime.ts",
92
76
  "types": "./dist/features/runtime/runtime.d.ts",
93
77
  "import": "./dist/features/runtime/runtime.js"
94
78
  },
95
79
  "./_internal/imageResponse": {
96
80
  "workerd": {
97
- "source": "./src/features/og/imageResponse.workerd.ts",
98
81
  "types": "./dist/features/og/imageResponse.workerd.d.ts",
99
82
  "import": "./dist/features/og/imageResponse.workerd.js"
100
83
  },
101
84
  "worker": {
102
- "source": "./src/features/og/imageResponse.workerd.ts",
103
85
  "types": "./dist/features/og/imageResponse.workerd.d.ts",
104
86
  "import": "./dist/features/og/imageResponse.workerd.js"
105
87
  },
106
88
  "deno": {
107
- "source": "./src/features/og/imageResponse.workerd.ts",
108
89
  "types": "./dist/features/og/imageResponse.workerd.d.ts",
109
90
  "import": "./dist/features/og/imageResponse.workerd.js"
110
91
  },
111
92
  "default": {
112
- "source": "./src/features/og/imageResponse.node.ts",
113
93
  "types": "./dist/features/og/imageResponse.node.d.ts",
114
94
  "import": "./dist/features/og/imageResponse.node.js"
115
95
  }
@@ -157,9 +137,9 @@
157
137
  "streamdown": "^2.5.0",
158
138
  "unhead": "^3.1.7",
159
139
  "zod": "^4.4.3",
160
- "@camox/cli": "0.36.2",
161
- "@camox/ui": "0.36.2",
162
- "@camox/api-contract": "0.36.2"
140
+ "@camox/cli": "0.36.3",
141
+ "@camox/ui": "0.36.3",
142
+ "@camox/api-contract": "0.36.3"
163
143
  },
164
144
  "devDependencies": {
165
145
  "@babel/core": "^7.29.0",