@atom8n/extension-sdk 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.
Files changed (58) hide show
  1. package/LICENSE +1 -0
  2. package/README.md +1 -0
  3. package/dist/backend/define.cjs +3 -0
  4. package/dist/backend/define.d.cts +3 -0
  5. package/dist/backend/define.d.mts +3 -0
  6. package/dist/backend/define.mjs +3 -0
  7. package/dist/backend/define2.cjs +14 -0
  8. package/dist/backend/define2.cjs.map +1 -0
  9. package/dist/backend/define2.d.cts +7 -0
  10. package/dist/backend/define2.d.mts +7 -0
  11. package/dist/backend/define2.mjs +8 -0
  12. package/dist/backend/define2.mjs.map +1 -0
  13. package/dist/backend/index.cjs +3 -0
  14. package/dist/backend/index.d.cts +3 -0
  15. package/dist/backend/index.d.mts +3 -0
  16. package/dist/backend/index.mjs +3 -0
  17. package/dist/backend/types.cjs +0 -0
  18. package/dist/backend/types.d.cts +2 -0
  19. package/dist/backend/types.d.mts +2 -0
  20. package/dist/backend/types.mjs +1 -0
  21. package/dist/backend/types2.d.cts +11 -0
  22. package/dist/backend/types2.d.mts +11 -0
  23. package/dist/frontend/define.cjs +3 -0
  24. package/dist/frontend/define.d.cts +3 -0
  25. package/dist/frontend/define.d.mts +3 -0
  26. package/dist/frontend/define.mjs +3 -0
  27. package/dist/frontend/define2.cjs +14 -0
  28. package/dist/frontend/define2.cjs.map +1 -0
  29. package/dist/frontend/define2.d.cts +7 -0
  30. package/dist/frontend/define2.d.mts +7 -0
  31. package/dist/frontend/define2.mjs +8 -0
  32. package/dist/frontend/define2.mjs.map +1 -0
  33. package/dist/frontend/index.cjs +3 -0
  34. package/dist/frontend/index.d.cts +3 -0
  35. package/dist/frontend/index.d.mts +3 -0
  36. package/dist/frontend/index.mjs +3 -0
  37. package/dist/frontend/types.cjs +0 -0
  38. package/dist/frontend/types.d.cts +2 -0
  39. package/dist/frontend/types.d.mts +2 -0
  40. package/dist/frontend/types.mjs +1 -0
  41. package/dist/frontend/types2.d.cts +16 -0
  42. package/dist/frontend/types2.d.mts +16 -0
  43. package/dist/index.cjs +3 -0
  44. package/dist/index.d.cts +2 -0
  45. package/dist/index.d.mts +2 -0
  46. package/dist/index.mjs +3 -0
  47. package/dist/schema.cjs +3 -0
  48. package/dist/schema.d.cts +2 -0
  49. package/dist/schema.d.mts +2 -0
  50. package/dist/schema.mjs +3 -0
  51. package/dist/schema2.cjs +34 -0
  52. package/dist/schema2.cjs.map +1 -0
  53. package/dist/schema2.d.cts +116 -0
  54. package/dist/schema2.d.mts +116 -0
  55. package/dist/schema2.mjs +29 -0
  56. package/dist/schema2.mjs.map +1 -0
  57. package/package.json +63 -0
  58. package/schema.json +64 -0
