@n8n-as-code/workflow-core 0.1.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.
@@ -0,0 +1,22 @@
1
+ export { AstToTypeScriptGenerator, JsonToAstParser, TypeScriptParser, WorkflowBuilder, createPropertyNameContext, generateClassName, generatePropertyName, links, node, workflow, } from '@n8n-as-code/transformer';
2
+ export type { AIDependencyMap, ConnectionAST, InputConnection, JsonToTypeScriptOptions, N8nConnections, N8nNode, N8nWorkflow, NodeAST, NodeDecoratorMetadata, NodeProxy, OutputConnection, TypeScriptToJsonOptions, ValidationError, ValidationResult, ValidationWarning, WorkflowAST, WorkflowDecoratorMetadata, WorkflowMetadata, } from '@n8n-as-code/transformer';
3
+ export type N8nFacadeSetupMode = 'managed-local' | 'connect-existing' | 'generation-only';
4
+ export type N8nManagerRuntimeMode = 'managed-local-docker' | 'existing' | 'generation-only';
5
+ export interface N8nFacadeSetupModeDefinition {
6
+ id: N8nFacadeSetupMode;
7
+ label: string;
8
+ description: string;
9
+ managerMode: N8nManagerRuntimeMode;
10
+ requiresN8nAccess: boolean;
11
+ enablesRuntimeActions: boolean;
12
+ }
13
+ export declare const N8N_FACADE_SETUP_MODES: readonly N8nFacadeSetupModeDefinition[];
14
+ export declare function getN8nFacadeSetupMode(mode: N8nFacadeSetupMode): N8nFacadeSetupModeDefinition;
15
+ export declare function isN8nFacadeSetupMode(value: string): value is N8nFacadeSetupMode;
16
+ export interface WorkflowCoreRole {
17
+ packageName: '@n8n-as-code/workflow-core';
18
+ owns: readonly string[];
19
+ doesNotOwn: readonly string[];
20
+ }
21
+ export declare function getWorkflowCoreRole(): WorkflowCoreRole;
22
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,wBAAwB,EACxB,eAAe,EACf,gBAAgB,EAChB,eAAe,EACf,yBAAyB,EACzB,iBAAiB,EACjB,oBAAoB,EACpB,KAAK,EACL,IAAI,EACJ,QAAQ,GACT,MAAM,0BAA0B,CAAC;AAElC,YAAY,EACV,eAAe,EACf,aAAa,EACb,eAAe,EACf,uBAAuB,EACvB,cAAc,EACd,OAAO,EACP,WAAW,EACX,OAAO,EACP,qBAAqB,EACrB,SAAS,EACT,gBAAgB,EAChB,uBAAuB,EACvB,eAAe,EACf,gBAAgB,EAChB,iBAAiB,EACjB,WAAW,EACX,yBAAyB,EACzB,gBAAgB,GACjB,MAAM,0BAA0B,CAAC;AAElC,MAAM,MAAM,kBAAkB,GAC1B,eAAe,GACf,kBAAkB,GAClB,iBAAiB,CAAC;AAEtB,MAAM,MAAM,qBAAqB,GAC7B,sBAAsB,GACtB,UAAU,GACV,iBAAiB,CAAC;AAEtB,MAAM,WAAW,4BAA4B;IAC3C,EAAE,EAAE,kBAAkB,CAAC;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,qBAAqB,CAAC;IACnC,iBAAiB,EAAE,OAAO,CAAC;IAC3B,qBAAqB,EAAE,OAAO,CAAC;CAChC;AAED,eAAO,MAAM,sBAAsB,EAAE,SAAS,4BAA4B,EAyBhE,CAAC;AAEX,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,kBAAkB,GAAG,4BAA4B,CAM5F;AAED,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,MAAM,GAAG,KAAK,IAAI,kBAAkB,CAE/E;AAED,MAAM,WAAW,gBAAgB;IAC/B,WAAW,EAAE,4BAA4B,CAAC;IAC1C,IAAI,EAAE,SAAS,MAAM,EAAE,CAAC;IACxB,UAAU,EAAE,SAAS,MAAM,EAAE,CAAC;CAC/B;AAED,wBAAgB,mBAAmB,IAAI,gBAAgB,CActD"}
package/dist/index.js ADDED
@@ -0,0 +1,53 @@
1
+ export { AstToTypeScriptGenerator, JsonToAstParser, TypeScriptParser, WorkflowBuilder, createPropertyNameContext, generateClassName, generatePropertyName, links, node, workflow, } from '@n8n-as-code/transformer';
2
+ export const N8N_FACADE_SETUP_MODES = [
3
+ {
4
+ id: 'managed-local',
5
+ label: 'Create and manage local n8n',
6
+ description: 'The facade asks n8n-manager to prepare a local n8n runtime and starter credentials.',
7
+ managerMode: 'managed-local-docker',
8
+ requiresN8nAccess: false,
9
+ enablesRuntimeActions: true,
10
+ },
11
+ {
12
+ id: 'connect-existing',
13
+ label: 'Connect existing n8n',
14
+ description: 'The facade stores an existing n8n URL and API key, then uses n8n-manager for runtime readiness.',
15
+ managerMode: 'existing',
16
+ requiresN8nAccess: true,
17
+ enablesRuntimeActions: true,
18
+ },
19
+ {
20
+ id: 'generation-only',
21
+ label: 'Generation only',
22
+ description: 'The facade uses workflow intelligence without configuring a live n8n runtime.',
23
+ managerMode: 'generation-only',
24
+ requiresN8nAccess: false,
25
+ enablesRuntimeActions: false,
26
+ },
27
+ ];
28
+ export function getN8nFacadeSetupMode(mode) {
29
+ const definition = N8N_FACADE_SETUP_MODES.find((candidate) => candidate.id === mode);
30
+ if (!definition) {
31
+ throw new Error(`Unknown n8n facade setup mode: ${mode}`);
32
+ }
33
+ return definition;
34
+ }
35
+ export function isN8nFacadeSetupMode(value) {
36
+ return N8N_FACADE_SETUP_MODES.some((candidate) => candidate.id === value);
37
+ }
38
+ export function getWorkflowCoreRole() {
39
+ return {
40
+ packageName: '@n8n-as-code/workflow-core',
41
+ owns: [
42
+ 'workflow authoring contracts',
43
+ 'workflow JSON <-> TypeScript transformation API',
44
+ 'facade setup mode contracts',
45
+ ],
46
+ doesNotOwn: [
47
+ 'n8n runtime lifecycle',
48
+ 'credential creation or tests',
49
+ 'workflow deployment or execution',
50
+ ],
51
+ };
52
+ }
53
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,wBAAwB,EACxB,eAAe,EACf,gBAAgB,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;YACJ,8BAA8B;YAC9B,iDAAiD;YACjD,6BAA6B;SAC9B;QACD,UAAU,EAAE;YACV,uBAAuB;YACvB,8BAA8B;YAC9B,kCAAkC;SACnC;KACF,CAAC;AACJ,CAAC"}
package/package.json ADDED
@@ -0,0 +1,27 @@
1
+ {
2
+ "name": "@n8n-as-code/workflow-core",
3
+ "version": "0.1.0",
4
+ "description": "n8n-as-code workflow intelligence contracts and public workflow authoring API",
5
+ "type": "module",
6
+ "main": "./dist/index.js",
7
+ "types": "./dist/index.d.ts",
8
+ "exports": {
9
+ ".": {
10
+ "types": "./dist/index.d.ts",
11
+ "default": "./dist/index.js"
12
+ }
13
+ },
14
+ "files": [
15
+ "dist/"
16
+ ],
17
+ "scripts": {
18
+ "build": "tsc -b",
19
+ "clean": "rm -rf dist tsconfig.tsbuildinfo"
20
+ },
21
+ "dependencies": {
22
+ "@n8n-as-code/transformer": "1.2.1"
23
+ },
24
+ "devDependencies": {
25
+ "typescript": "^5.3.3"
26
+ }
27
+ }