zitejs 0.9.33 → 0.9.34

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.
@@ -45,7 +45,7 @@ function regenerateAppApiTs(appDir) {
45
45
  if (!(0, fs_2.existsSync)(apiDir))
46
46
  return;
47
47
  const endpointFiles = (0, fs_2.readdirSync)(apiDir).filter((f) => f.endsWith('.ts') || f.endsWith('.js'));
48
- const content = (0, lib_js_1.generateApiTs)(endpointFiles, getFlowId(appDir));
48
+ const content = (0, lib_js_1.generateApiTs)(endpointFiles);
49
49
  if (content) {
50
50
  const outDir = (0, path_1.join)('apps', appDir, '.zite');
51
51
  (0, fs_2.mkdirSync)(outDir, { recursive: true });
@@ -150,7 +150,7 @@ function generateDbDts(base, schema) {
150
150
  lines.push('');
151
151
  return lines.join('\n');
152
152
  }
153
- function generateApiTs(endpointFiles, flowId) {
153
+ function generateApiTs(endpointFiles) {
154
154
  if (!endpointFiles || endpointFiles.length === 0)
155
155
  return null;
156
156
  const lines = [
@@ -166,11 +166,9 @@ function generateApiTs(endpointFiles, flowId) {
166
166
  lines.push(`import ${camelName}Endpoint from '../src/api/${name}';`);
167
167
  endpointNames.push(camelName);
168
168
  }
169
- const flowIdArg = flowId ? `, '${flowId}'` : '';
170
169
  lines.push('');
171
- // Named exports for each endpoint (backwards compat with old zite-endpoints-sdk imports)
172
170
  for (const name of endpointNames) {
173
- lines.push(`export const ${name} = createCaller(${name}Endpoint, '${name}'${flowIdArg});`);
171
+ lines.push(`export const ${name} = createCaller(${name}Endpoint, '${name}');`);
174
172
  }
175
173
  lines.push('');
176
174
  // Inferred input/output types per endpoint (e.g. GetDashboardInputType, GetDashboardOutputType)
@@ -41,7 +41,7 @@ function regenerateAppApiTs(appDir) {
41
41
  if (!existsSync(apiDir))
42
42
  return;
43
43
  const endpointFiles = readdirSync(apiDir).filter((f) => f.endsWith('.ts') || f.endsWith('.js'));
44
- const content = generateApiTs(endpointFiles, getFlowId(appDir));
44
+ const content = generateApiTs(endpointFiles);
45
45
  if (content) {
46
46
  const outDir = join('apps', appDir, '.zite');
47
47
  mkdirSync(outDir, { recursive: true });
@@ -22,7 +22,7 @@ export declare function toCamelCase(name: string): string;
22
22
  export declare function generateSchema(base: BaseMetadata): ZiteSchema;
23
23
  export declare function generateDbTs(base: BaseMetadata, schema: ZiteSchema): string;
24
24
  export declare function generateDbDts(base: BaseMetadata, schema: ZiteSchema): string;
25
- export declare function generateApiTs(endpointFiles: string[], flowId?: string): string | null;
25
+ export declare function generateApiTs(endpointFiles: string[]): string | null;
26
26
  export declare function generateUserTs(usersTableFields?: Array<{
27
27
  name: string;
28
28
  type: string;
@@ -139,7 +139,7 @@ export function generateDbDts(base, schema) {
139
139
  lines.push('');
140
140
  return lines.join('\n');
141
141
  }
142
- export function generateApiTs(endpointFiles, flowId) {
142
+ export function generateApiTs(endpointFiles) {
143
143
  if (!endpointFiles || endpointFiles.length === 0)
144
144
  return null;
145
145
  const lines = [
@@ -155,11 +155,9 @@ export function generateApiTs(endpointFiles, flowId) {
155
155
  lines.push(`import ${camelName}Endpoint from '../src/api/${name}';`);
156
156
  endpointNames.push(camelName);
157
157
  }
158
- const flowIdArg = flowId ? `, '${flowId}'` : '';
159
158
  lines.push('');
160
- // Named exports for each endpoint (backwards compat with old zite-endpoints-sdk imports)
161
159
  for (const name of endpointNames) {
162
- lines.push(`export const ${name} = createCaller(${name}Endpoint, '${name}'${flowIdArg});`);
160
+ lines.push(`export const ${name} = createCaller(${name}Endpoint, '${name}');`);
163
161
  }
164
162
  lines.push('');
165
163
  // Inferred input/output types per endpoint (e.g. GetDashboardInputType, GetDashboardOutputType)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zitejs",
3
- "version": "0.9.33",
3
+ "version": "0.9.34",
4
4
  "description": "The Zite framework — build apps on Zite Database",
5
5
  "type": "module",
6
6
  "main": "./dist/cjs/runtime/index.js",