@thecodigohub/n8n-nodes-insightshub 0.0.8 → 0.0.10

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.
@@ -0,0 +1,3 @@
1
+ export { InsightsHubNode } from './nodes/InsightsHub.node';
2
+ export { InsightsHubApi } from './credentials/InsightsHub.credentials';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAC3D,OAAO,EAAE,cAAc,EAAE,MAAM,uCAAuC,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.InsightsHubApi = exports.InsightsHubNode = void 0;
4
+ var InsightsHub_node_1 = require("./nodes/InsightsHub.node");
5
+ Object.defineProperty(exports, "InsightsHubNode", { enumerable: true, get: function () { return InsightsHub_node_1.InsightsHubNode; } });
6
+ var InsightsHub_credentials_1 = require("./credentials/InsightsHub.credentials");
7
+ Object.defineProperty(exports, "InsightsHubApi", { enumerable: true, get: function () { return InsightsHub_credentials_1.InsightsHubApi; } });
8
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":";;;AAAA,6DAA2D;AAAlD,mHAAA,eAAe,OAAA;AACxB,iFAAuE;AAA9D,yHAAA,cAAc,OAAA"}
package/package.json CHANGED
@@ -1,7 +1,8 @@
1
1
  {
2
2
  "name": "@thecodigohub/n8n-nodes-insightshub",
3
- "version": "0.0.8",
3
+ "version": "0.0.10",
4
4
  "description": "Custom n8n node for Insights Hub",
5
+ "main": "dist/index.js",
5
6
  "scripts": {
6
7
  "build": "tsc",
7
8
  "dev": "tsc --watch",
@@ -13,10 +14,14 @@
13
14
  },
14
15
  "keywords": [
15
16
  "n8n",
17
+ "n8n-community-node-package",
16
18
  "insights",
17
19
  "hub",
18
20
  "dashboard"
19
21
  ],
22
+ "files": [
23
+ "dist/**/*"
24
+ ],
20
25
  "publishConfig": {
21
26
  "access": "public"
22
27
  },
@@ -36,10 +41,11 @@
36
41
  "dist/nodes/InsightsHub.node.js"
37
42
  ]
38
43
  },
39
- "dependencies": {
44
+ "devDependencies": {
40
45
  "@types/node": "^25.6.0",
41
- "n8n-core": "^2.16.1",
42
- "n8n-workflow": "^2.16.0",
43
46
  "typescript": "^6.0.3"
47
+ },
48
+ "peerDependencies": {
49
+ "n8n-workflow": "*"
44
50
  }
45
51
  }
