@odg/chemical-x 1.29.0 → 2.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.
Files changed (75) hide show
  1. package/dist/Container.d.ts +3 -47
  2. package/dist/Container.js +3 -23
  3. package/dist/Container.js.map +1 -1
  4. package/dist/Helpers/index.d.ts +1 -1
  5. package/dist/Helpers/index.js +1 -1
  6. package/dist/Helpers/index.js.map +1 -1
  7. package/dist/Helpers/retry.d.ts +1 -1
  8. package/dist/Helpers/retry.js +2 -2
  9. package/dist/Helpers/retry.js.map +1 -1
  10. package/dist/Helpers/sleep.d.ts +1 -1
  11. package/dist/Helpers/{throwIf.d.ts → throw-if.d.ts} +1 -1
  12. package/dist/Helpers/{throwIf.js → throw-if.js} +1 -1
  13. package/dist/Helpers/throw-if.js.map +1 -0
  14. package/dist/Helpers/timeout.d.ts +1 -1
  15. package/dist/Helpers/timeout.js +1 -1
  16. package/dist/Helpers/timeout.js.map +1 -1
  17. package/dist/Interfaces/AttemptableFlow.d.ts +5 -5
  18. package/dist/Interfaces/RetryInterface.d.ts +6 -6
  19. package/dist/Interfaces/TimeoutInterface.d.ts +1 -1
  20. package/dist/Interfaces/index.d.ts +1 -1
  21. package/dist/Interfaces/index.js +0 -15
  22. package/dist/Interfaces/index.js.map +1 -1
  23. package/dist/Support/Arr.d.ts +1 -7
  24. package/dist/Support/Arr.js +0 -6
  25. package/dist/Support/Arr.js.map +1 -1
  26. package/dist/Support/Decorators/OdgDecorators.d.ts +16 -0
  27. package/dist/Support/Decorators/{ODGDecorators.js → OdgDecorators.js} +44 -25
  28. package/dist/Support/Decorators/OdgDecorators.js.map +1 -0
  29. package/dist/Support/Decorators/index.d.ts +1 -2
  30. package/dist/Support/Decorators/index.js +1 -2
  31. package/dist/Support/Decorators/index.js.map +1 -1
  32. package/dist/Support/Num.d.ts +1 -1
  33. package/dist/Support/Num.js.map +1 -1
  34. package/dist/Support/Str.d.ts +2 -2
  35. package/dist/Support/Str.js +6 -6
  36. package/dist/Support/Str.js.map +1 -1
  37. package/dist/crawler/@types/Browser.d.ts +1 -1
  38. package/dist/crawler/@types/Context.d.ts +1 -2
  39. package/dist/crawler/@types/ManagerBrowserType.d.ts +4 -4
  40. package/dist/crawler/@types/Page.d.ts +3 -4
  41. package/dist/crawler/Browser.d.ts +7 -7
  42. package/dist/crawler/Browser.js +1 -1
  43. package/dist/crawler/Browser.js.map +1 -1
  44. package/dist/crawler/BrowserManager.d.ts +5 -5
  45. package/dist/crawler/BrowserManager.js.map +1 -1
  46. package/dist/crawler/Context.d.ts +7 -7
  47. package/dist/crawler/Context.js +2 -2
  48. package/dist/crawler/Context.js.map +1 -1
  49. package/dist/crawler/Handlers/BaseHandler.d.ts +8 -7
  50. package/dist/crawler/Handlers/BaseHandler.js +3 -4
  51. package/dist/crawler/Handlers/BaseHandler.js.map +1 -1
  52. package/dist/crawler/Interfaces/HandlerInterface.d.ts +34 -15
  53. package/dist/crawler/Interfaces/PageInterface.d.ts +1 -1
  54. package/dist/crawler/Interfaces/index.d.ts +1 -1
  55. package/dist/crawler/Interfaces/index.js +0 -15
  56. package/dist/crawler/Interfaces/index.js.map +1 -1
  57. package/dist/crawler/Page.d.ts +5 -5
  58. package/dist/crawler/Page.js +1 -1
  59. package/dist/crawler/Page.js.map +1 -1
  60. package/dist/crawler/Pages/BasePage.d.ts +12 -19
  61. package/dist/crawler/Pages/BasePage.js +3 -13
  62. package/dist/crawler/Pages/BasePage.js.map +1 -1
  63. package/dist/crawler/Pages/Components/BaseComponentPage.d.ts +2 -2
  64. package/dist/crawler/Pages/Components/BaseComponentPage.js.map +1 -1
  65. package/dist/index.d.ts +1 -1
  66. package/dist/index.js +0 -1
  67. package/dist/index.js.map +1 -1
  68. package/dist/tsconfig.build.tsbuildinfo +1 -1
  69. package/package.json +37 -19
  70. package/dist/Helpers/throwIf.js.map +0 -1
  71. package/dist/Support/Decorators/GetterDecorator.d.ts +0 -1
  72. package/dist/Support/Decorators/GetterDecorator.js +0 -18
  73. package/dist/Support/Decorators/GetterDecorator.js.map +0 -1
  74. package/dist/Support/Decorators/ODGDecorators.d.ts +0 -15
  75. package/dist/Support/Decorators/ODGDecorators.js.map +0 -1
