trm-client 10.0.0 → 10.0.2

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/changelog.txt CHANGED
@@ -8,6 +8,17 @@ Legend
8
8
  + : added
9
9
  - : removed
10
10
 
11
+ 2026-07-06 v10.0.2
12
+ -------------------
13
+ + pass registry to programmatic command handler
14
+
15
+ 2026-07-06 v10.0.1
16
+ -------------------
17
+ + picker type in metadata
18
+ + custom pickers in metadata
19
+ + negated in metadata
20
+ ! commands gui relevance, icons and grouping
21
+
11
22
  2026-07-06 v10.0.0
12
23
  -------------------
13
24
  + expose commands metadata
@@ -3,6 +3,9 @@ import { RegisterCommandOpts } from "./RegisterCommandOpts";
3
3
  import { CliVersionStatus } from "../utils";
4
4
  import * as Core from "trm-core";
5
5
  import { Package } from "trm-registry-types";
6
+ export interface AbstractCommandRunOptions {
7
+ registry?: Core.AbstractRegistry;
8
+ }
6
9
  export declare abstract class AbstractCommand {
7
10
  protected command: Command;
8
11
  protected registerOpts: RegisterCommandOpts;
@@ -44,7 +47,7 @@ export declare abstract class AbstractCommand {
44
47
  parseJsonArg(name: string): any;
45
48
  parseArrayArg(name: string): string[];
46
49
  parseNumberArg(name: string): number;
47
- run(args?: any): Promise<void>;
50
+ run(args?: any, options?: AbstractCommandRunOptions): Promise<void>;
48
51
  private execute;
49
52
  private executePrepared;
50
53
  }
@@ -401,10 +401,10 @@ class AbstractCommand {
401
401
  }
402
402
  }
