@forge/cli 4.2.0-test.8 → 4.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.
package/CHANGELOG.md CHANGED
@@ -1,11 +1,39 @@
1
1
  # @forge/cli
2
2
 
3
- ## 4.2.0-test.8
3
+ ## 4.2.0
4
+
5
+ ### Minor Changes
6
+
7
+ - f33aada: Fix vulnerability dependencies
8
+
9
+ ### Patch Changes
10
+
11
+ - Updated dependencies [3d82376]
12
+ - Updated dependencies [d094c69]
13
+ - Updated dependencies [ba674590]
14
+ - Updated dependencies [f33aada]
15
+ - Updated dependencies [f3ac287]
16
+ - Updated dependencies [d196b41]
17
+ - Updated dependencies [e411a29]
18
+ - Updated dependencies [0accde8]
19
+ - Updated dependencies [a3bfe81]
20
+ - Updated dependencies [02839be]
21
+ - Updated dependencies [ffb508a]
22
+ - Updated dependencies [726ef79]
23
+ - @forge/manifest@3.5.0
24
+ - @forge/cli-shared@2.4.0
25
+ - @forge/lint@3.0.4
26
+ - @forge/bundler@3.0.3
27
+
28
+ ## 4.2.0-next.8
4
29
 
5
30
  ### Patch Changes
6
31
 
7
- - Updated dependencies [0ec916f]
8
- - @forge/bundler@3.1.0-test.8
32
+ - Updated dependencies [3d82376]
33
+ - @forge/manifest@3.5.0-next.7
34
+ - @forge/cli-shared@2.4.0-next.8
35
+ - @forge/lint@3.0.4-next.8
36
+ - @forge/bundler@3.0.3-next.8
9
37
 
10
38
  ## 4.2.0-next.7
11
39
 
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@forge/cli",
3
- "version": "4.2.0-test.8",
3
+ "version": "4.2.0",
4
4
  "lockfileVersion": 1,
5
5
  "requires": true,
6
6
  "dependencies": {
@@ -431,9 +431,9 @@
431
431
  "integrity": "sha512-+GFtFqBhFzwKaKmeEfw1jWQgZJNX4q11CCx1fSPFJB49Fdjb7k3lx74jAyzHlX0UWnm6DMK+/cYT7j5t6G9LfA=="
432
432
  },
433
433
  "@forge/bundler": {
434
- "version": "3.1.0-test.8",
435
- "resolved": "https://registry.npmjs.org/@forge/bundler/-/bundler-3.1.0-test.8.tgz",
436
- "integrity": "sha512-Y1XR/CaVKlE7jYDSvbHiLltbGbl2ZhjNLe3m+NW2MLz3/x+ig/lgYKl4xWUj060xdd3X30kYuR1SW1Izq651yA==",
434
+ "version": "3.0.3",
435
+ "resolved": "https://registry.npmjs.org/@forge/bundler/-/bundler-3.0.3.tgz",
436
+ "integrity": "sha512-CticS5OxeXVq/bXipbyz1xClwZs7TNl+Y0mMMMNQ2++0ljDse4mVeFiWTje6CBsJwzCkqS9azMDEur1LJhvQWQ==",
437
437
  "requires": {
438
438
  "@babel/core": "^7.16.7",
439
439
  "@babel/plugin-proposal-class-properties": "^7.16.7",
@@ -443,8 +443,8 @@
443
443
  "@babel/preset-typescript": "^7.16.7",
444
444
  "@forge/api": "2.6.1",
445
445
  "@forge/babel-plugin-transform-ui": "1.1.0",
446
- "@forge/cli-shared": "2.4.0-next.7",
447
- "@forge/lint": "3.0.4-next.7",
446
+ "@forge/cli-shared": "2.4.0",
447
+ "@forge/lint": "3.0.4",
448
448
  "assert": "^1.1.1",
449
449
  "babel-loader": "^8.2.3",
450
450
  "browserify-zlib": "^0.2.0",
@@ -472,11 +472,11 @@
472
472
  }
473
473
  },
