@intuned/runtime-dev 1.3.8-deploy.10 → 1.3.8-deploy.12
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.
|
@@ -16,10 +16,9 @@ var _constants2 = require("../../../common/constants");
|
|
|
16
16
|
var _path = _interopRequireDefault(require("path"));
|
|
17
17
|
var fs = _interopRequireWildcard(require("fs-extra"));
|
|
18
18
|
var _prompts = _interopRequireDefault(require("prompts"));
|
|
19
|
-
|
|
19
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
20
20
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
21
21
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
22
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
23
22
|
async function runDeployProject(projectName, auth) {
|
|
24
23
|
const result = await (0, _save.runSaveProject)(projectName, auth);
|
|
25
24
|
const shouldPromptFirstRunExperience = result?.state === "UNPUBLISHED";
|
|
@@ -112,14 +111,15 @@ async function runDeployProject(projectName, auth) {
|
|
|
112
111
|
const jobsUrl = `${projectUrl}/jobs`;
|
|
113
112
|
const runsPlaygroundUrl = `${runsUrl}?playground=open`;
|
|
114
113
|
const defaultJobTriggerUrl = `${jobsUrl}/default?action=trigger`;
|
|
115
|
-
|
|
116
|
-
|
|
114
|
+
const terminalLink = (await Promise.resolve().then(() => _interopRequireWildcard(require("terminal-link")))).default;
|
|
115
|
+
if (terminalLink.isSupported) {
|
|
116
|
+
(0, _terminal.terminal)(`^+[${terminalLink("View project", projectUrl)}]^ `);
|
|
117
117
|
if (settings.apiAccess.enabled) {
|
|
118
|
-
(0, _terminal.terminal)(`^+[${(
|
|
118
|
+
(0, _terminal.terminal)(`^+[${terminalLink("Run playground", runsPlaygroundUrl)}]^ `);
|
|
119
119
|
}
|
|
120
|
-
(0, _terminal.terminal)(`^+[${(
|
|
120
|
+
(0, _terminal.terminal)(`^+[${terminalLink("Manage jobs", jobsUrl)}]^ `);
|
|
121
121
|
if (hasDefaultJob) {
|
|
122
|
-
(0, _terminal.terminal)(`^+[${(
|
|
122
|
+
(0, _terminal.terminal)(`^+[${terminalLink("Trigger default job", defaultJobTriggerUrl)}]^ `);
|
|
123
123
|
}
|
|
124
124
|
(0, _terminal.terminal)("\n");
|
|
125
125
|
} else {
|
|
@@ -221,6 +221,9 @@ async function promptFirstRunExperienceTestAuthSessionParameters({
|
|
|
221
221
|
message: _terminal.terminal.str(message).toString(),
|
|
222
222
|
initial: true
|
|
223
223
|
});
|
|
224
|
+
if (value === undefined) {
|
|
225
|
+
throw new _helpers.AbortedCLIError();
|
|
226
|
+
}
|
|
224
227
|
if (value) {
|
|
225
228
|
return metadata.authSessionInput;
|
|
226
229
|
}
|
|
@@ -238,6 +241,9 @@ async function promptFirstRunExperienceDefaultJobParameters({
|
|
|
238
241
|
message: _terminal.terminal.str(`^:^+Create a default job with sample parameters?^:`).toString(),
|
|
239
242
|
initial: true
|
|
240
243
|
});
|
|
244
|
+
if (value === undefined) {
|
|
245
|
+
throw new _helpers.AbortedCLIError();
|
|
246
|
+
}
|
|
241
247
|
if (value) {
|
|
242
248
|
return defaultJobInput;
|
|
243
249
|
}
|
|
@@ -5,6 +5,9 @@ export declare class CLIError extends Error {
|
|
|
5
5
|
autoColor?: boolean;
|
|
6
6
|
});
|
|
7
7
|
}
|
|
8
|
+
export declare class AbortedCLIError extends CLIError {
|
|
9
|
+
constructor();
|
|
10
|
+
}
|
|
8
11
|
export declare class CLIAssertionError extends CLIError {
|
|
9
12
|
constructor(message: string, options?: {
|
|
10
13
|
autoColor?: boolean;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.CLIError = exports.CLIAssertionError = void 0;
|
|
6
|
+
exports.CLIError = exports.CLIAssertionError = exports.AbortedCLIError = void 0;
|
|
7
7
|
exports.logAutomationError = logAutomationError;
|
|
8
8
|
var _runApi = require("../../../common/runApi");
|
|
9
9
|
var _terminal = require("./terminal");
|
|
@@ -15,6 +15,13 @@ class CLIError extends Error {
|
|
|
15
15
|
}
|
|
16
16
|
}
|
|
17
17
|
exports.CLIError = CLIError;
|
|
18
|
+
class AbortedCLIError extends CLIError {
|
|
19
|
+
constructor() {
|
|
20
|
+
super("Aborted");
|
|
21
|
+
this.name = "AbortedCLIError";
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
exports.AbortedCLIError = AbortedCLIError;
|
|
18
25
|
class CLIAssertionError extends CLIError {
|
|
19
26
|
constructor(message, options) {
|
|
20
27
|
super(message, options);
|
|
@@ -33,6 +33,11 @@ function cliCommandWrapper(argsSchema, optionsSchema, fn) {
|
|
|
33
33
|
await (0, _browser.closeCliBrowser)();
|
|
34
34
|
process.exit(0);
|
|
35
35
|
} catch (error) {
|
|
36
|
+
if (error instanceof _errors.AbortedCLIError) {
|
|
37
|
+
(0, _terminal.terminal)(`^r^+CAborted.^:\n`);
|
|
38
|
+
await (0, _browser.closeCliBrowser)();
|
|
39
|
+
process.exit(1);
|
|
40
|
+
}
|
|
36
41
|
if (error instanceof _errors.CLIError) {
|
|
37
42
|
if (error.autoColor) {
|
|
38
43
|
(0, _terminal.terminal)(`^r^+${error.message}^:\n`);
|