From 528bc0133e7296083b1b2cb7472a8dda6b2009a1 Mon Sep 17 00:00:00 2001 From: FedericoAmura Date: Fri, 20 Dec 2024 17:18:06 +0100 Subject: [PATCH] feat: rename automation package to event-listener --- .../{automation => event-listener}/.babelrc | 0 .../.eslintrc.json | 0 .../{automation => event-listener}/README.md | 8 ++++---- .../jest.config.ts | 2 +- .../package.json | 4 ++-- .../project.json | 18 +++++++++--------- .../src/index.ts | 0 .../src/lib/actions/action.ts | 0 .../src/lib/actions/index.ts | 0 .../src/lib/actions/lit-action.ts | 0 .../src/lib/actions/log-context.ts | 0 .../src/lib/actions/mint-capacity-credit.ts | 0 .../src/lib/actions/mint-pkp.ts | 0 .../src/lib/actions/transaction.ts | 0 .../src/lib/context/index.ts | 0 .../src/lib/context/machine-context.spec.ts | 0 .../src/lib/context/machine-context.ts | 0 .../src/lib/listeners/constant.spec.ts | 0 .../src/lib/listeners/constant.ts | 0 .../src/lib/listeners/evm-block.spec.ts | 0 .../src/lib/listeners/evm-block.ts | 0 .../lib/listeners/evm-contract-event.spec.ts | 0 .../src/lib/listeners/evm-contract-event.ts | 0 .../src/lib/listeners/fetch.spec.ts | 0 .../src/lib/listeners/fetch.ts | 0 .../src/lib/listeners/index.ts | 0 .../src/lib/listeners/interval.spec.ts | 0 .../src/lib/listeners/interval.ts | 0 .../src/lib/listeners/listener.spec.ts | 0 .../src/lib/listeners/listener.ts | 0 .../src/lib/listeners/timer.spec.ts | 0 .../src/lib/listeners/timer.ts | 0 .../src/lib/litActions.ts | 0 .../src/lib/state-machine.spec.ts | 0 .../src/lib/state-machine.ts | 0 .../src/lib/states/index.ts | 0 .../src/lib/states/state.spec.ts | 0 .../src/lib/states/state.ts | 0 .../src/lib/transitions/index.ts | 0 .../src/lib/transitions/transition.spec.ts | 0 .../src/lib/transitions/transition.ts | 0 .../src/lib/types.ts | 0 .../src/lib/utils/chain.ts | 0 .../src/lib/utils/erc20.ts | 0 .../tsconfig.json | 0 .../tsconfig.lib.json | 0 .../tsconfig.spec.json | 0 47 files changed, 16 insertions(+), 16 deletions(-) rename packages/{automation => event-listener}/.babelrc (100%) rename packages/{automation => event-listener}/.eslintrc.json (100%) rename packages/{automation => event-listener}/README.md (98%) rename packages/{automation => event-listener}/jest.config.ts (84%) rename packages/{automation => event-listener}/package.json (86%) rename packages/{automation => event-listener}/project.json (54%) rename packages/{automation => event-listener}/src/index.ts (100%) rename packages/{automation => event-listener}/src/lib/actions/action.ts (100%) rename packages/{automation => event-listener}/src/lib/actions/index.ts (100%) rename packages/{automation => event-listener}/src/lib/actions/lit-action.ts (100%) rename packages/{automation => event-listener}/src/lib/actions/log-context.ts (100%) rename packages/{automation => event-listener}/src/lib/actions/mint-capacity-credit.ts (100%) rename packages/{automation => event-listener}/src/lib/actions/mint-pkp.ts (100%) rename packages/{automation => event-listener}/src/lib/actions/transaction.ts (100%) rename packages/{automation => event-listener}/src/lib/context/index.ts (100%) rename packages/{automation => event-listener}/src/lib/context/machine-context.spec.ts (100%) rename packages/{automation => event-listener}/src/lib/context/machine-context.ts (100%) rename packages/{automation => event-listener}/src/lib/listeners/constant.spec.ts (100%) rename packages/{automation => event-listener}/src/lib/listeners/constant.ts (100%) rename packages/{automation => event-listener}/src/lib/listeners/evm-block.spec.ts (100%) rename packages/{automation => event-listener}/src/lib/listeners/evm-block.ts (100%) rename packages/{automation => event-listener}/src/lib/listeners/evm-contract-event.spec.ts (100%) rename packages/{automation => event-listener}/src/lib/listeners/evm-contract-event.ts (100%) rename packages/{automation => event-listener}/src/lib/listeners/fetch.spec.ts (100%) rename packages/{automation => event-listener}/src/lib/listeners/fetch.ts (100%) rename packages/{automation => event-listener}/src/lib/listeners/index.ts (100%) rename packages/{automation => event-listener}/src/lib/listeners/interval.spec.ts (100%) rename packages/{automation => event-listener}/src/lib/listeners/interval.ts (100%) rename packages/{automation => event-listener}/src/lib/listeners/listener.spec.ts (100%) rename packages/{automation => event-listener}/src/lib/listeners/listener.ts (100%) rename packages/{automation => event-listener}/src/lib/listeners/timer.spec.ts (100%) rename packages/{automation => event-listener}/src/lib/listeners/timer.ts (100%) rename packages/{automation => event-listener}/src/lib/litActions.ts (100%) rename packages/{automation => event-listener}/src/lib/state-machine.spec.ts (100%) rename packages/{automation => event-listener}/src/lib/state-machine.ts (100%) rename packages/{automation => event-listener}/src/lib/states/index.ts (100%) rename packages/{automation => event-listener}/src/lib/states/state.spec.ts (100%) rename packages/{automation => event-listener}/src/lib/states/state.ts (100%) rename packages/{automation => event-listener}/src/lib/transitions/index.ts (100%) rename packages/{automation => event-listener}/src/lib/transitions/transition.spec.ts (100%) rename packages/{automation => event-listener}/src/lib/transitions/transition.ts (100%) rename packages/{automation => event-listener}/src/lib/types.ts (100%) rename packages/{automation => event-listener}/src/lib/utils/chain.ts (100%) rename packages/{automation => event-listener}/src/lib/utils/erc20.ts (100%) rename packages/{automation => event-listener}/tsconfig.json (100%) rename packages/{automation => event-listener}/tsconfig.lib.json (100%) rename packages/{automation => event-listener}/tsconfig.spec.json (100%) diff --git a/packages/automation/.babelrc b/packages/event-listener/.babelrc similarity index 100% rename from packages/automation/.babelrc rename to packages/event-listener/.babelrc diff --git a/packages/automation/.eslintrc.json b/packages/event-listener/.eslintrc.json similarity index 100% rename from packages/automation/.eslintrc.json rename to packages/event-listener/.eslintrc.json diff --git a/packages/automation/README.md b/packages/event-listener/README.md similarity index 98% rename from packages/automation/README.md rename to packages/event-listener/README.md index 4430516df5..bc0c660a9c 100644 --- a/packages/automation/README.md +++ b/packages/event-listener/README.md @@ -1,8 +1,8 @@ -# @lit-protocol/automation +# @lit-protocol/event-listener A TypeScript library for creating and managing automated workflows using Lit Protocol. -The automation package provides a flexible state machine implementation that allows you to: +The event listener package provides a flexible state machine implementation that allows you to: - Execute automated Lit Action workflows based on custom triggers, such as events on blockchains or off-chain platforms - Automate the minting of PKPs, Capacity Credits, and other Lit operations @@ -13,9 +13,9 @@ The automation package provides a flexible state machine implementation that all ## Installation ```bash -npm install @lit-protocol/automation +npm install @lit-protocol/event-listener # or -yarn add @lit-protocol/automation +yarn add @lit-protocol/event-listener ``` ## Core Concepts diff --git a/packages/automation/jest.config.ts b/packages/event-listener/jest.config.ts similarity index 84% rename from packages/automation/jest.config.ts rename to packages/event-listener/jest.config.ts index 46f114b5e6..a31f92f507 100644 --- a/packages/automation/jest.config.ts +++ b/packages/event-listener/jest.config.ts @@ -11,6 +11,6 @@ export default { '^.+\\.[t]s$': 'ts-jest', }, moduleFileExtensions: ['ts', 'js', 'html'], - coverageDirectory: '../../coverage/packages/automation', + coverageDirectory: '../../coverage/packages/event-listener', setupFilesAfterEnv: ['../../jest.setup.js'], }; diff --git a/packages/automation/package.json b/packages/event-listener/package.json similarity index 86% rename from packages/automation/package.json rename to packages/event-listener/package.json index 3ef2ab5724..240f1cf14c 100644 --- a/packages/automation/package.json +++ b/packages/event-listener/package.json @@ -1,5 +1,5 @@ { - "name": "@lit-protocol/automation", + "name": "@lit-protocol/event-listener", "type": "commonjs", "license": "MIT", "homepage": "https://github.com/Lit-Protocol/js-sdk", @@ -15,7 +15,7 @@ }, "publishConfig": { "access": "public", - "directory": "../../dist/packages/automation" + "directory": "../../dist/packages/event-listener" }, "tags": [ "universal" diff --git a/packages/automation/project.json b/packages/event-listener/project.json similarity index 54% rename from packages/automation/project.json rename to packages/event-listener/project.json index 52dc6246c0..5274d0c615 100644 --- a/packages/automation/project.json +++ b/packages/event-listener/project.json @@ -1,7 +1,7 @@ { - "name": "automation", + "name": "event-listener", "$schema": "../../node_modules/nx/schemas/project-schema.json", - "sourceRoot": "packages/automation/src", + "sourceRoot": "packages/event-listener/src", "projectType": "library", "targets": { "build": { @@ -9,10 +9,10 @@ "executor": "@nx/js:tsc", "outputs": ["{options.outputPath}"], "options": { - "outputPath": "dist/packages/automation", - "main": "packages/automation/src/index.ts", - "tsConfig": "packages/automation/tsconfig.lib.json", - "assets": ["packages/automation/*.md"], + "outputPath": "dist/packages/event-listener", + "main": "packages/event-listener/src/index.ts", + "tsConfig": "packages/event-listener/tsconfig.lib.json", + "assets": ["packages/event-listener/*.md"], "updateBuildableProjectDepsInPackageJson": true }, "dependsOn": ["^build"] @@ -21,14 +21,14 @@ "executor": "@nx/linter:eslint", "outputs": ["{options.outputFile}"], "options": { - "lintFilePatterns": ["packages/automation/**/*.ts"] + "lintFilePatterns": ["packages/event-listener/**/*.ts"] } }, "test": { "executor": "@nx/jest:jest", - "outputs": ["{workspaceRoot}/coverage/packages/automation"], + "outputs": ["{workspaceRoot}/coverage/packages/event-listener"], "options": { - "jestConfig": "packages/automation/jest.config.ts", + "jestConfig": "packages/event-listener/jest.config.ts", "passWithNoTests": true } } diff --git a/packages/automation/src/index.ts b/packages/event-listener/src/index.ts similarity index 100% rename from packages/automation/src/index.ts rename to packages/event-listener/src/index.ts diff --git a/packages/automation/src/lib/actions/action.ts b/packages/event-listener/src/lib/actions/action.ts similarity index 100% rename from packages/automation/src/lib/actions/action.ts rename to packages/event-listener/src/lib/actions/action.ts diff --git a/packages/automation/src/lib/actions/index.ts b/packages/event-listener/src/lib/actions/index.ts similarity index 100% rename from packages/automation/src/lib/actions/index.ts rename to packages/event-listener/src/lib/actions/index.ts diff --git a/packages/automation/src/lib/actions/lit-action.ts b/packages/event-listener/src/lib/actions/lit-action.ts similarity index 100% rename from packages/automation/src/lib/actions/lit-action.ts rename to packages/event-listener/src/lib/actions/lit-action.ts diff --git a/packages/automation/src/lib/actions/log-context.ts b/packages/event-listener/src/lib/actions/log-context.ts similarity index 100% rename from packages/automation/src/lib/actions/log-context.ts rename to packages/event-listener/src/lib/actions/log-context.ts diff --git a/packages/automation/src/lib/actions/mint-capacity-credit.ts b/packages/event-listener/src/lib/actions/mint-capacity-credit.ts similarity index 100% rename from packages/automation/src/lib/actions/mint-capacity-credit.ts rename to packages/event-listener/src/lib/actions/mint-capacity-credit.ts diff --git a/packages/automation/src/lib/actions/mint-pkp.ts b/packages/event-listener/src/lib/actions/mint-pkp.ts similarity index 100% rename from packages/automation/src/lib/actions/mint-pkp.ts rename to packages/event-listener/src/lib/actions/mint-pkp.ts diff --git a/packages/automation/src/lib/actions/transaction.ts b/packages/event-listener/src/lib/actions/transaction.ts similarity index 100% rename from packages/automation/src/lib/actions/transaction.ts rename to packages/event-listener/src/lib/actions/transaction.ts diff --git a/packages/automation/src/lib/context/index.ts b/packages/event-listener/src/lib/context/index.ts similarity index 100% rename from packages/automation/src/lib/context/index.ts rename to packages/event-listener/src/lib/context/index.ts diff --git a/packages/automation/src/lib/context/machine-context.spec.ts b/packages/event-listener/src/lib/context/machine-context.spec.ts similarity index 100% rename from packages/automation/src/lib/context/machine-context.spec.ts rename to packages/event-listener/src/lib/context/machine-context.spec.ts diff --git a/packages/automation/src/lib/context/machine-context.ts b/packages/event-listener/src/lib/context/machine-context.ts similarity index 100% rename from packages/automation/src/lib/context/machine-context.ts rename to packages/event-listener/src/lib/context/machine-context.ts diff --git a/packages/automation/src/lib/listeners/constant.spec.ts b/packages/event-listener/src/lib/listeners/constant.spec.ts similarity index 100% rename from packages/automation/src/lib/listeners/constant.spec.ts rename to packages/event-listener/src/lib/listeners/constant.spec.ts diff --git a/packages/automation/src/lib/listeners/constant.ts b/packages/event-listener/src/lib/listeners/constant.ts similarity index 100% rename from packages/automation/src/lib/listeners/constant.ts rename to packages/event-listener/src/lib/listeners/constant.ts diff --git a/packages/automation/src/lib/listeners/evm-block.spec.ts b/packages/event-listener/src/lib/listeners/evm-block.spec.ts similarity index 100% rename from packages/automation/src/lib/listeners/evm-block.spec.ts rename to packages/event-listener/src/lib/listeners/evm-block.spec.ts diff --git a/packages/automation/src/lib/listeners/evm-block.ts b/packages/event-listener/src/lib/listeners/evm-block.ts similarity index 100% rename from packages/automation/src/lib/listeners/evm-block.ts rename to packages/event-listener/src/lib/listeners/evm-block.ts diff --git a/packages/automation/src/lib/listeners/evm-contract-event.spec.ts b/packages/event-listener/src/lib/listeners/evm-contract-event.spec.ts similarity index 100% rename from packages/automation/src/lib/listeners/evm-contract-event.spec.ts rename to packages/event-listener/src/lib/listeners/evm-contract-event.spec.ts diff --git a/packages/automation/src/lib/listeners/evm-contract-event.ts b/packages/event-listener/src/lib/listeners/evm-contract-event.ts similarity index 100% rename from packages/automation/src/lib/listeners/evm-contract-event.ts rename to packages/event-listener/src/lib/listeners/evm-contract-event.ts diff --git a/packages/automation/src/lib/listeners/fetch.spec.ts b/packages/event-listener/src/lib/listeners/fetch.spec.ts similarity index 100% rename from packages/automation/src/lib/listeners/fetch.spec.ts rename to packages/event-listener/src/lib/listeners/fetch.spec.ts diff --git a/packages/automation/src/lib/listeners/fetch.ts b/packages/event-listener/src/lib/listeners/fetch.ts similarity index 100% rename from packages/automation/src/lib/listeners/fetch.ts rename to packages/event-listener/src/lib/listeners/fetch.ts diff --git a/packages/automation/src/lib/listeners/index.ts b/packages/event-listener/src/lib/listeners/index.ts similarity index 100% rename from packages/automation/src/lib/listeners/index.ts rename to packages/event-listener/src/lib/listeners/index.ts diff --git a/packages/automation/src/lib/listeners/interval.spec.ts b/packages/event-listener/src/lib/listeners/interval.spec.ts similarity index 100% rename from packages/automation/src/lib/listeners/interval.spec.ts rename to packages/event-listener/src/lib/listeners/interval.spec.ts diff --git a/packages/automation/src/lib/listeners/interval.ts b/packages/event-listener/src/lib/listeners/interval.ts similarity index 100% rename from packages/automation/src/lib/listeners/interval.ts rename to packages/event-listener/src/lib/listeners/interval.ts diff --git a/packages/automation/src/lib/listeners/listener.spec.ts b/packages/event-listener/src/lib/listeners/listener.spec.ts similarity index 100% rename from packages/automation/src/lib/listeners/listener.spec.ts rename to packages/event-listener/src/lib/listeners/listener.spec.ts diff --git a/packages/automation/src/lib/listeners/listener.ts b/packages/event-listener/src/lib/listeners/listener.ts similarity index 100% rename from packages/automation/src/lib/listeners/listener.ts rename to packages/event-listener/src/lib/listeners/listener.ts diff --git a/packages/automation/src/lib/listeners/timer.spec.ts b/packages/event-listener/src/lib/listeners/timer.spec.ts similarity index 100% rename from packages/automation/src/lib/listeners/timer.spec.ts rename to packages/event-listener/src/lib/listeners/timer.spec.ts diff --git a/packages/automation/src/lib/listeners/timer.ts b/packages/event-listener/src/lib/listeners/timer.ts similarity index 100% rename from packages/automation/src/lib/listeners/timer.ts rename to packages/event-listener/src/lib/listeners/timer.ts diff --git a/packages/automation/src/lib/litActions.ts b/packages/event-listener/src/lib/litActions.ts similarity index 100% rename from packages/automation/src/lib/litActions.ts rename to packages/event-listener/src/lib/litActions.ts diff --git a/packages/automation/src/lib/state-machine.spec.ts b/packages/event-listener/src/lib/state-machine.spec.ts similarity index 100% rename from packages/automation/src/lib/state-machine.spec.ts rename to packages/event-listener/src/lib/state-machine.spec.ts diff --git a/packages/automation/src/lib/state-machine.ts b/packages/event-listener/src/lib/state-machine.ts similarity index 100% rename from packages/automation/src/lib/state-machine.ts rename to packages/event-listener/src/lib/state-machine.ts diff --git a/packages/automation/src/lib/states/index.ts b/packages/event-listener/src/lib/states/index.ts similarity index 100% rename from packages/automation/src/lib/states/index.ts rename to packages/event-listener/src/lib/states/index.ts diff --git a/packages/automation/src/lib/states/state.spec.ts b/packages/event-listener/src/lib/states/state.spec.ts similarity index 100% rename from packages/automation/src/lib/states/state.spec.ts rename to packages/event-listener/src/lib/states/state.spec.ts diff --git a/packages/automation/src/lib/states/state.ts b/packages/event-listener/src/lib/states/state.ts similarity index 100% rename from packages/automation/src/lib/states/state.ts rename to packages/event-listener/src/lib/states/state.ts diff --git a/packages/automation/src/lib/transitions/index.ts b/packages/event-listener/src/lib/transitions/index.ts similarity index 100% rename from packages/automation/src/lib/transitions/index.ts rename to packages/event-listener/src/lib/transitions/index.ts diff --git a/packages/automation/src/lib/transitions/transition.spec.ts b/packages/event-listener/src/lib/transitions/transition.spec.ts similarity index 100% rename from packages/automation/src/lib/transitions/transition.spec.ts rename to packages/event-listener/src/lib/transitions/transition.spec.ts diff --git a/packages/automation/src/lib/transitions/transition.ts b/packages/event-listener/src/lib/transitions/transition.ts similarity index 100% rename from packages/automation/src/lib/transitions/transition.ts rename to packages/event-listener/src/lib/transitions/transition.ts diff --git a/packages/automation/src/lib/types.ts b/packages/event-listener/src/lib/types.ts similarity index 100% rename from packages/automation/src/lib/types.ts rename to packages/event-listener/src/lib/types.ts diff --git a/packages/automation/src/lib/utils/chain.ts b/packages/event-listener/src/lib/utils/chain.ts similarity index 100% rename from packages/automation/src/lib/utils/chain.ts rename to packages/event-listener/src/lib/utils/chain.ts diff --git a/packages/automation/src/lib/utils/erc20.ts b/packages/event-listener/src/lib/utils/erc20.ts similarity index 100% rename from packages/automation/src/lib/utils/erc20.ts rename to packages/event-listener/src/lib/utils/erc20.ts diff --git a/packages/automation/tsconfig.json b/packages/event-listener/tsconfig.json similarity index 100% rename from packages/automation/tsconfig.json rename to packages/event-listener/tsconfig.json diff --git a/packages/automation/tsconfig.lib.json b/packages/event-listener/tsconfig.lib.json similarity index 100% rename from packages/automation/tsconfig.lib.json rename to packages/event-listener/tsconfig.lib.json diff --git a/packages/automation/tsconfig.spec.json b/packages/event-listener/tsconfig.spec.json similarity index 100% rename from packages/automation/tsconfig.spec.json rename to packages/event-listener/tsconfig.spec.json