@revopush/code-push-cli 0.0.4 → 0.0.5
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.
|
@@ -237,11 +237,12 @@ function deploymentHistoryClear(command) {
|
|
|
237
237
|
const deploymentList = (command, showPackage = true) => {
|
|
238
238
|
throwForInvalidOutputFormat(command.format);
|
|
239
239
|
let deployments;
|
|
240
|
+
const DEPLOYMENTS_MAX_LENGTH = 10; // do not take metrics if number of deployment higher than this
|
|
240
241
|
return exports.sdk
|
|
241
242
|
.getDeployments(command.appName)
|
|
242
243
|
.then((retrievedDeployments) => {
|
|
243
244
|
deployments = retrievedDeployments;
|
|
244
|
-
if (showPackage) {
|
|
245
|
+
if (showPackage && deployments.length < DEPLOYMENTS_MAX_LENGTH) {
|
|
245
246
|
const metricsPromises = deployments.map((deployment) => {
|
|
246
247
|
if (deployment.package) {
|
|
247
248
|
return exports.sdk.getDeploymentMetrics(command.appName, deployment.name).then((metrics) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@revopush/code-push-cli",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.5",
|
|
4
4
|
"description": "Management CLI for the CodePush service",
|
|
5
5
|
"main": "./script/cli.js",
|
|
6
6
|
"scripts": {
|
|
@@ -53,20 +53,22 @@
|
|
|
53
53
|
},
|
|
54
54
|
"devDependencies": {
|
|
55
55
|
"@types/express": "^4.17.17",
|
|
56
|
-
"@types/jest": "^29.5.
|
|
57
|
-
"@types/mocha": "^10.0.
|
|
56
|
+
"@types/jest": "^29.5.14",
|
|
57
|
+
"@types/mocha": "^10.0.10",
|
|
58
58
|
"@types/node": "^20.3.1",
|
|
59
|
-
"@types/q": "^1.5.
|
|
59
|
+
"@types/q": "^1.5.8",
|
|
60
60
|
"@types/sinon": "^10.0.15",
|
|
61
61
|
"@typescript-eslint/eslint-plugin": "^6.0.0",
|
|
62
62
|
"@typescript-eslint/parser": "^6.0.0",
|
|
63
63
|
"eslint": "^8.45.0",
|
|
64
64
|
"express": "^4.19.2",
|
|
65
65
|
"mkdirp": "^3.0.1",
|
|
66
|
+
"mocha": "^11.1.0",
|
|
66
67
|
"prettier": "^2.8.8",
|
|
67
68
|
"sinon": "15.1.2",
|
|
68
69
|
"superagent-mock": "^4.0.0",
|
|
69
70
|
"typescript": "^5.1.3",
|
|
71
|
+
"ts-node": "^10.9.2",
|
|
70
72
|
"which": "^3.0.1"
|
|
71
73
|
}
|
|
72
74
|
}
|
|
@@ -323,12 +323,13 @@ function deploymentHistoryClear(command: cli.IDeploymentHistoryClearCommand): Pr
|
|
|
323
323
|
export const deploymentList = (command: cli.IDeploymentListCommand, showPackage: boolean = true): Promise<void> => {
|
|
324
324
|
throwForInvalidOutputFormat(command.format);
|
|
325
325
|
let deployments: Deployment[];
|
|
326
|
+
const DEPLOYMENTS_MAX_LENGTH = 10; // do not take metrics if number of deployment higher than this
|
|
326
327
|
|
|
327
328
|
return sdk
|
|
328
329
|
.getDeployments(command.appName)
|
|
329
330
|
.then((retrievedDeployments: Deployment[]) => {
|
|
330
331
|
deployments = retrievedDeployments;
|
|
331
|
-
if (showPackage) {
|
|
332
|
+
if (showPackage && deployments.length < DEPLOYMENTS_MAX_LENGTH) {
|
|
332
333
|
const metricsPromises: Promise<void>[] = deployments.map((deployment: Deployment) => {
|
|
333
334
|
if (deployment.package) {
|
|
334
335
|
return sdk.getDeploymentMetrics(command.appName, deployment.name).then((metrics: DeploymentMetrics): void => {
|