@n8n/extension-sdk 0.7.0 → 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.
- package/dist/backend/define.cjs +2 -32
- package/dist/backend/define.d.cts +3 -5
- package/dist/backend/define.d.mts +3 -0
- package/dist/backend/define.mjs +3 -0
- package/dist/backend/define2.cjs +14 -0
- package/dist/backend/define2.cjs.map +1 -0
- package/dist/backend/define2.d.cts +7 -0
- package/dist/backend/define2.d.mts +7 -0
- package/dist/backend/define2.mjs +8 -0
- package/dist/backend/define2.mjs.map +1 -0
- package/dist/backend/index.cjs +2 -34
- package/dist/backend/index.d.cts +3 -2
- package/dist/backend/index.d.mts +3 -0
- package/dist/backend/index.mjs +3 -0
- package/dist/backend/types.cjs +0 -19
- package/dist/backend/types.d.cts +2 -9
- package/dist/backend/types.d.mts +2 -0
- package/dist/backend/types.mjs +1 -0
- package/dist/backend/types2.d.cts +11 -0
- package/dist/backend/types2.d.mts +11 -0
- package/dist/frontend/define.cjs +2 -32
- package/dist/frontend/define.d.cts +3 -7
- package/dist/frontend/define.d.mts +3 -0
- package/dist/frontend/define.mjs +3 -0
- package/dist/frontend/define2.cjs +14 -0
- package/dist/frontend/define2.cjs.map +1 -0
- package/dist/frontend/define2.d.cts +7 -0
- package/dist/frontend/define2.d.mts +7 -0
- package/dist/frontend/define2.mjs +8 -0
- package/dist/frontend/define2.mjs.map +1 -0
- package/dist/frontend/index.cjs +2 -34
- package/dist/frontend/index.d.cts +3 -4
- package/dist/frontend/index.d.mts +3 -0
- package/dist/frontend/index.mjs +3 -0
- package/dist/frontend/types.cjs +0 -19
- package/dist/frontend/types.d.cts +2 -14
- package/dist/frontend/types.d.mts +2 -0
- package/dist/frontend/types.mjs +1 -0
- package/dist/frontend/types2.d.cts +16 -0
- package/dist/frontend/types2.d.mts +16 -0
- package/dist/index.cjs +2 -111
- package/dist/index.d.cts +2 -2
- package/dist/index.d.mts +2 -0
- package/dist/index.mjs +3 -0
- package/dist/schema.cjs +2 -109
- package/dist/schema.d.cts +2 -114
- package/dist/schema.d.mts +2 -0
- package/dist/schema.mjs +3 -0
- package/dist/schema2.cjs +34 -0
- package/dist/schema2.cjs.map +1 -0
- package/dist/schema2.d.cts +116 -0
- package/dist/schema2.d.mts +116 -0
- package/dist/schema2.mjs +29 -0
- package/dist/schema2.mjs.map +1 -0
- package/package.json +13 -12
- package/dist/backend/chunk-B7CLIGBD.js +0 -9
- package/dist/backend/chunk-B7CLIGBD.js.map +0 -1
- package/dist/backend/define.cjs.map +0 -1
- package/dist/backend/define.d.ts +0 -5
- package/dist/backend/define.js +0 -7
- package/dist/backend/define.js.map +0 -1
- package/dist/backend/index.cjs.map +0 -1
- package/dist/backend/index.d.ts +0 -2
- package/dist/backend/index.js +0 -7
- package/dist/backend/index.js.map +0 -1
- package/dist/backend/types.cjs.map +0 -1
- package/dist/backend/types.d.ts +0 -9
- package/dist/backend/types.js +0 -1
- package/dist/backend/types.js.map +0 -1
- package/dist/chunk-4ERGEAXV.js +0 -86
- package/dist/chunk-4ERGEAXV.js.map +0 -1
- package/dist/frontend/chunk-LTKOPDVC.js +0 -9
- package/dist/frontend/chunk-LTKOPDVC.js.map +0 -1
- package/dist/frontend/define.cjs.map +0 -1
- package/dist/frontend/define.d.ts +0 -7
- package/dist/frontend/define.js +0 -7
- package/dist/frontend/define.js.map +0 -1
- package/dist/frontend/index.cjs.map +0 -1
- package/dist/frontend/index.d.ts +0 -4
- package/dist/frontend/index.js +0 -7
- package/dist/frontend/index.js.map +0 -1
- package/dist/frontend/types.cjs.map +0 -1
- package/dist/frontend/types.d.ts +0 -14
- package/dist/frontend/types.js +0 -1
- package/dist/frontend/types.js.map +0 -1
- package/dist/index.cjs.map +0 -1
- package/dist/index.d.ts +0 -2
- package/dist/index.js +0 -7
- package/dist/index.js.map +0 -1
- package/dist/schema.cjs.map +0 -1
- package/dist/schema.d.ts +0 -114
- package/dist/schema.js +0 -7
- package/dist/schema.js.map +0 -1
package/dist/schema.cjs
CHANGED
|
@@ -1,110 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
1
|
+
const require_schema = require('./schema2.cjs');
|
|
19
2
|
|
|
20
|
-
|
|
21
|
-
var schema_exports = {};
|
|
22
|
-
__export(schema_exports, {
|
|
23
|
-
extensionManifestSchema: () => extensionManifestSchema
|
|
24
|
-
});
|
|
25
|
-
module.exports = __toCommonJS(schema_exports);
|
|
26
|
-
var import_zod = require("zod");
|
|
27
|
-
var extensionManifestSchema = import_zod.z.object({
|
|
28
|
-
/**
|
|
29
|
-
* Name of the extension package.
|
|
30
|
-
*/
|
|
31
|
-
name: import_zod.z.string(),
|
|
32
|
-
/**
|
|
33
|
-
* The display name of the extension.
|
|
34
|
-
*/
|
|
35
|
-
displayName: import_zod.z.string(),
|
|
36
|
-
/**
|
|
37
|
-
* Description of the extension package.
|
|
38
|
-
*/
|
|
39
|
-
description: import_zod.z.string(),
|
|
40
|
-
/**
|
|
41
|
-
* Publisher of the extension.
|
|
42
|
-
*/
|
|
43
|
-
publisher: import_zod.z.string(),
|
|
44
|
-
/**
|
|
45
|
-
* Version of the extension package.
|
|
46
|
-
*/
|
|
47
|
-
version: import_zod.z.string(),
|
|
48
|
-
/**
|
|
49
|
-
* Category the extension belongs to.
|
|
50
|
-
*/
|
|
51
|
-
categories: import_zod.z.array(import_zod.z.string()),
|
|
52
|
-
/**
|
|
53
|
-
* Setup paths for backend and frontend code entry points.
|
|
54
|
-
*/
|
|
55
|
-
entry: import_zod.z.object({
|
|
56
|
-
/**
|
|
57
|
-
* Path to the backend entry file.
|
|
58
|
-
*/
|
|
59
|
-
backend: import_zod.z.string(),
|
|
60
|
-
/**
|
|
61
|
-
* Path to the frontend entry file.
|
|
62
|
-
*/
|
|
63
|
-
frontend: import_zod.z.string()
|
|
64
|
-
}),
|
|
65
|
-
/**
|
|
66
|
-
* Minimum SDK version required to run the extension.
|
|
67
|
-
*/
|
|
68
|
-
minSDKVersion: import_zod.z.string(),
|
|
69
|
-
/**
|
|
70
|
-
* Permissions object specifying allowed access for frontend and backend.
|
|
71
|
-
*/
|
|
72
|
-
permissions: import_zod.z.object({
|
|
73
|
-
/**
|
|
74
|
-
* List of frontend permissions (array of strings).
|
|
75
|
-
*/
|
|
76
|
-
frontend: import_zod.z.array(import_zod.z.string()),
|
|
77
|
-
/**
|
|
78
|
-
* List of backend permissions (array of strings).
|
|
79
|
-
*/
|
|
80
|
-
backend: import_zod.z.array(import_zod.z.string())
|
|
81
|
-
}),
|
|
82
|
-
/**
|
|
83
|
-
* List of events that the extension listens to.
|
|
84
|
-
*/
|
|
85
|
-
events: import_zod.z.array(import_zod.z.string()),
|
|
86
|
-
/**
|
|
87
|
-
* Define extension points for existing functionalities.
|
|
88
|
-
*/
|
|
89
|
-
extends: import_zod.z.object({
|
|
90
|
-
/**
|
|
91
|
-
* Extends the views configuration.
|
|
92
|
-
*/
|
|
93
|
-
views: import_zod.z.object({
|
|
94
|
-
/**
|
|
95
|
-
* Extends the workflows view configuration.
|
|
96
|
-
*/
|
|
97
|
-
workflows: import_zod.z.object({
|
|
98
|
-
/**
|
|
99
|
-
* Header component for the workflows view.
|
|
100
|
-
*/
|
|
101
|
-
header: import_zod.z.string()
|
|
102
|
-
})
|
|
103
|
-
})
|
|
104
|
-
})
|
|
105
|
-
});
|
|
106
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
107
|
-
0 && (module.exports = {
|
|
108
|
-
extensionManifestSchema
|
|
109
|
-
});
|
|
110
|
-
//# sourceMappingURL=schema.cjs.map
|
|
3
|
+
exports.extensionManifestSchema = require_schema.extensionManifestSchema;
|
package/dist/schema.d.cts
CHANGED
|
@@ -1,114 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
declare const extensionManifestSchema: z.ZodObject<{
|
|
4
|
-
name: z.ZodString;
|
|
5
|
-
displayName: z.ZodString;
|
|
6
|
-
description: z.ZodString;
|
|
7
|
-
publisher: z.ZodString;
|
|
8
|
-
version: z.ZodString;
|
|
9
|
-
categories: z.ZodArray<z.ZodString, "many">;
|
|
10
|
-
entry: z.ZodObject<{
|
|
11
|
-
backend: z.ZodString;
|
|
12
|
-
frontend: z.ZodString;
|
|
13
|
-
}, "strip", z.ZodTypeAny, {
|
|
14
|
-
backend: string;
|
|
15
|
-
frontend: string;
|
|
16
|
-
}, {
|
|
17
|
-
backend: string;
|
|
18
|
-
frontend: string;
|
|
19
|
-
}>;
|
|
20
|
-
minSDKVersion: z.ZodString;
|
|
21
|
-
permissions: z.ZodObject<{
|
|
22
|
-
frontend: z.ZodArray<z.ZodString, "many">;
|
|
23
|
-
backend: z.ZodArray<z.ZodString, "many">;
|
|
24
|
-
}, "strip", z.ZodTypeAny, {
|
|
25
|
-
backend: string[];
|
|
26
|
-
frontend: string[];
|
|
27
|
-
}, {
|
|
28
|
-
backend: string[];
|
|
29
|
-
frontend: string[];
|
|
30
|
-
}>;
|
|
31
|
-
events: z.ZodArray<z.ZodString, "many">;
|
|
32
|
-
extends: z.ZodObject<{
|
|
33
|
-
views: z.ZodObject<{
|
|
34
|
-
workflows: z.ZodObject<{
|
|
35
|
-
header: z.ZodString;
|
|
36
|
-
}, "strip", z.ZodTypeAny, {
|
|
37
|
-
header: string;
|
|
38
|
-
}, {
|
|
39
|
-
header: string;
|
|
40
|
-
}>;
|
|
41
|
-
}, "strip", z.ZodTypeAny, {
|
|
42
|
-
workflows: {
|
|
43
|
-
header: string;
|
|
44
|
-
};
|
|
45
|
-
}, {
|
|
46
|
-
workflows: {
|
|
47
|
-
header: string;
|
|
48
|
-
};
|
|
49
|
-
}>;
|
|
50
|
-
}, "strip", z.ZodTypeAny, {
|
|
51
|
-
views: {
|
|
52
|
-
workflows: {
|
|
53
|
-
header: string;
|
|
54
|
-
};
|
|
55
|
-
};
|
|
56
|
-
}, {
|
|
57
|
-
views: {
|
|
58
|
-
workflows: {
|
|
59
|
-
header: string;
|
|
60
|
-
};
|
|
61
|
-
};
|
|
62
|
-
}>;
|
|
63
|
-
}, "strip", z.ZodTypeAny, {
|
|
64
|
-
name: string;
|
|
65
|
-
displayName: string;
|
|
66
|
-
description: string;
|
|
67
|
-
publisher: string;
|
|
68
|
-
version: string;
|
|
69
|
-
categories: string[];
|
|
70
|
-
entry: {
|
|
71
|
-
backend: string;
|
|
72
|
-
frontend: string;
|
|
73
|
-
};
|
|
74
|
-
minSDKVersion: string;
|
|
75
|
-
permissions: {
|
|
76
|
-
backend: string[];
|
|
77
|
-
frontend: string[];
|
|
78
|
-
};
|
|
79
|
-
events: string[];
|
|
80
|
-
extends: {
|
|
81
|
-
views: {
|
|
82
|
-
workflows: {
|
|
83
|
-
header: string;
|
|
84
|
-
};
|
|
85
|
-
};
|
|
86
|
-
};
|
|
87
|
-
}, {
|
|
88
|
-
name: string;
|
|
89
|
-
displayName: string;
|
|
90
|
-
description: string;
|
|
91
|
-
publisher: string;
|
|
92
|
-
version: string;
|
|
93
|
-
categories: string[];
|
|
94
|
-
entry: {
|
|
95
|
-
backend: string;
|
|
96
|
-
frontend: string;
|
|
97
|
-
};
|
|
98
|
-
minSDKVersion: string;
|
|
99
|
-
permissions: {
|
|
100
|
-
backend: string[];
|
|
101
|
-
frontend: string[];
|
|
102
|
-
};
|
|
103
|
-
events: string[];
|
|
104
|
-
extends: {
|
|
105
|
-
views: {
|
|
106
|
-
workflows: {
|
|
107
|
-
header: string;
|
|
108
|
-
};
|
|
109
|
-
};
|
|
110
|
-
};
|
|
111
|
-
}>;
|
|
112
|
-
type ExtensionManifest = z.infer<typeof extensionManifestSchema>;
|
|
113
|
-
|
|
114
|
-
export { type ExtensionManifest, extensionManifestSchema };
|
|
1
|
+
import { n as extensionManifestSchema, t as ExtensionManifest } from "./schema2.cjs";
|
|
2
|
+
export { ExtensionManifest, extensionManifestSchema };
|
package/dist/schema.mjs
ADDED
package/dist/schema2.cjs
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
let zod = require("zod");
|
|
2
|
+
|
|
3
|
+
//#region src/schema.ts
|
|
4
|
+
/**
|
|
5
|
+
* Schema for the extension configuration.
|
|
6
|
+
*/
|
|
7
|
+
const extensionManifestSchema = zod.z.object({
|
|
8
|
+
name: zod.z.string(),
|
|
9
|
+
displayName: zod.z.string(),
|
|
10
|
+
description: zod.z.string(),
|
|
11
|
+
publisher: zod.z.string(),
|
|
12
|
+
version: zod.z.string(),
|
|
13
|
+
categories: zod.z.array(zod.z.string()),
|
|
14
|
+
entry: zod.z.object({
|
|
15
|
+
backend: zod.z.string(),
|
|
16
|
+
frontend: zod.z.string()
|
|
17
|
+
}),
|
|
18
|
+
minSDKVersion: zod.z.string(),
|
|
19
|
+
permissions: zod.z.object({
|
|
20
|
+
frontend: zod.z.array(zod.z.string()),
|
|
21
|
+
backend: zod.z.array(zod.z.string())
|
|
22
|
+
}),
|
|
23
|
+
events: zod.z.array(zod.z.string()),
|
|
24
|
+
extends: zod.z.object({ views: zod.z.object({ workflows: zod.z.object({ header: zod.z.string() }) }) })
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
//#endregion
|
|
28
|
+
Object.defineProperty(exports, 'extensionManifestSchema', {
|
|
29
|
+
enumerable: true,
|
|
30
|
+
get: function () {
|
|
31
|
+
return extensionManifestSchema;
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
//# sourceMappingURL=schema2.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema2.cjs","names":["z"],"sources":["../src/schema.ts"],"sourcesContent":["import { z } from 'zod';\n\n/**\n * Schema for the extension configuration.\n */\nexport const extensionManifestSchema = z.object({\n\t/**\n\t * Name of the extension package.\n\t */\n\tname: z.string(),\n\n\t/**\n\t * The display name of the extension.\n\t */\n\tdisplayName: z.string(),\n\n\t/**\n\t * Description of the extension package.\n\t */\n\tdescription: z.string(),\n\n\t/**\n\t * Publisher of the extension.\n\t */\n\tpublisher: z.string(),\n\n\t/**\n\t * Version of the extension package.\n\t */\n\tversion: z.string(),\n\n\t/**\n\t * Category the extension belongs to.\n\t */\n\tcategories: z.array(z.string()),\n\n\t/**\n\t * Setup paths for backend and frontend code entry points.\n\t */\n\tentry: z.object({\n\t\t/**\n\t\t * Path to the backend entry file.\n\t\t */\n\t\tbackend: z.string(),\n\t\t/**\n\t\t * Path to the frontend entry file.\n\t\t */\n\t\tfrontend: z.string(),\n\t}),\n\n\t/**\n\t * Minimum SDK version required to run the extension.\n\t */\n\tminSDKVersion: z.string(),\n\n\t/**\n\t * Permissions object specifying allowed access for frontend and backend.\n\t */\n\tpermissions: z.object({\n\t\t/**\n\t\t * List of frontend permissions (array of strings).\n\t\t */\n\t\tfrontend: z.array(z.string()),\n\t\t/**\n\t\t * List of backend permissions (array of strings).\n\t\t */\n\t\tbackend: z.array(z.string()),\n\t}),\n\n\t/**\n\t * List of events that the extension listens to.\n\t */\n\tevents: z.array(z.string()),\n\n\t/**\n\t * Define extension points for existing functionalities.\n\t */\n\textends: z.object({\n\t\t/**\n\t\t * Extends the views configuration.\n\t\t */\n\t\tviews: z.object({\n\t\t\t/**\n\t\t\t * Extends the workflows view configuration.\n\t\t\t */\n\t\t\tworkflows: z.object({\n\t\t\t\t/**\n\t\t\t\t * Header component for the workflows view.\n\t\t\t\t */\n\t\t\t\theader: z.string(),\n\t\t\t}),\n\t\t}),\n\t}),\n});\n\nexport type ExtensionManifest = z.infer<typeof extensionManifestSchema>;\n"],"mappings":";;;;;;AAKA,MAAa,0BAA0BA,MAAE,OAAO;CAI/C,MAAMA,MAAE,QAAQ;CAKhB,aAAaA,MAAE,QAAQ;CAKvB,aAAaA,MAAE,QAAQ;CAKvB,WAAWA,MAAE,QAAQ;CAKrB,SAASA,MAAE,QAAQ;CAKnB,YAAYA,MAAE,MAAMA,MAAE,QAAQ,CAAC;CAK/B,OAAOA,MAAE,OAAO;EAIf,SAASA,MAAE,QAAQ;EAInB,UAAUA,MAAE,QAAQ;EACpB,CAAC;CAKF,eAAeA,MAAE,QAAQ;CAKzB,aAAaA,MAAE,OAAO;EAIrB,UAAUA,MAAE,MAAMA,MAAE,QAAQ,CAAC;EAI7B,SAASA,MAAE,MAAMA,MAAE,QAAQ,CAAC;EAC5B,CAAC;CAKF,QAAQA,MAAE,MAAMA,MAAE,QAAQ,CAAC;CAK3B,SAASA,MAAE,OAAO,EAIjB,OAAOA,MAAE,OAAO,EAIf,WAAWA,MAAE,OAAO,EAInB,QAAQA,MAAE,QAAQ,EAClB,CAAC,EACF,CAAC,EACF,CAAC;CACF,CAAC"}
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
|
|
3
|
+
//#region src/schema.d.ts
|
|
4
|
+
declare const extensionManifestSchema: z.ZodObject<{
|
|
5
|
+
name: z.ZodString;
|
|
6
|
+
displayName: z.ZodString;
|
|
7
|
+
description: z.ZodString;
|
|
8
|
+
publisher: z.ZodString;
|
|
9
|
+
version: z.ZodString;
|
|
10
|
+
categories: z.ZodArray<z.ZodString, "many">;
|
|
11
|
+
entry: z.ZodObject<{
|
|
12
|
+
backend: z.ZodString;
|
|
13
|
+
frontend: z.ZodString;
|
|
14
|
+
}, "strip", z.ZodTypeAny, {
|
|
15
|
+
backend: string;
|
|
16
|
+
frontend: string;
|
|
17
|
+
}, {
|
|
18
|
+
backend: string;
|
|
19
|
+
frontend: string;
|
|
20
|
+
}>;
|
|
21
|
+
minSDKVersion: z.ZodString;
|
|
22
|
+
permissions: z.ZodObject<{
|
|
23
|
+
frontend: z.ZodArray<z.ZodString, "many">;
|
|
24
|
+
backend: z.ZodArray<z.ZodString, "many">;
|
|
25
|
+
}, "strip", z.ZodTypeAny, {
|
|
26
|
+
backend: string[];
|
|
27
|
+
frontend: string[];
|
|
28
|
+
}, {
|
|
29
|
+
backend: string[];
|
|
30
|
+
frontend: string[];
|
|
31
|
+
}>;
|
|
32
|
+
events: z.ZodArray<z.ZodString, "many">;
|
|
33
|
+
extends: z.ZodObject<{
|
|
34
|
+
views: z.ZodObject<{
|
|
35
|
+
workflows: z.ZodObject<{
|
|
36
|
+
header: z.ZodString;
|
|
37
|
+
}, "strip", z.ZodTypeAny, {
|
|
38
|
+
header: string;
|
|
39
|
+
}, {
|
|
40
|
+
header: string;
|
|
41
|
+
}>;
|
|
42
|
+
}, "strip", z.ZodTypeAny, {
|
|
43
|
+
workflows: {
|
|
44
|
+
header: string;
|
|
45
|
+
};
|
|
46
|
+
}, {
|
|
47
|
+
workflows: {
|
|
48
|
+
header: string;
|
|
49
|
+
};
|
|
50
|
+
}>;
|
|
51
|
+
}, "strip", z.ZodTypeAny, {
|
|
52
|
+
views: {
|
|
53
|
+
workflows: {
|
|
54
|
+
header: string;
|
|
55
|
+
};
|
|
56
|
+
};
|
|
57
|
+
}, {
|
|
58
|
+
views: {
|
|
59
|
+
workflows: {
|
|
60
|
+
header: string;
|
|
61
|
+
};
|
|
62
|
+
};
|
|
63
|
+
}>;
|
|
64
|
+
}, "strip", z.ZodTypeAny, {
|
|
65
|
+
name: string;
|
|
66
|
+
displayName: string;
|
|
67
|
+
description: string;
|
|
68
|
+
publisher: string;
|
|
69
|
+
version: string;
|
|
70
|
+
categories: string[];
|
|
71
|
+
entry: {
|
|
72
|
+
backend: string;
|
|
73
|
+
frontend: string;
|
|
74
|
+
};
|
|
75
|
+
minSDKVersion: string;
|
|
76
|
+
permissions: {
|
|
77
|
+
backend: string[];
|
|
78
|
+
frontend: string[];
|
|
79
|
+
};
|
|
80
|
+
events: string[];
|
|
81
|
+
extends: {
|
|
82
|
+
views: {
|
|
83
|
+
workflows: {
|
|
84
|
+
header: string;
|
|
85
|
+
};
|
|
86
|
+
};
|
|
87
|
+
};
|
|
88
|
+
}, {
|
|
89
|
+
name: string;
|
|
90
|
+
displayName: string;
|
|
91
|
+
description: string;
|
|
92
|
+
publisher: string;
|
|
93
|
+
version: string;
|
|
94
|
+
categories: string[];
|
|
95
|
+
entry: {
|
|
96
|
+
backend: string;
|
|
97
|
+
frontend: string;
|
|
98
|
+
};
|
|
99
|
+
minSDKVersion: string;
|
|
100
|
+
permissions: {
|
|
101
|
+
backend: string[];
|
|
102
|
+
frontend: string[];
|
|
103
|
+
};
|
|
104
|
+
events: string[];
|
|
105
|
+
extends: {
|
|
106
|
+
views: {
|
|
107
|
+
workflows: {
|
|
108
|
+
header: string;
|
|
109
|
+
};
|
|
110
|
+
};
|
|
111
|
+
};
|
|
112
|
+
}>;
|
|
113
|
+
type ExtensionManifest = z.infer<typeof extensionManifestSchema>;
|
|
114
|
+
//#endregion
|
|
115
|
+
export { extensionManifestSchema as n, ExtensionManifest as t };
|
|
116
|
+
//# sourceMappingURL=schema2.d.cts.map
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
|
|
3
|
+
//#region src/schema.d.ts
|
|
4
|
+
declare const extensionManifestSchema: z.ZodObject<{
|
|
5
|
+
name: z.ZodString;
|
|
6
|
+
displayName: z.ZodString;
|
|
7
|
+
description: z.ZodString;
|
|
8
|
+
publisher: z.ZodString;
|
|
9
|
+
version: z.ZodString;
|
|
10
|
+
categories: z.ZodArray<z.ZodString, "many">;
|
|
11
|
+
entry: z.ZodObject<{
|
|
12
|
+
backend: z.ZodString;
|
|
13
|
+
frontend: z.ZodString;
|
|
14
|
+
}, "strip", z.ZodTypeAny, {
|
|
15
|
+
backend: string;
|
|
16
|
+
frontend: string;
|
|
17
|
+
}, {
|
|
18
|
+
backend: string;
|
|
19
|
+
frontend: string;
|
|
20
|
+
}>;
|
|
21
|
+
minSDKVersion: z.ZodString;
|
|
22
|
+
permissions: z.ZodObject<{
|
|
23
|
+
frontend: z.ZodArray<z.ZodString, "many">;
|
|
24
|
+
backend: z.ZodArray<z.ZodString, "many">;
|
|
25
|
+
}, "strip", z.ZodTypeAny, {
|
|
26
|
+
backend: string[];
|
|
27
|
+
frontend: string[];
|
|
28
|
+
}, {
|
|
29
|
+
backend: string[];
|
|
30
|
+
frontend: string[];
|
|
31
|
+
}>;
|
|
32
|
+
events: z.ZodArray<z.ZodString, "many">;
|
|
33
|
+
extends: z.ZodObject<{
|
|
34
|
+
views: z.ZodObject<{
|
|
35
|
+
workflows: z.ZodObject<{
|
|
36
|
+
header: z.ZodString;
|
|
37
|
+
}, "strip", z.ZodTypeAny, {
|
|
38
|
+
header: string;
|
|
39
|
+
}, {
|
|
40
|
+
header: string;
|
|
41
|
+
}>;
|
|
42
|
+
}, "strip", z.ZodTypeAny, {
|
|
43
|
+
workflows: {
|
|
44
|
+
header: string;
|
|
45
|
+
};
|
|
46
|
+
}, {
|
|
47
|
+
workflows: {
|
|
48
|
+
header: string;
|
|
49
|
+
};
|
|
50
|
+
}>;
|
|
51
|
+
}, "strip", z.ZodTypeAny, {
|
|
52
|
+
views: {
|
|
53
|
+
workflows: {
|
|
54
|
+
header: string;
|
|
55
|
+
};
|
|
56
|
+
};
|
|
57
|
+
}, {
|
|
58
|
+
views: {
|
|
59
|
+
workflows: {
|
|
60
|
+
header: string;
|
|
61
|
+
};
|
|
62
|
+
};
|
|
63
|
+
}>;
|
|
64
|
+
}, "strip", z.ZodTypeAny, {
|
|
65
|
+
name: string;
|
|
66
|
+
displayName: string;
|
|
67
|
+
description: string;
|
|
68
|
+
publisher: string;
|
|
69
|
+
version: string;
|
|
70
|
+
categories: string[];
|
|
71
|
+
entry: {
|
|
72
|
+
backend: string;
|
|
73
|
+
frontend: string;
|
|
74
|
+
};
|
|
75
|
+
minSDKVersion: string;
|
|
76
|
+
permissions: {
|
|
77
|
+
backend: string[];
|
|
78
|
+
frontend: string[];
|
|
79
|
+
};
|
|
80
|
+
events: string[];
|
|
81
|
+
extends: {
|
|
82
|
+
views: {
|
|
83
|
+
workflows: {
|
|
84
|
+
header: string;
|
|
85
|
+
};
|
|
86
|
+
};
|
|
87
|
+
};
|
|
88
|
+
}, {
|
|
89
|
+
name: string;
|
|
90
|
+
displayName: string;
|
|
91
|
+
description: string;
|
|
92
|
+
publisher: string;
|
|
93
|
+
version: string;
|
|
94
|
+
categories: string[];
|
|
95
|
+
entry: {
|
|
96
|
+
backend: string;
|
|
97
|
+
frontend: string;
|
|
98
|
+
};
|
|
99
|
+
minSDKVersion: string;
|
|
100
|
+
permissions: {
|
|
101
|
+
backend: string[];
|
|
102
|
+
frontend: string[];
|
|
103
|
+
};
|
|
104
|
+
events: string[];
|
|
105
|
+
extends: {
|
|
106
|
+
views: {
|
|
107
|
+
workflows: {
|
|
108
|
+
header: string;
|
|
109
|
+
};
|
|
110
|
+
};
|
|
111
|
+
};
|
|
112
|
+
}>;
|
|
113
|
+
type ExtensionManifest = z.infer<typeof extensionManifestSchema>;
|
|
114
|
+
//#endregion
|
|
115
|
+
export { extensionManifestSchema as n, ExtensionManifest as t };
|
|
116
|
+
//# sourceMappingURL=schema2.d.mts.map
|
package/dist/schema2.mjs
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
|
|
3
|
+
//#region src/schema.ts
|
|
4
|
+
/**
|
|
5
|
+
* Schema for the extension configuration.
|
|
6
|
+
*/
|
|
7
|
+
const extensionManifestSchema = z.object({
|
|
8
|
+
name: z.string(),
|
|
9
|
+
displayName: z.string(),
|
|
10
|
+
description: z.string(),
|
|
11
|
+
publisher: z.string(),
|
|
12
|
+
version: z.string(),
|
|
13
|
+
categories: z.array(z.string()),
|
|
14
|
+
entry: z.object({
|
|
15
|
+
backend: z.string(),
|
|
16
|
+
frontend: z.string()
|
|
17
|
+
}),
|
|
18
|
+
minSDKVersion: z.string(),
|
|
19
|
+
permissions: z.object({
|
|
20
|
+
frontend: z.array(z.string()),
|
|
21
|
+
backend: z.array(z.string())
|
|
22
|
+
}),
|
|
23
|
+
events: z.array(z.string()),
|
|
24
|
+
extends: z.object({ views: z.object({ workflows: z.object({ header: z.string() }) }) })
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
//#endregion
|
|
28
|
+
export { extensionManifestSchema as t };
|
|
29
|
+
//# sourceMappingURL=schema2.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema2.mjs","names":[],"sources":["../src/schema.ts"],"sourcesContent":["import { z } from 'zod';\n\n/**\n * Schema for the extension configuration.\n */\nexport const extensionManifestSchema = z.object({\n\t/**\n\t * Name of the extension package.\n\t */\n\tname: z.string(),\n\n\t/**\n\t * The display name of the extension.\n\t */\n\tdisplayName: z.string(),\n\n\t/**\n\t * Description of the extension package.\n\t */\n\tdescription: z.string(),\n\n\t/**\n\t * Publisher of the extension.\n\t */\n\tpublisher: z.string(),\n\n\t/**\n\t * Version of the extension package.\n\t */\n\tversion: z.string(),\n\n\t/**\n\t * Category the extension belongs to.\n\t */\n\tcategories: z.array(z.string()),\n\n\t/**\n\t * Setup paths for backend and frontend code entry points.\n\t */\n\tentry: z.object({\n\t\t/**\n\t\t * Path to the backend entry file.\n\t\t */\n\t\tbackend: z.string(),\n\t\t/**\n\t\t * Path to the frontend entry file.\n\t\t */\n\t\tfrontend: z.string(),\n\t}),\n\n\t/**\n\t * Minimum SDK version required to run the extension.\n\t */\n\tminSDKVersion: z.string(),\n\n\t/**\n\t * Permissions object specifying allowed access for frontend and backend.\n\t */\n\tpermissions: z.object({\n\t\t/**\n\t\t * List of frontend permissions (array of strings).\n\t\t */\n\t\tfrontend: z.array(z.string()),\n\t\t/**\n\t\t * List of backend permissions (array of strings).\n\t\t */\n\t\tbackend: z.array(z.string()),\n\t}),\n\n\t/**\n\t * List of events that the extension listens to.\n\t */\n\tevents: z.array(z.string()),\n\n\t/**\n\t * Define extension points for existing functionalities.\n\t */\n\textends: z.object({\n\t\t/**\n\t\t * Extends the views configuration.\n\t\t */\n\t\tviews: z.object({\n\t\t\t/**\n\t\t\t * Extends the workflows view configuration.\n\t\t\t */\n\t\t\tworkflows: z.object({\n\t\t\t\t/**\n\t\t\t\t * Header component for the workflows view.\n\t\t\t\t */\n\t\t\t\theader: z.string(),\n\t\t\t}),\n\t\t}),\n\t}),\n});\n\nexport type ExtensionManifest = z.infer<typeof extensionManifestSchema>;\n"],"mappings":";;;;;;AAKA,MAAa,0BAA0B,EAAE,OAAO;CAI/C,MAAM,EAAE,QAAQ;CAKhB,aAAa,EAAE,QAAQ;CAKvB,aAAa,EAAE,QAAQ;CAKvB,WAAW,EAAE,QAAQ;CAKrB,SAAS,EAAE,QAAQ;CAKnB,YAAY,EAAE,MAAM,EAAE,QAAQ,CAAC;CAK/B,OAAO,EAAE,OAAO;EAIf,SAAS,EAAE,QAAQ;EAInB,UAAU,EAAE,QAAQ;EACpB,CAAC;CAKF,eAAe,EAAE,QAAQ;CAKzB,aAAa,EAAE,OAAO;EAIrB,UAAU,EAAE,MAAM,EAAE,QAAQ,CAAC;EAI7B,SAAS,EAAE,MAAM,EAAE,QAAQ,CAAC;EAC5B,CAAC;CAKF,QAAQ,EAAE,MAAM,EAAE,QAAQ,CAAC;CAK3B,SAAS,EAAE,OAAO,EAIjB,OAAO,EAAE,OAAO,EAIf,WAAW,EAAE,OAAO,EAInB,QAAQ,EAAE,QAAQ,EAClB,CAAC,EACF,CAAC,EACF,CAAC;CACF,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@n8n/extension-sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist",
|
|
@@ -11,22 +11,22 @@
|
|
|
11
11
|
"LICENSE_EE.md"
|
|
12
12
|
],
|
|
13
13
|
"main": "./dist/index.cjs",
|
|
14
|
-
"module": "./dist/index.
|
|
15
|
-
"types": "./dist/index.d.
|
|
14
|
+
"module": "./dist/index.mjs",
|
|
15
|
+
"types": "./dist/index.d.mts",
|
|
16
16
|
"exports": {
|
|
17
17
|
".": {
|
|
18
|
-
"types": "./dist/index.d.
|
|
19
|
-
"import": "./dist/index.
|
|
18
|
+
"types": "./dist/index.d.mts",
|
|
19
|
+
"import": "./dist/index.mjs",
|
|
20
20
|
"require": "./dist/index.cjs"
|
|
21
21
|
},
|
|
22
22
|
"./backend": {
|
|
23
|
-
"types": "./dist/backend/index.d.
|
|
24
|
-
"import": "./dist/backend/index.
|
|
23
|
+
"types": "./dist/backend/index.d.mts",
|
|
24
|
+
"import": "./dist/backend/index.mjs",
|
|
25
25
|
"require": "./dist/backend/index.cjs"
|
|
26
26
|
},
|
|
27
27
|
"./frontend": {
|
|
28
|
-
"types": "./dist/frontend/index.d.
|
|
29
|
-
"import": "./dist/frontend/index.
|
|
28
|
+
"types": "./dist/frontend/index.d.mts",
|
|
29
|
+
"import": "./dist/frontend/index.mjs",
|
|
30
30
|
"require": "./dist/frontend/index.cjs"
|
|
31
31
|
},
|
|
32
32
|
"./*": "./*"
|
|
@@ -38,8 +38,9 @@
|
|
|
38
38
|
"devDependencies": {
|
|
39
39
|
"@vitejs/plugin-vue": "^5.2.4",
|
|
40
40
|
"@vue/tsconfig": "^0.7.0",
|
|
41
|
+
"tsdown": "^0.16.5",
|
|
41
42
|
"rimraf": "6.0.1",
|
|
42
|
-
"vite": "
|
|
43
|
+
"vite": "npm:rolldown-vite@latest",
|
|
43
44
|
"vue": "^3.5.13",
|
|
44
45
|
"vue-router": "^4.5.0",
|
|
45
46
|
"vue-tsc": "^2.2.8",
|
|
@@ -62,11 +63,11 @@
|
|
|
62
63
|
},
|
|
63
64
|
"scripts": {
|
|
64
65
|
"clean": "rimraf dist",
|
|
65
|
-
"dev": "
|
|
66
|
+
"dev": "tsdown --watch",
|
|
66
67
|
"lint": "eslint . --quiet",
|
|
67
68
|
"typecheck:frontend": "vue-tsc --noEmit --project tsconfig.frontend.json",
|
|
68
69
|
"typecheck:backend": "tsc --noEmit --project tsconfig.backend.json",
|
|
69
|
-
"build": "pnpm \"/^typecheck:.+/\" && pnpm clean &&
|
|
70
|
+
"build": "pnpm \"/^typecheck:.+/\" && pnpm clean && tsdown && pnpm create-json-schema",
|
|
70
71
|
"create-json-schema": "tsx scripts/create-json-schema.ts",
|
|
71
72
|
"preview": "vite preview"
|
|
72
73
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/backend/define.ts"],"sourcesContent":["import type { BackendExtension } from './types.ts';\n\nexport function defineBackendExtension(extension: BackendExtension): BackendExtension {\n\treturn extension;\n}\n"],"mappings":";AAEO,SAAS,uBAAuB,WAA+C;AACrF,SAAO;AACR;","names":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/backend/define.ts"],"sourcesContent":["import type { BackendExtension } from './types.ts';\n\nexport function defineBackendExtension(extension: BackendExtension): BackendExtension {\n\treturn extension;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAEO,SAAS,uBAAuB,WAA+C;AACrF,SAAO;AACR;","names":[]}
|
package/dist/backend/define.d.ts
DELETED
package/dist/backend/define.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/backend/index.ts","../../src/backend/define.ts"],"sourcesContent":["export * from './define';\nexport type * from './types';\n","import type { BackendExtension } from './types.ts';\n\nexport function defineBackendExtension(extension: BackendExtension): BackendExtension {\n\treturn extension;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACEO,SAAS,uBAAuB,WAA+C;AACrF,SAAO;AACR;","names":[]}
|
package/dist/backend/index.d.ts
DELETED
package/dist/backend/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/backend/types.ts"],"sourcesContent":["export type BackendExtensionContext = {\n\texample?: string;\n};\n\nexport type BackendExtensionSetupFn = (context: BackendExtension) => void;\n\nexport type BackendExtension = {\n\tsetup: BackendExtensionSetupFn;\n};\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
|
package/dist/backend/types.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
type BackendExtensionContext = {
|
|
2
|
-
example?: string;
|
|
3
|
-
};
|
|
4
|
-
type BackendExtensionSetupFn = (context: BackendExtension) => void;
|
|
5
|
-
type BackendExtension = {
|
|
6
|
-
setup: BackendExtensionSetupFn;
|
|
7
|
-
};
|
|
8
|
-
|
|
9
|
-
export type { BackendExtension, BackendExtensionContext, BackendExtensionSetupFn };
|