@unbrained/pm-cli 2026.9.20 → 2026.9.22

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 (255) hide show
  1. package/.claude-plugin/marketplace.json +2 -2
  2. package/CHANGELOG.md +32 -1
  3. package/dist/cli/commander-usage.d.ts +5 -1
  4. package/dist/cli/commander-usage.js +2 -2
  5. package/dist/cli/commands/annotations/comments.d.ts +2 -0
  6. package/dist/cli/commands/{comments.js → annotations/comments.js} +1 -1
  7. package/dist/cli/commands/{docs.d.ts → annotations/docs.d.ts} +2 -2
  8. package/dist/cli/commands/{docs.js → annotations/docs.js} +1 -1
  9. package/dist/cli/commands/{files.d.ts → annotations/files.d.ts} +2 -2
  10. package/dist/cli/commands/{files.js → annotations/files.js} +1 -1
  11. package/dist/cli/commands/annotations/learnings.d.ts +2 -0
  12. package/dist/cli/commands/{learnings.js → annotations/learnings.js} +1 -1
  13. package/dist/cli/commands/annotations/notes.d.ts +2 -0
  14. package/dist/cli/commands/{notes.js → annotations/notes.js} +1 -1
  15. package/dist/cli/commands/extension/extension.d.ts +6 -0
  16. package/dist/cli/commands/{extension.js → extension/extension.js} +1 -1
  17. package/dist/cli/commands/{gc.d.ts → governance/gc.d.ts} +2 -2
  18. package/dist/cli/commands/{gc.js → governance/gc.js} +1 -1
  19. package/dist/cli/commands/governance/health.d.ts +6 -0
  20. package/dist/cli/commands/{deps.js → governance/health.js} +2 -2
  21. package/dist/cli/commands/governance/telemetry.d.ts +6 -0
  22. package/dist/cli/commands/{telemetry.js → governance/telemetry.js} +1 -1
  23. package/dist/cli/commands/governance/validate.d.ts +9 -0
  24. package/dist/cli/commands/governance/validate.js +2 -0
  25. package/dist/cli/commands/history/activity.d.ts +6 -0
  26. package/dist/cli/commands/{activity.js → history/activity.js} +1 -1
  27. package/dist/cli/commands/history/history-compact.d.ts +7 -0
  28. package/dist/cli/commands/{history-compact.js → history/history-compact.js} +1 -1
  29. package/dist/cli/commands/{history-redact.d.ts → history/history-redact.d.ts} +2 -2
  30. package/dist/cli/commands/history/history-redact.js +2 -0
  31. package/dist/cli/commands/{history-repair.d.ts → history/history-repair.d.ts} +2 -2
  32. package/dist/cli/commands/{history-repair.js → history/history-repair.js} +1 -1
  33. package/dist/cli/commands/history/history.d.ts +2 -0
  34. package/dist/cli/commands/{history.js → history/history.js} +1 -1
  35. package/dist/cli/commands/history/restore.d.ts +6 -0
  36. package/dist/cli/commands/history/restore.js +2 -0
  37. package/dist/cli/commands/lifecycle/append.d.ts +2 -0
  38. package/dist/cli/commands/{append.js → lifecycle/append.js} +1 -1
  39. package/dist/cli/commands/lifecycle/claim.d.ts +2 -0
  40. package/dist/cli/commands/{claim.js → lifecycle/claim.js} +1 -1
  41. package/dist/cli/commands/lifecycle/close-many.d.ts +2 -0
  42. package/dist/cli/commands/{close-many.js → lifecycle/close-many.js} +1 -1
  43. package/dist/cli/commands/lifecycle/close.d.ts +6 -0
  44. package/dist/cli/commands/lifecycle/close.js +2 -0
  45. package/dist/cli/commands/lifecycle/copy.d.ts +6 -0
  46. package/dist/cli/commands/lifecycle/copy.js +2 -0
  47. package/dist/cli/commands/lifecycle/create.d.ts +6 -0
  48. package/dist/cli/commands/{create.js → lifecycle/create.js} +1 -1
  49. package/dist/cli/commands/lifecycle/delete.d.ts +6 -0
  50. package/dist/cli/commands/{delete.js → lifecycle/delete.js} +1 -1
  51. package/dist/cli/commands/lifecycle/focus.d.ts +6 -0
  52. package/dist/cli/commands/lifecycle/focus.js +2 -0
  53. package/dist/cli/commands/lifecycle/plan.d.ts +6 -0
  54. package/dist/cli/commands/{plan.js → lifecycle/plan.js} +1 -1
  55. package/dist/cli/commands/lifecycle/update-many.d.ts +2 -0
  56. package/dist/cli/commands/lifecycle/update-many.js +2 -0
  57. package/dist/cli/commands/lifecycle/update.d.ts +6 -0
  58. package/dist/cli/commands/{copy.js → lifecycle/update.js} +2 -2
  59. package/dist/cli/commands/query/aggregate.d.ts +2 -0
  60. package/dist/cli/commands/{aggregate.js → query/aggregate.js} +1 -1
  61. package/dist/cli/commands/query/context.d.ts +6 -0
  62. package/dist/cli/commands/{focus.js → query/context.js} +2 -2
  63. package/dist/cli/commands/{deps.d.ts → query/deps.d.ts} +2 -2
  64. package/dist/cli/commands/query/deps.js +2 -0
  65. package/dist/cli/commands/query/duplicates.d.ts +6 -0
  66. package/dist/cli/commands/{duplicates.js → query/duplicates.js} +1 -1
  67. package/dist/cli/commands/{eval.d.ts → query/eval.d.ts} +2 -2
  68. package/dist/cli/commands/{eval.js → query/eval.js} +1 -1
  69. package/dist/cli/commands/query/get.d.ts +6 -0
  70. package/dist/cli/commands/{get.js → query/get.js} +1 -1
  71. package/dist/cli/commands/{graph.d.ts → query/graph.d.ts} +2 -2
  72. package/dist/cli/commands/{graph.js → query/graph.js} +1 -1
  73. package/dist/cli/commands/{list.d.ts → query/list.d.ts} +2 -2
  74. package/dist/cli/commands/{list.js → query/list.js} +1 -1
  75. package/dist/cli/commands/{next.d.ts → query/next.d.ts} +2 -2
  76. package/dist/cli/commands/{next.js → query/next.js} +1 -1
  77. package/dist/cli/commands/query/search.d.ts +6 -0
  78. package/dist/cli/commands/{search.js → query/search.js} +1 -1
  79. package/dist/cli/commands/query/stats.d.ts +6 -0
  80. package/dist/cli/commands/{stats.js → query/stats.js} +1 -1
  81. package/dist/cli/commands/{test-all.d.ts → test/test-all.d.ts} +2 -2
  82. package/dist/cli/commands/{test-all.js → test/test-all.js} +1 -1
  83. package/dist/cli/commands/{test-runs.d.ts → test/test-runs.d.ts} +2 -2
  84. package/dist/cli/commands/{test-runs.js → test/test-runs.js} +1 -1
  85. package/dist/cli/commands/{test.d.ts → test/test.d.ts} +2 -2
  86. package/dist/cli/commands/{test.js → test/test.js} +1 -1
  87. package/dist/cli/commands/{config.d.ts → workspace/config.d.ts} +2 -2
  88. package/dist/cli/commands/{config.js → workspace/config.js} +1 -1
  89. package/dist/cli/commands/workspace/contracts.d.ts +2 -0
  90. package/dist/cli/commands/{contracts.js → workspace/contracts.js} +1 -1
  91. package/dist/cli/commands/{init.d.ts → workspace/init.d.ts} +2 -2
  92. package/dist/cli/commands/{update.js → workspace/init.js} +2 -2
  93. package/dist/cli/commands/workspace/merge.d.ts +8 -0
  94. package/dist/cli/commands/workspace/merge.js +2 -0
  95. package/dist/cli/commands/{profile.d.ts → workspace/profile.d.ts} +2 -2
  96. package/dist/cli/commands/{profile.js → workspace/profile.js} +1 -1
  97. package/dist/cli/commands/workspace/schema.d.ts +7 -0
  98. package/dist/cli/commands/workspace/schema.js +2 -0
  99. package/dist/cli/commands/workspace/upgrade.d.ts +2 -0
  100. package/dist/cli/commands/{update-many.js → workspace/upgrade.js} +2 -2
  101. package/dist/cli/register-annotations.js +1 -1
  102. package/dist/cli/register-history-activity.js +1 -1
  103. package/dist/cli/register-history-maintenance.js +1 -1
  104. package/dist/cli/register-list-query.js +1 -1
  105. package/dist/cli/register-mutation.js +1 -1
  106. package/dist/cli/register-operations.js +1 -1
  107. package/dist/cli/register-setup.js +1 -1
  108. package/dist/cli/schema/registration.js +1 -1
  109. package/dist/cli/stats-analytics-json.d.ts +1 -1
  110. package/dist/cli/stats-analytics-json.js +1 -1
  111. package/dist/cli-bundle/bundle-manifest.json +152 -152
  112. package/dist/cli-bundle/chunks/{chunk-GRHSNUQO.js → chunk-3OFFMS2N.js} +2 -2
  113. package/dist/cli-bundle/chunks/{chunk-QZTS23BV.js → chunk-4XOV7Q5R.js} +2 -2
  114. package/dist/cli-bundle/chunks/{chunk-2QLXN6HZ.js → chunk-AVWHZUNC.js} +26 -26
  115. package/dist/cli-bundle/chunks/{chunk-2UNYUB4A.js → chunk-BJBBOUYQ.js} +2 -2
  116. package/dist/cli-bundle/chunks/{chunk-JBJUOOJI.js → chunk-CM57QHVK.js} +5 -5
  117. package/dist/cli-bundle/chunks/{chunk-TTFVQB4S.js → chunk-D2OV2UBV.js} +2 -2
  118. package/dist/cli-bundle/chunks/{chunk-33R5PEKI.js → chunk-GFTN5OS4.js} +2 -2
  119. package/dist/cli-bundle/chunks/{chunk-HAFSMFJK.js → chunk-JSW33Q6R.js} +3 -3
  120. package/dist/cli-bundle/chunks/{chunk-FBWAECBI.js → chunk-ML42DLI3.js} +3 -3
  121. package/dist/cli-bundle/chunks/{chunk-2FEKKSLN.js → chunk-SBTT42A4.js} +43 -43
  122. package/dist/cli-bundle/chunks/chunk-SGFQQXFD.js +2 -0
  123. package/dist/cli-bundle/chunks/{chunk-7YUYLYJQ.js → chunk-UDNYAMCM.js} +6 -6
  124. package/dist/cli-bundle/chunks/{chunk-K7RWRJLT.js → chunk-ZSPZJOMK.js} +2 -2
  125. package/dist/cli-bundle/chunks/{register-list-query-5V43MYPN.js → register-list-query-VOS5CBX4.js} +2 -2
  126. package/dist/cli-bundle/chunks/register-mutation-LWZH6UFJ.js +20 -0
  127. package/dist/cli-bundle/chunks/{register-operations-LJU5H2CU.js → register-operations-YJK4DNFZ.js} +2 -2
  128. package/dist/cli-bundle/chunks/{register-setup-HJUNGYBB.js → register-setup-Q3CYF67Q.js} +2 -2
  129. package/dist/cli-bundle/focused-chunks/{chunk-L6L4XCLY.js → chunk-AO5FR7PN.js} +2 -2
  130. package/dist/cli-bundle/focused-chunks/{chunk-K5ZCBC6Y.js → chunk-CASXNCNQ.js} +2 -2
  131. package/dist/cli-bundle/focused-chunks/{chunk-FXAZPSU6.js → chunk-FKYUTTFL.js} +2 -2
  132. package/dist/cli-bundle/focused-chunks/{chunk-DPBTIFW7.js → chunk-IOL25GKH.js} +2 -2
  133. package/dist/cli-bundle/focused-chunks/{chunk-N6KI3LWF.js → chunk-JCD5YESL.js} +2 -2
  134. package/dist/cli-bundle/focused-chunks/{chunk-6MNKQKT6.js → chunk-LH24XUPJ.js} +2 -2
  135. package/dist/cli-bundle/focused-chunks/{chunk-IA5CCSBB.js → chunk-MXESHALQ.js} +2 -2
  136. package/dist/cli-bundle/focused-chunks/{chunk-3XPBKIV6.js → chunk-PRMQTT7X.js} +12 -12
  137. package/dist/cli-bundle/focused-chunks/{chunk-ISEOBALS.js → chunk-QFEDRPPI.js} +2 -2
  138. package/dist/cli-bundle/focused-chunks/{chunk-UIS5FVHH.js → chunk-QYN77MQP.js} +49 -49
  139. package/dist/cli-bundle/focused-chunks/{chunk-5BLRMUMK.js → chunk-TSI73EEM.js} +3 -3
  140. package/dist/cli-bundle/focused-chunks/{chunk-PC6ZZVNP.js → chunk-UAU4DJSR.js} +3 -3
  141. package/dist/cli-bundle/focused-chunks/{chunk-RQL5WLNZ.js → chunk-URH727T5.js} +2 -2
  142. package/dist/cli-bundle/focused-chunks/{chunk-U2SB2BMM.js → chunk-UT7VS4X2.js} +2 -2
  143. package/dist/cli-bundle/focused-chunks/{chunk-HYPK5OPA.js → chunk-V2NARGRH.js} +2 -2
  144. package/dist/cli-bundle/focused-chunks/{chunk-DRNXMOSV.js → chunk-XR5EBU3B.js} +2 -2
  145. package/dist/cli-bundle/main.js +18 -18
  146. package/dist/cli-bundle/sdk-authoring.js +1 -1
  147. package/dist/cli-bundle/sdk-contracts.js +1 -1
  148. package/dist/cli-bundle/sdk-core.js +21 -21
  149. package/dist/cli-bundle/sdk-governance.js +1 -1
  150. package/dist/cli-bundle/sdk-graph.js +1 -1
  151. package/dist/cli-bundle/sdk-merge.js +38 -38
  152. package/dist/cli-bundle/sdk-query.js +1 -1
  153. package/dist/cli-bundle/sdk-runtime.js +1 -1
  154. package/dist/cli-bundle/sdk-testing.js +1 -1
  155. package/dist/cli-bundle/sdk.js +1 -1
  156. package/dist/core/config/positional-value.d.ts +0 -2
  157. package/dist/core/config/positional-value.js +1 -1
  158. package/dist/core/history/history-diff.js +1 -1
  159. package/dist/core/schema/type-workflows.d.ts +1 -1
  160. package/dist/core/schema/type-workflows.js +1 -1
  161. package/dist/core/search/eval.d.ts +1 -1
  162. package/dist/core/search/eval.js +1 -1
  163. package/dist/core/shared/item-metadata-contract.d.ts +0 -4
  164. package/dist/core/shared/item-metadata-contract.js +1 -1
  165. package/dist/sdk/completion/bash.d.ts +1 -1
  166. package/dist/sdk/completion/bash.js +1 -1
  167. package/dist/sdk/extension/shared.d.ts +2 -2
  168. package/dist/sdk/extension/shared.js +1 -1
  169. package/dist/sdk/governance/upgrade.d.ts +2 -0
  170. package/dist/sdk/governance/upgrade.js +2 -2
  171. package/dist/sdk/public-surface.json +1 -1
  172. package/dist/sdk/query/search-contracts.d.ts +0 -1
  173. package/dist/sdk/query/search-contracts.js +1 -1
  174. package/dist/sdk/schema.d.ts +8 -4
  175. package/dist/sdk/schema.js +1 -1
  176. package/docs/ARCHITECTURE.md +31 -4
  177. package/docs/BUILD_AND_RELEASE_ACCEPTANCE.md +50 -1
  178. package/docs/COMMANDS.md +1 -1
  179. package/docs/EXTENSIONS.md +1 -1
  180. package/docs/README.md +1 -0
  181. package/docs/READ_OUTPUT_CONTRACTS.md +1 -1
  182. package/docs/RELEASING.md +7 -1
  183. package/docs/SDK_CONTEXT_INTEGRITY_PRIMITIVES.md +1 -1
  184. package/docs/VALIDATION_PORTABILITY.md +82 -0
  185. package/marketplace.json +2 -2
  186. package/package.json +10 -8
  187. package/packages/pm-beads/package.json +1 -1
  188. package/packages/pm-calendar/package.json +1 -1
  189. package/packages/pm-command-kit/package.json +1 -1
  190. package/packages/pm-digital-twin/package.json +1 -1
  191. package/packages/pm-governance-audit/package.json +1 -1
  192. package/packages/pm-guide-shell/extensions/guide-shell/runtime.ts +23 -17
  193. package/packages/pm-guide-shell/package.json +1 -1
  194. package/packages/pm-kanban/package.json +1 -1
  195. package/packages/pm-lifecycle-hooks/package.json +1 -1
  196. package/packages/pm-linked-test-adapters/package.json +1 -1
  197. package/packages/pm-search-advanced/package.json +1 -1
  198. package/packages/pm-templates/package.json +1 -1
  199. package/packages/pm-todos/package.json +1 -1
  200. package/packages/pm-vcs/package.json +1 -1
  201. package/plugins/pm-claude/.claude-plugin/plugin.json +1 -1
  202. package/plugins/pm-codex/.codex-plugin/plugin.json +1 -1
  203. package/scripts/build-lease.mjs +27 -0
  204. package/dist/cli/commands/activity.d.ts +0 -6
  205. package/dist/cli/commands/aggregate.d.ts +0 -2
  206. package/dist/cli/commands/append.d.ts +0 -2
  207. package/dist/cli/commands/claim.d.ts +0 -2
  208. package/dist/cli/commands/close-many.d.ts +0 -2
  209. package/dist/cli/commands/close.d.ts +0 -6
  210. package/dist/cli/commands/close.js +0 -2
  211. package/dist/cli/commands/comments.d.ts +0 -2
  212. package/dist/cli/commands/context.d.ts +0 -6
  213. package/dist/cli/commands/context.js +0 -2
  214. package/dist/cli/commands/contracts.d.ts +0 -2
  215. package/dist/cli/commands/copy.d.ts +0 -6
  216. package/dist/cli/commands/create.d.ts +0 -6
  217. package/dist/cli/commands/delete.d.ts +0 -6
  218. package/dist/cli/commands/duplicates.d.ts +0 -6
  219. package/dist/cli/commands/extension.d.ts +0 -6
  220. package/dist/cli/commands/focus.d.ts +0 -6
  221. package/dist/cli/commands/get.d.ts +0 -6
  222. package/dist/cli/commands/health.d.ts +0 -6
  223. package/dist/cli/commands/health.js +0 -2
  224. package/dist/cli/commands/history-compact.d.ts +0 -7
  225. package/dist/cli/commands/history-redact.js +0 -2
  226. package/dist/cli/commands/history.d.ts +0 -2
  227. package/dist/cli/commands/index.d.ts +0 -55
  228. package/dist/cli/commands/index.js +0 -2
  229. package/dist/cli/commands/init-agent-guidance.d.ts +0 -6
  230. package/dist/cli/commands/init-agent-guidance.js +0 -2
  231. package/dist/cli/commands/init.js +0 -2
  232. package/dist/cli/commands/learnings.d.ts +0 -2
  233. package/dist/cli/commands/lifecycle-transitions.d.ts +0 -2
  234. package/dist/cli/commands/lifecycle-transitions.js +0 -2
  235. package/dist/cli/commands/merge.d.ts +0 -8
  236. package/dist/cli/commands/merge.js +0 -2
  237. package/dist/cli/commands/notes.d.ts +0 -2
  238. package/dist/cli/commands/plan.d.ts +0 -6
  239. package/dist/cli/commands/restore.d.ts +0 -6
  240. package/dist/cli/commands/restore.js +0 -2
  241. package/dist/cli/commands/scheduling-shortcuts.d.ts +0 -6
  242. package/dist/cli/commands/scheduling-shortcuts.js +0 -2
  243. package/dist/cli/commands/schema.d.ts +0 -7
  244. package/dist/cli/commands/schema.js +0 -2
  245. package/dist/cli/commands/search.d.ts +0 -6
  246. package/dist/cli/commands/stats.d.ts +0 -6
  247. package/dist/cli/commands/telemetry.d.ts +0 -6
  248. package/dist/cli/commands/update-many.d.ts +0 -2
  249. package/dist/cli/commands/update.d.ts +0 -6
  250. package/dist/cli/commands/upgrade.d.ts +0 -2
  251. package/dist/cli/commands/upgrade.js +0 -2
  252. package/dist/cli/commands/validate.d.ts +0 -9
  253. package/dist/cli/commands/validate.js +0 -2
  254. package/dist/cli-bundle/chunks/chunk-T3AMFUCN.js +0 -2
  255. package/dist/cli-bundle/chunks/register-mutation-EVRYSU72.js +0 -20
