@alwaysmeticulous/cli 2.5.3 → 2.5.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.
- package/dist/command-utils/command-builder.d.ts +10 -0
- package/dist/command-utils/command-builder.js +19 -0
- package/dist/command-utils/common-options.d.ts +82 -82
- package/dist/commands/bootstrap/bootstrap.command.d.ts +2 -4
- package/dist/commands/bootstrap/bootstrap.command.js +6 -6
- package/dist/commands/create-test/create-test.command.d.ts +76 -7
- package/dist/commands/create-test/create-test.command.js +48 -51
- package/dist/commands/debug-replay/debug-replay.command.d.ts +35 -13
- package/dist/commands/debug-replay/debug-replay.command.js +38 -38
- package/dist/commands/download-replay/download-replay.command.d.ts +10 -7
- package/dist/commands/download-replay/download-replay.command.js +13 -13
- package/dist/commands/download-session/download-session.command.d.ts +10 -7
- package/dist/commands/download-session/download-session.command.js +13 -13
- package/dist/commands/record/record.command.d.ts +37 -2
- package/dist/commands/record/record.command.js +40 -40
- package/dist/commands/replay/replay.command.d.ts +108 -3
- package/dist/commands/replay/replay.command.js +67 -67
- package/dist/commands/run-all-tests/run-all-tests.command.d.ts +90 -17
- package/dist/commands/run-all-tests/run-all-tests.command.js +52 -54
- package/dist/commands/screenshot-diff/screenshot-diff.command.d.ts +26 -9
- package/dist/commands/screenshot-diff/screenshot-diff.command.js +20 -22
- package/dist/commands/serve/serve.command.d.ts +10 -7
- package/dist/commands/serve/serve.command.js +13 -13
- package/dist/commands/show-project/show-project.command.d.ts +6 -6
- package/dist/commands/show-project/show-project.command.js +9 -9
- package/dist/commands/update-tests/update-tests.command.d.ts +21 -9
- package/dist/commands/update-tests/update-tests.command.js +24 -23
- package/dist/commands/upload-build/upload-build.command.d.ts +13 -8
- package/dist/commands/upload-build/upload-build.command.js +16 -16
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +3 -3
|
@@ -8,6 +8,7 @@ const common_1 = require("@alwaysmeticulous/common");
|
|
|
8
8
|
const loglevel_1 = __importDefault(require("loglevel"));
|
|
9
9
|
const client_1 = require("../../api/client");
|
|
10
10
|
const test_run_api_1 = require("../../api/test-run.api");
|
|
11
|
+
const command_builder_1 = require("../../command-utils/command-builder");
|
|
11
12
|
const common_options_1 = require("../../command-utils/common-options");
|
|
12
13
|
const config_1 = require("../../config/config");
|
|
13
14
|
const deflake_tests_handler_1 = require("../../deflake-tests/deflake-tests.handler");
|
|
@@ -16,7 +17,6 @@ const commit_sha_utils_1 = require("../../utils/commit-sha.utils");
|
|
|
16
17
|
const config_utils_1 = require("../../utils/config.utils");
|
|
17
18
|
const github_summary_utils_1 = require("../../utils/github-summary.utils");
|
|
18
19
|
const run_all_tests_utils_1 = require("../../utils/run-all-tests.utils");
|
|
19
|
-
const sentry_utils_1 = require("../../utils/sentry.utils");
|
|
20
20
|
const version_utils_1 = require("../../utils/version.utils");
|
|
21
21
|
const handler = async ({ apiToken, commitSha: commitSha_, appUrl, useAssetsSnapshottedInBaseSimulation, headless, devTools, bypassCSP, diffThreshold, diffPixelThreshold, padTime, shiftTime, networkStubbing, githubSummary, parallelize, parallelTasks, deflake, useCache, testsFile, skipPauses, }) => {
|
|
22
22
|
if (appUrl != null && useAssetsSnapshottedInBaseSimulation) {
|
|
@@ -131,58 +131,56 @@ const handler = async ({ apiToken, commitSha: commitSha_, appUrl, useAssetsSnaps
|
|
|
131
131
|
process.exit(1);
|
|
132
132
|
}
|
|
133
133
|
};
|
|
134
|
-
exports.runAllTests =
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
return value;
|
|
167
|
-
},
|
|
168
|
-
},
|
|
169
|
-
deflake: {
|
|
170
|
-
boolean: true,
|
|
171
|
-
description: "Attempt to deflake failing tests",
|
|
172
|
-
default: false,
|
|
173
|
-
},
|
|
174
|
-
useCache: {
|
|
175
|
-
boolean: true,
|
|
176
|
-
description: "Use result cache",
|
|
177
|
-
default: false,
|
|
178
|
-
},
|
|
179
|
-
testsFile: {
|
|
180
|
-
string: true,
|
|
181
|
-
description: "The path to the meticulous.json file containing the list of tests you want to run." +
|
|
182
|
-
" If not set a search will be performed to find a meticulous.json file in the current directory or the nearest parent directory.",
|
|
134
|
+
exports.runAllTests = (0, command_builder_1.buildCommand)("run-all-tests")
|
|
135
|
+
.details({ describe: "Run all replay test cases" })
|
|
136
|
+
.options({
|
|
137
|
+
apiToken: common_options_1.OPTIONS.apiToken,
|
|
138
|
+
commitSha: common_options_1.OPTIONS.commitSha,
|
|
139
|
+
appUrl: {
|
|
140
|
+
string: true,
|
|
141
|
+
description: "The URL to execute the tests against. If left absent here and in the test cases file, then will use the URL the test was originally recorded against.",
|
|
142
|
+
},
|
|
143
|
+
useAssetsSnapshottedInBaseSimulation: {
|
|
144
|
+
boolean: true,
|
|
145
|
+
description: "If present will run each session against a local server serving up previously snapshotted assets (HTML, JS, CSS etc.)" +
|
|
146
|
+
" from the base simulation/replay the test is comparing against. The sessions will then be replayed against those local urls." +
|
|
147
|
+
" This is an alternative to specifying an appUrl.",
|
|
148
|
+
default: false,
|
|
149
|
+
},
|
|
150
|
+
githubSummary: {
|
|
151
|
+
boolean: true,
|
|
152
|
+
description: "Outputs a summary page for GitHub actions",
|
|
153
|
+
},
|
|
154
|
+
parallelize: {
|
|
155
|
+
boolean: true,
|
|
156
|
+
description: "Run tests in parallel",
|
|
157
|
+
},
|
|
158
|
+
parallelTasks: {
|
|
159
|
+
number: true,
|
|
160
|
+
description: "Number of tasks to run in parallel",
|
|
161
|
+
coerce: (value) => {
|
|
162
|
+
if (typeof value === "number" && value <= 0) {
|
|
163
|
+
return null;
|
|
164
|
+
}
|
|
165
|
+
return value;
|
|
183
166
|
},
|
|
184
|
-
...common_options_1.COMMON_REPLAY_OPTIONS,
|
|
185
|
-
...common_options_1.SCREENSHOT_DIFF_OPTIONS,
|
|
186
167
|
},
|
|
187
|
-
|
|
188
|
-
|
|
168
|
+
deflake: {
|
|
169
|
+
boolean: true,
|
|
170
|
+
description: "Attempt to deflake failing tests",
|
|
171
|
+
default: false,
|
|
172
|
+
},
|
|
173
|
+
useCache: {
|
|
174
|
+
boolean: true,
|
|
175
|
+
description: "Use result cache",
|
|
176
|
+
default: false,
|
|
177
|
+
},
|
|
178
|
+
testsFile: {
|
|
179
|
+
string: true,
|
|
180
|
+
description: "The path to the meticulous.json file containing the list of tests you want to run." +
|
|
181
|
+
" If not set a search will be performed to find a meticulous.json file in the current directory or the nearest parent directory.",
|
|
182
|
+
},
|
|
183
|
+
...common_options_1.COMMON_REPLAY_OPTIONS,
|
|
184
|
+
...common_options_1.SCREENSHOT_DIFF_OPTIONS,
|
|
185
|
+
})
|
|
186
|
+
.handler(handler);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
/// <reference types="yargs" />
|
|
1
2
|
import { AxiosInstance } from "axios";
|
|
2
|
-
import { CommandModule } from "yargs";
|
|
3
3
|
import { ScreenshotDiffOptions } from "../../command-utils/common-types";
|
|
4
4
|
import { CompareImageResult } from "../../image/diff.utils";
|
|
5
5
|
export declare class DiffError extends Error {
|
|
@@ -32,12 +32,29 @@ export declare const diffScreenshots: (options: {
|
|
|
32
32
|
diffOptions: ScreenshotDiffOptions;
|
|
33
33
|
exitOnMismatch: boolean;
|
|
34
34
|
}) => Promise<ScreenshotDiffResult[]>;
|
|
35
|
-
|
|
36
|
-
apiToken
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
35
|
+
export declare const screenshotDiff: import("yargs").CommandModule<unknown, import("yargs").InferredOptionTypes<{
|
|
36
|
+
apiToken: {
|
|
37
|
+
string: true;
|
|
38
|
+
};
|
|
39
|
+
baseSimulationId: {
|
|
40
|
+
string: true;
|
|
41
|
+
demandOption: true;
|
|
42
|
+
alias: string;
|
|
43
|
+
};
|
|
44
|
+
headSimulationId: {
|
|
45
|
+
string: true;
|
|
46
|
+
demandOption: true;
|
|
47
|
+
alias: string;
|
|
48
|
+
};
|
|
49
|
+
threshold: {
|
|
50
|
+
readonly number: true;
|
|
51
|
+
readonly description: "Acceptable maximum proportion of changed pixels, between 0 and 1. If this proportion is exceeded then the test will fail.";
|
|
52
|
+
readonly default: 0.01;
|
|
53
|
+
};
|
|
54
|
+
pixelThreshold: {
|
|
55
|
+
readonly number: true;
|
|
56
|
+
readonly description: "A number between 0 and 1. Color/brightness differences in individual pixels will be ignored if the difference is less than this threshold. A value of 1.0 would accept any difference in color, while a value of 0.0 would accept no difference in color.";
|
|
57
|
+
readonly default: 0.01;
|
|
58
|
+
};
|
|
59
|
+
}>>;
|
|
43
60
|
export {};
|
|
@@ -9,12 +9,12 @@ const common_1 = require("@alwaysmeticulous/common");
|
|
|
9
9
|
const loglevel_1 = __importDefault(require("loglevel"));
|
|
10
10
|
const client_1 = require("../../api/client");
|
|
11
11
|
const replay_api_1 = require("../../api/replay.api");
|
|
12
|
+
const command_builder_1 = require("../../command-utils/command-builder");
|
|
12
13
|
const common_options_1 = require("../../command-utils/common-options");
|
|
13
14
|
const diff_utils_1 = require("../../image/diff.utils");
|
|
14
15
|
const io_utils_1 = require("../../image/io.utils");
|
|
15
16
|
const replays_1 = require("../../local-data/replays");
|
|
16
17
|
const screenshot_diffs_1 = require("../../local-data/screenshot-diffs");
|
|
17
|
-
const sentry_utils_1 = require("../../utils/sentry.utils");
|
|
18
18
|
class DiffError extends Error {
|
|
19
19
|
constructor(message, extras) {
|
|
20
20
|
super(message);
|
|
@@ -145,25 +145,23 @@ const handler = async ({ apiToken, baseSimulationId: baseReplayId, headSimulatio
|
|
|
145
145
|
exitOnMismatch: true,
|
|
146
146
|
});
|
|
147
147
|
};
|
|
148
|
-
exports.screenshotDiff =
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
string: true,
|
|
154
|
-
},
|
|
155
|
-
baseSimulationId: {
|
|
156
|
-
string: true,
|
|
157
|
-
demandOption: true,
|
|
158
|
-
alias: "baseReplayId",
|
|
159
|
-
},
|
|
160
|
-
headSimulationId: {
|
|
161
|
-
string: true,
|
|
162
|
-
demandOption: true,
|
|
163
|
-
alias: "headReplayId",
|
|
164
|
-
},
|
|
165
|
-
threshold: common_options_1.SCREENSHOT_DIFF_OPTIONS.diffThreshold,
|
|
166
|
-
pixelThreshold: common_options_1.SCREENSHOT_DIFF_OPTIONS.diffPixelThreshold,
|
|
148
|
+
exports.screenshotDiff = (0, command_builder_1.buildCommand)("screenshot-diff")
|
|
149
|
+
.details({ describe: "Diff two replay screenshots" })
|
|
150
|
+
.options({
|
|
151
|
+
apiToken: {
|
|
152
|
+
string: true,
|
|
167
153
|
},
|
|
168
|
-
|
|
169
|
-
|
|
154
|
+
baseSimulationId: {
|
|
155
|
+
string: true,
|
|
156
|
+
demandOption: true,
|
|
157
|
+
alias: "baseReplayId",
|
|
158
|
+
},
|
|
159
|
+
headSimulationId: {
|
|
160
|
+
string: true,
|
|
161
|
+
demandOption: true,
|
|
162
|
+
alias: "headReplayId",
|
|
163
|
+
},
|
|
164
|
+
threshold: common_options_1.SCREENSHOT_DIFF_OPTIONS.diffThreshold,
|
|
165
|
+
pixelThreshold: common_options_1.SCREENSHOT_DIFF_OPTIONS.diffPixelThreshold,
|
|
166
|
+
})
|
|
167
|
+
.handler(handler);
|
|
@@ -1,7 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
apiToken
|
|
4
|
-
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
/// <reference types="yargs" />
|
|
2
|
+
export declare const serve: import("yargs").CommandModule<unknown, import("yargs").InferredOptionTypes<{
|
|
3
|
+
apiToken: {
|
|
4
|
+
string: true;
|
|
5
|
+
};
|
|
6
|
+
replayId: {
|
|
7
|
+
string: true;
|
|
8
|
+
demandOption: true;
|
|
9
|
+
};
|
|
10
|
+
}>>;
|
|
@@ -7,25 +7,25 @@ exports.serve = void 0;
|
|
|
7
7
|
const common_1 = require("@alwaysmeticulous/common");
|
|
8
8
|
const loglevel_1 = __importDefault(require("loglevel"));
|
|
9
9
|
const client_1 = require("../../api/client");
|
|
10
|
+
const command_builder_1 = require("../../command-utils/command-builder");
|
|
10
11
|
const serve_assets_from_simulation_1 = require("../../local-data/serve-assets-from-simulation");
|
|
11
|
-
const sentry_utils_1 = require("../../utils/sentry.utils");
|
|
12
12
|
const handler = async ({ apiToken, replayId, }) => {
|
|
13
13
|
const logger = loglevel_1.default.getLogger(common_1.METICULOUS_LOGGER_NAME);
|
|
14
14
|
const client = (0, client_1.createClient)({ apiToken });
|
|
15
15
|
const { url } = await (0, serve_assets_from_simulation_1.serveAssetsFromSimulation)(client, replayId);
|
|
16
16
|
logger.info(`Serving assets at url ${url}`);
|
|
17
17
|
};
|
|
18
|
-
exports.serve =
|
|
19
|
-
|
|
18
|
+
exports.serve = (0, command_builder_1.buildCommand)("serve")
|
|
19
|
+
.details({
|
|
20
20
|
describe: "Spin up a localhost server to serve the assets that were snapshotted when running a particular replay",
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
replayId: {
|
|
26
|
-
string: true,
|
|
27
|
-
demandOption: true,
|
|
28
|
-
},
|
|
21
|
+
})
|
|
22
|
+
.options({
|
|
23
|
+
apiToken: {
|
|
24
|
+
string: true,
|
|
29
25
|
},
|
|
30
|
-
|
|
31
|
-
|
|
26
|
+
replayId: {
|
|
27
|
+
string: true,
|
|
28
|
+
demandOption: true,
|
|
29
|
+
},
|
|
30
|
+
})
|
|
31
|
+
.handler(handler);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
apiToken
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
/// <reference types="yargs" />
|
|
2
|
+
export declare const showProject: import("yargs").CommandModule<unknown, import("yargs").InferredOptionTypes<{
|
|
3
|
+
apiToken: {
|
|
4
|
+
string: true;
|
|
5
|
+
};
|
|
6
|
+
}>>;
|
|
@@ -8,7 +8,7 @@ const common_1 = require("@alwaysmeticulous/common");
|
|
|
8
8
|
const loglevel_1 = __importDefault(require("loglevel"));
|
|
9
9
|
const client_1 = require("../../api/client");
|
|
10
10
|
const project_api_1 = require("../../api/project.api");
|
|
11
|
-
const
|
|
11
|
+
const command_builder_1 = require("../../command-utils/command-builder");
|
|
12
12
|
const handler = async ({ apiToken }) => {
|
|
13
13
|
const logger = loglevel_1.default.getLogger(common_1.METICULOUS_LOGGER_NAME);
|
|
14
14
|
const client = (0, client_1.createClient)({ apiToken });
|
|
@@ -19,13 +19,13 @@ const handler = async ({ apiToken }) => {
|
|
|
19
19
|
}
|
|
20
20
|
logger.info(project);
|
|
21
21
|
};
|
|
22
|
-
exports.showProject =
|
|
23
|
-
|
|
22
|
+
exports.showProject = (0, command_builder_1.buildCommand)("show-project")
|
|
23
|
+
.details({
|
|
24
24
|
describe: "Shows project linked with current API token",
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
25
|
+
})
|
|
26
|
+
.options({
|
|
27
|
+
apiToken: {
|
|
28
|
+
string: true,
|
|
29
29
|
},
|
|
30
|
-
|
|
31
|
-
|
|
30
|
+
})
|
|
31
|
+
.handler(handler);
|
|
@@ -1,9 +1,21 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
apiToken
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
/// <reference types="yargs" />
|
|
2
|
+
export declare const updateTests: import("yargs").CommandModule<unknown, import("yargs").InferredOptionTypes<{
|
|
3
|
+
apiToken: {
|
|
4
|
+
string: true;
|
|
5
|
+
};
|
|
6
|
+
testRunId: {
|
|
7
|
+
string: true;
|
|
8
|
+
demandOption: true;
|
|
9
|
+
description: string;
|
|
10
|
+
};
|
|
11
|
+
accept: {
|
|
12
|
+
string: true;
|
|
13
|
+
array: true;
|
|
14
|
+
description: string;
|
|
15
|
+
};
|
|
16
|
+
acceptAll: {
|
|
17
|
+
boolean: true;
|
|
18
|
+
description: string;
|
|
19
|
+
conflicts: string;
|
|
20
|
+
};
|
|
21
|
+
}>>;
|
|
@@ -8,8 +8,8 @@ const common_1 = require("@alwaysmeticulous/common");
|
|
|
8
8
|
const loglevel_1 = __importDefault(require("loglevel"));
|
|
9
9
|
const client_1 = require("../../api/client");
|
|
10
10
|
const test_run_api_1 = require("../../api/test-run.api");
|
|
11
|
+
const command_builder_1 = require("../../command-utils/command-builder");
|
|
11
12
|
const config_1 = require("../../config/config");
|
|
12
|
-
const sentry_utils_1 = require("../../utils/sentry.utils");
|
|
13
13
|
const handler = async ({ apiToken, testRunId, accept: accept_, acceptAll: acceptAll_, }) => {
|
|
14
14
|
var _a;
|
|
15
15
|
const logger = loglevel_1.default.getLogger(common_1.METICULOUS_LOGGER_NAME);
|
|
@@ -69,27 +69,28 @@ const handler = async ({ apiToken, testRunId, accept: accept_, acceptAll: accept
|
|
|
69
69
|
};
|
|
70
70
|
await (0, config_1.saveConfig)(newConfig);
|
|
71
71
|
};
|
|
72
|
-
exports.updateTests =
|
|
73
|
-
|
|
72
|
+
exports.updateTests = (0, command_builder_1.buildCommand)("update-tests")
|
|
73
|
+
.details({
|
|
74
74
|
describe: "Updates test cases",
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
testRunId: {
|
|
80
|
-
string: true,
|
|
81
|
-
demandOption: true,
|
|
82
|
-
description: "Test run id to fix",
|
|
83
|
-
},
|
|
84
|
-
accept: {
|
|
85
|
-
array: true,
|
|
86
|
-
description: "Replay ids to accept as valid",
|
|
87
|
-
},
|
|
88
|
-
acceptAll: {
|
|
89
|
-
boolean: true,
|
|
90
|
-
description: "Accept all failing tests as valid",
|
|
91
|
-
conflicts: "accept",
|
|
92
|
-
},
|
|
75
|
+
})
|
|
76
|
+
.options({
|
|
77
|
+
apiToken: {
|
|
78
|
+
string: true,
|
|
93
79
|
},
|
|
94
|
-
|
|
95
|
-
|
|
80
|
+
testRunId: {
|
|
81
|
+
string: true,
|
|
82
|
+
demandOption: true,
|
|
83
|
+
description: "Test run id to fix",
|
|
84
|
+
},
|
|
85
|
+
accept: {
|
|
86
|
+
string: true,
|
|
87
|
+
array: true,
|
|
88
|
+
description: "Replay ids to accept as valid",
|
|
89
|
+
},
|
|
90
|
+
acceptAll: {
|
|
91
|
+
boolean: true,
|
|
92
|
+
description: "Accept all failing tests as valid",
|
|
93
|
+
conflicts: "accept",
|
|
94
|
+
},
|
|
95
|
+
})
|
|
96
|
+
.handler(handler);
|
|
@@ -1,8 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
apiToken
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
/// <reference types="yargs" />
|
|
2
|
+
export declare const uploadBuild: import("yargs").CommandModule<unknown, import("yargs").InferredOptionTypes<{
|
|
3
|
+
apiToken: {
|
|
4
|
+
string: true;
|
|
5
|
+
};
|
|
6
|
+
commitSha: {
|
|
7
|
+
string: true;
|
|
8
|
+
};
|
|
9
|
+
dist: {
|
|
10
|
+
string: true;
|
|
11
|
+
demandOption: true;
|
|
12
|
+
};
|
|
13
|
+
}>>;
|
|
@@ -11,8 +11,8 @@ const project_build_api_1 = require("../../api/project-build.api");
|
|
|
11
11
|
const project_api_1 = require("../../api/project.api");
|
|
12
12
|
const upload_1 = require("../../api/upload");
|
|
13
13
|
const archive_1 = require("../../archive/archive");
|
|
14
|
+
const command_builder_1 = require("../../command-utils/command-builder");
|
|
14
15
|
const commit_sha_utils_1 = require("../../utils/commit-sha.utils");
|
|
15
|
-
const sentry_utils_1 = require("../../utils/sentry.utils");
|
|
16
16
|
const handler = async ({ apiToken, commitSha: commitSha_, dist, }) => {
|
|
17
17
|
const logger = loglevel_1.default.getLogger(common_1.METICULOUS_LOGGER_NAME);
|
|
18
18
|
// 1. Print project name
|
|
@@ -69,20 +69,20 @@ const handler = async ({ apiToken, commitSha: commitSha_, dist, }) => {
|
|
|
69
69
|
logger.debug(updatedProjectBuild);
|
|
70
70
|
await (0, archive_1.deleteArchive)(archivePath);
|
|
71
71
|
};
|
|
72
|
-
exports.uploadBuild =
|
|
73
|
-
|
|
72
|
+
exports.uploadBuild = (0, command_builder_1.buildCommand)("upload-build")
|
|
73
|
+
.details({
|
|
74
74
|
describe: "Upload build artifacts to Meticulous",
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
commitSha: {
|
|
80
|
-
string: true,
|
|
81
|
-
},
|
|
82
|
-
dist: {
|
|
83
|
-
string: true,
|
|
84
|
-
demandOption: true,
|
|
85
|
-
},
|
|
75
|
+
})
|
|
76
|
+
.options({
|
|
77
|
+
apiToken: {
|
|
78
|
+
string: true,
|
|
86
79
|
},
|
|
87
|
-
|
|
88
|
-
|
|
80
|
+
commitSha: {
|
|
81
|
+
string: true,
|
|
82
|
+
},
|
|
83
|
+
dist: {
|
|
84
|
+
string: true,
|
|
85
|
+
demandOption: true,
|
|
86
|
+
},
|
|
87
|
+
})
|
|
88
|
+
.handler(handler);
|