@pnpm/releasing.commands 1100.2.15 → 1100.2.16
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.
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import type { Config } from '@pnpm/config.reader';
|
|
2
2
|
import { PnpmError } from '@pnpm/error';
|
|
3
|
+
import type { ExportedManifest } from '@pnpm/releasing.exportable-manifest';
|
|
4
|
+
import type { PublishOptions } from 'libnpmpublish';
|
|
3
5
|
import { type OtpContext } from './otp.js';
|
|
4
6
|
import type { PackResult } from './pack.js';
|
|
5
7
|
export type PublishPackedPkgOptions = Pick<Config, 'configByUri' | 'dryRun' | 'fetchRetries' | 'fetchRetryFactor' | 'fetchRetryMaxtimeout' | 'fetchRetryMintimeout' | 'fetchTimeout' | 'registries' | 'tag' | 'userAgent'> & Partial<Pick<Config, 'ca' | 'cert' | 'httpProxy' | 'httpsProxy' | 'key' | 'localAddress' | 'noProxy' | 'strictSsl'>> & {
|
|
@@ -46,6 +48,11 @@ export declare function publishPackedPkg(packResult: Pick<PackResult, 'published
|
|
|
46
48
|
* https://github.com/pnpm/pnpm/issues/11561).
|
|
47
49
|
*/
|
|
48
50
|
export declare function createPublishContext(opts: PublishPackedPkgOptions): OtpContext;
|
|
51
|
+
/**
|
|
52
|
+
* @internal Exported for unit testing of the access / registry / auth fallback rules. Not part of the package's
|
|
53
|
+
* public API.
|
|
54
|
+
*/
|
|
55
|
+
export declare function createPublishOptions(manifest: ExportedManifest, options: PublishPackedPkgOptions): Promise<PublishOptions>;
|
|
49
56
|
export declare class PublishUnsupportedRegistryProtocolError extends PnpmError {
|
|
50
57
|
readonly registryUrl: string;
|
|
51
58
|
constructor(registryUrl: string);
|
|
@@ -79,13 +79,19 @@ function extractBundledDependencies(manifest) {
|
|
|
79
79
|
return Object.keys(manifest.dependencies ?? {});
|
|
80
80
|
return [];
|
|
81
81
|
}
|
|
82
|
-
|
|
82
|
+
/**
|
|
83
|
+
* @internal Exported for unit testing of the access / registry / auth fallback rules. Not part of the package's
|
|
84
|
+
* public API.
|
|
85
|
+
*/
|
|
86
|
+
export async function createPublishOptions(manifest, options) {
|
|
83
87
|
const publishConfigRegistry = typeof manifest.publishConfig?.registry === 'string'
|
|
84
88
|
? manifest.publishConfig.registry
|
|
85
89
|
: undefined;
|
|
86
90
|
const { registry, config } = findRegistryInfo(manifest, options, publishConfigRegistry);
|
|
87
91
|
const { creds, tls } = config ?? {};
|
|
88
|
-
const
|
|
92
|
+
const publishConfigAccess = manifest.publishConfig?.access;
|
|
93
|
+
const access = options.access ?? (isPublishAccess(publishConfigAccess) ? publishConfigAccess : undefined);
|
|
94
|
+
const { ci: isFromCI, fetchRetries, fetchRetryFactor, fetchRetryMaxtimeout, fetchRetryMintimeout, fetchTimeout: timeout, otp, provenance, provenanceFile, tag: defaultTag, userAgent, } = options;
|
|
89
95
|
const headers = {
|
|
90
96
|
'npm-auth-type': 'web',
|
|
91
97
|
'npm-command': 'publish',
|
|
@@ -133,6 +139,9 @@ async function createPublishOptions(manifest, options) {
|
|
|
133
139
|
pruneUndefined(publishOptions);
|
|
134
140
|
return publishOptions;
|
|
135
141
|
}
|
|
142
|
+
function isPublishAccess(access) {
|
|
143
|
+
return access === 'public' || access === 'restricted';
|
|
144
|
+
}
|
|
136
145
|
/**
|
|
137
146
|
* Find credentials and SSL info for a package's registry.
|
|
138
147
|
* Follows {@link https://docs.npmjs.com/cli/v10/configuring-npm/npmrc#auth-related-configuration}.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pnpm/releasing.commands",
|
|
3
|
-
"version": "1100.2.
|
|
3
|
+
"version": "1100.2.16",
|
|
4
4
|
"description": "Commands for deploy, pack, and publish",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"pnpm",
|
|
@@ -47,35 +47,35 @@
|
|
|
47
47
|
"validate-npm-package-name": "7.0.2",
|
|
48
48
|
"write-json-file": "^7.0.0",
|
|
49
49
|
"write-yaml-file": "^6.0.0",
|
|
50
|
-
"@pnpm/
|
|
50
|
+
"@pnpm/catalogs.types": "1100.0.0",
|
|
51
|
+
"@pnpm/cli.utils": "1101.0.6",
|
|
51
52
|
"@pnpm/cli.common-cli-options-help": "1100.0.1",
|
|
52
|
-
"@pnpm/config.pick-registry-for-package": "1100.0.
|
|
53
|
-
"@pnpm/
|
|
54
|
-
"@pnpm/
|
|
55
|
-
"@pnpm/
|
|
56
|
-
"@pnpm/
|
|
57
|
-
"@pnpm/engine.runtime.commands": "1100.0.15",
|
|
58
|
-
"@pnpm/engine.runtime.node-resolver": "1101.0.9",
|
|
53
|
+
"@pnpm/config.pick-registry-for-package": "1100.0.4",
|
|
54
|
+
"@pnpm/deps.path": "1100.0.4",
|
|
55
|
+
"@pnpm/engine.runtime.node-resolver": "1101.1.0",
|
|
56
|
+
"@pnpm/bins.resolver": "1100.0.4",
|
|
57
|
+
"@pnpm/exec.lifecycle": "1100.0.12",
|
|
59
58
|
"@pnpm/error": "1100.0.0",
|
|
60
|
-
"@pnpm/exec.lifecycle": "1100.0.11",
|
|
61
59
|
"@pnpm/exec.pnpm-cli-runner": "1100.0.1",
|
|
62
|
-
"@pnpm/fs.indexed-pkg-importer": "1100.0.
|
|
63
|
-
"@pnpm/
|
|
64
|
-
"@pnpm/fs.packlist": "1100.0.1",
|
|
60
|
+
"@pnpm/fs.indexed-pkg-importer": "1100.0.9",
|
|
61
|
+
"@pnpm/config.reader": "1101.3.3",
|
|
65
62
|
"@pnpm/fs.is-empty-dir-or-nothing": "1100.0.0",
|
|
66
|
-
"@pnpm/
|
|
67
|
-
"@pnpm/
|
|
68
|
-
"@pnpm/
|
|
69
|
-
"@pnpm/
|
|
70
|
-
"@pnpm/
|
|
63
|
+
"@pnpm/fetching.directory-fetcher": "1100.0.11",
|
|
64
|
+
"@pnpm/lockfile.fs": "1100.1.1",
|
|
65
|
+
"@pnpm/fs.packlist": "1100.0.1",
|
|
66
|
+
"@pnpm/installing.commands": "1100.4.0",
|
|
67
|
+
"@pnpm/lockfile.types": "1100.0.7",
|
|
68
|
+
"@pnpm/network.fetch": "1100.0.6",
|
|
69
|
+
"@pnpm/installing.client": "1100.2.0",
|
|
71
70
|
"@pnpm/network.git-utils": "1100.0.1",
|
|
71
|
+
"@pnpm/resolving.resolver-base": "1100.3.0",
|
|
72
|
+
"@pnpm/releasing.exportable-manifest": "1100.0.7",
|
|
73
|
+
"@pnpm/workspace.projects-filter": "1100.0.13",
|
|
74
|
+
"@pnpm/workspace.projects-sorter": "1100.0.3",
|
|
75
|
+
"@pnpm/types": "1101.1.1",
|
|
76
|
+
"@pnpm/constants": "1100.0.0",
|
|
72
77
|
"@pnpm/network.web-auth": "1101.0.0",
|
|
73
|
-
"@pnpm/
|
|
74
|
-
"@pnpm/types": "1101.1.0",
|
|
75
|
-
"@pnpm/resolving.resolver-base": "1100.2.0",
|
|
76
|
-
"@pnpm/workspace.projects-filter": "1100.0.12",
|
|
77
|
-
"@pnpm/workspace.projects-sorter": "1100.0.2",
|
|
78
|
-
"@pnpm/catalogs.types": "1100.0.0"
|
|
78
|
+
"@pnpm/engine.runtime.commands": "1100.0.16"
|
|
79
79
|
},
|
|
80
80
|
"peerDependencies": {
|
|
81
81
|
"@pnpm/logger": ">=1001.0.0 <1002.0.0"
|
|
@@ -99,13 +99,13 @@
|
|
|
99
99
|
"tar": "^7.5.10",
|
|
100
100
|
"undici": "^7.2.0",
|
|
101
101
|
"write-yaml-file": "^6.0.0",
|
|
102
|
-
"@pnpm/assert-project": "1100.0.9",
|
|
103
102
|
"@pnpm/catalogs.config": "1100.0.0",
|
|
104
|
-
"@pnpm/
|
|
105
|
-
"@pnpm/
|
|
106
|
-
"@pnpm/prepare": "1100.0.
|
|
107
|
-
"@pnpm/releasing.commands": "1100.2.15",
|
|
103
|
+
"@pnpm/releasing.commands": "1100.2.16",
|
|
104
|
+
"@pnpm/hooks.pnpmfile": "1100.0.10",
|
|
105
|
+
"@pnpm/prepare": "1100.0.10",
|
|
108
106
|
"@pnpm/test-fixtures": "1100.0.0",
|
|
107
|
+
"@pnpm/logger": "1100.0.0",
|
|
108
|
+
"@pnpm/assert-project": "1100.0.10",
|
|
109
109
|
"@pnpm/testing.command-defaults": "1100.0.1",
|
|
110
110
|
"@pnpm/test-ipc-server": "1100.0.0"
|
|
111
111
|
},
|