@pnpm/store.connection-manager 1100.1.2 → 1100.2.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.
@@ -1,8 +1,9 @@
1
1
  import type { Config, ConfigContext } from '@pnpm/config.reader';
2
2
  import { type ClientOptions } from '@pnpm/installing.client';
3
+ import type { ResolutionVerifier } from '@pnpm/resolving.resolver-base';
3
4
  import { type CafsLocker, type StoreController } from '@pnpm/store.controller';
4
5
  type CreateResolverOptions = Pick<Config, 'fetchRetries' | 'fetchRetryFactor' | 'fetchRetryMaxtimeout' | 'fetchRetryMintimeout' | 'offline' | 'configByUri' | 'verifyStoreIntegrity'> & Required<Pick<Config, 'cacheDir' | 'storeDir'>>;
5
- export type CreateNewStoreControllerOptions = CreateResolverOptions & Pick<Config, 'ca' | 'cert' | 'engineStrict' | 'force' | 'nodeDownloadMirrors' | 'nodeVersion' | 'fetchTimeout' | 'fetchWarnTimeoutMs' | 'fetchMinSpeedKiBps' | 'gitShallowHosts' | 'ignoreScripts' | 'httpProxy' | 'httpsProxy' | 'key' | 'localAddress' | 'maxSockets' | 'minimumReleaseAge' | 'minimumReleaseAgeIgnoreMissingTime' | 'minimumReleaseAgeStrict' | 'networkConcurrency' | 'noProxy' | 'offline' | 'packageImportMethod' | 'preferOffline' | 'preserveAbsolutePaths' | 'registries' | 'namedRegistries' | 'registrySupportsTimeField' | 'resolutionMode' | 'saveWorkspaceProtocol' | 'strictSsl' | 'trustPolicy' | 'unsafePerm' | 'userAgent' | 'verifyStoreIntegrity' | 'virtualStoreDirMaxLength'> & Pick<ConfigContext, 'hooks'> & {
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
7
  cafsLocker?: CafsLocker;
7
8
  ignoreFile?: (filename: string) => boolean;
8
9
  fetchFullMetadata?: boolean;
@@ -10,5 +11,6 @@ export type CreateNewStoreControllerOptions = CreateResolverOptions & Pick<Confi
10
11
  export declare function createNewStoreController(opts: CreateNewStoreControllerOptions): Promise<{
11
12
  ctrl: StoreController;
12
13
  dir: string;
14
+ resolutionVerifiers: ResolutionVerifier[];
13
15
  }>;
14
16
  export {};
@@ -8,7 +8,7 @@ export async function createNewStoreController(opts) {
8
8
  opts.trustPolicy === 'no-downgrade') && !opts.registrySupportsTimeField);
9
9
  await fs.mkdir(opts.storeDir, { recursive: true });
10
10
  const storeIndex = new StoreIndex(opts.storeDir);
