sim 2.2.11 → 2.2.12-preview.221.1

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.
@@ -3706,10 +3706,18 @@ type GetBlockResponseRef0 = {
3706
3706
  placeholder?: string;
3707
3707
  mode?: string;
3708
3708
  hidden?: boolean;
3709
+ reactiveCondition?: {
3710
+ watchFields: Array<string>;
3711
+ requiredType: 'oauth' | 'service_account';
3712
+ };
3709
3713
  condition?: GetBlockResponseRef1;
3710
3714
  options?: Array<{
3711
3715
  id: string;
3712
3716
  label?: string;
3717
+ reactiveCondition?: {
3718
+ watchFields: Array<string>;
3719
+ requiredType: 'oauth' | 'service_account';
3720
+ };
3713
3721
  hasIcon?: boolean;
3714
3722
  hosted?: boolean;
3715
3723
  }>;
@@ -3849,7 +3857,15 @@ type GetBlockResponseRef6 = {
3849
3857
  options?: Array<{
3850
3858
  id: string;
3851
3859
  label: string;
3860
+ reactiveCondition?: {
3861
+ watchFields: Array<string>;
3862
+ requiredType: 'oauth' | 'service_account';
3863
+ };
3852
3864
  }>;
3865
+ reactiveCondition?: {
3866
+ watchFields: Array<string>;
3867
+ requiredType: 'oauth' | 'service_account';
3868
+ };
3853
3869
  condition?: GetBlockResponseRef1;
3854
3870
  }>;
3855
3871
  }>;
package/dist/index.js CHANGED
@@ -25183,17 +25183,24 @@ function buildProgram(options = {}) {
25183
25183
  if (options.version !== false)
25184
25184
  addVersionOption(program);
25185
25185
  program.option("-P, --profile <name>", "Profile to use (env: SIM_PROFILE)").option("--endpoint <url>", "Sim deployment to talk to (env: SIM_ENDPOINT)").option("-w, --workspace <id>", "Workspace to target (env: SIM_WORKSPACE)").addOption(new Option("--output <format>", "Output format for this command").choices([...OUTPUT_FORMATS]));
25186
- for (const command of [
25187
- loginCommand,
25188
- logoutCommand,
25189
- whoamiCommand,
25190
- profilesCommand,
25191
- configureCommand
25192
- ])
25193
- program.addCommand(command());
25194
- const update = updateCommand();
25195
- program.addCommand(update);
25196
- program.addCommand(telemetryCommand());
25186
+ if (options.hostCommands !== false) {
25187
+ for (const command of [
25188
+ loginCommand,
25189
+ logoutCommand,
25190
+ whoamiCommand,
25191
+ profilesCommand,
25192
+ configureCommand
25193
+ ])
25194
+ program.addCommand(command());
25195
+ const update = updateCommand();
25196
+ program.addCommand(update);
25197
+ program.addCommand(telemetryCommand());
25198
+ program.hook("preAction", async (_program, command) => {
25199
+ if (command === update)
25200
+ return;
25201
+ await announceUpdateIfAvailable();
25202
+ });
25203
+ }
25197
25204
  program.addCommand(cliCommand());
25198
25205
  for (const command of buildGeneratedCommands()) {
25199
25206
  program.addCommand(command);
@@ -25203,11 +25210,6 @@ function buildProgram(options = {}) {
25203
25210
  attachSecretCommands(program);
25204
25211
  program.addHelpText("after", options.helpText ?? HELP_EPILOGUE);
25205
25212
  program.addHelpText("beforeAll", ({ command }) => detectCodingAgent(env) !== undefined && command.commands.length > 0 ? AGENT_DISCOVERY_NOTE : "");
25206
- program.hook("preAction", async (_program, command) => {
25207
- if (command === update)
25208
- return;
25209
- await announceUpdateIfAvailable();
25210
- });
25211
25213
  refuseHelpAfterUnknownCommand(program);
25212
25214
  assertNoReservedProgramFlags(program);
25213
25215
  return program;
package/dist/program.d.ts CHANGED
@@ -27,4 +27,5 @@ export declare function buildProgram(options?: {
27
27
  helpText?: string;
28
28
  program?: Command;
29
29
  env?: NodeJS.ProcessEnv;
30
+ hostCommands?: boolean;
30
31
  }): Command;
package/dist/runtime.js CHANGED
@@ -25232,17 +25232,24 @@ function buildProgram(options = {}) {
25232
25232
  if (options.version !== false)
25233
25233
  addVersionOption(program);
25234
25234
  program.option("-P, --profile <name>", "Profile to use (env: SIM_PROFILE)").option("--endpoint <url>", "Sim deployment to talk to (env: SIM_ENDPOINT)").option("-w, --workspace <id>", "Workspace to target (env: SIM_WORKSPACE)").addOption(new Option("--output <format>", "Output format for this command").choices([...OUTPUT_FORMATS]));
25235
- for (const command of [
25236
- loginCommand,
25237
- logoutCommand,
25238
- whoamiCommand,
25239
- profilesCommand,
25240
- configureCommand
25241
- ])
25242
- program.addCommand(command());
25243
- const update = updateCommand();
25244
- program.addCommand(update);
25245
- program.addCommand(telemetryCommand());
25235
+ if (options.hostCommands !== false) {
25236
+ for (const command of [
25237
+ loginCommand,
25238
+ logoutCommand,
25239
+ whoamiCommand,
25240
+ profilesCommand,
25241
+ configureCommand
25242
+ ])
25243
+ program.addCommand(command());
25244
+ const update = updateCommand();
25245
+ program.addCommand(update);
25246
+ program.addCommand(telemetryCommand());
25247
+ program.hook("preAction", async (_program, command) => {
25248
+ if (command === update)
25249
+ return;
25250
+ await announceUpdateIfAvailable();
25251
+ });
25252
+ }
25246
25253
  program.addCommand(cliCommand());
25247
25254
  for (const command of buildGeneratedCommands()) {
25248
25255
  program.addCommand(command);
@@ -25252,11 +25259,6 @@ function buildProgram(options = {}) {
25252
25259
  attachSecretCommands(program);
25253
25260
  program.addHelpText("after", options.helpText ?? HELP_EPILOGUE);
25254
25261
  program.addHelpText("beforeAll", ({ command }) => detectCodingAgent(env) !== undefined && command.commands.length > 0 ? AGENT_DISCOVERY_NOTE : "");
25255
- program.hook("preAction", async (_program, command) => {
25256
- if (command === update)
25257
- return;
25258
- await announceUpdateIfAvailable();
25259
- });
25260
25262
  refuseHelpAfterUnknownCommand(program);
25261
25263
  assertNoReservedProgramFlags(program);
25262
25264
  return program;
@@ -25306,7 +25308,10 @@ async function runEmbeddedCli(argv, identity, options) {
25306
25308
  let exitCode = 0;
25307
25309
  try {
25308
25310
  identity.signal?.throwIfAborted();
25309
- const program = buildProgram();
25311
+ const program = buildProgram({
25312
+ hostCommands: false,
25313
+ helpText: "The embedding application supplies authentication, endpoint and workspace scope."
25314
+ });
25310
25315
  configureEmbeddedOutput(program);
25311
25316
  await program.parseAsync(argv, { from: "user" });
25312
25317
  if (ctx.softExitCode !== undefined && ctx.softExitCode !== 0)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sim",
3
- "version": "2.2.11",
3
+ "version": "2.2.12-preview.221.1",
4
4
  "description": "Sim CLI - talk to the Sim API from your terminal",
5
5
  "type": "module",
6
6
  "imports": {