474
474
  "@forge/cli-shared": {
475
- "version": "2.4.0-next.7",
476
- "resolved": "https://registry.npmjs.org/@forge/cli-shared/-/cli-shared-2.4.0-next.7.tgz",
477
- "integrity": "sha512-yklMSfB88kU+GZuDPocdE3Nr2NRXcuouctzJ72yFXdLOCK1mZbDbHI5oSi1Vq0/blze6iHwxDss7PJ15znrPDw==",
475
+ "version": "2.4.0",
476
+ "resolved": "https://registry.npmjs.org/@forge/cli-shared/-/cli-shared-2.4.0.tgz",
477
+ "integrity": "sha512-icv+WJOqAk1qw1xhsfvmfx+vo0wa+cBzOYA8kolKU7oApIcLRRRjZMq3H0hpzHEI7DdDEkVoN+1fvZg3EZy5ZQ==",
478
478
  "requires": {
479
- "@forge/manifest": "3.5.0-next.6",
479
+ "@forge/manifest": "3.5.0",
480
480
  "@forge/util": "1.2.0",
481
481
  "array.prototype.flatmap": "^1.2.3",
482
482
  "case": "^1.6.2",
@@ -516,13 +516,13 @@
516
516
  }
517
517
  },
518
518
  "@forge/lint": {
519
- "version": "3.0.4-next.7",
520
- "resolved": "https://registry.npmjs.org/@forge/lint/-/lint-3.0.4-next.7.tgz",
521
- "integrity": "sha512-JJQxqAp0pliFZAuqquTkXsczXE0nlGrGR/DfV4X9UDgtCZiD4O65yfq9BwXBqO+u4xQcWW2nRXUgTV2+ZyvwHg==",
519
+ "version": "3.0.4",
520
+ "resolved": "https://registry.npmjs.org/@forge/lint/-/lint-3.0.4.tgz",
521
+ "integrity": "sha512-FAvVMjjL8ISX1zGWu1EM53EsuiKoVxhPT3vbsZdb2yutSqn4PqCMRsOrQMArNAhp5PMsJV8/Nooa0NYX928seA==",
522
522
  "requires": {
523
- "@forge/cli-shared": "2.4.0-next.7",
523
+ "@forge/cli-shared": "2.4.0",
524
524
  "@forge/csp": "1.10.0",
525
- "@forge/manifest": "3.5.0-next.6",
525
+ "@forge/manifest": "3.5.0",
526
526
  "@typescript-eslint/typescript-estree": "^3.5.0",
527
527
  "atlassian-openapi": "^1.0.13",
528
528
  "cross-spawn": "^7.0.1",
@@ -530,9 +530,9 @@
530
530
  }
531
531
  },
