pubm 0.0.2-15 → 0.0.2-6

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.
@@ -0,0 +1 @@
1
+ bb1b5e0897a25b17444b95266e3494d0e653bae57836260243bf54194f71cd729bf8abe6cdc4a6a86b5f03b4200033fc
package/bin/cli.js CHANGED
@@ -5364,13 +5364,7 @@ var NpmRegistry = class extends Registry {
5364
5364
  }
5365
5365
  async publishProvenance() {
5366
5366
  try {
5367
- try {
5368
- await this.npm(["publish", "--provenance", "--access", "public"]);
5369
- } catch (error) {
5370
- if (`${error}`.includes("EOTP")) {
5371
- return false;
5372
- }
5373
- }
5367
+ await this.npm(["publish", "--provenance", "--access", "public"]);
5374
5368
  return true;
5375
5369
  } catch (error) {
5376
5370
  throw new NpmError(
@@ -5387,7 +5381,7 @@ var NpmRegistry = class extends Registry {
5387
5381
  try {
5388
5382
  await this.npm(args);
5389
5383
  } catch (error) {
5390
- if (`${error}`.includes("EOTP")) {
5384
+ if (`${error}`.includes("OTP")) {
5391
5385
  return false;
5392
5386
  }
5393
5387
  }
@@ -5636,12 +5630,7 @@ var npmPublishTasks = {
5636
5630
  "NODE_AUTH_TOKEN not found in the environment variables. Please set the token and try again."
5637
5631
  );
5638
5632
  }
5639
- const result = await npm.publishProvenance();
5640
- if (!result) {
5641
- throw new NpmAvailableError(
5642
- `In CI environment, publishing with 2FA is not allowed. Please disable 2FA when accessing with a token from https://www.npmjs.com/package/${npm.packageName}/access`
5643
- );
5644
- }
5633
+ await npm.publishProvenance();
5645
5634
  }
5646
5635
  }
5647
5636
  };
package/dist/index.cjs CHANGED
@@ -5371,13 +5371,7 @@ var NpmRegistry = class extends Registry {
5371
5371
  }
5372
5372
  async publishProvenance() {
5373
5373
  try {
5374
- try {
5375
- await this.npm(["publish", "--provenance", "--access", "public"]);
5376
- } catch (error) {
5377
- if (`${error}`.includes("EOTP")) {
5378
- return false;
5379
- }
5380
- }
5374
+ await this.npm(["publish", "--provenance", "--access", "public"]);
5381
5375
  return true;
5382
5376
  } catch (error) {
5383
5377
  throw new NpmError(
@@ -5394,7 +5388,7 @@ var NpmRegistry = class extends Registry {
5394
5388
  try {
5395
5389
  await this.npm(args);
5396
5390
  } catch (error) {
5397
- if (`${error}`.includes("EOTP")) {
5391
+ if (`${error}`.includes("OTP")) {
5398
5392
  return false;
5399
5393
  }
5400
5394
  }
@@ -5643,12 +5637,7 @@ var npmPublishTasks = {
5643
5637
  "NODE_AUTH_TOKEN not found in the environment variables. Please set the token and try again."
5644
5638
  );
5645
5639
  }
5646
- const result = await npm.publishProvenance();
5647
- if (!result) {
5648
- throw new NpmAvailableError(
5649
- `In CI environment, publishing with 2FA is not allowed. Please disable 2FA when accessing with a token from https://www.npmjs.com/package/${npm.packageName}/access`
5650
- );
5651
- }
5640
+ await npm.publishProvenance();
5652
5641
  }
5653
5642
  }
5654
5643
  };
package/dist/index.js CHANGED
@@ -5360,13 +5360,7 @@ var NpmRegistry = class extends Registry {
5360
5360
  }
5361
5361
  async publishProvenance() {
5362
5362
  try {
5363
- try {
5364
- await this.npm(["publish", "--provenance", "--access", "public"]);
5365
- } catch (error) {
5366
- if (`${error}`.includes("EOTP")) {
5367
- return false;
5368
- }
5369
- }
5363
+ await this.npm(["publish", "--provenance", "--access", "public"]);
5370
5364
  return true;
5371
5365
  } catch (error) {
5372
5366
  throw new NpmError(
@@ -5383,7 +5377,7 @@ var NpmRegistry = class extends Registry {
5383
5377
  try {
5384
5378
  await this.npm(args);
5385
5379
  } catch (error) {
5386
- if (`${error}`.includes("EOTP")) {
5380
+ if (`${error}`.includes("OTP")) {
5387
5381
  return false;
5388
5382
  }
5389
5383
  }
@@ -5632,12 +5626,7 @@ var npmPublishTasks = {
5632
5626
  "NODE_AUTH_TOKEN not found in the environment variables. Please set the token and try again."
5633
5627
  );
5634
5628
  }
5635
- const result = await npm.publishProvenance();
5636
- if (!result) {
5637
- throw new NpmAvailableError(
5638
- `In CI environment, publishing with 2FA is not allowed. Please disable 2FA when accessing with a token from https://www.npmjs.com/package/${npm.packageName}/access`
5639
- );
5640
- }
5629
+ await npm.publishProvenance();
5641
5630
  }
5642
5631
  }
5643
5632
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pubm",
3
- "version": "0.0.2-15",
3
+ "version": "0.0.2-6",
4
4
  "engines": {
5
5
  "node": ">=18",
6
6
  "git": ">=2.11.0"
@@ -50,8 +50,7 @@
50
50
  "@types/npmcli__promise-spawn": "^6.0.3",
51
51
  "@types/semver": "^7.5.8",
52
52
  "@vitest/coverage-v8": "^2.1.1",
53
- "jsr": "^0.13.2",
54
- "pubm": "^0.0.2-14",
53
+ "pubm": "^0.0.2-1",
55
54
  "tsup": "^8.3.0",
56
55
  "typescript": "^5.6.2",
57
56
  "vitest": "^2.1.1"