@forge/cli 4.2.0-test.8 → 4.3.0-next.8
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 +118 -3
- package/npm-shrinkwrap.json +903 -538
- package/out/bin/postinstall.js +1 -1
- package/out/command-line/anon-user-id.js +6 -10
- package/out/command-line/cli-prerequisites.d.ts +0 -1
- package/out/command-line/cli-prerequisites.d.ts.map +1 -1
- package/out/command-line/cli-prerequisites.js +1 -24
- package/out/command-line/unique-machine-id.d.ts.map +1 -1
- package/out/command-line/unique-machine-id.js +1 -10
- package/out/command-line/version-info.d.ts +1 -1
- package/out/command-line/version-info.d.ts.map +1 -1
- package/out/command-line/version-info.js +1 -1
- package/out/workers/forge-cli-workers.js +1 -1
- package/package.json +5 -5
- package/out/bin/preinstall.d.ts +0 -3
- package/out/bin/preinstall.d.ts.map +0 -1
- package/out/bin/preinstall.js +0 -9
package/out/bin/postinstall.js
CHANGED
|
@@ -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 =
|
|
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
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli-prerequisites.d.ts","sourceRoot":"","sources":["../../src/command-line/cli-prerequisites.ts"],"names":[],"mappings":"
|
|
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.
|
|
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,
|
|
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);
|
|
@@ -2,7 +2,7 @@ export declare const VERSION_CACHE_KEY = "latest";
|
|
|
2
2
|
export declare const VERSION_CACHE_INTERVAL: number;
|
|
3
3
|
import { CLIDetails } from '@forge/cli-shared';
|
|
4
4
|
export declare const getCLIDetails: () => CLIDetails | undefined;
|
|
5
|
-
export declare const supportedNodeVersion = "
|
|
5
|
+
export declare const supportedNodeVersion = "14.x || 16.x";
|
|
6
6
|
export declare const cacheLatestVersion: (name: string) => Promise<void>;
|
|
7
7
|
export declare const clearVersionCache: (name: string) => void;
|
|
8
8
|
//# sourceMappingURL=version-info.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version-info.d.ts","sourceRoot":"","sources":["../../src/command-line/version-info.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,iBAAiB,WAAW,CAAC;AAC1C,eAAO,MAAM,sBAAsB,QAAsB,CAAC;AAE1D,OAAO,EAAc,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAE3D,eAAO,MAAM,aAAa,QAAO,UAAU,GAAG,SAgB7C,CAAC;AAEF,eAAO,MAAM,oBAAoB,
|
|
1
|
+
{"version":3,"file":"version-info.d.ts","sourceRoot":"","sources":["../../src/command-line/version-info.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,iBAAiB,WAAW,CAAC;AAC1C,eAAO,MAAM,sBAAsB,QAAsB,CAAC;AAE1D,OAAO,EAAc,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAE3D,eAAO,MAAM,aAAa,QAAO,UAAU,GAAG,SAgB7C,CAAC;AAEF,eAAO,MAAM,oBAAoB,iBAAiB,CAAC;AAEnD,eAAO,MAAM,kBAAkB,SAAgB,MAAM,KAAG,OAAO,CAAC,IAAI,CAInE,CAAC;AAEF,eAAO,MAAM,iBAAiB,SAAU,MAAM,SAG7C,CAAC"}
|
|
@@ -22,7 +22,7 @@ exports.getCLIDetails = () => {
|
|
|
22
22
|
return undefined;
|
|
23
23
|
}
|
|
24
24
|
};
|
|
25
|
-
exports.supportedNodeVersion = '
|
|
25
|
+
exports.supportedNodeVersion = '14.x || 16.x';
|
|
26
26
|
exports.cacheLatestVersion = async (name) => {
|
|
27
27
|
const latest = await latest_version_1.default(name);
|
|
28
28
|
const cachedConf = cli_shared_1.CachedConf.getCache(name);
|
|
@@ -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 =
|
|
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.
|
|
3
|
+
"version": "4.3.0-next.8",
|
|
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.
|
|
22
|
-
"@forge/cli-shared": "2.4.
|
|
21
|
+
"@forge/bundler": "3.0.4-next.7",
|
|
22
|
+
"@forge/cli-shared": "2.4.1-next.7",
|
|
23
23
|
"@forge/csp": "^1.10.0",
|
|
24
|
-
"@forge/lint": "3.0.
|
|
25
|
-
"@forge/manifest": "3.
|
|
24
|
+
"@forge/lint": "3.0.5-next.7",
|
|
25
|
+
"@forge/manifest": "3.6.0-next.7",
|
|
26
26
|
"@forge/util": "1.2.0",
|
|
27
27
|
"ajv": "^6.12.5",
|
|
28
28
|
"archiver": "^5.2.0",
|
package/out/bin/preinstall.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"preinstall.d.ts","sourceRoot":"","sources":["../../src/bin/preinstall.ts"],"names":[],"mappings":""}
|
package/out/bin/preinstall.js
DELETED
|
@@ -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();
|