@getmonoceros/workbench 1.38.2 → 1.38.4

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/dist/bin.js CHANGED
@@ -2418,7 +2418,7 @@ var init_catalog = __esm({
2418
2418
  override = process.env.MONOCEROS_BASE_IMAGE_OVERRIDE?.trim();
2419
2419
  BASE_IMAGE = override && override.length > 0 ? override : DEFAULT_BASE_IMAGE;
2420
2420
  RUNTIME_IMAGE_REPO = "ghcr.io/getmonoceros/monoceros-runtime";
2421
- DEFAULT_RUNTIME_VERSION = true ? "1.6.0" : readFileSync3(
2421
+ DEFAULT_RUNTIME_VERSION = true ? "1.6.1" : readFileSync3(
2422
2422
  fileURLToPath2(
2423
2423
  new URL("../../../../images/runtime/VERSION", import.meta.url)
2424
2424
  ),
@@ -4626,7 +4626,7 @@ function generateAgentsMd(input) {
4626
4626
  lines.push("");
4627
4627
  lines.push("```json");
4628
4628
  lines.push("{");
4629
- lines.push(' "configurations": [');
4629
+ lines.push(' "targets": [');
4630
4630
  lines.push(
4631
4631
  ` { "name": "web", "command": "<the project's start command>", "port": ${examplePort}, "default": true }`
4632
4632
  );
@@ -8996,7 +8996,7 @@ var CLI_VERSION;
8996
8996
  var init_version = __esm({
8997
8997
  "src/version.ts"() {
8998
8998
  "use strict";
8999
- CLI_VERSION = true ? "1.38.2" : "dev";
8999
+ CLI_VERSION = true ? "1.38.4" : "dev";
9000
9000
  }
9001
9001
  });
9002
9002
 
@@ -9246,11 +9246,12 @@ function validate(parsed, where) {
9246
9246
  throw new Error(`${where}: expected a JSON object`);
9247
9247
  }
9248
9248
  const obj = parsed;
9249
- if (!Array.isArray(obj.configurations)) {
9250
- throw new Error(`${where}: missing "configurations" array`);
9249
+ const rawList = Array.isArray(obj.targets) ? obj.targets : Array.isArray(obj.configurations) ? obj.configurations : null;
9250
+ if (!rawList) {
9251
+ throw new Error(`${where}: missing "targets" array`);
9251
9252
  }
9252
9253
  const seen = /* @__PURE__ */ new Set();
9253
- const configurations = obj.configurations.map((raw, i) => {
9254
+ const configurations = rawList.map((raw, i) => {
9254
9255
  if (typeof raw !== "object" || raw === null) {
9255
9256
  throw new Error(`${where}: configuration #${i} is not an object`);
9256
9257
  }
@@ -11164,7 +11165,7 @@ var init_remove_apt_packages = __esm({
11164
11165
  meta: {
11165
11166
  name: "remove-apt-packages",
11166
11167
  group: "edit",
11167
- description: "Remove apt packages from the container config. Pass package names after `--` (e.g. `monoceros remove-apt-packages sandbox -- make jq`). Idempotent, prints a diff before writing."
11168
+ description: "Remove apt packages from the container config. Pass package names as arguments (e.g. `monoceros remove-apt-packages sandbox make jq`). Idempotent, prints a diff before writing."
11168
11169
  },
11169
11170
  args: {
11170
11171
  name: {
@@ -11172,6 +11173,11 @@ var init_remove_apt_packages = __esm({
11172
11173
  description: "Container name (yml in $MONOCEROS_HOME/container-configs/).",
11173
11174
  required: true
11174
11175
  },
11176
+ packages: {
11177
+ type: "positional",
11178
+ description: "One or more apt package names to remove (e.g. `make jq`). At least one is required.",
11179
+ required: false
11180
+ },
11175
11181
  yes: {
11176
11182
  type: "boolean",
11177
11183
  description: "Skip the interactive confirmation and apply the diff.",
@@ -11180,10 +11186,10 @@ var init_remove_apt_packages = __esm({
11180
11186
  }
11181
11187
  },
11182
11188
  async run({ args }) {
11183
- const packages = [...getInnerArgs()];
11189
+ const packages = [...args._.slice(1).map(String), ...getInnerArgs()];
11184
11190
  if (packages.length === 0) {
11185
11191
  consola22.error(
11186
- "No package names given. Usage: `monoceros remove-apt-packages <containername> [--yes] -- <pkg> [<pkg> \u2026]`."
11192
+ "No package names given. Usage: `monoceros remove-apt-packages <containername> [--yes] <pkg> [<pkg> \u2026]`."
11187
11193
  );
11188
11194
  process.exit(1);
11189
11195
  }
@@ -11729,7 +11735,7 @@ var init_remove_port = __esm({
11729
11735
  meta: {
11730
11736
  name: "remove-port",
11731
11737
  group: "edit",
11732
- description: "Remove one or more ports from the container config. Pass port numbers after `--` (e.g. `monoceros remove-port sandbox -- 3000 5173`). Idempotent \u2014 ports not present are skipped silently."
11738
+ description: "Remove one or more ports from the container config. Pass port numbers as arguments (e.g. `monoceros remove-port sandbox 3000 5173`). Idempotent \u2014 ports not present are skipped silently."
11733
11739
  },
11734
11740
  args: {
11735
11741
  name: {
@@ -11737,6 +11743,11 @@ var init_remove_port = __esm({
11737
11743
  description: "Container name (yml in $MONOCEROS_HOME/container-configs/).",
11738
11744
  required: true
11739
11745
  },
11746
+ ports: {
11747
+ type: "positional",
11748
+ description: "One or more port numbers to remove (e.g. `3000 5173`). At least one is required.",
11749
+ required: false
11750
+ },
11740
11751
  yes: {
11741
11752
  type: "boolean",
11742
11753
  description: "Skip the interactive confirmation and apply the diff.",
@@ -11745,10 +11756,10 @@ var init_remove_port = __esm({
11745
11756
  }
11746
11757
  },
11747
11758
  async run({ args }) {
11748
- const tokens = [...getInnerArgs()];
11759
+ const tokens = [...args._.slice(1).map(String), ...getInnerArgs()];
11749
11760
  if (tokens.length === 0) {
11750
11761
  consola30.error(
11751
- "No ports given. Usage: `monoceros remove-port <containername> [--yes] -- <port> [<port> \u2026]`."
11762
+ "No ports given. Usage: `monoceros remove-port <containername> [--yes] <port> [<port> \u2026]`."
11752
11763
  );
11753
11764
  process.exit(1);
11754
11765
  }