infra-kit 0.5.5 → 0.7.0

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.
Files changed (43) hide show
  1. package/dist/chunk-63VNUKUS.js +8 -0
  2. package/dist/chunk-63VNUKUS.js.map +7 -0
  3. package/dist/chunk-7YE5QKKB.js +444 -0
  4. package/dist/chunk-7YE5QKKB.js.map +7 -0
  5. package/dist/chunk-GYPVEWUV.js +2 -0
  6. package/dist/chunk-GYPVEWUV.js.map +7 -0
  7. package/dist/chunk-KXQQUBGV.js +10 -0
  8. package/dist/{chunk-744Y674Y.js.map → chunk-KXQQUBGV.js.map} +4 -4
  9. package/dist/chunk-MFLYORUJ.js +2 -0
  10. package/dist/chunk-MFLYORUJ.js.map +7 -0
  11. package/dist/chunk-NFIFWIO6.js +4 -0
  12. package/dist/chunk-NFIFWIO6.js.map +7 -0
  13. package/dist/chunk-QS4JZKF2.js +2 -0
  14. package/dist/chunk-QS4JZKF2.js.map +7 -0
  15. package/dist/chunk-UI2MUEVR.js +2 -0
  16. package/dist/chunk-UI2MUEVR.js.map +7 -0
  17. package/dist/{chunk-QUXDC3A3.js → chunk-YKCY657C.js} +4 -4
  18. package/dist/cli.js +11 -10
  19. package/dist/cli.js.map +3 -3
  20. package/dist/dev-server.js +22 -22
  21. package/dist/dev-server.js.map +3 -3
  22. package/dist/{dev-wizard-run-DWDA5R3A.js → dev-wizard-run-MCUYV6IN.js} +2 -2
  23. package/dist/mcp-proxy.js +9 -9
  24. package/dist/mcp-proxy.js.map +3 -3
  25. package/dist/mcp.js +2 -2
  26. package/dist/mcp.js.map +4 -4
  27. package/dist/update-check.js +1 -1
  28. package/package.json +6 -6
  29. package/dist/chunk-744Y674Y.js +0 -10
  30. package/dist/chunk-GF2CA4CD.js +0 -2
  31. package/dist/chunk-GF2CA4CD.js.map +0 -7
  32. package/dist/chunk-IERRU26T.js +0 -2
  33. package/dist/chunk-IERRU26T.js.map +0 -7
  34. package/dist/chunk-LCNORKDV.js +0 -8
  35. package/dist/chunk-LCNORKDV.js.map +0 -7
  36. package/dist/chunk-PQG63EIV.js +0 -4
  37. package/dist/chunk-PQG63EIV.js.map +0 -7
  38. package/dist/chunk-QJQQ7ENL.js +0 -445
  39. package/dist/chunk-QJQQ7ENL.js.map +0 -7
  40. package/dist/chunk-XJOY7J3G.js +0 -2
  41. package/dist/chunk-XJOY7J3G.js.map +0 -7
  42. /package/dist/{chunk-QUXDC3A3.js.map → chunk-YKCY657C.js.map} +0 -0
  43. /package/dist/{dev-wizard-run-DWDA5R3A.js.map → dev-wizard-run-MCUYV6IN.js.map} +0 -0
