@pmate/cli 0.40.0 → 0.41.0

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/README.md CHANGED
@@ -320,7 +320,7 @@ A registration failure fails the release command, while preserving already uploa
320
320
 
321
321
  ### Android release signing
322
322
 
323
- `pmate service apk release <service> --env prod --variant release` resolves signing credentials from that service's server-side environment (host variables and local signing environment variables are not used). Configure `ANDROID_KEYSTORE_BASE64`, `ANDROID_KEYSTORE_PASSWORD`, `ANDROID_KEY_ALIAS`, and `ANDROID_KEY_PASSWORD` as Service Secrets, plus `ANDROID_SIGNING_CERT_SHA256` as the expected certificate fingerprint. Android SDK `apksigner` must be installed. The CLI signs the Gradle release APK and verifies its certificate before uploading; missing credentials, invalid signatures, or fingerprint mismatches stop publication. Keystore files use restricted temporary storage and are removed after signing. Existing apps must retain their compatible signing key. Debug builds keep their existing Gradle signing behavior.
323
+ `pmate service deploy <ns:android-service>` resolves signing credentials from that service's server-side environment (host variables and local signing environment variables are not used). Configure `ANDROID_KEYSTORE_BASE64`, `ANDROID_KEYSTORE_PASSWORD`, `ANDROID_KEY_ALIAS`, and `ANDROID_KEY_PASSWORD` as Service Secrets, plus `ANDROID_SIGNING_CERT_SHA256` as the expected certificate fingerprint. Android SDK `apksigner` must be installed. The CLI signs the Gradle release APK and verifies its certificate before uploading; missing credentials, invalid signatures, or fingerprint mismatches stop publication. Keystore files use restricted temporary storage and are removed after signing. Existing apps must retain their compatible signing key. Debug builds keep their existing Gradle signing behavior.
324
324
 
325
325
 
326
326
  ### iOS TestFlight builds
@@ -346,7 +346,7 @@ Sequences, retained archives, derived data and logs live in `~/.pmate/ios-builds
346
346
 
347
347
  ### Unified native service deployment
348
348
 
349
- Web, iOS and Electron use separate services. Deploy dispatches by registered type, without --target. For iOS store scheme/team and optional project/workspace under build; existing mobile bundle identity stays unchanged. Native deployment currently supports prod only. Override registered settings with --cwd, --scheme, --team, --project, --workspace or Electron-specific --config, --platform, --arch and --out-dir. Unsupported options fail explicitly. iOS --dry-run resolves the registered plan without running Xcode or uploading.
349
+ Web, iOS and Electron use separate services. Deploy dispatches by registered type, without --target. For iOS store scheme/team and optional project/workspace under build; existing mobile bundle identity stays unchanged. iOS and Electron deployment currently support prod only; Android supports dev/preview/prod. Override registered settings with --cwd, --scheme, --team, --project, --workspace or Electron-specific --config, --platform, --arch and --out-dir. Unsupported options fail explicitly. iOS --dry-run resolves the registered plan without running Xcode or uploading.
350
350
 
351
351
  ```sh
352
352
  pmate service deploy pmate:merry
