@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,219 @@
|
|
|
1
|
+
import { copyFile, mkdir, readFile, writeFile, cp } from 'node:fs/promises';
|
|
2
|
+
import { join, dirname } from 'node:path';
|
|
3
|
+
import { homedir } from 'node:os';
|
|
4
|
+
import { PERMISSION_PACKS_PATH, PROFILE_PROMPTS_PATH } from '../types/skit.js';
|
|
5
|
+
/**
|
|
6
|
+
* Expand ~ to home directory
|
|
7
|
+
*/
|
|
8
|
+
export function expandPath(path) {
|
|
9
|
+
if (path.startsWith('~/')) {
|
|
10
|
+
return join(homedir(), path.slice(2));
|
|
11
|
+
}
|
|
12
|
+
return path;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Get install path for a component type
|
|
16
|
+
*/
|
|
17
|
+
export function getInstallPath(manifest, componentType, defaultPaths) {
|
|
18
|
+
const customPath = manifest.install?.[componentType];
|
|
19
|
+
const path = customPath || defaultPaths[componentType];
|
|
20
|
+
return expandPath(path);
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Install a single component
|
|
24
|
+
*/
|
|
25
|
+
export async function installComponent(stagingDir, targetDir, componentFile, componentType, componentName) {
|
|
26
|
+
const sourcePath = join(stagingDir, componentFile);
|
|
27
|
+
// Preserve nested folder structure: remove first folder (e.g., 'prompts/') and keep the rest
|
|
28
|
+
const relativePath = componentFile.replace(/^[^/]+\//, '');
|
|
29
|
+
const targetPath = join(targetDir, relativePath);
|
|
30
|
+
try {
|
|
31
|
+
// Ensure target directory exists (including nested folders)
|
|
32
|
+
await mkdir(dirname(targetPath), { recursive: true });
|
|
33
|
+
// Copy file
|
|
34
|
+
await copyFile(sourcePath, targetPath);
|
|
35
|
+
return {
|
|
36
|
+
component: { name: componentName, file: componentFile },
|
|
37
|
+
type: componentType,
|
|
38
|
+
sourcePath,
|
|
39
|
+
targetPath,
|
|
40
|
+
success: true,
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
catch (error) {
|
|
44
|
+
return {
|
|
45
|
+
component: { name: componentName, file: componentFile },
|
|
46
|
+
type: componentType,
|
|
47
|
+
sourcePath,
|
|
48
|
+
targetPath,
|
|
49
|
+
success: false,
|
|
50
|
+
error: error instanceof Error ? error.message : String(error),
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Read and parse permission-packs.json, returns empty structure if not exists
|
|
56
|
+
*/
|
|
57
|
+
async function readPermissionPacks() {
|
|
58
|
+
const packsPath = expandPath(PERMISSION_PACKS_PATH);
|
|
59
|
+
try {
|
|
60
|
+
const content = await readFile(packsPath, 'utf-8');
|
|
61
|
+
return JSON.parse(content);
|
|
62
|
+
}
|
|
63
|
+
catch {
|
|
64
|
+
// Return empty structure if file doesn't exist
|
|
65
|
+
return { packs: {} };
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Write permission-packs.json
|
|
70
|
+
*/
|
|
71
|
+
async function writePermissionPacks(data) {
|
|
72
|
+
const packsPath = expandPath(PERMISSION_PACKS_PATH);
|
|
73
|
+
await mkdir(dirname(packsPath), { recursive: true });
|
|
74
|
+
await writeFile(packsPath, JSON.stringify(data, null, 2), 'utf-8');
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Install a single pack by merging into permission-packs.json
|
|
78
|
+
*/
|
|
79
|
+
export async function installPack(stagingDir, packFile, packName) {
|
|
80
|
+
const sourcePath = join(stagingDir, packFile);
|
|
81
|
+
const targetPath = expandPath(PERMISSION_PACKS_PATH);
|
|
82
|
+
try {
|
|
83
|
+
// Read pack data from source file
|
|
84
|
+
const packContent = await readFile(sourcePath, 'utf-8');
|
|
85
|
+
const packData = JSON.parse(packContent);
|
|
86
|
+
// Read existing permission-packs.json
|
|
87
|
+
const existingPacks = await readPermissionPacks();
|
|
88
|
+
// Merge new pack
|
|
89
|
+
existingPacks.packs[packName] = packData;
|
|
90
|
+
// Write back
|
|
91
|
+
await writePermissionPacks(existingPacks);
|
|
92
|
+
return {
|
|
93
|
+
component: { name: packName, file: packFile },
|
|
94
|
+
type: 'packs',
|
|
95
|
+
sourcePath,
|
|
96
|
+
targetPath,
|
|
97
|
+
success: true,
|
|
98
|
+
};
|
|
99
|
+
}
|
|
100
|
+
catch (error) {
|
|
101
|
+
return {
|
|
102
|
+
component: { name: packName, file: packFile },
|
|
103
|
+
type: 'packs',
|
|
104
|
+
sourcePath,
|
|
105
|
+
targetPath,
|
|
106
|
+
success: false,
|
|
107
|
+
error: error instanceof Error ? error.message : String(error),
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* Install a state directory (copies entire directory: state.json + *.md files)
|
|
113
|
+
*/
|
|
114
|
+
export async function installStateDirectory(stagingDir, targetBaseDir, stateDir, stateName) {
|
|
115
|
+
const sourcePath = join(stagingDir, stateDir);
|
|
116
|
+
const targetPath = join(targetBaseDir, stateName);
|
|
117
|
+
try {
|
|
118
|
+
// Ensure target directory exists
|
|
119
|
+
await mkdir(targetPath, { recursive: true });
|
|
120
|
+
// Copy entire directory recursively
|
|
121
|
+
await cp(sourcePath, targetPath, { recursive: true });
|
|
122
|
+
return {
|
|
123
|
+
component: { name: stateName, file: stateDir },
|
|
124
|
+
type: 'states',
|
|
125
|
+
sourcePath,
|
|
126
|
+
targetPath,
|
|
127
|
+
success: true,
|
|
128
|
+
};
|
|
129
|
+
}
|
|
130
|
+
catch (error) {
|
|
131
|
+
return {
|
|
132
|
+
component: { name: stateName, file: stateDir },
|
|
133
|
+
type: 'states',
|
|
134
|
+
sourcePath,
|
|
135
|
+
targetPath,
|
|
136
|
+
success: false,
|
|
137
|
+
error: error instanceof Error ? error.message : String(error),
|
|
138
|
+
};
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
/**
|
|
142
|
+
* Build map of prompt name -> profile name for scoped prompts
|
|
143
|
+
*/
|
|
144
|
+
function buildScopedPromptsMap(profiles) {
|
|
145
|
+
const scopedPrompts = new Map();
|
|
146
|
+
if (!profiles)
|
|
147
|
+
return scopedPrompts;
|
|
148
|
+
for (const profile of profiles) {
|
|
149
|
+
if (profile.prompts) {
|
|
150
|
+
for (const promptName of profile.prompts) {
|
|
151
|
+
scopedPrompts.set(promptName, profile.name);
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
return scopedPrompts;
|
|
156
|
+
}
|
|
157
|
+
/**
|
|
158
|
+
* Install all components from a manifest
|
|
159
|
+
*/
|
|
160
|
+
export async function installAllComponents(manifest, stagingDir, defaultPaths) {
|
|
161
|
+
const results = [];
|
|
162
|
+
// Build map of scoped prompts (prompt name -> profile name)
|
|
163
|
+
const scopedPrompts = buildScopedPromptsMap(manifest.components.profiles);
|
|
164
|
+
// Install profiles
|
|
165
|
+
const profiles = manifest.components.profiles;
|
|
166
|
+
if (profiles && profiles.length > 0) {
|
|
167
|
+
const targetDir = getInstallPath(manifest, 'profiles', defaultPaths);
|
|
168
|
+
for (const profile of profiles) {
|
|
169
|
+
const result = await installComponent(stagingDir, targetDir, profile.file, 'profiles', profile.name);
|
|
170
|
+
results.push(result);
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
// Install prompts (global or profile-scoped)
|
|
174
|
+
const prompts = manifest.components.prompts;
|
|
175
|
+
if (prompts && prompts.length > 0) {
|
|
176
|
+
const globalPromptsDir = getInstallPath(manifest, 'prompts', defaultPaths);
|
|
177
|
+
for (const prompt of prompts) {
|
|
178
|
+
const scopedToProfile = scopedPrompts.get(prompt.name);
|
|
179
|
+
let targetDir;
|
|
180
|
+
if (scopedToProfile) {
|
|
181
|
+
// Install to profile-specific directory
|
|
182
|
+
targetDir = join(expandPath(PROFILE_PROMPTS_PATH), scopedToProfile);
|
|
183
|
+
}
|
|
184
|
+
else {
|
|
185
|
+
// Install to global prompts directory
|
|
186
|
+
targetDir = globalPromptsDir;
|
|
187
|
+
}
|
|
188
|
+
const result = await installComponent(stagingDir, targetDir, prompt.file, 'prompts', prompt.name);
|
|
189
|
+
results.push(result);
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
// Install packs (JSON merge into permission-packs.json)
|
|
193
|
+
const packs = manifest.components.packs;
|
|
194
|
+
if (packs && packs.length > 0) {
|
|
195
|
+
for (const pack of packs) {
|
|
196
|
+
const result = await installPack(stagingDir, pack.file, pack.name);
|
|
197
|
+
results.push(result);
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
// Install states (directory copy to ~/.ist/state/profiles/)
|
|
201
|
+
const states = manifest.components.states;
|
|
202
|
+
if (states && states.length > 0) {
|
|
203
|
+
const targetDir = getInstallPath(manifest, 'states', defaultPaths);
|
|
204
|
+
for (const state of states) {
|
|
205
|
+
const result = await installStateDirectory(stagingDir, targetDir, state.file, state.name);
|
|
206
|
+
results.push(result);
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
const successCount = results.filter(r => r.success).length;
|
|
210
|
+
return {
|
|
211
|
+
packageName: manifest.name,
|
|
212
|
+
version: manifest.version,
|
|
213
|
+
results,
|
|
214
|
+
totalComponents: results.length,
|
|
215
|
+
successCount,
|
|
216
|
+
failCount: results.length - successCount,
|
|
217
|
+
};
|
|
218
|
+
}
|
|
219
|
+
//# sourceMappingURL=file-copy.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"file-copy.js","sourceRoot":"","sources":["../../src/utils/file-copy.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAW,EAAE,EAAE,MAAM,kBAAkB,CAAC;AACrF,OAAO,EAAE,IAAI,EAAE,OAAO,EAAY,MAAM,WAAW,CAAC;AACpD,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAWlC,OAAO,EAAE,qBAAqB,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAE/E;;GAEG;AACH,MAAM,UAAU,UAAU,CAAC,IAAY;IACrC,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;;GAEG;AACH,MAAM,UAAU,cAAc,CAC5B,QAAsB,EACtB,aAAgC,EAChC,YAA+C;IAE/C,MAAM,UAAU,GAAG,QAAQ,CAAC,OAAO,EAAE,CAAC,aAAa,CAAC,CAAC;IACrD,MAAM,IAAI,GAAG,UAAU,IAAI,YAAY,CAAC,aAAa,CA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,CAAC;IACH,CAAC;IAED,4DAA4D;IAC5D,MAAM,MAAM,GAAG,QAAQ,CAAC,UAAU,CAAC,MAAM,CAAC;IAC1C,IAAI,MAAM,IAAI,MAAM,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAChC,MAAM,SAAS,GAAG,cAAc,CAAC,QAAQ,EAAE,QAAQ,EAAE,YAAY,CAAC,CAAC;QACnE,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE,CAAC;YAC3B,MAAM,MAAM,GAAG,MAAM,qBAAqB,CACxC,UAAU,EACV,SAAS,EACT,KAAK,CAAC,IAAI,EACV,KAAK,CAAC,IAAI,CACX,CAAC;YACF,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QACvB,CAAC;IACH,CAAC;IAED,MAAM,YAAY,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC;IAE3D,OAAO;QACL,WAAW,EAAE,QAAQ,CAAC,IAAI;QAC1B,OAAO,EAAE,QAAQ,CAAC,OAAO;QACzB,OAAO;QACP,eAAe,EAAE,OAAO,CAAC,MAAM;QAC/B,YAAY;QACZ,SAAS,EAAE,OAAO,CAAC,MAAM,GAAG,YAAY;KACzC,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Hook installer for skit
|
|
3
|
+
*
|
|
4
|
+
* Installs chook, dhook, phook components
|
|
5
|
+
*/
|
|
6
|
+
import type { SkitHook } from '../types/skit.js';
|
|
7
|
+
export interface HookInstallOptions {
|
|
8
|
+
verbose?: boolean;
|
|
9
|
+
dryRun?: boolean;
|
|
10
|
+
}
|
|
11
|
+
export interface HookInstallResult {
|
|
12
|
+
hook: SkitHook;
|
|
13
|
+
success: boolean;
|
|
14
|
+
targetPath: string;
|
|
15
|
+
error?: string;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Install all hooks from a skit package
|
|
19
|
+
*/
|
|
20
|
+
export declare function installHooks(hooks: SkitHook[], sourceDir: string, options: HookInstallOptions): Promise<HookInstallResult[]>;
|
|
21
|
+
//# sourceMappingURL=hook-installer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hook-installer.d.ts","sourceRoot":"","sources":["../../src/utils/hook-installer.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAMH,OAAO,KAAK,EAAE,QAAQ,EAAY,MAAM,kBAAkB,CAAC;AAqB3D,MAAM,WAAW,kBAAkB;IACjC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,QAAQ,CAAC;IACf,OAAO,EAAE,OAAO,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AA8CD;;GAEG;AACH,wBAAsB,YAAY,CAChC,KAAK,EAAE,QAAQ,EAAE,EACjB,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,kBAAkB,GAC1B,OAAO,CAAC,iBAAiB,EAAE,CAAC,CAqC9B"}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Hook installer for skit
|
|
3
|
+
*
|
|
4
|
+
* Installs chook, dhook, phook components
|
|
5
|
+
*/
|
|
6
|
+
import { cp, mkdir } from 'node:fs/promises';
|
|
7
|
+
import { join } from 'node:path';
|
|
8
|
+
import { homedir } from 'node:os';
|
|
9
|
+
import chalk from 'chalk';
|
|
10
|
+
/**
|
|
11
|
+
* Hook install paths by type
|
|
12
|
+
*/
|
|
13
|
+
const HOOK_INSTALL_PATHS = {
|
|
14
|
+
chook: '~/.chook/hooks/',
|
|
15
|
+
dhook: '~/.dhook/hooks/',
|
|
16
|
+
phook: '~/.phook/hooks/',
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* Expand ~ to home directory
|
|
20
|
+
*/
|
|
21
|
+
function expandPath(path) {
|
|
22
|
+
if (path.startsWith('~/')) {
|
|
23
|
+
return join(homedir(), path.slice(2));
|
|
24
|
+
}
|
|
25
|
+
return path;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Install a single hook
|
|
29
|
+
*/
|
|
30
|
+
async function installHook(hook, sourceDir, options) {
|
|
31
|
+
const { verbose = false, dryRun = false } = options;
|
|
32
|
+
const basePath = HOOK_INSTALL_PATHS[hook.type];
|
|
33
|
+
const targetDir = expandPath(join(basePath, hook.name));
|
|
34
|
+
const sourceHookDir = join(sourceDir, hook.file);
|
|
35
|
+
try {
|
|
36
|
+
if (!dryRun) {
|
|
37
|
+
// Create target directory
|
|
38
|
+
await mkdir(targetDir, { recursive: true });
|
|
39
|
+
// Copy hook directory
|
|
40
|
+
await cp(sourceHookDir, targetDir, { recursive: true });
|
|
41
|
+
// TODO: Register hook with corresponding CLI
|
|
42
|
+
// For chook: chook register <name>
|
|
43
|
+
// For dhook: dhook register <name>
|
|
44
|
+
// For phook: phook register <name>
|
|
45
|
+
// Currently these commands don't exist, so we just copy files
|
|
46
|
+
}
|
|
47
|
+
return {
|
|
48
|
+
hook,
|
|
49
|
+
success: true,
|
|
50
|
+
targetPath: targetDir,
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
catch (error) {
|
|
54
|
+
return {
|
|
55
|
+
hook,
|
|
56
|
+
success: false,
|
|
57
|
+
targetPath: targetDir,
|
|
58
|
+
error: error instanceof Error ? error.message : String(error),
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Install all hooks from a skit package
|
|
64
|
+
*/
|
|
65
|
+
export async function installHooks(hooks, sourceDir, options) {
|
|
66
|
+
const { verbose = false, dryRun = false } = options;
|
|
67
|
+
if (hooks.length === 0) {
|
|
68
|
+
return [];
|
|
69
|
+
}
|
|
70
|
+
console.log(chalk.dim(` Installing ${hooks.length} hook${hooks.length === 1 ? '' : 's'}...`));
|
|
71
|
+
const results = [];
|
|
72
|
+
for (const hook of hooks) {
|
|
73
|
+
if (verbose) {
|
|
74
|
+
console.log(chalk.dim(` → ${hook.name} (${hook.type})`));
|
|
75
|
+
}
|
|
76
|
+
if (dryRun) {
|
|
77
|
+
const basePath = HOOK_INSTALL_PATHS[hook.type];
|
|
78
|
+
console.log(chalk.yellow(` [dry-run] Would install ${hook.name} to ${basePath}${hook.name}/`));
|
|
79
|
+
results.push({
|
|
80
|
+
hook,
|
|
81
|
+
success: true,
|
|
82
|
+
targetPath: expandPath(join(basePath, hook.name)),
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
else {
|
|
86
|
+
const result = await installHook(hook, sourceDir, options);
|
|
87
|
+
results.push(result);
|
|
88
|
+
if (result.success) {
|
|
89
|
+
console.log(chalk.green(` ✓ ${hook.name}`), chalk.dim(`(${hook.type})`));
|
|
90
|
+
}
|
|
91
|
+
else {
|
|
92
|
+
console.log(chalk.red(` ✗ ${hook.name}: ${result.error}`));
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
return results;
|
|
97
|
+
}
|
|
98
|
+
//# sourceMappingURL=hook-installer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hook-installer.js","sourceRoot":"","sources":["../../src/utils/hook-installer.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B;;GAEG;AACH,MAAM,kBAAkB,GAA6B;IACnD,KAAK,EAAE,iBAAiB;IACxB,KAAK,EAAE,iBAAiB;IACxB,KAAK,EAAE,iBAAiB;CACzB,CAAC;AAEF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C;YACN,MAAM,MAAM,GAAG,MAAM,WAAW,CAAC,IAAI,EAAE,SAAS,EAAE,OAAO,CAAC,CAAC;YAC3D,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;YAErB,IAAI,MAAM,CAAC,OAAO,EAAE,CAAC;gBACnB,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC,SAAS,IAAI,CAAC,IAAI,EAAE,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,IAAI,IAAI,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC;YAC9E,CAAC;iBAAM,CAAC;gBACN,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,SAAS,IAAI,CAAC,IAAI,KAAK,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;YAChE,CAAC;QACH,CAAC;IACH,CAAC;IAED,OAAO,OAAO,CAAC;AACjB,CAAC"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Registry for tracking installed skit packages
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Installed kit entry
|
|
6
|
+
*/
|
|
7
|
+
export interface InstalledKit {
|
|
8
|
+
version: string;
|
|
9
|
+
installedAt: string;
|
|
10
|
+
files: string[];
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Registry structure
|
|
14
|
+
*/
|
|
15
|
+
export interface InstalledRegistry {
|
|
16
|
+
[packageName: string]: InstalledKit;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Contract path to use ~ for home directory
|
|
20
|
+
*/
|
|
21
|
+
export declare function contractPath(path: string): string;
|
|
22
|
+
/**
|
|
23
|
+
* Read the installed kits registry
|
|
24
|
+
*/
|
|
25
|
+
export declare function readRegistry(): Promise<InstalledRegistry>;
|
|
26
|
+
/**
|
|
27
|
+
* Write the installed kits registry
|
|
28
|
+
*/
|
|
29
|
+
export declare function writeRegistry(registry: InstalledRegistry): Promise<void>;
|
|
30
|
+
/**
|
|
31
|
+
* Get installed kit info
|
|
32
|
+
*/
|
|
33
|
+
export declare function getInstalledKit(packageName: string): Promise<InstalledKit | null>;
|
|
34
|
+
/**
|
|
35
|
+
* Register an installed kit
|
|
36
|
+
*/
|
|
37
|
+
export declare function registerInstalledKit(packageName: string, version: string, files: string[]): Promise<void>;
|
|
38
|
+
/**
|
|
39
|
+
* Unregister a kit
|
|
40
|
+
*/
|
|
41
|
+
export declare function unregisterKit(packageName: string): Promise<void>;
|
|
42
|
+
/**
|
|
43
|
+
* Remove files from previous installation
|
|
44
|
+
*/
|
|
45
|
+
export declare function cleanPreviousInstall(packageName: string): Promise<string[]>;
|
|
46
|
+
/**
|
|
47
|
+
* List all installed kits
|
|
48
|
+
*/
|
|
49
|
+
export declare function listInstalledKits(): Promise<InstalledRegistry>;
|
|
50
|
+
//# sourceMappingURL=installed-registry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"installed-registry.d.ts","sourceRoot":"","sources":["../../src/utils/installed-registry.ts"],"names":[],"mappings":"AAAA;;GAEG;AAQH;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,EAAE,CAAC;CACjB;AAED;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,CAAC,WAAW,EAAE,MAAM,GAAG,YAAY,CAAC;CACrC;AAYD;;GAEG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAMjD;AASD;;GAEG;AACH,wBAAsB,YAAY,IAAI,OAAO,CAAC,iBAAiB,CAAC,CAQ/D;AAED;;GAEG;AACH,wBAAsB,aAAa,CAAC,QAAQ,EAAE,iBAAiB,GAAG,OAAO,CAAC,IAAI,CAAC,CAI9E;AAED;;GAEG;AACH,wBAAsB,eAAe,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,GAAG,IAAI,CAAC,CAGvF;AAED;;GAEG;AACH,wBAAsB,oBAAoB,CACxC,WAAW,EAAE,MAAM,EACnB,OAAO,EAAE,MAAM,EACf,KAAK,EAAE,MAAM,EAAE,GACd,OAAO,CAAC,IAAI,CAAC,CAUf;AAED;;GAEG;AACH,wBAAsB,aAAa,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAItE;AAED;;GAEG;AACH,wBAAsB,oBAAoB,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAmBjF;AAED;;GAEG;AACH,wBAAsB,iBAAiB,IAAI,OAAO,CAAC,iBAAiB,CAAC,CAEpE"}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Registry for tracking installed skit packages
|
|
3
|
+
*/
|
|
4
|
+
import { readFile, writeFile, mkdir, rm } from 'node:fs/promises';
|
|
5
|
+
import { join, dirname } from 'node:path';
|
|
6
|
+
import { homedir } from 'node:os';
|
|
7
|
+
const REGISTRY_PATH = '~/.ist/installed-kits.json';
|
|
8
|
+
/**
|
|
9
|
+
* Expand ~ to home directory
|
|
10
|
+
*/
|
|
11
|
+
function expandPath(path) {
|
|
12
|
+
if (path.startsWith('~/')) {
|
|
13
|
+
return join(homedir(), path.slice(2));
|
|
14
|
+
}
|
|
15
|
+
return path;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Contract path to use ~ for home directory
|
|
19
|
+
*/
|
|
20
|
+
export function contractPath(path) {
|
|
21
|
+
const home = homedir();
|
|
22
|
+
if (path.startsWith(home)) {
|
|
23
|
+
return '~' + path.slice(home.length);
|
|
24
|
+
}
|
|
25
|
+
return path;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Get the registry file path
|
|
29
|
+
*/
|
|
30
|
+
function getRegistryPath() {
|
|
31
|
+
return expandPath(REGISTRY_PATH);
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Read the installed kits registry
|
|
35
|
+
*/
|
|
36
|
+
export async function readRegistry() {
|
|
37
|
+
const registryPath = getRegistryPath();
|
|
38
|
+
try {
|
|
39
|
+
const content = await readFile(registryPath, 'utf-8');
|
|
40
|
+
return JSON.parse(content);
|
|
41
|
+
}
|
|
42
|
+
catch {
|
|
43
|
+
return {};
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Write the installed kits registry
|
|
48
|
+
*/
|
|
49
|
+
export async function writeRegistry(registry) {
|
|
50
|
+
const registryPath = getRegistryPath();
|
|
51
|
+
await mkdir(dirname(registryPath), { recursive: true });
|
|
52
|
+
await writeFile(registryPath, JSON.stringify(registry, null, 2), 'utf-8');
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Get installed kit info
|
|
56
|
+
*/
|
|
57
|
+
export async function getInstalledKit(packageName) {
|
|
58
|
+
const registry = await readRegistry();
|
|
59
|
+
return registry[packageName] || null;
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Register an installed kit
|
|
63
|
+
*/
|
|
64
|
+
export async function registerInstalledKit(packageName, version, files) {
|
|
65
|
+
const registry = await readRegistry();
|
|
66
|
+
registry[packageName] = {
|
|
67
|
+
version,
|
|
68
|
+
installedAt: new Date().toISOString(),
|
|
69
|
+
files: files.map(contractPath),
|
|
70
|
+
};
|
|
71
|
+
await writeRegistry(registry);
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Unregister a kit
|
|
75
|
+
*/
|
|
76
|
+
export async function unregisterKit(packageName) {
|
|
77
|
+
const registry = await readRegistry();
|
|
78
|
+
delete registry[packageName];
|
|
79
|
+
await writeRegistry(registry);
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Remove files from previous installation
|
|
83
|
+
*/
|
|
84
|
+
export async function cleanPreviousInstall(packageName) {
|
|
85
|
+
const kit = await getInstalledKit(packageName);
|
|
86
|
+
if (!kit) {
|
|
87
|
+
return [];
|
|
88
|
+
}
|
|
89
|
+
const removedFiles = [];
|
|
90
|
+
for (const file of kit.files) {
|
|
91
|
+
const expandedPath = expandPath(file);
|
|
92
|
+
try {
|
|
93
|
+
await rm(expandedPath, { force: true });
|
|
94
|
+
removedFiles.push(file);
|
|
95
|
+
}
|
|
96
|
+
catch {
|
|
97
|
+
// Ignore errors for files that don't exist
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
return removedFiles;
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* List all installed kits
|
|
104
|
+
*/
|
|
105
|
+
export async function listInstalledKits() {
|
|
106
|
+
return readRegistry();
|
|
107
|
+
}
|
|
108
|
+
//# sourceMappingURL=installed-registry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"installed-registry.js","sourceRoot":"","sources":["../../src/utils/installed-registry.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,KAAK,EAAE,EAAE,EAAU,MAAM,kBAAkB,CAAC;AAC1E,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAElC,MAAM,aAAa,GAAG,4BAA4B,CAAC;AAkBnD;;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;;GAEG;AACH,MAAM,UAAU,YAAY,CAAC,IAAY;IACvC,MAAM,IAAI,GAAG,OAAO,EAAE,CAAC;IACvB,IAAI,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE,CAAC;QAC1B,OAAO,GAAG,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AAC,WAAW,EAAE;QACrC,KAAK,EAAE,KAAK,CAAC,GAAG,CAAC,YAAY,CAAC;KAC/B,CAAC;IAEF,MAAM,aAAa,CAAC,QAAQ,CAAC,CAAC;AAChC,CAAC;AAED;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,aAAa,CAAC,WAAmB;IACrD,MAAM,QAAQ,GAAG,MAAM,YAAY,EAAE,CAAC;IACtC,OAAO,QAAQ,CAAC,WAAW,CAAC,CAAC;IAC7B,MAAM,aAAa,CAAC,QAAQ,CAAC,CAAC;AAChC,CAAC;AAED;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,oBAAoB,CAAC,WAAmB;IAC5D,MAAM,GAAG,GAAG,MAAM,eAAe,CAAC,WAAW,CAAC,CAAC;IAC/C,IAAI,CAAC,GAAG,EAAE,CAAC;QACT,OAAO,EAAE,CAAC;IACZ,CAAC;IAED,MAAM,YAAY,GAAa,EAAE,CAAC;IAElC,KAAK,MAAM,IAAI,IAAI,GAAG,CAAC,KAAK,EAAE,CAAC;QAC7B,MAAM,YAAY,GAAG,UAAU,CAAC,IAAI,CAAC,CAAC;QACtC,IAAI,CAAC;YACH,MAAM,EAAE,CAAC,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;YACxC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC1B,CAAC;QAAC,MAAM,CAAC;YACP,2CAA2C;QAC7C,CAAC;IACH,CAAC;IAED,OAAO,YAAY,CAAC;AACtB,CAAC;AAED;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,iBAAiB;IACrC,OAAO,YAAY,EAAE,CAAC;AACxB,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { SkitManifest } from '../types/skit.js';
|
|
2
|
+
/**
|
|
3
|
+
* Parse skit.json from a staging directory
|
|
4
|
+
*/
|
|
5
|
+
export declare function parseSkitManifest(stagingDir: string): Promise<SkitManifest>;
|
|
6
|
+
/**
|
|
7
|
+
* Count total components in a manifest
|
|
8
|
+
*/
|
|
9
|
+
export declare function countComponents(manifest: SkitManifest): number;
|
|
10
|
+
//# sourceMappingURL=skit-parser.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"skit-parser.d.ts","sourceRoot":"","sources":["../../src/utils/skit-parser.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAErD;;GAEG;AACH,wBAAsB,iBAAiB,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC,CA+BjF;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,QAAQ,EAAE,YAAY,GAAG,MAAM,CAU9D"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { readFile } from 'node:fs/promises';
|
|
2
|
+
import { join } from 'node:path';
|
|
3
|
+
/**
|
|
4
|
+
* Parse skit.json from a staging directory
|
|
5
|
+
*/
|
|
6
|
+
export async function parseSkitManifest(stagingDir) {
|
|
7
|
+
const manifestPath = join(stagingDir, 'skit.json');
|
|
8
|
+
try {
|
|
9
|
+
const content = await readFile(manifestPath, 'utf-8');
|
|
10
|
+
const manifest = JSON.parse(content);
|
|
11
|
+
// Validate required fields
|
|
12
|
+
if (!manifest.name) {
|
|
13
|
+
throw new Error('skit.json missing required field: name');
|
|
14
|
+
}
|
|
15
|
+
if (!manifest.version) {
|
|
16
|
+
throw new Error('skit.json missing required field: version');
|
|
17
|
+
}
|
|
18
|
+
if (!manifest.components) {
|
|
19
|
+
throw new Error('skit.json missing required field: components');
|
|
20
|
+
}
|
|
21
|
+
if (manifest.type !== 'skit') {
|
|
22
|
+
throw new Error(`Invalid package type: ${manifest.type}. Expected "skit"`);
|
|
23
|
+
}
|
|
24
|
+
return manifest;
|
|
25
|
+
}
|
|
26
|
+
catch (error) {
|
|
27
|
+
if (error instanceof SyntaxError) {
|
|
28
|
+
throw new Error(`Invalid JSON in skit.json: ${error.message}`);
|
|
29
|
+
}
|
|
30
|
+
if (error.code === 'ENOENT') {
|
|
31
|
+
throw new Error(`skit.json not found in ${stagingDir}`);
|
|
32
|
+
}
|
|
33
|
+
throw error;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Count total components in a manifest
|
|
38
|
+
*/
|
|
39
|
+
export function countComponents(manifest) {
|
|
40
|
+
const { components } = manifest;
|
|
41
|
+
let count = 0;
|
|
42
|
+
if (components.clis)
|
|
43
|
+
count += components.clis.length;
|
|
44
|
+
if (components.profiles)
|
|
45
|
+
count += components.profiles.length;
|
|
46
|
+
if (components.prompts)
|
|
47
|
+
count += components.prompts.length;
|
|
48
|
+
if (components.packs)
|
|
49
|
+
count += components.packs.length;
|
|
50
|
+
return count;
|
|
51
|
+
}
|
|
52
|
+
//# sourceMappingURL=skit-parser.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"skit-parser.js","sourceRoot":"","sources":["../../src/utils/skit-parser.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAGjC;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,iBAAiB,CAAC,UAAkB;IACxD,MAAM,YAAY,GAAG,IAAI,CAAC,UAAU,EAAE,WAAW,CAAC,CAAC;IAEnD,IAAI,CAAC;QACH,MAAM,OAAO,GAAG,MAAM,QAAQ,CAAC,YAAY,EAAE,OAAO,CAAC,CAAC;QACtD,MAAM,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAiB,CAAC;QAErD,2BAA2B;QAC3B,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC;YACnB,MAAM,IAAI,KAAK,CAAC,wCAAwC,CAAC,CAAC;QAC5D,CAAC;QACD,IAAI,CAAC,QAAQ,CAAC,OAAO,EAAE,CAAC;YACtB,MAAM,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