@microwiseai/snapshot 0.3.32 → 0.3.37
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/commands/install.d.ts +1 -0
- package/dist/commands/install.d.ts.map +1 -1
- package/dist/commands/install.js +101 -12
- package/dist/commands/install.js.map +1 -1
- package/dist/lib/access-sync.d.ts.map +1 -1
- package/dist/lib/access-sync.js +2 -3
- package/dist/lib/access-sync.js.map +1 -1
- package/dist/lib/config.d.ts +11 -7
- package/dist/lib/config.d.ts.map +1 -1
- package/dist/lib/config.js +22 -13
- package/dist/lib/config.js.map +1 -1
- package/dist/lib/config.test.d.ts +2 -0
- package/dist/lib/config.test.d.ts.map +1 -0
- package/dist/lib/config.test.js +186 -0
- package/dist/lib/config.test.js.map +1 -0
- package/dist/lib/gitlab.d.ts.map +1 -1
- package/dist/lib/gitlab.js +5 -13
- package/dist/lib/gitlab.js.map +1 -1
- package/dist/lib/package-resolver.js +2 -2
- package/dist/lib/package-resolver.js.map +1 -1
- package/dist/lib/session.d.ts +37 -0
- package/dist/lib/session.d.ts.map +1 -0
- package/dist/lib/session.js +77 -0
- package/dist/lib/session.js.map +1 -0
- package/dist/lib/skit-adapter.d.ts +5 -5
- package/dist/lib/skit-adapter.d.ts.map +1 -1
- package/dist/lib/skit-adapter.js +58 -21
- package/dist/lib/skit-adapter.js.map +1 -1
- package/dist/lib/transitive-resolver.d.ts +4 -1
- package/dist/lib/transitive-resolver.d.ts.map +1 -1
- package/dist/lib/transitive-resolver.js +13 -8
- package/dist/lib/transitive-resolver.js.map +1 -1
- package/dist/lib/transitive-resolver.test.d.ts +2 -0
- package/dist/lib/transitive-resolver.test.d.ts.map +1 -0
- package/dist/lib/transitive-resolver.test.js +279 -0
- package/dist/lib/transitive-resolver.test.js.map +1 -0
- package/node_modules/@isaacs/fs-minipass/LICENSE +15 -0
- package/node_modules/@isaacs/fs-minipass/README.md +71 -0
- package/node_modules/@isaacs/fs-minipass/dist/commonjs/index.d.ts +118 -0
- package/node_modules/@isaacs/fs-minipass/dist/commonjs/index.d.ts.map +1 -0
- package/node_modules/@isaacs/fs-minipass/dist/commonjs/index.js +430 -0
- package/node_modules/@isaacs/fs-minipass/dist/commonjs/index.js.map +1 -0
- package/node_modules/@isaacs/fs-minipass/dist/commonjs/package.json +3 -0
- package/node_modules/@isaacs/fs-minipass/dist/esm/index.d.ts +118 -0
- package/node_modules/@isaacs/fs-minipass/dist/esm/index.d.ts.map +1 -0
- package/node_modules/@isaacs/fs-minipass/dist/esm/index.js +420 -0
- package/node_modules/@isaacs/fs-minipass/dist/esm/index.js.map +1 -0
- package/node_modules/@isaacs/fs-minipass/dist/esm/package.json +3 -0
- package/node_modules/@isaacs/fs-minipass/package.json +72 -0
- package/node_modules/@ist/registry-config/dist/index.d.ts +3 -0
- package/node_modules/@ist/registry-config/dist/index.js +3 -0
- package/node_modules/@ist/registry-config/dist/registry-url.d.ts +1 -0
- package/node_modules/@ist/registry-config/dist/registry-url.js +1 -0
- package/node_modules/@ist/registry-config/dist/scope-mapping.d.ts +6 -0
- package/node_modules/@ist/registry-config/dist/scope-mapping.js +7 -0
- package/node_modules/@ist/registry-config/dist/types.d.ts +4 -0
- package/node_modules/@ist/registry-config/dist/types.js +1 -0
- package/node_modules/@ist/registry-config/package.json +32 -0
- package/node_modules/@ist/skit/README.md +204 -0
- package/node_modules/@ist/skit/dist/commands/browse.d.ts +9 -0
- package/node_modules/@ist/skit/dist/commands/browse.d.ts.map +1 -0
- package/node_modules/@ist/skit/dist/commands/browse.js +127 -0
- package/node_modules/@ist/skit/dist/commands/browse.js.map +1 -0
- package/node_modules/@ist/skit/dist/commands/gitignore.d.ts +9 -0
- package/node_modules/@ist/skit/dist/commands/gitignore.d.ts.map +1 -0
- package/node_modules/@ist/skit/dist/commands/gitignore.js +59 -0
- package/node_modules/@ist/skit/dist/commands/gitignore.js.map +1 -0
- package/node_modules/@ist/skit/dist/commands/info.d.ts +9 -0
- package/node_modules/@ist/skit/dist/commands/info.d.ts.map +1 -0
- package/node_modules/@ist/skit/dist/commands/info.js +80 -0
- package/node_modules/@ist/skit/dist/commands/info.js.map +1 -0
- package/node_modules/@ist/skit/dist/commands/install.d.ts +13 -0
- package/node_modules/@ist/skit/dist/commands/install.d.ts.map +1 -0
- package/node_modules/@ist/skit/dist/commands/install.js +150 -0
- package/node_modules/@ist/skit/dist/commands/install.js.map +1 -0
- package/node_modules/@ist/skit/dist/commands/licenses.d.ts +9 -0
- package/node_modules/@ist/skit/dist/commands/licenses.d.ts.map +1 -0
- package/node_modules/@ist/skit/dist/commands/licenses.js +125 -0
- package/node_modules/@ist/skit/dist/commands/licenses.js.map +1 -0
- package/node_modules/@ist/skit/dist/commands/list.d.ts +12 -0
- package/node_modules/@ist/skit/dist/commands/list.d.ts.map +1 -0
- package/node_modules/@ist/skit/dist/commands/list.js +41 -0
- package/node_modules/@ist/skit/dist/commands/list.js.map +1 -0
- package/node_modules/@ist/skit/dist/commands/login.d.ts +10 -0
- package/node_modules/@ist/skit/dist/commands/login.d.ts.map +1 -0
- package/node_modules/@ist/skit/dist/commands/login.js +112 -0
- package/node_modules/@ist/skit/dist/commands/login.js.map +1 -0
- package/node_modules/@ist/skit/dist/commands/logout.d.ts +5 -0
- package/node_modules/@ist/skit/dist/commands/logout.d.ts.map +1 -0
- package/node_modules/@ist/skit/dist/commands/logout.js +30 -0
- package/node_modules/@ist/skit/dist/commands/logout.js.map +1 -0
- package/node_modules/@ist/skit/dist/commands/pack.d.ts +10 -0
- package/node_modules/@ist/skit/dist/commands/pack.d.ts.map +1 -0
- package/node_modules/@ist/skit/dist/commands/pack.js +185 -0
- package/node_modules/@ist/skit/dist/commands/pack.js.map +1 -0
- package/node_modules/@ist/skit/dist/commands/publish.d.ts +11 -0
- package/node_modules/@ist/skit/dist/commands/publish.d.ts.map +1 -0
- package/node_modules/@ist/skit/dist/commands/publish.js +108 -0
- package/node_modules/@ist/skit/dist/commands/publish.js.map +1 -0
- package/node_modules/@ist/skit/dist/commands/purchase.d.ts +9 -0
- package/node_modules/@ist/skit/dist/commands/purchase.d.ts.map +1 -0
- package/node_modules/@ist/skit/dist/commands/purchase.js +160 -0
- package/node_modules/@ist/skit/dist/commands/purchase.js.map +1 -0
- package/node_modules/@ist/skit/dist/commands/register.d.ts +10 -0
- package/node_modules/@ist/skit/dist/commands/register.d.ts.map +1 -0
- package/node_modules/@ist/skit/dist/commands/register.js +121 -0
- package/node_modules/@ist/skit/dist/commands/register.js.map +1 -0
- package/node_modules/@ist/skit/dist/commands/uninstall.d.ts +13 -0
- package/node_modules/@ist/skit/dist/commands/uninstall.d.ts.map +1 -0
- package/node_modules/@ist/skit/dist/commands/uninstall.js +138 -0
- package/node_modules/@ist/skit/dist/commands/uninstall.js.map +1 -0
- package/node_modules/@ist/skit/dist/commands/whoami.d.ts +9 -0
- package/node_modules/@ist/skit/dist/commands/whoami.d.ts.map +1 -0
- package/node_modules/@ist/skit/dist/commands/whoami.js +79 -0
- package/node_modules/@ist/skit/dist/commands/whoami.js.map +1 -0
- package/node_modules/@ist/skit/dist/index.d.ts +3 -0
- package/node_modules/@ist/skit/dist/index.d.ts.map +1 -0
- package/node_modules/@ist/skit/dist/index.js +69 -0
- package/node_modules/@ist/skit/dist/index.js.map +1 -0
- package/node_modules/@ist/skit/dist/lib.d.ts +144 -0
- package/node_modules/@ist/skit/dist/lib.d.ts.map +1 -0
- package/node_modules/@ist/skit/dist/lib.js +542 -0
- package/node_modules/@ist/skit/dist/lib.js.map +1 -0
- package/node_modules/@ist/skit/dist/types/skit.d.ts +155 -0
- package/node_modules/@ist/skit/dist/types/skit.d.ts.map +1 -0
- package/node_modules/@ist/skit/dist/types/skit.js +20 -0
- package/node_modules/@ist/skit/dist/types/skit.js.map +1 -0
- package/node_modules/@ist/skit/dist/utils/api.d.ts +18 -0
- package/node_modules/@ist/skit/dist/utils/api.d.ts.map +1 -0
- package/node_modules/@ist/skit/dist/utils/api.js +26 -0
- package/node_modules/@ist/skit/dist/utils/api.js.map +1 -0
- package/node_modules/@ist/skit/dist/utils/auth.d.ts +62 -0
- package/node_modules/@ist/skit/dist/utils/auth.d.ts.map +1 -0
- package/node_modules/@ist/skit/dist/utils/auth.js +172 -0
- package/node_modules/@ist/skit/dist/utils/auth.js.map +1 -0
- package/node_modules/@ist/skit/dist/utils/file-copy.d.ts +26 -0
- package/node_modules/@ist/skit/dist/utils/file-copy.d.ts.map +1 -0
- package/node_modules/@ist/skit/dist/utils/file-copy.js +219 -0
- package/node_modules/@ist/skit/dist/utils/file-copy.js.map +1 -0
- package/node_modules/@ist/skit/dist/utils/hook-installer.d.ts +21 -0
- package/node_modules/@ist/skit/dist/utils/hook-installer.d.ts.map +1 -0
- package/node_modules/@ist/skit/dist/utils/hook-installer.js +98 -0
- package/node_modules/@ist/skit/dist/utils/hook-installer.js.map +1 -0
- package/node_modules/@ist/skit/dist/utils/installed-registry.d.ts +50 -0
- package/node_modules/@ist/skit/dist/utils/installed-registry.d.ts.map +1 -0
- package/node_modules/@ist/skit/dist/utils/installed-registry.js +108 -0
- package/node_modules/@ist/skit/dist/utils/installed-registry.js.map +1 -0
- package/node_modules/@ist/skit/dist/utils/skit-parser.d.ts +10 -0
- package/node_modules/@ist/skit/dist/utils/skit-parser.d.ts.map +1 -0
- package/node_modules/@ist/skit/dist/utils/skit-parser.js +52 -0
- package/node_modules/@ist/skit/dist/utils/skit-parser.js.map +1 -0
- package/node_modules/@ist/skit/dist/utils/wrapper-generator.d.ts +74 -0
- package/node_modules/@ist/skit/dist/utils/wrapper-generator.d.ts.map +1 -0
- package/node_modules/@ist/skit/dist/utils/wrapper-generator.js +280 -0
- package/node_modules/@ist/skit/dist/utils/wrapper-generator.js.map +1 -0
- package/node_modules/@ist/skit/package.json +54 -0
- package/node_modules/chownr/LICENSE.md +63 -0
- package/node_modules/chownr/README.md +3 -0
- package/node_modules/chownr/dist/commonjs/index.d.ts +3 -0
- package/node_modules/chownr/dist/commonjs/index.d.ts.map +1 -0
- package/node_modules/chownr/dist/commonjs/index.js +93 -0
- package/node_modules/chownr/dist/commonjs/index.js.map +1 -0
- package/node_modules/chownr/dist/commonjs/package.json +3 -0
- package/node_modules/chownr/dist/esm/index.d.ts +3 -0
- package/node_modules/chownr/dist/esm/index.d.ts.map +1 -0
- package/node_modules/chownr/dist/esm/index.js +85 -0
- package/node_modules/chownr/dist/esm/index.js.map +1 -0
- package/node_modules/chownr/dist/esm/package.json +3 -0
- package/node_modules/chownr/package.json +69 -0
- package/node_modules/commander/LICENSE +22 -0
- package/node_modules/commander/Readme.md +1157 -0
- package/node_modules/commander/esm.mjs +16 -0
- package/node_modules/commander/index.js +24 -0
- package/node_modules/commander/lib/argument.js +149 -0
- package/node_modules/commander/lib/command.js +2509 -0
- package/node_modules/commander/lib/error.js +39 -0
- package/node_modules/commander/lib/help.js +520 -0
- package/node_modules/commander/lib/option.js +330 -0
- package/node_modules/commander/lib/suggestSimilar.js +101 -0
- package/node_modules/commander/package-support.json +16 -0
- package/node_modules/commander/package.json +84 -0
- package/node_modules/commander/typings/esm.d.mts +3 -0
- package/node_modules/commander/typings/index.d.ts +969 -0
- package/node_modules/minipass/LICENSE.md +55 -0
- package/node_modules/minipass/README.md +825 -0
- package/node_modules/minipass/dist/commonjs/index.d.ts +545 -0
- package/node_modules/minipass/dist/commonjs/index.d.ts.map +1 -0
- package/node_modules/minipass/dist/commonjs/index.js +1038 -0
- package/node_modules/minipass/dist/commonjs/index.js.map +1 -0
- package/node_modules/minipass/dist/commonjs/package.json +3 -0
- package/node_modules/minipass/dist/esm/index.d.ts +545 -0
- package/node_modules/minipass/dist/esm/index.d.ts.map +1 -0
- package/node_modules/minipass/dist/esm/index.js +1020 -0
- package/node_modules/minipass/dist/esm/index.js.map +1 -0
- package/node_modules/minipass/dist/esm/package.json +3 -0
- package/node_modules/minipass/package.json +77 -0
- package/node_modules/minizlib/LICENSE +26 -0
- package/node_modules/minizlib/README.md +64 -0
- package/node_modules/minizlib/dist/commonjs/constants.d.ts +2 -0
- package/node_modules/minizlib/dist/commonjs/constants.d.ts.map +1 -0
- package/node_modules/minizlib/dist/commonjs/constants.js +123 -0
- package/node_modules/minizlib/dist/commonjs/constants.js.map +1 -0
- package/node_modules/minizlib/dist/commonjs/index.d.ts +99 -0
- package/node_modules/minizlib/dist/commonjs/index.d.ts.map +1 -0
- package/node_modules/minizlib/dist/commonjs/index.js +416 -0
- package/node_modules/minizlib/dist/commonjs/index.js.map +1 -0
- package/node_modules/minizlib/dist/commonjs/package.json +3 -0
- package/node_modules/minizlib/dist/esm/constants.d.ts +2 -0
- package/node_modules/minizlib/dist/esm/constants.d.ts.map +1 -0
- package/node_modules/minizlib/dist/esm/constants.js +117 -0
- package/node_modules/minizlib/dist/esm/constants.js.map +1 -0
- package/node_modules/minizlib/dist/esm/index.d.ts +99 -0
- package/node_modules/minizlib/dist/esm/index.d.ts.map +1 -0
- package/node_modules/minizlib/dist/esm/index.js +363 -0
- package/node_modules/minizlib/dist/esm/index.js.map +1 -0
- package/node_modules/minizlib/dist/esm/package.json +3 -0
- package/node_modules/minizlib/package.json +80 -0
- package/node_modules/tar/LICENSE.md +55 -0
- package/node_modules/tar/README.md +1224 -0
- package/node_modules/tar/dist/commonjs/create.d.ts +3 -0
- package/node_modules/tar/dist/commonjs/create.d.ts.map +1 -0
- package/node_modules/tar/dist/commonjs/create.js +82 -0
- package/node_modules/tar/dist/commonjs/create.js.map +1 -0
- package/node_modules/tar/dist/commonjs/cwd-error.d.ts +8 -0
- package/node_modules/tar/dist/commonjs/cwd-error.d.ts.map +1 -0
- package/node_modules/tar/dist/commonjs/cwd-error.js +18 -0
- package/node_modules/tar/dist/commonjs/cwd-error.js.map +1 -0
- package/node_modules/tar/dist/commonjs/extract.d.ts +3 -0
- package/node_modules/tar/dist/commonjs/extract.d.ts.map +1 -0
- package/node_modules/tar/dist/commonjs/extract.js +88 -0
- package/node_modules/tar/dist/commonjs/extract.js.map +1 -0
- package/node_modules/tar/dist/commonjs/get-write-flag.d.ts +2 -0
- package/node_modules/tar/dist/commonjs/get-write-flag.d.ts.map +1 -0
- package/node_modules/tar/dist/commonjs/get-write-flag.js +32 -0
- package/node_modules/tar/dist/commonjs/get-write-flag.js.map +1 -0
- package/node_modules/tar/dist/commonjs/header.d.ts +53 -0
- package/node_modules/tar/dist/commonjs/header.d.ts.map +1 -0
- package/node_modules/tar/dist/commonjs/header.js +312 -0
- package/node_modules/tar/dist/commonjs/header.js.map +1 -0
- package/node_modules/tar/dist/commonjs/index.d.ts +20 -0
- package/node_modules/tar/dist/commonjs/index.d.ts.map +1 -0
- package/node_modules/tar/dist/commonjs/index.js +64 -0
- package/node_modules/tar/dist/commonjs/index.js.map +1 -0
- package/node_modules/tar/dist/commonjs/index.min.js +4 -0
- package/node_modules/tar/dist/commonjs/index.min.js.map +7 -0
- package/node_modules/tar/dist/commonjs/large-numbers.d.ts +3 -0
- package/node_modules/tar/dist/commonjs/large-numbers.d.ts.map +1 -0
- package/node_modules/tar/dist/commonjs/large-numbers.js +99 -0
- package/node_modules/tar/dist/commonjs/large-numbers.js.map +1 -0
- package/node_modules/tar/dist/commonjs/list.d.ts +7 -0
- package/node_modules/tar/dist/commonjs/list.d.ts.map +1 -0
- package/node_modules/tar/dist/commonjs/list.js +145 -0
- package/node_modules/tar/dist/commonjs/list.js.map +1 -0
- package/node_modules/tar/dist/commonjs/make-command.d.ts +49 -0
- package/node_modules/tar/dist/commonjs/make-command.d.ts.map +1 -0
- package/node_modules/tar/dist/commonjs/make-command.js +52 -0
- package/node_modules/tar/dist/commonjs/make-command.js.map +1 -0
- package/node_modules/tar/dist/commonjs/mkdir.d.ts +25 -0
- package/node_modules/tar/dist/commonjs/mkdir.d.ts.map +1 -0
- package/node_modules/tar/dist/commonjs/mkdir.js +187 -0
- package/node_modules/tar/dist/commonjs/mkdir.js.map +1 -0
- package/node_modules/tar/dist/commonjs/mode-fix.d.ts +2 -0
- package/node_modules/tar/dist/commonjs/mode-fix.d.ts.map +1 -0
- package/node_modules/tar/dist/commonjs/mode-fix.js +29 -0
- package/node_modules/tar/dist/commonjs/mode-fix.js.map +1 -0
- package/node_modules/tar/dist/commonjs/normalize-unicode.d.ts +2 -0
- package/node_modules/tar/dist/commonjs/normalize-unicode.d.ts.map +1 -0
- package/node_modules/tar/dist/commonjs/normalize-unicode.js +38 -0
- package/node_modules/tar/dist/commonjs/normalize-unicode.js.map +1 -0
- package/node_modules/tar/dist/commonjs/normalize-windows-path.d.ts +2 -0
- package/node_modules/tar/dist/commonjs/normalize-windows-path.d.ts.map +1 -0
- package/node_modules/tar/dist/commonjs/normalize-windows-path.js +12 -0
- package/node_modules/tar/dist/commonjs/normalize-windows-path.js.map +1 -0
- package/node_modules/tar/dist/commonjs/options.d.ts +596 -0
- package/node_modules/tar/dist/commonjs/options.d.ts.map +1 -0
- package/node_modules/tar/dist/commonjs/options.js +66 -0
- package/node_modules/tar/dist/commonjs/options.js.map +1 -0
- package/node_modules/tar/dist/commonjs/pack.d.ts +102 -0
- package/node_modules/tar/dist/commonjs/pack.d.ts.map +1 -0
- package/node_modules/tar/dist/commonjs/pack.js +511 -0
- package/node_modules/tar/dist/commonjs/pack.js.map +1 -0
- package/node_modules/tar/dist/commonjs/package.json +3 -0
- package/node_modules/tar/dist/commonjs/parse.d.ts +85 -0
- package/node_modules/tar/dist/commonjs/parse.d.ts.map +1 -0
- package/node_modules/tar/dist/commonjs/parse.js +610 -0
- package/node_modules/tar/dist/commonjs/parse.js.map +1 -0
- package/node_modules/tar/dist/commonjs/path-reservations.d.ts +11 -0
- package/node_modules/tar/dist/commonjs/path-reservations.d.ts.map +1 -0
- package/node_modules/tar/dist/commonjs/path-reservations.js +170 -0
- package/node_modules/tar/dist/commonjs/path-reservations.js.map +1 -0
- package/node_modules/tar/dist/commonjs/pax.d.ts +26 -0
- package/node_modules/tar/dist/commonjs/pax.d.ts.map +1 -0
- package/node_modules/tar/dist/commonjs/pax.js +158 -0
- package/node_modules/tar/dist/commonjs/pax.js.map +1 -0
- package/node_modules/tar/dist/commonjs/process-umask.d.ts +2 -0
- package/node_modules/tar/dist/commonjs/process-umask.d.ts.map +1 -0
- package/node_modules/tar/dist/commonjs/process-umask.js +7 -0
- package/node_modules/tar/dist/commonjs/process-umask.js.map +1 -0
- package/node_modules/tar/dist/commonjs/read-entry.d.ts +36 -0
- package/node_modules/tar/dist/commonjs/read-entry.d.ts.map +1 -0
- package/node_modules/tar/dist/commonjs/read-entry.js +136 -0
- package/node_modules/tar/dist/commonjs/read-entry.js.map +1 -0
- package/node_modules/tar/dist/commonjs/replace.d.ts +2 -0
- package/node_modules/tar/dist/commonjs/replace.d.ts.map +1 -0
- package/node_modules/tar/dist/commonjs/replace.js +227 -0
- package/node_modules/tar/dist/commonjs/replace.js.map +1 -0
- package/node_modules/tar/dist/commonjs/strip-absolute-path.d.ts +2 -0
- package/node_modules/tar/dist/commonjs/strip-absolute-path.d.ts.map +1 -0
- package/node_modules/tar/dist/commonjs/strip-absolute-path.js +29 -0
- package/node_modules/tar/dist/commonjs/strip-absolute-path.js.map +1 -0
- package/node_modules/tar/dist/commonjs/strip-trailing-slashes.d.ts +2 -0
- package/node_modules/tar/dist/commonjs/strip-trailing-slashes.d.ts.map +1 -0
- package/node_modules/tar/dist/commonjs/strip-trailing-slashes.js +18 -0
- package/node_modules/tar/dist/commonjs/strip-trailing-slashes.js.map +1 -0
- package/node_modules/tar/dist/commonjs/symlink-error.d.ts +9 -0
- package/node_modules/tar/dist/commonjs/symlink-error.d.ts.map +1 -0
- package/node_modules/tar/dist/commonjs/symlink-error.js +19 -0
- package/node_modules/tar/dist/commonjs/symlink-error.js.map +1 -0
- package/node_modules/tar/dist/commonjs/types.d.ts +7 -0
- package/node_modules/tar/dist/commonjs/types.d.ts.map +1 -0
- package/node_modules/tar/dist/commonjs/types.js +50 -0
- package/node_modules/tar/dist/commonjs/types.js.map +1 -0
- package/node_modules/tar/dist/commonjs/unpack.d.ts +101 -0
- package/node_modules/tar/dist/commonjs/unpack.d.ts.map +1 -0
- package/node_modules/tar/dist/commonjs/unpack.js +932 -0
- package/node_modules/tar/dist/commonjs/unpack.js.map +1 -0
- package/node_modules/tar/dist/commonjs/update.d.ts +2 -0
- package/node_modules/tar/dist/commonjs/update.d.ts.map +1 -0
- package/node_modules/tar/dist/commonjs/update.js +33 -0
- package/node_modules/tar/dist/commonjs/update.js.map +1 -0
- package/node_modules/tar/dist/commonjs/warn-method.d.ts +24 -0
- package/node_modules/tar/dist/commonjs/warn-method.d.ts.map +1 -0
- package/node_modules/tar/dist/commonjs/warn-method.js +31 -0
- package/node_modules/tar/dist/commonjs/warn-method.js.map +1 -0
- package/node_modules/tar/dist/commonjs/winchars.d.ts +3 -0
- package/node_modules/tar/dist/commonjs/winchars.d.ts.map +1 -0
- package/node_modules/tar/dist/commonjs/winchars.js +14 -0
- package/node_modules/tar/dist/commonjs/winchars.js.map +1 -0
- package/node_modules/tar/dist/commonjs/write-entry.d.ts +129 -0
- package/node_modules/tar/dist/commonjs/write-entry.d.ts.map +1 -0
- package/node_modules/tar/dist/commonjs/write-entry.js +698 -0
- package/node_modules/tar/dist/commonjs/write-entry.js.map +1 -0
- package/node_modules/tar/dist/esm/create.d.ts +3 -0
- package/node_modules/tar/dist/esm/create.d.ts.map +1 -0
- package/node_modules/tar/dist/esm/create.js +76 -0
- package/node_modules/tar/dist/esm/create.js.map +1 -0
- package/node_modules/tar/dist/esm/cwd-error.d.ts +8 -0
- package/node_modules/tar/dist/esm/cwd-error.d.ts.map +1 -0
- package/node_modules/tar/dist/esm/cwd-error.js +14 -0
- package/node_modules/tar/dist/esm/cwd-error.js.map +1 -0
- package/node_modules/tar/dist/esm/extract.d.ts +3 -0
- package/node_modules/tar/dist/esm/extract.d.ts.map +1 -0
- package/node_modules/tar/dist/esm/extract.js +49 -0
- package/node_modules/tar/dist/esm/extract.js.map +1 -0
- package/node_modules/tar/dist/esm/get-write-flag.d.ts +2 -0
- package/node_modules/tar/dist/esm/get-write-flag.d.ts.map +1 -0
- package/node_modules/tar/dist/esm/get-write-flag.js +26 -0
- package/node_modules/tar/dist/esm/get-write-flag.js.map +1 -0
- package/node_modules/tar/dist/esm/header.d.ts +53 -0
- package/node_modules/tar/dist/esm/header.d.ts.map +1 -0
- package/node_modules/tar/dist/esm/header.js +275 -0
- package/node_modules/tar/dist/esm/header.js.map +1 -0
- package/node_modules/tar/dist/esm/index.d.ts +20 -0
- package/node_modules/tar/dist/esm/index.d.ts.map +1 -0
- package/node_modules/tar/dist/esm/index.js +20 -0
- package/node_modules/tar/dist/esm/index.js.map +1 -0
- package/node_modules/tar/dist/esm/index.min.js +4 -0
- package/node_modules/tar/dist/esm/index.min.js.map +7 -0
- package/node_modules/tar/dist/esm/large-numbers.d.ts +3 -0
- package/node_modules/tar/dist/esm/large-numbers.d.ts.map +1 -0
- package/node_modules/tar/dist/esm/large-numbers.js +94 -0
- package/node_modules/tar/dist/esm/large-numbers.js.map +1 -0
- package/node_modules/tar/dist/esm/list.d.ts +7 -0
- package/node_modules/tar/dist/esm/list.d.ts.map +1 -0
- package/node_modules/tar/dist/esm/list.js +105 -0
- package/node_modules/tar/dist/esm/list.js.map +1 -0
- package/node_modules/tar/dist/esm/make-command.d.ts +49 -0
- package/node_modules/tar/dist/esm/make-command.d.ts.map +1 -0
- package/node_modules/tar/dist/esm/make-command.js +48 -0
- package/node_modules/tar/dist/esm/make-command.js.map +1 -0
- package/node_modules/tar/dist/esm/mkdir.d.ts +25 -0
- package/node_modules/tar/dist/esm/mkdir.d.ts.map +1 -0
- package/node_modules/tar/dist/esm/mkdir.js +179 -0
- package/node_modules/tar/dist/esm/mkdir.js.map +1 -0
- package/node_modules/tar/dist/esm/mode-fix.d.ts +2 -0
- package/node_modules/tar/dist/esm/mode-fix.d.ts.map +1 -0
- package/node_modules/tar/dist/esm/mode-fix.js +25 -0
- package/node_modules/tar/dist/esm/mode-fix.js.map +1 -0
- package/node_modules/tar/dist/esm/normalize-unicode.d.ts +2 -0
- package/node_modules/tar/dist/esm/normalize-unicode.d.ts.map +1 -0
- package/node_modules/tar/dist/esm/normalize-unicode.js +34 -0
- package/node_modules/tar/dist/esm/normalize-unicode.js.map +1 -0
- package/node_modules/tar/dist/esm/normalize-windows-path.d.ts +2 -0
- package/node_modules/tar/dist/esm/normalize-windows-path.d.ts.map +1 -0
- package/node_modules/tar/dist/esm/normalize-windows-path.js +9 -0
- package/node_modules/tar/dist/esm/normalize-windows-path.js.map +1 -0
- package/node_modules/tar/dist/esm/options.d.ts +596 -0
- package/node_modules/tar/dist/esm/options.d.ts.map +1 -0
- package/node_modules/tar/dist/esm/options.js +54 -0
- package/node_modules/tar/dist/esm/options.js.map +1 -0
- package/node_modules/tar/dist/esm/pack.d.ts +102 -0
- package/node_modules/tar/dist/esm/pack.d.ts.map +1 -0
- package/node_modules/tar/dist/esm/pack.js +469 -0
- package/node_modules/tar/dist/esm/pack.js.map +1 -0
- package/node_modules/tar/dist/esm/package.json +3 -0
- package/node_modules/tar/dist/esm/parse.d.ts +85 -0
- package/node_modules/tar/dist/esm/parse.d.ts.map +1 -0
- package/node_modules/tar/dist/esm/parse.js +606 -0
- package/node_modules/tar/dist/esm/parse.js.map +1 -0
- package/node_modules/tar/dist/esm/path-reservations.d.ts +11 -0
- package/node_modules/tar/dist/esm/path-reservations.d.ts.map +1 -0
- package/node_modules/tar/dist/esm/path-reservations.js +166 -0
- package/node_modules/tar/dist/esm/path-reservations.js.map +1 -0
- package/node_modules/tar/dist/esm/pax.d.ts +26 -0
- package/node_modules/tar/dist/esm/pax.d.ts.map +1 -0
- package/node_modules/tar/dist/esm/pax.js +154 -0
- package/node_modules/tar/dist/esm/pax.js.map +1 -0
- package/node_modules/tar/dist/esm/process-umask.d.ts +2 -0
- package/node_modules/tar/dist/esm/process-umask.d.ts.map +1 -0
- package/node_modules/tar/dist/esm/process-umask.js +3 -0
- package/node_modules/tar/dist/esm/process-umask.js.map +1 -0
- package/node_modules/tar/dist/esm/read-entry.d.ts +36 -0
- package/node_modules/tar/dist/esm/read-entry.d.ts.map +1 -0
- package/node_modules/tar/dist/esm/read-entry.js +132 -0
- package/node_modules/tar/dist/esm/read-entry.js.map +1 -0
- package/node_modules/tar/dist/esm/replace.d.ts +2 -0
- package/node_modules/tar/dist/esm/replace.d.ts.map +1 -0
- package/node_modules/tar/dist/esm/replace.js +221 -0
- package/node_modules/tar/dist/esm/replace.js.map +1 -0
- package/node_modules/tar/dist/esm/strip-absolute-path.d.ts +2 -0
- package/node_modules/tar/dist/esm/strip-absolute-path.d.ts.map +1 -0
- package/node_modules/tar/dist/esm/strip-absolute-path.js +25 -0
- package/node_modules/tar/dist/esm/strip-absolute-path.js.map +1 -0
- package/node_modules/tar/dist/esm/strip-trailing-slashes.d.ts +2 -0
- package/node_modules/tar/dist/esm/strip-trailing-slashes.d.ts.map +1 -0
- package/node_modules/tar/dist/esm/strip-trailing-slashes.js +14 -0
- package/node_modules/tar/dist/esm/strip-trailing-slashes.js.map +1 -0
- package/node_modules/tar/dist/esm/symlink-error.d.ts +9 -0
- package/node_modules/tar/dist/esm/symlink-error.d.ts.map +1 -0
- package/node_modules/tar/dist/esm/symlink-error.js +15 -0
- package/node_modules/tar/dist/esm/symlink-error.js.map +1 -0
- package/node_modules/tar/dist/esm/types.d.ts +7 -0
- package/node_modules/tar/dist/esm/types.d.ts.map +1 -0
- package/node_modules/tar/dist/esm/types.js +45 -0
- package/node_modules/tar/dist/esm/types.js.map +1 -0
- package/node_modules/tar/dist/esm/unpack.d.ts +101 -0
- package/node_modules/tar/dist/esm/unpack.d.ts.map +1 -0
- package/node_modules/tar/dist/esm/unpack.js +891 -0
- package/node_modules/tar/dist/esm/unpack.js.map +1 -0
- package/node_modules/tar/dist/esm/update.d.ts +2 -0
- package/node_modules/tar/dist/esm/update.d.ts.map +1 -0
- package/node_modules/tar/dist/esm/update.js +30 -0
- package/node_modules/tar/dist/esm/update.js.map +1 -0
- package/node_modules/tar/dist/esm/warn-method.d.ts +24 -0
- package/node_modules/tar/dist/esm/warn-method.d.ts.map +1 -0
- package/node_modules/tar/dist/esm/warn-method.js +27 -0
- package/node_modules/tar/dist/esm/warn-method.js.map +1 -0
- package/node_modules/tar/dist/esm/winchars.d.ts +3 -0
- package/node_modules/tar/dist/esm/winchars.d.ts.map +1 -0
- package/node_modules/tar/dist/esm/winchars.js +9 -0
- package/node_modules/tar/dist/esm/winchars.js.map +1 -0
- package/node_modules/tar/dist/esm/write-entry.d.ts +129 -0
- package/node_modules/tar/dist/esm/write-entry.d.ts.map +1 -0
- package/node_modules/tar/dist/esm/write-entry.js +656 -0
- package/node_modules/tar/dist/esm/write-entry.js.map +1 -0
- package/node_modules/tar/package.json +297 -0
- package/node_modules/yallist/LICENSE.md +63 -0
- package/node_modules/yallist/README.md +205 -0
- package/node_modules/yallist/dist/commonjs/index.d.ts +39 -0
- package/node_modules/yallist/dist/commonjs/index.d.ts.map +1 -0
- package/node_modules/yallist/dist/commonjs/index.js +384 -0
- package/node_modules/yallist/dist/commonjs/index.js.map +1 -0
- package/node_modules/yallist/dist/commonjs/package.json +3 -0
- package/node_modules/yallist/dist/esm/index.d.ts +39 -0
- package/node_modules/yallist/dist/esm/index.d.ts.map +1 -0
- package/node_modules/yallist/dist/esm/index.js +379 -0
- package/node_modules/yallist/dist/esm/index.js.map +1 -0
- package/node_modules/yallist/dist/esm/package.json +3 -0
- package/node_modules/yallist/package.json +68 -0
- package/package.json +9 -5
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* skit uninstall command - uninstall a kit
|
|
3
|
+
*/
|
|
4
|
+
interface UninstallOptions {
|
|
5
|
+
verbose?: boolean;
|
|
6
|
+
dryRun?: boolean;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Uninstall command handler
|
|
10
|
+
*/
|
|
11
|
+
export declare function uninstallCommand(packageName: string, options: UninstallOptions): Promise<void>;
|
|
12
|
+
export {};
|
|
13
|
+
//# sourceMappingURL=uninstall.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"uninstall.d.ts","sourceRoot":"","sources":["../../src/commands/uninstall.ts"],"names":[],"mappings":"AAAA;;GAEG;AAaH,UAAU,gBAAgB;IACxB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AA4DD;;GAEG;AACH,wBAAsB,gBAAgB,CACpC,WAAW,EAAE,MAAM,EACnB,OAAO,EAAE,gBAAgB,GACxB,OAAO,CAAC,IAAI,CAAC,CA+Ef"}
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* skit uninstall command - uninstall a kit
|
|
3
|
+
*/
|
|
4
|
+
import { rm, access } from 'node:fs/promises';
|
|
5
|
+
import { join } from 'node:path';
|
|
6
|
+
import { homedir } from 'node:os';
|
|
7
|
+
import chalk from 'chalk';
|
|
8
|
+
import { getInstalledKit, unregisterKit, } from '../utils/installed-registry.js';
|
|
9
|
+
import { PERMISSION_PACKS_PATH } from '../types/skit.js';
|
|
10
|
+
/**
|
|
11
|
+
* Expand ~ to home directory
|
|
12
|
+
*/
|
|
13
|
+
function expandPath(path) {
|
|
14
|
+
if (path.startsWith('~/')) {
|
|
15
|
+
return join(homedir(), path.slice(2));
|
|
16
|
+
}
|
|
17
|
+
return path;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Check if a file is a pack (merged into permission-packs.json)
|
|
21
|
+
* Packs don't have individual files, they're merged entries
|
|
22
|
+
*/
|
|
23
|
+
function isPackFile(file) {
|
|
24
|
+
return file === PERMISSION_PACKS_PATH || file.endsWith('permission-packs.json');
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Remove pack entries from permission-packs.json
|
|
28
|
+
* Note: This is a best-effort cleanup - we can't perfectly track which packs came from which kit
|
|
29
|
+
*/
|
|
30
|
+
async function cleanupPermissionPacks() {
|
|
31
|
+
const packsPath = expandPath(PERMISSION_PACKS_PATH);
|
|
32
|
+
try {
|
|
33
|
+
await access(packsPath);
|
|
34
|
+
// For now, we don't remove pack entries as we don't track pack names per kit
|
|
35
|
+
// This could be enhanced in the future
|
|
36
|
+
}
|
|
37
|
+
catch {
|
|
38
|
+
// File doesn't exist, nothing to clean
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Delete a single file
|
|
43
|
+
*/
|
|
44
|
+
async function deleteFile(file, options) {
|
|
45
|
+
const { dryRun = false } = options;
|
|
46
|
+
const expandedPath = expandPath(file);
|
|
47
|
+
if (dryRun) {
|
|
48
|
+
return { success: true };
|
|
49
|
+
}
|
|
50
|
+
try {
|
|
51
|
+
await rm(expandedPath, { force: true });
|
|
52
|
+
return { success: true };
|
|
53
|
+
}
|
|
54
|
+
catch (error) {
|
|
55
|
+
return {
|
|
56
|
+
success: false,
|
|
57
|
+
error: error instanceof Error ? error.message : String(error),
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Uninstall command handler
|
|
63
|
+
*/
|
|
64
|
+
export async function uninstallCommand(packageName, options) {
|
|
65
|
+
const { verbose = false, dryRun = false } = options;
|
|
66
|
+
console.log();
|
|
67
|
+
console.log(chalk.cyan(`Uninstalling ${packageName}...`));
|
|
68
|
+
try {
|
|
69
|
+
// Get installed kit info
|
|
70
|
+
const kit = await getInstalledKit(packageName);
|
|
71
|
+
if (!kit) {
|
|
72
|
+
console.log();
|
|
73
|
+
console.log(chalk.yellow(`Package ${packageName} is not installed`));
|
|
74
|
+
console.log(chalk.dim('Use `skit list` to see installed packages'));
|
|
75
|
+
console.log();
|
|
76
|
+
return;
|
|
77
|
+
}
|
|
78
|
+
// Show what will be removed
|
|
79
|
+
if (dryRun) {
|
|
80
|
+
console.log(chalk.yellow(' [dry-run] Would remove:'));
|
|
81
|
+
}
|
|
82
|
+
else {
|
|
83
|
+
console.log(chalk.dim(' Removing files...'));
|
|
84
|
+
}
|
|
85
|
+
let successCount = 0;
|
|
86
|
+
let failCount = 0;
|
|
87
|
+
const regularFiles = kit.files.filter(f => !isPackFile(f));
|
|
88
|
+
for (const file of regularFiles) {
|
|
89
|
+
const result = await deleteFile(file, options);
|
|
90
|
+
if (verbose || dryRun) {
|
|
91
|
+
if (result.success) {
|
|
92
|
+
console.log(chalk.dim(` - ${file}`));
|
|
93
|
+
}
|
|
94
|
+
else {
|
|
95
|
+
console.log(chalk.red(` ✗ ${file}: ${result.error}`));
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
if (result.success) {
|
|
99
|
+
successCount++;
|
|
100
|
+
}
|
|
101
|
+
else {
|
|
102
|
+
failCount++;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
// Handle pack files (merged JSON)
|
|
106
|
+
const hasPackFiles = kit.files.some(isPackFile);
|
|
107
|
+
if (hasPackFiles) {
|
|
108
|
+
if (verbose || dryRun) {
|
|
109
|
+
console.log(chalk.dim(` - (pack entries in permission-packs.json)`));
|
|
110
|
+
}
|
|
111
|
+
// Note: We don't actually remove pack entries for now
|
|
112
|
+
// This would require tracking which pack names came from which kit
|
|
113
|
+
}
|
|
114
|
+
// Update registry
|
|
115
|
+
if (!dryRun) {
|
|
116
|
+
await unregisterKit(packageName);
|
|
117
|
+
}
|
|
118
|
+
// Summary
|
|
119
|
+
console.log();
|
|
120
|
+
if (dryRun) {
|
|
121
|
+
console.log(chalk.yellow(`[dry-run] Would uninstall ${packageName}@${kit.version}`));
|
|
122
|
+
}
|
|
123
|
+
else {
|
|
124
|
+
console.log(chalk.bold(`Uninstalled ${packageName}@${kit.version}`));
|
|
125
|
+
console.log(chalk.green(` ✓ ${successCount} file(s) removed`));
|
|
126
|
+
if (failCount > 0) {
|
|
127
|
+
console.log(chalk.red(` ✗ ${failCount} file(s) failed`));
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
console.log();
|
|
131
|
+
}
|
|
132
|
+
catch (error) {
|
|
133
|
+
console.error();
|
|
134
|
+
console.error(chalk.red('Error:'), error instanceof Error ? error.message : String(error));
|
|
135
|
+
process.exitCode = 1;
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
//# sourceMappingURL=uninstall.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"uninstall.js","sourceRoot":"","sources":["../../src/commands/uninstall.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,EAAE,EAAE,MAAM,EAAuB,MAAM,kBAAkB,CAAC;AACnE,OAAO,EAAE,IAAI,EAAW,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EACL,eAAe,EACf,aAAa,GAEd,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,qBAAqB,EAA4B,MAAM,kBAAkB,CAAC;AAOnF;;GAEG;AACH,SAAS,UAAU,CAAC,IAAY;IAC9B,IAAI,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE,CAAC;QAC1B,OAAO,IAAI,CAAC,OAAO,EAAE,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;IACxC,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AAED;;;GAGG;AACH,SAAS,UAAU,CAAC,IAAY;IAC9B,OAAO,IAAI,KAAK,qBAAqB,IAAI,IAAI,CAAC,QAAQ,CAAC,uBAAuB,CAAC,CAAC;AAClF,CAAC;AAED;;;GAGG;AACH,KAAK,UAAU,sBAAsB;IACnC,MAAM,SAAS,GAAG,UAAU,CAAC,qBAAqB,CAAC,CAAC;IACpD,IAAI,CAAC;QACH,MAAM,MAAM,CAAC,SAAS,CAAC,CAAC;QACxB,6EAA6E;QAC7E,uCAAuC;IACzC,CAAC;IAAC,MAAM,CAAC;QACP,uCAAuC;IACzC,CAAC;AACH,CAAC;AAED;;GAEG;AACH,KAAK,UAAU,UAAU,CACvB,IAAY,EACZ,OAAyB;IAE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.ts","sourceRoot":"","sources":["../../src/commands/whoami.ts"],"names":[],"mappings":"AAGA,UAAU,aAAa;IACrB,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB;AAED;;GAEG;AACH,wBAAsB,aAAa,CAAC,OAAO,EAAE,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC,CAwEzE"}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import chalk from 'chalk';
|
|
2
|
+
import { getCurrentUser, loadAuth, isLoggedIn, isTokenExpired } from '../utils/auth.js';
|
|
3
|
+
/**
|
|
4
|
+
* Whoami command handler
|
|
5
|
+
*/
|
|
6
|
+
export async function whoamiCommand(options) {
|
|
7
|
+
const { json = false } = options;
|
|
8
|
+
try {
|
|
9
|
+
// Check if logged in
|
|
10
|
+
if (!(await isLoggedIn())) {
|
|
11
|
+
if (json) {
|
|
12
|
+
console.log(JSON.stringify({ loggedIn: false }));
|
|
13
|
+
}
|
|
14
|
+
else {
|
|
15
|
+
console.log();
|
|
16
|
+
console.log(chalk.yellow('Not logged in.'));
|
|
17
|
+
console.log(chalk.dim('Use `skit login` to sign in.'));
|
|
18
|
+
console.log();
|
|
19
|
+
}
|
|
20
|
+
return;
|
|
21
|
+
}
|
|
22
|
+
// Get user info
|
|
23
|
+
const user = await getCurrentUser();
|
|
24
|
+
const auth = await loadAuth();
|
|
25
|
+
if (!user || !auth) {
|
|
26
|
+
if (json) {
|
|
27
|
+
console.log(JSON.stringify({ loggedIn: false, error: 'Session expired' }));
|
|
28
|
+
}
|
|
29
|
+
else {
|
|
30
|
+
console.log();
|
|
31
|
+
console.log(chalk.yellow('Session expired.'));
|
|
32
|
+
console.log(chalk.dim('Use `skit login` to sign in again.'));
|
|
33
|
+
console.log();
|
|
34
|
+
}
|
|
35
|
+
return;
|
|
36
|
+
}
|
|
37
|
+
if (json) {
|
|
38
|
+
console.log(JSON.stringify({
|
|
39
|
+
loggedIn: true,
|
|
40
|
+
user: {
|
|
41
|
+
id: user.id,
|
|
42
|
+
email: user.email,
|
|
43
|
+
name: user.name,
|
|
44
|
+
role: user.role,
|
|
45
|
+
},
|
|
46
|
+
tokenExpires: auth.expiresAt,
|
|
47
|
+
tokenExpired: isTokenExpired(auth.expiresAt, 0),
|
|
48
|
+
}));
|
|
49
|
+
}
|
|
50
|
+
else {
|
|
51
|
+
console.log();
|
|
52
|
+
console.log(chalk.bold('Current User'));
|
|
53
|
+
console.log();
|
|
54
|
+
console.log(` Email: ${chalk.cyan(user.email)}`);
|
|
55
|
+
if (user.name) {
|
|
56
|
+
console.log(` Name: ${user.name}`);
|
|
57
|
+
}
|
|
58
|
+
if (user.role && user.role !== 'user') {
|
|
59
|
+
console.log(` Role: ${chalk.yellow(user.role)}`);
|
|
60
|
+
}
|
|
61
|
+
// Token expiration info
|
|
62
|
+
const expiresIn = auth.expiresAt - Math.floor(Date.now() / 1000);
|
|
63
|
+
if (expiresIn > 0) {
|
|
64
|
+
const minutes = Math.floor(expiresIn / 60);
|
|
65
|
+
console.log(chalk.dim(` Token expires in ${minutes} minutes`));
|
|
66
|
+
}
|
|
67
|
+
else {
|
|
68
|
+
console.log(chalk.yellow(' Token expired (will refresh on next request)'));
|
|
69
|
+
}
|
|
70
|
+
console.log();
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
catch (error) {
|
|
74
|
+
console.error();
|
|
75
|
+
console.error(chalk.red('Error:'), error instanceof Error ? error.message : String(error));
|
|
76
|
+
process.exitCode = 1;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
//# sourceMappingURL=whoami.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"whoami.js","sourceRoot":"","sources":["../../src/commands/whoami.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,cAAc,EAAE,QAAQ,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAMxF;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU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,EAAE,CAAC,CAAC;gBAC3C,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,sBAAsB,OAAO,UAAU,CAAC,CAAC,CAAC;YAClE,CAAC;iBAAM,CAAC;gBACN,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,MAAM,CAAC,gDAAgD,CAAC,CAAC,CAAC;YAC9E,CAAC;YACD,OAAO,CAAC,GAAG,EAAE,CAAC;QAChB,CAAC;IACH,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,CAAC,KAAK,EAAE,CAAC;QAChB,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;QAC3F,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC;IACvB,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { Command } from 'commander';
|
|
3
|
+
import { createRequire } from 'node:module';
|
|
4
|
+
import { installCommand } from './commands/install.js';
|
|
5
|
+
import { packCommand } from './commands/pack.js';
|
|
6
|
+
import { infoCommand } from './commands/info.js';
|
|
7
|
+
import { publishCommand } from './commands/publish.js';
|
|
8
|
+
import { listCommand } from './commands/list.js';
|
|
9
|
+
import { uninstallCommand } from './commands/uninstall.js';
|
|
10
|
+
import { browseCommand } from './commands/browse.js';
|
|
11
|
+
import { gitignoreCommand } from './commands/gitignore.js';
|
|
12
|
+
const require = createRequire(import.meta.url);
|
|
13
|
+
const { version } = require('../package.json');
|
|
14
|
+
const program = new Command();
|
|
15
|
+
program
|
|
16
|
+
.name('skit')
|
|
17
|
+
.description('CLI for managing skit packages (Session Kit)')
|
|
18
|
+
.version(version);
|
|
19
|
+
program
|
|
20
|
+
.command('install <package>')
|
|
21
|
+
.alias('i')
|
|
22
|
+
.description('Install a skit package')
|
|
23
|
+
.option('-v, --verbose', 'Show detailed output')
|
|
24
|
+
.option('--dry-run', 'Show what would be installed without installing')
|
|
25
|
+
.action(installCommand);
|
|
26
|
+
program
|
|
27
|
+
.command('pack')
|
|
28
|
+
.description('Pack current directory into a .tgz skit package')
|
|
29
|
+
.option('-o, --output <dir>', 'Output directory', '.')
|
|
30
|
+
.option('--dry-run', 'Show files that would be included without creating archive')
|
|
31
|
+
.action(packCommand);
|
|
32
|
+
program
|
|
33
|
+
.command('info')
|
|
34
|
+
.description('Display information about the current skit package')
|
|
35
|
+
.option('--json', 'Output as JSON')
|
|
36
|
+
.action(infoCommand);
|
|
37
|
+
program
|
|
38
|
+
.command('publish')
|
|
39
|
+
.alias('p')
|
|
40
|
+
.description('Publish skit package to GitLab')
|
|
41
|
+
.option('--bump <type>', 'Bump version (patch, minor, major)')
|
|
42
|
+
.option('--dry-run', 'Test publish without actually publishing')
|
|
43
|
+
.option('-v, --verbose', 'Show detailed output')
|
|
44
|
+
.action(publishCommand);
|
|
45
|
+
program
|
|
46
|
+
.command('list')
|
|
47
|
+
.alias('ls')
|
|
48
|
+
.description('List installed skit packages')
|
|
49
|
+
.option('--json', 'Output as JSON')
|
|
50
|
+
.action(listCommand);
|
|
51
|
+
program
|
|
52
|
+
.command('uninstall <package>')
|
|
53
|
+
.alias('rm')
|
|
54
|
+
.description('Uninstall a skit package')
|
|
55
|
+
.option('-v, --verbose', 'Show detailed output')
|
|
56
|
+
.option('--dry-run', 'Show what would be removed without removing')
|
|
57
|
+
.action(uninstallCommand);
|
|
58
|
+
program
|
|
59
|
+
.command('browse <org>')
|
|
60
|
+
.description('Browse skits for an organization (e.g., skit browse @ist)')
|
|
61
|
+
.option('--json', 'Output as JSON')
|
|
62
|
+
.action(browseCommand);
|
|
63
|
+
program
|
|
64
|
+
.command('gitignore')
|
|
65
|
+
.description('Create or update .gitignore with skit defaults')
|
|
66
|
+
.option('-f, --force', 'Overwrite existing .gitignore')
|
|
67
|
+
.action(gitignoreCommand);
|
|
68
|
+
program.parse();
|
|
69
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAE3D,MAAM,OAAO,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC/C,MAAM,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAC;AAE/C,MAAM,OAAO,GAAG,IAAI,OAAO,EAAE,CAAC;AAE9B,OAAO;KACJ,IAAI,CAAC,MAAM,CAAC;KACZ,WAAW,CAAC,8CAA8C,CAAC;KAC3D,OAAO,CAAC,OAAO,CAAC,CAAC;AAEpB,OAAO;KACJ,OAAO,CAAC,mBAAmB,CAAC;KAC5B,KAAK,CAAC,GAAG,CAAC;KACV,WAAW,CAAC,wBAAwB,CAAC;KACrC,MAAM,CAAC,eAAe,EAAE,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2DAA2D,CAAC;KACxE,MAAM,CAAC,QAAQ,EAAE,gBAAgB,CAAC;KAClC,MAAM,CAAC,aAAa,CAAC,CAAC;AAEzB,OAAO;KACJ,OAAO,CAAC,WAAW,CAAC;KACpB,WAAW,CAAC,gDAAgD,CAAC;KAC7D,MAAM,CAAC,aAAa,EAAE,+BAA+B,CAAC;KACtD,MAAM,CAAC,gBAAgB,CAAC,CAAC;AAE5B,OAAO,CAAC,KAAK,EAAE,CAAC"}
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @ist/skit library API
|
|
3
|
+
*
|
|
4
|
+
* Programmatic access to skit installation functionality.
|
|
5
|
+
* Designed for use by other packages that need to install skits programmatically.
|
|
6
|
+
*/
|
|
7
|
+
import { type InstallSummary, type SkitManifest } from './types/skit.js';
|
|
8
|
+
import { type InstalledRegistry, type InstalledKit } from './utils/installed-registry.js';
|
|
9
|
+
/**
|
|
10
|
+
* Get registry URL (from env or default)
|
|
11
|
+
* @internal Exported for testing
|
|
12
|
+
*/
|
|
13
|
+
export declare function getRegistryUrl(): string;
|
|
14
|
+
/**
|
|
15
|
+
* Get session ID (provided by snapshot)
|
|
16
|
+
* skit does NOT know LICENSE_KEY - only SESSION_ID
|
|
17
|
+
* @internal Exported for testing
|
|
18
|
+
*/
|
|
19
|
+
export declare function getSessionId(): string | undefined;
|
|
20
|
+
export type { SkitManifest, SkitComponent, SkitCli, SkitComponents, InstallSummary, InstallResult, } from './types/skit.js';
|
|
21
|
+
export type { InstalledKit, InstalledRegistry } from './utils/installed-registry.js';
|
|
22
|
+
/**
|
|
23
|
+
* Install options for programmatic use
|
|
24
|
+
*/
|
|
25
|
+
export interface InstallSkitOptions {
|
|
26
|
+
/** Working directory (defaults to cwd) */
|
|
27
|
+
cwd?: string;
|
|
28
|
+
/** Don't actually install, just return what would be installed */
|
|
29
|
+
dryRun?: boolean;
|
|
30
|
+
/** Skip dependency installation */
|
|
31
|
+
skipDependencies?: boolean;
|
|
32
|
+
/** Progress callback for status updates */
|
|
33
|
+
onProgress?: (message: string) => void;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Download options for programmatic use
|
|
37
|
+
*/
|
|
38
|
+
export interface DownloadSkitOptions {
|
|
39
|
+
/** Output directory for downloaded package */
|
|
40
|
+
outputDir?: string;
|
|
41
|
+
/** Progress callback */
|
|
42
|
+
onProgress?: (message: string) => void;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Install result for programmatic use
|
|
46
|
+
*/
|
|
47
|
+
export interface InstallSkitResult {
|
|
48
|
+
success: boolean;
|
|
49
|
+
packageName: string;
|
|
50
|
+
version: string;
|
|
51
|
+
summary?: InstallSummary;
|
|
52
|
+
manifest?: SkitManifest;
|
|
53
|
+
error?: string;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Download result
|
|
57
|
+
*/
|
|
58
|
+
export interface DownloadSkitResult {
|
|
59
|
+
success: boolean;
|
|
60
|
+
packageName: string;
|
|
61
|
+
outputPath: string;
|
|
62
|
+
error?: string;
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Install a skit package programmatically
|
|
66
|
+
* Uses GitLab token from ~/.config/gitlab-config for authentication
|
|
67
|
+
*
|
|
68
|
+
* @example
|
|
69
|
+
* ```ts
|
|
70
|
+
* import { installSkit } from '@ist/skit/lib';
|
|
71
|
+
*
|
|
72
|
+
* // Basic install
|
|
73
|
+
* const result = await installSkit('@ist/devtools-kit');
|
|
74
|
+
*
|
|
75
|
+
* // With version
|
|
76
|
+
* const result = await installSkit('@ist/devtools-kit@1.0.0');
|
|
77
|
+
*
|
|
78
|
+
* // With progress callback
|
|
79
|
+
* const result = await installSkit('@ist/private-kit', {
|
|
80
|
+
* onProgress: (msg) => console.log(msg),
|
|
81
|
+
* });
|
|
82
|
+
* ```
|
|
83
|
+
*/
|
|
84
|
+
export declare function installSkit(packageSpec: string, options?: InstallSkitOptions): Promise<InstallSkitResult>;
|
|
85
|
+
/**
|
|
86
|
+
* Download a skit package without installing
|
|
87
|
+
*
|
|
88
|
+
* @example
|
|
89
|
+
* ```ts
|
|
90
|
+
* import { downloadSkit } from '@ist/skit/lib';
|
|
91
|
+
*
|
|
92
|
+
* const result = await downloadSkit('@ist/devtools-kit', {
|
|
93
|
+
* outputDir: './downloads',
|
|
94
|
+
* });
|
|
95
|
+
* ```
|
|
96
|
+
*/
|
|
97
|
+
export declare function downloadSkit(packageSpec: string, options?: DownloadSkitOptions): Promise<DownloadSkitResult>;
|
|
98
|
+
/**
|
|
99
|
+
* List all installed skit packages
|
|
100
|
+
*
|
|
101
|
+
* @example
|
|
102
|
+
* ```ts
|
|
103
|
+
* import { listSkits } from '@ist/skit/lib';
|
|
104
|
+
*
|
|
105
|
+
* const installed = await listSkits();
|
|
106
|
+
* for (const [name, info] of Object.entries(installed)) {
|
|
107
|
+
* console.log(`${name}@${info.version}`);
|
|
108
|
+
* }
|
|
109
|
+
* ```
|
|
110
|
+
*/
|
|
111
|
+
export declare function listSkits(): Promise<InstalledRegistry>;
|
|
112
|
+
/**
|
|
113
|
+
* Get info about a specific installed skit
|
|
114
|
+
*
|
|
115
|
+
* @example
|
|
116
|
+
* ```ts
|
|
117
|
+
* import { getSkitInfo } from '@ist/skit/lib';
|
|
118
|
+
*
|
|
119
|
+
* const info = await getSkitInfo('@ist/devtools-kit');
|
|
120
|
+
* if (info) {
|
|
121
|
+
* console.log(`Version: ${info.version}`);
|
|
122
|
+
* console.log(`Installed: ${info.installedAt}`);
|
|
123
|
+
* }
|
|
124
|
+
* ```
|
|
125
|
+
*/
|
|
126
|
+
export declare function getSkitInfo(packageName: string): Promise<InstalledKit | null>;
|
|
127
|
+
/**
|
|
128
|
+
* Uninstall a skit package
|
|
129
|
+
*
|
|
130
|
+
* @example
|
|
131
|
+
* ```ts
|
|
132
|
+
* import { uninstallSkit } from '@ist/skit/lib';
|
|
133
|
+
*
|
|
134
|
+
* const result = await uninstallSkit('@ist/devtools-kit');
|
|
135
|
+
* ```
|
|
136
|
+
*/
|
|
137
|
+
export declare function uninstallSkit(packageName: string, options?: {
|
|
138
|
+
onProgress?: (message: string) => void;
|
|
139
|
+
}): Promise<{
|
|
140
|
+
success: boolean;
|
|
141
|
+
removedFiles: string[];
|
|
142
|
+
error?: string;
|
|
143
|
+
}>;
|
|
144
|
+
//# sourceMappingURL=lib.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lib.d.ts","sourceRoot":"","sources":["../src/lib.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAaH,OAAO,EAEL,KAAK,cAAc,EACnB,KAAK,YAAY,EAGlB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAML,KAAK,iBAAiB,EACtB,KAAK,YAAY,EAClB,MAAM,+BAA+B,CAAC;AAGvC;;;GAGG;AACH,wBAAgB,cAAc,IAAI,MAAM,CAEvC;AAED;;;;GAIG;AACH,wBAAgB,YAAY,IAAI,MAAM,GAAG,SAAS,CAEjD;AAGD,YAAY,EACV,YAAY,EACZ,aAAa,EACb,OAAO,EACP,cAAc,EACd,cAAc,EACd,aAAa,GACd,MAAM,iBAAiB,CAAC;AAEzB,YAAY,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAIrF;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,0CAA0C;IAC1C,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,kEAAkE;IAClE,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,mCAAmC;IACnC,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,2CAA2C;IAC3C,UAAU,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;CACxC;AAED;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,8CAA8C;IAC9C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,wBAAwB;IACxB,UAAU,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,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