@unbrained/pm-cli 2026.8.5 → 2026.8.6
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/.claude-plugin/marketplace.json +2 -2
- package/CHANGELOG.md +14 -0
- package/dist/cli/main.js +12 -37
- package/dist/cli/register-setup.d.ts +1 -1
- package/dist/cli/register-setup.js +46 -20
- package/dist/cli-bundle/bundle-manifest.json +391 -391
- package/dist/cli-bundle/chunks/append-XAJ5Z4XS.js +2 -0
- package/dist/cli-bundle/chunks/{chunk-2WFXWAYX.js → chunk-343QETLI.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-RKAVWO3O.js → chunk-3KFVGGRE.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-VCKLFEUN.js → chunk-3ZJRFYY2.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-UZBWIUYD.js → chunk-4AVFKHHC.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-BPELKUQD.js → chunk-4OVGQW22.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-54FNT7U2.js → chunk-5PBP2ZP3.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-NY4T3JWN.js → chunk-5ZKQPA44.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-4YUBDMQM.js → chunk-A3XQ7VPU.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-OPVH7SKD.js → chunk-AJE3AHPD.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-V3774P7D.js → chunk-AOBDLU4T.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-VN5VITU3.js → chunk-AYRUGRNS.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-HWRRMBJO.js → chunk-BP6EMEDP.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-ZYHOB3SN.js → chunk-C3YABSJK.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-43HQQI6S.js → chunk-CA3BURYF.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-E2RKBKWB.js → chunk-D7I3TUGV.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-4VN6GS4U.js → chunk-DQGJ2RWT.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-YSO3YFZ4.js → chunk-DWOAOZHZ.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-Q35VBGOQ.js → chunk-E7BFPLUZ.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-LKDGK44W.js → chunk-F4NREH3G.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-OMXVBQ2N.js → chunk-FDBRXV25.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-3FTILRJ2.js → chunk-GU3TSEHD.js} +2 -2
- package/dist/cli-bundle/chunks/chunk-HS7OVAUN.js +164 -0
- package/dist/cli-bundle/chunks/{chunk-OTHLDSFP.js → chunk-JFZIS6JF.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-7A5OT5J2.js → chunk-JQ4NZ5EB.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-BXQLRKWF.js → chunk-L6LGKJX3.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-CSI3WS5I.js → chunk-M357ZCOR.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-5ZBOIPGP.js → chunk-M4VEE3FK.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-7C4PTJG6.js → chunk-MCS73BKB.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-A62CYISG.js → chunk-MDTH7SAE.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-HNFD72UK.js → chunk-OXY3SJ3N.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-L3AZOELJ.js → chunk-PECV7L5T.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-DXDREUXT.js → chunk-Q3VOP62W.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-UP7DTVMD.js → chunk-QJ7C3JIW.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-42E7YPLG.js → chunk-R6LSRGPS.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-MHK6LIWE.js → chunk-R6RKEYYW.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-UN66FZRO.js → chunk-RAFUN7IX.js} +3 -3
- package/dist/cli-bundle/chunks/chunk-RUAU5OSH.js +2 -0
- package/dist/cli-bundle/chunks/chunk-SD3YXU2U.js +56 -0
- package/dist/cli-bundle/chunks/{chunk-SSF4PIUR.js → chunk-SV3YQ4RY.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-V3EUXXOF.js → chunk-SVV3DQES.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-45G53IU4.js → chunk-SXECIECW.js} +2 -2
- package/dist/cli-bundle/chunks/chunk-T45OHXDW.js +8 -0
- package/dist/cli-bundle/chunks/{chunk-PMXJEU3F.js → chunk-TPKDJ5WL.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-M72BKL5Q.js → chunk-UVVXHGYS.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-WRL4KNDL.js → chunk-V663653R.js} +19 -19
- package/dist/cli-bundle/chunks/{chunk-R546TPDE.js → chunk-WSI5KZQJ.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-6MSQJOTG.js → chunk-XPOQQJTX.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-XCEZYMNI.js → chunk-YCCDXBNU.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-LN2WFEU4.js → chunk-ZFBWCKYF.js} +2 -2
- package/dist/cli-bundle/chunks/close-DI66JMSB.js +2 -0
- package/dist/cli-bundle/chunks/close-many-VFKT6U3O.js +2 -0
- package/dist/cli-bundle/chunks/comments-E73HIEZJ.js +2 -0
- package/dist/cli-bundle/chunks/copy-WBYVLCPC.js +2 -0
- package/dist/cli-bundle/chunks/{create-XLKTXTUF.js → create-TG67IVFI.js} +2 -2
- package/dist/cli-bundle/chunks/delete-6XKUVVQN.js +2 -0
- package/dist/cli-bundle/chunks/{deps-ITTY3GIC.js → deps-AJUGP2OH.js} +2 -2
- package/dist/cli-bundle/chunks/{docs-W4OSRTYR.js → docs-QOCLDRKJ.js} +2 -2
- package/dist/cli-bundle/chunks/{files-EOK4AZI4.js → files-3ST5TY64.js} +2 -2
- package/dist/cli-bundle/chunks/focus-R2AWS63Y.js +2 -0
- package/dist/cli-bundle/chunks/{history-compact-7UGTMLL3.js → history-compact-7BJFML4S.js} +2 -2
- package/dist/cli-bundle/chunks/{history-redact-4DZRMD6Z.js → history-redact-WJN3HYXR.js} +2 -2
- package/dist/cli-bundle/chunks/{history-repair-UPOSZW5R.js → history-repair-XDNZUB7F.js} +2 -2
- package/dist/cli-bundle/chunks/{learnings-GMRNCBS3.js → learnings-SZMUPVNA.js} +2 -2
- package/dist/cli-bundle/chunks/{profile-2MUUMHRE.js → profile-KL53JIAC.js} +2 -2
- package/dist/cli-bundle/chunks/{register-list-query-LR3SQ5ZF.js → register-list-query-QH7ONPKU.js} +2 -2
- package/dist/cli-bundle/chunks/{register-mutation-SUOHFVWM.js → register-mutation-OCRQNZK4.js} +3 -3
- package/dist/cli-bundle/chunks/{register-operations-ARRRKOVN.js → register-operations-HIBJXRGB.js} +2 -2
- package/dist/cli-bundle/chunks/register-setup-QWBQ6HBS.js +2 -0
- package/dist/cli-bundle/chunks/restore-FXA5QPM7.js +2 -0
- package/dist/cli-bundle/chunks/{schema-FJ4EA3XF.js → schema-QJ27OTRV.js} +2 -2
- package/dist/cli-bundle/chunks/update-7GBO4SXG.js +2 -0
- package/dist/cli-bundle/chunks/update-many-VF6ZKQUO.js +2 -0
- package/dist/cli-bundle/focused-chunks/{chunk-B7LJWAZE.js → chunk-27DK4A5O.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-SV3O7TSH.js → chunk-4JC3AOGS.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-G6ETT4QK.js → chunk-6KDHXURF.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-PG2RIZBX.js → chunk-74CWP3A4.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-Y4LDYLLT.js → chunk-7AZDTGPA.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-7YTZ7A4E.js +2 -0
- package/dist/cli-bundle/focused-chunks/{chunk-A7BJ5SS6.js → chunk-CL3NB7VW.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-EAXXF2HW.js +4 -0
- package/dist/cli-bundle/focused-chunks/{chunk-UIL2M2NA.js → chunk-EYO4F74Z.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-7J5TUBUJ.js → chunk-GEYU23YS.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-WEM2E2PE.js → chunk-GIERI4YU.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-WVIVUWVL.js → chunk-GSW2Y7VZ.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-VLYOEYML.js → chunk-LKQXXO62.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-MJ7HWSFK.js → chunk-MBBMTDD3.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-PIMMYG7Q.js → chunk-ME4XVOBJ.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-IPWSFADF.js → chunk-N7QN3NE6.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-W7BJEWHX.js → chunk-QL5H3AQH.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-TQMFQYXR.js +29 -0
- package/dist/cli-bundle/focused-chunks/{chunk-RUR5I3TK.js → chunk-XNVXIQ4B.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-FGKY4MBE.js → chunk-YHDCGUIW.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-QVHKCI4T.js → chunk-YLPZHWX7.js} +2 -2
- package/dist/cli-bundle/main.js +13 -13
- package/dist/cli-bundle/sdk-authoring.js +1 -1
- package/dist/cli-bundle/sdk-contracts.js +1 -1
- package/dist/cli-bundle/sdk-core.js +25 -25
- package/dist/cli-bundle/sdk-governance.js +1 -1
- package/dist/cli-bundle/sdk-graph.js +1 -1
- package/dist/cli-bundle/sdk-merge.js +1 -1
- package/dist/cli-bundle/sdk-query.js +1 -1
- package/dist/cli-bundle/sdk-runtime.js +1 -1
- package/dist/cli-bundle/sdk-testing.js +1 -1
- package/dist/cli-bundle/sdk.js +1 -1
- package/dist/core/extensions/activation-summary.d.ts +4 -0
- package/dist/core/extensions/activation-summary.js +5 -2
- package/dist/core/extensions/contribution-inventory.d.ts +1 -0
- package/dist/core/extensions/contribution-inventory.js +35 -2
- package/dist/core/extensions/extension-hook-runtime.js +5 -3
- package/dist/core/extensions/extension-types.d.ts +18 -1
- package/dist/core/extensions/extension-types.js +2 -2
- package/dist/core/extensions/loader.js +5 -13
- package/dist/core/extensions/preflight-ownership.d.ts +5 -0
- package/dist/core/extensions/preflight-ownership.js +42 -0
- package/dist/sdk/cli-contracts/flag-contracts.d.ts +2 -0
- package/dist/sdk/cli-contracts/flag-contracts.js +8 -2
- package/dist/sdk/cli-contracts/runtime-contracts.js +4 -3
- package/dist/sdk/cli-contracts.d.ts +1 -1
- package/dist/sdk/cli-contracts.js +3 -3
- package/dist/sdk/compose.d.ts +2 -2
- package/dist/sdk/compose.js +7 -2
- package/dist/sdk/define.d.ts +3 -1
- package/dist/sdk/define.js +3 -8
- package/dist/sdk/extension/install-sources.d.ts +43 -5
- package/dist/sdk/extension/install-sources.js +36 -2
- package/dist/sdk/extension/migrations.d.ts +114 -0
- package/dist/sdk/extension/migrations.js +175 -0
- package/dist/sdk/extension/scaffold.js +14 -9
- package/dist/sdk/extension/source-resolution.d.ts +50 -0
- package/dist/sdk/extension/source-resolution.js +66 -0
- package/dist/sdk/extension.d.ts +5 -1
- package/dist/sdk/extension.js +24 -26
- package/dist/sdk/governance/health.js +11 -2
- package/dist/sdk/index.d.ts +6 -2
- package/dist/sdk/index.js +8 -4
- package/dist/sdk/package-migrations.d.ts +10 -0
- package/dist/sdk/package-migrations.js +21 -0
- package/dist/sdk/runtime.d.ts +2 -0
- package/dist/sdk/runtime.js +6 -2
- package/docs/COMMANDS.md +9 -0
- package/docs/EXTENSIONS.md +2 -2
- package/docs/EXTENSION_LIFECYCLE.md +46 -0
- package/docs/README.md +1 -0
- package/docs/RELEASING.md +33 -20
- package/docs/SDK.md +31 -3
- package/marketplace.json +2 -2
- package/package.json +3 -3
- package/packages/pm-beads/package.json +1 -1
- package/packages/pm-calendar/package.json +1 -1
- package/packages/pm-command-kit/package.json +1 -1
- package/packages/pm-digital-twin/package.json +1 -1
- package/packages/pm-governance-audit/package.json +1 -1
- package/packages/pm-guide-shell/package.json +1 -1
- package/packages/pm-kanban/package.json +1 -1
- package/packages/pm-lifecycle-hooks/package.json +1 -1
- package/packages/pm-linked-test-adapters/package.json +1 -1
- package/packages/pm-search-advanced/package.json +1 -1
- package/packages/pm-templates/package.json +1 -1
- package/packages/pm-todos/package.json +1 -1
- package/packages/pm-vcs/package.json +1 -1
- package/plugins/pm-claude/.claude-plugin/plugin.json +1 -1
- package/plugins/pm-codex/.codex-plugin/plugin.json +1 -1
- package/sdk/public-surface.json +218 -20
- package/dist/cli-bundle/chunks/append-VXXGOXSG.js +0 -2
- package/dist/cli-bundle/chunks/chunk-EGJ4JTUG.js +0 -55
- package/dist/cli-bundle/chunks/chunk-FPBQHMFT.js +0 -8
- package/dist/cli-bundle/chunks/chunk-GE4KCSZP.js +0 -164
- package/dist/cli-bundle/chunks/chunk-YEWNL576.js +0 -2
- package/dist/cli-bundle/chunks/close-VZ3OQPN5.js +0 -2
- package/dist/cli-bundle/chunks/close-many-SB4TI27P.js +0 -2
- package/dist/cli-bundle/chunks/comments-BIF3Q4KY.js +0 -2
- package/dist/cli-bundle/chunks/copy-6AI5Z57X.js +0 -2
- package/dist/cli-bundle/chunks/delete-ZY2VHQTP.js +0 -2
- package/dist/cli-bundle/chunks/focus-DLBNWL7L.js +0 -2
- package/dist/cli-bundle/chunks/register-setup-O6AYP6NP.js +0 -2
- package/dist/cli-bundle/chunks/restore-ZVCVHTB5.js +0 -2
- package/dist/cli-bundle/chunks/update-YHV52CSS.js +0 -2
- package/dist/cli-bundle/chunks/update-many-M6YHVNXM.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-BIMTMOS7.js +0 -4
- package/dist/cli-bundle/focused-chunks/chunk-GJ2TG2CW.js +0 -28
- package/dist/cli-bundle/focused-chunks/chunk-N5XU5UVK.js +0 -2
|
@@ -6,14 +6,14 @@
|
|
|
6
6
|
},
|
|
7
7
|
"metadata": {
|
|
8
8
|
"description": "Official marketplace for pm CLI — native git-based project management for Claude Code and AI coding agents.",
|
|
9
|
-
"version": "2026.8.
|
|
9
|
+
"version": "2026.8.6"
|
|
10
10
|
},
|
|
11
11
|
"plugins": [
|
|
12
12
|
{
|
|
13
13
|
"name": "pm-claude",
|
|
14
14
|
"source": "./plugins/pm-claude",
|
|
15
15
|
"description": "Native pm CLI integration for Claude Code — 28 MCP tools, 5 workflow skills, 14 slash commands, 4 subagents, hybrid TUI task tracking, session context injection, and coordination subagents for git-based project management without leaving Claude Code.",
|
|
16
|
-
"version": "2026.8.
|
|
16
|
+
"version": "2026.8.6",
|
|
17
17
|
"author": {
|
|
18
18
|
"name": "unbrained",
|
|
19
19
|
"url": "https://github.com/unbraind/pm-cli"
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 2026.8.6 - 2026-08-06
|
|
4
|
+
|
|
5
|
+
### Fixed
|
|
6
|
+
|
|
7
|
+
- GH-909: executable extension migration application and remediation contract ([pm-ig5cfe](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/issues/pm-ig5cfe.toon))
|
|
8
|
+
- GH-908: explicit package-source identity and bare-name ambiguity diagnostics ([pm-495lkc](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/issues/pm-495lkc.toon))
|
|
9
|
+
- GH-907: preflight override ownership and statically disjoint command scopes ([pm-miy5k6](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/issues/pm-miy5k6.toon))
|
|
10
|
+
- Release ratchet verdicts are a property of the working copy, not the commit: gitignored installs and clone-local git config decide three populations, so an identical commit passes locally and fails in CI ([pm-fr4dg8](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/issues/pm-fr4dg8.toon))
|
|
11
|
+
- Exact-tag Release recovery must bootstrap tracker gates and publish an unpublished immutable tag from its tagged source ([pm-lwnifd](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/issues/pm-lwnifd.toon))
|
|
12
|
+
|
|
13
|
+
### Other
|
|
14
|
+
|
|
15
|
+
- Refresh compatible 2026-08-05 TypeScript-ESLint and Unicorn quality tooling ([pm-7gxbl8](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/chores/pm-7gxbl8.toon))
|
|
16
|
+
|
|
3
17
|
## 2026.8.5 - 2026-08-05
|
|
4
18
|
|
|
5
19
|
### Fixed
|
package/dist/cli/main.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* @module cli/main
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
!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]="
|
|
6
|
+
!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]="a16a4e5c-eaa5-59fd-a1ba-b5752e29ec47")}catch(e){}}();
|
|
7
7
|
import { Command } from "commander";
|
|
8
8
|
import { activateExtensions, clearActiveExtensionHooks, createCoreCommandHookContext, resetActiveExtensionRuntimeState, createEmptyExtensionRegistrationRegistry, discoverExtensions, getActiveCommandResult, getActiveExtensionRegistrations, loadExtensions, consumeAfterCommandAffectedItems, runActiveCommandHandler, runActiveParserOverride, runActivePreflightOverride, runAfterCommandHooks, runBeforeCommandHooks, setActiveCommandResult, setActiveCommandContext, setActiveExtensionCommands, setActiveExtensionHooks, setActiveExtensionParsers, setActiveExtensionPreflight, setActiveExtensionRegistrations, setActiveExtensionRenderers, setActiveExtensionServices, pathExists, resolvePmCliVersion, resolvePmPackageRootFromModule, resolveItemTypeRegistry, resolveRuntimeFieldRegistry, EXIT_CODE, resolveTelemetryErrorCategory, PmCliError, asRecordOrNull, printError, printResult, maybeRunFirstUseTelemetryPrompt, emitTelemetryErrorEvent, startTelemetryCommand, deriveTelemetryCommandResolution, sentryCaptureCliError, sentryFinishCommandSpan, sentryFlush, sentryLogCliUsageError, sentrySetCommandContext, sentryStartCommandSpan, ensureSentryInit, getSettingsPath, resolvePmRoot, readSettings, readSettingsWithMetadata, runWithWorkspaceHarnessSignalDescriptors, createLazyModule, } from "../sdk/runtime-primitives.js";
|
|
9
9
|
import { resolveSubcommandFlagContractsForCommand } from "../sdk/cli-contracts.js";
|
|
@@ -20,7 +20,8 @@ import { normalizeExtensionCommandPath, collectDynamicExtensionFlagHelpByCommand
|
|
|
20
20
|
import { parseBootstrapGlobalOptions, applyBootstrapPagerPolicy, parseBootstrapHelpRequest, parseBootstrapCommandName, normalizeBootstrapInvocation, stripGlobalBootstrapTokens, } from "./bootstrap-args.js";
|
|
21
21
|
import { applyInvocationAuthorOverride } from "../sdk/invocation-author.js";
|
|
22
22
|
import { createPmCliProgram } from "../sdk/cli-program.js";
|
|
23
|
-
import { collectMandatoryMigrationBlockers, enforceMandatoryMigrationWriteGate, enforceItemFormatWriteGateAndPreflightMigration, enforceMutationGuardPreflight,
|
|
23
|
+
import { collectMandatoryMigrationBlockers, enforceMandatoryMigrationWriteGate, enforceItemFormatWriteGateAndPreflightMigration, enforceMutationGuardPreflight, } from "./migration-gates.js";
|
|
24
|
+
import { runExtensionMigrations } from "../sdk/extension/migrations.js";
|
|
24
25
|
import { appendCommanderExtensionFailures, isKnownHelpCommandPath, formatCommanderUsageMessage, formatCommanderUsageJson, resolveCommanderUsageContext, resolveUnknownCommanderToken, } from "./commander-usage.js";
|
|
25
26
|
import { loadExtensionRecoveryFailures, loadUnknownCommandRecoveryFailures } from "./extension-recovery.js";
|
|
26
27
|
import { maybeRenderBootstrapJsonHelp, attachCreateUpdatePolicyHelpText } from "./help-json-payload.js";
|
|
@@ -1197,40 +1198,14 @@ async function loadRuntimeExtensionCommandDescriptorsForRecovery(pmRoot) {
|
|
|
1197
1198
|
return snapshot ? new Map(snapshot.commandDescriptors) : activeRuntimeExtensionCommandDescriptors;
|
|
1198
1199
|
}
|
|
1199
1200
|
async function executeRegisteredRuntimeMigrations(migrations, pmRoot) {
|
|
1200
|
-
const
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
const run = runtimeDefinition.run;
|
|
1209
|
-
if (typeof run !== "function") {
|
|
1210
|
-
continue;
|
|
1211
|
-
}
|
|
1212
|
-
const migrationId = resolveMigrationId(migration.definition, index);
|
|
1213
|
-
try {
|
|
1214
|
-
await Promise.resolve(run({
|
|
1215
|
-
id: migrationId,
|
|
1216
|
-
command: "migration",
|
|
1217
|
-
layer: migration.layer,
|
|
1218
|
-
extension: migration.name,
|
|
1219
|
-
pm_root: pmRoot,
|
|
1220
|
-
status,
|
|
1221
|
-
}));
|
|
1222
|
-
migration.definition.status = "applied";
|
|
1223
|
-
delete migration.definition.reason;
|
|
1224
|
-
delete migration.definition.error;
|
|
1225
|
-
delete migration.definition.message;
|
|
1226
|
-
}
|
|
1227
|
-
catch (error) {
|
|
1228
|
-
migration.definition.status = "failed";
|
|
1229
|
-
migration.definition.reason = describeUnknownError(error);
|
|
1230
|
-
warnings.push(`extension_migration_failed:${migration.layer}:${migration.name}:${migrationId}`);
|
|
1231
|
-
}
|
|
1232
|
-
}
|
|
1233
|
-
return warnings;
|
|
1201
|
+
const result = await runExtensionMigrations({
|
|
1202
|
+
pmRoot,
|
|
1203
|
+
migrations,
|
|
1204
|
+
author: "pm-extension-migration",
|
|
1205
|
+
});
|
|
1206
|
+
return result.migrations
|
|
1207
|
+
.filter((migration) => migration.outcome === "failed")
|
|
1208
|
+
.map((migration) => `extension_migration_failed:${migration.layer}:${migration.extension}:${migration.id}`);
|
|
1234
1209
|
}
|
|
1235
1210
|
/* c8 ignore start */
|
|
1236
1211
|
/** Build one host-bound extension SDK using the command's resolved author. */
|
|
@@ -2476,4 +2451,4 @@ export const _testOnly = {
|
|
|
2476
2451
|
wrapThrownErrorForSentry,
|
|
2477
2452
|
};
|
|
2478
2453
|
//# sourceMappingURL=main.js.map
|
|
2479
|
-
//# debugId=
|
|
2454
|
+
//# debugId=a16a4e5c-eaa5-59fd-a1ba-b5752e29ec47
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Provides CLI runtime support for Register Setup.
|
|
5
5
|
*/
|
|
6
6
|
import type { Command } from "commander";
|
|
7
|
-
type ExtensionSubcommandAction = "init" | "install" | "uninstall" | "explore" | "manage" | "describe" | "reload" | "doctor" | "catalog" | "adopt" | "adopt-all" | "activate" | "deactivate";
|
|
7
|
+
type ExtensionSubcommandAction = "init" | "install" | "uninstall" | "explore" | "manage" | "describe" | "reload" | "doctor" | "catalog" | "adopt" | "adopt-all" | "activate" | "deactivate" | "migrate";
|
|
8
8
|
type LifecycleCommandVocabulary = "extension" | "package";
|
|
9
9
|
declare function normalizeExtensionOptions(options: Record<string, unknown>, forcedAction?: ExtensionSubcommandAction, vocabulary?: LifecycleCommandVocabulary): Record<string, unknown>;
|
|
10
10
|
/** Internal setup helpers exposed only for deterministic unit coverage. */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
!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]="
|
|
2
|
+
!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]="d498a64c-9680-52a9-981d-4ce86949784d")}catch(e){}}();
|
|
3
3
|
import fs from "node:fs/promises";
|
|
4
4
|
import path from "node:path";
|
|
5
5
|
import { EXIT_CODE, PmCliError, } from "../sdk/runtime-primitives.js";
|
|
@@ -10,6 +10,22 @@ import { renderExtensionDescribeMarkdown, } from "./commands/extension/describe.
|
|
|
10
10
|
import { runConfig } from "./commands/config.js";
|
|
11
11
|
import { runInit, summarizeInitResult } from "./commands/init.js";
|
|
12
12
|
import { runUpgrade } from "./commands/upgrade.js";
|
|
13
|
+
const EXTENSION_ACTION_OPTION_KEYS = {
|
|
14
|
+
init: "init",
|
|
15
|
+
install: "install",
|
|
16
|
+
uninstall: "uninstall",
|
|
17
|
+
explore: "explore",
|
|
18
|
+
manage: "manage",
|
|
19
|
+
describe: "describe",
|
|
20
|
+
reload: "reload",
|
|
21
|
+
doctor: "doctor",
|
|
22
|
+
catalog: "catalog",
|
|
23
|
+
adopt: "adopt",
|
|
24
|
+
"adopt-all": "adoptAll",
|
|
25
|
+
activate: "activate",
|
|
26
|
+
deactivate: "deactivate",
|
|
27
|
+
migrate: "migrate",
|
|
28
|
+
};
|
|
13
29
|
/** Normalize the repeatable scaffold capability selector without losing conflicting intent. */
|
|
14
30
|
function resolveScaffoldCapability(options) {
|
|
15
31
|
const rawCapability = options.capability;
|
|
@@ -29,33 +45,36 @@ function resolveScaffoldCapability(options) {
|
|
|
29
45
|
return capabilities[0];
|
|
30
46
|
}
|
|
31
47
|
function normalizeExtensionOptions(options, forcedAction, vocabulary = "extension") {
|
|
32
|
-
const
|
|
33
|
-
|
|
48
|
+
const normalizedOptions = { ...options };
|
|
49
|
+
if (forcedAction !== undefined) {
|
|
50
|
+
normalizedOptions[EXTENSION_ACTION_OPTION_KEYS[forcedAction]] = true;
|
|
51
|
+
}
|
|
52
|
+
const readBoolean = (...keys) => keys.some((key) => normalizedOptions[key] === true);
|
|
34
53
|
const readString = (...keys) => {
|
|
35
54
|
for (const key of keys) {
|
|
36
|
-
if (typeof
|
|
37
|
-
return
|
|
55
|
+
if (typeof normalizedOptions[key] === "string") {
|
|
56
|
+
return normalizedOptions[key];
|
|
38
57
|
}
|
|
39
58
|
}
|
|
40
59
|
return undefined;
|
|
41
60
|
};
|
|
42
61
|
return {
|
|
43
|
-
init:
|
|
62
|
+
init: readBoolean("init"),
|
|
44
63
|
scaffold: readBoolean("scaffold"),
|
|
45
|
-
install:
|
|
46
|
-
uninstall:
|
|
47
|
-
explore:
|
|
48
|
-
manage:
|
|
49
|
-
describe:
|
|
64
|
+
install: readBoolean("install"),
|
|
65
|
+
uninstall: readBoolean("uninstall"),
|
|
66
|
+
explore: readBoolean("explore", "list"),
|
|
67
|
+
manage: readBoolean("manage"),
|
|
68
|
+
describe: readBoolean("describe"),
|
|
50
69
|
markdown: readBoolean("markdown"),
|
|
51
|
-
reload:
|
|
52
|
-
doctor:
|
|
53
|
-
catalog:
|
|
54
|
-
adopt:
|
|
55
|
-
adoptAll:
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
70
|
+
reload: readBoolean("reload"),
|
|
71
|
+
doctor: readBoolean("doctor"),
|
|
72
|
+
catalog: readBoolean("catalog"),
|
|
73
|
+
adopt: readBoolean("adopt"),
|
|
74
|
+
adoptAll: readBoolean("adoptAll", "adopt_all", "adopt-all"),
|
|
75
|
+
activate: readBoolean("activate"),
|
|
76
|
+
deactivate: readBoolean("deactivate"),
|
|
77
|
+
migrate: readBoolean("migrate"),
|
|
59
78
|
project: readBoolean("project"),
|
|
60
79
|
local: readBoolean("local"),
|
|
61
80
|
global: readBoolean("global"),
|
|
@@ -75,6 +94,7 @@ function normalizeExtensionOptions(options, forcedAction, vocabulary = "extensio
|
|
|
75
94
|
ignoreGlobal: readBoolean("ignoreGlobal", "ignore_global", "ignore-global"),
|
|
76
95
|
strictExit: readBoolean("strictExit", "strict_exit", "strict-exit"),
|
|
77
96
|
failOnWarn: readBoolean("failOnWarn", "fail_on_warn", "fail-on-warn"),
|
|
97
|
+
dryRun: readBoolean("dryRun", "dry_run", "dry-run"),
|
|
78
98
|
vocabulary,
|
|
79
99
|
};
|
|
80
100
|
}
|
|
@@ -461,6 +481,12 @@ function registerLifecycleCommand(program, vocabulary) {
|
|
|
461
481
|
.description(`Adopt all unmanaged ${plural} into managed metadata.`), vocabulary).action(async (_options, command) => {
|
|
462
482
|
await executeExtensionCommand(undefined, command.optsWithGlobals(), command, "adopt-all", vocabulary);
|
|
463
483
|
});
|
|
484
|
+
addLifecycleScopeOptions(lifecycleCommand
|
|
485
|
+
.command("migrate")
|
|
486
|
+
.option("--dry-run", "Plan active migrations without invoking extension code")
|
|
487
|
+
.description(`Plan or apply active ${noun} migrations with durable receipts.`), vocabulary).action(async (_options, command) => {
|
|
488
|
+
await executeExtensionCommand(undefined, command.optsWithGlobals(), command, "migrate", vocabulary);
|
|
489
|
+
});
|
|
464
490
|
addLifecycleScopeOptions(lifecycleCommand
|
|
465
491
|
.command("activate")
|
|
466
492
|
.argument("<target>", `${noun[0].toUpperCase()}${noun.slice(1)} name`)
|
|
@@ -647,4 +673,4 @@ export function registerSetupCommands(program) {
|
|
|
647
673
|
});
|
|
648
674
|
}
|
|
649
675
|
//# sourceMappingURL=register-setup.js.map
|
|
650
|
-
//# debugId=
|
|
676
|
+
//# debugId=d498a64c-9680-52a9-981d-4ce86949784d
|