@intuned/runtime-dev 1.3.8-deploy.11 → 1.3.8-deploy.13

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,9 +16,10 @@ 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
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
19
+ var _terminalLink = _interopRequireDefault(require("terminal-link"));
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 }; }
22
23
  async function runDeployProject(projectName, auth) {
23
24
  const result = await (0, _save.runSaveProject)(projectName, auth);
24
25
  const shouldPromptFirstRunExperience = result?.state === "UNPUBLISHED";
@@ -111,15 +112,14 @@ async function runDeployProject(projectName, auth) {
111
112
  const jobsUrl = `${projectUrl}/jobs`;
112
113
  const runsPlaygroundUrl = `${runsUrl}?playground=open`;
113
114
  const defaultJobTriggerUrl = `${jobsUrl}/default?action=trigger`;
114
- const terminalLink = (await Promise.resolve().then(() => _interopRequireWildcard(require("terminal-link")))).default;
115
- if (terminalLink.isSupported) {
116
- (0, _terminal.terminal)(`^+[${terminalLink("View project", projectUrl)}]^ `);
115
+ if (_terminalLink.default.isSupported) {
116
+ (0, _terminal.terminal)(`^+[${(0, _terminalLink.default)("View project", projectUrl)}]^ `);
117
117
  if (settings.apiAccess.enabled) {
118
- (0, _terminal.terminal)(`^+[${terminalLink("Run playground", runsPlaygroundUrl)}]^ `);
118
+ (0, _terminal.terminal)(`^+[${(0, _terminalLink.default)("Run playground", runsPlaygroundUrl)}]^ `);
119
119
  }
120
- (0, _terminal.terminal)(`^+[${terminalLink("Manage jobs", jobsUrl)}]^ `);
120
+ (0, _terminal.terminal)(`^+[${(0, _terminalLink.default)("Manage jobs", jobsUrl)}]^ `);
121
121
  if (hasDefaultJob) {
122
- (0, _terminal.terminal)(`^+[${terminalLink("Trigger default job", defaultJobTriggerUrl)}]^ `);
122
+ (0, _terminal.terminal)(`^+[${(0, _terminalLink.default)("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`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@intuned/runtime-dev",
3
- "version": "1.3.8-deploy.11",
3
+ "version": "1.3.8-deploy.13",
4
4
  "description": "Intuned runtime",
5
5
  "exports": {
6
6
  ".": "./dist/index.js",
@@ -88,7 +88,7 @@
88
88
  "smol-toml": "^1.4.2",
89
89
  "source-map": "0.7.4",
90
90
  "terminal-kit": "^3.1.2",
91
- "terminal-link": "^5.0.0",
91
+ "terminal-link": "2.1.1",
92
92
  "ts-morph": "21.0.1",
93
93
  "ts-node": "10.9.1",
94
94
  "tslib": "2.6.0",