@@ -1,2 +1,2 @@
1
- !(function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="209566d6-107e-5c01-995a-96a6dc0e40ed")}catch(e2){}})();import fs from"node:fs/promises";import path from"node:path";import{pathExists}from"../../core/fs/fs-utils.js";import{isPathWithinDirectory}from"../../core/fs/path-utils.js";import{EXIT_CODE}from"../../core/shared/constants.js";import{PmCliError}from"../../core/shared/errors.js";import{DEFAULT_EXTENSION_PRIORITY,isCanonicalPathWithinDirectory,parseExtensionManifestDocument}from"../../core/extensions/loader.js";function normalizeStringList(values){return[...new Set(values.map(value=>value.trim()).filter(value=>value.length>0))].sort((left,right)=>left.localeCompare(right))}function normalizeExtensionNameForMatch(value){return value.trim().toLowerCase()}function normalizeManagedDirectoryName(name){const normalized=name.trim().toLowerCase().replace(/[^a-z0-9._-]+/g,"-");let start=0;while(normalized[start]==="-"){start+=1}let end=normalized.length;while(end>start&&normalized[end-1]==="-"){end-=1}const directoryName=normalized.slice(start,end);if(directoryName.length===0){throw new PmCliError("Extension manifest name must resolve to a non-empty directory name.",EXIT_CODE.USAGE)}if(directoryName==="."||directoryName===".."){throw new PmCliError('Extension manifest name must not resolve to "." or "..".',EXIT_CODE.USAGE)}return directoryName}function parseExtensionManifest(raw){return parseExtensionManifestDocument(raw)}async function readGithubSourcePackageMetadata(sourceRoot){try{const packageJson=JSON.parse(await fs.readFile(path.join(sourceRoot,"package.json"),"utf8"));const packageName=typeof packageJson.name==="string"&&/^(?:@[a-z0-9._~-]+\/)?[a-z0-9._~-]+$/iu.test(packageJson.name)?packageJson.name:void 0;return{...packageName?{package_name:packageName}:{},has_build_script:["build","prepare","prepack"].some(key=>typeof packageJson.scripts?.[key]==="string")}}catch{return{has_build_script:false}}}async function missingExtensionEntryError(manifest,entryPath,context){if(context.source_kind!=="github"||typeof context.source_root!=="string"){return new PmCliError(`Extension entry file is missing at "${entryPath}".`,EXIT_CODE.USAGE)}const packageMetadata=await readGithubSourcePackageMetadata(context.source_root);const npmCommand=packageMetadata.package_name?`pm install npm:${packageMetadata.package_name}`:void 0;const source=context.source_input??context.source_root;return new PmCliError(`Extension entry "${manifest.entry}" is absent from GitHub source "${source}". pm install copies GitHub repositories without running package scripts${packageMetadata.has_build_script?", and this package declares a build or publish script":""}. ${npmCommand?`Try "${npmCommand}" if the package is published, or install a locally built directory.`:"Build the source locally and install that directory, or use its published npm: package."}`,EXIT_CODE.USAGE,{code:"github_source_entry_unbuilt",required:"Use a GitHub tree with committed runtime output, a published npm artifact, or a locally built source directory.",why:"GitHub installation is a source copy and never executes untrusted package build scripts.",examples:npmCommand?[npmCommand,`pm install ${context.source_root}`]:[`pm install ${context.source_root}`],nextSteps:npmCommand?[`Retry with ${npmCommand}.`,"Or build the repository locally, then install its directory."]:["Build the repository locally, then install its directory.","If it is published, retry with pm install npm:<package-name>."],recovery:{attempted_command:`pm install ${source}`,normalized_args:["install",source],...npmCommand?{next_best_command:npmCommand}:{}}})}async function validateExtensionDirectory(directory,context={}){const manifestPath=path.join(directory,"manifest.json");if(!await pathExists(manifestPath)){throw new PmCliError(`Extension manifest is missing at "${manifestPath}".`,EXIT_CODE.USAGE)}let parsedManifest;try{parsedManifest=JSON.parse(await fs.readFile(manifestPath,"utf8"))}catch(error){throw new PmCliError(`Failed to parse extension manifest at "${manifestPath}": ${formatManifestReadError(error)}`,EXIT_CODE.USAGE)}const manifest=parseExtensionManifest(parsedManifest);if(!manifest){throw new PmCliError(`Extension manifest at "${manifestPath}" is invalid.`,EXIT_CODE.USAGE)}const entryPath=path.resolve(directory,manifest.entry);if(!isPathWithinDirectory(directory,entryPath)){throw new PmCliError(`Extension entry "${manifest.entry}" resolves outside extension directory "${directory}".`,EXIT_CODE.USAGE)}if(!await pathExists(entryPath)){throw await missingExtensionEntryError(manifest,entryPath,context)}if(!await isCanonicalPathWithinDirectory(directory,entryPath)){throw new PmCliError(`Extension entry "${manifest.entry}" resolves outside extension directory after symlink resolution.`,EXIT_CODE.USAGE)}return{directory,manifest_path:manifestPath,entry_path:entryPath,manifest}}function formatManifestReadError(error){return error instanceof Error?error.message:String(error)}const _testOnlyExtensionShared={formatManifestReadError};export{DEFAULT_EXTENSION_PRIORITY,_testOnlyExtensionShared,isCanonicalPathWithinDirectory,normalizeExtensionNameForMatch,normalizeManagedDirectoryName,normalizeStringList,parseExtensionManifest,validateExtensionDirectory};
1
+ !(function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="decec6f3-3795-5353-bf48-75aa61dd79d4")}catch(e2){}})();import fs from"node:fs/promises";import path from"node:path";import{pathExists}from"../../core/fs/fs-utils.js";import{isPathWithinDirectory}from"../../core/fs/path-utils.js";import{EXIT_CODE}from"../../core/shared/constants.js";import{PmCliError}from"../../core/shared/errors.js";import{isCanonicalPathWithinDirectory,parseExtensionManifestDocument}from"../../core/extensions/loader.js";function normalizeStringList(values){return[...new Set(values.map(value=>value.trim()).filter(value=>value.length>0))].sort((left,right)=>left.localeCompare(right))}function normalizeExtensionNameForMatch(value){return value.trim().toLowerCase()}function normalizeManagedDirectoryName(name){const normalized=name.trim().toLowerCase().replace(/[^a-z0-9._-]+/g,"-");let start=0;while(normalized[start]==="-"){start+=1}let end=normalized.length;while(end>start&&normalized[end-1]==="-"){end-=1}const directoryName=normalized.slice(start,end);if(directoryName.length===0){throw new PmCliError("Extension manifest name must resolve to a non-empty directory name.",EXIT_CODE.USAGE)}if(directoryName==="."||directoryName===".."){throw new PmCliError('Extension manifest name must not resolve to "." or "..".',EXIT_CODE.USAGE)}return directoryName}function parseExtensionManifest(raw){return parseExtensionManifestDocument(raw)}async function readGithubSourcePackageMetadata(sourceRoot){try{const packageJson=JSON.parse(await fs.readFile(path.join(sourceRoot,"package.json"),"utf8"));const packageName=typeof packageJson.name==="string"&&/^(?:@[a-z0-9._~-]+\/)?[a-z0-9._~-]+$/iu.test(packageJson.name)?packageJson.name:void 0;return{...packageName?{package_name:packageName}:{},has_build_script:["build","prepare","prepack"].some(key=>typeof packageJson.scripts?.[key]==="string")}}catch{return{has_build_script:false}}}async function missingExtensionEntryError(manifest,entryPath,context){if(context.source_kind!=="github"||typeof context.source_root!=="string"){return new PmCliError(`Extension entry file is missing at "${entryPath}".`,EXIT_CODE.USAGE)}const packageMetadata=await readGithubSourcePackageMetadata(context.source_root);const npmCommand=packageMetadata.package_name?`pm install npm:${packageMetadata.package_name}`:void 0;const source=context.source_input??context.source_root;return new PmCliError(`Extension entry "${manifest.entry}" is absent from GitHub source "${source}". pm install copies GitHub repositories without running package scripts${packageMetadata.has_build_script?", and this package declares a build or publish script":""}. ${npmCommand?`Try "${npmCommand}" if the package is published, or install a locally built directory.`:"Build the source locally and install that directory, or use its published npm: package."}`,EXIT_CODE.USAGE,{code:"github_source_entry_unbuilt",required:"Use a GitHub tree with committed runtime output, a published npm artifact, or a locally built source directory.",why:"GitHub installation is a source copy and never executes untrusted package build scripts.",examples:npmCommand?[npmCommand,`pm install ${context.source_root}`]:[`pm install ${context.source_root}`],nextSteps:npmCommand?[`Retry with ${npmCommand}.`,"Or build the repository locally, then install its directory."]:["Build the repository locally, then install its directory.","If it is published, retry with pm install npm:<package-name>."],recovery:{attempted_command:`pm install ${source}`,normalized_args:["install",source],...npmCommand?{next_best_command:npmCommand}:{}}})}async function validateExtensionDirectory(directory,context={}){const manifestPath=path.join(directory,"manifest.json");if(!await pathExists(manifestPath)){throw new PmCliError(`Extension manifest is missing at "${manifestPath}".`,EXIT_CODE.USAGE)}let parsedManifest;try{parsedManifest=JSON.parse(await fs.readFile(manifestPath,"utf8"))}catch(error){throw new PmCliError(`Failed to parse extension manifest at "${manifestPath}": ${formatManifestReadError(error)}`,EXIT_CODE.USAGE)}const manifest=parseExtensionManifest(parsedManifest);if(!manifest){throw new PmCliError(`Extension manifest at "${manifestPath}" is invalid.`,EXIT_CODE.USAGE)}const entryPath=path.resolve(directory,manifest.entry);if(!isPathWithinDirectory(directory,entryPath)){throw new PmCliError(`Extension entry "${manifest.entry}" resolves outside extension directory "${directory}".`,EXIT_CODE.USAGE)}if(!await pathExists(entryPath)){throw await missingExtensionEntryError(manifest,entryPath,context)}if(!await isCanonicalPathWithinDirectory(directory,entryPath)){throw new PmCliError(`Extension entry "${manifest.entry}" resolves outside extension directory after symlink resolution.`,EXIT_CODE.USAGE)}return{directory,manifest_path:manifestPath,entry_path:entryPath,manifest}}function formatManifestReadError(error){return error instanceof Error?error.message:String(error)}const _testOnlyExtensionShared={formatManifestReadError};export{_testOnlyExtensionShared,isCanonicalPathWithinDirectory,normalizeExtensionNameForMatch,normalizeManagedDirectoryName,normalizeStringList,parseExtensionManifest,validateExtensionDirectory};
2
2
  //# sourceMappingURL=shared.js.map
