@flowrunner/cli 0.1.19-dev.3 → 0.1.19-dev.4

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/cli.js CHANGED
@@ -8877,11 +8877,11 @@ var require_mime_types = __commonJS({
8877
8877
  }
8878
8878
  return exts[0];
8879
8879
  }
8880
- function lookup(path22) {
8881
- if (!path22 || typeof path22 !== "string") {
8880
+ function lookup(path23) {
8881
+ if (!path23 || typeof path23 !== "string") {
8882
8882
  return false;
8883
8883
  }
8884
- var extension2 = extname("x." + path22).toLowerCase().substr(1);
8884
+ var extension2 = extname("x." + path23).toLowerCase().substr(1);
8885
8885
  if (!extension2) {
8886
8886
  return false;
8887
8887
  }
@@ -10044,11 +10044,11 @@ var require_form_data = __commonJS({
10044
10044
  "use strict";
10045
10045
  var CombinedStream = require_combined_stream();
10046
10046
  var util = require("util");
10047
- var path22 = require("path");
10047
+ var path23 = require("path");
10048
10048
  var http2 = require("http");
10049
10049
  var https = require("https");
10050
10050
  var parseUrl = require("url").parse;
10051
- var fs20 = require("fs");
10051
+ var fs21 = require("fs");
10052
10052
  var crypto3 = require("crypto");
10053
10053
  var mime = require_mime_types();
10054
10054
  var asynckit = require_asynckit();
@@ -10118,7 +10118,7 @@ var require_form_data = __commonJS({
10118
10118
  if (value.end != null && value.end !== Infinity && value.start != null) {
10119
10119
  callback(null, value.end + 1 - (value.start ? value.start : 0));
10120
10120
  } else {
10121
- fs20.stat(value.path, function(err, stat) {
10121
+ fs21.stat(value.path, function(err, stat) {
10122
10122
  var fileSize;
10123
10123
  if (err) {
10124
10124
  callback(err);
@@ -10176,11 +10176,11 @@ var require_form_data = __commonJS({
10176
10176
  FormData2.prototype._getContentDisposition = function(value, options) {
10177
10177
  var filename, contentDisposition;
10178
10178
  if (typeof options.filepath === "string") {
10179
- filename = path22.normalize(options.filepath).replace(/\\/g, "/");
10179
+ filename = path23.normalize(options.filepath).replace(/\\/g, "/");
10180
10180
  } else if (options.filename || value && (value.name || value.path)) {
10181
- filename = path22.basename(options.filename || value && (value.name || value.path));
10181
+ filename = path23.basename(options.filename || value && (value.name || value.path));
10182
10182
  } else if (value && value.readable && hasOwn(value, "httpVersion")) {
10183
- filename = path22.basename(value.client._httpMessage.path || "");
10183
+ filename = path23.basename(value.client._httpMessage.path || "");
10184
10184
  }
10185
10185
  if (filename) {
10186
10186
  contentDisposition = 'filename="' + escapeHeaderParam(filename) + '"';
@@ -10431,15 +10431,15 @@ var require_utils = __commonJS({
10431
10431
  }
10432
10432
  return uriComponent;
10433
10433
  }
10434
- function encodePath(path22) {
10435
- return path22.split("/").map(ensureComponentEncoding).join("/");
10434
+ function encodePath(path23) {
10435
+ return path23.split("/").map(ensureComponentEncoding).join("/");
10436
10436
  }
10437
- function ensureEncoding(path22) {
10437
+ function ensureEncoding(path23) {
10438
10438
  try {
10439
- var url = new URL(path22);
10440
- return url.origin + encodePath(normalizeTrailingSlashInPath(path22, url)) + url.search;
10439
+ var url = new URL(path23);
10440
+ return url.origin + encodePath(normalizeTrailingSlashInPath(path23, url)) + url.search;
10441
10441
  } catch (_unused) {
10442
- return encodePath(path22);
10442
+ return encodePath(path23);
10443
10443
  }
10444
10444
  }
10445
10445
  function normalizeTrailingSlashInPath(originPath, _ref) {
@@ -10794,15 +10794,15 @@ var require_client_node = __commonJS({
10794
10794
  exports2.sendNodeAPIRequest = sendNodeAPIRequest;
10795
10795
  var _utils = require_utils();
10796
10796
  var _error = require_error();
10797
- function sendNodeAPIRequest(path22, method, headers, body, encoding, timeout, withCredentials, tlsOptions) {
10797
+ function sendNodeAPIRequest(path23, method, headers, body, encoding, timeout, withCredentials, tlsOptions) {
10798
10798
  return new Promise(function(resolve, reject) {
10799
- var u = require("url").parse(path22);
10799
+ var u = require("url").parse(path23);
10800
10800
  var form = (0, _utils.isFormData)(body) && body;
10801
10801
  var https = u.protocol === "https:";
10802
10802
  var options = {
10803
10803
  host: u.hostname,
10804
10804
  port: u.port || (https ? 443 : 80),
10805
- path: (0, _utils.normalizeTrailingSlashInPath)(path22, u) + (u.search || ""),
10805
+ path: (0, _utils.normalizeTrailingSlashInPath)(path23, u) + (u.search || ""),
10806
10806
  method,
10807
10807
  headers,
10808
10808
  timeout
@@ -11210,12 +11210,12 @@ var require_request = __commonJS({
11210
11210
  var Request = exports2.Request = /* @__PURE__ */ (function(_EventEmitter) {
11211
11211
  _inherits(Request2, _EventEmitter);
11212
11212
  var _super = _createSuper(Request2);
11213
- function Request2(path22, method, body) {
11213
+ function Request2(path23, method, body) {
11214
11214
  var _this;
11215
11215
  _classCallCheck(this, Request2);
11216
11216
  _this = _super.call(this);
11217
11217
  _this.method = method;
11218
- _this.path = (0, _utils.ensureEncoding)(path22);
11218
+ _this.path = (0, _utils.ensureEncoding)(path23);
11219
11219
  _this.body = body;
11220
11220
  _this.unwrap = true;
11221
11221
  _this.raw = false;
@@ -11444,10 +11444,10 @@ var require_request = __commonJS({
11444
11444
  value: function send(body) {
11445
11445
  var _this2 = this;
11446
11446
  this.emit(REQUEST_EVENT, this);
11447
- var path22 = this.path;
11447
+ var path23 = this.path;
11448
11448
  var queryString = qs.stringify(this.queryParams);
11449
11449
  if (queryString) {
11450
- path22 += "?" + queryString;
11450
+ path23 += "?" + queryString;
11451
11451
  }
11452
11452
  if (!(0, _utils.isFormData)(body) && (0, _utils.isWebFormData)(body)) {
11453
11453
  body = toRequestFormData(body);
@@ -11464,11 +11464,11 @@ var require_request = __commonJS({
11464
11464
  return _this2.unwrap ? res.body : res;
11465
11465
  };
11466
11466
  if (Request2.verbose) {
11467
- console.log(this.method.toUpperCase(), decodeURIComponent(path22), body, this.headers);
11467
+ console.log(this.method.toUpperCase(), decodeURIComponent(path23), body, this.headers);
11468
11468
  }
11469
11469
  var withCredentials = typeof this.withCredentials === "boolean" ? this.withCredentials : Request2.withCredentials;
11470
11470
  var syncError = new Error();
11471
- var request = Request2.send(path22, this.method.toUpperCase(), this.headers, body, this.encoding, this.timeout, withCredentials, this.tlsOptions).then(function(res) {
11471
+ var request = Request2.send(path23, this.method.toUpperCase(), this.headers, body, this.encoding, this.timeout, withCredentials, this.tlsOptions).then(function(res) {
11472
11472
  return parseBody(res, _this2.raw);
11473
11473
  }).then(function(res) {
11474
11474
  return ensureRawBody(res, _this2.raw);
@@ -11577,14 +11577,14 @@ var require_client_browser = __commonJS({
11577
11577
  });
11578
11578
  exports2.sendXmlHttpRequest = sendXmlHttpRequest;
11579
11579
  var _request2 = require_request();
11580
- function sendXmlHttpRequest(path22, method, headers, body, encoding, timeout, withCredentials) {
11580
+ function sendXmlHttpRequest(path23, method, headers, body, encoding, timeout, withCredentials) {
11581
11581
  return new Promise(function sendRequest(resolve, reject) {
11582
11582
  var request = new _request2.Request.XMLHttpRequest();
11583
11583
  request.timeout = timeout;
11584
11584
  if (!encoding) {
11585
11585
  request.responseType = "arraybuffer";
11586
11586
  }
11587
- request.open(method.toUpperCase(), path22, true);
11587
+ request.open(method.toUpperCase(), path23, true);
11588
11588
  if (typeof withCredentials === "boolean") {
11589
11589
  request.withCredentials = withCredentials;
11590
11590
  }
@@ -11657,16 +11657,16 @@ var require_lib = __commonJS({
11657
11657
  }
11658
11658
  });
11659
11659
  _request.Request.XMLHttpRequest = typeof XMLHttpRequest !== "undefined" ? XMLHttpRequest : void 0;
11660
- _request.Request.send = function(path22, method, headers, body, encoding, timeout, withCredentials, tlsOptions) {
11660
+ _request.Request.send = function(path23, method, headers, body, encoding, timeout, withCredentials, tlsOptions) {
11661
11661
  var sender = typeof _request.Request.XMLHttpRequest !== "undefined" ? _clientBrowser.sendXmlHttpRequest : _clientNode.sendNodeAPIRequest;
11662
- return sender(path22, method, headers, body, encoding, timeout, withCredentials, tlsOptions);
11662
+ return sender(path23, method, headers, body, encoding, timeout, withCredentials, tlsOptions);
11663
11663
  };
11664
11664
  _request.Request.verbose = false;
11665
11665
  _request.Request.withCredentials = false;
11666
11666
  _request.Request.methods = ["get", "post", "put", "patch", "delete", "head", "options"];
11667
11667
  _request.Request.methods.forEach(function(method) {
11668
- _request.Request[method] = function(path22, body) {
11669
- return new _request.Request(path22, method, body);
11668
+ _request.Request[method] = function(path23, body) {
11669
+ return new _request.Request(path23, method, body);
11670
11670
  };
11671
11671
  });
11672
11672
  exports2 = module2.exports = _request.Request;
@@ -12007,25 +12007,25 @@ var require_utils2 = __commonJS({
12007
12007
  }
12008
12008
  mkdirSync(folder);
12009
12009
  };
12010
- Utils.prototype.writeFileTo = function(path22, content, overwrite, attr) {
12010
+ Utils.prototype.writeFileTo = function(path23, content, overwrite, attr) {
12011
12011
  const self = this;
12012
- if (self.fs.existsSync(path22)) {
12012
+ if (self.fs.existsSync(path23)) {
12013
12013
  if (!overwrite) return false;
12014
- var stat = self.fs.statSync(path22);
12014
+ var stat = self.fs.statSync(path23);
12015
12015
  if (stat.isDirectory()) {
12016
12016
  return false;
12017
12017
  }
12018
12018
  }
12019
- var folder = pth.dirname(path22);
12019
+ var folder = pth.dirname(path23);
12020
12020
  if (!self.fs.existsSync(folder)) {
12021
12021
  self.makeDir(folder);
12022
12022
  }
12023
12023
  var fd;
12024
12024
  try {
12025
- fd = self.fs.openSync(path22, "w", 438);
12025
+ fd = self.fs.openSync(path23, "w", 438);
12026
12026
  } catch (e) {
12027
- self.fs.chmodSync(path22, 438);
12028
- fd = self.fs.openSync(path22, "w", 438);
12027
+ self.fs.chmodSync(path23, 438);
12028
+ fd = self.fs.openSync(path23, "w", 438);
12029
12029
  }
12030
12030
  if (fd) {
12031
12031
  try {
@@ -12034,22 +12034,22 @@ var require_utils2 = __commonJS({
12034
12034
  self.fs.closeSync(fd);
12035
12035
  }
12036
12036
  }
12037
- self.fs.chmodSync(path22, attr || 438);
12037
+ self.fs.chmodSync(path23, attr || 438);
12038
12038
  return true;
12039
12039
  };
12040
- Utils.prototype.writeFileToAsync = function(path22, content, overwrite, attr, callback) {
12040
+ Utils.prototype.writeFileToAsync = function(path23, content, overwrite, attr, callback) {
12041
12041
  if (typeof attr === "function") {
12042
12042
  callback = attr;
12043
12043
  attr = void 0;
12044
12044
  }
12045
12045
  const self = this;
12046
- self.fs.exists(path22, function(exist) {
12046
+ self.fs.exists(path23, function(exist) {
12047
12047
  if (exist && !overwrite) return callback(false);
12048
- self.fs.stat(path22, function(err, stat) {
12048
+ self.fs.stat(path23, function(err, stat) {
12049
12049
  if (exist && stat && stat.isDirectory()) {
12050
12050
  return callback(false);
12051
12051
  }
12052
- var folder = pth.dirname(path22);
12052
+ var folder = pth.dirname(path23);
12053
12053
  self.fs.exists(folder, function(exists) {
12054
12054
  if (!exists) {
12055
12055
  try {
@@ -12062,16 +12062,16 @@ var require_utils2 = __commonJS({
12062
12062
  self.fs.write(fd, content, 0, content.length, 0, function(writeErr) {
12063
12063
  self.fs.close(fd, function() {
12064
12064
  if (writeErr) return callback(false);
12065
- self.fs.chmod(path22, attr || 438, function() {
12065
+ self.fs.chmod(path23, attr || 438, function() {
12066
12066
  callback(true);
12067
12067
  });
12068
12068
  });
12069
12069
  });
12070
12070
  };
12071
- self.fs.open(path22, "w", 438, function(err2, fd) {
12071
+ self.fs.open(path23, "w", 438, function(err2, fd) {
12072
12072
  if (err2) {
12073
- self.fs.chmod(path22, 438, function() {
12074
- self.fs.open(path22, "w", 438, function(retryErr, fd2) {
12073
+ self.fs.chmod(path23, 438, function() {
12074
+ self.fs.open(path23, "w", 438, function(retryErr, fd2) {
12075
12075
  if (retryErr || !fd2) return callback(false);
12076
12076
  writeToFd(fd2);
12077
12077
  });
@@ -12107,10 +12107,10 @@ var require_utils2 = __commonJS({
12107
12107
  if (stat.isSymbolicLink()) throw Errors.FILE_IN_THE_WAY(`"${cur}"`);
12108
12108
  }
12109
12109
  };
12110
- Utils.prototype.findFiles = function(path22) {
12110
+ Utils.prototype.findFiles = function(path23) {
12111
12111
  const self = this;
12112
12112
  const canLstat = typeof self.fs.lstatSync === "function";
12113
- const rootReal = self.fs.realpathSync(path22);
12113
+ const rootReal = self.fs.realpathSync(path23);
12114
12114
  function escapesRoot(p) {
12115
12115
  if (!canLstat) return false;
12116
12116
  if (!self.fs.lstatSync(p).isSymbolicLink()) return false;
@@ -12129,23 +12129,23 @@ var require_utils2 = __commonJS({
12129
12129
  }
12130
12130
  let files = [];
12131
12131
  self.fs.readdirSync(dir).forEach(function(file) {
12132
- const path23 = pth.join(dir, file);
12133
- if (escapesRoot(path23)) return;
12134
- const stat = self.fs.statSync(path23);
12135
- if (!pattern || pattern.test(path23)) {
12136
- files.push(pth.normalize(path23) + (stat.isDirectory() ? self.sep : ""));
12132
+ const path24 = pth.join(dir, file);
12133
+ if (escapesRoot(path24)) return;
12134
+ const stat = self.fs.statSync(path24);
12135
+ if (!pattern || pattern.test(path24)) {
12136
+ files.push(pth.normalize(path24) + (stat.isDirectory() ? self.sep : ""));
12137
12137
  }
12138
12138
  if (stat.isDirectory() && recursive) {
12139
- const realDir = self.fs.realpathSync(path23);
12139
+ const realDir = self.fs.realpathSync(path24);
12140
12140
  if (!visited.has(realDir)) {
12141
12141
  visited.add(realDir);
12142
- files = files.concat(findSync(path23, pattern, recursive, visited));
12142
+ files = files.concat(findSync(path24, pattern, recursive, visited));
12143
12143
  }
12144
12144
  }
12145
12145
  });
12146
12146
  return files;
12147
12147
  }
12148
- return findSync(path22, void 0, true, /* @__PURE__ */ new Set([rootReal]));
12148
+ return findSync(path23, void 0, true, /* @__PURE__ */ new Set([rootReal]));
12149
12149
  };
12150
12150
  Utils.prototype.findFilesAsync = function(dir, cb) {
12151
12151
  const self = this;
@@ -12242,14 +12242,14 @@ var require_utils2 = __commonJS({
12242
12242
  return "UNSUPPORTED (" + method + ")";
12243
12243
  }
12244
12244
  };
12245
- Utils.canonical = function(path22) {
12246
- if (!path22) return "";
12247
- const safeSuffix = pth.posix.normalize("/" + path22.split("\\").join("/"));
12245
+ Utils.canonical = function(path23) {
12246
+ if (!path23) return "";
12247
+ const safeSuffix = pth.posix.normalize("/" + path23.split("\\").join("/"));
12248
12248
  return pth.join(".", safeSuffix);
12249
12249
  };
12250
- Utils.zipnamefix = function(path22) {
12251
- if (!path22) return "";
12252
- const safeSuffix = pth.posix.normalize("/" + path22.split("\\").join("/"));
12250
+ Utils.zipnamefix = function(path23) {
12251
+ if (!path23) return "";
12252
+ const safeSuffix = pth.posix.normalize("/" + path23.split("\\").join("/"));
12253
12253
  return pth.posix.join(".", safeSuffix);
12254
12254
  };
12255
12255
  Utils.findLast = function(arr, callback) {
@@ -12266,9 +12266,9 @@ var require_utils2 = __commonJS({
12266
12266
  prefix = pth.resolve(pth.normalize(prefix));
12267
12267
  var parts = name.split("/");
12268
12268
  for (var i = 0, l = parts.length; i < l; i++) {
12269
- var path22 = pth.normalize(pth.join(prefix, parts.slice(i, l).join(pth.sep)));
12270
- if (path22 === prefix || path22.startsWith(prefix + pth.sep)) {
12271
- return path22;
12269
+ var path23 = pth.normalize(pth.join(prefix, parts.slice(i, l).join(pth.sep)));
12270
+ if (path23 === prefix || path23.startsWith(prefix + pth.sep)) {
12271
+ return path23;
12272
12272
  }
12273
12273
  }
12274
12274
  return pth.normalize(pth.join(prefix, pth.basename(name)));
@@ -12318,8 +12318,8 @@ var require_utils2 = __commonJS({
12318
12318
  var require_fattr = __commonJS({
12319
12319
  "node_modules/adm-zip/util/fattr.js"(exports2, module2) {
12320
12320
  var pth = require("path");
12321
- module2.exports = function(path22, { fs: fs20 }) {
12322
- var _path = path22 || "", _obj = newAttr(), _stat = null;
12321
+ module2.exports = function(path23, { fs: fs21 }) {
12322
+ var _path = path23 || "", _obj = newAttr(), _stat = null;
12323
12323
  function newAttr() {
12324
12324
  return {
12325
12325
  directory: false,
@@ -12330,8 +12330,8 @@ var require_fattr = __commonJS({
12330
12330
  atime: 0
12331
12331
  };
12332
12332
  }
12333
- if (_path && fs20.existsSync(_path)) {
12334
- _stat = fs20.statSync(_path);
12333
+ if (_path && fs21.existsSync(_path)) {
12334
+ _stat = fs21.statSync(_path);
12335
12335
  _obj.directory = _stat.isDirectory();
12336
12336
  _obj.mtime = _stat.mtime;
12337
12337
  _obj.atime = _stat.atime;
@@ -14503,12 +14503,32 @@ var require_adm_zip = __commonJS({
14503
14503
  }
14504
14504
  });
14505
14505
 
14506
+ // bin/banner.js
14507
+ var require_banner = __commonJS({
14508
+ "bin/banner.js"(exports2, module2) {
14509
+ "use strict";
14510
+ var os = require("os");
14511
+ var path23 = require("path");
14512
+ function shortPath(target, home) {
14513
+ return target === home || target.startsWith(home + path23.sep) ? "~" + target.slice(home.length) : target;
14514
+ }
14515
+ function versionBanner2(cli, home = os.homedir()) {
14516
+ const lines = [`FlowRunner CLI ${cli.version} \u2014 ${shortPath(cli.root, home)}`];
14517
+ if (cli.launcher) {
14518
+ lines.push(` this project's copy, started by ${cli.launcher.version} \u2014 ${shortPath(cli.launcher.root, home)}`);
14519
+ }
14520
+ return lines;
14521
+ }
14522
+ module2.exports = { versionBanner: versionBanner2 };
14523
+ }
14524
+ });
14525
+
14506
14526
  // package.json
14507
14527
  var require_package = __commonJS({
14508
14528
  "package.json"(exports2, module2) {
14509
14529
  module2.exports = {
14510
14530
  name: "@flowrunner/cli",
14511
- version: "0.1.19-dev.3",
14531
+ version: "0.1.19-dev.4",
14512
14532
  publishConfig: {
14513
14533
  access: "public"
14514
14534
  },
@@ -15267,6 +15287,10 @@ function sayError(text2) {
15267
15287
  console.error(text2);
15268
15288
  record(text2);
15269
15289
  }
15290
+ function sayStatus(text2) {
15291
+ console.error(text2);
15292
+ record(text2);
15293
+ }
15270
15294
  function sayWarning(text2) {
15271
15295
  console.warn(text2);
15272
15296
  record(text2);
@@ -16337,31 +16361,31 @@ var SUPPORTED_TYPES = /* @__PURE__ */ new Set([
16337
16361
  ]);
16338
16362
  var SUPPORTED_SPELLING = "z.string(), z.number(), z.bigint(), z.boolean(), z.date(), z.enum([\u2026]), z.literal(\u2026), z.object({ \u2026 }), z.array(\u2026), z.record(\u2026), z.union([\u2026]), z.null(), z.any(), z.unknown()";
16339
16363
  var MODIFIER_SPELLING = ".optional(), .nullable(), .nullish(), .default(v), .prefault(v), .readonly(), .nonoptional(), .pipe(\u2026)/.transform(\u2026) and z.lazy(\u2026)";
16340
- function subjectOf(source, path22) {
16364
+ function subjectOf(source, path23) {
16341
16365
  const kind = source.kind ?? "extension";
16342
16366
  const subject = source.itemId ? `${kind} "${source.itemId}": ` : "";
16343
- return `${subject}\`${path22}\``;
16367
+ return `${subject}\`${path23}\``;
16344
16368
  }
16345
- function refuse(message, source, path22, received) {
16369
+ function refuse(message, source, path23, received) {
16346
16370
  throw new InvalidSchemaError(
16347
16371
  `[flow-extension:${source.serviceId}] ${message}`,
16348
- { serviceId: source.serviceId, kind: source.kind ?? "extension", itemId: source.itemId, slot: source.slot, path: path22, received }
16372
+ { serviceId: source.serviceId, kind: source.kind ?? "extension", itemId: source.itemId, slot: source.slot, path: path23, received }
16349
16373
  );
16350
16374
  }
16351
- function refuseCatch(source, path22) {
16375
+ function refuseCatch(source, path23) {
16352
16376
  refuse(
16353
- `${subjectOf(source, path22)} uses \`.catch(\u2026)\`, which a parameter may not: it replaces an invalid value with the fallback instead of reporting it, and drops the field out of type coercion. Use \`.default(v)\` \u2014 same fallback when the value is absent, and a supplied-but-invalid one still fails.`,
16377
+ `${subjectOf(source, path23)} uses \`.catch(\u2026)\`, which a parameter may not: it replaces an invalid value with the fallback instead of reporting it, and drops the field out of type coercion. Use \`.default(v)\` \u2014 same fallback when the value is absent, and a supplied-but-invalid one still fails.`,
16354
16378
  source,
16355
- path22,
16379
+ path23,
16356
16380
  "catch"
16357
16381
  );
16358
16382
  }
16359
- function refuseType(source, path22, type) {
16383
+ function refuseType(source, path23, type) {
16360
16384
  const received = type ? `z.${type}()` : "a value that is not a zod schema";
16361
16385
  refuse(
16362
- `${subjectOf(source, path22)} declares ${received}, which the runtime cannot publish as a parameter \u2014 it has no widget, no published type and no coercion for it. Supported: ${SUPPORTED_SPELLING}; each may carry ${MODIFIER_SPELLING}.`,
16386
+ `${subjectOf(source, path23)} declares ${received}, which the runtime cannot publish as a parameter \u2014 it has no widget, no published type and no coercion for it. Supported: ${SUPPORTED_SPELLING}; each may carry ${MODIFIER_SPELLING}.`,
16363
16387
  source,
16364
- path22,
16388
+ path23,
16365
16389
  type ?? "unknown"
16366
16390
  );
16367
16391
  }
@@ -16377,7 +16401,7 @@ function isLooseObject(schema) {
16377
16401
  function isDynamicPropsSlot(source, topLevel) {
16378
16402
  return topLevel && source.kind === "action" && source.slot === "params";
16379
16403
  }
16380
- function assertDynamicProps(schema, name, siblings, source, path22) {
16404
+ function assertDynamicProps(schema, name, siblings, source, path23) {
16381
16405
  const ins = inspect(schema);
16382
16406
  const spec = ins.meta.frDynamicProps;
16383
16407
  if (!spec) {
@@ -16388,49 +16412,49 @@ function assertDynamicProps(schema, name, siblings, source, path22) {
16388
16412
  }
16389
16413
  if (typeof spec.execute !== "function") {
16390
16414
  refuse(
16391
- `${subjectOf(source, path22)}: \`.dynamicProps()\` needs an \`execute\` function that returns the loaded fields.`,
16415
+ `${subjectOf(source, path23)}: \`.dynamicProps()\` needs an \`execute\` function that returns the loaded fields.`,
16392
16416
  source,
16393
- path22,
16417
+ path23,
16394
16418
  typeof spec.execute
16395
16419
  );
16396
16420
  }
16397
16421
  if (spec.dependsOn !== void 0 && (!Array.isArray(spec.dependsOn) || spec.dependsOn.some((item) => typeof item !== "string"))) {
16398
16422
  refuse(
16399
- `${subjectOf(source, path22)}: \`.dynamicProps()\` \`dependsOn\` must be an array of param names.`,
16423
+ `${subjectOf(source, path23)}: \`.dynamicProps()\` \`dependsOn\` must be an array of param names.`,
16400
16424
  source,
16401
- path22,
16425
+ path23,
16402
16426
  "dependsOn"
16403
16427
  );
16404
16428
  }
16405
16429
  for (const dependency of spec.dependsOn ?? []) {
16406
16430
  if (dependency === name || !siblings.includes(dependency)) {
16407
16431
  refuse(
16408
- `${subjectOf(source, path22)}: \`.dynamicProps()\` depends on "${dependency}", which is not another param of this action. Name its sibling params: ${siblings.filter((sibling) => sibling !== name).join(", ") || "none"}.`,
16432
+ `${subjectOf(source, path23)}: \`.dynamicProps()\` depends on "${dependency}", which is not another param of this action. Name its sibling params: ${siblings.filter((sibling) => sibling !== name).join(", ") || "none"}.`,
16409
16433
  source,
16410
- path22,
16434
+ path23,
16411
16435
  dependency
16412
16436
  );
16413
16437
  }
16414
16438
  }
16415
16439
  if (ins.meta.frDictionary) {
16416
16440
  refuse(
16417
- `${subjectOf(source, path22)} declares both \`.dynamicProps()\` and \`.dictionary()\`. A dictionary offers values for one field; dynamic props load the fields inside an object \u2014 use one or the other.`,
16441
+ `${subjectOf(source, path23)} declares both \`.dynamicProps()\` and \`.dictionary()\`. A dictionary offers values for one field; dynamic props load the fields inside an object \u2014 use one or the other.`,
16418
16442
  source,
16419
- path22,
16443
+ path23,
16420
16444
  "dictionary"
16421
16445
  );
16422
16446
  }
16423
16447
  const element = ins.resolvedType === "array" ? ins.core?._zod?.def?.element : void 0;
16424
16448
  if (!isLooseObject(schema) && !isLooseObject(element)) {
16425
16449
  refuse(
16426
- `${subjectOf(source, path22)}: \`.dynamicProps()\` needs a loose object \u2014 the loaded fields are not declared, so a plain \`z.object()\` would strip them. ${DYNAMIC_PROPS_FIX}`,
16450
+ `${subjectOf(source, path23)}: \`.dynamicProps()\` needs a loose object \u2014 the loaded fields are not declared, so a plain \`z.object()\` would strip them. ${DYNAMIC_PROPS_FIX}`,
16427
16451
  source,
16428
- path22,
16452
+ path23,
16429
16453
  ins.resolvedType ?? "unknown"
16430
16454
  );
16431
16455
  }
16432
16456
  }
16433
- function assertDictionaryBinding(schema, source, path22, scope2) {
16457
+ function assertDictionaryBinding(schema, source, path23, scope2) {
16434
16458
  const binding = inspect(schema).meta.frDictionary;
16435
16459
  if (!binding) {
16436
16460
  return;
@@ -16438,14 +16462,14 @@ function assertDictionaryBinding(schema, source, path22, scope2) {
16438
16462
  const { clash } = resolveDependsOn(binding, scope2);
16439
16463
  if (clash) {
16440
16464
  refuse(
16441
- `${subjectOf(source, path22)} uses dictionary "${binding.id}", whose criteria "${clash.key}" can come from ${clash.names.map((name) => `"${name}"`).join(" or ")} \u2014 and this field can see all of them, so the dictionary cannot tell which one is meant. Rename one of the params, or bind this field to a dictionary without that alias.`,
16465
+ `${subjectOf(source, path23)} uses dictionary "${binding.id}", whose criteria "${clash.key}" can come from ${clash.names.map((name) => `"${name}"`).join(" or ")} \u2014 and this field can see all of them, so the dictionary cannot tell which one is meant. Rename one of the params, or bind this field to a dictionary without that alias.`,
16442
16466
  source,
16443
- path22,
16467
+ path23,
16444
16468
  clash.names.join(", ")
16445
16469
  );
16446
16470
  }
16447
16471
  }
16448
- function assertDateString(schema, source, path22) {
16472
+ function assertDateString(schema, source, path23) {
16449
16473
  const ins = inspect(schema);
16450
16474
  const pattern = ins.meta.frDateFormat;
16451
16475
  const kind = dateStringKind(ins);
@@ -16453,9 +16477,9 @@ function assertDateString(schema, source, path22) {
16453
16477
  const format = ins.core?._zod?.def?.format;
16454
16478
  const zoned = ins.coreType === "string" && format === "datetime";
16455
16479
  refuse(
16456
- `${subjectOf(source, path22)} uses \`.dateFormat()\` on ${zoned ? "z.iso.datetime() with a zone \u2014 an instant, not a wall clock" : "a type that is not a date string"}. Only z.iso.date(), z.iso.datetime({ local: true }) and z.iso.time() take a format.`,
16480
+ `${subjectOf(source, path23)} uses \`.dateFormat()\` on ${zoned ? "z.iso.datetime() with a zone \u2014 an instant, not a wall clock" : "a type that is not a date string"}. Only z.iso.date(), z.iso.datetime({ local: true }) and z.iso.time() take a format.`,
16457
16481
  source,
16458
- path22,
16482
+ path23,
16459
16483
  zoned ? "datetime" : ins.resolvedType ?? "unknown"
16460
16484
  );
16461
16485
  }
@@ -16467,7 +16491,7 @@ function assertDateString(schema, source, path22) {
16467
16491
  compilePattern(pattern, kind);
16468
16492
  } catch (error) {
16469
16493
  if (error instanceof DateFormatError) {
16470
- refuse(`${subjectOf(source, path22)}: \`.dateFormat('${pattern}')\` ${error.message}.`, source, path22, pattern);
16494
+ refuse(`${subjectOf(source, path23)}: \`.dateFormat('${pattern}')\` ${error.message}.`, source, path23, pattern);
16471
16495
  }
16472
16496
  throw error;
16473
16497
  }
@@ -16480,14 +16504,14 @@ function assertDateString(schema, source, path22) {
16480
16504
  const fits = typeof fallback === "string" && (pattern !== void 0 ? !!parseInPattern(fallback, pattern, kind) : ((parts) => !!parts && toCanonical(parts, kind) === fallback)(parseIso(fallback, kind)));
16481
16505
  if (!fits) {
16482
16506
  refuse(
16483
- `${subjectOf(source, path22)} has the default ${JSON.stringify(fallback)}, which is not written in ${written.replace(/'T'/, "T")} \u2014 a default is handed to \`execute\` as written, so write it in the field's own format.`,
16507
+ `${subjectOf(source, path23)} has the default ${JSON.stringify(fallback)}, which is not written in ${written.replace(/'T'/, "T")} \u2014 a default is handed to \`execute\` as written, so write it in the field's own format.`,
16484
16508
  source,
16485
- path22,
16509
+ path23,
16486
16510
  String(fallback)
16487
16511
  );
16488
16512
  }
16489
16513
  }
16490
- function assertField(schema, source, path22, seen, scope2, topLevel = false) {
16514
+ function assertField(schema, source, path23, seen, scope2, topLevel = false) {
16491
16515
  if (!schema || seen.has(schema)) {
16492
16516
  return;
16493
16517
  }
@@ -16495,35 +16519,35 @@ function assertField(schema, source, path22, seen, scope2, topLevel = false) {
16495
16519
  const ins = inspect(schema);
16496
16520
  if (ins.meta.frDynamicProps && !isDynamicPropsSlot(source, topLevel)) {
16497
16521
  refuse(
16498
- `${subjectOf(source, path22)} uses \`.dynamicProps()\`, which is supported on top-level action params only. For a list of objects, put it on the array rather than on its element.`,
16522
+ `${subjectOf(source, path23)} uses \`.dynamicProps()\`, which is supported on top-level action params only. For a list of objects, put it on the array rather than on its element.`,
16499
16523
  source,
16500
- path22,
16524
+ path23,
16501
16525
  "dynamicProps"
16502
16526
  );
16503
16527
  }
16504
16528
  if (ins.resolvedType === "catch") {
16505
- refuseCatch(source, path22);
16529
+ refuseCatch(source, path23);
16506
16530
  }
16507
- assertDictionaryBinding(schema, source, path22, scope2);
16508
- assertDateString(schema, source, path22);
16531
+ assertDictionaryBinding(schema, source, path23, scope2);
16532
+ assertDateString(schema, source, path23);
16509
16533
  if (!ins.resolvedType || !SUPPORTED_TYPES.has(ins.resolvedType)) {
16510
- refuseType(source, path22, ins.resolvedType);
16534
+ refuseType(source, path23, ins.resolvedType);
16511
16535
  }
16512
16536
  if (ins.branches) {
16513
- ins.branches.forEach((branch, index) => assertField(branch, source, `${path22}|branch ${index + 1}`, seen, scope2));
16537
+ ins.branches.forEach((branch, index) => assertField(branch, source, `${path23}|branch ${index + 1}`, seen, scope2));
16514
16538
  }
16515
16539
  const def = ins.core._zod?.def ?? {};
16516
16540
  if (ins.resolvedType === "array") {
16517
- assertField(def.element, source, `${path22}[]`, seen, scope2);
16541
+ assertField(def.element, source, `${path23}[]`, seen, scope2);
16518
16542
  }
16519
16543
  if (ins.resolvedType === "record") {
16520
- assertField(def.valueType, source, `${path22}{}`, seen, scope2);
16544
+ assertField(def.valueType, source, `${path23}{}`, seen, scope2);
16521
16545
  }
16522
16546
  if (ins.resolvedType === "object") {
16523
16547
  const properties = shapeEntries(ins.core);
16524
16548
  const inner = scope2.enter(properties.map(([name]) => name));
16525
16549
  for (const [name, property] of properties) {
16526
- assertField(property, source, `${path22}.${name}`, seen, inner);
16550
+ assertField(property, source, `${path23}.${name}`, seen, inner);
16527
16551
  }
16528
16552
  }
16529
16553
  }
@@ -17185,52 +17209,52 @@ function isAuthored(issue) {
17185
17209
  }
17186
17210
  function toFieldIssue(plan2, issue, fieldValue) {
17187
17211
  const segments = (issue.path ?? []).map(String).filter(Boolean);
17188
- const path22 = segments.length ? `${plan2.name}.${segments.join(".")}` : plan2.name;
17212
+ const path23 = segments.length ? `${plan2.name}.${segments.join(".")}` : plan2.name;
17189
17213
  const code = issue.code ?? "custom";
17190
17214
  const target = resolveTarget(plan2, segments, fieldValue);
17191
17215
  const named = { ...plan2, label: target.label };
17192
17216
  if (isAuthored(issue)) {
17193
- return { path: path22, code, message: issue.message };
17217
+ return { path: path23, code, message: issue.message };
17194
17218
  }
17195
17219
  if (code === "invalid_format" && target.schema && inspect(target.schema).branches) {
17196
17220
  const combined = unionPhrases(target.schema, target.value);
17197
17221
  if (combined.length > 1) {
17198
- return { path: path22, code: "invalid_union", message: `\xAB${target.label}\xBB must be ${combined.join(", or ")}` };
17222
+ return { path: path23, code: "invalid_union", message: `\xAB${target.label}\xBB must be ${combined.join(", or ")}` };
17199
17223
  }
17200
17224
  }
17201
17225
  const dateKind = target.schema ? dateStringKind(inspect(target.schema)) : void 0;
17202
17226
  const dateMissing = target.value == null || target.value === "";
17203
17227
  if (dateKind && (code === "invalid_type" || code === "invalid_format")) {
17204
- return dateMissing ? { path: path22, code, message: requiredMessage(named) } : { path: path22, code, message: invalidTypeMessage(named, expectedDateString(inspect(target.schema), dateKind)) };
17228
+ return dateMissing ? { path: path23, code, message: requiredMessage(named) } : { path: path23, code, message: invalidTypeMessage(named, expectedDateString(inspect(target.schema), dateKind)) };
17205
17229
  }
17206
17230
  if (code === "invalid_type") {
17207
17231
  const received = issue.received;
17208
17232
  const absent = segments.length ? target.found && target.value == null : received === "undefined" || received === "null" || issue.expected === void 0;
17209
- return absent ? { path: path22, code, message: requiredMessage(named) } : { path: path22, code, message: invalidTypeMessage(named, issue.expected ?? "") };
17233
+ return absent ? { path: path23, code, message: requiredMessage(named) } : { path: path23, code, message: invalidTypeMessage(named, issue.expected ?? "") };
17210
17234
  }
17211
17235
  if (code === "too_small") {
17212
- return { path: path22, code, message: `\xAB${target.label}\xBB must be at least ${bound(issue.minimum, plan2)}` };
17236
+ return { path: path23, code, message: `\xAB${target.label}\xBB must be at least ${bound(issue.minimum, plan2)}` };
17213
17237
  }
17214
17238
  if (code === "too_big") {
17215
- return { path: path22, code, message: `\xAB${target.label}\xBB must be at most ${bound(issue.maximum, plan2)}` };
17239
+ return { path: path23, code, message: `\xAB${target.label}\xBB must be at most ${bound(issue.maximum, plan2)}` };
17216
17240
  }
17217
17241
  if (code === "invalid_value") {
17218
- return { path: path22, code, message: `\xAB${target.label}\xBB must be ${oneOf(issue.values ?? [])}` };
17242
+ return { path: path23, code, message: `\xAB${target.label}\xBB must be ${oneOf(issue.values ?? [])}` };
17219
17243
  }
17220
17244
  if (code === "invalid_format") {
17221
17245
  const described = FORMAT_DESCRIPTIONS[issue.format ?? ""];
17222
- return described ? { path: path22, code, message: `\xAB${target.label}\xBB is invalid \u2014 ${described.replace(/^Expects /, "expects ")}` } : { path: path22, code, message: `\xAB${target.label}\xBB has an invalid format` };
17246
+ return described ? { path: path23, code, message: `\xAB${target.label}\xBB is invalid \u2014 ${described.replace(/^Expects /, "expects ")}` } : { path: path23, code, message: `\xAB${target.label}\xBB has an invalid format` };
17223
17247
  }
17224
17248
  if (code === "invalid_union") {
17225
17249
  if (segments.length && target.found && target.value == null) {
17226
- return { path: path22, code, message: requiredMessage(named) };
17250
+ return { path: path23, code, message: requiredMessage(named) };
17227
17251
  }
17228
17252
  const combined = unionIssue(plan2, issue, target.schema, target.value, fieldValue);
17229
17253
  if (combined) {
17230
- return combined.path ? combined : { path: path22, code, message: `\xAB${target.label}\xBB ${combined.message}` };
17254
+ return combined.path ? combined : { path: path23, code, message: `\xAB${target.label}\xBB ${combined.message}` };
17231
17255
  }
17232
17256
  }
17233
- return { path: path22, code, message: `\xAB${target.label}\xBB is invalid` };
17257
+ return { path: path23, code, message: `\xAB${target.label}\xBB is invalid` };
17234
17258
  }
17235
17259
 
17236
17260
  // ../../flow-extension-runner/src/params/schema/normalize.ts
@@ -17351,10 +17375,10 @@ var EXPECTED2 = {
17351
17375
  };
17352
17376
  function toIssues(error, param) {
17353
17377
  return (error?.issues ?? []).map((issue) => {
17354
- const path22 = (issue.path ?? []).map(String).join(".");
17378
+ const path23 = (issue.path ?? []).map(String).join(".");
17355
17379
  const expected = issue.expected;
17356
- const restated = param && !path22 && issue.code === "invalid_type" && expected ? `\xAB${param}\xBB must be ${EXPECTED2[expected] ?? expected}` : void 0;
17357
- return { path: path22, message: restated ?? issue.message ?? "invalid value", code: issue.code };
17380
+ const restated = param && !path23 && issue.code === "invalid_type" && expected ? `\xAB${param}\xBB must be ${EXPECTED2[expected] ?? expected}` : void 0;
17381
+ return { path: path23, message: restated ?? issue.message ?? "invalid value", code: issue.code };
17358
17382
  });
17359
17383
  }
17360
17384
  function parseSchema(schema, value, fail3, param) {
@@ -19031,8 +19055,8 @@ var PollingTriggers = class {
19031
19055
  };
19032
19056
 
19033
19057
  // ../../flow-extension-runner/src/path.ts
19034
- function getPath(source, path22) {
19035
- return path22.split(".").reduce(
19058
+ function getPath(source, path23) {
19059
+ return path23.split(".").reduce(
19036
19060
  (acc, key) => acc == null ? acc : acc[key],
19037
19061
  source
19038
19062
  );
@@ -19702,12 +19726,12 @@ var RealtimeTriggerMethod = class extends ExtensionMethod {
19702
19726
  if (typeof match === "function") {
19703
19727
  return !!await match({ params, providerEventData, webhookData });
19704
19728
  }
19705
- for (const [paramKey, path22] of Object.entries(match)) {
19729
+ for (const [paramKey, path23] of Object.entries(match)) {
19706
19730
  const paramValue = params[paramKey];
19707
19731
  if (!isFilled(paramValue)) {
19708
19732
  continue;
19709
19733
  }
19710
- if (`${paramValue}` !== `${getPath(providerEventData, path22)}`) {
19734
+ if (`${paramValue}` !== `${getPath(providerEventData, path23)}`) {
19711
19735
  return false;
19712
19736
  }
19713
19737
  }
@@ -20459,7 +20483,7 @@ var ERROR_HTML = (error) => `<!DOCTYPE html>
20459
20483
  </body></html>`;
20460
20484
 
20461
20485
  // src/server/routes/callback.ts
20462
- function callbackRoute(path22 = "/callback") {
20486
+ function callbackRoute(path23 = "/callback") {
20463
20487
  let resolveCode = null;
20464
20488
  let rejectCode = null;
20465
20489
  const respond = (route2, html) => {
@@ -20468,7 +20492,7 @@ function callbackRoute(path22 = "/callback") {
20468
20492
  };
20469
20493
  const route = {
20470
20494
  method: "GET",
20471
- path: path22,
20495
+ path: path23,
20472
20496
  handle: (context) => {
20473
20497
  const code = context.url.searchParams.get("code");
20474
20498
  const error = context.url.searchParams.get("error");
@@ -22145,10 +22169,23 @@ async function useCommand(target) {
22145
22169
  }
22146
22170
  }
22147
22171
 
22172
+ // src/cli/version-banner.ts
22173
+ var import_fs20 = __toESM(require("fs"));
22174
+ var import_path25 = __toESM(require("path"));
22175
+ var { versionBanner } = require_banner();
22176
+ function runningCli() {
22177
+ const root = packageRoot();
22178
+ const { version: version2 } = JSON.parse(import_fs20.default.readFileSync(import_path25.default.join(root, "package.json"), "utf-8"));
22179
+ return { version: version2, root };
22180
+ }
22181
+ function commandBanner(env = process.env) {
22182
+ return env.FLOWRUNNER_BANNER_SHOWN ? [] : versionBanner(runningCli());
22183
+ }
22184
+
22148
22185
  // src/cli/index.ts
22149
22186
  var { version } = require_package();
22150
22187
  var program = new import_commander.Command();
22151
- program.name("flowrunner").description("Flowrunner CLI for Custom extension management").version(version);
22188
+ program.name("flowrunner").description("Flowrunner CLI for Custom extension management").version(version).hook("preAction", () => commandBanner().forEach((line) => sayStatus(line)));
22152
22189
  program.command("init").argument("[template]", "Template to scaffold a first service from; omit to create just the project").description("Create a FlowRunner extensions project (package.json, flowrunner.json, .gitignore)").option("-d, --dir <path>", "Directory to create the project in (defaults to the current one)").option("-s, --server <target>", `Server to point the project at: prod, dev, local, or a full URL (default: ${DEFAULT_CLUSTER} \u2014 ${CLUSTERS[DEFAULT_CLUSTER]})`).option("--id <id>", "Service id, when a template is given (skips that prompt)").option("--name <name>", "Display name, when a template is given (skips that prompt)").option("--set <name=value...>", "Answer any prompt the template declares (repeatable)").option("-y, --yes", "Accept every default and ask nothing").option("--no-install", "Skip the npm install at the end").option("--no-git", "Skip initialising a git repository and making the first commit").option("--no-tests", "Skip the unit-test harness (jest config + sandbox/)").action(initCommand);
22153
22190
  program.command("init-claude").description("Wire the FlowRunner agent instructions into this project's Claude setup").option("-d, --dir <path>", "Project directory to wire up (defaults to the current one)").action(initClaudeCommand);
22154
22191
  program.command("login").description("Log in to a FlowRunner server via browser-based authorization").option("-s, --server <target>", "prod, dev, local, or a full URL (defaults to serverUrl in flowrunner.json)").action(loginCommand);