core-package-mini-n8n 1.0.1

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,4 @@
1
+ import { NodeBase, NodeInput, NodeReturn, NodeProperty, NodeConfig } from "./types/node-base";
2
+ export type { NodeInput, NodeReturn, NodeProperty, NodeConfig };
3
+ export { NodeBase };
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,QAAQ,EAAE,SAAS,EAAE,UAAU,EAC/B,YAAY,EAAE,UAAU,EAC3B,MAAM,mBAAmB,CAAC;AAE3B,YAAY,EAAE,SAAS,EAAE,UAAU,EAAE,YAAY,EAAE,UAAU,EAAE,CAAA;AAC/D,OAAO,EAAE,QAAQ,EAAE,CAAA"}
package/dist/index.js ADDED
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.NodeBase = void 0;
4
+ const node_base_1 = require("./types/node-base");
5
+ Object.defineProperty(exports, "NodeBase", { enumerable: true, get: function () { return node_base_1.NodeBase; } });
6
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,iDAG2B;AAGlB,yFALL,oBAAQ,OAKK"}
@@ -0,0 +1,35 @@
1
+ export interface NodeReturn {
2
+ [key: string]: any;
3
+ }
4
+ export interface NodeInput {
5
+ [key: string]: any;
6
+ settings: {
7
+ [key: string]: any;
8
+ };
9
+ }
10
+ export interface NodeProperty {
11
+ label: string;
12
+ name: string;
13
+ type: string;
14
+ required: boolean;
15
+ default: any;
16
+ options?: Array<{
17
+ label: string;
18
+ value: string;
19
+ }>;
20
+ conditionShow?: Array<{
21
+ keyCheck: string;
22
+ valueExpected: string;
23
+ }>;
24
+ }
25
+ export interface NodeConfig {
26
+ name: string;
27
+ type: string;
28
+ description: string;
29
+ properties: Array<NodeProperty>;
30
+ }
31
+ export declare abstract class NodeBase {
32
+ getConfig(): NodeConfig;
33
+ execute(input: NodeInput): Promise<NodeReturn>;
34
+ }
35
+ //# sourceMappingURL=node-base.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"node-base.d.ts","sourceRoot":"","sources":["../../src/types/node-base.ts"],"names":[],"mappings":"AACA,MAAM,WAAW,UAAU;IACvB,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACtB;AAED,MAAM,WAAW,SAAS;IACtB,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;IACnB,QAAQ,EAAE;QACN,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;KACtB,CAAA;CACJ;AAED,MAAM,WAAW,YAAY;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,OAAO,CAAC;IAClB,OAAO,EAAE,GAAG,CAAC;IACb,OAAO,CAAC,EAAE,KAAK,CAAC;QACZ,KAAK,EAAE,MAAM,CAAC;QACd,KAAK,EAAE,MAAM,CAAC;KACjB,CAAC,CAAC;IACH,aAAa,CAAC,EAAE,KAAK,CAAC;QAClB,QAAQ,EAAE,MAAM,CAAC;QACjB,aAAa,EAAE,MAAM,CAAC;KACzB,CAAC,CAAC;CACN;AAED,MAAM,WAAW,UAAU;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,KAAK,CAAC,YAAY,CAAC,CAAA;CAClC;AAED,8BAAsB,QAAQ;IAE1B,SAAS,IAAI,UAAU;IAIvB,OAAO,CAAC,KAAK,EAAE,SAAS,GAAG,OAAO,CAAC,UAAU,CAAC;CAGjD"}
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.NodeBase = void 0;
4
+ class NodeBase {
5
+ getConfig() {
6
+ throw new Error("Method not implemented");
7
+ }
8
+ execute(input) {
9
+ throw new Error("Method not implemented");
10
+ }
11
+ }
12
+ exports.NodeBase = NodeBase;
13
+ //# sourceMappingURL=node-base.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"node-base.js","sourceRoot":"","sources":["../../src/types/node-base.ts"],"names":[],"mappings":";;;AAmCA,MAAsB,QAAQ;IAE1B,SAAS;QACL,MAAM,IAAI,KAAK,CAAC,wBAAwB,CAAC,CAAC;IAC9C,CAAC;IAED,OAAO,CAAC,KAAgB;QACpB,MAAM,IAAI,KAAK,CAAC,wBAAwB,CAAC,CAAC;IAC9C,CAAC;CACJ;AATD,4BASC"}
package/package.json ADDED
@@ -0,0 +1,20 @@
1
+ {
2
+ "name": "core-package-mini-n8n",
3
+ "version": "1.0.1",
4
+ "description": "Code package to create custom nodes for mini-n8n",
5
+ "main": "dist/index.js",
6
+ "types": "dist/index.d.ts",
7
+ "scripts": {
8
+ "build": "tsc",
9
+ "start": "tsx src/index.ts"
10
+ },
11
+ "keywords": [],
12
+ "author": "",
13
+ "license": "ISC",
14
+ "packageManager": "pnpm@10.7.1",
15
+ "devDependencies": {
16
+ "ts-node": "^10.9.2",
17
+ "tsx": "^4.20.6",
18
+ "typescript": "^5.9.3"
19
+ }
20
+ }
package/src/index.ts ADDED
@@ -0,0 +1,7 @@
1
+ import {
2
+ NodeBase, NodeInput, NodeReturn,
3
+ NodeProperty, NodeConfig
4
+ } from "./types/node-base";
5
+
6
+ export type { NodeInput, NodeReturn, NodeProperty, NodeConfig }
7
+ export { NodeBase }
@@ -0,0 +1,46 @@
1
+
2
+ export interface NodeReturn {
3
+ [key: string]: any;
4
+ }
5
+
6
+ export interface NodeInput {
7
+ [key: string]: any;
8
+ settings: {
9
+ [key: string]: any;
10
+ }
11
+ }
12
+
13
+ export interface NodeProperty {
14
+ label: string,
15
+ name: string,
16
+ type: string,
17
+ required: boolean,
18
+ default: any,
19
+ options?: Array<{
20
+ label: string,
21
+ value: string,
22
+ }>,
23
+ conditionShow?: Array<{
24
+ keyCheck: string,
25
+ valueExpected: string,
26
+ }>,
27
+ }
28
+
29
+ export interface NodeConfig {
30
+ name: string,
31
+ type: string,
32
+ description: string,
33
+ properties: Array<NodeProperty>
34
+ }
35
+
36
+ export abstract class NodeBase {
37
+
38
+ getConfig(): NodeConfig {
39
+ throw new Error("Method not implemented");
40
+ }
41
+
42
+ execute(input: NodeInput): Promise<NodeReturn> {
43
+ throw new Error("Method not implemented");
44
+ }
45
+ }
46
+
package/tsconfig.json ADDED
@@ -0,0 +1,44 @@
1
+ {
2
+ // Visit https://aka.ms/tsconfig to read more about this file
3
+ "compilerOptions": {
4
+ // File Layout
5
+ // "rootDir": "./src",
6
+ "outDir": "./dist",
7
+
8
+ // Environment Settings
9
+ // See also https://aka.ms/tsconfig/module
10
+ "module": "nodenext",
11
+ "target": "esnext",
12
+ "types": [],
13
+ // For nodejs:
14
+ // "lib": ["esnext"],
15
+ // "types": ["node"],
16
+ // and npm install -D @types/node
17
+
18
+ // Other Outputs
19
+ "sourceMap": true,
20
+ "declaration": true,
21
+ "declarationMap": true,
22
+
23
+ // Stricter Typechecking Options
24
+ "noUncheckedIndexedAccess": true,
25
+ "exactOptionalPropertyTypes": true,
26
+
27
+ // Style Options
28
+ // "noImplicitReturns": true,
29
+ // "noImplicitOverride": true,
30
+ // "noUnusedLocals": true,
31
+ // "noUnusedParameters": true,
32
+ // "noFallthroughCasesInSwitch": true,
33
+ // "noPropertyAccessFromIndexSignature": true,
34
+
35
+ // Recommended Options
36
+ "strict": true,
37
+ "jsx": "react-jsx",
38
+ "verbatimModuleSyntax": false,
39
+ "isolatedModules": true,
40
+ "noUncheckedSideEffectImports": true,
41
+ "moduleDetection": "force",
42
+ "skipLibCheck": true,
43
+ }
44
+ }