@nodetool-ai/fal-nodes 0.7.0-rc.22 → 0.8.1

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.
Files changed (40) hide show
  1. package/README.md +40 -0
  2. package/dist/.nodetool-build-stamp +1 -0
  3. package/dist/fal-base.d.ts +62 -3
  4. package/dist/fal-base.d.ts.map +1 -1
  5. package/dist/fal-base.js +166 -21
  6. package/dist/fal-base.js.map +1 -1
  7. package/dist/fal-billing.d.ts +27 -0
  8. package/dist/fal-billing.d.ts.map +1 -0
  9. package/dist/fal-billing.js +54 -0
  10. package/dist/fal-billing.js.map +1 -0
  11. package/dist/fal-cost.d.ts +44 -0
  12. package/dist/fal-cost.d.ts.map +1 -0
  13. package/dist/fal-cost.js +178 -0
  14. package/dist/fal-cost.js.map +1 -0
  15. package/dist/fal-dynamic.d.ts +10 -7
  16. package/dist/fal-dynamic.d.ts.map +1 -1
  17. package/dist/fal-dynamic.js +29 -20
  18. package/dist/fal-dynamic.js.map +1 -1
  19. package/dist/fal-factory.d.ts +1 -1
  20. package/dist/fal-factory.d.ts.map +1 -1
  21. package/dist/fal-factory.js +274 -136
  22. package/dist/fal-factory.js.map +1 -1
  23. package/dist/fal-manifest.json +272526 -149509
  24. package/dist/fal-provider.d.ts +5 -1
  25. package/dist/fal-provider.d.ts.map +1 -1
  26. package/dist/fal-provider.js +102 -11
  27. package/dist/fal-provider.js.map +1 -1
  28. package/dist/fal-types.d.ts +0 -60
  29. package/dist/fal-types.d.ts.map +1 -1
  30. package/dist/generated/fal-node-type-pricing.json +8526 -0
  31. package/dist/generated/fal-unit-pricing.json +7101 -0
  32. package/dist/index.d.ts +3 -0
  33. package/dist/index.d.ts.map +1 -1
  34. package/dist/index.js +7 -6
  35. package/dist/index.js.map +1 -1
  36. package/dist/unit-pricing-catalog.d.ts +16 -0
  37. package/dist/unit-pricing-catalog.d.ts.map +1 -0
  38. package/dist/unit-pricing-catalog.js +12 -0
  39. package/dist/unit-pricing-catalog.js.map +1 -0
  40. package/package.json +36 -10
package/dist/index.d.ts CHANGED
@@ -3,6 +3,9 @@ export { FalProvider } from "./fal-provider.js";
3
3
  export { FalRawNode, FalDynamicNode } from "./fal-dynamic.js";
4
4
  export { createFalNodeClass, loadFalNodesFromManifest } from "./fal-factory.js";
5
5
  export type { FalManifestEntry } from "./fal-factory.js";
6
+ export { estimateFalCost, reportFalCost, getFalPricing } from "./fal-cost.js";
7
+ export type { FalCostEstimate, FalPricingEntry } from "./fal-cost.js";
8
+ export { fetchFalBillingCost, registerFalCostReconciler } from "./fal-billing.js";
6
9
  export declare const FAL_NODES: readonly NodeClass[];