package/LICENSE ADDED
@@ -0,0 +1 @@
1
+ See LICENSE.md in the root of this repository for more information.
package/README.md ADDED
@@ -0,0 +1 @@
1
+ # @n8n/plugin-sdk
@@ -0,0 +1,3 @@
1
+ const require_define = require('./define2.cjs');
2
+
3
+ exports.defineBackendExtension = require_define.defineBackendExtension;
@@ -0,0 +1,3 @@
1
+ import "./types2.cjs";
2
+ import { t as defineBackendExtension } from "./define2.cjs";
3
+ export { defineBackendExtension };
@@ -0,0 +1,3 @@
1
+ import "./types2.mjs";
2
+ import { t as defineBackendExtension } from "./define2.mjs";
3
+ export { defineBackendExtension };
@@ -0,0 +1,3 @@
1
+ import { t as defineBackendExtension } from "./define2.mjs";
2
+
3
+ export { defineBackendExtension };
@@ -0,0 +1,14 @@
1
+
2
+ //#region src/backend/define.ts
3
+ function defineBackendExtension(extension) {
4
+ return extension;
5
+ }
6
+
7
+ //#endregion
8
+ Object.defineProperty(exports, 'defineBackendExtension', {
9
+ enumerable: true,
10
+ get: function () {
11
+ return defineBackendExtension;
12
+ }
13
+ });
14
+ //# sourceMappingURL=define2.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"define2.cjs","names":[],"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":";;AAEA,SAAgB,uBAAuB,WAA+C;AACrF,QAAO"}
@@ -0,0 +1,7 @@
1
+ import { t as BackendExtension } from "./types2.cjs";
2
+
3
+ //#region src/backend/define.d.ts
4
+ declare function defineBackendExtension(extension: BackendExtension): BackendExtension;
5
+ //#endregion
6
+ export { defineBackendExtension as t };
7
+ //# sourceMappingURL=define2.d.cts.map
@@ -0,0 +1,7 @@
1
+ import { t as BackendExtension } from "./types2.mjs";
2
+
3
+ //#region src/backend/define.d.ts
4
+ declare function defineBackendExtension(extension: BackendExtension): BackendExtension;
5
+ //#endregion
6
+ export { defineBackendExtension as t };
7
+ //# sourceMappingURL=define2.d.mts.map
@@ -0,0 +1,8 @@
1
+ //#region src/backend/define.ts
2
+ function defineBackendExtension(extension) {
3
+ return extension;
4
+ }
5
+
6
+ //#endregion
7
+ export { defineBackendExtension as t };
8
+ //# sourceMappingURL=define2.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"define2.mjs","names":[],"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":";AAEA,SAAgB,uBAAuB,WAA+C;AACrF,QAAO"}
@@ -0,0 +1,3 @@
1
+ const require_define = require('./define2.cjs');
2
+
3
+ exports.defineBackendExtension = require_define.defineBackendExtension;
@@ -0,0 +1,3 @@
1
+ import { n as BackendExtensionContext, r as BackendExtensionSetupFn, t as BackendExtension } from "./types2.cjs";
2
+ import { t as defineBackendExtension } from "./define2.cjs";
3
+ export { BackendExtension, BackendExtensionContext, BackendExtensionSetupFn, defineBackendExtension };
@@ -0,0 +1,3 @@
1
+ import { n as BackendExtensionContext, r as BackendExtensionSetupFn, t as BackendExtension } from "./types2.mjs";
2
+ import { t as defineBackendExtension } from "./define2.mjs";
3
+ export { BackendExtension, BackendExtensionContext, BackendExtensionSetupFn, defineBackendExtension };
@@ -0,0 +1,3 @@
1
+ import { t as defineBackendExtension } from "./define2.mjs";
2
+
3
+ export { defineBackendExtension };
File without changes
@@ -0,0 +1,2 @@
1
+ import { n as BackendExtensionContext, r as BackendExtensionSetupFn, t as BackendExtension } from "./types2.cjs";
2
+ export { BackendExtension, BackendExtensionContext, BackendExtensionSetupFn };
@@ -0,0 +1,2 @@
1
+ import { n as BackendExtensionContext, r as BackendExtensionSetupFn, t as BackendExtension } from "./types2.mjs";
2
+ export { BackendExtension, BackendExtensionContext, BackendExtensionSetupFn };
@@ -0,0 +1 @@
1
+ export { };
@@ -0,0 +1,11 @@
1
+ //#region src/backend/types.d.ts
2
+ type BackendExtensionContext = {
3
+ example?: string;
4
+ };
5
+ type BackendExtensionSetupFn = (context: BackendExtension) => void;
6
+ type BackendExtension = {
7
+ setup: BackendExtensionSetupFn;
8
+ };
9
+ //#endregion
10
+ export { BackendExtensionContext as n, BackendExtensionSetupFn as r, BackendExtension as t };
11
+ //# sourceMappingURL=types2.d.cts.map
@@ -0,0 +1,11 @@
1
+ //#region src/backend/types.d.ts
2
+ type BackendExtensionContext = {
3
+ example?: string;
4
+ };
5
+ type BackendExtensionSetupFn = (context: BackendExtension) => void;
6
+ type BackendExtension = {
7
+ setup: BackendExtensionSetupFn;
8
+ };
9
+ //#endregion
10
+ export { BackendExtensionContext as n, BackendExtensionSetupFn as r, BackendExtension as t };
11
+ //# sourceMappingURL=types2.d.mts.map
@@ -0,0 +1,3 @@
1
+ const require_define = require('./define2.cjs');
2
+
3
+ exports.defineFrontendExtension = require_define.defineFrontendExtension;
@@ -0,0 +1,3 @@
1
+ import "./types2.cjs";
2
+ import { t as defineFrontendExtension } from "./define2.cjs";
3
+ export { defineFrontendExtension };
@@ -0,0 +1,3 @@
1
+ import "./types2.mjs";
2
+ import { t as defineFrontendExtension } from "./define2.mjs";
3
+ export { defineFrontendExtension };
@@ -0,0 +1,3 @@
1
+ import { t as defineFrontendExtension } from "./define2.mjs";
2
+
3
+ export { defineFrontendExtension };
@@ -0,0 +1,14 @@
1
+
2
+ //#region src/frontend/define.ts
3
+ function defineFrontendExtension(extension) {
4
+ return extension;
5
+ }
6
+
7
+ //#endregion
8
+ Object.defineProperty(exports, 'defineFrontendExtension', {
9
+ enumerable: true,
10
+ get: function () {
11
+ return defineFrontendExtension;
12
+ }
13
+ });
14
+ //# sourceMappingURL=define2.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"define2.cjs","names":[],"sources":["../../src/frontend/define.ts"],"sourcesContent":["import type { FrontendExtension } from './types.ts';\n\nexport function defineFrontendExtension(extension: FrontendExtension): FrontendExtension {\n\treturn extension;\n}\n"],"mappings":";;AAEA,SAAgB,wBAAwB,WAAiD;AACxF,QAAO"}
@@ -0,0 +1,7 @@
1
+ import { t as FrontendExtension } from "./types2.cjs";
2
+
3
+ //#region src/frontend/define.d.ts
4
+ declare function defineFrontendExtension(extension: FrontendExtension): FrontendExtension;
5
+ //#endregion
6
+ export { defineFrontendExtension as t };
7
+ //# sourceMappingURL=define2.d.cts.map
@@ -0,0 +1,7 @@
1
+ import { t as FrontendExtension } from "./types2.mjs";
2
+
3
+ //#region src/frontend/define.d.ts
4
+ declare function defineFrontendExtension(extension: FrontendExtension): FrontendExtension;
5
+ //#endregion
6
+ export { defineFrontendExtension as t };
7
+ //# sourceMappingURL=define2.d.mts.map
@@ -0,0 +1,8 @@
1
+ //#region src/frontend/define.ts
2
+ function defineFrontendExtension(extension) {
3
+ return extension;
4
+ }
5
+
6
+ //#endregion
7
+ export { defineFrontendExtension as t };
8
+ //# sourceMappingURL=define2.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"define2.mjs","names":[],"sources":["../../src/frontend/define.ts"],"sourcesContent":["import type { FrontendExtension } from './types.ts';\n\nexport function defineFrontendExtension(extension: FrontendExtension): FrontendExtension {\n\treturn extension;\n}\n"],"mappings":";AAEA,SAAgB,wBAAwB,WAAiD;AACxF,QAAO"}
@@ -0,0 +1,3 @@
1
+ const require_define = require('./define2.cjs');
2
+
3
+ exports.defineFrontendExtension = require_define.defineFrontendExtension;
@@ -0,0 +1,3 @@
1
+ import { n as FrontendExtensionContext, r as FrontendExtensionSetupFn, t as FrontendExtension } from "./types2.cjs";
2
+ import { t as defineFrontendExtension } from "./define2.cjs";
3
+ export { FrontendExtension, FrontendExtensionContext, FrontendExtensionSetupFn, defineFrontendExtension };
@@ -0,0 +1,3 @@
1
+ import { n as FrontendExtensionContext, r as FrontendExtensionSetupFn, t as FrontendExtension } from "./types2.mjs";
2
+ import { t as defineFrontendExtension } from "./define2.mjs";
3
+ export { FrontendExtension, FrontendExtensionContext, FrontendExtensionSetupFn, defineFrontendExtension };
@@ -0,0 +1,3 @@
1
+ import { t as defineFrontendExtension } from "./define2.mjs";
2
+
3
+ export { defineFrontendExtension };
File without changes
@@ -0,0 +1,2 @@
1
+ import { n as FrontendExtensionContext, r as FrontendExtensionSetupFn, t as FrontendExtension } from "./types2.cjs";
2
+ export { FrontendExtension, FrontendExtensionContext, FrontendExtensionSetupFn };
@@ -0,0 +1,2 @@
1
+ import { n as FrontendExtensionContext, r as FrontendExtensionSetupFn, t as FrontendExtension } from "./types2.mjs";
2
+ export { FrontendExtension, FrontendExtensionContext, FrontendExtensionSetupFn };
@@ -0,0 +1 @@
1
+ export { };
@@ -0,0 +1,16 @@
1
+ import { RouteRecordRaw } from "vue-router";
2
+ import { App, Component } from "vue";
3
+
4
+ //#region src/frontend/types.d.ts
5
+ type FrontendExtensionContext = {
6
+ app: App;
7
+ defineRoutes: (routes: RouteRecordRaw[]) => void;
8
+ registerComponent: (name: string, component: Component) => void;
9
+ };
10
+ type FrontendExtensionSetupFn = (context: FrontendExtensionContext) => void;
11
+ type FrontendExtension = {
12
+ setup: FrontendExtensionSetupFn;
13
+ };
14
+ //#endregion
15
+ export { FrontendExtensionContext as n, FrontendExtensionSetupFn as r, FrontendExtension as t };
16
+ //# sourceMappingURL=types2.d.cts.map
@@ -0,0 +1,16 @@
1
+ import { RouteRecordRaw } from "vue-router";
2
+ import { App, Component } from "vue";
3
+
4
+ //#region src/frontend/types.d.ts
5
+ type FrontendExtensionContext = {
6
+ app: App;
7
+ defineRoutes: (routes: RouteRecordRaw[]) => void;
8
+ registerComponent: (name: string, component: Component) => void;
9
+ };
10
+ type FrontendExtensionSetupFn = (context: FrontendExtensionContext) => void;
11
+ type FrontendExtension = {
12
+ setup: FrontendExtensionSetupFn;
13
+ };
14
+ //#endregion
15
+ export { FrontendExtensionContext as n, FrontendExtensionSetupFn as r, FrontendExtension as t };
16
+ //# sourceMappingURL=types2.d.mts.map
package/dist/index.cjs ADDED
@@ -0,0 +1,3 @@
1
+ const require_schema = require('./schema2.cjs');
2
+
3
+ exports.extensionManifestSchema = require_schema.extensionManifestSchema;
@@ -0,0 +1,2 @@
1
+ import { n as extensionManifestSchema, t as ExtensionManifest } from "./schema2.cjs";
2
+ export { ExtensionManifest, extensionManifestSchema };
@@ -0,0 +1,2 @@
1
+ import { n as extensionManifestSchema, t as ExtensionManifest } from "./schema2.mjs";
2
+ export { ExtensionManifest, extensionManifestSchema };
package/dist/index.mjs ADDED
@@ -0,0 +1,3 @@
1
+ import { t as extensionManifestSchema } from "./schema2.mjs";
2
+
3
+ export { extensionManifestSchema };
@@ -0,0 +1,3 @@
1
+ const require_schema = require('./schema2.cjs');
2
+
3
+ exports.extensionManifestSchema = require_schema.extensionManifestSchema;
@@ -0,0 +1,2 @@
1
+ import { n as extensionManifestSchema, t as ExtensionManifest } from "./schema2.cjs";
2
+ export { ExtensionManifest, extensionManifestSchema };
@@ -0,0 +1,2 @@
1
+ import { n as extensionManifestSchema, t as ExtensionManifest } from "./schema2.mjs";
2
+ export { ExtensionManifest, extensionManifestSchema };
@@ -0,0 +1,3 @@
1
+ import { t as extensionManifestSchema } from "./schema2.mjs";
2
+
3
+ export { extensionManifestSchema };
@@ -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
@@ -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 ADDED
@@ -0,0 +1,63 @@
1
+ {
2
+ "name": "@atom8n/extension-sdk",
3
+ "version": "0.9.0",
4
+ "type": "module",
5
+ "files": [
6
+ "dist",
7
+ "schema.json",
8
+ "LICENSE",
9
+ "README.md"
10
+ ],
11
+ "main": "./dist/index.cjs",
12
+ "module": "./dist/index.mjs",
13
+ "types": "./dist/index.d.mts",
14
+ "exports": {
15
+ ".": {
16
+ "types": "./dist/index.d.mts",
17
+ "import": "./dist/index.mjs",
18
+ "require": "./dist/index.cjs"
19
+ },
20
+ "./backend": {
21
+ "types": "./dist/backend/index.d.mts",
22
+ "import": "./dist/backend/index.mjs",
23
+ "require": "./dist/backend/index.cjs"
24
+ },
25
+ "./frontend": {
26
+ "types": "./dist/frontend/index.d.mts",
27
+ "import": "./dist/frontend/index.mjs",
28
+ "require": "./dist/frontend/index.cjs"
29
+ },
30
+ "./*": "./*"
31
+ },
32
+ "scripts": {
33
+ "clean": "rimraf dist",
34
+ "dev": "tsdown --watch",
35
+ "lint": "eslint . --quiet",
36
+ "typecheck:frontend": "vue-tsc --noEmit --project tsconfig.frontend.json",
37
+ "typecheck:backend": "tsc --noEmit --project tsconfig.backend.json",
38
+ "build": "pnpm \"/^typecheck:.+/\" && pnpm clean && tsdown && pnpm create-json-schema",
39
+ "create-json-schema": "tsx scripts/create-json-schema.ts",
40
+ "preview": "vite preview"
41
+ },
42
+ "peerDependencies": {
43
+ "vue": "catalog:frontend",
44
+ "vue-router": "catalog:frontend"
45
+ },
46
+ "devDependencies": {
47
+ "@atom8n/typescript-config": "1.3.0",
48
+ "@vitejs/plugin-vue": "catalog:frontend",
49
+ "@vue/tsconfig": "catalog:frontend",
50
+ "tsdown": "catalog:",
51
+ "rimraf": "catalog:",
52
+ "vite": "catalog:",
53
+ "vue": "catalog:frontend",
54
+ "vue-router": "catalog:frontend",
55
+ "vue-tsc": "catalog:frontend",
56
+ "zod-to-json-schema": "catalog:",
57
+ "tsx": "catalog:"
58
+ },
59
+ "license": "https://docs.n8n.io/sustainable-use-license/",
60
+ "dependencies": {
61
+ "zod": "catalog:"
62
+ }
63
+ }
package/schema.json ADDED
@@ -0,0 +1,64 @@
1
+ {
2
+ "type": "object",
3
+ "properties": {
4
+ "name": { "type": "string" },
5
+ "displayName": { "type": "string" },
6
+ "description": { "type": "string" },
7
+ "publisher": { "type": "string" },
8
+ "version": { "type": "string" },
9
+ "categories": { "type": "array", "items": { "type": "string" } },
10
+ "entry": {
11
+ "type": "object",
12
+ "properties": { "backend": { "type": "string" }, "frontend": { "type": "string" } },
13
+ "required": ["backend", "frontend"],
14
+ "additionalProperties": false
15
+ },
16
+ "minSDKVersion": { "type": "string" },
17
+ "permissions": {
18
+ "type": "object",
19
+ "properties": {
20
+ "frontend": { "type": "array", "items": { "type": "string" } },
21
+ "backend": { "type": "array", "items": { "type": "string" } }
22
+ },
23
+ "required": ["frontend", "backend"],
24
+ "additionalProperties": false
25
+ },
26
+ "events": { "type": "array", "items": { "type": "string" } },
27
+ "extends": {
28
+ "type": "object",
29
+ "properties": {
30
+ "views": {
31
+ "type": "object",
32
+ "properties": {
33
+ "workflows": {
34
+ "type": "object",
35
+ "properties": { "header": { "type": "string" } },
36
+ "required": ["header"],
37
+ "additionalProperties": false
38
+ }
39
+ },
40
+ "required": ["workflows"],
41
+ "additionalProperties": false
42
+ }
43
+ },
44
+ "required": ["views"],
45
+ "additionalProperties": false
46
+ }
47
+ },
48
+ "required": [
49
+ "name",
50
+ "displayName",
51
+ "description",
52
+ "publisher",
53
+ "version",
54
+ "categories",
55
+ "entry",
56
+ "minSDKVersion",
57
+ "permissions",
58
+ "events",
59
+ "extends"
60
+ ],
61
+ "additionalProperties": false,
62
+ "title": "N8nExtensionSchema",
63
+ "$schema": "http://json-schema.org/draft-07/schema#"
64
+ }