@microwiseai/snapshot 0.9.1 → 0.9.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/dist/build-info.json +1 -1
- package/dist/commands/install.d.ts.map +1 -1
- package/dist/commands/install.js +22 -15
- package/dist/commands/install.js.map +1 -1
- package/dist/commands/publish.d.ts.map +1 -1
- package/dist/commands/publish.js +7 -0
- package/dist/commands/publish.js.map +1 -1
- package/dist/lib/prerequisites.d.ts.map +1 -1
- package/dist/lib/prerequisites.js +2 -1
- package/dist/lib/prerequisites.js.map +1 -1
- package/dist/lib/proxy-index-refresh.d.ts +40 -0
- package/dist/lib/proxy-index-refresh.d.ts.map +1 -0
- package/dist/lib/proxy-index-refresh.js +66 -0
- package/dist/lib/proxy-index-refresh.js.map +1 -0
- package/dist/lib/skit-adapter.d.ts +14 -5
- package/dist/lib/skit-adapter.d.ts.map +1 -1
- package/dist/lib/skit-adapter.js +118 -177
- package/dist/lib/skit-adapter.js.map +1 -1
- package/node_modules/@microwiseai/skit/LICENSE +21 -0
- package/node_modules/@microwiseai/skit/README.md +137 -93
- package/node_modules/@microwiseai/skit/dist/__tests__/setup/hermetic-config.d.ts +2 -0
- package/node_modules/@microwiseai/skit/dist/__tests__/setup/hermetic-config.d.ts.map +1 -0
- package/node_modules/@microwiseai/skit/dist/commands/browse.d.ts +47 -3
- package/node_modules/@microwiseai/skit/dist/commands/browse.d.ts.map +1 -1
- package/node_modules/@microwiseai/skit/dist/commands/config.d.ts +5 -0
- package/node_modules/@microwiseai/skit/dist/commands/config.d.ts.map +1 -0
- package/node_modules/@microwiseai/skit/dist/commands/install.d.ts +14 -2
- package/node_modules/@microwiseai/skit/dist/commands/install.d.ts.map +1 -1
- package/node_modules/@microwiseai/skit/dist/commands/orphans.d.ts +16 -0
- package/node_modules/@microwiseai/skit/dist/commands/orphans.d.ts.map +1 -0
- package/node_modules/@microwiseai/skit/dist/commands/pack.d.ts.map +1 -1
- package/node_modules/@microwiseai/skit/dist/commands/prompt.d.ts +25 -0
- package/node_modules/@microwiseai/skit/dist/commands/prompt.d.ts.map +1 -0
- package/node_modules/@microwiseai/skit/dist/commands/publish.d.ts.map +1 -1
- package/node_modules/@microwiseai/skit/dist/commands/uninstall.d.ts.map +1 -1
- package/node_modules/@microwiseai/skit/dist/distkit/install-directive.d.ts +48 -0
- package/node_modules/@microwiseai/skit/dist/distkit/install-directive.d.ts.map +1 -0
- package/node_modules/@microwiseai/skit/dist/distkit/kit-executor.d.ts +46 -0
- package/node_modules/@microwiseai/skit/dist/distkit/kit-executor.d.ts.map +1 -0
- package/node_modules/@microwiseai/skit/dist/distkit/resolve-from.d.ts +37 -0
- package/node_modules/@microwiseai/skit/dist/distkit/resolve-from.d.ts.map +1 -0
- package/node_modules/@microwiseai/skit/dist/index.d.ts +0 -1
- package/node_modules/@microwiseai/skit/dist/index.js +52519 -68
- package/node_modules/@microwiseai/skit/dist/lib.d.ts +657 -5
- package/node_modules/@microwiseai/skit/dist/lib.d.ts.map +1 -1
- package/node_modules/@microwiseai/skit/dist/lib.js +48417 -554
- package/node_modules/@microwiseai/skit/dist/types/skit.d.ts +189 -12
- package/node_modules/@microwiseai/skit/dist/types/skit.d.ts.map +1 -1
- package/node_modules/@microwiseai/skit/dist/utils/dep-plan.d.ts +150 -0
- package/node_modules/@microwiseai/skit/dist/utils/dep-plan.d.ts.map +1 -0
- package/node_modules/@microwiseai/skit/dist/utils/file-copy.d.ts +10 -5
- package/node_modules/@microwiseai/skit/dist/utils/file-copy.d.ts.map +1 -1
- package/node_modules/@microwiseai/skit/dist/utils/gitlab-registry.d.ts +91 -0
- package/node_modules/@microwiseai/skit/dist/utils/gitlab-registry.d.ts.map +1 -0
- package/node_modules/@microwiseai/skit/dist/utils/installed-registry.d.ts +59 -3
- package/node_modules/@microwiseai/skit/dist/utils/installed-registry.d.ts.map +1 -1
- package/node_modules/@microwiseai/skit/dist/utils/npm-auth.d.ts +99 -0
- package/node_modules/@microwiseai/skit/dist/utils/npm-auth.d.ts.map +1 -0
- package/node_modules/@microwiseai/skit/dist/utils/profile-permissions.d.ts +54 -0
- package/node_modules/@microwiseai/skit/dist/utils/profile-permissions.d.ts.map +1 -0
- package/node_modules/@microwiseai/skit/dist/utils/skit-config.d.ts +41 -0
- package/node_modules/@microwiseai/skit/dist/utils/skit-config.d.ts.map +1 -0
- package/node_modules/@microwiseai/skit/dist/utils/skit-parser.d.ts +5 -0
- package/node_modules/@microwiseai/skit/dist/utils/skit-parser.d.ts.map +1 -1
- package/node_modules/@microwiseai/skit/dist/utils/temp-npmrc.d.ts +70 -0
- package/node_modules/@microwiseai/skit/dist/utils/temp-npmrc.d.ts.map +1 -0
- package/node_modules/@microwiseai/skit/package.json +40 -10
- package/package.json +2 -2
- package/node_modules/@isaacs/fs-minipass/LICENSE +0 -15
- package/node_modules/@isaacs/fs-minipass/README.md +0 -71
- package/node_modules/@isaacs/fs-minipass/dist/commonjs/index.d.ts +0 -118
- package/node_modules/@isaacs/fs-minipass/dist/commonjs/index.d.ts.map +0 -1
- package/node_modules/@isaacs/fs-minipass/dist/commonjs/index.js +0 -430
- package/node_modules/@isaacs/fs-minipass/dist/commonjs/index.js.map +0 -1
- package/node_modules/@isaacs/fs-minipass/dist/commonjs/package.json +0 -3
- package/node_modules/@isaacs/fs-minipass/dist/esm/index.d.ts +0 -118
- package/node_modules/@isaacs/fs-minipass/dist/esm/index.d.ts.map +0 -1
- package/node_modules/@isaacs/fs-minipass/dist/esm/index.js +0 -420
- package/node_modules/@isaacs/fs-minipass/dist/esm/index.js.map +0 -1
- package/node_modules/@isaacs/fs-minipass/dist/esm/package.json +0 -3
- package/node_modules/@isaacs/fs-minipass/package.json +0 -72
- package/node_modules/@ist/registry-config/dist/index.d.ts +0 -3
- package/node_modules/@ist/registry-config/dist/index.js +0 -3
- package/node_modules/@ist/registry-config/dist/registry-url.d.ts +0 -1
- package/node_modules/@ist/registry-config/dist/registry-url.js +0 -1
- package/node_modules/@ist/registry-config/dist/scope-mapping.d.ts +0 -6
- package/node_modules/@ist/registry-config/dist/scope-mapping.js +0 -7
- package/node_modules/@ist/registry-config/dist/types.d.ts +0 -4
- package/node_modules/@ist/registry-config/dist/types.js +0 -1
- package/node_modules/@ist/registry-config/package.json +0 -32
- package/node_modules/@microwiseai/skit/dist/commands/browse.js +0 -127
- package/node_modules/@microwiseai/skit/dist/commands/browse.js.map +0 -1
- package/node_modules/@microwiseai/skit/dist/commands/gitignore.js +0 -59
- package/node_modules/@microwiseai/skit/dist/commands/gitignore.js.map +0 -1
- package/node_modules/@microwiseai/skit/dist/commands/info.js +0 -80
- package/node_modules/@microwiseai/skit/dist/commands/info.js.map +0 -1
- package/node_modules/@microwiseai/skit/dist/commands/install.js +0 -150
- package/node_modules/@microwiseai/skit/dist/commands/install.js.map +0 -1
- package/node_modules/@microwiseai/skit/dist/commands/licenses.d.ts +0 -9
- package/node_modules/@microwiseai/skit/dist/commands/licenses.d.ts.map +0 -1
- package/node_modules/@microwiseai/skit/dist/commands/licenses.js +0 -125
- package/node_modules/@microwiseai/skit/dist/commands/licenses.js.map +0 -1
- package/node_modules/@microwiseai/skit/dist/commands/list.js +0 -41
- package/node_modules/@microwiseai/skit/dist/commands/list.js.map +0 -1
- package/node_modules/@microwiseai/skit/dist/commands/login.d.ts +0 -10
- package/node_modules/@microwiseai/skit/dist/commands/login.d.ts.map +0 -1
- package/node_modules/@microwiseai/skit/dist/commands/login.js +0 -112
- package/node_modules/@microwiseai/skit/dist/commands/login.js.map +0 -1
- package/node_modules/@microwiseai/skit/dist/commands/logout.d.ts +0 -5
- package/node_modules/@microwiseai/skit/dist/commands/logout.d.ts.map +0 -1
- package/node_modules/@microwiseai/skit/dist/commands/logout.js +0 -30
- package/node_modules/@microwiseai/skit/dist/commands/logout.js.map +0 -1
- package/node_modules/@microwiseai/skit/dist/commands/pack.js +0 -185
- package/node_modules/@microwiseai/skit/dist/commands/pack.js.map +0 -1
- package/node_modules/@microwiseai/skit/dist/commands/publish.js +0 -108
- package/node_modules/@microwiseai/skit/dist/commands/publish.js.map +0 -1
- package/node_modules/@microwiseai/skit/dist/commands/purchase.d.ts +0 -9
- package/node_modules/@microwiseai/skit/dist/commands/purchase.d.ts.map +0 -1
- package/node_modules/@microwiseai/skit/dist/commands/purchase.js +0 -160
- package/node_modules/@microwiseai/skit/dist/commands/purchase.js.map +0 -1
- package/node_modules/@microwiseai/skit/dist/commands/register.d.ts +0 -10
- package/node_modules/@microwiseai/skit/dist/commands/register.d.ts.map +0 -1
- package/node_modules/@microwiseai/skit/dist/commands/register.js +0 -121
- package/node_modules/@microwiseai/skit/dist/commands/register.js.map +0 -1
- package/node_modules/@microwiseai/skit/dist/commands/uninstall.js +0 -138
- package/node_modules/@microwiseai/skit/dist/commands/uninstall.js.map +0 -1
- package/node_modules/@microwiseai/skit/dist/commands/whoami.d.ts +0 -9
- package/node_modules/@microwiseai/skit/dist/commands/whoami.d.ts.map +0 -1
- package/node_modules/@microwiseai/skit/dist/commands/whoami.js +0 -79
- package/node_modules/@microwiseai/skit/dist/commands/whoami.js.map +0 -1
- package/node_modules/@microwiseai/skit/dist/index.js.map +0 -1
- package/node_modules/@microwiseai/skit/dist/lib.js.map +0 -1
- package/node_modules/@microwiseai/skit/dist/types/skit.js +0 -20
- package/node_modules/@microwiseai/skit/dist/types/skit.js.map +0 -1
- package/node_modules/@microwiseai/skit/dist/utils/api.d.ts +0 -18
- package/node_modules/@microwiseai/skit/dist/utils/api.d.ts.map +0 -1
- package/node_modules/@microwiseai/skit/dist/utils/api.js +0 -26
- package/node_modules/@microwiseai/skit/dist/utils/api.js.map +0 -1
- package/node_modules/@microwiseai/skit/dist/utils/auth.d.ts +0 -62
- package/node_modules/@microwiseai/skit/dist/utils/auth.d.ts.map +0 -1
- package/node_modules/@microwiseai/skit/dist/utils/auth.js +0 -172
- package/node_modules/@microwiseai/skit/dist/utils/auth.js.map +0 -1
- package/node_modules/@microwiseai/skit/dist/utils/file-copy.js +0 -219
- package/node_modules/@microwiseai/skit/dist/utils/file-copy.js.map +0 -1
- package/node_modules/@microwiseai/skit/dist/utils/hook-installer.js +0 -98
- package/node_modules/@microwiseai/skit/dist/utils/hook-installer.js.map +0 -1
- package/node_modules/@microwiseai/skit/dist/utils/installed-registry.js +0 -108
- package/node_modules/@microwiseai/skit/dist/utils/installed-registry.js.map +0 -1
- package/node_modules/@microwiseai/skit/dist/utils/skit-parser.js +0 -52
- package/node_modules/@microwiseai/skit/dist/utils/skit-parser.js.map +0 -1
- package/node_modules/@microwiseai/skit/dist/utils/wrapper-generator.d.ts +0 -74
- package/node_modules/@microwiseai/skit/dist/utils/wrapper-generator.d.ts.map +0 -1
- package/node_modules/@microwiseai/skit/dist/utils/wrapper-generator.js +0 -280
- package/node_modules/@microwiseai/skit/dist/utils/wrapper-generator.js.map +0 -1
- package/node_modules/chownr/LICENSE.md +0 -63
- package/node_modules/chownr/README.md +0 -3
- package/node_modules/chownr/dist/commonjs/index.d.ts +0 -3
- package/node_modules/chownr/dist/commonjs/index.d.ts.map +0 -1
- package/node_modules/chownr/dist/commonjs/index.js +0 -93
- package/node_modules/chownr/dist/commonjs/index.js.map +0 -1
- package/node_modules/chownr/dist/commonjs/package.json +0 -3
- package/node_modules/chownr/dist/esm/index.d.ts +0 -3
- package/node_modules/chownr/dist/esm/index.d.ts.map +0 -1
- package/node_modules/chownr/dist/esm/index.js +0 -85
- package/node_modules/chownr/dist/esm/index.js.map +0 -1
- package/node_modules/chownr/dist/esm/package.json +0 -3
- package/node_modules/chownr/package.json +0 -69
- package/node_modules/commander/LICENSE +0 -22
- package/node_modules/commander/Readme.md +0 -1157
- package/node_modules/commander/esm.mjs +0 -16
- package/node_modules/commander/index.js +0 -24
- package/node_modules/commander/lib/argument.js +0 -149
- package/node_modules/commander/lib/command.js +0 -2509
- package/node_modules/commander/lib/error.js +0 -39
- package/node_modules/commander/lib/help.js +0 -520
- package/node_modules/commander/lib/option.js +0 -330
- package/node_modules/commander/lib/suggestSimilar.js +0 -101
- package/node_modules/commander/package-support.json +0 -16
- package/node_modules/commander/package.json +0 -84
- package/node_modules/commander/typings/esm.d.mts +0 -3
- package/node_modules/commander/typings/index.d.ts +0 -969
- package/node_modules/minipass/LICENSE.md +0 -55
- package/node_modules/minipass/README.md +0 -825
- package/node_modules/minipass/dist/commonjs/index.d.ts +0 -545
- package/node_modules/minipass/dist/commonjs/index.d.ts.map +0 -1
- package/node_modules/minipass/dist/commonjs/index.js +0 -1038
- package/node_modules/minipass/dist/commonjs/index.js.map +0 -1
- package/node_modules/minipass/dist/commonjs/package.json +0 -3
- package/node_modules/minipass/dist/esm/index.d.ts +0 -545
- package/node_modules/minipass/dist/esm/index.d.ts.map +0 -1
- package/node_modules/minipass/dist/esm/index.js +0 -1020
- package/node_modules/minipass/dist/esm/index.js.map +0 -1
- package/node_modules/minipass/dist/esm/package.json +0 -3
- package/node_modules/minipass/package.json +0 -77
- package/node_modules/minizlib/LICENSE +0 -26
- package/node_modules/minizlib/README.md +0 -64
- package/node_modules/minizlib/dist/commonjs/constants.d.ts +0 -2
- package/node_modules/minizlib/dist/commonjs/constants.d.ts.map +0 -1
- package/node_modules/minizlib/dist/commonjs/constants.js +0 -123
- package/node_modules/minizlib/dist/commonjs/constants.js.map +0 -1
- package/node_modules/minizlib/dist/commonjs/index.d.ts +0 -99
- package/node_modules/minizlib/dist/commonjs/index.d.ts.map +0 -1
- package/node_modules/minizlib/dist/commonjs/index.js +0 -416
- package/node_modules/minizlib/dist/commonjs/index.js.map +0 -1
- package/node_modules/minizlib/dist/commonjs/package.json +0 -3
- package/node_modules/minizlib/dist/esm/constants.d.ts +0 -2
- package/node_modules/minizlib/dist/esm/constants.d.ts.map +0 -1
- package/node_modules/minizlib/dist/esm/constants.js +0 -117
- package/node_modules/minizlib/dist/esm/constants.js.map +0 -1
- package/node_modules/minizlib/dist/esm/index.d.ts +0 -99
- package/node_modules/minizlib/dist/esm/index.d.ts.map +0 -1
- package/node_modules/minizlib/dist/esm/index.js +0 -363
- package/node_modules/minizlib/dist/esm/index.js.map +0 -1
- package/node_modules/minizlib/dist/esm/package.json +0 -3
- package/node_modules/minizlib/package.json +0 -80
- package/node_modules/tar/LICENSE.md +0 -55
- package/node_modules/tar/README.md +0 -1224
- package/node_modules/tar/dist/commonjs/create.d.ts +0 -3
- package/node_modules/tar/dist/commonjs/create.d.ts.map +0 -1
- package/node_modules/tar/dist/commonjs/create.js +0 -82
- package/node_modules/tar/dist/commonjs/create.js.map +0 -1
- package/node_modules/tar/dist/commonjs/cwd-error.d.ts +0 -8
- package/node_modules/tar/dist/commonjs/cwd-error.d.ts.map +0 -1
- package/node_modules/tar/dist/commonjs/cwd-error.js +0 -18
- package/node_modules/tar/dist/commonjs/cwd-error.js.map +0 -1
- package/node_modules/tar/dist/commonjs/extract.d.ts +0 -3
- package/node_modules/tar/dist/commonjs/extract.d.ts.map +0 -1
- package/node_modules/tar/dist/commonjs/extract.js +0 -88
- package/node_modules/tar/dist/commonjs/extract.js.map +0 -1
- package/node_modules/tar/dist/commonjs/get-write-flag.d.ts +0 -2
- package/node_modules/tar/dist/commonjs/get-write-flag.d.ts.map +0 -1
- package/node_modules/tar/dist/commonjs/get-write-flag.js +0 -32
- package/node_modules/tar/dist/commonjs/get-write-flag.js.map +0 -1
- package/node_modules/tar/dist/commonjs/header.d.ts +0 -53
- package/node_modules/tar/dist/commonjs/header.d.ts.map +0 -1
- package/node_modules/tar/dist/commonjs/header.js +0 -312
- package/node_modules/tar/dist/commonjs/header.js.map +0 -1
- package/node_modules/tar/dist/commonjs/index.d.ts +0 -20
- package/node_modules/tar/dist/commonjs/index.d.ts.map +0 -1
- package/node_modules/tar/dist/commonjs/index.js +0 -64
- package/node_modules/tar/dist/commonjs/index.js.map +0 -1
- package/node_modules/tar/dist/commonjs/index.min.js +0 -4
- package/node_modules/tar/dist/commonjs/index.min.js.map +0 -7
- package/node_modules/tar/dist/commonjs/large-numbers.d.ts +0 -3
- package/node_modules/tar/dist/commonjs/large-numbers.d.ts.map +0 -1
- package/node_modules/tar/dist/commonjs/large-numbers.js +0 -99
- package/node_modules/tar/dist/commonjs/large-numbers.js.map +0 -1
- package/node_modules/tar/dist/commonjs/list.d.ts +0 -7
- package/node_modules/tar/dist/commonjs/list.d.ts.map +0 -1
- package/node_modules/tar/dist/commonjs/list.js +0 -145
- package/node_modules/tar/dist/commonjs/list.js.map +0 -1
- package/node_modules/tar/dist/commonjs/make-command.d.ts +0 -49
- package/node_modules/tar/dist/commonjs/make-command.d.ts.map +0 -1
- package/node_modules/tar/dist/commonjs/make-command.js +0 -52
- package/node_modules/tar/dist/commonjs/make-command.js.map +0 -1
- package/node_modules/tar/dist/commonjs/mkdir.d.ts +0 -25
- package/node_modules/tar/dist/commonjs/mkdir.d.ts.map +0 -1
- package/node_modules/tar/dist/commonjs/mkdir.js +0 -187
- package/node_modules/tar/dist/commonjs/mkdir.js.map +0 -1
- package/node_modules/tar/dist/commonjs/mode-fix.d.ts +0 -2
- package/node_modules/tar/dist/commonjs/mode-fix.d.ts.map +0 -1
- package/node_modules/tar/dist/commonjs/mode-fix.js +0 -29
- package/node_modules/tar/dist/commonjs/mode-fix.js.map +0 -1
- package/node_modules/tar/dist/commonjs/normalize-unicode.d.ts +0 -2
- package/node_modules/tar/dist/commonjs/normalize-unicode.d.ts.map +0 -1
- package/node_modules/tar/dist/commonjs/normalize-unicode.js +0 -38
- package/node_modules/tar/dist/commonjs/normalize-unicode.js.map +0 -1
- package/node_modules/tar/dist/commonjs/normalize-windows-path.d.ts +0 -2
- package/node_modules/tar/dist/commonjs/normalize-windows-path.d.ts.map +0 -1
- package/node_modules/tar/dist/commonjs/normalize-windows-path.js +0 -12
- package/node_modules/tar/dist/commonjs/normalize-windows-path.js.map +0 -1
- package/node_modules/tar/dist/commonjs/options.d.ts +0 -596
- package/node_modules/tar/dist/commonjs/options.d.ts.map +0 -1
- package/node_modules/tar/dist/commonjs/options.js +0 -66
- package/node_modules/tar/dist/commonjs/options.js.map +0 -1
- package/node_modules/tar/dist/commonjs/pack.d.ts +0 -102
- package/node_modules/tar/dist/commonjs/pack.d.ts.map +0 -1
- package/node_modules/tar/dist/commonjs/pack.js +0 -511
- package/node_modules/tar/dist/commonjs/pack.js.map +0 -1
- package/node_modules/tar/dist/commonjs/package.json +0 -3
- package/node_modules/tar/dist/commonjs/parse.d.ts +0 -85
- package/node_modules/tar/dist/commonjs/parse.d.ts.map +0 -1
- package/node_modules/tar/dist/commonjs/parse.js +0 -610
- package/node_modules/tar/dist/commonjs/parse.js.map +0 -1
- package/node_modules/tar/dist/commonjs/path-reservations.d.ts +0 -11
- package/node_modules/tar/dist/commonjs/path-reservations.d.ts.map +0 -1
- package/node_modules/tar/dist/commonjs/path-reservations.js +0 -170
- package/node_modules/tar/dist/commonjs/path-reservations.js.map +0 -1
- package/node_modules/tar/dist/commonjs/pax.d.ts +0 -26
- package/node_modules/tar/dist/commonjs/pax.d.ts.map +0 -1
- package/node_modules/tar/dist/commonjs/pax.js +0 -158
- package/node_modules/tar/dist/commonjs/pax.js.map +0 -1
- package/node_modules/tar/dist/commonjs/process-umask.d.ts +0 -2
- package/node_modules/tar/dist/commonjs/process-umask.d.ts.map +0 -1
- package/node_modules/tar/dist/commonjs/process-umask.js +0 -7
- package/node_modules/tar/dist/commonjs/process-umask.js.map +0 -1
- package/node_modules/tar/dist/commonjs/read-entry.d.ts +0 -36
- package/node_modules/tar/dist/commonjs/read-entry.d.ts.map +0 -1
- package/node_modules/tar/dist/commonjs/read-entry.js +0 -136
- package/node_modules/tar/dist/commonjs/read-entry.js.map +0 -1
- package/node_modules/tar/dist/commonjs/replace.d.ts +0 -2
- package/node_modules/tar/dist/commonjs/replace.d.ts.map +0 -1
- package/node_modules/tar/dist/commonjs/replace.js +0 -227
- package/node_modules/tar/dist/commonjs/replace.js.map +0 -1
- package/node_modules/tar/dist/commonjs/strip-absolute-path.d.ts +0 -2
- package/node_modules/tar/dist/commonjs/strip-absolute-path.d.ts.map +0 -1
- package/node_modules/tar/dist/commonjs/strip-absolute-path.js +0 -29
- package/node_modules/tar/dist/commonjs/strip-absolute-path.js.map +0 -1
- package/node_modules/tar/dist/commonjs/strip-trailing-slashes.d.ts +0 -2
- package/node_modules/tar/dist/commonjs/strip-trailing-slashes.d.ts.map +0 -1
- package/node_modules/tar/dist/commonjs/strip-trailing-slashes.js +0 -18
- package/node_modules/tar/dist/commonjs/strip-trailing-slashes.js.map +0 -1
- package/node_modules/tar/dist/commonjs/symlink-error.d.ts +0 -9
- package/node_modules/tar/dist/commonjs/symlink-error.d.ts.map +0 -1
- package/node_modules/tar/dist/commonjs/symlink-error.js +0 -19
- package/node_modules/tar/dist/commonjs/symlink-error.js.map +0 -1
- package/node_modules/tar/dist/commonjs/types.d.ts +0 -7
- package/node_modules/tar/dist/commonjs/types.d.ts.map +0 -1
- package/node_modules/tar/dist/commonjs/types.js +0 -50
- package/node_modules/tar/dist/commonjs/types.js.map +0 -1
- package/node_modules/tar/dist/commonjs/unpack.d.ts +0 -101
- package/node_modules/tar/dist/commonjs/unpack.d.ts.map +0 -1
- package/node_modules/tar/dist/commonjs/unpack.js +0 -932
- package/node_modules/tar/dist/commonjs/unpack.js.map +0 -1
- package/node_modules/tar/dist/commonjs/update.d.ts +0 -2
- package/node_modules/tar/dist/commonjs/update.d.ts.map +0 -1
- package/node_modules/tar/dist/commonjs/update.js +0 -33
- package/node_modules/tar/dist/commonjs/update.js.map +0 -1
- package/node_modules/tar/dist/commonjs/warn-method.d.ts +0 -24
- package/node_modules/tar/dist/commonjs/warn-method.d.ts.map +0 -1
- package/node_modules/tar/dist/commonjs/warn-method.js +0 -31
- package/node_modules/tar/dist/commonjs/warn-method.js.map +0 -1
- package/node_modules/tar/dist/commonjs/winchars.d.ts +0 -3
- package/node_modules/tar/dist/commonjs/winchars.d.ts.map +0 -1
- package/node_modules/tar/dist/commonjs/winchars.js +0 -14
- package/node_modules/tar/dist/commonjs/winchars.js.map +0 -1
- package/node_modules/tar/dist/commonjs/write-entry.d.ts +0 -129
- package/node_modules/tar/dist/commonjs/write-entry.d.ts.map +0 -1
- package/node_modules/tar/dist/commonjs/write-entry.js +0 -698
- package/node_modules/tar/dist/commonjs/write-entry.js.map +0 -1
- package/node_modules/tar/dist/esm/create.d.ts +0 -3
- package/node_modules/tar/dist/esm/create.d.ts.map +0 -1
- package/node_modules/tar/dist/esm/create.js +0 -76
- package/node_modules/tar/dist/esm/create.js.map +0 -1
- package/node_modules/tar/dist/esm/cwd-error.d.ts +0 -8
- package/node_modules/tar/dist/esm/cwd-error.d.ts.map +0 -1
- package/node_modules/tar/dist/esm/cwd-error.js +0 -14
- package/node_modules/tar/dist/esm/cwd-error.js.map +0 -1
- package/node_modules/tar/dist/esm/extract.d.ts +0 -3
- package/node_modules/tar/dist/esm/extract.d.ts.map +0 -1
- package/node_modules/tar/dist/esm/extract.js +0 -49
- package/node_modules/tar/dist/esm/extract.js.map +0 -1
- package/node_modules/tar/dist/esm/get-write-flag.d.ts +0 -2
- package/node_modules/tar/dist/esm/get-write-flag.d.ts.map +0 -1
- package/node_modules/tar/dist/esm/get-write-flag.js +0 -26
- package/node_modules/tar/dist/esm/get-write-flag.js.map +0 -1
- package/node_modules/tar/dist/esm/header.d.ts +0 -53
- package/node_modules/tar/dist/esm/header.d.ts.map +0 -1
- package/node_modules/tar/dist/esm/header.js +0 -275
- package/node_modules/tar/dist/esm/header.js.map +0 -1
- package/node_modules/tar/dist/esm/index.d.ts +0 -20
- package/node_modules/tar/dist/esm/index.d.ts.map +0 -1
- package/node_modules/tar/dist/esm/index.js +0 -20
- package/node_modules/tar/dist/esm/index.js.map +0 -1
- package/node_modules/tar/dist/esm/index.min.js +0 -4
- package/node_modules/tar/dist/esm/index.min.js.map +0 -7
- package/node_modules/tar/dist/esm/large-numbers.d.ts +0 -3
- package/node_modules/tar/dist/esm/large-numbers.d.ts.map +0 -1
- package/node_modules/tar/dist/esm/large-numbers.js +0 -94
- package/node_modules/tar/dist/esm/large-numbers.js.map +0 -1
- package/node_modules/tar/dist/esm/list.d.ts +0 -7
- package/node_modules/tar/dist/esm/list.d.ts.map +0 -1
- package/node_modules/tar/dist/esm/list.js +0 -105
- package/node_modules/tar/dist/esm/list.js.map +0 -1
- package/node_modules/tar/dist/esm/make-command.d.ts +0 -49
- package/node_modules/tar/dist/esm/make-command.d.ts.map +0 -1
- package/node_modules/tar/dist/esm/make-command.js +0 -48
- package/node_modules/tar/dist/esm/make-command.js.map +0 -1
- package/node_modules/tar/dist/esm/mkdir.d.ts +0 -25
- package/node_modules/tar/dist/esm/mkdir.d.ts.map +0 -1
- package/node_modules/tar/dist/esm/mkdir.js +0 -179
- package/node_modules/tar/dist/esm/mkdir.js.map +0 -1
- package/node_modules/tar/dist/esm/mode-fix.d.ts +0 -2
- package/node_modules/tar/dist/esm/mode-fix.d.ts.map +0 -1
- package/node_modules/tar/dist/esm/mode-fix.js +0 -25
- package/node_modules/tar/dist/esm/mode-fix.js.map +0 -1
- package/node_modules/tar/dist/esm/normalize-unicode.d.ts +0 -2
- package/node_modules/tar/dist/esm/normalize-unicode.d.ts.map +0 -1
- package/node_modules/tar/dist/esm/normalize-unicode.js +0 -34
- package/node_modules/tar/dist/esm/normalize-unicode.js.map +0 -1
- package/node_modules/tar/dist/esm/normalize-windows-path.d.ts +0 -2
- package/node_modules/tar/dist/esm/normalize-windows-path.d.ts.map +0 -1
- package/node_modules/tar/dist/esm/normalize-windows-path.js +0 -9
- package/node_modules/tar/dist/esm/normalize-windows-path.js.map +0 -1
- package/node_modules/tar/dist/esm/options.d.ts +0 -596
- package/node_modules/tar/dist/esm/options.d.ts.map +0 -1
- package/node_modules/tar/dist/esm/options.js +0 -54
- package/node_modules/tar/dist/esm/options.js.map +0 -1
- package/node_modules/tar/dist/esm/pack.d.ts +0 -102
- package/node_modules/tar/dist/esm/pack.d.ts.map +0 -1
- package/node_modules/tar/dist/esm/pack.js +0 -469
- package/node_modules/tar/dist/esm/pack.js.map +0 -1
- package/node_modules/tar/dist/esm/package.json +0 -3
- package/node_modules/tar/dist/esm/parse.d.ts +0 -85
- package/node_modules/tar/dist/esm/parse.d.ts.map +0 -1
- package/node_modules/tar/dist/esm/parse.js +0 -606
- package/node_modules/tar/dist/esm/parse.js.map +0 -1
- package/node_modules/tar/dist/esm/path-reservations.d.ts +0 -11
- package/node_modules/tar/dist/esm/path-reservations.d.ts.map +0 -1
- package/node_modules/tar/dist/esm/path-reservations.js +0 -166
- package/node_modules/tar/dist/esm/path-reservations.js.map +0 -1
- package/node_modules/tar/dist/esm/pax.d.ts +0 -26
- package/node_modules/tar/dist/esm/pax.d.ts.map +0 -1
- package/node_modules/tar/dist/esm/pax.js +0 -154
- package/node_modules/tar/dist/esm/pax.js.map +0 -1
- package/node_modules/tar/dist/esm/process-umask.d.ts +0 -2
- package/node_modules/tar/dist/esm/process-umask.d.ts.map +0 -1
- package/node_modules/tar/dist/esm/process-umask.js +0 -3
- package/node_modules/tar/dist/esm/process-umask.js.map +0 -1
- package/node_modules/tar/dist/esm/read-entry.d.ts +0 -36
- package/node_modules/tar/dist/esm/read-entry.d.ts.map +0 -1
- package/node_modules/tar/dist/esm/read-entry.js +0 -132
- package/node_modules/tar/dist/esm/read-entry.js.map +0 -1
- package/node_modules/tar/dist/esm/replace.d.ts +0 -2
- package/node_modules/tar/dist/esm/replace.d.ts.map +0 -1
- package/node_modules/tar/dist/esm/replace.js +0 -221
- package/node_modules/tar/dist/esm/replace.js.map +0 -1
- package/node_modules/tar/dist/esm/strip-absolute-path.d.ts +0 -2
- package/node_modules/tar/dist/esm/strip-absolute-path.d.ts.map +0 -1
- package/node_modules/tar/dist/esm/strip-absolute-path.js +0 -25
- package/node_modules/tar/dist/esm/strip-absolute-path.js.map +0 -1
- package/node_modules/tar/dist/esm/strip-trailing-slashes.d.ts +0 -2
- package/node_modules/tar/dist/esm/strip-trailing-slashes.d.ts.map +0 -1
- package/node_modules/tar/dist/esm/strip-trailing-slashes.js +0 -14
- package/node_modules/tar/dist/esm/strip-trailing-slashes.js.map +0 -1
- package/node_modules/tar/dist/esm/symlink-error.d.ts +0 -9
- package/node_modules/tar/dist/esm/symlink-error.d.ts.map +0 -1
- package/node_modules/tar/dist/esm/symlink-error.js +0 -15
- package/node_modules/tar/dist/esm/symlink-error.js.map +0 -1
- package/node_modules/tar/dist/esm/types.d.ts +0 -7
- package/node_modules/tar/dist/esm/types.d.ts.map +0 -1
- package/node_modules/tar/dist/esm/types.js +0 -45
- package/node_modules/tar/dist/esm/types.js.map +0 -1
- package/node_modules/tar/dist/esm/unpack.d.ts +0 -101
- package/node_modules/tar/dist/esm/unpack.d.ts.map +0 -1
- package/node_modules/tar/dist/esm/unpack.js +0 -891
- package/node_modules/tar/dist/esm/unpack.js.map +0 -1
- package/node_modules/tar/dist/esm/update.d.ts +0 -2
- package/node_modules/tar/dist/esm/update.d.ts.map +0 -1
- package/node_modules/tar/dist/esm/update.js +0 -30
- package/node_modules/tar/dist/esm/update.js.map +0 -1
- package/node_modules/tar/dist/esm/warn-method.d.ts +0 -24
- package/node_modules/tar/dist/esm/warn-method.d.ts.map +0 -1
- package/node_modules/tar/dist/esm/warn-method.js +0 -27
- package/node_modules/tar/dist/esm/warn-method.js.map +0 -1
- package/node_modules/tar/dist/esm/winchars.d.ts +0 -3
- package/node_modules/tar/dist/esm/winchars.d.ts.map +0 -1
- package/node_modules/tar/dist/esm/winchars.js +0 -9
- package/node_modules/tar/dist/esm/winchars.js.map +0 -1
- package/node_modules/tar/dist/esm/write-entry.d.ts +0 -129
- package/node_modules/tar/dist/esm/write-entry.d.ts.map +0 -1
- package/node_modules/tar/dist/esm/write-entry.js +0 -656
- package/node_modules/tar/dist/esm/write-entry.js.map +0 -1
- package/node_modules/tar/package.json +0 -297
- package/node_modules/yallist/LICENSE.md +0 -63
- package/node_modules/yallist/README.md +0 -205
- package/node_modules/yallist/dist/commonjs/index.d.ts +0 -39
- package/node_modules/yallist/dist/commonjs/index.d.ts.map +0 -1
- package/node_modules/yallist/dist/commonjs/index.js +0 -384
- package/node_modules/yallist/dist/commonjs/index.js.map +0 -1
- package/node_modules/yallist/dist/commonjs/package.json +0 -3
- package/node_modules/yallist/dist/esm/index.d.ts +0 -39
- package/node_modules/yallist/dist/esm/index.d.ts.map +0 -1
- package/node_modules/yallist/dist/esm/index.js +0 -379
- package/node_modules/yallist/dist/esm/index.js.map +0 -1
- package/node_modules/yallist/dist/esm/package.json +0 -3
- package/node_modules/yallist/package.json +0 -68
|
@@ -4,31 +4,325 @@
|
|
|
4
4
|
* Programmatic access to skit installation functionality.
|
|
5
5
|
* Designed for use by other packages that need to install skits programmatically.
|
|
6
6
|
*/
|
|
7
|
-
|
|
7
|
+
export declare const REGISTRY_PROXY_URL = "https://registry-proxy.sisung-kim1.workers.dev";
|
|
8
|
+
import { type InstallSummary, type SkitManifest, type NpmDependencySpec, type NpmDependencySource, type ScopeRegistryMapping, POLICY_NAME_PATTERN, isValidPolicyName, readManifestPolicy } from './types/skit.js';
|
|
9
|
+
import { resolveGenericTarget, execFetchGeneric } from '@glpkg/cli';
|
|
10
|
+
import { type DepsMode, type DepPlanEntry, type DeclaredDep } from './utils/dep-plan.js';
|
|
8
11
|
import { type InstalledRegistry, type InstalledKit } from './utils/installed-registry.js';
|
|
9
12
|
/**
|
|
10
|
-
*
|
|
11
|
-
*
|
|
13
|
+
* Resolve the registry/proxy base URL via the P1 generalization chain
|
|
14
|
+
* (docs/p1-registry-generalization-design.md). Precedence, highest first:
|
|
15
|
+
* ① `IST_REGISTRY_URL` env — the shared cross-tool override (installer).
|
|
16
|
+
* ② `SKIT_REGISTRY` env — legacy alias (installer; preserves prior behavior).
|
|
17
|
+
* ③ `~/.config/skit/config.json` `registryUrl` — installer config file.
|
|
18
|
+
* ④ built-in `REGISTRY_PROXY_URL` — last-resort fallback (backward-compatible).
|
|
19
|
+
*
|
|
20
|
+
* Each layer is FAIL-SOFT: an empty/blank value is skipped, and a non-http(s)
|
|
21
|
+
* value is skipped with a single warning (never throws, never a broken install)
|
|
22
|
+
* — resolution falls through to the next layer. With no env and no config file,
|
|
23
|
+
* this returns `REGISTRY_PROXY_URL` verbatim, so the zero-config microwiseai flow
|
|
24
|
+
* is 100% unchanged. @internal Exported for testing
|
|
12
25
|
*/
|
|
13
26
|
export declare function getRegistryUrl(): string;
|
|
27
|
+
/** Built-in GitLab host fallback — last resort of getGitlabHost's chain (P2 #4). */
|
|
28
|
+
export declare const DEFAULT_GITLAB_HOST = "gitlab.com";
|
|
29
|
+
/**
|
|
30
|
+
* Resolve the GitLab host via the P2 chain (installer axis), highest first:
|
|
31
|
+
* ① `IST_GITLAB_HOST` env — shared cross-tool override.
|
|
32
|
+
* ② `~/.config/skit/config.json` `gitlabHost`.
|
|
33
|
+
* ③ built-in `DEFAULT_GITLAB_HOST` ('gitlab.com').
|
|
34
|
+
*
|
|
35
|
+
* FAIL-SOFT (P1 pattern): blank values are skipped; a value carrying a scheme is
|
|
36
|
+
* accepted but normalized to the bare host WITH a warning (glpkg wants a bare
|
|
37
|
+
* host); a value that normalizes to empty is skipped with a warning. With no env
|
|
38
|
+
* and no config, returns 'gitlab.com' — backward-compatible.
|
|
39
|
+
*
|
|
40
|
+
* ⚠ P2 T1 STATUS: this resolver is CORRECT and tested, but its result is NOT yet
|
|
41
|
+
* consumed end-to-end for the kit download — glpkg's `resolveGenericTarget`
|
|
42
|
+
* derives the host from its own ConfigManager scope-mapping and exposes no host
|
|
43
|
+
* override, and `@glpkg/cli` exports no ConfigManager for skit to synthesize one.
|
|
44
|
+
* So on the gitlab-direct path the host is INERT until T2 (glpkg). @internal
|
|
45
|
+
*/
|
|
46
|
+
export declare function getGitlabHost(): string;
|
|
47
|
+
/**
|
|
48
|
+
* Resolve the effective GitLab group NAME via the P2 chain, highest first:
|
|
49
|
+
* ① manifest `registry[scope].group` — AUTHOR axis, per-scope (when available).
|
|
50
|
+
* ② `IST_GITLAB_GROUP` env — installer default.
|
|
51
|
+
* ③ `~/.config/skit/config.json` `gitlabGroup` — installer config default.
|
|
52
|
+
* ④ `undefined` — caller/glpkg falls back to its bundled-scope-map.
|
|
53
|
+
*
|
|
54
|
+
* Returns a NAME only (never a numeric id — id resolution is glpkg's job, T2).
|
|
55
|
+
* `registry`/`scope` are optional because at kit-DOWNLOAD time the manifest is
|
|
56
|
+
* not yet parsed (chicken-and-egg, cf. P1 §0), so the author layer only applies
|
|
57
|
+
* where a manifest mapping is already in hand.
|
|
58
|
+
*
|
|
59
|
+
* ⚠ P2 T1 STATUS: INERT on the kit-download path for the same reason as
|
|
60
|
+
* getGitlabHost — glpkg's Phase-A resolution does not accept a group override
|
|
61
|
+
* from skit yet (T2). @internal
|
|
62
|
+
*/
|
|
63
|
+
export declare function getGitlabGroup(registry?: ScopeRegistryMapping, scope?: string): string | undefined;
|
|
64
|
+
/**
|
|
65
|
+
* The ONE GitLab group setting for kit downloads and CLI installs:
|
|
66
|
+
* `--group` > IST_GITLAB_GROUP > skit config `gitlabGroup`. No scope→group
|
|
67
|
+
* table or inference (glpkg removed scope mapping; skit does not re-add it).
|
|
68
|
+
*/
|
|
69
|
+
export declare function resolveGitlabGroupSetting(optsGroup?: string): string | undefined;
|
|
70
|
+
/** Guidance when no group is set (kit download / CLI install). */
|
|
71
|
+
export declare const GITLAB_GROUP_HINT = "Set it once with 'skit config set gitlabGroup <group>', or pass '--group <group>' (or IST_GITLAB_GROUP).";
|
|
14
72
|
/**
|
|
15
73
|
* Get session ID (provided by snapshot)
|
|
16
74
|
* skit does NOT know LICENSE_KEY - only SESSION_ID
|
|
17
75
|
* @internal Exported for testing
|
|
18
76
|
*/
|
|
19
77
|
export declare function getSessionId(): string | undefined;
|
|
78
|
+
/**
|
|
79
|
+
* Registry source selection (glpkg FROZEN contract `--source gitlab|proxy`).
|
|
80
|
+
* - 'gitlab': install directly from the GitLab group registry (needs a token/PAT)
|
|
81
|
+
* - 'proxy': install via the registry-proxy (anonymous/Bearer; server-gated)
|
|
82
|
+
*/
|
|
83
|
+
export type InstallSource = 'gitlab' | 'proxy';
|
|
84
|
+
/**
|
|
85
|
+
* Parse extra known scopes from the SKIT_REGISTRY_MAPPING env var (CSV).
|
|
86
|
+
*
|
|
87
|
+
* Env-override layer of the group-resolution chain (glpkg ADR §4B.6): lets a user
|
|
88
|
+
* register additional scopes at runtime — routed to the bundled default group —
|
|
89
|
+
* without a code change. Revived (was a stale test in C1) as the chosen home for
|
|
90
|
+
* env-level scope overrides; the manifest `glpkg.groups` block (§4C) covers the
|
|
91
|
+
* committed/per-project case.
|
|
92
|
+
*
|
|
93
|
+
* Rule: comma-split → trim each → drop empties.
|
|
94
|
+
* @internal Exported for testing
|
|
95
|
+
*/
|
|
96
|
+
export declare function getScopesFromEnv(): string[];
|
|
20
97
|
export type { SkitManifest, SkitComponent, SkitCli, SkitComponents, InstallSummary, InstallResult, } from './types/skit.js';
|
|
21
98
|
export type { InstalledKit, InstalledRegistry } from './utils/installed-registry.js';
|
|
99
|
+
export type { DepsMode, DepAction, DepWarning, DepPlanEntry } from './utils/dep-plan.js';
|
|
100
|
+
export { DEPS_MODES, DEFAULT_DEPS_MODE, parseDepsMode, formatDepPlan, decideDep, planDeps, } from './utils/dep-plan.js';
|
|
101
|
+
export { POLICY_NAME_PATTERN, isValidPolicyName, readManifestPolicy };
|
|
102
|
+
/** Public npmjs registry — pins npmjs-native scopes (see NPMJS_NATIVE_SCOPES). */
|
|
103
|
+
export declare const NPMJS_REGISTRY = "https://registry.npmjs.org/";
|
|
104
|
+
/**
|
|
105
|
+
* BUILT-IN npmjs-native scopes (default). Scopes whose packages live on public
|
|
106
|
+
* npmjs, NOT the GitLab registry proxy — the proxy serves only GitLab-hosted
|
|
107
|
+
* packages and blocks npm fallback, so these scopes 401 there. skit routes them
|
|
108
|
+
* to npmjs regardless of a manifest's declared `source` (e.g. `@glpkg/cli` is
|
|
109
|
+
* npmjs-native even though the bundled scope map lists `@glpkg` for GitLab group
|
|
110
|
+
* resolution of other artifacts).
|
|
111
|
+
*
|
|
112
|
+
* This is the DEFAULT set; a third party extends it via `SKIT_NPMJS_SCOPES`
|
|
113
|
+
* (see {@link getNpmjsNativeScopes}). Kept exported (and unchanged: `{@glpkg}`)
|
|
114
|
+
* for backward compatibility.
|
|
115
|
+
*/
|
|
116
|
+
export declare const NPMJS_NATIVE_SCOPES: Set<string>;
|
|
117
|
+
/**
|
|
118
|
+
* Parse extra npmjs-native scopes from the `SKIT_NPMJS_SCOPES` env var (CSV).
|
|
119
|
+
* Lets a third party declare their OWN npmjs-published scopes so they route to
|
|
120
|
+
* public npmjs instead of 401ing on the proxy — without a code change. Each
|
|
121
|
+
* entry is trimmed, emptied-dropped, and normalized to a leading `@`.
|
|
122
|
+
* Rule mirrors {@link getScopesFromEnv}. @internal Exported for testing.
|
|
123
|
+
*/
|
|
124
|
+
export declare function getNpmjsScopesFromEnv(): string[];
|
|
125
|
+
/**
|
|
126
|
+
* Effective npmjs-native scope set = built-in {@link NPMJS_NATIVE_SCOPES} ∪
|
|
127
|
+
* `SKIT_NPMJS_SCOPES` env. Read fresh each call (env-driven, like
|
|
128
|
+
* {@link getScopesFromEnv}). With no env set, equals the default — 100%
|
|
129
|
+
* backward-compatible. @internal Exported for testing.
|
|
130
|
+
*/
|
|
131
|
+
export declare function getNpmjsNativeScopes(): Set<string>;
|
|
132
|
+
/**
|
|
133
|
+
* Whether a scope's packages resolve from public npmjs rather than the proxy.
|
|
134
|
+
* Honors both the built-in defaults and the `SKIT_NPMJS_SCOPES` env extension.
|
|
135
|
+
*/
|
|
136
|
+
export declare function isNpmjsNativeScope(scope: string | undefined): boolean;
|
|
137
|
+
/**
|
|
138
|
+
* Resolve a scope to its GitLab group. ([B] de-risk, 2026-08-07) The owner
|
|
139
|
+
* group-id/name hardcode has been REMOVED — group identity now comes ONLY from
|
|
140
|
+
* the manifest `registry` chain (`registry[scope].group`), keeping this a
|
|
141
|
+
* gitlab-direct / index-publish concern and out of the anonymous install path.
|
|
142
|
+
*
|
|
143
|
+
* `groupId` is best-effort 0 (the manifest carries the group NAME, not the
|
|
144
|
+
* numeric id); index/publish callers already treat a 0 id as "unknown".
|
|
145
|
+
* Version enumeration does not use this (it goes through the proxy F1 endpoint,
|
|
146
|
+
* which routes scope→group server-side). Returns undefined when the scope has no
|
|
147
|
+
* declared group. @internal Exported for testing
|
|
148
|
+
*/
|
|
149
|
+
export declare function resolveScopeGroup(scope: string, registry?: ScopeRegistryMapping | Record<string, {
|
|
150
|
+
group?: string;
|
|
151
|
+
}>): {
|
|
152
|
+
name: string;
|
|
153
|
+
id: number;
|
|
154
|
+
} | undefined;
|
|
155
|
+
/**
|
|
156
|
+
* Find the declared GitLab group for a package from a group-keyed mapping
|
|
157
|
+
* (skit.json `glpkg.groups`, §4C). Returns the group name or undefined.
|
|
158
|
+
* @internal Exported for testing
|
|
159
|
+
*/
|
|
160
|
+
export declare function findDeclaredGroup(groups: Record<string, string[]> | undefined, packageName: string): string | undefined;
|
|
161
|
+
/**
|
|
162
|
+
* Build the glpkg command for a generic (kit tarball) download.
|
|
163
|
+
*
|
|
164
|
+
* ★ No hardcoded `--group`: by default group resolution is delegated to glpkg's
|
|
165
|
+
* discovery chain (manifest > persisted > server > bundled map). `--group` is
|
|
166
|
+
* added ONLY as an explicit override; `--source` selects gitlab|proxy when given.
|
|
167
|
+
* @internal Exported for testing
|
|
168
|
+
*/
|
|
169
|
+
export declare function buildGenericDownloadCommand(opts: {
|
|
170
|
+
pkgSpec: string;
|
|
171
|
+
stagingDir: string;
|
|
172
|
+
group?: string;
|
|
173
|
+
source?: InstallSource;
|
|
174
|
+
}): string;
|
|
175
|
+
/**
|
|
176
|
+
* Build the glpkg command to install a CLI tool globally (`-g` = `--global`).
|
|
177
|
+
*
|
|
178
|
+
* glpkg ≥0.16: every package names its source — `--group <g>` (GitLab group;
|
|
179
|
+
* `--source proxy|gitlab` only applies with it) or `--external` (the npm
|
|
180
|
+
* registry). A global install neither reads nor writes `glpkg.lock.json`, so
|
|
181
|
+
* the source must be on the command line every time. `group` undefined ⇒
|
|
182
|
+
* `--external`. See {@link resolveCliInstallGroup}.
|
|
183
|
+
* @internal Exported for testing
|
|
184
|
+
*/
|
|
185
|
+
export declare function buildGlobalInstallCommand(pkgSpec: string, source?: InstallSource, group?: string): string;
|
|
186
|
+
/**
|
|
187
|
+
* GitLab group a CLI package installs from (glpkg ≥0.16 needs it explicitly):
|
|
188
|
+
* - unscoped, or an npmjs-native scope (`@glpkg`, SKIT_NPMJS_SCOPES) → undefined
|
|
189
|
+
* (= `--external`, the npm registry);
|
|
190
|
+
* - else the kit's own `registry[scope].group` (kit data), else the group
|
|
191
|
+
* setting ({@link resolveGitlabGroupSetting}: --group > IST_GITLAB_GROUP >
|
|
192
|
+
* skit config);
|
|
193
|
+
* - none → throws with {@link GITLAB_GROUP_HINT}.
|
|
194
|
+
* @internal Exported for testing
|
|
195
|
+
*/
|
|
196
|
+
export declare function resolveCliInstallGroup(pkgName: string, registry?: ScopeRegistryMapping, optsGroup?: string): string | undefined;
|
|
197
|
+
/**
|
|
198
|
+
* Version metadata returned by the proxy anonymous version-enumeration endpoint
|
|
199
|
+
* (F1 contract, registry-proxy/docs/group-source-install/F1-version-endpoint-contract.md).
|
|
200
|
+
*/
|
|
201
|
+
export interface VersionMetadata {
|
|
202
|
+
name: string;
|
|
203
|
+
/** all versions, semver DESC, deduped */
|
|
204
|
+
versions: string[];
|
|
205
|
+
/** highest STABLE version (npm dist-tag semantics) */
|
|
206
|
+
latest: string;
|
|
207
|
+
/** echoed when ?range= was supplied */
|
|
208
|
+
range?: string;
|
|
209
|
+
/** false => resolve client-side from `versions` */
|
|
210
|
+
rangeSupported?: boolean;
|
|
211
|
+
/** highest version satisfying range, or null */
|
|
212
|
+
resolved?: string | null;
|
|
213
|
+
}
|
|
214
|
+
/**
|
|
215
|
+
* Fetch version metadata from the proxy version-enumeration endpoint (anonymous).
|
|
216
|
+
*
|
|
217
|
+
* Tries the candidate URLs in order (see `versionEndpointCandidates` for why two
|
|
218
|
+
* exist) and returns the first valid 200 `VersionMetadata` body. A 400/404 on one
|
|
219
|
+
* candidate is treated as "wrong shape / not here" and falls through to the next;
|
|
220
|
+
* a network/reach error is surfaced as an error (NOT "no versions").
|
|
221
|
+
*
|
|
222
|
+
* Replaces the former direct GitLab Packages API call (which needed a glpkg
|
|
223
|
+
* token) — version listing is non-sensitive and the proxy serves it anonymously,
|
|
224
|
+
* enabling token-less `latest`/range resolution.
|
|
225
|
+
* @internal Exported for testing
|
|
226
|
+
*/
|
|
227
|
+
export declare function fetchVersionMetadata(packageName: string, range?: string): Promise<VersionMetadata>;
|
|
228
|
+
/**
|
|
229
|
+
* Resolve the latest (highest stable) version of a package via the F1 endpoint.
|
|
230
|
+
* @internal Exported for testing
|
|
231
|
+
*/
|
|
232
|
+
export declare function resolveLatestVersion(packageName: string): Promise<string>;
|
|
233
|
+
/** A failed distkit selection (the `ok: false` arm of `selectVersion`). */
|
|
234
|
+
type KitSelectionFailure = {
|
|
235
|
+
code: string;
|
|
236
|
+
message: string;
|
|
237
|
+
prereleases: readonly string[];
|
|
238
|
+
};
|
|
239
|
+
/**
|
|
240
|
+
* skit-worded message for a failed version selection (distkit `selectVersion`
|
|
241
|
+
* on the proxy route, glpkg's — same distkit — on the gitlab route). The hints
|
|
242
|
+
* name `skit` commands, never `glpkg`.
|
|
243
|
+
* @internal Exported for testing
|
|
244
|
+
*/
|
|
245
|
+
export declare function formatKitSelectionFailure(packageName: string, spec: string | undefined, f: KitSelectionFailure): string;
|
|
246
|
+
/**
|
|
247
|
+
* Pick ONE kit version from a registry's list — distkit `selectVersion`
|
|
248
|
+
* (strategy `stable-default`), called DIRECTLY (ADR 0001; never via a glpkg
|
|
249
|
+
* re-export):
|
|
250
|
+
* - unspecified / `latest` → highest stable; no stable at all → error that lists
|
|
251
|
+
* the prereleases;
|
|
252
|
+
* - range → highest STABLE in range (a range never selects a prerelease, even
|
|
253
|
+
* one that names a prerelease, e.g. `>=0.11.0-dev.0` → NO_MATCH);
|
|
254
|
+
* - exact (prerelease allowed) → only if published.
|
|
255
|
+
* Throws a skit-worded error ({@link formatKitSelectionFailure}).
|
|
256
|
+
* @internal Exported for testing
|
|
257
|
+
*/
|
|
258
|
+
export declare function selectKitVersion(available: readonly string[], packageName: string, spec?: string): string;
|
|
259
|
+
/**
|
|
260
|
+
* Resolve a requested version string (latest | exact | range) to a concrete
|
|
261
|
+
* version via the F1 endpoint. latest/range are always decided CLIENT-side from
|
|
262
|
+
* the full `versions` list with distkit's policy ({@link selectKitVersion}) —
|
|
263
|
+
* the server's `resolved`/`latest` are not trusted. An exact version is passed
|
|
264
|
+
* through (the download itself 404s when it is not published).
|
|
265
|
+
* @internal Exported for testing
|
|
266
|
+
*/
|
|
267
|
+
export declare function resolveRequestedVersion(packageName: string, requested: string): Promise<string>;
|
|
22
268
|
/**
|
|
23
269
|
* Install options for programmatic use
|
|
24
270
|
*/
|
|
25
271
|
export interface InstallSkitOptions {
|
|
26
272
|
/** Working directory (defaults to cwd) */
|
|
27
273
|
cwd?: string;
|
|
28
|
-
/**
|
|
274
|
+
/**
|
|
275
|
+
* Don't actually install, just return what would be installed. A remote /
|
|
276
|
+
* .tgz kit IS fetched into staging (then removed) so its manifest and
|
|
277
|
+
* dependency plan (`result.depPlan`) can be computed.
|
|
278
|
+
*/
|
|
29
279
|
dryRun?: boolean;
|
|
30
|
-
/**
|
|
280
|
+
/**
|
|
281
|
+
* Global dependency mode for `dependencies.npm` AND `components.clis`:
|
|
282
|
+
* - 'satisfied' (default): keep an installed version that satisfies the
|
|
283
|
+
* declared range (D2: a prerelease satisfies only a range naming it); never
|
|
284
|
+
* downgrade one above the range; install missing/below-range.
|
|
285
|
+
* - 'missing': keep ANY installed version; install only absent deps.
|
|
286
|
+
* - 'all': reinstall every dep unconditionally (behavior of <=0.1.43).
|
|
287
|
+
* - 'none': install no global deps.
|
|
288
|
+
*/
|
|
289
|
+
deps?: DepsMode;
|
|
290
|
+
/** Dependency names to exclude regardless of mode (npm name or CLI name). */
|
|
291
|
+
skipDeps?: string[];
|
|
292
|
+
/**
|
|
293
|
+
* Skip dependency installation.
|
|
294
|
+
* @deprecated alias for `deps: 'none'` (an explicit `deps` wins).
|
|
295
|
+
*/
|
|
31
296
|
skipDependencies?: boolean;
|
|
297
|
+
/**
|
|
298
|
+
* Asked once per risky `change` (downgrade / prerelease→stable). Return false
|
|
299
|
+
* to keep the installed version (the entry becomes `skip`). When omitted the
|
|
300
|
+
* change proceeds (warn only) — the CLI wires a TTY y/N prompt here.
|
|
301
|
+
*/
|
|
302
|
+
confirmChange?: (entry: DepPlanEntry) => boolean | Promise<boolean>;
|
|
303
|
+
/**
|
|
304
|
+
* Receives the dependency plan (before anything is installed). When omitted
|
|
305
|
+
* the formatted plan lines go to `onProgress`.
|
|
306
|
+
*/
|
|
307
|
+
onDepPlan?: (plan: DepPlanEntry[], mode: DepsMode) => void;
|
|
308
|
+
/**
|
|
309
|
+
* Annotate `keep` entries with a newer in-range registry version (network).
|
|
310
|
+
* Only honored with `dryRun`. Default false.
|
|
311
|
+
*/
|
|
312
|
+
checkNewerInRange?: boolean;
|
|
313
|
+
/** @internal Installed-version lookup override (tests); defaults to `npm root -g` + fs. */
|
|
314
|
+
installedVersionLookup?: (name: string) => string | undefined;
|
|
315
|
+
/**
|
|
316
|
+
* Explicit GitLab group override (group-resolution chain step 1). Normally
|
|
317
|
+
* omitted so glpkg's discovery chain resolves + persists the group.
|
|
318
|
+
*/
|
|
319
|
+
group?: string;
|
|
320
|
+
/**
|
|
321
|
+
* Registry source: 'gitlab' (direct) or 'proxy' (registry-proxy). When unset,
|
|
322
|
+
* the kit download keeps its session-based routing and dep/CLI installs default
|
|
323
|
+
* to 'proxy' (D2 gap closure).
|
|
324
|
+
*/
|
|
325
|
+
source?: InstallSource;
|
|
32
326
|
/** Progress callback for status updates */
|
|
33
327
|
onProgress?: (message: string) => void;
|
|
34
328
|
}
|
|
@@ -50,6 +344,10 @@ export interface InstallSkitResult {
|
|
|
50
344
|
version: string;
|
|
51
345
|
summary?: InstallSummary;
|
|
52
346
|
manifest?: SkitManifest;
|
|
347
|
+
/** Global dependency plan actually applied (or that would be, under dryRun). */
|
|
348
|
+
depPlan?: DepPlanEntry[];
|
|
349
|
+
/** Effective `--deps` mode. */
|
|
350
|
+
depsMode?: DepsMode;
|
|
53
351
|
error?: string;
|
|
54
352
|
}
|
|
55
353
|
/**
|
|
@@ -61,6 +359,319 @@ export interface DownloadSkitResult {
|
|
|
61
359
|
outputPath: string;
|
|
62
360
|
error?: string;
|
|
63
361
|
}
|
|
362
|
+
/**
|
|
363
|
+
* Parse package spec into name and version
|
|
364
|
+
* @example parsePackageSpec('@ist/devtools-kit@1.0.0') => { name: '@ist/devtools-kit', version: '1.0.0' }
|
|
365
|
+
* @example parsePackageSpec('@ist/devtools-kit') => { name: '@ist/devtools-kit', version: 'latest' }
|
|
366
|
+
*/
|
|
367
|
+
export declare function parsePackageSpec(packageSpec: string): {
|
|
368
|
+
name: string;
|
|
369
|
+
version: string;
|
|
370
|
+
};
|
|
371
|
+
/**
|
|
372
|
+
* Classify a version string as 'latest', 'exact', or 'range'.
|
|
373
|
+
* @example classifyVersion('latest') => 'latest'
|
|
374
|
+
* @example classifyVersion('1.0.0') => 'exact'
|
|
375
|
+
* @example classifyVersion('^1.0.0') => 'range'
|
|
376
|
+
*/
|
|
377
|
+
export declare function classifyVersion(version: string): 'latest' | 'exact' | 'range';
|
|
378
|
+
/**
|
|
379
|
+
* Resolve a version string against a list of available versions (sorted descending).
|
|
380
|
+
* - 'latest' → highest STABLE version (prerelease only if no stable exists);
|
|
381
|
+
* input order is not trusted (sorted with semver.rcompare)
|
|
382
|
+
* - exact → returns if available, else null
|
|
383
|
+
* - range → uses semver.maxSatisfying
|
|
384
|
+
*/
|
|
385
|
+
export declare function resolveVersion(versions: string[], range: string): string | null;
|
|
386
|
+
/**
|
|
387
|
+
* Determine what version string to record in skit.json dependencies.
|
|
388
|
+
* - If requestedRange is a range (^, ~, x, >=), preserve it as-is
|
|
389
|
+
* - Otherwise (exact or no range), use caret prefix (npm default behavior)
|
|
390
|
+
*/
|
|
391
|
+
export declare function toDependencyRecord(resolvedVersion: string, requestedRange?: string): string;
|
|
392
|
+
/**
|
|
393
|
+
* Convert package name to registry-proxy format
|
|
394
|
+
* @example toRegistryFormat('@ist/devtools-kit') => 'ist__devtools-kit'
|
|
395
|
+
*/
|
|
396
|
+
export declare function toRegistryFormat(packageName: string): string;
|
|
397
|
+
/**
|
|
398
|
+
* Generate tarball filename from package name and version
|
|
399
|
+
* @example getTarballFilename('@ist/devtools-kit', '1.0.0') => 'ist__devtools-kit-1.0.0.tar.gz'
|
|
400
|
+
*/
|
|
401
|
+
export declare function getTarballFilename(packageName: string, version: string): string;
|
|
402
|
+
/**
|
|
403
|
+
* Outcome of a registry-proxy tarball fetch (TIER 1 of the download chain).
|
|
404
|
+
* - 'ok': tarball fetched and extracted successfully.
|
|
405
|
+
* - 'denied': proxy returned 401/403 — the package is private and the caller
|
|
406
|
+
* is not authorized anonymously (fall back to the owner glpkg path).
|
|
407
|
+
* Any other failure (network error, unexpected non-2xx) throws instead.
|
|
408
|
+
*/
|
|
409
|
+
export type ProxyDownloadOutcome = 'ok' | 'denied' | ProxyDenied;
|
|
410
|
+
/** A 401/403 from the proxy, with the real status + (credential-free) URL. */
|
|
411
|
+
export interface ProxyDenied {
|
|
412
|
+
outcome: 'denied';
|
|
413
|
+
status: number;
|
|
414
|
+
url: string;
|
|
415
|
+
}
|
|
416
|
+
/** Opt-in flag: also send `Authorization: Bearer $IST_SESSION_TOKEN` on proxy tarball GETs. */
|
|
417
|
+
export declare const SKIT_TARBALL_BEARER_ENV = "SKIT_TARBALL_BEARER";
|
|
418
|
+
/**
|
|
419
|
+
* Headers for a registry-proxy tarball GET.
|
|
420
|
+
* - `X-Session-Id` when a sessionId is present (unchanged legacy behavior).
|
|
421
|
+
* - `Authorization: Bearer <IST_SESSION_TOKEN>` ONLY when
|
|
422
|
+
* `SKIT_TARBALL_BEARER=1` AND `IST_SESSION_TOKEN` is non-empty. Default OFF:
|
|
423
|
+
* with the flag unset the headers are byte-identical to before.
|
|
424
|
+
* The token value is never logged.
|
|
425
|
+
* @internal Exported for testing
|
|
426
|
+
*/
|
|
427
|
+
export declare function buildProxyTarballHeaders(sessionId?: string, env?: NodeJS.ProcessEnv): Record<string, string>;
|
|
428
|
+
/**
|
|
429
|
+
* TIER 1 — fetch a kit tarball from the registry-proxy.
|
|
430
|
+
*
|
|
431
|
+
* The proxy is the PUBLIC access layer for these packages, so a single call
|
|
432
|
+
* covers both anonymous (public) and session-authenticated access:
|
|
433
|
+
* - If `sessionId` is provided, send `X-Session-Id`.
|
|
434
|
+
* - If absent, send NO auth header (anonymous) — returns 200 for public kits.
|
|
435
|
+
*
|
|
436
|
+
* Denial semantics: ONLY 401/403 counts as 'denied' (private package / caller
|
|
437
|
+
* not entitled). A network error is NOT a denial and is surfaced as-is, so we
|
|
438
|
+
* never misreport connectivity issues as "private".
|
|
439
|
+
* @internal Exported for testing
|
|
440
|
+
*/
|
|
441
|
+
export declare function downloadTarballViaProxy(name: string, version: string, stagingDir: string, sessionId?: string): Promise<ProxyDownloadOutcome>;
|
|
442
|
+
/**
|
|
443
|
+
* Injectable seams for {@link downloadKitViaExecutor} — the glpkg executor lib
|
|
444
|
+
* calls (Phase-A resolve, Phase-B fetch) + the proxy fetch. Defaults are the real
|
|
445
|
+
* implementations; tests override them for hermetic (no-network) coverage.
|
|
446
|
+
*/
|
|
447
|
+
export interface KitDownloadDeps {
|
|
448
|
+
resolveTarget?: typeof resolveGenericTarget;
|
|
449
|
+
execFetch?: typeof execFetchGeneric;
|
|
450
|
+
downloadViaProxy?: typeof downloadTarballViaProxy;
|
|
451
|
+
/** Proxy version resolution (latest/range → exact); default resolveRequestedVersion. */
|
|
452
|
+
resolveVersion?: typeof resolveRequestedVersion;
|
|
453
|
+
}
|
|
454
|
+
/**
|
|
455
|
+
* GitLab packages-list query rules for skit's OWN list reads (`skit browse`).
|
|
456
|
+
* Kit version listing is glpkg's (0.16 `resolveGenericTarget` uses the same
|
|
457
|
+
* rules: created_at desc, per_page 100, x-next-page, package_version).
|
|
458
|
+
* - `order_by=created_at&sort=desc&per_page=100` — GitLab's default order is
|
|
459
|
+
* created_at ASC (oldest first), and `order_by=version` is a STRING sort
|
|
460
|
+
* (0.9.0 > 0.10.0), so it must never be used.
|
|
461
|
+
* - read the next page ONLY when the response carries a non-empty `x-next-page`.
|
|
462
|
+
* @internal Exported for testing
|
|
463
|
+
*/
|
|
464
|
+
export declare const GITLAB_PACKAGES_LIST_QUERY = "order_by=created_at&sort=desc&per_page=100";
|
|
465
|
+
/** True when a GitLab list response says another page follows (non-empty `x-next-page`). */
|
|
466
|
+
export declare function hasGitlabNextPage(res: Response): boolean;
|
|
467
|
+
/**
|
|
468
|
+
* Download + unpack a kit tarball into `stagingDir`.
|
|
469
|
+
*
|
|
470
|
+
* SOURCE SELECTION (0.1.45, owner decision — back to the 7b605de gitlab-first
|
|
471
|
+
* direction; the 4021a72 proxy-first default is withdrawn):
|
|
472
|
+
* - source UNSET (default) or `--source gitlab`: gitlab-direct (distkit
|
|
473
|
+
* `gitlab-registry` generic directive → glpkg Phase-A → `execFetchGeneric`).
|
|
474
|
+
* Needs the GitLab group setting; a private kit uses the ambient token, a
|
|
475
|
+
* public one downloads without a token.
|
|
476
|
+
* - `--source proxy`: the registry proxy ONLY when asked for; a 401/403 fails
|
|
477
|
+
* loud (no route switch — ADR 0002/0003).
|
|
478
|
+
*
|
|
479
|
+
* FAIL-LOUD (report 34 §4): every path ends in a `skit.json` presence check
|
|
480
|
+
* ({@link assertKitManifestPresent}), so a 401/empty download never masquerades
|
|
481
|
+
* downstream as "skit.json not found".
|
|
482
|
+
*/
|
|
483
|
+
export declare function downloadKitViaExecutor(packageSpec: string, stagingDir: string, opts?: {
|
|
484
|
+
group?: string;
|
|
485
|
+
source?: InstallSource;
|
|
486
|
+
token?: string | null;
|
|
487
|
+
onProgress?: (message: string) => void;
|
|
488
|
+
}, deps?: KitDownloadDeps): Promise<'gitlab' | 'proxy'>;
|
|
489
|
+
/**
|
|
490
|
+
* Normalize a `dependencies.npm` value to its object form. A bare version string
|
|
491
|
+
* (and an object without an explicit `source`) defaults to `source: 'gitlab'`
|
|
492
|
+
* — gitlab-direct, anonymous-tolerant (public token-free; private uses the
|
|
493
|
+
* ambient PAT). A scope without a declared `registry[scope].url` degrades to the
|
|
494
|
+
* proxy anonymous path at install time (see {@link installNpmDeps}), so this
|
|
495
|
+
* default never regresses a token-less public install. @internal Exported for testing
|
|
496
|
+
*/
|
|
497
|
+
export declare function normalizeNpmDependency(value: string | NpmDependencySpec): {
|
|
498
|
+
version: string;
|
|
499
|
+
source: NpmDependencySource;
|
|
500
|
+
};
|
|
501
|
+
/**
|
|
502
|
+
* Build a global `npm install` command for one or more `name@version` specs.
|
|
503
|
+
* `latest` (or a missing version) is passed as the bare package name so npm
|
|
504
|
+
* resolves the dist-tag. @internal Exported for testing
|
|
505
|
+
*/
|
|
506
|
+
export declare function buildNpmInstallCommand(specs: string[]): string;
|
|
507
|
+
/**
|
|
508
|
+
* Extract the scope (e.g. `@ist`) from a scoped package name, or undefined for
|
|
509
|
+
* an unscoped name. @internal Exported for testing
|
|
510
|
+
*/
|
|
511
|
+
export declare function scopeOf(packageName: string): string | undefined;
|
|
512
|
+
/**
|
|
513
|
+
* Compute the scope set to pre-register in the anonymous proxy `.npmrc` (the
|
|
514
|
+
* public tokenless install flow). ([B] de-risk, 2026-08-07) The set is now
|
|
515
|
+
* PARAMETERIZED / DERIVED rather than read off a hardcoded owner-group map — a
|
|
516
|
+
* union of, in order of intent:
|
|
517
|
+
* 1. `registryScopes` — scopes DECLARED in the installing manifest's `registry`
|
|
518
|
+
* block (the migration target: authors declare their own scopes here);
|
|
519
|
+
* 2. env `SKIT_REGISTRY_MAPPING` (`getScopesFromEnv`) — runtime routing override;
|
|
520
|
+
* 3. `LEGACY_ROUTING_SCOPES` — legacy safety net so an un-migrated kit's
|
|
521
|
+
* transitive private-scope deps still resolve via the proxy (no 404 on npmjs);
|
|
522
|
+
* 4. the declared proxy deps' OWN scopes (from `proxySpecs`).
|
|
523
|
+
*
|
|
524
|
+
* ROUTING ONLY — carries NO group identity. Keeping the legacy keys here (vs an
|
|
525
|
+
* empty set) is what preserves the public tokenless flow until kits migrate.
|
|
526
|
+
*
|
|
527
|
+
* ★ P5 (distkit adoption, layer-split): this function KEEPS its name + signature
|
|
528
|
+
* (the `.npmrc` PROJECTION layer) but no longer owns the union algorithm — it now
|
|
529
|
+
* ADAPTS core `deriveRoutingScopes(registryModel, extraScopes?, origins?)` (the
|
|
530
|
+
* model-level SSOT). skit maps its 4 scope sources onto core's inputs:
|
|
531
|
+
* - manifest `registryScopes` -> a minimal RegistryModel (keys are all core
|
|
532
|
+
* reads for scope derivation; `group` is stubbed and never consulted);
|
|
533
|
+
* - env `SKIT_REGISTRY_MAPPING` (getScopesFromEnv) + `LEGACY_ROUTING_SCOPES`
|
|
534
|
+
* + the declared proxy deps' own scopes -> `extraScopes` overlay.
|
|
535
|
+
* ★ LEGACY_ROUTING_SCOPES MUST stay in the overlay (safety net) — dropping it
|
|
536
|
+
* empties the routing set for an un-migrated kit and its transitive private-scope
|
|
537
|
+
* deps 404 on npmjs. The output is now SORTED (core stable UTF-16 order) rather
|
|
538
|
+
* than insertion-order; the `.npmrc` consumer treats scopes as a set, so the
|
|
539
|
+
* ordering change is purely cosmetic (see golden fixture).
|
|
540
|
+
* @internal Exported for testing
|
|
541
|
+
*/
|
|
542
|
+
export declare function deriveProxyRoutingScopes(opts: {
|
|
543
|
+
registryScopes?: string[];
|
|
544
|
+
proxySpecs?: string[];
|
|
545
|
+
}): string[];
|
|
546
|
+
/** TEMP(D5): route an npm dep batch went through (for messages + tests). */
|
|
547
|
+
export type NpmDepRoute = 'gitlab' | 'proxy' | 'npmjs';
|
|
548
|
+
/**
|
|
549
|
+
* TEMP(D5): how `installNpmDeps` routes deps — the install's source
|
|
550
|
+
* (`--source`, default gitlab since 0.1.45).
|
|
551
|
+
*/
|
|
552
|
+
export interface NpmDepRouteOptions {
|
|
553
|
+
/** the install's source; unset = gitlab (the 0.1.45 default). */
|
|
554
|
+
source?: InstallSource;
|
|
555
|
+
/** `--group` override — applies to dep gitlab-direct URLs too. */
|
|
556
|
+
group?: string;
|
|
557
|
+
onProgress?: (message: string) => void;
|
|
558
|
+
}
|
|
559
|
+
/** @internal TEMP(D5) test-only: reset the group id cache. */
|
|
560
|
+
export declare function resetGitlabGroupIdCache(): void;
|
|
561
|
+
/**
|
|
562
|
+
* TEMP(D5): GitLab group npm registry URL for a numeric group id.
|
|
563
|
+
* @internal Exported for testing
|
|
564
|
+
*/
|
|
565
|
+
export declare function buildGitlabGroupNpmUrl(host: string, groupId: number): string;
|
|
566
|
+
/**
|
|
567
|
+
* TEMP(D5): resolve a GitLab group NAME (or full path) to its numeric id via
|
|
568
|
+
* `GET /api/v4/groups/<url-encoded name>` with the ambient token (anonymous when
|
|
569
|
+
* null — a public group still resolves). A numeric input is returned as-is.
|
|
570
|
+
* Cached per run. Fails loud naming the URL tried.
|
|
571
|
+
* @internal Exported for testing
|
|
572
|
+
*/
|
|
573
|
+
export declare function resolveGitlabGroupId(host: string, group: string, token: string | null): Promise<number>;
|
|
574
|
+
/**
|
|
575
|
+
* TEMP(D5): the GitLab-direct npm registry URL for `scope`, or undefined when no
|
|
576
|
+
* group is known. Precedence: `--group` override > `registry[scope].url` >
|
|
577
|
+
* group name (`registry[scope].group` > IST_GITLAB_GROUP > skit config) resolved
|
|
578
|
+
* to its numeric id. @internal Exported for testing
|
|
579
|
+
*/
|
|
580
|
+
export declare function resolveGitlabDepRegistryUrl(scope: string, registry: ScopeRegistryMapping, opts: {
|
|
581
|
+
group?: string;
|
|
582
|
+
token: string | null;
|
|
583
|
+
host?: string;
|
|
584
|
+
}): Promise<string | undefined>;
|
|
585
|
+
/**
|
|
586
|
+
* Install npm dependencies using plain `npm` — the glpkg BINARY is NOT required
|
|
587
|
+
* (free-pivot). Batches:
|
|
588
|
+
* - 'npmjs': source 'npm' / npmjs-native scopes -> public npmjs registry.
|
|
589
|
+
* - 'proxy': registry-proxy via a temporary scoped .npmrc (inherited proxy auth
|
|
590
|
+
* as env REFERENCES only — utils/npm-auth.ts; anonymous otherwise).
|
|
591
|
+
* Routing scope set: `deriveProxyRoutingScopes`.
|
|
592
|
+
* - 'gitlab': GitLab group npm registry via a temporary scoped .npmrc with the
|
|
593
|
+
* ambient GitLab PAT (anonymous-tolerant).
|
|
594
|
+
*
|
|
595
|
+
* TEMP(D5) ROUTE RULES (hotfix; replaced by D5):
|
|
596
|
+
* - gitlab (default since 0.1.45, or `--source gitlab`): every non-npmjs dep goes
|
|
597
|
+
* gitlab-direct; the URL comes from `--group` / `registry[scope].url` /
|
|
598
|
+
* `registry[scope].group` / IST_GITLAB_GROUP / skit config (name → id). None →
|
|
599
|
+
* fail loud with the group hint.
|
|
600
|
+
* - `--source proxy`: every non-npmjs dep goes via the proxy; a failure is NOT
|
|
601
|
+
* retried on another route (ADR 0002/0003).
|
|
602
|
+
* Every failure names the route + registry URL tried.
|
|
603
|
+
* @internal Exported for testing
|
|
604
|
+
*/
|
|
605
|
+
export declare function installNpmDeps(dependencies: Record<string, string | NpmDependencySpec>, registryScopes?: string[], registry?: ScopeRegistryMapping, route?: NpmDepRouteOptions): Promise<NpmDepRoute[]>;
|
|
606
|
+
/**
|
|
607
|
+
* Compare two registry URLs for equality, ignoring trailing slashes (glpkg's
|
|
608
|
+
* `proxy:status` echoes a canonicalized URL with a trailing `/`, ours has none).
|
|
609
|
+
* @internal Exported for testing
|
|
610
|
+
*/
|
|
611
|
+
export declare function sameRegistryUrl(a: string, b: string): boolean;
|
|
612
|
+
/**
|
|
613
|
+
* Parse the human-readable output of `glpkg config proxy:status`, e.g.:
|
|
614
|
+
*
|
|
615
|
+
* Proxy Configuration:
|
|
616
|
+
* URL: https://registry-proxy.example.dev/
|
|
617
|
+
* Enabled: no
|
|
618
|
+
*
|
|
619
|
+
* Returns the configured proxy URL (empty string if unset) and whether the proxy
|
|
620
|
+
* is enabled. Tolerant of "(not set)" / "none" placeholders. @internal Exported for testing
|
|
621
|
+
*/
|
|
622
|
+
export declare function parseGlpkgProxyStatus(output: string): {
|
|
623
|
+
url: string;
|
|
624
|
+
enabled: boolean;
|
|
625
|
+
};
|
|
626
|
+
/**
|
|
627
|
+
* Compute the idempotent bootstrap plan for making `glpkg install --source proxy`
|
|
628
|
+
* usable on a clean box (free-install track A):
|
|
629
|
+
*
|
|
630
|
+
* 1. `npm install -g @glpkg/cli` — only if the glpkg binary is absent. Public
|
|
631
|
+
* npmjs, tokenless; also breaks the glpkg self-install circular dependency.
|
|
632
|
+
* 2. `glpkg config proxy:set <registryUrl>` — only if the configured proxy URL
|
|
633
|
+
* differs from ours (trailing-slash-insensitive).
|
|
634
|
+
* 3. `glpkg config proxy:enable` — only if the proxy is not already enabled.
|
|
635
|
+
*
|
|
636
|
+
* Returns the list of shell commands to run in order. Already-satisfied steps are
|
|
637
|
+
* omitted, so a fully-bootstrapped box yields an empty plan (idempotent).
|
|
638
|
+
* @internal Exported for testing
|
|
639
|
+
*/
|
|
640
|
+
export declare function planGlpkgBootstrap(registryUrl: string, state: {
|
|
641
|
+
binaryPresent: boolean;
|
|
642
|
+
proxyUrl: string;
|
|
643
|
+
proxyEnabled: boolean;
|
|
644
|
+
}): string[];
|
|
645
|
+
/**
|
|
646
|
+
* Injectable IO for {@link ensureGlpkgBootstrap} — probes real glpkg state and
|
|
647
|
+
* runs shell commands. Swapped out in unit tests. @internal
|
|
648
|
+
*/
|
|
649
|
+
export interface GlpkgBootstrapIO {
|
|
650
|
+
probeBinary: () => boolean;
|
|
651
|
+
probeProxy: () => {
|
|
652
|
+
url: string;
|
|
653
|
+
enabled: boolean;
|
|
654
|
+
};
|
|
655
|
+
run: (command: string) => void;
|
|
656
|
+
}
|
|
657
|
+
/**
|
|
658
|
+
* @internal Reset the once-per-process bootstrap memo (test-only helper).
|
|
659
|
+
*/
|
|
660
|
+
export declare function resetGlpkgBootstrapMemo(): void;
|
|
661
|
+
/**
|
|
662
|
+
* Ensure the glpkg binary exists and its registry-proxy config points at our
|
|
663
|
+
* proxy and is enabled, so `glpkg install --source proxy` works on a clean box
|
|
664
|
+
* (free-install track A). Reuses REGISTRY_PROXY_URL via {@link getRegistryUrl}
|
|
665
|
+
* (SSOT) — no new hardcoded URL. Idempotent: each step is skipped when already
|
|
666
|
+
* satisfied, and the whole routine is a no-op after the first successful call in
|
|
667
|
+
* a process (recursive skit-dep installs bootstrap only once). Preserves the
|
|
668
|
+
* tokenless invariant: it never writes auth — glpkg's own anonymous logic (no
|
|
669
|
+
* token → no .npmrc auth line) is untouched.
|
|
670
|
+
*
|
|
671
|
+
* @returns the list of commands that were executed (empty when nothing to do).
|
|
672
|
+
* @internal Exported for testing
|
|
673
|
+
*/
|
|
674
|
+
export declare function ensureGlpkgBootstrap(registryUrl?: string, io?: GlpkgBootstrapIO): Promise<string[]>;
|
|
64
675
|
/**
|
|
65
676
|
* Install a skit package programmatically
|
|
66
677
|
* Uses GitLab token from ~/.config/gitlab-config for authentication
|
|
@@ -82,6 +693,12 @@ export interface DownloadSkitResult {
|
|
|
82
693
|
* ```
|
|
83
694
|
*/
|
|
84
695
|
export declare function installSkit(packageSpec: string, options?: InstallSkitOptions): Promise<InstallSkitResult>;
|
|
696
|
+
/**
|
|
697
|
+
* Global deps declared by a manifest, in plan order: `dependencies.npm` then
|
|
698
|
+
* `components.clis` (each CLI also matches `--skip-dep <cli.name>`).
|
|
699
|
+
* @internal Exported for testing
|
|
700
|
+
*/
|
|
701
|
+
export declare function collectDeclaredDeps(manifest: SkitManifest): DeclaredDep[];
|
|
85
702
|
/**
|
|
86
703
|
* Download a skit package without installing
|
|
87
704
|
*
|
|
@@ -141,4 +758,39 @@ export declare function uninstallSkit(packageName: string, options?: {
|
|
|
141
758
|
removedFiles: string[];
|
|
142
759
|
error?: string;
|
|
143
760
|
}>;
|
|
761
|
+
/**
|
|
762
|
+
* Result of orphan scan
|
|
763
|
+
*/
|
|
764
|
+
export interface OrphanResult {
|
|
765
|
+
prompts: string[];
|
|
766
|
+
profiles: string[];
|
|
767
|
+
}
|
|
768
|
+
/**
|
|
769
|
+
* Find prompts and profiles not managed by any installed skit
|
|
770
|
+
*
|
|
771
|
+
* @example
|
|
772
|
+
* ```ts
|
|
773
|
+
* import { findOrphans } from '@ist/skit/lib';
|
|
774
|
+
*
|
|
775
|
+
* const orphans = await findOrphans();
|
|
776
|
+
* console.log('Unmanaged prompts:', orphans.prompts);
|
|
777
|
+
* console.log('Unmanaged profiles:', orphans.profiles);
|
|
778
|
+
* ```
|
|
779
|
+
*/
|
|
780
|
+
export declare function findOrphans(): Promise<OrphanResult>;
|
|
781
|
+
/**
|
|
782
|
+
* Remove orphaned files by their relative paths from ~/.ist/
|
|
783
|
+
*
|
|
784
|
+
* @param files - Relative paths from ~/.ist/ (e.g. 'prompts/foo.md')
|
|
785
|
+
* @returns Array of successfully removed relative paths
|
|
786
|
+
*
|
|
787
|
+
* @example
|
|
788
|
+
* ```ts
|
|
789
|
+
* import { removeOrphans } from '@ist/skit/lib';
|
|
790
|
+
*
|
|
791
|
+
* const removed = await removeOrphans(['prompts/old.md', 'profiles/stale.md']);
|
|
792
|
+
* console.log(`Removed ${removed.length} files`);
|
|
793
|
+
* ```
|
|
794
|
+
*/
|
|
795
|
+
export declare function removeOrphans(files: string[]): Promise<string[]>;
|
|
144
796
|
//# sourceMappingURL=lib.d.ts.map
|