@@ -1,12 +1,12 @@
1
- import { type GetterAccessInterface } from "../Interfaces";
2
- import { type BrowserChemicalXInterface, type ContextChemicalXInterface, type ContextEngineInterface, type ContextOptionsLibraryInterface, type PageEngineInterface, CreateContextFactoryType, CreatePageFactoryType, type BrowserEngineInterface } from ".";
3
- export declare class Browser<BrowserEngineType extends BrowserEngineInterface, ContextEngineType extends ContextEngineInterface, PageEngineType extends PageEngineInterface> implements GetterAccessInterface, BrowserChemicalXInterface<BrowserEngineType, ContextEngineType> {
4
- readonly $browserInstance: BrowserEngineType;
1
+ import type { GetterAccessInterface } from "../Interfaces";
2
+ import { CreateContextFactoryType, CreatePageFactoryType, type BrowserChemicalXInterface, type BrowserEngineInterface, type ContextChemicalXInterface, type ContextEngineInterface, type ContextOptionsLibraryInterface, type PageEngineInterface } from ".";
3
+ export declare class Browser<BrowserClassEngine extends BrowserEngineInterface, ContextClassEngine extends ContextEngineInterface, PageClassEngine extends PageEngineInterface> implements GetterAccessInterface, BrowserChemicalXInterface<BrowserClassEngine, ContextClassEngine> {
4
+ readonly $browserInstance: BrowserClassEngine;
5
5
  private readonly $newContext;
6
6
  private readonly $newPage;
7
- constructor($browserInstance: BrowserEngineType, $newContext: CreateContextFactoryType<ContextEngineType, PageEngineType>, $newPage: CreatePageFactoryType<ContextChemicalXInterface<ContextEngineType>, PageEngineType>);
7
+ constructor($browserInstance: BrowserClassEngine, $newContext: CreateContextFactoryType<ContextClassEngine, PageClassEngine>, $newPage: CreatePageFactoryType<ContextChemicalXInterface<ContextClassEngine>, PageClassEngine>);
8
8
  defaultContextOptions(): Promise<ContextOptionsLibraryInterface>;
9
- newContext(options?: ContextOptionsLibraryInterface): Promise<ContextChemicalXInterface<ContextEngineType> & ContextEngineType>;
10
- contexts(): Array<ContextChemicalXInterface<ContextEngineType> & ContextEngineType>;
9
+ newContext(options?: ContextOptionsLibraryInterface): Promise<ContextChemicalXInterface<ContextClassEngine> & ContextClassEngine>;
10
+ contexts(): Array<ContextChemicalXInterface<ContextClassEngine> & ContextClassEngine>;
11
11
  __get(key: PropertyKey): unknown;
12
12
  }
@@ -51,7 +51,7 @@ let Browser = class Browser {
51
51
  };
52
52
  exports.Browser = Browser;
53
53
  exports.Browser = Browser = __decorate([
54
- (0, Decorators_1.getAccessDecorator)(),
54
+ Decorators_1.ODGDecorators.getterAccess(),
55
55
  __metadata("design:paramtypes", [Object, Function, Function])
56
56
  ], Browser);
57
57
  //# sourceMappingURL=Browser.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Browser.js","sourceRoot":"","sources":["../../src/crawler/Browser.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,oDAAyD;AAUlD,IAAM,OAAO,GAAb,MAAM,OAAO;IAOI;IACC;IACA;IAHrB,YACoB,gBAAmC,EAClC,WAAwE,EACxE,QAA6F;QAF9F,qBAAgB,GAAhB,gBAAgB,CAAmB;QAClC,gBAAW,GAAX,WAAW,CAA6D;QACxE,aAAQ,GAAR,QAAQ,CAAqF;IAGlH,CAAC;IAEM,KAAK,CAAC,qBAAqB;QAC9B,OAAO,EACN,CAAC;IACN,CAAC;IAEM,KAAK,CAAC,UAAU,CACnB,OAAwC;QAExC,MAAM,WAAW,GAAG,CAChB,IAAI,CAAC,gBAAgB,CAAC,UAAU;eAC7B,IAAI,CAAC,gBAAgB,CAAC,6BAA6B;eACnD,IAAI,CAAC,gBAAgB,CAAC,oBAAoB,CACY,CAAC;QAE9D,OAAO,IAAI,CAAC,WAAW,CACnB,MAAM,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,gBAAgB,EAAE;YAC1C,GAAG,MAAM,IAAI,CAAC,qBAAqB,EAAE;YACrC,GAAG,OAAO;SACb,CAAC,EACF,IAAI,CAAC,QAAQ,CACoD,CAAC;IAC1E,CAAC;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AC;IAClD,CAAC;CAEJ,CAAA;AAhEY,0BAAO;kBAAP,OAAO;IADnB,0BAAa,CAAC,YAAY,EAAE;;GAChB,OAAO,CAgEnB"}
@@ -1,9 +1,9 @@
1
- import { type BrowserChemicalXInterface, type BrowserEngineInterface, type ContextChemicalXInterface, type ContextEngineInterface, type CreateBrowserFactoryType, type CreateContextFactoryType, type CreatePageFactoryType, type PageEngineInterface } from "..";
2
- export declare class BrowserManager<BrowserEngineType extends BrowserEngineInterface, ContextEngineType extends ContextEngineInterface, PageEngineType extends PageEngineInterface> {
1
+ import type { BrowserChemicalXInterface, BrowserEngineInterface, ContextChemicalXInterface, ContextEngineInterface, CreateBrowserFactoryType, CreateContextFactoryType, CreatePageFactoryType, PageEngineInterface } from "..";
2
+ export declare class BrowserManager<BrowserClassEngine extends BrowserEngineInterface, ContextClassEngine extends ContextEngineInterface, PageClassEngine extends PageEngineInterface> {
3
3
  private readonly $newBrowser;
4
4
  private readonly $newContext;
5
5
  private readonly $newPage;
6
- constructor($newBrowser: CreateBrowserFactoryType<BrowserEngineType, ContextEngineType, PageEngineType>, $newContext: CreateContextFactoryType<ContextEngineType, PageEngineType>, $newPage: CreatePageFactoryType<ContextChemicalXInterface<ContextEngineType>, PageEngineType>);
7
- newBrowser(browser: () => Promise<BrowserEngineType>): Promise<BrowserChemicalXInterface<BrowserEngineType, ContextEngineType> & BrowserEngineType>;
8
- newPersistentContext(context: () => Promise<ContextEngineType>): Promise<ContextChemicalXInterface<ContextEngineType> & ContextEngineType>;
6
+ constructor($newBrowser: CreateBrowserFactoryType<BrowserClassEngine, ContextClassEngine, PageClassEngine>, $newContext: CreateContextFactoryType<ContextClassEngine, PageClassEngine>, $newPage: CreatePageFactoryType<ContextChemicalXInterface<ContextClassEngine>, PageClassEngine>);
7
+ newBrowser(browser: () => Promise<BrowserClassEngine>): Promise<BrowserChemicalXInterface<BrowserClassEngine, ContextClassEngine> & BrowserClassEngine>;
8
+ newPersistentContext(context: () => Promise<ContextClassEngine>): Promise<ContextChemicalXInterface<ContextClassEngine> & ContextClassEngine>;
9
9
  }
@@ -1 +1 @@
1
- {"version":3,"file":"BrowserManager.js","sourceRoot":"","sources":["../../src/crawler/BrowserManager.ts"],"names":[],"mappings":";;;AAWA,MAAa,cAAc;IAOF;IACA;IACA;IAHrB,YACqB,WAA2F,EAC3F,WAAwE,EACxE,QAA6F;QAF7F,gBAAW,GAAX,WAAW,CAAgF;QAC3F,gBAAW,GAAX,WAAW,CAA6D;QACxE,aAAQ,GAAR,QAAQ,CAAqF;IAElH,CAAC;IAEM,KAAK,CAAC,UAAU,CACnB,OAAyC;QAEzC,OAAO,IAAI,CAAC,WAAW,CAAC,MAAM,OAAO,EAAE,EAAE,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,QAAQ,CAEnD,CAAC;IAC1B,CAAC;IAEM,KAAK,CAAC,oBAAoB,CAC7B,OAAyC;QAEzC,OAAO,IAAI,CAAC,WAAW,CAAC,MAAM,OAAO,EAAE,EAAE,IAAI,CAAC,QAAQ,CAEjC,CAAC;IAC1B,CAAC;CAEJ;AA7BD,wCA6BC"}
1
+ {"version":3,"file":"BrowserManager.js","sourceRoot":"","sources":["../../src/crawler/BrowserManager.ts"],"names":[],"mappings":";;;AAWA,MAAa,cAAc;IAOF;IACA;IACA;IAHrB,YACqB,WAA8F,EAC9F,WAA0E,EAC1E,QAGhB;QALgB,gBAAW,GAAX,WAAW,CAAmF;QAC9F,gBAAW,GAAX,WAAW,CAA+D;QAC1E,aAAQ,GAAR,QAAQ,CAGxB;IAEL,CAAC;IAEM,KAAK,CAAC,UAAU,CACnB,OAA0C;QAE1C,OAAO,IAAI,CAAC,WAAW,CAAC,MAAM,OAAO,EAAE,EAAE,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,QAAQ,CAGlD,CAAC;IAC3B,CAAC;IAEM,KAAK,CAAC,oBAAoB,CAC7B,OAA0C;QAE1C,OAAO,IAAI,CAAC,WAAW,CAAC,MAAM,OAAO,EAAE,EAAE,IAAI,CAAC,QAAQ,CAEhC,CAAC;IAC3B,CAAC;CAEJ;AAjCD,wCAiCC"}
@@ -1,10 +1,10 @@
1
- import { type PageOptionsLibraryInterface, type ContextChemicalXInterface, type ContextEngineInterface, type CreatePageFactoryType, type GetterAccessInterface, type PageChemicalXInterface, type PageEngineInterface } from "..";
2
- export declare class Context<ContextEngineType extends ContextEngineInterface, PageEngineType extends PageEngineInterface> implements GetterAccessInterface, ContextChemicalXInterface<ContextEngineType> {
3
- readonly $contextInstance: ContextEngineType;
4
- readonly $newPage: CreatePageFactoryType<ContextChemicalXInterface<ContextEngineType>, PageEngineType>;
5
- constructor($contextInstance: ContextEngineType, $newPage: CreatePageFactoryType<ContextChemicalXInterface<ContextEngineType>, PageEngineType>);
1
+ import { type ContextChemicalXInterface, type ContextEngineInterface, type CreatePageFactoryType, type GetterAccessInterface, type PageChemicalXInterface, type PageEngineInterface, type PageOptionsLibraryInterface } from "..";
2
+ export declare class Context<ContextClassEngine extends ContextEngineInterface, PageClassEngine extends PageEngineInterface> implements GetterAccessInterface, ContextChemicalXInterface<ContextClassEngine> {
3
+ readonly $contextInstance: ContextClassEngine;
4
+ readonly $newPage: CreatePageFactoryType<ContextChemicalXInterface<ContextClassEngine>, PageClassEngine>;
5
+ constructor($contextInstance: ContextClassEngine, $newPage: CreatePageFactoryType<ContextChemicalXInterface<ContextClassEngine>, PageClassEngine>);
6
6
  defaultPageOptions(): Promise<PageOptionsLibraryInterface>;
7
- newPage(options?: Record<string, unknown>): Promise<PageChemicalXInterface<PageEngineType> & PageEngineType>;
8
- pages(): Array<PageChemicalXInterface<PageEngineType> & PageEngineType>;
7
+ newPage(options?: Record<string, unknown>): Promise<PageChemicalXInterface<PageClassEngine> & PageClassEngine>;
8
+ pages(): Array<PageChemicalXInterface<PageClassEngine> & PageClassEngine>;
9
9
  __get(key: PropertyKey): unknown;
10
10
  }
@@ -10,7 +10,7 @@ var __metadata = (this && this.__metadata) || function (k, v) {
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.Context = void 0;
13
- const Decorators_1 = require("../Support/Decorators");
13
+ const __1 = require("..");
14
14
  let Context = class Context {
15
15
  $contextInstance;
16
16
  $newPage;
@@ -43,7 +43,7 @@ let Context = class Context {
43
43
  };
44
44
  exports.Context = Context;
45
45
  exports.Context = Context = __decorate([
46
- (0, Decorators_1.getAccessDecorator)(),
46
+ __1.ODGDecorators.getterAccess(),
47
47
  __metadata("design:paramtypes", [Object, Function])
48
48
  ], Context);
49
49
  //# sourceMappingURL=Context.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Context.js","sourceRoot":"","sources":["../../src/crawler/Context.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAAyD;AAalD,IAAM,OAAO,GAAb,MAAM,OAAO;IAMI;IACA;IAFpB,YACoB,gBAAmC,EACnC,QAA6F;QAD7F,qBAAgB,GAAhB,gBAAgB,CAAmB;QACnC,aAAQ,GAAR,QAAQ,CAAqF;IAGjH,CAAC;IAEM,KAAK,CAAC,kBAAkB;QAC3B,OAAO,EACN,CAAC;IACN,CAAC;IAEM,KAAK,CAAC,OAAO,CAChB,OAAiC;QAEjC,OAAO,IAAI,CAAC,QAAQ,CAChB,IAAI,EACJ,MAAO,IAAI,CAAC,gBAAgB,CAAC,OAA4D,CACrF,IAAI,CAAC,gBAAgB,EACrB;YACI,GAAG,MAAM,IAAI,CAAC,kBAAkB,EAAE;YAClC,GAAG,OAAO;SACb,CACJ,CACuD,CAAC;IACjE,CAAC;IAEM,KAAK;QACR,MAAM,KAAK,GAAI,IAAI,CAAC,gBAAgB,CAAC,KAAgC,EAAE,CAAC;QAExE,OAAO,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,QAAQ,CACpC,IAAI,EACJ,IAAI,CACoD,CAAC,CAAC;IAClE,CAAC;IAEM,KAAK,CAAC,GAAgB;QACzB,IAAI,GAAG,IAAI,IAAI,EAAE,C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;IACpE,CAAC;IAEM,KAAK,CAAC,GAAgB;QACzB,IAAI,GAAG,IAAI,IAAI,EAAE,CAAC;YACd,OAAO,OAAO,CAAC,GAAG,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;QAClC,CAAC;QAED,MAAM,aAAa,GAAI,IAAI,CAAC,gBAAiD,CAAC,GAAG,CAAC,CAAC;QAEnF,OAAO,OAAO,aAAa,KAAK,UAAU;YACtC,CAAC,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,gBAAgB,CAAC;YAC3C,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,gBAAgB,EAAE,GAAG,CAAC,CAAC;IAClD,CAAC;CAEJ,CAAA;AArDY,0BAAO;kBAAP,OAAO;IADnB,iBAAa,CAAC,YAAY,EAAE;;GAChB,OAAO,CAqDnB"}
@@ -1,12 +1,13 @@
1
1
  import { Exception } from "@odg/exception";
2
2
  import { RetryAction } from "../../Enums";
3
- import { type HandlerFunction, type HandlerInterface, type HandlerSolutionType } from "../../Interfaces";
4
- import { type PageEngineInterface } from "../@types";
5
- export declare abstract class BaseHandler<SelectorBaseType, PageEngineType extends PageEngineInterface> implements HandlerInterface {
6
- readonly page: PageEngineType;
7
- readonly $$s: SelectorBaseType;
3
+ import type { HandlerFunction, HandlerInterface, HandlerSolutionType } from "../../Interfaces";
4
+ import type { PageEngineInterface } from "../@types";
5
+ import type { SelectorType } from "../Selectors/SelectorsType";
6
+ export declare abstract class BaseHandler<PageClassEngine extends PageEngineInterface> implements HandlerInterface {
8
7
  currentAttempt: number;
9
- constructor(page: PageEngineType, $$s: SelectorBaseType);
8
+ page?: PageClassEngine;
9
+ abstract readonly $$s: Record<number | string | symbol, SelectorType>;
10
+ setPage(page: PageClassEngine): this;
10
11
  /**
11
12
  * Called if the handler completes successfully.
12
13
  *
@@ -27,7 +28,7 @@ export declare abstract class BaseHandler<SelectorBaseType, PageEngineType exten
27
28
  *
28
29
  * Return a `RetryAction` to control the retry behavior.
29
30
  *
30
- * @param {Exception} exception Exception
31
+ * @param {Exception} exception Exception that caused the retry.
31
32
  * @param {number} attempt The current attempt number.
32
33
  * @returns {Promise<RetryAction>} The action to take before the next retry.
33
34
  */
@@ -5,12 +5,11 @@ const exception_1 = require("@odg/exception");
5
5
  const _enums_1 = require("../../Enums");
6
6
  const _helpers_1 = require("../../Helpers");
7
7
  class BaseHandler {
8
- page;
9
- $$s;
10
8
  currentAttempt = 0;
11
- constructor(page, $$s) {
9
+ page;
10
+ setPage(page) {
12
11
  this.page = page;
13
- this.$$s = $$s;
12
+ return this;
14
13
  }
15
14
  /**
16
15
  * Executes the handler with retry, failure, and finish logic.
@@ -1 +1 @@
1
- {"version":3,"file":"BaseHandler.js","sourceRoot":"","sources":["../../../src/crawler/Handlers/BaseHandler.ts"],"names":[],"mappings":";;;AAAA,8CAA6D;AAE7D,mCAAqC;AACrC,uCAAiC;AASjC,MAAsB,WAAW;IAQT;IACA;IAJb,cAAc,GAAW,CAAC,CAAC;IAElC,YACoB,IAAoB,EACpB,GAAqB;QADrB,SAAI,GAAJ,IAAI,CAAgB;QACpB,QAAG,GAAH,GAAG,CAAkB;IAEzC,CAAC;IAkDD;;;;OAIG;IACI,KAAK,CAAC,OAAO;QAChB,IAAI,CAAC;YACD,MAAM,eAAe,GAAG,MAAM,IAAI,CAAC,sBAAsB,EAAE,CAAC;YAE5D,IAAI,eAAe,YAAY,qBAAS,EAAE,CAAC;gBACvC,MAAM,eAAe,CAAC;YAC1B,CAAC;YAED,MAAM,IAAI,CAAC,MAAM,EAAE,EAAE,CAAC;YACtB,MAAM,IAAI,CAAC,OAAO,EAAE,EAAE,CAAC;QAC3B,CAAC;QAAC,OAAO,KAAc,EAAE,CAAC;YACtB,MAAM,SAAS,GAAG,4BAAgB,CAAC,cAAc,CAAC,KAAK,EAAE,0BAA0B,CAAC,CAAC;YAErF,MAAM,IAAI,CAAC,MAAM,EAAE,CAAC,SAAS,CAAC,CAAC;YAC/B,IAAI,IAAI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CAAC,IAAI,CAAC;SAClC,CAAC,CAAC;QAEH,IAAI,eAAe,KAAK,oBAAW,CAAC,KAAK,EAAE,CAAC;YACxC,OAAO,IAAI,CAAC,sBAAsB,EAAE,CAAC;QACzC,CAAC;QAED,OAAO,eAAe,CAAC;IAC3B,CAAC;CAoBJ;AA5ID,kCA4IC"}
@@ -1,22 +1,41 @@
1
- import { type Exception } from "@odg/exception";
2
- import { type RetryAction } from "../../Enums";
3
- import { type AttemptableInterface } from "../../Interfaces/AttemptableFlow";
1
+ import type { Exception } from "@odg/exception";
2
+ import type { RetryAction } from "../../Enums";
3
+ import type { AttemptableInterface } from "../../Interfaces/AttemptableFlow";
4
4
  /**
5
- * Defines the possible outcomes for a handler's execution, guiding the retry mechanism.
5
+ * Represents the possible return types from a handler function's execution.
6
6
  *
7
- * ```
8
- * - `RetryAction.Retry`: When returned by a handler function, it forces a re-run of the entire
9
- * handler execution from the beginning. This action *does not* trigger the handler's `retrying`
10
- * method. resetting the attempt count and starting all over again
7
+ * This type union defines the allowed outcomes that can be returned by a handler,
8
+ * which guide the retry mechanism and control flow of the handler execution cycle.
11
9
  *
12
- * - `RetryAction.Resolve`: When returned by a handler function, it signals that the handler has
13
- * successfully completed its task, and no further retries or error handling are needed for this
14
- * specific execution.
10
+ * Handler functions can return the following values:
15
11
  *
16
- * - `Exception Instance`: When returned by a handler function, it indicates that an error has occurred,
17
- * causing the immediate interruption of the execution with the provided exception. This bypasses
18
- * any further retries for the current handler execution cycle.
19
- * ```
12
+ * - **`Exception`**: When an `Exception` instance is returned (not thrown), it indicates
13
+ * that an error occurred and the process must be interrupted. No further retries will be
14
+ * performed, and the handler will terminate with the returned error. This has the same
15
+ * utility as `RetryAction.Throw`, but `RetryAction.Throw` cannot be used in this context
16
+ * because no error has occurred yet - the return itself indicates the error condition.
17
+ *
18
+ * - **`RetryAction.Retry`**: Forces a retry by restarting the entire handler execution from
19
+ * the beginning. When this action is returned, the attempt counter is reset, so if you
20
+ * configured 3 attempts and return `RetryAction.Retry`, it will start counting the 3 attempts
21
+ * from zero again. Additionally, this action does *not* call the `retrying` method, which is
22
+ * normally called on all retry attempts. **Warning**: This is discouraged as improper use can
23
+ * lead to infinite loops.
24
+ *
25
+ * - **`RetryAction.Resolve`**: Indicates that the handler completed successfully. The expected
26
+ * condition was met, and the code can proceed to the next step of the robot workflow.
27
+ *
28
+ * The following `RetryAction` values are explicitly **not supported** and are excluded
29
+ * from this type:
30
+ *
31
+ * - **`RetryAction.Throw`**: Not supported in Handler Solutions. Use returning an `Exception`
32
+ * instance instead when you need to signal an error condition.
33
+ *
34
+ * - **`RetryAction.Default`**: Not supported in Handler Solutions. To simulate retry behavior
35
+ * when an error condition is detected, throw an exception instead (e.g., `throw new Exception("Page did not load")`).
36
+ * This will attempt the number of times configured in the `attempt` method. If all attempts
37
+ * fail and the same condition occurs again, it will terminate with that error or any other
38
+ * error that may have occurred.
20
39
  */
21
40
  export type HandlerSolutionType = Exception | Exclude<RetryAction, RetryAction.Default | RetryAction.Throw>;
22
41
  /**
@@ -1,3 +1,3 @@
1
- import { type AttemptableInterface } from "../../Interfaces";
1
+ import type { AttemptableInterface } from "../../Interfaces";
2
2
  export interface PageInterface extends AttemptableInterface {
3
3
  }
@@ -1,2 +1,2 @@
1
1
  export type * from "./PageInterface";
2
- export * from "./HandlerInterface";
2
+ export type * from "./HandlerInterface";
@@ -1,18 +1,3 @@
1
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 __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
2
  Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./HandlerInterface"), exports);
18
3
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/crawler/Interfaces/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAEA,qDAAmC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/crawler/Interfaces/index.ts"],"names":[],"mappings":""}
@@ -1,8 +1,8 @@
1
1
  import { ContextChemicalXInterface, ContextEngineInterface, type GetterAccessInterface, type PageChemicalXInterface, type PageEngineInterface } from "..";
2
- export declare class Page<ContextEngineType extends ContextEngineInterface, PageEngineType extends PageEngineInterface> implements GetterAccessInterface, PageChemicalXInterface<PageEngineType> {
3
- readonly $context: ContextChemicalXInterface<ContextEngineType>;
4
- readonly $pageInstance: PageEngineType;
5
- constructor($context: ContextChemicalXInterface<ContextEngineType>, $pageInstance: PageEngineType);
6
- context(): ContextChemicalXInterface<ContextEngineType>;
2
+ export declare class Page<ContextClassEngine extends ContextEngineInterface, PageClassEngine extends PageEngineInterface> implements GetterAccessInterface, PageChemicalXInterface<PageClassEngine> {
3
+ readonly $context: ContextChemicalXInterface<ContextClassEngine>;
4
+ readonly $pageInstance: PageClassEngine;
5
+ constructor($context: ContextChemicalXInterface<ContextClassEngine>, $pageInstance: PageClassEngine);
6
+ context(): ContextChemicalXInterface<ContextClassEngine> & ContextClassEngine;
7
7
  __get(key: PropertyKey): unknown;
8
8
  }
@@ -33,7 +33,7 @@ let Page = class Page {
33
33
  };
34
34
  exports.Page = Page;
35
35
  exports.Page = Page = __decorate([
36
- (0, __1.getAccessDecorator)(),
36
+ __1.ODGDecorators.getterAccess(),
37
37
  __metadata("design:paramtypes", [Object, Object])
38
38
  ], Page);
39
39
  //# sourceMappingURL=Page.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Page.js","sourceRoot":"","sources":["../../src/crawler/Page.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,0BAMY;AAGL,IAAM,IAAI,GAAV,MAAM,IAAI;IAMO;IACA;IAFpB,YACoB,QAAsD,EACtD,aAA6B;QAD7B,aAAQ,GAAR,QAAQ,CAA8C;QACtD,kBAAa,GAAb,aAAa,CAAgB;IAGjD,CAAC;IAEM,OAAO;QACV,OAAO,IAAI,CAAC,QAAQ,CAAC;IACzB,CAAC;IAEM,KAAK,CAAC,GAAgB;QACzB,IAAI,GAAG,IAAI,IAAI,EAAE,CAAC;YACd,OAAO,OAAO,CAAC,GAAG,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;QAClC,CAAC;QAED,MAAM,aAAa,GAAI,IAAI,CAAC,aAA8C,CAAC,GAAG,CAAC,CAAC;QAEhF,OAAO,OAAO,aAAa,KAAK,UAAU;YACtC,CAAC,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC;YACxC,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,aAAa,EAAE,GAAG,CAAC,CAAC;IAC/C,CAAC;CAEJ,CAAA;AA5BY,oBAAI;eAAJ,IAAI;IADhB,IAAA,sBAAkB,GAAE;;GACR,IAAI,CA4BhB"}
1
+ {"version":3,"file":"Page.js","sourceRoot":"","sources":["../../src/crawler/Page.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,0BAOY;AAGL,IAAM,IAAI,GAAV,MAAM,IAAI;IAMO;IACA;IAFpB,YACoB,QAAuD,EACvD,aAA8B;QAD9B,aAAQ,GAAR,QAAQ,CAA+C;QACvD,kBAAa,GAAb,aAAa,CAAiB;IAGlD,CAAC;IAEM,OAAO;QACV,OAAO,IAAI,CAAC,QAA8E,CAAC;IAC/F,CAAC;IAEM,KAAK,CAAC,GAAgB;QACzB,IAAI,GAAG,IAAI,IAAI,EAAE,CAAC;YACd,OAAO,OAAO,CAAC,GAAG,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;QAClC,CAAC;QAED,MAAM,aAAa,GAAI,IAAI,CAAC,aAA8C,CAAC,GAAG,CAAC,CAAC;QAEhF,OAAO,OAAO,aAAa,KAAK,UAAU;YACtC,CAAC,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC;YACxC,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,aAAa,EAAE,GAAG,CAAC,CAAC;IAC/C,CAAC;CAEJ,CAAA;AA5BY,oBAAI;eAAJ,IAAI;IADhB,iBAAa,CAAC,YAAY,EAAE;;GAChB,IAAI,CA4BhB"}
@@ -1,10 +1,8 @@
1
- import { type Exception } from "@odg/exception";
2
- import { type PageInterface, type RetryAction } from "../..";
3
- import { type PageEngineInterface } from "../index";
4
- import { type SelectorType } from "../Selectors/SelectorsType";
5
- export declare abstract class BasePage<SelectorBaseType, PageClassEngine extends PageEngineInterface> implements PageInterface {
6
- readonly page: PageClassEngine;
7
- readonly $$s: SelectorBaseType;
1
+ import type { Exception } from "@odg/exception";
2
+ import type { PageInterface, RetryAction } from "../..";
3
+ import type { PageEngineInterface } from "../index";
4
+ import type { SelectorType } from "../Selectors/SelectorsType";
5
+ export declare abstract class BasePage<PageClassEngine extends PageEngineInterface> implements PageInterface {
8
6
  /**
9
7
  * Current attempt number
10
8
  *
@@ -12,26 +10,21 @@ export declare abstract class BasePage<SelectorBaseType, PageClassEngine extends
12
10
  * @memberof BasePage
13
11
  */
14
12
  currentAttempt: number;
15
- constructor(page: PageClassEngine, $$s: SelectorBaseType);
13
+ page?: PageClassEngine;
16
14
  /**
17
- * Pre Start Page
15
+ * Selector of this page
18
16
  *
19
- * @deprecated removed (Empty function)
17
+ * @type {SelectorType}
20
18
  * @memberof BasePage
21
19
  */
22
- preStart(): Promise<void>;
20
+ abstract readonly $s?: SelectorType;
21
+ abstract readonly $$s?: Record<number | string | symbol, SelectorType>;
22
+ setPage(page: PageClassEngine): this;
23
23
  success?(): Promise<void>;
24
- finish?(exception?: Exception | undefined): Promise<void>;
24
+ finish?(exception?: Exception): Promise<void>;
25
25
  failure?(exception: Exception): Promise<void>;
26
26
  retrying?(exception: Exception, attempt: number): Promise<RetryAction>;
27
27
  sleep?(): Promise<number>;
28
- /**
29
- * Selector of this page
30
- *
31
- * @type {SelectorType}
32
- * @memberof BasePage
33
- */
34
- abstract readonly $s: SelectorType;
35
28
  abstract execute(): Promise<void>;
36
29
  abstract attempt(): Promise<number>;
37
30
  }
@@ -2,8 +2,6 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.BasePage = void 0;
4
4
  class BasePage {
5
- page;
6
- $$s;
7
5
  /**
8
6
  * Current attempt number
9
7
  *
@@ -11,18 +9,10 @@ class BasePage {
11
9
  * @memberof BasePage
12
10
  */
13
11
  currentAttempt = 0;
14
- constructor(page, $$s) {
12
+ page;
13
+ setPage(page) {
15
14
  this.page = page;
16
- this.$$s = $$s;
17
- }
18
- /**
19
- * Pre Start Page
20
- *
21
- * @deprecated removed (Empty function)
22
- * @memberof BasePage
23
- */
24
- async preStart() {
25
- // Deprecated AttemptableFlow implement currentAttempt Count
15
+ return this;
26
16
  }
27
17
  }
28
18
  exports.BasePage = BasePage;
@@ -1 +1 @@
1
- {"version":3,"file":"BasePage.js","sourceRoot":"","sources":["../../../src/crawler/Pages/BasePage.ts"],"names":[],"mappings":";;;AAMA,MAAsB,QAAQ;IAWN;IACA;IAVpB;;;;;OAKG;IACI,cAAc,GAAW,CAAC,CAAC;IAElC,YACoB,IAAqB,EACrB,GAAqB;QADrB,SAAI,GAAJ,IAAI,CAAiB;QACrB,QAAG,GAAH,GAAG,CAAkB;IAEzC,CAAC;IAED;;;;;OAKG;IACI,KAAK,CAAC,QAAQ;QACjB,4DAA4D;IAChE,CAAC;CAyBJ;AAjDD,4BAiDC"}
1
+ {"version":3,"file":"BasePage.js","sourceRoot":"","sources":["../../../src/crawler/Pages/BasePage.ts"],"names":[],"mappings":";;;AAMA,MAAsB,QAAQ;IAI1B;;;;;OAKG;IACI,cAAc,GAAW,CAAC,CAAC;IAE3B,IAAI,CAAmB;IAYvB,OAAO,CAAC,IAAqB;QAChC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QAEjB,OAAO,IAAI,CAAC;IAChB,CAAC;CAgBJ;AA5CD,4BA4CC"}
@@ -1,4 +1,4 @@
1
- import { type PageEngineInterface } from "../../index";
1
+ import type { PageEngineInterface } from "../../index";
2
2
  import { BasePage } from "../BasePage";
3
- export declare abstract class BaseComponentPage<SelectorBaseType, PageClassEngine extends PageEngineInterface> extends BasePage<SelectorBaseType, PageClassEngine> {
3
+ export declare abstract class BaseComponentPage<PageClassEngine extends PageEngineInterface> extends BasePage<PageClassEngine> {
4
4
  }
@@ -1 +1 @@
1
- {"version":3,"file":"BaseComponentPage.js","sourceRoot":"","sources":["../../../../src/crawler/Pages/Components/BaseComponentPage.ts"],"names":[],"mappings":";;;AACA,0CAAuC;AAEvC,MAAsB,iBAGpB,SAAQ,mBAA2C;CAEpD;AALD,8CAKC"}
1
+ {"version":3,"file":"BaseComponentPage.js","sourceRoot":"","sources":["../../../../src/crawler/Pages/Components/BaseComponentPage.ts"],"names":[],"mappings":";;;AACA,0CAAuC;AAEvC,MAAsB,iBAEpB,SAAQ,mBAAyB;CAElC;AAJD,8CAIC"}
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  export * from "./Support";
2
2
  export * from "./Helpers/index";
3
3
  export * from "./crawler/index";
4
- export * from "./Interfaces";
4
+ export type * from "./Interfaces";
5
5
  export * from "./Exceptions";
6
6
  export * from "./Enums";
package/dist/index.js CHANGED
@@ -17,7 +17,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./Support"), exports);
18
18
  __exportStar(require("./Helpers/index"), exports);
19
19
  __exportStar(require("./crawler/index"), exports);
20
- __exportStar(require("./Interfaces"), exports);
21
20
  __exportStar(require("./Exceptions"), exports);
22
21
  __exportStar(require("./Enums"), exports);
23
22
  //# 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,4CAA0B;AAE1B,kDAAgC;AAEhC,kDAAgC;AAEhC,+CAA6B;AAE7B,+CAA6B;AAE7B,0CAAwB"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4CAA0B;AAE1B,kDAAgC;AAEhC,kDAAgC;AAIhC,+CAA6B;AAE7B,0CAAwB"}