403
403
  run() {
404
- return __awaiter(this, arguments, void 0, function* (args = {}) {
404
+ return __awaiter(this, arguments, void 0, function* (args = {}, options = {}) {
405
405
  this.args = this.normalizeArgs(args);
406
406
  this.onArgs();
407
- yield this.executePrepared(false);
407
+ yield this.executePrepared(false, options);
408
408
  });
409
409
  }
410
410
  execute(...args) {
@@ -415,8 +415,8 @@ class AbstractCommand {
415
415
  process.exit(exitCode);
416
416
  });
417
417
  }
418
- executePrepared(logErrors) {
419
- return __awaiter(this, void 0, void 0, function* () {
418
+ executePrepared(logErrors_1) {
419
+ return __awaiter(this, arguments, void 0, function* (logErrors, options = {}) {
420
420
  try {
421
421
  yield utils_1.GlobalContext.getInstance().load();
422
422
  yield Commons.Plugin.call("client", "loadCore", { core: Core });
@@ -432,7 +432,10 @@ class AbstractCommand {
432
432
  if (this.registerOpts.requiresRegistry) {
433
433
  var registryAlias;
434
434
  var registry;
435
- if (this.args.registry) {
435
+ if (options.registry) {
436
+ registry = options.registry;
437
+ }
438
+ else if (this.args.registry) {
436
439
  registryAlias = registryAlias_1.RegistryAlias.get(this.args.registry);
437
440
  }
438
441
  else if (this.args.registryEndpoint) {
@@ -441,7 +444,9 @@ class AbstractCommand {
441
444
  else {
442
445
  registryAlias = yield (0, prompts_1.pickRegistry)();
443
446
  }
444
- registry = registryAlias.getRegistry();
447
+ if (registryAlias) {
448
+ registry = registryAlias.getRegistry();
449
+ }
445
450
  try {
446
451
  Commons.Logger.loading(`Connecting to registry "${registry.name}" (${registry.endpoint})...`);
447
452
  const registryPing = yield registry.ping();
@@ -469,7 +474,7 @@ class AbstractCommand {
469
474
  }
470
475
  }
471
476
  this.registry = registry;
472
- this.registryAuthData = !!registryAlias.authData;
477
+ this.registryAuthData = !!(registryAlias === null || registryAlias === void 0 ? void 0 : registryAlias.authData);
473
478
  Core.RegistryProvider.registry.push(registry);
474
479
  }
475
480
  registryAlias_1.RegistryAlias.getAll().forEach(o => {
@@ -164,6 +164,7 @@ Alias.metadata = [
164
164
  command: "alias",
165
165
  title: "Manage aliases",
166
166
  group: "system",
167
+ guiRelevant: false,
167
168
  description: "Create, view, edit, check, or delete system aliases.",
168
169
  icon: "Network",
169
170
  arguments: [],
@@ -46,11 +46,12 @@ Cg3y.metadata = {
46
46
  command: "cg3y",
47
47
  title: "Download transport",
48
48
  group: "utility",
49
+ groupPriority: 8,
49
50
  description: "Download a released transport from the connected system.",
50
51
  icon: "Download",
51
52
  arguments: [
52
53
  (0, helpers_1.argument)(0, { name: "transport", label: "Transport", description: "Transport request number." }),
53
- (0, helpers_1.argument)(1, { name: "filename", label: "Output file", description: "Output file name or path.", required: false, control: "file-picker" })
54
+ (0, helpers_1.argument)(1, { name: "filename", label: "Output file", description: "Output file name or path.", required: false, control: "file-picker", pickerType: "output" })
54
55
  ],
55
56
  options: [],
56
57
  requirements: {
@@ -57,10 +57,11 @@ Cg3z.metadata = {
57
57
  command: "cg3z",
58
58
  title: "Upload transport",
59
59
  group: "utility",
60
+ groupPriority: 7,
60
61
  description: "Upload a released transport archive to the connected system.",
61
62
  icon: "Upload",
62
63
  arguments: [
63
- (0, helpers_1.argument)(0, { name: "filename", label: "Transport archive", description: "Transport archive file name or path.", control: "file-picker" })
64
+ (0, helpers_1.argument)(0, { name: "filename", label: "Transport archive", description: "Transport archive file name or path.", control: "file-picker", pickerType: "input" })
64
65
  ],
65
66
  options: [],
66
67
  requirements: {
@@ -191,8 +191,9 @@ Content.metadata = {
191
191
  aliases: ["contents"],
192
192
  title: "Package content",
193
193
  group: "registry",
194
+ groupPriority: 7,
194
195
  description: "View the contents of a package release in registry.",
195
- icon: "ListTree",
196
+ icon: "FolderTree",
196
197
  arguments: [
197
198
  (0, helpers_1.argument)(0, { name: "package", label: "Package", description: "Package name." }),
198
199
  (0, helpers_1.argument)(1, { name: "version", label: "Version", description: "Package version or distribution tag.", required: false, defaultValue: "latest" })
@@ -40,8 +40,9 @@ DistTag.metadata = [
40
40
  subcommand: "add",
41
41
  title: "Add distribution tag",
42
42
  group: "registry",
43
+ groupPriority: 9,
43
44
  description: "Add a distribution tag to a package release.",
44
- icon: "Tag",
45
+ icon: "TagPlus",
45
46
  arguments: [
46
47
  (0, helpers_1.argument)(0, { name: "package", label: "Package", description: "Package name." }),
47
48
  (0, helpers_1.argument)(1, { name: "version", label: "Version", description: "Release version." }),
@@ -57,9 +58,10 @@ DistTag.metadata = [
57
58
  command: "dist-tag",
58
59
  subcommand: "rm",
59
60
  title: "Remove distribution tag",
60
- group: "package",
61
+ group: "registry",
62
+ groupPriority: 8,
61
63
  description: "Remove a distribution tag from a package.",
62
- icon: "Tag",
64
+ icon: "TagX",
63
65
  arguments: [
64
66
  (0, helpers_1.argument)(0, { name: "package", label: "Package", description: "Package name." }),
65
67
  (0, helpers_1.argument)(1, { name: "tag", label: "Tag", description: "Distribution tag to remove." })
@@ -134,14 +134,15 @@ FindDependencies.metadata = {
134
134
  command: "find-dependencies",
135
135
  title: "Find dependencies",
136
136
  group: "utility",
137
+ groupPriority: 9,
137
138
  description: "Find TRM, customer package, and SAP object dependencies for an SAP package.",
138
139
  icon: "Search",
139
140
  arguments: [
140
- (0, helpers_1.argument)(0, { name: "sapPackage", cliName: "sap package", label: "SAP package", description: "SAP package to inspect." })
141
+ (0, helpers_1.argument)(0, { name: "sapPackage", cliName: "sap package", label: "SAP package", description: "SAP package to inspect.", control: "sap-package-picker" })
141
142
  ],
142
143
  options: [
143
144
  (0, helpers_1.option)("--sap-entries", { name: "sapEntries", label: "SAP entries", description: "Include required SAP table entries and objects.", control: "checkbox", defaultValue: false }),
144
- (0, helpers_1.option)("--no-prompts", { name: "prompts", label: "Prompts", description: "Disable prompts and use automatic decisions.", control: "checkbox", defaultValue: true }),
145
+ (0, helpers_1.option)("--no-prompts", { name: "prompts", label: "Prompts", description: "Disable prompts and use automatic decisions.", control: "checkbox", defaultValue: true, negated: true }),
145
146
  (0, helpers_1.option)("--trm-found-in", { name: "trmFoundIn", label: "Dependency references", description: "Show which objects reference each TRM dependency.", control: "checkbox", defaultValue: false })
146
147
  ],
147
148
  requirements: {
@@ -178,18 +178,18 @@ class Install extends AbstractCommand_1.AbstractCommand {
178
178
  }
179
179
  exports.Install = Install;
180
180
  Install.installOptions = [
181
- (0, helpers_1.option)("-T, --transport-layer <transport layer>", { name: "transportLayer", label: "Transport layer", description: "Transport layer for imported package objects. Defaults to the system transport layer." }),
182
- (0, helpers_1.option)("--no-deps", { name: "deps", label: "Dependencies", description: "Skip dependency installation.", control: "checkbox", defaultValue: true }),
183
- (0, helpers_1.option)("--no-obj-type", { name: "objType", label: "Object type checks", description: "Skip object type checks before import.", control: "checkbox", defaultValue: true }),
184
- (0, helpers_1.option)("--no-obj-check", { name: "objCheck", label: "Object existence checks", description: "Skip object existence checks before import.", control: "checkbox", defaultValue: true }),
185
- (0, helpers_1.option)("--no-sap-entries", { name: "sapEntries", label: "SAP entries", description: "Skip SAP entry checks before import.", control: "checkbox", defaultValue: true }),
186
- (0, helpers_1.option)("--no-lang-tr", { name: "langTr", label: "Language transport", description: "Skip language transport import.", control: "checkbox", defaultValue: true }),
187
- (0, helpers_1.option)("--no-cust-tr", { name: "custTr", label: "Customizing transports", description: "Skip customizing transport import.", control: "checkbox", defaultValue: true }),
188
- (0, helpers_1.option)("--no-install-tr", { name: "installTr", label: "Install transport", description: "Do not create an install transport.", control: "checkbox", defaultValue: true }),
181
+ (0, helpers_1.option)("-T, --transport-layer <transport layer>", { name: "transportLayer", label: "Transport layer", description: "Transport layer for imported package objects. Defaults to the system transport layer.", control: "transport-layer-picker" }),
182
+ (0, helpers_1.option)("--no-deps", { name: "deps", label: "Ignore dependencies", description: "Skip dependency installation.", control: "checkbox", defaultValue: true, negated: true }),
183
+ (0, helpers_1.option)("--no-obj-type", { name: "objType", label: "Avoid object type checks", description: "Skip object type checks before import.", control: "checkbox", defaultValue: true, negated: true }),
184
+ (0, helpers_1.option)("--no-obj-check", { name: "objCheck", label: "Avoid object existence checks", description: "Skip object existence checks before import.", control: "checkbox", defaultValue: true, negated: true }),
185
+ (0, helpers_1.option)("--no-sap-entries", { name: "sapEntries", label: "Avoid SAP entries", description: "Skip SAP entry checks before import.", control: "checkbox", defaultValue: true, negated: true }),
186
+ (0, helpers_1.option)("--no-lang-tr", { name: "langTr", label: "No language transport", description: "Skip language transport import.", control: "checkbox", defaultValue: true, negated: true }),
187
+ (0, helpers_1.option)("--no-cust-tr", { name: "custTr", label: "No customizing transports", description: "Skip customizing transports import.", control: "checkbox", defaultValue: true, negated: true }),
188
+ (0, helpers_1.option)("--no-install-tr", { name: "installTr", label: "No install transport generation", description: "Do not create an install transport.", control: "checkbox", defaultValue: true, negated: true }),
189
189
  (0, helpers_1.option)("--namespace", { name: "namespace", label: "Customer namespace", description: "Import the customer namespace.", control: "checkbox" }),
190
190
  (0, helpers_1.option)("--package-replacements <replacements>", { name: "packageReplacements", label: "Package replacements", description: "SAP package replacements as JSON, or a path to a JSON file.", control: "textarea" }),
191
- (0, helpers_1.option)("--install-tr-target <target>", { name: "installTrTarget", label: "Install transport target", description: "Target system for the install transport." }),
192
- (0, helpers_1.option)("--no-prompts", { name: "prompts", label: "Prompts", description: "Disable prompts and use automatic decisions.", control: "checkbox", defaultValue: true, guiRelevant: false })
191
+ (0, helpers_1.option)("--install-tr-target <target>", { name: "installTrTarget", label: "Install transport target", description: "Target system for the install transport.", control: "transport-target-picker" }),
192
+ (0, helpers_1.option)("--no-prompts", { name: "prompts", label: "Prompts", description: "Disable prompts and use automatic decisions.", control: "checkbox", defaultValue: true, guiRelevant: false, negated: true })
193
193
  ];
194
194
  Install.metadata = [
195
195
  {
@@ -200,7 +200,7 @@ Install.metadata = [
200
200
  group: "package",
201
201
  groupPriority: 10,
202
202
  description: "Install a package from the registry into the connected system.",
203
- icon: "PackageCheck",
203
+ icon: "PackagePlus",
204
204
  arguments: [
205
205
  (0, helpers_1.argument)(0, { name: "package", label: "Package", description: "Package name." }),
206
206
  (0, helpers_1.argument)(1, { name: "version", label: "Version", description: "Release version or distribution tag.", required: false, defaultValue: "latest" })
@@ -227,7 +227,7 @@ Install.metadata = [
227
227
  (0, helpers_1.argument)(1, { name: "version", label: "Version", description: "Release version or distribution tag.", required: false, defaultValue: "latest" })
228
228
  ],
229
229
  options: [
230
- (0, helpers_1.option)("-L, --lock-file", { name: "lockFile", label: "Lockfile", description: "Lockfile to use for installation.", control: "file-picker", defaultValue: "trm-lock.json" }),
230
+ (0, helpers_1.option)("-L, --lock-file", { name: "lockFile", label: "Lockfile", description: "Lockfile to use for installation.", control: "file-picker", pickerType: "input", defaultValue: "trm-lock.json" }),
231
231
  ...Install.installOptions
232
232
  ],
233
233
  requirements: {
@@ -265,9 +265,9 @@ Install.metadata = [
265
265
  group: "package",
266
266
  groupPriority: 8,
267
267
  description: "Import a package file into the connected system.",
268
- icon: "Upload",
268
+ icon: "FolderUp",
269
269
  arguments: [
270
- (0, helpers_1.argument)(0, { name: "filename", label: "Package file", description: "Package file name or path.", control: "file-picker" })
270
+ (0, helpers_1.argument)(0, { name: "filename", label: "Package file", description: "Package file name or path.", control: "file-picker", pickerType: "input" })
271
271
  ],
272
272
  options: Install.installOptions,
273
273
  requirements: {
@@ -42,7 +42,7 @@ Lock.metadata = {
42
42
  icon: "LockKeyhole",
43
43
  arguments: [
44
44
  (0, helpers_1.argument)(0, { name: "package", label: "Package", description: "Package to lock." }),
45
- (0, helpers_1.argument)(1, { name: "outputPath", cliName: "output path", label: "Output path", description: "Path where the lockfile will be written.", required: false, defaultValue: "trm-lock.json", control: "file-picker" })
45
+ (0, helpers_1.argument)(1, { name: "outputPath", cliName: "output path", label: "Output path", description: "Path where the lockfile will be written.", required: false, defaultValue: "trm-lock.json", control: "file-picker", pickerType: "output" })
46
46
  ],
47
47
  options: [],
48
48
  requirements: {
@@ -116,12 +116,12 @@ class Publish extends AbstractCommand_1.AbstractCommand {
116
116
  }
117
117
  exports.Publish = Publish;
118
118
  Publish.releaseOptions = [
119
- (0, helpers_1.option)("-P, --sap-package <sap package>", { name: "sapPackage", label: "SAP package", description: "SAP package that owns the release objects." }),
120
- (0, helpers_1.option)("-T, --target <target>", { name: "target", label: "Transport target", description: "Target system for release transports." }),
121
- (0, helpers_1.option)("--no-lang-tr", { name: "langTr", label: "Language transport", description: "Skip language transport generation.", control: "checkbox", defaultValue: true }),
122
- (0, helpers_1.option)("--no-cust-tr", { name: "custTr", label: "Customizing transport", description: "Skip customizing transport generation.", control: "checkbox", defaultValue: true }),
119
+ (0, helpers_1.option)("-P, --sap-package <sap package>", { name: "sapPackage", label: "SAP package", description: "SAP package that owns the release objects.", control: "sap-package-picker" }),
120
+ (0, helpers_1.option)("-T, --target <target>", { name: "target", label: "Transport target", description: "Target system for release transports.", control: "transport-target-picker" }),
121
+ (0, helpers_1.option)("--no-lang-tr", { name: "langTr", label: "No language transport", description: "Skip language transport generation.", control: "checkbox", defaultValue: true, negated: true }),
122
+ (0, helpers_1.option)("--no-cust-tr", { name: "custTr", label: "No customizing transport", description: "Skip customizing transports generation.", control: "checkbox", defaultValue: true, negated: true }),
123
123
  (0, helpers_1.option)("--cust <customizing>", { name: "cust", label: "Customizing transports", description: "Customizing transport requests, separated by commas.", multiple: true }),
124
- (0, helpers_1.option)("--no-auto-deps", { name: "autoDeps", label: "Automatic dependencies", description: "Skip automatic dependency detection.", control: "checkbox", defaultValue: true }),
124
+ (0, helpers_1.option)("--no-auto-deps", { name: "autoDeps", label: "No automatic dependencies", description: "Skip automatic dependency detection.", control: "checkbox", defaultValue: true, negated: true }),
125
125
  (0, helpers_1.option)("--authors <authors>", { name: "authors", label: "Authors", description: "Release authors, separated by commas.", multiple: true }),
126
126
  (0, helpers_1.option)("--backwards-compatible", { name: "backwardsCompatible", label: "Backwards compatible", description: "Mark the release as backwards compatible.", control: "checkbox" }),
127
127
  (0, helpers_1.option)("--description <description>", { name: "description", label: "Description", description: "Release description." }),
@@ -132,7 +132,7 @@ Publish.releaseOptions = [
132
132
  (0, helpers_1.option)("--dependencies <dependencies>", { name: "dependencies", label: "Dependencies", description: "Release dependencies as JSON, or a path to a JSON file.", control: "textarea" }),
133
133
  (0, helpers_1.option)("--sap-entries <sap entries>", { name: "sapEntries", label: "SAP entries", description: "Release SAP entries as JSON, or a path to a JSON file.", control: "textarea" }),
134
134
  (0, helpers_1.option)("--post-activities <post activities>", { name: "postActivities", label: "Post activities", description: "Release post activities as JSON, or a path to a JSON file.", control: "textarea" }),
135
- (0, helpers_1.option)("--no-prompts", { name: "prompts", label: "Prompts", description: "Disable prompts and use automatic decisions.", control: "checkbox", defaultValue: true, guiRelevant: false })
135
+ (0, helpers_1.option)("--no-prompts", { name: "prompts", label: "Prompts", description: "Disable prompts and use automatic decisions.", control: "checkbox", defaultValue: true, guiRelevant: false, negated: true })
136
136
  ];
137
137
  Publish.metadata = [
138
138
  {
@@ -142,7 +142,7 @@ Publish.metadata = [
142
142
  group: "package",
143
143
  groupPriority: 9,
144
144
  description: "Publish a package release to the registry.",
145
- icon: "PackagePlus",
145
+ icon: "Rocket",
146
146
  arguments: [
147
147
  (0, helpers_1.argument)(0, { name: "package", label: "Package", description: "Package name." }),
148
148
  (0, helpers_1.argument)(1, { name: "version", label: "Version", description: "Release version to publish.", required: false })
@@ -154,7 +154,7 @@ Publish.metadata = [
154
154
  (0, helpers_1.option)("--tag <tag>", { name: "tag", label: "Tags", description: "Release distribution tags, separated by commas.", multiple: true }),
155
155
  (0, helpers_1.option)("--private", { name: "private", label: "Private", description: "Mark the package as private. Registry visibility may not be changeable after the first publish.", control: "checkbox" }),
156
156
  (0, helpers_1.option)("--readme <readme>", { name: "readme", label: "Readme", description: "Release readme as Markdown, or a path to a Markdown file.", control: "textarea" }),
157
- (0, helpers_1.option)("--no-keep-manifest", { name: "keepManifest", label: "Reuse manifest", description: "Do not reuse values from the previous release manifest.", control: "checkbox", defaultValue: true }),
157
+ (0, helpers_1.option)("--no-keep-manifest", { name: "keepManifest", label: "Reuse manifest", description: "Do not reuse values from the previous release manifest.", control: "checkbox", defaultValue: true, negated: true }),
158
158
  ...Publish.releaseOptions
159
159
  ],
160
160
  requirements: {
@@ -171,11 +171,11 @@ Publish.metadata = [
171
171
  group: "package",
172
172
  groupPriority: 7,
173
173
  description: "Export a package release to a local file.",
174
- icon: "PackageOpen",
174
+ icon: "FolderDown",
175
175
  arguments: [
176
176
  (0, helpers_1.argument)(0, { name: "package", label: "Package", description: "Package name." }),
177
177
  (0, helpers_1.argument)(1, { name: "version", label: "Version", description: "Release version." }),
178
- (0, helpers_1.argument)(2, { name: "filename", label: "Output file", description: "Output file name or path.", required: false, control: "file-picker" })
178
+ (0, helpers_1.argument)(2, { name: "filename", label: "Output file", description: "Output file name or path.", required: false, control: "file-picker", pickerType: "output" })
179
179
  ],
180
180
  options: Publish.releaseOptions,
181
181
  requirements: {
@@ -79,6 +79,7 @@ Registry.metadata = [
79
79
  subcommand: "add",
80
80
  title: "Add registry",
81
81
  group: "registry",
82
+ guiRelevant: false,
82
83
  description: "Add a registry alias.",
83
84
  icon: "DatabaseZap",
84
85
  arguments: [
@@ -97,6 +98,7 @@ Registry.metadata = [
97
98
  subcommand: "rm",
98
99
  title: "Remove registry",
99
100
  group: "registry",
101
+ guiRelevant: false,
100
102
  description: "Remove a registry alias.",
101
103
  icon: "DatabaseX",
102
104
  arguments: [
@@ -32,6 +32,7 @@ Unpublish.metadata = {
32
32
  command: "unpublish",
33
33
  title: "Unpublish release",
34
34
  group: "registry",
35
+ groupPriority: 6,
35
36
  description: "Unpublish a package release from the registry.",
36
37
  icon: "PackageX",
37
38
  arguments: [
@@ -1,6 +1,6 @@
1
1
  import { RegisterCommandOpts } from "../RegisterCommandOpts";
2
2
  import type { AbstractCommand } from "../AbstractCommand";
3
- export type CommandControlType = "text-input" | "password-input" | "number-input" | "checkbox" | "select" | "multiselect" | "file-picker" | "textarea";
3
+ export type CommandControlType = "text-input" | "password-input" | "number-input" | "checkbox" | "select" | "multiselect" | "file-picker" | "textarea" | "transport-layer-picker" | "transport-target-picker" | "sap-package-picker";
4
4
  export interface CommandValueChoice {
5
5
  label: string;
6
6
  value: string | number | boolean;
@@ -13,6 +13,7 @@ export interface CommandFieldMetadata {
13
13
  description: string;
14
14
  required: boolean;
15
15
  control: CommandControlType;
16
+ pickerType?: "input" | "output";
16
17
  defaultValue?: unknown;
17
18
  choices?: CommandValueChoice[];
18
19
  placeholder?: string;
@@ -27,6 +28,7 @@ export interface CommandArgumentMetadata extends CommandFieldMetadata {
27
28
  export interface CommandOptionMetadata extends CommandFieldMetadata {
28
29
  kind: "option";
29
30
  flags: string;
31
+ negated?: boolean;
30
32
  }
31
33
  export type CommandGroup = "package" | "registry" | "system" | "utility";
32
34
  export interface CommandMetadata {
@@ -1,5 +1,6 @@
1
1
  import { CommandArgumentMetadata, CommandFieldMetadata, CommandOptionMetadata } from "./CommandMetadata";
2
2
  type FieldArgs = Omit<CommandFieldMetadata, "required" | "control"> & Partial<Pick<CommandFieldMetadata, "required" | "control">>;
3
+ type OptionArgs = FieldArgs & Partial<Pick<CommandOptionMetadata, "negated">>;
3
4
  export declare function argument(position: number, args: FieldArgs): CommandArgumentMetadata;
4
- export declare function option(flags: string, args: FieldArgs): CommandOptionMetadata;
5
+ export declare function option(flags: string, args: OptionArgs): CommandOptionMetadata;
5
6
  export {};
@@ -13,6 +13,7 @@ function argument(position, args) {
13
13
  description: args.description,
14
14
  required: (_a = args.required) !== null && _a !== void 0 ? _a : true,
15
15
  control: (_b = args.control) !== null && _b !== void 0 ? _b : "text-input",
16
+ pickerType: args.pickerType,
16
17
  defaultValue: args.defaultValue,
17
18
  choices: args.choices,
18
19
  placeholder: args.placeholder,
@@ -26,12 +27,14 @@ function option(flags, args) {
26
27
  return {
27
28
  kind: "option",
28
29
  flags,
30
+ negated: args.negated,
29
31
  name: args.name,
30
32
  cliName: args.cliName,
31
33
  label: args.label,
32
34
  description: args.description,
33
35
  required: (_a = args.required) !== null && _a !== void 0 ? _a : false,
34
36
  control: (_b = args.control) !== null && _b !== void 0 ? _b : "text-input",
37
+ pickerType: args.pickerType,
35
38
  defaultValue: args.defaultValue,
36
39
  choices: args.choices,
37
40
  placeholder: args.placeholder,
@@ -1,2 +1,6 @@
1
+ import type * as Core from "trm-core";
1
2
  export type CommandHandlerValues = Record<string, unknown>;
2
- export declare function runCommandHandler(id: string, values?: CommandHandlerValues): Promise<void>;
3
+ export interface CommandHandlerOptions {
4
+ registry?: Core.AbstractRegistry;
5
+ }
6
+ export declare function runCommandHandler(id: string, values?: CommandHandlerValues, options?: CommandHandlerOptions): Promise<void>;
@@ -12,13 +12,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.runCommandHandler = runCommandHandler;
13
13
  const implementations_1 = require("./implementations");
14
14
  function runCommandHandler(id_1) {
15
- return __awaiter(this, arguments, void 0, function* (id, values = {}) {
15
+ return __awaiter(this, arguments, void 0, function* (id, values = {}, options = {}) {
16
16
  const commandClass = (0, implementations_1.getCommand)(id);
17
17
  const metadata = (0, implementations_1.getCommandMetadata)(id);
18
18
  if (!commandClass || !metadata) {
19
19
  throw new Error(`Unknown command metadata id "${id}".`);
20
20
  }
21
21
  const command = new commandClass(metadata.command, metadata.aliases, metadata.subcommand);
22
- yield command.run(values);
22
+ yield command.run(values, options);
23
23
  });
24
24
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "trm-client",
3
- "version": "10.0.0",
3
+ "version": "10.0.2",
4
4
  "description": "TRM (Transport Request Manager) Client",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",