@@ -356,3 +356,11 @@ pmate service deploy pmate:merry-electron --local --unsigned
356
356
  ```
357
357
 
358
358
  app build and service ios build were removed; use service deploy. Local and dry-run runs do not create successful deploy-history entries. iOS upload success is recorded as uploaded-processing, not TestFlight availability.
359
+
360
+ ### Android through service deploy
361
+
362
+ Android services use `pmate service deploy pmate:merry-android`. The primary service is pmate:merry-android. Its build.artifactServiceId is pmate:factory-android: APK paths and the legacy update manifest remain compatible with installed clients, which also restrict APK downloads to the old path. Production publishes identical latest.json to both the new service and legacy artifact identity. Package factory.pmate.app and signing identity are unchanged. Copy the existing signing secrets server-side when migrating. Service build settings accept variant (release/debug) and bump (patch/minor/major); defaults are release and patch. Production rejects debug variants. Android supports dev/preview/prod; preview does not update the production latest.json.
363
+
364
+ Use --variant, --bump, --force, --release-notes or --minimum-version-code to override release options. --dry-run prints the plan without incrementing versions, resolving signing secrets, building or uploading. Android currently does not support --local/--unsigned. service apk release was removed; service apk list remains a query.
365
+
366
+ HarmonyOS NEXT projects exist in parrot-native (apps/pmate-app-harmony and apps/time-duck-harmony). They currently use signed build scripts and a GitHub Actions workflow, not a registered PMate service type or automatic AppGallery submission.
package/dist/index.d.ts CHANGED
@@ -954,6 +954,11 @@ type ServiceCommandArgs = {
954
954
  project?: string;
955
955
  workspace?: string;
956
956
  lastBuild?: number;
957
+ variant?: string;
958
+ bump?: "patch" | "minor" | "major";
959
+ force?: boolean;
960
+ releaseNotes?: string;
961
+ minimumVersionCode?: number;
957
962
  namespace: string;
958
963
  name: string;
959
964
  env?: string;
@@ -1004,20 +1009,6 @@ type ServiceCommandArgs = {
1004
1009
  dryRun: boolean;
1005
1010
  baseUrl?: string;
1006
1011
  json: boolean;
1007
- } | {
1008
- type: Command.Service;
1009
- action: "apk-release";
1010
- namespace: string;
1011
- name: string;
1012
- env: string;
1013
- variant: "debug" | "release" | string;
1014
- bump: "patch" | "minor" | "major";
1015
- cwd?: string;
1016
- force: boolean;
1017
- releaseNotes?: string;
1018
- minimumVersionCode?: number;
1019
- baseUrl?: string;
1020
- json: boolean;
1021
1012
  } | {
1022
1013
  type: Command.Service;
1023
1014
  action: "apk-list";
package/dist/index.js CHANGED
@@ -18500,12 +18500,24 @@ async function signAndroidApk(apkPath, signing) {
18500
18500
  process.removeListener("SIGTERM", interrupted);
18501
18501
  }
18502
18502
  }
18503
+ function androidArtifactIdentity(service) {
18504
+ const id = "type" in service ? service.build?.artifactServiceId : void 0;
18505
+ if (!id) return { namespace: service.namespace, name: service.name };
18506
+ const match = /^([A-Za-z0-9_-]+):([A-Za-z0-9_.-]+)$/.exec(id);
18507
+ if (!match || match[1] !== service.namespace || [".", ".."].includes(match[2])) throw new Error("Android artifactServiceId must be a valid service ID in the same namespace");
18508
+ return { namespace: match[1], name: match[2] };
18509
+ }
18510
+ function androidUpdateManifestKeys(service) {
18511
+ const identity = androidArtifactIdentity(service);
18512
+ return [.../* @__PURE__ */ new Set([buildAndroidLatestManifestObjectKey(service.namespace, service.name), buildAndroidLatestManifestObjectKey(identity.namespace, identity.name)])];
18513
+ }
18503
18514
  var AndroidApkReleaseService = class {
18504
18515
  constructor(registry) {
18505
18516
  this.registry = registry;
18506
18517
  }
18507
18518
  async release(service, options) {
18508
18519
  this.assertAndroidService(service);
18520
+ const identity = androidArtifactIdentity(service);
18509
18521
  const repoRoot = this.resolveRepoRoot(service, options.cwd);
18510
18522
  const appDir = this.resolveAppDir(service, repoRoot);
18511
18523
  const signing = options.variant.toLowerCase() === "release" ? await this.loadSigning(service.id, options.env) : void 0;
@@ -18523,7 +18535,7 @@ var AndroidApkReleaseService = class {
18523
18535
  `APK metadata ${metadata.versionName} (${metadata.versionCode}) does not match bumped version ${bump.versionName} (${bump.versionCode}).`
18524
18536
  );
18525
18537
  }
18526
- const objectKey = buildAndroidApkObjectKey(service.namespace, service.name, metadata.versionName);
18538
+ const objectKey = buildAndroidApkObjectKey(identity.namespace, identity.name, metadata.versionName);
18527
18539
  const existing = await this.findExistingObject(objectKey);
18528
18540
  if (existing && !options.force) {
18529
18541
  throw new Error(`APK already exists at ${ANDROID_APK_PUBLIC_BASE_URL}/${objectKey}. Re-run with --force to overwrite it.`);
@@ -18547,7 +18559,7 @@ var AndroidApkReleaseService = class {
18547
18559
  size,
18548
18560
  gitCommit: await this.readGitCommit(repoRoot)
18549
18561
  };
18550
- const catalogKey = service.namespace === "pmate" && service.name === "factory-android" && options.env === "preview" ? "apks/pmate/factory-android/releases.json" : null;
18562
+ const catalogKey = identity.namespace === "pmate" && identity.name === "factory-android" && options.env === "preview" ? "apks/pmate/factory-android/releases.json" : null;
18551
18563
  const nextCatalog = catalogKey ? mergeFactoryApkCatalog(await AliyunService.readJsonObject(ANDROID_APK_BUCKET, catalogKey), artifact) : null;
18552
18564
  await AliyunService.uploadFile(apkPath, ANDROID_APK_BUCKET, objectKey);
18553
18565
  if (this.registry) {
@@ -18581,14 +18593,16 @@ var AndroidApkReleaseService = class {
18581
18593
  releaseNotes: options.releaseNotes,
18582
18594
  minimumVersionCode: options.minimumVersionCode
18583
18595
  });
18584
- const objectKey = buildAndroidLatestManifestObjectKey(service.namespace, service.name);
18596
+ const objectKeys = androidUpdateManifestKeys(service);
18585
18597
  const tempDir = (0, import_node_fs22.mkdtempSync)(import_node_path27.default.join(import_node_os11.default.tmpdir(), "pmate-apk-latest-"));
18586
18598
  const manifestPath = import_node_path27.default.join(tempDir, "latest.json");
18587
18599
  try {
18588
18600
  (0, import_node_fs22.writeFileSync)(manifestPath, `${JSON.stringify(manifest, null, 2)}
