@superglue/cli 1.1.10 → 1.1.11
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 +144 -104
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -6349,12 +6349,12 @@ var init_size = __esm({
|
|
|
6349
6349
|
increment,
|
|
6350
6350
|
maxSize,
|
|
6351
6351
|
truncatedProps,
|
|
6352
|
-
path:
|
|
6352
|
+
path: path7,
|
|
6353
6353
|
value
|
|
6354
6354
|
}) => {
|
|
6355
6355
|
const newSize = size + increment;
|
|
6356
6356
|
const stop = newSize > maxSize;
|
|
6357
|
-
return stop ? { size, stop, truncatedProps: [...truncatedProps, { path:
|
|
6357
|
+
return stop ? { size, stop, truncatedProps: [...truncatedProps, { path: path7, value }] } : { size: newSize, stop, truncatedProps };
|
|
6358
6358
|
};
|
|
6359
6359
|
getValueSize = (value) => getJsonLength(value);
|
|
6360
6360
|
getArrayItemSize = (empty, indent, depth) => {
|
|
@@ -6392,7 +6392,7 @@ var init_prop = __esm({
|
|
|
6392
6392
|
truncateProp = ({
|
|
6393
6393
|
parent,
|
|
6394
6394
|
truncatedProps,
|
|
6395
|
-
path:
|
|
6395
|
+
path: path7,
|
|
6396
6396
|
increment,
|
|
6397
6397
|
maxSize,
|
|
6398
6398
|
key,
|
|
@@ -6403,7 +6403,7 @@ var init_prop = __esm({
|
|
|
6403
6403
|
depth
|
|
6404
6404
|
}) => {
|
|
6405
6405
|
const value = parent[key];
|
|
6406
|
-
const pathA = [...
|
|
6406
|
+
const pathA = [...path7, key];
|
|
6407
6407
|
const {
|
|
6408
6408
|
size: newSize,
|
|
6409
6409
|
stop,
|
|
@@ -6432,7 +6432,7 @@ var init_prop = __esm({
|
|
|
6432
6432
|
truncatePropValue = ({
|
|
6433
6433
|
value,
|
|
6434
6434
|
truncatedProps,
|
|
6435
|
-
path:
|
|
6435
|
+
path: path7,
|
|
6436
6436
|
maxSize,
|
|
6437
6437
|
empty,
|
|
6438
6438
|
size,
|
|
@@ -6448,7 +6448,7 @@ var init_prop = __esm({
|
|
|
6448
6448
|
} = truncateValue2({
|
|
6449
6449
|
value,
|
|
6450
6450
|
truncatedProps,
|
|
6451
|
-
path:
|
|
6451
|
+
path: path7,
|
|
6452
6452
|
size: newSize,
|
|
6453
6453
|
maxSize,
|
|
6454
6454
|
indent,
|
|
@@ -6474,7 +6474,7 @@ var init_array = __esm({
|
|
|
6474
6474
|
truncateArray = ({
|
|
6475
6475
|
array: array2,
|
|
6476
6476
|
truncatedProps,
|
|
6477
|
-
path:
|
|
6477
|
+
path: path7,
|
|
6478
6478
|
size,
|
|
6479
6479
|
maxSize,
|
|
6480
6480
|
truncateValue: truncateValue2,
|
|
@@ -6488,7 +6488,7 @@ var init_array = __esm({
|
|
|
6488
6488
|
state = truncateProp({
|
|
6489
6489
|
parent: array2,
|
|
6490
6490
|
truncatedProps: state.truncatedProps,
|
|
6491
|
-
path:
|
|
6491
|
+
path: path7,
|
|
6492
6492
|
increment,
|
|
6493
6493
|
maxSize,
|
|
6494
6494
|
key: index,
|
|
@@ -6521,7 +6521,7 @@ var init_object = __esm({
|
|
|
6521
6521
|
truncateObject = ({
|
|
6522
6522
|
object: object2,
|
|
6523
6523
|
truncatedProps,
|
|
6524
|
-
path:
|
|
6524
|
+
path: path7,
|
|
6525
6525
|
size,
|
|
6526
6526
|
maxSize,
|
|
6527
6527
|
truncateValue: truncateValue2,
|
|
@@ -6540,7 +6540,7 @@ var init_object = __esm({
|
|
|
6540
6540
|
state = truncateProp({
|
|
6541
6541
|
parent: object2,
|
|
6542
6542
|
truncatedProps: state.truncatedProps,
|
|
6543
|
-
path:
|
|
6543
|
+
path: path7,
|
|
6544
6544
|
increment,
|
|
6545
6545
|
maxSize,
|
|
6546
6546
|
key,
|
|
@@ -6574,7 +6574,7 @@ var init_value = __esm({
|
|
|
6574
6574
|
truncateValue = ({
|
|
6575
6575
|
value,
|
|
6576
6576
|
truncatedProps,
|
|
6577
|
-
path:
|
|
6577
|
+
path: path7,
|
|
6578
6578
|
size,
|
|
6579
6579
|
maxSize,
|
|
6580
6580
|
indent,
|
|
@@ -6590,13 +6590,13 @@ var init_value = __esm({
|
|
|
6590
6590
|
increment,
|
|
6591
6591
|
maxSize,
|
|
6592
6592
|
truncatedProps,
|
|
6593
|
-
path:
|
|
6593
|
+
path: path7,
|
|
6594
6594
|
value
|
|
6595
6595
|
});
|
|
6596
6596
|
return stop ? { value: void 0, size: sizeA, truncatedProps: truncatedPropsA } : recurseValue({
|
|
6597
6597
|
value,
|
|
6598
6598
|
truncatedProps: truncatedPropsA,
|
|
6599
|
-
path:
|
|
6599
|
+
path: path7,
|
|
6600
6600
|
size: sizeA,
|
|
6601
6601
|
maxSize,
|
|
6602
6602
|
indent,
|
|
@@ -6606,7 +6606,7 @@ var init_value = __esm({
|
|
|
6606
6606
|
recurseValue = ({
|
|
6607
6607
|
value,
|
|
6608
6608
|
truncatedProps,
|
|
6609
|
-
path:
|
|
6609
|
+
path: path7,
|
|
6610
6610
|
size,
|
|
6611
6611
|
maxSize,
|
|
6612
6612
|
indent,
|
|
@@ -6618,7 +6618,7 @@ var init_value = __esm({
|
|
|
6618
6618
|
return Array.isArray(value) ? truncateArray({
|
|
6619
6619
|
array: value,
|
|
6620
6620
|
truncatedProps,
|
|
6621
|
-
path:
|
|
6621
|
+
path: path7,
|
|
6622
6622
|
size,
|
|
6623
6623
|
maxSize,
|
|
6624
6624
|
truncateValue,
|
|
@@ -6627,7 +6627,7 @@ var init_value = __esm({
|
|
|
6627
6627
|
}) : truncateObject({
|
|
6628
6628
|
object: value,
|
|
6629
6629
|
truncatedProps,
|
|
6630
|
-
path:
|
|
6630
|
+
path: path7,
|
|
6631
6631
|
size,
|
|
6632
6632
|
maxSize,
|
|
6633
6633
|
truncateValue,
|
|
@@ -15758,8 +15758,8 @@ var require_CronFileParser = __commonJS({
|
|
|
15758
15758
|
* @throws If file cannot be read
|
|
15759
15759
|
*/
|
|
15760
15760
|
static parseFileSync(filePath) {
|
|
15761
|
-
const { readFileSync:
|
|
15762
|
-
const data =
|
|
15761
|
+
const { readFileSync: readFileSync10 } = require("fs");
|
|
15762
|
+
const data = readFileSync10(filePath, "utf8");
|
|
15763
15763
|
return _CronFileParser.#parseContent(data);
|
|
15764
15764
|
}
|
|
15765
15765
|
/**
|
|
@@ -16386,9 +16386,9 @@ var require_property_expr = __commonJS({
|
|
|
16386
16386
|
Cache,
|
|
16387
16387
|
split: split2,
|
|
16388
16388
|
normalizePath: normalizePath2,
|
|
16389
|
-
setter: function(
|
|
16390
|
-
var parts = normalizePath2(
|
|
16391
|
-
return setCache.get(
|
|
16389
|
+
setter: function(path7) {
|
|
16390
|
+
var parts = normalizePath2(path7);
|
|
16391
|
+
return setCache.get(path7) || setCache.set(path7, function setter(obj, value) {
|
|
16392
16392
|
var index = 0;
|
|
16393
16393
|
var len = parts.length;
|
|
16394
16394
|
var data = obj;
|
|
@@ -16402,9 +16402,9 @@ var require_property_expr = __commonJS({
|
|
|
16402
16402
|
data[parts[index]] = value;
|
|
16403
16403
|
});
|
|
16404
16404
|
},
|
|
16405
|
-
getter: function(
|
|
16406
|
-
var parts = normalizePath2(
|
|
16407
|
-
return getCache.get(
|
|
16405
|
+
getter: function(path7, safe) {
|
|
16406
|
+
var parts = normalizePath2(path7);
|
|
16407
|
+
return getCache.get(path7) || getCache.set(path7, function getter2(data) {
|
|
16408
16408
|
var index = 0, len = parts.length;
|
|
16409
16409
|
while (index < len) {
|
|
16410
16410
|
if (data != null || !safe) data = data[parts[index++]];
|
|
@@ -16414,24 +16414,24 @@ var require_property_expr = __commonJS({
|
|
|
16414
16414
|
});
|
|
16415
16415
|
},
|
|
16416
16416
|
join: function(segments) {
|
|
16417
|
-
return segments.reduce(function(
|
|
16418
|
-
return
|
|
16417
|
+
return segments.reduce(function(path7, part) {
|
|
16418
|
+
return path7 + (isQuoted(part) || DIGIT_REGEX.test(part) ? "[" + part + "]" : (path7 ? "." : "") + part);
|
|
16419
16419
|
}, "");
|
|
16420
16420
|
},
|
|
16421
|
-
forEach: function(
|
|
16422
|
-
forEach2(Array.isArray(
|
|
16421
|
+
forEach: function(path7, cb, thisArg) {
|
|
16422
|
+
forEach2(Array.isArray(path7) ? path7 : split2(path7), cb, thisArg);
|
|
16423
16423
|
}
|
|
16424
16424
|
};
|
|
16425
|
-
function normalizePath2(
|
|
16426
|
-
return pathCache.get(
|
|
16427
|
-
|
|
16428
|
-
split2(
|
|
16425
|
+
function normalizePath2(path7) {
|
|
16426
|
+
return pathCache.get(path7) || pathCache.set(
|
|
16427
|
+
path7,
|
|
16428
|
+
split2(path7).map(function(part) {
|
|
16429
16429
|
return part.replace(CLEAN_QUOTES_REGEX, "$2");
|
|
16430
16430
|
})
|
|
16431
16431
|
);
|
|
16432
16432
|
}
|
|
16433
|
-
function split2(
|
|
16434
|
-
return
|
|
16433
|
+
function split2(path7) {
|
|
16434
|
+
return path7.match(SPLIT_REGEX) || [""];
|
|
16435
16435
|
}
|
|
16436
16436
|
function forEach2(parts, iter, thisArg) {
|
|
16437
16437
|
var len = parts.length, part, idx, isArray, isBracket;
|
|
@@ -16469,15 +16469,15 @@ var require_tiny_case = __commonJS({
|
|
|
16469
16469
|
var reWords = /[A-Z\xc0-\xd6\xd8-\xde]?[a-z\xdf-\xf6\xf8-\xff]+(?:['’](?:d|ll|m|re|s|t|ve))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000]|[A-Z\xc0-\xd6\xd8-\xde]|$)|(?:[A-Z\xc0-\xd6\xd8-\xde]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['’](?:D|LL|M|RE|S|T|VE))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000]|[A-Z\xc0-\xd6\xd8-\xde](?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])|$)|[A-Z\xc0-\xd6\xd8-\xde]?(?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['’](?:d|ll|m|re|s|t|ve))?|[A-Z\xc0-\xd6\xd8-\xde]+(?:['’](?:D|LL|M|RE|S|T|VE))?|\d*(?:1ST|2ND|3RD|(?![123])\dTH)(?=\b|[a-z_])|\d*(?:1st|2nd|3rd|(?![123])\dth)(?=\b|[A-Z_])|\d+|(?:[\u2700-\u27bf]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?(?:\u200d(?:[^\ud800-\udfff]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?)*/g;
|
|
16470
16470
|
var words = (str) => str.match(reWords) || [];
|
|
16471
16471
|
var upperFirst = (str) => str[0].toUpperCase() + str.slice(1);
|
|
16472
|
-
var
|
|
16472
|
+
var join7 = (str, d) => words(str).join(d).toLowerCase();
|
|
16473
16473
|
var camelCase2 = (str) => words(str).reduce(
|
|
16474
16474
|
(acc, next) => `${acc}${!acc ? next.toLowerCase() : next[0].toUpperCase() + next.slice(1).toLowerCase()}`,
|
|
16475
16475
|
""
|
|
16476
16476
|
);
|
|
16477
16477
|
var pascalCase = (str) => upperFirst(camelCase2(str));
|
|
16478
|
-
var snakeCase2 = (str) =>
|
|
16479
|
-
var kebabCase = (str) =>
|
|
16480
|
-
var sentenceCase = (str) => upperFirst(
|
|
16478
|
+
var snakeCase2 = (str) => join7(str, "_");
|
|
16479
|
+
var kebabCase = (str) => join7(str, "-");
|
|
16480
|
+
var sentenceCase = (str) => upperFirst(join7(str, " "));
|
|
16481
16481
|
var titleCase = (str) => words(str).map(upperFirst).join(" ");
|
|
16482
16482
|
module2.exports = {
|
|
16483
16483
|
words,
|
|
@@ -16637,7 +16637,7 @@ function create$9(key, options) {
|
|
|
16637
16637
|
function createValidation(config) {
|
|
16638
16638
|
function validate({
|
|
16639
16639
|
value,
|
|
16640
|
-
path:
|
|
16640
|
+
path: path7 = "",
|
|
16641
16641
|
options,
|
|
16642
16642
|
originalValue,
|
|
16643
16643
|
schema
|
|
@@ -16665,7 +16665,7 @@ function createValidation(config) {
|
|
|
16665
16665
|
value,
|
|
16666
16666
|
originalValue,
|
|
16667
16667
|
label: schema.spec.label,
|
|
16668
|
-
path: overrides.path ||
|
|
16668
|
+
path: overrides.path || path7,
|
|
16669
16669
|
spec: schema.spec,
|
|
16670
16670
|
disableStackTrace: overrides.disableStackTrace || disableStackTrace
|
|
16671
16671
|
}, params, overrides.params), resolveOptions);
|
|
@@ -16675,7 +16675,7 @@ function createValidation(config) {
|
|
|
16675
16675
|
}
|
|
16676
16676
|
const invalid = abortEarly ? panic : next;
|
|
16677
16677
|
let ctx = {
|
|
16678
|
-
path:
|
|
16678
|
+
path: path7,
|
|
16679
16679
|
parent,
|
|
16680
16680
|
type: name,
|
|
16681
16681
|
from: options.from,
|
|
@@ -16729,14 +16729,14 @@ function resolveParams(params, options) {
|
|
|
16729
16729
|
function resolveMaybeRef(item, options) {
|
|
16730
16730
|
return Reference.isRef(item) ? item.getValue(options.value, options.parent, options.context) : item;
|
|
16731
16731
|
}
|
|
16732
|
-
function getIn(schema,
|
|
16732
|
+
function getIn(schema, path7, value, context = value) {
|
|
16733
16733
|
let parent, lastPart, lastPartDebug;
|
|
16734
|
-
if (!
|
|
16734
|
+
if (!path7) return {
|
|
16735
16735
|
parent,
|
|
16736
|
-
parentPath:
|
|
16736
|
+
parentPath: path7,
|
|
16737
16737
|
schema
|
|
16738
16738
|
};
|
|
16739
|
-
(0, import_property_expr.forEach)(
|
|
16739
|
+
(0, import_property_expr.forEach)(path7, (_part, isBracket, isArray) => {
|
|
16740
16740
|
let part = isBracket ? _part.slice(1, _part.length - 1) : _part;
|
|
16741
16741
|
schema = schema.resolve({
|
|
16742
16742
|
context,
|
|
@@ -16748,14 +16748,14 @@ function getIn(schema, path6, value, context = value) {
|
|
|
16748
16748
|
if (schema.innerType || isTuple) {
|
|
16749
16749
|
if (isTuple && !isArray) throw new Error(`Yup.reach cannot implicitly index into a tuple type. the path part "${lastPartDebug}" must contain an index to the tuple element, e.g. "${lastPartDebug}[0]"`);
|
|
16750
16750
|
if (value && idx >= value.length) {
|
|
16751
|
-
throw new Error(`Yup.reach cannot resolve an array item at index: ${_part}, in the path: ${
|
|
16751
|
+
throw new Error(`Yup.reach cannot resolve an array item at index: ${_part}, in the path: ${path7}. because there is no value at that index. `);
|
|
16752
16752
|
}
|
|
16753
16753
|
parent = value;
|
|
16754
16754
|
value = value && value[idx];
|
|
16755
16755
|
schema = isTuple ? schema.spec.types[idx] : schema.innerType;
|
|
16756
16756
|
}
|
|
16757
16757
|
if (!isArray) {
|
|
16758
|
-
if (!schema.fields || !schema.fields[part]) throw new Error(`The schema does not contain the path: ${
|
|
16758
|
+
if (!schema.fields || !schema.fields[part]) throw new Error(`The schema does not contain the path: ${path7}. (failed at: ${lastPartDebug} which is a type: "${schema.type}")`);
|
|
16759
16759
|
parent = value;
|
|
16760
16760
|
value = value && value[part];
|
|
16761
16761
|
schema = schema.fields[part];
|
|
@@ -16769,8 +16769,8 @@ function getIn(schema, path6, value, context = value) {
|
|
|
16769
16769
|
parentPath: lastPart
|
|
16770
16770
|
};
|
|
16771
16771
|
}
|
|
16772
|
-
function reach(obj,
|
|
16773
|
-
return getIn(obj,
|
|
16772
|
+
function reach(obj, path7, value, context) {
|
|
16773
|
+
return getIn(obj, path7, value, context).schema;
|
|
16774
16774
|
}
|
|
16775
16775
|
function clone(src, seen = /* @__PURE__ */ new Map()) {
|
|
16776
16776
|
if (isSchema(src) || !src || typeof src !== "object") return src;
|
|
@@ -16803,16 +16803,16 @@ function clone(src, seen = /* @__PURE__ */ new Map()) {
|
|
|
16803
16803
|
}
|
|
16804
16804
|
return copy;
|
|
16805
16805
|
}
|
|
16806
|
-
function createStandardPath(
|
|
16807
|
-
if (!(
|
|
16806
|
+
function createStandardPath(path7) {
|
|
16807
|
+
if (!(path7 != null && path7.length)) {
|
|
16808
16808
|
return void 0;
|
|
16809
16809
|
}
|
|
16810
16810
|
const segments = [];
|
|
16811
16811
|
let currentSegment = "";
|
|
16812
16812
|
let inBrackets = false;
|
|
16813
16813
|
let inQuotes = false;
|
|
16814
|
-
for (let i = 0; i <
|
|
16815
|
-
const char =
|
|
16814
|
+
for (let i = 0; i < path7.length; i++) {
|
|
16815
|
+
const char = path7[i];
|
|
16816
16816
|
if (char === "[" && !inQuotes) {
|
|
16817
16817
|
if (currentSegment) {
|
|
16818
16818
|
segments.push(...currentSegment.split(".").filter(Boolean));
|
|
@@ -16852,10 +16852,10 @@ function createStandardPath(path6) {
|
|
|
16852
16852
|
return segments;
|
|
16853
16853
|
}
|
|
16854
16854
|
function createStandardIssues(error2, parentPath) {
|
|
16855
|
-
const
|
|
16855
|
+
const path7 = parentPath ? `${parentPath}.${error2.path}` : error2.path;
|
|
16856
16856
|
return error2.errors.map((err) => ({
|
|
16857
16857
|
message: err,
|
|
16858
|
-
path: createStandardPath(
|
|
16858
|
+
path: createStandardPath(path7)
|
|
16859
16859
|
}));
|
|
16860
16860
|
}
|
|
16861
16861
|
function issuesFromValidationError(error2, parentPath) {
|
|
@@ -16863,8 +16863,8 @@ function issuesFromValidationError(error2, parentPath) {
|
|
|
16863
16863
|
if (!((_error$inner = error2.inner) != null && _error$inner.length) && error2.errors.length) {
|
|
16864
16864
|
return createStandardIssues(error2, parentPath);
|
|
16865
16865
|
}
|
|
16866
|
-
const
|
|
16867
|
-
return error2.inner.flatMap((err) => issuesFromValidationError(err,
|
|
16866
|
+
const path7 = parentPath ? `${parentPath}.${error2.path}` : error2.path;
|
|
16867
|
+
return error2.inner.flatMap((err) => issuesFromValidationError(err, path7));
|
|
16868
16868
|
}
|
|
16869
16869
|
function create$8(spec) {
|
|
16870
16870
|
return new MixedSchema(spec);
|
|
@@ -16932,7 +16932,7 @@ function sortFields(fields, excludedEdges = []) {
|
|
|
16932
16932
|
let value = fields[key];
|
|
16933
16933
|
nodes.add(key);
|
|
16934
16934
|
if (Reference.isRef(value) && value.isSibling) addNode(value.path, key);
|
|
16935
|
-
else if (isSchema(value) && "deps" in value) value.deps.forEach((
|
|
16935
|
+
else if (isSchema(value) && "deps" in value) value.deps.forEach((path7) => addNode(path7, key));
|
|
16936
16936
|
}
|
|
16937
16937
|
return import_toposort.default.array(Array.from(nodes), edges).reverse();
|
|
16938
16938
|
}
|
|
@@ -17059,9 +17059,9 @@ var init_index_esm = __esm({
|
|
|
17059
17059
|
_Symbol$toStringTag2 = Symbol.toStringTag;
|
|
17060
17060
|
ValidationError = class _ValidationError extends Error {
|
|
17061
17061
|
static formatError(message, params) {
|
|
17062
|
-
const
|
|
17062
|
+
const path7 = params.label || params.path || "this";
|
|
17063
17063
|
params = Object.assign({}, params, {
|
|
17064
|
-
path:
|
|
17064
|
+
path: path7,
|
|
17065
17065
|
originalPath: params.path
|
|
17066
17066
|
});
|
|
17067
17067
|
if (typeof message === "string") return message.replace(strReg, (_, key) => printValue(params[key]));
|
|
@@ -17107,13 +17107,13 @@ var init_index_esm = __esm({
|
|
|
17107
17107
|
oneOf: "${path} must be one of the following values: ${values}",
|
|
17108
17108
|
notOneOf: "${path} must not be one of the following values: ${values}",
|
|
17109
17109
|
notType: ({
|
|
17110
|
-
path:
|
|
17110
|
+
path: path7,
|
|
17111
17111
|
type,
|
|
17112
17112
|
value,
|
|
17113
17113
|
originalValue
|
|
17114
17114
|
}) => {
|
|
17115
17115
|
const castMsg = originalValue != null && originalValue !== value ? ` (cast from the value \`${printValue(originalValue, true)}\`).` : ".";
|
|
17116
|
-
return type !== "mixed" ? `${
|
|
17116
|
+
return type !== "mixed" ? `${path7} must be a \`${type}\` type, but the final value was: \`${printValue(value, true)}\`` + castMsg : `${path7} must match the configured type. The validated value was: \`${printValue(value, true)}\`` + castMsg;
|
|
17117
17117
|
}
|
|
17118
17118
|
};
|
|
17119
17119
|
string = {
|
|
@@ -17159,14 +17159,14 @@ var init_index_esm = __esm({
|
|
|
17159
17159
|
tuple = {
|
|
17160
17160
|
notType: (params) => {
|
|
17161
17161
|
const {
|
|
17162
|
-
path:
|
|
17162
|
+
path: path7,
|
|
17163
17163
|
value,
|
|
17164
17164
|
spec
|
|
17165
17165
|
} = params;
|
|
17166
17166
|
const typeLen = spec.types.length;
|
|
17167
17167
|
if (Array.isArray(value)) {
|
|
17168
|
-
if (value.length < typeLen) return `${
|
|
17169
|
-
if (value.length > typeLen) return `${
|
|
17168
|
+
if (value.length < typeLen) return `${path7} tuple value has too few items, expected a length of ${typeLen} but got ${value.length} for value: \`${printValue(value, true)}\``;
|
|
17169
|
+
if (value.length > typeLen) return `${path7} tuple value has too many items, expected a length of ${typeLen} but got ${value.length} for value: \`${printValue(value, true)}\``;
|
|
17170
17170
|
}
|
|
17171
17171
|
return ValidationError.formatError(mixed.notType, params);
|
|
17172
17172
|
}
|
|
@@ -17283,10 +17283,10 @@ var init_index_esm = __esm({
|
|
|
17283
17283
|
}
|
|
17284
17284
|
return description;
|
|
17285
17285
|
}
|
|
17286
|
-
resolveAll(
|
|
17286
|
+
resolveAll(resolve5) {
|
|
17287
17287
|
let result = [];
|
|
17288
17288
|
for (const item of this.values()) {
|
|
17289
|
-
result.push(
|
|
17289
|
+
result.push(resolve5(item));
|
|
17290
17290
|
}
|
|
17291
17291
|
return result;
|
|
17292
17292
|
}
|
|
@@ -17458,7 +17458,7 @@ attempted value: ${formattedValue}
|
|
|
17458
17458
|
}
|
|
17459
17459
|
_validate(_value, options = {}, panic, next) {
|
|
17460
17460
|
let {
|
|
17461
|
-
path:
|
|
17461
|
+
path: path7,
|
|
17462
17462
|
originalValue = _value,
|
|
17463
17463
|
strict = this.spec.strict
|
|
17464
17464
|
} = options;
|
|
@@ -17473,7 +17473,7 @@ attempted value: ${formattedValue}
|
|
|
17473
17473
|
if (test) initialTests.push(test);
|
|
17474
17474
|
}
|
|
17475
17475
|
this.runTests({
|
|
17476
|
-
path:
|
|
17476
|
+
path: path7,
|
|
17477
17477
|
value,
|
|
17478
17478
|
originalValue,
|
|
17479
17479
|
options,
|
|
@@ -17483,7 +17483,7 @@ attempted value: ${formattedValue}
|
|
|
17483
17483
|
return next(initialErrors, value);
|
|
17484
17484
|
}
|
|
17485
17485
|
this.runTests({
|
|
17486
|
-
path:
|
|
17486
|
+
path: path7,
|
|
17487
17487
|
value,
|
|
17488
17488
|
originalValue,
|
|
17489
17489
|
options,
|
|
@@ -17501,7 +17501,7 @@ attempted value: ${formattedValue}
|
|
|
17501
17501
|
tests,
|
|
17502
17502
|
value,
|
|
17503
17503
|
originalValue,
|
|
17504
|
-
path:
|
|
17504
|
+
path: path7,
|
|
17505
17505
|
options
|
|
17506
17506
|
} = runOptions;
|
|
17507
17507
|
let panicOnce = (arg) => {
|
|
@@ -17520,7 +17520,7 @@ attempted value: ${formattedValue}
|
|
|
17520
17520
|
let args = {
|
|
17521
17521
|
value,
|
|
17522
17522
|
originalValue,
|
|
17523
|
-
path:
|
|
17523
|
+
path: path7,
|
|
17524
17524
|
options,
|
|
17525
17525
|
schema: this
|
|
17526
17526
|
};
|
|
@@ -17573,12 +17573,12 @@ attempted value: ${formattedValue}
|
|
|
17573
17573
|
value
|
|
17574
17574
|
}));
|
|
17575
17575
|
let disableStackTrace = (_options$disableStack2 = options == null ? void 0 : options.disableStackTrace) != null ? _options$disableStack2 : schema.spec.disableStackTrace;
|
|
17576
|
-
return new Promise((
|
|
17576
|
+
return new Promise((resolve5, reject) => schema._validate(value, options, (error2, parsed) => {
|
|
17577
17577
|
if (ValidationError.isError(error2)) error2.value = parsed;
|
|
17578
17578
|
reject(error2);
|
|
17579
17579
|
}, (errors, validated) => {
|
|
17580
17580
|
if (errors.length) reject(new ValidationError(errors, validated, void 0, void 0, disableStackTrace));
|
|
17581
|
-
else
|
|
17581
|
+
else resolve5(validated);
|
|
17582
17582
|
}));
|
|
17583
17583
|
}
|
|
17584
17584
|
validateSync(value, options) {
|
|
@@ -17882,15 +17882,15 @@ attempted value: ${formattedValue}
|
|
|
17882
17882
|
}
|
|
17883
17883
|
};
|
|
17884
17884
|
Schema.prototype.__isYupSchema__ = true;
|
|
17885
|
-
for (const method of ["validate", "validateSync"]) Schema.prototype[`${method}At`] = function(
|
|
17885
|
+
for (const method of ["validate", "validateSync"]) Schema.prototype[`${method}At`] = function(path7, value, options = {}) {
|
|
17886
17886
|
const {
|
|
17887
17887
|
parent,
|
|
17888
17888
|
parentPath,
|
|
17889
17889
|
schema
|
|
17890
|
-
} = getIn(this,
|
|
17890
|
+
} = getIn(this, path7, value, options.context);
|
|
17891
17891
|
return schema[method](parent && parent[parentPath], Object.assign({}, options, {
|
|
17892
17892
|
parent,
|
|
17893
|
-
path:
|
|
17893
|
+
path: path7
|
|
17894
17894
|
}));
|
|
17895
17895
|
};
|
|
17896
17896
|
for (const alias of ["equals", "is"]) Schema.prototype[alias] = Schema.prototype.oneOf;
|
|
@@ -18372,10 +18372,10 @@ attempted value: ${formattedValue}
|
|
|
18372
18372
|
return schema.isType(parsed) ? parsed : value;
|
|
18373
18373
|
};
|
|
18374
18374
|
deepHas = (obj, p) => {
|
|
18375
|
-
const
|
|
18376
|
-
if (
|
|
18377
|
-
let last =
|
|
18378
|
-
let parent = (0, import_property_expr.getter)((0, import_property_expr.join)(
|
|
18375
|
+
const path7 = [...(0, import_property_expr.normalizePath)(p)];
|
|
18376
|
+
if (path7.length === 1) return path7[0] in obj;
|
|
18377
|
+
let last = path7.pop();
|
|
18378
|
+
let parent = (0, import_property_expr.getter)((0, import_property_expr.join)(path7), true)(obj);
|
|
18379
18379
|
return !!(parent && last in parent);
|
|
18380
18380
|
};
|
|
18381
18381
|
isObject = (obj) => Object.prototype.toString.call(obj) === "[object Object]";
|
|
@@ -18978,11 +18978,11 @@ attempted value: ${formattedValue}
|
|
|
18978
18978
|
validateSync(value, options) {
|
|
18979
18979
|
return this._resolve(value, options).validateSync(value, options);
|
|
18980
18980
|
}
|
|
18981
|
-
validateAt(
|
|
18982
|
-
return catchValidationError(() => this._resolve(value, options).validateAt(
|
|
18981
|
+
validateAt(path7, value, options) {
|
|
18982
|
+
return catchValidationError(() => this._resolve(value, options).validateAt(path7, value, options));
|
|
18983
18983
|
}
|
|
18984
|
-
validateSyncAt(
|
|
18985
|
-
return this._resolve(value, options).validateSyncAt(
|
|
18984
|
+
validateSyncAt(path7, value, options) {
|
|
18985
|
+
return this._resolve(value, options).validateSyncAt(path7, value, options);
|
|
18986
18986
|
}
|
|
18987
18987
|
isValid(value, options) {
|
|
18988
18988
|
try {
|
|
@@ -20347,7 +20347,7 @@ var require_utils = __commonJS({
|
|
|
20347
20347
|
const hasPendingDocs = systems2.some((i) => i.documentationPending === true);
|
|
20348
20348
|
if (!hasPendingDocs)
|
|
20349
20349
|
return systems2;
|
|
20350
|
-
await new Promise((
|
|
20350
|
+
await new Promise((resolve5) => setTimeout(resolve5, 4e3));
|
|
20351
20351
|
}
|
|
20352
20352
|
throw new Error(`Waiting for documentation processing to complete timed out after ${timeoutMs / 1e3} seconds for: ${systemIds.join(", ")}. Please try again in a few minutes.`);
|
|
20353
20353
|
}
|
|
@@ -20606,16 +20606,16 @@ var require_utils = __commonJS({
|
|
|
20606
20606
|
function normalizeToolDiffs(diffs) {
|
|
20607
20607
|
return diffs.map((diff) => normalizeToolDiff(diff));
|
|
20608
20608
|
}
|
|
20609
|
-
function composeUrl(host,
|
|
20609
|
+
function composeUrl(host, path7) {
|
|
20610
20610
|
if (!host)
|
|
20611
20611
|
host = "";
|
|
20612
|
-
if (!
|
|
20613
|
-
|
|
20612
|
+
if (!path7)
|
|
20613
|
+
path7 = "";
|
|
20614
20614
|
if (!/^(https?|postgres(ql)?|ftp(s)?|sftp|smb|file):\/\//i.test(host)) {
|
|
20615
20615
|
host = `https://${host}`;
|
|
20616
20616
|
}
|
|
20617
20617
|
const cleanHost = host.endsWith("/") ? host.slice(0, -1) : host;
|
|
20618
|
-
const cleanPath =
|
|
20618
|
+
const cleanPath = path7.startsWith("/") ? path7.slice(1) : path7;
|
|
20619
20619
|
return `${cleanHost}/${cleanPath}`;
|
|
20620
20620
|
}
|
|
20621
20621
|
var detectSystemAuthType = (credentials) => {
|
|
@@ -21354,8 +21354,8 @@ var require_superglue_client = __commonJS({
|
|
|
21354
21354
|
return true;
|
|
21355
21355
|
return false;
|
|
21356
21356
|
}
|
|
21357
|
-
async restRequest(method,
|
|
21358
|
-
const url = `${this.apiEndpoint.replace(/\/$/, "")}${
|
|
21357
|
+
async restRequest(method, path7, body, extraHeaders) {
|
|
21358
|
+
const url = `${this.apiEndpoint.replace(/\/$/, "")}${path7}`;
|
|
21359
21359
|
const headers = {
|
|
21360
21360
|
Authorization: `Bearer ${this.apiKey}`,
|
|
21361
21361
|
...extraHeaders
|
|
@@ -21433,8 +21433,8 @@ var require_superglue_client = __commonJS({
|
|
|
21433
21433
|
* Optionally creates a run record when `createRun` is true.
|
|
21434
21434
|
*/
|
|
21435
21435
|
async runToolConfig(params) {
|
|
21436
|
-
const
|
|
21437
|
-
const response = await this.restRequest("POST",
|
|
21436
|
+
const path7 = params.createRun ? "/v1/tools/run?createRun=true" : "/v1/tools/run";
|
|
21437
|
+
const response = await this.restRequest("POST", path7, {
|
|
21438
21438
|
tool: params.tool,
|
|
21439
21439
|
payload: params.payload,
|
|
21440
21440
|
credentials: params.credentials,
|
|
@@ -21934,7 +21934,7 @@ var import_node_util = require("util");
|
|
|
21934
21934
|
// package.json
|
|
21935
21935
|
var package_default = {
|
|
21936
21936
|
name: "@superglue/cli",
|
|
21937
|
-
version: "1.1.
|
|
21937
|
+
version: "1.1.11",
|
|
21938
21938
|
bin: {
|
|
21939
21939
|
sg: "./dist/cli.js"
|
|
21940
21940
|
},
|
|
@@ -22030,8 +22030,8 @@ function startBackgroundUpdateCheck() {
|
|
|
22030
22030
|
async function printUpdateNotification() {
|
|
22031
22031
|
if (!updateCheckPromise) return;
|
|
22032
22032
|
try {
|
|
22033
|
-
const timeout = new Promise((
|
|
22034
|
-
const timer = setTimeout(() =>
|
|
22033
|
+
const timeout = new Promise((resolve5) => {
|
|
22034
|
+
const timer = setTimeout(() => resolve5(null), 2e3);
|
|
22035
22035
|
timer.unref();
|
|
22036
22036
|
});
|
|
22037
22037
|
const latest = await Promise.race([updateCheckPromise, timeout]);
|
|
@@ -22355,21 +22355,21 @@ function renderDiffs(diffs) {
|
|
|
22355
22355
|
async function prompt(message, defaultValue) {
|
|
22356
22356
|
const rl = readline.createInterface({ input: process.stdin, output: process.stdout });
|
|
22357
22357
|
const suffix = defaultValue ? ` ${c.dim}[${defaultValue}]${c.reset}` : "";
|
|
22358
|
-
return new Promise((
|
|
22358
|
+
return new Promise((resolve5) => {
|
|
22359
22359
|
rl.question(` ${message}${suffix}: `, (answer) => {
|
|
22360
22360
|
rl.close();
|
|
22361
|
-
|
|
22361
|
+
resolve5(answer.trim() || defaultValue || "");
|
|
22362
22362
|
});
|
|
22363
22363
|
});
|
|
22364
22364
|
}
|
|
22365
22365
|
async function promptHidden(message) {
|
|
22366
|
-
return new Promise((
|
|
22366
|
+
return new Promise((resolve5) => {
|
|
22367
22367
|
process.stdout.write(`${message}: `);
|
|
22368
22368
|
if (!process.stdin.isTTY) {
|
|
22369
22369
|
const rl = readline.createInterface({ input: process.stdin });
|
|
22370
22370
|
rl.once("line", (line) => {
|
|
22371
22371
|
rl.close();
|
|
22372
|
-
|
|
22372
|
+
resolve5(line.trim());
|
|
22373
22373
|
});
|
|
22374
22374
|
return;
|
|
22375
22375
|
}
|
|
@@ -22384,7 +22384,7 @@ async function promptHidden(message) {
|
|
|
22384
22384
|
process.stdin.removeListener("data", onData);
|
|
22385
22385
|
process.stdin.pause();
|
|
22386
22386
|
process.stdout.write("\n");
|
|
22387
|
-
|
|
22387
|
+
resolve5(input);
|
|
22388
22388
|
return;
|
|
22389
22389
|
} else if (char === "") {
|
|
22390
22390
|
process.stdin.setRawMode(false);
|
|
@@ -22427,7 +22427,7 @@ async function choose(message, options, defaultIndex = 0) {
|
|
|
22427
22427
|
${c.bold}${message}${c.reset} ${c.dim}(\u2191/\u2193 to select, enter to confirm)${c.reset}`
|
|
22428
22428
|
);
|
|
22429
22429
|
render();
|
|
22430
|
-
return new Promise((
|
|
22430
|
+
return new Promise((resolve5) => {
|
|
22431
22431
|
process.stdin.setRawMode(true);
|
|
22432
22432
|
process.stdin.resume();
|
|
22433
22433
|
const onData = (ch) => {
|
|
@@ -22436,7 +22436,7 @@ async function choose(message, options, defaultIndex = 0) {
|
|
|
22436
22436
|
process.stdin.setRawMode(false);
|
|
22437
22437
|
process.stdin.removeListener("data", onData);
|
|
22438
22438
|
process.stdin.pause();
|
|
22439
|
-
|
|
22439
|
+
resolve5(selected);
|
|
22440
22440
|
return;
|
|
22441
22441
|
}
|
|
22442
22442
|
if (s === "") {
|
|
@@ -23850,11 +23850,49 @@ function registerUpdateCommand(program2) {
|
|
|
23850
23850
|
});
|
|
23851
23851
|
}
|
|
23852
23852
|
|
|
23853
|
+
// src/commands/skill.ts
|
|
23854
|
+
var fs9 = __toESM(require("fs"));
|
|
23855
|
+
var path6 = __toESM(require("path"));
|
|
23856
|
+
var SKILLS_DIR = fs9.existsSync(path6.resolve(__dirname, "skills/superglue")) ? path6.resolve(__dirname, "skills/superglue") : path6.resolve(__dirname, "../../skills/superglue");
|
|
23857
|
+
function registerSkillCommand(program2) {
|
|
23858
|
+
program2.command("skill").description("Print the superglue skill reference (SKILL.md) for AI agents").argument("[topic]", "Optional topic: references/<topic>.md (e.g. databases, integration)").action((topic) => {
|
|
23859
|
+
const file = topic ? path6.join(SKILLS_DIR, "references", `${topic}.md`) : path6.join(SKILLS_DIR, "SKILL.md");
|
|
23860
|
+
if (!fs9.existsSync(file)) {
|
|
23861
|
+
if (topic) {
|
|
23862
|
+
const refsDir = path6.join(SKILLS_DIR, "references");
|
|
23863
|
+
const available = fs9.existsSync(refsDir) ? fs9.readdirSync(refsDir).filter((f) => f.endsWith(".md")).map((f) => f.replace(".md", "")) : [];
|
|
23864
|
+
error(
|
|
23865
|
+
`Topic not found: ${topic}. Available: ${available.join(", ") || "none"}`
|
|
23866
|
+
);
|
|
23867
|
+
} else {
|
|
23868
|
+
error(`Skill file not found: ${file}`);
|
|
23869
|
+
}
|
|
23870
|
+
process.exit(1);
|
|
23871
|
+
}
|
|
23872
|
+
process.stdout.write(fs9.readFileSync(file, "utf-8"));
|
|
23873
|
+
});
|
|
23874
|
+
}
|
|
23875
|
+
|
|
23853
23876
|
// src/cli.ts
|
|
23854
23877
|
var program = new import_commander5.Command();
|
|
23855
23878
|
program.name("sg").description("superglue CLI \u2014 build, run, and manage integration tools").version(CLI_VERSION).option("--api-key <key>", "superglue API key").option("--endpoint <url>", "superglue API endpoint").option("--json", "force JSON output").addHelpText(
|
|
23856
23879
|
"after",
|
|
23857
23880
|
`
|
|
23881
|
+
IMPORTANT FOR AI AGENTS:
|
|
23882
|
+
Before using the sg CLI, you MUST read the skill reference for complete usage
|
|
23883
|
+
instructions, patterns, and examples:
|
|
23884
|
+
|
|
23885
|
+
sg skill Print the main SKILL.md reference
|
|
23886
|
+
sg skill databases Print the databases reference
|
|
23887
|
+
sg skill integration Print the SDK/REST/webhook reference
|
|
23888
|
+
sg skill file-servers Print the file servers reference
|
|
23889
|
+
sg skill transforms-and-output Print the transforms reference
|
|
23890
|
+
sg skill redis Print the Redis reference
|
|
23891
|
+
|
|
23892
|
+
The main skill reference covers: tool building, system setup, OAuth flows,
|
|
23893
|
+
credential handling, variable syntax, data selectors, and common pitfalls.
|
|
23894
|
+
DO NOT attempt to use sg commands without reading the skill reference first.
|
|
23895
|
+
|
|
23858
23896
|
All Commands:
|
|
23859
23897
|
sg init Set up CLI configuration
|
|
23860
23898
|
|
|
@@ -23883,6 +23921,7 @@ All Commands:
|
|
|
23883
23921
|
sg run list [toolId] List runs, optionally filtered by tool
|
|
23884
23922
|
sg run get <runId> Get details of a specific run
|
|
23885
23923
|
|
|
23924
|
+
sg skill [topic] Print skill reference for AI agents
|
|
23886
23925
|
sg update Update CLI to latest version
|
|
23887
23926
|
sg update --check Check for available updates
|
|
23888
23927
|
|
|
@@ -23900,6 +23939,7 @@ var getContext = () => {
|
|
|
23900
23939
|
};
|
|
23901
23940
|
registerInitCommand(program);
|
|
23902
23941
|
registerUpdateCommand(program);
|
|
23942
|
+
registerSkillCommand(program);
|
|
23903
23943
|
registerToolCommands(program, getContext);
|
|
23904
23944
|
registerSystemCommands(program, getContext);
|
|
23905
23945
|
registerRunCommands(program, getContext);
|