chainflow 0.1.6 → 0.1.7

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 (41) hide show
  1. package/LICENSE +20 -20
  2. package/README.md +542 -488
  3. package/dist/core/chainflow.d.ts +12 -3
  4. package/dist/core/chainflow.js +13 -11
  5. package/dist/core/chainflow.js.map +1 -1
  6. package/dist/core/inputNode.d.ts +1 -1
  7. package/dist/core/inputNode.js +31 -29
  8. package/dist/core/inputNode.js.map +1 -1
  9. package/dist/core/logger.d.ts +1 -0
  10. package/dist/core/logger.js +6 -2
  11. package/dist/core/logger.js.map +1 -1
  12. package/dist/core/sourceNode.d.ts +5 -5
  13. package/dist/core/sourceNode.js +5 -5
  14. package/dist/core/sourceNode.js.map +1 -1
  15. package/dist/core/utils/constants.d.ts +2 -2
  16. package/dist/core/utils/constants.js +3 -3
  17. package/dist/core/utils/constants.js.map +1 -1
  18. package/dist/core/utils/symbols.d.ts +1 -1
  19. package/dist/core/utils/symbols.js +2 -2
  20. package/dist/http/endpoint.d.ts +3 -2
  21. package/dist/http/endpoint.js +8 -4
  22. package/dist/http/endpoint.js.map +1 -1
  23. package/dist/http/errors.d.ts +1 -1
  24. package/dist/http/errors.js +2 -2
  25. package/dist/http/errors.js.map +1 -1
  26. package/dist/http/logger.d.ts +1 -0
  27. package/dist/http/logger.js +8 -2
  28. package/dist/http/logger.js.map +1 -1
  29. package/dist/http/utils/id.d.ts +5 -0
  30. package/dist/http/utils/id.js +9 -0
  31. package/dist/http/utils/id.js.map +1 -0
  32. package/dist/index.d.ts +1 -0
  33. package/dist/index.js +3 -0
  34. package/dist/index.js.map +1 -1
  35. package/package.json +1 -1
  36. package/dist/core/utils/source.d.ts +0 -14
  37. package/dist/core/utils/source.js +0 -19
  38. package/dist/core/utils/source.js.map +0 -1
  39. package/dist/http/utils/hash.d.ts +0 -4
  40. package/dist/http/utils/hash.js +0 -8
  41. package/dist/http/utils/hash.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"logger.js","sourceRoot":"","sources":["../../src/http/logger.ts"],"names":[],"mappings":";;;;;;AAAA,0BAA0B;AAC1B,kDAA0B;AAEb,QAAA,GAAG,GAAG,IAAA,eAAK,EAAC,gBAAgB,CAAC,CAAC;AAC9B,QAAA,IAAI,GAAG,IAAA,eAAK,EAAC,sBAAsB,CAAC,CAAC;AAElD,IAAI,OAAO,CAAC,GAAG,CAAC,qBAAqB,KAAK,MAAM,EAAE,CAAC;IACjD,WAAG,CAAC,OAAO,GAAG,IAAI,CAAC;IACnB,YAAI,CAAC,OAAO,GAAG,IAAI,CAAC;AACtB,CAAC"}
1
+ {"version":3,"file":"logger.js","sourceRoot":"","sources":["../../src/http/logger.ts"],"names":[],"mappings":";;;;;;AAAA,0BAA0B;AAC1B,kDAA0B;AAC1B,2CAA+D;AAElD,QAAA,GAAG,GAAG,IAAA,eAAK,EAAC,gBAAgB,CAAC,CAAC;AAC9B,QAAA,IAAI,GAAG,IAAA,eAAK,EAAC,sBAAsB,CAAC,CAAC;AAE3C,MAAM,UAAU,GAAG,GAAG,EAAE;IAC7B,WAAG,CAAC,OAAO,GAAG,IAAI,CAAC;IACnB,YAAI,CAAC,OAAO,GAAG,IAAI,CAAC;IACpB,IAAA,mBAAe,GAAE,CAAC;AACpB,CAAC,CAAC;AAJW,QAAA,UAAU,cAIrB;AAEF,IAAI,OAAO,CAAC,GAAG,CAAC,qBAAqB,KAAK,MAAM,EAAE,CAAC;IACjD,IAAA,kBAAU,GAAE,CAAC;AACf,CAAC"}
@@ -0,0 +1,5 @@
1
+ /** @todo explore improving this */
2
+ export declare const getEndpointId: ({ route, method }: {
3
+ route: string;
4
+ method: string;
5
+ }) => string;
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getEndpointId = void 0;
4
+ /** @todo explore improving this */
5
+ const getEndpointId = ({ route, method }) => {
6
+ return `[${method.toUpperCase()}] ${route}`;
7
+ };
8
+ exports.getEndpointId = getEndpointId;
9
+ //# sourceMappingURL=id.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"id.js","sourceRoot":"","sources":["../../../src/http/utils/id.ts"],"names":[],"mappings":";;;AAAA,mCAAmC;AAC5B,MAAM,aAAa,GAAG,CAAC,EAAE,KAAK,EAAE,MAAM,EAAqC,EAAU,EAAE;IAC5F,OAAO,IAAI,MAAM,CAAC,WAAW,EAAE,KAAK,KAAK,EAAE,CAAC;AAC9C,CAAC,CAAC;AAFW,QAAA,aAAa,iBAExB"}
package/dist/index.d.ts CHANGED
@@ -6,3 +6,4 @@ export * from './core/utils/config';
6
6
  export * from './http/endpoint';
