mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 10:02:05 +00:00
feat: Add @n8n/node-cli package with an empty create command (#17620)
This commit is contained in:
13
packages/@n8n/create-node/README.md
Normal file
13
packages/@n8n/create-node/README.md
Normal file
@@ -0,0 +1,13 @@
|
||||
# @n8n/create-node
|
||||
|
||||
Scaffold a new community n8n node
|
||||
|
||||
## Usage
|
||||
|
||||
```bash
|
||||
npm create @n8n/node
|
||||
# or
|
||||
pnpm create @n8n/node
|
||||
# or
|
||||
yarn create @n8n/node
|
||||
```
|
||||
15
packages/@n8n/create-node/bin/create.js
Executable file
15
packages/@n8n/create-node/bin/create.js
Executable file
@@ -0,0 +1,15 @@
|
||||
#!/usr/bin/env node
|
||||
|
||||
import { spawnSync } from 'node:child_process';
|
||||
import { createRequire } from 'node:module';
|
||||
import path from 'node:path';
|
||||
|
||||
const require = createRequire(import.meta.url);
|
||||
|
||||
const cliBin = require.resolve('@n8n/node-cli/bin/n8n-node.js');
|
||||
|
||||
const result = spawnSync('node', [cliBin, 'create', ...process.argv.slice(2)], {
|
||||
stdio: 'inherit',
|
||||
});
|
||||
|
||||
process.exit(result.status ?? 1);
|
||||
25
packages/@n8n/create-node/package.json
Normal file
25
packages/@n8n/create-node/package.json
Normal file
@@ -0,0 +1,25 @@
|
||||
{
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"name": "@n8n/create-node",
|
||||
"version": "0.1.0",
|
||||
"description": "Official CLI to create new community nodes for n8n",
|
||||
"bin": {
|
||||
"create-n8n-node": "./bin/create.js"
|
||||
},
|
||||
"files": [
|
||||
"bin",
|
||||
"dist"
|
||||
],
|
||||
"scripts": {
|
||||
"publish:dry": "pnpm run build && pnpm pub --dry-run",
|
||||
"start": "./bin/create.js"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/n8n-io/n8n"
|
||||
},
|
||||
"dependencies": {
|
||||
"@n8n/node-cli": "workspace:*"
|
||||
}
|
||||
}
|
||||
11
packages/@n8n/create-node/tsconfig.json
Normal file
11
packages/@n8n/create-node/tsconfig.json
Normal file
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"extends": "@n8n/typescript-config/modern/tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"baseUrl": ".",
|
||||
"rootDir": "src",
|
||||
"outDir": "dist",
|
||||
"types": ["vite/client", "vitest/globals"],
|
||||
"isolatedModules": true
|
||||
},
|
||||
"include": ["src/**/*.ts"]
|
||||
}
|
||||
Reference in New Issue
Block a user