@microwiseai/snapshot 0.3.31 → 0.3.36
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 +122 -27
- package/dist/commands/install.js.map +1 -1
- package/dist/commands/license.d.ts.map +1 -1
- package/dist/commands/license.js +8 -11
- package/dist/commands/license.js.map +1 -1
- package/dist/index.js +7 -1
- package/dist/index.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 -3
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Wrapper Script Generator
|
|
3
|
+
*
|
|
4
|
+
* Creates wrapper scripts that transparently invoke kits through the SDK
|
|
5
|
+
* for license checking and telemetry.
|
|
6
|
+
*/
|
|
7
|
+
export interface SkitYamlManifest {
|
|
8
|
+
name: string;
|
|
9
|
+
version: string;
|
|
10
|
+
description?: string;
|
|
11
|
+
tier: 'free' | 'free_account' | 'subscription';
|
|
12
|
+
binary: string;
|
|
13
|
+
commands: Record<string, {
|
|
14
|
+
description: string;
|
|
15
|
+
license?: 'free' | 'free_account' | 'subscription';
|
|
16
|
+
}>;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Parse skit.yaml (simple YAML parser)
|
|
20
|
+
*/
|
|
21
|
+
export declare function parseSkitYaml(content: string): SkitYamlManifest | null;
|
|
22
|
+
/**
|
|
23
|
+
* Check if a package has skit.yaml
|
|
24
|
+
*/
|
|
25
|
+
export declare function hasSkitYaml(packageDir: string): Promise<boolean>;
|
|
26
|
+
/**
|
|
27
|
+
* Read and parse skit.yaml from package directory
|
|
28
|
+
*/
|
|
29
|
+
export declare function readSkitYaml(packageDir: string): Promise<SkitYamlManifest | null>;
|
|
30
|
+
/**
|
|
31
|
+
* Get the CLI name from kit name
|
|
32
|
+
* Examples:
|
|
33
|
+
* devtools-kit -> devtools
|
|
34
|
+
* my-awesome-kit -> my-awesome
|
|
35
|
+
* simple -> simple
|
|
36
|
+
*/
|
|
37
|
+
export declare function getCliName(kitName: string): string;
|
|
38
|
+
/**
|
|
39
|
+
* Install kit package to ~/.skit/packages/
|
|
40
|
+
*/
|
|
41
|
+
export declare function installKitPackage(sourceDir: string, kitName: string): Promise<string>;
|
|
42
|
+
/**
|
|
43
|
+
* Create wrapper script in ~/.skit/bin/
|
|
44
|
+
*/
|
|
45
|
+
export declare function createWrapper(kitName: string, kitPath: string): Promise<string>;
|
|
46
|
+
/**
|
|
47
|
+
* Remove wrapper script
|
|
48
|
+
*/
|
|
49
|
+
export declare function removeWrapper(kitName: string): Promise<void>;
|
|
50
|
+
/**
|
|
51
|
+
* Remove kit package from ~/.skit/packages/
|
|
52
|
+
*/
|
|
53
|
+
export declare function removeKitPackage(kitName: string): Promise<void>;
|
|
54
|
+
/**
|
|
55
|
+
* Get installation paths
|
|
56
|
+
*/
|
|
57
|
+
export declare function getSkitPaths(): {
|
|
58
|
+
home: string;
|
|
59
|
+
bin: string;
|
|
60
|
+
packages: string;
|
|
61
|
+
};
|
|
62
|
+
/**
|
|
63
|
+
* Check if ~/.skit/bin is in PATH
|
|
64
|
+
*/
|
|
65
|
+
export declare function isBinInPath(): boolean;
|
|
66
|
+
/**
|
|
67
|
+
* Get shell config file path
|
|
68
|
+
*/
|
|
69
|
+
export declare function getShellConfigPath(): string;
|
|
70
|
+
/**
|
|
71
|
+
* Get PATH export command for shell
|
|
72
|
+
*/
|
|
73
|
+
export declare function getPathExportCommand(): string;
|
|
74
|
+
//# sourceMappingURL=wrapper-generator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wrapper-generator.d.ts","sourceRoot":"","sources":["../../src/utils/wrapper-generator.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAWH,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,EAAE,MAAM,GAAG,cAAc,GAAG,cAAc,CAAC;IAC/C,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE;QACvB,WAAW,EAAE,MAAM,CAAC;QACpB,OAAO,CAAC,EAAE,MAAM,GAAG,cAAc,GAAG,cAAc,CAAC;KACpD,CAAC,CAAC;CACJ;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAAE,MAAM,GAAG,gBAAgB,GAAG,IAAI,CAgEtE;AAED;;GAEG;AACH,wBAAsB,WAAW,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAOtE;AAED;;GAEG;AACH,wBAAsB,YAAY,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,gBAAgB,GAAG,IAAI,CAAC,CAOvF;AAED;;;;;;GAMG;AACH,wBAAgB,UAAU,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAElD;AAuED;;GAEG;AACH,wBAAsB,iBAAiB,CACrC,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,MAAM,GACd,OAAO,CAAC,MAAM,CAAC,CAcjB;AAED;;GAEG;AACH,wBAAsB,aAAa,CACjC,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,MAAM,GACd,OAAO,CAAC,MAAM,CAAC,CAoBjB;AAED;;GAEG;AACH,wBAAsB,aAAa,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CASlE;AAED;;GAEG;AACH,wBAAsB,gBAAgB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAMrE;AAED;;GAEG;AACH,wBAAgB,YAAY;;;;EAM3B;AAED;;GAEG;AACH,wBAAgB,WAAW,IAAI,OAAO,CAGrC;AAED;;GAEG;AACH,wBAAgB,kBAAkB,IAAI,MAAM,CAU3C;AAED;;GAEG;AACH,wBAAgB,oBAAoB,IAAI,MAAM,CAQ7C"}
|
|
@@ -0,0 +1,280 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Wrapper Script Generator
|
|
3
|
+
*
|
|
4
|
+
* Creates wrapper scripts that transparently invoke kits through the SDK
|
|
5
|
+
* for license checking and telemetry.
|
|
6
|
+
*/
|
|
7
|
+
import { mkdir, writeFile, chmod, rm, readFile } from 'node:fs/promises';
|
|
8
|
+
import { join } from 'node:path';
|
|
9
|
+
import { homedir } from 'node:os';
|
|
10
|
+
/** Base directory for skit installation */
|
|
11
|
+
const SKIT_HOME = join(homedir(), '.skit');
|
|
12
|
+
const SKIT_BIN = join(SKIT_HOME, 'bin');
|
|
13
|
+
const SKIT_PACKAGES = join(SKIT_HOME, 'packages');
|
|
14
|
+
/**
|
|
15
|
+
* Parse skit.yaml (simple YAML parser)
|
|
16
|
+
*/
|
|
17
|
+
export function parseSkitYaml(content) {
|
|
18
|
+
try {
|
|
19
|
+
const lines = content.split('\n');
|
|
20
|
+
const result = {};
|
|
21
|
+
let currentSection = null;
|
|
22
|
+
let currentCommand = null;
|
|
23
|
+
for (const line of lines) {
|
|
24
|
+
const trimmed = line.trim();
|
|
25
|
+
if (!trimmed || trimmed.startsWith('#'))
|
|
26
|
+
continue;
|
|
27
|
+
const indent = line.search(/\S/);
|
|
28
|
+
// Top-level key
|
|
29
|
+
if (indent === 0 && trimmed.includes(':')) {
|
|
30
|
+
const [key, ...valueParts] = trimmed.split(':');
|
|
31
|
+
const value = valueParts.join(':').trim();
|
|
32
|
+
if (value) {
|
|
33
|
+
result[key] = value;
|
|
34
|
+
currentSection = null;
|
|
35
|
+
}
|
|
36
|
+
else {
|
|
37
|
+
currentSection = key;
|
|
38
|
+
if (key === 'commands') {
|
|
39
|
+
result[key] = {};
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
currentCommand = null;
|
|
43
|
+
}
|
|
44
|
+
// Second-level (commands section)
|
|
45
|
+
else if (indent === 2 && currentSection === 'commands' && trimmed.includes(':')) {
|
|
46
|
+
const [key, ...valueParts] = trimmed.split(':');
|
|
47
|
+
const value = valueParts.join(':').trim();
|
|
48
|
+
if (!value) {
|
|
49
|
+
currentCommand = key;
|
|
50
|
+
result.commands[key] = {};
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
// Third-level (command properties)
|
|
54
|
+
else if (indent === 4 && currentCommand && trimmed.includes(':')) {
|
|
55
|
+
const [key, ...valueParts] = trimmed.split(':');
|
|
56
|
+
const value = valueParts.join(':').trim();
|
|
57
|
+
const commands = result.commands;
|
|
58
|
+
commands[currentCommand][key] = value;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
// Validate required fields
|
|
62
|
+
if (!result.name || !result.binary || !result.commands) {
|
|
63
|
+
return null;
|
|
64
|
+
}
|
|
65
|
+
return {
|
|
66
|
+
name: result.name,
|
|
67
|
+
version: result.version || '0.0.0',
|
|
68
|
+
description: result.description,
|
|
69
|
+
tier: result.tier || 'free',
|
|
70
|
+
binary: result.binary,
|
|
71
|
+
commands: result.commands,
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
catch {
|
|
75
|
+
return null;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Check if a package has skit.yaml
|
|
80
|
+
*/
|
|
81
|
+
export async function hasSkitYaml(packageDir) {
|
|
82
|
+
try {
|
|
83
|
+
await readFile(join(packageDir, 'skit.yaml'), 'utf-8');
|
|
84
|
+
return true;
|
|
85
|
+
}
|
|
86
|
+
catch {
|
|
87
|
+
return false;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* Read and parse skit.yaml from package directory
|
|
92
|
+
*/
|
|
93
|
+
export async function readSkitYaml(packageDir) {
|
|
94
|
+
try {
|
|
95
|
+
const content = await readFile(join(packageDir, 'skit.yaml'), 'utf-8');
|
|
96
|
+
return parseSkitYaml(content);
|
|
97
|
+
}
|
|
98
|
+
catch {
|
|
99
|
+
return null;
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* Get the CLI name from kit name
|
|
104
|
+
* Examples:
|
|
105
|
+
* devtools-kit -> devtools
|
|
106
|
+
* my-awesome-kit -> my-awesome
|
|
107
|
+
* simple -> simple
|
|
108
|
+
*/
|
|
109
|
+
export function getCliName(kitName) {
|
|
110
|
+
return kitName.replace(/-kit$/, '');
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* Generate wrapper script content
|
|
114
|
+
*/
|
|
115
|
+
function generateWrapperScript(kitName, kitPath) {
|
|
116
|
+
return `#!/usr/bin/env node
|
|
117
|
+
/**
|
|
118
|
+
* Wrapper for ${kitName}
|
|
119
|
+
* Auto-generated by skit install
|
|
120
|
+
*
|
|
121
|
+
* This wrapper transparently handles:
|
|
122
|
+
* - License verification
|
|
123
|
+
* - Usage telemetry
|
|
124
|
+
* - Command execution
|
|
125
|
+
*/
|
|
126
|
+
|
|
127
|
+
import { runKit } from '@skit/kit-sdk';
|
|
128
|
+
|
|
129
|
+
const kitPath = '${kitPath}';
|
|
130
|
+
const command = process.argv[2];
|
|
131
|
+
const args = process.argv.slice(3);
|
|
132
|
+
|
|
133
|
+
if (!command || command === '--help' || command === '-h') {
|
|
134
|
+
// Show help
|
|
135
|
+
import('@skit/kit-sdk').then(({ printKitHelp }) => {
|
|
136
|
+
printKitHelp(kitPath);
|
|
137
|
+
});
|
|
138
|
+
} else if (command === '--version' || command === '-v') {
|
|
139
|
+
// Show version
|
|
140
|
+
import('fs').then(({ readFileSync }) => {
|
|
141
|
+
try {
|
|
142
|
+
const yaml = readFileSync(kitPath + '/skit.yaml', 'utf-8');
|
|
143
|
+
const match = yaml.match(/version:\\s*([^\\n]+)/);
|
|
144
|
+
console.log(match ? match[1].trim() : 'unknown');
|
|
145
|
+
} catch {
|
|
146
|
+
console.log('unknown');
|
|
147
|
+
}
|
|
148
|
+
});
|
|
149
|
+
} else {
|
|
150
|
+
// Run command through wrapper
|
|
151
|
+
runKit({
|
|
152
|
+
kitPath,
|
|
153
|
+
command,
|
|
154
|
+
args,
|
|
155
|
+
}).then((result) => {
|
|
156
|
+
process.exit(result.exitCode);
|
|
157
|
+
}).catch((error) => {
|
|
158
|
+
console.error('Error:', error.message);
|
|
159
|
+
process.exit(1);
|
|
160
|
+
});
|
|
161
|
+
}
|
|
162
|
+
`;
|
|
163
|
+
}
|
|
164
|
+
/**
|
|
165
|
+
* Generate shell wrapper (for systems without Node.js in PATH)
|
|
166
|
+
*/
|
|
167
|
+
function generateShellWrapper(kitName, kitPath) {
|
|
168
|
+
return `#!/bin/bash
|
|
169
|
+
# Wrapper for ${kitName}
|
|
170
|
+
# Auto-generated by skit install
|
|
171
|
+
|
|
172
|
+
SKIT_KIT_PATH="${kitPath}"
|
|
173
|
+
SKIT_SDK_PATH="${SKIT_HOME}/sdk"
|
|
174
|
+
|
|
175
|
+
# Run through Node.js wrapper
|
|
176
|
+
exec node "${SKIT_BIN}/.${kitName}-wrapper.mjs" "$@"
|
|
177
|
+
`;
|
|
178
|
+
}
|
|
179
|
+
/**
|
|
180
|
+
* Install kit package to ~/.skit/packages/
|
|
181
|
+
*/
|
|
182
|
+
export async function installKitPackage(sourceDir, kitName) {
|
|
183
|
+
const targetDir = join(SKIT_PACKAGES, kitName);
|
|
184
|
+
// Create packages directory
|
|
185
|
+
await mkdir(SKIT_PACKAGES, { recursive: true });
|
|
186
|
+
// Remove existing installation
|
|
187
|
+
await rm(targetDir, { recursive: true, force: true });
|
|
188
|
+
// Copy package (using cp -r for simplicity)
|
|
189
|
+
const { execSync } = await import('node:child_process');
|
|
190
|
+
execSync(`cp -r "${sourceDir}" "${targetDir}"`, { stdio: 'pipe' });
|
|
191
|
+
return targetDir;
|
|
192
|
+
}
|
|
193
|
+
/**
|
|
194
|
+
* Create wrapper script in ~/.skit/bin/
|
|
195
|
+
*/
|
|
196
|
+
export async function createWrapper(kitName, kitPath) {
|
|
197
|
+
const cliName = getCliName(kitName);
|
|
198
|
+
// Ensure bin directory exists
|
|
199
|
+
await mkdir(SKIT_BIN, { recursive: true });
|
|
200
|
+
// Generate Node.js wrapper module
|
|
201
|
+
const wrapperModulePath = join(SKIT_BIN, `.${cliName}-wrapper.mjs`);
|
|
202
|
+
const wrapperContent = generateWrapperScript(kitName, kitPath);
|
|
203
|
+
await writeFile(wrapperModulePath, wrapperContent, 'utf-8');
|
|
204
|
+
// Generate shell wrapper (main executable)
|
|
205
|
+
const wrapperPath = join(SKIT_BIN, cliName);
|
|
206
|
+
const shellWrapper = generateShellWrapper(kitName, kitPath);
|
|
207
|
+
await writeFile(wrapperPath, shellWrapper, 'utf-8');
|
|
208
|
+
// Make executable
|
|
209
|
+
await chmod(wrapperPath, 0o755);
|
|
210
|
+
return wrapperPath;
|
|
211
|
+
}
|
|
212
|
+
/**
|
|
213
|
+
* Remove wrapper script
|
|
214
|
+
*/
|
|
215
|
+
export async function removeWrapper(kitName) {
|
|
216
|
+
const cliName = getCliName(kitName);
|
|
217
|
+
try {
|
|
218
|
+
await rm(join(SKIT_BIN, cliName), { force: true });
|
|
219
|
+
await rm(join(SKIT_BIN, `.${cliName}-wrapper.mjs`), { force: true });
|
|
220
|
+
}
|
|
221
|
+
catch {
|
|
222
|
+
// Ignore errors
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
/**
|
|
226
|
+
* Remove kit package from ~/.skit/packages/
|
|
227
|
+
*/
|
|
228
|
+
export async function removeKitPackage(kitName) {
|
|
229
|
+
try {
|
|
230
|
+
await rm(join(SKIT_PACKAGES, kitName), { recursive: true, force: true });
|
|
231
|
+
}
|
|
232
|
+
catch {
|
|
233
|
+
// Ignore errors
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
/**
|
|
237
|
+
* Get installation paths
|
|
238
|
+
*/
|
|
239
|
+
export function getSkitPaths() {
|
|
240
|
+
return {
|
|
241
|
+
home: SKIT_HOME,
|
|
242
|
+
bin: SKIT_BIN,
|
|
243
|
+
packages: SKIT_PACKAGES,
|
|
244
|
+
};
|
|
245
|
+
}
|
|
246
|
+
/**
|
|
247
|
+
* Check if ~/.skit/bin is in PATH
|
|
248
|
+
*/
|
|
249
|
+
export function isBinInPath() {
|
|
250
|
+
const pathEnv = process.env.PATH || '';
|
|
251
|
+
return pathEnv.includes(SKIT_BIN) || pathEnv.includes('~/.skit/bin');
|
|
252
|
+
}
|
|
253
|
+
/**
|
|
254
|
+
* Get shell config file path
|
|
255
|
+
*/
|
|
256
|
+
export function getShellConfigPath() {
|
|
257
|
+
const shell = process.env.SHELL || '/bin/bash';
|
|
258
|
+
if (shell.includes('zsh')) {
|
|
259
|
+
return join(homedir(), '.zshrc');
|
|
260
|
+
}
|
|
261
|
+
else if (shell.includes('fish')) {
|
|
262
|
+
return join(homedir(), '.config', 'fish', 'config.fish');
|
|
263
|
+
}
|
|
264
|
+
else {
|
|
265
|
+
return join(homedir(), '.bashrc');
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
/**
|
|
269
|
+
* Get PATH export command for shell
|
|
270
|
+
*/
|
|
271
|
+
export function getPathExportCommand() {
|
|
272
|
+
const shell = process.env.SHELL || '/bin/bash';
|
|
273
|
+
if (shell.includes('fish')) {
|
|
274
|
+
return `set -gx PATH $HOME/.skit/bin $PATH`;
|
|
275
|
+
}
|
|
276
|
+
else {
|
|
277
|
+
return `export PATH="$HOME/.skit/bin:$PATH"`;
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
//# sourceMappingURL=wrapper-generator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wrapper-generator.js","sourceRoot":"","sources":["../../src/utils/wrapper-generator.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,EAAE,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AACzE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAElC,2CAA2C;AAC3C,MAAM,SAAS,GAAG,IAAI,CAAC,OAAO,EAAE,EAAE,OAAO,CAAC,CAAC;AAC3C,MAAM,QAAQ,GAAG,IAAI,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC;AACxC,MAAM,aAAa,GAAG,IAAI,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC;AAclD;;GAEG;AACH,MAAM,UAAU,aAAa,CAAC,OAAe;IAC3C,IAAI,CAAC;QACH,MAAM,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QAClC,MAAM,MAAM,GAA4B,EAAE,CAAC;QAC3C,IAAI,cAAc,GAAkB,IAAI,CAAC;QACzC,IAAI,cAAc,GAAkB,IAAI,CAAC;QAEzC,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;YACzB,MAAM,OAAO,GAAG,IAAI,CAAC,IAAI,EAAE,CAAC;YAC5B,IAAI,CAAC,OAAO,IA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OAAO,CAAC,GAAG,CAAC,KAAK,IAAI,WAAW,CAAC;IAE/C,IAAI,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC;QAC3B,OAAO,oCAAoC,CAAC;IAC9C,CAAC;SAAM,CAAC;QACN,OAAO,qCAAqC,CAAC;IAC/C,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@ist/skit",
|
|
3
|
+
"version": "0.1.16",
|
|
4
|
+
"description": "CLI and library for installing skit packages to correct component locations",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./dist/lib.js",
|
|
7
|
+
"types": "./dist/lib.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"types": "./dist/index.d.ts",
|
|
11
|
+
"default": "./dist/index.js"
|
|
12
|
+
},
|
|
13
|
+
"./lib": {
|
|
14
|
+
"types": "./dist/lib.d.ts",
|
|
15
|
+
"default": "./dist/lib.js"
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
"bin": {
|
|
19
|
+
"skit": "./dist/index.js"
|
|
20
|
+
},
|
|
21
|
+
"scripts": {
|
|
22
|
+
"build": "tsc",
|
|
23
|
+
"dev": "tsc --watch",
|
|
24
|
+
"test": "vitest",
|
|
25
|
+
"test:run": "vitest run",
|
|
26
|
+
"prepublishOnly": "npm run build"
|
|
27
|
+
},
|
|
28
|
+
"files": [
|
|
29
|
+
"dist"
|
|
30
|
+
],
|
|
31
|
+
"keywords": [
|
|
32
|
+
"skit",
|
|
33
|
+
"cli",
|
|
34
|
+
"session-kit",
|
|
35
|
+
"claude",
|
|
36
|
+
"library"
|
|
37
|
+
],
|
|
38
|
+
"author": "Microature",
|
|
39
|
+
"license": "MIT",
|
|
40
|
+
"dependencies": {
|
|
41
|
+
"@ist/registry-config": "^0.1.1",
|
|
42
|
+
"chalk": "^5.3.0",
|
|
43
|
+
"commander": "^12.1.0",
|
|
44
|
+
"tar": "^7.5.12"
|
|
45
|
+
},
|
|
46
|
+
"devDependencies": {
|
|
47
|
+
"@types/node": "^20.11.0",
|
|
48
|
+
"typescript": "^5.7.3",
|
|
49
|
+
"vitest": "^3.0.4"
|
|
50
|
+
},
|
|
51
|
+
"engines": {
|
|
52
|
+
"node": ">=18.0.0"
|
|
53
|
+
}
|
|
54
|
+
}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
All packages under `src/` are licensed according to the terms in
|
|
2
|
+
their respective `LICENSE` or `LICENSE.md` files.
|
|
3
|
+
|
|
4
|
+
The remainder of this project is licensed under the Blue Oak
|
|
5
|
+
Model License, as follows:
|
|
6
|
+
|
|
7
|
+
-----
|
|
8
|
+
|
|
9
|
+
# Blue Oak Model License
|
|
10
|
+
|
|
11
|
+
Version 1.0.0
|
|
12
|
+
|
|
13
|
+
## Purpose
|
|
14
|
+
|
|
15
|
+
This license gives everyone as much permission to work with
|
|
16
|
+
this software as possible, while protecting contributors
|
|
17
|
+
from liability.
|
|
18
|
+
|
|
19
|
+
## Acceptance
|
|
20
|
+
|
|
21
|
+
In order to receive this license, you must agree to its
|
|
22
|
+
rules. The rules of this license are both obligations
|
|
23
|
+
under that agreement and conditions to your license.
|
|
24
|
+
You must not do anything with this software that triggers
|
|
25
|
+
a rule that you cannot or will not follow.
|
|
26
|
+
|
|
27
|
+
## Copyright
|
|
28
|
+
|
|
29
|
+
Each contributor licenses you to do everything with this
|
|
30
|
+
software that would otherwise infringe that contributor's
|
|
31
|
+
copyright in it.
|
|
32
|
+
|
|
33
|
+
## Notices
|
|
34
|
+
|
|
35
|
+
You must ensure that everyone who gets a copy of
|
|
36
|
+
any part of this software from you, with or without
|
|
37
|
+
changes, also gets the text of this license or a link to
|
|
38
|
+
<https://blueoakcouncil.org/license/1.0.0>.
|
|
39
|
+
|
|
40
|
+
## Excuse
|
|
41
|
+
|
|
42
|
+
If anyone notifies you in writing that you have not
|
|
43
|
+
complied with [Notices](#notices), you can keep your
|
|
44
|
+
license by taking all practical steps to comply within 30
|
|
45
|
+
days after the notice. If you do not do so, your license
|
|
46
|
+
ends immediately.
|
|
47
|
+
|
|
48
|
+
## Patent
|
|
49
|
+
|
|
50
|
+
Each contributor licenses you to do everything with this
|
|
51
|
+
software that would otherwise infringe any patent claims
|
|
52
|
+
they can license or become able to license.
|
|
53
|
+
|
|
54
|
+
## Reliability
|
|
55
|
+
|
|
56
|
+
No contributor can revoke this license.
|
|
57
|
+
|
|
58
|
+
## No Liability
|
|
59
|
+
|
|
60
|
+
***As far as the law allows, this software comes as is,
|
|
61
|
+
without any warranty or condition, and no contributor
|
|
62
|
+
will be liable to anyone for any damages related to this
|
|
63
|
+
software or this license, under any kind of legal claim.***
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AA0CA,eAAO,MAAM,MAAM,MACd,MAAM,OACJ,MAAM,OACN,MAAM,YACD,OAAO,KAAK,GAAG,SA0B1B,CAAA;AAcD,eAAO,MAAM,UAAU,MAAO,MAAM,OAAO,MAAM,OAAO,MAAM,SAiB7D,CAAA"}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.chownrSync = exports.chownr = void 0;
|
|
7
|
+
const node_fs_1 = __importDefault(require("node:fs"));
|
|
8
|
+
const node_path_1 = __importDefault(require("node:path"));
|
|
9
|
+
const lchownSync = (path, uid, gid) => {
|
|
10
|
+
try {
|
|
11
|
+
return node_fs_1.default.lchownSync(path, uid, gid);
|
|
12
|
+
}
|
|
13
|
+
catch (er) {
|
|
14
|
+
if (er?.code !== 'ENOENT')
|
|
15
|
+
throw er;
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
const chown = (cpath, uid, gid, cb) => {
|
|
19
|
+
node_fs_1.default.lchown(cpath, uid, gid, er => {
|
|
20
|
+
// Skip ENOENT error
|
|
21
|
+
cb(er && er?.code !== 'ENOENT' ? er : null);
|
|
22
|
+
});
|
|
23
|
+
};
|
|
24
|
+
const chownrKid = (p, child, uid, gid, cb) => {
|
|
25
|
+
if (child.isDirectory()) {
|
|
26
|
+
(0, exports.chownr)(node_path_1.default.resolve(p, child.name), uid, gid, (er) => {
|
|
27
|
+
if (er)
|
|
28
|
+
return cb(er);
|
|
29
|
+
const cpath = node_path_1.default.resolve(p, child.name);
|
|
30
|
+
chown(cpath, uid, gid, cb);
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
else {
|
|
34
|
+
const cpath = node_path_1.default.resolve(p, child.name);
|
|
35
|
+
chown(cpath, uid, gid, cb);
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
const chownr = (p, uid, gid, cb) => {
|
|
39
|
+
node_fs_1.default.readdir(p, { withFileTypes: true }, (er, children) => {
|
|
40
|
+
// any error other than ENOTDIR or ENOTSUP means it's not readable,
|
|
41
|
+
// or doesn't exist. give up.
|
|
42
|
+
if (er) {
|
|
43
|
+
if (er.code === 'ENOENT')
|
|
44
|
+
return cb();
|
|
45
|
+
else if (er.code !== 'ENOTDIR' && er.code !== 'ENOTSUP')
|
|
46
|
+
return cb(er);
|
|
47
|
+
}
|
|
48
|
+
if (er || !children.length)
|
|
49
|
+
return chown(p, uid, gid, cb);
|
|
50
|
+
let len = children.length;
|
|
51
|
+
let errState = null;
|
|
52
|
+
const then = (er) => {
|
|
53
|
+
/* c8 ignore start */
|
|
54
|
+
if (errState)
|
|
55
|
+
return;
|
|
56
|
+
/* c8 ignore stop */
|
|
57
|
+
if (er)
|
|
58
|
+
return cb((errState = er));
|
|
59
|
+
if (--len === 0)
|
|
60
|
+
return chown(p, uid, gid, cb);
|
|
61
|
+
};
|
|
62
|
+
for (const child of children) {
|
|
63
|
+
chownrKid(p, child, uid, gid, then);
|
|
64
|
+
}
|
|
65
|
+
});
|
|
66
|
+
};
|
|
67
|
+
exports.chownr = chownr;
|
|
68
|
+
const chownrKidSync = (p, child, uid, gid) => {
|
|
69
|
+
if (child.isDirectory())
|
|
70
|
+
(0, exports.chownrSync)(node_path_1.default.resolve(p, child.name), uid, gid);
|
|
71
|
+
lchownSync(node_path_1.default.resolve(p, child.name), uid, gid);
|
|
72
|
+
};
|
|
73
|
+
const chownrSync = (p, uid, gid) => {
|
|
74
|
+
let children;
|
|
75
|
+
try {
|
|
76
|
+
children = node_fs_1.default.readdirSync(p, { withFileTypes: true });
|
|
77
|
+
}
|
|
78
|
+
catch (er) {
|
|
79
|
+
const e = er;
|
|
80
|
+
if (e?.code === 'ENOENT')
|
|
81
|
+
return;
|
|
82
|
+
else if (e?.code === 'ENOTDIR' || e?.code === 'ENOTSUP')
|
|
83
|
+
return lchownSync(p, uid, gid);
|
|
84
|
+
else
|
|
85
|
+
throw e;
|
|
86
|
+
}
|
|
87
|
+
for (const child of children) {
|
|
88
|
+
chownrKidSync(p, child, uid, gid);
|
|
89
|
+
}
|
|
90
|
+
return lchownSync(p, uid, gid);
|
|
91
|
+
};
|
|
92
|
+
exports.chownrSync = chownrSync;
|
|
93
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;AAAA,sDAAyC;AACzC,0DAA4B;AAE5B,MAAM,UAAU,GAAG,CAAC,IAAY,EAAE,GAAW,EAAE,GAAW,EAAE,EAAE;IAC5D,IAAI,CAAC;QACH,OAAO,iBAAE,CAAC,UAAU,CAAC,IAAI,EAAE,GAAG,EAAE,GAAG,CAAC,CAAA;IACtC,CAAC;IAAC,OAAO,EAAE,EAAE,CAAC;QACZ,IAAK,EAA4B,EAAE,IAAI,KAAK,QAAQ;YAAE,MAAM,EAAE,CAAA;IAChE,CAAC;AACH,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EAAC,mBAAI,CAAC,OAAO,CAAC,CAAC,EAAE,KAAK,CAAC,IAAI,CAAC,EAAE,GAAG,EAAE,GAAG,CAAC,CAAA;IAEnD,UAAU,CAAC,mBAAI,CAAC,OAAO,CAAC,CAAC,EAAE,KAAK,CAAC,IAAI,CAAC,EAAE,GAAG,EAAE,GAAG,CAAC,CAAA;AACnD,CAAC,CAAA;AAEM,MAAM,UAAU,GAAG,CAAC,CAAS,EAAE,GAAW,EAAE,GAAW,EAAE,EAAE;IAChE,IAAI,QAAkB,CAAA;IACtB,IAAI,CAAC;QACH,QAAQ,GAAG,iBAAE,CAAC,WAAW,CAAC,CAAC,EAAE,EAAE,aAAa,EAAE,IAAI,EAAE,CAAC,CAAA;IACvD,CAAC;IAAC,OAAO,EAAE,EAAE,CAAC;QACZ,MAAM,CAAC,GAAG,EAA2B,CAAA;QACrC,IAAI,CAAC,EAAE,IAAI,KAAK,QAAQ;YAAE,OAAM;aAC3B,IAAI,CAAC,EAAE,IAAI,KAAK,SAAS,IAAI,CAAC,EAAE,IAAI,KAAK,SAAS;YACrD,OAAO,UAAU,CAAC,CAAC,EAAE,GAAG,EAAE,GAAG,CAAC,CAAA;;YAC3B,MAAM,CAAC,CAAA;IACd,CAAC;IAED,KAAK,MAAM,KAAK,IAAI,QAAQ,EAAE,CAAC;QAC7B,aAAa,CAAC,CAAC,EAAE,KAAK,EAAE,GAAG,EAAE,GAAG,CAAC,CAAA;IACnC,CAAC;IAED,OAAO,UAAU,CAAC,CAAC,EAAE,GAAG,EAAE,GAAG,CAAC,CAAA;AAChC,CAAC,CAAA;AAjBY,QAAA,UAAU,cAiBtB","sourcesContent":["import fs, { type Dirent } from 'node:fs'\nimport path from 'node:path'\n\nconst lchownSync = (path: string, uid: number, gid: number) => {\n try {\n return fs.lchownSync(path, uid, gid)\n } catch (er) {\n if ((er as NodeJS.ErrnoException)?.code !== 'ENOENT') throw er\n }\n}\n\nconst chown = (\n cpath: string,\n uid: number,\n gid: number,\n cb: (er?: unknown) => any,\n) => {\n fs.lchown(cpath, uid, gid, er => {\n // Skip ENOENT error\n cb(er && (er as NodeJS.ErrnoException)?.code !== 'ENOENT' ? er : null)\n })\n}\n\nconst chownrKid = (\n p: string,\n child: Dirent,\n uid: number,\n gid: number,\n cb: (er?: unknown) => any,\n) => {\n if (child.isDirectory()) {\n chownr(path.resolve(p, child.name), uid, gid, (er: unknown) => {\n if (er) return cb(er)\n const cpath = path.resolve(p, child.name)\n chown(cpath, uid, gid, cb)\n })\n } else {\n const cpath = path.resolve(p, child.name)\n chown(cpath, uid, gid, cb)\n }\n}\n\nexport const chownr = (\n p: string,\n uid: number,\n gid: number,\n cb: (er?: unknown) => any,\n) => {\n fs.readdir(p, { withFileTypes: true }, (er, children) => {\n // any error other than ENOTDIR or ENOTSUP means it's not readable,\n // or doesn't exist. give up.\n if (er) {\n if (er.code === 'ENOENT') return cb()\n else if (er.code !== 'ENOTDIR' && er.code !== 'ENOTSUP')\n return cb(er)\n }\n if (er || !children.length) return chown(p, uid, gid, cb)\n\n let len = children.length\n let errState: null | NodeJS.ErrnoException = null\n const then = (er?: unknown) => {\n /* c8 ignore start */\n if (errState) return\n /* c8 ignore stop */\n if (er) return cb((errState = er as NodeJS.ErrnoException))\n if (--len === 0) return chown(p, uid, gid, cb)\n }\n\n for (const child of children) {\n chownrKid(p, child, uid, gid, then)\n }\n })\n}\n\nconst chownrKidSync = (\n p: string,\n child: Dirent,\n uid: number,\n gid: number,\n) => {\n if (child.isDirectory())\n chownrSync(path.resolve(p, child.name), uid, gid)\n\n lchownSync(path.resolve(p, child.name), uid, gid)\n}\n\nexport const chownrSync = (p: string, uid: number, gid: number) => {\n let children: Dirent[]\n try {\n children = fs.readdirSync(p, { withFileTypes: true })\n } catch (er) {\n const e = er as NodeJS.ErrnoException\n if (e?.code === 'ENOENT') return\n else if (e?.code === 'ENOTDIR' || e?.code === 'ENOTSUP')\n return lchownSync(p, uid, gid)\n else throw e\n }\n\n for (const child of children) {\n chownrKidSync(p, child, uid, gid)\n }\n\n return lchownSync(p, uid, gid)\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AA0CA,eAAO,MAAM,MAAM,MACd,MAAM,OACJ,MAAM,OACN,MAAM,YACD,OAAO,KAAK,GAAG,SA0B1B,CAAA;AAcD,eAAO,MAAM,UAAU,MAAO,MAAM,OAAO,MAAM,OAAO,MAAM,SAiB7D,CAAA"}
|