From afc788946e1283d875e9be9a3e9c14179d19d809 Mon Sep 17 00:00:00 2001 From: Yilun Sun Date: Tue, 5 Mar 2024 15:12:04 +0800 Subject: [PATCH] feat: add PHP doc type node to TypeScript type node transpiler --- package.json | 4 +- pnpm-lock.yaml | 893 ++++++++++-------- src/index.ts | 2 + src/phpdoc-parser/ast/php-doc/helpers.ts | 168 ++++ src/phpdoc-parser/ast/php-doc/php-doc-node.ts | 9 + .../ast/php-doc/php-doc-tag-node.ts | 119 --- src/phpdoc-parser/parser/php-doc-parser.ts | 2 +- src/phpdoc-parser/transpiler/README.md | 80 ++ .../transpiler/base-type-transpiler.ts | 24 + src/phpdoc-parser/transpiler/helpers.ts | 342 +++++++ .../php-doc-to-typescript-type-transpiler.ts | 212 +++++ 11 files changed, 1332 insertions(+), 523 deletions(-) create mode 100644 src/phpdoc-parser/ast/php-doc/helpers.ts create mode 100644 src/phpdoc-parser/transpiler/README.md create mode 100644 src/phpdoc-parser/transpiler/base-type-transpiler.ts create mode 100644 src/phpdoc-parser/transpiler/helpers.ts create mode 100644 src/phpdoc-parser/transpiler/php-doc-to-typescript-type-transpiler.ts diff --git a/package.json b/package.json index 9d0f7a9e..945fc6c3 100644 --- a/package.json +++ b/package.json @@ -44,12 +44,12 @@ "husky": "9.0.11", "inquirer": "9.2.15", "prettier": "3.2.5", - "typescript": "5.3.3", "vitest": "1.3.0" }, "dependencies": { "@types/node": "20.11.24", - "lodash": "4.17.21" + "lodash": "4.17.21", + "typescript": "5.3.3" }, "scripts": { "commit": "cz", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 93c4fa0c..e33b91c5 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -11,6 +11,9 @@ dependencies: lodash: specifier: 4.17.21 version: 4.17.21 + typescript: + specifier: 5.3.3 + version: 5.3.3 devDependencies: '@babel/core': @@ -48,7 +51,7 @@ devDependencies: version: 2.39.0(typescript@5.3.3) commitizen: specifier: 4.3.0 - version: 4.3.0(@types/node@20.11.24)(typescript@5.3.3) + version: 4.3.0(typescript@5.3.3) eslint: specifier: 8.56.0 version: 8.56.0 @@ -61,9 +64,6 @@ devDependencies: prettier: specifier: 3.2.5 version: 3.2.5 - typescript: - specifier: 5.3.3 - version: 5.3.3 vitest: specifier: 1.3.0 version: 1.3.0(@types/node@20.11.24) @@ -75,12 +75,12 @@ packages: engines: {node: '>=0.10.0'} dev: true - /@ampproject/remapping@2.3.0: - resolution: {integrity: sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw==} + /@ampproject/remapping@2.2.1: + resolution: {integrity: sha512-lFMjJTrFL3j7L9yBxwYfCq2k6qqwHyzuUl/XBnif78PWTJYyL/dfowQHWE3sp6U6ZzqWiiIZnpTMO96zhkjwtg==} engines: {node: '>=6.0.0'} dependencies: - '@jridgewell/gen-mapping': 0.3.5 - '@jridgewell/trace-mapping': 0.3.25 + '@jridgewell/gen-mapping': 0.3.3 + '@jridgewell/trace-mapping': 0.3.20 dev: true /@babel/code-frame@7.23.5: @@ -100,7 +100,7 @@ packages: resolution: {integrity: sha512-5q0175NOjddqpvvzU+kDiSOAk4PfdO6FvwCWoQ6RO7rTzEe8vlo+4HVfcnAREhD4npMs0e9uZypjTwzZPCf/cw==} engines: {node: '>=6.9.0'} dependencies: - '@ampproject/remapping': 2.3.0 + '@ampproject/remapping': 2.2.1 '@babel/code-frame': 7.23.5 '@babel/generator': 7.23.6 '@babel/helper-compilation-targets': 7.23.6 @@ -124,8 +124,8 @@ packages: engines: {node: '>=6.9.0'} dependencies: '@babel/types': 7.24.0 - '@jridgewell/gen-mapping': 0.3.5 - '@jridgewell/trace-mapping': 0.3.25 + '@jridgewell/gen-mapping': 0.3.3 + '@jridgewell/trace-mapping': 0.3.20 jsesc: 2.5.2 dev: true @@ -133,14 +133,14 @@ packages: resolution: {integrity: sha512-LvBTxu8bQSQkcyKOU+a1btnNFQ1dMAd0R6PyW3arXes06F6QLWLIrd681bxRPIXlrMGR3XYnW9JyML7dP3qgxg==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.24.0 + '@babel/types': 7.23.6 dev: true /@babel/helper-builder-binary-assignment-operator-visitor@7.22.15: resolution: {integrity: sha512-QkBXwGgaoC2GtGZRoma6kv7Szfv06khvhFav67ZExau2RaXzy8MpHSMO2PNoP2XtmQphJQRHFfg77Bq731Yizw==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.24.0 + '@babel/types': 7.23.6 dev: true /@babel/helper-compilation-targets@7.23.6: @@ -149,13 +149,13 @@ packages: dependencies: '@babel/compat-data': 7.23.5 '@babel/helper-validator-option': 7.23.5 - browserslist: 4.23.0 + browserslist: 4.22.2 lru-cache: 5.1.1 semver: 6.3.1 dev: true - /@babel/helper-create-class-features-plugin@7.24.0(@babel/core@7.23.9): - resolution: {integrity: sha512-QAH+vfvts51BCsNZ2PhY6HAggnlS6omLLFTsIpeqZk/MmJ6cW7tgz5yRv0fMJThcr6FmbMrENh1RgrWPTYA76g==} + /@babel/helper-create-class-features-plugin@7.23.7(@babel/core@7.23.9): + resolution: {integrity: sha512-xCoqR/8+BoNnXOY7RVSgv6X+o7pmT5q1d+gGcRlXYkI+9B31glE4jeejhKVpA04O1AtzOt7OSQ6VYKP5FcRl9g==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0 @@ -191,7 +191,7 @@ packages: dependencies: '@babel/core': 7.23.9 '@babel/helper-compilation-targets': 7.23.6 - '@babel/helper-plugin-utils': 7.24.0 + '@babel/helper-plugin-utils': 7.22.5 debug: 4.3.4 lodash.debounce: 4.0.8 resolve: 1.22.8 @@ -208,8 +208,8 @@ packages: resolution: {integrity: sha512-OErEqsrxjZTJciZ4Oo+eoZqeW9UIiOcuYKRJA4ZAgV9myA+pOXhhmpfNCKjEH/auVfEYVFJ6y1Tc4r0eIApqiw==} engines: {node: '>=6.9.0'} dependencies: - '@babel/template': 7.24.0 - '@babel/types': 7.24.0 + '@babel/template': 7.22.15 + '@babel/types': 7.23.6 dev: true /@babel/helper-hoist-variables@7.22.5: @@ -223,14 +223,14 @@ packages: resolution: {integrity: sha512-6gfrPwh7OuT6gZyJZvd6WbTfrqAo7vm4xCzAXOusKqq/vWdKXphTpj5klHKNmRUU6/QRGlBsyU9mAIPaWHlqJA==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.24.0 + '@babel/types': 7.23.6 dev: true /@babel/helper-module-imports@7.22.15: resolution: {integrity: sha512-0pYVBnDKZO2fnSPCrgM/6WMc7eS20Fbok+0r88fp+YtWVLZrp4CkafFGIp+W0VKw4a22sgebPT99y+FDNMdP4w==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.24.0 + '@babel/types': 7.23.6 dev: true /@babel/helper-module-transforms@7.23.3(@babel/core@7.23.9): @@ -251,11 +251,11 @@ packages: resolution: {integrity: sha512-HBwaojN0xFRx4yIvpwGqxiV2tUfl7401jlok564NgB9EHS1y6QT17FmKWm4ztqjeVdXLuC4fSvHc5ePpQjoTbw==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.24.0 + '@babel/types': 7.23.6 dev: true - /@babel/helper-plugin-utils@7.24.0: - resolution: {integrity: sha512-9cUznXMG0+FxRuJfvL82QlTqIzhVW9sL0KjMPHhAOOvpQGL8QtdxnBKILjBqxlHyliz0yCa1G903ZXI/FuHy2w==} + /@babel/helper-plugin-utils@7.22.5: + resolution: {integrity: sha512-uLls06UVKgFG9QD4OeFYLEGteMIAa5kpTPcFL28yuCIIzsf6ZyKZMllKVOCZFhiZ5ptnwX4mtKdWCBE/uT4amg==} engines: {node: '>=6.9.0'} dev: true @@ -287,21 +287,21 @@ packages: resolution: {integrity: sha512-n0H99E/K+Bika3++WNL17POvo4rKWZ7lZEp1Q+fStVbUi8nxPQEBOlTmCOxW/0JsS56SKKQ+ojAe2pHKJHN35w==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.24.0 + '@babel/types': 7.23.6 dev: true /@babel/helper-skip-transparent-expression-wrappers@7.22.5: resolution: {integrity: sha512-tK14r66JZKiC43p8Ki33yLBVJKlQDFoA8GYN67lWCDCqoL6EMMSuM9b+Iff2jHaM/RRFYl7K+iiru7hbRqNx8Q==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.24.0 + '@babel/types': 7.23.6 dev: true /@babel/helper-split-export-declaration@7.22.6: resolution: {integrity: sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.24.0 + '@babel/types': 7.23.6 dev: true /@babel/helper-string-parser@7.23.4: @@ -324,8 +324,8 @@ packages: engines: {node: '>=6.9.0'} dependencies: '@babel/helper-function-name': 7.23.0 - '@babel/template': 7.24.0 - '@babel/types': 7.24.0 + '@babel/template': 7.22.15 + '@babel/types': 7.23.6 dev: true /@babel/helpers@7.24.0: @@ -348,6 +348,14 @@ packages: js-tokens: 4.0.0 dev: true + /@babel/parser@7.23.6: + resolution: {integrity: sha512-Z2uID7YJ7oNvAI20O9X0bblw7Qqs8Q2hFy0R9tAfnfLkp5MW0UH9eUvnDSnFwKZ0AvgS1ucqR4KzvVHgnke1VQ==} + engines: {node: '>=6.0.0'} + hasBin: true + dependencies: + '@babel/types': 7.23.6 + dev: true + /@babel/parser@7.24.0: resolution: {integrity: sha512-QuP/FxEAzMSjXygs8v4N9dvdXzEHN4W1oF3PxuWAtPo08UdM17u89RDMgjLn/mlc56iM0HlLmVkO/wgR+rDgHg==} engines: {node: '>=6.0.0'} @@ -363,7 +371,7 @@ packages: '@babel/core': ^7.0.0 dependencies: '@babel/core': 7.23.9 - '@babel/helper-plugin-utils': 7.24.0 + '@babel/helper-plugin-utils': 7.22.5 dev: true /@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@7.23.3(@babel/core@7.23.9): @@ -373,7 +381,7 @@ packages: '@babel/core': ^7.13.0 dependencies: '@babel/core': 7.23.9 - '@babel/helper-plugin-utils': 7.24.0 + '@babel/helper-plugin-utils': 7.22.5 '@babel/helper-skip-transparent-expression-wrappers': 7.22.5 '@babel/plugin-transform-optional-chaining': 7.23.4(@babel/core@7.23.9) dev: true @@ -386,7 +394,7 @@ packages: dependencies: '@babel/core': 7.23.9 '@babel/helper-environment-visitor': 7.22.20 - '@babel/helper-plugin-utils': 7.24.0 + '@babel/helper-plugin-utils': 7.22.5 dev: true /@babel/plugin-proposal-private-property-in-object@7.21.0-placeholder-for-preset-env.2(@babel/core@7.23.9): @@ -404,7 +412,7 @@ packages: '@babel/core': ^7.0.0-0 dependencies: '@babel/core': 7.23.9 - '@babel/helper-plugin-utils': 7.24.0 + '@babel/helper-plugin-utils': 7.22.5 dev: true /@babel/plugin-syntax-class-properties@7.12.13(@babel/core@7.23.9): @@ -413,7 +421,7 @@ packages: '@babel/core': ^7.0.0-0 dependencies: '@babel/core': 7.23.9 - '@babel/helper-plugin-utils': 7.24.0 + '@babel/helper-plugin-utils': 7.22.5 dev: true /@babel/plugin-syntax-class-static-block@7.14.5(@babel/core@7.23.9): @@ -423,7 +431,7 @@ packages: '@babel/core': ^7.0.0-0 dependencies: '@babel/core': 7.23.9 - '@babel/helper-plugin-utils': 7.24.0 + '@babel/helper-plugin-utils': 7.22.5 dev: true /@babel/plugin-syntax-dynamic-import@7.8.3(@babel/core@7.23.9): @@ -432,7 +440,7 @@ packages: '@babel/core': ^7.0.0-0 dependencies: '@babel/core': 7.23.9 - '@babel/helper-plugin-utils': 7.24.0 + '@babel/helper-plugin-utils': 7.22.5 dev: true /@babel/plugin-syntax-export-namespace-from@7.8.3(@babel/core@7.23.9): @@ -441,7 +449,7 @@ packages: '@babel/core': ^7.0.0-0 dependencies: '@babel/core': 7.23.9 - '@babel/helper-plugin-utils': 7.24.0 + '@babel/helper-plugin-utils': 7.22.5 dev: true /@babel/plugin-syntax-import-assertions@7.23.3(@babel/core@7.23.9): @@ -451,7 +459,7 @@ packages: '@babel/core': ^7.0.0-0 dependencies: '@babel/core': 7.23.9 - '@babel/helper-plugin-utils': 7.24.0 + '@babel/helper-plugin-utils': 7.22.5 dev: true /@babel/plugin-syntax-import-attributes@7.23.3(@babel/core@7.23.9): @@ -461,7 +469,7 @@ packages: '@babel/core': ^7.0.0-0 dependencies: '@babel/core': 7.23.9 - '@babel/helper-plugin-utils': 7.24.0 + '@babel/helper-plugin-utils': 7.22.5 dev: true /@babel/plugin-syntax-import-meta@7.10.4(@babel/core@7.23.9): @@ -470,7 +478,7 @@ packages: '@babel/core': ^7.0.0-0 dependencies: '@babel/core': 7.23.9 - '@babel/helper-plugin-utils': 7.24.0 + '@babel/helper-plugin-utils': 7.22.5 dev: true /@babel/plugin-syntax-json-strings@7.8.3(@babel/core@7.23.9): @@ -479,7 +487,7 @@ packages: '@babel/core': ^7.0.0-0 dependencies: '@babel/core': 7.23.9 - '@babel/helper-plugin-utils': 7.24.0 + '@babel/helper-plugin-utils': 7.22.5 dev: true /@babel/plugin-syntax-jsx@7.23.3(@babel/core@7.23.9): @@ -489,7 +497,7 @@ packages: '@babel/core': ^7.0.0-0 dependencies: '@babel/core': 7.23.9 - '@babel/helper-plugin-utils': 7.24.0 + '@babel/helper-plugin-utils': 7.22.5 dev: true /@babel/plugin-syntax-logical-assignment-operators@7.10.4(@babel/core@7.23.9): @@ -498,7 +506,7 @@ packages: '@babel/core': ^7.0.0-0 dependencies: '@babel/core': 7.23.9 - '@babel/helper-plugin-utils': 7.24.0 + '@babel/helper-plugin-utils': 7.22.5 dev: true /@babel/plugin-syntax-nullish-coalescing-operator@7.8.3(@babel/core@7.23.9): @@ -507,7 +515,7 @@ packages: '@babel/core': ^7.0.0-0 dependencies: '@babel/core': 7.23.9 - '@babel/helper-plugin-utils': 7.24.0 + '@babel/helper-plugin-utils': 7.22.5 dev: true /@babel/plugin-syntax-numeric-separator@7.10.4(@babel/core@7.23.9): @@ -516,7 +524,7 @@ packages: '@babel/core': ^7.0.0-0 dependencies: '@babel/core': 7.23.9 - '@babel/helper-plugin-utils': 7.24.0 + '@babel/helper-plugin-utils': 7.22.5 dev: true /@babel/plugin-syntax-object-rest-spread@7.8.3(@babel/core@7.23.9): @@ -525,7 +533,7 @@ packages: '@babel/core': ^7.0.0-0 dependencies: '@babel/core': 7.23.9 - '@babel/helper-plugin-utils': 7.24.0 + '@babel/helper-plugin-utils': 7.22.5 dev: true /@babel/plugin-syntax-optional-catch-binding@7.8.3(@babel/core@7.23.9): @@ -534,7 +542,7 @@ packages: '@babel/core': ^7.0.0-0 dependencies: '@babel/core': 7.23.9 - '@babel/helper-plugin-utils': 7.24.0 + '@babel/helper-plugin-utils': 7.22.5 dev: true /@babel/plugin-syntax-optional-chaining@7.8.3(@babel/core@7.23.9): @@ -543,7 +551,7 @@ packages: '@babel/core': ^7.0.0-0 dependencies: '@babel/core': 7.23.9 - '@babel/helper-plugin-utils': 7.24.0 + '@babel/helper-plugin-utils': 7.22.5 dev: true /@babel/plugin-syntax-private-property-in-object@7.14.5(@babel/core@7.23.9): @@ -553,7 +561,7 @@ packages: '@babel/core': ^7.0.0-0 dependencies: '@babel/core': 7.23.9 - '@babel/helper-plugin-utils': 7.24.0 + '@babel/helper-plugin-utils': 7.22.5 dev: true /@babel/plugin-syntax-top-level-await@7.14.5(@babel/core@7.23.9): @@ -563,7 +571,7 @@ packages: '@babel/core': ^7.0.0-0 dependencies: '@babel/core': 7.23.9 - '@babel/helper-plugin-utils': 7.24.0 + '@babel/helper-plugin-utils': 7.22.5 dev: true /@babel/plugin-syntax-typescript@7.23.3(@babel/core@7.23.9): @@ -573,7 +581,7 @@ packages: '@babel/core': ^7.0.0-0 dependencies: '@babel/core': 7.23.9 - '@babel/helper-plugin-utils': 7.24.0 + '@babel/helper-plugin-utils': 7.22.5 dev: true /@babel/plugin-syntax-unicode-sets-regex@7.18.6(@babel/core@7.23.9): @@ -584,7 +592,7 @@ packages: dependencies: '@babel/core': 7.23.9 '@babel/helper-create-regexp-features-plugin': 7.22.15(@babel/core@7.23.9) - '@babel/helper-plugin-utils': 7.24.0 + '@babel/helper-plugin-utils': 7.22.5 dev: true /@babel/plugin-transform-arrow-functions@7.23.3(@babel/core@7.23.9): @@ -594,7 +602,7 @@ packages: '@babel/core': ^7.0.0-0 dependencies: '@babel/core': 7.23.9 - '@babel/helper-plugin-utils': 7.24.0 + '@babel/helper-plugin-utils': 7.22.5 dev: true /@babel/plugin-transform-async-generator-functions@7.23.9(@babel/core@7.23.9): @@ -605,7 +613,7 @@ packages: dependencies: '@babel/core': 7.23.9 '@babel/helper-environment-visitor': 7.22.20 - '@babel/helper-plugin-utils': 7.24.0 + '@babel/helper-plugin-utils': 7.22.5 '@babel/helper-remap-async-to-generator': 7.22.20(@babel/core@7.23.9) '@babel/plugin-syntax-async-generators': 7.8.4(@babel/core@7.23.9) dev: true @@ -618,7 +626,7 @@ packages: dependencies: '@babel/core': 7.23.9 '@babel/helper-module-imports': 7.22.15 - '@babel/helper-plugin-utils': 7.24.0 + '@babel/helper-plugin-utils': 7.22.5 '@babel/helper-remap-async-to-generator': 7.22.20(@babel/core@7.23.9) dev: true @@ -629,7 +637,7 @@ packages: '@babel/core': ^7.0.0-0 dependencies: '@babel/core': 7.23.9 - '@babel/helper-plugin-utils': 7.24.0 + '@babel/helper-plugin-utils': 7.22.5 dev: true /@babel/plugin-transform-block-scoping@7.23.4(@babel/core@7.23.9): @@ -639,7 +647,7 @@ packages: '@babel/core': ^7.0.0-0 dependencies: '@babel/core': 7.23.9 - '@babel/helper-plugin-utils': 7.24.0 + '@babel/helper-plugin-utils': 7.22.5 dev: true /@babel/plugin-transform-class-properties@7.23.3(@babel/core@7.23.9): @@ -649,8 +657,8 @@ packages: '@babel/core': ^7.0.0-0 dependencies: '@babel/core': 7.23.9 - '@babel/helper-create-class-features-plugin': 7.24.0(@babel/core@7.23.9) - '@babel/helper-plugin-utils': 7.24.0 + '@babel/helper-create-class-features-plugin': 7.23.7(@babel/core@7.23.9) + '@babel/helper-plugin-utils': 7.22.5 dev: true /@babel/plugin-transform-class-static-block@7.23.4(@babel/core@7.23.9): @@ -660,8 +668,8 @@ packages: '@babel/core': ^7.12.0 dependencies: '@babel/core': 7.23.9 - '@babel/helper-create-class-features-plugin': 7.24.0(@babel/core@7.23.9) - '@babel/helper-plugin-utils': 7.24.0 + '@babel/helper-create-class-features-plugin': 7.23.7(@babel/core@7.23.9) + '@babel/helper-plugin-utils': 7.22.5 '@babel/plugin-syntax-class-static-block': 7.14.5(@babel/core@7.23.9) dev: true @@ -676,7 +684,7 @@ packages: '@babel/helper-compilation-targets': 7.23.6 '@babel/helper-environment-visitor': 7.22.20 '@babel/helper-function-name': 7.23.0 - '@babel/helper-plugin-utils': 7.24.0 + '@babel/helper-plugin-utils': 7.22.5 '@babel/helper-replace-supers': 7.22.20(@babel/core@7.23.9) '@babel/helper-split-export-declaration': 7.22.6 globals: 11.12.0 @@ -689,8 +697,8 @@ packages: '@babel/core': ^7.0.0-0 dependencies: '@babel/core': 7.23.9 - '@babel/helper-plugin-utils': 7.24.0 - '@babel/template': 7.24.0 + '@babel/helper-plugin-utils': 7.22.5 + '@babel/template': 7.22.15 dev: true /@babel/plugin-transform-destructuring@7.23.3(@babel/core@7.23.9): @@ -700,7 +708,7 @@ packages: '@babel/core': ^7.0.0-0 dependencies: '@babel/core': 7.23.9 - '@babel/helper-plugin-utils': 7.24.0 + '@babel/helper-plugin-utils': 7.22.5 dev: true /@babel/plugin-transform-dotall-regex@7.23.3(@babel/core@7.23.9): @@ -711,7 +719,7 @@ packages: dependencies: '@babel/core': 7.23.9 '@babel/helper-create-regexp-features-plugin': 7.22.15(@babel/core@7.23.9) - '@babel/helper-plugin-utils': 7.24.0 + '@babel/helper-plugin-utils': 7.22.5 dev: true /@babel/plugin-transform-duplicate-keys@7.23.3(@babel/core@7.23.9): @@ -721,7 +729,7 @@ packages: '@babel/core': ^7.0.0-0 dependencies: '@babel/core': 7.23.9 - '@babel/helper-plugin-utils': 7.24.0 + '@babel/helper-plugin-utils': 7.22.5 dev: true /@babel/plugin-transform-dynamic-import@7.23.4(@babel/core@7.23.9): @@ -731,7 +739,7 @@ packages: '@babel/core': ^7.0.0-0 dependencies: '@babel/core': 7.23.9 - '@babel/helper-plugin-utils': 7.24.0 + '@babel/helper-plugin-utils': 7.22.5 '@babel/plugin-syntax-dynamic-import': 7.8.3(@babel/core@7.23.9) dev: true @@ -743,7 +751,7 @@ packages: dependencies: '@babel/core': 7.23.9 '@babel/helper-builder-binary-assignment-operator-visitor': 7.22.15 - '@babel/helper-plugin-utils': 7.24.0 + '@babel/helper-plugin-utils': 7.22.5 dev: true /@babel/plugin-transform-export-namespace-from@7.23.4(@babel/core@7.23.9): @@ -753,7 +761,7 @@ packages: '@babel/core': ^7.0.0-0 dependencies: '@babel/core': 7.23.9 - '@babel/helper-plugin-utils': 7.24.0 + '@babel/helper-plugin-utils': 7.22.5 '@babel/plugin-syntax-export-namespace-from': 7.8.3(@babel/core@7.23.9) dev: true @@ -764,7 +772,7 @@ packages: '@babel/core': ^7.0.0-0 dependencies: '@babel/core': 7.23.9 - '@babel/helper-plugin-utils': 7.24.0 + '@babel/helper-plugin-utils': 7.22.5 '@babel/helper-skip-transparent-expression-wrappers': 7.22.5 dev: true @@ -777,7 +785,7 @@ packages: '@babel/core': 7.23.9 '@babel/helper-compilation-targets': 7.23.6 '@babel/helper-function-name': 7.23.0 - '@babel/helper-plugin-utils': 7.24.0 + '@babel/helper-plugin-utils': 7.22.5 dev: true /@babel/plugin-transform-json-strings@7.23.4(@babel/core@7.23.9): @@ -787,7 +795,7 @@ packages: '@babel/core': ^7.0.0-0 dependencies: '@babel/core': 7.23.9 - '@babel/helper-plugin-utils': 7.24.0 + '@babel/helper-plugin-utils': 7.22.5 '@babel/plugin-syntax-json-strings': 7.8.3(@babel/core@7.23.9) dev: true @@ -798,7 +806,7 @@ packages: '@babel/core': ^7.0.0-0 dependencies: '@babel/core': 7.23.9 - '@babel/helper-plugin-utils': 7.24.0 + '@babel/helper-plugin-utils': 7.22.5 dev: true /@babel/plugin-transform-logical-assignment-operators@7.23.4(@babel/core@7.23.9): @@ -808,7 +816,7 @@ packages: '@babel/core': ^7.0.0-0 dependencies: '@babel/core': 7.23.9 - '@babel/helper-plugin-utils': 7.24.0 + '@babel/helper-plugin-utils': 7.22.5 '@babel/plugin-syntax-logical-assignment-operators': 7.10.4(@babel/core@7.23.9) dev: true @@ -819,7 +827,7 @@ packages: '@babel/core': ^7.0.0-0 dependencies: '@babel/core': 7.23.9 - '@babel/helper-plugin-utils': 7.24.0 + '@babel/helper-plugin-utils': 7.22.5 dev: true /@babel/plugin-transform-modules-amd@7.23.3(@babel/core@7.23.9): @@ -830,7 +838,7 @@ packages: dependencies: '@babel/core': 7.23.9 '@babel/helper-module-transforms': 7.23.3(@babel/core@7.23.9) - '@babel/helper-plugin-utils': 7.24.0 + '@babel/helper-plugin-utils': 7.22.5 dev: true /@babel/plugin-transform-modules-commonjs@7.23.3(@babel/core@7.23.9): @@ -841,7 +849,7 @@ packages: dependencies: '@babel/core': 7.23.9 '@babel/helper-module-transforms': 7.23.3(@babel/core@7.23.9) - '@babel/helper-plugin-utils': 7.24.0 + '@babel/helper-plugin-utils': 7.22.5 '@babel/helper-simple-access': 7.22.5 dev: true @@ -854,7 +862,7 @@ packages: '@babel/core': 7.23.9 '@babel/helper-hoist-variables': 7.22.5 '@babel/helper-module-transforms': 7.23.3(@babel/core@7.23.9) - '@babel/helper-plugin-utils': 7.24.0 + '@babel/helper-plugin-utils': 7.22.5 '@babel/helper-validator-identifier': 7.22.20 dev: true @@ -866,7 +874,7 @@ packages: dependencies: '@babel/core': 7.23.9 '@babel/helper-module-transforms': 7.23.3(@babel/core@7.23.9) - '@babel/helper-plugin-utils': 7.24.0 + '@babel/helper-plugin-utils': 7.22.5 dev: true /@babel/plugin-transform-named-capturing-groups-regex@7.22.5(@babel/core@7.23.9): @@ -877,7 +885,7 @@ packages: dependencies: '@babel/core': 7.23.9 '@babel/helper-create-regexp-features-plugin': 7.22.15(@babel/core@7.23.9) - '@babel/helper-plugin-utils': 7.24.0 + '@babel/helper-plugin-utils': 7.22.5 dev: true /@babel/plugin-transform-new-target@7.23.3(@babel/core@7.23.9): @@ -887,7 +895,7 @@ packages: '@babel/core': ^7.0.0-0 dependencies: '@babel/core': 7.23.9 - '@babel/helper-plugin-utils': 7.24.0 + '@babel/helper-plugin-utils': 7.22.5 dev: true /@babel/plugin-transform-nullish-coalescing-operator@7.23.4(@babel/core@7.23.9): @@ -897,7 +905,7 @@ packages: '@babel/core': ^7.0.0-0 dependencies: '@babel/core': 7.23.9 - '@babel/helper-plugin-utils': 7.24.0 + '@babel/helper-plugin-utils': 7.22.5 '@babel/plugin-syntax-nullish-coalescing-operator': 7.8.3(@babel/core@7.23.9) dev: true @@ -908,12 +916,12 @@ packages: '@babel/core': ^7.0.0-0 dependencies: '@babel/core': 7.23.9 - '@babel/helper-plugin-utils': 7.24.0 + '@babel/helper-plugin-utils': 7.22.5 '@babel/plugin-syntax-numeric-separator': 7.10.4(@babel/core@7.23.9) dev: true - /@babel/plugin-transform-object-rest-spread@7.24.0(@babel/core@7.23.9): - resolution: {integrity: sha512-y/yKMm7buHpFFXfxVFS4Vk1ToRJDilIa6fKRioB9Vjichv58TDGXTvqV0dN7plobAmTW5eSEGXDngE+Mm+uO+w==} + /@babel/plugin-transform-object-rest-spread@7.23.4(@babel/core@7.23.9): + resolution: {integrity: sha512-9x9K1YyeQVw0iOXJlIzwm8ltobIIv7j2iLyP2jIhEbqPRQ7ScNgwQufU2I0Gq11VjyG4gI4yMXt2VFags+1N3g==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 @@ -921,7 +929,7 @@ packages: '@babel/compat-data': 7.23.5 '@babel/core': 7.23.9 '@babel/helper-compilation-targets': 7.23.6 - '@babel/helper-plugin-utils': 7.24.0 + '@babel/helper-plugin-utils': 7.22.5 '@babel/plugin-syntax-object-rest-spread': 7.8.3(@babel/core@7.23.9) '@babel/plugin-transform-parameters': 7.23.3(@babel/core@7.23.9) dev: true @@ -933,7 +941,7 @@ packages: '@babel/core': ^7.0.0-0 dependencies: '@babel/core': 7.23.9 - '@babel/helper-plugin-utils': 7.24.0 + '@babel/helper-plugin-utils': 7.22.5 '@babel/helper-replace-supers': 7.22.20(@babel/core@7.23.9) dev: true @@ -944,7 +952,7 @@ packages: '@babel/core': ^7.0.0-0 dependencies: '@babel/core': 7.23.9 - '@babel/helper-plugin-utils': 7.24.0 + '@babel/helper-plugin-utils': 7.22.5 '@babel/plugin-syntax-optional-catch-binding': 7.8.3(@babel/core@7.23.9) dev: true @@ -955,7 +963,7 @@ packages: '@babel/core': ^7.0.0-0 dependencies: '@babel/core': 7.23.9 - '@babel/helper-plugin-utils': 7.24.0 + '@babel/helper-plugin-utils': 7.22.5 '@babel/helper-skip-transparent-expression-wrappers': 7.22.5 '@babel/plugin-syntax-optional-chaining': 7.8.3(@babel/core@7.23.9) dev: true @@ -967,7 +975,7 @@ packages: '@babel/core': ^7.0.0-0 dependencies: '@babel/core': 7.23.9 - '@babel/helper-plugin-utils': 7.24.0 + '@babel/helper-plugin-utils': 7.22.5 dev: true /@babel/plugin-transform-private-methods@7.23.3(@babel/core@7.23.9): @@ -977,8 +985,8 @@ packages: '@babel/core': ^7.0.0-0 dependencies: '@babel/core': 7.23.9 - '@babel/helper-create-class-features-plugin': 7.24.0(@babel/core@7.23.9) - '@babel/helper-plugin-utils': 7.24.0 + '@babel/helper-create-class-features-plugin': 7.23.7(@babel/core@7.23.9) + '@babel/helper-plugin-utils': 7.22.5 dev: true /@babel/plugin-transform-private-property-in-object@7.23.4(@babel/core@7.23.9): @@ -989,8 +997,8 @@ packages: dependencies: '@babel/core': 7.23.9 '@babel/helper-annotate-as-pure': 7.22.5 - '@babel/helper-create-class-features-plugin': 7.24.0(@babel/core@7.23.9) - '@babel/helper-plugin-utils': 7.24.0 + '@babel/helper-create-class-features-plugin': 7.23.7(@babel/core@7.23.9) + '@babel/helper-plugin-utils': 7.22.5 '@babel/plugin-syntax-private-property-in-object': 7.14.5(@babel/core@7.23.9) dev: true @@ -1001,7 +1009,7 @@ packages: '@babel/core': ^7.0.0-0 dependencies: '@babel/core': 7.23.9 - '@babel/helper-plugin-utils': 7.24.0 + '@babel/helper-plugin-utils': 7.22.5 dev: true /@babel/plugin-transform-regenerator@7.23.3(@babel/core@7.23.9): @@ -1011,7 +1019,7 @@ packages: '@babel/core': ^7.0.0-0 dependencies: '@babel/core': 7.23.9 - '@babel/helper-plugin-utils': 7.24.0 + '@babel/helper-plugin-utils': 7.22.5 regenerator-transform: 0.15.2 dev: true @@ -1022,7 +1030,7 @@ packages: '@babel/core': ^7.0.0-0 dependencies: '@babel/core': 7.23.9 - '@babel/helper-plugin-utils': 7.24.0 + '@babel/helper-plugin-utils': 7.22.5 dev: true /@babel/plugin-transform-shorthand-properties@7.23.3(@babel/core@7.23.9): @@ -1032,7 +1040,7 @@ packages: '@babel/core': ^7.0.0-0 dependencies: '@babel/core': 7.23.9 - '@babel/helper-plugin-utils': 7.24.0 + '@babel/helper-plugin-utils': 7.22.5 dev: true /@babel/plugin-transform-spread@7.23.3(@babel/core@7.23.9): @@ -1042,7 +1050,7 @@ packages: '@babel/core': ^7.0.0-0 dependencies: '@babel/core': 7.23.9 - '@babel/helper-plugin-utils': 7.24.0 + '@babel/helper-plugin-utils': 7.22.5 '@babel/helper-skip-transparent-expression-wrappers': 7.22.5 dev: true @@ -1053,7 +1061,7 @@ packages: '@babel/core': ^7.0.0-0 dependencies: '@babel/core': 7.23.9 - '@babel/helper-plugin-utils': 7.24.0 + '@babel/helper-plugin-utils': 7.22.5 dev: true /@babel/plugin-transform-template-literals@7.23.3(@babel/core@7.23.9): @@ -1063,7 +1071,7 @@ packages: '@babel/core': ^7.0.0-0 dependencies: '@babel/core': 7.23.9 - '@babel/helper-plugin-utils': 7.24.0 + '@babel/helper-plugin-utils': 7.22.5 dev: true /@babel/plugin-transform-typeof-symbol@7.23.3(@babel/core@7.23.9): @@ -1073,7 +1081,7 @@ packages: '@babel/core': ^7.0.0-0 dependencies: '@babel/core': 7.23.9 - '@babel/helper-plugin-utils': 7.24.0 + '@babel/helper-plugin-utils': 7.22.5 dev: true /@babel/plugin-transform-typescript@7.23.6(@babel/core@7.23.9): @@ -1084,8 +1092,8 @@ packages: dependencies: '@babel/core': 7.23.9 '@babel/helper-annotate-as-pure': 7.22.5 - '@babel/helper-create-class-features-plugin': 7.24.0(@babel/core@7.23.9) - '@babel/helper-plugin-utils': 7.24.0 + '@babel/helper-create-class-features-plugin': 7.23.7(@babel/core@7.23.9) + '@babel/helper-plugin-utils': 7.22.5 '@babel/plugin-syntax-typescript': 7.23.3(@babel/core@7.23.9) dev: true @@ -1096,7 +1104,7 @@ packages: '@babel/core': ^7.0.0-0 dependencies: '@babel/core': 7.23.9 - '@babel/helper-plugin-utils': 7.24.0 + '@babel/helper-plugin-utils': 7.22.5 dev: true /@babel/plugin-transform-unicode-property-regex@7.23.3(@babel/core@7.23.9): @@ -1107,7 +1115,7 @@ packages: dependencies: '@babel/core': 7.23.9 '@babel/helper-create-regexp-features-plugin': 7.22.15(@babel/core@7.23.9) - '@babel/helper-plugin-utils': 7.24.0 + '@babel/helper-plugin-utils': 7.22.5 dev: true /@babel/plugin-transform-unicode-regex@7.23.3(@babel/core@7.23.9): @@ -1118,7 +1126,7 @@ packages: dependencies: '@babel/core': 7.23.9 '@babel/helper-create-regexp-features-plugin': 7.22.15(@babel/core@7.23.9) - '@babel/helper-plugin-utils': 7.24.0 + '@babel/helper-plugin-utils': 7.22.5 dev: true /@babel/plugin-transform-unicode-sets-regex@7.23.3(@babel/core@7.23.9): @@ -1129,7 +1137,7 @@ packages: dependencies: '@babel/core': 7.23.9 '@babel/helper-create-regexp-features-plugin': 7.22.15(@babel/core@7.23.9) - '@babel/helper-plugin-utils': 7.24.0 + '@babel/helper-plugin-utils': 7.22.5 dev: true /@babel/preset-env@7.23.9(@babel/core@7.23.9): @@ -1141,7 +1149,7 @@ packages: '@babel/compat-data': 7.23.5 '@babel/core': 7.23.9 '@babel/helper-compilation-targets': 7.23.6 - '@babel/helper-plugin-utils': 7.24.0 + '@babel/helper-plugin-utils': 7.22.5 '@babel/helper-validator-option': 7.23.5 '@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression': 7.23.3(@babel/core@7.23.9) '@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining': 7.23.3(@babel/core@7.23.9) @@ -1194,7 +1202,7 @@ packages: '@babel/plugin-transform-new-target': 7.23.3(@babel/core@7.23.9) '@babel/plugin-transform-nullish-coalescing-operator': 7.23.4(@babel/core@7.23.9) '@babel/plugin-transform-numeric-separator': 7.23.4(@babel/core@7.23.9) - '@babel/plugin-transform-object-rest-spread': 7.24.0(@babel/core@7.23.9) + '@babel/plugin-transform-object-rest-spread': 7.23.4(@babel/core@7.23.9) '@babel/plugin-transform-object-super': 7.23.3(@babel/core@7.23.9) '@babel/plugin-transform-optional-catch-binding': 7.23.4(@babel/core@7.23.9) '@babel/plugin-transform-optional-chaining': 7.23.4(@babel/core@7.23.9) @@ -1217,7 +1225,7 @@ packages: babel-plugin-polyfill-corejs2: 0.4.8(@babel/core@7.23.9) babel-plugin-polyfill-corejs3: 0.9.0(@babel/core@7.23.9) babel-plugin-polyfill-regenerator: 0.5.5(@babel/core@7.23.9) - core-js-compat: 3.36.0 + core-js-compat: 3.35.0 semver: 6.3.1 transitivePeerDependencies: - supports-color @@ -1229,8 +1237,8 @@ packages: '@babel/core': ^7.0.0-0 || ^8.0.0-0 <8.0.0 dependencies: '@babel/core': 7.23.9 - '@babel/helper-plugin-utils': 7.24.0 - '@babel/types': 7.24.0 + '@babel/helper-plugin-utils': 7.22.5 + '@babel/types': 7.23.6 esutils: 2.0.3 dev: true @@ -1241,7 +1249,7 @@ packages: '@babel/core': ^7.0.0-0 dependencies: '@babel/core': 7.23.9 - '@babel/helper-plugin-utils': 7.24.0 + '@babel/helper-plugin-utils': 7.22.5 '@babel/helper-validator-option': 7.23.5 '@babel/plugin-syntax-jsx': 7.23.3(@babel/core@7.23.9) '@babel/plugin-transform-modules-commonjs': 7.23.3(@babel/core@7.23.9) @@ -1252,13 +1260,22 @@ packages: resolution: {integrity: sha512-x/rqGMdzj+fWZvCOYForTghzbtqPDZ5gPwaoNGHdgDfF2QA/XZbCBp4Moo5scrkAMPhB7z26XM/AaHuIJdgauA==} dev: true - /@babel/runtime@7.24.0: - resolution: {integrity: sha512-Chk32uHMg6TnQdvw2e9IlqPpFX/6NLuK0Ys2PqLb7/gL5uFn9mXvK715FGLlOLQrcO4qIkNHkvPGktzzXexsFw==} + /@babel/runtime@7.23.7: + resolution: {integrity: sha512-w06OXVOFso7LcbzMiDGt+3X7Rh7Ho8MmgPoWU3rarH+8upf+wSU/grlGbWzQyr3DkdN6ZeuMFjpdwW0Q+HxobA==} engines: {node: '>=6.9.0'} dependencies: regenerator-runtime: 0.14.1 dev: true + /@babel/template@7.22.15: + resolution: {integrity: sha512-QPErUVm4uyJa60rkI73qneDacvdvzxshT3kksGqlGWYdOTIUOwJ7RDUL8sGqslY1uXWSL6xMFKEXDS3ox2uF0w==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/code-frame': 7.23.5 + '@babel/parser': 7.23.6 + '@babel/types': 7.23.6 + dev: true + /@babel/template@7.24.0: resolution: {integrity: sha512-Bkf2q8lMB0AFpX0NFEqSbx1OkTHf0f+0j82mkw+ZpzBnkk7e9Ql0891vlfgi+kHwOk8tQjiQHpqh4LaSa0fKEA==} engines: {node: '>=6.9.0'} @@ -1286,6 +1303,15 @@ packages: - supports-color dev: true + /@babel/types@7.23.6: + resolution: {integrity: sha512-+uarb83brBzPKN38NX1MkB6vb6+mwvR6amUulqAE7ccQw1pEl+bCia9TbdG1lsnFP7lZySvUn37CHyXQdfTwzg==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/helper-string-parser': 7.23.4 + '@babel/helper-validator-identifier': 7.22.20 + to-fast-properties: 2.0.0 + dev: true + /@babel/types@7.24.0: resolution: {integrity: sha512-+j7a5c253RfKh8iABBhywc8NSfP5LURe7Uh4qpsh6jc+aLJguvmIUBdjSdEMQv2bENrCR5MfRdjGo7vzS/ob7w==} engines: {node: '>=6.9.0'} @@ -1322,6 +1348,16 @@ packages: conventional-changelog-conventionalcommits: 7.0.2 dev: true + /@commitlint/config-validator@18.4.3: + resolution: {integrity: sha512-FPZZmTJBARPCyef9ohRC9EANiQEKSWIdatx5OlgeHKu878dWwpyeFauVkhzuBRJFcCA4Uvz/FDtlDKs008IHcA==} + engines: {node: '>=v18'} + requiresBuild: true + dependencies: + '@commitlint/types': 18.4.3 + ajv: 8.12.0 + dev: true + optional: true + /@commitlint/config-validator@19.0.3: resolution: {integrity: sha512-2D3r4PKjoo59zBc2auodrSCaUnCSALCx54yveOFwwP/i2kfEAQrygwOleFWswLqK0UL/F9r07MFi5ev2ohyM4Q==} engines: {node: '>=v18'} @@ -1341,7 +1377,7 @@ packages: '@commitlint/load': 19.0.3(@types/node@20.11.24)(typescript@5.3.3) '@commitlint/types': 19.0.3 chalk: 5.3.0 - commitizen: 4.3.0(@types/node@20.11.24)(typescript@5.3.3) + commitizen: 4.3.0(typescript@5.3.3) inquirer: 9.2.15 lodash.isplainobject: 4.0.6 word-wrap: 1.2.5 @@ -1362,6 +1398,13 @@ packages: lodash.upperfirst: 4.3.1 dev: true + /@commitlint/execute-rule@18.4.3: + resolution: {integrity: sha512-t7FM4c+BdX9WWZCPrrbV5+0SWLgT3kCq7e7/GhHCreYifg3V8qyvO127HF796vyFql75n4TFF+5v1asOOWkV1Q==} + engines: {node: '>=v18'} + requiresBuild: true + dev: true + optional: true + /@commitlint/execute-rule@19.0.0: resolution: {integrity: sha512-mtsdpY1qyWgAO/iOK0L6gSGeR7GFcdW7tIjcNFxcWkfLDF5qVbPHKuGATFqRMsxcO8OUKNj0+3WOHB7EHm4Jdw==} engines: {node: '>=v18'} @@ -1393,6 +1436,28 @@ packages: '@commitlint/types': 19.0.3 dev: true + /@commitlint/load@18.4.3(typescript@5.3.3): + resolution: {integrity: sha512-v6j2WhvRQJrcJaj5D+EyES2WKTxPpxENmNpNG3Ww8MZGik3jWRXtph0QTzia5ZJyPh2ib5aC/6BIDymkUUM58Q==} + engines: {node: '>=v18'} + requiresBuild: true + dependencies: + '@commitlint/config-validator': 18.4.3 + '@commitlint/execute-rule': 18.4.3 + '@commitlint/resolve-extends': 18.4.3 + '@commitlint/types': 18.4.3 + '@types/node': 18.19.4 + chalk: 4.1.2 + cosmiconfig: 8.3.6(typescript@5.3.3) + cosmiconfig-typescript-loader: 5.0.0(@types/node@18.19.4)(cosmiconfig@8.3.6)(typescript@5.3.3) + lodash.isplainobject: 4.0.6 + lodash.merge: 4.6.2 + lodash.uniq: 4.5.0 + resolve-from: 5.0.0 + transitivePeerDependencies: + - typescript + dev: true + optional: true + /@commitlint/load@19.0.3(@types/node@20.11.24)(typescript@5.3.3): resolution: {integrity: sha512-18Tk/ZcDFRKIoKfEcl7kC+bYkEQ055iyKmGsYDoYWpKf6FUvBrP9bIWapuy/MB+kYiltmP9ITiUx6UXtqC9IRw==} engines: {node: '>=v18'} @@ -1436,6 +1501,20 @@ packages: minimist: 1.2.8 dev: true + /@commitlint/resolve-extends@18.4.3: + resolution: {integrity: sha512-30sk04LZWf8+SDgJrbJCjM90gTg2LxsD9cykCFeFu+JFHvBFq5ugzp2eO/DJGylAdVaqxej3c7eTSE64hR/lnw==} + engines: {node: '>=v18'} + requiresBuild: true + dependencies: + '@commitlint/config-validator': 18.4.3 + '@commitlint/types': 18.4.3 + import-fresh: 3.3.0 + lodash.mergewith: 4.6.2 + resolve-from: 5.0.0 + resolve-global: 1.0.0 + dev: true + optional: true + /@commitlint/resolve-extends@19.0.3: resolution: {integrity: sha512-18BKmta8OC8+Ub+Q3QGM9l27VjQaXobloVXOrMvu8CpEwJYv62vC/t7Ka5kJnsW0tU9q1eMqJFZ/nN9T/cOaIA==} engines: {node: '>=v18'} @@ -1471,6 +1550,15 @@ packages: find-up: 7.0.0 dev: true + /@commitlint/types@18.4.3: + resolution: {integrity: sha512-cvzx+vtY/I2hVBZHCLrpoh+sA0hfuzHwDc+BAFPimYLjJkpHnghQM+z8W/KyLGkygJh3BtI3xXXq+dKjnSWEmA==} + engines: {node: '>=v18'} + requiresBuild: true + dependencies: + chalk: 4.1.2 + dev: true + optional: true + /@commitlint/types@19.0.3: resolution: {integrity: sha512-tpyc+7i6bPG9mvaBbtKUeghfyZSDgWquIDfMgqYtTbmZ9Y9VzEm2je9EYcQ0aoz5o7NvGS+rcDec93yO08MHYA==} engines: {node: '>=v18'} @@ -1709,7 +1797,7 @@ packages: debug: 4.3.4 espree: 9.6.1 globals: 13.24.0 - ignore: 5.3.1 + ignore: 5.3.0 import-fresh: 3.3.0 js-yaml: 4.1.0 minimatch: 3.1.2 @@ -1723,11 +1811,11 @@ packages: engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dev: true - /@humanwhocodes/config-array@0.11.14: - resolution: {integrity: sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg==} + /@humanwhocodes/config-array@0.11.13: + resolution: {integrity: sha512-JSBDMiDKSzQVngfRjOdFXgFfklaXI4K9nLF49Auh21lmBWRLIK3+xTErTWD4KU54pb6coM6ESE7Awz/FNU3zgQ==} engines: {node: '>=10.10.0'} dependencies: - '@humanwhocodes/object-schema': 2.0.2 + '@humanwhocodes/object-schema': 2.0.1 debug: 4.3.4 minimatch: 3.1.2 transitivePeerDependencies: @@ -1739,8 +1827,8 @@ packages: engines: {node: '>=12.22'} dev: true - /@humanwhocodes/object-schema@2.0.2: - resolution: {integrity: sha512-6EwiSjwWYP7pTckG6I5eyFANjPhmPjUX9JRLUSfNPC7FX7zK9gyZAfUEaECL6ALTpGX5AjnBq3C9XmVWPitNpw==} + /@humanwhocodes/object-schema@2.0.1: + resolution: {integrity: sha512-dvuCeX5fC9dXgJn9t+X5atfmgQAzUOWqS1254Gh0m6i8wKd10ebXkfNKiRK+1GWi/yTvvLDHpoxLr0xxxeslWw==} dev: true /@jest/schemas@29.6.3: @@ -1750,22 +1838,22 @@ packages: '@sinclair/typebox': 0.27.8 dev: true - /@jridgewell/gen-mapping@0.3.5: - resolution: {integrity: sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==} + /@jridgewell/gen-mapping@0.3.3: + resolution: {integrity: sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ==} engines: {node: '>=6.0.0'} dependencies: - '@jridgewell/set-array': 1.2.1 + '@jridgewell/set-array': 1.1.2 '@jridgewell/sourcemap-codec': 1.4.15 - '@jridgewell/trace-mapping': 0.3.25 + '@jridgewell/trace-mapping': 0.3.20 dev: true - /@jridgewell/resolve-uri@3.1.2: - resolution: {integrity: sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==} + /@jridgewell/resolve-uri@3.1.1: + resolution: {integrity: sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA==} engines: {node: '>=6.0.0'} dev: true - /@jridgewell/set-array@1.2.1: - resolution: {integrity: sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==} + /@jridgewell/set-array@1.1.2: + resolution: {integrity: sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==} engines: {node: '>=6.0.0'} dev: true @@ -1773,10 +1861,10 @@ packages: resolution: {integrity: sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==} dev: true - /@jridgewell/trace-mapping@0.3.25: - resolution: {integrity: sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==} + /@jridgewell/trace-mapping@0.3.20: + resolution: {integrity: sha512-R8LcPeWZol2zR8mmH3JeKQ6QRCFb7XgUhV9ZlGhHLGyg4wpPiPZNQOOWhFZhxKw8u//yTbNGI42Bx/3paXEQ+Q==} dependencies: - '@jridgewell/resolve-uri': 3.1.2 + '@jridgewell/resolve-uri': 3.1.1 '@jridgewell/sourcemap-codec': 1.4.15 dev: true @@ -1784,7 +1872,7 @@ packages: resolution: {integrity: sha512-ajo/heTlG3QgC8EGP6APIejksVAYt4ayz4tqoP3MolFELzcH1x1fzwEYRJTPO0IELutZ5HQ0c26/GqAYy79u3g==} engines: {node: '>= 0.4'} dependencies: - call-bind: 1.0.7 + call-bind: 1.0.5 dev: true /@nodelib/fs.scandir@2.1.5: @@ -1805,7 +1893,7 @@ packages: engines: {node: '>= 8'} dependencies: '@nodelib/fs.scandir': 2.1.5 - fastq: 1.17.1 + fastq: 1.16.0 dev: true /@rightcapital/eslint-config-base@20.0.0(@typescript-eslint/parser@7.1.0)(eslint@8.56.0): @@ -2002,13 +2090,21 @@ packages: resolution: {integrity: sha512-OvlIYQK9tNneDlS0VN54LLd5uiPCBOp7gS5Z0f1mjoJYBrtStzgmJBxONW3U6OZqdtNzZPmn9BS/7WI7BFFcFQ==} dev: true + /@types/node@18.19.4: + resolution: {integrity: sha512-xNzlUhzoHotIsnFoXmJB+yWmBvFZgKCI9TtPIEdYIMM1KWfwuY8zh7wvc1u1OAXlC7dlf6mZVx/s+Y5KfFz19A==} + requiresBuild: true + dependencies: + undici-types: 5.26.5 + dev: true + optional: true + /@types/node@20.11.24: resolution: {integrity: sha512-Kza43ewS3xoLgCEpQrsT+xRo/EJej1y0kVYGiLFE1NEODXGzTfwiC6tXTLMQskn1X4/Rjlh0MQUvx9W+L9long==} dependencies: undici-types: 5.26.5 - /@types/semver@7.5.8: - resolution: {integrity: sha512-I8EUhyrgfLrcTkzV3TSsGyl1tSuPrEDzr0yd5m90UgNxQkyDXULk3b6MlQqTCpZpNtWe1K0hzclnZkTcLBe2UQ==} + /@types/semver@7.5.6: + resolution: {integrity: sha512-dn1l8LaMea/IjDoHNd9J52uBbInB796CDffS6VdIxvqYCPSG0V0DzHp76GpaWnlhg88uYyPbXCDIowa86ybd5A==} dev: true /@typescript-eslint/eslint-plugin@7.1.0(@typescript-eslint/parser@7.1.0)(eslint@8.56.0)(typescript@5.3.3): @@ -2031,10 +2127,10 @@ packages: debug: 4.3.4 eslint: 8.56.0 graphemer: 1.4.0 - ignore: 5.3.1 + ignore: 5.3.0 natural-compare: 1.4.0 - semver: 7.6.0 - ts-api-utils: 1.2.1(typescript@5.3.3) + semver: 7.5.4 + ts-api-utils: 1.0.3(typescript@5.3.3) typescript: 5.3.3 transitivePeerDependencies: - supports-color @@ -2083,7 +2179,7 @@ packages: '@typescript-eslint/utils': 7.1.0(eslint@8.56.0)(typescript@5.3.3) debug: 4.3.4 eslint: 8.56.0 - ts-api-utils: 1.2.1(typescript@5.3.3) + ts-api-utils: 1.0.3(typescript@5.3.3) typescript: 5.3.3 transitivePeerDependencies: - supports-color @@ -2109,8 +2205,8 @@ packages: globby: 11.1.0 is-glob: 4.0.3 minimatch: 9.0.3 - semver: 7.6.0 - ts-api-utils: 1.2.1(typescript@5.3.3) + semver: 7.5.4 + ts-api-utils: 1.0.3(typescript@5.3.3) typescript: 5.3.3 transitivePeerDependencies: - supports-color @@ -2124,12 +2220,12 @@ packages: dependencies: '@eslint-community/eslint-utils': 4.4.0(eslint@8.56.0) '@types/json-schema': 7.0.15 - '@types/semver': 7.5.8 + '@types/semver': 7.5.6 '@typescript-eslint/scope-manager': 7.1.0 '@typescript-eslint/types': 7.1.0 '@typescript-eslint/typescript-estree': 7.1.0(typescript@5.3.3) eslint: 8.56.0 - semver: 7.6.0 + semver: 7.5.4 transitivePeerDependencies: - supports-color - typescript @@ -2270,12 +2366,11 @@ packages: resolution: {integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==} dev: true - /array-buffer-byte-length@1.0.1: - resolution: {integrity: sha512-ahC5W1xgou+KTXix4sAO8Ki12Q+jf4i0+tmk3sC+zgcynshkHxzpXdImBehiUYKKKDwvfFiJl1tZt6ewscS1Mg==} - engines: {node: '>= 0.4'} + /array-buffer-byte-length@1.0.0: + resolution: {integrity: sha512-LPuwb2P+NrQw3XhxGc36+XSvuBPopovXYTR9Ew++Du9Yb/bx5AzBfrIsBoj0EZUifjQU+sHL21sseZ3jerWO/A==} dependencies: - call-bind: 1.0.7 - is-array-buffer: 3.0.4 + call-bind: 1.0.5 + is-array-buffer: 3.0.2 dev: true /array-ify@1.0.0: @@ -2287,18 +2382,17 @@ packages: engines: {node: '>=8'} dev: true - /arraybuffer.prototype.slice@1.0.3: - resolution: {integrity: sha512-bMxMKAjg13EBSVscxTaYA4mRc5t1UAXa2kXiGTNfZ079HIWXEkKmkgFrh/nJqamaLSrXO5H4WFFkPEaLJWbs3A==} + /arraybuffer.prototype.slice@1.0.2: + resolution: {integrity: sha512-yMBKppFur/fbHu9/6USUe03bZ4knMYiwFBcyiaXB8Go0qNehwX6inYPzK9U0NeQvGxKthcmHcaR8P5MStSRBAw==} engines: {node: '>= 0.4'} dependencies: - array-buffer-byte-length: 1.0.1 - call-bind: 1.0.7 + array-buffer-byte-length: 1.0.0 + call-bind: 1.0.5 define-properties: 1.2.1 - es-abstract: 1.22.5 - es-errors: 1.3.0 - get-intrinsic: 1.2.4 - is-array-buffer: 3.0.4 - is-shared-array-buffer: 1.0.3 + es-abstract: 1.22.3 + get-intrinsic: 1.2.2 + is-array-buffer: 3.0.2 + is-shared-array-buffer: 1.0.2 dev: true /assertion-error@1.1.0: @@ -2310,11 +2404,9 @@ packages: engines: {node: '>= 4.0.0'} dev: true - /available-typed-arrays@1.0.7: - resolution: {integrity: sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==} + /available-typed-arrays@1.0.5: + resolution: {integrity: sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw==} engines: {node: '>= 0.4'} - dependencies: - possible-typed-array-names: 1.0.0 dev: true /babel-plugin-polyfill-corejs2@0.4.8(@babel/core@7.23.9): @@ -2337,7 +2429,7 @@ packages: dependencies: '@babel/core': 7.23.9 '@babel/helper-define-polyfill-provider': 0.5.0(@babel/core@7.23.9) - core-js-compat: 3.36.0 + core-js-compat: 3.35.0 transitivePeerDependencies: - supports-color dev: true @@ -2373,7 +2465,7 @@ packages: minimatch: 3.1.2 p-limit: 3.1.0 prompts: 2.4.2 - semver: 7.6.0 + semver: 7.5.4 toposort: 2.0.2 uuid: 9.0.1 workspace-tools: 0.36.4 @@ -2410,15 +2502,15 @@ packages: fill-range: 7.0.1 dev: true - /browserslist@4.23.0: - resolution: {integrity: sha512-QW8HiM1shhT2GuzkvklfjcKDiWFXHOeFCIA/huJPwHsslwcydgk7X+z2zXpEijP98UCY7HbubZt5J2Zgvf0CaQ==} + /browserslist@4.22.2: + resolution: {integrity: sha512-0UgcrvQmBDvZHFGdYUehrCNIazki7/lUP3kkoi/r3YB2amZbFM9J43ZRkJTXBUZK4gmx56+Sqk9+Vs9mwZx9+A==} engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} hasBin: true dependencies: - caniuse-lite: 1.0.30001593 - electron-to-chromium: 1.4.690 + caniuse-lite: 1.0.30001572 + electron-to-chromium: 1.4.616 node-releases: 2.0.14 - update-browserslist-db: 1.0.13(browserslist@4.23.0) + update-browserslist-db: 1.0.13(browserslist@4.22.2) dev: true /buffer@5.7.1: @@ -2438,15 +2530,12 @@ packages: engines: {node: '>=6'} dev: true - /call-bind@1.0.7: - resolution: {integrity: sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==} - engines: {node: '>= 0.4'} + /call-bind@1.0.5: + resolution: {integrity: sha512-C3nQxfFZxFRVoJoGKKI8y3MOEo129NQ+FgQ08iye+Mk4zNZZGdjfs06bVTr+DBSlA66Q2VEcMki/cUCP4SercQ==} dependencies: - es-define-property: 1.0.0 - es-errors: 1.3.0 function-bind: 1.1.2 - get-intrinsic: 1.2.4 - set-function-length: 1.2.1 + get-intrinsic: 1.2.2 + set-function-length: 1.1.1 dev: true /callsites@3.1.0: @@ -2454,8 +2543,8 @@ packages: engines: {node: '>=6'} dev: true - /caniuse-lite@1.0.30001593: - resolution: {integrity: sha512-UWM1zlo3cZfkpBysd7AS+z+v007q9G1+fLTUU42rQnY6t2axoogPW/xol6T7juU5EUoOhML4WgBIdG+9yYqAjQ==} + /caniuse-lite@1.0.30001572: + resolution: {integrity: sha512-1Pbh5FLmn5y4+QhNyJE9j3/7dK44dGB83/ZMjv/qJk86TvDbjk0LosiZo0i0WB0Vx607qMX9jYrn1VLHCkN4rw==} dev: true /chai@4.4.1: @@ -2560,13 +2649,13 @@ packages: resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==} dev: true - /commitizen@4.3.0(@types/node@20.11.24)(typescript@5.3.3): + /commitizen@4.3.0(typescript@5.3.3): resolution: {integrity: sha512-H0iNtClNEhT0fotHvGV3E9tDejDeS04sN1veIebsKYGMuGscFaswRoYJKmT3eW85eIJAs0F28bG2+a/9wCOfPw==} engines: {node: '>= 12'} hasBin: true dependencies: cachedir: 2.3.0 - cz-conventional-changelog: 3.3.0(@types/node@20.11.24)(typescript@5.3.3) + cz-conventional-changelog: 3.3.0(typescript@5.3.3) dedent: 0.7.0 detect-indent: 6.1.0 find-node-modules: 2.1.3 @@ -2580,7 +2669,6 @@ packages: strip-bom: 4.0.0 strip-json-comments: 3.1.1 transitivePeerDependencies: - - '@types/node' - typescript dev: true @@ -2632,11 +2720,26 @@ packages: resolution: {integrity: sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==} dev: true - /core-js-compat@3.36.0: - resolution: {integrity: sha512-iV9Pd/PsgjNWBXeq8XRtWVSgz2tKAfhfvBs7qxYty+RlRd+OCksaWmOnc4JKrTc1cToXL1N0s3l/vwlxPtdElw==} + /core-js-compat@3.35.0: + resolution: {integrity: sha512-5blwFAddknKeNgsjBzilkdQ0+YK8L1PfqPYq40NOYMYFSS38qj+hpTcLLWwpIwA2A5bje/x5jmVn2tzUMg9IVw==} + dependencies: + browserslist: 4.22.2 + dev: true + + /cosmiconfig-typescript-loader@5.0.0(@types/node@18.19.4)(cosmiconfig@8.3.6)(typescript@5.3.3): + resolution: {integrity: sha512-+8cK7jRAReYkMwMiG+bxhcNKiHJDM6bR9FD/nGBXOWdMLuYawjF5cGrtLilJ+LGd3ZjCXnJjR5DkfWPoIVlqJA==} + engines: {node: '>=v16'} + peerDependencies: + '@types/node': '*' + cosmiconfig: '>=8.2' + typescript: '>=4' dependencies: - browserslist: 4.23.0 + '@types/node': 18.19.4 + cosmiconfig: 8.3.6(typescript@5.3.3) + jiti: 1.21.0 + typescript: 5.3.3 dev: true + optional: true /cosmiconfig-typescript-loader@5.0.0(@types/node@20.11.24)(cosmiconfig@8.3.6)(typescript@5.3.3): resolution: {integrity: sha512-+8cK7jRAReYkMwMiG+bxhcNKiHJDM6bR9FD/nGBXOWdMLuYawjF5cGrtLilJ+LGd3ZjCXnJjR5DkfWPoIVlqJA==} @@ -2677,20 +2780,19 @@ packages: which: 2.0.2 dev: true - /cz-conventional-changelog@3.3.0(@types/node@20.11.24)(typescript@5.3.3): + /cz-conventional-changelog@3.3.0(typescript@5.3.3): resolution: {integrity: sha512-U466fIzU5U22eES5lTNiNbZ+d8dfcHcssH4o7QsdWaCcRs/feIPCxKYSWkYBNs5mny7MvEfwpTLWjvbm94hecw==} engines: {node: '>= 10'} dependencies: chalk: 2.4.2 - commitizen: 4.3.0(@types/node@20.11.24)(typescript@5.3.3) + commitizen: 4.3.0(typescript@5.3.3) conventional-commit-types: 3.0.0 lodash.map: 4.6.0 longest: 2.0.1 word-wrap: 1.2.5 optionalDependencies: - '@commitlint/load': 19.0.3(@types/node@20.11.24)(typescript@5.3.3) + '@commitlint/load': 18.4.3(typescript@5.3.3) transitivePeerDependencies: - - '@types/node' - typescript dev: true @@ -2743,21 +2845,21 @@ packages: clone: 1.0.4 dev: true - /define-data-property@1.1.4: - resolution: {integrity: sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==} + /define-data-property@1.1.1: + resolution: {integrity: sha512-E7uGkTzkk1d0ByLeSc6ZsFS79Axg+m1P/VsgYsxHgiuc3tFSj+MjMIwe90FC4lOAZzNBdY7kkO2P2wKdsQ1vgQ==} engines: {node: '>= 0.4'} dependencies: - es-define-property: 1.0.0 - es-errors: 1.3.0 + get-intrinsic: 1.2.2 gopd: 1.0.1 + has-property-descriptors: 1.0.1 dev: true /define-properties@1.2.1: resolution: {integrity: sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==} engines: {node: '>= 0.4'} dependencies: - define-data-property: 1.1.4 - has-property-descriptors: 1.0.2 + define-data-property: 1.1.1 + has-property-descriptors: 1.0.1 object-keys: 1.1.1 dev: true @@ -2797,16 +2899,16 @@ packages: is-obj: 2.0.0 dev: true - /electron-to-chromium@1.4.690: - resolution: {integrity: sha512-+2OAGjUx68xElQhydpcbqH50hE8Vs2K6TkAeLhICYfndb67CVH0UsZaijmRUE3rHlIxU1u0jxwhgVe6fK3YANA==} + /electron-to-chromium@1.4.616: + resolution: {integrity: sha512-1n7zWYh8eS0L9Uy+GskE0lkBUNK83cXTVJI0pU3mGprFsbfSdAc15VTFbo+A+Bq4pwstmL30AVcEU3Fo463lNg==} dev: true /emoji-regex@8.0.0: resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==} dev: true - /enhanced-resolve@5.15.1: - resolution: {integrity: sha512-3d3JRbwsCLJsYgvb6NuWEG44jjPSOMuS73L/6+7BZuoKm3W+qXnSoIYVHi8dG7Qcg4inAY4jbzkZ7MnskePeDg==} + /enhanced-resolve@5.15.0: + resolution: {integrity: sha512-LXYT42KJ7lpIKECr2mAXIaMldcNCh/7E0KBKOu4KSfkHmP+mZmSs+8V5gBAqisWBy0OO4W5Oyys0GO1Y8KtdKg==} engines: {node: '>=10.13.0'} dependencies: graceful-fs: 4.2.11 @@ -2819,72 +2921,58 @@ packages: is-arrayish: 0.2.1 dev: true - /es-abstract@1.22.5: - resolution: {integrity: sha512-oW69R+4q2wG+Hc3KZePPZxOiisRIqfKBVo/HLx94QcJeWGU/8sZhCvc829rd1kS366vlJbzBfXf9yWwf0+Ko7w==} + /es-abstract@1.22.3: + resolution: {integrity: sha512-eiiY8HQeYfYH2Con2berK+To6GrK2RxbPawDkGq4UiCQQfZHb6wX9qQqkbpPqaxQFcl8d9QzZqo0tGE0VcrdwA==} engines: {node: '>= 0.4'} dependencies: - array-buffer-byte-length: 1.0.1 - arraybuffer.prototype.slice: 1.0.3 - available-typed-arrays: 1.0.7 - call-bind: 1.0.7 - es-define-property: 1.0.0 - es-errors: 1.3.0 - es-set-tostringtag: 2.0.3 + array-buffer-byte-length: 1.0.0 + arraybuffer.prototype.slice: 1.0.2 + available-typed-arrays: 1.0.5 + call-bind: 1.0.5 + es-set-tostringtag: 2.0.2 es-to-primitive: 1.2.1 function.prototype.name: 1.1.6 - get-intrinsic: 1.2.4 - get-symbol-description: 1.0.2 + get-intrinsic: 1.2.2 + get-symbol-description: 1.0.0 globalthis: 1.0.3 gopd: 1.0.1 - has-property-descriptors: 1.0.2 - has-proto: 1.0.3 + has-property-descriptors: 1.0.1 + has-proto: 1.0.1 has-symbols: 1.0.3 - hasown: 2.0.1 - internal-slot: 1.0.7 - is-array-buffer: 3.0.4 + hasown: 2.0.0 + internal-slot: 1.0.6 + is-array-buffer: 3.0.2 is-callable: 1.2.7 - is-negative-zero: 2.0.3 + is-negative-zero: 2.0.2 is-regex: 1.1.4 - is-shared-array-buffer: 1.0.3 + is-shared-array-buffer: 1.0.2 is-string: 1.0.7 - is-typed-array: 1.1.13 + is-typed-array: 1.1.12 is-weakref: 1.0.2 object-inspect: 1.13.1 object-keys: 1.1.1 object.assign: 4.1.5 - regexp.prototype.flags: 1.5.2 - safe-array-concat: 1.1.0 - safe-regex-test: 1.0.3 + regexp.prototype.flags: 1.5.1 + safe-array-concat: 1.0.1 + safe-regex-test: 1.0.0 string.prototype.trim: 1.2.8 string.prototype.trimend: 1.0.7 string.prototype.trimstart: 1.0.7 - typed-array-buffer: 1.0.2 - typed-array-byte-length: 1.0.1 - typed-array-byte-offset: 1.0.2 - typed-array-length: 1.0.5 + typed-array-buffer: 1.0.0 + typed-array-byte-length: 1.0.0 + typed-array-byte-offset: 1.0.0 + typed-array-length: 1.0.4 unbox-primitive: 1.0.2 - which-typed-array: 1.1.14 + which-typed-array: 1.1.13 dev: true - /es-define-property@1.0.0: - resolution: {integrity: sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==} + /es-set-tostringtag@2.0.2: + resolution: {integrity: sha512-BuDyupZt65P9D2D2vA/zqcI3G5xRsklm5N3xCwuiy+/vKy8i0ifdsQP1sLgO4tZDSCaQUSnmC48khknGMV3D2Q==} engines: {node: '>= 0.4'} dependencies: - get-intrinsic: 1.2.4 - dev: true - - /es-errors@1.3.0: - resolution: {integrity: sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==} - engines: {node: '>= 0.4'} - dev: true - - /es-set-tostringtag@2.0.3: - resolution: {integrity: sha512-3T8uNMC3OQTHkFUsFq8r/BwAXLHvU/9O9mE0fBc/MY5iq/8H7ncvO947LmYA6ldWw9Uh8Yhf25zu6n7nML5QWQ==} - engines: {node: '>= 0.4'} - dependencies: - get-intrinsic: 1.2.4 - has-tostringtag: 1.0.2 - hasown: 2.0.1 + get-intrinsic: 1.2.2 + has-tostringtag: 1.0.0 + hasown: 2.0.0 dev: true /es-to-primitive@1.2.1: @@ -2927,8 +3015,8 @@ packages: '@esbuild/win32-x64': 0.19.12 dev: true - /escalade@3.1.2: - resolution: {integrity: sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA==} + /escalade@3.1.1: + resolution: {integrity: sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==} engines: {node: '>=6'} dev: true @@ -2984,9 +3072,9 @@ packages: eslint-plugin-import: '*' dependencies: debug: 4.3.4 - enhanced-resolve: 5.15.1 + enhanced-resolve: 5.15.0 eslint: 8.56.0 - eslint-module-utils: 2.8.1(@typescript-eslint/parser@7.1.0)(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1)(eslint@8.56.0) + eslint-module-utils: 2.8.0(@typescript-eslint/parser@7.1.0)(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1)(eslint@8.56.0) eslint-plugin-import: /eslint-plugin-i@2.29.1(@typescript-eslint/parser@7.1.0)(eslint-import-resolver-typescript@3.6.1)(eslint@8.56.0) fast-glob: 3.3.2 get-tsconfig: 4.7.2 @@ -2999,8 +3087,8 @@ packages: - supports-color dev: true - /eslint-module-utils@2.8.1(@typescript-eslint/parser@7.1.0)(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1)(eslint@8.56.0): - resolution: {integrity: sha512-rXDXR3h7cs7dy9RNpUlQf80nX31XWJEyGq1tRMo+6GsO5VmTe4UTwtmonAD4ZkAsrfMVDA2wlGJ3790Ys+D49Q==} + /eslint-module-utils@2.8.0(@typescript-eslint/parser@7.1.0)(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1)(eslint@8.56.0): + resolution: {integrity: sha512-aWajIYfsqCKRDgUfjEXNN/JlrzauMuSEy5sbd7WXbtW3EH6A6MpwEh42c7qD+MqQo9QMJ6fWLAeIJynx0g6OAw==} engines: {node: '>=4'} peerDependencies: '@typescript-eslint/parser': '*' @@ -3039,11 +3127,11 @@ packages: doctrine: 3.0.0 eslint: 8.56.0 eslint-import-resolver-node: 0.3.9 - eslint-module-utils: 2.8.1(@typescript-eslint/parser@7.1.0)(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1)(eslint@8.56.0) + eslint-module-utils: 2.8.0(@typescript-eslint/parser@7.1.0)(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1)(eslint@8.56.0) get-tsconfig: 4.7.2 is-glob: 4.0.3 minimatch: 3.1.2 - semver: 7.6.0 + semver: 7.5.4 transitivePeerDependencies: - '@typescript-eslint/parser' - eslint-import-resolver-typescript @@ -3073,7 +3161,7 @@ packages: '@eslint-community/regexpp': 4.10.0 '@eslint/eslintrc': 2.1.4 '@eslint/js': 8.56.0 - '@humanwhocodes/config-array': 0.11.14 + '@humanwhocodes/config-array': 0.11.13 '@humanwhocodes/module-importer': 1.0.1 '@nodelib/fs.walk': 1.2.8 '@ungap/structured-clone': 1.2.0 @@ -3094,7 +3182,7 @@ packages: glob-parent: 6.0.2 globals: 13.24.0 graphemer: 1.4.0 - ignore: 5.3.1 + ignore: 5.3.0 imurmurhash: 0.1.4 is-glob: 4.0.3 is-path-inside: 3.0.3 @@ -3219,8 +3307,8 @@ packages: resolution: {integrity: sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==} dev: true - /fastq@1.17.1: - resolution: {integrity: sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w==} + /fastq@1.16.0: + resolution: {integrity: sha512-ifCoaXsDrsdkWTtiNJX5uzHDsrck5TzfKKDcuFFTIrrc/BS076qgEIfoIy1VeZqViznfKiysPYTh/QeHtnIsYA==} dependencies: reusify: 1.0.4 dev: true @@ -3288,13 +3376,13 @@ packages: resolution: {integrity: sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==} engines: {node: ^10.12.0 || >=12.0.0} dependencies: - flatted: 3.3.1 + flatted: 3.2.9 keyv: 4.5.4 rimraf: 3.0.2 dev: true - /flatted@3.3.1: - resolution: {integrity: sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw==} + /flatted@3.2.9: + resolution: {integrity: sha512-36yxDn5H7OFZQla0/jFJmbIKTdZAQHngCedGxiMmpNfEZM0sdEeT+WczLQrjK6D7o2aiyLYDnkw0R3JK0Qv1RQ==} dev: true /for-each@0.3.3: @@ -3342,9 +3430,9 @@ packages: resolution: {integrity: sha512-Z5kx79swU5P27WEayXM1tBi5Ze/lbIyiNgU3qyXUOf9b2rgXYyF9Dy9Cx+IQv/Lc8WCG6L82zwUPpSS9hGehIg==} engines: {node: '>= 0.4'} dependencies: - call-bind: 1.0.7 + call-bind: 1.0.5 define-properties: 1.2.1 - es-abstract: 1.22.5 + es-abstract: 1.22.3 functions-have-names: 1.2.3 dev: true @@ -3366,15 +3454,13 @@ packages: resolution: {integrity: sha512-8vXOvuE167CtIc3OyItco7N/dpRtBbYOsPsXCz7X/PMnlGjYjSGuZJgM1Y7mmew7BKf9BqvLX2tnOVy1BBUsxQ==} dev: true - /get-intrinsic@1.2.4: - resolution: {integrity: sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==} - engines: {node: '>= 0.4'} + /get-intrinsic@1.2.2: + resolution: {integrity: sha512-0gSo4ml/0j98Y3lngkFEot/zhiCeWsbYIlZ+uZOVgzLyLaUw7wxUL+nCTP0XJvJg1AXulJRI3UJi8GsbDuxdGA==} dependencies: - es-errors: 1.3.0 function-bind: 1.1.2 - has-proto: 1.0.3 + has-proto: 1.0.1 has-symbols: 1.0.3 - hasown: 2.0.1 + hasown: 2.0.0 dev: true /get-stream@6.0.1: @@ -3387,13 +3473,12 @@ packages: engines: {node: '>=16'} dev: true - /get-symbol-description@1.0.2: - resolution: {integrity: sha512-g0QYk1dZBxGwk+Ngc+ltRH2IBp2f7zBkBMBJZCDerh6EhlhSR6+9irMCuT/09zD6qkarHUSn529sK/yL4S27mg==} + /get-symbol-description@1.0.0: + resolution: {integrity: sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw==} engines: {node: '>= 0.4'} dependencies: - call-bind: 1.0.7 - es-errors: 1.3.0 - get-intrinsic: 1.2.4 + call-bind: 1.0.5 + get-intrinsic: 1.2.2 dev: true /get-tsconfig@4.7.2: @@ -3457,6 +3542,15 @@ packages: ini: 4.1.1 dev: true + /global-dirs@0.1.1: + resolution: {integrity: sha512-NknMLn7F2J7aflwFOlGdNIuCDpN3VGoSoB+aap3KABFWbHVn1TCgFC+np23J8W2BiZbjfEw3BFBycSMv1AFblg==} + engines: {node: '>=4'} + requiresBuild: true + dependencies: + ini: 1.3.8 + dev: true + optional: true + /global-modules@1.0.0: resolution: {integrity: sha512-sKzpEkf11GpOFuw0Zzjzmt4B4UZwjOcG757PPvrfhxcLFbq0wpsgpOqxpxtxFiCG4DtG93M6XRVbF2oGdev7bg==} engines: {node: '>=0.10.0'} @@ -3503,7 +3597,7 @@ packages: array-union: 2.1.0 dir-glob: 3.0.1 fast-glob: 3.3.2 - ignore: 5.3.1 + ignore: 5.3.0 merge2: 1.4.1 slash: 3.0.0 dev: true @@ -3511,7 +3605,7 @@ packages: /gopd@1.0.1: resolution: {integrity: sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==} dependencies: - get-intrinsic: 1.2.4 + get-intrinsic: 1.2.2 dev: true /graceful-fs@4.2.11: @@ -3536,14 +3630,14 @@ packages: engines: {node: '>=8'} dev: true - /has-property-descriptors@1.0.2: - resolution: {integrity: sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==} + /has-property-descriptors@1.0.1: + resolution: {integrity: sha512-VsX8eaIewvas0xnvinAe9bw4WfIeODpGYikiWYLH+dma0Jw6KHYqWiWfhQlgOVK8D6PvjubK5Uc4P0iIhIcNVg==} dependencies: - es-define-property: 1.0.0 + get-intrinsic: 1.2.2 dev: true - /has-proto@1.0.3: - resolution: {integrity: sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==} + /has-proto@1.0.1: + resolution: {integrity: sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==} engines: {node: '>= 0.4'} dev: true @@ -3552,15 +3646,15 @@ packages: engines: {node: '>= 0.4'} dev: true - /has-tostringtag@1.0.2: - resolution: {integrity: sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==} + /has-tostringtag@1.0.0: + resolution: {integrity: sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==} engines: {node: '>= 0.4'} dependencies: has-symbols: 1.0.3 dev: true - /hasown@2.0.1: - resolution: {integrity: sha512-1/th4MHjnwncwXsIW6QMzlvYL9kG5e/CpVvLRZe4XPa8TOUNbCELqmvhDmnkNsAjwaG4+I8gJJL0JBvTTLO9qA==} + /hasown@2.0.0: + resolution: {integrity: sha512-vUptKVTpIJhcczKBbgnS+RtcuYMB8+oNzPK2/Hp3hanz8JmpATdmmgLgSaadVREkDm+e2giHwY3ZRkyjSIDDFA==} engines: {node: '>= 0.4'} dependencies: function-bind: 1.1.2 @@ -3600,8 +3694,8 @@ packages: resolution: {integrity: sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==} dev: true - /ignore@5.3.1: - resolution: {integrity: sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw==} + /ignore@5.3.0: + resolution: {integrity: sha512-g7dmpshy+gD7mh88OC9NwSGTKoc3kyLAZQRU1mt53Aw/vnvfXnbC+F/7F7QoYVKbV+KNvJx8wArewKy1vXMtlg==} engines: {node: '>= 4'} dev: true @@ -3684,21 +3778,21 @@ packages: wrap-ansi: 6.2.0 dev: true - /internal-slot@1.0.7: - resolution: {integrity: sha512-NGnrKwXzSms2qUUih/ILZ5JBqNTSa1+ZmP6flaIp6KmSElgE9qdndzS3cqjrDovwFdmwsGsLdeFgB6suw+1e9g==} + /internal-slot@1.0.6: + resolution: {integrity: sha512-Xj6dv+PsbtwyPpEflsejS+oIZxmMlV44zAhG479uYu89MsjcYOhCFnNyKrkJrihbsiasQyY0afoCl/9BLR65bg==} engines: {node: '>= 0.4'} dependencies: - es-errors: 1.3.0 - hasown: 2.0.1 - side-channel: 1.0.6 + get-intrinsic: 1.2.2 + hasown: 2.0.0 + side-channel: 1.0.4 dev: true - /is-array-buffer@3.0.4: - resolution: {integrity: sha512-wcjaerHw0ydZwfhiKbXJWLDY8A7yV7KhjQOpb83hGgGfId/aQa4TOvwyzn2PuswW2gPCYEL/nEAiSVpdOj1lXw==} - engines: {node: '>= 0.4'} + /is-array-buffer@3.0.2: + resolution: {integrity: sha512-y+FyyR/w8vfIRq4eQcM1EYgSTnmHXPqaF+IgzgraytCFq5Xh8lllDVmAZolPJiZttZLeFSINPYMaEJ7/vWUa1w==} dependencies: - call-bind: 1.0.7 - get-intrinsic: 1.2.4 + call-bind: 1.0.5 + get-intrinsic: 1.2.2 + is-typed-array: 1.1.12 dev: true /is-arrayish@0.2.1: @@ -3715,8 +3809,8 @@ packages: resolution: {integrity: sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==} engines: {node: '>= 0.4'} dependencies: - call-bind: 1.0.7 - has-tostringtag: 1.0.2 + call-bind: 1.0.5 + has-tostringtag: 1.0.0 dev: true /is-callable@1.2.7: @@ -3727,14 +3821,14 @@ packages: /is-core-module@2.13.1: resolution: {integrity: sha512-hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw==} dependencies: - hasown: 2.0.1 + hasown: 2.0.0 dev: true /is-date-object@1.0.5: resolution: {integrity: sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==} engines: {node: '>= 0.4'} dependencies: - has-tostringtag: 1.0.2 + has-tostringtag: 1.0.0 dev: true /is-extglob@2.1.1: @@ -3759,8 +3853,8 @@ packages: engines: {node: '>=8'} dev: true - /is-negative-zero@2.0.3: - resolution: {integrity: sha512-5KoIu2Ngpyek75jXodFvnafB6DJgr3u8uuK0LEZJjrU19DrMD3EVERaR8sjz8CCGgpZvxPl9SuE1GMVPFHx1mw==} + /is-negative-zero@2.0.2: + resolution: {integrity: sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA==} engines: {node: '>= 0.4'} dev: true @@ -3768,7 +3862,7 @@ packages: resolution: {integrity: sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ==} engines: {node: '>= 0.4'} dependencies: - has-tostringtag: 1.0.2 + has-tostringtag: 1.0.0 dev: true /is-number@7.0.0: @@ -3790,15 +3884,14 @@ packages: resolution: {integrity: sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==} engines: {node: '>= 0.4'} dependencies: - call-bind: 1.0.7 - has-tostringtag: 1.0.2 + call-bind: 1.0.5 + has-tostringtag: 1.0.0 dev: true - /is-shared-array-buffer@1.0.3: - resolution: {integrity: sha512-nA2hv5XIhLR3uVzDDfCIknerhx8XUKnstuOERPNNIinXG7v9u+ohXF67vxm4TPTEPU6lm61ZkwP3c9PCB97rhg==} - engines: {node: '>= 0.4'} + /is-shared-array-buffer@1.0.2: + resolution: {integrity: sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA==} dependencies: - call-bind: 1.0.7 + call-bind: 1.0.5 dev: true /is-ssh@1.4.0: @@ -3821,7 +3914,7 @@ packages: resolution: {integrity: sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==} engines: {node: '>= 0.4'} dependencies: - has-tostringtag: 1.0.2 + has-tostringtag: 1.0.0 dev: true /is-symbol@1.0.4: @@ -3838,11 +3931,11 @@ packages: text-extensions: 2.4.0 dev: true - /is-typed-array@1.1.13: - resolution: {integrity: sha512-uZ25/bUAlUY5fR4OKT4rZQEBrzQWYV9ZJYGGsUmEJ6thodVJ1HX64ePQ6Z0qPWP+m+Uq6e9UugrE38jeYsDSMw==} + /is-typed-array@1.1.12: + resolution: {integrity: sha512-Z14TF2JNG8Lss5/HMqt0//T9JeHXttXy5pH/DBU4vi98ozO2btxzq9MwYDZYnKwU8nRsz/+GVFVRDq3DkVuSPg==} engines: {node: '>= 0.4'} dependencies: - which-typed-array: 1.1.14 + which-typed-array: 1.1.13 dev: true /is-unicode-supported@0.1.0: @@ -3857,7 +3950,7 @@ packages: /is-weakref@1.0.2: resolution: {integrity: sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==} dependencies: - call-bind: 1.0.7 + call-bind: 1.0.5 dev: true /is-windows@1.0.2: @@ -4206,7 +4299,7 @@ packages: resolution: {integrity: sha512-byy+U7gp+FVwmyzKPYhW2h5l3crpmGsxl7X2s8y43IgxvG4g3QZ6CffDtsNQy1WsmZpQbO+ybo0AlW7TY6DcBQ==} engines: {node: '>= 0.4'} dependencies: - call-bind: 1.0.7 + call-bind: 1.0.5 define-properties: 1.2.1 has-symbols: 1.0.3 object-keys: 1.1.1 @@ -4216,9 +4309,9 @@ packages: resolution: {integrity: sha512-jCBs/0plmPsOnrKAfFQXRG2NFjlhZgjjcBLSmTnEhU8U6vVTsVe8ANeQJCHTl3gSsI4J+0emOoCgoKlmQPMgmA==} engines: {node: '>= 0.4'} dependencies: - call-bind: 1.0.7 + call-bind: 1.0.5 define-properties: 1.2.1 - es-abstract: 1.22.5 + es-abstract: 1.22.3 dev: true /once@1.4.0: @@ -4401,11 +4494,6 @@ packages: pathe: 1.1.2 dev: true - /possible-typed-array-names@1.0.0: - resolution: {integrity: sha512-d7Uw+eZoloe0EHDIYoe+bQ5WXnGMOpmiZFTuMWCwpjzzkL2nTjcKiAk4hh8TjnGye2TwWOk3UXucZ+3rbmBa8Q==} - engines: {node: '>= 0.4'} - dev: true - /postcss@8.4.35: resolution: {integrity: sha512-u5U8qYpBCpN13BsiEB0CbR1Hhh4Gc0zLFuedrHJKMctHCHAGrMdG0PRM/KErzAL3CU6/eckEtmHNB3x6e3c0vA==} engines: {node: ^10 || ^12 || >=14} @@ -4487,17 +4575,16 @@ packages: /regenerator-transform@0.15.2: resolution: {integrity: sha512-hfMp2BoF0qOk3uc5V20ALGDS2ddjQaLrdl7xrGXvAIow7qeWRM2VA2HuCHkUKk9slq3VwEwLNK3DFBqDfPGYtg==} dependencies: - '@babel/runtime': 7.24.0 + '@babel/runtime': 7.23.7 dev: true - /regexp.prototype.flags@1.5.2: - resolution: {integrity: sha512-NcDiDkTLuPR+++OCKB0nWafEmhg/Da8aUPLPMQbK+bxKKCm1/S5he+AqYa4PlMCVBalb4/yxIRub6qkEx5yJbw==} + /regexp.prototype.flags@1.5.1: + resolution: {integrity: sha512-sy6TXMN+hnP/wMy+ISxg3krXx7BAtWVO4UouuCN/ziM9UEne0euamVNafDfvC83bRNr95y0V5iijeDQFUNpvrg==} engines: {node: '>= 0.4'} dependencies: - call-bind: 1.0.7 + call-bind: 1.0.5 define-properties: 1.2.1 - es-errors: 1.3.0 - set-function-name: 2.0.2 + set-function-name: 2.0.1 dev: true /regexpu-core@5.3.2: @@ -4547,6 +4634,15 @@ packages: engines: {node: '>=8'} dev: true + /resolve-global@1.0.0: + resolution: {integrity: sha512-zFa12V4OLtT5XUX/Q4VLvTfBf+Ok0SPc1FNGM/z9ctUdiU618qwKpWnd0CHs3+RqROfyEg/DhuHbMWYqcgljEw==} + engines: {node: '>=8'} + requiresBuild: true + dependencies: + global-dirs: 0.1.1 + dev: true + optional: true + /resolve-global@2.0.0: resolution: {integrity: sha512-gnAQ0Q/KkupGkuiMyX4L0GaBV8iFwlmoXsMtOz+DFTaKmHhOO/dSlP1RMKhpvHv/dh6K/IQkowGJBqUG0NfBUw==} engines: {node: '>=18'} @@ -4632,12 +4728,12 @@ packages: tslib: 2.6.2 dev: true - /safe-array-concat@1.1.0: - resolution: {integrity: sha512-ZdQ0Jeb9Ofti4hbt5lX3T2JcAamT9hfzYU1MNB+z/jaEbB6wfFfPIR/zEORmZqobkCCJhSjodobH6WHNmJ97dg==} + /safe-array-concat@1.0.1: + resolution: {integrity: sha512-6XbUAseYE2KtOuGueyeobCySj9L4+66Tn6KQMOPQJrAJEowYKW/YR/MGJZl7FdydUdaFu4LYyDZjxf4/Nmo23Q==} engines: {node: '>=0.4'} dependencies: - call-bind: 1.0.7 - get-intrinsic: 1.2.4 + call-bind: 1.0.5 + get-intrinsic: 1.2.2 has-symbols: 1.0.3 isarray: 2.0.5 dev: true @@ -4646,12 +4742,11 @@ packages: resolution: {integrity: sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==} dev: true - /safe-regex-test@1.0.3: - resolution: {integrity: sha512-CdASjNJPvRa7roO6Ra/gLYBTzYzzPyyBXxIMdGW3USQLyjWEls2RgW5UBTXaQVp+OrpeCK3bLem8smtmheoRuw==} - engines: {node: '>= 0.4'} + /safe-regex-test@1.0.0: + resolution: {integrity: sha512-JBUUzyOgEwXQY1NuPtvcj/qcBDbDmEvWufhlnXZIm75DEHp+afM1r1ujJpJsV/gSM4t59tpDyPi1sd6ZaPFfsA==} dependencies: - call-bind: 1.0.7 - es-errors: 1.3.0 + call-bind: 1.0.5 + get-intrinsic: 1.2.2 is-regex: 1.1.4 dev: true @@ -4664,6 +4759,14 @@ packages: hasBin: true dev: true + /semver@7.5.4: + resolution: {integrity: sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==} + engines: {node: '>=10'} + hasBin: true + dependencies: + lru-cache: 6.0.0 + dev: true + /semver@7.6.0: resolution: {integrity: sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==} engines: {node: '>=10'} @@ -4672,26 +4775,23 @@ packages: lru-cache: 6.0.0 dev: true - /set-function-length@1.2.1: - resolution: {integrity: sha512-j4t6ccc+VsKwYHso+kElc5neZpjtq9EnRICFZtWyBsLojhmeF/ZBd/elqm22WJh/BziDe/SBiOeAt0m2mfLD0g==} + /set-function-length@1.1.1: + resolution: {integrity: sha512-VoaqjbBJKiWtg4yRcKBQ7g7wnGnLV3M8oLvVWwOk2PdYY6PEFegR1vezXR0tw6fZGF9csVakIRjrJiy2veSBFQ==} engines: {node: '>= 0.4'} dependencies: - define-data-property: 1.1.4 - es-errors: 1.3.0 - function-bind: 1.1.2 - get-intrinsic: 1.2.4 + define-data-property: 1.1.1 + get-intrinsic: 1.2.2 gopd: 1.0.1 - has-property-descriptors: 1.0.2 + has-property-descriptors: 1.0.1 dev: true - /set-function-name@2.0.2: - resolution: {integrity: sha512-7PGFlmtwsEADb0WYyvCMa1t+yke6daIG4Wirafur5kcf+MhUnPms1UeR0CKQdTZD81yESwMHbtn+TR+dMviakQ==} + /set-function-name@2.0.1: + resolution: {integrity: sha512-tMNCiqYVkXIZgc2Hnoy2IvC/f8ezc5koaRFkCjrpWzGpCd3qbZXPzVy9MAZzK1ch/X0jvSkojys3oqJN0qCmdA==} engines: {node: '>= 0.4'} dependencies: - define-data-property: 1.1.4 - es-errors: 1.3.0 + define-data-property: 1.1.1 functions-have-names: 1.2.3 - has-property-descriptors: 1.0.2 + has-property-descriptors: 1.0.1 dev: true /shebang-command@2.0.0: @@ -4706,13 +4806,11 @@ packages: engines: {node: '>=8'} dev: true - /side-channel@1.0.6: - resolution: {integrity: sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==} - engines: {node: '>= 0.4'} + /side-channel@1.0.4: + resolution: {integrity: sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==} dependencies: - call-bind: 1.0.7 - es-errors: 1.3.0 - get-intrinsic: 1.2.4 + call-bind: 1.0.5 + get-intrinsic: 1.2.2 object-inspect: 1.13.1 dev: true @@ -4769,25 +4867,25 @@ packages: resolution: {integrity: sha512-lfjY4HcixfQXOfaqCvcBuOIapyaroTXhbkfJN3gcB1OtyupngWK4sEET9Knd0cXd28kTUqu/kHoV4HKSJdnjiQ==} engines: {node: '>= 0.4'} dependencies: - call-bind: 1.0.7 + call-bind: 1.0.5 define-properties: 1.2.1 - es-abstract: 1.22.5 + es-abstract: 1.22.3 dev: true /string.prototype.trimend@1.0.7: resolution: {integrity: sha512-Ni79DqeB72ZFq1uH/L6zJ+DKZTkOtPIHovb3YZHQViE+HDouuU4mBrLOLDn5Dde3RF8qw5qVETEjhu9locMLvA==} dependencies: - call-bind: 1.0.7 + call-bind: 1.0.5 define-properties: 1.2.1 - es-abstract: 1.22.5 + es-abstract: 1.22.3 dev: true /string.prototype.trimstart@1.0.7: resolution: {integrity: sha512-NGhtDFu3jCEm7B4Fy0DpLewdJQOZcQ0rGbwQ/+stjnrp2i+rlKeCvos9hOIeCmqwratM47OBxY7uFZzjxHXmrg==} dependencies: - call-bind: 1.0.7 + call-bind: 1.0.5 define-properties: 1.2.1 - es-abstract: 1.22.5 + es-abstract: 1.22.3 dev: true /string_decoder@1.3.0: @@ -4903,9 +5001,9 @@ packages: resolution: {integrity: sha512-0a5EOkAUp8D4moMi2W8ZF8jcga7BgZd91O/yabJCFY8az+XSzeGyTKs0Aoo897iV1Nj6guFq8orWDS96z91oGg==} dev: true - /ts-api-utils@1.2.1(typescript@5.3.3): - resolution: {integrity: sha512-RIYA36cJn2WiH9Hy77hdF9r7oEwxAtB/TS9/S4Qd90Ap4z5FSiin5zEiTL44OII1Y3IIlEvxwxFUVgrHSZ/UpA==} - engines: {node: '>=16'} + /ts-api-utils@1.0.3(typescript@5.3.3): + resolution: {integrity: sha512-wNMeqtMz5NtwpT/UZGY5alT+VoKdSsOOP/kqHFcUW1P/VRhH2wJ48+DN2WwUliNbQ976ETwDL0Ifd2VVvgonvg==} + engines: {node: '>=16.13.0'} peerDependencies: typescript: '>=4.2.0' dependencies: @@ -4938,55 +5036,48 @@ packages: engines: {node: '>=10'} dev: true - /typed-array-buffer@1.0.2: - resolution: {integrity: sha512-gEymJYKZtKXzzBzM4jqa9w6Q1Jjm7x2d+sh19AdsD4wqnMPDYyvwpsIc2Q/835kHuo3BEQ7CjelGhfTsoBb2MQ==} + /typed-array-buffer@1.0.0: + resolution: {integrity: sha512-Y8KTSIglk9OZEr8zywiIHG/kmQ7KWyjseXs1CbSo8vC42w7hg2HgYTxSWwP0+is7bWDc1H+Fo026CpHFwm8tkw==} engines: {node: '>= 0.4'} dependencies: - call-bind: 1.0.7 - es-errors: 1.3.0 - is-typed-array: 1.1.13 + call-bind: 1.0.5 + get-intrinsic: 1.2.2 + is-typed-array: 1.1.12 dev: true - /typed-array-byte-length@1.0.1: - resolution: {integrity: sha512-3iMJ9q0ao7WE9tWcaYKIptkNBuOIcZCCT0d4MRvuuH88fEoEH62IuQe0OtraD3ebQEoTRk8XCBoknUNc1Y67pw==} + /typed-array-byte-length@1.0.0: + resolution: {integrity: sha512-Or/+kvLxNpeQ9DtSydonMxCx+9ZXOswtwJn17SNLvhptaXYDJvkFFP5zbfU/uLmvnBJlI4yrnXRxpdWH/M5tNA==} engines: {node: '>= 0.4'} dependencies: - call-bind: 1.0.7 + call-bind: 1.0.5 for-each: 0.3.3 - gopd: 1.0.1 - has-proto: 1.0.3 - is-typed-array: 1.1.13 + has-proto: 1.0.1 + is-typed-array: 1.1.12 dev: true - /typed-array-byte-offset@1.0.2: - resolution: {integrity: sha512-Ous0vodHa56FviZucS2E63zkgtgrACj7omjwd/8lTEMEPFFyjfixMZ1ZXenpgCFBBt4EC1J2XsyVS2gkG0eTFA==} + /typed-array-byte-offset@1.0.0: + resolution: {integrity: sha512-RD97prjEt9EL8YgAgpOkf3O4IF9lhJFr9g0htQkm0rchFp/Vx7LW5Q8fSXXub7BXAODyUQohRMyOc3faCPd0hg==} engines: {node: '>= 0.4'} dependencies: - available-typed-arrays: 1.0.7 - call-bind: 1.0.7 + available-typed-arrays: 1.0.5 + call-bind: 1.0.5 for-each: 0.3.3 - gopd: 1.0.1 - has-proto: 1.0.3 - is-typed-array: 1.1.13 + has-proto: 1.0.1 + is-typed-array: 1.1.12 dev: true - /typed-array-length@1.0.5: - resolution: {integrity: sha512-yMi0PlwuznKHxKmcpoOdeLwxBoVPkqZxd7q2FgMkmD3bNwvF5VW0+UlUQ1k1vmktTu4Yu13Q0RIxEP8+B+wloA==} - engines: {node: '>= 0.4'} + /typed-array-length@1.0.4: + resolution: {integrity: sha512-KjZypGq+I/H7HI5HlOoGHkWUUGq+Q0TPhQurLbyrVrvnKTBgzLhIJ7j6J/XTQOi0d1RjyZ0wdas8bKs2p0x3Ng==} dependencies: - call-bind: 1.0.7 + call-bind: 1.0.5 for-each: 0.3.3 - gopd: 1.0.1 - has-proto: 1.0.3 - is-typed-array: 1.1.13 - possible-typed-array-names: 1.0.0 + is-typed-array: 1.1.12 dev: true /typescript@5.3.3: resolution: {integrity: sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw==} engines: {node: '>=14.17'} hasBin: true - dev: true /ufo@1.4.0: resolution: {integrity: sha512-Hhy+BhRBleFjpJ2vchUNN40qgkh0366FWJGqVLYBHev0vpHTrXSA0ryT+74UiW6KWsldNurQMKGqCm1M2zBciQ==} @@ -4995,7 +5086,7 @@ packages: /unbox-primitive@1.0.2: resolution: {integrity: sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==} dependencies: - call-bind: 1.0.7 + call-bind: 1.0.5 has-bigints: 1.0.2 has-symbols: 1.0.3 which-boxed-primitive: 1.0.2 @@ -5037,14 +5128,14 @@ packages: engines: {node: '>= 10.0.0'} dev: true - /update-browserslist-db@1.0.13(browserslist@4.23.0): + /update-browserslist-db@1.0.13(browserslist@4.22.2): resolution: {integrity: sha512-xebP81SNcPuNpPP3uzeW1NYXxI3rxyJzF3pD6sH4jE7o/IX+WtSpwnVU+qIsDPyk0d3hmFQ7mjqc6AtV604hbg==} hasBin: true peerDependencies: browserslist: '>= 4.21.0' dependencies: - browserslist: 4.23.0 - escalade: 3.1.2 + browserslist: 4.22.2 + escalade: 3.1.1 picocolors: 1.0.0 dev: true @@ -5192,15 +5283,15 @@ packages: is-symbol: 1.0.4 dev: true - /which-typed-array@1.1.14: - resolution: {integrity: sha512-VnXFiIW8yNn9kIHN88xvZ4yOWchftKDsRJ8fEPacX/wl1lOvBrhsJ/OeJCXq7B0AaijRuqgzSKalJoPk+D8MPg==} + /which-typed-array@1.1.13: + resolution: {integrity: sha512-P5Nra0qjSncduVPEAr7xhoF5guty49ArDTwzJ/yNuPIbZppyRxFQsRCWrocxIY+CnMVG+qfbU2FmDKyvSGClow==} engines: {node: '>= 0.4'} dependencies: - available-typed-arrays: 1.0.7 - call-bind: 1.0.7 + available-typed-arrays: 1.0.5 + call-bind: 1.0.5 for-each: 0.3.3 gopd: 1.0.1 - has-tostringtag: 1.0.2 + has-tostringtag: 1.0.0 dev: true /which@1.3.1: @@ -5289,7 +5380,7 @@ packages: engines: {node: '>=12'} dependencies: cliui: 8.0.1 - escalade: 3.1.2 + escalade: 3.1.1 get-caller-file: 2.0.5 require-directory: 2.1.1 string-width: 4.2.3 diff --git a/src/index.ts b/src/index.ts index 5d23afd4..09baac6c 100644 --- a/src/index.ts +++ b/src/index.ts @@ -71,3 +71,5 @@ export { PhpDocTagNode } from './phpdoc-parser/ast/php-doc/php-doc-tag-node'; export { PhpDocTagValueNode } from './phpdoc-parser/ast/php-doc/php-doc-tag-value-node'; export { ReturnTagValueNode } from './phpdoc-parser/ast/php-doc/return-tag-value-node'; export { Printer } from './phpdoc-parser/printer/printer'; +export { PhpDocTypeNodeToTypescriptTypeNodeTranspiler } from './phpdoc-parser/transpiler/php-doc-to-typescript-type-transpiler'; +export * from './phpdoc-parser/ast/php-doc/helpers'; diff --git a/src/phpdoc-parser/ast/php-doc/helpers.ts b/src/phpdoc-parser/ast/php-doc/helpers.ts new file mode 100644 index 00000000..2bc70be4 --- /dev/null +++ b/src/phpdoc-parser/ast/php-doc/helpers.ts @@ -0,0 +1,168 @@ +import type { AssertTagMethodValueNode } from './assert-tag-method-value-node'; +import type { AssertTagPropertyValueNode } from './assert-tag-property-value-node'; +import type { AssertTagValueNode } from './assert-tag-value-node'; +import type { DeprecatedTagValueNode } from './deprecated-tag-value-node'; +import type { ExtendsTagValueNode } from './extends-tag-value-node'; +import type { GenericTagValueNode } from './generic-tag-value-node'; +import type { ImplementsTagValueNode } from './implements-tag-value-node'; +import type { InvalidTagValueNode } from './invalid-tag-value-node'; +import type { MethodTagValueNode } from './method-tag-value-node'; +import type { MethodTagValueParameterNode } from './method-tag-value-parameter-node'; +import type { MixinTagValueNode } from './mixin-tag-value-node'; +import type { ParamOutTagValueNode } from './param-out-tag-value-node'; +import type { ParamTagValueNode } from './param-tag-value-node'; +import type { PhpDocTagValueNode } from './php-doc-tag-value-node'; +import type { PropertyTagValueNode } from './property-tag-value-node'; +import type { ReturnTagValueNode } from './return-tag-value-node'; +import type { SelfOutTagValueNode } from './self-out-tag-value-node'; +import type { TemplateTagValueNode } from './template-tag-value-node'; +import type { ThrowsTagValueNode } from './throws-tag-value-node'; +import type { TypeAliasImportTagValueNode } from './type-alias-import-tag-value-node'; +import type { TypeAliasTagValueNode } from './type-alias-tag-value-node'; +import type { TypelessParamTagValueNode } from './typeless-param-tag-value-node'; +import type { UsesTagValueNode } from './uses-tag-value-node'; +import type { VarTagValueNode } from './var-tag-value-node'; + +export const isParamOutTagValueNode = ( + node: PhpDocTagValueNode, +): node is ParamOutTagValueNode => { + return node.getNodeType() === 'ParamOutTagValueNode'; +}; + +export const isAssertTagValueNode = ( + node: PhpDocTagValueNode, +): node is AssertTagValueNode => { + return node.getNodeType() === 'AssertTagValueNode'; +}; + +export const isUsesTagValueNode = ( + node: PhpDocTagValueNode, +): node is UsesTagValueNode => { + return node.getNodeType() === 'UsesTagValueNode'; +}; + +export const isInvalidTagValueNode = ( + node: PhpDocTagValueNode, +): node is InvalidTagValueNode => { + return node.getNodeType() === 'InvalidTagValueNode'; +}; + +export const isMethodTagValueNode = ( + node: PhpDocTagValueNode, +): node is MethodTagValueNode => { + return node.getNodeType() === 'MethodTagValueNode'; +}; + +export const isDeprecatedTagValueNode = ( + node: PhpDocTagValueNode, +): node is DeprecatedTagValueNode => { + return node.getNodeType() === 'DeprecatedTagValueNode'; +}; + +export const isExtendsTagValueNode = ( + node: PhpDocTagValueNode, +): node is ExtendsTagValueNode => { + return node.getNodeType() === 'ExtendsTagValueNode'; +}; + +export const isParamTagValueNode = ( + node: PhpDocTagValueNode, +): node is ParamTagValueNode => { + return node.getNodeType() === 'ParamTagValueNode'; +}; + +export const isGenericTagValueNode = ( + node: PhpDocTagValueNode, +): node is GenericTagValueNode => { + return node.getNodeType() === 'GenericTagValueNode'; +}; + +export const isTypeAliasTagValueNode = ( + node: PhpDocTagValueNode, +): node is TypeAliasTagValueNode => { + return node.getNodeType() === 'TypeAliasTagValueNode'; +}; + +export const isAssertTagPropertyValueNode = ( + node: PhpDocTagValueNode, +): node is AssertTagPropertyValueNode => { + return node.getNodeType() === 'AssertTagPropertyValueNode'; +}; + +export const isTypelessParamTagValueNode = ( + node: PhpDocTagValueNode, +): node is TypelessParamTagValueNode => { + return node.getNodeType() === 'TypelessParamTagValueNode'; +}; + +export const isVarTagValueNode = ( + node: PhpDocTagValueNode, +): node is VarTagValueNode => { + return node.getNodeType() === 'VarTagValueNode'; +}; + +export const isMethodTagValueParameterNode = ( + node: PhpDocTagValueNode, +): node is MethodTagValueParameterNode => { + return node.getNodeType() === 'MethodTagValueParameterNode'; +}; + +export const isAssertTagMethodValueNode = ( + node: PhpDocTagValueNode, +): node is AssertTagMethodValueNode => { + return node.getNodeType() === 'AssertagMethodValueNode'; +}; + +export const isTemplateTagValueNode = ( + node: PhpDocTagValueNode, +): node is TemplateTagValueNode => { + return node.getNodeType() === 'TemplateTagValueNode'; +}; + +export const isImplementsTagValueNode = ( + node: PhpDocTagValueNode, +): node is ImplementsTagValueNode => { + return node.getNodeType() === 'ImplementsTagValueNode'; +}; + +export const isThrowsTagValueNode = ( + node: PhpDocTagValueNode, +): node is ThrowsTagValueNode => { + return node.getNodeType() === 'ThrowsTagValueNode'; +}; + +export const isSelfOutTagValueNode = ( + node: PhpDocTagValueNode, +): node is SelfOutTagValueNode => { + return node.getNodeType() === 'SelfOutTagValueNode'; +}; + +export const isPropertyTagValueNode = ( + node: PhpDocTagValueNode, +): node is PropertyTagValueNode => { + return node.getNodeType() === 'PropertyTagValueNode'; +}; + +export const isTypeAliasImportTagValueNode = ( + node: PhpDocTagValueNode, +): node is TypeAliasImportTagValueNode => { + return node.getNodeType() === 'TypeAliasImportTagValueNode'; +}; + +export const isMixinTagValueNode = ( + node: PhpDocTagValueNode, +): node is MixinTagValueNode => { + return node.getNodeType() === 'MixinTagValueNode'; +}; + +export const isPhpDocTagValueNode = ( + node: PhpDocTagValueNode, +): node is PhpDocTagValueNode => { + return node.getNodeType() === 'PhpDocTagValueNode'; +}; + +export const isReturnTagValueNode = ( + node: PhpDocTagValueNode, +): node is ReturnTagValueNode => { + return node.getNodeType() === 'ReturnTagValueNode'; +}; diff --git a/src/phpdoc-parser/ast/php-doc/php-doc-node.ts b/src/phpdoc-parser/ast/php-doc/php-doc-node.ts index 2b88fe1b..1b0bf137 100644 --- a/src/phpdoc-parser/ast/php-doc/php-doc-node.ts +++ b/src/phpdoc-parser/ast/php-doc/php-doc-node.ts @@ -6,6 +6,7 @@ import { ParamTagValueNode } from './param-tag-value-node'; import type { PhpDocChildNode } from './php-doc-child-node'; import { PhpDocTagNode } from './php-doc-tag-node'; import type { PhpDocTagValueNode } from './php-doc-tag-value-node'; +import { PropertyTagValueNode } from './property-tag-value-node'; import { ReturnTagValueNode } from './return-tag-value-node'; import { TemplateTagValueNode } from './template-tag-value-node'; import { ThrowsTagValueNode } from './throws-tag-value-node'; @@ -33,6 +34,14 @@ export class PhpDocNode extends BaseNode { }); } + public getPropertyTagValues(tagName = '@property'): PropertyTagValueNode[] { + return this.getTagsByName(tagName) + .map((tag) => tag.value) + .filter((value: PhpDocTagValueNode): value is PropertyTagValueNode => { + return value instanceof PropertyTagValueNode; + }); + } + public getVarTagValues(tagName = '@var'): VarTagValueNode[] { return this.getTagsByName(tagName) .map((tag) => tag.value) diff --git a/src/phpdoc-parser/ast/php-doc/php-doc-tag-node.ts b/src/phpdoc-parser/ast/php-doc/php-doc-tag-node.ts index 08138ccb..b3f203a4 100644 --- a/src/phpdoc-parser/ast/php-doc/php-doc-tag-node.ts +++ b/src/phpdoc-parser/ast/php-doc/php-doc-tag-node.ts @@ -1,28 +1,5 @@ -import type { AssertTagMethodValueNode } from './assert-tag-method-value-node'; -import type { AssertTagPropertyValueNode } from './assert-tag-property-value-node'; -import type { AssertTagValueNode } from './assert-tag-value-node'; -import type { DeprecatedTagValueNode } from './deprecated-tag-value-node'; -import type { ExtendsTagValueNode } from './extends-tag-value-node'; -import type { GenericTagValueNode } from './generic-tag-value-node'; -import type { ImplementsTagValueNode } from './implements-tag-value-node'; -import type { InvalidTagValueNode } from './invalid-tag-value-node'; -import type { MethodTagValueNode } from './method-tag-value-node'; -import type { MethodTagValueParameterNode } from './method-tag-value-parameter-node'; -import type { MixinTagValueNode } from './mixin-tag-value-node'; -import type { ParamOutTagValueNode } from './param-out-tag-value-node'; -import type { ParamTagValueNode } from './param-tag-value-node'; import { PhpDocChildNode } from './php-doc-child-node'; import type { PhpDocTagValueNode } from './php-doc-tag-value-node'; -import type { PropertyTagValueNode } from './property-tag-value-node'; -import type { ReturnTagValueNode } from './return-tag-value-node'; -import type { SelfOutTagValueNode } from './self-out-tag-value-node'; -import type { TemplateTagValueNode } from './template-tag-value-node'; -import type { ThrowsTagValueNode } from './throws-tag-value-node'; -import type { TypeAliasImportTagValueNode } from './type-alias-import-tag-value-node'; -import type { TypeAliasTagValueNode } from './type-alias-tag-value-node'; -import type { TypelessParamTagValueNode } from './typeless-param-tag-value-node'; -import type { UsesTagValueNode } from './uses-tag-value-node'; -import type { VarTagValueNode } from './var-tag-value-node'; export class PhpDocTagNode extends PhpDocChildNode { constructor( @@ -39,100 +16,4 @@ export class PhpDocTagNode extends PhpDocChildNode { public getNodeType(): string { return 'PhpDocTagNode'; } - - public isParamOutTagValueNode(): this is ParamOutTagValueNode { - return this.getNodeType() === 'ParamOutTagValueNode'; - } - - public isAssertTagValueNode(): this is AssertTagValueNode { - return this.getNodeType() === 'AssertTagValueNode'; - } - - public isUsesTagValueNode(): this is UsesTagValueNode { - return this.getNodeType() === 'UsesTagValueNode'; - } - - public isInvalidTagValueNode(): this is InvalidTagValueNode { - return this.getNodeType() === 'InvalidTagValueNode'; - } - - public isMethodTagValueNode(): this is MethodTagValueNode { - return this.getNodeType() === 'MethodTagValueNode'; - } - - public isDeprecatedTagValueNode(): this is DeprecatedTagValueNode { - return this.getNodeType() === 'DeprecatedTagValueNode'; - } - - public isExtendsTagValueNode(): this is ExtendsTagValueNode { - return this.getNodeType() === 'ExtendsTagValueNode'; - } - - public isParamTagValueNode(): this is ParamTagValueNode { - return this.getNodeType() === 'ParamTagValueNode'; - } - - public isGenericTagValueNode(): this is GenericTagValueNode { - return this.getNodeType() === 'GenericTagValueNode'; - } - - public isTypeAliasTagValueNode(): this is TypeAliasTagValueNode { - return this.getNodeType() === 'TypeAliasTagValueNode'; - } - - public isAssertTagPropertyValueNode(): this is AssertTagPropertyValueNode { - return this.getNodeType() === 'AssertTagPropertyValueNode'; - } - - public isTypelessParamTagValueNode(): this is TypelessParamTagValueNode { - return this.getNodeType() === 'TypelessParamTagValueNode'; - } - - public isVarTagValueNode(): this is VarTagValueNode { - return this.getNodeType() === 'VarTagValueNode'; - } - - public isMethodTagValueParameterNode(): this is MethodTagValueParameterNode { - return this.getNodeType() === 'MethodTagValueParameterNode'; - } - - public isAssertTagMethodValueNode(): this is AssertTagMethodValueNode { - return this.getNodeType() === 'AssertTagMethodValueNode'; - } - - public isTemplateTagValueNode(): this is TemplateTagValueNode { - return this.getNodeType() === 'TemplateTagValueNode'; - } - - public isImplementsTagValueNode(): this is ImplementsTagValueNode { - return this.getNodeType() === 'ImplementsTagValueNode'; - } - - public isThrowsTagValueNode(): this is ThrowsTagValueNode { - return this.getNodeType() === 'ThrowsTagValueNode'; - } - - public isSelfOutTagValueNode(): this is SelfOutTagValueNode { - return this.getNodeType() === 'SelfOutTagValueNode'; - } - - public isPropertyTagValueNode(): this is PropertyTagValueNode { - return this.getNodeType() === 'PropertyTagValueNode'; - } - - public isTypeAliasImportTagValueNode(): this is TypeAliasImportTagValueNode { - return this.getNodeType() === 'TypeAliasImportTagValueNode'; - } - - public isMixinTagValueNode(): this is MixinTagValueNode { - return this.getNodeType() === 'MixinTagValueNode'; - } - - public isPhpDocTagValueNode(): this is PhpDocTagValueNode { - return this.getNodeType() === 'PhpDocTagValueNode'; - } - - public isReturnTagValueNode(): this is ReturnTagValueNode { - return this.getNodeType() === 'ReturnTagValueNode'; - } } diff --git a/src/phpdoc-parser/parser/php-doc-parser.ts b/src/phpdoc-parser/parser/php-doc-parser.ts index d3a2d9a4..0bce1929 100644 --- a/src/phpdoc-parser/parser/php-doc-parser.ts +++ b/src/phpdoc-parser/parser/php-doc-parser.ts @@ -239,7 +239,7 @@ export class PhpDocParser { const startLine = tokens.currentTokenLine(); const startIndex = tokens.currentTokenIndex(); - let tagValue: BaseNode; + let tagValue: PhpDocTagValueNode; try { tokens.pushSavePoint(); diff --git a/src/phpdoc-parser/transpiler/README.md b/src/phpdoc-parser/transpiler/README.md new file mode 100644 index 00000000..dca606e0 --- /dev/null +++ b/src/phpdoc-parser/transpiler/README.md @@ -0,0 +1,80 @@ +```TypeScript +import { renderTsNodeToString } from './helpers'; +import { + type NameNodePathResolver, + PhpDocTypeNodeToTypescriptTypeNodeTranspiler, +} from './php-doc-to-typescript-type-transpiler'; +import type { ParamTagValueNode } from '../ast/php-doc/param-tag-value-node'; +import type { PropertyTagValueNode } from '../ast/php-doc/property-tag-value-node'; +import type { ReturnTagValueNode } from '../ast/php-doc/return-tag-value-node'; +import { Lexer } from '../lexer/lexer'; +import { ConstExprParser } from '../parser/const-expr-parser'; +import { PhpDocParser } from '../parser/php-doc-parser'; +import { TokenIterator } from '../parser/token-iterator'; +import { TypeParser } from '../parser/type-parser'; + +class ExtendedTranspiler extends PhpDocTypeNodeToTypescriptTypeNodeTranspiler { + public isSnakeCase: boolean = true; + + constructor(public resolver: NameNodePathResolver) { + super( + (nodeParts: string[]) => + resolver.call(this, nodeParts) as { + path: string; + name: string; + isTypeOnly: boolean; + }, + ); + } +} + +const transpileCommentText = (commentText: string) => { + const lexer = new Lexer(); + const constExprParser = new ConstExprParser(); + const typeParser = new TypeParser(constExprParser); + const phpDocParser = new PhpDocParser(typeParser, constExprParser); + + const tokens = new TokenIterator(lexer.tokenize(commentText)); + const astRootNode = phpDocParser.parse(tokens); // PhpDocNode + const propertyTagValueNodes = astRootNode + .getTags() + .map((node) => node.value) as ( + | PropertyTagValueNode + | ReturnTagValueNode + | ParamTagValueNode + )[]; + + return propertyTagValueNodes; +}; + +const shortText = `/** +* @property-read array|null $person +*/`; + +const tsTypeNode = transpileCommentText(shortText); + +const nameNodePathResolver: NameNodePathResolver = + // eslint-disable-next-line func-names + function (this: ExtendedTranspiler, nodeParts: string[]) { + console.log( + 'here ', + `${nodeParts.length} ${this.isSnakeCase ? 'yes' : 'no'}`, + ); + + return { + name: '', + path: '', + isTypeOnly: false, + }; + }; + +tsTypeNode.map((node) => { + const transpiler = new ExtendedTranspiler(nameNodePathResolver); + transpiler.isSnakeCase = false; + transpiler.beforeTranspile(); + const transpiledNode = transpiler.transpile(node.type); + + return renderTsNodeToString(transpiledNode); +}); + +``` diff --git a/src/phpdoc-parser/transpiler/base-type-transpiler.ts b/src/phpdoc-parser/transpiler/base-type-transpiler.ts new file mode 100644 index 00000000..b03dc84c --- /dev/null +++ b/src/phpdoc-parser/transpiler/base-type-transpiler.ts @@ -0,0 +1,24 @@ +import type { ImportDeclaration, TypeNode } from 'typescript'; + +export abstract class BaseTypeTranspiler { + constructor( + public nameNodePathResolver: (nodeParts: string[]) => { + path: string; + name: string; + isTypeOnly: boolean; + }, + ) {} + + public abstract transpile(typeNode: SourceTypeNode): TypeNode; + + public beforeTranspile() { + // Reset importDeclarations + this.importDeclarations = []; + } + + public getImportDeclarations() { + return this.importDeclarations; + } + + protected importDeclarations: ImportDeclaration[]; +} diff --git a/src/phpdoc-parser/transpiler/helpers.ts b/src/phpdoc-parser/transpiler/helpers.ts new file mode 100644 index 00000000..31c3cd92 --- /dev/null +++ b/src/phpdoc-parser/transpiler/helpers.ts @@ -0,0 +1,342 @@ +import _ = require('lodash'); +import * as ts from 'typescript'; + +/** + * Creates and returns an AST 'SourceFile' root node. + * + * @param fileName The name of the source file, for example, 'example.ts' + * @param sourceText The text content of the source file + * @param scriptTarget Specifies the ECMAScript version to be used by the compiler, default is the latest version + * @param scriptKind The kind of the file (TS, JS, JSON, or others), default is TS + * @return Returns the newly created AST 'SourceFile' root node + */ +export function createSourceFileRoot( + fileName: string, + sourceText = '', + scriptTarget: ts.ScriptTarget = ts.ScriptTarget.Latest, + scriptKind: ts.ScriptKind = ts.ScriptKind.TS, +): ts.SourceFile { + const sourceFile: ts.SourceFile = ts.createSourceFile( + fileName, + sourceText, + scriptTarget, + true, + scriptKind, + ); + + return sourceFile; +} + +/** + * Adds one or more new nodes to the 'statements' of a given 'SourceFile' node. + * + * @param sourceFile The 'SourceFile' node to which new statements are to be added + * @param newStatements An array of new statement nodes to be added + * @return Returns the 'SourceFile' node with the new array of statements added + */ +export function addStatementsToNode( + sourceFile: ts.SourceFile, + newStatements: ts.Statement[], +): ts.SourceFile { + const updatedStatements = ts.factory.createNodeArray([ + ...sourceFile.statements, + ...newStatements, + ]); + + return ts.factory.updateSourceFile(sourceFile, updatedStatements); +} + +export function renderTsNodeToString( + tsNode: ts.TypeNode | ts.ImportDeclaration, +): string { + const printer = ts.createPrinter({ newLine: ts.NewLineKind.LineFeed }); + + const resultFile = createSourceFileRoot('example.ts'); + + return printer.printNode(ts.EmitHint.Unspecified, tsNode, resultFile); +} + +export function createImportDeclarationNode( + symbols: string[], + fileName: string, +): ts.ImportDeclaration { + const importClause = ts.factory.createImportClause( + false, // no default import + undefined, + ts.factory.createNamedImports( + symbols.map((symbol) => + ts.factory.createImportSpecifier( + false, + undefined, + ts.factory.createIdentifier(symbol), + ), + ), + ), + ); + + // Create a string literal for the module specifier + const moduleSpecifier = ts.factory.createStringLiteral(fileName); + + // Create the import declaration (e.g., "import { TypeName } from 'fileName';") + const importDeclaration = ts.factory.createImportDeclaration( + undefined, // no modifiers + importClause, + moduleSpecifier, + ); + + return importDeclaration; +} + +/** + * Creates an export declaration node. + * @param symbols An array of the symbols that should be exported. + * @param moduleSpecifierString Optional. A string indicating the module from which the symbols are exported, e.g., './module'. + * @returns A TypeScript export declaration node. + */ +export function createExportDeclarationNode( + symbols: string[], // An array of the symbols that should be exported + moduleSpecifierString?: string, // Optional module specifier (e.g., './module') +): ts.ExportDeclaration { + const exportSpecifiers = symbols.map((symbol) => + ts.factory.createExportSpecifier( + false, + undefined, // Use 'undefined' if the local name and exported name are the same + ts.factory.createIdentifier(symbol), + ), + ); + + const namedExports = ts.factory.createNamedExports(exportSpecifiers); + + const moduleSpecifier = moduleSpecifierString + ? ts.factory.createStringLiteral(moduleSpecifierString) + : undefined; + + // Create the export declaration (e.g., "export { SymbolName } from './module';") + const exportDeclaration = ts.factory.createExportDeclaration( + undefined, // modifiers + false, // isTypeOnly (e.g., export type) + namedExports, // NamedExports + moduleSpecifier, // moduleSpecifier (can be 'undefined' for local exports) + ); + + return exportDeclaration; +} + +/** + * Create a TypeScript interface node (ts.InterfaceDeclaration) with given name and members. + * + * @param interfaceName The name of the interface. + * @param members An array of ts.TypeElement representing the interface members (properties, methods, etc.). + * @param typeParameters An array of ts.TypeParameterDeclaration for any generic type parameters. + * @returns ts.InterfaceDeclaration The interface declaration node. + */ +export function createInterfaceNode( + interfaceName: string, + members: ts.TypeElement[] = [], + typeParameters: ts.TypeParameterDeclaration[] = [], +): ts.InterfaceDeclaration { + const interfaceDeclaration = ts.factory.createInterfaceDeclaration( + [ts.factory.createModifier(ts.SyntaxKind.ExportKeyword)], // Interface will be exportable + ts.factory.createIdentifier(interfaceName), // Interface name + typeParameters, // Type parameters (for generics), if any + undefined, // No heritage clauses (e.g., no extends or implements) + members, // Members of the interface + ); + + return interfaceDeclaration; +} + +/** + * Creates a comment node in TypeScript's syntax tree. + * @param commentText The text of the comment. + * @param isMultiLine Optional. Indicates if the comment should be a multi-line comment. Defaults to `true`. + * @param hasTrailingNewLine Optional. Indicates if the comment should have a trailing newline. Defaults to `true`. + * @returns A TypeScript statement node with the attached comment. + */ +export function createCommentNode( + commentText: string, + isMultiLine: boolean = true, + hasTrailingNewLine: boolean = true, +): ts.Statement { + const emptyStatement = ts.factory.createEmptyStatement(); + + let formattedCommentText: string; + if (isMultiLine) { + formattedCommentText = `*\n * ${commentText.split('\n').join('\n * ')}\n `; + } else { + formattedCommentText = commentText; + } + + const emptyStatementWithComment = ts.addSyntheticLeadingComment( + emptyStatement, + isMultiLine + ? ts.SyntaxKind.MultiLineCommentTrivia + : ts.SyntaxKind.SingleLineCommentTrivia, + formattedCommentText, + hasTrailingNewLine, + ); + + return emptyStatementWithComment; +} + +/** + * Create and return an AST node for a TypeScript enum declaration. + * + * @param enumName The name of the enum. + * @param members A list of key-value pairs for the enum members, each member is in the format [key, value]. + * @param isConst Whether to create a constant enum (`const enum`), default is not to create. + * @returns ts.EnumDeclaration The enum declaration node. + */ +export function createEnumNode( + enumName: string, + members: [string, number | string][], + isConst = false, +): ts.EnumDeclaration { + const memberNodes = members.map(([key, value]) => + ts.factory.createEnumMember( + key, + typeof value === 'number' + ? ts.factory.createNumericLiteral(value) + : ts.factory.createStringLiteral(value), + ), + ); + + const enumDeclaration = ts.factory.createEnumDeclaration( + isConst + ? [ + ts.factory.createModifier(ts.SyntaxKind.ExportKeyword), + ts.factory.createModifier(ts.SyntaxKind.ConstKeyword), + ] + : [ts.factory.createModifier(ts.SyntaxKind.ExportKeyword)], + ts.factory.createIdentifier(enumName), + memberNodes, + ); + + return enumDeclaration; +} + +// TS interfaces corresponding to the provided PhpDocNode structure +type PhpDocNode = { + nodeType: string; + children: PhpDocTagNode[]; +}; + +type PhpDocTagNode = { + nodeType: string; + name: string; + value: PropertyTagValueNode; +}; + +type PropertyTagValueNode = { + nodeType: string; + type: UnionTypeNode | ArrayShapeNode; + propertyName: string; + description: string; +}; + +type UnionTypeNode = { + nodeType: string; + types: IdentifierTypeNode[]; +}; + +type IdentifierTypeNode = { + nodeType: string; + name: string; +}; + +type ArrayShapeNode = { + nodeType: string; + items: ArrayShapeItemNode[]; + sealed: boolean; + kind: string; +}; + +type ArrayShapeItemNode = { + nodeType: string; + keyName: IdentifierTypeNode; + optional: boolean; + valueType: IdentifierTypeNode; +}; + +// TypeScript property representation +type TsProperty = { + propertyName: string; + type: string; +}; + +// Function to transform the PhpDocNode structure to an array of TsProperty +export function transformPhpDocToTypeScriptObject( + phpDocNode: PhpDocNode, +): TsProperty[] { + return phpDocNode.children + .filter((tag) => tag.name === '@property-read' || tag.name === '@property') + .map((tag) => { + const propertyName = _.camelCase( + tag.value.propertyName.replace(/^\$/, ''), + ); // remove PHP variable '$' prefix + const type = transformTypeNodeToTypeScript(tag.value.type); + return { propertyName, type }; + }); +} + +// Helper function to transform different PhpDoc type nodes to TypeScript type +function transformTypeNodeToTypeScript( + typeNode: UnionTypeNode | ArrayShapeNode, +): string { + if (typeNode.nodeType === 'UnionTypeNode') { + return (typeNode as UnionTypeNode).types + .map((t) => transformIdentifierTypeNodeToTypeScript(t)) + .join(' | '); + } + if (typeNode.nodeType === 'ArrayShapeNode') { + // In TypeScript, the most corresponding type would be an object type or a record type + const entries = (typeNode as ArrayShapeNode).items + .map( + (item) => + `${_.camelCase(item.keyName.name)}${ + item.optional ? '?' : '' + }: ${transformIdentifierTypeNodeToTypeScript(item.valueType)}`, + ) + .join('; '); + return `{ ${entries} }`; + } + + return 'any'; // Fallback for unknown node types +} + +// Helper function to convert IdentifierTypeNode to TypeScript type string +function transformIdentifierTypeNodeToTypeScript( + identifierTypeNode: IdentifierTypeNode, +): string { + switch (identifierTypeNode.name) { + case 'string': + case 'int': + case 'null': + // Directly use the type as it is + return identifierTypeNode.name; + // TODO: Add cases for other common PHP types that have direct TypeScript equivalents (e.g., 'float' -> 'number') + case 'float': + return 'number'; + case 'boolean': + case 'bool': + return 'boolean'; + case 'date': + case 'datetime': + case 'immutable_date': + case 'immutable_datetime': + case 'CarbonInterface': + case '\\Carbon\\CarbonInterface': + case '\\Carbon\\Carbon': + case '\\Carbon\\CarbonImmutable': + // Date will convert to string as output format in API + return 'string'; + case 'array': + return 'any'; + case 'Collection': + return 'any[]'; + case 'mixed': + return 'any'; + default: + return 'any'; + } +} diff --git a/src/phpdoc-parser/transpiler/php-doc-to-typescript-type-transpiler.ts b/src/phpdoc-parser/transpiler/php-doc-to-typescript-type-transpiler.ts new file mode 100644 index 00000000..51a85167 --- /dev/null +++ b/src/phpdoc-parser/transpiler/php-doc-to-typescript-type-transpiler.ts @@ -0,0 +1,212 @@ +import { + type ImportDeclaration, + SyntaxKind, + type TypeNode, + factory, +} from 'typescript'; +import type { ArrayShapeItemNode } from '../ast/type/array-shape-item-node'; +import { ArrayShapeNode } from '../ast/type/array-shape-node'; +import { ArrayTypeNode } from '../ast/type/array-type-node'; +import type { ObjectShapeItemNode } from '../ast/type/object-shape-item-node'; +import { ObjectShapeNode } from '../ast/type/object-shape-node'; +import type { TypeNode as PhpDocTypeNode } from '../ast/type/type-node'; +import { UnionTypeNode } from '../ast/type/union-type-node'; + +export type NameNodePathResolver = ( + this: T, + nodeParts: string[], +) => { + path: string; + name: string; + isTypeOnly: boolean; +}; + +export class PhpDocTypeNodeToTypescriptTypeNodeTranspiler { + constructor( + public nameNodePathResolver: (nodeParts: string[]) => { + path: string; + name: string; + isTypeOnly: boolean; + }, + ) {} + + public transpile(sourceTypeNode: PhpDocTypeNode): TypeNode { + // type_a | type_b | type_c + if (sourceTypeNode instanceof UnionTypeNode) { + return factory.createUnionTypeNode( + // eslint-disable-next-line @typescript-eslint/no-unsafe-argument + sourceTypeNode.types.map(this.transpile.bind(this)), + ); + } + + // type[] + if (sourceTypeNode instanceof ArrayTypeNode) { + return factory.createArrayTypeNode(this.transpile(sourceTypeNode.type)); + } + + // array{'foo': int, "bar"?: string, 0: boolean} + if (sourceTypeNode instanceof ArrayShapeNode) { + return factory.createTypeLiteralNode( + sourceTypeNode.items.map((item: ArrayShapeItemNode) => { + return factory.createPropertySignature( + undefined, + item.keyName.toString(), + item.optional + ? factory.createToken(SyntaxKind.QuestionToken) + : undefined, + this.transpile(item.valueType), + ); + }), + ); + } + + // object{'foo': int, "bar"?: string} + if (sourceTypeNode instanceof ObjectShapeNode) { + return factory.createTypeLiteralNode( + sourceTypeNode.items.map((item: ObjectShapeItemNode) => { + return factory.createPropertySignature( + undefined, + item.keyName.toString(), + item.optional + ? factory.createToken(SyntaxKind.QuestionToken) + : undefined, + this.transpile(item.valueType), + ); + }), + ); + } + + // case 1: array, non-empty-array, list, non-empty-list + // case 2: array, non-empty-array; + // case 3: \Illuminate\Database\Eloquent\Collection<\App\Models\Account>; + if (sourceTypeNode.isGenericTypeNode()) { + if ( + [ + 'array', + 'non-empty-array', + 'list', + 'non-empty-list', + '\\Illuminate\\Database\\Eloquent\\Collection', + ].includes(sourceTypeNode.type.name) + ) { + if (sourceTypeNode.genericTypes.length === 1) { + // turn into regular Array like Type[] + return factory.createArrayTypeNode( + this.transpile(sourceTypeNode.genericTypes[0]), + ); + } + if (sourceTypeNode.genericTypes.length === 2) { + // Record + return factory.createTypeReferenceNode( + factory.createIdentifier('Record'), + [ + this.transpile(sourceTypeNode.genericTypes[0]), + this.transpile(sourceTypeNode.genericTypes[1]), + ], + ); + } + } + + throw Error('Not yet supported Generic type so far'); + } + + if (sourceTypeNode.isIdentifierTypeNode()) { + // Ref: the Basic type defined here + // https://phpstan.org/writing-php-code/phpdoc-types#basic-types + if (['bool', 'boolean', 'true', 'false'].includes(sourceTypeNode.name)) { + return factory.createKeywordTypeNode(SyntaxKind.BooleanKeyword); + } + + if (['int', 'integer', 'float', 'double'].includes(sourceTypeNode.name)) { + return factory.createKeywordTypeNode(SyntaxKind.NumberKeyword); + } + + if (sourceTypeNode.name === 'string') { + return factory.createKeywordTypeNode(SyntaxKind.StringKeyword); + } + + if (sourceTypeNode.name === 'array-key') { + // array-key equals (string | int) + return factory.createUnionTypeNode([ + factory.createKeywordTypeNode(SyntaxKind.StringKeyword), + factory.createKeywordTypeNode(SyntaxKind.NumberKeyword), + ]); + } + + if (sourceTypeNode.name === 'scalar') { + // scalar is equals (float|integer|string|boolean) + // https://github.com/phpDocumentor/phpDocumentor/issues/694 + return factory.createUnionTypeNode([ + factory.createKeywordTypeNode(SyntaxKind.StringKeyword), + factory.createKeywordTypeNode(SyntaxKind.NumberKeyword), + factory.createKeywordTypeNode(SyntaxKind.BooleanKeyword), + ]); + } + + if (sourceTypeNode.name === 'mixed') { + // PHP mixed to TS any + factory.createKeywordTypeNode(SyntaxKind.AnyKeyword); + } + + if (sourceTypeNode.name === 'void') { + return factory.createToken(SyntaxKind.VoidKeyword); + } + + if (sourceTypeNode.name === 'null') { + return factory.createLiteralTypeNode(factory.createNull()); + } + + // Possibly Class Node + // Expr + // Node\Arg + // \Ast\Node\Arg + // the Name starts with uppercase character or '\' + if (/^[A-Z\\]/.test(sourceTypeNode.name)) { + const nameNodeParts = sourceTypeNode.name.split('\\'); + + const { name, path, isTypeOnly } = + this.nameNodePathResolver(nameNodeParts); + + if (name !== 'string' && path !== '') { + this.importDeclarations.push( + factory.createImportDeclaration( + undefined, + factory.createImportClause( + isTypeOnly, + undefined, + factory.createNamedImports([ + factory.createImportSpecifier( + false, + undefined, + factory.createIdentifier(name), + ), + ]), + ), + factory.createStringLiteral(path), + undefined, + ), + ); + } + + return factory.createTypeReferenceNode( + factory.createIdentifier(name), + undefined, + ); + } + } + + // return any type as a fallback + return factory.createKeywordTypeNode(SyntaxKind.AnyKeyword); + } + + public beforeTranspile() { + // Reset importDeclarations + this.importDeclarations = []; + } + + public getImportDeclarations() { + return this.importDeclarations; + } + + protected importDeclarations: ImportDeclaration[]; +}