@adaas/a-utils 0.2.8 → 0.3.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.
- package/.conf/tsconfig.base.json +91 -0
- package/.conf/tsconfig.browser.json +26 -0
- package/.conf/tsconfig.node.json +30 -0
- package/dist/browser/A-Logger.component-Be-LMV3I.d.mts +467 -0
- package/dist/browser/A-StateMachineTransition.context-BINjcsgq.d.mts +221 -0
- package/dist/browser/a-channel.d.mts +456 -0
- package/dist/browser/a-channel.mjs +367 -0
- package/dist/browser/a-channel.mjs.map +1 -0
- package/dist/browser/a-command.d.mts +555 -0
- package/dist/browser/a-command.mjs +567 -0
- package/dist/browser/a-command.mjs.map +1 -0
- package/dist/browser/a-config.d.mts +60 -0
- package/dist/browser/a-config.mjs +6 -0
- package/dist/browser/a-config.mjs.map +1 -0
- package/dist/browser/a-execution.d.mts +17 -0
- package/dist/browser/a-execution.mjs +4 -0
- package/dist/browser/a-execution.mjs.map +1 -0
- package/dist/browser/a-logger.d.mts +107 -0
- package/dist/browser/a-logger.mjs +7 -0
- package/dist/browser/a-logger.mjs.map +1 -0
- package/dist/browser/a-manifest.d.mts +111 -0
- package/dist/browser/a-manifest.mjs +176 -0
- package/dist/browser/a-manifest.mjs.map +1 -0
- package/dist/browser/a-memory.d.mts +163 -0
- package/dist/browser/a-memory.mjs +375 -0
- package/dist/browser/a-memory.mjs.map +1 -0
- package/dist/browser/a-operation.d.mts +52 -0
- package/dist/browser/a-operation.mjs +5 -0
- package/dist/browser/a-operation.mjs.map +1 -0
- package/dist/browser/a-polyfill.d.mts +275 -0
- package/dist/browser/a-polyfill.mjs +4 -0
- package/dist/browser/a-polyfill.mjs.map +1 -0
- package/dist/browser/a-route.d.mts +25 -0
- package/dist/browser/a-route.mjs +98 -0
- package/dist/browser/a-route.mjs.map +1 -0
- package/dist/browser/a-schedule.d.mts +111 -0
- package/dist/browser/a-schedule.mjs +97 -0
- package/dist/browser/a-schedule.mjs.map +1 -0
- package/dist/browser/a-service.d.mts +40 -0
- package/dist/browser/a-service.mjs +197 -0
- package/dist/browser/a-service.mjs.map +1 -0
- package/dist/browser/a-signal.d.mts +402 -0
- package/dist/browser/a-signal.mjs +588 -0
- package/dist/browser/a-signal.mjs.map +1 -0
- package/dist/browser/a-state-machine.d.mts +11 -0
- package/dist/browser/a-state-machine.mjs +6 -0
- package/dist/browser/a-state-machine.mjs.map +1 -0
- package/dist/browser/chunk-72ANHWNG.mjs +48 -0
- package/dist/browser/chunk-72ANHWNG.mjs.map +1 -0
- package/dist/browser/chunk-ECSGFDRQ.mjs +264 -0
- package/dist/browser/chunk-ECSGFDRQ.mjs.map +1 -0
- package/dist/browser/chunk-EQQGB2QZ.mjs +15 -0
- package/dist/browser/chunk-EQQGB2QZ.mjs.map +1 -0
- package/dist/browser/chunk-J6CLHXFQ.mjs +679 -0
- package/dist/browser/chunk-J6CLHXFQ.mjs.map +1 -0
- package/dist/browser/chunk-NLPSQYIQ.mjs +149 -0
- package/dist/browser/chunk-NLPSQYIQ.mjs.map +1 -0
- package/dist/browser/chunk-TK5UEYMZ.mjs +776 -0
- package/dist/browser/chunk-TK5UEYMZ.mjs.map +1 -0
- package/dist/browser/chunk-TQ5UON22.mjs +56 -0
- package/dist/browser/chunk-TQ5UON22.mjs.map +1 -0
- package/dist/node/A-Command.entity-24rvXQLC.d.mts +409 -0
- package/dist/node/A-Command.entity-ISgSk8wB.d.ts +409 -0
- package/dist/node/A-Manifest.context-D2uynD9t.d.mts +66 -0
- package/dist/node/A-Manifest.context-rZnvR17w.d.ts +66 -0
- package/dist/node/A-Signal.types-P5VKMKMs.d.mts +114 -0
- package/dist/node/A-Signal.types-P5VKMKMs.d.ts +114 -0
- package/dist/node/chunk-EQQGB2QZ.mjs +15 -0
- package/dist/node/chunk-EQQGB2QZ.mjs.map +1 -0
- package/dist/node/constants/errors.constants.d.mts +2 -0
- package/dist/node/constants/errors.constants.d.ts +2 -0
- package/dist/node/constants/errors.constants.js +4 -0
- package/dist/node/constants/errors.constants.js.map +1 -0
- package/dist/node/constants/errors.constants.mjs +3 -0
- package/dist/node/constants/errors.constants.mjs.map +1 -0
- package/dist/node/lib/A-Channel/A-Channel.component.d.mts +365 -0
- package/dist/node/lib/A-Channel/A-Channel.component.d.ts +365 -0
- package/dist/node/lib/A-Channel/A-Channel.component.js +303 -0
- package/dist/node/lib/A-Channel/A-Channel.component.js.map +1 -0
- package/dist/node/lib/A-Channel/A-Channel.component.mjs +294 -0
- package/dist/node/lib/A-Channel/A-Channel.component.mjs.map +1 -0
- package/dist/node/lib/A-Channel/A-Channel.constants.d.mts +68 -0
- package/dist/node/lib/A-Channel/A-Channel.constants.d.ts +68 -0
- package/dist/node/lib/A-Channel/A-Channel.constants.js +28 -0
- package/dist/node/lib/A-Channel/A-Channel.constants.js.map +1 -0
- package/dist/node/lib/A-Channel/A-Channel.constants.mjs +27 -0
- package/dist/node/lib/A-Channel/A-Channel.constants.mjs.map +1 -0
- package/dist/node/lib/A-Channel/A-Channel.error.d.mts +23 -0
- package/dist/node/lib/A-Channel/A-Channel.error.d.ts +23 -0
- package/dist/node/lib/A-Channel/A-Channel.error.js +36 -0
- package/dist/node/lib/A-Channel/A-Channel.error.js.map +1 -0
- package/dist/node/lib/A-Channel/A-Channel.error.mjs +35 -0
- package/dist/node/lib/A-Channel/A-Channel.error.mjs.map +1 -0
- package/dist/node/lib/A-Channel/A-Channel.types.d.mts +2 -0
- package/dist/node/lib/A-Channel/A-Channel.types.d.ts +2 -0
- package/dist/node/lib/A-Channel/A-Channel.types.js +4 -0
- package/dist/node/lib/A-Channel/A-Channel.types.js.map +1 -0
- package/dist/node/lib/A-Channel/A-Channel.types.mjs +3 -0
- package/dist/node/lib/A-Channel/A-Channel.types.mjs.map +1 -0
- package/dist/node/lib/A-Channel/A-ChannelRequest.context.d.mts +17 -0
- package/dist/node/lib/A-Channel/A-ChannelRequest.context.d.ts +17 -0
- package/dist/node/lib/A-Channel/A-ChannelRequest.context.js +41 -0
- package/dist/node/lib/A-Channel/A-ChannelRequest.context.js.map +1 -0
- package/dist/node/lib/A-Channel/A-ChannelRequest.context.mjs +34 -0
- package/dist/node/lib/A-Channel/A-ChannelRequest.context.mjs.map +1 -0
- package/dist/node/lib/A-Channel/index.d.mts +8 -0
- package/dist/node/lib/A-Channel/index.d.ts +8 -0
- package/dist/node/lib/A-Channel/index.js +36 -0
- package/dist/node/lib/A-Channel/index.js.map +1 -0
- package/dist/node/lib/A-Channel/index.mjs +8 -0
- package/dist/node/lib/A-Channel/index.mjs.map +1 -0
- package/dist/node/lib/A-Command/A-Command.constants.d.mts +139 -0
- package/dist/node/lib/A-Command/A-Command.constants.d.ts +139 -0
- package/dist/node/lib/A-Command/A-Command.constants.js +45 -0
- package/dist/node/lib/A-Command/A-Command.constants.js.map +1 -0
- package/dist/node/lib/A-Command/A-Command.constants.mjs +42 -0
- package/dist/node/lib/A-Command/A-Command.constants.mjs.map +1 -0
- package/dist/node/lib/A-Command/A-Command.entity.d.mts +16 -0
- package/dist/node/lib/A-Command/A-Command.entity.d.ts +16 -0
- package/dist/node/lib/A-Command/A-Command.entity.js +530 -0
- package/dist/node/lib/A-Command/A-Command.entity.js.map +1 -0
- package/dist/node/lib/A-Command/A-Command.entity.mjs +520 -0
- package/dist/node/lib/A-Command/A-Command.entity.mjs.map +1 -0
- package/dist/node/lib/A-Command/A-Command.error.d.mts +13 -0
- package/dist/node/lib/A-Command/A-Command.error.d.ts +13 -0
- package/dist/node/lib/A-Command/A-Command.error.js +17 -0
- package/dist/node/lib/A-Command/A-Command.error.js.map +1 -0
- package/dist/node/lib/A-Command/A-Command.error.mjs +16 -0
- package/dist/node/lib/A-Command/A-Command.error.mjs.map +1 -0
- package/dist/node/lib/A-Command/A-Command.types.d.mts +16 -0
- package/dist/node/lib/A-Command/A-Command.types.d.ts +16 -0
- package/dist/node/lib/A-Command/A-Command.types.js +4 -0
- package/dist/node/lib/A-Command/A-Command.types.js.map +1 -0
- package/dist/node/lib/A-Command/A-Command.types.mjs +3 -0
- package/dist/node/lib/A-Command/A-Command.types.mjs.map +1 -0
- package/dist/node/lib/A-Command/index.d.mts +17 -0
- package/dist/node/lib/A-Command/index.d.ts +17 -0
- package/dist/node/lib/A-Command/index.js +31 -0
- package/dist/node/lib/A-Command/index.js.map +1 -0
- package/dist/node/lib/A-Command/index.mjs +7 -0
- package/dist/node/lib/A-Command/index.mjs.map +1 -0
- package/dist/node/lib/A-Config/A-Config.constants.d.mts +5 -0
- package/dist/node/lib/A-Config/A-Config.constants.d.ts +5 -0
- package/dist/node/lib/A-Config/A-Config.constants.js +9 -0
- package/dist/node/lib/A-Config/A-Config.constants.js.map +1 -0
- package/dist/node/lib/A-Config/A-Config.constants.mjs +8 -0
- package/dist/node/lib/A-Config/A-Config.constants.mjs.map +1 -0
- package/dist/node/lib/A-Config/A-Config.container.d.mts +33 -0
- package/dist/node/lib/A-Config/A-Config.container.d.ts +33 -0
- package/dist/node/lib/A-Config/A-Config.container.js +78 -0
- package/dist/node/lib/A-Config/A-Config.container.js.map +1 -0
- package/dist/node/lib/A-Config/A-Config.container.mjs +68 -0
- package/dist/node/lib/A-Config/A-Config.container.mjs.map +1 -0
- package/dist/node/lib/A-Config/A-Config.context.d.mts +42 -0
- package/dist/node/lib/A-Config/A-Config.context.d.ts +42 -0
- package/dist/node/lib/A-Config/A-Config.context.js +65 -0
- package/dist/node/lib/A-Config/A-Config.context.js.map +1 -0
- package/dist/node/lib/A-Config/A-Config.context.mjs +58 -0
- package/dist/node/lib/A-Config/A-Config.context.mjs.map +1 -0
- package/dist/node/lib/A-Config/A-Config.error.d.mts +7 -0
- package/dist/node/lib/A-Config/A-Config.error.d.ts +7 -0
- package/dist/node/lib/A-Config/A-Config.error.js +11 -0
- package/dist/node/lib/A-Config/A-Config.error.js.map +1 -0
- package/dist/node/lib/A-Config/A-Config.error.mjs +10 -0
- package/dist/node/lib/A-Config/A-Config.error.mjs.map +1 -0
- package/dist/node/lib/A-Config/A-Config.types.d.mts +22 -0
- package/dist/node/lib/A-Config/A-Config.types.d.ts +22 -0
- package/dist/node/lib/A-Config/A-Config.types.js +9 -0
- package/dist/node/lib/A-Config/A-Config.types.js.map +1 -0
- package/dist/node/lib/A-Config/A-Config.types.mjs +9 -0
- package/dist/node/lib/A-Config/A-Config.types.mjs.map +1 -0
- package/dist/node/lib/A-Config/components/ConfigReader.component.d.mts +50 -0
- package/dist/node/lib/A-Config/components/ConfigReader.component.d.ts +50 -0
- package/dist/node/lib/A-Config/components/ConfigReader.component.js +81 -0
- package/dist/node/lib/A-Config/components/ConfigReader.component.js.map +1 -0
- package/dist/node/lib/A-Config/components/ConfigReader.component.mjs +71 -0
- package/dist/node/lib/A-Config/components/ConfigReader.component.mjs.map +1 -0
- package/dist/node/lib/A-Config/components/ENVConfigReader.component.d.mts +40 -0
- package/dist/node/lib/A-Config/components/ENVConfigReader.component.d.ts +40 -0
- package/dist/node/lib/A-Config/components/ENVConfigReader.component.js +69 -0
- package/dist/node/lib/A-Config/components/ENVConfigReader.component.js.map +1 -0
- package/dist/node/lib/A-Config/components/ENVConfigReader.component.mjs +59 -0
- package/dist/node/lib/A-Config/components/ENVConfigReader.component.mjs.map +1 -0
- package/dist/node/lib/A-Config/components/FileConfigReader.component.d.mts +40 -0
- package/dist/node/lib/A-Config/components/FileConfigReader.component.d.ts +40 -0
- package/dist/node/lib/A-Config/components/FileConfigReader.component.js +50 -0
- package/dist/node/lib/A-Config/components/FileConfigReader.component.js.map +1 -0
- package/dist/node/lib/A-Config/components/FileConfigReader.component.mjs +43 -0
- package/dist/node/lib/A-Config/components/FileConfigReader.component.mjs.map +1 -0
- package/dist/node/lib/A-Config/index.d.mts +31 -0
- package/dist/node/lib/A-Config/index.d.ts +31 -0
- package/dist/node/lib/A-Config/index.js +51 -0
- package/dist/node/lib/A-Config/index.js.map +1 -0
- package/dist/node/lib/A-Config/index.mjs +11 -0
- package/dist/node/lib/A-Config/index.mjs.map +1 -0
- package/dist/node/lib/A-Execution/A-Execution.context.d.mts +17 -0
- package/dist/node/lib/A-Execution/A-Execution.context.d.ts +17 -0
- package/dist/node/lib/A-Execution/A-Execution.context.js +63 -0
- package/dist/node/lib/A-Execution/A-Execution.context.js.map +1 -0
- package/dist/node/lib/A-Execution/A-Execution.context.mjs +56 -0
- package/dist/node/lib/A-Execution/A-Execution.context.mjs.map +1 -0
- package/dist/node/lib/A-Execution/A-Execution.types.d.mts +2 -0
- package/dist/node/lib/A-Execution/A-Execution.types.d.ts +2 -0
- package/dist/node/lib/A-Execution/A-Execution.types.js +4 -0
- package/dist/node/lib/A-Execution/A-Execution.types.js.map +1 -0
- package/dist/node/lib/A-Execution/A-Execution.types.mjs +3 -0
- package/dist/node/lib/A-Execution/A-Execution.types.mjs.map +1 -0
- package/dist/node/lib/A-Execution/index.d.mts +2 -0
- package/dist/node/lib/A-Execution/index.d.ts +2 -0
- package/dist/node/lib/A-Execution/index.js +12 -0
- package/dist/node/lib/A-Execution/index.js.map +1 -0
- package/dist/node/lib/A-Execution/index.mjs +4 -0
- package/dist/node/lib/A-Execution/index.mjs.map +1 -0
- package/dist/node/lib/A-Logger/A-Logger.component.d.mts +377 -0
- package/dist/node/lib/A-Logger/A-Logger.component.d.ts +377 -0
- package/dist/node/lib/A-Logger/A-Logger.component.js +623 -0
- package/dist/node/lib/A-Logger/A-Logger.component.js.map +1 -0
- package/dist/node/lib/A-Logger/A-Logger.component.mjs +615 -0
- package/dist/node/lib/A-Logger/A-Logger.component.mjs.map +1 -0
- package/dist/node/lib/A-Logger/A-Logger.constants.d.mts +103 -0
- package/dist/node/lib/A-Logger/A-Logger.constants.d.ts +103 -0
- package/dist/node/lib/A-Logger/A-Logger.constants.js +141 -0
- package/dist/node/lib/A-Logger/A-Logger.constants.js.map +1 -0
- package/dist/node/lib/A-Logger/A-Logger.constants.mjs +133 -0
- package/dist/node/lib/A-Logger/A-Logger.constants.mjs.map +1 -0
- package/dist/node/lib/A-Logger/A-Logger.env.d.mts +30 -0
- package/dist/node/lib/A-Logger/A-Logger.env.d.ts +30 -0
- package/dist/node/lib/A-Logger/A-Logger.env.js +39 -0
- package/dist/node/lib/A-Logger/A-Logger.env.js.map +1 -0
- package/dist/node/lib/A-Logger/A-Logger.env.mjs +38 -0
- package/dist/node/lib/A-Logger/A-Logger.env.mjs.map +1 -0
- package/dist/node/lib/A-Logger/A-Logger.types.d.mts +8 -0
- package/dist/node/lib/A-Logger/A-Logger.types.d.ts +8 -0
- package/dist/node/lib/A-Logger/A-Logger.types.js +4 -0
- package/dist/node/lib/A-Logger/A-Logger.types.js.map +1 -0
- package/dist/node/lib/A-Logger/A-Logger.types.mjs +3 -0
- package/dist/node/lib/A-Logger/A-Logger.types.mjs.map +1 -0
- package/dist/node/lib/A-Logger/index.d.mts +9 -0
- package/dist/node/lib/A-Logger/index.d.ts +9 -0
- package/dist/node/lib/A-Logger/index.js +35 -0
- package/dist/node/lib/A-Logger/index.js.map +1 -0
- package/dist/node/lib/A-Logger/index.mjs +6 -0
- package/dist/node/lib/A-Logger/index.mjs.map +1 -0
- package/dist/node/lib/A-Manifest/A-Manifest.context.d.mts +3 -0
- package/dist/node/lib/A-Manifest/A-Manifest.context.d.ts +3 -0
- package/dist/node/lib/A-Manifest/A-Manifest.context.js +164 -0
- package/dist/node/lib/A-Manifest/A-Manifest.context.js.map +1 -0
- package/dist/node/lib/A-Manifest/A-Manifest.context.mjs +157 -0
- package/dist/node/lib/A-Manifest/A-Manifest.context.mjs.map +1 -0
- package/dist/node/lib/A-Manifest/A-Manifest.error.d.mts +7 -0
- package/dist/node/lib/A-Manifest/A-Manifest.error.d.ts +7 -0
- package/dist/node/lib/A-Manifest/A-Manifest.error.js +11 -0
- package/dist/node/lib/A-Manifest/A-Manifest.error.js.map +1 -0
- package/dist/node/lib/A-Manifest/A-Manifest.error.mjs +10 -0
- package/dist/node/lib/A-Manifest/A-Manifest.error.mjs.map +1 -0
- package/dist/node/lib/A-Manifest/A-Manifest.types.d.mts +45 -0
- package/dist/node/lib/A-Manifest/A-Manifest.types.d.ts +45 -0
- package/dist/node/lib/A-Manifest/A-Manifest.types.js +4 -0
- package/dist/node/lib/A-Manifest/A-Manifest.types.js.map +1 -0
- package/dist/node/lib/A-Manifest/A-Manifest.types.mjs +3 -0
- package/dist/node/lib/A-Manifest/A-Manifest.types.mjs.map +1 -0
- package/dist/node/lib/A-Manifest/classes/A-ManifestChecker.class.d.mts +3 -0
- package/dist/node/lib/A-Manifest/classes/A-ManifestChecker.class.d.ts +3 -0
- package/dist/node/lib/A-Manifest/classes/A-ManifestChecker.class.js +22 -0
- package/dist/node/lib/A-Manifest/classes/A-ManifestChecker.class.js.map +1 -0
- package/dist/node/lib/A-Manifest/classes/A-ManifestChecker.class.mjs +22 -0
- package/dist/node/lib/A-Manifest/classes/A-ManifestChecker.class.mjs.map +1 -0
- package/dist/node/lib/A-Manifest/index.d.mts +4 -0
- package/dist/node/lib/A-Manifest/index.d.ts +4 -0
- package/dist/node/lib/A-Manifest/index.js +29 -0
- package/dist/node/lib/A-Manifest/index.js.map +1 -0
- package/dist/node/lib/A-Manifest/index.mjs +7 -0
- package/dist/node/lib/A-Manifest/index.mjs.map +1 -0
- package/dist/node/lib/A-Memory/A-Memory.component.d.mts +86 -0
- package/dist/node/lib/A-Memory/A-Memory.component.d.ts +86 -0
- package/dist/node/lib/A-Memory/A-Memory.component.js +335 -0
- package/dist/node/lib/A-Memory/A-Memory.component.js.map +1 -0
- package/dist/node/lib/A-Memory/A-Memory.component.mjs +325 -0
- package/dist/node/lib/A-Memory/A-Memory.component.mjs.map +1 -0
- package/dist/node/lib/A-Memory/A-Memory.constants.d.mts +44 -0
- package/dist/node/lib/A-Memory/A-Memory.constants.d.ts +44 -0
- package/dist/node/lib/A-Memory/A-Memory.constants.js +19 -0
- package/dist/node/lib/A-Memory/A-Memory.constants.js.map +1 -0
- package/dist/node/lib/A-Memory/A-Memory.constants.mjs +19 -0
- package/dist/node/lib/A-Memory/A-Memory.constants.mjs.map +1 -0
- package/dist/node/lib/A-Memory/A-Memory.context.d.mts +12 -0
- package/dist/node/lib/A-Memory/A-Memory.context.d.ts +12 -0
- package/dist/node/lib/A-Memory/A-Memory.context.js +43 -0
- package/dist/node/lib/A-Memory/A-Memory.context.js.map +1 -0
- package/dist/node/lib/A-Memory/A-Memory.context.mjs +36 -0
- package/dist/node/lib/A-Memory/A-Memory.context.mjs.map +1 -0
- package/dist/node/lib/A-Memory/A-Memory.error.d.mts +14 -0
- package/dist/node/lib/A-Memory/A-Memory.error.d.ts +14 -0
- package/dist/node/lib/A-Memory/A-Memory.error.js +18 -0
- package/dist/node/lib/A-Memory/A-Memory.error.js.map +1 -0
- package/dist/node/lib/A-Memory/A-Memory.error.mjs +17 -0
- package/dist/node/lib/A-Memory/A-Memory.error.mjs.map +1 -0
- package/dist/node/lib/A-Memory/A-Memory.types.d.mts +24 -0
- package/dist/node/lib/A-Memory/A-Memory.types.d.ts +24 -0
- package/dist/node/lib/A-Memory/A-Memory.types.js +4 -0
- package/dist/node/lib/A-Memory/A-Memory.types.js.map +1 -0
- package/dist/node/lib/A-Memory/A-Memory.types.mjs +3 -0
- package/dist/node/lib/A-Memory/A-Memory.types.mjs.map +1 -0
- package/dist/node/lib/A-Memory/index.d.mts +9 -0
- package/dist/node/lib/A-Memory/index.d.ts +9 -0
- package/dist/node/lib/A-Memory/index.js +36 -0
- package/dist/node/lib/A-Memory/index.js.map +1 -0
- package/dist/node/lib/A-Memory/index.mjs +8 -0
- package/dist/node/lib/A-Memory/index.mjs.map +1 -0
- package/dist/node/lib/A-Operation/A-Operation.context.d.mts +16 -0
- package/dist/node/lib/A-Operation/A-Operation.context.d.ts +16 -0
- package/dist/node/lib/A-Operation/A-Operation.context.js +55 -0
- package/dist/node/lib/A-Operation/A-Operation.context.js.map +1 -0
- package/dist/node/lib/A-Operation/A-Operation.context.mjs +48 -0
- package/dist/node/lib/A-Operation/A-Operation.context.mjs.map +1 -0
- package/dist/node/lib/A-Operation/A-Operation.types.d.mts +40 -0
- package/dist/node/lib/A-Operation/A-Operation.types.d.ts +40 -0
- package/dist/node/lib/A-Operation/A-Operation.types.js +4 -0
- package/dist/node/lib/A-Operation/A-Operation.types.js.map +1 -0
- package/dist/node/lib/A-Operation/A-Operation.types.mjs +3 -0
- package/dist/node/lib/A-Operation/A-Operation.types.mjs.map +1 -0
- package/dist/node/lib/A-Operation/index.d.mts +4 -0
- package/dist/node/lib/A-Operation/index.d.ts +4 -0
- package/dist/node/lib/A-Operation/index.js +19 -0
- package/dist/node/lib/A-Operation/index.js.map +1 -0
- package/dist/node/lib/A-Operation/index.mjs +5 -0
- package/dist/node/lib/A-Operation/index.mjs.map +1 -0
- package/dist/node/lib/A-Polyfill/A-Polyfill.component.env-browser.d.mts +108 -0
- package/dist/node/lib/A-Polyfill/A-Polyfill.component.env-browser.d.ts +108 -0
- package/dist/node/lib/A-Polyfill/A-Polyfill.component.env-browser.js +163 -0
- package/dist/node/lib/A-Polyfill/A-Polyfill.component.env-browser.js.map +1 -0
- package/dist/node/lib/A-Polyfill/A-Polyfill.component.env-browser.mjs +153 -0
- package/dist/node/lib/A-Polyfill/A-Polyfill.component.env-browser.mjs.map +1 -0
- package/dist/node/lib/A-Polyfill/A-Polyfill.component.env-node.d.mts +108 -0
- package/dist/node/lib/A-Polyfill/A-Polyfill.component.env-node.d.ts +108 -0
- package/dist/node/lib/A-Polyfill/A-Polyfill.component.env-node.js +160 -0
- package/dist/node/lib/A-Polyfill/A-Polyfill.component.env-node.js.map +1 -0
- package/dist/node/lib/A-Polyfill/A-Polyfill.component.env-node.mjs +150 -0
- package/dist/node/lib/A-Polyfill/A-Polyfill.component.env-node.mjs.map +1 -0
- package/dist/node/lib/A-Polyfill/A-Polyfill.types.d.mts +59 -0
- package/dist/node/lib/A-Polyfill/A-Polyfill.types.d.ts +59 -0
- package/dist/node/lib/A-Polyfill/A-Polyfill.types.js +4 -0
- package/dist/node/lib/A-Polyfill/A-Polyfill.types.js.map +1 -0
- package/dist/node/lib/A-Polyfill/A-Polyfill.types.mjs +3 -0
- package/dist/node/lib/A-Polyfill/A-Polyfill.types.mjs.map +1 -0
- package/dist/node/lib/A-Polyfill/base/A-Buffer-Polyfill.base.d.mts +22 -0
- package/dist/node/lib/A-Polyfill/base/A-Buffer-Polyfill.base.d.ts +22 -0
- package/dist/node/lib/A-Polyfill/base/A-Buffer-Polyfill.base.js +30 -0
- package/dist/node/lib/A-Polyfill/base/A-Buffer-Polyfill.base.js.map +1 -0
- package/dist/node/lib/A-Polyfill/base/A-Buffer-Polyfill.base.mjs +30 -0
- package/dist/node/lib/A-Polyfill/base/A-Buffer-Polyfill.base.mjs.map +1 -0
- package/dist/node/lib/A-Polyfill/base/A-Crypto-Polyfill.base.d.mts +23 -0
- package/dist/node/lib/A-Polyfill/base/A-Crypto-Polyfill.base.d.ts +23 -0
- package/dist/node/lib/A-Polyfill/base/A-Crypto-Polyfill.base.js +31 -0
- package/dist/node/lib/A-Polyfill/base/A-Crypto-Polyfill.base.js.map +1 -0
- package/dist/node/lib/A-Polyfill/base/A-Crypto-Polyfill.base.mjs +31 -0
- package/dist/node/lib/A-Polyfill/base/A-Crypto-Polyfill.base.mjs.map +1 -0
- package/dist/node/lib/A-Polyfill/base/A-FS-Polyfill.base.d.mts +22 -0
- package/dist/node/lib/A-Polyfill/base/A-FS-Polyfill.base.d.ts +22 -0
- package/dist/node/lib/A-Polyfill/base/A-FS-Polyfill.base.js +30 -0
- package/dist/node/lib/A-Polyfill/base/A-FS-Polyfill.base.js.map +1 -0
- package/dist/node/lib/A-Polyfill/base/A-FS-Polyfill.base.mjs +30 -0
- package/dist/node/lib/A-Polyfill/base/A-FS-Polyfill.base.mjs.map +1 -0
- package/dist/node/lib/A-Polyfill/base/A-Http-Polyfill.base.d.mts +22 -0
- package/dist/node/lib/A-Polyfill/base/A-Http-Polyfill.base.d.ts +22 -0
- package/dist/node/lib/A-Polyfill/base/A-Http-Polyfill.base.js +30 -0
- package/dist/node/lib/A-Polyfill/base/A-Http-Polyfill.base.js.map +1 -0
- package/dist/node/lib/A-Polyfill/base/A-Http-Polyfill.base.mjs +30 -0
- package/dist/node/lib/A-Polyfill/base/A-Http-Polyfill.base.mjs.map +1 -0
- package/dist/node/lib/A-Polyfill/base/A-Https-Polyfill.base.d.mts +22 -0
- package/dist/node/lib/A-Polyfill/base/A-Https-Polyfill.base.d.ts +22 -0
- package/dist/node/lib/A-Polyfill/base/A-Https-Polyfill.base.js +30 -0
- package/dist/node/lib/A-Polyfill/base/A-Https-Polyfill.base.js.map +1 -0
- package/dist/node/lib/A-Polyfill/base/A-Https-Polyfill.base.mjs +30 -0
- package/dist/node/lib/A-Polyfill/base/A-Https-Polyfill.base.mjs.map +1 -0
- package/dist/node/lib/A-Polyfill/base/A-Path-Polyfill.base.d.mts +22 -0
- package/dist/node/lib/A-Polyfill/base/A-Path-Polyfill.base.d.ts +22 -0
- package/dist/node/lib/A-Polyfill/base/A-Path-Polyfill.base.js +30 -0
- package/dist/node/lib/A-Polyfill/base/A-Path-Polyfill.base.js.map +1 -0
- package/dist/node/lib/A-Polyfill/base/A-Path-Polyfill.base.mjs +30 -0
- package/dist/node/lib/A-Polyfill/base/A-Path-Polyfill.base.mjs.map +1 -0
- package/dist/node/lib/A-Polyfill/base/A-Process-Polyfill.base.d.mts +22 -0
- package/dist/node/lib/A-Polyfill/base/A-Process-Polyfill.base.d.ts +22 -0
- package/dist/node/lib/A-Polyfill/base/A-Process-Polyfill.base.js +30 -0
- package/dist/node/lib/A-Polyfill/base/A-Process-Polyfill.base.js.map +1 -0
- package/dist/node/lib/A-Polyfill/base/A-Process-Polyfill.base.mjs +30 -0
- package/dist/node/lib/A-Polyfill/base/A-Process-Polyfill.base.mjs.map +1 -0
- package/dist/node/lib/A-Polyfill/base/A-Url-Polyfill.base.d.mts +22 -0
- package/dist/node/lib/A-Polyfill/base/A-Url-Polyfill.base.d.ts +22 -0
- package/dist/node/lib/A-Polyfill/base/A-Url-Polyfill.base.js +30 -0
- package/dist/node/lib/A-Polyfill/base/A-Url-Polyfill.base.js.map +1 -0
- package/dist/node/lib/A-Polyfill/base/A-Url-Polyfill.base.mjs +30 -0
- package/dist/node/lib/A-Polyfill/base/A-Url-Polyfill.base.mjs.map +1 -0
- package/dist/node/lib/A-Polyfill/base/index.d.mts +17 -0
- package/dist/node/lib/A-Polyfill/base/index.d.ts +17 -0
- package/dist/node/lib/A-Polyfill/base/index.js +47 -0
- package/dist/node/lib/A-Polyfill/base/index.js.map +1 -0
- package/dist/node/lib/A-Polyfill/base/index.mjs +11 -0
- package/dist/node/lib/A-Polyfill/base/index.mjs.map +1 -0
- package/dist/node/lib/A-Polyfill/browser/A-Buffer-Polyfill.d.mts +17 -0
- package/dist/node/lib/A-Polyfill/browser/A-Buffer-Polyfill.d.ts +17 -0
- package/dist/node/lib/A-Polyfill/browser/A-Buffer-Polyfill.js +46 -0
- package/dist/node/lib/A-Polyfill/browser/A-Buffer-Polyfill.js.map +1 -0
- package/dist/node/lib/A-Polyfill/browser/A-Buffer-Polyfill.mjs +45 -0
- package/dist/node/lib/A-Polyfill/browser/A-Buffer-Polyfill.mjs.map +1 -0
- package/dist/node/lib/A-Polyfill/browser/A-Crypto-Polyfill.d.mts +17 -0
- package/dist/node/lib/A-Polyfill/browser/A-Crypto-Polyfill.d.ts +17 -0
- package/dist/node/lib/A-Polyfill/browser/A-Crypto-Polyfill.js +36 -0
- package/dist/node/lib/A-Polyfill/browser/A-Crypto-Polyfill.js.map +1 -0
- package/dist/node/lib/A-Polyfill/browser/A-Crypto-Polyfill.mjs +35 -0
- package/dist/node/lib/A-Polyfill/browser/A-Crypto-Polyfill.mjs.map +1 -0
- package/dist/node/lib/A-Polyfill/browser/A-FS-Polyfill.d.mts +17 -0
- package/dist/node/lib/A-Polyfill/browser/A-FS-Polyfill.d.ts +17 -0
- package/dist/node/lib/A-Polyfill/browser/A-FS-Polyfill.js +29 -0
- package/dist/node/lib/A-Polyfill/browser/A-FS-Polyfill.js.map +1 -0
- package/dist/node/lib/A-Polyfill/browser/A-FS-Polyfill.mjs +28 -0
- package/dist/node/lib/A-Polyfill/browser/A-FS-Polyfill.mjs.map +1 -0
- package/dist/node/lib/A-Polyfill/browser/A-Http-Polyfill.d.mts +18 -0
- package/dist/node/lib/A-Polyfill/browser/A-Http-Polyfill.d.ts +18 -0
- package/dist/node/lib/A-Polyfill/browser/A-Http-Polyfill.js +58 -0
- package/dist/node/lib/A-Polyfill/browser/A-Http-Polyfill.js.map +1 -0
- package/dist/node/lib/A-Polyfill/browser/A-Http-Polyfill.mjs +57 -0
- package/dist/node/lib/A-Polyfill/browser/A-Http-Polyfill.mjs.map +1 -0
- package/dist/node/lib/A-Polyfill/browser/A-Https-Polyfill.d.mts +18 -0
- package/dist/node/lib/A-Polyfill/browser/A-Https-Polyfill.d.ts +18 -0
- package/dist/node/lib/A-Polyfill/browser/A-Https-Polyfill.js +58 -0
- package/dist/node/lib/A-Polyfill/browser/A-Https-Polyfill.js.map +1 -0
- package/dist/node/lib/A-Polyfill/browser/A-Https-Polyfill.mjs +57 -0
- package/dist/node/lib/A-Polyfill/browser/A-Https-Polyfill.mjs.map +1 -0
- package/dist/node/lib/A-Polyfill/browser/A-Path-Polyfill.d.mts +17 -0
- package/dist/node/lib/A-Polyfill/browser/A-Path-Polyfill.d.ts +17 -0
- package/dist/node/lib/A-Polyfill/browser/A-Path-Polyfill.js +64 -0
- package/dist/node/lib/A-Polyfill/browser/A-Path-Polyfill.js.map +1 -0
- package/dist/node/lib/A-Polyfill/browser/A-Path-Polyfill.mjs +63 -0
- package/dist/node/lib/A-Polyfill/browser/A-Path-Polyfill.mjs.map +1 -0
- package/dist/node/lib/A-Polyfill/browser/A-Process-Polyfill.d.mts +17 -0
- package/dist/node/lib/A-Polyfill/browser/A-Process-Polyfill.d.ts +17 -0
- package/dist/node/lib/A-Polyfill/browser/A-Process-Polyfill.js +33 -0
- package/dist/node/lib/A-Polyfill/browser/A-Process-Polyfill.js.map +1 -0
- package/dist/node/lib/A-Polyfill/browser/A-Process-Polyfill.mjs +32 -0
- package/dist/node/lib/A-Polyfill/browser/A-Process-Polyfill.mjs.map +1 -0
- package/dist/node/lib/A-Polyfill/browser/A-Url-Polyfill.d.mts +17 -0
- package/dist/node/lib/A-Polyfill/browser/A-Url-Polyfill.d.ts +17 -0
- package/dist/node/lib/A-Polyfill/browser/A-Url-Polyfill.js +50 -0
- package/dist/node/lib/A-Polyfill/browser/A-Url-Polyfill.js.map +1 -0
- package/dist/node/lib/A-Polyfill/browser/A-Url-Polyfill.mjs +49 -0
- package/dist/node/lib/A-Polyfill/browser/A-Url-Polyfill.mjs.map +1 -0
- package/dist/node/lib/A-Polyfill/browser/index.d.mts +23 -0
- package/dist/node/lib/A-Polyfill/browser/index.d.ts +23 -0
- package/dist/node/lib/A-Polyfill/browser/index.js +56 -0
- package/dist/node/lib/A-Polyfill/browser/index.js.map +1 -0
- package/dist/node/lib/A-Polyfill/browser/index.mjs +9 -0
- package/dist/node/lib/A-Polyfill/browser/index.mjs.map +1 -0
- package/dist/node/lib/A-Polyfill/index.browser.d.mts +26 -0
- package/dist/node/lib/A-Polyfill/index.browser.d.ts +26 -0
- package/dist/node/lib/A-Polyfill/index.browser.js +33 -0
- package/dist/node/lib/A-Polyfill/index.browser.js.map +1 -0
- package/dist/node/lib/A-Polyfill/index.browser.mjs +7 -0
- package/dist/node/lib/A-Polyfill/index.browser.mjs.map +1 -0
- package/dist/node/lib/A-Polyfill/index.node.d.mts +26 -0
- package/dist/node/lib/A-Polyfill/index.node.d.ts +26 -0
- package/dist/node/lib/A-Polyfill/index.node.js +33 -0
- package/dist/node/lib/A-Polyfill/index.node.js.map +1 -0
- package/dist/node/lib/A-Polyfill/index.node.mjs +7 -0
- package/dist/node/lib/A-Polyfill/index.node.mjs.map +1 -0
- package/dist/node/lib/A-Polyfill/node/A-Buffer-Polyfill.d.mts +17 -0
- package/dist/node/lib/A-Polyfill/node/A-Buffer-Polyfill.d.ts +17 -0
- package/dist/node/lib/A-Polyfill/node/A-Buffer-Polyfill.js +27 -0
- package/dist/node/lib/A-Polyfill/node/A-Buffer-Polyfill.js.map +1 -0
- package/dist/node/lib/A-Polyfill/node/A-Buffer-Polyfill.mjs +22 -0
- package/dist/node/lib/A-Polyfill/node/A-Buffer-Polyfill.mjs.map +1 -0
- package/dist/node/lib/A-Polyfill/node/A-Crypto-Polyfill.d.mts +17 -0
- package/dist/node/lib/A-Polyfill/node/A-Crypto-Polyfill.d.ts +17 -0
- package/dist/node/lib/A-Polyfill/node/A-Crypto-Polyfill.js +39 -0
- package/dist/node/lib/A-Polyfill/node/A-Crypto-Polyfill.js.map +1 -0
- package/dist/node/lib/A-Polyfill/node/A-Crypto-Polyfill.mjs +34 -0
- package/dist/node/lib/A-Polyfill/node/A-Crypto-Polyfill.mjs.map +1 -0
- package/dist/node/lib/A-Polyfill/node/A-FS-Polyfill.d.mts +17 -0
- package/dist/node/lib/A-Polyfill/node/A-FS-Polyfill.d.ts +17 -0
- package/dist/node/lib/A-Polyfill/node/A-FS-Polyfill.js +21 -0
- package/dist/node/lib/A-Polyfill/node/A-FS-Polyfill.js.map +1 -0
- package/dist/node/lib/A-Polyfill/node/A-FS-Polyfill.mjs +16 -0
- package/dist/node/lib/A-Polyfill/node/A-FS-Polyfill.mjs.map +1 -0
- package/dist/node/lib/A-Polyfill/node/A-Http-Polyfill.d.mts +17 -0
- package/dist/node/lib/A-Polyfill/node/A-Http-Polyfill.d.ts +17 -0
- package/dist/node/lib/A-Polyfill/node/A-Http-Polyfill.js +25 -0
- package/dist/node/lib/A-Polyfill/node/A-Http-Polyfill.js.map +1 -0
- package/dist/node/lib/A-Polyfill/node/A-Http-Polyfill.mjs +20 -0
- package/dist/node/lib/A-Polyfill/node/A-Http-Polyfill.mjs.map +1 -0
- package/dist/node/lib/A-Polyfill/node/A-Https-Polyfill.d.mts +17 -0
- package/dist/node/lib/A-Polyfill/node/A-Https-Polyfill.d.ts +17 -0
- package/dist/node/lib/A-Polyfill/node/A-Https-Polyfill.js +25 -0
- package/dist/node/lib/A-Polyfill/node/A-Https-Polyfill.js.map +1 -0
- package/dist/node/lib/A-Polyfill/node/A-Https-Polyfill.mjs +20 -0
- package/dist/node/lib/A-Polyfill/node/A-Https-Polyfill.mjs.map +1 -0
- package/dist/node/lib/A-Polyfill/node/A-Path-Polyfill.d.mts +17 -0
- package/dist/node/lib/A-Polyfill/node/A-Path-Polyfill.d.ts +17 -0
- package/dist/node/lib/A-Polyfill/node/A-Path-Polyfill.js +34 -0
- package/dist/node/lib/A-Polyfill/node/A-Path-Polyfill.js.map +1 -0
- package/dist/node/lib/A-Polyfill/node/A-Path-Polyfill.mjs +29 -0
- package/dist/node/lib/A-Polyfill/node/A-Path-Polyfill.mjs.map +1 -0
- package/dist/node/lib/A-Polyfill/node/A-Process-Polyfill.d.mts +17 -0
- package/dist/node/lib/A-Polyfill/node/A-Process-Polyfill.d.ts +17 -0
- package/dist/node/lib/A-Polyfill/node/A-Process-Polyfill.js +25 -0
- package/dist/node/lib/A-Polyfill/node/A-Process-Polyfill.js.map +1 -0
- package/dist/node/lib/A-Polyfill/node/A-Process-Polyfill.mjs +24 -0
- package/dist/node/lib/A-Polyfill/node/A-Process-Polyfill.mjs.map +1 -0
- package/dist/node/lib/A-Polyfill/node/A-Url-Polyfill.d.mts +17 -0
- package/dist/node/lib/A-Polyfill/node/A-Url-Polyfill.d.ts +17 -0
- package/dist/node/lib/A-Polyfill/node/A-Url-Polyfill.js +27 -0
- package/dist/node/lib/A-Polyfill/node/A-Url-Polyfill.js.map +1 -0
- package/dist/node/lib/A-Polyfill/node/A-Url-Polyfill.mjs +22 -0
- package/dist/node/lib/A-Polyfill/node/A-Url-Polyfill.mjs.map +1 -0
- package/dist/node/lib/A-Polyfill/node/index.d.mts +23 -0
- package/dist/node/lib/A-Polyfill/node/index.d.ts +23 -0
- package/dist/node/lib/A-Polyfill/node/index.js +56 -0
- package/dist/node/lib/A-Polyfill/node/index.js.map +1 -0
- package/dist/node/lib/A-Polyfill/node/index.mjs +9 -0
- package/dist/node/lib/A-Polyfill/node/index.mjs.map +1 -0
- package/dist/node/lib/A-Route/A-Route.entity.d.mts +25 -0
- package/dist/node/lib/A-Route/A-Route.entity.d.ts +25 -0
- package/dist/node/lib/A-Route/A-Route.entity.js +105 -0
- package/dist/node/lib/A-Route/A-Route.entity.js.map +1 -0
- package/dist/node/lib/A-Route/A-Route.entity.mjs +98 -0
- package/dist/node/lib/A-Route/A-Route.entity.mjs.map +1 -0
- package/dist/node/lib/A-Route/A-Route.types.d.mts +2 -0
- package/dist/node/lib/A-Route/A-Route.types.d.ts +2 -0
- package/dist/node/lib/A-Route/A-Route.types.js +4 -0
- package/dist/node/lib/A-Route/A-Route.types.js.map +1 -0
- package/dist/node/lib/A-Route/A-Route.types.mjs +3 -0
- package/dist/node/lib/A-Route/A-Route.types.mjs.map +1 -0
- package/dist/node/lib/A-Route/index.d.mts +2 -0
- package/dist/node/lib/A-Route/index.d.ts +2 -0
- package/dist/node/lib/A-Route/index.js +12 -0
- package/dist/node/lib/A-Route/index.js.map +1 -0
- package/dist/node/lib/A-Route/index.mjs +4 -0
- package/dist/node/lib/A-Route/index.mjs.map +1 -0
- package/dist/node/lib/A-Schedule/A-Deferred.class.d.mts +14 -0
- package/dist/node/lib/A-Schedule/A-Deferred.class.d.ts +14 -0
- package/dist/node/lib/A-Schedule/A-Deferred.class.js +24 -0
- package/dist/node/lib/A-Schedule/A-Deferred.class.js.map +1 -0
- package/dist/node/lib/A-Schedule/A-Deferred.class.mjs +24 -0
- package/dist/node/lib/A-Schedule/A-Deferred.class.mjs.map +1 -0
- package/dist/node/lib/A-Schedule/A-Schedule.component.d.mts +60 -0
- package/dist/node/lib/A-Schedule/A-Schedule.component.d.ts +60 -0
- package/dist/node/lib/A-Schedule/A-Schedule.component.js +46 -0
- package/dist/node/lib/A-Schedule/A-Schedule.component.js.map +1 -0
- package/dist/node/lib/A-Schedule/A-Schedule.component.mjs +39 -0
- package/dist/node/lib/A-Schedule/A-Schedule.component.mjs.map +1 -0
- package/dist/node/lib/A-Schedule/A-Schedule.types.d.mts +12 -0
- package/dist/node/lib/A-Schedule/A-Schedule.types.d.ts +12 -0
- package/dist/node/lib/A-Schedule/A-Schedule.types.js +4 -0
- package/dist/node/lib/A-Schedule/A-Schedule.types.js.map +1 -0
- package/dist/node/lib/A-Schedule/A-Schedule.types.mjs +3 -0
- package/dist/node/lib/A-Schedule/A-Schedule.types.mjs.map +1 -0
- package/dist/node/lib/A-Schedule/A-ScheduleObject.class.d.mts +32 -0
- package/dist/node/lib/A-Schedule/A-ScheduleObject.class.d.ts +32 -0
- package/dist/node/lib/A-Schedule/A-ScheduleObject.class.js +49 -0
- package/dist/node/lib/A-Schedule/A-ScheduleObject.class.js.map +1 -0
- package/dist/node/lib/A-Schedule/A-ScheduleObject.class.mjs +48 -0
- package/dist/node/lib/A-Schedule/A-ScheduleObject.class.mjs.map +1 -0
- package/dist/node/lib/A-Schedule/index.d.mts +5 -0
- package/dist/node/lib/A-Schedule/index.d.ts +5 -0
- package/dist/node/lib/A-Schedule/index.js +29 -0
- package/dist/node/lib/A-Schedule/index.js.map +1 -0
- package/dist/node/lib/A-Schedule/index.mjs +7 -0
- package/dist/node/lib/A-Schedule/index.mjs.map +1 -0
- package/dist/node/lib/A-Service/A-Service.constants.d.mts +14 -0
- package/dist/node/lib/A-Service/A-Service.constants.d.ts +14 -0
- package/dist/node/lib/A-Service/A-Service.constants.js +19 -0
- package/dist/node/lib/A-Service/A-Service.constants.js.map +1 -0
- package/dist/node/lib/A-Service/A-Service.constants.mjs +19 -0
- package/dist/node/lib/A-Service/A-Service.constants.mjs.map +1 -0
- package/dist/node/lib/A-Service/A-Service.container.d.mts +50 -0
- package/dist/node/lib/A-Service/A-Service.container.d.ts +50 -0
- package/dist/node/lib/A-Service/A-Service.container.js +188 -0
- package/dist/node/lib/A-Service/A-Service.container.js.map +1 -0
- package/dist/node/lib/A-Service/A-Service.container.mjs +178 -0
- package/dist/node/lib/A-Service/A-Service.container.mjs.map +1 -0
- package/dist/node/lib/A-Service/A-Service.error.d.mts +9 -0
- package/dist/node/lib/A-Service/A-Service.error.d.ts +9 -0
- package/dist/node/lib/A-Service/A-Service.error.js +13 -0
- package/dist/node/lib/A-Service/A-Service.error.js.map +1 -0
- package/dist/node/lib/A-Service/A-Service.error.mjs +12 -0
- package/dist/node/lib/A-Service/A-Service.error.mjs.map +1 -0
- package/dist/node/lib/A-Service/A-Service.types.d.mts +27 -0
- package/dist/node/lib/A-Service/A-Service.types.d.ts +27 -0
- package/dist/node/lib/A-Service/A-Service.types.js +16 -0
- package/dist/node/lib/A-Service/A-Service.types.js.map +1 -0
- package/dist/node/lib/A-Service/A-Service.types.mjs +16 -0
- package/dist/node/lib/A-Service/A-Service.types.mjs.map +1 -0
- package/dist/node/lib/A-Service/index.d.mts +28 -0
- package/dist/node/lib/A-Service/index.d.ts +28 -0
- package/dist/node/lib/A-Service/index.js +19 -0
- package/dist/node/lib/A-Service/index.js.map +1 -0
- package/dist/node/lib/A-Service/index.mjs +5 -0
- package/dist/node/lib/A-Service/index.mjs.map +1 -0
- package/dist/node/lib/A-Signal/A-Signal.constants.d.mts +2 -0
- package/dist/node/lib/A-Signal/A-Signal.constants.d.ts +2 -0
- package/dist/node/lib/A-Signal/A-Signal.constants.js +4 -0
- package/dist/node/lib/A-Signal/A-Signal.constants.js.map +1 -0
- package/dist/node/lib/A-Signal/A-Signal.constants.mjs +3 -0
- package/dist/node/lib/A-Signal/A-Signal.constants.mjs.map +1 -0
- package/dist/node/lib/A-Signal/A-Signal.error.d.mts +2 -0
- package/dist/node/lib/A-Signal/A-Signal.error.d.ts +2 -0
- package/dist/node/lib/A-Signal/A-Signal.error.js +4 -0
- package/dist/node/lib/A-Signal/A-Signal.error.js.map +1 -0
- package/dist/node/lib/A-Signal/A-Signal.error.mjs +3 -0
- package/dist/node/lib/A-Signal/A-Signal.error.mjs.map +1 -0
- package/dist/node/lib/A-Signal/A-Signal.types.d.mts +2 -0
- package/dist/node/lib/A-Signal/A-Signal.types.d.ts +2 -0
- package/dist/node/lib/A-Signal/A-Signal.types.js +4 -0
- package/dist/node/lib/A-Signal/A-Signal.types.js.map +1 -0
- package/dist/node/lib/A-Signal/A-Signal.types.mjs +3 -0
- package/dist/node/lib/A-Signal/A-Signal.types.mjs.map +1 -0
- package/dist/node/lib/A-Signal/components/A-SignalBus.component.d.mts +44 -0
- package/dist/node/lib/A-Signal/components/A-SignalBus.component.d.ts +44 -0
- package/dist/node/lib/A-Signal/components/A-SignalBus.component.js +132 -0
- package/dist/node/lib/A-Signal/components/A-SignalBus.component.js.map +1 -0
- package/dist/node/lib/A-Signal/components/A-SignalBus.component.mjs +122 -0
- package/dist/node/lib/A-Signal/components/A-SignalBus.component.mjs.map +1 -0
- package/dist/node/lib/A-Signal/components/A-SignalBus.constants.d.mts +7 -0
- package/dist/node/lib/A-Signal/components/A-SignalBus.constants.d.ts +7 -0
- package/dist/node/lib/A-Signal/components/A-SignalBus.constants.js +12 -0
- package/dist/node/lib/A-Signal/components/A-SignalBus.constants.js.map +1 -0
- package/dist/node/lib/A-Signal/components/A-SignalBus.constants.mjs +12 -0
- package/dist/node/lib/A-Signal/components/A-SignalBus.constants.mjs.map +1 -0
- package/dist/node/lib/A-Signal/components/A-SignalBus.error.d.mts +7 -0
- package/dist/node/lib/A-Signal/components/A-SignalBus.error.d.ts +7 -0
- package/dist/node/lib/A-Signal/components/A-SignalBus.error.js +11 -0
- package/dist/node/lib/A-Signal/components/A-SignalBus.error.js.map +1 -0
- package/dist/node/lib/A-Signal/components/A-SignalBus.error.mjs +10 -0
- package/dist/node/lib/A-Signal/components/A-SignalBus.error.mjs.map +1 -0
- package/dist/node/lib/A-Signal/components/A-SignalBus.types.d.mts +2 -0
- package/dist/node/lib/A-Signal/components/A-SignalBus.types.d.ts +2 -0
- package/dist/node/lib/A-Signal/components/A-SignalBus.types.js +4 -0
- package/dist/node/lib/A-Signal/components/A-SignalBus.types.js.map +1 -0
- package/dist/node/lib/A-Signal/components/A-SignalBus.types.mjs +3 -0
- package/dist/node/lib/A-Signal/components/A-SignalBus.types.mjs.map +1 -0
- package/dist/node/lib/A-Signal/context/A-SignalConfig.context.d.mts +36 -0
- package/dist/node/lib/A-Signal/context/A-SignalConfig.context.d.ts +36 -0
- package/dist/node/lib/A-Signal/context/A-SignalConfig.context.js +68 -0
- package/dist/node/lib/A-Signal/context/A-SignalConfig.context.js.map +1 -0
- package/dist/node/lib/A-Signal/context/A-SignalConfig.context.mjs +61 -0
- package/dist/node/lib/A-Signal/context/A-SignalConfig.context.mjs.map +1 -0
- package/dist/node/lib/A-Signal/context/A-SignalState.context.d.mts +111 -0
- package/dist/node/lib/A-Signal/context/A-SignalState.context.d.ts +111 -0
- package/dist/node/lib/A-Signal/context/A-SignalState.context.js +114 -0
- package/dist/node/lib/A-Signal/context/A-SignalState.context.js.map +1 -0
- package/dist/node/lib/A-Signal/context/A-SignalState.context.mjs +107 -0
- package/dist/node/lib/A-Signal/context/A-SignalState.context.mjs.map +1 -0
- package/dist/node/lib/A-Signal/entities/A-Signal.entity.d.mts +2 -0
- package/dist/node/lib/A-Signal/entities/A-Signal.entity.d.ts +2 -0
- package/dist/node/lib/A-Signal/entities/A-Signal.entity.js +120 -0
- package/dist/node/lib/A-Signal/entities/A-Signal.entity.js.map +1 -0
- package/dist/node/lib/A-Signal/entities/A-Signal.entity.mjs +113 -0
- package/dist/node/lib/A-Signal/entities/A-Signal.entity.mjs.map +1 -0
- package/dist/node/lib/A-Signal/entities/A-SignalVector.entity.d.mts +113 -0
- package/dist/node/lib/A-Signal/entities/A-SignalVector.entity.d.ts +113 -0
- package/dist/node/lib/A-Signal/entities/A-SignalVector.entity.js +217 -0
- package/dist/node/lib/A-Signal/entities/A-SignalVector.entity.js.map +1 -0
- package/dist/node/lib/A-Signal/entities/A-SignalVector.entity.mjs +210 -0
- package/dist/node/lib/A-Signal/entities/A-SignalVector.entity.mjs.map +1 -0
- package/dist/node/lib/A-Signal/index.d.mts +15 -0
- package/dist/node/lib/A-Signal/index.d.ts +15 -0
- package/dist/node/lib/A-Signal/index.js +51 -0
- package/dist/node/lib/A-Signal/index.js.map +1 -0
- package/dist/node/lib/A-Signal/index.mjs +11 -0
- package/dist/node/lib/A-Signal/index.mjs.map +1 -0
- package/dist/node/lib/A-StateMachine/A-StateMachine.component.d.mts +180 -0
- package/dist/node/lib/A-StateMachine/A-StateMachine.component.d.ts +180 -0
- package/dist/node/lib/A-StateMachine/A-StateMachine.component.js +119 -0
- package/dist/node/lib/A-StateMachine/A-StateMachine.component.js.map +1 -0
- package/dist/node/lib/A-StateMachine/A-StateMachine.component.mjs +110 -0
- package/dist/node/lib/A-StateMachine/A-StateMachine.component.mjs.map +1 -0
- package/dist/node/lib/A-StateMachine/A-StateMachine.constants.d.mts +20 -0
- package/dist/node/lib/A-StateMachine/A-StateMachine.constants.d.ts +20 -0
- package/dist/node/lib/A-StateMachine/A-StateMachine.constants.js +13 -0
- package/dist/node/lib/A-StateMachine/A-StateMachine.constants.js.map +1 -0
- package/dist/node/lib/A-StateMachine/A-StateMachine.constants.mjs +13 -0
- package/dist/node/lib/A-StateMachine/A-StateMachine.constants.mjs.map +1 -0
- package/dist/node/lib/A-StateMachine/A-StateMachine.error.d.mts +8 -0
- package/dist/node/lib/A-StateMachine/A-StateMachine.error.d.ts +8 -0
- package/dist/node/lib/A-StateMachine/A-StateMachine.error.js +12 -0
- package/dist/node/lib/A-StateMachine/A-StateMachine.error.js.map +1 -0
- package/dist/node/lib/A-StateMachine/A-StateMachine.error.mjs +11 -0
- package/dist/node/lib/A-StateMachine/A-StateMachine.error.mjs.map +1 -0
- package/dist/node/lib/A-StateMachine/A-StateMachine.types.d.mts +14 -0
- package/dist/node/lib/A-StateMachine/A-StateMachine.types.d.ts +14 -0
- package/dist/node/lib/A-StateMachine/A-StateMachine.types.js +4 -0
- package/dist/node/lib/A-StateMachine/A-StateMachine.types.js.map +1 -0
- package/dist/node/lib/A-StateMachine/A-StateMachine.types.mjs +3 -0
- package/dist/node/lib/A-StateMachine/A-StateMachine.types.mjs.map +1 -0
- package/dist/node/lib/A-StateMachine/A-StateMachineTransition.context.d.mts +19 -0
- package/dist/node/lib/A-StateMachine/A-StateMachineTransition.context.d.ts +19 -0
- package/dist/node/lib/A-StateMachine/A-StateMachineTransition.context.js +43 -0
- package/dist/node/lib/A-StateMachine/A-StateMachineTransition.context.js.map +1 -0
- package/dist/node/lib/A-StateMachine/A-StateMachineTransition.context.mjs +36 -0
- package/dist/node/lib/A-StateMachine/A-StateMachineTransition.context.mjs.map +1 -0
- package/dist/node/lib/A-StateMachine/index.d.mts +9 -0
- package/dist/node/lib/A-StateMachine/index.d.ts +9 -0
- package/dist/node/lib/A-StateMachine/index.js +36 -0
- package/dist/node/lib/A-StateMachine/index.js.map +1 -0
- package/dist/node/lib/A-StateMachine/index.mjs +8 -0
- package/dist/node/lib/A-StateMachine/index.mjs.map +1 -0
- package/examples/A-Logger-examples.ts +1 -2
- package/jest.config.ts +20 -7
- package/package.json +232 -15
- package/src/lib/A-Channel/A-Channel.component.ts +1 -1
- package/src/lib/A-Channel/A-Channel.error.ts +1 -1
- package/src/lib/A-Channel/A-Channel.types.ts +0 -3
- package/src/lib/A-Channel/A-ChannelRequest.context.ts +1 -1
- package/src/lib/A-Channel/index.ts +6 -0
- package/src/lib/A-Command/A-Command.entity.ts +3 -5
- package/src/lib/A-Command/index.ts +5 -0
- package/src/lib/A-Config/A-Config.container.ts +3 -4
- package/src/lib/A-Config/A-Config.context.ts +1 -1
- package/src/lib/A-Config/components/ConfigReader.component.ts +10 -21
- package/src/lib/A-Config/components/ENVConfigReader.component.ts +13 -12
- package/src/lib/A-Config/index.ts +9 -0
- package/src/lib/A-Execution/index.ts +3 -0
- package/src/lib/A-Logger/A-Logger.component.ts +3 -1
- package/src/lib/A-Logger/index.ts +5 -0
- package/src/lib/A-Manifest/index.ts +5 -0
- package/src/lib/A-Memory/A-Memory.component.ts +1 -1
- package/src/lib/A-Memory/A-Memory.types.ts +1 -1
- package/src/lib/A-Memory/index.ts +6 -0
- package/src/lib/A-Operation/A-Operation.context.ts +1 -1
- package/src/lib/A-Operation/index.ts +3 -0
- package/src/lib/A-Polyfill/{A-Polyfill.component.ts → A-Polyfill.component.env-browser.ts} +26 -27
- package/src/lib/A-Polyfill/A-Polyfill.component.env-node.ts +184 -0
- package/src/lib/A-Polyfill/base/A-Buffer-Polyfill.base.ts +34 -0
- package/src/lib/A-Polyfill/base/A-Crypto-Polyfill.base.ts +36 -0
- package/src/lib/A-Polyfill/base/A-FS-Polyfill.base.ts +34 -0
- package/src/lib/A-Polyfill/base/A-Http-Polyfill.base.ts +34 -0
- package/src/lib/A-Polyfill/base/A-Https-Polyfill.base.ts +34 -0
- package/src/lib/A-Polyfill/base/A-Path-Polyfill.base.ts +34 -0
- package/src/lib/A-Polyfill/base/A-Process-Polyfill.base.ts +34 -0
- package/src/lib/A-Polyfill/base/A-Url-Polyfill.base.ts +34 -0
- package/src/lib/A-Polyfill/base/index.ts +9 -0
- package/src/lib/A-Polyfill/browser/A-Buffer-Polyfill.ts +42 -0
- package/src/lib/A-Polyfill/browser/A-Crypto-Polyfill.ts +32 -0
- package/src/lib/A-Polyfill/browser/A-FS-Polyfill.ts +25 -0
- package/src/lib/A-Polyfill/{classes/A-Http-Polyfill.class.ts → browser/A-Http-Polyfill.ts} +6 -46
- package/src/lib/A-Polyfill/{classes/A-Https-Polyfill.class.ts → browser/A-Https-Polyfill.ts} +6 -46
- package/src/lib/A-Polyfill/{classes/A-Path-Polyfill.class.ts → browser/A-Path-Polyfill.ts} +6 -42
- package/src/lib/A-Polyfill/browser/A-Process-Polyfill.ts +29 -0
- package/src/lib/A-Polyfill/browser/A-Url-Polyfill.ts +46 -0
- package/src/lib/A-Polyfill/browser/index.ts +8 -0
- package/src/lib/A-Polyfill/index.browser.ts +5 -0
- package/src/lib/A-Polyfill/index.node.ts +5 -0
- package/src/lib/A-Polyfill/node/A-Buffer-Polyfill.ts +19 -0
- package/src/lib/A-Polyfill/node/A-Crypto-Polyfill.ts +31 -0
- package/src/lib/A-Polyfill/node/A-FS-Polyfill.ts +14 -0
- package/src/lib/A-Polyfill/node/A-Http-Polyfill.ts +17 -0
- package/src/lib/A-Polyfill/node/A-Https-Polyfill.ts +18 -0
- package/src/lib/A-Polyfill/node/A-Path-Polyfill.ts +27 -0
- package/src/lib/A-Polyfill/node/A-Process-Polyfill.ts +21 -0
- package/src/lib/A-Polyfill/node/A-Url-Polyfill.ts +19 -0
- package/src/lib/A-Polyfill/node/index.ts +8 -0
- package/src/lib/A-Route/index.ts +3 -0
- package/src/lib/A-Schedule/index.ts +5 -0
- package/src/lib/A-Service/A-Service.container.ts +2 -4
- package/src/lib/A-Service/index.ts +4 -0
- package/src/lib/A-Signal/components/A-SignalBus.component.ts +2 -2
- package/src/lib/A-Signal/index.ts +11 -0
- package/src/lib/A-StateMachine/A-StateMachine.types.ts +1 -1
- package/src/lib/A-StateMachine/A-StateMachineTransition.context.ts +1 -1
- package/src/lib/A-StateMachine/index.ts +6 -0
- package/tests/A-Channel.test.ts +3 -5
- package/tests/A-Command.test.ts +4 -9
- package/tests/A-Config.test.ts +8 -7
- package/tests/A-Logger.test.ts +1 -3
- package/tests/A-Manifest.test.ts +1 -1
- package/tests/A-Memory.test.ts +1 -3
- package/tests/A-Polyfill.test.ts +2 -2
- package/tests/A-Route.test.ts +1 -3
- package/tests/A-Schedule.test.ts +1 -1
- package/tests/A-Signal.test.ts +1 -5
- package/tests/A-StateMachine.test.ts +2 -5
- package/tests/main.test.ts +30 -0
- package/tsconfig.json +39 -57
- package/tsup.config.ts +94 -28
- package/dist/index.cjs +0 -35
- package/dist/index.cjs.map +0 -1
- package/dist/index.d.mts +0 -2976
- package/dist/index.d.ts +0 -2976
- package/dist/index.mjs +0 -35
- package/dist/index.mjs.map +0 -1
- package/src/index.ts +0 -124
- package/src/lib/A-Polyfill/classes/A-Buffer-Polyfill.class.ts +0 -85
- package/src/lib/A-Polyfill/classes/A-Crypto-Polyfill.class.ts +0 -87
- package/src/lib/A-Polyfill/classes/A-FS-Polyfill.class.ts +0 -61
- package/src/lib/A-Polyfill/classes/A-Process-Polyfill.class.ts +0 -73
- package/src/lib/A-Polyfill/classes/A-Url-Polyfill.class.ts +0 -88
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
import { A_Component } from '@adaas/a-concept';
|
|
2
|
+
import { A_StateMachineFeatures } from './A-StateMachine.constants.js';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* A_StateMachine is a powerful state machine implementation that allows you to define and manage
|
|
6
|
+
* complex state transitions with validation, hooks, and error handling.
|
|
7
|
+
*
|
|
8
|
+
* @template T - A record type defining the state transitions and their associated data types.
|
|
9
|
+
* Each key represents a state name, and the value represents the data type for that state.
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```typescript
|
|
13
|
+
* interface OrderStates {
|
|
14
|
+
* pending: { orderId: string };
|
|
15
|
+
* processing: { orderId: string; processedBy: string };
|
|
16
|
+
* completed: { orderId: string; completedAt: Date };
|
|
17
|
+
* cancelled: { orderId: string; reason: string };
|
|
18
|
+
* }
|
|
19
|
+
*
|
|
20
|
+
* class OrderStateMachine extends A_StateMachine<OrderStates> {
|
|
21
|
+
* // Define custom transition logic
|
|
22
|
+
* async pending_processing(scope: A_Scope) {
|
|
23
|
+
* const operation = scope.resolve(A_StateMachineTransition)!;
|
|
24
|
+
* const { orderId } = operation.props;
|
|
25
|
+
* // Custom validation and business logic
|
|
26
|
+
* }
|
|
27
|
+
* }
|
|
28
|
+
* ```
|
|
29
|
+
*/
|
|
30
|
+
declare class A_StateMachine<T extends Record<string, any> = Record<string, any>> extends A_Component {
|
|
31
|
+
/**
|
|
32
|
+
* Internal promise that tracks the initialization state of the state machine.
|
|
33
|
+
* Used to ensure the state machine is properly initialized before allowing transitions.
|
|
34
|
+
*/
|
|
35
|
+
protected _initialized?: Promise<void>;
|
|
36
|
+
/**
|
|
37
|
+
* Gets a promise that resolves when the state machine is fully initialized and ready for transitions.
|
|
38
|
+
* This ensures that all initialization hooks have been executed before allowing state transitions.
|
|
39
|
+
*
|
|
40
|
+
* @returns Promise<void> that resolves when initialization is complete
|
|
41
|
+
*
|
|
42
|
+
* @example
|
|
43
|
+
* ```typescript
|
|
44
|
+
* const stateMachine = new MyStateMachine();
|
|
45
|
+
* await stateMachine.ready; // Wait for initialization
|
|
46
|
+
* await stateMachine.transition('idle', 'running');
|
|
47
|
+
* ```
|
|
48
|
+
*/
|
|
49
|
+
get ready(): Promise<void>;
|
|
50
|
+
/**
|
|
51
|
+
* Initialization hook that runs when the state machine is first created.
|
|
52
|
+
* This method can be extended to add custom initialization logic.
|
|
53
|
+
*
|
|
54
|
+
* @param args - Variable arguments passed during initialization
|
|
55
|
+
* @returns Promise<void>
|
|
56
|
+
*
|
|
57
|
+
* @example
|
|
58
|
+
* ```typescript
|
|
59
|
+
* class MyStateMachine extends A_StateMachine {
|
|
60
|
+
* @A_Feature.Extend()
|
|
61
|
+
* async [A_StateMachineFeatures.onInitialize]() {
|
|
62
|
+
* // Custom initialization logic
|
|
63
|
+
* console.log('State machine initialized');
|
|
64
|
+
* }
|
|
65
|
+
* }
|
|
66
|
+
* ```
|
|
67
|
+
*/
|
|
68
|
+
[A_StateMachineFeatures.onInitialize](...args: any[]): Promise<void>;
|
|
69
|
+
/**
|
|
70
|
+
* Hook that runs before any state transition occurs.
|
|
71
|
+
* Use this to add validation, logging, or preparation logic that should run for all transitions.
|
|
72
|
+
*
|
|
73
|
+
* @param args - Variable arguments, typically includes the transition scope
|
|
74
|
+
* @returns Promise<void>
|
|
75
|
+
*
|
|
76
|
+
* @example
|
|
77
|
+
* ```typescript
|
|
78
|
+
* class MyStateMachine extends A_StateMachine {
|
|
79
|
+
* @A_Feature.Extend()
|
|
80
|
+
* async [A_StateMachineFeatures.onBeforeTransition](scope: A_Scope) {
|
|
81
|
+
* const operation = scope.resolve(A_StateMachineTransition)!;
|
|
82
|
+
* console.log(`Transitioning from ${operation.props.from} to ${operation.props.to}`);
|
|
83
|
+
* }
|
|
84
|
+
* }
|
|
85
|
+
* ```
|
|
86
|
+
*/
|
|
87
|
+
[A_StateMachineFeatures.onBeforeTransition](...args: any[]): Promise<void>;
|
|
88
|
+
/**
|
|
89
|
+
* Hook that runs after a successful state transition.
|
|
90
|
+
* Use this to add cleanup, logging, or post-transition logic that should run for all transitions.
|
|
91
|
+
*
|
|
92
|
+
* @param args - Variable arguments, typically includes the transition scope
|
|
93
|
+
* @returns Promise<void>
|
|
94
|
+
*
|
|
95
|
+
* @example
|
|
96
|
+
* ```typescript
|
|
97
|
+
* class MyStateMachine extends A_StateMachine {
|
|
98
|
+
* @A_Feature.Extend()
|
|
99
|
+
* async [A_StateMachineFeatures.onAfterTransition](scope: A_Scope) {
|
|
100
|
+
* const operation = scope.resolve(A_StateMachineTransition)!;
|
|
101
|
+
* console.log(`Successfully transitioned to ${operation.props.to}`);
|
|
102
|
+
* }
|
|
103
|
+
* }
|
|
104
|
+
* ```
|
|
105
|
+
*/
|
|
106
|
+
[A_StateMachineFeatures.onAfterTransition](...args: any[]): Promise<void>;
|
|
107
|
+
/**
|
|
108
|
+
* Error handling hook that runs when a transition fails.
|
|
109
|
+
* Use this to add custom error handling, logging, or recovery logic.
|
|
110
|
+
*
|
|
111
|
+
* @param args - Variable arguments, typically includes the error scope
|
|
112
|
+
* @returns Promise<void>
|
|
113
|
+
*
|
|
114
|
+
* @example
|
|
115
|
+
* ```typescript
|
|
116
|
+
* class MyStateMachine extends A_StateMachine {
|
|
117
|
+
* @A_Feature.Extend()
|
|
118
|
+
* async [A_StateMachineFeatures.onError](scope: A_Scope) {
|
|
119
|
+
* const error = scope.resolve(A_StateMachineError);
|
|
120
|
+
* console.error('Transition failed:', error?.message);
|
|
121
|
+
* }
|
|
122
|
+
* }
|
|
123
|
+
* ```
|
|
124
|
+
*/
|
|
125
|
+
[A_StateMachineFeatures.onError](...args: any[]): Promise<void>;
|
|
126
|
+
/**
|
|
127
|
+
* Executes a state transition from one state to another.
|
|
128
|
+
* This is the core method of the state machine that handles the complete transition lifecycle.
|
|
129
|
+
*
|
|
130
|
+
* @param from - The state to transition from (must be a key of T)
|
|
131
|
+
* @param to - The state to transition to (must be a key of T)
|
|
132
|
+
* @param props - Optional properties to pass to the transition context (should match T[keyof T])
|
|
133
|
+
* @returns Promise<void> that resolves when the transition is complete
|
|
134
|
+
*
|
|
135
|
+
* @throws {A_StateMachineError} When the transition fails for any reason
|
|
136
|
+
*
|
|
137
|
+
* @example
|
|
138
|
+
* ```typescript
|
|
139
|
+
* interface OrderStates {
|
|
140
|
+
* pending: { orderId: string };
|
|
141
|
+
* processing: { orderId: string; processedBy: string };
|
|
142
|
+
* }
|
|
143
|
+
*
|
|
144
|
+
* const orderMachine = new A_StateMachine<OrderStates>();
|
|
145
|
+
*
|
|
146
|
+
* // Transition with props
|
|
147
|
+
* await orderMachine.transition('pending', 'processing', {
|
|
148
|
+
* orderId: '12345',
|
|
149
|
+
* processedBy: 'user-456'
|
|
150
|
+
* });
|
|
151
|
+
* ```
|
|
152
|
+
*
|
|
153
|
+
* The transition process follows this lifecycle:
|
|
154
|
+
* 1. Wait for state machine initialization (ready)
|
|
155
|
+
* 2. Create transition name in camelCase format (e.g., "pending_processing")
|
|
156
|
+
* 3. Create operation context with transition data
|
|
157
|
+
* 4. Create isolated scope for the transition
|
|
158
|
+
* 5. Call onBeforeTransition hook
|
|
159
|
+
* 6. Execute the specific transition method (if defined)
|
|
160
|
+
* 7. Call onAfterTransition hook
|
|
161
|
+
* 8. Clean up scope and return result
|
|
162
|
+
*
|
|
163
|
+
* If any step fails, the onError hook is called and a wrapped error is thrown.
|
|
164
|
+
*/
|
|
165
|
+
transition(
|
|
166
|
+
/**
|
|
167
|
+
* The state to transition from
|
|
168
|
+
*/
|
|
169
|
+
from: keyof T,
|
|
170
|
+
/**
|
|
171
|
+
* The state to transition to
|
|
172
|
+
*/
|
|
173
|
+
to: keyof T,
|
|
174
|
+
/**
|
|
175
|
+
* Optional properties to pass to the transition context
|
|
176
|
+
*/
|
|
177
|
+
props?: T[keyof T]): Promise<void>;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
export { A_StateMachine };
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var aConcept = require('@adaas/a-concept');
|
|
4
|
+
var AStateMachine_error = require('./A-StateMachine.error');
|
|
5
|
+
var AStateMachine_constants = require('./A-StateMachine.constants');
|
|
6
|
+
var AStateMachineTransition_context = require('./A-StateMachineTransition.context');
|
|
7
|
+
var aFrame = require('@adaas/a-frame');
|
|
8
|
+
|
|
9
|
+
var __defProp = Object.defineProperty;
|
|
10
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
11
|
+
var __decorateClass = (decorators, target, key, kind) => {
|
|
12
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
|
|
13
|
+
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
14
|
+
if (decorator = decorators[i])
|
|
15
|
+
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
16
|
+
if (kind && result) __defProp(target, key, result);
|
|
17
|
+
return result;
|
|
18
|
+
};
|
|
19
|
+
var _a, _b, _c, _d;
|
|
20
|
+
exports.A_StateMachine = class A_StateMachine extends aConcept.A_Component {
|
|
21
|
+
/**
|
|
22
|
+
* Gets a promise that resolves when the state machine is fully initialized and ready for transitions.
|
|
23
|
+
* This ensures that all initialization hooks have been executed before allowing state transitions.
|
|
24
|
+
*
|
|
25
|
+
* @returns Promise<void> that resolves when initialization is complete
|
|
26
|
+
*
|
|
27
|
+
* @example
|
|
28
|
+
* ```typescript
|
|
29
|
+
* const stateMachine = new MyStateMachine();
|
|
30
|
+
* await stateMachine.ready; // Wait for initialization
|
|
31
|
+
* await stateMachine.transition('idle', 'running');
|
|
32
|
+
* ```
|
|
33
|
+
*/
|
|
34
|
+
get ready() {
|
|
35
|
+
if (!this._initialized) {
|
|
36
|
+
this._initialized = new Promise(
|
|
37
|
+
async (resolve, reject) => {
|
|
38
|
+
try {
|
|
39
|
+
await this.call(AStateMachine_constants.A_StateMachineFeatures.onInitialize);
|
|
40
|
+
resolve();
|
|
41
|
+
} catch (error) {
|
|
42
|
+
const wrappedError = new AStateMachine_error.A_StateMachineError({
|
|
43
|
+
title: AStateMachine_error.A_StateMachineError.InitializationError,
|
|
44
|
+
description: `An error occurred during state machine initialization.`,
|
|
45
|
+
originalError: error
|
|
46
|
+
});
|
|
47
|
+
reject(wrappedError);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
);
|
|
51
|
+
}
|
|
52
|
+
return this._initialized;
|
|
53
|
+
}
|
|
54
|
+
async [_d = AStateMachine_constants.A_StateMachineFeatures.onInitialize](...args) {
|
|
55
|
+
}
|
|
56
|
+
async [_c = AStateMachine_constants.A_StateMachineFeatures.onBeforeTransition](...args) {
|
|
57
|
+
}
|
|
58
|
+
async [_b = AStateMachine_constants.A_StateMachineFeatures.onAfterTransition](...args) {
|
|
59
|
+
}
|
|
60
|
+
async [_a = AStateMachine_constants.A_StateMachineFeatures.onError](...args) {
|
|
61
|
+
}
|
|
62
|
+
async transition(from, to, props) {
|
|
63
|
+
await this.ready;
|
|
64
|
+
const transitionName = `${aConcept.A_FormatterHelper.toCamelCase(String(from))}_${aConcept.A_FormatterHelper.toCamelCase(String(to))}`;
|
|
65
|
+
const transition = new AStateMachineTransition_context.A_StateMachineTransition({
|
|
66
|
+
from: String(from),
|
|
67
|
+
to: String(to),
|
|
68
|
+
props
|
|
69
|
+
});
|
|
70
|
+
const scope = new aConcept.A_Scope({
|
|
71
|
+
name: `A-StateMachine-Transition-Scope-${transitionName}`,
|
|
72
|
+
fragments: [transition]
|
|
73
|
+
}).inherit(aConcept.A_Context.scope(this));
|
|
74
|
+
try {
|
|
75
|
+
await this.call(AStateMachine_constants.A_StateMachineFeatures.onBeforeTransition, scope);
|
|
76
|
+
await this.call(transitionName, scope);
|
|
77
|
+
await this.call(AStateMachine_constants.A_StateMachineFeatures.onAfterTransition, scope);
|
|
78
|
+
scope.destroy();
|
|
79
|
+
return transition.result;
|
|
80
|
+
} catch (error) {
|
|
81
|
+
const wrappedError = new AStateMachine_error.A_StateMachineError({
|
|
82
|
+
title: AStateMachine_error.A_StateMachineError.TransitionError,
|
|
83
|
+
description: `An error occurred while transitioning to "${transitionName}"`,
|
|
84
|
+
originalError: error
|
|
85
|
+
});
|
|
86
|
+
scope.register(wrappedError);
|
|
87
|
+
await this.call(AStateMachine_constants.A_StateMachineFeatures.onError, scope);
|
|
88
|
+
scope.destroy();
|
|
89
|
+
throw wrappedError;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
};
|
|
93
|
+
__decorateClass([
|
|
94
|
+
aConcept.A_Feature.Extend()
|
|
95
|
+
], exports.A_StateMachine.prototype, _d, 1);
|
|
96
|
+
__decorateClass([
|
|
97
|
+
aConcept.A_Feature.Extend()
|
|
98
|
+
], exports.A_StateMachine.prototype, _c, 1);
|
|
99
|
+
__decorateClass([
|
|
100
|
+
aConcept.A_Feature.Extend()
|
|
101
|
+
], exports.A_StateMachine.prototype, _b, 1);
|
|
102
|
+
__decorateClass([
|
|
103
|
+
aConcept.A_Feature.Extend()
|
|
104
|
+
], exports.A_StateMachine.prototype, _a, 1);
|
|
105
|
+
__decorateClass([
|
|
106
|
+
aFrame.A_Frame.Method({
|
|
107
|
+
name: "transition",
|
|
108
|
+
description: "Executes a state transition from one state to another."
|
|
109
|
+
})
|
|
110
|
+
], exports.A_StateMachine.prototype, "transition", 1);
|
|
111
|
+
exports.A_StateMachine = __decorateClass([
|
|
112
|
+
aFrame.A_Frame.Namespace("A-Utils"),
|
|
113
|
+
aFrame.A_Frame.Component({
|
|
114
|
+
name: "A-StateMachine",
|
|
115
|
+
description: "A powerful state machine component for managing complex state transitions."
|
|
116
|
+
})
|
|
117
|
+
], exports.A_StateMachine);
|
|
118
|
+
//# sourceMappingURL=A-StateMachine.component.js.map
|
|
119
|
+
//# sourceMappingURL=A-StateMachine.component.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/lib/A-StateMachine/A-StateMachine.component.ts"],"names":["A_StateMachine","A_Component","A_StateMachineFeatures","A_StateMachineError","A_FormatterHelper","A_StateMachineTransition","A_Scope","A_Context","A_Feature","A_Frame"],"mappings":"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","file":"A-StateMachine.component.js","sourcesContent":["import { A_Component, A_Context, A_Feature, A_FormatterHelper, A_Scope } from \"@adaas/a-concept\";\nimport { A_StateMachineError } from \"./A-StateMachine.error\";\nimport { A_StateMachineFeatures } from \"./A-StateMachine.constants\";\nimport { A_StateMachineTransition } from \"./A-StateMachineTransition.context\";\nimport { A_Frame } from \"@adaas/a-frame\";\n\n/**\n * A_StateMachine is a powerful state machine implementation that allows you to define and manage\n * complex state transitions with validation, hooks, and error handling.\n * \n * @template T - A record type defining the state transitions and their associated data types.\n * Each key represents a state name, and the value represents the data type for that state.\n * \n * @example\n * ```typescript\n * interface OrderStates {\n * pending: { orderId: string };\n * processing: { orderId: string; processedBy: string };\n * completed: { orderId: string; completedAt: Date };\n * cancelled: { orderId: string; reason: string };\n * }\n * \n * class OrderStateMachine extends A_StateMachine<OrderStates> {\n * // Define custom transition logic\n * async pending_processing(scope: A_Scope) {\n * const operation = scope.resolve(A_StateMachineTransition)!;\n * const { orderId } = operation.props;\n * // Custom validation and business logic\n * }\n * }\n * ```\n */\n\n@A_Frame.Namespace('A-Utils')\n@A_Frame.Component({\n name: 'A-StateMachine',\n description: 'A powerful state machine component for managing complex state transitions.'\n})\nexport class A_StateMachine<\n T extends Record<string, any> = Record<string, any>\n> extends A_Component {\n\n /**\n * Internal promise that tracks the initialization state of the state machine.\n * Used to ensure the state machine is properly initialized before allowing transitions.\n */\n protected _initialized?: Promise<void>;\n\n /**\n * Gets a promise that resolves when the state machine is fully initialized and ready for transitions.\n * This ensures that all initialization hooks have been executed before allowing state transitions.\n * \n * @returns Promise<void> that resolves when initialization is complete\n * \n * @example\n * ```typescript\n * const stateMachine = new MyStateMachine();\n * await stateMachine.ready; // Wait for initialization\n * await stateMachine.transition('idle', 'running');\n * ```\n */\n get ready(): Promise<void> {\n if (!this._initialized) {\n this._initialized = new Promise<void>(\n async (resolve, reject) => {\n try {\n await this.call(A_StateMachineFeatures.onInitialize);\n\n resolve();\n } catch (error) {\n const wrappedError = new A_StateMachineError({\n title: A_StateMachineError.InitializationError,\n description: `An error occurred during state machine initialization.`,\n originalError: error\n });\n\n reject(wrappedError);\n }\n }\n );\n }\n\n return this._initialized;\n }\n\n\n\n /**\n * Initialization hook that runs when the state machine is first created.\n * This method can be extended to add custom initialization logic.\n * \n * @param args - Variable arguments passed during initialization\n * @returns Promise<void>\n * \n * @example\n * ```typescript\n * class MyStateMachine extends A_StateMachine {\n * @A_Feature.Extend()\n * async [A_StateMachineFeatures.onInitialize]() {\n * // Custom initialization logic\n * console.log('State machine initialized');\n * }\n * }\n * ```\n */\n @A_Feature.Extend()\n async [A_StateMachineFeatures.onInitialize](...args: any[]): Promise<void> {\n // Initialization logic can be added here\n }\n\n /**\n * Hook that runs before any state transition occurs.\n * Use this to add validation, logging, or preparation logic that should run for all transitions.\n * \n * @param args - Variable arguments, typically includes the transition scope\n * @returns Promise<void>\n * \n * @example\n * ```typescript\n * class MyStateMachine extends A_StateMachine {\n * @A_Feature.Extend()\n * async [A_StateMachineFeatures.onBeforeTransition](scope: A_Scope) {\n * const operation = scope.resolve(A_StateMachineTransition)!;\n * console.log(`Transitioning from ${operation.props.from} to ${operation.props.to}`);\n * }\n * }\n * ```\n */\n @A_Feature.Extend()\n async [A_StateMachineFeatures.onBeforeTransition](...args: any[]): Promise<void> {\n\n }\n\n /**\n * Hook that runs after a successful state transition.\n * Use this to add cleanup, logging, or post-transition logic that should run for all transitions.\n * \n * @param args - Variable arguments, typically includes the transition scope\n * @returns Promise<void>\n * \n * @example\n * ```typescript\n * class MyStateMachine extends A_StateMachine {\n * @A_Feature.Extend()\n * async [A_StateMachineFeatures.onAfterTransition](scope: A_Scope) {\n * const operation = scope.resolve(A_StateMachineTransition)!;\n * console.log(`Successfully transitioned to ${operation.props.to}`);\n * }\n * }\n * ```\n */\n @A_Feature.Extend()\n async [A_StateMachineFeatures.onAfterTransition](...args: any[]): Promise<void> {\n\n }\n\n /**\n * Error handling hook that runs when a transition fails.\n * Use this to add custom error handling, logging, or recovery logic.\n * \n * @param args - Variable arguments, typically includes the error scope\n * @returns Promise<void>\n * \n * @example\n * ```typescript\n * class MyStateMachine extends A_StateMachine {\n * @A_Feature.Extend()\n * async [A_StateMachineFeatures.onError](scope: A_Scope) {\n * const error = scope.resolve(A_StateMachineError);\n * console.error('Transition failed:', error?.message);\n * }\n * }\n * ```\n */\n @A_Feature.Extend()\n async [A_StateMachineFeatures.onError](...args: any[]): Promise<void> {\n // Default error handling logic can be added here\n }\n\n\n\n /**\n * Executes a state transition from one state to another.\n * This is the core method of the state machine that handles the complete transition lifecycle.\n * \n * @param from - The state to transition from (must be a key of T)\n * @param to - The state to transition to (must be a key of T)\n * @param props - Optional properties to pass to the transition context (should match T[keyof T])\n * @returns Promise<void> that resolves when the transition is complete\n * \n * @throws {A_StateMachineError} When the transition fails for any reason\n * \n * @example\n * ```typescript\n * interface OrderStates {\n * pending: { orderId: string };\n * processing: { orderId: string; processedBy: string };\n * }\n * \n * const orderMachine = new A_StateMachine<OrderStates>();\n * \n * // Transition with props\n * await orderMachine.transition('pending', 'processing', {\n * orderId: '12345',\n * processedBy: 'user-456'\n * });\n * ```\n * \n * The transition process follows this lifecycle:\n * 1. Wait for state machine initialization (ready)\n * 2. Create transition name in camelCase format (e.g., \"pending_processing\")\n * 3. Create operation context with transition data\n * 4. Create isolated scope for the transition\n * 5. Call onBeforeTransition hook\n * 6. Execute the specific transition method (if defined)\n * 7. Call onAfterTransition hook\n * 8. Clean up scope and return result\n * \n * If any step fails, the onError hook is called and a wrapped error is thrown.\n */\n @A_Frame.Method({\n name: 'transition',\n description: 'Executes a state transition from one state to another.'\n })\n async transition(\n /**\n * The state to transition from\n */\n from: keyof T,\n /**\n * The state to transition to\n */\n to: keyof T,\n /**\n * Optional properties to pass to the transition context\n */\n props?: T[keyof T]\n ): Promise<void> {\n\n await this.ready;\n\n const transitionName = `${A_FormatterHelper.toCamelCase(String(from))}_${A_FormatterHelper.toCamelCase(String(to))}`;\n\n const transition = new A_StateMachineTransition({\n from: String(from),\n to: String(to),\n props\n });\n\n const scope = new A_Scope({\n name: `A-StateMachine-Transition-Scope-${transitionName}`,\n fragments: [transition]\n })\n .inherit(A_Context.scope(this));\n\n try {\n\n await this.call(A_StateMachineFeatures.onBeforeTransition, scope);\n\n await this.call(transitionName, scope);\n\n await this.call(A_StateMachineFeatures.onAfterTransition, scope);\n\n scope.destroy();\n\n return transition.result;\n\n } catch (error) {\n const wrappedError = new A_StateMachineError({\n title: A_StateMachineError.TransitionError,\n description: `An error occurred while transitioning to \"${transitionName}\"`,\n originalError: error\n });\n\n scope.register(wrappedError);\n\n await this.call(A_StateMachineFeatures.onError, scope);\n\n scope.destroy();\n\n throw wrappedError;\n }\n }\n}\n\n\n"]}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import { __decorateClass } from '../../chunk-EQQGB2QZ.mjs';
|
|
2
|
+
import { A_Component, A_FormatterHelper, A_Scope, A_Context, A_Feature } from '@adaas/a-concept';
|
|
3
|
+
import { A_StateMachineError } from './A-StateMachine.error';
|
|
4
|
+
import { A_StateMachineFeatures } from './A-StateMachine.constants';
|
|
5
|
+
import { A_StateMachineTransition } from './A-StateMachineTransition.context';
|
|
6
|
+
import { A_Frame } from '@adaas/a-frame';
|
|
7
|
+
|
|
8
|
+
var _a, _b, _c, _d;
|
|
9
|
+
let A_StateMachine = class extends A_Component {
|
|
10
|
+
/**
|
|
11
|
+
* Gets a promise that resolves when the state machine is fully initialized and ready for transitions.
|
|
12
|
+
* This ensures that all initialization hooks have been executed before allowing state transitions.
|
|
13
|
+
*
|
|
14
|
+
* @returns Promise<void> that resolves when initialization is complete
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* ```typescript
|
|
18
|
+
* const stateMachine = new MyStateMachine();
|
|
19
|
+
* await stateMachine.ready; // Wait for initialization
|
|
20
|
+
* await stateMachine.transition('idle', 'running');
|
|
21
|
+
* ```
|
|
22
|
+
*/
|
|
23
|
+
get ready() {
|
|
24
|
+
if (!this._initialized) {
|
|
25
|
+
this._initialized = new Promise(
|
|
26
|
+
async (resolve, reject) => {
|
|
27
|
+
try {
|
|
28
|
+
await this.call(A_StateMachineFeatures.onInitialize);
|
|
29
|
+
resolve();
|
|
30
|
+
} catch (error) {
|
|
31
|
+
const wrappedError = new A_StateMachineError({
|
|
32
|
+
title: A_StateMachineError.InitializationError,
|
|
33
|
+
description: `An error occurred during state machine initialization.`,
|
|
34
|
+
originalError: error
|
|
35
|
+
});
|
|
36
|
+
reject(wrappedError);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
);
|
|
40
|
+
}
|
|
41
|
+
return this._initialized;
|
|
42
|
+
}
|
|
43
|
+
async [_d = A_StateMachineFeatures.onInitialize](...args) {
|
|
44
|
+
}
|
|
45
|
+
async [_c = A_StateMachineFeatures.onBeforeTransition](...args) {
|
|
46
|
+
}
|
|
47
|
+
async [_b = A_StateMachineFeatures.onAfterTransition](...args) {
|
|
48
|
+
}
|
|
49
|
+
async [_a = A_StateMachineFeatures.onError](...args) {
|
|
50
|
+
}
|
|
51
|
+
async transition(from, to, props) {
|
|
52
|
+
await this.ready;
|
|
53
|
+
const transitionName = `${A_FormatterHelper.toCamelCase(String(from))}_${A_FormatterHelper.toCamelCase(String(to))}`;
|
|
54
|
+
const transition = new A_StateMachineTransition({
|
|
55
|
+
from: String(from),
|
|
56
|
+
to: String(to),
|
|
57
|
+
props
|
|
58
|
+
});
|
|
59
|
+
const scope = new A_Scope({
|
|
60
|
+
name: `A-StateMachine-Transition-Scope-${transitionName}`,
|
|
61
|
+
fragments: [transition]
|
|
62
|
+
}).inherit(A_Context.scope(this));
|
|
63
|
+
try {
|
|
64
|
+
await this.call(A_StateMachineFeatures.onBeforeTransition, scope);
|
|
65
|
+
await this.call(transitionName, scope);
|
|
66
|
+
await this.call(A_StateMachineFeatures.onAfterTransition, scope);
|
|
67
|
+
scope.destroy();
|
|
68
|
+
return transition.result;
|
|
69
|
+
} catch (error) {
|
|
70
|
+
const wrappedError = new A_StateMachineError({
|
|
71
|
+
title: A_StateMachineError.TransitionError,
|
|
72
|
+
description: `An error occurred while transitioning to "${transitionName}"`,
|
|
73
|
+
originalError: error
|
|
74
|
+
});
|
|
75
|
+
scope.register(wrappedError);
|
|
76
|
+
await this.call(A_StateMachineFeatures.onError, scope);
|
|
77
|
+
scope.destroy();
|
|
78
|
+
throw wrappedError;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
};
|
|
82
|
+
__decorateClass([
|
|
83
|
+
A_Feature.Extend()
|
|
84
|
+
], A_StateMachine.prototype, _d, 1);
|
|
85
|
+
__decorateClass([
|
|
86
|
+
A_Feature.Extend()
|
|
87
|
+
], A_StateMachine.prototype, _c, 1);
|
|
88
|
+
__decorateClass([
|
|
89
|
+
A_Feature.Extend()
|
|
90
|
+
], A_StateMachine.prototype, _b, 1);
|
|
91
|
+
__decorateClass([
|
|
92
|
+
A_Feature.Extend()
|
|
93
|
+
], A_StateMachine.prototype, _a, 1);
|
|
94
|
+
__decorateClass([
|
|
95
|
+
A_Frame.Method({
|
|
96
|
+
name: "transition",
|
|
97
|
+
description: "Executes a state transition from one state to another."
|
|
98
|
+
})
|
|
99
|
+
], A_StateMachine.prototype, "transition", 1);
|
|
100
|
+
A_StateMachine = __decorateClass([
|
|
101
|
+
A_Frame.Namespace("A-Utils"),
|
|
102
|
+
A_Frame.Component({
|
|
103
|
+
name: "A-StateMachine",
|
|
104
|
+
description: "A powerful state machine component for managing complex state transitions."
|
|
105
|
+
})
|
|
106
|
+
], A_StateMachine);
|
|
107
|
+
|
|
108
|
+
export { A_StateMachine };
|
|
109
|
+
//# sourceMappingURL=A-StateMachine.component.mjs.map
|
|
110
|
+
//# sourceMappingURL=A-StateMachine.component.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/lib/A-StateMachine/A-StateMachine.component.ts"],"names":[],"mappings":"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","file":"A-StateMachine.component.mjs","sourcesContent":["import { A_Component, A_Context, A_Feature, A_FormatterHelper, A_Scope } from \"@adaas/a-concept\";\nimport { A_StateMachineError } from \"./A-StateMachine.error\";\nimport { A_StateMachineFeatures } from \"./A-StateMachine.constants\";\nimport { A_StateMachineTransition } from \"./A-StateMachineTransition.context\";\nimport { A_Frame } from \"@adaas/a-frame\";\n\n/**\n * A_StateMachine is a powerful state machine implementation that allows you to define and manage\n * complex state transitions with validation, hooks, and error handling.\n * \n * @template T - A record type defining the state transitions and their associated data types.\n * Each key represents a state name, and the value represents the data type for that state.\n * \n * @example\n * ```typescript\n * interface OrderStates {\n * pending: { orderId: string };\n * processing: { orderId: string; processedBy: string };\n * completed: { orderId: string; completedAt: Date };\n * cancelled: { orderId: string; reason: string };\n * }\n * \n * class OrderStateMachine extends A_StateMachine<OrderStates> {\n * // Define custom transition logic\n * async pending_processing(scope: A_Scope) {\n * const operation = scope.resolve(A_StateMachineTransition)!;\n * const { orderId } = operation.props;\n * // Custom validation and business logic\n * }\n * }\n * ```\n */\n\n@A_Frame.Namespace('A-Utils')\n@A_Frame.Component({\n name: 'A-StateMachine',\n description: 'A powerful state machine component for managing complex state transitions.'\n})\nexport class A_StateMachine<\n T extends Record<string, any> = Record<string, any>\n> extends A_Component {\n\n /**\n * Internal promise that tracks the initialization state of the state machine.\n * Used to ensure the state machine is properly initialized before allowing transitions.\n */\n protected _initialized?: Promise<void>;\n\n /**\n * Gets a promise that resolves when the state machine is fully initialized and ready for transitions.\n * This ensures that all initialization hooks have been executed before allowing state transitions.\n * \n * @returns Promise<void> that resolves when initialization is complete\n * \n * @example\n * ```typescript\n * const stateMachine = new MyStateMachine();\n * await stateMachine.ready; // Wait for initialization\n * await stateMachine.transition('idle', 'running');\n * ```\n */\n get ready(): Promise<void> {\n if (!this._initialized) {\n this._initialized = new Promise<void>(\n async (resolve, reject) => {\n try {\n await this.call(A_StateMachineFeatures.onInitialize);\n\n resolve();\n } catch (error) {\n const wrappedError = new A_StateMachineError({\n title: A_StateMachineError.InitializationError,\n description: `An error occurred during state machine initialization.`,\n originalError: error\n });\n\n reject(wrappedError);\n }\n }\n );\n }\n\n return this._initialized;\n }\n\n\n\n /**\n * Initialization hook that runs when the state machine is first created.\n * This method can be extended to add custom initialization logic.\n * \n * @param args - Variable arguments passed during initialization\n * @returns Promise<void>\n * \n * @example\n * ```typescript\n * class MyStateMachine extends A_StateMachine {\n * @A_Feature.Extend()\n * async [A_StateMachineFeatures.onInitialize]() {\n * // Custom initialization logic\n * console.log('State machine initialized');\n * }\n * }\n * ```\n */\n @A_Feature.Extend()\n async [A_StateMachineFeatures.onInitialize](...args: any[]): Promise<void> {\n // Initialization logic can be added here\n }\n\n /**\n * Hook that runs before any state transition occurs.\n * Use this to add validation, logging, or preparation logic that should run for all transitions.\n * \n * @param args - Variable arguments, typically includes the transition scope\n * @returns Promise<void>\n * \n * @example\n * ```typescript\n * class MyStateMachine extends A_StateMachine {\n * @A_Feature.Extend()\n * async [A_StateMachineFeatures.onBeforeTransition](scope: A_Scope) {\n * const operation = scope.resolve(A_StateMachineTransition)!;\n * console.log(`Transitioning from ${operation.props.from} to ${operation.props.to}`);\n * }\n * }\n * ```\n */\n @A_Feature.Extend()\n async [A_StateMachineFeatures.onBeforeTransition](...args: any[]): Promise<void> {\n\n }\n\n /**\n * Hook that runs after a successful state transition.\n * Use this to add cleanup, logging, or post-transition logic that should run for all transitions.\n * \n * @param args - Variable arguments, typically includes the transition scope\n * @returns Promise<void>\n * \n * @example\n * ```typescript\n * class MyStateMachine extends A_StateMachine {\n * @A_Feature.Extend()\n * async [A_StateMachineFeatures.onAfterTransition](scope: A_Scope) {\n * const operation = scope.resolve(A_StateMachineTransition)!;\n * console.log(`Successfully transitioned to ${operation.props.to}`);\n * }\n * }\n * ```\n */\n @A_Feature.Extend()\n async [A_StateMachineFeatures.onAfterTransition](...args: any[]): Promise<void> {\n\n }\n\n /**\n * Error handling hook that runs when a transition fails.\n * Use this to add custom error handling, logging, or recovery logic.\n * \n * @param args - Variable arguments, typically includes the error scope\n * @returns Promise<void>\n * \n * @example\n * ```typescript\n * class MyStateMachine extends A_StateMachine {\n * @A_Feature.Extend()\n * async [A_StateMachineFeatures.onError](scope: A_Scope) {\n * const error = scope.resolve(A_StateMachineError);\n * console.error('Transition failed:', error?.message);\n * }\n * }\n * ```\n */\n @A_Feature.Extend()\n async [A_StateMachineFeatures.onError](...args: any[]): Promise<void> {\n // Default error handling logic can be added here\n }\n\n\n\n /**\n * Executes a state transition from one state to another.\n * This is the core method of the state machine that handles the complete transition lifecycle.\n * \n * @param from - The state to transition from (must be a key of T)\n * @param to - The state to transition to (must be a key of T)\n * @param props - Optional properties to pass to the transition context (should match T[keyof T])\n * @returns Promise<void> that resolves when the transition is complete\n * \n * @throws {A_StateMachineError} When the transition fails for any reason\n * \n * @example\n * ```typescript\n * interface OrderStates {\n * pending: { orderId: string };\n * processing: { orderId: string; processedBy: string };\n * }\n * \n * const orderMachine = new A_StateMachine<OrderStates>();\n * \n * // Transition with props\n * await orderMachine.transition('pending', 'processing', {\n * orderId: '12345',\n * processedBy: 'user-456'\n * });\n * ```\n * \n * The transition process follows this lifecycle:\n * 1. Wait for state machine initialization (ready)\n * 2. Create transition name in camelCase format (e.g., \"pending_processing\")\n * 3. Create operation context with transition data\n * 4. Create isolated scope for the transition\n * 5. Call onBeforeTransition hook\n * 6. Execute the specific transition method (if defined)\n * 7. Call onAfterTransition hook\n * 8. Clean up scope and return result\n * \n * If any step fails, the onError hook is called and a wrapped error is thrown.\n */\n @A_Frame.Method({\n name: 'transition',\n description: 'Executes a state transition from one state to another.'\n })\n async transition(\n /**\n * The state to transition from\n */\n from: keyof T,\n /**\n * The state to transition to\n */\n to: keyof T,\n /**\n * Optional properties to pass to the transition context\n */\n props?: T[keyof T]\n ): Promise<void> {\n\n await this.ready;\n\n const transitionName = `${A_FormatterHelper.toCamelCase(String(from))}_${A_FormatterHelper.toCamelCase(String(to))}`;\n\n const transition = new A_StateMachineTransition({\n from: String(from),\n to: String(to),\n props\n });\n\n const scope = new A_Scope({\n name: `A-StateMachine-Transition-Scope-${transitionName}`,\n fragments: [transition]\n })\n .inherit(A_Context.scope(this));\n\n try {\n\n await this.call(A_StateMachineFeatures.onBeforeTransition, scope);\n\n await this.call(transitionName, scope);\n\n await this.call(A_StateMachineFeatures.onAfterTransition, scope);\n\n scope.destroy();\n\n return transition.result;\n\n } catch (error) {\n const wrappedError = new A_StateMachineError({\n title: A_StateMachineError.TransitionError,\n description: `An error occurred while transitioning to \"${transitionName}\"`,\n originalError: error\n });\n\n scope.register(wrappedError);\n\n await this.call(A_StateMachineFeatures.onError, scope);\n\n scope.destroy();\n\n throw wrappedError;\n }\n }\n}\n\n\n"]}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
declare enum A_StateMachineFeatures {
|
|
2
|
+
/**
|
|
3
|
+
* Allows to extend error handling logic and behavior
|
|
4
|
+
*/
|
|
5
|
+
onError = "_A_StateMachine_onError",
|
|
6
|
+
/**
|
|
7
|
+
* Allows to extend initialization logic and behavior
|
|
8
|
+
*/
|
|
9
|
+
onInitialize = "_A_StateMachine_onInitialize",
|
|
10
|
+
/**
|
|
11
|
+
* Allows to extend transition validation logic and behavior
|
|
12
|
+
*/
|
|
13
|
+
onBeforeTransition = "_A_StateMachine_onBeforeTransition",
|
|
14
|
+
/**
|
|
15
|
+
* Allows to extend post-transition logic and behavior
|
|
16
|
+
*/
|
|
17
|
+
onAfterTransition = "_A_StateMachine_onAfterTransition"
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export { A_StateMachineFeatures };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
declare enum A_StateMachineFeatures {
|
|
2
|
+
/**
|
|
3
|
+
* Allows to extend error handling logic and behavior
|
|
4
|
+
*/
|
|
5
|
+
onError = "_A_StateMachine_onError",
|
|
6
|
+
/**
|
|
7
|
+
* Allows to extend initialization logic and behavior
|
|
8
|
+
*/
|
|
9
|
+
onInitialize = "_A_StateMachine_onInitialize",
|
|
10
|
+
/**
|
|
11
|
+
* Allows to extend transition validation logic and behavior
|
|
12
|
+
*/
|
|
13
|
+
onBeforeTransition = "_A_StateMachine_onBeforeTransition",
|
|
14
|
+
/**
|
|
15
|
+
* Allows to extend post-transition logic and behavior
|
|
16
|
+
*/
|
|
17
|
+
onAfterTransition = "_A_StateMachine_onAfterTransition"
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export { A_StateMachineFeatures };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var A_StateMachineFeatures = /* @__PURE__ */ ((A_StateMachineFeatures2) => {
|
|
4
|
+
A_StateMachineFeatures2["onError"] = "_A_StateMachine_onError";
|
|
5
|
+
A_StateMachineFeatures2["onInitialize"] = "_A_StateMachine_onInitialize";
|
|
6
|
+
A_StateMachineFeatures2["onBeforeTransition"] = "_A_StateMachine_onBeforeTransition";
|
|
7
|
+
A_StateMachineFeatures2["onAfterTransition"] = "_A_StateMachine_onAfterTransition";
|
|
8
|
+
return A_StateMachineFeatures2;
|
|
9
|
+
})(A_StateMachineFeatures || {});
|
|
10
|
+
|
|
11
|
+
exports.A_StateMachineFeatures = A_StateMachineFeatures;
|
|
12
|
+
//# sourceMappingURL=A-StateMachine.constants.js.map
|
|
13
|
+
//# sourceMappingURL=A-StateMachine.constants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/lib/A-StateMachine/A-StateMachine.constants.ts"],"names":["A_StateMachineFeatures"],"mappings":";;AAAO,IAAK,sBAAA,qBAAAA,uBAAAA,KAAL;AAIH,EAAAA,wBAAA,SAAA,CAAA,GAAU,yBAAA;AAIV,EAAAA,wBAAA,cAAA,CAAA,GAAe,8BAAA;AAIf,EAAAA,wBAAA,oBAAA,CAAA,GAAqB,oCAAA;AAIrB,EAAAA,wBAAA,mBAAA,CAAA,GAAoB,mCAAA;AAhBZ,EAAA,OAAAA,uBAAAA;AAAA,CAAA,EAAA,sBAAA,IAAA,EAAA","file":"A-StateMachine.constants.js","sourcesContent":["export enum A_StateMachineFeatures {\n /**\n * Allows to extend error handling logic and behavior\n */\n onError = '_A_StateMachine_onError',\n /**\n * Allows to extend initialization logic and behavior\n */\n onInitialize = '_A_StateMachine_onInitialize',\n /**\n * Allows to extend transition validation logic and behavior\n */\n onBeforeTransition = '_A_StateMachine_onBeforeTransition',\n /**\n * Allows to extend post-transition logic and behavior\n */\n onAfterTransition = '_A_StateMachine_onAfterTransition',\n}"]}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import '../../chunk-EQQGB2QZ.mjs';
|
|
2
|
+
|
|
3
|
+
var A_StateMachineFeatures = /* @__PURE__ */ ((A_StateMachineFeatures2) => {
|
|
4
|
+
A_StateMachineFeatures2["onError"] = "_A_StateMachine_onError";
|
|
5
|
+
A_StateMachineFeatures2["onInitialize"] = "_A_StateMachine_onInitialize";
|
|
6
|
+
A_StateMachineFeatures2["onBeforeTransition"] = "_A_StateMachine_onBeforeTransition";
|
|
7
|
+
A_StateMachineFeatures2["onAfterTransition"] = "_A_StateMachine_onAfterTransition";
|
|
8
|
+
return A_StateMachineFeatures2;
|
|
9
|
+
})(A_StateMachineFeatures || {});
|
|
10
|
+
|
|
11
|
+
export { A_StateMachineFeatures };
|
|
12
|
+
//# sourceMappingURL=A-StateMachine.constants.mjs.map
|
|
13
|
+
//# sourceMappingURL=A-StateMachine.constants.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/lib/A-StateMachine/A-StateMachine.constants.ts"],"names":["A_StateMachineFeatures"],"mappings":";;AAAO,IAAK,sBAAA,qBAAAA,uBAAAA,KAAL;AAIH,EAAAA,wBAAA,SAAA,CAAA,GAAU,yBAAA;AAIV,EAAAA,wBAAA,cAAA,CAAA,GAAe,8BAAA;AAIf,EAAAA,wBAAA,oBAAA,CAAA,GAAqB,oCAAA;AAIrB,EAAAA,wBAAA,mBAAA,CAAA,GAAoB,mCAAA;AAhBZ,EAAA,OAAAA,uBAAAA;AAAA,CAAA,EAAA,sBAAA,IAAA,EAAA","file":"A-StateMachine.constants.mjs","sourcesContent":["export enum A_StateMachineFeatures {\n /**\n * Allows to extend error handling logic and behavior\n */\n onError = '_A_StateMachine_onError',\n /**\n * Allows to extend initialization logic and behavior\n */\n onInitialize = '_A_StateMachine_onInitialize',\n /**\n * Allows to extend transition validation logic and behavior\n */\n onBeforeTransition = '_A_StateMachine_onBeforeTransition',\n /**\n * Allows to extend post-transition logic and behavior\n */\n onAfterTransition = '_A_StateMachine_onAfterTransition',\n}"]}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { A_Error } from '@adaas/a-concept';
|
|
2
|
+
|
|
3
|
+
declare class A_StateMachineError extends A_Error {
|
|
4
|
+
static readonly InitializationError = "A-StateMachine Initialization Error";
|
|
5
|
+
static readonly TransitionError = "A-StateMachine Transition Error";
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export { A_StateMachineError };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { A_Error } from '@adaas/a-concept';
|
|
2
|
+
|
|
3
|
+
declare class A_StateMachineError extends A_Error {
|
|
4
|
+
static readonly InitializationError = "A-StateMachine Initialization Error";
|
|
5
|
+
static readonly TransitionError = "A-StateMachine Transition Error";
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export { A_StateMachineError };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var aConcept = require('@adaas/a-concept');
|
|
4
|
+
|
|
5
|
+
class A_StateMachineError extends aConcept.A_Error {
|
|
6
|
+
}
|
|
7
|
+
A_StateMachineError.InitializationError = "A-StateMachine Initialization Error";
|
|
8
|
+
A_StateMachineError.TransitionError = "A-StateMachine Transition Error";
|
|
9
|
+
|
|
10
|
+
exports.A_StateMachineError = A_StateMachineError;
|
|
11
|
+
//# sourceMappingURL=A-StateMachine.error.js.map
|
|
12
|
+
//# sourceMappingURL=A-StateMachine.error.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/lib/A-StateMachine/A-StateMachine.error.ts"],"names":["A_Error"],"mappings":";;;;AAGO,MAAM,4BAA4BA,gBAAA,CAAQ;AAMjD;AANa,mBAAA,CAEO,mBAAA,GAAsB,qCAAA;AAF7B,mBAAA,CAIO,eAAA,GAAkB,iCAAA","file":"A-StateMachine.error.js","sourcesContent":["import { A_Error } from \"@adaas/a-concept\";\n\n\nexport class A_StateMachineError extends A_Error {\n\n static readonly InitializationError = 'A-StateMachine Initialization Error';\n\n static readonly TransitionError = 'A-StateMachine Transition Error';\n \n}"]}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import '../../chunk-EQQGB2QZ.mjs';
|
|
2
|
+
import { A_Error } from '@adaas/a-concept';
|
|
3
|
+
|
|
4
|
+
class A_StateMachineError extends A_Error {
|
|
5
|
+
}
|
|
6
|
+
A_StateMachineError.InitializationError = "A-StateMachine Initialization Error";
|
|
7
|
+
A_StateMachineError.TransitionError = "A-StateMachine Transition Error";
|
|
8
|
+
|
|
9
|
+
export { A_StateMachineError };
|
|
10
|
+
//# sourceMappingURL=A-StateMachine.error.mjs.map
|
|
11
|
+
//# sourceMappingURL=A-StateMachine.error.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/lib/A-StateMachine/A-StateMachine.error.ts"],"names":[],"mappings":";;;AAGO,MAAM,4BAA4B,OAAA,CAAQ;AAMjD;AANa,mBAAA,CAEO,mBAAA,GAAsB,qCAAA;AAF7B,mBAAA,CAIO,eAAA,GAAkB,iCAAA","file":"A-StateMachine.error.mjs","sourcesContent":["import { A_Error } from \"@adaas/a-concept\";\n\n\nexport class A_StateMachineError extends A_Error {\n\n static readonly InitializationError = 'A-StateMachine Initialization Error';\n\n static readonly TransitionError = 'A-StateMachine Transition Error';\n \n}"]}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { A_Operation_Storage } from '../A-Operation/A-Operation.types.mjs';
|
|
2
|
+
import '@adaas/a-concept';
|
|
3
|
+
|
|
4
|
+
type A_StateMachineTransitionParams<T = any> = {
|
|
5
|
+
from: string;
|
|
6
|
+
to: string;
|
|
7
|
+
props?: T;
|
|
8
|
+
};
|
|
9
|
+
type A_StateMachineTransitionStorage<_ResultType extends any = any, _ParamsType extends any = any> = {
|
|
10
|
+
from: string;
|
|
11
|
+
to: string;
|
|
12
|
+
} & A_Operation_Storage<_ResultType, A_StateMachineTransitionParams<_ParamsType>>;
|
|
13
|
+
|
|
14
|
+
export type { A_StateMachineTransitionParams, A_StateMachineTransitionStorage };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { A_Operation_Storage } from '../A-Operation/A-Operation.types.js';
|
|
2
|
+
import '@adaas/a-concept';
|
|
3
|
+
|
|
4
|
+
type A_StateMachineTransitionParams<T = any> = {
|
|
5
|
+
from: string;
|
|
6
|
+
to: string;
|
|
7
|
+
props?: T;
|
|
8
|
+
};
|
|
9
|
+
type A_StateMachineTransitionStorage<_ResultType extends any = any, _ParamsType extends any = any> = {
|
|
10
|
+
from: string;
|
|
11
|
+
to: string;
|
|
12
|
+
} & A_Operation_Storage<_ResultType, A_StateMachineTransitionParams<_ParamsType>>;
|
|
13
|
+
|
|
14
|
+
export type { A_StateMachineTransitionParams, A_StateMachineTransitionStorage };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"A-StateMachine.types.js"}
|