@jam-nodes/nodes 0.2.4 → 0.2.6
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/dist/ai/analyze-posts.d.ts +4 -2
- package/dist/ai/analyze-posts.d.ts.map +1 -1
- package/dist/ai/analyze-posts.js +48 -44
- package/dist/ai/analyze-posts.js.map +1 -1
- package/dist/ai/draft-emails.d.ts +4 -2
- package/dist/ai/draft-emails.d.ts.map +1 -1
- package/dist/ai/draft-emails.js +57 -42
- package/dist/ai/draft-emails.js.map +1 -1
- package/dist/ai/keyword-generator.d.ts +1 -1
- package/dist/ai/keyword-generator.d.ts.map +1 -1
- package/dist/ai/keyword-generator.js +45 -20
- package/dist/ai/keyword-generator.js.map +1 -1
- package/dist/index.d.ts +113 -11
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +7 -2
- package/dist/index.js.map +1 -1
- package/dist/integrations/apollo/search-contacts.d.ts +8 -8
- package/dist/integrations/apollo/search-contacts.d.ts.map +1 -1
- package/dist/integrations/apollo/search-contacts.js +110 -26
- package/dist/integrations/apollo/search-contacts.js.map +1 -1
- package/dist/integrations/dataforseo/keyword-research.d.ts +1 -1
- package/dist/integrations/dataforseo/keyword-research.d.ts.map +1 -1
- package/dist/integrations/dataforseo/keyword-research.js +59 -9
- package/dist/integrations/dataforseo/keyword-research.js.map +1 -1
- package/dist/integrations/dataforseo/seo-audit.d.ts +1 -1
- package/dist/integrations/dataforseo/seo-audit.d.ts.map +1 -1
- package/dist/integrations/dataforseo/seo-audit.js +56 -24
- package/dist/integrations/dataforseo/seo-audit.js.map +1 -1
- package/dist/integrations/discord/create-thread.d.ts +13 -0
- package/dist/integrations/discord/create-thread.d.ts.map +1 -0
- package/dist/integrations/discord/create-thread.js +118 -0
- package/dist/integrations/discord/create-thread.js.map +1 -0
- package/dist/integrations/discord/credentials.d.ts +4 -0
- package/dist/integrations/discord/credentials.d.ts.map +1 -0
- package/dist/integrations/discord/credentials.js +26 -0
- package/dist/integrations/discord/credentials.js.map +1 -0
- package/dist/integrations/discord/index.d.ts +6 -0
- package/dist/integrations/discord/index.d.ts.map +1 -0
- package/dist/integrations/discord/index.js +6 -0
- package/dist/integrations/discord/index.js.map +1 -0
- package/dist/integrations/discord/schemas.d.ts +556 -0
- package/dist/integrations/discord/schemas.d.ts.map +1 -0
- package/dist/integrations/discord/schemas.js +77 -0
- package/dist/integrations/discord/schemas.js.map +1 -0
- package/dist/integrations/discord/send-message.d.ts +42 -0
- package/dist/integrations/discord/send-message.d.ts.map +1 -0
- package/dist/integrations/discord/send-message.js +79 -0
- package/dist/integrations/discord/send-message.js.map +1 -0
- package/dist/integrations/discord/send-webhook.d.ts +39 -0
- package/dist/integrations/discord/send-webhook.d.ts.map +1 -0
- package/dist/integrations/discord/send-webhook.js +77 -0
- package/dist/integrations/discord/send-webhook.js.map +1 -0
- package/dist/integrations/index.d.ts +1 -0
- package/dist/integrations/index.d.ts.map +1 -1
- package/dist/integrations/index.js +2 -0
- package/dist/integrations/index.js.map +1 -1
- package/dist/integrations/openai/sora-video.d.ts +4 -4
- package/dist/integrations/openai/sora-video.d.ts.map +1 -1
- package/dist/integrations/openai/sora-video.js +82 -7
- package/dist/integrations/openai/sora-video.js.map +1 -1
- package/dist/integrations/social/linkedin-monitor.d.ts +1 -1
- package/dist/integrations/social/linkedin-monitor.d.ts.map +1 -1
- package/dist/integrations/social/linkedin-monitor.js +69 -36
- package/dist/integrations/social/linkedin-monitor.js.map +1 -1
- package/dist/integrations/social/reddit-monitor.d.ts.map +1 -1
- package/dist/integrations/social/reddit-monitor.js +5 -12
- package/dist/integrations/social/reddit-monitor.js.map +1 -1
- package/dist/integrations/social/twitter-monitor.d.ts +20 -3
- package/dist/integrations/social/twitter-monitor.d.ts.map +1 -1
- package/dist/integrations/social/twitter-monitor.js +44 -28
- package/dist/integrations/social/twitter-monitor.js.map +1 -1
- package/dist/transform/filter.d.ts.map +1 -1
- package/dist/transform/filter.js +1 -18
- package/dist/transform/filter.js.map +1 -1
- package/dist/transform/map.d.ts.map +1 -1
- package/dist/transform/map.js +1 -26
- package/dist/transform/map.js.map +1 -1
- package/dist/utils/http.d.ts +60 -0
- package/dist/utils/http.d.ts.map +1 -0
- package/dist/utils/http.js +129 -0
- package/dist/utils/http.js.map +1 -0
- package/dist/utils/index.d.ts +3 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/index.js +3 -0
- package/dist/utils/index.js.map +1 -0
- package/dist/utils/resolve-path.d.ts +20 -0
- package/dist/utils/resolve-path.d.ts.map +1 -0
- package/dist/utils/resolve-path.js +58 -0
- package/dist/utils/resolve-path.js.map +1 -0
- package/package.json +4 -1
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared path resolution utility for transform nodes.
|
|
3
|
+
*
|
|
4
|
+
* Resolves a dot-notation path string against an arbitrary object.
|
|
5
|
+
* This mirrors the same logic as `ExecutionContext.resolveNestedPath`,
|
|
6
|
+
* but operates on any object rather than the workflow variable store.
|
|
7
|
+
*
|
|
8
|
+
* Supported syntax:
|
|
9
|
+
* - Dot notation: "contact.email"
|
|
10
|
+
* - Keyed array access: "contacts[0].name"
|
|
11
|
+
* - Standalone array index: "[0].name" (when current value is an array)
|
|
12
|
+
* - Empty path returns the object itself
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* resolvePath({ a: { b: [1, 2] } }, 'a.b[1]') // → 2
|
|
16
|
+
* resolvePath([{ id: 1 }, { id: 2 }], '[0].id') // → 1
|
|
17
|
+
* resolvePath({ score: 42 }, '') // → { score: 42 }
|
|
18
|
+
*/
|
|
19
|
+
export function resolvePath(obj, path) {
|
|
20
|
+
// Empty path means use the value itself
|
|
21
|
+
if (!path) {
|
|
22
|
+
return obj;
|
|
23
|
+
}
|
|
24
|
+
const parts = path.split('.');
|
|
25
|
+
let current = obj;
|
|
26
|
+
for (const part of parts) {
|
|
27
|
+
if (current === null || current === undefined) {
|
|
28
|
+
return undefined;
|
|
29
|
+
}
|
|
30
|
+
// Handle keyed array access like "contacts[0]"
|
|
31
|
+
const keyedArrayMatch = part.match(/^(\w+)\[(\d+)\]$/);
|
|
32
|
+
if (keyedArrayMatch) {
|
|
33
|
+
const [, key, index] = keyedArrayMatch;
|
|
34
|
+
current = current[key];
|
|
35
|
+
if (Array.isArray(current)) {
|
|
36
|
+
current = current[parseInt(index, 10)];
|
|
37
|
+
}
|
|
38
|
+
else {
|
|
39
|
+
return undefined;
|
|
40
|
+
}
|
|
41
|
+
continue;
|
|
42
|
+
}
|
|
43
|
+
// Handle standalone array index like "[0]"
|
|
44
|
+
const standaloneIndexMatch = part.match(/^\[(\d+)\]$/);
|
|
45
|
+
if (standaloneIndexMatch) {
|
|
46
|
+
if (Array.isArray(current)) {
|
|
47
|
+
current = current[parseInt(standaloneIndexMatch[1], 10)];
|
|
48
|
+
}
|
|
49
|
+
else {
|
|
50
|
+
return undefined;
|
|
51
|
+
}
|
|
52
|
+
continue;
|
|
53
|
+
}
|
|
54
|
+
current = current[part];
|
|
55
|
+
}
|
|
56
|
+
return current;
|
|
57
|
+
}
|
|
58
|
+
//# sourceMappingURL=resolve-path.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolve-path.js","sourceRoot":"","sources":["../../src/utils/resolve-path.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,UAAU,WAAW,CAAC,GAAY,EAAE,IAAY;IACpD,wCAAwC;IACxC,IAAI,CAAC,IAAI,EAAE,CAAC;QACV,OAAO,GAAG,CAAC;IACb,CAAC;IAED,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAC9B,IAAI,OAAO,GAAY,GAAG,CAAC;IAE3B,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;QACzB,IAAI,OAAO,KAAK,IAAI,IAAI,OAAO,KAAK,SAAS,EAAE,CAAC;YAC9C,OAAO,SAAS,CAAC;QACnB,CAAC;QAED,+CAA+C;QAC/C,MAAM,eAAe,GAAG,IAAI,CAAC,KAAK,CAAC,kBAAkB,CAAC,CAAC;QACvD,IAAI,eAAe,EAAE,CAAC;YACpB,MAAM,CAAC,EAAE,GAAG,EAAE,KAAK,CAAC,GAAG,eAAe,CAAC;YACvC,OAAO,GAAI,OAAmC,CAAC,GAAI,CAAC,CAAC;YACrD,IAAI,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC;gBAC3B,OAAO,GAAG,OAAO,CAAC,QAAQ,CAAC,KAAM,EAAE,EAAE,CAAC,CAAC,CAAC;YAC1C,CAAC;iBAAM,CAAC;gBACN,OAAO,SAAS,CAAC;YACnB,CAAC;YACD,SAAS;QACX,CAAC;QAED,2CAA2C;QAC3C,MAAM,oBAAoB,GAAG,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC;QACvD,IAAI,oBAAoB,EAAE,CAAC;YACzB,IAAI,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC;gBAC3B,OAAO,GAAG,OAAO,CAAC,QAAQ,CAAC,oBAAoB,CAAC,CAAC,CAAE,EAAE,EAAE,CAAC,CAAC,CAAC;YAC5D,CAAC;iBAAM,CAAC;gBACN,OAAO,SAAS,CAAC;YACnB,CAAC;YACD,SAAS;QACX,CAAC;QAED,OAAO,GAAI,OAAmC,CAAC,IAAI,CAAC,CAAC;IACvD,CAAC;IAED,OAAO,OAAO,CAAC;AACjB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jam-nodes/nodes",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.6",
|
|
4
4
|
"description": "Built-in workflow nodes for jam-nodes framework",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -39,6 +39,8 @@
|
|
|
39
39
|
"build": "tsc",
|
|
40
40
|
"clean": "rm -rf dist",
|
|
41
41
|
"typecheck": "tsc --noEmit",
|
|
42
|
+
"test": "vitest run",
|
|
43
|
+
"test:watch": "vitest",
|
|
42
44
|
"prepublishOnly": "npm run build"
|
|
43
45
|
},
|
|
44
46
|
"dependencies": {
|
|
@@ -49,6 +51,7 @@
|
|
|
49
51
|
},
|
|
50
52
|
"devDependencies": {
|
|
51
53
|
"typescript": "^5.7.0",
|
|
54
|
+
"vitest": "^2.1.8",
|
|
52
55
|
"zod": "^3.24.0"
|
|
53
56
|
},
|
|
54
57
|
"keywords": [
|