@pmate/cli 0.25.3 → 0.25.5

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.
Files changed (2) hide show
  1. package/dist/index.js +15 -11
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -22293,7 +22293,13 @@ var AndroidApkReleaseService = class {
22293
22293
  size,
22294
22294
  gitCommit: await this.readGitCommit(repoRoot)
22295
22295
  };
22296
- await this.registry?.createApkArtifact(service.id, artifact);
22296
+ if (this.registry) {
22297
+ try {
22298
+ await this.registry.createApkArtifact(service.id, artifact);
22299
+ } catch (error) {
22300
+ ui.warn("APK uploaded but registry artifact record failed", error instanceof Error ? error.message : String(error));
22301
+ }
22302
+ }
22297
22303
  ui.success(`Released APK ${artifact.downloadUrl}`);
22298
22304
  return artifact;
22299
22305
  }
@@ -22336,16 +22342,7 @@ var AndroidApkReleaseService = class {
22336
22342
  if (cwd) return import_node_path24.default.resolve(process.cwd(), cwd);
22337
22343
  const repository = this.getRepository(service);
22338
22344
  if (repository) {
22339
- const repoName = repository.replace(/\/+$/, "").split("/").pop()?.replace(/\.git$/i, "");
22340
- if (repoName) {
22341
- const candidates = [
22342
- import_node_path24.default.join(import_node_os9.default.homedir(), "dev", "pmate-envs", repoName),
22343
- import_node_path24.default.join(import_node_os9.default.homedir(), "dev", "pmate", repoName)
22344
- ];
22345
- for (const candidate of candidates) {
22346
- if ((0, import_node_fs20.existsSync)(candidate)) return candidate;
22347
- }
22348
- }
22345
+ return resolveRepositoryLocalRoot(repository);
22349
22346
  }
22350
22347
  return process.cwd();
22351
22348
  }
@@ -22438,6 +22435,13 @@ function bumpVersionName(versionName, bump) {
22438
22435
  function buildAndroidApkObjectKey(namespace, serviceName, versionName) {
22439
22436
  return `apks/${encodePathSegment(namespace)}/${encodePathSegment(serviceName)}/${encodePathSegment(versionName)}.apk`;
22440
22437
  }
22438
+ function resolveRepositoryLocalRoot(repository) {
22439
+ const repoName = repository.replace(/\/+$/, "").split("/").pop()?.replace(/\.git$/i, "");
22440
+ if (!repoName) {
22441
+ throw new Error(`Invalid repository: ${repository}`);
22442
+ }
22443
+ return import_node_path24.default.join(import_node_os9.default.homedir(), "dev", "pmate", repoName);
22444
+ }
22441
22445
  function bumpAndroidGradleVersionText(source, bump) {
22442
22446
  const versionNameMatch = source.match(/(^\s*versionName\s+["'])([^"']+)(["']\s*$)/m) ?? source.match(/(^\s*versionName\s*=\s*["'])([^"']+)(["']\s*$)/m);
22443
22447
  const versionCodeMatch = source.match(/(^\s*versionCode\s+)(\d+)(\s*$)/m) ?? source.match(/(^\s*versionCode\s*=\s*)(\d+)(\s*$)/m);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pmate/cli",
3
- "version": "0.25.3",
3
+ "version": "0.25.5",
4
4
  "description": "CLI utilities for the pMate project",
5
5
  "license": "MIT",
6
6
  "bin": {