@@ -62,6 +62,8 @@ export interface UpgradeCliResult {
62
62
  target: string;
63
63
  /** Value that configures or reports command for this contract. */
64
64
  command: string[];
65
+ /** Package-owned command migrations relevant to this CLI upgrade plan or outcome. */
66
+ migration_guidance?: string[];
65
67
  /** Value that configures or reports before version for this contract. */
66
68
  before_version?: string;
67
69
  /** Value that configures or reports after version for this contract. */
@@ -1,3 +1,3 @@
1
- !(function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="b2b646c0-92fb-5bf6-998f-37d83428335d")}catch(e2){}})();import{execFile}from"node:child_process";import path from"node:path";import{promisify}from"node:util";import{renderPmCommand}from"../command-line.js";import{readManagedExtensionState,runExtension}from"../extension.js";import{resolveExtensionRoots,pathExists,EXIT_CODE,PmCliError,resolvePmRoot,resolvePmCliVersion}from"../runtime-primitives.js";const execFileAsync=promisify(execFile);const DEFAULT_CLI_PACKAGE="@unbrained/pm-cli";const DEFAULT_TAG="latest";const PACKAGE_UPGRADE_RETRY_SCOPE_FLAGS={global:["--global"],project:[]};const _testOnly={defaultCommandRunner,isLocalNpmSpec,normalizeTarget,packageRecordMatchesTarget,resolveCliPackage,resolvePackageInstallSource,resolveRunnablePackageSource,resolveScope,resolveTag,packageCommandFor,summarize};function resolveScope(options){const projectLike=options.project===true||options.local===true||options.scope==="project";const global2=options.global===true||options.scope==="global";if(projectLike&&global2){throw new PmCliError('Options "--project/--local" and "--global" are mutually exclusive.',EXIT_CODE.USAGE)}return global2?"global":"project"}function normalizeTarget(value){return value.trim().toLowerCase()}function packageRecordMatchesTarget(record,target){const normalizedTarget=normalizeTarget(target);const values=[record.name,record.directory,record.source.input,record.source.location,record.source.package,record.source.repository,record.source.owner&&record.source.repo?`${record.source.owner}/${record.source.repo}`:void 0];return values.some(value=>typeof value==="string"&&normalizeTarget(value)===normalizedTarget)}function resolveRoots(scope,global2){const pmRoot=resolvePmRoot(process.cwd(),global2.path);const roots=resolveExtensionRoots(pmRoot,process.cwd());return{selected_root:scope==="global"?roots.global:roots.project}}async function defaultCommandRunner(command,args,options){try{const result=await execFileAsync(command,args,{cwd:options?.cwd,encoding:"utf8"});return{stdout:result.stdout,stderr:result.stderr}}catch(error){const stderr=typeof error==="object"&&error!==null&&"stderr"in error?String(error.stderr??""):"";const message=stderr.trim().length>0?stderr.trim():error instanceof Error?error.message:String(error);throw new PmCliError(`Command failed: ${command} ${args.join(" ")}
2
- ${message}`,EXIT_CODE.GENERIC_FAILURE)}}async function readCurrentVersion(){return resolvePmCliVersion(import.meta.url,["../../.."])}function resolveTag(options){return typeof options.tag==="string"&&options.tag.trim().length>0?options.tag.trim():DEFAULT_TAG}function resolveCliPackage(options){return typeof options.packageName==="string"&&options.packageName.trim().length>0?options.packageName.trim():DEFAULT_CLI_PACKAGE}async function upgradeCli(options,dryRun){const runner=options.commandRunner??defaultCommandRunner;const packageName=resolveCliPackage(options);const tag=resolveTag(options);const target=`${packageName}@${tag}`;const command=["npm","install","-g",target];if(options.repair===true){command.push("--force")}const beforeVersion=await readCurrentVersion();const planned={requested:true,status:"planned",package:packageName,target,command,before_version:beforeVersion,repair:options.repair===true};if(dryRun){return planned}try{await runner(command[0],command.slice(1));const verified=await runner("pm",["--version"]);return{...planned,status:"updated",after_version:verified.stdout.trim()||void 0}}catch(error){return{...planned,status:"failed",error:error instanceof Error?error.message:String(error)}}}function isLocalNpmSpec(spec){return path.isAbsolute(spec)||spec.startsWith(".")||spec.startsWith("..")||spec.startsWith("file:")}function resolvePackageInstallSource(source,tag){if(source.kind==="npm"){const rawSpec=source.input.startsWith("npm:")?source.input.slice("npm:".length).trim():source.input.trim();if(!isLocalNpmSpec(rawSpec)&&source.package&&source.package.trim().length>0){return`npm:${source.package.trim()}@${tag}`}return source.input.startsWith("npm:")?source.input:`npm:${source.input}`}return source.input}async function resolveRunnablePackageSource(source,tag){const installSource=resolvePackageInstallSource(source,tag);if(source.kind!=="local"){return installSource}if(await pathExists(installSource)){return installSource}if(await pathExists(source.location)){return source.location}return installSource}function packageCommandFor(source,installSource,scope,ref){const command=["pm","package","install",installSource,scope==="global"?"--global":"--project"];if(source.kind==="github"&&ref&&ref.trim().length>0){command.push("--ref",ref.trim())}return command}async function readManagedRecords(scope,global2){const roots=resolveRoots(scope,global2);const managedState=await readManagedExtensionState(roots.selected_root);return managedState.state.entries.filter(entry=>entry.scope===scope)}async function refreshManagedRecord(scope,global2,record){const records=await readManagedRecords(scope,global2);return records.find(candidate=>packageRecordMatchesTarget(candidate,record.name))??records.find(candidate=>normalizeTarget(candidate.directory)===normalizeTarget(record.directory))}async function upgradePackageRecord(record,options,global2,scope,dryRun){const tag=resolveTag(options);const installSource=await resolveRunnablePackageSource(record.source,tag);const command=packageCommandFor(record.source,installSource,scope,record.source.ref);const planned={name:record.name,directory:record.directory,scope,source:record.source,status:"planned",command,previous_version:record.manifest_version};if(dryRun){return planned}try{await runExtension(installSource,{install:true,project:scope==="project",global:scope==="global",ref:record.source.kind==="github"?record.source.ref:void 0},global2);const refreshed=await refreshManagedRecord(scope,global2,record);return{...planned,status:"updated",installed_version:refreshed?.manifest_version}}catch(error){return{...planned,status:"failed",error:error instanceof Error?error.message:String(error)}}}function summarize(cli,packages,includeCli,includePackages){const statuses=[includeCli?cli.status:void 0,...packages.map(entry=>entry.status)].filter(value=>typeof value==="string");return{requested_cli:includeCli,requested_packages:includePackages,planned:statuses.filter(status=>status==="planned").length,updated:statuses.filter(status=>status==="updated").length,skipped:statuses.filter(status=>status==="skipped").length,failed:statuses.filter(status=>status==="failed").length}}async function runUpgrade(target,options,global2){const normalizedTarget=typeof target==="string"&&target.trim().length>0?target.trim():void 0;if(options.cliOnly===true&&options.packagesOnly===true){const suggestedRetryArguments=["package","upgrade",...normalizedTarget?[normalizedTarget]:[],"--packages-only","--dry-run",...PACKAGE_UPGRADE_RETRY_SCOPE_FLAGS[resolveScope(options)]];throw new PmCliError('Options "--cli-only" and "--packages-only" are mutually exclusive.',EXIT_CODE.USAGE,{code:"package_upgrade_modes_mutually_exclusive",recovery:{suggested_retry:renderPmCommand(suggestedRetryArguments),suggested_retry_args:suggestedRetryArguments}})}const scope=resolveScope(options);const dryRun=options.dryRun===true;if(options.cliOnly===true&&normalizedTarget){throw new PmCliError('A package target cannot be used with "--cli-only".',EXIT_CODE.USAGE)}const includeCli=options.packagesOnly===true||normalizedTarget?false:true;const includePackages=options.cliOnly===true?false:true;const cli=includeCli?await upgradeCli(options,dryRun):{requested:false,status:"skipped",package:resolveCliPackage(options),target:`${resolveCliPackage(options)}@${resolveTag(options)}`,command:["npm","install","-g",`${resolveCliPackage(options)}@${resolveTag(options)}`],repair:options.repair===true,reason:"not_requested"};let packageRecords=includePackages?await readManagedRecords(scope,global2):[];if(normalizedTarget){packageRecords=packageRecords.filter(entry=>packageRecordMatchesTarget(entry,normalizedTarget));if(packageRecords.length===0){throw new PmCliError(`Managed package "${normalizedTarget}" was not found in ${scope} scope.`,EXIT_CODE.NOT_FOUND)}}const packages=[];for(const record of packageRecords){packages.push(await upgradePackageRecord(record,options,global2,scope,dryRun))}const summary=summarize(cli,packages,includeCli,includePackages);return{ok:summary.failed===0,action:"upgrade",dry_run:dryRun,scope,target:normalizedTarget,cli,packages,summary}}export{_testOnly,runUpgrade};
1
+ !(function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="4bc28901-e70b-5a76-80bb-762ed8227e5f")}catch(e2){}})();import{execFile}from"node:child_process";import path from"node:path";import{promisify}from"node:util";import{renderPmCommand}from"../command-line.js";import{readManagedExtensionState,runExtension}from"../extension.js";import{resolveExtensionRoots,pathExists,EXIT_CODE,PmCliError,resolvePmRoot,resolvePmCliVersion}from"../runtime-primitives.js";const execFileAsync=promisify(execFile);const DEFAULT_CLI_PACKAGE="@unbrained/pm-cli";const DEFAULT_TAG="latest";const PACKAGE_UPGRADE_RETRY_SCOPE_FLAGS={global:["--global"],project:[]};const _testOnly={defaultCommandRunner,isLocalNpmSpec,normalizeTarget,packageRecordMatchesTarget,resolveCliPackage,resolvePackageInstallSource,resolveRunnablePackageSource,resolveScope,resolveTag,packageCommandFor,summarize};function resolveScope(options){const projectLike=options.project===true||options.local===true||options.scope==="project";const global2=options.global===true||options.scope==="global";if(projectLike&&global2){throw new PmCliError('Options "--project/--local" and "--global" are mutually exclusive.',EXIT_CODE.USAGE)}return global2?"global":"project"}function normalizeTarget(value){return value.trim().toLowerCase()}function packageRecordMatchesTarget(record,target){const normalizedTarget=normalizeTarget(target);const values=[record.name,record.directory,record.source.input,record.source.location,record.source.package,record.source.repository,record.source.owner&&record.source.repo?`${record.source.owner}/${record.source.repo}`:void 0];return values.some(value=>typeof value==="string"&&normalizeTarget(value)===normalizedTarget)}function resolveRoots(scope,global2){const pmRoot=resolvePmRoot(process.cwd(),global2.path);const roots=resolveExtensionRoots(pmRoot,process.cwd());return{selected_root:scope==="global"?roots.global:roots.project}}async function defaultCommandRunner(command,args,options){try{const result=await execFileAsync(command,args,{cwd:options?.cwd,encoding:"utf8"});return{stdout:result.stdout,stderr:result.stderr}}catch(error){const stderr=typeof error==="object"&&error!==null&&"stderr"in error?String(error.stderr??""):"";const message=stderr.trim().length>0?stderr.trim():error instanceof Error?error.message:String(error);throw new PmCliError(`Command failed: ${command} ${args.join(" ")}
2
+ ${message}`,EXIT_CODE.GENERIC_FAILURE)}}function resolveTag(options){return typeof options.tag==="string"&&options.tag.trim().length>0?options.tag.trim():DEFAULT_TAG}function resolveCliPackage(options){return typeof options.packageName==="string"&&options.packageName.trim().length>0?options.packageName.trim():DEFAULT_CLI_PACKAGE}async function upgradeCli(options,dryRun){const runner=options.commandRunner??defaultCommandRunner;const packageName=resolveCliPackage(options);const tag=resolveTag(options);const target=`${packageName}@${tag}`;const command=["npm","install","-g",target];if(options.repair===true){command.push("--force")}const beforeVersion=resolvePmCliVersion(import.meta.url,["../../.."]);const planned={requested:true,status:"planned",package:packageName,target,command,before_version:beforeVersion,...packageName===DEFAULT_CLI_PACKAGE?{migration_guidance:["Calendar scheduling commands are package-owned. If calendar is absent, run pm package install calendar --project; use pm calendar meet, pm calendar event, or pm calendar remind."]}:{},repair:options.repair===true};if(dryRun){return planned}try{await runner(command[0],command.slice(1));const verified=await runner("pm",["--version"]);return{...planned,status:"updated",after_version:verified.stdout.trim()||void 0}}catch(error){return{...planned,status:"failed",error:error instanceof Error?error.message:String(error)}}}function isLocalNpmSpec(spec){return path.isAbsolute(spec)||spec.startsWith(".")||spec.startsWith("..")||spec.startsWith("file:")}function resolvePackageInstallSource(source,tag){if(source.kind==="npm"){const rawSpec=source.input.startsWith("npm:")?source.input.slice("npm:".length).trim():source.input.trim();if(!isLocalNpmSpec(rawSpec)&&source.package&&source.package.trim().length>0){return`npm:${source.package.trim()}@${tag}`}return source.input.startsWith("npm:")?source.input:`npm:${source.input}`}return source.input}async function resolveRunnablePackageSource(source,tag){const installSource=resolvePackageInstallSource(source,tag);if(source.kind!=="local"){return installSource}if(await pathExists(installSource)){return installSource}if(await pathExists(source.location)){return source.location}return installSource}function packageCommandFor(source,installSource,scope,ref){const command=["pm","package","install",installSource,scope==="global"?"--global":"--project"];if(source.kind==="github"&&ref&&ref.trim().length>0){command.push("--ref",ref.trim())}return command}async function readManagedRecords(scope,global2){const roots=resolveRoots(scope,global2);const managedState=await readManagedExtensionState(roots.selected_root);return managedState.state.entries.filter(entry=>entry.scope===scope)}async function refreshManagedRecord(scope,global2,record){const records=await readManagedRecords(scope,global2);return records.find(candidate=>packageRecordMatchesTarget(candidate,record.name))??records.find(candidate=>normalizeTarget(candidate.directory)===normalizeTarget(record.directory))}async function upgradePackageRecord(record,options,global2,scope,dryRun){const tag=resolveTag(options);const installSource=await resolveRunnablePackageSource(record.source,tag);const command=packageCommandFor(record.source,installSource,scope,record.source.ref);const planned={name:record.name,directory:record.directory,scope,source:record.source,status:"planned",command,previous_version:record.manifest_version};if(dryRun){return planned}try{await runExtension(installSource,{install:true,project:scope==="project",global:scope==="global",ref:record.source.kind==="github"?record.source.ref:void 0},global2);const refreshed=await refreshManagedRecord(scope,global2,record);return{...planned,status:"updated",installed_version:refreshed?.manifest_version}}catch(error){return{...planned,status:"failed",error:error instanceof Error?error.message:String(error)}}}function summarize(cli,packages,includeCli,includePackages){const statuses=[includeCli?cli.status:void 0,...packages.map(entry=>entry.status)].filter(value=>typeof value==="string");return{requested_cli:includeCli,requested_packages:includePackages,planned:statuses.filter(status=>status==="planned").length,updated:statuses.filter(status=>status==="updated").length,skipped:statuses.filter(status=>status==="skipped").length,failed:statuses.filter(status=>status==="failed").length}}async function runUpgrade(target,options,global2){const normalizedTarget=typeof target==="string"&&target.trim().length>0?target.trim():void 0;if(options.cliOnly===true&&options.packagesOnly===true){const suggestedRetryArguments=["package","upgrade",...normalizedTarget?[normalizedTarget]:[],"--packages-only","--dry-run",...PACKAGE_UPGRADE_RETRY_SCOPE_FLAGS[resolveScope(options)]];throw new PmCliError('Options "--cli-only" and "--packages-only" are mutually exclusive.',EXIT_CODE.USAGE,{code:"package_upgrade_modes_mutually_exclusive",recovery:{suggested_retry:renderPmCommand(suggestedRetryArguments),suggested_retry_args:suggestedRetryArguments}})}const scope=resolveScope(options);const dryRun=options.dryRun===true;if(options.cliOnly===true&&normalizedTarget){throw new PmCliError('A package target cannot be used with "--cli-only".',EXIT_CODE.USAGE)}const includeCli=options.packagesOnly===true||normalizedTarget?false:true;const includePackages=options.cliOnly===true?false:true;const cli=includeCli?await upgradeCli(options,dryRun):{requested:false,status:"skipped",package:resolveCliPackage(options),target:`${resolveCliPackage(options)}@${resolveTag(options)}`,command:["npm","install","-g",`${resolveCliPackage(options)}@${resolveTag(options)}`],repair:options.repair===true,reason:"not_requested"};let packageRecords=includePackages?await readManagedRecords(scope,global2):[];if(normalizedTarget){packageRecords=packageRecords.filter(entry=>packageRecordMatchesTarget(entry,normalizedTarget));if(packageRecords.length===0){throw new PmCliError(`Managed package "${normalizedTarget}" was not found in ${scope} scope.`,EXIT_CODE.NOT_FOUND)}}const packages=[];for(const record of packageRecords){packages.push(await upgradePackageRecord(record,options,global2,scope,dryRun))}const summary=summarize(cli,packages,includeCli,includePackages);return{ok:summary.failed===0,action:"upgrade",dry_run:dryRun,scope,target:normalizedTarget,cli,packages,summary}}export{_testOnly,runUpgrade};
3
3
  //# sourceMappingURL=upgrade.js.map