@pnpm/client 8.1.0 → 8.1.2

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 CHANGED
@@ -4,7 +4,7 @@ import { RetryTimeoutOptions } from '@pnpm/fetching-types';
4
4
  import type { CustomFetchers, GitFetcher, DirectoryFetcher } from '@pnpm/fetcher-base';
5
5
  import { TarballFetchers } from '@pnpm/tarball-fetcher';
6
6
  export { ResolveFunction };
7
- export declare type ClientOptions = {
7
+ export type ClientOptions = {
8
8
  authConfig: Record<string, string>;
9
9
  customFetchers?: CustomFetchers;
10
10
  retry?: RetryTimeoutOptions;
@@ -20,7 +20,7 @@ export interface Client {
20
20
  }
21
21
  export declare function createClient(opts: ClientOptions): Client;
22
22
  export declare function createResolver(opts: ClientOptions): ResolveFunction;
23
- declare type Fetchers = {
23
+ type Fetchers = {
24
24
  git: GitFetcher;
25
25
  directory: DirectoryFetcher;
26
26
  } & TarballFetchers;
package/lib/index.js CHANGED
@@ -1,4 +1,7 @@
1
1
  "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
2
5
  Object.defineProperty(exports, "__esModule", { value: true });
3
6
  exports.createResolver = exports.createClient = void 0;
4
7
  const default_resolver_1 = require("@pnpm/default-resolver");
@@ -7,6 +10,7 @@ const directory_fetcher_1 = require("@pnpm/directory-fetcher");
7
10
  const git_fetcher_1 = require("@pnpm/git-fetcher");
8
11
  const tarball_fetcher_1 = require("@pnpm/tarball-fetcher");
9
12
  const network_auth_header_1 = require("@pnpm/network.auth-header");
13
+ const map_1 = __importDefault(require("ramda/src/map"));
10
14
  function createClient(opts) {
11
15
  const fetchFromRegistry = (0, fetch_1.createFetchFromRegistry)(opts);
12
16
  const getAuthHeader = (0, network_auth_header_1.createGetAuthHeaderByURI)({ allSettings: opts.authConfig, userSettings: opts.userConfig });
@@ -28,11 +32,9 @@ function createFetchers(fetchFromRegistry, getAuthHeader, opts, customFetchers)
28
32
  ...(0, git_fetcher_1.createGitFetcher)(opts),
29
33
  ...(0, directory_fetcher_1.createDirectoryFetcher)({ resolveSymlinks: opts.resolveSymlinksInInjectedDirs }),
30
34
  };
31
- const overwrites = Object.entries(customFetchers ?? {})
32
- .reduce((acc, [fetcherName, factory]) => {
33
- acc[fetcherName] = factory({ defaultFetchers });
34
- return acc;
35
- }, {});
35
+ const overwrites = (0, map_1.default)((factory) => factory({ defaultFetchers }), // eslint-disable-line @typescript-eslint/no-explicit-any
36
+ customFetchers ?? {} // eslint-disable-line @typescript-eslint/no-explicit-any
37
+ );
36
38
  return {
37
39
  ...defaultFetchers,
38
40
  ...overwrites,
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,6DAI+B;AAC/B,uCAAmE;AAGnE,+DAAgE;AAChE,mDAAoD;AACpD,2DAA6E;AAC7E,mEAAoE;AAoBpE,SAAgB,YAAY,CAAE,IAAmB;IAC/C,MAAM,iBAAiB,GAAG,IAAA,+BAAuB,EAAC,IAAI,CAAC,CAAA;IACvD,MAAM,aAAa,GAAG,IAAA,8CAAwB,EAAC,EAAE,WAAW,EAAE,IAAI,CAAC,UAAU,EAAE,YAAY,EAAE,IAAI,CAAC,UAAU,EAAE,CAAC,CAAA;IAC/G,OAAO;QACL,QAAQ,EAAE,cAAc,CAAC,iBAAiB,EAAE,aAAa,EAAE,IAAI,EAAE,IAAI,CAAC,cAAc,CAAC;QACrF,OAAO,EAAE,IAAA,iCAAe,EAAC,iBAAiB,EAAE,aAAa,EAAE,IAAI,CAAC;KACjE,CAAA;AACH,CAAC;AAPD,oCAOC;AAED,SAAgB,cAAc,CAAE,IAAmB;IACjD,MAAM,iBAAiB,GAAG,IAAA,+BAAuB,EAAC,IAAI,CAAC,CAAA;IACvD,MAAM,aAAa,GAAG,IAAA,8CAAwB,EAAC,EAAE,W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4
4
  "description": "Creates the package resolve and fetch functions",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",
@@ -11,7 +11,7 @@
11
11
  "engines": {
12
12
  "node": ">=14.6"
13
13
  },
14
- "repository": "https://github.com/pnpm/pnpm/blob/main/packages/client",
14
+ "repository": "https://github.com/pnpm/pnpm/blob/main/pkg-manager/client",
15
15
  "keywords": [
16
16
  "pnpm7",
17
17
  "pnpm",
@@ -22,19 +22,21 @@
22
22
  "bugs": {
23
23
  "url": "https://github.com/pnpm/pnpm/issues"
24
24
  },
25
- "homepage": "https://github.com/pnpm/pnpm/blob/main/packages/client#readme",
25
+ "homepage": "https://github.com/pnpm/pnpm/blob/main/pkg-manager/client#readme",
26
26
  "dependencies": {
27
- "@pnpm/default-resolver": "17.0.1",
28
- "@pnpm/directory-fetcher": "5.1.0",
29
- "@pnpm/fetch": "6.0.3",
27
+ "ramda": "npm:@pnpm/ramda@0.28.1",
28
+ "@pnpm/default-resolver": "17.0.3",
29
+ "@pnpm/directory-fetcher": "5.1.2",
30
+ "@pnpm/fetch": "6.0.4",
30
31
  "@pnpm/fetching-types": "4.0.0",
31
- "@pnpm/git-fetcher": "6.0.2",
32
+ "@pnpm/git-fetcher": "6.0.3",
32
33
  "@pnpm/network.auth-header": "1.0.0",
33
34
  "@pnpm/resolver-base": "9.1.4",
34
- "@pnpm/tarball-fetcher": "13.0.1"
35
+ "@pnpm/tarball-fetcher": "13.0.2"
35
36
  },
36
37
  "devDependencies": {
37
- "@pnpm/client": "8.1.0",
38
+ "@types/ramda": "0.28.20",
39
+ "@pnpm/client": "8.1.2",
38
40
  "@pnpm/fetcher-base": "13.1.4"
39
41
  },
40
42
  "funding": "https://opencollective.com/pnpm",