@pnpm/store.connection-manager 1100.2.8 → 1100.3.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.
|
@@ -3,7 +3,7 @@ import { type ClientOptions } from '@pnpm/installing.client';
|
|
|
3
3
|
import type { ResolutionVerifier } from '@pnpm/resolving.resolver-base';
|
|
4
4
|
import { type CafsLocker, type StoreController } from '@pnpm/store.controller';
|
|
5
5
|
type CreateResolverOptions = Pick<Config, 'fetchRetries' | 'fetchRetryFactor' | 'fetchRetryMaxtimeout' | 'fetchRetryMintimeout' | 'offline' | 'configByUri' | 'verifyStoreIntegrity'> & Required<Pick<Config, 'cacheDir' | 'storeDir'>>;
|
|
6
|
-
export type CreateNewStoreControllerOptions = CreateResolverOptions & Pick<Config, 'ca' | 'cert' | 'engineStrict' | 'force' | 'nodeDownloadMirrors' | 'nodeVersion' | 'fetchTimeout' | 'fetchWarnTimeoutMs' | 'fetchMinSpeedKiBps' | 'gitShallowHosts' | 'ignoreScripts' | 'httpProxy' | 'httpsProxy' | 'key' | 'localAddress' | 'maxSockets' | 'minimumReleaseAge' | 'minimumReleaseAgeExclude' | 'minimumReleaseAgeIgnoreMissingTime' | 'minimumReleaseAgeStrict' | 'networkConcurrency' | 'noProxy' | 'offline' | 'packageImportMethod' | 'preferOffline' | 'preserveAbsolutePaths' | 'registries' | 'namedRegistries' | 'registrySupportsTimeField' | 'resolutionMode' | 'saveWorkspaceProtocol' | 'strictSsl' | 'trustPolicy' | 'trustPolicyExclude' | 'trustPolicyIgnoreAfter' | 'unsafePerm' | 'userAgent' | 'verifyStoreIntegrity' | 'virtualStoreDirMaxLength'> & Pick<ConfigContext, 'hooks'> & {
|
|
6
|
+
export type CreateNewStoreControllerOptions = CreateResolverOptions & Pick<Config, 'ca' | 'cert' | 'engineStrict' | 'force' | 'frozenStore' | 'nodeDownloadMirrors' | 'nodeVersion' | 'fetchTimeout' | 'fetchWarnTimeoutMs' | 'fetchMinSpeedKiBps' | 'gitShallowHosts' | 'ignoreScripts' | 'httpProxy' | 'httpsProxy' | 'key' | 'localAddress' | 'maxSockets' | 'minimumReleaseAge' | 'minimumReleaseAgeExclude' | 'minimumReleaseAgeIgnoreMissingTime' | 'minimumReleaseAgeStrict' | 'networkConcurrency' | 'noProxy' | 'offline' | 'packageImportMethod' | 'preferOffline' | 'preserveAbsolutePaths' | 'registries' | 'namedRegistries' | 'registrySupportsTimeField' | 'resolutionMode' | 'saveWorkspaceProtocol' | 'strictSsl' | 'trustPolicy' | 'trustPolicyExclude' | 'trustPolicyIgnoreAfter' | 'unsafePerm' | 'userAgent' | 'verifyStoreIntegrity' | 'virtualStoreDirMaxLength'> & Pick<ConfigContext, 'hooks'> & {
|
|
7
7
|
cafsLocker?: CafsLocker;
|
|
8
8
|
ignoreFile?: (filename: string) => boolean;
|
|
9
9
|
fetchFullMetadata?: boolean;
|
|
@@ -2,12 +2,14 @@ import { promises as fs } from 'node:fs';
|
|
|
2
2
|
import { packageManager } from '@pnpm/cli.meta';
|
|
3
3
|
import { createClient } from '@pnpm/installing.client';
|
|
4
4
|
import { createPackageStore } from '@pnpm/store.controller';
|
|
5
|
-
import { StoreIndex } from '@pnpm/store.index';
|
|
5
|
+
import { ReadOnlyStoreIndex, StoreIndex } from '@pnpm/store.index';
|
|
6
6
|
export async function createNewStoreController(opts) {
|
|
7
7
|
const fullMetadata = opts.fetchFullMetadata ?? ((opts.resolutionMode === 'time-based' ||
|
|
8
8
|
opts.trustPolicy === 'no-downgrade') && !opts.registrySupportsTimeField);
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
if (!opts.frozenStore) {
|
|
10
|
+
await fs.mkdir(opts.storeDir, { recursive: true });
|
|
11
|
+
}
|
|
12
|
+
const storeIndex = opts.frozenStore ? new ReadOnlyStoreIndex(opts.storeDir) : new StoreIndex(opts.storeDir);
|
|
11
13
|
const { resolve, fetchers, clearResolutionCache, resolutionVerifiers } = createClient({
|
|
12
14
|
customResolvers: opts.hooks?.customResolvers,
|
|
13
15
|
customFetchers: opts.hooks?.customFetchers,
|
|
@@ -16,6 +18,7 @@ export async function createNewStoreController(opts) {
|
|
|
16
18
|
cacheDir: opts.cacheDir,
|
|
17
19
|
storeDir: opts.storeDir,
|
|
18
20
|
cert: opts.cert,
|
|
21
|
+
frozenStore: opts.frozenStore,
|
|
19
22
|
fetchWarnTimeoutMs: opts.fetchWarnTimeoutMs,
|
|
20
23
|
fetchMinSpeedKiBps: opts.fetchMinSpeedKiBps,
|
|
21
24
|
fullMetadata,
|
|
@@ -78,6 +81,7 @@ export async function createNewStoreController(opts) {
|
|
|
78
81
|
strictStorePkgContentCheck: opts.strictStorePkgContentCheck,
|
|
79
82
|
clearResolutionCache,
|
|
80
83
|
customFetchers: opts.hooks?.customFetchers,
|
|
84
|
+
frozenStore: opts.frozenStore,
|
|
81
85
|
storeIndex,
|
|
82
86
|
}),
|
|
83
87
|
dir: opts.storeDir,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pnpm/store.connection-manager",
|
|
3
|
-
"version": "1100.
|
|
3
|
+
"version": "1100.3.0",
|
|
4
4
|
"description": "Create a pnpm store controller",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"pnpm",
|
|
@@ -28,20 +28,20 @@
|
|
|
28
28
|
],
|
|
29
29
|
"dependencies": {
|
|
30
30
|
"dir-is-case-sensitive": "^3.0.0",
|
|
31
|
-
"@pnpm/
|
|
32
|
-
"@pnpm/
|
|
33
|
-
"@pnpm/
|
|
34
|
-
"@pnpm/
|
|
35
|
-
"@pnpm/
|
|
36
|
-
"@pnpm/store.
|
|
37
|
-
"@pnpm/
|
|
31
|
+
"@pnpm/cli.meta": "1100.0.8",
|
|
32
|
+
"@pnpm/config.reader": "1101.9.0",
|
|
33
|
+
"@pnpm/installing.client": "1100.2.8",
|
|
34
|
+
"@pnpm/resolving.resolver-base": "1100.4.2",
|
|
35
|
+
"@pnpm/store.controller": "1102.0.0",
|
|
36
|
+
"@pnpm/store.index": "1100.2.0",
|
|
37
|
+
"@pnpm/store.path": "1100.0.1"
|
|
38
38
|
},
|
|
39
39
|
"peerDependencies": {
|
|
40
|
-
"@pnpm/logger": "^
|
|
40
|
+
"@pnpm/logger": "^1100.0.0"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"@pnpm/logger": "1100.0.0",
|
|
44
|
-
"@pnpm/store.connection-manager": "1100.
|
|
44
|
+
"@pnpm/store.connection-manager": "1100.3.0"
|
|
45
45
|
},
|
|
46
46
|
"engines": {
|
|
47
47
|
"node": ">=22.13"
|