n8n-nodes-lockzero 1.0.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/credentials/LockZeroApi.credentials.d.ts +7 -0
- package/dist/credentials/LockZeroApi.credentials.js +31 -0
- package/dist/credentials/LockZeroApi.credentials.js.map +1 -0
- package/dist/nodes/LockZero/LockZero.node.d.ts +17 -0
- package/dist/nodes/LockZero/LockZero.node.js +228 -0
- package/dist/nodes/LockZero/LockZero.node.js.map +1 -0
- package/dist/nodes/LockZero/lockzero.svg +14 -0
- package/package.json +43 -0
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.LockZeroApi = void 0;
|
|
4
|
+
class LockZeroApi {
|
|
5
|
+
constructor() {
|
|
6
|
+
this.name = "lockZeroApi";
|
|
7
|
+
this.displayName = "LockZero API";
|
|
8
|
+
this.documentationUrl = "https://lockzero.io/developers#api";
|
|
9
|
+
this.properties = [
|
|
10
|
+
{
|
|
11
|
+
displayName: "API Key",
|
|
12
|
+
name: "apiKey",
|
|
13
|
+
type: "string",
|
|
14
|
+
typeOptions: { password: true },
|
|
15
|
+
default: "",
|
|
16
|
+
required: true,
|
|
17
|
+
hint: "Create an API key in your LockZero workspace under Settings → API Keys",
|
|
18
|
+
placeholder: "lz_live_…",
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
displayName: "Base URL",
|
|
22
|
+
name: "baseUrl",
|
|
23
|
+
type: "string",
|
|
24
|
+
default: "https://lockzero.io",
|
|
25
|
+
description: "Override if you are running a self-hosted LockZero instance",
|
|
26
|
+
},
|
|
27
|
+
];
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
exports.LockZeroApi = LockZeroApi;
|
|
31
|
+
//# sourceMappingURL=LockZeroApi.credentials.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LockZeroApi.credentials.js","sourceRoot":"","sources":["../../credentials/LockZeroApi.credentials.ts"],"names":[],"mappings":";;;AAEA,MAAa,WAAW;IAAxB;QACE,SAAI,GAAG,aAAa,CAAC;QACrB,gBAAW,GAAG,cAAc,CAAC;QAC7B,qBAAgB,GAAG,oCAAoC,CAAC;QAExD,eAAU,GAAsB;YAC9B;gBACE,WAAW,EAAE,SAAS;gBACtB,IAAI,EAAS,QAAQ;gBACrB,IAAI,EAAS,QAAQ;gBACrB,WAAW,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE;gBAC/B,OAAO,EAAM,EAAE;gBACf,QAAQ,EAAK,IAAI;gBACjB,IAAI,EAAS,wEAAwE;gBACrF,WAAW,EAAE,WAAW;aACzB;YACD;gBACE,WAAW,EAAE,UAAU;gBACvB,IAAI,EAAS,SAAS;gBACtB,IAAI,EAAS,QAAQ;gBACrB,OAAO,EAAM,qBAAqB;gBAClC,WAAW,EAAE,6DAA6D;aAC3E;SACF,CAAC;IACJ,CAAC;CAAA;AAxBD,kCAwBC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* LockZero n8n Node — pull secrets from LockZero vault inside n8n workflows.
|
|
3
|
+
*
|
|
4
|
+
* Operations:
|
|
5
|
+
* get — resolve a single secret by dotted path (e.g. "openai.OPENAI_API_KEY")
|
|
6
|
+
* bundle — pull all secrets in a namespace (e.g. "openai")
|
|
7
|
+
* inject-many — pull multiple namespaces in one call (e.g. "openai,stripe,db")
|
|
8
|
+
* dynamic — issue short-lived DB credentials (e.g. "postgres/readonly")
|
|
9
|
+
*
|
|
10
|
+
* The node outputs each secret as a field on the item so downstream nodes can
|
|
11
|
+
* use them via expressions: {{ $json.OPENAI_API_KEY }}
|
|
12
|
+
*/
|
|
13
|
+
import type { IExecuteFunctions, INodeExecutionData, INodeType, INodeTypeDescription } from "n8n-workflow";
|
|
14
|
+
export declare class LockZero implements INodeType {
|
|
15
|
+
description: INodeTypeDescription;
|
|
16
|
+
execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]>;
|
|
17
|
+
}
|
|
@@ -0,0 +1,228 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* LockZero n8n Node — pull secrets from LockZero vault inside n8n workflows.
|
|
4
|
+
*
|
|
5
|
+
* Operations:
|
|
6
|
+
* get — resolve a single secret by dotted path (e.g. "openai.OPENAI_API_KEY")
|
|
7
|
+
* bundle — pull all secrets in a namespace (e.g. "openai")
|
|
8
|
+
* inject-many — pull multiple namespaces in one call (e.g. "openai,stripe,db")
|
|
9
|
+
* dynamic — issue short-lived DB credentials (e.g. "postgres/readonly")
|
|
10
|
+
*
|
|
11
|
+
* The node outputs each secret as a field on the item so downstream nodes can
|
|
12
|
+
* use them via expressions: {{ $json.OPENAI_API_KEY }}
|
|
13
|
+
*/
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.LockZero = void 0;
|
|
16
|
+
const n8n_workflow_1 = require("n8n-workflow");
|
|
17
|
+
/* ── Inline HTTP helpers (no runtime SDK dependency needed in n8n) ─── */
|
|
18
|
+
class LzError extends Error {
|
|
19
|
+
constructor(message, status) {
|
|
20
|
+
super(message);
|
|
21
|
+
this.status = status;
|
|
22
|
+
this.name = "LzError";
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
async function lzFetch(apiKey, baseUrl, method, path, body) {
|
|
26
|
+
const url = `${baseUrl.replace(/\/$/, "")}/api${path}`;
|
|
27
|
+
const res = await fetch(url, {
|
|
28
|
+
method,
|
|
29
|
+
headers: {
|
|
30
|
+
Authorization: `Bearer ${apiKey}`,
|
|
31
|
+
Accept: "application/json",
|
|
32
|
+
...(body ? { "Content-Type": "application/json" } : {}),
|
|
33
|
+
},
|
|
34
|
+
body: body ? JSON.stringify(body) : undefined,
|
|
35
|
+
signal: AbortSignal.timeout(15000),
|
|
36
|
+
});
|
|
37
|
+
const json = await res.json().catch(() => null);
|
|
38
|
+
if (!res.ok) {
|
|
39
|
+
const msg = json?.error ?? `HTTP ${res.status}`;
|
|
40
|
+
throw new LzError(msg, res.status);
|
|
41
|
+
}
|
|
42
|
+
return json;
|
|
43
|
+
}
|
|
44
|
+
/* ── Node definition ───────────────────────────────────────────────── */
|
|
45
|
+
class LockZero {
|
|
46
|
+
constructor() {
|
|
47
|
+
this.description = {
|
|
48
|
+
displayName: "LockZero",
|
|
49
|
+
name: "lockZero",
|
|
50
|
+
// eslint-disable-next-line n8n-nodes-base/node-class-description-icon-not-svg
|
|
51
|
+
icon: "file:lockzero.svg",
|
|
52
|
+
group: ["transform"],
|
|
53
|
+
version: 1,
|
|
54
|
+
subtitle: '={{$parameter["operation"]}}',
|
|
55
|
+
description: "Pull secrets from LockZero vault at runtime — never store credentials in your workflows",
|
|
56
|
+
defaults: { name: "LockZero" },
|
|
57
|
+
inputs: ["main"],
|
|
58
|
+
outputs: ["main"],
|
|
59
|
+
credentials: [
|
|
60
|
+
{ name: "lockZeroApi", required: true },
|
|
61
|
+
],
|
|
62
|
+
properties: [
|
|
63
|
+
/* ── Operation selector ── */
|
|
64
|
+
{
|
|
65
|
+
displayName: "Operation",
|
|
66
|
+
name: "operation",
|
|
67
|
+
type: "options",
|
|
68
|
+
noDataExpression: true,
|
|
69
|
+
options: [
|
|
70
|
+
{
|
|
71
|
+
name: "Get Secret",
|
|
72
|
+
value: "get",
|
|
73
|
+
description: "Resolve a single secret by its dotted path",
|
|
74
|
+
action: "Get a single secret",
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
name: "Bundle Namespace",
|
|
78
|
+
value: "bundle",
|
|
79
|
+
description: "Pull all secrets in a namespace as a single object",
|
|
80
|
+
action: "Bundle a namespace",
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
name: "Inject Many",
|
|
84
|
+
value: "injectMany",
|
|
85
|
+
description: "Pull multiple namespaces and merge all secrets into one object",
|
|
86
|
+
action: "Inject many namespaces",
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
name: "Dynamic Credential",
|
|
90
|
+
value: "dynamic",
|
|
91
|
+
description: "Issue a short-lived database credential from a dynamic role",
|
|
92
|
+
action: "Issue a dynamic credential",
|
|
93
|
+
},
|
|
94
|
+
],
|
|
95
|
+
default: "get",
|
|
96
|
+
},
|
|
97
|
+
/* ── "get" params ── */
|
|
98
|
+
{
|
|
99
|
+
displayName: "Secret Path",
|
|
100
|
+
name: "secretPath",
|
|
101
|
+
type: "string",
|
|
102
|
+
default: "",
|
|
103
|
+
placeholder: "openai.OPENAI_API_KEY",
|
|
104
|
+
description: "Dotted path to the secret, e.g. openai.OPENAI_API_KEY",
|
|
105
|
+
required: true,
|
|
106
|
+
displayOptions: { show: { operation: ["get"] } },
|
|
107
|
+
},
|
|
108
|
+
/* ── "bundle" params ── */
|
|
109
|
+
{
|
|
110
|
+
displayName: "Namespace",
|
|
111
|
+
name: "namespace",
|
|
112
|
+
type: "string",
|
|
113
|
+
default: "",
|
|
114
|
+
placeholder: "openai",
|
|
115
|
+
description: "The namespace to bundle, e.g. openai, stripe, database",
|
|
116
|
+
required: true,
|
|
117
|
+
displayOptions: { show: { operation: ["bundle"] } },
|
|
118
|
+
},
|
|
119
|
+
/* ── "injectMany" params ── */
|
|
120
|
+
{
|
|
121
|
+
displayName: "Namespaces",
|
|
122
|
+
name: "namespaces",
|
|
123
|
+
type: "string",
|
|
124
|
+
default: "",
|
|
125
|
+
placeholder: "openai, stripe, database",
|
|
126
|
+
description: "Comma-separated list of namespaces to pull",
|
|
127
|
+
required: true,
|
|
128
|
+
displayOptions: { show: { operation: ["injectMany"] } },
|
|
129
|
+
},
|
|
130
|
+
/* ── "dynamic" params ── */
|
|
131
|
+
{
|
|
132
|
+
displayName: "Role Name",
|
|
133
|
+
name: "roleName",
|
|
134
|
+
type: "string",
|
|
135
|
+
default: "",
|
|
136
|
+
placeholder: "postgres/readonly",
|
|
137
|
+
description: "Dynamic role name as configured in your LockZero workspace",
|
|
138
|
+
required: true,
|
|
139
|
+
displayOptions: { show: { operation: ["dynamic"] } },
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
displayName: "TTL (seconds)",
|
|
143
|
+
name: "ttl",
|
|
144
|
+
type: "number",
|
|
145
|
+
default: 3600,
|
|
146
|
+
description: "Credential lifetime in seconds (capped by role max TTL)",
|
|
147
|
+
displayOptions: { show: { operation: ["dynamic"] } },
|
|
148
|
+
},
|
|
149
|
+
],
|
|
150
|
+
};
|
|
151
|
+
}
|
|
152
|
+
/* ── Executor ──────────────────────────────────────────────────────── */
|
|
153
|
+
async execute() {
|
|
154
|
+
const items = this.getInputData();
|
|
155
|
+
const output = [];
|
|
156
|
+
const creds = await this.getCredentials("lockZeroApi");
|
|
157
|
+
const apiKey = String(creds.apiKey ?? "");
|
|
158
|
+
const baseUrl = String(creds.baseUrl ?? "https://lockzero.io");
|
|
159
|
+
if (!apiKey) {
|
|
160
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), "LockZero: API key is empty");
|
|
161
|
+
}
|
|
162
|
+
const operation = this.getNodeParameter("operation", 0);
|
|
163
|
+
for (let i = 0; i < items.length; i++) {
|
|
164
|
+
try {
|
|
165
|
+
let result = {};
|
|
166
|
+
if (operation === "get") {
|
|
167
|
+
const path = this.getNodeParameter("secretPath", i);
|
|
168
|
+
const encoded = encodeURIComponent(path);
|
|
169
|
+
const data = await lzFetch(apiKey, baseUrl, "GET", `/vault/resolve/${encoded}`);
|
|
170
|
+
// Return under the leaf key name so downstream nodes can reference it directly
|
|
171
|
+
const leafKey = path.includes(".") ? path.split(".").pop() : path;
|
|
172
|
+
result = { [leafKey]: data.value, _secretPath: path };
|
|
173
|
+
}
|
|
174
|
+
else if (operation === "bundle") {
|
|
175
|
+
const ns = this.getNodeParameter("namespace", i);
|
|
176
|
+
const encoded = encodeURIComponent(ns);
|
|
177
|
+
result = (await lzFetch(apiKey, baseUrl, "GET", `/vault/resolve-bundle/${encoded}`));
|
|
178
|
+
result._namespace = ns;
|
|
179
|
+
}
|
|
180
|
+
else if (operation === "injectMany") {
|
|
181
|
+
const rawNs = this.getNodeParameter("namespaces", i);
|
|
182
|
+
const nsList = rawNs.split(/[\s,]+/).map(s => s.trim()).filter(Boolean);
|
|
183
|
+
for (const ns of nsList) {
|
|
184
|
+
const encoded = encodeURIComponent(ns);
|
|
185
|
+
const bundle = await lzFetch(apiKey, baseUrl, "GET", `/vault/resolve-bundle/${encoded}`);
|
|
186
|
+
Object.assign(result, bundle);
|
|
187
|
+
}
|
|
188
|
+
result._namespaces = nsList;
|
|
189
|
+
}
|
|
190
|
+
else if (operation === "dynamic") {
|
|
191
|
+
const roleName = this.getNodeParameter("roleName", i);
|
|
192
|
+
const ttl = this.getNodeParameter("ttl", i);
|
|
193
|
+
const raw = await lzFetch(apiKey, baseUrl, "POST", "/vault/dynamic/issue-by-name", {
|
|
194
|
+
roleName,
|
|
195
|
+
...(ttl ? { ttl } : {}),
|
|
196
|
+
});
|
|
197
|
+
// Build a ready-to-use connection string
|
|
198
|
+
const enc = (s) => encodeURIComponent(s);
|
|
199
|
+
const ssl = raw.ssl ? "?sslmode=require" : "";
|
|
200
|
+
raw.connectionString = `postgresql://${enc(String(raw.username))}:${enc(String(raw.password))}@${raw.host}:${raw.port}/${raw.database}${ssl}`;
|
|
201
|
+
result = raw;
|
|
202
|
+
}
|
|
203
|
+
output.push({
|
|
204
|
+
json: { ...items[i].json, ...result },
|
|
205
|
+
pairedItem: { item: i },
|
|
206
|
+
});
|
|
207
|
+
}
|
|
208
|
+
catch (err) {
|
|
209
|
+
if (this.continueOnFail()) {
|
|
210
|
+
const msg = err instanceof Error ? err.message : String(err);
|
|
211
|
+
output.push({
|
|
212
|
+
json: { ...items[i].json, error: msg },
|
|
213
|
+
pairedItem: { item: i },
|
|
214
|
+
});
|
|
215
|
+
}
|
|
216
|
+
else {
|
|
217
|
+
if (err instanceof LzError) {
|
|
218
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), `LockZero API error: ${err.message} (HTTP ${err.status})`);
|
|
219
|
+
}
|
|
220
|
+
throw err;
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
return [output];
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
exports.LockZero = LockZero;
|
|
228
|
+
//# sourceMappingURL=LockZero.node.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LockZero.node.js","sourceRoot":"","sources":["../../../nodes/LockZero/LockZero.node.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;GAWG;;;AAUH,+CAAkD;AAElD,0EAA0E;AAE1E,MAAM,OAAQ,SAAQ,KAAK;IACzB,YACE,OAAe,EACC,MAAc;QAE9B,KAAK,CAAC,OAAO,CAAC,CAAC;QAFC,WAAM,GAAN,MAAM,CAAQ;QAG9B,IAAI,CAAC,IAAI,GAAG,SAAS,CAAC;IACxB,CAAC;CACF;AAED,KAAK,UAAU,OAAO,CACpB,MAAe,EACf,OAAe,EACf,MAAuB,EACvB,IAAe,EACf,IAAgB;IAEhB,MAAM,GAAG,GAAG,GAAG,OAAO,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,OAAO,IAAI,EAAE,CAAC;IACvD,MAAM,GAAG,GAAI,MAAM,KAAK,CAAC,GAAG,EAAE;QAC5B,MAAM;QACN,OAAO,EAAE;YACP,aAAa,EAAG,UAAU,MAAM,EAAE;YAClC,MAAM,EAAU,kBAAkB;YAClC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,cAAc,EAAE,kBAAkB,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;SACxD;QACD,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,SAAS;QAC7C,MAAM,EAAE,WAAW,CAAC,OAAO,CAAC,KAAM,CAAC;KACpC,CAAC,CAAC;IACH,MAAM,IAAI,GAAG,MAAM,GAAG,CAAC,IAAI,EAAE,CA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,MAAM,GAAG,GAAG,CAAC;gBACf,CAAC;gBAED,MAAM,CAAC,IAAI,CAAC;oBACV,IAAI,EAAe,EAAE,GAAG,KAAK,CAAC,CAAC,CAAE,CAAC,IAAI,EAAE,GAAG,MAAM,EAAiB;oBAClE,UAAU,EAAS,EAAE,IAAI,EAAE,CAAC,EAAE;iBAC/B,CAAC,CAAC;YACL,CAAC;YAAC,OAAO,GAAG,EAAE,CAAC;gBACb,IAAI,IAAI,CAAC,cAAc,EAAE,EAAE,CAAC;oBAC1B,MAAM,GAAG,GAAG,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;oBAC7D,MAAM,CAAC,IAAI,CAAC;wBACV,IAAI,EAAQ,EAAE,GAAG,KAAK,CAAC,CAAC,CAAE,CAAC,IAAI,EAAE,KAAK,EAAE,GAAG,EAAE;wBAC7C,UAAU,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE;qBACxB,CAAC,CAAC;gBACL,CAAC;qBAAM,CAAC;oBACN,IAAI,GAAG,YAAY,OAAO,EAAE,CAAC;wBAC3B,MAAM,IAAI,iCAAkB,CAC1B,IAAI,CAAC,OAAO,EAAE,EACd,uBAAuB,GAAG,CAAC,OAAO,UAAU,GAAG,CAAC,MAAM,GAAG,CAC1D,CAAC;oBACJ,CAAC;oBACD,MAAM,GAAG,CAAC;gBACZ,CAAC;YACH,CAAC;QACH,CAAC;QAED,OAAO,CAAC,MAAM,CAAC,CAAC;IAClB,CAAC;CACF;AAlMD,4BAkMC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="60" height="60" viewBox="0 0 60 60" fill="none">
|
|
2
|
+
<rect width="60" height="60" rx="12" fill="#18181B"/>
|
|
3
|
+
<!-- Shield body -->
|
|
4
|
+
<path d="M30 8 L48 16 L48 32 C48 43 30 52 30 52 C30 52 12 43 12 32 L12 16 Z"
|
|
5
|
+
fill="none" stroke="#3B82F6" stroke-width="2.5" stroke-linejoin="round"/>
|
|
6
|
+
<!-- Lock shackle -->
|
|
7
|
+
<path d="M24 26 L24 22 C24 18.7 27 16 30 16 C33 16 36 18.7 36 22 L36 26"
|
|
8
|
+
stroke="#60A5FA" stroke-width="2.5" stroke-linecap="round" fill="none"/>
|
|
9
|
+
<!-- Lock body -->
|
|
10
|
+
<rect x="22" y="26" width="16" height="12" rx="3" fill="#3B82F6"/>
|
|
11
|
+
<!-- Keyhole -->
|
|
12
|
+
<circle cx="30" cy="31" r="2" fill="#18181B"/>
|
|
13
|
+
<rect x="29" y="31" width="2" height="4" rx="1" fill="#18181B"/>
|
|
14
|
+
</svg>
|
package/package.json
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "n8n-nodes-lockzero",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "LockZero n8n community node — pull secrets from LockZero vault into your n8n workflows",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"n8n-community-node-package",
|
|
7
|
+
"lockzero",
|
|
8
|
+
"secrets",
|
|
9
|
+
"vault",
|
|
10
|
+
"credentials"
|
|
11
|
+
],
|
|
12
|
+
"author": {
|
|
13
|
+
"name": "LockZero",
|
|
14
|
+
"email": "support@lockzero.io"
|
|
15
|
+
},
|
|
16
|
+
"license": "MIT",
|
|
17
|
+
"homepage": "https://lockzero.io",
|
|
18
|
+
"repository": {
|
|
19
|
+
"type": "git",
|
|
20
|
+
"url": "https://github.com/lockzero/n8n-nodes-lockzero"
|
|
21
|
+
},
|
|
22
|
+
"main": "index.js",
|
|
23
|
+
"scripts": {
|
|
24
|
+
"build": "tsc && cp nodes/LockZero/lockzero.svg dist/nodes/LockZero/lockzero.svg 2>/dev/null || true",
|
|
25
|
+
"dev": "tsc --watch",
|
|
26
|
+
"typecheck": "tsc --noEmit",
|
|
27
|
+
"lint": "echo skip",
|
|
28
|
+
"prepublishOnly": "npm run build"
|
|
29
|
+
},
|
|
30
|
+
"files": ["dist", "package.json"],
|
|
31
|
+
"n8n": {
|
|
32
|
+
"n8nNodesApiVersion": 1,
|
|
33
|
+
"credentials": ["dist/credentials/LockZeroApi.credentials.js"],
|
|
34
|
+
"nodes": ["dist/nodes/LockZero/LockZero.node.js"]
|
|
35
|
+
},
|
|
36
|
+
"devDependencies": {
|
|
37
|
+
"n8n-workflow": "^1.57.0",
|
|
38
|
+
"typescript": "^5.8.2"
|
|
39
|
+
},
|
|
40
|
+
"peerDependencies": {
|
|
41
|
+
"n8n-workflow": "*"
|
|
42
|
+
}
|
|
43
|
+
}
|