11
- const { resolve, fetchers, clearResolutionCache } = createClient({
11
+ const { resolve, fetchers, clearResolutionCache, resolutionVerifiers } = createClient({
12
12
  customResolvers: opts.hooks?.customResolvers,
13
13
  customFetchers: opts.hooks?.customFetchers,
14
14
  unsafePerm: opts.unsafePerm,
@@ -49,8 +49,13 @@ export async function createNewStoreController(opts) {
49
49
  includeOnlyPackageFiles: !opts.deployAllFiles,
50
50
  saveWorkspaceProtocol: opts.saveWorkspaceProtocol,
51
51
  preserveAbsolutePaths: opts.preserveAbsolutePaths,
52
- strictPublishedByCheck: Boolean(opts.minimumReleaseAge) && opts.minimumReleaseAgeStrict === true,
53
52
  ignoreMissingTimeField: opts.minimumReleaseAgeIgnoreMissingTime,
53
+ minimumReleaseAge: opts.minimumReleaseAge,
54
+ minimumReleaseAgeStrict: opts.minimumReleaseAgeStrict,
55
+ minimumReleaseAgeExclude: opts.minimumReleaseAgeExclude,
56
+ trustPolicy: opts.trustPolicy,
57
+ trustPolicyExclude: opts.trustPolicyExclude,
58
+ trustPolicyIgnoreAfter: opts.trustPolicyIgnoreAfter,
54
59
  storeIndex,
55
60
  });
56
61
  return {
@@ -76,6 +81,7 @@ export async function createNewStoreController(opts) {
76
81
  storeIndex,
77
82
  }),
78
83
  dir: opts.storeDir,
84
+ resolutionVerifiers,
79
85
  };
80
86
  }
81
87
  //# sourceMappingURL=createNewStoreController.js.map
package/lib/index.d.ts CHANGED
@@ -1,16 +1,13 @@
1
1
  import type { Config } from '@pnpm/config.reader';
2
+ import type { ResolutionVerifier } from '@pnpm/resolving.resolver-base';
2
3
  import type { StoreController } from '@pnpm/store.controller';
3
4
  import { createNewStoreController, type CreateNewStoreControllerOptions } from './createNewStoreController.js';
4
5
  export { createNewStoreController };
5
6
  export type CreateStoreControllerOptions = Omit<CreateNewStoreControllerOptions, 'storeDir'> & Pick<Config, 'storeDir' | 'dir' | 'pnpmHomeDir' | 'workspaceDir'>;
6
- export declare function createStoreControllerCached(storeControllerCache: Map<string, Promise<{
7
+ export interface StoreControllerHandle {
7
8
  ctrl: StoreController;
8
9
  dir: string;
9
- }>>, opts: CreateStoreControllerOptions): Promise<{
10
- ctrl: StoreController;
11
- dir: string;
12
- }>;
13
- export declare function createStoreController(opts: CreateStoreControllerOptions): Promise<{
14
- ctrl: StoreController;
15
- dir: string;
16
- }>;
10
+ resolutionVerifiers: ResolutionVerifier[];
11
+ }
12
+ export declare function createStoreControllerCached(storeControllerCache: Map<string, Promise<StoreControllerHandle>>, opts: CreateStoreControllerOptions): Promise<StoreControllerHandle>;
13
+ export declare function createStoreController(opts: CreateStoreControllerOptions): Promise<StoreControllerHandle>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pnpm/store.connection-manager",
3
- "version": "1100.1.2",
3
+ "version": "1100.2.0",
4
4
  "description": "Create a pnpm store controller",
5
5
  "keywords": [
6
6
  "pnpm",
@@ -25,19 +25,20 @@
25
25
  ],
26
26
  "dependencies": {
27
27
  "dir-is-case-sensitive": "^3.0.0",
28
+ "@pnpm/installing.client": "1100.1.0",
29
+ "@pnpm/cli.meta": "1100.0.3",
30
+ "@pnpm/config.reader": "1101.3.2",
31
+ "@pnpm/resolving.resolver-base": "1100.2.0",
28
32
  "@pnpm/store.index": "1100.1.0",
29
33
  "@pnpm/store.path": "1100.0.1",
30
- "@pnpm/store.controller": "1101.0.6",
31
- "@pnpm/config.reader": "1101.3.1",
32
- "@pnpm/cli.meta": "1100.0.3",
33
- "@pnpm/installing.client": "1100.0.15"
34
+ "@pnpm/store.controller": "1101.0.7"
34
35
  },
35
36
  "peerDependencies": {
36
37
  "@pnpm/logger": ">=1001.0.0 <1002.0.0"
37
38
  },
38
39
  "devDependencies": {
39
- "@pnpm/logger": "1100.0.0",
40
- "@pnpm/store.connection-manager": "1100.1.2"
40
+ "@pnpm/store.connection-manager": "1100.2.0",
41
+ "@pnpm/logger": "1100.0.0"
41
42
  },
42
43
  "engines": {
43
44
  "node": ">=22.13"