7
10
  export declare function registerFalNodes(registry: {
8
11
  register: (nodeClass: NodeClass) => void;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAOvD,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,wBAAwB,EAAE,MAAM,kBAAkB,CAAC;AAChF,YAAY,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAQzD,eAAO,MAAM,SAAS,EAAE,SAAS,SAAS,EAEzC,CAAC;AAEF,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE;IACzC,QAAQ,EAAE,CAAC,SAAS,EAAE,SAAS,KAAK,IAAI,CAAC;CAC1C,GAAG,IAAI,CAIP"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAMvD,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,wBAAwB,EAAE,MAAM,kBAAkB,CAAC;AAChF,YAAY,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACzD,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAC9E,YAAY,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AACtE,OAAO,EAAE,mBAAmB,EAAE,yBAAyB,EAAE,MAAM,kBAAkB,CAAC;AAYlF,eAAO,MAAM,SAAS,EAAE,SAAS,SAAS,EAEzC,CAAC;AAEF,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE;IACzC,QAAQ,EAAE,CAAC,SAAS,EAAE,SAAS,KAAK,IAAI,CAAC;CAC1C,GAAG,IAAI,CAIP"}
package/dist/index.js CHANGED
@@ -1,14 +1,15 @@
1
+ import { loadPackageAssetJson } from "@nodetool-ai/config";
1
2
  import { loadFalNodesFromManifest } from "./fal-factory.js";
2
- import { readFileSync } from "node:fs";
3
- import { join, dirname } from "node:path";
4
- import { fileURLToPath } from "node:url";
3
+ import { registerFalCostReconciler } from "./fal-billing.js";
5
4
  export { FalProvider } from "./fal-provider.js";
6
5
  export { FalRawNode, FalDynamicNode } from "./fal-dynamic.js";
7
6
  export { createFalNodeClass, loadFalNodesFromManifest } from "./fal-factory.js";
7
+ export { estimateFalCost, reportFalCost, getFalPricing } from "./fal-cost.js";
8
+ export { fetchFalBillingCost, registerFalCostReconciler } from "./fal-billing.js";
9
+ // Make FAL request costs reconcilable to actuals as soon as this package loads.
10
+ registerFalCostReconciler();
8
11
  function loadManifest() {
9
- const dir = dirname(fileURLToPath(import.meta.url));
10
- const manifestPath = join(dir, "fal-manifest.json");
11
- return JSON.parse(readFileSync(manifestPath, "utf8"));
12
+ return loadPackageAssetJson({ pkg: "@nodetool-ai/fal-nodes", path: "fal-manifest.json" }, import.meta.url);
12
13
  }
13
14
  export const FAL_NODES = loadFalNodesFromManifest(loadManifest());
14
15
  export function registerFalNodes(registry) {
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,wBAAwB,EAAE,MAAM,kBAAkB,CAAC;AAE5D,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,wBAAwB,EAAE,MAAM,kBAAkB,CAAC;AAGhF,SAAS,YAAY;IACnB,MAAM,GAAG,GAAG,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;IACpD,MAAM,YAAY,GAAG,IAAI,CAAC,GAAG,EAAE,mBAAmB,CAAC,CAAC;IACpD,OAAO,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,YAAY,EAAE,MAAM,CAAC,CAAC,CAAC;AACxD,CAAC;AAED,MAAM,CAAC,MAAM,SAAS,GAAyB,wBAAwB,CACrE,YAAY,EAAE,CACf,CAAC;AAEF,MAAM,UAAU,gBAAgB,CAAC,QAEhC;IACC,KAAK,MAAM,SAAS,IAAI,SAAS,EAAE,CAAC;QAClC,QAAQ,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;IAC/B,CAAC;AACH,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,EAAE,wBAAwB,EAAE,MAAM,kBAAkB,CAAC;AAE5D,OAAO,EAAE,yBAAyB,EAAE,MAAM,kBAAkB,CAAC;AAE7D,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,wBAAwB,EAAE,MAAM,kBAAkB,CAAC;AAEhF,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAE9E,OAAO,EAAE,mBAAmB,EAAE,yBAAyB,EAAE,MAAM,kBAAkB,CAAC;AAElF,gFAAgF;AAChF,yBAAyB,EAAE,CAAC;AAE5B,SAAS,YAAY;IACnB,OAAO,oBAAoB,CACzB,EAAE,GAAG,EAAE,wBAAwB,EAAE,IAAI,EAAE,mBAAmB,EAAE,EAC5D,OAAO,IAAI,CAAC,GAAG,CAChB,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,MAAM,SAAS,GAAyB,wBAAwB,CACrE,YAAY,EAAE,CACf,CAAC;AAEF,MAAM,UAAU,gBAAgB,CAAC,QAEhC;IACC,KAAK,MAAM,SAAS,IAAI,SAAS,EAAE,CAAC;QAClC,QAAQ,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;IAC/B,CAAC;AACH,CAAC"}
@@ -0,0 +1,16 @@
1
+ /**
2
+ * The FAL unit-price catalog written by `packages/fal-codegen`, exposed as a
3
+ * plain module so consumers import it (and bundlers inline it) instead of
4
+ * reading JSON off disk at runtime.
5
+ *
6
+ * Keyed by FAL `endpoint_id` (e.g. `fal-ai/flux/schnell`) — the same id that
7
+ * lands on a node's provider-model property when a model is selected.
8
+ */
9
+ export interface FalUnitPricingCatalog {
10
+ schemaVersion: number;
11
+ writtenAt: string;
12
+ prices?: Record<string, unknown>;
13
+ }
14
+ export declare const falUnitPricingCatalog: FalUnitPricingCatalog;
15
+ export default falUnitPricingCatalog;
16
+ //# sourceMappingURL=unit-pricing-catalog.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"unit-pricing-catalog.d.ts","sourceRoot":"","sources":["../src/unit-pricing-catalog.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAIH,MAAM,WAAW,qBAAqB;IACpC,aAAa,EAAE,MAAM,CAAC;IACtB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAClC;AAED,eAAO,MAAM,qBAAqB,EAAE,qBAA+B,CAAC;eAErD,qBAAqB"}
@@ -0,0 +1,12 @@
1
+ /**
2
+ * The FAL unit-price catalog written by `packages/fal-codegen`, exposed as a
3
+ * plain module so consumers import it (and bundlers inline it) instead of
4
+ * reading JSON off disk at runtime.
5
+ *
6
+ * Keyed by FAL `endpoint_id` (e.g. `fal-ai/flux/schnell`) — the same id that
7
+ * lands on a node's provider-model property when a model is selected.
8
+ */
9
+ import catalog from "./generated/fal-unit-pricing.json" with { type: "json" };
10
+ export const falUnitPricingCatalog = catalog;
11
+ export default falUnitPricingCatalog;
12
+ //# sourceMappingURL=unit-pricing-catalog.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"unit-pricing-catalog.js","sourceRoot":"","sources":["../src/unit-pricing-catalog.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,OAAO,MAAM,mCAAmC,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AAQ9E,MAAM,CAAC,MAAM,qBAAqB,GAA0B,OAAO,CAAC;AAEpE,eAAe,qBAAqB,CAAC"}
package/package.json CHANGED
@@ -1,25 +1,29 @@
1
1
  {
2
2
  "name": "@nodetool-ai/fal-nodes",
3
3
  "type": "module",
4
- "version": "0.7.0-rc.22",
4
+ "engines": {
5
+ "node": ">=22.0.0"
6
+ },
7
+ "version": "0.8.1",
5
8
  "description": "FAL AI nodes for nodetool",
6
9
  "main": "dist/index.js",
7
10
  "types": "dist/index.d.ts",
8
11
  "scripts": {
9
- "build": "node ../../scripts/build-typescript-workspace.mjs && node -e \"require('node:fs').cpSync('src/fal-manifest.json', 'dist/fal-manifest.json')\"",
10
- "test": "vitest run",
11
- "test:watch": "vitest",
12
- "lint": "tsc --noEmit"
12
+ "build": "node ../../scripts/build-typescript-workspace.mjs && node -e \"const fs=require('node:fs');fs.cpSync('src/fal-manifest.json','dist/fal-manifest.json');fs.cpSync('src/generated','dist/generated',{recursive:true})\"",
13
+ "test": "node ../../scripts/run-vitest.mjs run",
14
+ "test:watch": "node ../../scripts/run-vitest.mjs",
15
+ "lint": "node ../../scripts/run-tsc.mjs --noEmit"
13
16
  },
14
17
  "dependencies": {
15
18
  "@fal-ai/client": "^1.9.4",
16
- "@nodetool-ai/node-sdk": "^0.7.0-rc.22",
17
- "@nodetool-ai/runtime": "^0.7.0-rc.22"
19
+ "@nodetool-ai/config": "^0.8.1",
20
+ "@nodetool-ai/node-sdk": "^0.8.1",
21
+ "@nodetool-ai/runtime": "^0.8.1"
18
22
  },
19
23
  "devDependencies": {
20
24
  "@types/node": "^22.0.0",
21
- "typescript": "^5.7.2",
22
- "vitest": "^4.1.2"
25
+ "typescript": "npm:@typescript/typescript6@6.0.2",
26
+ "vitest": "^5.0.1"
23
27
  },
24
28
  "exports": {
25
29
  ".": {
@@ -27,7 +31,13 @@
27
31
  "import": "./dist/index.js",
28
32
  "default": "./dist/index.js"
29
33
  },
30
- "./fal-manifest.json": "./dist/fal-manifest.json"
34
+ "./fal-manifest.json": "./dist/fal-manifest.json",
35
+ "./unit-pricing-catalog": {
36
+ "nodetool-dev": "./src/unit-pricing-catalog.ts",
37
+ "types": "./dist/unit-pricing-catalog.d.ts",
38
+ "import": "./dist/unit-pricing-catalog.js",
39
+ "default": "./dist/unit-pricing-catalog.js"
40
+ }
31
41
  },
32
42
  "license": "MIT",
33
43
  "repository": {
@@ -45,5 +55,21 @@
45
55
  "files": [
46
56
  "dist",
47
57
  "README.md"
58
+ ],
59
+ "keywords": [
60
+ "nodetool",
61
+ "ai",
62
+ "workflow",
63
+ "workflow-automation",
64
+ "typescript",
65
+ "ai-nodes",
66
+ "no-code",
67
+ "visual-programming",
68
+ "workflow-nodes",
69
+ "fal",
70
+ "fal-ai",
71
+ "image-generation",
72
+ "flux",
73
+ "text-to-image"
48
74
  ]
49
75
  }