tambahannya

This commit is contained in:
bipproduction
2025-11-06 11:32:41 +08:00
commit b6ac42c709
10 changed files with 6639 additions and 0 deletions

141
.gitignore vendored Normal file
View File

@@ -0,0 +1,141 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*
# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
# Runtime data
pids
*.pid
*.seed
*.pid.lock
# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov
# Coverage directory used by tools like istanbul
coverage
*.lcov
# nyc test coverage
.nyc_output
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt
# Bower dependency directory (https://bower.io/)
bower_components
# node-waf configuration
.lock-wscript
# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release
# Dependency directories
node_modules/
jspm_packages/
# Snowpack dependency directory (https://snowpack.dev/)
web_modules/
# TypeScript cache
*.tsbuildinfo
# Optional npm cache directory
.npm
# Optional eslint cache
.eslintcache
# Optional stylelint cache
.stylelintcache
# Optional REPL history
.node_repl_history
# Output of 'npm pack'
*.tgz
# Yarn Integrity file
.yarn-integrity
# dotenv environment variable files
.env
.env.*
!.env.example
# parcel-bundler cache (https://parceljs.org/)
.cache
.parcel-cache
# Next.js build output
.next
out
# Nuxt.js build / generate output
.nuxt
dist
.output
# Gatsby files
.cache/
# Comment in the public line in if your project uses Gatsby and not Next.js
# https://nextjs.org/blog/next-9-1#public-directory-support
# public
# vuepress build output
.vuepress/dist
# vuepress v2.x temp and cache directory
.temp
.cache
# Sveltekit cache directory
.svelte-kit/
# vitepress build output
**/.vitepress/dist
# vitepress cache directory
**/.vitepress/cache
# Docusaurus cache and generated files
.docusaurus
# Serverless directories
.serverless/
# FuseBox cache
.fusebox/
# DynamoDB Local files
.dynamodb/
# Firebase cache directory
.firebase/
# TernJS port file
.tern-port
# Stores VSCode versions used for testing VSCode extensions
.vscode-test
# yarn v3
.pnp.*
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions
# Vite files
vite.config.js.timestamp-*
vite.config.ts.timestamp-*
.vite/

6376
package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

27
package.json Normal file
View File

