From 3d459b711d2f5e7c81b30c72857d337cc535f6e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=9Acibor=20Rudnicki?= Date: Wed, 12 Nov 2025 20:34:15 +0000 Subject: [PATCH 01/21] Initial commit. --- .gitignore | 45 + README.md | 63 + eslint.config.mts | 53 + ng-package.json | 7 + package-lock.json | 1705 ++++++++++++++++++++++++++++ package.json | 53 + src/lib/hooks-base.class.ts | 47 + src/lib/hooks-core.abstract.ts | 21 + src/lib/index.ts | 4 + src/lib/object-hooks-base.class.ts | 45 + src/lib/object-hooks.class.ts | 5 + src/public-api.ts | 10 + tsconfig.eslint.json | 5 + tsconfig.lib.json | 18 + tsconfig.lib.prod.json | 11 + tsconfig.spec.json | 14 + 16 files changed, 2106 insertions(+) create mode 100644 .gitignore create mode 100644 README.md create mode 100644 eslint.config.mts create mode 100644 ng-package.json create mode 100644 package-lock.json create mode 100644 package.json create mode 100644 src/lib/hooks-base.class.ts create mode 100644 src/lib/hooks-core.abstract.ts create mode 100644 src/lib/index.ts create mode 100644 src/lib/object-hooks-base.class.ts create mode 100644 src/lib/object-hooks.class.ts create mode 100644 src/public-api.ts create mode 100644 tsconfig.eslint.json create mode 100644 tsconfig.lib.json create mode 100644 tsconfig.lib.prod.json create mode 100644 tsconfig.spec.json diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..3a183d6 --- /dev/null +++ b/.gitignore @@ -0,0 +1,45 @@ +# See https://docs.github.com/get-started/getting-started-with-git/ignoring-files for more about ignoring files. + +# Compiled output +/dist +/tmp +/out-tsc +/bazel-out + +# Node +/node_modules +npm-debug.log +yarn-error.log + +# IDEs and editors +.idea/ +.project +.classpath +.c9/ +*.launch +.settings/ +*.sublime-workspace + +# Visual Studio Code +.vscode/* +!.vscode/settings.json +!.vscode/tasks.json +!.vscode/launch.json +!.vscode/extensions.json +.history/* + +# Miscellaneous +/.angular/cache +.sass-cache/ +/connect.lock +/coverage +/libpeerconnection.log +testem.log +/typings + +# System files +.DS_Store +Thumbs.db + +*.ignore* +temp \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..88a9ad4 --- /dev/null +++ b/README.md @@ -0,0 +1,63 @@ +# Hooks + +This project was generated using [Angular CLI](https://github.com/angular/angular-cli) version 20.3.0. + +## Code scaffolding + +Angular CLI includes powerful code scaffolding tools. To generate a new component, run: + +```bash +ng generate component component-name +``` + +For a complete list of available schematics (such as `components`, `directives`, or `pipes`), run: + +```bash +ng generate --help +``` + +## Building + +To build the library, run: + +```bash +ng build hooks +``` + +This command will compile your project, and the build artifacts will be placed in the `dist/` directory. + +### Publishing the Library + +Once the project is built, you can publish your library by following these steps: + +1. Navigate to the `dist` directory: + ```bash + cd dist/hooks + ``` + +2. Run the `npm publish` command to publish your library to the npm registry: + ```bash + npm publish + ``` + +## Running unit tests + +To execute unit tests with the [Karma](https://karma-runner.github.io) test runner, use the following command: + +```bash +ng test +``` + +## Running end-to-end tests + +For end-to-end (e2e) testing, run: + +```bash +ng e2e +``` + +Angular CLI does not come with an end-to-end testing framework by default. You can choose one that suits your needs. + +## Additional Resources + +For more information on using the Angular CLI, including detailed command references, visit the [Angular CLI Overview and Command Reference](https://angular.dev/tools/cli) page. diff --git a/eslint.config.mts b/eslint.config.mts new file mode 100644 index 0000000..edd556f --- /dev/null +++ b/eslint.config.mts @@ -0,0 +1,53 @@ +import js from "@eslint/js"; +import globals from "globals"; +import tseslint from "typescript-eslint"; +import { defineConfig } from "eslint/config"; + +export default defineConfig([ + { + files: ["**/*.{js,mjs,cjs,ts,mts,cts}"], + plugins: { js }, + extends: ["js/recommended"], + languageOptions: { globals: globals.browser } + }, + tseslint.configs.recommended, + { + files: ["**/*.{ts,tsx,mts,cts}"], + plugins: { "@typescript-eslint": tseslint.plugin }, + languageOptions: { + parser: tseslint.parser, + parserOptions: { project: "./tsconfig.eslint.json" } + }, + rules: { + // ...tseslint.configs.recommended, + "@typescript-eslint/no-unused-expressions": "off", + "@typescript-eslint/member-ordering": [ + "error", + { + "default": [ + // Static fields + "public-static-field", + "protected-static-field", + "private-static-field", + // Static methods + "public-static-method", + "protected-static-method", + "private-static-method", + // Instance fields + "public-instance-field", + "protected-instance-field", + "private-instance-field", + // Constructor + "public-constructor", + // Instance methods + "public-instance-method", + "protected-instance-method", + "private-instance-method" + // Note: The rule does NOT distinguish JS #private fields/methods natively. + // To check for #private ordering, use code review and consistent style. + ] + } + ] + } + } +]); diff --git a/ng-package.json b/ng-package.json new file mode 100644 index 0000000..9d63500 --- /dev/null +++ b/ng-package.json @@ -0,0 +1,7 @@ +{ + "$schema": "../../node_modules/ng-packagr/ng-package.schema.json", + "dest": "../../dist/hooks", + "lib": { + "entryFile": "src/public-api.ts" + } +} \ No newline at end of file diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..069ffd8 --- /dev/null +++ b/package-lock.json @@ -0,0 +1,1705 @@ +{ + "name": "@typescript-package/hooks", + "version": "1.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "@typescript-package/hooks", + "version": "1.0.0", + "funding": [ + { + "type": "stripe", + "url": "https://donate.stripe.com/dR614hfDZcJE3wAcMM" + }, + { + "type": "individual", + "url": "https://checkout.revolut.com/pay/048b10a3-0e10-42c8-a917-e3e9cb4c8e29" + } + ], + "license": "MIT", + "devDependencies": { + "@eslint/js": "^9.39.1", + "@typescript-eslint/eslint-plugin": "^8.46.3", + "@typescript-eslint/parser": "^8.46.3", + "eslint": "^9.39.1", + "globals": "^16.5.0", + "jiti": "^2.6.1", + "typescript": "^5.9.3", + "typescript-eslint": "^8.46.3" + }, + "peerDependencies": { + "@typedly/callback": "^2.0.0", + "@typedly/hooks": "^1.0.0" + } + }, + "node_modules/@eslint-community/eslint-utils": { + "version": "4.9.0", + "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.9.0.tgz", + "integrity": "sha512-ayVFHdtZ+hsq1t2Dy24wCmGXGe4q9Gu3smhLYALJrr473ZH27MsnSL+LKUlimp4BWJqMDMLmPpx/Q9R3OAlL4g==", + "dev": true, + "license": "MIT", + "dependencies": { + "eslint-visitor-keys": "^3.4.3" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + }, + "peerDependencies": { + "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" + } + }, + "node_modules/@eslint-community/eslint-utils/node_modules/eslint-visitor-keys": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", + "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/@eslint-community/regexpp": { + "version": "4.12.2", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.12.2.tgz", + "integrity": "sha512-EriSTlt5OC9/7SXkRSCAhfSxxoSUgBm33OH+IkwbdpgoqsSsUg7y3uh+IICI/Qg4BBWr3U2i39RpmycbxMq4ew==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^12.0.0 || ^14.0.0 || >=16.0.0" + } + }, + "node_modules/@eslint/config-array": { + "version": "0.21.1", + "resolved": "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.21.1.tgz", + "integrity": "sha512-aw1gNayWpdI/jSYVgzN5pL0cfzU02GT3NBpeT/DXbx1/1x7ZKxFPd9bwrzygx/qiwIQiJ1sw/zD8qY/kRvlGHA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@eslint/object-schema": "^2.1.7", + "debug": "^4.3.1", + "minimatch": "^3.1.2" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/config-helpers": { + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/@eslint/config-helpers/-/config-helpers-0.4.2.tgz", + "integrity": "sha512-gBrxN88gOIf3R7ja5K9slwNayVcZgK6SOUORm2uBzTeIEfeVaIhOpCtTox3P6R7o2jLFwLFTLnC7kU/RGcYEgw==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@eslint/core": "^0.17.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/core": { + "version": "0.17.0", + "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.17.0.tgz", + "integrity": "sha512-yL/sLrpmtDaFEiUj1osRP4TI2MDz1AddJL+jZ7KSqvBuliN4xqYY54IfdN8qD8Toa6g1iloph1fxQNkjOxrrpQ==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@types/json-schema": "^7.0.15" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/eslintrc": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-3.3.1.tgz", + "integrity": "sha512-gtF186CXhIl1p4pJNGZw8Yc6RlshoePRvE0X91oPGb3vZ8pM3qOS9W9NGPat9LziaBV7XrJWGylNQXkGcnM3IQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ajv": "^6.12.4", + "debug": "^4.3.2", + "espree": "^10.0.1", + "globals": "^14.0.0", + "ignore": "^5.2.0", + "import-fresh": "^3.2.1", + "js-yaml": "^4.1.0", + "minimatch": "^3.1.2", + "strip-json-comments": "^3.1.1" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/@eslint/eslintrc/node_modules/globals": { + "version": "14.0.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-14.0.0.tgz", + "integrity": "sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@eslint/js": { + "version": "9.39.1", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.39.1.tgz", + "integrity": "sha512-S26Stp4zCy88tH94QbBv3XCuzRQiZ9yXofEILmglYTh/Ug/a9/umqvgFtYBAo3Lp0nsI/5/qH1CCrbdK3AP1Tw==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://eslint.org/donate" + } + }, + "node_modules/@eslint/object-schema": { + "version": "2.1.7", + "resolved": "https://registry.npmjs.org/@eslint/object-schema/-/object-schema-2.1.7.tgz", + "integrity": "sha512-VtAOaymWVfZcmZbp6E2mympDIHvyjXs/12LqWYjVw6qjrfF+VK+fyG33kChz3nnK+SU5/NeHOqrTEHS8sXO3OA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/plugin-kit": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.4.1.tgz", + "integrity": "sha512-43/qtrDUokr7LJqoF2c3+RInu/t4zfrpYdoSDfYyhg52rwLV6TnOvdG4fXm7IkSB3wErkcmJS9iEhjVtOSEjjA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@eslint/core": "^0.17.0", + "levn": "^0.4.1" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@humanfs/core": { + "version": "0.19.1", + "resolved": "https://registry.npmjs.org/@humanfs/core/-/core-0.19.1.tgz", + "integrity": "sha512-5DyQ4+1JEUzejeK1JGICcideyfUbGixgS9jNgex5nqkW+cY7WZhxBigmieN5Qnw9ZosSNVC9KQKyb+GUaGyKUA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=18.18.0" + } + }, + "node_modules/@humanfs/node": { + "version": "0.16.7", + "resolved": "https://registry.npmjs.org/@humanfs/node/-/node-0.16.7.tgz", + "integrity": "sha512-/zUx+yOsIrG4Y43Eh2peDeKCxlRt/gET6aHfaKpuq267qXdYDFViVHfMaLyygZOnl0kGWxFIgsBy8QFuTLUXEQ==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@humanfs/core": "^0.19.1", + "@humanwhocodes/retry": "^0.4.0" + }, + "engines": { + "node": ">=18.18.0" + } + }, + "node_modules/@humanwhocodes/module-importer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", + "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=12.22" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } + }, + "node_modules/@humanwhocodes/retry": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.4.3.tgz", + "integrity": "sha512-bV0Tgo9K4hfPCek+aMAn81RppFKv2ySDQeMoSZuvTASywNTnVJCArCZE2FWqpvIatKu7VMRLWlR1EazvVhDyhQ==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=18.18" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } + }, + "node_modules/@nodelib/fs.scandir": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.walk": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@typedly/callback": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@typedly/callback/-/callback-2.0.0.tgz", + "integrity": "sha512-gRxeDFOvmaENiYpoSBE5mbaCMorX2d1V1jCLe9N0WPJIg+lnczCwnK24zj7UiXvMprp5BYvgT+qauHTJdpkcxA==", + "funding": [ + { + "type": "stripe", + "url": "https://donate.stripe.com/dR614hfDZcJE3wAcMM" + }, + { + "type": "revolut", + "url": "https://checkout.revolut.com/pay/048b10a3-0e10-42c8-a917-e3e9cb4c8e29" + } + ], + "license": "MIT", + "peer": true + }, + "node_modules/@typedly/hooks": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@typedly/hooks/-/hooks-1.0.0.tgz", + "integrity": "sha512-VaeFnM9j06d7CBqOItt4WsepgWUP+oKb9XoS/Z1uqn4V6xXegidIj4ae5Od4GQhNahGxgaLOPb7epQ2n3eTXaQ==", + "funding": [ + { + "type": "stripe", + "url": "https://donate.stripe.com/dR614hfDZcJE3wAcMM" + }, + { + "type": "revolut", + "url": "https://checkout.revolut.com/pay/048b10a3-0e10-42c8-a917-e3e9cb4c8e29" + } + ], + "license": "MIT", + "peer": true, + "peerDependencies": { + "@typedly/callback": "^2.0.0" + } + }, + "node_modules/@types/estree": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.8.tgz", + "integrity": "sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/json-schema": { + "version": "7.0.15", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", + "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@typescript-eslint/eslint-plugin": { + "version": "8.46.4", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.46.4.tgz", + "integrity": "sha512-R48VhmTJqplNyDxCyqqVkFSZIx1qX6PzwqgcXn1olLrzxcSBDlOsbtcnQuQhNtnNiJ4Xe5gREI1foajYaYU2Vg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@eslint-community/regexpp": "^4.10.0", + "@typescript-eslint/scope-manager": "8.46.4", + "@typescript-eslint/type-utils": "8.46.4", + "@typescript-eslint/utils": "8.46.4", + "@typescript-eslint/visitor-keys": "8.46.4", + "graphemer": "^1.4.0", + "ignore": "^7.0.0", + "natural-compare": "^1.4.0", + "ts-api-utils": "^2.1.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "@typescript-eslint/parser": "^8.46.4", + "eslint": "^8.57.0 || ^9.0.0", + "typescript": ">=4.8.4 <6.0.0" + } + }, + "node_modules/@typescript-eslint/eslint-plugin/node_modules/ignore": { + "version": "7.0.5", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-7.0.5.tgz", + "integrity": "sha512-Hs59xBNfUIunMFgWAbGX5cq6893IbWg4KnrjbYwX3tx0ztorVgTDA6B2sxf8ejHJ4wz8BqGUMYlnzNBer5NvGg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, + "node_modules/@typescript-eslint/parser": { + "version": "8.46.4", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.46.4.tgz", + "integrity": "sha512-tK3GPFWbirvNgsNKto+UmB/cRtn6TZfyw0D6IKrW55n6Vbs7KJoZtI//kpTKzE/DUmmnAFD8/Ca46s7Obs92/w==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/scope-manager": "8.46.4", + "@typescript-eslint/types": "8.46.4", + "@typescript-eslint/typescript-estree": "8.46.4", + "@typescript-eslint/visitor-keys": "8.46.4", + "debug": "^4.3.4" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0", + "typescript": ">=4.8.4 <6.0.0" + } + }, + "node_modules/@typescript-eslint/project-service": { + "version": "8.46.4", + "resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.46.4.tgz", + "integrity": "sha512-nPiRSKuvtTN+no/2N1kt2tUh/HoFzeEgOm9fQ6XQk4/ApGqjx0zFIIaLJ6wooR1HIoozvj2j6vTi/1fgAz7UYQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/tsconfig-utils": "^8.46.4", + "@typescript-eslint/types": "^8.46.4", + "debug": "^4.3.4" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "typescript": ">=4.8.4 <6.0.0" + } + }, + "node_modules/@typescript-eslint/scope-manager": { + "version": "8.46.4", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.46.4.tgz", + "integrity": "sha512-tMDbLGXb1wC+McN1M6QeDx7P7c0UWO5z9CXqp7J8E+xGcJuUuevWKxuG8j41FoweS3+L41SkyKKkia16jpX7CA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "8.46.4", + "@typescript-eslint/visitor-keys": "8.46.4" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/tsconfig-utils": { + "version": "8.46.4", + "resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.46.4.tgz", + "integrity": "sha512-+/XqaZPIAk6Cjg7NWgSGe27X4zMGqrFqZ8atJsX3CWxH/jACqWnrWI68h7nHQld0y+k9eTTjb9r+KU4twLoo9A==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "typescript": ">=4.8.4 <6.0.0" + } + }, + "node_modules/@typescript-eslint/type-utils": { + "version": "8.46.4", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.46.4.tgz", + "integrity": "sha512-V4QC8h3fdT5Wro6vANk6eojqfbv5bpwHuMsBcJUJkqs2z5XnYhJzyz9Y02eUmF9u3PgXEUiOt4w4KHR3P+z0PQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "8.46.4", + "@typescript-eslint/typescript-estree": "8.46.4", + "@typescript-eslint/utils": "8.46.4", + "debug": "^4.3.4", + "ts-api-utils": "^2.1.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0", + "typescript": ">=4.8.4 <6.0.0" + } + }, + "node_modules/@typescript-eslint/types": { + "version": "8.46.4", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.46.4.tgz", + "integrity": "sha512-USjyxm3gQEePdUwJBFjjGNG18xY9A2grDVGuk7/9AkjIF1L+ZrVnwR5VAU5JXtUnBL/Nwt3H31KlRDaksnM7/w==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/typescript-estree": { + "version": "8.46.4", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.46.4.tgz", + "integrity": "sha512-7oV2qEOr1d4NWNmpXLR35LvCfOkTNymY9oyW+lUHkmCno7aOmIf/hMaydnJBUTBMRCOGZh8YjkFOc8dadEoNGA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/project-service": "8.46.4", + "@typescript-eslint/tsconfig-utils": "8.46.4", + "@typescript-eslint/types": "8.46.4", + "@typescript-eslint/visitor-keys": "8.46.4", + "debug": "^4.3.4", + "fast-glob": "^3.3.2", + "is-glob": "^4.0.3", + "minimatch": "^9.0.4", + "semver": "^7.6.0", + "ts-api-utils": "^2.1.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "typescript": ">=4.8.4 <6.0.0" + } + }, + "node_modules/@typescript-eslint/typescript-estree/node_modules/brace-expansion": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz", + "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/@typescript-eslint/utils": { + "version": "8.46.4", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.46.4.tgz", + "integrity": "sha512-AbSv11fklGXV6T28dp2Me04Uw90R2iJ30g2bgLz529Koehrmkbs1r7paFqr1vPCZi7hHwYxYtxfyQMRC8QaVSg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@eslint-community/eslint-utils": "^4.7.0", + "@typescript-eslint/scope-manager": "8.46.4", + "@typescript-eslint/types": "8.46.4", + "@typescript-eslint/typescript-estree": "8.46.4" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0", + "typescript": ">=4.8.4 <6.0.0" + } + }, + "node_modules/@typescript-eslint/visitor-keys": { + "version": "8.46.4", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.46.4.tgz", + "integrity": "sha512-/++5CYLQqsO9HFGLI7APrxBJYo+5OCMpViuhV8q5/Qa3o5mMrF//eQHks+PXcsAVaLdn817fMuS7zqoXNNZGaw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "8.46.4", + "eslint-visitor-keys": "^4.2.1" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/acorn": { + "version": "8.15.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.15.0.tgz", + "integrity": "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==", + "dev": true, + "license": "MIT", + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/acorn-jsx": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", + "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", + "dev": true, + "license": "MIT", + "peerDependencies": { + "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" + } + }, + "node_modules/ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, + "license": "MIT", + "dependencies": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true, + "license": "Python-2.0" + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true, + "license": "MIT" + }, + "node_modules/brace-expansion": { + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", + "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/braces": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", + "dev": true, + "license": "MIT", + "dependencies": { + "fill-range": "^7.1.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true, + "license": "MIT" + }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", + "dev": true, + "license": "MIT" + }, + "node_modules/cross-spawn": { + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", + "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", + "dev": true, + "license": "MIT", + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/debug": { + "version": "4.4.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz", + "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/deep-is": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", + "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint": { + "version": "9.39.1", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.39.1.tgz", + "integrity": "sha512-BhHmn2yNOFA9H9JmmIVKJmd288g9hrVRDkdoIgRCRuSySRUHH7r/DI6aAXW9T1WwUuY3DFgrcaqB+deURBLR5g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@eslint-community/eslint-utils": "^4.8.0", + "@eslint-community/regexpp": "^4.12.1", + "@eslint/config-array": "^0.21.1", + "@eslint/config-helpers": "^0.4.2", + "@eslint/core": "^0.17.0", + "@eslint/eslintrc": "^3.3.1", + "@eslint/js": "9.39.1", + "@eslint/plugin-kit": "^0.4.1", + "@humanfs/node": "^0.16.6", + "@humanwhocodes/module-importer": "^1.0.1", + "@humanwhocodes/retry": "^0.4.2", + "@types/estree": "^1.0.6", + "ajv": "^6.12.4", + "chalk": "^4.0.0", + "cross-spawn": "^7.0.6", + "debug": "^4.3.2", + "escape-string-regexp": "^4.0.0", + "eslint-scope": "^8.4.0", + "eslint-visitor-keys": "^4.2.1", + "espree": "^10.4.0", + "esquery": "^1.5.0", + "esutils": "^2.0.2", + "fast-deep-equal": "^3.1.3", + "file-entry-cache": "^8.0.0", + "find-up": "^5.0.0", + "glob-parent": "^6.0.2", + "ignore": "^5.2.0", + "imurmurhash": "^0.1.4", + "is-glob": "^4.0.0", + "json-stable-stringify-without-jsonify": "^1.0.1", + "lodash.merge": "^4.6.2", + "minimatch": "^3.1.2", + "natural-compare": "^1.4.0", + "optionator": "^0.9.3" + }, + "bin": { + "eslint": "bin/eslint.js" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://eslint.org/donate" + }, + "peerDependencies": { + "jiti": "*" + }, + "peerDependenciesMeta": { + "jiti": { + "optional": true + } + } + }, + "node_modules/eslint-scope": { + "version": "8.4.0", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-8.4.0.tgz", + "integrity": "sha512-sNXOfKCn74rt8RICKMvJS7XKV/Xk9kA7DyJr8mJik3S7Cwgy3qlkkmyS2uQB3jiJg6VNdZd/pDBJu0nvG2NlTg==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "esrecurse": "^4.3.0", + "estraverse": "^5.2.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint-visitor-keys": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.1.tgz", + "integrity": "sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/espree": { + "version": "10.4.0", + "resolved": "https://registry.npmjs.org/espree/-/espree-10.4.0.tgz", + "integrity": "sha512-j6PAQ2uUr79PZhBjP5C5fhl8e39FmRnOjsD5lGnWrFU8i2G776tBK7+nP8KuQUTTyAZUwfQqXAgrVH5MbH9CYQ==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "acorn": "^8.15.0", + "acorn-jsx": "^5.3.2", + "eslint-visitor-keys": "^4.2.1" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/esquery": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.6.0.tgz", + "integrity": "sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "estraverse": "^5.1.0" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/esrecurse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "estraverse": "^5.2.0" + }, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=4.0" + } + }, + "node_modules/esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true, + "license": "MIT" + }, + "node_modules/fast-glob": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.3.tgz", + "integrity": "sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.8" + }, + "engines": { + "node": ">=8.6.0" + } + }, + "node_modules/fast-glob/node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "license": "ISC", + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", + "dev": true, + "license": "MIT" + }, + "node_modules/fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", + "dev": true, + "license": "MIT" + }, + "node_modules/fastq": { + "version": "1.19.1", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.19.1.tgz", + "integrity": "sha512-GwLTyxkCXjXbxqIhTsMI2Nui8huMPtnxg7krajPJAjnEG/iiOS7i+zCtWGZR9G0NBKbXKh6X9m9UIsYX/N6vvQ==", + "dev": true, + "license": "ISC", + "dependencies": { + "reusify": "^1.0.4" + } + }, + "node_modules/file-entry-cache": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-8.0.0.tgz", + "integrity": "sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "flat-cache": "^4.0.0" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/fill-range": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", + "dev": true, + "license": "MIT", + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "dev": true, + "license": "MIT", + "dependencies": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/flat-cache": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-4.0.1.tgz", + "integrity": "sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==", + "dev": true, + "license": "MIT", + "dependencies": { + "flatted": "^3.2.9", + "keyv": "^4.5.4" + }, + "engines": { + "node": ">=16" + } + }, + "node_modules/flatted": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.3.tgz", + "integrity": "sha512-GX+ysw4PBCz0PzosHDepZGANEuFCMLrnRTiEy9McGjmkCQYwRq4A/X786G/fjM/+OjsWSU1ZrY5qyARZmO/uwg==", + "dev": true, + "license": "ISC" + }, + "node_modules/glob-parent": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", + "dev": true, + "license": "ISC", + "dependencies": { + "is-glob": "^4.0.3" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/globals": { + "version": "16.5.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-16.5.0.tgz", + "integrity": "sha512-c/c15i26VrJ4IRt5Z89DnIzCGDn9EcebibhAOjw5ibqEHsE1wLUgkPn9RDmNcUKyU87GeaL633nyJ+pplFR2ZQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/graphemer": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", + "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", + "dev": true, + "license": "MIT" + }, + "node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/ignore": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", + "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, + "node_modules/import-fresh": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.1.tgz", + "integrity": "sha512-TR3KfrTZTYLPB6jUjfx6MF9WcWrHL9su5TObK4ZkYgBdWKPOFoSoQIdEuTuR82pmtxH2spWG9h6etwfr1pLBqQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.8.19" + } + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "dev": true, + "license": "ISC" + }, + "node_modules/jiti": { + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/jiti/-/jiti-2.6.1.tgz", + "integrity": "sha512-ekilCSN1jwRvIbgeg/57YFh8qQDNbwDb9xT/qu2DAHbFFZUicIl4ygVaAvzveMhMVr3LnpSKTNnwt8PoOfmKhQ==", + "dev": true, + "license": "MIT", + "bin": { + "jiti": "lib/jiti-cli.mjs" + } + }, + "node_modules/js-yaml": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.1.tgz", + "integrity": "sha512-qQKT4zQxXl8lLwBtHMWwaTcGfFOZviOJet3Oy/xmGk2gZH677CJM9EvtfdSkgWcATZhj/55JZ0rmy3myCT5lsA==", + "dev": true, + "license": "MIT", + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/json-buffer": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", + "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true, + "license": "MIT" + }, + "node_modules/json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", + "dev": true, + "license": "MIT" + }, + "node_modules/keyv": { + "version": "4.5.4", + "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", + "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==", + "dev": true, + "license": "MIT", + "dependencies": { + "json-buffer": "3.0.1" + } + }, + "node_modules/levn": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", + "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "prelude-ls": "^1.2.1", + "type-check": "~0.4.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-locate": "^5.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/lodash.merge": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", + "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/merge2": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 8" + } + }, + "node_modules/micromatch": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", + "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", + "dev": true, + "license": "MIT", + "dependencies": { + "braces": "^3.0.3", + "picomatch": "^2.3.1" + }, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true, + "license": "MIT" + }, + "node_modules/natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", + "dev": true, + "license": "MIT" + }, + "node_modules/optionator": { + "version": "0.9.4", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz", + "integrity": "sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==", + "dev": true, + "license": "MIT", + "dependencies": { + "deep-is": "^0.1.3", + "fast-levenshtein": "^2.0.6", + "levn": "^0.4.1", + "prelude-ls": "^1.2.1", + "type-check": "^0.4.0", + "word-wrap": "^1.2.5" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-limit": "^3.0.2" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/parent-module": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", + "dev": true, + "license": "MIT", + "dependencies": { + "callsites": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/prelude-ls": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", + "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/punycode": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", + "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/queue-microtask": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/reusify": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.1.0.tgz", + "integrity": "sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw==", + "dev": true, + "license": "MIT", + "engines": { + "iojs": ">=1.0.0", + "node": ">=0.10.0" + } + }, + "node_modules/run-parallel": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT", + "dependencies": { + "queue-microtask": "^1.2.2" + } + }, + "node_modules/semver": { + "version": "7.7.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.3.tgz", + "integrity": "sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "license": "MIT", + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/ts-api-utils": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-2.1.0.tgz", + "integrity": "sha512-CUgTZL1irw8u29bzrOD/nH85jqyc74D6SshFgujOIA7osm2Rz7dYH77agkx7H4FBNxDq7Cjf+IjaX/8zwFW+ZQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18.12" + }, + "peerDependencies": { + "typescript": ">=4.8.4" + } + }, + "node_modules/type-check": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", + "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", + "dev": true, + "license": "MIT", + "dependencies": { + "prelude-ls": "^1.2.1" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/typescript": { + "version": "5.9.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz", + "integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "node_modules/typescript-eslint": { + "version": "8.46.4", + "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.46.4.tgz", + "integrity": "sha512-KALyxkpYV5Ix7UhvjTwJXZv76VWsHG+NjNlt/z+a17SOQSiOcBdUXdbJdyXi7RPxrBFECtFOiPwUJQusJuCqrg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/eslint-plugin": "8.46.4", + "@typescript-eslint/parser": "8.46.4", + "@typescript-eslint/typescript-estree": "8.46.4", + "@typescript-eslint/utils": "8.46.4" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0", + "typescript": ">=4.8.4 <6.0.0" + } + }, + "node_modules/uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "punycode": "^2.1.0" + } + }, + "node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "license": "ISC", + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/word-wrap": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", + "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + } + } +} diff --git a/package.json b/package.json new file mode 100644 index 0000000..a67665e --- /dev/null +++ b/package.json @@ -0,0 +1,53 @@ +{ + "name": "@typescript-package/hooks", + "version": "1.0.0", + "author": "wwwdev.io ", + "description": "A lightweight TypeScript library for hooks management.", + "license": "MIT", + "publishConfig": { + "access": "public", + "registry": "https://registry.npmjs.org" + }, + "devDependencies": { + "@eslint/js": "^9.39.1", + "@typescript-eslint/eslint-plugin": "^8.46.3", + "@typescript-eslint/parser": "^8.46.3", + "eslint": "^9.39.1", + "globals": "^16.5.0", + "jiti": "^2.6.1", + "typescript": "^5.9.3", + "typescript-eslint": "^8.46.3" + }, + "peerDependencies": { + "@typedly/callback": "^2.0.0", + "@typedly/hooks": "^1.0.0" + }, + "scripts": { + "prepublishOnly": "npm run pkg && npm run clean", + "pkg": "npm pkg delete dependencies", + "clean": "npm pkg delete scripts" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/typescript-package/hooks.git" + }, + "bugs": { + "url": "https://github.com/typescript-package/hooks/issues" + }, + "keywords": [ + "@typescript-package", + "@typescript-package/hooks", + "Hooks" + ], + "funding": [ + { + "type": "stripe", + "url": "https://donate.stripe.com/dR614hfDZcJE3wAcMM" + }, + { + "type": "individual", + "url": "https://checkout.revolut.com/pay/048b10a3-0e10-42c8-a917-e3e9cb4c8e29" + } + ], + "sideEffects": false +} diff --git a/src/lib/hooks-base.class.ts b/src/lib/hooks-base.class.ts new file mode 100644 index 0000000..2a1503b --- /dev/null +++ b/src/lib/hooks-base.class.ts @@ -0,0 +1,47 @@ +// Abstract. +import { HooksCore } from "./hooks-core.abstract"; +// Type. +import { OnChangeCallback, OnDestroyCallback, OnSetCallback } from "@typedly/callback"; + +export abstract class HooksBase extends HooksCore { + + protected get onChangeCallback(): OnChangeCallback | undefined { + return this.#onChange; + } + protected get onDestroyCallback(): OnDestroyCallback | undefined { + return this.#onDestroy; + } + + protected get onSetCallback(): (OnSetCallback | undefined) { + return this.#onSet; + } + + #onChange?: OnChangeCallback; + #onDestroy?: OnDestroyCallback; + #onSet?: OnSetCallback; + + constructor({ + onChange, onDestroy, onSet + }: { + onChange?: (value: T, oldValue: T) => void; + onDestroy?: () => void; + onSet?: (value: T) => T + } = {}) { + super(); + this.#onChange = onChange; + this.#onDestroy = onDestroy; + this.#onSet = onSet; + } + + public onChange(callbackfn?: OnChangeCallback): this { + return this.#onChange = callbackfn, this; + } + + public onDestroy(callbackfn?: OnDestroyCallback): this { + return this.#onDestroy = callbackfn, this; + } + + public onSet(callbackfn?: OnSetCallback): this { + return this.#onSet = callbackfn, this; + } +} diff --git a/src/lib/hooks-core.abstract.ts b/src/lib/hooks-core.abstract.ts new file mode 100644 index 0000000..4d7f1f5 --- /dev/null +++ b/src/lib/hooks-core.abstract.ts @@ -0,0 +1,21 @@ +// Type. +import { OnChangeCallback, OnDestroyCallback, OnSetCallback } from "@typedly/callback"; +// Interface. +import { Hooks } from "@typedly/hooks"; +/** + * @description + * @export + * @abstract + * @class HooksCore + * @template T + * @template [Payload=unknown] + * @implements {Hooks} + */ +export abstract class HooksCore implements Hooks { + protected abstract get onChangeCallback(): OnChangeCallback | undefined; + protected abstract get onDestroyCallback(): OnDestroyCallback | undefined; + protected abstract get onSetCallback(): OnSetCallback | undefined; + public abstract onChange(callbackfn?: OnChangeCallback): this; + public abstract onDestroy(callbackfn?: OnDestroyCallback): this; + public abstract onSet(callbackfn?: OnSetCallback): this; +} diff --git a/src/lib/index.ts b/src/lib/index.ts new file mode 100644 index 0000000..888036e --- /dev/null +++ b/src/lib/index.ts @@ -0,0 +1,4 @@ +export { HooksBase } from './hooks-base.class'; +export { ObjectHooksBase } from './object-hooks-base.class'; +export { ObjectHooks } from './object-hooks.class'; +export { HooksCore } from './hooks-core.abstract'; \ No newline at end of file diff --git a/src/lib/object-hooks-base.class.ts b/src/lib/object-hooks-base.class.ts new file mode 100644 index 0000000..0f5aada --- /dev/null +++ b/src/lib/object-hooks-base.class.ts @@ -0,0 +1,45 @@ +import { OnChangeCallback, OnDestroyCallback, OnPropertyChangeCallback, OnSetCallback, OnSetPropertyCallback } from "@typedly/callback"; +import { HooksBase } from "./hooks-base.class"; + + + +export abstract class ObjectHooksBase extends HooksBase { + protected get onPropertyChangeCallback() { + return this.#onPropertyChange; + } + + protected get onSetPropertyCallback() { + return this.#onSetProperty; + } + + #onPropertyChange?: OnPropertyChangeCallback; + #onSetProperty?: OnSetPropertyCallback; + + constructor({ + onChange, + onDestroy, + onPropertyChange, + onSet, + onSetProperty + }: { + onChange?: OnChangeCallback; + onDestroy?: OnDestroyCallback; + onPropertyChange?: OnPropertyChangeCallback; + onSet?: OnSetCallback; + onSetProperty?: OnSetPropertyCallback; + }) { + super({ onChange, onDestroy, onSet }); + this.#onPropertyChange = onPropertyChange; + this.#onSetProperty = onSetProperty; + } + + public onPropertyChange(callbackfn?: OnPropertyChangeCallback): this { + this.#onPropertyChange = callbackfn; + return this; + } + + public onSetProperty(callbackfn?: OnSetPropertyCallback): this { + this.#onSetProperty = callbackfn; + return this; + } +} diff --git a/src/lib/object-hooks.class.ts b/src/lib/object-hooks.class.ts new file mode 100644 index 0000000..a8bed30 --- /dev/null +++ b/src/lib/object-hooks.class.ts @@ -0,0 +1,5 @@ +import { ObjectHooksBase } from "./object-hooks-base.class"; + + +export class ObjectHooks extends ObjectHooksBase { +} diff --git a/src/public-api.ts b/src/public-api.ts new file mode 100644 index 0000000..b2d2695 --- /dev/null +++ b/src/public-api.ts @@ -0,0 +1,10 @@ +/* + * Public API Surface of hooks + */ + +export { + HooksBase, + HooksCore, + ObjectHooks, + ObjectHooksBase +} from './lib'; diff --git a/tsconfig.eslint.json b/tsconfig.eslint.json new file mode 100644 index 0000000..879f51d --- /dev/null +++ b/tsconfig.eslint.json @@ -0,0 +1,5 @@ +{ + "extends": "./tsconfig.lib.json", + "include": ["src/**/*.ts", "src/lib/*.ts", "src/**/*.tsx", "tests/**/*.ts"], + "exclude": ["node_modules", "dist"] +} \ No newline at end of file diff --git a/tsconfig.lib.json b/tsconfig.lib.json new file mode 100644 index 0000000..edb0551 --- /dev/null +++ b/tsconfig.lib.json @@ -0,0 +1,18 @@ +/* To learn more about Typescript configuration file: https://www.typescriptlang.org/docs/handbook/tsconfig-json.html. */ +/* To learn more about Angular compiler options: https://angular.dev/reference/configs/angular-compiler-options. */ +{ + "extends": "../../tsconfig.json", + "compilerOptions": { + "outDir": "../../out-tsc/lib", + "declaration": true, + "declarationMap": true, + "inlineSources": true, + "types": [] + }, + "include": [ + "src/**/*.ts" + ], + "exclude": [ + "**/*.spec.ts" + ] +} diff --git a/tsconfig.lib.prod.json b/tsconfig.lib.prod.json new file mode 100644 index 0000000..9215caa --- /dev/null +++ b/tsconfig.lib.prod.json @@ -0,0 +1,11 @@ +/* To learn more about Typescript configuration file: https://www.typescriptlang.org/docs/handbook/tsconfig-json.html. */ +/* To learn more about Angular compiler options: https://angular.dev/reference/configs/angular-compiler-options. */ +{ + "extends": "./tsconfig.lib.json", + "compilerOptions": { + "declarationMap": false + }, + "angularCompilerOptions": { + "compilationMode": "partial" + } +} diff --git a/tsconfig.spec.json b/tsconfig.spec.json new file mode 100644 index 0000000..0feea88 --- /dev/null +++ b/tsconfig.spec.json @@ -0,0 +1,14 @@ +/* To learn more about Typescript configuration file: https://www.typescriptlang.org/docs/handbook/tsconfig-json.html. */ +/* To learn more about Angular compiler options: https://angular.dev/reference/configs/angular-compiler-options. */ +{ + "extends": "../../tsconfig.json", + "compilerOptions": { + "outDir": "../../out-tsc/spec", + "types": [ + "jasmine" + ] + }, + "include": [ + "src/**/*.ts" + ] +} From 1efbc5878ca17db20c5eabc1e549c94940c090b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=9Acibor=20Rudnicki?= Date: Thu, 13 Nov 2025 15:55:39 +0000 Subject: [PATCH 02/21] chore: change file name to .abstract. --- src/lib/{hooks-base.class.ts => hooks-base.abstract.ts} | 0 ...object-hooks-base.class.ts => object-hooks-base.abstract.ts} | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) rename src/lib/{hooks-base.class.ts => hooks-base.abstract.ts} (100%) rename src/lib/{object-hooks-base.class.ts => object-hooks-base.abstract.ts} (96%) diff --git a/src/lib/hooks-base.class.ts b/src/lib/hooks-base.abstract.ts similarity index 100% rename from src/lib/hooks-base.class.ts rename to src/lib/hooks-base.abstract.ts diff --git a/src/lib/object-hooks-base.class.ts b/src/lib/object-hooks-base.abstract.ts similarity index 96% rename from src/lib/object-hooks-base.class.ts rename to src/lib/object-hooks-base.abstract.ts index 0f5aada..2ebe757 100644 --- a/src/lib/object-hooks-base.class.ts +++ b/src/lib/object-hooks-base.abstract.ts @@ -1,5 +1,5 @@ import { OnChangeCallback, OnDestroyCallback, OnPropertyChangeCallback, OnSetCallback, OnSetPropertyCallback } from "@typedly/callback"; -import { HooksBase } from "./hooks-base.class"; +import { HooksBase } from "./hooks-base.abstract"; From 4798c55aa7089c192c77e0ba484274e4d2516f9f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=9Acibor=20Rudnicki?= Date: Thu, 13 Nov 2025 17:14:55 +0000 Subject: [PATCH 03/21] chore*(FUNDING): add. --- .github/FUNDING.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 .github/FUNDING.yml diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml new file mode 100644 index 0000000..5ec8a6f --- /dev/null +++ b/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: [angular-package] # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] +patreon: angularpackage # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] From 298817b4bd7b78a84c15e30572065023becc0368 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=9Acibor=20Rudnicki?= Date: Thu, 13 Nov 2025 17:15:11 +0000 Subject: [PATCH 04/21] docs: update. --- src/lib/hooks-base.abstract.ts | 57 ++++++++++++--- src/lib/hooks-core.abstract.ts | 80 +++++++++++++++++++++- src/lib/object-hooks-base.abstract.ts | 99 ++++++++++++++++++++++++--- 3 files changed, 216 insertions(+), 20 deletions(-) diff --git a/src/lib/hooks-base.abstract.ts b/src/lib/hooks-base.abstract.ts index 2a1503b..51529fd 100644 --- a/src/lib/hooks-base.abstract.ts +++ b/src/lib/hooks-base.abstract.ts @@ -2,46 +2,85 @@ import { HooksCore } from "./hooks-core.abstract"; // Type. import { OnChangeCallback, OnDestroyCallback, OnSetCallback } from "@typedly/callback"; - +/** + * @description Base abstraction class for hooks functionality. + * @export + * @abstract + * @class HooksBase + * @template T The type of the target. + * @template [Payload=unknown] The type of the payload. + * @extends {HooksCore} + */ export abstract class HooksBase extends HooksCore { - protected get onChangeCallback(): OnChangeCallback | undefined { return this.#onChange; } protected get onDestroyCallback(): OnDestroyCallback | undefined { return this.#onDestroy; } - protected get onSetCallback(): (OnSetCallback | undefined) { return this.#onSet; } + /** + * @description Private `onChange` callback function. + * @type {?OnChangeCallback} + */ #onChange?: OnChangeCallback; + + /** + * @description Private `onDestroy` callback function. + * @type {?OnDestroyCallback} + */ #onDestroy?: OnDestroyCallback; + + /** + * @description Private `onSet` callback function. + * @type {?OnSetCallback} + */ #onSet?: OnSetCallback; + + /** + * Creates an instance of `HooksBase`. + * @constructor + * @param {{ + * onChange?: OnChangeCallback; + * onDestroy?: OnDestroyCallback; + * onSet?: OnSetCallback + * }} [param0={}] + * @param {OnChangeCallback} param0.onChange Sets the `onChange` callback function. + * @param {OnDestroyCallback} param0.onDestroy Sets the `onDestroy` callback function. + * @param {OnSetCallback} param0.onSet Sets the `onSet` callback function. + */ constructor({ onChange, onDestroy, onSet }: { - onChange?: (value: T, oldValue: T) => void; - onDestroy?: () => void; - onSet?: (value: T) => T + onChange?: OnChangeCallback; + onDestroy?: OnDestroyCallback; + onSet?: OnSetCallback } = {}) { super(); this.#onChange = onChange; this.#onDestroy = onDestroy; this.#onSet = onSet; } - public onChange(callbackfn?: OnChangeCallback): this { return this.#onChange = callbackfn, this; } - public onDestroy(callbackfn?: OnDestroyCallback): this { return this.#onDestroy = callbackfn, this; } - public onSet(callbackfn?: OnSetCallback): this { return this.#onSet = callbackfn, this; } + protected triggerOnChange(newValue: T, previousValue: T, payload?: Payload): void { + this.onChangeCallback?.(newValue, previousValue, payload); + } + protected triggerOnDestroy(payload?: Payload): void { + this.onDestroyCallback?.(payload); + } + protected triggerOnSet(value: T, previousValue?: T, payload?: Payload): T { + return this.onSetCallback ? this.onSetCallback(value, previousValue, payload) : value; + } } diff --git a/src/lib/hooks-core.abstract.ts b/src/lib/hooks-core.abstract.ts index 4d7f1f5..85048c4 100644 --- a/src/lib/hooks-core.abstract.ts +++ b/src/lib/hooks-core.abstract.ts @@ -3,19 +3,95 @@ import { OnChangeCallback, OnDestroyCallback, OnSetCallback } from "@typedly/cal // Interface. import { Hooks } from "@typedly/hooks"; /** - * @description + * @description The core abstraction class for hooks functionality. * @export * @abstract * @class HooksCore - * @template T + * @template T The type of the target. * @template [Payload=unknown] * @implements {Hooks} */ export abstract class HooksCore implements Hooks { + /** + * @description Returns the `onChange` callback function. + * @protected + * @abstract + * @readonly + * @type {(OnChangeCallback | undefined)} + */ protected abstract get onChangeCallback(): OnChangeCallback | undefined; + + /** + * @description Returns the `onDestroy` callback function. + * @protected + * @abstract + * @readonly + * @type {(OnDestroyCallback | undefined)} + */ protected abstract get onDestroyCallback(): OnDestroyCallback | undefined; + + /** + * @description Returns the `onSet` callback function. + * @protected + * @abstract + * @readonly + * @type {(OnSetCallback | undefined)} + */ protected abstract get onSetCallback(): OnSetCallback | undefined; + + /** + * @description Sets the `onChange` callback function. + * @public + * @abstract + * @param {?OnChangeCallback} [callbackfn] The callback `onChange` function to set. + * @returns {this} The `this` current instance for chaining. + */ public abstract onChange(callbackfn?: OnChangeCallback): this; + + /** + * @description Sets the `onDestroy` callback function. + * @public + * @abstract + * @param {?OnDestroyCallback} [callbackfn] The callback `onDestroy` function to set. + * @returns {this} The `this` current instance for chaining. + */ public abstract onDestroy(callbackfn?: OnDestroyCallback): this; + + /** + * @description Sets the `onSet` callback function. + * @public + * @abstract + * @param {?OnSetCallback} [callbackfn] The callback `onSet` function to set. + * @returns {this} The `this` current instance for chaining. + */ public abstract onSet(callbackfn?: OnSetCallback): this; + + /** + * @description Triggers the `onChange` callback. + * @protected + * @abstract + * @param {T} newValue The new value. + * @param {T} previousValue The previous value. + * @param {Payload} [payload] Optional payload. + */ + protected abstract triggerOnChange(newValue: T, previousValue: T, payload?: Payload): void; + + /** + * @description Triggers the `onDestroy` callback. + * @protected + * @abstract + * @param {Payload} [payload] Optional payload. + */ + protected abstract triggerOnDestroy(payload?: Payload): void; + + /** + * @description Triggers the `onSet` callback. + * @protected + * @abstract + * @param {T} value The new value. + * @param {T} [previousValue] Optional previous value. + * @param {Payload} [payload] Optional payload. + * @returns {T} The potentially modified value. + */ + protected abstract triggerOnSet(value: T, previousValue?: T, payload?: Payload): T; } diff --git a/src/lib/object-hooks-base.abstract.ts b/src/lib/object-hooks-base.abstract.ts index 2ebe757..69b08ce 100644 --- a/src/lib/object-hooks-base.abstract.ts +++ b/src/lib/object-hooks-base.abstract.ts @@ -1,20 +1,66 @@ -import { OnChangeCallback, OnDestroyCallback, OnPropertyChangeCallback, OnSetCallback, OnSetPropertyCallback } from "@typedly/callback"; +// Abstract. import { HooksBase } from "./hooks-base.abstract"; - - - -export abstract class ObjectHooksBase extends HooksBase { +// Type. +import { OnChangeCallback, OnDestroyCallback, OnPropertyChangeCallback, OnSetCallback, OnSetPropertyCallback } from "@typedly/callback"; +/** + * @description The base abstraction class for object hooks functionality. + * @export + * @abstract + * @class ObjectHooksBase + * @template {object} T The object type. + * @template [Payload=unknown] The payload type. + * @extends {HooksBase} + */ +export abstract class ObjectHooksBase + extends HooksBase { + /** + * @description Returns the `onPropertyChange` callback function. + * @protected + * @readonly + * @type {OnPropertyChangeCallback} + */ protected get onPropertyChangeCallback() { return this.#onPropertyChange; } + /** + * @description Returns the `onSetProperty` callback function. + * @protected + * @readonly + * @type {OnSetPropertyCallback} + */ protected get onSetPropertyCallback() { return this.#onSetProperty; } + /** + * @description The callback function to be invoked on property change. + * @type {?OnPropertyChangeCallback} + */ #onPropertyChange?: OnPropertyChangeCallback; + + /** + * @description The callback function to be invoked on set property. + * @type {?OnSetPropertyCallback} + */ #onSetProperty?: OnSetPropertyCallback; + /** + * Creates an instance of `ObjectHooksBase`. + * @constructor + * @param {{ + * onChange?: OnChangeCallback; + * onDestroy?: OnDestroyCallback; + * onPropertyChange?: OnPropertyChangeCallback; + * onSet?: OnSetCallback; + * onSetProperty?: OnSetPropertyCallback; + * }} param0 + * @param {OnChangeCallback} param0.onChange The callback function to be invoked on change. + * @param {OnDestroyCallback} param0.onDestroy The callback function to be invoked on destroy. + * @param {OnPropertyChangeCallback} param0.onPropertyChange The callback function to be invoked on property change. + * @param {OnSetCallback} param0.onSet The callback function to be invoked on set. + * @param {OnSetPropertyCallback} param0.onSetProperty The callback function to be invoked on set property. + */ constructor({ onChange, onDestroy, @@ -33,13 +79,48 @@ export abstract class ObjectHooksBase exten this.#onSetProperty = onSetProperty; } + /** + * @description Sets the `onPropertyChange` callback function. + * @public + * @param {?OnPropertyChangeCallback} [callbackfn] The callback function to be invoked on property change. + * @returns {this} The `this` instance for chaining. + */ public onPropertyChange(callbackfn?: OnPropertyChangeCallback): this { - this.#onPropertyChange = callbackfn; - return this; + return this.#onPropertyChange = callbackfn, this; } + /** + * @description Sets the `onSetProperty` callback function. + * @public + * @param {?OnSetPropertyCallback} [callbackfn] The callback function to be invoked on set property. + * @returns {this} The `this` instance for chaining. + */ public onSetProperty(callbackfn?: OnSetPropertyCallback): this { - this.#onSetProperty = callbackfn; - return this; + return this.#onSetProperty = callbackfn, this; + } + + /** + * @description Triggers the `onPropertyChange` callback if set. + * @protected + * @param {K} key The property key. + * @param {T[K]} value The new value. + * @param {T[K]} previousValue The previous value. + * @param {Payload} [payload] Optional payload. + */ + protected triggerOnPropertyChange(key: K, value: T[K], previousValue: T[K], payload?: Payload): void { + this.onPropertyChangeCallback?.(key, value, previousValue, payload), this; + } + + /** + * @description Triggers the `onSetProperty` callback if set. + * @protected + * @param {K} key The property key. + * @param {T[K]} value The new value. + * @param {T[K]} previousValue The previous value. + * @param {Payload} [payload] Optional payload. + * @returns {T[K]} The potentially modified value from the callback. + */ + protected triggerOnSetProperty(key: K, value: T[K], previousValue: T[K], payload?: Payload): T[K] { + return this.onSetPropertyCallback ? this.onSetPropertyCallback(key, value, previousValue, payload) : value; } } From 111e474cafefdbe095770110a8e94f31ece2054e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=9Acibor=20Rudnicki?= Date: Thu, 13 Nov 2025 17:15:32 +0000 Subject: [PATCH 05/21] chore(api): update. --- src/lib/index.ts | 8 ++++---- src/public-api.ts | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/lib/index.ts b/src/lib/index.ts index 888036e..3f7dfff 100644 --- a/src/lib/index.ts +++ b/src/lib/index.ts @@ -1,4 +1,4 @@ -export { HooksBase } from './hooks-base.class'; -export { ObjectHooksBase } from './object-hooks-base.class'; -export { ObjectHooks } from './object-hooks.class'; -export { HooksCore } from './hooks-core.abstract'; \ No newline at end of file +// Abstract. +export { HooksBase } from './hooks-base.abstract'; +export { HooksCore } from './hooks-core.abstract'; +export { ObjectHooksBase } from './object-hooks-base.abstract'; diff --git a/src/public-api.ts b/src/public-api.ts index b2d2695..1f0b7b5 100644 --- a/src/public-api.ts +++ b/src/public-api.ts @@ -3,8 +3,8 @@ */ export { + // Abstract. HooksBase, HooksCore, - ObjectHooks, - ObjectHooksBase + ObjectHooksBase, } from './lib'; From 7db690570e22d2084120c9c2bb00dc75e0c0f63b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=9Acibor=20Rudnicki?= Date: Thu, 13 Nov 2025 17:15:43 +0000 Subject: [PATCH 06/21] chore: remove concrete class. --- src/lib/object-hooks.class.ts | 5 ----- 1 file changed, 5 deletions(-) delete mode 100644 src/lib/object-hooks.class.ts diff --git a/src/lib/object-hooks.class.ts b/src/lib/object-hooks.class.ts deleted file mode 100644 index a8bed30..0000000 --- a/src/lib/object-hooks.class.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { ObjectHooksBase } from "./object-hooks-base.class"; - - -export class ObjectHooks extends ObjectHooksBase { -} From 2cb705a2a768959ab2df3a0bc340b3b8c84d9d0f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=9Acibor=20Rudnicki?= Date: Thu, 13 Nov 2025 17:15:50 +0000 Subject: [PATCH 07/21] test: add example. --- src/test/object-hooks-base.spec.ts | 33 ++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 src/test/object-hooks-base.spec.ts diff --git a/src/test/object-hooks-base.spec.ts b/src/test/object-hooks-base.spec.ts new file mode 100644 index 0000000..f0d6437 --- /dev/null +++ b/src/test/object-hooks-base.spec.ts @@ -0,0 +1,33 @@ +/* eslint-disable @typescript-eslint/no-explicit-any */ +import { ObjectHooksBase } from '../lib'; + +class ReactiveObject extends ObjectHooksBase { + private data: T; + + constructor(initial: T, options?: ConstructorParameters>[0]) { + super(options || {}); + this.data = new Proxy(initial, { + set: (target, key, value) => { + if (typeof key === 'string' || typeof key === 'symbol') { + const oldValue = (target as any)[key]; + (target as any)[key] = this.triggerOnSetProperty(key as keyof T, value, oldValue); + this.triggerOnPropertyChange(key as keyof T, value, oldValue); + this.triggerOnChange(target as T, this.data); + } + return true; + }, + }); + } + + get value(): T { + return this.data; + } +} + +// Usage +const obj = new ReactiveObject({ count: 0 }); +obj.onPropertyChange((key, value, oldValue) => { + console.log(`${key} changed from ${oldValue} to ${value}`); +}); + +obj.value.count = 1; // Triggers onPropertyChange and onChange From e18a2d1bbe59381a397bd88b66d480e6e38a01fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=9Acibor=20Rudnicki?= Date: Thu, 13 Nov 2025 17:15:58 +0000 Subject: [PATCH 08/21] docs(README.md): update. --- README.md | 212 ++++++++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 176 insertions(+), 36 deletions(-) diff --git a/README.md b/README.md index 88a9ad4..538a892 100644 --- a/README.md +++ b/README.md @@ -1,63 +1,203 @@ -# Hooks -This project was generated using [Angular CLI](https://github.com/angular/angular-cli) version 20.3.0. + + + -## Code scaffolding +## @typescript-package/hooks -Angular CLI includes powerful code scaffolding tools. To generate a new component, run: + +[![npm version][typescript-package-npm-badge-svg]][typescript-package-npm-badge] +[![GitHub issues][typescript-package-badge-issues]][typescript-package-issues] +[![GitHub license][typescript-package-badge-license]][typescript-package-license] + +A **lightweight** TypeScript library for managing hooks. + +## Table of contents + +- [Installation](#installation) +- [Api](#api) + - [`HooksBase`](#hooks) + - [`HooksCore`](#hooks) + - [`ObjectHooksBase`](#hooks) + - [`ObjectHooks`](#hooks) +- [Contributing](#contributing) +- [Code of Conduct](code-of-conduct) +- [Git](#git) + - [Commit](#commit) + - [Versioning](#versioning) +- [License](#license) + +## Installation ```bash -ng generate component component-name +npm install @typescript-package/hooks --save-peer ``` -For a complete list of available schematics (such as `components`, `directives`, or `pipes`), run: +## Api + +```typescript +import { + // Abstract. + // - Core. + HooksCore, + HooksBase, + // - Base. + ObjectHooksBase, +} from '@typescript-package/hooks'; +``` -```bash -ng generate --help +## `HooksCore` + +The core abstraction class for hooks functionality. + +```typescript +import { HooksCore } from '@typescript-package/example'; ``` -## Building +[Source](https://github.com/typescript-package/hooks/blob/main/src/lib/hooks-core.ts) -To build the library, run: +## `HooksBase` -```bash -ng build hooks +Base abstraction class for hooks functionality. + +```typescript +import { HooksBase } from '@typescript-package/example'; ``` -This command will compile your project, and the build artifacts will be placed in the `dist/` directory. +[Source](https://github.com/typescript-package/hooks/blob/main/src/lib/hooks-base.ts) + +## `ObjectHooksBase` + +The base abstraction class for object hooks functionality. + +```typescript +import { ObjectHooksBase } from '@typescript-package/example'; + +class ReactiveObject extends ObjectHooksBase { + private data: T; + + constructor(initial: T, options?: ConstructorParameters>[0]) { + super(options || {}); + this.data = new Proxy(initial, { + set: (target, key, value) => { + if (typeof key === 'string' || typeof key === 'symbol') { + const oldValue = (target as any)[key]; + (target as any)[key] = this.triggerOnSetProperty(key as keyof T, value, oldValue); + this.triggerOnPropertyChange(key as keyof T, value, oldValue); + this.triggerOnChange(target as T, this.data); + } + return true; + }, + }); + } + + get value(): T { + return this.data; + } +} + +// Usage +const obj = new ReactiveObject({ count: 0 }); +obj.onPropertyChange((key, value, oldValue) => { + console.log(`${key} changed from ${oldValue} to ${value}`); +}); + +obj.value.count = 1; // Triggers onPropertyChange and onChange +``` -### Publishing the Library +[Source](https://github.com/typescript-package/hooks/blob/main/src/lib/object-hooks-base.ts) -Once the project is built, you can publish your library by following these steps: +## Contributing -1. Navigate to the `dist` directory: - ```bash - cd dist/hooks - ``` +Your contributions are valued! If you'd like to contribute, please feel free to submit a pull request. Help is always appreciated. -2. Run the `npm publish` command to publish your library to the npm registry: - ```bash - npm publish - ``` +## Support -## Running unit tests +If you find this package useful and would like to support its and general development, you can contribute through one of the following payment methods. Your support helps maintain the packages and continue adding new. -To execute unit tests with the [Karma](https://karma-runner.github.io) test runner, use the following command: +Support via: -```bash -ng test -``` +- [Stripe](https://donate.stripe.com/dR614hfDZcJE3wAcMM) +- [Revolut](https://checkout.revolut.com/pay/048b10a3-0e10-42c8-a917-e3e9cb4c8e29) +- [GitHub](https://github.com/sponsors/angular-package/sponsorships?sponsor=sciborrudnicki&tier_id=83618) +- [DonorBox](https://donorbox.org/become-a-sponsor-to-the-angular-package?default_interval=o) +- [Patreon](https://www.patreon.com/checkout/angularpackage?rid=0&fan_landing=true&view_as=public) -## Running end-to-end tests +or via Trust Wallet -For end-to-end (e2e) testing, run: +- [XLM](https://link.trustwallet.com/send?coin=148&address=GAFFFB7H3LG42O6JA63FJDRK4PP4JCNEOPHLGLLFH625X2KFYQ4UYVM4) +- [USDT (BEP20)](https://link.trustwallet.com/send?coin=20000714&address=0xA0c22A2bc7E37C1d5992dFDFFeD5E6f9298E1b94&token_id=0x55d398326f99059fF775485246999027B3197955) +- [ETH](https://link.trustwallet.com/send?coin=60&address=0xA0c22A2bc7E37C1d5992dFDFFeD5E6f9298E1b94) +- [BTC](https://link.trustwallet.com/send?coin=0&address=bc1qnf709336tfl57ta5mfkf4t9fndhx7agxvv9svn) +- [BNB](https://link.trustwallet.com/send?coin=20000714&address=0xA0c22A2bc7E37C1d5992dFDFFeD5E6f9298E1b94) -```bash -ng e2e -``` +Thanks for your support! + +## Code of Conduct + +By participating in this project, you agree to follow **[Code of Conduct](https://www.contributor-covenant.org/version/2/1/code_of_conduct/)**. + +## GIT + +### Commit + +Please follow the following commit message conventions: + +- [AngularJS Git Commit Message Conventions][git-commit-angular] +- [Karma Git Commit Msg][git-commit-karma] +- [Conventional Commits][git-commit-conventional] + +### Versioning + +The package follows [Semantic Versioning 2.0.0][git-semver] for all releases. The versioning format is: + +**Given a version number MAJOR.MINOR.PATCH, increment the:** + +- MAJOR version when you make incompatible API changes, +- MINOR version when you add functionality in a backwards-compatible manner, and +- PATCH version when you make backwards-compatible bug fixes. + +Additional labels for pre-release and build metadata are available as extensions to the MAJOR.MINOR.PATCH format. + +**FAQ** +How should I deal with revisions in the 0.y.z initial development phase? + +> The simplest thing to do is start your initial development release at 0.1.0 and then increment the minor version for each subsequent release. + +How do I know when to release 1.0.0? + +> If your software is being used in production, it should probably already be 1.0.0. If you have a stable API on which users have come to depend, you should be 1.0.0. If you’re worrying a lot about backwards compatibility, you should probably already be 1.0.0. + +## License + +MIT © typescript-package ([license][typescript-package-license]) + + + + [typescript-package-badge-issues]: https://img.shields.io/github/issues/typescript-package/hooks + [isscript-package-badge-forks]: https://img.shields.io/github/forks/typescript-package/hooks + [typescript-package-badge-stars]: https://img.shields.io/github/stars/typescript-package/hooks + [typescript-package-badge-license]: https://img.shields.io/github/license/typescript-package/hooks + + [typescript-package-issues]: https://github.com/typescript-package/hooks/issues + [typescript-package-forks]: https://github.com/typescript-package/hooks/network + [typescript-package-license]: https://github.com/typescript-package/hooks/blob/master/LICENSE + [typescript-package-stars]: https://github.com/typescript-package/hooks/stargazers + -Angular CLI does not come with an end-to-end testing framework by default. You can choose one that suits your needs. + + + [typescript-package-npm-badge-svg]: https://badge.fury.io/js/@typescript-package%2Fhooks.svg + [typescript-package-npm-badge]: https://badge.fury.io/js/@typescript-package%2Fhooks -## Additional Resources + +[git-semver]: http://semver.org/ -For more information on using the Angular CLI, including detailed command references, visit the [Angular CLI Overview and Command Reference](https://angular.dev/tools/cli) page. + +[git-commit-angular]: https://gist.github.com/stephenparish/9941e89d80e2bc58a153 +[git-commit-karma]: http://karma-runner.github.io/0.10/dev/git-commit-msg.html +[git-commit-conventional]: https://www.conventionalcommits.org/en/v1.0.0/ From 6de19fd3ba75fd532f474747cc8f83c5c32bd823 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=9Acibor=20Rudnicki?= Date: Thu, 13 Nov 2025 17:19:51 +0000 Subject: [PATCH 09/21] docs(README.md): update. --- README.md | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 538a892..94663fb 100644 --- a/README.md +++ b/README.md @@ -20,10 +20,9 @@ A **lightweight** TypeScript library for managing hooks. - [Installation](#installation) - [Api](#api) - - [`HooksBase`](#hooks) - - [`HooksCore`](#hooks) - - [`ObjectHooksBase`](#hooks) - - [`ObjectHooks`](#hooks) + - [`HooksBase`](#hooksbase) + - [`HooksCore`](#hookscore) + - [`ObjectHooksBase`](#objecthooksbase) - [Contributing](#contributing) - [Code of Conduct](code-of-conduct) - [Git](#git) @@ -31,6 +30,13 @@ A **lightweight** TypeScript library for managing hooks. - [Versioning](#versioning) - [License](#license) +## 📦 Related Packages + +| Package | Description | +|---------------------------|---------------------------------------------------| +| [`@typedly/callback`](https://github.com/typedly/callback) | A **TypeScript** type definitions package for managing hooks. | +| [`@typedly/hooks`](https://github.com/typedly/hooks) | A **TypeScript** type definitions package for asynchronous and synchronous callback functions of various types. | + ## Installation ```bash @@ -44,8 +50,8 @@ import { // Abstract. // - Core. HooksCore, - HooksBase, // - Base. + HooksBase, ObjectHooksBase, } from '@typescript-package/hooks'; ``` From 56e933a0159b9ab09696ddcc9ea8a4b5e2c31319 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=9Acibor=20Rudnicki?= Date: Thu, 13 Nov 2025 17:21:01 +0000 Subject: [PATCH 10/21] docs(README.md): update. --- README.md | 33 ++++++++++++++++++++++++++------- 1 file changed, 26 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 94663fb..f0716e0 100644 --- a/README.md +++ b/README.md @@ -30,13 +30,6 @@ A **lightweight** TypeScript library for managing hooks. - [Versioning](#versioning) - [License](#license) -## 📦 Related Packages - -| Package | Description | -|---------------------------|---------------------------------------------------| -| [`@typedly/callback`](https://github.com/typedly/callback) | A **TypeScript** type definitions package for managing hooks. | -| [`@typedly/hooks`](https://github.com/typedly/hooks) | A **TypeScript** type definitions package for asynchronous and synchronous callback functions of various types. | - ## Installation ```bash @@ -182,6 +175,32 @@ How do I know when to release 1.0.0? MIT © typescript-package ([license][typescript-package-license]) +## 📦 Related Packages + +| Package | Description | +|---------------------------|---------------------------------------------------| +| [`@typedly/callback`](https://github.com/typedly/callback) | A **TypeScript** type definitions package for managing hooks. | +| [`@typedly/hooks`](https://github.com/typedly/hooks) | A **TypeScript** type definitions package for asynchronous and synchronous callback functions of various types. | + +## Packages + +- **[@typescript-package/affix](https://github.com/typescript-package/affix)**: A **lightweight TypeScript** library for the affix - prefix and suffix. +- **[@typescript-package/are](https://github.com/typescript-package/are)**: Type-safe `are` checkers for validating value types in TypeScript. +- **[@typescript-package/data](https://github.com/typescript-package/data)**: A **lightweight TypeScript** library for basic data management. +- **[@typescript-package/descriptor](https://github.com/typescript-package/descriptor)**: A **lightweight TypeScript** library for property descriptor. +- **[@typescript-package/guard](https://github.com/typescript-package/guard)**: Type-safe guards for guarding the value types in TypeScript.c +- **[@typescript-package/history](https://github.com/typescript-package/history)**: A **TypeScript** package for tracking history of values. +- **[@typescript-package/is](https://github.com/typescript-package/is)**: Type-safe is checkers for validating value types in TypeScript. +- **[@typescript-package/name](https://github.com/typescript-package/name)**: A **lightweight TypeScript** library for the name with prefix and suffix. +- **[@typescript-package/property](https://github.com/typescript-package/property)**: A **lightweight TypeScript** package with features to handle object properties. +- **[@typescript-package/queue](https://github.com/typescript-package/queue)**: A **lightweight TypeScript** library for managing various queue and stack structures. +- **[@typescript-package/range](https://github.com/typescript-package/range)**: A **lightweight TypeScript** library for managing various types of ranges. +- **[@typescript-package/regexp](https://github.com/typescript-package/regexp)**: A **lightweight TypeScript** library for **RegExp**. +- **[@typescript-package/state](https://github.com/typescript-package/state)**: Simple state management for different types in **TypeScript**. +- **[@typescript-package/type](https://github.com/typescript-package/type)**: Utility types to enhance and simplify **TypeScript** development. +- **[@typescript-package/wrapper](https://github.com/typescript-package/wrapper)**: A **lightweight TypeScript** library to wrap the text with the opening and closing chars. + + [typescript-package-badge-issues]: https://img.shields.io/github/issues/typescript-package/hooks From bee831077d4c827d316e152afa261babdca99c98 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=9Acibor=20Rudnicki?= Date: Thu, 13 Nov 2025 17:23:05 +0000 Subject: [PATCH 11/21] chore(ng-package): keepLifecycleScripts. --- ng-package.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ng-package.json b/ng-package.json index 9d63500..6f58208 100644 --- a/ng-package.json +++ b/ng-package.json @@ -3,5 +3,6 @@ "dest": "../../dist/hooks", "lib": { "entryFile": "src/public-api.ts" - } + }, + "keepLifecycleScripts": true } \ No newline at end of file From 389ab32c49b3896519a4a2565e09f839df2c5d86 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=9Acibor=20Rudnicki?= Date: Thu, 13 Nov 2025 18:37:35 +0100 Subject: [PATCH 12/21] Update README.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index f0716e0..53fd55c 100644 --- a/README.md +++ b/README.md @@ -54,7 +54,7 @@ import { The core abstraction class for hooks functionality. ```typescript -import { HooksCore } from '@typescript-package/example'; +import { HooksCore } from '@typescript-package/hooks'; ``` [Source](https://github.com/typescript-package/hooks/blob/main/src/lib/hooks-core.ts) From 581d61785854c9e4205ddb8b6844617b30eb2e4e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=9Acibor=20Rudnicki?= Date: Thu, 13 Nov 2025 18:37:46 +0100 Subject: [PATCH 13/21] Update README.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 53fd55c..9f48bf9 100644 --- a/README.md +++ b/README.md @@ -188,7 +188,7 @@ MIT © typescript-package ([license][typescript-package-license]) - **[@typescript-package/are](https://github.com/typescript-package/are)**: Type-safe `are` checkers for validating value types in TypeScript. - **[@typescript-package/data](https://github.com/typescript-package/data)**: A **lightweight TypeScript** library for basic data management. - **[@typescript-package/descriptor](https://github.com/typescript-package/descriptor)**: A **lightweight TypeScript** library for property descriptor. -- **[@typescript-package/guard](https://github.com/typescript-package/guard)**: Type-safe guards for guarding the value types in TypeScript.c +- **[@typescript-package/guard](https://github.com/typescript-package/guard)**: Type-safe guards for guarding the value types in TypeScript. - **[@typescript-package/history](https://github.com/typescript-package/history)**: A **TypeScript** package for tracking history of values. - **[@typescript-package/is](https://github.com/typescript-package/is)**: Type-safe is checkers for validating value types in TypeScript. - **[@typescript-package/name](https://github.com/typescript-package/name)**: A **lightweight TypeScript** library for the name with prefix and suffix. From 78f1b9f0a2fe5d3f0c6bcb9ad0f3651fd6547583 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=9Acibor=20Rudnicki?= Date: Thu, 13 Nov 2025 18:38:09 +0100 Subject: [PATCH 14/21] Update README.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 9f48bf9..453a3a1 100644 --- a/README.md +++ b/README.md @@ -108,7 +108,7 @@ obj.onPropertyChange((key, value, oldValue) => { obj.value.count = 1; // Triggers onPropertyChange and onChange ``` -[Source](https://github.com/typescript-package/hooks/blob/main/src/lib/object-hooks-base.ts) +[Source](https://github.com/typescript-package/hooks/blob/main/src/lib/object-hooks-base.abstract.ts) ## Contributing From 2a6a2e38fbb00543f93fb04ab02a7922412349c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=9Acibor=20Rudnicki?= Date: Thu, 13 Nov 2025 18:38:19 +0100 Subject: [PATCH 15/21] Update README.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 453a3a1..530e064 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ A **lightweight** TypeScript library for managing hooks. - [`HooksCore`](#hookscore) - [`ObjectHooksBase`](#objecthooksbase) - [Contributing](#contributing) -- [Code of Conduct](code-of-conduct) +- [Code of Conduct](#code-of-conduct) - [Git](#git) - [Commit](#commit) - [Versioning](#versioning) From 25d1ee79aecf2686965062a12943dde2ace3ce9f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=9Acibor=20Rudnicki?= Date: Thu, 13 Nov 2025 18:38:35 +0100 Subject: [PATCH 16/21] Update README.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 530e064..36453ab 100644 --- a/README.md +++ b/README.md @@ -204,7 +204,7 @@ MIT © typescript-package ([license][typescript-package-license]) [typescript-package-badge-issues]: https://img.shields.io/github/issues/typescript-package/hooks - [isscript-package-badge-forks]: https://img.shields.io/github/forks/typescript-package/hooks + [typescript-package-badge-forks]: https://img.shields.io/github/forks/typescript-package/hooks [typescript-package-badge-stars]: https://img.shields.io/github/stars/typescript-package/hooks [typescript-package-badge-license]: https://img.shields.io/github/license/typescript-package/hooks From 50388a3079c62003ee56af24477b0824ce10af38 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=9Acibor=20Rudnicki?= Date: Thu, 13 Nov 2025 18:38:51 +0100 Subject: [PATCH 17/21] Update src/lib/object-hooks-base.abstract.ts Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- src/lib/object-hooks-base.abstract.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/object-hooks-base.abstract.ts b/src/lib/object-hooks-base.abstract.ts index 69b08ce..6f29974 100644 --- a/src/lib/object-hooks-base.abstract.ts +++ b/src/lib/object-hooks-base.abstract.ts @@ -108,7 +108,7 @@ export abstract class ObjectHooksBase * @param {Payload} [payload] Optional payload. */ protected triggerOnPropertyChange(key: K, value: T[K], previousValue: T[K], payload?: Payload): void { - this.onPropertyChangeCallback?.(key, value, previousValue, payload), this; + this.onPropertyChangeCallback?.(key, value, previousValue, payload); } /** From 694cf37fcd25b7f91b15c9b8f1988dd47e71a153 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=9Acibor=20Rudnicki?= Date: Thu, 13 Nov 2025 18:39:01 +0100 Subject: [PATCH 18/21] Update src/lib/object-hooks-base.abstract.ts Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- src/lib/object-hooks-base.abstract.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/object-hooks-base.abstract.ts b/src/lib/object-hooks-base.abstract.ts index 6f29974..b418765 100644 --- a/src/lib/object-hooks-base.abstract.ts +++ b/src/lib/object-hooks-base.abstract.ts @@ -90,7 +90,7 @@ export abstract class ObjectHooksBase } /** - * @description Sets the `onSetProperty` callback function. + * @description Sets the `onSetProperty` callback function. * @public * @param {?OnSetPropertyCallback} [callbackfn] The callback function to be invoked on set property. * @returns {this} The `this` instance for chaining. From 70c61109df149dd2da20889d29c1e53b40ec9dcd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=9Acibor=20Rudnicki?= Date: Thu, 13 Nov 2025 18:42:24 +0100 Subject: [PATCH 19/21] Update eslint.config.mts Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- eslint.config.mts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eslint.config.mts b/eslint.config.mts index edd556f..d1de87c 100644 --- a/eslint.config.mts +++ b/eslint.config.mts @@ -5,9 +5,9 @@ import { defineConfig } from "eslint/config"; export default defineConfig([ { + ...js.configs.recommended, files: ["**/*.{js,mjs,cjs,ts,mts,cts}"], plugins: { js }, - extends: ["js/recommended"], languageOptions: { globals: globals.browser } }, tseslint.configs.recommended, From 05107ed40f8b7b5325b7cedb801a1b65988cd265 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=9Acibor=20Rudnicki?= Date: Thu, 13 Nov 2025 18:43:04 +0100 Subject: [PATCH 20/21] Update README.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 36453ab..c427552 100644 --- a/README.md +++ b/README.md @@ -57,7 +57,7 @@ The core abstraction class for hooks functionality. import { HooksCore } from '@typescript-package/hooks'; ``` -[Source](https://github.com/typescript-package/hooks/blob/main/src/lib/hooks-core.ts) +[Source](https://github.com/typescript-package/hooks/blob/main/src/lib/hooks-core.abstract.ts) ## `HooksBase` From 3cf71967fa95a495402c9c74d2ef9de14eacd935 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=9Acibor=20Rudnicki?= Date: Thu, 13 Nov 2025 17:46:21 +0000 Subject: [PATCH 21/21] docs(README.md): update. --- README.md | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index c427552..48b5e63 100644 --- a/README.md +++ b/README.md @@ -64,17 +64,17 @@ import { HooksCore } from '@typescript-package/hooks'; Base abstraction class for hooks functionality. ```typescript -import { HooksBase } from '@typescript-package/example'; +import { HooksBase } from '@typescript-package/hooks'; ``` -[Source](https://github.com/typescript-package/hooks/blob/main/src/lib/hooks-base.ts) +[Source](https://github.com/typescript-package/hooks/blob/main/src/lib/hooks-base.abstract.ts) ## `ObjectHooksBase` The base abstraction class for object hooks functionality. ```typescript -import { ObjectHooksBase } from '@typescript-package/example'; +import { ObjectHooksBase } from '@typescript-package/hooks'; class ReactiveObject extends ObjectHooksBase { private data: T; @@ -200,7 +200,6 @@ MIT © typescript-package ([license][typescript-package-license]) - **[@typescript-package/type](https://github.com/typescript-package/type)**: Utility types to enhance and simplify **TypeScript** development. - **[@typescript-package/wrapper](https://github.com/typescript-package/wrapper)**: A **lightweight TypeScript** library to wrap the text with the opening and closing chars. - [typescript-package-badge-issues]: https://img.shields.io/github/issues/typescript-package/hooks