@pnpm/installing.client 1001.1.4 → 1100.0.1
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.
- package/lib/index.d.ts +5 -7
- package/lib/index.js +2 -3
- package/package.json +19 -19
package/lib/index.d.ts
CHANGED
|
@@ -2,30 +2,28 @@ import type { BinaryFetcher, DirectoryFetcher, GitFetcher } from '@pnpm/fetching
|
|
|
2
2
|
import { type TarballFetchers } from '@pnpm/fetching.tarball-fetcher';
|
|
3
3
|
import type { RetryTimeoutOptions } from '@pnpm/fetching.types';
|
|
4
4
|
import type { CustomFetcher, CustomResolver } from '@pnpm/hooks.types';
|
|
5
|
-
import { type
|
|
5
|
+
import { type DispatcherOptions } from '@pnpm/network.fetch';
|
|
6
6
|
import { type ResolveFunction, type ResolverFactoryOptions } from '@pnpm/resolving.default-resolver';
|
|
7
7
|
import type { StoreIndex } from '@pnpm/store.index';
|
|
8
|
-
import type {
|
|
8
|
+
import type { RegistryConfig } from '@pnpm/types';
|
|
9
9
|
export type { ResolveFunction };
|
|
10
10
|
export type ClientOptions = {
|
|
11
|
-
|
|
11
|
+
configByUri: Record<string, RegistryConfig>;
|
|
12
12
|
customResolvers?: CustomResolver[];
|
|
13
13
|
customFetchers?: CustomFetcher[];
|
|
14
14
|
ignoreScripts?: boolean;
|
|
15
|
-
rawConfig: Record<string, string>;
|
|
16
|
-
sslConfigs?: Record<string, SslConfig>;
|
|
17
15
|
retry?: RetryTimeoutOptions;
|
|
18
16
|
storeIndex: StoreIndex;
|
|
19
17
|
timeout?: number;
|
|
18
|
+
nodeDownloadMirrors?: Record<string, string>;
|
|
20
19
|
unsafePerm?: boolean;
|
|
21
20
|
userAgent?: string;
|
|
22
|
-
userConfig?: Record<string, string>;
|
|
23
21
|
gitShallowHosts?: string[];
|
|
24
22
|
resolveSymlinksInInjectedDirs?: boolean;
|
|
25
23
|
includeOnlyPackageFiles?: boolean;
|
|
26
24
|
preserveAbsolutePaths?: boolean;
|
|
27
25
|
fetchMinSpeedKiBps?: number;
|
|
28
|
-
} & ResolverFactoryOptions &
|
|
26
|
+
} & ResolverFactoryOptions & DispatcherOptions;
|
|
29
27
|
export interface Client {
|
|
30
28
|
fetchers: Fetchers;
|
|
31
29
|
resolve: ResolveFunction;
|
package/lib/index.js
CHANGED
|
@@ -7,7 +7,7 @@ import { createFetchFromRegistry } from '@pnpm/network.fetch';
|
|
|
7
7
|
import { createResolver as _createResolver, } from '@pnpm/resolving.default-resolver';
|
|
8
8
|
export function createClient(opts) {
|
|
9
9
|
const fetchFromRegistry = createFetchFromRegistry(opts);
|
|
10
|
-
const getAuthHeader = createGetAuthHeaderByURI(
|
|
10
|
+
const getAuthHeader = createGetAuthHeaderByURI(opts.configByUri, opts.registries?.default);
|
|
11
11
|
const { resolve, clearCache: clearResolutionCache } = _createResolver(fetchFromRegistry, getAuthHeader, { ...opts, customResolvers: opts.customResolvers });
|
|
12
12
|
return {
|
|
13
13
|
fetchers: createFetchers(fetchFromRegistry, getAuthHeader, opts),
|
|
@@ -17,7 +17,7 @@ export function createClient(opts) {
|
|
|
17
17
|
}
|
|
18
18
|
export function createResolver(opts) {
|
|
19
19
|
const fetchFromRegistry = createFetchFromRegistry(opts);
|
|
20
|
-
const getAuthHeader = createGetAuthHeaderByURI(
|
|
20
|
+
const getAuthHeader = createGetAuthHeaderByURI(opts.configByUri, opts.registries?.default);
|
|
21
21
|
return _createResolver(fetchFromRegistry, getAuthHeader, { ...opts, customResolvers: opts.customResolvers });
|
|
22
22
|
}
|
|
23
23
|
function createFetchers(fetchFromRegistry, getAuthHeader, opts) {
|
|
@@ -30,7 +30,6 @@ function createFetchers(fetchFromRegistry, getAuthHeader, opts) {
|
|
|
30
30
|
fetch: fetchFromRegistry,
|
|
31
31
|
fetchFromRemoteTarball: tarballFetchers.remoteTarball,
|
|
32
32
|
offline: opts.offline,
|
|
33
|
-
rawConfig: opts.rawConfig,
|
|
34
33
|
storeIndex: opts.storeIndex,
|
|
35
34
|
}),
|
|
36
35
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pnpm/installing.client",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "1100.0.1",
|
|
4
4
|
"description": "Creates the package resolve and fetch functions",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"pnpm",
|
|
@@ -27,23 +27,23 @@
|
|
|
27
27
|
],
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"ramda": "npm:@pnpm/ramda@0.28.1",
|
|
30
|
-
"@pnpm/fetching.
|
|
31
|
-
"@pnpm/fetching.
|
|
32
|
-
"@pnpm/fetching.
|
|
33
|
-
"@pnpm/fetching.
|
|
34
|
-
"@pnpm/hooks.types": "
|
|
35
|
-
"@pnpm/fetching.
|
|
36
|
-
"@pnpm/network.auth-header": "
|
|
37
|
-
"@pnpm/resolving.default-resolver": "
|
|
38
|
-
"@pnpm/network.fetch": "
|
|
39
|
-
"@pnpm/store.index": "
|
|
40
|
-
"@pnpm/resolving.resolver-base": "
|
|
41
|
-
"@pnpm/types": "
|
|
30
|
+
"@pnpm/fetching.directory-fetcher": "1100.0.1",
|
|
31
|
+
"@pnpm/fetching.git-fetcher": "1100.0.1",
|
|
32
|
+
"@pnpm/fetching.tarball-fetcher": "1100.0.1",
|
|
33
|
+
"@pnpm/fetching.types": "1100.0.0",
|
|
34
|
+
"@pnpm/hooks.types": "1100.0.1",
|
|
35
|
+
"@pnpm/fetching.binary-fetcher": "1100.0.1",
|
|
36
|
+
"@pnpm/network.auth-header": "1100.0.1",
|
|
37
|
+
"@pnpm/resolving.default-resolver": "1100.0.1",
|
|
38
|
+
"@pnpm/network.fetch": "1100.0.1",
|
|
39
|
+
"@pnpm/store.index": "1100.0.0",
|
|
40
|
+
"@pnpm/resolving.resolver-base": "1100.0.1",
|
|
41
|
+
"@pnpm/types": "1101.0.0"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
|
-
"@types/ramda": "0.
|
|
45
|
-
"@pnpm/
|
|
46
|
-
"@pnpm/
|
|
44
|
+
"@types/ramda": "0.31.1",
|
|
45
|
+
"@pnpm/installing.client": "1100.0.1",
|
|
46
|
+
"@pnpm/fetching.fetcher-base": "1100.0.1"
|
|
47
47
|
},
|
|
48
48
|
"engines": {
|
|
49
49
|
"node": ">=22.13"
|
|
@@ -53,8 +53,8 @@
|
|
|
53
53
|
},
|
|
54
54
|
"scripts": {
|
|
55
55
|
"lint": "eslint \"src/**/*.ts\" \"test/**/*.ts\"",
|
|
56
|
-
"
|
|
57
|
-
"
|
|
58
|
-
"
|
|
56
|
+
"test": "pn compile && pn .test",
|
|
57
|
+
"compile": "tsgo --build && pn lint --fix",
|
|
58
|
+
".test": "cross-env NODE_OPTIONS=\"$NODE_OPTIONS --experimental-vm-modules --disable-warning=ExperimentalWarning --disable-warning=DEP0169\" jest"
|
|
59
59
|
}
|
|
60
60
|
}
|