@salesforce/plugin-info 1.2.0 → 1.2.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/CHANGELOG.md CHANGED
@@ -2,6 +2,12 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
+ ### [1.2.1](https://github.com/salesforcecli/plugin-info/compare/v1.2.0...v1.2.1) (2022-02-10)
6
+
7
+ ### Bug Fixes
8
+
9
+ - proxy support for got ([#75](https://github.com/salesforcecli/plugin-info/issues/75)) ([2d9abef](https://github.com/salesforcecli/plugin-info/commit/2d9abefe045d9fcfde9c79df416e5b809b5461d6))
10
+
5
11
  ## [1.2.0](https://github.com/salesforcecli/plugin-info/compare/v1.1.4...v1.2.0) (2022-01-05)
6
12
 
7
13
  ### Features
package/README.md CHANGED
@@ -108,6 +108,6 @@ EXAMPLES
108
108
  sfdx info:releasenotes:display --version latest
109
109
  ```
110
110
 
111
- _See code: [src/commands/info/releasenotes/display.ts](https://github.com/salesforcecli/plugin-info/blob/v1.1.4/src/commands/info/releasenotes/display.ts)_
111
+ _See code: [src/commands/info/releasenotes/display.ts](https://github.com/salesforcecli/plugin-info/blob/v1.2.0/src/commands/info/releasenotes/display.ts)_
112
112
 
113
113
  <!-- commandsstop -->
@@ -8,11 +8,13 @@
8
8
  Object.defineProperty(exports, "__esModule", { value: true });
9
9
  exports.getDistTagVersion = void 0;
10
10
  const got_1 = require("got");
11
+ const ProxyAgent = require("proxy-agent");
12
+ const proxy_from_env_1 = require("proxy-from-env");
11
13
  const constants_1 = require("../constants");
12
14
  const getDistTagVersion = async (url, distTag) => {
13
15
  // TODO: Could use npm instead here. That way private cli repos could auth with .npmrc
14
16
  // -- could utilize this: https://github.com/salesforcecli/plugin-trust/blob/0393b906a30e8858816625517eda5db69377c178/src/lib/npmCommand.ts
15
- const options = { timeout: constants_1.SFDX_RELEASE_NOTES_TIMEOUT };
17
+ const options = { timeout: constants_1.SFDX_RELEASE_NOTES_TIMEOUT, agent: { https: ProxyAgent((0, proxy_from_env_1.getProxyForUrl)(url)) } };
16
18
  const body = await (0, got_1.default)(url, options).json();
17
19
  // We are only interested in latest and latest-rc, could update this if other tags are desired
18
20
  return distTag.includes('rc') ? body['latest-rc'] : body['latest'];
@@ -1 +1 @@
1
- {"version":3,"file":"getDistTagVersion.js","sourceRoot":"","sources":["../../src/shared/getDistTagVersion.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEH,6BAAsB;AACtB,4CAA0D;AAO1D,MAAM,iBAAiB,GAAG,KAAK,EAAE,GAAW,EAAE,OAAe,EAAmB,EAAE;IAChF,sFAAsF;IACtF,2IAA2I;IAC3I,MAAM,OAAO,GAAG,EAAE,OAAO,EAAE,sCAA0B,EAAE,CAAC;IAExD,MAAM,IAAI,GAAG,MAAM,IAAA,aAAG,EAAC,GAAG,EAAE,OAAO,CAAC,CAAC,IAAI,EAAe,CAAC;IAEzD,8FAA8F;IAC9F,OAAO,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;AACrE,CAAC,CAAC;AAEO,8CAAiB"}
1
+ {"version":3,"file":"getDistTagVersion.js","sourceRoot":"","sources":["../../src/shared/getDistTagVersion.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEH,6BAAsB;AACtB,0CAA0C;AAC1C,mDAAgD;AAChD,4CAA0D;AAO1D,MAAM,iBAAiB,GAAG,KAAK,EAAE,GAAW,EAAE,OAAe,EAAmB,EAAE;IAChF,sFAAsF;IACtF,2IAA2I;IAC3I,MAAM,OAAO,GAAG,EAAE,OAAO,EAAE,sCAA0B,EAAE,KAAK,EAAE,EAAE,KAAK,EAAE,UAAU,CAAC,IAAA,+BAAc,EAAC,GAAG,CAAC,CAAC,EAAE,EAAE,CAAC;IAE3G,MAAM,IAAI,GAAG,MAAM,IAAA,aAAG,EAAC,GAAG,EAAE,OAAO,CAAC,CAAC,IAAI,EAAe,CAAC;IAEzD,8FAA8F;IAC9F,OAAO,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;AACrE,CAAC,CAAC;AAEO,8CAAiB"}
@@ -9,6 +9,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
9
9
  exports.getReleaseNotes = void 0;
10
10
  const got_1 = require("got");
11
11
  const semver_1 = require("semver");
12
+ const proxy_from_env_1 = require("proxy-from-env");
13
+ const ProxyAgent = require("proxy-agent");
12
14
  const constants_1 = require("../constants");
13
15
  const getReleaseNotes = async (base, filename, version) => {
14
16
  const majorVersion = (0, semver_1.major)(version);
@@ -16,6 +18,7 @@ const getReleaseNotes = async (base, filename, version) => {
16
18
  const options = {
17
19
  timeout: constants_1.SFDX_RELEASE_NOTES_TIMEOUT,
18
20
  throwHttpErrors: false,
21
+ agent: { https: ProxyAgent((0, proxy_from_env_1.getProxyForUrl)(rawBase)) },
19
22
  };
20
23
  const getPromises = [
21
24
  (0, got_1.default)(`${rawBase}/v${majorVersion}.md`, options),
@@ -1 +1 @@
1
- {"version":3,"file":"getReleaseNotes.js","sourceRoot":"","sources":["../../src/shared/getReleaseNotes.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEH,6BAAsB;AACtB,mCAA+B;AAC/B,4CAA0D;AAE1D,MAAM,eAAe,GAAG,KAAK,EAAE,IAAY,EAAE,QAAgB,EAAE,OAAe,EAAmB,EAAE;IACjG,MAAM,YAAY,GAAG,IAAA,cAAK,EAAC,OAAO,CAAC,CAAC;IAEpC,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,YAAY,EAAE,2BAA2B,CAAC,CAAC,OAAO,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAC,OA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CAAC,IAAA,+BAAc,EAAC,OAAO,CAAC,CAAC,EAAE;KACtD,CAAC;IAEF,MAAM,WAAW,GAAG;QAClB,IAAA,aAAG,EAAC,GAAG,OAAO,KAAK,YAAY,KAAK,EAAE,OAAO,CAAC;QAC9C,IAAA,aAAG,EAAC,GAAG,OAAO,IAAI,QAAQ,EAAE,EAAE,EAAE,GAAG,OAAO,EAAE,eAAe,EAAE,IAAI,EAAE,CAAC;KACrE,CAAC;IAEF,MAAM,CAAC,SAAS,EAAE,MAAM,CAAC,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;IAE3D,MAAM,EAAE,IAAI,EAAE,GAAG,SAAS,CAAC,UAAU,KAAK,GAAG,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC;IAEnE,OAAO,IAAI,CAAC;AACd,CAAC,CAAC;AAEO,0CAAe"}
@@ -1 +1 @@
1
- {"version":"1.2.0","commands":{"info:releasenotes:display":{"id":"info:releasenotes:display","description":"Display Salesforce CLI release notes on the command line.","usage":"<%= command.id %> [-v <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]","pluginName":"@salesforce/plugin-info","pluginType":"core","aliases":["whatsnew"],"examples":["Display release notes for the currently installed CLI version:"," <%= config.bin %> <%= command.id %>","Display release notes for CLI version 7.120.0:"," <%= config.bin %> <%= command.id %> --version 7.120.0","Display release notes for the CLI version that corresponds to a tag (stable, stable-rc, latest, latest-rc, rc):"," <%= config.bin %> <%= command.id %> --version latest"," "],"flags":{"json":{"name":"json","type":"boolean","description":"format output as json","allowNo":false},"loglevel":{"name":"loglevel","type":"option","description":"logging level for this command invocation","required":false,"helpValue":"(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL)","options":["trace","debug","info","warn","error","fatal","TRACE","DEBUG","INFO","WARN","ERROR","FATAL"],"default":"warn"},"version":{"name":"version","type":"option","char":"v","description":"CLI version or tag for which to display release notes."},"hook":{"name":"hook","type":"boolean","description":"This hidden parameter is used in post install or update hooks.","hidden":true,"allowNo":false}},"args":[]}}}
1
+ {"version":"1.2.1","commands":{"info:releasenotes:display":{"id":"info:releasenotes:display","description":"Display Salesforce CLI release notes on the command line.","usage":"<%= command.id %> [-v <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]","pluginName":"@salesforce/plugin-info","pluginType":"core","aliases":["whatsnew"],"examples":["Display release notes for the currently installed CLI version:"," <%= config.bin %> <%= command.id %>","Display release notes for CLI version 7.120.0:"," <%= config.bin %> <%= command.id %> --version 7.120.0","Display release notes for the CLI version that corresponds to a tag (stable, stable-rc, latest, latest-rc, rc):"," <%= config.bin %> <%= command.id %> --version latest"," "],"flags":{"json":{"name":"json","type":"boolean","description":"format output as json","allowNo":false},"loglevel":{"name":"loglevel","type":"option","description":"logging level for this command invocation","required":false,"helpValue":"(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL)","options":["trace","debug","info","warn","error","fatal","TRACE","DEBUG","INFO","WARN","ERROR","FATAL"],"default":"warn"},"version":{"name":"version","type":"option","char":"v","description":"CLI version or tag for which to display release notes."},"hook":{"name":"hook","type":"boolean","description":"This hidden parameter is used in post install or update hooks.","hidden":true,"allowNo":false}},"args":[]}}}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@salesforce/plugin-info",
3
3
  "description": "Plugin for accessing cli info from the command line",
4
- "version": "1.2.0",
4
+ "version": "1.2.1",
5
5
  "author": "Salesforce",
6
6
  "bugs": "https://github.com/forcedotcom/cli/issues",
7
7
  "dependencies": {
@@ -12,6 +12,8 @@
12
12
  "got": "^11.8.2",
13
13
  "marked": "^4.0.1",
14
14
  "marked-terminal": "^4.2.0",
15
+ "proxy-agent": "^5.0.0",
16
+ "proxy-from-env": "^1.1.0",
15
17
  "semver": "^7.3.5",
16
18
  "tslib": "^2"
17
19
  },
@@ -27,6 +29,7 @@
27
29
  "@types/fs-extra": "^9.0.13",
28
30
  "@types/marked": "^4.0.0",
29
31
  "@types/marked-terminal": "^3.1.3",
32
+ "@types/proxy-from-env": "^1.0.1",
30
33
  "@types/semver": "^7.3.8",
31
34
  "@typescript-eslint/eslint-plugin": "^4.33.0",
32
35
  "@typescript-eslint/parser": "^4.33.0",
@@ -47,7 +50,7 @@
47
50
  "nyc": "^15.1.0",
48
51
  "prettier": "^2.4.1",
49
52
  "pretty-quick": "^3.1.0",
50
- "shx": "0.3.3",
53
+ "shx": "0.3.4",
51
54
  "sinon": "^11.1.1",
52
55
  "sinon-chai": "^3.7.0",
53
56
  "ts-node": "^10.4.0",
@@ -119,7 +122,7 @@
119
122
  "access": "public"
120
123
  },
121
124
  "sfdx": {
122
- "publicKeyUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-info/1.2.0.crt",
123
- "signatureUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-info/1.2.0.sig"
125
+ "publicKeyUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-info/1.2.1.crt",
126
+ "signatureUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-info/1.2.1.sig"
124
127
  }
125
128
  }