first commit
This commit is contained in:
14
node_modules/@n8n/node-cli/dist/commands/new/index.d.ts
generated
vendored
Normal file
14
node_modules/@n8n/node-cli/dist/commands/new/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
import { Command } from '@oclif/core';
|
||||
export default class New extends Command {
|
||||
static description: string;
|
||||
static examples: string[];
|
||||
static args: {
|
||||
name: import("@oclif/core/lib/interfaces").Arg<string | undefined, Record<string, unknown>>;
|
||||
};
|
||||
static flags: {
|
||||
force: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
||||
'skip-install': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
||||
template: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
||||
};
|
||||
run(): Promise<void>;
|
||||
}
|
||||
142
node_modules/@n8n/node-cli/dist/commands/new/index.js
generated
vendored
Normal file
142
node_modules/@n8n/node-cli/dist/commands/new/index.js
generated
vendored
Normal file
@@ -0,0 +1,142 @@
|
||||
"use strict";
|
||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const prompts_1 = require("@clack/prompts");
|
||||
const core_1 = require("@oclif/core");
|
||||
const change_case_1 = require("change-case");
|
||||
const promises_1 = __importDefault(require("node:fs/promises"));
|
||||
const node_path_1 = __importDefault(require("node:path"));
|
||||
const picocolors_1 = __importDefault(require("picocolors"));
|
||||
const prompts_2 = require("./prompts");
|
||||
const utils_1 = require("./utils");
|
||||
const templates_1 = require("../../template/templates");
|
||||
const child_process_1 = require("../../utils/child-process");
|
||||
const filesystem_1 = require("../../utils/filesystem");
|
||||
const git_1 = require("../../utils/git");
|
||||
const package_manager_1 = require("../../utils/package-manager");
|
||||
const prompts_3 = require("../../utils/prompts");
|
||||
const validation_1 = require("../../utils/validation");
|
||||
class New extends core_1.Command {
|
||||
async run() {
|
||||
const { flags, args } = await this.parse(New);
|
||||
const [typeFlag, templateFlag] = flags.template?.split('/') ?? [];
|
||||
(0, prompts_1.intro)(picocolors_1.default.inverse((0, utils_1.createIntro)()));
|
||||
const nodeName = args.name ?? (await (0, prompts_2.nodeNamePrompt)());
|
||||
const invalidNodeNameError = (0, validation_1.validateNodeName)(nodeName);
|
||||
if (invalidNodeNameError)
|
||||
return (0, prompts_3.onCancel)(invalidNodeNameError);
|
||||
const destination = node_path_1.default.resolve(process.cwd(), nodeName);
|
||||
let overwrite = false;
|
||||
if (await (0, filesystem_1.folderExists)(destination)) {
|
||||
if (!flags.force) {
|
||||
const shouldOverwrite = await (0, prompts_1.confirm)({
|
||||
message: `./${nodeName} already exists, do you want to overwrite?`,
|
||||
});
|
||||
if ((0, prompts_1.isCancel)(shouldOverwrite) || !shouldOverwrite)
|
||||
return (0, prompts_3.onCancel)();
|
||||
}
|
||||
overwrite = true;
|
||||
}
|
||||
const type = typeFlag ?? (await (0, prompts_2.nodeTypePrompt)());
|
||||
if (!(0, templates_1.isTemplateType)(type)) {
|
||||
return (0, prompts_3.onCancel)(`Invalid template type: ${type}`);
|
||||
}
|
||||
let template = templates_1.templates.programmatic.example;
|
||||
if (templateFlag) {
|
||||
const name = (0, change_case_1.camelCase)(templateFlag);
|
||||
if (!(0, templates_1.isTemplateName)(type, name)) {
|
||||
return (0, prompts_3.onCancel)(`Invalid template name: ${name} for type: ${type}`);
|
||||
}
|
||||
template = (0, templates_1.getTemplate)(type, name);
|
||||
}
|
||||
else if (type === 'declarative') {
|
||||
const chosenTemplate = await (0, prompts_2.declarativeTemplatePrompt)();
|
||||
template = (0, templates_1.getTemplate)('declarative', chosenTemplate);
|
||||
}
|
||||
const config = (await template.prompts?.()) ?? {};
|
||||
const packageManager = (await (0, package_manager_1.detectPackageManager)()) ?? 'npm';
|
||||
const templateData = {
|
||||
destinationPath: destination,
|
||||
nodePackageName: nodeName,
|
||||
config,
|
||||
user: (0, git_1.tryReadGitUser)(),
|
||||
packageManager: {
|
||||
name: packageManager,
|
||||
installCommand: packageManager === 'npm' ? 'ci' : 'install',
|
||||
},
|
||||
};
|
||||
const copyingSpinner = (0, prompts_1.spinner)();
|
||||
copyingSpinner.start('Copying files');
|
||||
if (overwrite) {
|
||||
await promises_1.default.rm(destination, { recursive: true, force: true });
|
||||
}
|
||||
await (0, filesystem_1.delayAtLeast)(template.run(templateData), 1000);
|
||||
copyingSpinner.stop('Files copied');
|
||||
const gitSpinner = (0, prompts_1.spinner)();
|
||||
gitSpinner.start('Initializing git repository');
|
||||
try {
|
||||
await (0, git_1.initGit)(destination);
|
||||
gitSpinner.stop('Git repository initialized');
|
||||
}
|
||||
catch (error) {
|
||||
if (error instanceof child_process_1.ChildProcessError) {
|
||||
gitSpinner.stop(`Could not initialize git repository: ${error.message}`, error.code ?? undefined);
|
||||
process.exit(error.code ?? 1);
|
||||
}
|
||||
else {
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
if (!flags['skip-install']) {
|
||||
const installingSpinner = (0, prompts_1.spinner)();
|
||||
installingSpinner.start('Installing dependencies');
|
||||
try {
|
||||
await (0, filesystem_1.delayAtLeast)((0, child_process_1.runCommand)(packageManager, ['install'], {
|
||||
cwd: destination,
|
||||
printOutput: ({ stdout, stderr }) => {
|
||||
prompts_1.log.error(stdout.concat(stderr).toString());
|
||||
},
|
||||
}), 1000);
|
||||
}
|
||||
catch (error) {
|
||||
if (error instanceof child_process_1.ChildProcessError) {
|
||||
installingSpinner.stop(`Could not install dependencies: ${error.message}`, error.code ?? undefined);
|
||||
process.exit(error.code ?? 1);
|
||||
}
|
||||
else {
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
installingSpinner.stop('Dependencies installed');
|
||||
}
|
||||
(0, prompts_1.note)(`cd ./${nodeName} && ${packageManager} run dev
|
||||
|
||||
📚 Documentation: https://docs.n8n.io/integrations/creating-nodes/build/${type}-style-node/
|
||||
💬 Community: https://community.n8n.io`, 'Next Steps');
|
||||
(0, prompts_1.outro)(`Created ./${nodeName} ✨`);
|
||||
}
|
||||
}
|
||||
New.description = 'Create a starter community node in a new directory';
|
||||
New.examples = [
|
||||
'<%= config.bin %> <%= command.id %>',
|
||||
'<%= config.bin %> <%= command.id %> n8n-nodes-my-app --skip-install',
|
||||
'<%= config.bin %> <%= command.id %> n8n-nodes-my-app --force',
|
||||
'<%= config.bin %> <%= command.id %> n8n-nodes-my-app --template declarative/custom',
|
||||
];
|
||||
New.args = {
|
||||
name: core_1.Args.string({ name: 'Name' }),
|
||||
};
|
||||
New.flags = {
|
||||
force: core_1.Flags.boolean({
|
||||
char: 'f',
|
||||
description: 'Overwrite destination folder if it already exists',
|
||||
}),
|
||||
'skip-install': core_1.Flags.boolean({ description: 'Skip installing dependencies' }),
|
||||
template: core_1.Flags.string({
|
||||
options: ['declarative/github-issues', 'declarative/custom', 'programmatic/example'],
|
||||
}),
|
||||
};
|
||||
exports.default = New;
|
||||
//# sourceMappingURL=index.js.map
|
||||
1
node_modules/@n8n/node-cli/dist/commands/new/index.js.map
generated
vendored
Normal file
1
node_modules/@n8n/node-cli/dist/commands/new/index.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/commands/new/index.ts"],"names":[],"mappings":";;;;;AAAA,4CAAqF;AACrF,sCAAmD;AACnD,6CAAwC;AACxC,gEAAkC;AAClC,0DAA6B;AAC7B,4DAAoC;AAEpC,uCAAsF;AACtF,mCAAsC;AAEtC,wDAAkG;AAClG,6DAA0E;AAC1E,uDAAoE;AACpE,yCAA0D;AAC1D,iEAAmE;AACnE,iDAA+C;AAC/C,uDAA0D;AAE1D,MAAqB,GAAI,SAAQ,cAAO;IAsBvC,KAAK,CAAC,GAAG;QACR,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QAC9C,MAAM,CAAC,QAAQ,EAAE,YAAY,CAAC,GAAG,KAA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BAAiB,CAAC,IAAI,CACrB,mCAAmC,KAAK,CAAC,OAAO,EAAE,EAClD,KAAK,CAAC,IAAI,IAAI,SAAS,CACvB,CAAC;oBACF,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,IAAI,CAAC,CAAC,CAAC;gBAC/B,CAAC;qBAAM,CAAC;oBACP,MAAM,KAAK,CAAC;gBACb,CAAC;YACF,CAAC;YAED,iBAAiB,CAAC,IAAI,CAAC,wBAAwB,CAAC,CAAC;QAClD,CAAC;QAED,IAAA,cAAI,EACH,QAAQ,QAAQ,OAAO,cAAc;;0EAEkC,IAAI;uCACvC,EACpC,YAAY,CACZ,CAAC;QAEF,IAAA,eAAK,EAAC,aAAa,QAAQ,IAAI,CAAC,CAAC;IAClC,CAAC;;AA5Ie,eAAW,GAAG,oDAAoD,CAAC;AACnE,YAAQ,GAAG;IAC1B,qCAAqC;IACrC,qEAAqE;IACrE,8DAA8D;IAC9D,oFAAoF;CACpF,CAAC;AACc,QAAI,GAAG;IACtB,IAAI,EAAE,WAAI,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;CACnC,CAAC;AACc,SAAK,GAAG;IACvB,KAAK,EAAE,YAAK,CAAC,OAAO,CAAC;QACpB,IAAI,EAAE,GAAG;QACT,WAAW,EAAE,mDAAmD;KAChE,CAAC;IACF,cAAc,EAAE,YAAK,CAAC,OAAO,CAAC,EAAE,WAAW,EAAE,8BAA8B,EAAE,CAAC;IAC9E,QAAQ,EAAE,YAAK,CAAC,MAAM,CAAC;QACtB,OAAO,EAAE,CAAC,2BAA2B,EAAE,oBAAoB,EAAE,sBAAsB,CAAU;KAC7F,CAAC;CACF,CAAC;kBApBkB,GAAG"}
|
||||
3
node_modules/@n8n/node-cli/dist/commands/new/prompts.d.ts
generated
vendored
Normal file
3
node_modules/@n8n/node-cli/dist/commands/new/prompts.d.ts
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
export declare const nodeNamePrompt: () => Promise<string>;
|
||||
export declare const nodeTypePrompt: () => Promise<"declarative" | "programmatic">;
|
||||
export declare const declarativeTemplatePrompt: () => Promise<"custom" | "githubIssues">;
|
||||
42
node_modules/@n8n/node-cli/dist/commands/new/prompts.js
generated
vendored
Normal file
42
node_modules/@n8n/node-cli/dist/commands/new/prompts.js
generated
vendored
Normal file
@@ -0,0 +1,42 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.declarativeTemplatePrompt = exports.nodeTypePrompt = exports.nodeNamePrompt = void 0;
|
||||
const prompts_1 = require("@clack/prompts");
|
||||
const templates_1 = require("../../template/templates");
|
||||
const prompts_2 = require("../../utils/prompts");
|
||||
const validation_1 = require("../../utils/validation");
|
||||
const nodeNamePrompt = async () => await (0, prompts_2.withCancelHandler)((0, prompts_1.text)({
|
||||
message: "Package name (must start with 'n8n-nodes-' or '@org/n8n-nodes-')",
|
||||
placeholder: 'n8n-nodes-my-app',
|
||||
validate: validation_1.validateNodeName,
|
||||
defaultValue: 'n8n-nodes-my-app',
|
||||
}));
|
||||
exports.nodeNamePrompt = nodeNamePrompt;
|
||||
const nodeTypePrompt = async () => await (0, prompts_2.withCancelHandler)((0, prompts_1.select)({
|
||||
message: 'What kind of node are you building?',
|
||||
options: [
|
||||
{
|
||||
label: 'HTTP API',
|
||||
value: 'declarative',
|
||||
hint: 'Low-code, faster approval for n8n Cloud',
|
||||
},
|
||||
{
|
||||
label: 'Other',
|
||||
value: 'programmatic',
|
||||
hint: 'Programmatic node with full flexibility',
|
||||
},
|
||||
],
|
||||
initialValue: 'declarative',
|
||||
}));
|
||||
exports.nodeTypePrompt = nodeTypePrompt;
|
||||
const declarativeTemplatePrompt = async () => await (0, prompts_2.withCancelHandler)((0, prompts_1.select)({
|
||||
message: 'What template do you want to use?',
|
||||
options: Object.entries(templates_1.templates.declarative).map(([value, template]) => ({
|
||||
value: value,
|
||||
label: template.name,
|
||||
hint: template.description,
|
||||
})),
|
||||
initialValue: 'githubIssues',
|
||||
}));
|
||||
exports.declarativeTemplatePrompt = declarativeTemplatePrompt;
|
||||
//# sourceMappingURL=prompts.js.map
|
||||
1
node_modules/@n8n/node-cli/dist/commands/new/prompts.js.map
generated
vendored
Normal file
1
node_modules/@n8n/node-cli/dist/commands/new/prompts.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"prompts.js","sourceRoot":"","sources":["../../../src/commands/new/prompts.ts"],"names":[],"mappings":";;;AAAA,4CAA8C;AAE9C,wDAAqD;AACrD,iDAAwD;AACxD,uDAA0D;AAEnD,MAAM,cAAc,GAAG,KAAK,IAAI,EAAE,CACxC,MAAM,IAAA,2BAAiB,EACtB,IAAA,cAAI,EAAC;IACJ,OAAO,EAAE,kEAAkE;IAC3E,WAAW,EAAE,kBAAkB;IAC/B,QAAQ,EAAE,6BAAgB;IAC1B,YAAY,EAAE,kBAAkB;CAChC,CAAC,CACF,CAAC;AARU,QAAA,cAAc,kBAQxB;AAEI,MAAM,cAAc,GAAG,KAAK,IAAI,EAAE,CACxC,MAAM,IAAA,2BAAiB,EACtB,IAAA,gBAAM,EAAiC;IACtC,OAAO,EAAE,qCAAqC;IAC9C,OAAO,EAAE;QACR;YACC,KAAK,EAAE,UAAU;YACjB,KAAK,EAAE,aAAa;YACpB,IAAI,EAAE,yCAAyC;SAC/C;QACD;YACC,KAAK,EAAE,OAAO;YACd,KAAK,EAAE,cAAc;YACrB,IAAI,EAAE,yCAAyC;SAC/C;KACD;IACD,YAAY,EAAE,aAAa;CAC3B,CAAC,CACF,CAAC;AAlBU,QAAA,cAAc,kBAkBxB;AAEI,MAAM,yBAAyB,GAAG,KAAK,IAAI,EAAE,CACnD,MAAM,IAAA,2BAAiB,EACtB,IAAA,gBAAM,EAAqC;IAC1C,OAAO,EAAE,mCAAmC;IAC5C,OAAO,EAAE,MAAM,CAAC,OAAO,CAAC,qBAAS,CAAC,WAAW,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,EAAE,QAAQ,CAAC,EAAE,EAAE,CAAC,CAAC;QAC1E,KAAK,EAAE,KAA2C;QAClD,KAAK,EAAE,QAAQ,CAAC,IAAI;QACpB,IAAI,EAAE,QAAQ,CAAC,WAAW;KAC1B,CAAC,CAAC;IACH,YAAY,EAAE,cAAc;CAC5B,CAAC,CACF,CAAC;AAXU,QAAA,yBAAyB,6BAWnC"}
|
||||
1
node_modules/@n8n/node-cli/dist/commands/new/utils.d.ts
generated
vendored
Normal file
1
node_modules/@n8n/node-cli/dist/commands/new/utils.d.ts
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export declare const createIntro: () => string;
|
||||
11
node_modules/@n8n/node-cli/dist/commands/new/utils.js
generated
vendored
Normal file
11
node_modules/@n8n/node-cli/dist/commands/new/utils.js
generated
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.createIntro = void 0;
|
||||
const package_manager_1 = require("../../utils/package-manager");
|
||||
const createIntro = () => {
|
||||
const maybePackageManager = (0, package_manager_1.detectPackageManagerFromUserAgent)();
|
||||
const packageManager = maybePackageManager ?? 'npm';
|
||||
return maybePackageManager ? ` ${packageManager} create @n8n/node ` : ' n8n-node new ';
|
||||
};
|
||||
exports.createIntro = createIntro;
|
||||
//# sourceMappingURL=utils.js.map
|
||||
1
node_modules/@n8n/node-cli/dist/commands/new/utils.js.map
generated
vendored
Normal file
1
node_modules/@n8n/node-cli/dist/commands/new/utils.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../src/commands/new/utils.ts"],"names":[],"mappings":";;;AAAA,iEAAgF;AAEzE,MAAM,WAAW,GAAG,GAAG,EAAE;IAC/B,MAAM,mBAAmB,GAAG,IAAA,mDAAiC,GAAE,CAAC;IAChE,MAAM,cAAc,GAAG,mBAAmB,IAAI,KAAK,CAAC;IACpD,OAAO,mBAAmB,CAAC,CAAC,CAAC,IAAI,cAAc,oBAAoB,CAAC,CAAC,CAAC,gBAAgB,CAAC;AACxF,CAAC,CAAC;AAJW,QAAA,WAAW,eAItB"}
|
||||
Reference in New Issue
Block a user