zitejs 0.8.3 → 0.9.0

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.
@@ -136,9 +136,15 @@ function generateApiTs(endpointFiles) {
136
136
  endpointNames.push(camelName);
137
137
  }
138
138
  lines.push('');
139
+ // Named exports for each endpoint (backwards compat with old zite-endpoints-sdk imports)
140
+ for (const name of endpointNames) {
141
+ lines.push(`export const ${name} = createCaller(${name}Endpoint);`);
142
+ }
143
+ lines.push('');
144
+ // Also export as a single api object
139
145
  lines.push('export const api = {');
140
146
  for (const name of endpointNames) {
141
- lines.push(` ${name}: createCaller(${name}Endpoint),`);
147
+ lines.push(` ${name},`);
142
148
  }
143
149
  lines.push('};');
144
150
  lines.push('');
@@ -128,9 +128,15 @@ export function generateApiTs(endpointFiles) {
128
128
  endpointNames.push(camelName);
129
129
  }
130
130
  lines.push('');
131
+ // Named exports for each endpoint (backwards compat with old zite-endpoints-sdk imports)
132
+ for (const name of endpointNames) {
133
+ lines.push(`export const ${name} = createCaller(${name}Endpoint);`);
134
+ }
135
+ lines.push('');
136
+ // Also export as a single api object
131
137
  lines.push('export const api = {');
132
138
  for (const name of endpointNames) {
133
- lines.push(` ${name}: createCaller(${name}Endpoint),`);
139
+ lines.push(` ${name},`);
134
140
  }
135
141
  lines.push('};');
136
142
  lines.push('');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zitejs",
3
- "version": "0.8.3",
3
+ "version": "0.9.0",
4
4
  "description": "The Zite framework — build apps on Zite Database",
5
5
  "type": "module",
6
6
  "main": "./dist/cjs/runtime/index.js",