18589
18601
  `);
18590
- await AliyunService.uploadFile(manifestPath, ANDROID_APK_BUCKET, objectKey);
18591
- ui.success(`Published Android update manifest ${ANDROID_APK_PUBLIC_BASE_URL}/${objectKey}`);
18602
+ for (const objectKey of objectKeys) {
18603
+ await AliyunService.uploadFile(manifestPath, ANDROID_APK_BUCKET, objectKey);
18604
+ ui.success(`Published Android update manifest ${ANDROID_APK_PUBLIC_BASE_URL}/${objectKey}`);
18605
+ }
18592
18606
  } finally {
18593
18607
  (0, import_node_fs22.rmSync)(tempDir, { recursive: true, force: true });
18594
18608
  }
@@ -18603,7 +18617,8 @@ var AndroidApkReleaseService = class {
18603
18617
  ui.warn("Falling back to OSS object listing for APK versions", error instanceof Error ? error.message : String(error));
18604
18618
  }
18605
18619
  }
18606
- const prefix = `apks/${service.namespace}/${service.name}`;
18620
+ const identity = androidArtifactIdentity(service);
18621
+ const prefix = `apks/${identity.namespace}/${identity.name}`;
18607
18622
  const objects = await AliyunService.listObjects(ANDROID_APK_BUCKET, prefix);
18608
18623
  return objects.filter((item) => item.name.endsWith(".apk")).map((item) => {
18609
18624
  const versionName = import_node_path27.default.basename(item.name, ".apk");
@@ -19094,19 +19109,21 @@ async function readPlist(input) {
19094
19109
 
19095
19110
  // src/services/NativeServiceDeploy.ts
19096
19111
  var electronKeys = ["config", "platform", "arch", "outDir", "unsigned", "signed", "dir"];
19112
+ var androidKeys = ["variant", "bump", "force", "releaseNotes", "minimumVersionCode"];
19097
19113
  var iosKeys = ["scheme", "team", "project", "workspace", "lastBuild"];
19098
19114
  function rejectNativeOverrides(args, allowed = []) {
19099
- for (const key of [...electronKeys, ...iosKeys, "local", "dryRun"]) {
19115
+ for (const key of [...electronKeys, ...iosKeys, ...androidKeys, "local", "dryRun"]) {
19100
19116
  if (args[key] !== void 0 && !allowed.includes(key)) throw new Error(`--${key.replace(/[A-Z]/g, (c) => `-${c.toLowerCase()}`)} is not supported for this service type`);
19101
19117
  }
19102
19118
  }
19103
19119
  var NativeServiceDeploy = class {
19104
- constructor(deps = { desktop: buildDesktop, ios: new IosBuildService() }) {
19120
+ constructor(deps = {}, registry) {
19105
19121
  this.deps = deps;
19122
+ this.registry = registry;
19106
19123
  }
19107
19124
  async deploy(service, args) {
19108
- if (!("type" in service) || !["electron", "ios"].includes(service.type)) throw new Error("Native deployment requires an electron or ios service");
19109
- if ((args.env ?? "prod") !== "prod") throw new Error("Native deployment currently supports only --env prod");
19125
+ if (!("type" in service) || !["electron", "ios", "android"].includes(service.type)) throw new Error("Native deployment requires an electron, ios or android service");
19126
+ if (service.type !== "android" && (args.env ?? "prod") !== "prod") throw new Error("Native deployment currently supports only --env prod");
19110
19127
  const repository = service.repository ?? service.mobile?.repository;
19111
19128
  const dir = service.dir ?? service.mobile?.dir;
19112
19129
  if (!dir || !repository && !args.cwd) throw new Error("Native service requires repository and dir");
@@ -19114,6 +19131,27 @@ var NativeServiceDeploy = class {
19114
19131
  const appDir = import_node_path29.default.resolve(root, dir);
19115
19132
  if (!(0, import_node_fs24.existsSync)(appDir)) throw new Error(`Service source directory not found: ${appDir}`);
19116
19133
  const settings = service.build ?? {};
19134
+ if (service.type === "android") {
19135
+ rejectNativeOverrides(args, [...androidKeys, "dryRun"]);
19136
+ const artifactIdentity = androidArtifactIdentity(service);
19137
+ const updateManifests = androidUpdateManifestKeys(service);
19138
+ const options2 = {
19139
+ cwd: root,
19140
+ env: args.env ?? "prod",
19141
+ variant: args.variant ?? settings.variant ?? "release",
19142
+ bump: args.bump ?? settings.bump ?? "patch",
19143
+ force: !!args.force,
19144
+ releaseNotes: args.releaseNotes,
19145
+ minimumVersionCode: args.minimumVersionCode
19146
+ };
19147
+ if (!["dev", "preview", "prod"].includes(options2.env)) throw new Error("Android deployment requires env dev, preview or prod");
19148
+ if (!["release", "debug"].includes(options2.variant)) throw new Error("Android variant must be release or debug");
19149
+ if (options2.env === "prod" && options2.variant !== "release") throw new Error("Android production deployment requires a signed release variant");
19150
+ if (!["patch", "minor", "major"].includes(options2.bump)) throw new Error("Android bump must be patch, minor or major");
19151
+ if (args.dryRun) return { serviceId: service.id, status: "dry-run", type: "android", appDir, artifactIdentity, updateManifests, packageName: service.mobile && "packageName" in service.mobile ? service.mobile.packageName : void 0, ...options2 };
19152
+ const artifact = await (this.deps.android ?? new AndroidApkReleaseService(this.registry)).release(service, options2);
19153
+ return { ...artifact, status: "published" };
19154
+ }
19117
19155
  if (service.type === "electron") {
19118
19156
  rejectNativeOverrides(args, [...electronKeys, "local", "dryRun"]);
19119
19157
  if (service.appIds?.length !== 1) throw new Error("Electron service requires exactly one appIds application identity");
@@ -19131,7 +19169,7 @@ var NativeServiceDeploy = class {
19131
19169
  local: !!args.local,
19132
19170
  json: args.json
19133
19171
  };
19134
- await this.deps.desktop(options2);
19172
+ await (this.deps.desktop ?? buildDesktop)(options2);
19135
19173
  return { serviceId: service.id, appId: app, status: args.dryRun ? "dry-run" : args.local ? "local" : "published", platform: options2.platform, arch: options2.arch, output: options2.outDir };
19136
19174
  }
19137
19175
  rejectNativeOverrides(args, [...iosKeys, "dryRun"]);
@@ -19146,7 +19184,7 @@ var NativeServiceDeploy = class {
19146
19184
  if (!options.scheme.trim()) throw new Error("iOS service requires build.scheme; update the service configuration or pass --scheme");
19147
19185
  if (options.project && options.workspace) throw new Error("Use only one project or workspace");
19148
19186
  if (args.dryRun) return { serviceId: service.id, status: "dry-run", type: "ios", appDir, ...options };
19149
- return { ...await this.deps.ios.build(service, options) };
19187
+ return { ...await (this.deps.ios ?? new IosBuildService()).build(service, options) };
19150
19188
  }
19151
19189
  };
19152
19190
 
@@ -21135,9 +21173,9 @@ var ServiceCommandHandler = class {
21135
21173
  }
21136
21174
  case "deploy": {
21137
21175
  const record = await registry.getService(args.namespace, args.name);
21138
- if ("type" in record && (record.type === "electron" || record.type === "ios")) {
21176
+ if ("type" in record && (record.type === "electron" || record.type === "ios" || record.type === "android")) {
21139
21177
  try {
21140
- const result = await new NativeServiceDeploy().deploy(record, args);
21178
+ const result = await new NativeServiceDeploy({}, registry).deploy(record, args);
21141
21179
  if (!args.dryRun && !args.local) await this.appendDeployHistory(registry, record.id, args.env ?? "prod", "success", String(result.status));
21142
21180
  this.renderJson(result, true);
21143
21181
  } catch (error) {
@@ -21217,21 +21255,6 @@ var ServiceCommandHandler = class {
21217
21255
  );
21218
21256
  return;
21219
21257
  }
21220
- case "apk-release": {
21221
- const record = await registry.getService(args.namespace, args.name);
21222
- const apkRelease = new AndroidApkReleaseService(registry);
21223
- const artifact = await apkRelease.release(record, {
21224
- env: args.env,
21225
- variant: args.variant,
21226
- bump: args.bump,
21227
- cwd: args.cwd,
21228
- force: args.force,
21229
- releaseNotes: args.releaseNotes,
21230
- minimumVersionCode: args.minimumVersionCode
21231
- });
21232
- this.renderApkArtifacts([artifact], args.json);
21233
- return;
21234
- }
21235
21258
  case "apk-list": {
21236
21259
  const record = await registry.getService(args.namespace, args.name);
21237
21260
  const apkRelease = new AndroidApkReleaseService(registry);
@@ -24447,8 +24470,8 @@ function parseServiceArgs(tokens) {
24447
24470
  throw new Error(`Usage: service ${action} <ns:objectId> [--base-url <url>] [--json]`);
24448
24471
  }
24449
24472
  const native = {};
24450
- const buildValues = ["--config", "--platform", "--arch", "--out-dir", "--scheme", "--team", "--project", "--workspace", "--last-build"];
24451
- const buildFlags = ["--dry-run", "--local", "--unsigned", "--signed", "--dir"];
24473
+ const buildValues = ["--config", "--platform", "--arch", "--out-dir", "--scheme", "--team", "--project", "--workspace", "--last-build", "--variant", "--bump", "--release-notes", "--minimum-version-code"];
24474
+ const buildFlags = ["--dry-run", "--local", "--unsigned", "--signed", "--dir", "--force"];
24452
24475
  let cwd;
24453
24476
  let page = 0;
24454
24477
  let app;
@@ -24558,6 +24581,11 @@ function parseServiceArgs(tokens) {
24558
24581
  if (native.platform && !["mac", "win"].includes(String(native.platform))) throw new Error("Supported platform: mac|win");
24559
24582
  if (native.arch && !["arm64", "x64"].includes(String(native.arch))) throw new Error("Supported architecture: arm64|x64");
24560
24583
  if (native.project && native.workspace) throw new Error("Use only one of --project or --workspace");
24584
+ if (native.bump && !["patch", "minor", "major"].includes(String(native.bump))) throw new Error("--bump must be patch, minor or major");
24585
+ if (native.minimumVersionCode !== void 0) {
24586
+ if (!/^(0|[1-9]\d*)$/.test(String(native.minimumVersionCode)) || !Number.isSafeInteger(Number(native.minimumVersionCode))) throw new Error("--minimum-version-code must be a non-negative safe integer");
24587
+ native.minimumVersionCode = Number(native.minimumVersionCode);
24588
+ }
24561
24589
  if (native.lastBuild !== void 0) {
24562
24590
  if (!/^(0|[1-9]\d*)$/.test(String(native.lastBuild)) || !Number.isSafeInteger(Number(native.lastBuild))) throw new Error("--last-build must be a non-negative safe integer");
24563
24591
  native.lastBuild = Number(native.lastBuild);
@@ -24739,111 +24767,21 @@ function looksLikeNamespacedRef(value) {
24739
24767
  }
24740
24768
  function parseServiceApkArgs(tokens, defaults) {
24741
24769
  const rest = [...tokens];
24742
- const apkAction = rest.shift();
24743
- if (apkAction !== "release" && apkAction !== "list") {
24744
- throw new Error("Usage: service apk release|list <ns:service> [--env <env>] [--json]");
24745
- }
24746
- const ref = rest.shift();
24747
- if (!ref || ref.startsWith("-")) {
24748
- throw new Error(`Usage: service apk ${apkAction} <ns:service> [--env <env>] [--json]`);
24749
- }
24750
- const parsedRef = parseNamespacedRef(ref, { entityLabel: "service ref" });
24770
+ const action = rest.shift();
24771
+ if (action === "release") throw new Error("service apk release was removed; use pmate service deploy <ns:android-service>");
24772
+ if (action !== "list") throw new Error("Usage: service apk list <ns:service> [--env <env>] [--json]");
24773
+ const parsed = parseNamespacedRef(rest.shift() ?? "", { entityLabel: "service ref" });
24774
+ let env;
24751
24775
  let baseUrl = defaults.baseUrl;
24752
24776
  let json = defaults.json;
24753
- let env;
24754
- let variant = "debug";
24755
- let cwd;
24756
- let force = false;
24757
- let major = false;
24758
- let minor = false;
24759
- let releaseNotes;
24760
- let minimumVersionCode;
24761
- while (rest.length > 0) {
24762
- const token = rest.shift();
24763
- switch (token) {
24764
- case "--env":
24765
- env = requireValue4(rest, token);
24766
- break;
24767
- case "--variant":
24768
- if (apkAction !== "release") {
24769
- throw new Error(`Unknown service apk ${apkAction} option: ${token}`);
24770
- }
24771
- variant = requireValue4(rest, token);
24772
- break;
24773
- case "--cwd":
24774
- if (apkAction !== "release") {
24775
- throw new Error(`Unknown service apk ${apkAction} option: ${token}`);
24776
- }
24777
- cwd = requireValue4(rest, token);
24778
- break;
24779
- case "--force":
24780
- if (apkAction !== "release") {
24781
- throw new Error(`Unknown service apk ${apkAction} option: ${token}`);
24782
- }
24783
- force = true;
24784
- break;
24785
- case "--major":
24786
- if (apkAction !== "release") {
24787
- throw new Error(`Unknown service apk ${apkAction} option: ${token}`);
24788
- }
24789
- major = true;
24790
- break;
24791
- case "--minor":
24792
- if (apkAction !== "release") {
24793
- throw new Error(`Unknown service apk ${apkAction} option: ${token}`);
24794
- }
24795
- minor = true;
24796
- break;
24797
- case "--release-notes":
24798
- if (apkAction !== "release") throw new Error(`Unknown service apk ${apkAction} option: ${token}`);
24799
- releaseNotes = requireValue4(rest, token);
24800
- break;
24801
- case "--minimum-version-code": {
24802
- if (apkAction !== "release") throw new Error(`Unknown service apk ${apkAction} option: ${token}`);
24803
- const value = Number(requireValue4(rest, token));
24804
- if (!Number.isInteger(value) || value < 0) throw new Error("--minimum-version-code must be a non-negative integer");
24805
- minimumVersionCode = value;
24806
- break;
24807
- }
24808
- case "--base-url":
24809
- baseUrl = requireValue4(rest, token);
24810
- break;
24811
- case "--json":
24812
- json = true;
24813
- break;
24814
- default:
24815
- throw new Error(`Unknown service apk ${apkAction} option: ${token}`);
24816
- }
24817
- }
24818
- if (major && minor) {
24819
- throw new Error("Use only one of --major or --minor for service apk release");
24820
- }
24821
- if (apkAction === "list") {
24822
- return {
24823
- type: "service" /* Service */,
24824
- action: "apk-list",
24825
- namespace: parsedRef.namespace,
24826
- name: parsedRef.objectId,
24827
- env,
24828
- baseUrl,
24829
- json
24830
- };
24777
+ while (rest.length) {
24778
+ const flag = rest.shift();
24779
+ if (flag === "--env") env = requireValue4(rest, flag);
24780
+ else if (flag === "--base-url") baseUrl = requireValue4(rest, flag);
24781
+ else if (flag === "--json") json = true;
24782
+ else throw new Error(`Unknown service apk list option: ${flag}`);
24831
24783
  }
24832
- return {
24833
- type: "service" /* Service */,
24834
- action: "apk-release",
24835
- namespace: parsedRef.namespace,
24836
- name: parsedRef.objectId,
24837
- env: env ?? "preview",
24838
- variant,
24839
- bump: major ? "major" : minor ? "minor" : "patch",
24840
- cwd,
24841
- force,
24842
- releaseNotes,
24843
- minimumVersionCode,
24844
- baseUrl,
24845
- json
24846
- };
24784
+ return { type: "service" /* Service */, action: "apk-list", namespace: parsed.namespace, name: parsed.objectId, env, baseUrl, json };
24847
24785
  }
24848
24786
  function parseServiceEnvDefinitionArgs(appId, tokens) {
24849
24787
  const rest = [...tokens];
@@ -26858,7 +26796,7 @@ var HELP_TEXT = [
26858
26796
  ` ${import_chalk4.default.gray(" delete <ns:objectId> [--base-url <url>] [--json]")}`,
26859
26797
  ` ${import_chalk4.default.gray(" default base URL: https://apps-api.pmate.chat")}`,
26860
26798
  ` ${import_chalk4.default.cyan("service")} Manage service registry entries via apps-api`,
26861
- " deploy <ns:service> [--env prod] [--cwd <repo>] [--dry-run] [--local] [--unsigned] [--platform mac|win] [--arch arm64|x64] [--config <file>] [--out-dir <dir>] [--scheme <name>] [--team <id>]",
26799
+ " deploy <ns:service> [--env prod] [--cwd <repo>] [--dry-run] [--local] [--unsigned] [--platform mac|win] [--arch arm64|x64] [--config <file>] [--out-dir <dir>] [--scheme <name>] [--team <id>] [--variant release|debug] [--bump patch|minor|major]",
26862
26800
  ` ${import_chalk4.default.gray(" list [--namespace <ns>] [--repo <owner/name|https://github.com/owner/name>] [--server <name>] [--base-url <url>] [--json]")}`,
26863
26801
  ` ${import_chalk4.default.gray(" get <ns:objectId> [--base-url <url>] [--json]")}`,
26864
26802
  ` ${import_chalk4.default.gray(" view <ns:objectId> [--base-url <url>]")}`,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pmate/cli",
3
- "version": "0.40.0",
3
+ "version": "0.41.0",
4
4
  "description": "CLI utilities for the pMate project",
5
5
  "license": "MIT",
6
6
  "bin": {