@reliverse/publish 2.2.8 → 2.2.9

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/mod.js +10 -2
  2. package/package.json +8 -7
package/dist/mod.js CHANGED
@@ -14,6 +14,7 @@ import {
14
14
  import { re } from "@reliverse/relico";
15
15
  import { logger } from "@reliverse/relinka";
16
16
  import { readPackageJSON, writePackageJSON } from "@reliverse/typerso";
17
+ import { config } from "dotenv";
17
18
  const THROW_2FA_ERROR = false;
18
19
  let hasShown2FATip = false;
19
20
  async function runBunPublishCommand(packagePath, args, verbose, withNpmLogs) {
@@ -106,7 +107,7 @@ Error: Publishing timed out after 5 minutes. This may indicate an authentication
106
107
  );
107
108
  }
108
109
  throw new Error(
109
- "2FA authentication required. The publish command cannot read OTP input when output is captured. Please either:\n 1. Set NPM_CONFIG_TOKEN environment variable with your npm token (note: .env files are not automatically loaded - export it in your shell or use a tool like dotenv-cli), or\n 2. Use --with-npm-logs flag to allow interactive OTP input."
110
+ "2FA authentication required. The publish command cannot read OTP input when output is captured. Please either:\n 1. Set NPM_CONFIG_TOKEN environment variable with your npm token (.env files are automatically loaded), or\n 2. Use --with-npm-logs flag to allow interactive OTP input."
110
111
  );
111
112
  }
112
113
  return { stdout, stderr, exitCode };
@@ -888,7 +889,7 @@ ${re.bold(`Use --skip-tip-2fa to skip this information and the 3s wait.
888
889
  );
889
890
  }
890
891
  throw new Error(
891
- "2FA authentication required. The publish command cannot read OTP input when output is captured. Please either:\n 1. Set NPM_CONFIG_TOKEN environment variable with your npm token (note: .env files are not automatically loaded - export it in your shell or use a tool like dotenv-cli), or\n 2. Use --with-npm-logs flag to allow interactive OTP input."
892
+ "2FA authentication required. The publish command cannot read OTP input when output is captured. Please either:\n 1. Set NPM_CONFIG_TOKEN environment variable with your npm token (.env files are automatically loaded), or\n 2. Use --with-npm-logs flag to allow interactive OTP input."
892
893
  );
893
894
  }
894
895
  throw new Error(
@@ -1021,6 +1022,13 @@ ${re.bold(`Use --skip-tip-2fa to skip this information and the 3s wait.
1021
1022
  }
1022
1023
  export async function publishAllPackages(cwd, ignore, options = {}) {
1023
1024
  try {
1025
+ const monorepoRoot = cwd ? resolve(cwd) : await findMonorepoRoot(process.cwd());
1026
+ if (monorepoRoot) {
1027
+ config({ path: resolve(monorepoRoot, ".env") });
1028
+ config({ path: resolve(monorepoRoot, ".env.local") });
1029
+ }
1030
+ config({ path: resolve(process.cwd(), ".env") });
1031
+ config({ path: resolve(process.cwd(), ".env.local") });
1024
1032
  if (options.verbose) {
1025
1033
  logger.debug(`Starting publishAllPackages, cwd: ${cwd ?? "current"}`);
1026
1034
  if (options.filter) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reliverse/publish",
3
- "version": "2.2.8",
3
+ "version": "2.2.9",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "exports": {
@@ -11,12 +11,13 @@
11
11
  },
12
12
  "dependencies": {
13
13
  "c12": "^3.3.3",
14
- "@reliverse/typerso": "2.2.8",
15
- "@reliverse/config": "2.2.8",
16
- "@reliverse/relinka": "2.2.8",
17
- "@reliverse/bump": "2.2.9",
18
- "@reliverse/relico": "2.2.8",
19
- "@reliverse/build": "2.2.8"
14
+ "dotenv": "^17.2.3",
15
+ "@reliverse/typerso": "2.2.9",
16
+ "@reliverse/config": "2.2.9",
17
+ "@reliverse/relinka": "2.2.9",
18
+ "@reliverse/bump": "2.2.10",
19
+ "@reliverse/relico": "2.2.9",
20
+ "@reliverse/build": "2.2.9"
20
21
  },
21
22
  "publishConfig": {
22
23
  "access": "public"