zitejs 0.9.21 → 0.9.22

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.
@@ -69,6 +69,7 @@ const _NODE_BUILTIN_NAMES = [
69
69
  const NODE_BUILTINS = _NODE_BUILTIN_NAMES.flatMap(m => [m, `node:${m}`]);
70
70
  const PREBUNDLED_LIBS = {
71
71
  '@zite/endpoints-runtime-sdk': '__zite-runtime__.js',
72
+ 'zitejs/runtime': '__zite-runtime__.js',
72
73
  'zod': '__zod__.js',
73
74
  'openai': '__openai__.js',
74
75
  '@anthropic-ai/sdk': '__anthropic__.js',
@@ -250,10 +251,8 @@ function createAliasPlugin(opts) {
250
251
  }
251
252
  return { path: 'zitejs/db', external: true };
252
253
  });
253
- // Resolve zitejs/runtime
254
- build.onResolve({ filter: /^zitejs\/runtime$/ }, () => {
255
- return { path: 'zitejs/runtime', external: true };
256
- });
254
+ // zitejs/runtime is prebundled as __zite-runtime__.js in the worker —
255
+ // handled by the PREBUNDLED_LIBS loop below, no special case needed.
257
256
  for (const [pkgName, modulePath] of Object.entries(PREBUNDLED_LIBS)) {
258
257
  const escapedName = pkgName.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
259
258
  const filter = new RegExp(`^${escapedName}$`);
@@ -33,6 +33,7 @@ const _NODE_BUILTIN_NAMES = [
33
33
  const NODE_BUILTINS = _NODE_BUILTIN_NAMES.flatMap(m => [m, `node:${m}`]);
34
34
  const PREBUNDLED_LIBS = {
35
35
  '@zite/endpoints-runtime-sdk': '__zite-runtime__.js',
36
+ 'zitejs/runtime': '__zite-runtime__.js',
36
37
  'zod': '__zod__.js',
37
38
  'openai': '__openai__.js',
38
39
  '@anthropic-ai/sdk': '__anthropic__.js',
@@ -214,10 +215,8 @@ function createAliasPlugin(opts) {
214
215
  }
215
216
  return { path: 'zitejs/db', external: true };
216
217
  });
217
- // Resolve zitejs/runtime
218
- build.onResolve({ filter: /^zitejs\/runtime$/ }, () => {
219
- return { path: 'zitejs/runtime', external: true };
220
- });
218
+ // zitejs/runtime is prebundled as __zite-runtime__.js in the worker —
219
+ // handled by the PREBUNDLED_LIBS loop below, no special case needed.
221
220
  for (const [pkgName, modulePath] of Object.entries(PREBUNDLED_LIBS)) {
222
221
  const escapedName = pkgName.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
223
222
  const filter = new RegExp(`^${escapedName}$`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zitejs",
3
- "version": "0.9.21",
3
+ "version": "0.9.22",
4
4
  "description": "The Zite framework — build apps on Zite Database",
5
5
  "type": "module",
6
6
  "main": "./dist/cjs/runtime/index.js",