@@ -1,34 +0,0 @@
1
- # This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
2
- # For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages
3
-
4
- name: Node.js Package
5
-
6
- on:
7
- release:
8
- types: [created]
9
-
10
- permissions:
11
- id-token: write # Required for OIDC
12
- contents: read
13
-
14
- jobs:
15
- build:
16
- runs-on: ubuntu-latest
17
- steps:
18
- - uses: actions/checkout@v4
19
- - uses: actions/setup-node@v4
20
- with:
21
- node-version: 22
22
- - run: npm ci
23
-
24
- publish-npm:
25
- needs: build
26
- runs-on: ubuntu-latest
27
- steps:
28
- - uses: actions/checkout@v4
29
- - uses: actions/setup-node@v4
30
- with:
31
- node-version: 22
32
- registry-url: https://registry.npmjs.org/
33
- - run: npm ci
34
- - run: npm publish
@@ -1,19 +0,0 @@
1
- import {
2
- ICredentialType,
3
- NodePropertyTypes,
4
- } from 'n8n-workflow';
5
-
6
- export class InsightsHubApi implements ICredentialType {
7
- name = 'insightsHubApi';
8
- displayName = 'Insights Hub API';
9
- documentationUrl = 'https://insights-hub.internal/docs'; // Placeholder
10
- properties = [
11
- {
12
- displayName: 'API Token',
13
- name: 'apiToken',
14
- type: 'string' as NodePropertyTypes,
15
- default: '',
16
- required: true,
17
- },
18
- ];
19
- }
package/insightsHub.svg DELETED
@@ -1,3 +0,0 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor">
2
- <path d="M3 3h18v18H3V3zm16 16V5H5v14h14zM9 7h6v2H9V7zm0 4h6v2H9v-2zm0 4h4v2H9v-2z"/>
3
- </svg>
@@ -1,95 +0,0 @@
1
- import {
2
- IExecuteFunctions,
3
- INodeExecutionData,
4
- INodeType,
5
- INodeTypeDescription,
6
- NodeOperationError,
7
- } from 'n8n-workflow';
8
-
9
- export class InsightsHubNode implements INodeType {
10
- description: INodeTypeDescription = {
11
- displayName: 'Insights Hub',
12
- name: 'insightsHub',
13
- icon: 'file:insightsHub.svg', // Placeholder icon
14
- group: ['transform'],
15
- version: 1,
16
- description: 'Connect to Insights Hub to fetch dashboard data',
17
- defaults: {
18
- name: 'Insights Hub',
19
- },
20
- inputs: ['main'],
21
- outputs: ['main'],
22
- credentials: [
23
- {
24
- name: 'insightsHubApi',
25
- required: true,
26
- },
27
- ],
28
- properties: [
29
- {
30
- displayName: 'Project Name',
31
- name: 'projectName',
32
- type: 'string',
33
- default: '',
34
- placeholder: 'Enter the project name',
35
- description: 'The name of the project in Insights Hub',
36
- required: true,
37
- },
38
- {
39
- displayName: 'Operation',
40
- name: 'operation',
41
- type: 'options',
42
- options: [
43
- {
44
- name: 'Get Dashboard',
45
- value: 'getDashboard',
46
- description: 'Fetch dashboard data',
47
- },
48
- ],
49
- default: 'getDashboard',
50
- description: 'The operation to perform',
51
- },
52
- // Add more fields here as needed
53
- ],
54
- };
55
-
56
- async execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]> {
57
- const items = this.getInputData();
58
- const returnData: INodeExecutionData[] = [];
59
-
60
- const credentials = await this.getCredentials('insightsHubApi');
61
- const apiToken = credentials.apiToken as string;
62
-
63
- for (let i = 0; i < items.length; i++) {
64
- try {
65
- const projectName = this.getNodeParameter('projectName', i) as string;
66
- const operation = this.getNodeParameter('operation', i) as string;
67
-
68
- if (operation === 'getDashboard') {
69
- // Placeholder: Assume API endpoint is something like https://insights-hub.internal/api/projects/{projectName}/dashboard
70
- // In real implementation, make HTTP request
71
- const response = {
72
- project: projectName,
73
- data: 'Sample dashboard data', // Replace with actual API call
74
- };
75
-
76
- returnData.push({
77
- json: response,
78
- });
79
- }
80
- } catch (error) {
81
- if (this.continueOnFail()) {
82
- returnData.push({
83
- json: { error: error instanceof Error ? error.message : String(error) },
84
- });
85
- continue;
86
- }
87
- throw new NodeOperationError(this.getNode(), error instanceof Error ? error : new Error(String(error)), {
88
- itemIndex: i,
89
- });
90
- }
91
- }
92
-
93
- return [returnData];
94
- }
95
- }
package/tsconfig.json DELETED
@@ -1,17 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "module": "commonjs",
4
- "target": "es2019",
5
- "lib": ["es2019"],
6
- "outDir": "dist",
7
- "strict": true,
8
- "esModuleInterop": true,
9
- "skipLibCheck": true,
10
- "forceConsistentCasingInFileNames": true,
11
- "declaration": true,
12
- "declarationMap": true,
13
- "sourceMap": true
14
- },
15
- "include": ["nodes/**/*", "credentials/**/*"],
16
- "exclude": ["node_modules", "dist"]
17
- }