mirror of
https://github.com/n8n-io/n8n-nodes-starter.git
synced 2025-10-29 06:22:24 -05:00
deploy-node-windows added and new S4DS Node name
This commit is contained in:
parent
bd868dcc2b
commit
fd1cae8b70
2 changed files with 47 additions and 2 deletions
45
deploy-node-windows.sh
Normal file
45
deploy-node-windows.sh
Normal file
|
|
@ -0,0 +1,45 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Exit immediately if a command fails.
|
||||||
|
set -e
|
||||||
|
|
||||||
|
##############################
|
||||||
|
# Step 0: Get Package Name
|
||||||
|
##############################
|
||||||
|
PACKAGE_NAME=$(node -p "require('./package.json').name")
|
||||||
|
|
||||||
|
if [ -z "$PACKAGE_NAME" ]; then
|
||||||
|
echo "❌ Error: Could not determine package name from package.json."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "📦 Detected package name: '$PACKAGE_NAME'"
|
||||||
|
|
||||||
|
##############################
|
||||||
|
# Step 1: Build the Node
|
||||||
|
##############################
|
||||||
|
echo "🔨 Building the node..."
|
||||||
|
pnpm run build
|
||||||
|
|
||||||
|
##############################
|
||||||
|
# Step 2: Deploy the Build Output
|
||||||
|
##############################
|
||||||
|
SOURCE_DIR="D:\\Users\\aleja\\Code\\n8n-nodes-starter-s4ds\\dist"
|
||||||
|
|
||||||
|
echo "🚀 Deploying build output from '$SOURCE_DIR' to Docker volume..."
|
||||||
|
|
||||||
|
docker run --rm \
|
||||||
|
-v n8n-nodes-starter-s4ds_n8n_data:/data \
|
||||||
|
-v "${SOURCE_DIR}:/build" \
|
||||||
|
alpine sh -c "mkdir -p /data/custom/$PACKAGE_NAME && cp -r /build/* /data/custom/$PACKAGE_NAME/"
|
||||||
|
|
||||||
|
echo "✅ Deployment complete."
|
||||||
|
|
||||||
|
##############################
|
||||||
|
# Step 3: Restart n8n
|
||||||
|
##############################
|
||||||
|
echo "♻️ Restarting n8n container..."
|
||||||
|
docker container restart n8n-nodes-starter-s4ds-n8n-1
|
||||||
|
|
||||||
|
echo "📄 Streaming logs..."
|
||||||
|
docker logs -f n8n-nodes-starter-s4ds-n8n-1
|
||||||
|
|
@ -3,7 +3,7 @@ import { ApiHelper } from './ApiHelper';
|
||||||
|
|
||||||
export class S4DSMain implements INodeType {
|
export class S4DSMain implements INodeType {
|
||||||
description: INodeTypeDescription = {
|
description: INodeTypeDescription = {
|
||||||
displayName: 'S4DS',
|
displayName: 'S4DS\'s APIs',
|
||||||
name: 's4ds',
|
name: 's4ds',
|
||||||
icon: { light: 'file:logo_generic.png', dark: 'file:logo_generic.png' },
|
icon: { light: 'file:logo_generic.png', dark: 'file:logo_generic.png' },
|
||||||
group: ['transform'],
|
group: ['transform'],
|
||||||
|
|
@ -11,7 +11,7 @@ export class S4DSMain implements INodeType {
|
||||||
subtitle: '={{$parameter["resource"]}} - {{$parameter["operation"]}}',
|
subtitle: '={{$parameter["resource"]}} - {{$parameter["operation"]}}',
|
||||||
description: 'S4DS API operations including authentication and product management',
|
description: 'S4DS API operations including authentication and product management',
|
||||||
defaults: {
|
defaults: {
|
||||||
name: 'S4DS',
|
name: 'S4DS\'s APIs',
|
||||||
},
|
},
|
||||||
inputs: [NodeConnectionType.Main],
|
inputs: [NodeConnectionType.Main],
|
||||||
outputs: [NodeConnectionType.Main],
|
outputs: [NodeConnectionType.Main],
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue