@codefast/cli 0.3.13-canary.1 → 0.3.13-canary.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/bin.d.ts +3 -0
- package/dist/bin.d.ts.map +1 -0
- package/dist/{bin.mjs → bin.js} +1 -4
- package/dist/commands/arrange.d.ts +3 -0
- package/dist/commands/arrange.d.ts.map +1 -0
- package/dist/commands/arrange.js +108 -0
- package/dist/commands/mirror.d.ts +3 -0
- package/dist/commands/mirror.d.ts.map +1 -0
- package/dist/commands/mirror.js +36 -0
- package/dist/commands/tag.d.ts +3 -0
- package/dist/commands/tag.d.ts.map +1 -0
- package/dist/commands/tag.js +44 -0
- package/dist/lib/arrange/application/ports/domain-source-parser.port.d.ts +5 -0
- package/dist/lib/arrange/application/ports/domain-source-parser.port.d.ts.map +1 -0
- package/dist/lib/arrange/application/ports/file-walker.port.d.ts +5 -0
- package/dist/lib/arrange/application/ports/file-walker.port.d.ts.map +1 -0
- package/dist/lib/arrange/application/requests/analyze-directory.request.d.ts +6 -0
- package/dist/lib/arrange/application/requests/analyze-directory.request.d.ts.map +1 -0
- package/dist/lib/arrange/application/requests/analyze-directory.request.js +4 -0
- package/dist/lib/arrange/application/requests/arrange-sync.request.d.ts +18 -0
- package/dist/lib/arrange/application/requests/arrange-sync.request.d.ts.map +1 -0
- package/dist/lib/arrange/application/requests/arrange-sync.request.js +15 -0
- package/dist/lib/arrange/application/requests/suggest-groups.request.d.ts +8 -0
- package/dist/lib/arrange/application/requests/suggest-groups.request.d.ts.map +1 -0
- package/dist/lib/arrange/application/requests/suggest-groups.request.js +8 -0
- package/dist/lib/arrange/application/use-cases/analyze-directory.use-case.d.ts +17 -0
- package/dist/lib/arrange/application/use-cases/analyze-directory.use-case.d.ts.map +1 -0
- package/dist/lib/arrange/application/use-cases/analyze-directory.use-case.js +24 -0
- package/dist/lib/arrange/application/use-cases/group-file-preview.use-case.d.ts +17 -0
- package/dist/lib/arrange/application/use-cases/group-file-preview.use-case.d.ts.map +1 -0
- package/dist/lib/arrange/application/use-cases/group-file-preview.use-case.js +46 -0
- package/dist/lib/arrange/application/use-cases/group-file.use-case.d.ts +5 -0
- package/dist/lib/arrange/application/use-cases/group-file.use-case.d.ts.map +1 -0
- package/dist/lib/arrange/application/use-cases/group-file.use-case.js +40 -0
- package/dist/lib/arrange/application/use-cases/run-arrange-sync.use-case.d.ts +19 -0
- package/dist/lib/arrange/application/use-cases/run-arrange-sync.use-case.d.ts.map +1 -0
- package/dist/lib/arrange/application/use-cases/run-arrange-sync.use-case.js +85 -0
- package/dist/lib/arrange/application/use-cases/suggest-cn-groups.use-case.d.ts +7 -0
- package/dist/lib/arrange/application/use-cases/suggest-cn-groups.use-case.d.ts.map +1 -0
- package/dist/lib/arrange/application/use-cases/suggest-cn-groups.use-case.js +10 -0
- package/dist/lib/arrange/domain/arrange-analyze.service.d.ts +12 -0
- package/dist/lib/arrange/domain/arrange-analyze.service.d.ts.map +1 -0
- package/dist/lib/arrange/domain/arrange-analyze.service.js +116 -0
- package/dist/lib/arrange/domain/arrange-grouping.service.d.ts +53 -0
- package/dist/lib/arrange/domain/arrange-grouping.service.d.ts.map +1 -0
- package/dist/lib/arrange/domain/arrange-grouping.service.js +106 -0
- package/dist/lib/arrange/domain/ast/ast-helpers.helper.d.ts +28 -0
- package/dist/lib/arrange/domain/ast/ast-helpers.helper.d.ts.map +1 -0
- package/dist/lib/arrange/domain/ast/ast-helpers.helper.js +130 -0
- package/dist/lib/arrange/domain/ast/ast-node.model.d.ts +179 -0
- package/dist/lib/arrange/domain/ast/ast-node.model.d.ts.map +1 -0
- package/dist/lib/arrange/domain/ast/ast-node.model.js +210 -0
- package/dist/lib/arrange/domain/ast/collectors-cn.collector.d.ts +7 -0
- package/dist/lib/arrange/domain/ast/collectors-cn.collector.d.ts.map +1 -0
- package/dist/lib/arrange/domain/ast/collectors-cn.collector.js +70 -0
- package/dist/lib/arrange/domain/ast/collectors-jsx.collector.d.ts +4 -0
- package/dist/lib/arrange/domain/ast/collectors-jsx.collector.d.ts.map +1 -0
- package/dist/lib/arrange/domain/ast/collectors-jsx.collector.js +21 -0
- package/dist/lib/arrange/domain/ast/collectors-tv.collector.d.ts +13 -0
- package/dist/lib/arrange/domain/ast/collectors-tv.collector.d.ts.map +1 -0
- package/dist/lib/arrange/domain/ast/collectors-tv.collector.js +302 -0
- package/dist/lib/arrange/domain/ast/targets.model.d.ts +8 -0
- package/dist/lib/arrange/domain/ast/targets.model.d.ts.map +1 -0
- package/dist/lib/arrange/domain/ast/targets.model.js +147 -0
- package/dist/lib/arrange/domain/constants.domain.d.ts +70 -0
- package/dist/lib/arrange/domain/constants.domain.d.ts.map +1 -0
- package/dist/lib/arrange/domain/constants.domain.js +182 -0
- package/dist/lib/arrange/domain/errors.domain.d.ts +14 -0
- package/dist/lib/arrange/domain/errors.domain.d.ts.map +1 -0
- package/dist/lib/arrange/domain/errors.domain.js +16 -0
- package/dist/lib/arrange/domain/grouping.domain.d.ts +41 -0
- package/dist/lib/arrange/domain/grouping.domain.d.ts.map +1 -0
- package/dist/lib/arrange/domain/grouping.domain.js +371 -0
- package/dist/lib/arrange/domain/imports.domain.d.ts +7 -0
- package/dist/lib/arrange/domain/imports.domain.d.ts.map +1 -0
- package/dist/lib/arrange/domain/imports.domain.js +80 -0
- package/dist/lib/arrange/domain/source-text-formatters.formatter.d.ts +16 -0
- package/dist/lib/arrange/domain/source-text-formatters.formatter.d.ts.map +1 -0
- package/dist/lib/arrange/domain/source-text-formatters.formatter.js +55 -0
- package/dist/lib/arrange/domain/tokenizer.util.d.ts +45 -0
- package/dist/lib/arrange/domain/tokenizer.util.d.ts.map +1 -0
- package/dist/lib/arrange/domain/tokenizer.util.js +469 -0
- package/dist/lib/arrange/domain/types.domain.d.ts +115 -0
- package/dist/lib/arrange/domain/types.domain.d.ts.map +1 -0
- package/dist/lib/arrange/domain/types.domain.js +10 -0
- package/dist/lib/arrange/index.d.ts +45 -0
- package/dist/lib/arrange/index.d.ts.map +1 -0
- package/dist/lib/arrange/index.js +41 -0
- package/dist/lib/arrange/infra/arrange-sync-cli-options.adapter.d.ts +14 -0
- package/dist/lib/arrange/infra/arrange-sync-cli-options.adapter.d.ts.map +1 -0
- package/dist/lib/arrange/infra/domain-source-parser.adapter.d.ts +11 -0
- package/dist/lib/arrange/infra/domain-source-parser.adapter.d.ts.map +1 -0
- package/dist/lib/arrange/infra/domain-source-parser.adapter.js +19 -0
- package/dist/lib/arrange/infra/ensure-cn-import.adapter.d.ts +3 -0
- package/dist/lib/arrange/infra/ensure-cn-import.adapter.d.ts.map +1 -0
- package/dist/lib/arrange/infra/ensure-cn-import.adapter.js +6 -0
- package/dist/lib/arrange/infra/file-walker.adapter.d.ts +8 -0
- package/dist/lib/arrange/infra/file-walker.adapter.d.ts.map +1 -0
- package/dist/lib/arrange/infra/file-walker.adapter.js +17 -0
- package/dist/lib/arrange/infra/merge-cn-literal-pool-for-test.test-helper.d.ts +8 -0
- package/dist/lib/arrange/infra/merge-cn-literal-pool-for-test.test-helper.d.ts.map +1 -0
- package/dist/lib/arrange/infra/merge-cn-literal-pool-for-test.test-helper.js +25 -0
- package/dist/lib/arrange/infra/ts-ast-translator.adapter.d.ts +10 -0
- package/dist/lib/arrange/infra/ts-ast-translator.adapter.d.ts.map +1 -0
- package/dist/lib/arrange/infra/ts-ast-translator.adapter.js +363 -0
- package/dist/lib/arrange/presentation/arrange-prelude.presenter.d.ts +14 -0
- package/dist/lib/arrange/presentation/arrange-prelude.presenter.d.ts.map +1 -0
- package/dist/lib/arrange/presentation/arrange-prelude.presenter.js +24 -0
- package/dist/lib/arrange/presentation/formatters.presenter.d.ts +3 -0
- package/dist/lib/arrange/presentation/formatters.presenter.d.ts.map +1 -0
- package/dist/lib/arrange/presentation/formatters.presenter.js +2 -0
- package/dist/lib/arrange/presentation/present-analyze-cli.presenter.d.ts +4 -0
- package/dist/lib/arrange/presentation/present-analyze-cli.presenter.d.ts.map +1 -0
- package/dist/lib/arrange/presentation/present-analyze-cli.presenter.js +4 -0
- package/dist/lib/arrange/presentation/report.presenter.d.ts +4 -0
- package/dist/lib/arrange/presentation/report.presenter.d.ts.map +1 -0
- package/dist/lib/arrange/presentation/report.presenter.js +37 -0
- package/dist/lib/arrange/presentation/resolve-arrange-cli-target.presenter.d.ts +2 -0
- package/dist/lib/arrange/presentation/resolve-arrange-cli-target.presenter.d.ts.map +1 -0
- package/dist/lib/arrange/presentation/resolve-arrange-cli-target.presenter.js +7 -0
- package/dist/lib/config/domain/schema.domain.d.ts +50 -0
- package/dist/lib/config/domain/schema.domain.d.ts.map +1 -0
- package/dist/lib/config/domain/schema.domain.js +43 -0
- package/dist/lib/config/index.d.ts +4 -0
- package/dist/lib/config/index.d.ts.map +1 -0
- package/dist/lib/config/index.js +2 -0
- package/dist/lib/config/infra/loader.adapter.d.ts +11 -0
- package/dist/lib/config/infra/loader.adapter.d.ts.map +1 -0
- package/dist/lib/config/infra/loader.adapter.js +90 -0
- package/dist/lib/core/application/architecture-boundaries.policy.d.ts +19 -0
- package/dist/lib/core/application/architecture-boundaries.policy.d.ts.map +1 -0
- package/dist/lib/core/application/architecture-boundaries.policy.js +370 -0
- package/dist/lib/core/application/ports/cli-io.port.d.ts +31 -0
- package/dist/lib/core/application/ports/cli-io.port.d.ts.map +1 -0
- package/dist/lib/core/application/schema-parse.util.d.ts +8 -0
- package/dist/lib/core/application/schema-parse.util.d.ts.map +1 -0
- package/dist/lib/core/application/schema-parse.util.js +20 -0
- package/dist/lib/core/application/utils/caught-unknown-message.util.d.ts +6 -0
- package/dist/lib/core/application/utils/caught-unknown-message.util.d.ts.map +1 -0
- package/dist/lib/core/application/utils/caught-unknown-message.util.js +34 -0
- package/dist/lib/core/application/utils/verbose-diagnostics.util.d.ts +5 -0
- package/dist/lib/core/application/utils/verbose-diagnostics.util.d.ts.map +1 -0
- package/dist/lib/core/application/utils/verbose-diagnostics.util.js +7 -0
- package/dist/lib/core/domain/errors.domain.d.ts +11 -0
- package/dist/lib/core/domain/errors.domain.d.ts.map +1 -0
- package/dist/lib/core/domain/errors.domain.js +9 -0
- package/dist/lib/core/domain/result.model.d.ts +17 -0
- package/dist/lib/core/domain/result.model.d.ts.map +1 -0
- package/dist/lib/core/domain/result.model.js +15 -0
- package/dist/lib/core/infra/container.adapter.d.ts +58 -0
- package/dist/lib/core/infra/container.adapter.d.ts.map +1 -0
- package/dist/lib/core/infra/container.adapter.js +80 -0
- package/dist/lib/core/infra/logging-decorator.adapter.d.ts +12 -0
- package/dist/lib/core/infra/logging-decorator.adapter.d.ts.map +1 -0
- package/dist/lib/core/infra/logging-decorator.adapter.js +75 -0
- package/dist/lib/core/presentation/cli-executor.presenter.d.ts +33 -0
- package/dist/lib/core/presentation/cli-executor.presenter.d.ts.map +1 -0
- package/dist/lib/core/presentation/cli-executor.presenter.js +73 -0
- package/dist/lib/core/presentation/format-app-error.presenter.d.ts +6 -0
- package/dist/lib/core/presentation/format-app-error.presenter.d.ts.map +1 -0
- package/dist/lib/core/presentation/format-app-error.presenter.js +19 -0
- package/dist/lib/core/presentation/global-cli-options.presenter.d.ts +9 -0
- package/dist/lib/core/presentation/global-cli-options.presenter.d.ts.map +1 -0
- package/dist/lib/core/presentation/global-cli-options.presenter.js +8 -0
- package/dist/lib/core/presentation/load-codefast-config.presenter.d.ts +8 -0
- package/dist/lib/core/presentation/load-codefast-config.presenter.d.ts.map +1 -0
- package/dist/lib/core/presentation/load-codefast-config.presenter.js +15 -0
- package/dist/lib/core/presentation/parse-cli-schema.presenter.d.ts +5 -0
- package/dist/lib/core/presentation/parse-cli-schema.presenter.d.ts.map +1 -0
- package/dist/lib/core/presentation/parse-cli-schema.presenter.js +4 -0
- package/dist/lib/core/presentation/run-cli-use-case-after-parse.presenter.d.ts +6 -0
- package/dist/lib/core/presentation/run-cli-use-case-after-parse.presenter.d.ts.map +1 -0
- package/dist/lib/core/presentation/run-cli-use-case-after-parse.presenter.js +17 -0
- package/dist/lib/core/presentation/workspace-root-strict.presenter.d.ts +5 -0
- package/dist/lib/core/presentation/workspace-root-strict.presenter.d.ts.map +1 -0
- package/dist/lib/core/presentation/workspace-root-strict.presenter.js +12 -0
- package/dist/lib/infra/config-reporter.adapter.d.ts +4 -0
- package/dist/lib/infra/config-reporter.adapter.d.ts.map +1 -0
- package/dist/lib/infra/config-reporter.adapter.js +9 -0
- package/dist/lib/infra/fs-contract.port.d.ts +2 -0
- package/dist/lib/infra/fs-contract.port.d.ts.map +1 -0
- package/dist/lib/infra/fs-contract.port.js +1 -0
- package/dist/lib/infra/node-io.adapter.d.ts +4 -0
- package/dist/lib/infra/node-io.adapter.d.ts.map +1 -0
- package/dist/lib/infra/node-io.adapter.js +37 -0
- package/dist/lib/infra/workspace/repo-root.adapter.d.ts +7 -0
- package/dist/lib/infra/workspace/repo-root.adapter.d.ts.map +1 -0
- package/dist/lib/infra/workspace/repo-root.adapter.js +23 -0
- package/dist/lib/mirror/application/ports/file-system-service.port.d.ts +6 -0
- package/dist/lib/mirror/application/ports/file-system-service.port.d.ts.map +1 -0
- package/dist/lib/mirror/application/ports/file-system-service.port.js +1 -0
- package/dist/lib/mirror/application/ports/mirror-sync-reporter.port.d.ts +27 -0
- package/dist/lib/mirror/application/ports/mirror-sync-reporter.port.d.ts.map +1 -0
- package/dist/lib/mirror/application/ports/mirror-sync-reporter.port.js +1 -0
- package/dist/lib/mirror/application/ports/package-repository.port.d.ts +16 -0
- package/dist/lib/mirror/application/ports/package-repository.port.d.ts.map +1 -0
- package/dist/lib/mirror/application/ports/package-repository.port.js +1 -0
- package/dist/lib/mirror/application/ports/workspace-service.port.d.ts +7 -0
- package/dist/lib/mirror/application/ports/workspace-service.port.d.ts.map +1 -0
- package/dist/lib/mirror/application/ports/workspace-service.port.js +1 -0
- package/dist/lib/mirror/application/requests/mirror-sync.request.d.ts +10 -0
- package/dist/lib/mirror/application/requests/mirror-sync.request.d.ts.map +1 -0
- package/dist/lib/mirror/application/requests/mirror-sync.request.js +8 -0
- package/dist/lib/mirror/application/use-cases/generate-mirror-exports.use-case.d.ts +10 -0
- package/dist/lib/mirror/application/use-cases/generate-mirror-exports.use-case.d.ts.map +1 -0
- package/dist/lib/mirror/application/use-cases/generate-mirror-exports.use-case.js +271 -0
- package/dist/lib/mirror/application/use-cases/run-mirror-sync.use-case.d.ts +19 -0
- package/dist/lib/mirror/application/use-cases/run-mirror-sync.use-case.d.ts.map +1 -0
- package/dist/lib/mirror/application/use-cases/run-mirror-sync.use-case.js +168 -0
- package/dist/lib/mirror/domain/constants.domain.d.ts +6 -0
- package/dist/lib/mirror/domain/constants.domain.d.ts.map +1 -0
- package/dist/lib/mirror/domain/constants.domain.js +5 -0
- package/dist/lib/mirror/domain/errors.domain.d.ts +10 -0
- package/dist/lib/mirror/domain/errors.domain.d.ts.map +1 -0
- package/dist/lib/mirror/domain/errors.domain.js +12 -0
- package/dist/lib/mirror/domain/types.domain.d.ts +65 -0
- package/dist/lib/mirror/domain/types.domain.d.ts.map +1 -0
- package/dist/lib/mirror/domain/types.domain.js +1 -0
- package/dist/lib/mirror/index.d.ts +6 -0
- package/dist/lib/mirror/index.d.ts.map +1 -0
- package/dist/lib/mirror/index.js +1 -0
- package/dist/lib/mirror/infra/dirent-list.adapter.d.ts +9 -0
- package/dist/lib/mirror/infra/dirent-list.adapter.d.ts.map +1 -0
- package/dist/lib/mirror/infra/dirent-list.adapter.js +13 -0
- package/dist/lib/mirror/infra/file-system-service.adapter.d.ts +7 -0
- package/dist/lib/mirror/infra/file-system-service.adapter.d.ts.map +1 -0
- package/dist/lib/mirror/infra/file-system-service.adapter.js +47 -0
- package/dist/lib/mirror/infra/mirror-sync-cli-options.adapter.d.ts +14 -0
- package/dist/lib/mirror/infra/mirror-sync-cli-options.adapter.d.ts.map +1 -0
- package/dist/lib/mirror/infra/mirror-sync-cli-options.adapter.js +1 -0
- package/dist/lib/mirror/infra/mirror-sync-reporter.adapter.d.ts +3 -0
- package/dist/lib/mirror/infra/mirror-sync-reporter.adapter.d.ts.map +1 -0
- package/dist/lib/mirror/infra/mirror-sync-reporter.adapter.js +13 -0
- package/dist/lib/mirror/infra/package-filter.adapter.d.ts +8 -0
- package/dist/lib/mirror/infra/package-filter.adapter.d.ts.map +1 -0
- package/dist/lib/mirror/infra/package-filter.adapter.js +33 -0
- package/dist/lib/mirror/infra/package-repository.adapter.d.ts +17 -0
- package/dist/lib/mirror/infra/package-repository.adapter.d.ts.map +1 -0
- package/dist/lib/mirror/infra/package-repository.adapter.js +17 -0
- package/dist/lib/mirror/infra/path-normalizer.adapter.d.ts +2 -0
- package/dist/lib/mirror/infra/path-normalizer.adapter.d.ts.map +1 -0
- package/dist/lib/mirror/infra/path-normalizer.adapter.js +4 -0
- package/dist/lib/mirror/infra/update-pkg.adapter.d.ts +19 -0
- package/dist/lib/mirror/infra/update-pkg.adapter.d.ts.map +1 -0
- package/dist/lib/mirror/infra/update-pkg.adapter.js +156 -0
- package/dist/lib/mirror/infra/workspace-packages.adapter.d.ts +26 -0
- package/dist/lib/mirror/infra/workspace-packages.adapter.d.ts.map +1 -0
- package/dist/lib/mirror/infra/workspace-packages.adapter.js +170 -0
- package/dist/lib/mirror/infra/workspace-service.adapter.d.ts +8 -0
- package/dist/lib/mirror/infra/workspace-service.adapter.d.ts.map +1 -0
- package/dist/lib/mirror/infra/workspace-service.adapter.js +10 -0
- package/dist/lib/mirror/presentation/mirror-prelude.presenter.d.ts +17 -0
- package/dist/lib/mirror/presentation/mirror-prelude.presenter.d.ts.map +1 -0
- package/dist/lib/mirror/presentation/mirror-prelude.presenter.js +35 -0
- package/dist/lib/mirror/presentation/reporter.presenter.d.ts +25 -0
- package/dist/lib/mirror/presentation/reporter.presenter.d.ts.map +1 -0
- package/dist/lib/mirror/presentation/reporter.presenter.js +140 -0
- package/dist/lib/mirror/presentation/resolve-mirror-package-arg.presenter.d.ts +11 -0
- package/dist/lib/mirror/presentation/resolve-mirror-package-arg.presenter.d.ts.map +1 -0
- package/dist/lib/mirror/presentation/resolve-mirror-package-arg.presenter.js +27 -0
- package/dist/lib/shared/source-code/domain/text-edit.model.d.ts +14 -0
- package/dist/lib/shared/source-code/domain/text-edit.model.d.ts.map +1 -0
- package/dist/lib/shared/source-code/domain/text-edit.model.js +30 -0
- package/dist/lib/shared/source-code/infra/tsx-file-walk.adapter.d.ts +4 -0
- package/dist/lib/shared/source-code/infra/tsx-file-walk.adapter.d.ts.map +1 -0
- package/dist/lib/shared/source-code/infra/tsx-file-walk.adapter.js +37 -0
- package/dist/lib/tag/application/ports/target-resolver.port.d.ts +6 -0
- package/dist/lib/tag/application/ports/target-resolver.port.d.ts.map +1 -0
- package/dist/lib/tag/application/ports/target-resolver.port.js +1 -0
- package/dist/lib/tag/application/ports/typescript-tree-walk.port.d.ts +6 -0
- package/dist/lib/tag/application/ports/typescript-tree-walk.port.d.ts.map +1 -0
- package/dist/lib/tag/application/ports/typescript-tree-walk.port.js +1 -0
- package/dist/lib/tag/application/requests/tag-sync.request.d.ts +10 -0
- package/dist/lib/tag/application/requests/tag-sync.request.d.ts.map +1 -0
- package/dist/lib/tag/application/requests/tag-sync.request.js +8 -0
- package/dist/lib/tag/application/use-cases/run-tag-sync.use-case.d.ts +23 -0
- package/dist/lib/tag/application/use-cases/run-tag-sync.use-case.d.ts.map +1 -0
- package/dist/lib/tag/application/use-cases/run-tag-sync.use-case.js +357 -0
- package/dist/lib/tag/domain/types.domain.d.ts +56 -0
- package/dist/lib/tag/domain/types.domain.d.ts.map +1 -0
- package/dist/lib/tag/domain/types.domain.js +1 -0
- package/dist/lib/tag/index.d.ts +14 -0
- package/dist/lib/tag/index.d.ts.map +1 -0
- package/dist/lib/tag/index.js +10 -0
- package/dist/lib/tag/infra/tag-sync-cli-options.adapter.d.ts +14 -0
- package/dist/lib/tag/infra/tag-sync-cli-options.adapter.d.ts.map +1 -0
- package/dist/lib/tag/infra/tag-sync-cli-options.adapter.js +1 -0
- package/dist/lib/tag/infra/tag-target-candidates.adapter.d.ts +4 -0
- package/dist/lib/tag/infra/tag-target-candidates.adapter.d.ts.map +1 -0
- package/dist/lib/tag/infra/tag-target-candidates.adapter.js +200 -0
- package/dist/lib/tag/infra/tag-target-resolver.adapter.d.ts +3 -0
- package/dist/lib/tag/infra/tag-target-resolver.adapter.d.ts.map +1 -0
- package/dist/lib/tag/infra/tag-target-resolver.adapter.js +4 -0
- package/dist/lib/tag/infra/typescript-tree-walk.adapter.d.ts +3 -0
- package/dist/lib/tag/infra/typescript-tree-walk.adapter.d.ts.map +1 -0
- package/dist/lib/tag/infra/typescript-tree-walk.adapter.js +4 -0
- package/dist/lib/tag/presentation/colors.presenter.d.ts +8 -0
- package/dist/lib/tag/presentation/colors.presenter.d.ts.map +1 -0
- package/dist/lib/tag/presentation/colors.presenter.js +9 -0
- package/dist/lib/tag/presentation/resolve-tag-cli-target.presenter.d.ts +8 -0
- package/dist/lib/tag/presentation/resolve-tag-cli-target.presenter.d.ts.map +1 -0
- package/dist/lib/tag/presentation/resolve-tag-cli-target.presenter.js +10 -0
- package/dist/lib/tag/presentation/resolve-tag-workspace-root.presenter.d.ts +8 -0
- package/dist/lib/tag/presentation/resolve-tag-workspace-root.presenter.d.ts.map +1 -0
- package/dist/lib/tag/presentation/resolve-tag-workspace-root.presenter.js +10 -0
- package/dist/lib/tag/presentation/tag-prelude.presenter.d.ts +15 -0
- package/dist/lib/tag/presentation/tag-prelude.presenter.d.ts.map +1 -0
- package/dist/lib/tag/presentation/tag-prelude.presenter.js +31 -0
- package/dist/lib/tag/presentation/tag-sync.presenter.d.ts +20 -0
- package/dist/lib/tag/presentation/tag-sync.presenter.d.ts.map +1 -0
- package/dist/lib/tag/presentation/tag-sync.presenter.js +92 -0
- package/dist/program.d.ts +4 -0
- package/dist/program.d.ts.map +1 -0
- package/dist/program.js +40 -0
- package/package.json +8 -5
- package/dist/commands/arrange.mjs +0 -107
- package/dist/commands/mirror.mjs +0 -66
- package/dist/commands/tag.mjs +0 -58
- package/dist/lib/arrange/application/analyze.mjs +0 -92
- package/dist/lib/arrange/application/group-file.mjs +0 -113
- package/dist/lib/arrange/application/run-target.mjs +0 -65
- package/dist/lib/arrange/domain/ast/ast-helpers.mjs +0 -115
- package/dist/lib/arrange/domain/ast/collectors-cn.mjs +0 -61
- package/dist/lib/arrange/domain/ast/collectors-jsx.mjs +0 -20
- package/dist/lib/arrange/domain/ast/collectors-tv.mjs +0 -170
- package/dist/lib/arrange/domain/ast/targets.mjs +0 -106
- package/dist/lib/arrange/domain/constants.mjs +0 -169
- package/dist/lib/arrange/domain/errors.mjs +0 -19
- package/dist/lib/arrange/domain/grouping.mjs +0 -235
- package/dist/lib/arrange/domain/imports.mjs +0 -54
- package/dist/lib/arrange/domain/tokenizer.mjs +0 -216
- package/dist/lib/arrange/index.mjs +0 -15
- package/dist/lib/arrange/infra/walk.mjs +0 -33
- package/dist/lib/arrange/presentation/formatters.mjs +0 -52
- package/dist/lib/arrange/presentation/report.mjs +0 -24
- package/dist/lib/config/domain/schema.mjs +0 -25
- package/dist/lib/config/index.mjs +0 -3
- package/dist/lib/config/infra/loader.mjs +0 -78
- package/dist/lib/infra/caught-unknown-message.mjs +0 -20
- package/dist/lib/infra/config-reporter.mjs +0 -10
- package/dist/lib/infra/node-io.mjs +0 -30
- package/dist/lib/infra/workspace/repo-root.mjs +0 -22
- package/dist/lib/mirror/application/engine.mjs +0 -248
- package/dist/lib/mirror/application/sync.mjs +0 -162
- package/dist/lib/mirror/domain/constants.mjs +0 -12
- package/dist/lib/mirror/domain/errors.mjs +0 -15
- package/dist/lib/mirror/index.mjs +0 -2
- package/dist/lib/mirror/infra/dirent-list.mjs +0 -14
- package/dist/lib/mirror/infra/package-filter.mjs +0 -26
- package/dist/lib/mirror/infra/path-normalizer.mjs +0 -7
- package/dist/lib/mirror/infra/update-pkg.mjs +0 -105
- package/dist/lib/mirror/infra/workspace-packages.mjs +0 -159
- package/dist/lib/mirror/presentation/reporter.mjs +0 -111
- package/dist/lib/tag/application/engine.mjs +0 -287
- package/dist/lib/tag/index.mjs +0 -4
- package/dist/lib/tag/infra/target-resolver.mjs +0 -170
- package/dist/lib/tag/presentation/colors.mjs +0 -12
- package/dist/lib/tag/presentation/tag-presenter.mjs +0 -63
- package/dist/program.mjs +0 -34
- /package/dist/lib/arrange/{domain/types.mjs → application/ports/domain-source-parser.port.js} +0 -0
- /package/dist/lib/{infra/fs-contract.mjs → arrange/application/ports/file-walker.port.js} +0 -0
- /package/dist/lib/{mirror/domain/types.mjs → arrange/infra/arrange-sync-cli-options.adapter.js} +0 -0
- /package/dist/lib/{tag/domain/types.mjs → core/application/ports/cli-io.port.js} +0 -0
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pure string utilities for applying non-overlapping text edits and reading line indentation.
|
|
3
|
+
*/
|
|
4
|
+
export type SourceTextEdit = Readonly<{
|
|
5
|
+
start: number;
|
|
6
|
+
end: number;
|
|
7
|
+
replacement: string;
|
|
8
|
+
}>;
|
|
9
|
+
/**
|
|
10
|
+
* Returns only the leading whitespace (tabs / spaces) of the line containing `pos`.
|
|
11
|
+
*/
|
|
12
|
+
export declare function indentOfLineContaining(source: string, pos: number): string;
|
|
13
|
+
export declare function applyEditsDescending(sourceText: string, edits: ReadonlyArray<SourceTextEdit>): string;
|
|
14
|
+
//# sourceMappingURL=text-edit.model.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"text-edit.model.d.ts","sourceRoot":"","sources":["../../../../../src/lib/shared/source-code/domain/text-edit.model.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,MAAM,MAAM,cAAc,GAAG,QAAQ,CAAC;IACpC,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;IACZ,WAAW,EAAE,MAAM,CAAC;CACrB,CAAC,CAAC;AAEH;;GAEG;AACH,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,CAoB1E;AAED,wBAAgB,oBAAoB,CAClC,UAAU,EAAE,MAAM,EAClB,KAAK,EAAE,aAAa,CAAC,cAAc,CAAC,GACnC,MAAM,CAOR"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pure string utilities for applying non-overlapping text edits and reading line indentation.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Returns only the leading whitespace (tabs / spaces) of the line containing `pos`.
|
|
6
|
+
*/
|
|
7
|
+
export function indentOfLineContaining(source, pos) {
|
|
8
|
+
const searchPos = Math.max(0, Math.min(pos, source.length));
|
|
9
|
+
const prevLineBreak = Math.max(source.lastIndexOf("\n", searchPos - 1), source.lastIndexOf("\r", searchPos - 1));
|
|
10
|
+
const lineStart = prevLineBreak === -1 ? 0 : prevLineBreak + 1;
|
|
11
|
+
let lineEnd = source.length;
|
|
12
|
+
for (let i = lineStart; i < source.length; i++) {
|
|
13
|
+
const ch = source[i];
|
|
14
|
+
if (ch === "\n" || ch === "\r") {
|
|
15
|
+
lineEnd = i;
|
|
16
|
+
break;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
const line = source.slice(lineStart, lineEnd);
|
|
20
|
+
const indentMatch = /^[\t ]*/.exec(line);
|
|
21
|
+
return indentMatch?.[0] ?? "";
|
|
22
|
+
}
|
|
23
|
+
export function applyEditsDescending(sourceText, edits) {
|
|
24
|
+
const sorted = [...edits].sort((editA, editB) => editB.start - editA.start);
|
|
25
|
+
let out = sourceText;
|
|
26
|
+
for (const edit of sorted) {
|
|
27
|
+
out = out.slice(0, edit.start) + edit.replacement + out.slice(edit.end);
|
|
28
|
+
}
|
|
29
|
+
return out;
|
|
30
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tsx-file-walk.adapter.d.ts","sourceRoot":"","sources":["../../../../../src/lib/shared/source-code/infra/tsx-file-walk.adapter.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,yCAAyC,CAAC;AAErE,eAAO,MAAM,iBAAiB,aAY5B,CAAC;AAEH,wBAAgB,YAAY,CAAC,iBAAiB,EAAE,MAAM,EAAE,EAAE,EAAE,KAAK,GAAG,MAAM,EAAE,CAsB3E"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import path from "node:path";
|
|
2
|
+
export const DEFAULT_SKIP_DIRS = new Set([
|
|
3
|
+
"node_modules",
|
|
4
|
+
"dist",
|
|
5
|
+
".git",
|
|
6
|
+
".turbo",
|
|
7
|
+
".next",
|
|
8
|
+
".cache",
|
|
9
|
+
"out",
|
|
10
|
+
"build",
|
|
11
|
+
"coverage",
|
|
12
|
+
".vercel",
|
|
13
|
+
".output",
|
|
14
|
+
]);
|
|
15
|
+
export function walkTsxFiles(rootDirectoryPath, fs) {
|
|
16
|
+
const result = [];
|
|
17
|
+
const visit = (entryPath) => {
|
|
18
|
+
const entryStats = fs.statSync(entryPath);
|
|
19
|
+
if (entryStats.isDirectory()) {
|
|
20
|
+
for (const childName of fs.readdirSync(entryPath)) {
|
|
21
|
+
if (DEFAULT_SKIP_DIRS.has(childName)) {
|
|
22
|
+
continue;
|
|
23
|
+
}
|
|
24
|
+
visit(path.join(entryPath, childName));
|
|
25
|
+
}
|
|
26
|
+
return;
|
|
27
|
+
}
|
|
28
|
+
if (entryPath.endsWith(".d.ts")) {
|
|
29
|
+
return;
|
|
30
|
+
}
|
|
31
|
+
if (entryPath.endsWith(".tsx") || entryPath.endsWith(".ts")) {
|
|
32
|
+
result.push(entryPath);
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
visit(rootDirectoryPath);
|
|
36
|
+
return result;
|
|
37
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { CliFs } from "#lib/core/application/ports/cli-io.port";
|
|
2
|
+
import type { TagTargetCandidate } from "#lib/tag/domain/types.domain";
|
|
3
|
+
export interface TagTargetResolverPort {
|
|
4
|
+
resolveTagTargetCandidates(rootDir: string, explicitTarget: string | undefined, fileSystem: CliFs): Promise<TagTargetCandidate[]>;
|
|
5
|
+
}
|
|
6
|
+
//# sourceMappingURL=target-resolver.port.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"target-resolver.port.d.ts","sourceRoot":"","sources":["../../../../../src/lib/tag/application/ports/target-resolver.port.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,yCAAyC,CAAC;AACrE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAEvE,MAAM,WAAW,qBAAqB;IACpC,0BAA0B,CACxB,OAAO,EAAE,MAAM,EACf,cAAc,EAAE,MAAM,GAAG,SAAS,EAClC,UAAU,EAAE,KAAK,GAChB,OAAO,CAAC,kBAAkB,EAAE,CAAC,CAAC;CAClC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { CliFs } from "#lib/core/application/ports/cli-io.port";
|
|
2
|
+
/** Lists `.ts` / `.tsx` files under a directory (implementation may live in another bounded context’s infra). */
|
|
3
|
+
export type TypeScriptTreeWalkPort = {
|
|
4
|
+
walkTsxFiles(rootDirectoryPath: string, fs: CliFs): string[];
|
|
5
|
+
};
|
|
6
|
+
//# sourceMappingURL=typescript-tree-walk.port.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"typescript-tree-walk.port.d.ts","sourceRoot":"","sources":["../../../../../src/lib/tag/application/ports/typescript-tree-walk.port.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,yCAAyC,CAAC;AAErE,iHAAiH;AACjH,MAAM,MAAM,sBAAsB,GAAG;IACnC,YAAY,CAAC,iBAAiB,EAAE,MAAM,EAAE,EAAE,EAAE,KAAK,GAAG,MAAM,EAAE,CAAC;CAC9D,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const TagSyncRunRequestSchema: z.ZodObject<{
|
|
3
|
+
rootDir: z.ZodString;
|
|
4
|
+
write: z.ZodBoolean;
|
|
5
|
+
targetPath: z.ZodOptional<z.ZodString>;
|
|
6
|
+
skipPackages: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
7
|
+
config: z.ZodOptional<z.ZodUnknown>;
|
|
8
|
+
}, z.core.$strip>;
|
|
9
|
+
export type TagSyncRunRequest = z.infer<typeof TagSyncRunRequestSchema>;
|
|
10
|
+
//# sourceMappingURL=tag-sync.request.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tag-sync.request.d.ts","sourceRoot":"","sources":["../../../../../src/lib/tag/application/requests/tag-sync.request.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,uBAAuB;;;;;;iBAMlC,CAAC;AAEH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { type AppError } from "#lib/core/domain/errors.domain";
|
|
2
|
+
import { type Result } from "#lib/core/domain/result.model";
|
|
3
|
+
import type { CliFs } from "#lib/core/application/ports/cli-io.port";
|
|
4
|
+
import type { TagSyncRunRequest } from "#lib/tag/application/requests/tag-sync.request";
|
|
5
|
+
import type { TagTargetResolverPort } from "#lib/tag/application/ports/target-resolver.port";
|
|
6
|
+
import type { TypeScriptTreeWalkPort } from "#lib/tag/application/ports/typescript-tree-walk.port";
|
|
7
|
+
import type { TagProgressListener, TagRunOptions, TagRunResult, TagSyncResult } from "#lib/tag/domain/types.domain";
|
|
8
|
+
export type TagSyncRunDeps = {
|
|
9
|
+
readonly fs: CliFs;
|
|
10
|
+
readonly targetResolver: TagTargetResolverPort;
|
|
11
|
+
readonly typeScriptTreeWalk: TypeScriptTreeWalkPort;
|
|
12
|
+
};
|
|
13
|
+
export type TagSyncExecutionInput = TagSyncRunRequest & {
|
|
14
|
+
listener?: TagProgressListener;
|
|
15
|
+
};
|
|
16
|
+
export declare function resolveNearestPackageVersion(targetPath: string, fs: CliFs): string;
|
|
17
|
+
export declare function runTagOnTarget(targetPath: string, opts: TagRunOptions, fs: CliFs, typeScriptTreeWalk: TypeScriptTreeWalkPort): TagRunResult;
|
|
18
|
+
/**
|
|
19
|
+
* CLI entry: run tagging and optional `onAfterWrite` using config injected by the command layer.
|
|
20
|
+
* Returns structured execution data; presentation/logging belongs to command layer.
|
|
21
|
+
*/
|
|
22
|
+
export declare function runTagSync(input: TagSyncExecutionInput, deps: TagSyncRunDeps): Promise<Result<TagSyncResult, AppError>>;
|
|
23
|
+
//# sourceMappingURL=run-tag-sync.use-case.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"run-tag-sync.use-case.d.ts","sourceRoot":"","sources":["../../../../../src/lib/tag/application/use-cases/run-tag-sync.use-case.ts"],"names":[],"mappings":"AAEA,OAAO,EAAY,KAAK,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AACzE,OAAO,EAAW,KAAK,MAAM,EAAE,MAAM,+BAA+B,CAAC;AAMrE,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,yCAAyC,CAAC;AAErE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gDAAgD,CAAC;AACxF,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,iDAAiD,CAAC;AAC7F,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,sDAAsD,CAAC;AACnG,OAAO,KAAK,EAEV,mBAAmB,EAInB,aAAa,EACb,YAAY,EACZ,aAAa,EAEd,MAAM,8BAA8B,CAAC;AAEtC,MAAM,MAAM,cAAc,GAAG;IAC3B,QAAQ,CAAC,EAAE,EAAE,KAAK,CAAC;IACnB,QAAQ,CAAC,cAAc,EAAE,qBAAqB,CAAC;IAC/C,QAAQ,CAAC,kBAAkB,EAAE,sBAAsB,CAAC;CACrD,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG,iBAAiB,GAAG;IACtD,QAAQ,CAAC,EAAE,mBAAmB,CAAC;CAChC,CAAC;AA2NF,wBAAgB,4BAA4B,CAAC,UAAU,EAAE,MAAM,EAAE,EAAE,EAAE,KAAK,GAAG,MAAM,CAwBlF;AAED,wBAAgB,cAAc,CAC5B,UAAU,EAAE,MAAM,EAClB,IAAI,EAAE,aAAa,EACnB,EAAE,EAAE,KAAK,EACT,kBAAkB,EAAE,sBAAsB,GACzC,YAAY,CAyBd;AAoJD;;;GAGG;AACH,wBAAsB,UAAU,CAC9B,KAAK,EAAE,qBAAqB,EAC5B,IAAI,EAAE,cAAc,GACnB,OAAO,CAAC,MAAM,CAAC,aAAa,EAAE,QAAQ,CAAC,CAAC,CAiE1C"}
|
|
@@ -0,0 +1,357 @@
|
|
|
1
|
+
import path from "node:path";
|
|
2
|
+
import ts from "typescript";
|
|
3
|
+
import { appError } from "#lib/core/domain/errors.domain";
|
|
4
|
+
import { err, ok } from "#lib/core/domain/result.model";
|
|
5
|
+
import { applyEditsDescending, indentOfLineContaining, } from "#lib/shared/source-code/domain/text-edit.model";
|
|
6
|
+
import { messageFromCaughtUnknown } from "#lib/core/application/utils/caught-unknown-message.util";
|
|
7
|
+
const PACKAGE_JSON = "package.json";
|
|
8
|
+
const VERSION_TAG = "@since";
|
|
9
|
+
function hasExportModifier(node) {
|
|
10
|
+
const modifiers = ts.canHaveModifiers(node) ? ts.getModifiers(node) : undefined;
|
|
11
|
+
return modifiers?.some((modifier) => modifier.kind === ts.SyntaxKind.ExportKeyword) ?? false;
|
|
12
|
+
}
|
|
13
|
+
function isTaggableDeclaration(node) {
|
|
14
|
+
return (ts.isFunctionDeclaration(node) ||
|
|
15
|
+
ts.isClassDeclaration(node) ||
|
|
16
|
+
ts.isInterfaceDeclaration(node) ||
|
|
17
|
+
ts.isTypeAliasDeclaration(node) ||
|
|
18
|
+
ts.isEnumDeclaration(node) ||
|
|
19
|
+
ts.isVariableStatement(node));
|
|
20
|
+
}
|
|
21
|
+
function addDeclarationName(registry, name, declaration) {
|
|
22
|
+
if (!registry.has(name)) {
|
|
23
|
+
registry.set(name, new Set([declaration]));
|
|
24
|
+
return;
|
|
25
|
+
}
|
|
26
|
+
registry.get(name).add(declaration);
|
|
27
|
+
}
|
|
28
|
+
function collectLocalNamedDeclarations(sf) {
|
|
29
|
+
const declarations = new Map();
|
|
30
|
+
for (const statement of sf.statements) {
|
|
31
|
+
if (ts.isFunctionDeclaration(statement) && statement.name) {
|
|
32
|
+
addDeclarationName(declarations, statement.name.text, statement);
|
|
33
|
+
continue;
|
|
34
|
+
}
|
|
35
|
+
if (ts.isClassDeclaration(statement) && statement.name) {
|
|
36
|
+
addDeclarationName(declarations, statement.name.text, statement);
|
|
37
|
+
continue;
|
|
38
|
+
}
|
|
39
|
+
if (ts.isInterfaceDeclaration(statement)) {
|
|
40
|
+
addDeclarationName(declarations, statement.name.text, statement);
|
|
41
|
+
continue;
|
|
42
|
+
}
|
|
43
|
+
if (ts.isTypeAliasDeclaration(statement)) {
|
|
44
|
+
addDeclarationName(declarations, statement.name.text, statement);
|
|
45
|
+
continue;
|
|
46
|
+
}
|
|
47
|
+
if (ts.isEnumDeclaration(statement)) {
|
|
48
|
+
addDeclarationName(declarations, statement.name.text, statement);
|
|
49
|
+
continue;
|
|
50
|
+
}
|
|
51
|
+
if (!ts.isVariableStatement(statement)) {
|
|
52
|
+
continue;
|
|
53
|
+
}
|
|
54
|
+
for (const declaration of statement.declarationList.declarations) {
|
|
55
|
+
if (ts.isIdentifier(declaration.name)) {
|
|
56
|
+
addDeclarationName(declarations, declaration.name.text, statement);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
return declarations;
|
|
61
|
+
}
|
|
62
|
+
function collectExportedDeclarations(sf) {
|
|
63
|
+
const exported = new Set();
|
|
64
|
+
const localNamed = collectLocalNamedDeclarations(sf);
|
|
65
|
+
for (const statement of sf.statements) {
|
|
66
|
+
if (isTaggableDeclaration(statement) && hasExportModifier(statement)) {
|
|
67
|
+
exported.add(statement);
|
|
68
|
+
continue;
|
|
69
|
+
}
|
|
70
|
+
if (ts.isExportDeclaration(statement) &&
|
|
71
|
+
!statement.moduleSpecifier &&
|
|
72
|
+
statement.exportClause &&
|
|
73
|
+
ts.isNamedExports(statement.exportClause)) {
|
|
74
|
+
for (const element of statement.exportClause.elements) {
|
|
75
|
+
const localName = element.propertyName?.text ?? element.name.text;
|
|
76
|
+
const declarations = localNamed.get(localName);
|
|
77
|
+
if (!declarations) {
|
|
78
|
+
continue;
|
|
79
|
+
}
|
|
80
|
+
for (const declaration of declarations) {
|
|
81
|
+
exported.add(declaration);
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
continue;
|
|
85
|
+
}
|
|
86
|
+
if (!ts.isExportAssignment(statement) || !ts.isIdentifier(statement.expression)) {
|
|
87
|
+
continue;
|
|
88
|
+
}
|
|
89
|
+
const declarations = localNamed.get(statement.expression.text);
|
|
90
|
+
if (!declarations) {
|
|
91
|
+
continue;
|
|
92
|
+
}
|
|
93
|
+
for (const declaration of declarations) {
|
|
94
|
+
exported.add(declaration);
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
return exported;
|
|
98
|
+
}
|
|
99
|
+
function makeJSDocSinceLine(existingComment, sourceText, version) {
|
|
100
|
+
const commentText = sourceText.slice(existingComment.pos, existingComment.end);
|
|
101
|
+
const baseIndent = indentOfLineContaining(sourceText, existingComment.pos);
|
|
102
|
+
const rawBody = commentText.replace(/^\/\*\*\s?/, "").replace(/\s*\*\/$/, "");
|
|
103
|
+
const normalizedBodyLines = rawBody
|
|
104
|
+
.split("\n")
|
|
105
|
+
.map((line) => line.replace(/^\s*\*\s?/, "").replace(/\s+$/, ""))
|
|
106
|
+
.filter((line, lineIndex, lines) => {
|
|
107
|
+
if (line.length > 0) {
|
|
108
|
+
return true;
|
|
109
|
+
}
|
|
110
|
+
const hasNonEmptyBefore = lines.slice(0, lineIndex).some((value) => value.length > 0);
|
|
111
|
+
const hasNonEmptyAfter = lines.slice(lineIndex + 1).some((value) => value.length > 0);
|
|
112
|
+
return hasNonEmptyBefore && hasNonEmptyAfter;
|
|
113
|
+
});
|
|
114
|
+
const formattedBody = normalizedBodyLines.length > 0
|
|
115
|
+
? `${normalizedBodyLines.map((line) => `${baseIndent} * ${line}`).join("\n")}\n${baseIndent} *\n`
|
|
116
|
+
: "";
|
|
117
|
+
const replacement = `/**\n${formattedBody}${baseIndent} * ${VERSION_TAG} ${version}\n${baseIndent} */`;
|
|
118
|
+
return { start: existingComment.pos, end: existingComment.end, replacement };
|
|
119
|
+
}
|
|
120
|
+
function makeSinceOnlyJSDocBlock(declarationIndent, version) {
|
|
121
|
+
return `/**\n${declarationIndent} * ${VERSION_TAG} ${version}\n${declarationIndent} */`;
|
|
122
|
+
}
|
|
123
|
+
function makeDeclarationSinceLine(declaration, sf, sourceText, version) {
|
|
124
|
+
const jsDocTags = ts.getJSDocTags(declaration);
|
|
125
|
+
if (jsDocTags.some((tag) => tag.tagName.text === "since")) {
|
|
126
|
+
return undefined;
|
|
127
|
+
}
|
|
128
|
+
const jsDocComments = ts.getJSDocCommentsAndTags(declaration).filter(ts.isJSDoc);
|
|
129
|
+
const lastJsDoc = jsDocComments.at(-1);
|
|
130
|
+
if (lastJsDoc) {
|
|
131
|
+
return makeJSDocSinceLine(lastJsDoc, sourceText, version);
|
|
132
|
+
}
|
|
133
|
+
const start = declaration.getStart(sf);
|
|
134
|
+
const indent = indentOfLineContaining(sourceText, start);
|
|
135
|
+
return {
|
|
136
|
+
start,
|
|
137
|
+
end: start,
|
|
138
|
+
replacement: `${indent}${makeSinceOnlyJSDocBlock(indent, version)}\n${indent}`,
|
|
139
|
+
};
|
|
140
|
+
}
|
|
141
|
+
function applySinceTagsToFile(filePath, version, fs, write) {
|
|
142
|
+
const sourceText = fs.readFileSync(filePath, "utf8");
|
|
143
|
+
const sf = ts.createSourceFile(filePath, sourceText, ts.ScriptTarget.Latest, true, filePath.endsWith(".tsx") ? ts.ScriptKind.TSX : ts.ScriptKind.TS);
|
|
144
|
+
const edits = [];
|
|
145
|
+
for (const declaration of collectExportedDeclarations(sf)) {
|
|
146
|
+
const edit = makeDeclarationSinceLine(declaration, sf, sourceText, version);
|
|
147
|
+
if (edit) {
|
|
148
|
+
edits.push(edit);
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
if (edits.length > 0 && write) {
|
|
152
|
+
const updated = applyEditsDescending(sourceText, edits);
|
|
153
|
+
fs.writeFileSync(filePath, updated, "utf8");
|
|
154
|
+
}
|
|
155
|
+
return {
|
|
156
|
+
filePath,
|
|
157
|
+
taggedDeclarations: edits.length,
|
|
158
|
+
changed: edits.length > 0,
|
|
159
|
+
};
|
|
160
|
+
}
|
|
161
|
+
export function resolveNearestPackageVersion(targetPath, fs) {
|
|
162
|
+
const resolved = path.resolve(targetPath);
|
|
163
|
+
const startDir = fs.statSync(resolved).isDirectory() ? resolved : path.dirname(resolved);
|
|
164
|
+
let current = startDir;
|
|
165
|
+
while (true) {
|
|
166
|
+
const packageJsonPath = path.join(current, PACKAGE_JSON);
|
|
167
|
+
if (fs.existsSync(packageJsonPath)) {
|
|
168
|
+
const raw = fs.readFileSync(packageJsonPath, "utf8");
|
|
169
|
+
const version = JSON.parse(raw).version;
|
|
170
|
+
if (typeof version === "string" && version.length > 0) {
|
|
171
|
+
return version;
|
|
172
|
+
}
|
|
173
|
+
throw new Error(`Missing or invalid version in ${packageJsonPath}`);
|
|
174
|
+
}
|
|
175
|
+
const parent = path.dirname(current);
|
|
176
|
+
if (parent === current) {
|
|
177
|
+
break;
|
|
178
|
+
}
|
|
179
|
+
current = parent;
|
|
180
|
+
}
|
|
181
|
+
throw new Error(`Unable to locate ${PACKAGE_JSON} from target: ${targetPath}`);
|
|
182
|
+
}
|
|
183
|
+
export function runTagOnTarget(targetPath, opts, fs, typeScriptTreeWalk) {
|
|
184
|
+
const resolvedTarget = path.resolve(targetPath);
|
|
185
|
+
const version = resolveNearestPackageVersion(resolvedTarget, fs);
|
|
186
|
+
const files = fs.statSync(resolvedTarget).isDirectory()
|
|
187
|
+
? typeScriptTreeWalk.walkTsxFiles(resolvedTarget, fs)
|
|
188
|
+
: [resolvedTarget];
|
|
189
|
+
const tsFiles = files.filter((filePath) => filePath.endsWith(".ts") || filePath.endsWith(".tsx"));
|
|
190
|
+
const fileResults = tsFiles.map((filePath) => applySinceTagsToFile(filePath, version, fs, opts.write));
|
|
191
|
+
const filesChanged = fileResults.filter((result) => result.changed).length;
|
|
192
|
+
const taggedDeclarations = fileResults.reduce((sum, result) => sum + result.taggedDeclarations, 0);
|
|
193
|
+
return {
|
|
194
|
+
version,
|
|
195
|
+
filesScanned: tsFiles.length,
|
|
196
|
+
filesChanged,
|
|
197
|
+
taggedDeclarations,
|
|
198
|
+
fileResults,
|
|
199
|
+
};
|
|
200
|
+
}
|
|
201
|
+
async function runTagOnAfterWriteHook(hook, modifiedFiles) {
|
|
202
|
+
if (!hook || modifiedFiles.length === 0) {
|
|
203
|
+
return null;
|
|
204
|
+
}
|
|
205
|
+
try {
|
|
206
|
+
await hook({ files: modifiedFiles });
|
|
207
|
+
return null;
|
|
208
|
+
}
|
|
209
|
+
catch (caughtHookError) {
|
|
210
|
+
return `[tag] onAfterWrite hook failed: ${messageFromCaughtUnknown(caughtHookError)}`;
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
function summarizeVersions(targetResults) {
|
|
214
|
+
const distinctVersions = extractDistinctVersions(targetResults);
|
|
215
|
+
if (distinctVersions.size === 0) {
|
|
216
|
+
return "none";
|
|
217
|
+
}
|
|
218
|
+
if (distinctVersions.size > 1) {
|
|
219
|
+
return "mixed";
|
|
220
|
+
}
|
|
221
|
+
return [...distinctVersions][0];
|
|
222
|
+
}
|
|
223
|
+
function extractDistinctVersions(targetResults) {
|
|
224
|
+
return new Set(targetResults
|
|
225
|
+
.map((targetResult) => targetResult.result?.version)
|
|
226
|
+
.filter((version) => typeof version === "string" && version.length > 0));
|
|
227
|
+
}
|
|
228
|
+
function chooseWorkspacePackageTargetPath(candidate, fs) {
|
|
229
|
+
if (candidate.source !== "workspace-package") {
|
|
230
|
+
return {
|
|
231
|
+
targetPath: candidate.candidatePath,
|
|
232
|
+
source: candidate.source,
|
|
233
|
+
};
|
|
234
|
+
}
|
|
235
|
+
const preferredSourceDir = path.join(candidate.candidatePath, "src");
|
|
236
|
+
if (fs.existsSync(preferredSourceDir) && fs.statSync(preferredSourceDir).isDirectory()) {
|
|
237
|
+
return {
|
|
238
|
+
targetPath: preferredSourceDir,
|
|
239
|
+
source: "workspace-package-selected-src",
|
|
240
|
+
};
|
|
241
|
+
}
|
|
242
|
+
return {
|
|
243
|
+
targetPath: candidate.candidatePath,
|
|
244
|
+
source: "workspace-package-selected-root",
|
|
245
|
+
};
|
|
246
|
+
}
|
|
247
|
+
function resolveTargetSelection(candidate, rootDir, fs) {
|
|
248
|
+
const selectedTarget = chooseWorkspacePackageTargetPath(candidate, fs);
|
|
249
|
+
const rootRelativeTargetPath = path
|
|
250
|
+
.relative(rootDir, selectedTarget.targetPath)
|
|
251
|
+
.split(path.sep)
|
|
252
|
+
.join("/");
|
|
253
|
+
return {
|
|
254
|
+
targetPath: selectedTarget.targetPath,
|
|
255
|
+
rootRelativeTargetPath: rootRelativeTargetPath || ".",
|
|
256
|
+
source: selectedTarget.source,
|
|
257
|
+
packageDir: candidate.packageDir,
|
|
258
|
+
packageName: candidate.packageName,
|
|
259
|
+
};
|
|
260
|
+
}
|
|
261
|
+
function filterSkippedCandidates(targetCandidates, skipPackages) {
|
|
262
|
+
if (!skipPackages || skipPackages.length === 0) {
|
|
263
|
+
return {
|
|
264
|
+
includedCandidates: targetCandidates,
|
|
265
|
+
skippedPackages: [],
|
|
266
|
+
};
|
|
267
|
+
}
|
|
268
|
+
const skipPackageSet = new Set(skipPackages);
|
|
269
|
+
const includedCandidates = [];
|
|
270
|
+
const skippedPackages = [];
|
|
271
|
+
for (const candidate of targetCandidates) {
|
|
272
|
+
const packageName = candidate.packageName;
|
|
273
|
+
if (packageName && skipPackageSet.has(packageName)) {
|
|
274
|
+
skippedPackages.push(packageName);
|
|
275
|
+
continue;
|
|
276
|
+
}
|
|
277
|
+
includedCandidates.push(candidate);
|
|
278
|
+
}
|
|
279
|
+
return { includedCandidates, skippedPackages };
|
|
280
|
+
}
|
|
281
|
+
async function runOnResolvedTarget(resolvedTarget, write, fs, typeScriptTreeWalk, listener) {
|
|
282
|
+
listener?.onTargetStarted(resolvedTarget);
|
|
283
|
+
const absoluteTargetPath = path.resolve(resolvedTarget.targetPath);
|
|
284
|
+
if (!fs.existsSync(absoluteTargetPath)) {
|
|
285
|
+
const missingTargetResult = {
|
|
286
|
+
target: resolvedTarget,
|
|
287
|
+
targetExists: false,
|
|
288
|
+
runError: `Not found: ${absoluteTargetPath}`,
|
|
289
|
+
result: null,
|
|
290
|
+
};
|
|
291
|
+
listener?.onTargetCompleted(resolvedTarget, missingTargetResult);
|
|
292
|
+
return missingTargetResult;
|
|
293
|
+
}
|
|
294
|
+
try {
|
|
295
|
+
const runResult = runTagOnTarget(absoluteTargetPath, { write }, fs, typeScriptTreeWalk);
|
|
296
|
+
const targetRunResult = {
|
|
297
|
+
target: resolvedTarget,
|
|
298
|
+
targetExists: true,
|
|
299
|
+
runError: null,
|
|
300
|
+
result: runResult,
|
|
301
|
+
};
|
|
302
|
+
listener?.onTargetCompleted(resolvedTarget, targetRunResult);
|
|
303
|
+
return targetRunResult;
|
|
304
|
+
}
|
|
305
|
+
catch (caughtRunError) {
|
|
306
|
+
const failedTargetRunResult = {
|
|
307
|
+
target: resolvedTarget,
|
|
308
|
+
targetExists: true,
|
|
309
|
+
runError: messageFromCaughtUnknown(caughtRunError),
|
|
310
|
+
result: null,
|
|
311
|
+
};
|
|
312
|
+
listener?.onTargetCompleted(resolvedTarget, failedTargetRunResult);
|
|
313
|
+
return failedTargetRunResult;
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
/**
|
|
317
|
+
* CLI entry: run tagging and optional `onAfterWrite` using config injected by the command layer.
|
|
318
|
+
* Returns structured execution data; presentation/logging belongs to command layer.
|
|
319
|
+
*/
|
|
320
|
+
export async function runTagSync(input, deps) {
|
|
321
|
+
try {
|
|
322
|
+
const { fs, targetResolver, typeScriptTreeWalk } = deps;
|
|
323
|
+
const tagConfig = input.config;
|
|
324
|
+
const targetCandidates = await targetResolver.resolveTagTargetCandidates(input.rootDir, input.targetPath, fs);
|
|
325
|
+
const { includedCandidates, skippedPackages } = filterSkippedCandidates(targetCandidates, input.skipPackages);
|
|
326
|
+
const selectedTargets = includedCandidates.map((candidate) => resolveTargetSelection(candidate, input.rootDir, fs));
|
|
327
|
+
const targetResults = await Promise.all(selectedTargets.map((resolvedTarget) => runOnResolvedTarget(resolvedTarget, input.write, fs, typeScriptTreeWalk, input.listener)));
|
|
328
|
+
const allFileResults = targetResults.flatMap((targetResult) => targetResult.result?.fileResults ?? []);
|
|
329
|
+
const filesScanned = targetResults.reduce((sum, targetResult) => sum + (targetResult.result?.filesScanned ?? 0), 0);
|
|
330
|
+
const filesChanged = targetResults.reduce((sum, targetResult) => sum + (targetResult.result?.filesChanged ?? 0), 0);
|
|
331
|
+
const taggedDeclarations = targetResults.reduce((sum, targetResult) => sum + (targetResult.result?.taggedDeclarations ?? 0), 0);
|
|
332
|
+
const modifiedFiles = allFileResults
|
|
333
|
+
.filter((entry) => entry.changed)
|
|
334
|
+
.map((entry) => entry.filePath);
|
|
335
|
+
const hookError = input.write && modifiedFiles.length > 0
|
|
336
|
+
? await runTagOnAfterWriteHook(tagConfig?.onAfterWrite, modifiedFiles)
|
|
337
|
+
: null;
|
|
338
|
+
const distinctVersions = [...extractDistinctVersions(targetResults)].sort((left, right) => left.localeCompare(right));
|
|
339
|
+
return ok({
|
|
340
|
+
mode: input.write ? "applied" : "dry-run",
|
|
341
|
+
selectedTargets,
|
|
342
|
+
resolvedTargets: selectedTargets,
|
|
343
|
+
skippedPackages,
|
|
344
|
+
targetResults,
|
|
345
|
+
filesScanned,
|
|
346
|
+
filesChanged,
|
|
347
|
+
taggedDeclarations,
|
|
348
|
+
versionSummary: summarizeVersions(targetResults),
|
|
349
|
+
distinctVersions,
|
|
350
|
+
modifiedFiles,
|
|
351
|
+
hookError,
|
|
352
|
+
});
|
|
353
|
+
}
|
|
354
|
+
catch (caughtError) {
|
|
355
|
+
return err(appError("INFRA_FAILURE", messageFromCaughtUnknown(caughtError), caughtError));
|
|
356
|
+
}
|
|
357
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
export type TagFileResult = {
|
|
2
|
+
filePath: string;
|
|
3
|
+
taggedDeclarations: number;
|
|
4
|
+
changed: boolean;
|
|
5
|
+
};
|
|
6
|
+
export type TagRunResult = {
|
|
7
|
+
version: string;
|
|
8
|
+
filesScanned: number;
|
|
9
|
+
filesChanged: number;
|
|
10
|
+
taggedDeclarations: number;
|
|
11
|
+
fileResults: TagFileResult[];
|
|
12
|
+
};
|
|
13
|
+
export type TagRunOptions = {
|
|
14
|
+
write: boolean;
|
|
15
|
+
};
|
|
16
|
+
export type TagTargetCandidateSource = "explicit-target" | "workspace-package" | "repo-src-fallback";
|
|
17
|
+
export type TagTargetSource = "explicit-target" | "workspace-package-selected-src" | "workspace-package-selected-root" | "repo-src-fallback";
|
|
18
|
+
export type TagTargetCandidate = {
|
|
19
|
+
candidatePath: string;
|
|
20
|
+
rootRelativeCandidatePath: string;
|
|
21
|
+
source: TagTargetCandidateSource;
|
|
22
|
+
packageDir: string | null;
|
|
23
|
+
packageName: string | null;
|
|
24
|
+
};
|
|
25
|
+
export type TagResolvedTarget = {
|
|
26
|
+
targetPath: string;
|
|
27
|
+
rootRelativeTargetPath: string;
|
|
28
|
+
source: TagTargetSource;
|
|
29
|
+
packageDir: string | null;
|
|
30
|
+
packageName: string | null;
|
|
31
|
+
};
|
|
32
|
+
export type TagTargetExecutionResult = {
|
|
33
|
+
target: TagResolvedTarget;
|
|
34
|
+
targetExists: boolean;
|
|
35
|
+
runError: string | null;
|
|
36
|
+
result: TagRunResult | null;
|
|
37
|
+
};
|
|
38
|
+
export interface TagProgressListener {
|
|
39
|
+
onTargetStarted: (target: TagResolvedTarget) => void;
|
|
40
|
+
onTargetCompleted: (target: TagResolvedTarget, result: TagTargetExecutionResult) => void;
|
|
41
|
+
}
|
|
42
|
+
export type TagSyncResult = {
|
|
43
|
+
mode: "applied" | "dry-run";
|
|
44
|
+
selectedTargets: TagResolvedTarget[];
|
|
45
|
+
resolvedTargets: TagResolvedTarget[];
|
|
46
|
+
skippedPackages: string[];
|
|
47
|
+
targetResults: TagTargetExecutionResult[];
|
|
48
|
+
filesScanned: number;
|
|
49
|
+
filesChanged: number;
|
|
50
|
+
taggedDeclarations: number;
|
|
51
|
+
versionSummary: string;
|
|
52
|
+
distinctVersions: string[];
|
|
53
|
+
modifiedFiles: string[];
|
|
54
|
+
hookError: string | null;
|
|
55
|
+
};
|
|
56
|
+
//# sourceMappingURL=types.domain.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.domain.d.ts","sourceRoot":"","sources":["../../../../src/lib/tag/domain/types.domain.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,aAAa,GAAG;IAC1B,QAAQ,EAAE,MAAM,CAAC;IACjB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,OAAO,EAAE,OAAO,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG;IACzB,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;IACrB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,WAAW,EAAE,aAAa,EAAE,CAAC;CAC9B,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG;IAC1B,KAAK,EAAE,OAAO,CAAC;CAChB,CAAC;AAEF,MAAM,MAAM,wBAAwB,GAChC,iBAAiB,GACjB,mBAAmB,GACnB,mBAAmB,CAAC;AAExB,MAAM,MAAM,eAAe,GACvB,iBAAiB,GACjB,gCAAgC,GAChC,iCAAiC,GACjC,mBAAmB,CAAC;AAExB,MAAM,MAAM,kBAAkB,GAAG;IAC/B,aAAa,EAAE,MAAM,CAAC;IACtB,yBAAyB,EAAE,MAAM,CAAC;IAClC,MAAM,EAAE,wBAAwB,CAAC;IACjC,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;CAC5B,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,UAAU,EAAE,MAAM,CAAC;IACnB,sBAAsB,EAAE,MAAM,CAAC;IAC/B,MAAM,EAAE,eAAe,CAAC;IACxB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;CAC5B,CAAC;AAEF,MAAM,MAAM,wBAAwB,GAAG;IACrC,MAAM,EAAE,iBAAiB,CAAC;IAC1B,YAAY,EAAE,OAAO,CAAC;IACtB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,MAAM,EAAE,YAAY,GAAG,IAAI,CAAC;CAC7B,CAAC;AAEF,MAAM,WAAW,mBAAmB;IAClC,eAAe,EAAE,CAAC,MAAM,EAAE,iBAAiB,KAAK,IAAI,CAAC;IACrD,iBAAiB,EAAE,CAAC,MAAM,EAAE,iBAAiB,EAAE,MAAM,EAAE,wBAAwB,KAAK,IAAI,CAAC;CAC1F;AAED,MAAM,MAAM,aAAa,GAAG;IAC1B,IAAI,EAAE,SAAS,GAAG,SAAS,CAAC;IAC5B,eAAe,EAAE,iBAAiB,EAAE,CAAC;IACrC,eAAe,EAAE,iBAAiB,EAAE,CAAC;IACrC,eAAe,EAAE,MAAM,EAAE,CAAC;IAC1B,aAAa,EAAE,wBAAwB,EAAE,CAAC;IAC1C,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;IACrB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,cAAc,EAAE,MAAM,CAAC;IACvB,gBAAgB,EAAE,MAAM,EAAE,CAAC;IAC3B,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;CAC1B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { CliFs } from "#lib/core/application/ports/cli-io.port";
|
|
2
|
+
import { resolveNearestPackageVersion, runTagSync } from "#lib/tag/application/use-cases/run-tag-sync.use-case";
|
|
3
|
+
import type { TagRunOptions, TagRunResult } from "#lib/tag/domain/types.domain";
|
|
4
|
+
export { createNodeCliFs, createNodeCliLogger } from "#lib/infra/node-io.adapter";
|
|
5
|
+
/** Default composition: uses the shared TS/TSX tree walk adapter. */
|
|
6
|
+
export declare function runTagOnTarget(targetPath: string, opts: TagRunOptions, fs: CliFs): TagRunResult;
|
|
7
|
+
export { runTagSync, resolveNearestPackageVersion };
|
|
8
|
+
export type { TagSyncExecutionInput, TagSyncRunDeps, } from "#lib/tag/application/use-cases/run-tag-sync.use-case";
|
|
9
|
+
export { tagTargetResolverAdapter } from "#lib/tag/infra/tag-target-resolver.adapter";
|
|
10
|
+
export type { TagFileResult, TagProgressListener, TagResolvedTarget, TagRunOptions, TagRunResult, TagSyncResult, TagTargetExecutionResult, } from "#lib/tag/domain/types.domain";
|
|
11
|
+
export type { TagSyncOptions } from "#lib/tag/infra/tag-sync-cli-options.adapter";
|
|
12
|
+
export { createTagProgressListener, formatProgress, formatSummary, formatTargetTable, formatWarningsAndErrors, } from "#lib/tag/presentation/tag-sync.presenter";
|
|
13
|
+
export type { TagProgressEvent } from "#lib/tag/presentation/tag-sync.presenter";
|
|
14
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lib/tag/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,yCAAyC,CAAC;AACrE,OAAO,EACL,4BAA4B,EAE5B,UAAU,EACX,MAAM,sDAAsD,CAAC;AAC9D,OAAO,KAAK,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAGhF,OAAO,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAElF,qEAAqE;AACrE,wBAAgB,cAAc,CAAC,UAAU,EAAE,MAAM,EAAE,IAAI,EAAE,aAAa,EAAE,EAAE,EAAE,KAAK,GAAG,YAAY,CAE/F;AAED,OAAO,EAAE,UAAU,EAAE,4BAA4B,EAAE,CAAC;AACpD,YAAY,EACV,qBAAqB,EACrB,cAAc,GACf,MAAM,sDAAsD,CAAC;AAC9D,OAAO,EAAE,wBAAwB,EAAE,MAAM,4CAA4C,CAAC;AACtF,YAAY,EACV,aAAa,EACb,mBAAmB,EACnB,iBAAiB,EACjB,aAAa,EACb,YAAY,EACZ,aAAa,EACb,wBAAwB,GACzB,MAAM,8BAA8B,CAAC;AACtC,YAAY,EAAE,cAAc,EAAE,MAAM,6CAA6C,CAAC;AAClF,OAAO,EACL,yBAAyB,EACzB,cAAc,EACd,aAAa,EACb,iBAAiB,EACjB,uBAAuB,GACxB,MAAM,0CAA0C,CAAC;AAClD,YAAY,EAAE,gBAAgB,EAAE,MAAM,0CAA0C,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { resolveNearestPackageVersion, runTagOnTarget as runTagOnTargetWithTreeWalk, runTagSync, } from "#lib/tag/application/use-cases/run-tag-sync.use-case";
|
|
2
|
+
import { tagTypeScriptTreeWalkAdapter } from "#lib/tag/infra/typescript-tree-walk.adapter";
|
|
3
|
+
export { createNodeCliFs, createNodeCliLogger } from "#lib/infra/node-io.adapter";
|
|
4
|
+
/** Default composition: uses the shared TS/TSX tree walk adapter. */
|
|
5
|
+
export function runTagOnTarget(targetPath, opts, fs) {
|
|
6
|
+
return runTagOnTargetWithTreeWalk(targetPath, opts, fs, tagTypeScriptTreeWalkAdapter);
|
|
7
|
+
}
|
|
8
|
+
export { runTagSync, resolveNearestPackageVersion };
|
|
9
|
+
export { tagTargetResolverAdapter } from "#lib/tag/infra/tag-target-resolver.adapter";
|
|
10
|
+
export { createTagProgressListener, formatProgress, formatSummary, formatTargetTable, formatWarningsAndErrors, } from "#lib/tag/presentation/tag-sync.presenter";
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { CodefastTagConfig } from "#lib/config/domain/schema.domain";
|
|
2
|
+
import type { CliFs } from "#lib/infra/fs-contract.port";
|
|
3
|
+
import type { TagProgressListener } from "#lib/tag/domain/types.domain";
|
|
4
|
+
/** CLI / container wiring: filesystem injected at the boundary. */
|
|
5
|
+
export type TagSyncOptions = {
|
|
6
|
+
rootDir: string;
|
|
7
|
+
config?: CodefastTagConfig;
|
|
8
|
+
skipPackages?: string[];
|
|
9
|
+
targetPath?: string;
|
|
10
|
+
write: boolean;
|
|
11
|
+
fs: CliFs;
|
|
12
|
+
listener?: TagProgressListener;
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=tag-sync-cli-options.adapter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tag-sync-cli-options.adapter.d.ts","sourceRoot":"","sources":["../../../../src/lib/tag/infra/tag-sync-cli-options.adapter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AAC1E,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AACzD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AAExE,mEAAmE;AACnE,MAAM,MAAM,cAAc,GAAG;IAC3B,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,iBAAiB,CAAC;IAC3B,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,OAAO,CAAC;IACf,EAAE,EAAE,KAAK,CAAC;IACV,QAAQ,CAAC,EAAE,mBAAmB,CAAC;CAChC,CAAC"}
|