@@ -0,0 +1,27 @@
{
"name": "n8n-nodes-wibu",
"version": "1.0.0",
"main": "dist/index.js",
"scripts": {
"build": "tsc && cp src/nodes/Wibu/logo.svg dist/nodes/Wibu/logo.svg",
"prepare": "npm run build",
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC",
"description": "",
"dependencies": {
"express": "^5.1.0",
"n8n-core": "^1.117.1",
"n8n-workflow": "^1.116.0",
"ssh2": "^1.17.0"
},
"devDependencies": {
"@types/express": "^5.0.5",
"@types/node": "^24.10.0",
"@types/ssh2": "^1.15.5",
"ts-node": "^10.9.2",
"typescript": "^5.9.3"
}
}

3
src/index.ts Normal file
View File

@@ -0,0 +1,3 @@
module.exports = {
Wibu: require('./nodes/Wibu/Wibu.node.js').Wibu,
};

View File

@@ -0,0 +1,20 @@
{
"version": 1,
"description": "Node wibu untuk generate kata-kata anime",
"defaults": {
"name": "Wibu"
},
"inputs": ["main"],
"outputs": ["main"],
"credentials": [],
"properties": [
{
"displayName": "Text",
"name": "text",
"type": "string",
"default": "konnichiwa",
"placeholder": "Masukkan kata-kata wibu"
}
]
}

View File

@@ -0,0 +1,46 @@
import { IExecuteFunctions } from 'n8n-workflow';
import type { INodeType, INodeTypeDescription } from 'n8n-workflow';
export class Wibu implements INodeType {
description: INodeTypeDescription = {
displayName: 'Wibu',
name: 'wibu',
icon: 'file:logo.svg',
group: ['transform'],
version: 1,
description: 'Node wibu custom',
defaults: {
name: 'Wibu',
},
inputs: ['main'],
outputs: ['main'],
properties: [
{
displayName: 'Text',
name: 'text',
type: 'string',
default: '',
required: true,
},
],
};
async execute(this: IExecuteFunctions) {
const returnData = [];
const items = this.getInputData();
for (let i = 0; i < items.length; i++) {
const text = this.getNodeParameter('text', i) as string;
returnData.push({
json: {
hasil: `Halo wibu: ${text}`,
},
});
}
return [returnData];
}
}

2
src/nodes/Wibu/logo.svg Normal file
View File

@@ -0,0 +1,2 @@
<?xml version="1.0" ?><!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
<svg width="800px" height="800px" viewBox="0 0 128 128" data-name="Layer 1" id="Layer_1" xmlns="http://www.w3.org/2000/svg"><defs><style>.cls-1{fill:#00adfe;}.cls-2{fill:#356cb6;opacity:0.3;}.cls-3,.cls-8{fill:#393c54;}.cls-4{fill:#ffffff;}.cls-5,.cls-6{fill:none;stroke:#393c54;stroke-linecap:round;stroke-miterlimit:10;}.cls-5{stroke-width:5.51px;}.cls-6{stroke-width:2.21px;}.cls-7{fill:#a7aece;}.cls-8{opacity:0.2;}</style></defs><title/><circle class="cls-1" cx="64" cy="64" r="60"/><circle class="cls-2" cx="64" cy="64" r="48"/><path class="cls-3" d="M64,124a59.8,59.8,0,0,0,41.54-16.72c-1-22.43-3.94-55.49-12.65-75.18C88.06,21.18,76.74,13.88,64,13.88h0c-12.74,0-24.65,7-28.89,18.22C27.58,51.93,24.35,85.33,23,107.76A59.74,59.74,0,0,0,64,124Z"/><path class="cls-4" d="M84.13,36.13c-3.52-8.48-10.48-12.82-19.74-13v0h-.78v0c-9.26.22-16.22,4.56-19.74,13-3.63,8.71-4.83,21.77,0,39.19,4.69,17,10.54,20.49,19.74,20.67h.78c9.2-.18,15-3.72,19.74-20.67C89,57.9,87.76,44.84,84.13,36.13Z"/><line class="cls-5" x1="77.58" x2="81.99" y1="52.83" y2="52.83"/><path class="cls-3" d="M68.5,88a30.85,30.85,0,0,1-9,0c-1.25-.33-2.5-1.12-2.5-2.5s1.2-2.13,2.5-2.5a20.4,20.4,0,0,1,9,0c1.21.31,2.5,1.12,2.5,2.5S69.73,87.68,68.5,88Z"/><path class="cls-6" d="M82.05,58.11a9.91,9.91,0,0,1-5.73-.37"/><path class="cls-7" d="M75.42,65A3.31,3.31,0,0,1,82,65c0,1.83-3.31,14.33-5.51,14.33C75.42,79.29,75.42,66.79,75.42,65Z"/><path class="cls-7" d="M75.37,45A3.31,3.31,0,0,0,82,45c0-1.82-2.59-9.92-4.41-9.92S75.37,43.19,75.37,45Z"/><line class="cls-5" x1="46.01" x2="50.42" y1="52.83" y2="52.83"/><path class="cls-6" d="M51.68,57.76a10,10,0,0,1-5.91.29"/><path class="cls-7" d="M52.63,45A3.31,3.31,0,0,1,46,45c0-1.82,2.59-9.92,4.41-9.92S52.63,43.19,52.63,45Z"/><path class="cls-7" d="M52.58,65A3.31,3.31,0,0,0,46,65c0,1.83,3.31,14.33,5.51,14.33C52.58,79.29,52.58,66.79,52.58,65Z"/><path class="cls-7" d="M68.41,90.32c0,1.22-2,2.21-4.41,2.21s-4.41-1-4.41-2.21c0-.62,2-.27,4.41-.27S68.41,89.7,68.41,90.32Z"/><path class="cls-8" d="M84.13,36.13a21.8,21.8,0,0,0-4.48-6.94c1.45,10.32.63,23.64-1.36,41.86-2.09,19.1-11.43,23.3-21,24a21.16,21.16,0,0,0,6.35.94h.78c9.2-.18,15-3.72,19.74-20.67C89,57.9,87.76,44.84,84.13,36.13Z"/></svg>

After

Width:  |  Height:  |  Size: 2.2 KiB

4
src/types/global.d.ts vendored Normal file
View File

@@ -0,0 +1,4 @@
interface ErrorOptions {
cause?: unknown;
}

6
src/types/nock.d.ts vendored Normal file
View File

@@ -0,0 +1,6 @@
declare module 'nock' {
export interface ReplyHeaders {}
export interface RequestBodyMatcher {}
export interface RequestHeaderMatcher {}
}

14
tsconfig.json Normal file
View File

@@ -0,0 +1,14 @@
{
"compilerOptions": {
"lib": ["es2021", "dom"],
"module": "commonjs",
"target": "es2017",
"outDir": "dist",
"rootDir": "src",
"strict": true,
"esModuleInterop": true,
"resolveJsonModule": true
},
"include": ["src/**/*.ts"]
}