@computesdk/cli 2.6.7 → 2.6.8

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/cli-manifest.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "schemaVersion": 1,
3
3
  "bin": "compute",
4
4
  "package": "@computesdk/cli",
5
- "version": "2.6.7",
5
+ "version": "2.6.8",
6
6
  "source": {
7
7
  "repo": "computesdk/computesdk",
8
8
  "released": false
package/dist/index.js CHANGED
@@ -3307,6 +3307,22 @@ function registerCreditsCommands(program2) {
3307
3307
  });
3308
3308
  }
3309
3309
 
3310
+ // src/option-inheritance.ts
3311
+ var GIVEN = /* @__PURE__ */ new Set(["cli", "env"]);
3312
+ function inheritParentOptions(program2) {
3313
+ return program2.hook("preAction", (_hooked, actionCommand) => {
3314
+ const declared = new Set(actionCommand.options.map((option) => option.attributeName()));
3315
+ for (let parent = actionCommand.parent; parent; parent = parent.parent) {
3316
+ for (const [key, value] of Object.entries(parent.opts())) {
3317
+ if (!declared.has(key) || value === void 0) continue;
3318
+ if (!GIVEN.has(parent.getOptionValueSource(key) ?? "")) continue;
3319
+ if (GIVEN.has(actionCommand.getOptionValueSource(key) ?? "")) continue;
3320
+ actionCommand.setOptionValueWithSource(key, value, parent.getOptionValueSource(key));
3321
+ }
3322
+ }
3323
+ });
3324
+ }
3325
+
3310
3326
  // src/sandboxes.ts
3311
3327
  import * as fs from "fs";
3312
3328
  import * as os from "os";
@@ -5658,6 +5674,7 @@ process.stderr.on("error", (err) => {
5658
5674
  throw err;
5659
5675
  });
5660
5676
  var program = new Command4();
5677
+ inheritParentOptions(program);
5661
5678
  program.name("compute").description("ComputeSDK CLI").version(VERSION).enablePositionalOptions().passThroughOptions();
5662
5679
  async function printSessionLine(options) {
5663
5680
  try {