7
7
  export * from './http/reqBuilder';
8
8
  export * from './http/originServer';
9
+ export { enableLogs } from './http/logger';
package/dist/index.js CHANGED
@@ -14,6 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
+ exports.enableLogs = void 0;
17
18
  __exportStar(require("./core/chainflow"), exports);
18
19
  __exportStar(require("./core/utils/initializers"), exports);
19
20
  __exportStar(require("./core/inputNode"), exports);
@@ -22,4 +23,6 @@ __exportStar(require("./core/utils/config"), exports);
22
23
  __exportStar(require("./http/endpoint"), exports);
23
24
  __exportStar(require("./http/reqBuilder"), exports);
24
25
  __exportStar(require("./http/originServer"), exports);
26
+ var logger_1 = require("./http/logger");
27
+ Object.defineProperty(exports, "enableLogs", { enumerable: true, get: function () { return logger_1.enableLogs; } });
25
28
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,mDAAiC;AACjC,4DAA0C;AAC1C,mDAAiC;AACjC,oDAAkC;AAClC,sDAAoC;AACpC,kDAAgC;AAChC,oDAAkC;AAClC,sDAAoC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,mDAAiC;AACjC,4DAA0C;AAC1C,mDAAiC;AACjC,oDAAkC;AAClC,sDAAoC;AACpC,kDAAgC;AAChC,oDAAkC;AAClC,sDAAoC;AACpC,wCAA2C;AAAlC,oGAAA,UAAU,OAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "chainflow",
3
- "version": "0.1.6",
3
+ "version": "0.1.7",
4
4
  "description": "Build dynamic and composable API workflows",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -1,14 +0,0 @@
1
- import { NodeValue } from '../inputNode';
2
- import { SourceNode } from '../sourceNode';
3
- import { nodeValueIdentifier } from './symbols';
4
- export declare const source: (source: SourceNode, callback?: ((val: any) => any) | undefined) => {
5
- [nodeValueIdentifier]: NodeValue;
6
- source: SourceNode;
7
- callback: ((val: any) => any) | undefined;
8
- };
9
- /** @experimental - evaluating if this is important enough to retain */
10
- export declare const sources: (sources: SourceNode[], callback?: ((val: any) => any) | undefined) => {
11
- [nodeValueIdentifier]: NodeValue;
12
- sources: SourceNode[];
13
- callback: ((val: any) => any) | undefined;
14
- };
@@ -1,19 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.sources = exports.source = void 0;
4
- const inputNode_1 = require("../inputNode");
5
- const symbols_1 = require("./symbols");
6
- const source = (source, callback) => ({
7
- [symbols_1.nodeValueIdentifier]: inputNode_1.NodeValue.SourceWithCallback,
8
- source,
9
- callback,
10
- });
11
- exports.source = source;
12
- /** @experimental - evaluating if this is important enough to retain */
13
- const sources = (sources, callback) => ({
14
- [symbols_1.nodeValueIdentifier]: inputNode_1.NodeValue.Sources,
15
- sources,
16
- callback,
17
- });
18
- exports.sources = sources;
19
- //# sourceMappingURL=source.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"source.js","sourceRoot":"","sources":["../../../src/core/utils/source.ts"],"names":[],"mappings":";;;AAAA,4CAAyC;AAEzC,uCAAgD;AAEzC,MAAM,MAAM,GAAG,CAAC,MAAkB,EAAE,QAA4B,EAAE,EAAE,CAAC,CAAC;IAC3E,CAAC,6BAAmB,CAAC,EAAE,qBAAS,CAAC,kBAAkB;IACnD,MAAM;IACN,QAAQ;CACT,CAAC,CAAC;AAJU,QAAA,MAAM,UAIhB;AAEH,uEAAuE;AAChE,MAAM,OAAO,GAAG,CAAC,OAAqB,EAAE,QAA4B,EAAE,EAAE,CAAC,CAAC;IAC/E,CAAC,6BAAmB,CAAC,EAAE,qBAAS,CAAC,OAAO;IACxC,OAAO;IACP,QAAQ;CACT,CAAC,CAAC;AAJU,QAAA,OAAO,WAIjB"}
@@ -1,4 +0,0 @@
1
- export declare const hashEndpoint: ({ route, method }: {
2
- route: string;
3
- method: string;
4
- }) => string;
@@ -1,8 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.hashEndpoint = void 0;
4
- const hashEndpoint = ({ route, method }) => {
5
- return `{${method}} ${route}`;
6
- };
7
- exports.hashEndpoint = hashEndpoint;
8
- //# sourceMappingURL=hash.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"hash.js","sourceRoot":"","sources":["../../../src/http/utils/hash.ts"],"names":[],"mappings":";;;AAAO,MAAM,YAAY,GAAG,CAAC,EAAE,KAAK,EAAE,MAAM,EAAqC,EAAU,EAAE;IAC3F,OAAO,IAAI,MAAM,KAAK,KAAK,EAAE,CAAC;AAChC,CAAC,CAAC;AAFW,QAAA,YAAY,gBAEvB"}