Workspace command decorators (#19397)

# Introduction
Migrating the workspace commands to the decorator version + timestamp
listing as for the instance commands

We've now been able to remove the upgrade command abstraction where we
needed to import all modules and order them
Now they're dynamically retrieved at upgrade runtime, sorted by
timestamp

## Instance and workspace commands name
The name is computed from the command metadata `version` `className` and
`timestamp` we have a duplicate validation at module init from the
unified registry
This commit is contained in:
Paul Rastoin
2026-04-07 18:33:48 +02:00
committed by GitHub
parent 24a5273a79
commit c0eacedfec
52 changed files with 1147 additions and 2868 deletions
@@ -1,8 +1,8 @@
export const UPGRADE_COMMAND_SUPPORTED_VERSIONS = [
'1.19.0',
'1.20.0',
'1.21.0',
] as const;
// Keep at least two entries: the current version and the one before it.
// getPreviousVersion() looks up the entry just below the current version
// to determine the minimum workspace version eligible for upgrade.
// Removing the previous version would cause the upgrade command to fail.
export const UPGRADE_COMMAND_SUPPORTED_VERSIONS = ['1.20.0', '1.21.0'] as const;
export type UpgradeCommandVersion =
(typeof UPGRADE_COMMAND_SUPPORTED_VERSIONS)[number];