532
532
  "@forge/manifest": {
533
- "version": "3.5.0-next.6",
534
- "resolved": "https://registry.npmjs.org/@forge/manifest/-/manifest-3.5.0-next.6.tgz",
535
- "integrity": "sha512-VTRwbcs04dx3h/apTETPuEHPmBOnk0hiYq+b5pUWsW40p+YIueDcWTFz1TGHjT5HVTvZC3lRPKi3+1UlURKO1A==",
533
+ "version": "3.5.0",
534
+ "resolved": "https://registry.npmjs.org/@forge/manifest/-/manifest-3.5.0.tgz",
535
+ "integrity": "sha512-2OgrsejwaMsg6pAu5d1B8W4Mviz2sTZBp4nYdx9dpavcalI6PHNs2fksuAbrdrGvpsslcJvhG2AyeG4D/CzcZw==",
536
536
  "requires": {
537
537
  "@forge/util": "1.2.0",
538
538
  "ajv": "^6.12.5",
@@ -10,7 +10,7 @@ const isSupportedShell_1 = require("../autocomplete/isSupportedShell");
10
10
  const unique_machine_id_1 = require("../command-line/unique-machine-id");
11
11
  const cached_config_service_1 = require("../service/cached-config-service");
12
12
  const ui = new cli_shared_1.CommandLineUI(() => true);
13
- const cachedConf = new cli_shared_1.CachedConf(unique_machine_id_1.FORGE_CLI_PACKAGE);
13
+ const cachedConf = cli_shared_1.CachedConf.getCache(unique_machine_id_1.FORGE_CLI_PACKAGE);
14
14
  const configService = new cached_config_service_1.CachedConfigService(cachedConf);
15
15
  const analyticsClientReporter = new analytics_client_1.AnalyticsClientReporter(new local_file_storage_1.LocalFileStorage(), ui, configService);
16
16
  const cliDetails = version_info_1.getCLIDetails();
@@ -7,15 +7,11 @@ const cli_shared_1 = require("@forge/cli-shared");
7
7
  const ANON_ID_CACHE_KEY = 'anonId';
8
8
  function getAnonId(createNew = false) {
9
9
  const cachedConf = cli_shared_1.CachedConf.getCache('@forge/cli');
10
- const storedAnonId = cachedConf.get(ANON_ID_CACHE_KEY);
11
- if (storedAnonId) {
12
- return storedAnonId;
13
- }
14
- if (!createNew) {
15
- return undefined;
16
- }
17
- const generatedAnonId = uuid_1.default();
18
- cachedConf.set(ANON_ID_CACHE_KEY, generatedAnonId);
19
- return generatedAnonId;
10
+ return cachedConf.cached(ANON_ID_CACHE_KEY, () => {
11
+ if (!createNew) {
12
+ return undefined;
13
+ }
14
+ return uuid_1.default();
15
+ });
20
16
  }
21
17
  exports.getAnonId = getAnonId;
@@ -1,3 +1,2 @@
1
1
  export declare function checkNodeVersion(): void;
2
- export declare function checkPythonVersion(): Promise<void>;
3
2
  //# sourceMappingURL=cli-prerequisites.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"cli-prerequisites.d.ts","sourceRoot":"","sources":["../../src/command-line/cli-prerequisites.ts"],"names":[],"mappings":"AAMA,wBAAgB,gBAAgB,IAAI,IAAI,CAYvC;AAED,wBAAgB,kBAAkB,IAAI,OAAO,CAAC,IAAI,CAAC,CAyBlD"}
1
+ {"version":3,"file":"cli-prerequisites.d.ts","sourceRoot":"","sources":["../../src/command-line/cli-prerequisites.ts"],"names":[],"mappings":"AAKA,wBAAgB,gBAAgB,IAAI,IAAI,CAYvC"}
@@ -1,7 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.checkPythonVersion = exports.checkNodeVersion = void 0;
4
- const child_process_1 = require("child_process");
3
+ exports.checkNodeVersion = void 0;
5
4
  const semver_1 = require("semver");
6
5
  const version_info_1 = require("./version-info");
7
6
  const cli_shared_1 = require("@forge/cli-shared");
@@ -18,25 +17,3 @@ function checkNodeVersion() {
18
17
  }
19
18
  }
20
19
  exports.checkNodeVersion = checkNodeVersion;
21
- function checkPythonVersion() {
22
- return new Promise((resolve) => {
23
- const opts = `-c "import platform; print(platform.python_version())"`;
24
- let command = `python ${opts} || python2.7 ${opts}`;
25
- if (process.env.PYTHON) {
26
- command = `${process.env.PYTHON} ${opts}`;
27
- }
28
- child_process_1.exec(command, (err, stdout) => {
29
- if (err) {
30
- console.error(cli_shared_1.Text.error.failedGettingPythonVersion(err));
31
- process.exit(1);
32
- }
33
- const pythonVersion = stdout.trim();
34
- if (!pythonVersion.startsWith('2.')) {
35
- console.error(cli_shared_1.Text.error.invalidPythonVersion(pythonVersion));
36
- process.exit(1);
37
- }
38
- resolve();
39
- });
40
- });
41
- }
42
- exports.checkPythonVersion = checkPythonVersion;
@@ -1 +1 @@
1
- {"version":3,"file":"unique-machine-id.d.ts","sourceRoot":"","sources":["../../src/command-line/unique-machine-id.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,iBAAiB,eAAe,CAAC;AAW9C,eAAO,MAAM,YAAY,QAAO,MAS/B,CAAC"}
1
+ {"version":3,"file":"unique-machine-id.d.ts","sourceRoot":"","sources":["../../src/command-line/unique-machine-id.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,iBAAiB,eAAe,CAAC;AAW9C,eAAO,MAAM,YAAY,QAAO,MACgE,CAAC"}
@@ -15,13 +15,4 @@ const generateMachineId = () => {
15
15
  return uuid_1.default();
16
16
  }
17
17
  };
18
- exports.getMachineId = () => {
19
- const cachedConf = cli_shared_1.CachedConf.getCache(exports.FORGE_CLI_PACKAGE);
20
- const storedMachineId = cachedConf.get(MACHINE_ID_CACHE_KEY);
21
- if (storedMachineId) {
22
- return storedMachineId;
23
- }
24
- const newMachineId = generateMachineId();
25
- cachedConf.set(MACHINE_ID_CACHE_KEY, newMachineId);
26
- return newMachineId;
27
- };
18
+ exports.getMachineId = () => cli_shared_1.CachedConf.getCache(exports.FORGE_CLI_PACKAGE).cached(MACHINE_ID_CACHE_KEY, generateMachineId);
@@ -9,7 +9,7 @@ const cached_config_service_1 = require("../service/cached-config-service");
9
9
  const cli_shared_1 = require("@forge/cli-shared");
10
10
  const unique_machine_id_1 = require("../command-line/unique-machine-id");
11
11
  const workerInfo = JSON.parse(process.argv[2]);
12
- const cachedConf = new cli_shared_1.CachedConf(unique_machine_id_1.FORGE_CLI_PACKAGE);
12
+ const cachedConf = cli_shared_1.CachedConf.getCache(unique_machine_id_1.FORGE_CLI_PACKAGE);
13
13
  const cachedConfigService = new cached_config_service_1.CachedConfigService(cachedConf);
14
14
  const ALL_WORKERS = [
15
15
  new analytics_message_worker_1.AnalyticsMessageWorker(new local_file_storage_1.LocalFileStorage(), new analytics_message_handler_1.AnalyticsMessageHandler(workerInfo ? workerInfo.environment : undefined), cachedConfigService),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@forge/cli",
3
- "version": "4.2.0-test.8",
3
+ "version": "4.2.0",
4
4
  "description": "A command line interface for managing Atlassian-hosted apps",
5
5
  "author": "Atlassian",
6
6
  "license": "UNLICENSED",
@@ -18,11 +18,11 @@
18
18
  "postinstall": "node -e \"process.exitCode = fs.existsSync('./out/bin/postinstall.js')\" || node ./out/bin/postinstall.js"
19
19
  },
20
20
  "dependencies": {
21
- "@forge/bundler": "3.1.0-test.8",
22
- "@forge/cli-shared": "2.4.0-next.7",
21
+ "@forge/bundler": "3.0.3",
22
+ "@forge/cli-shared": "2.4.0",
23
23
  "@forge/csp": "^1.10.0",
24
- "@forge/lint": "3.0.4-next.7",
25
- "@forge/manifest": "3.5.0-next.6",
24
+ "@forge/lint": "3.0.4",
25
+ "@forge/manifest": "3.5.0",
26
26
  "@forge/util": "1.2.0",
27
27
  "ajv": "^6.12.5",
28
28
  "archiver": "^5.2.0",
@@ -1,3 +0,0 @@
1
- #!/usr/bin/env node
2
- export {};
3
- //# sourceMappingURL=preinstall.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"preinstall.d.ts","sourceRoot":"","sources":["../../src/bin/preinstall.ts"],"names":[],"mappings":""}
@@ -1,9 +0,0 @@
1
- #!/usr/bin/env node
2
- "use strict";
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- const cli_prerequisites_1 = require("../command-line/cli-prerequisites");
5
- async function main() {
6
- cli_prerequisites_1.checkNodeVersion();
7
- await cli_prerequisites_1.checkPythonVersion();
8
- }
9
- main();