@axm.sh/cli 0.0.7 → 0.0.9
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/dist/src/agents/detection.d.ts +3 -16
- package/dist/src/agents/detection.d.ts.map +1 -1
- package/dist/src/agents/detection.js +4 -13
- package/dist/src/agents/detection.js.map +1 -1
- package/dist/src/agents/index.d.ts +1 -1
- package/dist/src/agents/index.d.ts.map +1 -1
- package/dist/src/agents/index.js +1 -1
- package/dist/src/agents/index.js.map +1 -1
- package/dist/src/cli-commands/init/handler.d.ts +1 -1
- package/dist/src/cli-commands/init/handler.d.ts.map +1 -1
- package/dist/src/cli-commands/init/handler.js +1 -1
- package/dist/src/cli-commands/init/handler.js.map +1 -1
- package/dist/src/cli-commands/skills/command.d.ts.map +1 -1
- package/dist/src/cli-commands/skills/command.js +6 -0
- package/dist/src/cli-commands/skills/command.js.map +1 -1
- package/dist/src/cli-commands/skills/constants.d.ts +9 -0
- package/dist/src/cli-commands/skills/constants.d.ts.map +1 -0
- package/dist/src/cli-commands/skills/constants.js +9 -0
- package/dist/src/cli-commands/skills/constants.js.map +1 -0
- package/dist/src/cli-commands/skills/copy-skill.d.ts +1 -1
- package/dist/src/cli-commands/skills/copy-skill.d.ts.map +1 -1
- package/dist/src/cli-commands/skills/copy-skill.js +11 -24
- package/dist/src/cli-commands/skills/copy-skill.js.map +1 -1
- package/dist/src/cli-commands/skills/disable/command.d.ts +15 -0
- package/dist/src/cli-commands/skills/disable/command.d.ts.map +1 -0
- package/dist/src/cli-commands/skills/disable/command.js +56 -0
- package/dist/src/cli-commands/skills/disable/command.js.map +1 -0
- package/dist/src/cli-commands/skills/disable/disable-skill.d.ts +25 -0
- package/dist/src/cli-commands/skills/disable/disable-skill.d.ts.map +1 -0
- package/dist/src/cli-commands/skills/disable/disable-skill.js +101 -0
- package/dist/src/cli-commands/skills/disable/disable-skill.js.map +1 -0
- package/dist/src/cli-commands/skills/disable/handler.d.ts +18 -0
- package/dist/src/cli-commands/skills/disable/handler.d.ts.map +1 -0
- package/dist/src/cli-commands/skills/disable/handler.js +72 -0
- package/dist/src/cli-commands/skills/disable/handler.js.map +1 -0
- package/dist/src/cli-commands/skills/enable/command.d.ts +15 -0
- package/dist/src/cli-commands/skills/enable/command.d.ts.map +1 -0
- package/dist/src/cli-commands/skills/enable/command.js +56 -0
- package/dist/src/cli-commands/skills/enable/command.js.map +1 -0
- package/dist/src/cli-commands/skills/enable/enable-skill.d.ts +26 -0
- package/dist/src/cli-commands/skills/enable/enable-skill.d.ts.map +1 -0
- package/dist/src/cli-commands/skills/enable/enable-skill.js +138 -0
- package/dist/src/cli-commands/skills/enable/enable-skill.js.map +1 -0
- package/dist/src/cli-commands/skills/enable/handler.d.ts +18 -0
- package/dist/src/cli-commands/skills/enable/handler.d.ts.map +1 -0
- package/dist/src/cli-commands/skills/enable/handler.js +72 -0
- package/dist/src/cli-commands/skills/enable/handler.js.map +1 -0
- package/dist/src/cli-commands/skills/fork/handler.d.ts +4 -13
- package/dist/src/cli-commands/skills/fork/handler.d.ts.map +1 -1
- package/dist/src/cli-commands/skills/fork/handler.js +37 -29
- package/dist/src/cli-commands/skills/fork/handler.js.map +1 -1
- package/dist/src/cli-commands/skills/fs-helpers.d.ts +12 -0
- package/dist/src/cli-commands/skills/fs-helpers.d.ts.map +1 -0
- package/dist/src/cli-commands/skills/fs-helpers.js +12 -0
- package/dist/src/cli-commands/skills/fs-helpers.js.map +1 -0
- package/dist/src/cli-commands/skills/install/discover-skills.d.ts +3 -18
- package/dist/src/cli-commands/skills/install/discover-skills.d.ts.map +1 -1
- package/dist/src/cli-commands/skills/install/discover-skills.js +7 -20
- package/dist/src/cli-commands/skills/install/discover-skills.js.map +1 -1
- package/dist/src/cli-commands/skills/install/handler.d.ts +1 -16
- package/dist/src/cli-commands/skills/install/handler.d.ts.map +1 -1
- package/dist/src/cli-commands/skills/install/handler.js +20 -27
- package/dist/src/cli-commands/skills/install/handler.js.map +1 -1
- package/dist/src/cli-commands/skills/install/install-skill.d.ts +1 -1
- package/dist/src/cli-commands/skills/install/install-skill.d.ts.map +1 -1
- package/dist/src/cli-commands/skills/install/install-skill.js +12 -18
- package/dist/src/cli-commands/skills/install/install-skill.js.map +1 -1
- package/dist/src/cli-commands/skills/install/select-skills.d.ts +4 -5
- package/dist/src/cli-commands/skills/install/select-skills.d.ts.map +1 -1
- package/dist/src/cli-commands/skills/install/select-skills.js +13 -13
- package/dist/src/cli-commands/skills/install/select-skills.js.map +1 -1
- package/dist/src/cli-commands/skills/install/skill-utils.d.ts +1 -6
- package/dist/src/cli-commands/skills/install/skill-utils.d.ts.map +1 -1
- package/dist/src/cli-commands/skills/install/skill-utils.js +8 -4
- package/dist/src/cli-commands/skills/install/skill-utils.js.map +1 -1
- package/dist/src/cli-commands/skills/list/handler.d.ts +1 -1
- package/dist/src/cli-commands/skills/list/handler.d.ts.map +1 -1
- package/dist/src/cli-commands/skills/list/handler.js +1 -1
- package/dist/src/cli-commands/skills/list/handler.js.map +1 -1
- package/dist/src/cli-commands/skills/naming.d.ts +17 -0
- package/dist/src/cli-commands/skills/naming.d.ts.map +1 -0
- package/dist/src/cli-commands/skills/naming.js +20 -0
- package/dist/src/cli-commands/skills/naming.js.map +1 -0
- package/dist/src/cli-commands/skills/operations.d.ts +25 -1
- package/dist/src/cli-commands/skills/operations.d.ts.map +1 -1
- package/dist/src/cli-commands/skills/publish/handler.d.ts +1 -10
- package/dist/src/cli-commands/skills/publish/handler.d.ts.map +1 -1
- package/dist/src/cli-commands/skills/publish/handler.js +31 -47
- package/dist/src/cli-commands/skills/publish/handler.js.map +1 -1
- package/dist/src/cli-commands/skills/publish-skill.d.ts +1 -1
- package/dist/src/cli-commands/skills/publish-skill.d.ts.map +1 -1
- package/dist/src/cli-commands/skills/publish-skill.js +37 -52
- package/dist/src/cli-commands/skills/publish-skill.js.map +1 -1
- package/dist/src/cli-commands/skills/rename/command.d.ts +16 -0
- package/dist/src/cli-commands/skills/rename/command.d.ts.map +1 -0
- package/dist/src/cli-commands/skills/rename/command.js +62 -0
- package/dist/src/cli-commands/skills/rename/command.js.map +1 -0
- package/dist/src/cli-commands/skills/rename/handler.d.ts +20 -0
- package/dist/src/cli-commands/skills/rename/handler.d.ts.map +1 -0
- package/dist/src/cli-commands/skills/rename/handler.js +77 -0
- package/dist/src/cli-commands/skills/rename/handler.js.map +1 -0
- package/dist/src/cli-commands/skills/rename/rename-skill.d.ts +25 -0
- package/dist/src/cli-commands/skills/rename/rename-skill.d.ts.map +1 -0
- package/dist/src/cli-commands/skills/rename/rename-skill.js +125 -0
- package/dist/src/cli-commands/skills/rename/rename-skill.js.map +1 -0
- package/dist/src/cli-commands/skills/uninstall/handler.d.ts +1 -1
- package/dist/src/cli-commands/skills/uninstall/handler.d.ts.map +1 -1
- package/dist/src/cli-commands/skills/uninstall/handler.js +12 -1
- package/dist/src/cli-commands/skills/uninstall/handler.js.map +1 -1
- package/dist/src/cli-commands/skills/uninstall/uninstall-skill.d.ts +1 -1
- package/dist/src/cli-commands/skills/uninstall/uninstall-skill.d.ts.map +1 -1
- package/dist/src/cli-commands/skills/uninstall/uninstall-skill.js +14 -23
- package/dist/src/cli-commands/skills/uninstall/uninstall-skill.js.map +1 -1
- package/dist/src/cli-commands/skills/update/build-plan.d.ts +7 -2
- package/dist/src/cli-commands/skills/update/build-plan.d.ts.map +1 -1
- package/dist/src/cli-commands/skills/update/build-plan.js +28 -20
- package/dist/src/cli-commands/skills/update/build-plan.js.map +1 -1
- package/dist/src/cli-commands/skills/update/handler.d.ts +11 -20
- package/dist/src/cli-commands/skills/update/handler.d.ts.map +1 -1
- package/dist/src/cli-commands/skills/update/handler.js +161 -90
- package/dist/src/cli-commands/skills/update/handler.js.map +1 -1
- package/dist/src/cli-commands/skills/utils.d.ts +2 -16
- package/dist/src/cli-commands/skills/utils.d.ts.map +1 -1
- package/dist/src/cli-commands/skills/utils.js +36 -20
- package/dist/src/cli-commands/skills/utils.js.map +1 -1
- package/dist/src/cli-error/cli-error.d.ts +21 -0
- package/dist/src/cli-error/cli-error.d.ts.map +1 -0
- package/dist/src/cli-error/cli-error.js +12 -0
- package/dist/src/cli-error/cli-error.js.map +1 -0
- package/dist/src/cli-error/index.d.ts +3 -0
- package/dist/src/cli-error/index.d.ts.map +1 -0
- package/dist/src/cli-error/index.js +3 -0
- package/dist/src/cli-error/index.js.map +1 -0
- package/dist/src/cli-error/render.d.ts +4 -0
- package/dist/src/cli-error/render.d.ts.map +1 -0
- package/dist/src/cli-error/render.js +25 -0
- package/dist/src/cli-error/render.js.map +1 -0
- package/dist/src/extensions/skills/index.d.ts +0 -5
- package/dist/src/extensions/skills/index.d.ts.map +1 -1
- package/dist/src/extensions/skills/index.js +1 -4
- package/dist/src/extensions/skills/index.js.map +1 -1
- package/dist/src/extensions/skills/state/index.d.ts +2 -2
- package/dist/src/extensions/skills/state/index.d.ts.map +1 -1
- package/dist/src/extensions/skills/state/index.js +1 -1
- package/dist/src/extensions/skills/state/index.js.map +1 -1
- package/dist/src/extensions/skills/state/pure-functions.d.ts +4 -29
- package/dist/src/extensions/skills/state/pure-functions.d.ts.map +1 -1
- package/dist/src/extensions/skills/state/pure-functions.js +4 -37
- package/dist/src/extensions/skills/state/pure-functions.js.map +1 -1
- package/dist/src/extensions/skills/state/types.d.ts +0 -1
- package/dist/src/extensions/skills/state/types.d.ts.map +1 -1
- package/dist/src/extensions/skills/state/types.js.map +1 -1
- package/dist/src/extensions/skills/types.d.ts +0 -40
- package/dist/src/extensions/skills/types.d.ts.map +1 -1
- package/dist/src/extensions/skills/types.js +0 -1
- package/dist/src/extensions/skills/types.js.map +1 -1
- package/dist/src/git/errors.d.ts +1 -2
- package/dist/src/git/errors.d.ts.map +1 -1
- package/dist/src/git/errors.js +0 -1
- package/dist/src/git/errors.js.map +1 -1
- package/dist/src/git/index.d.ts +0 -1
- package/dist/src/git/index.d.ts.map +1 -1
- package/dist/src/git/index.js +0 -1
- package/dist/src/git/index.js.map +1 -1
- package/dist/src/git/operations.d.ts +7 -7
- package/dist/src/git/operations.d.ts.map +1 -1
- package/dist/src/git/operations.js +22 -19
- package/dist/src/git/operations.js.map +1 -1
- package/dist/src/lockfile/index.d.ts +1 -2
- package/dist/src/lockfile/index.d.ts.map +1 -1
- package/dist/src/lockfile/index.js +2 -1
- package/dist/src/lockfile/index.js.map +1 -1
- package/dist/src/lockfile/lockfile.d.ts +77 -51
- package/dist/src/lockfile/lockfile.d.ts.map +1 -1
- package/dist/src/lockfile/lockfile.js +27 -51
- package/dist/src/lockfile/lockfile.js.map +1 -1
- package/dist/src/resolution/index.d.ts +0 -1
- package/dist/src/resolution/index.d.ts.map +1 -1
- package/dist/src/resolution/index.js +0 -2
- package/dist/src/resolution/index.js.map +1 -1
- package/dist/src/resolution/resolver.d.ts +2 -2
- package/dist/src/resolution/resolver.d.ts.map +1 -1
- package/dist/src/resolution/resolver.js +1 -1
- package/dist/src/resolution/resolver.js.map +1 -1
- package/dist/src/resolution/resolvers/ambiguous.js +1 -1
- package/dist/src/resolution/resolvers/ambiguous.js.map +1 -1
- package/dist/src/resolution/resolvers/axm-name.d.ts.map +1 -1
- package/dist/src/resolution/resolvers/axm-name.js +1 -1
- package/dist/src/resolution/resolvers/axm-name.js.map +1 -1
- package/dist/src/resolution/resolvers/bare-name.js +1 -1
- package/dist/src/resolution/resolvers/bare-name.js.map +1 -1
- package/dist/src/resolution/resolvers/explicit-source.d.ts.map +1 -1
- package/dist/src/resolution/resolvers/explicit-source.js +1 -1
- package/dist/src/resolution/resolvers/explicit-source.js.map +1 -1
- package/dist/src/resolution/resolvers/local-path.d.ts.map +1 -1
- package/dist/src/resolution/resolvers/local-path.js +1 -1
- package/dist/src/resolution/resolvers/local-path.js.map +1 -1
- package/dist/src/resolution/resolvers/url.d.ts.map +1 -1
- package/dist/src/resolution/resolvers/url.js +1 -1
- package/dist/src/resolution/resolvers/url.js.map +1 -1
- package/dist/src/runtime/error-handling.d.ts +10 -0
- package/dist/src/runtime/error-handling.d.ts.map +1 -0
- package/dist/src/runtime/error-handling.js +10 -0
- package/dist/src/runtime/error-handling.js.map +1 -0
- package/dist/src/runtime/index.d.ts +5 -4
- package/dist/src/runtime/index.d.ts.map +1 -1
- package/dist/src/runtime/index.js +11 -4
- package/dist/src/runtime/index.js.map +1 -1
- package/dist/src/settings/format-preserving-json.d.ts +1 -2
- package/dist/src/settings/format-preserving-json.d.ts.map +1 -1
- package/dist/src/settings/format-preserving-json.js +7 -7
- package/dist/src/settings/format-preserving-json.js.map +1 -1
- package/dist/src/settings/index.d.ts +5 -4
- package/dist/src/settings/index.d.ts.map +1 -1
- package/dist/src/settings/index.js +4 -2
- package/dist/src/settings/index.js.map +1 -1
- package/dist/src/settings/schema.d.ts +48 -8
- package/dist/src/settings/schema.d.ts.map +1 -1
- package/dist/src/settings/schema.js +26 -7
- package/dist/src/settings/schema.js.map +1 -1
- package/dist/src/settings/settings.d.ts +10 -52
- package/dist/src/settings/settings.d.ts.map +1 -1
- package/dist/src/settings/settings.js +22 -48
- package/dist/src/settings/settings.js.map +1 -1
- package/dist/src/settings/skill-entry.d.ts +44 -0
- package/dist/src/settings/skill-entry.d.ts.map +1 -0
- package/dist/src/settings/skill-entry.js +58 -0
- package/dist/src/settings/skill-entry.js.map +1 -0
- package/dist/src/sources/azurerepos/repo-exists.d.ts +2 -2
- package/dist/src/sources/azurerepos/repo-exists.d.ts.map +1 -1
- package/dist/src/sources/azurerepos/repo-exists.js +9 -7
- package/dist/src/sources/azurerepos/repo-exists.js.map +1 -1
- package/dist/src/sources/azurerepos/scp.d.ts +1 -2
- package/dist/src/sources/azurerepos/scp.d.ts.map +1 -1
- package/dist/src/sources/azurerepos/scp.js +6 -2
- package/dist/src/sources/azurerepos/scp.js.map +1 -1
- package/dist/src/sources/azurerepos/url.d.ts +1 -2
- package/dist/src/sources/azurerepos/url.d.ts.map +1 -1
- package/dist/src/sources/azurerepos/url.js +11 -3
- package/dist/src/sources/azurerepos/url.js.map +1 -1
- package/dist/src/sources/bitbucket/resolve-repo.d.ts +2 -2
- package/dist/src/sources/bitbucket/resolve-repo.d.ts.map +1 -1
- package/dist/src/sources/bitbucket/resolve-repo.js +5 -4
- package/dist/src/sources/bitbucket/resolve-repo.js.map +1 -1
- package/dist/src/sources/bitbucket/scp.d.ts +1 -2
- package/dist/src/sources/bitbucket/scp.d.ts.map +1 -1
- package/dist/src/sources/bitbucket/scp.js +6 -2
- package/dist/src/sources/bitbucket/scp.js.map +1 -1
- package/dist/src/sources/bitbucket/shorthand.d.ts +1 -1
- package/dist/src/sources/bitbucket/shorthand.d.ts.map +1 -1
- package/dist/src/sources/bitbucket/url.d.ts +1 -2
- package/dist/src/sources/bitbucket/url.d.ts.map +1 -1
- package/dist/src/sources/bitbucket/url.js +11 -3
- package/dist/src/sources/bitbucket/url.js.map +1 -1
- package/dist/src/sources/clone-url.d.ts +3 -4
- package/dist/src/sources/clone-url.d.ts.map +1 -1
- package/dist/src/sources/clone-url.js +6 -6
- package/dist/src/sources/clone-url.js.map +1 -1
- package/dist/src/sources/github/api.d.ts +3 -21
- package/dist/src/sources/github/api.d.ts.map +1 -1
- package/dist/src/sources/github/api.js +16 -28
- package/dist/src/sources/github/api.js.map +1 -1
- package/dist/src/sources/github/index.d.ts +1 -1
- package/dist/src/sources/github/index.d.ts.map +1 -1
- package/dist/src/sources/github/index.js +1 -1
- package/dist/src/sources/github/index.js.map +1 -1
- package/dist/src/sources/github/resolve-repo.d.ts +2 -2
- package/dist/src/sources/github/resolve-repo.d.ts.map +1 -1
- package/dist/src/sources/github/resolve-repo.js +5 -4
- package/dist/src/sources/github/resolve-repo.js.map +1 -1
- package/dist/src/sources/github/scp.d.ts +1 -2
- package/dist/src/sources/github/scp.d.ts.map +1 -1
- package/dist/src/sources/github/scp.js +6 -2
- package/dist/src/sources/github/scp.js.map +1 -1
- package/dist/src/sources/github/shorthand.d.ts +1 -1
- package/dist/src/sources/github/shorthand.d.ts.map +1 -1
- package/dist/src/sources/github/url.d.ts +1 -2
- package/dist/src/sources/github/url.d.ts.map +1 -1
- package/dist/src/sources/github/url.js +11 -3
- package/dist/src/sources/github/url.js.map +1 -1
- package/dist/src/sources/gitlab/resolve-repo.d.ts +2 -2
- package/dist/src/sources/gitlab/resolve-repo.d.ts.map +1 -1
- package/dist/src/sources/gitlab/resolve-repo.js +5 -4
- package/dist/src/sources/gitlab/resolve-repo.js.map +1 -1
- package/dist/src/sources/gitlab/scp.d.ts +1 -2
- package/dist/src/sources/gitlab/scp.d.ts.map +1 -1
- package/dist/src/sources/gitlab/scp.js +6 -2
- package/dist/src/sources/gitlab/scp.js.map +1 -1
- package/dist/src/sources/gitlab/shorthand.d.ts +1 -1
- package/dist/src/sources/gitlab/shorthand.d.ts.map +1 -1
- package/dist/src/sources/gitlab/url.d.ts +1 -2
- package/dist/src/sources/gitlab/url.d.ts.map +1 -1
- package/dist/src/sources/gitlab/url.js +11 -3
- package/dist/src/sources/gitlab/url.js.map +1 -1
- package/dist/src/sources/index.d.ts +0 -4
- package/dist/src/sources/index.d.ts.map +1 -1
- package/dist/src/sources/index.js +2 -3
- package/dist/src/sources/index.js.map +1 -1
- package/dist/src/sources/local/parser.d.ts +2 -2
- package/dist/src/sources/local/parser.d.ts.map +1 -1
- package/dist/src/sources/local/parser.js.map +1 -1
- package/dist/src/sources/parse-provider-shorthand.d.ts +2 -3
- package/dist/src/sources/parse-provider-shorthand.d.ts.map +1 -1
- package/dist/src/sources/parse-provider-shorthand.js +7 -3
- package/dist/src/sources/parse-provider-shorthand.js.map +1 -1
- package/dist/src/sources/provider.d.ts +5 -44
- package/dist/src/sources/provider.d.ts.map +1 -1
- package/dist/src/sources/provider.js +12 -26
- package/dist/src/sources/provider.js.map +1 -1
- package/dist/src/sources/providers/azurerepos.js +7 -7
- package/dist/src/sources/providers/azurerepos.js.map +1 -1
- package/dist/src/sources/providers/git-hosting.d.ts +3 -3
- package/dist/src/sources/providers/git-hosting.d.ts.map +1 -1
- package/dist/src/sources/providers/git-hosting.js +14 -33
- package/dist/src/sources/providers/git-hosting.js.map +1 -1
- package/dist/src/sources/providers/git.js +7 -7
- package/dist/src/sources/providers/git.js.map +1 -1
- package/dist/src/sources/providers/local.d.ts.map +1 -1
- package/dist/src/sources/providers/local.js +7 -18
- package/dist/src/sources/providers/local.js.map +1 -1
- package/dist/src/sources/providers/registry.d.ts +5 -5
- package/dist/src/sources/providers/registry.d.ts.map +1 -1
- package/dist/src/sources/providers/registry.js +136 -92
- package/dist/src/sources/providers/registry.js.map +1 -1
- package/dist/src/sources/registry-guard.d.ts +2 -3
- package/dist/src/sources/registry-guard.d.ts.map +1 -1
- package/dist/src/sources/registry-guard.js +8 -6
- package/dist/src/sources/registry-guard.js.map +1 -1
- package/dist/src/sources/resolve-source.d.ts +3 -3
- package/dist/src/sources/resolve-source.d.ts.map +1 -1
- package/dist/src/sources/resolve-source.js +83 -49
- package/dist/src/sources/resolve-source.js.map +1 -1
- package/dist/src/sources/service.d.ts +3 -4
- package/dist/src/sources/service.d.ts.map +1 -1
- package/dist/src/sources/service.js +8 -5
- package/dist/src/sources/service.js.map +1 -1
- package/dist/src/tui/confirm/service.d.ts +2 -2
- package/dist/src/tui/confirm/service.d.ts.map +1 -1
- package/dist/src/tui/confirm/service.js.map +1 -1
- package/dist/src/tui/errors.d.ts +0 -9
- package/dist/src/tui/errors.d.ts.map +1 -1
- package/dist/src/tui/errors.js +0 -2
- package/dist/src/tui/errors.js.map +1 -1
- package/dist/src/tui/index.d.ts +1 -1
- package/dist/src/tui/index.d.ts.map +1 -1
- package/dist/src/tui/index.js +1 -1
- package/dist/src/tui/index.js.map +1 -1
- package/dist/src/tui/multiselect/service.d.ts +3 -2
- package/dist/src/tui/multiselect/service.d.ts.map +1 -1
- package/dist/src/tui/multiselect/service.js +7 -5
- package/dist/src/tui/multiselect/service.js.map +1 -1
- package/dist/src/tui/password-input/service.d.ts +3 -2
- package/dist/src/tui/password-input/service.d.ts.map +1 -1
- package/dist/src/tui/password-input/service.js +7 -5
- package/dist/src/tui/password-input/service.js.map +1 -1
- package/dist/src/tui/select/service.d.ts +3 -2
- package/dist/src/tui/select/service.d.ts.map +1 -1
- package/dist/src/tui/select/service.js +5 -5
- package/dist/src/tui/select/service.js.map +1 -1
- package/dist/src/tui/spinner/index.d.ts +1 -1
- package/dist/src/tui/spinner/index.d.ts.map +1 -1
- package/dist/src/tui/spinner/service.d.ts +1 -5
- package/dist/src/tui/spinner/service.d.ts.map +1 -1
- package/dist/src/tui/spinner/service.js +25 -12
- package/dist/src/tui/spinner/service.js.map +1 -1
- package/dist/src/tui/spinner/test.d.ts +3 -0
- package/dist/src/tui/spinner/test.d.ts.map +1 -1
- package/dist/src/tui/spinner/test.js +9 -0
- package/dist/src/tui/spinner/test.js.map +1 -1
- package/dist/src/tui/spinner/types.d.ts +5 -0
- package/dist/src/tui/spinner/types.d.ts.map +1 -1
- package/dist/src/tui/text-input/service.d.ts +2 -2
- package/dist/src/tui/text-input/service.d.ts.map +1 -1
- package/dist/src/tui/text-input/service.js.map +1 -1
- package/dist/src/utils/create-symlink.d.ts +1 -14
- package/dist/src/utils/create-symlink.d.ts.map +1 -1
- package/dist/src/utils/create-symlink.js +17 -15
- package/dist/src/utils/create-symlink.js.map +1 -1
- package/dist/src/utils/index.d.ts +1 -2
- package/dist/src/utils/index.d.ts.map +1 -1
- package/dist/src/utils/index.js +1 -2
- package/dist/src/utils/index.js.map +1 -1
- package/dist/src/workspace/apply-plan.d.ts +5 -17
- package/dist/src/workspace/apply-plan.d.ts.map +1 -1
- package/dist/src/workspace/apply-plan.js +3 -12
- package/dist/src/workspace/apply-plan.js.map +1 -1
- package/dist/src/workspace/ensure-agents.d.ts +2 -15
- package/dist/src/workspace/ensure-agents.d.ts.map +1 -1
- package/dist/src/workspace/ensure-agents.js +7 -15
- package/dist/src/workspace/ensure-agents.js.map +1 -1
- package/dist/src/workspace/errors.d.ts +1 -1
- package/dist/src/workspace/errors.d.ts.map +1 -1
- package/dist/src/workspace/index.d.ts +1 -2
- package/dist/src/workspace/index.d.ts.map +1 -1
- package/dist/src/workspace/index.js +1 -2
- package/dist/src/workspace/index.js.map +1 -1
- package/dist/src/workspace/service.d.ts +30 -23
- package/dist/src/workspace/service.d.ts.map +1 -1
- package/dist/src/workspace/service.js +105 -38
- package/dist/src/workspace/service.js.map +1 -1
- package/package.json +1 -1
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* @packageDocumentation
|
|
6
6
|
*/
|
|
7
7
|
import * as Effect from "effect/Effect";
|
|
8
|
-
import {
|
|
8
|
+
import { type CliError } from "../cli-error/index.js";
|
|
9
9
|
/**
|
|
10
10
|
* Clone a git repository to destination.
|
|
11
11
|
* If ref provided, checkout that ref after clone.
|
|
@@ -17,7 +17,7 @@ import { GitError } from "./errors.js";
|
|
|
17
17
|
*
|
|
18
18
|
* @experimental This API is unstable and may change without notice.
|
|
19
19
|
*/
|
|
20
|
-
export declare const cloneRepo: (url: string, destination: string, ref?: string) => Effect.Effect<void,
|
|
20
|
+
export declare const cloneRepo: (url: string, destination: string, ref?: string) => Effect.Effect<void, CliError, never>;
|
|
21
21
|
/**
|
|
22
22
|
* Shallow clone a git repository (depth 1, single branch).
|
|
23
23
|
* Significantly faster than a full clone for read-only use cases like skill discovery.
|
|
@@ -29,7 +29,7 @@ export declare const cloneRepo: (url: string, destination: string, ref?: string)
|
|
|
29
29
|
*
|
|
30
30
|
* @experimental This API is unstable and may change without notice.
|
|
31
31
|
*/
|
|
32
|
-
export declare const shallowClone: (url: string, destination: string, ref?: string) => Effect.Effect<
|
|
32
|
+
export declare const shallowClone: (url: string, destination: string, ref?: string) => Effect.Effect<string, CliError, never>;
|
|
33
33
|
/**
|
|
34
34
|
* Resolve a ref (tag, branch, SHA) to a full commit SHA.
|
|
35
35
|
*
|
|
@@ -39,7 +39,7 @@ export declare const shallowClone: (url: string, destination: string, ref?: stri
|
|
|
39
39
|
*
|
|
40
40
|
* @experimental This API is unstable and may change without notice.
|
|
41
41
|
*/
|
|
42
|
-
export declare const resolveRef: (repoPath: string, ref: string) => Effect.Effect<string,
|
|
42
|
+
export declare const resolveRef: (repoPath: string, ref: string) => Effect.Effect<string, CliError, never>;
|
|
43
43
|
/**
|
|
44
44
|
* Get the current HEAD commit SHA.
|
|
45
45
|
* Used after clone to record in lockfile.
|
|
@@ -49,7 +49,7 @@ export declare const resolveRef: (repoPath: string, ref: string) => Effect.Effec
|
|
|
49
49
|
*
|
|
50
50
|
* @experimental This API is unstable and may change without notice.
|
|
51
51
|
*/
|
|
52
|
-
export declare const getCurrentCommit: (repoPath: string) => Effect.Effect<string,
|
|
52
|
+
export declare const getCurrentCommit: (repoPath: string) => Effect.Effect<string, CliError, never>;
|
|
53
53
|
/**
|
|
54
54
|
* Get the git tree SHA for a path within a repository.
|
|
55
55
|
*
|
|
@@ -62,7 +62,7 @@ export declare const getCurrentCommit: (repoPath: string) => Effect.Effect<strin
|
|
|
62
62
|
*
|
|
63
63
|
* @experimental This API is unstable and may change without notice.
|
|
64
64
|
*/
|
|
65
|
-
export declare const getTreeSha: (repoPath: string, subPath?: string) => Effect.Effect<string,
|
|
65
|
+
export declare const getTreeSha: (repoPath: string, subPath?: string) => Effect.Effect<string, CliError, never>;
|
|
66
66
|
/**
|
|
67
67
|
* Check if a directory is within a git repository.
|
|
68
68
|
*
|
|
@@ -71,5 +71,5 @@ export declare const getTreeSha: (repoPath: string, subPath?: string) => Effect.
|
|
|
71
71
|
*
|
|
72
72
|
* @experimental This API is unstable and may change without notice.
|
|
73
73
|
*/
|
|
74
|
-
export declare const isGitRepository: (dirPath: string) => Effect.Effect<boolean, never>;
|
|
74
|
+
export declare const isGitRepository: (dirPath: string) => Effect.Effect<boolean, never, never>;
|
|
75
75
|
//# sourceMappingURL=operations.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"operations.d.ts","sourceRoot":"","sources":["../../../src/git/operations.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAIxC,OAAO,EAAE,QAAQ,
|
|
1
|
+
{"version":3,"file":"operations.d.ts","sourceRoot":"","sources":["../../../src/git/operations.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAIxC,OAAO,EAAE,KAAK,QAAQ,EAAgB,MAAM,uBAAuB,CAAC;AA2DpE;;;;;;;;;;GAUG;AACH,eAAO,MAAM,SAAS,GAAI,KAAK,MAAM,EAAE,aAAa,MAAM,EAAE,MAAM,MAAM,yCAe7B,CAAC;AAE5C;;;;;;;;;;GAUG;AACH,eAAO,MAAM,YAAY,GAAI,KAAK,MAAM,EAAE,aAAa,MAAM,EAAE,MAAM,MAAM,2CAU7B,CAAC;AAE/C;;;;;;;;GAQG;AACH,eAAO,MAAM,UAAU,GAAI,UAAU,MAAM,EAAE,KAAK,MAAM,2CASZ,CAAC;AAE7C;;;;;;;;GAQG;AACH,eAAO,MAAM,gBAAgB,GAAI,UAAU,MAAM,2CAQC,CAAC;AAEnD;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,UAAU,GAAI,UAAU,MAAM,EAAE,gBAAa,2CA2Bd,CAAC;AAE7C;;;;;;;GAOG;AACH,eAAO,MAAM,eAAe,GAAI,SAAS,MAAM,yCAQ5C,CAAC"}
|
|
@@ -8,7 +8,7 @@ import * as Array from "effect/Array";
|
|
|
8
8
|
import * as Effect from "effect/Effect";
|
|
9
9
|
import * as Option from "effect/Option";
|
|
10
10
|
import simpleGit, {} from "simple-git";
|
|
11
|
-
import {
|
|
11
|
+
import { makeCliError } from "../cli-error/index.js";
|
|
12
12
|
// -----------------------------------------------------------------------------
|
|
13
13
|
// Internal Helpers
|
|
14
14
|
// -----------------------------------------------------------------------------
|
|
@@ -25,22 +25,25 @@ const createGit = (baseDir) => {
|
|
|
25
25
|
};
|
|
26
26
|
return simpleGit(options);
|
|
27
27
|
};
|
|
28
|
+
const operationToCode = {
|
|
29
|
+
clone: "GIT_CLONE_FAILED",
|
|
30
|
+
checkout: "GIT_CHECKOUT_FAILED",
|
|
31
|
+
"resolve-ref": "GIT_RESOLVE_REF_FAILED",
|
|
32
|
+
"get-commit": "GIT_GET_COMMIT_FAILED",
|
|
33
|
+
"get-tree-sha": "GIT_GET_TREE_SHA_FAILED",
|
|
34
|
+
"is-git-repo": "GIT_IS_GIT_REPO_FAILED",
|
|
35
|
+
};
|
|
28
36
|
/**
|
|
29
|
-
* Maps unknown errors to
|
|
37
|
+
* Maps unknown errors to CliError with appropriate context.
|
|
30
38
|
*/
|
|
31
39
|
const mapGitError = (operation, context) => (error) => {
|
|
32
40
|
const baseMessage = context ?? `Git ${operation} failed`;
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
}
|
|
40
|
-
return new GitError({
|
|
41
|
-
operation,
|
|
42
|
-
message: `${baseMessage}: ${String(error)}`,
|
|
43
|
-
cause: Option.some(error),
|
|
41
|
+
const details = error instanceof Error ? [error.message] : [String(error)];
|
|
42
|
+
return makeCliError({
|
|
43
|
+
code: operationToCode[operation],
|
|
44
|
+
what: baseMessage,
|
|
45
|
+
details,
|
|
46
|
+
cause: error,
|
|
44
47
|
});
|
|
45
48
|
};
|
|
46
49
|
// -----------------------------------------------------------------------------
|
|
@@ -70,7 +73,7 @@ export const cloneRepo = (url, destination, ref) => Effect.gen(function* () {
|
|
|
70
73
|
catch: mapGitError("checkout", `Failed to checkout ref '${ref}'`),
|
|
71
74
|
});
|
|
72
75
|
}
|
|
73
|
-
});
|
|
76
|
+
}).pipe(Effect.withSpan("Git.cloneRepo"));
|
|
74
77
|
/**
|
|
75
78
|
* Shallow clone a git repository (depth 1, single branch).
|
|
76
79
|
* Significantly faster than a full clone for read-only use cases like skill discovery.
|
|
@@ -90,7 +93,7 @@ export const shallowClone = (url, destination, ref) => Effect.tryPromise({
|
|
|
90
93
|
...(ref ? ["--branch", ref] : []),
|
|
91
94
|
]),
|
|
92
95
|
catch: mapGitError("clone", `Failed to shallow clone ${url}`),
|
|
93
|
-
});
|
|
96
|
+
}).pipe(Effect.withSpan("Git.shallowClone"));
|
|
94
97
|
/**
|
|
95
98
|
* Resolve a ref (tag, branch, SHA) to a full commit SHA.
|
|
96
99
|
*
|
|
@@ -108,7 +111,7 @@ export const resolveRef = (repoPath, ref) => Effect.tryPromise({
|
|
|
108
111
|
return sha.trim();
|
|
109
112
|
},
|
|
110
113
|
catch: mapGitError("resolve-ref", `Failed to resolve ref '${ref}'`),
|
|
111
|
-
});
|
|
114
|
+
}).pipe(Effect.withSpan("Git.resolveRef"));
|
|
112
115
|
/**
|
|
113
116
|
* Get the current HEAD commit SHA.
|
|
114
117
|
* Used after clone to record in lockfile.
|
|
@@ -125,7 +128,7 @@ export const getCurrentCommit = (repoPath) => Effect.tryPromise({
|
|
|
125
128
|
return sha.trim();
|
|
126
129
|
},
|
|
127
130
|
catch: mapGitError("get-commit", "Failed to get current commit"),
|
|
128
|
-
});
|
|
131
|
+
}).pipe(Effect.withSpan("Git.getCurrentCommit"));
|
|
129
132
|
/**
|
|
130
133
|
* Get the git tree SHA for a path within a repository.
|
|
131
134
|
*
|
|
@@ -159,7 +162,7 @@ export const getTreeSha = (repoPath, subPath = ".") => Effect.tryPromise({
|
|
|
159
162
|
return sha;
|
|
160
163
|
},
|
|
161
164
|
catch: mapGitError("get-tree-sha", `Failed to get tree SHA for '${subPath}'`),
|
|
162
|
-
});
|
|
165
|
+
}).pipe(Effect.withSpan("Git.getTreeSha"));
|
|
163
166
|
/**
|
|
164
167
|
* Check if a directory is within a git repository.
|
|
165
168
|
*
|
|
@@ -171,5 +174,5 @@ export const getTreeSha = (repoPath, subPath = ".") => Effect.tryPromise({
|
|
|
171
174
|
export const isGitRepository = (dirPath) => Effect.tryPromise({
|
|
172
175
|
try: () => createGit(dirPath).revparse(["--git-dir"]),
|
|
173
176
|
catch: mapGitError("is-git-repo", `Failed to check git repository at '${dirPath}'`),
|
|
174
|
-
}).pipe(Effect.as(true), Effect.catchAll(() => Effect.succeed(false)));
|
|
177
|
+
}).pipe(Effect.as(true), Effect.catchAll(() => Effect.succeed(false)), Effect.withSpan("Git.isGitRepository"));
|
|
175
178
|
//# sourceMappingURL=operations.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"operations.js","sourceRoot":"","sources":["../../../src/git/operations.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AACtC,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,SAAS,EAAE,EAAyC,MAAM,YAAY,CAAC;AAE9E,OAAO,
|
|
1
|
+
{"version":3,"file":"operations.js","sourceRoot":"","sources":["../../../src/git/operations.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AACtC,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,SAAS,EAAE,EAAyC,MAAM,YAAY,CAAC;AAE9E,OAAO,EAAiB,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAEpE,gFAAgF;AAChF,mBAAmB;AACnB,gFAAgF;AAEhF;;;GAGG;AACH,MAAM,SAAS,GAAG,CAAC,OAAgB,EAAa,EAAE;IAChD,MAAM,OAAO,GAA8B;QACzC,OAAO,EAAE,OAAO,IAAI,OAAO,CAAC,GAAG,EAAE;QACjC,MAAM,EAAE,KAAK;QACb,sBAAsB,EAAE,CAAC;QACzB,MAAM,EAAE,EAAE;KACX,CAAC;IAEF,OAAO,SAAS,CAAC,OAAO,CAAC,CAAC;AAC5B,CAAC,CAAC;AAUF,MAAM,eAAe,GAAiC;IACpD,KAAK,EAAE,kBAAkB;IACzB,QAAQ,EAAE,qBAAqB;IAC/B,aAAa,EAAE,wBAAwB;IACvC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AAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;QACnC,MAAM,GAAG,GAAG,MAAM,CAAC,cAAc,CAC/B,KAAK,CAAC,GAAG,CAAC,KAAK,EAAE,CAAC,CAAC,EACnB,GAAG,EAAE,CAAC,IAAI,KAAK,CAAC,8BAA8B,OAAO,EAAE,CAAC,CACzD,CAAC;QACF,OAAO,GAAG,CAAC;IACb,CAAC;IACD,KAAK,EAAE,WAAW,CAAC,cAAc,EAAE,+BAA+B,OAAO,GAAG,CAAC;CAC9E,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,gBAAgB,CAAC,CAAC,CAAC;AAE7C;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,OAAe,EAAE,EAAE,CACjD,MAAM,CAAC,UAAU,CAAC;IAChB,GAAG,EAAE,GAAG,EAAE,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,QAAQ,CAAC,CAAC,WAAW,CAAC,CAAC;IACrD,KAAK,EAAE,WAAW,CAAC,aAAa,EAAE,sCAAsC,OAAO,GAAG,CAAC;CACpF,CAAC,CAAC,IAAI,CACL,MAAM,CAAC,EAAE,CAAC,IAAI,CAAC,EACf,MAAM,CAAC,QAAQ,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,EAC5C,MAAM,CAAC,QAAQ,CAAC,qBAAqB,CAAC,CACvC,CAAC"}
|
|
@@ -9,7 +9,6 @@
|
|
|
9
9
|
*/
|
|
10
10
|
export type { Lockfile, SkillLockEntry, SkillsLockMap } from "./schema.js";
|
|
11
11
|
export { AzureReposLockEntrySchema, BitbucketLockEntrySchema, DateFromString, GitHubLockEntrySchema, GitLabLockEntrySchema, GitLockEntrySchema, LocalLockEntrySchema, LockfileSchema, RegistryLockEntrySchema, SkillLockEntrySchema, SkillsLockMapSchema, } from "./schema.js";
|
|
12
|
-
export
|
|
13
|
-
export { LOCKFILE_NAME, LockfileNotFoundError, LockfileParseError, LockfileWriteError, } from "./lockfile.js";
|
|
12
|
+
export { LOCKFILE_NAME } from "./lockfile.js";
|
|
14
13
|
export { readLockfile, writeLockfile } from "./lockfile.js";
|
|
15
14
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lockfile/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAGH,YAAY,EAAE,QAAQ,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC3E,OAAO,EACL,yBAAyB,EACzB,wBAAwB,EACxB,cAAc,EACd,qBAAqB,EACrB,qBAAqB,EACrB,kBAAkB,EAClB,oBAAoB,EACpB,cAAc,EACd,uBAAuB,EACvB,oBAAoB,EACpB,mBAAmB,GACpB,MAAM,aAAa,CAAC;AAGrB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lockfile/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAGH,YAAY,EAAE,QAAQ,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC3E,OAAO,EACL,yBAAyB,EACzB,wBAAwB,EACxB,cAAc,EACd,qBAAqB,EACrB,qBAAqB,EACrB,kBAAkB,EAClB,oBAAoB,EACpB,cAAc,EACd,uBAAuB,EACvB,oBAAoB,EACpB,mBAAmB,GACpB,MAAM,aAAa,CAAC;AAGrB,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAE9C,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC"}
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
* @packageDocumentation
|
|
9
9
|
*/
|
|
10
10
|
export { AzureReposLockEntrySchema, BitbucketLockEntrySchema, DateFromString, GitHubLockEntrySchema, GitLabLockEntrySchema, GitLockEntrySchema, LocalLockEntrySchema, LockfileSchema, RegistryLockEntrySchema, SkillLockEntrySchema, SkillsLockMapSchema, } from "./schema.js";
|
|
11
|
-
|
|
11
|
+
// Lockfile I/O
|
|
12
|
+
export { LOCKFILE_NAME } from "./lockfile.js";
|
|
12
13
|
export { readLockfile, writeLockfile } from "./lockfile.js";
|
|
13
14
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/lockfile/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAIH,OAAO,EACL,yBAAyB,EACzB,wBAAwB,EACxB,cAAc,EACd,qBAAqB,EACrB,qBAAqB,EACrB,kBAAkB,EAClB,oBAAoB,EACpB,cAAc,EACd,uBAAuB,EACvB,oBAAoB,EACpB,mBAAmB,GACpB,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/lockfile/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAIH,OAAO,EACL,yBAAyB,EACzB,wBAAwB,EACxB,cAAc,EACd,qBAAqB,EACrB,qBAAqB,EACrB,kBAAkB,EAClB,oBAAoB,EACpB,cAAc,EACd,uBAAuB,EACvB,oBAAoB,EACpB,mBAAmB,GACpB,MAAM,aAAa,CAAC;AAErB,eAAe;AACf,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAE9C,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC"}
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
import * as FileSystem from "@effect/platform/FileSystem";
|
|
11
11
|
import * as Path from "@effect/platform/Path";
|
|
12
12
|
import * as Effect from "effect/Effect";
|
|
13
|
+
import { type CliError } from "../cli-error/index.js";
|
|
13
14
|
import { type Lockfile } from "./schema.js";
|
|
14
15
|
/**
|
|
15
16
|
* Filename for the lockfile.
|
|
@@ -17,65 +18,91 @@ import { type Lockfile } from "./schema.js";
|
|
|
17
18
|
* @experimental This API is unstable and may change without notice.
|
|
18
19
|
*/
|
|
19
20
|
export declare const LOCKFILE_NAME = "axm-lock.yaml";
|
|
20
|
-
declare const LockfileNotFoundError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").Equals<A, {}> extends true ? void : { readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }) => import("effect/Cause").YieldableError & {
|
|
21
|
-
readonly _tag: "LockfileNotFoundError";
|
|
22
|
-
} & Readonly<A>;
|
|
23
|
-
/**
|
|
24
|
-
* Error when lockfile does not exist.
|
|
25
|
-
*
|
|
26
|
-
* @experimental This API is unstable and may change without notice.
|
|
27
|
-
*/
|
|
28
|
-
export declare class LockfileNotFoundError extends LockfileNotFoundError_base<{
|
|
29
|
-
readonly path: string;
|
|
30
|
-
readonly message: string;
|
|
31
|
-
}> {
|
|
32
|
-
}
|
|
33
|
-
declare const LockfileParseError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").Equals<A, {}> extends true ? void : { readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }) => import("effect/Cause").YieldableError & {
|
|
34
|
-
readonly _tag: "LockfileParseError";
|
|
35
|
-
} & Readonly<A>;
|
|
36
|
-
/**
|
|
37
|
-
* Error parsing the lockfile YAML content.
|
|
38
|
-
*
|
|
39
|
-
* @experimental This API is unstable and may change without notice.
|
|
40
|
-
*/
|
|
41
|
-
export declare class LockfileParseError extends LockfileParseError_base<{
|
|
42
|
-
readonly message: string;
|
|
43
|
-
readonly cause?: unknown;
|
|
44
|
-
readonly retryable: boolean;
|
|
45
|
-
}> {
|
|
46
|
-
}
|
|
47
|
-
declare const LockfileWriteError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").Equals<A, {}> extends true ? void : { readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }) => import("effect/Cause").YieldableError & {
|
|
48
|
-
readonly _tag: "LockfileWriteError";
|
|
49
|
-
} & Readonly<A>;
|
|
50
|
-
/**
|
|
51
|
-
* Error writing the lockfile to disk.
|
|
52
|
-
*
|
|
53
|
-
* @experimental This API is unstable and may change without notice.
|
|
54
|
-
*/
|
|
55
|
-
export declare class LockfileWriteError extends LockfileWriteError_base<{
|
|
56
|
-
readonly message: string;
|
|
57
|
-
readonly cause?: unknown;
|
|
58
|
-
readonly retryable: boolean;
|
|
59
|
-
}> {
|
|
60
|
-
}
|
|
61
|
-
/**
|
|
62
|
-
* Union of all lockfile-related errors.
|
|
63
|
-
*
|
|
64
|
-
* @experimental This API is unstable and may change without notice.
|
|
65
|
-
*/
|
|
66
|
-
export type LockfileError = LockfileNotFoundError | LockfileParseError | LockfileWriteError;
|
|
67
21
|
/**
|
|
68
22
|
* Reads and parses the lockfile from `.axm/axm-lock.yaml`.
|
|
69
23
|
*
|
|
70
24
|
* Returns an empty lockfile if the file does not exist.
|
|
71
|
-
* Returns a
|
|
25
|
+
* Returns a CliError if the file exists but is invalid.
|
|
72
26
|
*
|
|
73
27
|
* @param axmDir - Path to the `.axm` directory
|
|
74
28
|
* @returns Effect yielding the parsed Lockfile
|
|
75
29
|
*
|
|
76
30
|
* @experimental This API is unstable and may change without notice.
|
|
77
31
|
*/
|
|
78
|
-
export declare const readLockfile: (axmDir: string) => Effect.Effect<
|
|
32
|
+
export declare const readLockfile: (axmDir: string) => Effect.Effect<{
|
|
33
|
+
readonly skills: {
|
|
34
|
+
readonly [x: string]: {
|
|
35
|
+
readonly ref?: string | undefined;
|
|
36
|
+
readonly type: "github";
|
|
37
|
+
readonly path?: string | undefined;
|
|
38
|
+
readonly agents: readonly string[];
|
|
39
|
+
readonly owner: string;
|
|
40
|
+
readonly repo: string;
|
|
41
|
+
readonly installedAt: Date;
|
|
42
|
+
readonly updatedAt: Date;
|
|
43
|
+
readonly gitTreeHash?: string | undefined;
|
|
44
|
+
} | {
|
|
45
|
+
readonly ref?: string | undefined;
|
|
46
|
+
readonly type: "gitlab";
|
|
47
|
+
readonly path?: string | undefined;
|
|
48
|
+
readonly agents: readonly string[];
|
|
49
|
+
readonly owner: string;
|
|
50
|
+
readonly repo: string;
|
|
51
|
+
readonly installedAt: Date;
|
|
52
|
+
readonly updatedAt: Date;
|
|
53
|
+
readonly gitTreeHash?: string | undefined;
|
|
54
|
+
} | {
|
|
55
|
+
readonly ref?: string | undefined;
|
|
56
|
+
readonly type: "bitbucket";
|
|
57
|
+
readonly path?: string | undefined;
|
|
58
|
+
readonly agents: readonly string[];
|
|
59
|
+
readonly owner: string;
|
|
60
|
+
readonly repo: string;
|
|
61
|
+
readonly installedAt: Date;
|
|
62
|
+
readonly updatedAt: Date;
|
|
63
|
+
readonly gitTreeHash?: string | undefined;
|
|
64
|
+
} | {
|
|
65
|
+
readonly ref?: string | undefined;
|
|
66
|
+
readonly type: "azurerepos";
|
|
67
|
+
readonly path?: string | undefined;
|
|
68
|
+
readonly agents: readonly string[];
|
|
69
|
+
readonly repo: string;
|
|
70
|
+
readonly organization: string;
|
|
71
|
+
readonly project: string;
|
|
72
|
+
readonly installedAt: Date;
|
|
73
|
+
readonly updatedAt: Date;
|
|
74
|
+
readonly gitTreeHash?: string | undefined;
|
|
75
|
+
} | {
|
|
76
|
+
readonly ref?: string | undefined;
|
|
77
|
+
readonly type: "git";
|
|
78
|
+
readonly path?: string | undefined;
|
|
79
|
+
readonly url: string;
|
|
80
|
+
readonly agents: readonly string[];
|
|
81
|
+
readonly installedAt: Date;
|
|
82
|
+
readonly updatedAt: Date;
|
|
83
|
+
readonly gitTreeHash?: string | undefined;
|
|
84
|
+
} | {
|
|
85
|
+
readonly type: "local";
|
|
86
|
+
readonly path: string;
|
|
87
|
+
readonly agents: readonly string[];
|
|
88
|
+
readonly installedAt: Date;
|
|
89
|
+
readonly updatedAt: Date;
|
|
90
|
+
readonly gitTreeHash?: string | undefined;
|
|
91
|
+
} | {
|
|
92
|
+
readonly type: "registry";
|
|
93
|
+
readonly name: string;
|
|
94
|
+
readonly scope: string;
|
|
95
|
+
readonly agents: readonly string[];
|
|
96
|
+
readonly checksum: string;
|
|
97
|
+
readonly installedAt: Date;
|
|
98
|
+
readonly updatedAt: Date;
|
|
99
|
+
readonly gitTreeHash?: string | undefined;
|
|
100
|
+
readonly resolvedVersion: string;
|
|
101
|
+
readonly sourceName: string;
|
|
102
|
+
};
|
|
103
|
+
};
|
|
104
|
+
readonly lockfileVersion: number;
|
|
105
|
+
}, CliError, FileSystem.FileSystem | Path.Path>;
|
|
79
106
|
/**
|
|
80
107
|
* Writes the lockfile to `.axm/axm-lock.yaml` in YAML format.
|
|
81
108
|
*
|
|
@@ -88,6 +115,5 @@ export declare const readLockfile: (axmDir: string) => Effect.Effect<Lockfile, L
|
|
|
88
115
|
*
|
|
89
116
|
* @experimental This API is unstable and may change without notice.
|
|
90
117
|
*/
|
|
91
|
-
export declare const writeLockfile: (axmDir: string, lockfile: Lockfile) => Effect.Effect<void,
|
|
92
|
-
export {};
|
|
118
|
+
export declare const writeLockfile: (axmDir: string, lockfile: Lockfile) => Effect.Effect<void, CliError, FileSystem.FileSystem | Path.Path>;
|
|
93
119
|
//# sourceMappingURL=lockfile.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lockfile.d.ts","sourceRoot":"","sources":["../../../src/lockfile/lockfile.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,UAAU,MAAM,6BAA6B,CAAC;AAC1D,OAAO,KAAK,IAAI,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"lockfile.d.ts","sourceRoot":"","sources":["../../../src/lockfile/lockfile.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,UAAU,MAAM,6BAA6B,CAAC;AAC1D,OAAO,KAAK,IAAI,MAAM,uBAAuB,CAAC;AAC9C,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAIxC,OAAO,EAAE,KAAK,QAAQ,EAAgB,MAAM,uBAAuB,CAAC;AACpE,OAAO,EAAE,KAAK,QAAQ,EAAkB,MAAM,aAAa,CAAC;AAM5D;;;;GAIG;AACH,eAAO,MAAM,aAAa,kBAAkB,CAAC;AAmC7C;;;;;;;;;;GAUG;AACH,eAAO,MAAM,YAAY,GAAI,QAAQ,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;+CA2CvC,CAAC;AAEL;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,aAAa,GAAI,QAAQ,MAAM,EAAE,UAAU,QAAQ,qEAiD5D,CAAC"}
|
|
@@ -9,10 +9,10 @@
|
|
|
9
9
|
*/
|
|
10
10
|
import * as FileSystem from "@effect/platform/FileSystem";
|
|
11
11
|
import * as Path from "@effect/platform/Path";
|
|
12
|
-
import * as Data from "effect/Data";
|
|
13
12
|
import * as Effect from "effect/Effect";
|
|
14
13
|
import * as Schema from "effect/Schema";
|
|
15
14
|
import YAML from "yaml";
|
|
15
|
+
import { makeCliError } from "../cli-error/index.js";
|
|
16
16
|
import { LockfileSchema } from "./schema.js";
|
|
17
17
|
// -----------------------------------------------------------------------------
|
|
18
18
|
// Constants
|
|
@@ -25,30 +25,6 @@ import { LockfileSchema } from "./schema.js";
|
|
|
25
25
|
export const LOCKFILE_NAME = "axm-lock.yaml";
|
|
26
26
|
const LOCKFILE_VERSION = 1;
|
|
27
27
|
// -----------------------------------------------------------------------------
|
|
28
|
-
// Error Types
|
|
29
|
-
// -----------------------------------------------------------------------------
|
|
30
|
-
/**
|
|
31
|
-
* Error when lockfile does not exist.
|
|
32
|
-
*
|
|
33
|
-
* @experimental This API is unstable and may change without notice.
|
|
34
|
-
*/
|
|
35
|
-
export class LockfileNotFoundError extends Data.TaggedError("LockfileNotFoundError") {
|
|
36
|
-
}
|
|
37
|
-
/**
|
|
38
|
-
* Error parsing the lockfile YAML content.
|
|
39
|
-
*
|
|
40
|
-
* @experimental This API is unstable and may change without notice.
|
|
41
|
-
*/
|
|
42
|
-
export class LockfileParseError extends Data.TaggedError("LockfileParseError") {
|
|
43
|
-
}
|
|
44
|
-
/**
|
|
45
|
-
* Error writing the lockfile to disk.
|
|
46
|
-
*
|
|
47
|
-
* @experimental This API is unstable and may change without notice.
|
|
48
|
-
*/
|
|
49
|
-
export class LockfileWriteError extends Data.TaggedError("LockfileWriteError") {
|
|
50
|
-
}
|
|
51
|
-
// -----------------------------------------------------------------------------
|
|
52
28
|
// Internal Helpers
|
|
53
29
|
// -----------------------------------------------------------------------------
|
|
54
30
|
/**
|
|
@@ -60,12 +36,12 @@ const createEmptyLockfile = () => ({
|
|
|
60
36
|
});
|
|
61
37
|
/**
|
|
62
38
|
* Validates parsed YAML data against the lockfile schema.
|
|
63
|
-
* Returns a
|
|
39
|
+
* Returns a CliError on validation failure.
|
|
64
40
|
*/
|
|
65
|
-
const decodeLockfile = (data) => Schema.decodeUnknown(LockfileSchema)(data).pipe(Effect.mapError((e) =>
|
|
66
|
-
|
|
41
|
+
const decodeLockfile = (data) => Schema.decodeUnknown(LockfileSchema)(data).pipe(Effect.mapError((e) => makeCliError({
|
|
42
|
+
code: "LOCKFILE_PARSE_FAILED",
|
|
43
|
+
what: "Invalid lockfile format",
|
|
67
44
|
cause: e,
|
|
68
|
-
retryable: false,
|
|
69
45
|
})));
|
|
70
46
|
// -----------------------------------------------------------------------------
|
|
71
47
|
// Public Functions
|
|
@@ -74,7 +50,7 @@ const decodeLockfile = (data) => Schema.decodeUnknown(LockfileSchema)(data).pipe
|
|
|
74
50
|
* Reads and parses the lockfile from `.axm/axm-lock.yaml`.
|
|
75
51
|
*
|
|
76
52
|
* Returns an empty lockfile if the file does not exist.
|
|
77
|
-
* Returns a
|
|
53
|
+
* Returns a CliError if the file exists but is invalid.
|
|
78
54
|
*
|
|
79
55
|
* @param axmDir - Path to the `.axm` directory
|
|
80
56
|
* @returns Effect yielding the parsed Lockfile
|
|
@@ -86,27 +62,27 @@ export const readLockfile = (axmDir) => Effect.gen(function* () {
|
|
|
86
62
|
const path = yield* Path.Path;
|
|
87
63
|
const lockfilePath = path.join(axmDir, LOCKFILE_NAME);
|
|
88
64
|
// Check if file exists
|
|
89
|
-
const exists = yield* fs.exists(lockfilePath).pipe(Effect.mapError((error) =>
|
|
90
|
-
|
|
65
|
+
const exists = yield* fs.exists(lockfilePath).pipe(Effect.mapError((error) => makeCliError({
|
|
66
|
+
code: "LOCKFILE_PARSE_FAILED",
|
|
67
|
+
what: `Failed to check if lockfile exists at ${lockfilePath}`,
|
|
91
68
|
cause: error,
|
|
92
|
-
retryable: false,
|
|
93
69
|
})));
|
|
94
70
|
if (!exists) {
|
|
95
71
|
return createEmptyLockfile();
|
|
96
72
|
}
|
|
97
73
|
// Read and parse the file
|
|
98
|
-
const content = yield* fs.readFileString(lockfilePath).pipe(Effect.mapError((error) =>
|
|
99
|
-
|
|
74
|
+
const content = yield* fs.readFileString(lockfilePath).pipe(Effect.mapError((error) => makeCliError({
|
|
75
|
+
code: "LOCKFILE_PARSE_FAILED",
|
|
76
|
+
what: `Failed to read lockfile at ${lockfilePath}`,
|
|
100
77
|
cause: error,
|
|
101
|
-
retryable: false,
|
|
102
78
|
})));
|
|
103
79
|
// Parse YAML
|
|
104
80
|
const parsed = yield* Effect.try({
|
|
105
81
|
try: () => YAML.parse(content),
|
|
106
|
-
catch: (error) =>
|
|
107
|
-
|
|
82
|
+
catch: (error) => makeCliError({
|
|
83
|
+
code: "LOCKFILE_PARSE_FAILED",
|
|
84
|
+
what: `Failed to parse lockfile YAML at ${lockfilePath}`,
|
|
108
85
|
cause: error,
|
|
109
|
-
retryable: false,
|
|
110
86
|
}),
|
|
111
87
|
});
|
|
112
88
|
return yield* decodeLockfile(parsed);
|
|
@@ -128,34 +104,34 @@ export const writeLockfile = (axmDir, lockfile) => Effect.gen(function* () {
|
|
|
128
104
|
const path = yield* Path.Path;
|
|
129
105
|
const lockfilePath = path.join(axmDir, LOCKFILE_NAME);
|
|
130
106
|
// Ensure directory exists
|
|
131
|
-
yield* fs.makeDirectory(axmDir, { recursive: true }).pipe(Effect.mapError((error) =>
|
|
132
|
-
|
|
107
|
+
yield* fs.makeDirectory(axmDir, { recursive: true }).pipe(Effect.mapError((error) => makeCliError({
|
|
108
|
+
code: "LOCKFILE_WRITE_FAILED",
|
|
109
|
+
what: `Failed to create directory ${axmDir}`,
|
|
133
110
|
cause: error,
|
|
134
|
-
retryable: false,
|
|
135
111
|
})));
|
|
136
112
|
// Encode Dates to ISO strings for YAML serialization
|
|
137
113
|
const encoded = yield* Effect.try({
|
|
138
114
|
try: () => Schema.encodeSync(LockfileSchema)(lockfile),
|
|
139
|
-
catch: (error) =>
|
|
140
|
-
|
|
115
|
+
catch: (error) => makeCliError({
|
|
116
|
+
code: "LOCKFILE_WRITE_FAILED",
|
|
117
|
+
what: "Failed to encode lockfile",
|
|
141
118
|
cause: error,
|
|
142
|
-
retryable: false,
|
|
143
119
|
}),
|
|
144
120
|
});
|
|
145
121
|
// Convert to YAML
|
|
146
122
|
const yamlContent = yield* Effect.try({
|
|
147
123
|
try: () => YAML.stringify(encoded),
|
|
148
|
-
catch: (error) =>
|
|
149
|
-
|
|
124
|
+
catch: (error) => makeCliError({
|
|
125
|
+
code: "LOCKFILE_WRITE_FAILED",
|
|
126
|
+
what: "Failed to serialize lockfile to YAML",
|
|
150
127
|
cause: error,
|
|
151
|
-
retryable: false,
|
|
152
128
|
}),
|
|
153
129
|
});
|
|
154
130
|
// Write file
|
|
155
|
-
yield* fs.writeFileString(lockfilePath, yamlContent).pipe(Effect.mapError((error) =>
|
|
156
|
-
|
|
131
|
+
yield* fs.writeFileString(lockfilePath, yamlContent).pipe(Effect.mapError((error) => makeCliError({
|
|
132
|
+
code: "LOCKFILE_WRITE_FAILED",
|
|
133
|
+
what: `Failed to write lockfile at ${lockfilePath}`,
|
|
157
134
|
cause: error,
|
|
158
|
-
retryable: false,
|
|
159
135
|
})));
|
|
160
136
|
});
|
|
161
137
|
//# sourceMappingURL=lockfile.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lockfile.js","sourceRoot":"","sources":["../../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AAkB;IAClB,MAAM,WAAW,GAAG,KAAK,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC;QACpC,GAAG,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC;QAClC,KAAK,EAAE,CAAC,KAAK,EAAE,EAAE,CACf,YAAY,CAAC;YACX,IAAI,EAAE,uBAAuB;YAC7B,IAAI,EAAE,sCAAsC;YAC5C,KAAK,EAAE,KAAK;SACb,CAAC;KACL,CAAC,CAAC;IAEH,aAAa;IACb,KAAK,CAAC,CAAC,EAAE,CAAC,eAAe,CAAC,YAAY,EAAE,WAAW,CAAC,CAAC,IAAI,CACvD,MAAM,CAAC,QAAQ,CAAC,CAAC,KAAK,EAAE,EAAE,CACxB,YAAY,CAAC;QACX,IAAI,EAAE,uBAAuB;QAC7B,IAAI,EAAE,+BAA+B,YAAY,EAAE;QACnD,KAAK,EAAE,KAAK;KACb,CAAC,CACH,CACF,CAAC;AACJ,CAAC,CAAC,CAAC"}
|
|
@@ -7,7 +7,6 @@
|
|
|
7
7
|
* @experimental This API is unstable and may change without notice.
|
|
8
8
|
* @packageDocumentation
|
|
9
9
|
*/
|
|
10
|
-
export { ResolutionError, type ResolutionErrorCode } from "./errors.js";
|
|
11
10
|
export { defaultResolutionOptions, resolveExtension } from "./resolver.js";
|
|
12
11
|
export type { ExtensionMetadata, ExtensionRef, ExtensionType, ResolutionOptions } from "./types.js";
|
|
13
12
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/resolution/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAGH,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/resolution/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAGH,OAAO,EAAE,wBAAwB,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAE3E,YAAY,EAAE,iBAAiB,EAAE,YAAY,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC"}
|
|
@@ -7,8 +7,6 @@
|
|
|
7
7
|
* @experimental This API is unstable and may change without notice.
|
|
8
8
|
* @packageDocumentation
|
|
9
9
|
*/
|
|
10
|
-
// Re-export errors
|
|
11
|
-
export { ResolutionError } from "./errors.js";
|
|
12
10
|
// Re-export resolver
|
|
13
11
|
export { defaultResolutionOptions, resolveExtension } from "./resolver.js";
|
|
14
12
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/resolution/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/resolution/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,qBAAqB;AACrB,OAAO,EAAE,wBAAwB,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC"}
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* @packageDocumentation
|
|
6
6
|
*/
|
|
7
7
|
import * as Effect from "effect/Effect";
|
|
8
|
-
import type {
|
|
8
|
+
import type { CliError } from "../cli-error/index.js";
|
|
9
9
|
import type { ExtensionRef, ResolutionOptions } from "./types.js";
|
|
10
10
|
/**
|
|
11
11
|
* Default resolution options with all fields set to None.
|
|
@@ -31,5 +31,5 @@ export declare const defaultResolutionOptions: ResolutionOptions;
|
|
|
31
31
|
*
|
|
32
32
|
* @experimental This API is unstable and may change without notice.
|
|
33
33
|
*/
|
|
34
|
-
export declare const resolveExtension: (input: string, options?: ResolutionOptions) => Effect.Effect<ExtensionRef[],
|
|
34
|
+
export declare const resolveExtension: (input: string, options?: ResolutionOptions) => Effect.Effect<ExtensionRef[], CliError, any>;
|
|
35
35
|
//# sourceMappingURL=resolver.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolver.d.ts","sourceRoot":"","sources":["../../../src/resolution/resolver.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAExC,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"resolver.d.ts","sourceRoot":"","sources":["../../../src/resolution/resolver.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAExC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAUtD,OAAO,KAAK,EAAE,YAAY,EAAiB,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAEjF;;;;GAIG;AACH,eAAO,MAAM,wBAAwB,EAAE,iBAQtC,CAAC;AAiDF;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,gBAAgB,GAC3B,OAAO,MAAM,EACb,UAAS,iBAA4C,iDAkCtD,CAAC"}
|
|
@@ -100,6 +100,6 @@ export const resolveExtension = (input, options = defaultResolutionOptions) => {
|
|
|
100
100
|
const results = yield* tryResolvers(resolvers);
|
|
101
101
|
const filteredBySource = filterBySource(results, Option.getOrUndefined(options.sources));
|
|
102
102
|
return filterByType(filteredBySource, Option.getOrUndefined(options.types));
|
|
103
|
-
});
|
|
103
|
+
}).pipe(Effect.withSpan("Resolution.resolveExtension"));
|
|
104
104
|
};
|
|
105
105
|
//# sourceMappingURL=resolver.js.map
|