@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
|
@@ -16,6 +16,13 @@ export interface SkitProfileComponent extends SkitComponent {
|
|
|
16
16
|
export interface SkitCli {
|
|
17
17
|
name: string;
|
|
18
18
|
package: string;
|
|
19
|
+
/**
|
|
20
|
+
* @deprecated DEAD FIELD — declared but never consumed. The CLI install path
|
|
21
|
+
* (`installCliTools` → `buildGlobalInstallCommand`) installs `package` globally
|
|
22
|
+
* and lets npm/glpkg link the package's own declared `bin`; skit never reads or
|
|
23
|
+
* applies this override. Retained (not removed) to avoid breaking manifests /
|
|
24
|
+
* downstream type importers. Do not rely on it.
|
|
25
|
+
*/
|
|
19
26
|
bin?: string;
|
|
20
27
|
}
|
|
21
28
|
export interface SkitStateComponent {
|
|
@@ -50,7 +57,14 @@ export interface SkitInstallPaths {
|
|
|
50
57
|
post?: string[];
|
|
51
58
|
}
|
|
52
59
|
/**
|
|
53
|
-
* CLI tool dependency (external tools like
|
|
60
|
+
* CLI tool dependency (external tools like glpkg, npm, pip, etc.)
|
|
61
|
+
*
|
|
62
|
+
* @deprecated DEAD SHAPE — this interface (used only by `SkitDependencies.cli`)
|
|
63
|
+
* has NO consumer in the install path: nothing ever reads `install`/`check`/
|
|
64
|
+
* `optional`. It predates the working co-install paths and was never wired to an
|
|
65
|
+
* installer. Declare npm-based CLI tools under `dependencies.npm` (installed via
|
|
66
|
+
* `installNpmDeps`) or `components.clis` (installed via `installCliTools`)
|
|
67
|
+
* instead. Kept for backward-compatible typing; do not use.
|
|
54
68
|
*/
|
|
55
69
|
export interface CliDependency {
|
|
56
70
|
name: string;
|
|
@@ -58,29 +72,113 @@ export interface CliDependency {
|
|
|
58
72
|
check?: string;
|
|
59
73
|
optional?: boolean;
|
|
60
74
|
}
|
|
75
|
+
/**
|
|
76
|
+
* Per-dependency install source for `dependencies.npm` (free-pivot: plain-npm,
|
|
77
|
+
* NO glpkg binary required).
|
|
78
|
+
* - 'npm': install from the PUBLIC npmjs registry (default registry). Use for
|
|
79
|
+
* packages published to npmjs (e.g. @glpkg/cli). No proxy, no glpkg.
|
|
80
|
+
* - 'gitlab': install DIRECTLY from the scope's GitLab group package registry.
|
|
81
|
+
* Anonymous-tolerant (like the kit-tarball path): a PUBLIC package
|
|
82
|
+
* installs token-free; a PRIVATE one attaches the ambient GitLab PAT
|
|
83
|
+
* (GITLAB_TOKEN env / glpkg token file). The concrete registry URL is
|
|
84
|
+
* taken from the manifest `registry[scope].url`; a scope without a
|
|
85
|
+
* declared URL degrades to the 'proxy' anonymous path (no regression).
|
|
86
|
+
* - 'proxy': install from the registry-proxy ANONYMOUSLY via plain npm + a
|
|
87
|
+
* temporary scoped .npmrc (scope -> proxy registry, NO auth line).
|
|
88
|
+
* Use as the token-bypass path (server-side license, client anonymous).
|
|
89
|
+
*/
|
|
90
|
+
export type NpmDependencySource = 'npm' | 'gitlab' | 'proxy';
|
|
91
|
+
/**
|
|
92
|
+
* Object form of a `dependencies.npm` value, letting a kit author pin the
|
|
93
|
+
* install source per dependency. The bare-string form (`"1.2.3"`) is still
|
|
94
|
+
* accepted and defaults to `source: 'gitlab'` (gitlab-direct, anonymous-tolerant).
|
|
95
|
+
*/
|
|
96
|
+
export interface NpmDependencySpec {
|
|
97
|
+
version: string;
|
|
98
|
+
/** install source; defaults to 'gitlab' when omitted */
|
|
99
|
+
source?: NpmDependencySource;
|
|
100
|
+
}
|
|
61
101
|
/**
|
|
62
102
|
* Dependencies structure for skit packages
|
|
63
103
|
*/
|
|
64
104
|
export interface SkitDependencies {
|
|
65
|
-
/**
|
|
66
|
-
|
|
67
|
-
|
|
105
|
+
/**
|
|
106
|
+
* npm 패키지 의존성 (권장). A value may be a bare version string (defaults to
|
|
107
|
+
* source 'gitlab') OR an object `{ version, source }` to pin the install source
|
|
108
|
+
* per dependency ('npm' | 'gitlab' | 'proxy'). All npm deps install via plain
|
|
109
|
+
* `npm` — the glpkg binary is no longer required.
|
|
110
|
+
*/
|
|
111
|
+
npm?: Record<string, string | NpmDependencySpec>;
|
|
112
|
+
/**
|
|
113
|
+
* @deprecated NO-OP FIELD — skit-to-skit recursive install is removed. No kit
|
|
114
|
+
* used `dependencies.skit`, and skit bundling is consolidated onto the snapshot
|
|
115
|
+
* package manager. The install path no longer reads this field: a declared
|
|
116
|
+
* value is IGNORED (never recursively installed). Retained for
|
|
117
|
+
* backward-compatible typing only; use the snapshot package manager to bundle
|
|
118
|
+
* skits together.
|
|
119
|
+
*/
|
|
68
120
|
skit?: Record<string, string>;
|
|
69
121
|
/**
|
|
70
|
-
*
|
|
71
|
-
*
|
|
122
|
+
* 파이썬(pip/pypi) 의존성 — 아직 미지원.
|
|
123
|
+
*
|
|
124
|
+
* skit는 현재 pip/pypi 에코시스템 설치를 구현하지 않는다(로드맵: distkit
|
|
125
|
+
* ecosystem 축 확정 후 실제 설치 도입). 이 필드가 선언되면 설치는 실패하지
|
|
126
|
+
* 않고 계속되지만, silent skip 대신 loud 경고를 방출한 뒤 스킵한다.
|
|
127
|
+
* @example { "requests": ">=2.0.0", "pyyaml": "^6.0" }
|
|
128
|
+
*/
|
|
129
|
+
pip?: Record<string, string>;
|
|
130
|
+
/**
|
|
131
|
+
* @deprecated DEAD FIELD — declared but never consumed by any install code
|
|
132
|
+
* path (verified: no reader for `dependencies.cli`). Use `dependencies.npm`
|
|
133
|
+
* (npm packages) or `components.clis` (glpkg-installed CLIs) instead. Retained
|
|
134
|
+
* for backward-compatible typing only.
|
|
72
135
|
*/
|
|
73
136
|
cli?: CliDependency[];
|
|
74
137
|
}
|
|
75
138
|
/**
|
|
76
|
-
* Scope
|
|
77
|
-
*
|
|
139
|
+
* Scope → registry routing entry. Declares, for a scope, WHICH GitLab group and
|
|
140
|
+
* (optionally) WHICH proxy/registry URL its packages resolve through. Routing
|
|
141
|
+
* ONLY — access decisions stay server-side (SSOT); this is never an access grant.
|
|
142
|
+
*
|
|
143
|
+
* `url` is OPTIONAL and additive (distkit ADR-0001 shared registry model v2,
|
|
144
|
+
* "snapshot.json 형태 정합"):
|
|
145
|
+
* - present → the author's own proxy/registry for this scope (enables the
|
|
146
|
+
* generalization / gitlab-direct / third-party-reuse cases where the bundled
|
|
147
|
+
* proxy constant must not be assumed);
|
|
148
|
+
* - absent → the resolver falls back to the ambient/bundled registry, so the
|
|
149
|
+
* current anonymous tokenless `source: 'proxy'` flow is unchanged.
|
|
150
|
+
* Manifests carrying only `{ group }` (no `url`) remain fully valid.
|
|
151
|
+
*/
|
|
152
|
+
export interface ScopeRegistryEntry {
|
|
153
|
+
/** GitLab group name (routing/provenance hint; authority is server-side). */
|
|
154
|
+
group: string;
|
|
155
|
+
/**
|
|
156
|
+
* Proxy/registry base URL this scope resolves through (e.g.
|
|
157
|
+
* "https://registry-proxy.example.dev/"). Optional: when omitted the resolver
|
|
158
|
+
* uses the ambient/bundled registry — preserves the anonymous tokenless flow.
|
|
159
|
+
*/
|
|
160
|
+
url?: string;
|
|
161
|
+
}
|
|
162
|
+
/**
|
|
163
|
+
* Scope to GitLab group mapping for npm dependencies (legacy scope→group form,
|
|
164
|
+
* now extended with an optional per-scope `url` — see ScopeRegistryEntry).
|
|
165
|
+
* Retained for backward compatibility; superseded by the group-keyed
|
|
166
|
+
* `glpkg.groups` block (see GroupPackageMapping / §4C) for new manifests.
|
|
167
|
+
* @example { "@ist": { "group": "microwiseai", "url": "https://registry-proxy.../" } }
|
|
168
|
+
* @example { "@mwd-tools": { "group": "microwiseai" } } // url omitted → bundled registry
|
|
78
169
|
*/
|
|
79
170
|
export interface ScopeRegistryMapping {
|
|
80
|
-
[scope: string]:
|
|
81
|
-
group: string;
|
|
82
|
-
};
|
|
171
|
+
[scope: string]: ScopeRegistryEntry;
|
|
83
172
|
}
|
|
173
|
+
/**
|
|
174
|
+
* Group-keyed package mapping (glpkg ADR §4C — dependency group provenance).
|
|
175
|
+
* Maps a GitLab group name to the packages resolved from that group. Group-keyed
|
|
176
|
+
* (rather than per-package) to keep the block short; auto-managed by glpkg on
|
|
177
|
+
* install (idempotent, sorted, deduped). This is a routing/provenance HINT — the
|
|
178
|
+
* authoritative access decision remains server-side (SSOT), never the manifest.
|
|
179
|
+
* @example { "microwiseai": ["@ist/foo", "@ist/bar"], "otherorg": ["@other/x"] }
|
|
180
|
+
*/
|
|
181
|
+
export type GroupPackageMapping = Record<string, string[]>;
|
|
84
182
|
export interface SkitManifest {
|
|
85
183
|
name: string;
|
|
86
184
|
version: string;
|
|
@@ -89,11 +187,90 @@ export interface SkitManifest {
|
|
|
89
187
|
files?: string[];
|
|
90
188
|
exclude?: string[];
|
|
91
189
|
dependencies?: SkitDependencies;
|
|
92
|
-
/** Scope to GitLab group mapping for npm dependencies */
|
|
190
|
+
/** Scope to GitLab group mapping for npm dependencies (legacy; see `glpkg.groups`) */
|
|
93
191
|
registry?: ScopeRegistryMapping;
|
|
192
|
+
/**
|
|
193
|
+
* glpkg-managed namespace (§4C / glpkg G2 convention f7a5c3f). Native skit.json
|
|
194
|
+
* home for the group dimension of dependencies and this package's install policy.
|
|
195
|
+
* Auto-added/updated on install; read by glpkg from the manifest (no CLI flag).
|
|
196
|
+
*/
|
|
197
|
+
glpkg?: {
|
|
198
|
+
/** group-keyed dependency provenance (§4C). Auto-managed. */
|
|
199
|
+
groups?: GroupPackageMapping;
|
|
200
|
+
/**
|
|
201
|
+
* Install-condition policy name for THIS package (named condition catalog, G1).
|
|
202
|
+
* DECLARATION ONLY — the server resolves policyRef → real install conditions at
|
|
203
|
+
* install time (SSOT); the client never asserts or enforces. glpkg reads this
|
|
204
|
+
* key (`glpkg.policy`) from the manifest and forwards it as `policyRef`.
|
|
205
|
+
* Format: ^[a-z0-9]+(?:[-/][a-z0-9]+)*$ (e.g. 'public', 'ist-login', 'tier/pro').
|
|
206
|
+
*/
|
|
207
|
+
policy?: string;
|
|
208
|
+
};
|
|
94
209
|
components: SkitComponents;
|
|
95
210
|
install: SkitInstallPaths;
|
|
211
|
+
/** Pricing metadata (informational; access control is server-side / SSOT). */
|
|
212
|
+
pricing?: SkitPricing;
|
|
213
|
+
/**
|
|
214
|
+
* @deprecated DEAD FIELD — declared but never consumed. skit does NOT read
|
|
215
|
+
* `requires` at install time: prerequisite/first-install ordering is not
|
|
216
|
+
* resolved or enforced. (`dependencies.skit` recursive install has also been
|
|
217
|
+
* removed — skit bundling is consolidated onto the snapshot package manager.)
|
|
218
|
+
* Retained for backward-compatible typing only.
|
|
219
|
+
*/
|
|
220
|
+
requires?: string[];
|
|
221
|
+
/**
|
|
222
|
+
* Runtime packages a purchase entitles (e.g. the binaries a prompt documents).
|
|
223
|
+
* Informational/provenance — the authoritative entitlement decision is server-side.
|
|
224
|
+
*/
|
|
225
|
+
runtime?: SkitRuntimeEntitlement;
|
|
226
|
+
/**
|
|
227
|
+
* Profile permission overlays applied on install (and reverted on uninstall).
|
|
228
|
+
* Maps a target profile name to allowedTools entries to union into that
|
|
229
|
+
* profile's front-matter. Enables a paid add-on to grant execution permission
|
|
230
|
+
* (e.g. `Bash(smon:*)`) to a profile shipped by a separate (free) base kit.
|
|
231
|
+
* @example { "tda-manager": ["Bash(smon:*)"] }
|
|
232
|
+
*/
|
|
233
|
+
profilePermissions?: ProfilePermissions;
|
|
234
|
+
}
|
|
235
|
+
/**
|
|
236
|
+
* Pricing metadata block.
|
|
237
|
+
*/
|
|
238
|
+
export interface SkitPricing {
|
|
239
|
+
price: number;
|
|
240
|
+
currency?: string;
|
|
241
|
+
billing?: 'one-time' | 'subscription' | string;
|
|
96
242
|
}
|
|
243
|
+
/**
|
|
244
|
+
* Runtime entitlement descriptor.
|
|
245
|
+
*/
|
|
246
|
+
export interface SkitRuntimeEntitlement {
|
|
247
|
+
description?: string;
|
|
248
|
+
entitlements: string[];
|
|
249
|
+
}
|
|
250
|
+
/**
|
|
251
|
+
* Profile permission overlay map: profileName -> allowedTools entries to add.
|
|
252
|
+
*/
|
|
253
|
+
export type ProfilePermissions = Record<string, string[]>;
|
|
254
|
+
/**
|
|
255
|
+
* Named-policy identifier pattern (license G1 condition catalog). Lowercase
|
|
256
|
+
* alphanumerics separated by single '-' or '/'. e.g. 'public', 'ist-login', 'tier/pro'.
|
|
257
|
+
*/
|
|
258
|
+
export declare const POLICY_NAME_PATTERN: RegExp;
|
|
259
|
+
/**
|
|
260
|
+
* Validate a policy name against the license G1 catalog format.
|
|
261
|
+
*/
|
|
262
|
+
export declare function isValidPolicyName(name: string): boolean;
|
|
263
|
+
/**
|
|
264
|
+
* Read + validate a manifest's declared named-policy reference (glpkg G2
|
|
265
|
+
* convention f7a5c3f: `manifest.glpkg.policy`). Mirrors glpkg's readPolicy:
|
|
266
|
+
* returns the policy name, undefined when none declared, and THROWS (fail-fast)
|
|
267
|
+
* on a malformed name. The server (G1 catalog) resolves it — client only forwards.
|
|
268
|
+
*/
|
|
269
|
+
export declare function readManifestPolicy(manifest: {
|
|
270
|
+
glpkg?: {
|
|
271
|
+
policy?: string;
|
|
272
|
+
};
|
|
273
|
+
} | null | undefined): string | undefined;
|
|
97
274
|
/**
|
|
98
275
|
* Component type names
|
|
99
276
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"skit.d.ts","sourceRoot":"","sources":["../../src/types/skit.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;GAEG;AACH,MAAM,WAAW,oBAAqB,SAAQ,aAAa;IACzD,8EAA8E;IAC9E,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;CACpB;AAED,MAAM,WAAW,OAAO;IACtB,IAAI,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44).
|
|
3
|
+
*
|
|
4
|
+
* Decides, per declared global dependency (`dependencies.npm` entries and
|
|
5
|
+
* `components.clis` packages), whether to keep the installed copy, install it,
|
|
6
|
+
* change (reinstall) it, or skip it — based on the `--deps` mode, `--skip-dep`
|
|
7
|
+
* list and the version currently installed under `npm root -g`.
|
|
8
|
+
*
|
|
9
|
+
* The decision functions are PURE (no IO) so every mode is unit-testable; the
|
|
10
|
+
* only IO lives in {@link createGlobalVersionLookup} (one cached `npm root -g`
|
|
11
|
+
* spawn + fs reads — never one npm spawn per dependency).
|
|
12
|
+
*/
|
|
13
|
+
/** `--deps` mode. */
|
|
14
|
+
export type DepsMode = 'satisfied' | 'missing' | 'all' | 'none';
|
|
15
|
+
export declare const DEPS_MODES: readonly DepsMode[];
|
|
16
|
+
/** Default mode (changed from the implicit `all` in <=0.1.43). */
|
|
17
|
+
export declare const DEFAULT_DEPS_MODE: DepsMode;
|
|
18
|
+
export type DepAction = 'keep' | 'install' | 'change' | 'skip';
|
|
19
|
+
/** Risky-change markers attached to a `change` entry. */
|
|
20
|
+
export type DepWarning = 'downgrade' | 'prerelease-to-stable';
|
|
21
|
+
export interface DepPlanEntry {
|
|
22
|
+
/** npm package name */
|
|
23
|
+
name: string;
|
|
24
|
+
/** declared range ('latest' when none) */
|
|
25
|
+
range: string;
|
|
26
|
+
/** currently installed global version, if any */
|
|
27
|
+
installed?: string;
|
|
28
|
+
action: DepAction;
|
|
29
|
+
/** short human reason */
|
|
30
|
+
reason: string;
|
|
31
|
+
/** where the dep was declared */
|
|
32
|
+
kind: 'npm' | 'cli';
|
|
33
|
+
/** risky-change markers (only on `change`) */
|
|
34
|
+
warnings?: DepWarning[];
|
|
35
|
+
/** highest version in range newer than `installed` (dry-run registry lookup only) */
|
|
36
|
+
newerInRange?: string;
|
|
37
|
+
/**
|
|
38
|
+
* Installed version is ABOVE the declared range and was kept (no downgrade —
|
|
39
|
+
* D10 ②, official behavior) under `satisfied`. The installer prints a warning
|
|
40
|
+
* naming the kit + range responsible.
|
|
41
|
+
*/
|
|
42
|
+
aboveRange?: boolean;
|
|
43
|
+
/**
|
|
44
|
+
* TEMP(D10 state P): installed is a PRERELEASE the range does not opt into
|
|
45
|
+
* (core inside the range). Kept under `satisfied` (replacing it may downgrade);
|
|
46
|
+
* the installer warns. The D10 package replaces this with a registry-guarded
|
|
47
|
+
* change (B-stage: select, then keep if not higher).
|
|
48
|
+
*/
|
|
49
|
+
prereleaseKept?: boolean;
|
|
50
|
+
}
|
|
51
|
+
/** A declared global dependency, before planning. */
|
|
52
|
+
export interface DeclaredDep {
|
|
53
|
+
name: string;
|
|
54
|
+
range: string;
|
|
55
|
+
kind: 'npm' | 'cli';
|
|
56
|
+
/** extra names `--skip-dep` may match (e.g. a CLI's command name) */
|
|
57
|
+
aliases?: string[];
|
|
58
|
+
}
|
|
59
|
+
/** Parse/validate a `--deps` value. Throws on an unknown mode. */
|
|
60
|
+
export declare function parseDepsMode(value: string): DepsMode;
|
|
61
|
+
/**
|
|
62
|
+
* Resolve the effective mode from the lib options: explicit `deps` wins, the
|
|
63
|
+
* legacy `skipDependencies: true` is an alias for `none`, else the default.
|
|
64
|
+
*/
|
|
65
|
+
export declare function resolveDepsMode(opts: {
|
|
66
|
+
deps?: DepsMode;
|
|
67
|
+
skipDependencies?: boolean;
|
|
68
|
+
}): DepsMode;
|
|
69
|
+
/**
|
|
70
|
+
* Does `installed` satisfy `range`? — D2 policy semantics (D10 design §3.2):
|
|
71
|
+
* node-semver DEFAULT rules (no `includePrerelease`). A stable version is judged
|
|
72
|
+
* normally; a PRERELEASE satisfies only a range that names a prerelease on the
|
|
73
|
+
* same M.m.p (`0.4.8-dev.1` does NOT satisfy `^0.4.7`; it does satisfy
|
|
74
|
+
* `^0.4.8-dev.0`). `''`/`*`/`latest` = any STABLE version (a prerelease does not
|
|
75
|
+
* match "unspecified"). `undefined` = the range cannot be judged.
|
|
76
|
+
*/
|
|
77
|
+
export declare function satisfiesRange(installed: string, range: string): boolean | undefined;
|
|
78
|
+
/**
|
|
79
|
+
* Where `installed` sits relative to `range` (precedence over ALL versions,
|
|
80
|
+
* prereleases included):
|
|
81
|
+
* - `in` — satisfies (see {@link satisfiesRange});
|
|
82
|
+
* - `above` — higher than every version the range admits (never downgrade);
|
|
83
|
+
* - `below` — lower than the lowest version the range admits (safe upgrade);
|
|
84
|
+
* - `prerelease-inside` — a prerelease whose core is inside the range but the
|
|
85
|
+
* range does not opt into it (D10 state P): the range's best stable may be
|
|
86
|
+
* lower OR higher, so it cannot be replaced without a registry lookup;
|
|
87
|
+
* - `gap` — stable, not satisfying, between `||` sets (npm picks a higher one).
|
|
88
|
+
* `undefined` when the range or the version cannot be judged.
|
|
89
|
+
* (Default-flag `gtr`/`ltr` are both true for `0.4.8-dev.1` vs `^0.4.7`, so they
|
|
90
|
+
* are not used for the prerelease case.)
|
|
91
|
+
*/
|
|
92
|
+
export type RangePosition = 'in' | 'above' | 'below' | 'prerelease-inside' | 'gap';
|
|
93
|
+
export declare function rangePosition(installed: string, range: string): RangePosition | undefined;
|
|
94
|
+
/**
|
|
95
|
+
* Risk markers for replacing `installed` with whatever npm resolves for `range`:
|
|
96
|
+
* - `downgrade`: installed is ABOVE the whole range (npm would go backwards);
|
|
97
|
+
* - `prerelease-to-stable`: installed is a prerelease and the range does not
|
|
98
|
+
* opt into prereleases (npm would replace the dev build with a stable one).
|
|
99
|
+
*/
|
|
100
|
+
export declare function changeWarnings(installed: string, range: string): DepWarning[];
|
|
101
|
+
/**
|
|
102
|
+
* Decide the action for ONE dependency. Pure.
|
|
103
|
+
*
|
|
104
|
+
* skip-dep -> skip
|
|
105
|
+
* none -> skip
|
|
106
|
+
* absent -> install (every mode except none)
|
|
107
|
+
* all -> change (unconditional reinstall, old behavior)
|
|
108
|
+
* missing -> keep (any installed version, even out of range)
|
|
109
|
+
* satisfied -> keep when installed satisfies range (D2 semantics); keep
|
|
110
|
+
* (NO downgrade, `aboveRange`) when above the range; keep
|
|
111
|
+
* (`prereleaseKept`) for a prerelease inside the range core;
|
|
112
|
+
* change when below the range (P keep is TEMP(D10))
|
|
113
|
+
*/
|
|
114
|
+
export declare function decideDep(dep: DeclaredDep, installed: string | undefined, mode: DepsMode, skipDeps?: ReadonlySet<string>): DepPlanEntry;
|
|
115
|
+
/** Plan every declared dependency. Pure given `lookup`. */
|
|
116
|
+
export declare function planDeps(deps: DeclaredDep[], opts: {
|
|
117
|
+
mode: DepsMode;
|
|
118
|
+
skipDeps?: Iterable<string>;
|
|
119
|
+
lookup: (name: string) => string | undefined;
|
|
120
|
+
}): DepPlanEntry[];
|
|
121
|
+
/** Entries the installer must act on (install or change). */
|
|
122
|
+
export declare function needsInstall(entry: DepPlanEntry): boolean;
|
|
123
|
+
/** True for a `change` that carries a downgrade / prerelease→stable risk. */
|
|
124
|
+
export declare function isRiskyChange(entry: DepPlanEntry): boolean;
|
|
125
|
+
/** Turn a declined risky change into a skip (keeps the installed version). */
|
|
126
|
+
export declare function declineChange(entry: DepPlanEntry): DepPlanEntry;
|
|
127
|
+
/**
|
|
128
|
+
* Annotate `keep` entries with the newest in-range version from the registry
|
|
129
|
+
* when it is newer than the installed one. Network — call only for dry-run.
|
|
130
|
+
* `resolveMax` returns the highest version satisfying the range (or null);
|
|
131
|
+
* lookup failures are ignored (annotation is best-effort).
|
|
132
|
+
*/
|
|
133
|
+
export declare function annotateNewerInRange(plan: DepPlanEntry[], resolveMax: (name: string, range: string) => Promise<string | null | undefined>): Promise<DepPlanEntry[]>;
|
|
134
|
+
/**
|
|
135
|
+
* Render the plan as plain text lines (no colors; the CLI may colorize).
|
|
136
|
+
* Header + one aligned row per dep + a hint line per risky change.
|
|
137
|
+
*/
|
|
138
|
+
export declare function formatDepPlan(plan: DepPlanEntry[], mode: DepsMode): string[];
|
|
139
|
+
/** @internal Reset the cached `npm root -g` (test-only). */
|
|
140
|
+
export declare function resetGlobalRootCache(): void;
|
|
141
|
+
/** `npm root -g`, spawned at most once per process; null when unavailable. */
|
|
142
|
+
export declare function getGlobalNpmRoot(): string | null;
|
|
143
|
+
/** Read `<root>/<name>/package.json` version; undefined when absent/unreadable. */
|
|
144
|
+
export declare function readInstalledVersion(root: string, name: string): string | undefined;
|
|
145
|
+
/**
|
|
146
|
+
* Build an installed-version lookup over the global npm root. When the root
|
|
147
|
+
* cannot be determined every dep reads as absent (=> install, the old behavior).
|
|
148
|
+
*/
|
|
149
|
+
export declare function createGlobalVersionLookup(root?: string | null): (name: string) => string | undefined;
|
|
150
|
+
//# sourceMappingURL=dep-plan.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dep-plan.d.ts","sourceRoot":"","sources":["../../src/utils/dep-plan.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAOH,qBAAqB;AACrB,MAAM,MAAM,QAAQ,GAAG,WAAW,GAAG,SAAS,GAAG,KAAK,GAAG,MAAM,CAAC;AAEhE,eAAO,MAAM,UAAU,EAAE,SAAS,QAAQ,EAA4C,CAAC;AAEvF,kEAAkE;AAClE,eAAO,MAAM,iBAAiB,EAAE,QAAsB,CAAC;AAEvD,MAAM,MAAM,SAAS,GAAG,MAAM,GAAG,SAAS,GAAG,QAAQ,GAAG,MAAM,CAAC;AAE/D,yDAAyD;AACzD,MAAM,MAAM,UAAU,GAAG,WAAW,GAAG,sBAAsB,CAAC;AAE9D,MAAM,WAAW,YAAY;IAC3B,uBAAuB;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,0CAA0C;IAC1C,KAAK,EAAE,MAAM,CAAC;IACd,iDAAiD;IACjD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,SAAS,CAAC;IAClB,yBAAyB;IACzB,MAAM,EAAE,MAAM,CAAC;IACf,iCAAiC;IACjC,IAAI,EAAE,KAAK,GAAG,KAAK,CAAC;IACpB,8CAA8C;IAC9C,QAAQ,CAAC,EAAE,UAAU,EAAE,CAAC;IACxB,qFAAqF;IACrF,YAAY,CAAC,EAAE,MAAM,C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: SkitManifest, componentType: Fi
|
|
|
10
10
|
/**
|
|
11
11
|
* Install a single component
|
|
12
12
|
*/
|
|
13
|
-
export declare function installComponent(stagingDir: string, targetDir: string, componentFile: string, componentType: FileComponentType, componentName: string): Promise<InstallResult>;
|
|
13
|
+
export declare function installComponent(stagingDir: string, targetDir: string, componentFile: string, componentType: FileComponentType, componentName: string, plan?: boolean): Promise<InstallResult>;
|
|
14
14
|
/**
|
|
15
15
|
* Install a single pack by merging into permission-packs.json
|
|
16
16
|
*/
|
|
17
|
-
export declare function installPack(stagingDir: string, packFile: string, packName: string): Promise<InstallResult>;
|
|
17
|
+
export declare function installPack(stagingDir: string, packFile: string, packName: string, plan?: boolean): Promise<InstallResult>;
|
|
18
18
|
/**
|
|
19
19
|
* Install a state directory (copies entire directory: state.json + *.md files)
|
|
20
20
|
*/
|
|
21
|
-
export declare function installStateDirectory(stagingDir: string, targetBaseDir: string, stateDir: string, stateName: string): Promise<InstallResult>;
|
|
21
|
+
export declare function installStateDirectory(stagingDir: string, targetBaseDir: string, stateDir: string, stateName: string, plan?: boolean): Promise<InstallResult>;
|
|
22
22
|
/**
|
|
23
|
-
* Install all components from a manifest
|
|
23
|
+
* Install all components from a manifest.
|
|
24
|
+
*
|
|
25
|
+
* `options.plan`: compute every component's target path WITHOUT touching the
|
|
26
|
+
* filesystem (used for the shared-path conflict check before writing).
|
|
24
27
|
*/
|
|
25
|
-
export declare function installAllComponents(manifest: SkitManifest, stagingDir: string, defaultPaths: Record<FileComponentType, string
|
|
28
|
+
export declare function installAllComponents(manifest: SkitManifest, stagingDir: string, defaultPaths: Record<FileComponentType, string>, options?: {
|
|
29
|
+
plan?: boolean;
|
|
30
|
+
}): Promise<InstallSummary>;
|
|
26
31
|
//# sourceMappingURL=file-copy.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"file-copy.d.ts","sourceRoot":"","sources":["../../src/utils/file-copy.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV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CAAC,aAAa,CAAC,CAsCxB;AAED;;GAEG;AACH,wBAAsB,qBAAqB,CACzC,UAAU,EAAE,MAAM,EAClB,aAAa,EAAE,MAAM,EACrB,QAAQ,EAAE,MAAM,EAChB,SAAS,EAAE,MAAM,EACjB,IAAI,UAAQ,GACX,OAAO,CAAC,aAAa,CAAC,CA+BxB;AAmBD;;;;;GAKG;AACH,wBAAsB,oBAAoB,CACxC,QAAQ,EAAE,YAAY,EACtB,UAAU,EAAE,MAAM,EAClB,YAAY,EAAE,MAAM,CAAC,iBAAiB,EAAE,MAAM,CAAC,EAC/C,OAAO,GAAE;IAAE,IAAI,CAAC,EAAE,OAAO,CAAA;CAAO,GAC/B,OAAO,CAAC,cAAc,CAAC,CAwFzB"}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GitLab group registry URL resolution for the gitlab-direct npm-dependency
|
|
3
|
+
* install path.
|
|
4
|
+
*
|
|
5
|
+
* This module is PURE / dependency-injected (host + token are passed in, never
|
|
6
|
+
* imported from lib.ts) so it can be consumed by both `lib.ts` (installNpmDeps)
|
|
7
|
+
* and `commands/browse.ts` WITHOUT creating an import cycle
|
|
8
|
+
* (browse.ts -> lib.ts already exists).
|
|
9
|
+
*
|
|
10
|
+
* Fix A (proxy-leak): a `dependencies.npm` entry with `source: 'gitlab'` used to
|
|
11
|
+
* require the author to hand-declare `registry[scope].url`; when it was absent
|
|
12
|
+
* the installer SILENTLY degraded the dep to the anonymous registry-proxy path,
|
|
13
|
+
* where a selective proxy 401s private scopes (@ist / @microwiseai / @mwd-*).
|
|
14
|
+
* We now DERIVE the group registry URL from the declared `registry[scope].group`
|
|
15
|
+
* NAME (name -> numeric id -> group npm registry URL), so gitlab-direct works
|
|
16
|
+
* from a `{ group }`-only manifest and no silent degrade is needed.
|
|
17
|
+
*/
|
|
18
|
+
import type { ScopeRegistryMapping } from '../types/skit.js';
|
|
19
|
+
/**
|
|
20
|
+
* Default timeout (ms) for the group-id lookup. Fix A newly inserts this network
|
|
21
|
+
* call into the DEFAULT (source-unset) install of a `{ group }`-only manifest —
|
|
22
|
+
* previously that path did no network and degraded to the proxy instantly. A
|
|
23
|
+
* private host that black-holes the request must NOT hang the install: we bound
|
|
24
|
+
* it so a timeout throws, is caught by installNpmDeps, and the default flow falls
|
|
25
|
+
* back to the proxy (explicit `--source gitlab` still fails loud). Override via
|
|
26
|
+
* `SKIT_GROUP_ID_TIMEOUT_MS` (positive integer) for slow networks.
|
|
27
|
+
*/
|
|
28
|
+
export declare const DEFAULT_GROUP_ID_TIMEOUT_MS = 5000;
|
|
29
|
+
/** Resolve the group-id lookup timeout (ms), honoring SKIT_GROUP_ID_TIMEOUT_MS. */
|
|
30
|
+
export declare function resolveGroupIdTimeoutMs(env?: Record<string, string | undefined>): number;
|
|
31
|
+
/**
|
|
32
|
+
* Build a GitLab group npm registry base URL from a numeric group id. Mirrors
|
|
33
|
+
* glpkg's `buildGroupRegistryUrl` (api/client.ts) and the trailing-slash form
|
|
34
|
+
* `npmrcAuthKey` (utils/temp-npmrc.ts) expects.
|
|
35
|
+
*
|
|
36
|
+
* @example
|
|
37
|
+
* buildGitlabGroupNpmRegistryUrl('gitlab.com', 456)
|
|
38
|
+
* // => 'https://gitlab.com/api/v4/groups/456/-/packages/npm/'
|
|
39
|
+
*/
|
|
40
|
+
export declare function buildGitlabGroupNpmRegistryUrl(host: string, groupId: number): string;
|
|
41
|
+
/**
|
|
42
|
+
* Resolve a GitLab group PATH → numeric id. Anonymous for a public group; a
|
|
43
|
+
* token (when present) enables private groups.
|
|
44
|
+
*
|
|
45
|
+
* Moved here from `commands/browse.ts` (re-exported there for backward compat)
|
|
46
|
+
* so the gitlab-direct install path can reuse it cycle-free. @internal
|
|
47
|
+
*/
|
|
48
|
+
export declare function resolveGroupId(host: string, group: string, token: string | null, timeoutMs?: number): Promise<number>;
|
|
49
|
+
/**
|
|
50
|
+
* Resolve the gitlab-direct npm registry base URL for a scope from its manifest
|
|
51
|
+
* `registry[scope]` entry. Precedence (Fix A):
|
|
52
|
+
* 1. explicit `entry.url` (author-declared) — used verbatim (unchanged);
|
|
53
|
+
* 2. derive from `entry.group` NAME → numeric id → group npm registry URL;
|
|
54
|
+
* 3. `null` when the scope has neither a `url` nor a `group`.
|
|
55
|
+
*
|
|
56
|
+
* THROWS only when a declared `group` cannot be resolved (network / 404 / 403);
|
|
57
|
+
* the caller decides whether that is fatal (explicit `--source gitlab`) or a
|
|
58
|
+
* soft fall-through to the proxy (default flow — no regression).
|
|
59
|
+
*
|
|
60
|
+
* `resolveId` is injectable for tests (defaults to {@link resolveGroupId}).
|
|
61
|
+
*/
|
|
62
|
+
export declare function resolveScopeGitlabRegistryUrl(scope: string, registry: ScopeRegistryMapping, host: string, token: string | null, resolveId?: (host: string, group: string, token: string | null) => Promise<number>): Promise<string | null>;
|
|
63
|
+
/** Outcome of routing a gitlab-batch npm dep (see {@link decideGitlabRouting}). */
|
|
64
|
+
export type GitlabRouting = {
|
|
65
|
+
batch: 'gitlab';
|
|
66
|
+
registryUrl: string;
|
|
67
|
+
} | {
|
|
68
|
+
batch: 'proxy';
|
|
69
|
+
warning: string | null;
|
|
70
|
+
};
|
|
71
|
+
/**
|
|
72
|
+
* PURE decision (no network) for a dep that the distkit matrix put in the
|
|
73
|
+
* 'gitlab' batch, given the ALREADY-resolved group-registry URL (or the error
|
|
74
|
+
* from trying to resolve it). Fix A + Fix B live here:
|
|
75
|
+
*
|
|
76
|
+
* - URL resolved -> `{ batch: 'gitlab', registryUrl }`.
|
|
77
|
+
* - URL null / resolve error:
|
|
78
|
+
* · `explicitSource === 'gitlab'` -> THROW (fail loud, name dep/scope + fix).
|
|
79
|
+
* · otherwise -> `{ batch: 'proxy', warning }` — preserve
|
|
80
|
+
* the anonymous-proxy fall-through so an un-migrated kit does not regress.
|
|
81
|
+
*
|
|
82
|
+
* Kept separate from the network resolution so it is trivially unit-testable.
|
|
83
|
+
*/
|
|
84
|
+
export declare function decideGitlabRouting(opts: {
|
|
85
|
+
spec: string;
|
|
86
|
+
scope: string | undefined;
|
|
87
|
+
registryUrl: string | null;
|
|
88
|
+
resolveError?: unknown;
|
|
89
|
+
explicitSource?: 'gitlab' | 'proxy';
|
|
90
|
+
}): GitlabRouting;
|
|
91
|
+
//# sourceMappingURL=gitlab-registry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gitlab-registry.d.ts","sourceRoot":"","sources":["../../src/utils/gitlab-registry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAE7D;;;;;;;;GAQG;AACH,eAAO,MAAM,2BAA2B,OAAO,CAAC;AAEhD,mFAAmF;AACnF,wBAAgB,uBAAuB,CACrC,GAAG,GAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAe,GACpD,MAAM,CAKR;AAED;;;;;;;;GAQG;AACH,wBAAgB,8BAA8B,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,CAEpF;AAOD;;;;;;GAMG;AACH,wBAAsB,cAAc,CAClC,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,MAAM,EACb,KAAK,EAAE,MAAM,GAAG,IAAI,EACpB,SAAS,GAAE,MAAkC,GAC5C,OAAO,CAAC,MAAM,CAAC,CAuBjB;AAED;;;;;;;;;;;;GAYG;AACH,wBAAsB,6BAA6B,CACjD,KAAK,EAAE,MAAM,EACb,QAAQ,EAAE,oBAAoB,EAC9B,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,MAAM,GAAG,IAAI,EACpB,SAAS,GAAE,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,KAAK,OAAO,CAAC,MAAM,CAAkB,GACjG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAaxB;AAED,mFAAmF;AACnF,MAAM,MAAM,aAAa,GACrB;IAAE,KAAK,EAAE,QAAQ,CAAC;IAAC,WAAW,EAAE,MAAM,CAAA;CAAE,GACxC;IAAE,KAAK,EAAE,OAAO,CAAC;IAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE,CAAC;AAE/C;;;;;;;;;;;;GAYG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE;IACxC,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,cAAc,CAAC,EAAE,QAAQ,GAAG,OAAO,CAAC;CACrC,GAAG,aAAa,CAoChB"}
|
|
@@ -8,6 +8,12 @@ export interface InstalledKit {
|
|
|
8
8
|
version: string;
|
|
9
9
|
installedAt: string;
|
|
10
10
|
files: string[];
|
|
11
|
+
/**
|
|
12
|
+
* Profile permission overlays applied by this kit on install
|
|
13
|
+
* (profileName -> allowedTools entries added). Recorded so uninstall can
|
|
14
|
+
* revert exactly what was granted. Absent for kits with no overlays.
|
|
15
|
+
*/
|
|
16
|
+
profileGrants?: Record<string, string[]>;
|
|
11
17
|
}
|
|
12
18
|
/**
|
|
13
19
|
* Registry structure
|
|
@@ -15,6 +21,10 @@ export interface InstalledKit {
|
|
|
15
21
|
export interface InstalledRegistry {
|
|
16
22
|
[packageName: string]: InstalledKit;
|
|
17
23
|
}
|
|
24
|
+
/**
|
|
25
|
+
* Expand ~ to home directory
|
|
26
|
+
*/
|
|
27
|
+
export declare function expandPath(path: string): string;
|
|
18
28
|
/**
|
|
19
29
|
* Contract path to use ~ for home directory
|
|
20
30
|
*/
|
|
@@ -34,15 +44,61 @@ export declare function getInstalledKit(packageName: string): Promise<InstalledK
|
|
|
34
44
|
/**
|
|
35
45
|
* Register an installed kit
|
|
36
46
|
*/
|
|
37
|
-
export declare function registerInstalledKit(packageName: string, version: string, files: string[]): Promise<void>;
|
|
47
|
+
export declare function registerInstalledKit(packageName: string, version: string, files: string[], profileGrants?: Record<string, string[]>): Promise<void>;
|
|
38
48
|
/**
|
|
39
49
|
* Unregister a kit
|
|
40
50
|
*/
|
|
41
51
|
export declare function unregisterKit(packageName: string): Promise<void>;
|
|
42
52
|
/**
|
|
43
|
-
*
|
|
53
|
+
* Shared merged files (several kits merge entries into ONE file, e.g.
|
|
54
|
+
* permission-packs.json). Never deleted by file cleanup — deleting it would
|
|
55
|
+
* drop every other kit's entries.
|
|
56
|
+
*/
|
|
57
|
+
export declare function isMergedFile(file: string): boolean;
|
|
58
|
+
/**
|
|
59
|
+
* Paths recorded by installed kits OTHER than `packageName`
|
|
60
|
+
* (key → owning kit names). Used for the ownership check and the install-time
|
|
61
|
+
* shared-path warning.
|
|
62
|
+
*/
|
|
63
|
+
export declare function pathsOwnedByOthers(registry: InstalledRegistry, packageName: string): Map<string, string[]>;
|
|
64
|
+
/** Result of {@link removeKitFiles}. */
|
|
65
|
+
export interface RemoveKitFilesResult {
|
|
66
|
+
/** Files deleted (or, under dryRun, that would be deleted). */
|
|
67
|
+
removed: string[];
|
|
68
|
+
/** Files kept because another installed kit also records them. */
|
|
69
|
+
keptShared: Array<{
|
|
70
|
+
file: string;
|
|
71
|
+
owners: string[];
|
|
72
|
+
}>;
|
|
73
|
+
/** Files kept because the new version installs them again (upgrade). */
|
|
74
|
+
keptInNewVersion: string[];
|
|
75
|
+
/** Shared merged files (permission-packs.json) — never deleted here. */
|
|
76
|
+
keptMerged: string[];
|
|
77
|
+
failed: Array<{
|
|
78
|
+
file: string;
|
|
79
|
+
error: string;
|
|
80
|
+
}>;
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Remove the files recorded for `packageName`, with an OWNERSHIP check:
|
|
84
|
+
* - a path another installed kit also records is KEPT (cross-kit delete bug:
|
|
85
|
+
* archkit 0.3.0→0.4.0 deleted debug-kit's prompts/global/arch-lint.md);
|
|
86
|
+
* - `keep` (the new version's target paths, on upgrade) is KEPT — only files
|
|
87
|
+
* dropped by the new version are deleted;
|
|
88
|
+
* - merged shared files (permission-packs.json) are never deleted.
|
|
89
|
+
* Does not touch the registry entry itself.
|
|
90
|
+
*/
|
|
91
|
+
export declare function removeKitFiles(packageName: string, options?: {
|
|
92
|
+
keep?: Iterable<string>;
|
|
93
|
+
dryRun?: boolean;
|
|
94
|
+
}): Promise<RemoveKitFilesResult>;
|
|
95
|
+
/**
|
|
96
|
+
* Remove files from a previous installation (ownership-checked; see
|
|
97
|
+
* {@link removeKitFiles}). Returns the removed files.
|
|
44
98
|
*/
|
|
45
|
-
export declare function cleanPreviousInstall(packageName: string
|
|
99
|
+
export declare function cleanPreviousInstall(packageName: string, options?: {
|
|
100
|
+
keep?: Iterable<string>;
|
|
101
|
+
}): Promise<string[]>;
|
|
46
102
|
/**
|
|
47
103
|
* List all installed kits
|
|
48
104
|
*/
|