@adminide-stack/form-builder-core 5.1.4-alpha.45 → 5.1.4-alpha.47

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.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,14 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [5.1.4-alpha.47](https://github.com/CDEBase/forms-stack/compare/v5.1.4-alpha.46...v5.1.4-alpha.47) (2025-09-23)
7
+
8
+ **Note:** Version bump only for package @adminide-stack/form-builder-core
9
+
10
+ ## [5.1.4-alpha.46](https://github.com/CDEBase/forms-stack/compare/v5.1.4-alpha.45...v5.1.4-alpha.46) (2025-09-23)
11
+
12
+ **Note:** Version bump only for package @adminide-stack/form-builder-core
13
+
6
14
  ## [5.1.4-alpha.45](https://github.com/CDEBase/forms-stack/compare/v5.1.4-alpha.44...v5.1.4-alpha.45) (2025-09-23)
7
15
 
8
16
  **Note:** Version bump only for package @adminide-stack/form-builder-core
package/lib/index.d.ts CHANGED
@@ -1,3 +1,4 @@
1
- export * from './inngest/types';
1
+ export * from './inngest/interfaces/types';
2
2
  export * from './inngest/generateFunctionCode';
3
- export * from './inngest/stepGenerator';
3
+ export { generateFromExtractedFunctions } from './inngest/stepGenerator';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,4BAA4B,CAAC;AAC3C,cAAc,gCAAgC,CAAC;AAC/C,OAAO,EAAE,8BAA8B,EAAE,MAAM,yBAAyB,CAAC"}
package/lib/index.js CHANGED
@@ -1,3 +1,3 @@
1
- export * from './inngest/types';
1
+ export * from './inngest/interfaces/types';
2
2
  export * from './inngest/generateFunctionCode';
3
- export * from './inngest/stepGenerator';
3
+ export { generateFromExtractedFunctions } from './inngest/stepGenerator';
@@ -1,7 +1,8 @@
1
- import type { InngestFunctionDef, ExtractedFunction, StepFunction, GeneratedFunctionResult } from './types';
1
+ import type { InngestFunctionDef, ExtractedFunction, StepFunction, GeneratedFunctionResult } from './interfaces/types';
2
2
  export { cleanStepCode, extractStepVarName } from './stepGenerator';
3
3
  export declare function generateFunctionCode(def: InngestFunctionDef): string;
4
4
  export declare function generateHandlerBody(def: InngestFunctionDef): string;
5
5
  export declare function generateStepFunctionsFromDB(functionId: string, events: string[], extractedFunctions: ExtractedFunction[]): GeneratedFunctionResult;
6
6
  export declare function wrapStepsInInngestFunction(functionDef: InngestFunctionDef, stepFunctions: StepFunction[]): string;
7
7
  export declare function generateStepFromFunction(stepFunction: StepFunction, index: number): string;
8
+ //# sourceMappingURL=generateFunctionCode.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generateFunctionCode.d.ts","sourceRoot":"","sources":["../../src/inngest/generateFunctionCode.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACR,kBAAkB,EAElB,iBAAiB,EACjB,YAAY,EACZ,uBAAuB,EAC1B,MAAM,oBAAoB,CAAC;AAS5B,OAAO,EAAE,aAAa,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AA2DpE,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,kBAAkB,GAAG,MAAM,CAWpE;AAGD,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,kBAAkB,GAAG,MAAM,CAInE;AAGD,wBAAgB,2BAA2B,CACvC,UAAU,EAAE,MAAM,EAClB,MAAM,EAAE,MAAM,EAAE,EAChB,kBAAkB,EAAE,iBAAiB,EAAE,GACxC,uBAAuB,CAazB;AAGD,wBAAgB,0BAA0B,CAAC,WAAW,EAAE,kBAAkB,EAAE,aAAa,EAAE,YAAY,EAAE,GAAG,MAAM,CAWjH;AAGD,wBAAgB,wBAAwB,CAAC,YAAY,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAoB1F"}
@@ -34,8 +34,7 @@ function formatCode(code) {
34
34
  .replace(/\n{3,}/g, '\n\n'); // Remove excessive blank lines
35
35
  }
36
36
  function generateStepBlock(step, position) {
37
- var _a;
38
- const stepVar = ((_a = (step.code || '').match(/const\s+(\w+)\s*=/)) === null || _a === void 0 ? void 0 : _a[1]) || `step_${position}`;
37
+ const stepVar = (step.code || '').match(/const\s+(\w+)\s*=/)?.[1] || `step_${position}`;
39
38
  // If caller supplied code, embed it inside step.run wrapper by default for consistency
40
39
  if (step.type === 'sleep' || step.type === 'sendEvent' || step.type === 'waitForEvent') {
41
40
  // Execute directly (these typically call step.* helpers)
@@ -0,0 +1,2 @@
1
+ export * from './types';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/inngest/interfaces/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC"}
@@ -0,0 +1 @@
1
+ export * from './types';
@@ -0,0 +1,48 @@
1
+ export type InngestStepType = 'run' | 'sleep' | 'sendEvent' | 'waitForEvent' | 'retrieveData' | 'parallel' | 'validateForm';
2
+ export interface InngestStep {
3
+ id: string;
4
+ name: string;
5
+ type: InngestStepType;
6
+ code?: string;
7
+ description?: string;
8
+ [key: string]: unknown;
9
+ }
10
+ export interface InngestFunctionDef {
11
+ id: string;
12
+ name: string;
13
+ description?: string;
14
+ events: string[];
15
+ steps: InngestStep[];
16
+ concurrency?: number;
17
+ retries?: number;
18
+ timeout?: string | number;
19
+ [key: string]: unknown;
20
+ }
21
+ export interface ExtractedFunction {
22
+ id: string;
23
+ name: string;
24
+ code?: string;
25
+ extensionId?: string;
26
+ extensionName?: string;
27
+ generatedCode?: string;
28
+ steps?: StepDefinition[];
29
+ originalStepName?: string;
30
+ }
31
+ export interface StepFunction {
32
+ id: string;
33
+ name: string;
34
+ code: string;
35
+ type?: InngestStepType;
36
+ description?: string;
37
+ }
38
+ export interface StepDefinition {
39
+ id: string;
40
+ name: string;
41
+ code: string;
42
+ }
43
+ export interface GeneratedFunctionResult {
44
+ code: string;
45
+ functionId: string;
46
+ stepCount: number;
47
+ }
48
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/inngest/interfaces/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,eAAe,GACrB,KAAK,GACL,OAAO,GACP,WAAW,GACX,cAAc,GACd,cAAc,GACd,UAAU,GACV,cAAc,CAAC;AAErB,MAAM,WAAW,WAAW;IACxB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,eAAe,CAAC;IACtB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CAC1B;AAED,MAAM,WAAW,kBAAkB;IAC/B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,KAAK,EAAE,WAAW,EAAE,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAE1B,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CAC1B;AAGD,MAAM,WAAW,iBAAiB;IAC9B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,KAAK,CAAC,EAAE,cAAc,EAAE,CAAC;IACzB,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED,MAAM,WAAW,YAAY;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,eAAe,CAAC;IACvB,WAAW,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,cAAc;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,uBAAuB;IACpC,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;CACrB"}
@@ -0,0 +1 @@
1
+ export {};
@@ -1,5 +1,5 @@
1
- import type { InngestStep, ExtractedFunction } from './types';
2
- export type { ExtractedFunction } from './types';
1
+ import type { InngestStep, ExtractedFunction } from './interfaces/types';
2
+ export type { ExtractedFunction } from './interfaces/types';
3
3
  /**
4
4
  * Step function generation utilities for unified code generation
5
5
  * Used by both browser editor and server execution
@@ -23,3 +23,4 @@ export declare function generateInngestFunctionFromSteps(stepFunctions: Array<{
23
23
  label?: string;
24
24
  }>): string;
25
25
  export declare function generateFromExtractedFunctions(extractedFunctions: ExtractedFunction[]): string;
26
+ //# sourceMappingURL=stepGenerator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stepGenerator.d.ts","sourceRoot":"","sources":["../../src/inngest/stepGenerator.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAGzE,YAAY,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAE5D;;;GAGG;AAGH,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAElD;AAGD,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAG9D;AAGD,wBAAgB,2BAA2B,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CA4FrF;AAGD,wBAAgB,oBAAoB,CAChC,IAAI,EAAE,WAAW,GAAG,iBAAiB,EACrC,KAAK,EAAE,MAAM,GACd;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAYnC;AAGD,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CA0C/D;AAGD,wBAAgB,yBAAyB,CACrC,YAAY,EAAE;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,EAC/C,QAAQ,EAAE,MAAM,EAChB,SAAS,EAAE,MAAM,GAClB,MAAM,CAsER;AAGD,wBAAgB,gCAAgC,CAC5C,aAAa,EAAE,KAAK,CAAC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,GACvF,MAAM,CAgCR;AAGD,wBAAgB,8BAA8B,CAAC,kBAAkB,EAAE,iBAAiB,EAAE,GAAG,MAAM,CAoB9F"}
@@ -168,10 +168,8 @@ export function transformStepForExecution(stepFunction, stepType, stepLabel) {
168
168
  // Already has assignment, replace variable name
169
169
  return `const ${stepFunction.varName}_result = await step.${method}`;
170
170
  }
171
- else {
172
- // No assignment, add one
173
- return `const ${stepFunction.varName}_result = await step.${method}`;
174
- }
171
+ // No assignment, add one
172
+ return `const ${stepFunction.varName}_result = await step.${method}`;
175
173
  });
176
174
  // Find the original variable name from the step assignment
177
175
  const originalVarMatch = transformedBody.match(/const\s+(\w+)\s*=\s*await\s+step\./);
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@adminide-stack/form-builder-core",
3
- "version": "5.1.4-alpha.45",
3
+ "version": "5.1.4-alpha.47",
4
4
  "sideEffects": false,
5
5
  "type": "module",
6
6
  "main": "lib/index.js",
7
7
  "module": "lib/index.js",
8
8
  "types": "lib/index.d.ts",
9
9
  "scripts": {
10
- "build": "tsc -b",
10
+ "build": "tsc",
11
11
  "clean": "rimraf lib"
12
12
  },
13
13
  "devDependencies": {
@@ -16,5 +16,5 @@
16
16
  "publishConfig": {
17
17
  "access": "public"
18
18
  },
19
- "gitHead": "f33888f321560a1a295442f66aa27b454471af71"
19
+ "gitHead": "0ab3c879bace1cbf771c99c2422366628ddd8483"
20
20
  }
package/src/index.ts CHANGED
@@ -1,3 +1,3 @@
1
- export * from './inngest/types';
1
+ export * from './inngest/interfaces/types';
2
2
  export * from './inngest/generateFunctionCode';
3
- export * from './inngest/stepGenerator';
3
+ export { generateFromExtractedFunctions } from './inngest/stepGenerator';
@@ -1,10 +1,11 @@
1
+ /* eslint-disable no-use-before-define */
1
2
  import type {
2
3
  InngestFunctionDef,
3
4
  InngestStep,
4
5
  ExtractedFunction,
5
6
  StepFunction,
6
7
  GeneratedFunctionResult,
7
- } from './types';
8
+ } from './interfaces/types';
8
9
  import {
9
10
  cleanStepCode,
10
11
  extractStepVarName,
@@ -0,0 +1 @@
1
+ export * from './types';
@@ -1,7 +1,7 @@
1
- import type { InngestStep, ExtractedFunction } from './types';
1
+ import type { InngestStep, ExtractedFunction } from './interfaces/types';
2
2
 
3
3
  // Re-export for convenience
4
- export type { ExtractedFunction } from './types';
4
+ export type { ExtractedFunction } from './interfaces/types';
5
5
 
6
6
  /**
7
7
  * Step function generation utilities for unified code generation
@@ -202,10 +202,9 @@ export function transformStepForExecution(
202
202
  if (constPart) {
203
203
  // Already has assignment, replace variable name
204
204
  return `const ${stepFunction.varName}_result = await step.${method}`;
205
- } else {
206
- // No assignment, add one
207
- return `const ${stepFunction.varName}_result = await step.${method}`;
208
205
  }
206
+ // No assignment, add one
207
+ return `const ${stepFunction.varName}_result = await step.${method}`;
209
208
  },
210
209
  );
211
210
 
package/tsconfig.json CHANGED
@@ -1,12 +1,13 @@
1
1
  {
2
+ "extends": "../../../tsconfig.json",
2
3
  "compilerOptions": {
3
- "target": "ES2019",
4
- "module": "ES2020",
5
- "declaration": true,
4
+ "resolveJsonModule": true,
5
+ "rootDir": "./src",
6
6
  "outDir": "lib",
7
- "rootDir": "src",
8
- "strict": true,
9
- "esModuleInterop": true,
7
+ "sourceMap": false,
8
+ "declarationDir": "lib",
9
+ "declaration": true,
10
+ "declarationMap": true,
10
11
  "skipLibCheck": true
11
12
  },
12
13
  "include": ["src"]
@@ -1 +0,0 @@
1
- {"root":["./src/index.ts","./src/inngest/generateFunctionCode.ts","./src/inngest/stepGenerator.ts","./src/inngest/types.ts"],"version":"5.9.2"}
File without changes