@@ -1,2 +0,0 @@
1
- var r=t=>Object.fromEntries(Object.entries(t).filter(([e])=>!e.startsWith("npm_")&&e!=="PNPM_SCRIPT_SRC_DIR")),o=/^npm_config_(?:prefix|registry)$/i,a=t=>{let e=r(t);for(let[n,s]of Object.entries(t))o.test(n)&&(e[n]=s);return e};export{r as a,a as b};
2
- //# sourceMappingURL=chunk-XJOY7J3G.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../src/lib/pm-env/pm-env.ts"],
4
- "sourcesContent": ["/**\n * `env` minus every package-manager marker a spawned child could mistake for a throwaway install:\n * the whole `npm_*` block plus `PNPM_SCRIPT_SRC_DIR`. The result makes the child look exactly like\n * a direct `node <pkg>/dist/cli.js` run \u2014 which it is.\n */\n// Any child we launch through `node <bin>` (the portless driver, the update worker, the mcp launcher)\n// inherits our env, and a tool that sniffs those markers will conclude it was run via `npx`/`pnpm\n// dlx` and refuse to work. portless is the motivating case; its guard (cli.js `main()`) is:\n//\n// isNpx = npm_command === 'exec' && !npm_lifecycle_event\n// isPnpmDlx = !!PNPM_SCRIPT_SRC_DIR && !npm_lifecycle_event\n// if ((isNpx || isPnpmDlx) && !isLocallyInstalled()) -> abort\n//\n// `isLocallyInstalled()` walks up from the CHILD's cwd, so in a consumer repo (where portless is a\n// transitive dep of infra-kit, absent from the root `node_modules`) it is false and the guard is\n// live. `pnpm exec infra-kit dev` exports `npm_command=exec` with no lifecycle event, so `isNpx`\n// holds, every portless call exits 1, `isAvailable()` is false, and `ensureProxy` aborts the whole\n// dev boot with \"portless is not installed\", on a machine where it plainly is.\n//\n// `PNPM_SCRIPT_SRC_DIR` must be dropped ALONGSIDE the `npm_*` block, not left behind: it is set by\n// `pnpm run <script>`, where `npm_lifecycle_event` is what suppresses `isPnpmDlx`. Stripping only\n// `npm_*` removes that suppressor and creates an abort for the script-style invocation that\n// previously worked. Both markers go, or neither is safe.\nexport const withoutPackageManagerEnv = (env: NodeJS.ProcessEnv): NodeJS.ProcessEnv => {\n return Object.fromEntries(\n Object.entries(env).filter(([key]) => {\n return !key.startsWith('npm_') && key !== 'PNPM_SCRIPT_SRC_DIR'\n }),\n )\n}\n\n/**\n * npm's own configuration \u2014 as opposed to the npx/dlx *markers* above. Case-insensitive because npm reads\n * `npm_config_*` case-insensitively (its parser matches `/^npm_config_/i`) and real environments export\n * both forms: shells write the lowercase name, Dockerfiles and CI images overwhelmingly write the\n * uppercase one.\n */\nconst NPM_CONFIG_TO_PRESERVE = /^npm_config_(?:prefix|registry)$/i\n\n/**\n * The env for spawning a package-manager INSTALL: npx/dlx markers stripped, but npm's own config\n * kept \u2014 specifically `npm_config_prefix` and `npm_config_registry`.\n *\n * @example\n * packageManagerInstallEnv({ npm_command: 'exec', npm_config_prefix: '/p', PATH: '/bin' })\n * // => { npm_config_prefix: '/p', PATH: '/bin' }\n */\n// `withoutPackageManagerEnv` is deliberately a blunt `npm_*` prefix filter, and it is the\n// right tool for the portless driver \u2014 but it is the WRONG tool for spawning an install, because it\n// also drops the two variables that tell the package manager where, and from where, to install:\n//\n// - `npm_config_prefix` is the npm matcher's ONLY signal (see `install-manager.ts`). Strip it and\n// we detect a global install rooted at prefix P, then run the install with P erased \u2014 so it\n// lands in the DEFAULT prefix instead. That is either a permanent EACCES, or a second global\n// copy that is not the one on PATH. Nothing notices: the install exits 0, we report\n// `installed`, the version on PATH never moves, and the whole cycle repeats every window\n// forever. `export npm_config_prefix=~/.npm-global` is npm's own documented EACCES workaround,\n// so this is a mainstream layout, not an exotic one.\n// - `npm_config_registry` is what the update CHECK already used to pick a registry. Dropping it\n// here means we decide against a corporate mirror and then install from somewhere else.\n//\n// Preserving these cannot re-arm the dlx guard: that guard reads `npm_command`,\n// `npm_lifecycle_event` and `PNPM_SCRIPT_SRC_DIR` \u2014 none of which are npm config, and all of which\n// remain stripped.\nexport const packageManagerInstallEnv = (env: NodeJS.ProcessEnv): NodeJS.ProcessEnv => {\n const sanitised = withoutPackageManagerEnv(env)\n\n for (const [key, value] of Object.entries(env)) {\n if (NPM_CONFIG_TO_PRESERVE.test(key)) sanitised[key] = value\n }\n\n return sanitised\n}\n"],
5
- "mappings": "AAuBO,IAAMA,EAA4BC,GAChC,OAAO,YACZ,OAAO,QAAQA,CAAG,EAAE,OAAO,CAAC,CAACC,CAAG,IACvB,CAACA,EAAI,WAAW,MAAM,GAAKA,IAAQ,qBAC3C,CACH,EASIC,EAAyB,oCA2BlBC,EAA4BH,GAA8C,CACrF,IAAMI,EAAYL,EAAyBC,CAAG,EAE9C,OAAW,CAACC,EAAKI,CAAK,IAAK,OAAO,QAAQL,CAAG,EACvCE,EAAuB,KAAKD,CAAG,IAAGG,EAAUH,CAAG,EAAII,GAGzD,OAAOD,CACT",
6
- "names": ["withoutPackageManagerEnv", "env", "key", "NPM_CONFIG_TO_PRESERVE", "packageManagerInstallEnv", "sanitised", "value"]
7
- }