@adaptive-ds/n8n-nodes-publer 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/README.md ADDED
@@ -0,0 +1,81 @@
1
+ # @adaptive-ds/n8n-nodes-publer
2
+
3
+ Quick links
4
+ - Publer Docs - https://publer.com/docs
5
+ - Publer Postman - https://www.postman.com/aerospace-architect-98610700/publer/collection/dolndsh/publer-api
6
+
7
+ # Run Publer n8n node locally
8
+ Before start modifying the project, we kindly recommend
9
+ to run the Publer locally.
10
+
11
+ ## NodeJS
12
+
13
+ ## Install n8n
14
+ ```bash
15
+ npm install n8n -g
16
+ ```
17
+
18
+ ## Start n8n
19
+ ```bash
20
+ n8n --version
21
+ n8n start
22
+ ```
23
+ Open [http://localhost:5678](http://localhost:5678) in your browser and configure it
24
+
25
+ ## Build and link the project
26
+ ```bash
27
+ npm install
28
+ npm run test
29
+ npm run build
30
+ npm link
31
+ ```
32
+
33
+ ## Add node to n8n
34
+ ```bash
35
+ cd ~/.n8n
36
+ mkdir -p custom
37
+ cd custom
38
+ npm init # press Enter for all questions
39
+ npm link @adaptive-ds/n8n-nodes-publer
40
+ ```
41
+
42
+ ## Start n8n again
43
+ ```bash
44
+ n8n start
45
+ ```
46
+
47
+ ## Add Publer Node to new workflow
48
+ Find `Publer` in the node list and add it to your workflow
49
+
50
+ ## Test Project Locally
51
+
52
+ ```bash
53
+ npm install
54
+ npm run test
55
+ npm run build
56
+ npm link
57
+ ```
58
+
59
+ Add node to n8n:
60
+ ```bash
61
+ cd ~/.n8n
62
+ mkdir -p custom
63
+ cd custom
64
+ npm init # press Enter for all questions
65
+ npm link @adaptive-ds/n8n-nodes-publer
66
+ ```
67
+
68
+ Start n8n:
69
+ ```bash
70
+ n8n start
71
+ ```
72
+
73
+ ## Publish project
74
+ 1. Add your `NPM_TOKEN` in GitHub Actions
75
+ 2. Push change
76
+ 3. Create a new GitHub Release, `1.0.0` in your project
77
+ 4. Install your node in n8n: `@{yourgithubname}/n8n-nodes-{yournode}`
78
+
79
+ ## Acknowledgements
80
+
81
+ - used template [**devlikeapro/n8n-openapi-node**](https://github.com/devlikeapro/n8n-openapi-node)
@@ -0,0 +1,4 @@
1
+ import { INodeType, INodeTypeDescription } from 'n8n-workflow';
2
+ export declare class Petstore implements INodeType {
3
+ description: INodeTypeDescription;
4
+ }
@@ -0,0 +1,75 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ Object.defineProperty(exports, "__esModule", { value: true });
36
+ exports.Petstore = void 0;
37
+ const n8n_openapi_node_1 = require("@devlikeapro/n8n-openapi-node");
38
+ const doc = __importStar(require("./openapi.json"));
39
+ const config = {};
40
+ const parser = new n8n_openapi_node_1.N8NPropertiesBuilder(doc, config);
41
+ const properties = parser.build();
42
+ class Petstore {
43
+ constructor() {
44
+ this.description = {
45
+ displayName: 'Petstore',
46
+ name: 'petstore',
47
+ icon: 'file:logo.svg',
48
+ group: ['transform'],
49
+ version: 1,
50
+ subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
51
+ description: 'Interact with Petstore API',
52
+ defaults: {
53
+ name: 'Petstore',
54
+ },
55
+ inputs: ['main'],
56
+ outputs: ['main'],
57
+ credentials: [
58
+ {
59
+ name: 'petstoreApi',
60
+ required: false,
61
+ },
62
+ ],
63
+ requestDefaults: {
64
+ headers: {
65
+ Accept: 'application/json',
66
+ 'Content-Type': 'application/json',
67
+ },
68
+ baseURL: 'https://petstore3.swagger.io/api/v3',
69
+ },
70
+ properties: properties,
71
+ };
72
+ }
73
+ }
74
+ exports.Petstore = Petstore;
75
+ //# sourceMappingURL=Petstore.node.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Petstore.node.js","sourceRoot":"","sources":["../../../nodes/Petstore/Petstore.node.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,oEAA+F;AAC/F,oDAAsC;AAEtC,MAAM,MAAM,GAA+B,EAAE,CAAA;AAC7C,MAAM,MAAM,GAAG,IAAI,uCAAoB,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC;AACrD,MAAM,UAAU,GAAG,MAAM,CAAC,KAAK,EAAE,CAAA;AAEjC,MAAa,QAAQ;IAArB;QACI,gBAAW,GAAyB;YAChC,WAAW,EAAE,UAAU;YACvB,IAAI,EAAE,UAAU;YAChB,IAAI,EAAE,eAAe;YACrB,KAAK,EAAE,CAAC,WAAW,CAAC;YACpB,OAAO,EAAE,CAAC;YACV,QAAQ,EAAE,8DAA8D;YACxE,WAAW,EAAE,4BAA4B;YACzC,QAAQ,EAAE;gBACN,IAAI,EAAE,UAAU;aACnB;YACD,MAAM,EAAE,CAAC,MAAM,CAAC;YAChB,OAAO,EAAE,CAAC,MAAM,CAAC;YACjB,WAAW,EAAE;gBACT;oBACI,IAAI,EAAE,aAAa;oBACnB,QAAQ,EAAE,KAAK;iBAClB;aACJ;YACD,eAAe,EAAE;gBACb,OAAO,EAAE;oBACL,MAAM,EAAE,kBAAkB;oBAC1B,cAAc,EAAE,kBAAkB;iBACrC;gBACD,OAAO,EAAE,qCAAqC;aACjD;YACD,UAAU,EAAE,UAAU;SACzB,CAAC;IACN,CAAC;CAAA;AA7BD,4BA6BC"}
@@ -0,0 +1,18 @@
1
+ {
2
+ "node": "n8n-nodes-base.petstore",
3
+ "nodeVersion": "1.0",
4
+ "codexVersion": "1.0",
5
+ "categories": ["Development", "Developer Tools"],
6
+ "resources": {
7
+ "credentialDocumentation": [
8
+ {
9
+ "url": "http://httpbin.org/#/Auth/get_bearer"
10
+ }
11
+ ],
12
+ "primaryDocumentation": [
13
+ {
14
+ "url": "http://httpbin.org/"
15
+ }
16
+ ]
17
+ }
18
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const Petstore_node_1 = require("./Petstore.node");
4
+ test("smoke", () => {
5
+ const node = new Petstore_node_1.Petstore();
6
+ expect(node.description.properties).toBeDefined();
7
+ });
8
+ //# sourceMappingURL=Petstore.spec.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Petstore.spec.js","sourceRoot":"","sources":["../../../nodes/Petstore/Petstore.spec.ts"],"names":[],"mappings":";;AAAA,mDAAyC;AAEzC,IAAI,CAAC,OAAO,EAAE,GAAG,EAAE;IACf,MAAM,IAAI,GAAG,IAAI,wBAAQ,EAAE,CAAA;IAC3B,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC,WAAW,EAAE,CAAA;AACrD,CAAC,CAAC,CAAA"}
@@ -0,0 +1 @@
1
+ <svg height="256" preserveAspectRatio="xMidYMid" viewBox="0 0 256 256" width="256" xmlns="http://www.w3.org/2000/svg"><path d="m127.059657 255.996921c-68.2090026-.470449-127.51673062-57.078479-127.05700194-128.998618.44199434-69.2024402 57.94900474-127.46727058 129.10736494-126.99545745 69.157108.45954053 127.503089 57.86392555 126.885116 128.19135345.572955 69.689254-58.060868 128.29499-128.935479 127.802722zm0 0c-68.2090026-.470449-127.51673062-57.078479-127.05700194-128.998618.44199434-69.2024402 57.94900474-127.46727058 129.10736494-126.99545745 69.157108.45954053 127.503089 57.86392555 126.885116 128.19135345.572955 69.689254-58.060868 128.29499-128.935479 127.802722z" fill="#fff"/><path d="m127.184644 238.997327c-59.1522675-.408056-110.5810349-49.498583-110.1823412-111.865899.3837257-60.0128327 50.2530972-110.5397174 111.9608142-110.1289408 59.971427.3985349 110.568788 50.1800369 110.032661 111.1667638.496666 60.43313-50.348348 111.255175-111.811134 110.828076zm0 0c-59.1522675-.408056-110.5810349-49.498583-110.1823412-111.865899.3837257-60.0128327 50.2530972-110.5397174 111.9608142-110.1289408 59.971427.3985349 110.568788 50.1800369 110.032661 111.1667638.496666 60.43313-50.348348 111.255175-111.811134 110.828076z" fill="#49a32b"/><path d="m169.327319 127.956161c-.284596 5.290212-4.906213 9.683063-9.461106 8.916425-.021787 0-.044936 0-.068085 0-5.045107.006809-9.139745-4.078298-9.145192-9.123404.171575-5.058724 4.366979-9.045787 9.427064-8.96 5.045106.02451 9.51966 4.288 9.247319 9.166979zm-81.1261275 51.264c1.9022979.055829 3.8059574.014978 5.9996596.014978v13.785873c-13.6347234 2.305361-24.8660426-1.565958-27.6221277-13.091405-.9436596-4.237617-1.5237447-8.548766-1.7361702-12.885787-.292766-4.591659.2137872-9.235064-.1361702-13.818553-.9695319-12.612085-2.6035745-16.917787-14.706383-17.514213v-15.69634c.8674043-.202894 1.7470638-.352681 2.6321702-.452085 6.6355745-.326809 9.4325107-2.361192 10.916766-8.897362.6754042-3.672511 1.0757447-7.389958 1.1942127-11.1223831.5256171-7.2170212.3390639-14.5511489 1.5414468-21.6510638 1.737532-10.267234 8.1116596-15.2551489 18.6403405-15.8134468 2.9957447-.1606808 6.0010212-.0245106 9.3957447-.0245106v14.0908936c-1.3971064.0994042-2.6771064.3022979-3.9489362.2641702-8.5800851-.2628085-9.024 2.6594043-9.650383 9.7620426-.3908085 4.4541276.1484255 8.9845106-.155234 13.453617-.3172766 4.4473189-.9123405 8.8714889-1.7811064 13.2452769-1.2377873 6.338723-5.1349787 11.052936-10.5354894 15.053617 10.4837447 6.822127 11.6765958 17.422978 12.3574468 28.187234.3662979 5.78451.1988085 11.609872.7857022 17.365787.4575319 4.467745 2.1950638 5.607489 6.8085106 5.74366zm8.8360851-60.430979h.1620425c5.0124259.083064 9.0103829 4.213106 8.9273189 9.226893 0 .164766-.005447.328171-.014978.491575-.281873 4.899404-4.481362 8.641362-9.3807664 8.359489-.1974468.004085-.3935319 0-.5909787-.009532-4.9892766-.247829-8.8333617-4.493617-8.5855319-9.482893.2478298-4.989277 4.493617-8.833362 9.4828936-8.585532zm31.2360854 0c5.482212-.042213 9.123404 3.510468 9.152 8.930042.029957 5.565277-3.421958 9.126128-8.868766 9.149277-5.539405.024511-9.186043-3.479149-9.216-8.866043-.016341-.275063-.020426-.550127-.012256-.825191.153873-4.786383 4.158639-8.541958 8.945022-8.388085zm65.399829-6.865702c1.458383 5.446808 4.297532 7.361361 10.03166 7.622808.939575.043575 1.875064.202894 3.163234.345873v15.692255c-.697191.228766-1.412085.40034-2.137872.512-7.684085.477957-11.186383 3.630298-11.962553 11.334808-.49566 4.918468-.454809 9.891405-.795234 14.827575-.142979 5.419574-.635915 10.82417-1.476086 16.179745-1.960851 9.703489-8.019063 14.54434-18.028936 15.135319-3.221787.190638-6.466723.029957-9.940425.029957v-14.025532c1.869617-.115744 3.52-.275064 5.174468-.314553 5.980596-.142979 8.095319-2.071149 8.388085-8.010894.324085-6.525276.465702-13.058723.757106-19.585361.42349-9.433873 3.006639-17.861447 11.795064-23.745362-5.028766-3.585362-9.066213-7.92783-10.112-13.783149-1.265021-7.097191-1.673532-14.3509787-2.354383-21.5475744-.33634-3.597617-.32-7.2265532-.671319-10.8214468-.378553-3.8808511-3.044766-5.2234894-6.577021-5.3106383-2.02349-.0490213-4.055149-.0095319-6.642383-.0095319v-13.696c16.509276-2.7411064 27.913532 2.752 28.972936 18.5477446.443915 6.6328511.378553 13.2970213.803404 19.9298728.186553 3.60851.725787 7.189787 1.612255 10.692085z" fill="#fff"/></svg>