@ship-cli/core 0.1.1 → 0.1.3
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/bin.js +592 -464
- package/package.json +1 -1
package/dist/bin.js
CHANGED
|
@@ -394,12 +394,12 @@ var require_directives = __commonJS({
|
|
|
394
394
|
* Given a fully resolved tag, returns its printable string form,
|
|
395
395
|
* taking into account current tag prefixes and defaults.
|
|
396
396
|
*/
|
|
397
|
-
tagString(
|
|
397
|
+
tagString(tag6) {
|
|
398
398
|
for (const [handle, prefix] of Object.entries(this.tags)) {
|
|
399
|
-
if (
|
|
400
|
-
return handle + escapeTagName(
|
|
399
|
+
if (tag6.startsWith(prefix))
|
|
400
|
+
return handle + escapeTagName(tag6.substring(prefix.length));
|
|
401
401
|
}
|
|
402
|
-
return
|
|
402
|
+
return tag6[0] === "!" ? tag6 : `!<${tag6}>`;
|
|
403
403
|
}
|
|
404
404
|
toString(doc) {
|
|
405
405
|
const lines3 = this.yaml.explicit ? [`%YAML ${this.yaml.version || "1.2"}`] : [];
|
|
@@ -583,8 +583,8 @@ var require_Node = __commonJS({
|
|
|
583
583
|
var identity3 = require_identity();
|
|
584
584
|
var toJS = require_toJS();
|
|
585
585
|
var NodeBase = class {
|
|
586
|
-
constructor(
|
|
587
|
-
Object.defineProperty(this, identity3.NODE_TYPE, { value:
|
|
586
|
+
constructor(type3) {
|
|
587
|
+
Object.defineProperty(this, identity3.NODE_TYPE, { value: type3 });
|
|
588
588
|
}
|
|
589
589
|
/** Create a copy of this node. */
|
|
590
590
|
clone() {
|
|
@@ -862,8 +862,8 @@ var require_Collection = __commonJS({
|
|
|
862
862
|
}
|
|
863
863
|
var isEmptyPath = (path3) => path3 == null || typeof path3 === "object" && !!path3[Symbol.iterator]().next().done;
|
|
864
864
|
var Collection = class extends Node.NodeBase {
|
|
865
|
-
constructor(
|
|
866
|
-
super(
|
|
865
|
+
constructor(type3, schema) {
|
|
866
|
+
super(type3);
|
|
867
867
|
Object.defineProperty(this, "schema", {
|
|
868
868
|
value: schema,
|
|
869
869
|
configurable: true,
|
|
@@ -1265,13 +1265,13 @@ ${indent3}`) + "'";
|
|
|
1265
1265
|
} catch {
|
|
1266
1266
|
blockEndNewlines = /\n+(?!\n|$)/g;
|
|
1267
1267
|
}
|
|
1268
|
-
function blockString({ comment, type:
|
|
1268
|
+
function blockString({ comment, type: type3, value: value5 }, ctx, onComment, onChompKeep) {
|
|
1269
1269
|
const { blockQuote, commentString, lineWidth } = ctx.options;
|
|
1270
1270
|
if (!blockQuote || /\n[\t ]+$/.test(value5)) {
|
|
1271
1271
|
return quotedString(value5, ctx);
|
|
1272
1272
|
}
|
|
1273
1273
|
const indent3 = ctx.indent || (ctx.forceBlockIndent || containsDocumentMarker(value5) ? " " : "");
|
|
1274
|
-
const literal2 = blockQuote === "literal" ? true : blockQuote === "folded" ||
|
|
1274
|
+
const literal2 = blockQuote === "literal" ? true : blockQuote === "folded" || type3 === Scalar.Scalar.BLOCK_FOLDED ? false : type3 === Scalar.Scalar.BLOCK_LITERAL ? true : !lineLengthOverLimit(value5, lineWidth, indent3.length);
|
|
1275
1275
|
if (!value5)
|
|
1276
1276
|
return literal2 ? "|\n" : ">\n";
|
|
1277
1277
|
let chomp;
|
|
@@ -1326,7 +1326,7 @@ ${indent3}`) + "'";
|
|
|
1326
1326
|
const foldedValue = value5.replace(/\n+/g, "\n$&").replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g, "$1$2").replace(/\n+/g, `$&${indent3}`);
|
|
1327
1327
|
let literalFallback = false;
|
|
1328
1328
|
const foldOptions = getFoldOptions(ctx, true);
|
|
1329
|
-
if (blockQuote !== "folded" &&
|
|
1329
|
+
if (blockQuote !== "folded" && type3 !== Scalar.Scalar.BLOCK_FOLDED) {
|
|
1330
1330
|
foldOptions.onOverflow = () => {
|
|
1331
1331
|
literalFallback = true;
|
|
1332
1332
|
};
|
|
@@ -1341,7 +1341,7 @@ ${indent3}${body}`;
|
|
|
1341
1341
|
${indent3}${start4}${value5}${end5}`;
|
|
1342
1342
|
}
|
|
1343
1343
|
function plainString(item, ctx, onComment, onChompKeep) {
|
|
1344
|
-
const { type:
|
|
1344
|
+
const { type: type3, value: value5 } = item;
|
|
1345
1345
|
const { actualString, implicitKey, indent: indent3, indentStep, inFlow } = ctx;
|
|
1346
1346
|
if (implicitKey && value5.includes("\n") || inFlow && /[[\]{},]/.test(value5)) {
|
|
1347
1347
|
return quotedString(value5, ctx);
|
|
@@ -1349,7 +1349,7 @@ ${indent3}${start4}${value5}${end5}`;
|
|
|
1349
1349
|
if (/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(value5)) {
|
|
1350
1350
|
return implicitKey || inFlow || !value5.includes("\n") ? quotedString(value5, ctx) : blockString(item, ctx, onComment, onChompKeep);
|
|
1351
1351
|
}
|
|
1352
|
-
if (!implicitKey && !inFlow &&
|
|
1352
|
+
if (!implicitKey && !inFlow && type3 !== Scalar.Scalar.PLAIN && value5.includes("\n")) {
|
|
1353
1353
|
return blockString(item, ctx, onComment, onChompKeep);
|
|
1354
1354
|
}
|
|
1355
1355
|
if (containsDocumentMarker(value5)) {
|
|
@@ -1363,7 +1363,7 @@ ${indent3}${start4}${value5}${end5}`;
|
|
|
1363
1363
|
const str = value5.replace(/\n+/g, `$&
|
|
1364
1364
|
${indent3}`);
|
|
1365
1365
|
if (actualString) {
|
|
1366
|
-
const test = (
|
|
1366
|
+
const test = (tag6) => tag6.default && tag6.tag !== "tag:yaml.org,2002:str" && tag6.test?.test(str);
|
|
1367
1367
|
const { compat, tags: tags2 } = ctx.doc.schema;
|
|
1368
1368
|
if (tags2.some(test) || compat?.some(test))
|
|
1369
1369
|
return quotedString(value5, ctx);
|
|
@@ -1373,10 +1373,10 @@ ${indent3}`);
|
|
|
1373
1373
|
function stringifyString(item, ctx, onComment, onChompKeep) {
|
|
1374
1374
|
const { implicitKey, inFlow } = ctx;
|
|
1375
1375
|
const ss = typeof item.value === "string" ? item : Object.assign({}, item, { value: String(item.value) });
|
|
1376
|
-
let { type:
|
|
1377
|
-
if (
|
|
1376
|
+
let { type: type3 } = item;
|
|
1377
|
+
if (type3 !== Scalar.Scalar.QUOTE_DOUBLE) {
|
|
1378
1378
|
if (/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(ss.value))
|
|
1379
|
-
|
|
1379
|
+
type3 = Scalar.Scalar.QUOTE_DOUBLE;
|
|
1380
1380
|
}
|
|
1381
1381
|
const _stringify = (_type) => {
|
|
1382
1382
|
switch (_type) {
|
|
@@ -1393,7 +1393,7 @@ ${indent3}`);
|
|
|
1393
1393
|
return null;
|
|
1394
1394
|
}
|
|
1395
1395
|
};
|
|
1396
|
-
let res = _stringify(
|
|
1396
|
+
let res = _stringify(type3);
|
|
1397
1397
|
if (res === null) {
|
|
1398
1398
|
const { defaultKeyType, defaultStringType } = ctx.options;
|
|
1399
1399
|
const t = implicitKey && defaultKeyType || defaultStringType;
|
|
@@ -1491,9 +1491,9 @@ var require_stringify = __commonJS({
|
|
|
1491
1491
|
anchors$1.add(anchor);
|
|
1492
1492
|
props.push(`&${anchor}`);
|
|
1493
1493
|
}
|
|
1494
|
-
const
|
|
1495
|
-
if (
|
|
1496
|
-
props.push(doc.directives.tagString(
|
|
1494
|
+
const tag6 = node.tag ?? (tagObj.default ? null : tagObj.tag);
|
|
1495
|
+
if (tag6)
|
|
1496
|
+
props.push(doc.directives.tagString(tag6));
|
|
1497
1497
|
return props.join(" ");
|
|
1498
1498
|
}
|
|
1499
1499
|
function stringify3(item, ctx, onComment, onChompKeep) {
|
|
@@ -1698,7 +1698,7 @@ var require_merge = __commonJS({
|
|
|
1698
1698
|
}),
|
|
1699
1699
|
stringify: () => MERGE_KEY
|
|
1700
1700
|
};
|
|
1701
|
-
var isMergeKey = (ctx, key) => (merge11.identify(key) || identity3.isScalar(key) && (!key.type || key.type === Scalar.Scalar.PLAIN) && merge11.identify(key.value)) && ctx?.doc.schema.tags.some((
|
|
1701
|
+
var isMergeKey = (ctx, key) => (merge11.identify(key) || identity3.isScalar(key) && (!key.type || key.type === Scalar.Scalar.PLAIN) && merge11.identify(key.value)) && ctx?.doc.schema.tags.some((tag6) => tag6.tag === merge11.tag && tag6.default);
|
|
1702
1702
|
function addMergeToJSMap(ctx, map34, value5) {
|
|
1703
1703
|
value5 = ctx && identity3.isAlias(value5) ? value5.resolve(ctx.doc) : value5;
|
|
1704
1704
|
if (identity3.isSeq(value5))
|
|
@@ -2344,14 +2344,14 @@ var require_bool = __commonJS({
|
|
|
2344
2344
|
// ../../node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/stringify/stringifyNumber.js
|
|
2345
2345
|
var require_stringifyNumber = __commonJS({
|
|
2346
2346
|
"../../node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/stringify/stringifyNumber.js"(exports$1) {
|
|
2347
|
-
function stringifyNumber({ format: format6, minFractionDigits, tag:
|
|
2347
|
+
function stringifyNumber({ format: format6, minFractionDigits, tag: tag6, value: value5 }) {
|
|
2348
2348
|
if (typeof value5 === "bigint")
|
|
2349
2349
|
return String(value5);
|
|
2350
2350
|
const num = typeof value5 === "number" ? value5 : Number(value5);
|
|
2351
2351
|
if (!isFinite(num))
|
|
2352
2352
|
return isNaN(num) ? ".nan" : num < 0 ? "-.inf" : ".inf";
|
|
2353
2353
|
let n = Object.is(value5, -0) ? "-0" : JSON.stringify(value5);
|
|
2354
|
-
if (!format6 && minFractionDigits && (!
|
|
2354
|
+
if (!format6 && minFractionDigits && (!tag6 || tag6 === "tag:yaml.org,2002:float") && /^\d/.test(n)) {
|
|
2355
2355
|
let i = n.indexOf(".");
|
|
2356
2356
|
if (i < 0) {
|
|
2357
2357
|
i = n.length;
|
|
@@ -2582,7 +2582,7 @@ var require_binary = __commonJS({
|
|
|
2582
2582
|
return src;
|
|
2583
2583
|
}
|
|
2584
2584
|
},
|
|
2585
|
-
stringify({ comment, type:
|
|
2585
|
+
stringify({ comment, type: type3, value: value5 }, ctx, onComment, onChompKeep) {
|
|
2586
2586
|
if (!value5)
|
|
2587
2587
|
return "";
|
|
2588
2588
|
const buf = value5;
|
|
@@ -2597,17 +2597,17 @@ var require_binary = __commonJS({
|
|
|
2597
2597
|
} else {
|
|
2598
2598
|
throw new Error("This environment does not support writing binary tags; either Buffer or btoa is required");
|
|
2599
2599
|
}
|
|
2600
|
-
|
|
2601
|
-
if (
|
|
2600
|
+
type3 ?? (type3 = Scalar.Scalar.BLOCK_LITERAL);
|
|
2601
|
+
if (type3 !== Scalar.Scalar.QUOTE_DOUBLE) {
|
|
2602
2602
|
const lineWidth = Math.max(ctx.options.lineWidth - ctx.indent.length, ctx.options.minContentWidth);
|
|
2603
2603
|
const n = Math.ceil(str.length / lineWidth);
|
|
2604
2604
|
const lines3 = new Array(n);
|
|
2605
2605
|
for (let i = 0, o2 = 0; i < n; ++i, o2 += lineWidth) {
|
|
2606
2606
|
lines3[i] = str.substr(o2, lineWidth);
|
|
2607
2607
|
}
|
|
2608
|
-
str = lines3.join(
|
|
2608
|
+
str = lines3.join(type3 === Scalar.Scalar.BLOCK_LITERAL ? "\n" : " ");
|
|
2609
2609
|
}
|
|
2610
|
-
return stringifyString.stringifyString({ comment, type:
|
|
2610
|
+
return stringifyString.stringifyString({ comment, type: type3, value: str }, ctx, onComment, onChompKeep);
|
|
2611
2611
|
}
|
|
2612
2612
|
};
|
|
2613
2613
|
exports$1.binary = binary;
|
|
@@ -3212,17 +3212,17 @@ var require_tags = __commonJS({
|
|
|
3212
3212
|
}
|
|
3213
3213
|
}
|
|
3214
3214
|
if (Array.isArray(customTags)) {
|
|
3215
|
-
for (const
|
|
3216
|
-
tags2 = tags2.concat(
|
|
3215
|
+
for (const tag6 of customTags)
|
|
3216
|
+
tags2 = tags2.concat(tag6);
|
|
3217
3217
|
} else if (typeof customTags === "function") {
|
|
3218
3218
|
tags2 = customTags(tags2.slice());
|
|
3219
3219
|
}
|
|
3220
3220
|
if (addMergeTag)
|
|
3221
3221
|
tags2 = tags2.concat(merge11.merge);
|
|
3222
|
-
return tags2.reduce((tags3,
|
|
3223
|
-
const tagObj = typeof
|
|
3222
|
+
return tags2.reduce((tags3, tag6) => {
|
|
3223
|
+
const tagObj = typeof tag6 === "string" ? tagsByName[tag6] : tag6;
|
|
3224
3224
|
if (!tagObj) {
|
|
3225
|
-
const tagName = JSON.stringify(
|
|
3225
|
+
const tagName = JSON.stringify(tag6);
|
|
3226
3226
|
const keys6 = Object.keys(tagsByName).map((key) => JSON.stringify(key)).join(", ");
|
|
3227
3227
|
throw new Error(`Unknown custom tag ${tagName}; use one of ${keys6}`);
|
|
3228
3228
|
}
|
|
@@ -3459,7 +3459,7 @@ var require_Document = __commonJS({
|
|
|
3459
3459
|
options5 = replacer;
|
|
3460
3460
|
replacer = void 0;
|
|
3461
3461
|
}
|
|
3462
|
-
const { aliasDuplicateObjects, anchorPrefix, flow: flow2, keepUndefined, onTagObj, tag:
|
|
3462
|
+
const { aliasDuplicateObjects, anchorPrefix, flow: flow2, keepUndefined, onTagObj, tag: tag6 } = options5 ?? {};
|
|
3463
3463
|
const { onAnchor, setAnchors, sourceObjects } = anchors.createNodeAnchors(
|
|
3464
3464
|
this,
|
|
3465
3465
|
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
|
|
@@ -3474,7 +3474,7 @@ var require_Document = __commonJS({
|
|
|
3474
3474
|
schema: this.schema,
|
|
3475
3475
|
sourceObjects
|
|
3476
3476
|
};
|
|
3477
|
-
const node = createNode.createNode(value5,
|
|
3477
|
+
const node = createNode.createNode(value5, tag6, ctx);
|
|
3478
3478
|
if (flow2 && identity3.isCollection(node))
|
|
3479
3479
|
node.flow = true;
|
|
3480
3480
|
setAnchors();
|
|
@@ -3731,7 +3731,7 @@ var require_resolve_props = __commonJS({
|
|
|
3731
3731
|
let reqSpace = false;
|
|
3732
3732
|
let tab = null;
|
|
3733
3733
|
let anchor = null;
|
|
3734
|
-
let
|
|
3734
|
+
let tag6 = null;
|
|
3735
3735
|
let newlineAfterProp = null;
|
|
3736
3736
|
let comma3 = null;
|
|
3737
3737
|
let found = null;
|
|
@@ -3777,7 +3777,7 @@ var require_resolve_props = __commonJS({
|
|
|
3777
3777
|
commentSep += token.source;
|
|
3778
3778
|
atNewline = true;
|
|
3779
3779
|
hasNewline = true;
|
|
3780
|
-
if (anchor ||
|
|
3780
|
+
if (anchor || tag6)
|
|
3781
3781
|
newlineAfterProp = token;
|
|
3782
3782
|
hasSpace = true;
|
|
3783
3783
|
break;
|
|
@@ -3793,9 +3793,9 @@ var require_resolve_props = __commonJS({
|
|
|
3793
3793
|
reqSpace = true;
|
|
3794
3794
|
break;
|
|
3795
3795
|
case "tag": {
|
|
3796
|
-
if (
|
|
3796
|
+
if (tag6)
|
|
3797
3797
|
onError4(token, "MULTIPLE_TAGS", "A node can have at most one tag");
|
|
3798
|
-
|
|
3798
|
+
tag6 = token;
|
|
3799
3799
|
start4 ?? (start4 = token.offset);
|
|
3800
3800
|
atNewline = false;
|
|
3801
3801
|
hasSpace = false;
|
|
@@ -3803,7 +3803,7 @@ var require_resolve_props = __commonJS({
|
|
|
3803
3803
|
break;
|
|
3804
3804
|
}
|
|
3805
3805
|
case indicator:
|
|
3806
|
-
if (anchor ||
|
|
3806
|
+
if (anchor || tag6)
|
|
3807
3807
|
onError4(token, "BAD_PROP_ORDER", `Anchors and tags must be after the ${token.source} indicator`);
|
|
3808
3808
|
if (found)
|
|
3809
3809
|
onError4(token, "UNEXPECTED_TOKEN", `Unexpected ${token.source} in ${flow2 ?? "collection"}`);
|
|
@@ -3841,7 +3841,7 @@ var require_resolve_props = __commonJS({
|
|
|
3841
3841
|
comment,
|
|
3842
3842
|
hasNewline,
|
|
3843
3843
|
anchor,
|
|
3844
|
-
tag:
|
|
3844
|
+
tag: tag6,
|
|
3845
3845
|
newlineAfterProp,
|
|
3846
3846
|
end: end5,
|
|
3847
3847
|
start: start4 ?? end5
|
|
@@ -3934,8 +3934,8 @@ var require_resolve_block_map = __commonJS({
|
|
|
3934
3934
|
var utilFlowIndentCheck = require_util_flow_indent_check();
|
|
3935
3935
|
var utilMapIncludes = require_util_map_includes();
|
|
3936
3936
|
var startColMsg = "All mapping items must start at the same column";
|
|
3937
|
-
function resolveBlockMap({ composeNode, composeEmptyNode }, ctx, bm, onError4,
|
|
3938
|
-
const NodeClass =
|
|
3937
|
+
function resolveBlockMap({ composeNode, composeEmptyNode }, ctx, bm, onError4, tag6) {
|
|
3938
|
+
const NodeClass = tag6?.nodeClass ?? YAMLMap.YAMLMap;
|
|
3939
3939
|
const map34 = new NodeClass(ctx.schema);
|
|
3940
3940
|
if (ctx.atRoot)
|
|
3941
3941
|
ctx.atRoot = false;
|
|
@@ -4037,8 +4037,8 @@ var require_resolve_block_seq = __commonJS({
|
|
|
4037
4037
|
var YAMLSeq = require_YAMLSeq();
|
|
4038
4038
|
var resolveProps = require_resolve_props();
|
|
4039
4039
|
var utilFlowIndentCheck = require_util_flow_indent_check();
|
|
4040
|
-
function resolveBlockSeq({ composeNode, composeEmptyNode }, ctx, bs, onError4,
|
|
4041
|
-
const NodeClass =
|
|
4040
|
+
function resolveBlockSeq({ composeNode, composeEmptyNode }, ctx, bs, onError4, tag6) {
|
|
4041
|
+
const NodeClass = tag6?.nodeClass ?? YAMLSeq.YAMLSeq;
|
|
4042
4042
|
const seq2 = new NodeClass(ctx.schema);
|
|
4043
4043
|
if (ctx.atRoot)
|
|
4044
4044
|
ctx.atRoot = false;
|
|
@@ -4090,8 +4090,8 @@ var require_resolve_end = __commonJS({
|
|
|
4090
4090
|
let hasSpace = false;
|
|
4091
4091
|
let sep = "";
|
|
4092
4092
|
for (const token of end5) {
|
|
4093
|
-
const { source, type:
|
|
4094
|
-
switch (
|
|
4093
|
+
const { source, type: type3 } = token;
|
|
4094
|
+
switch (type3) {
|
|
4095
4095
|
case "space":
|
|
4096
4096
|
hasSpace = true;
|
|
4097
4097
|
break;
|
|
@@ -4112,7 +4112,7 @@ var require_resolve_end = __commonJS({
|
|
|
4112
4112
|
hasSpace = true;
|
|
4113
4113
|
break;
|
|
4114
4114
|
default:
|
|
4115
|
-
onError4(token, "UNEXPECTED_TOKEN", `Unexpected ${
|
|
4115
|
+
onError4(token, "UNEXPECTED_TOKEN", `Unexpected ${type3} at node end`);
|
|
4116
4116
|
}
|
|
4117
4117
|
offset += source.length;
|
|
4118
4118
|
}
|
|
@@ -4136,10 +4136,10 @@ var require_resolve_flow_collection = __commonJS({
|
|
|
4136
4136
|
var utilMapIncludes = require_util_map_includes();
|
|
4137
4137
|
var blockMsg = "Block collections are not allowed within flow collections";
|
|
4138
4138
|
var isBlock = (token) => token && (token.type === "block-map" || token.type === "block-seq");
|
|
4139
|
-
function resolveFlowCollection({ composeNode, composeEmptyNode }, ctx, fc, onError4,
|
|
4139
|
+
function resolveFlowCollection({ composeNode, composeEmptyNode }, ctx, fc, onError4, tag6) {
|
|
4140
4140
|
const isMap2 = fc.start.source === "{";
|
|
4141
4141
|
const fcName = isMap2 ? "flow map" : "flow sequence";
|
|
4142
|
-
const NodeClass =
|
|
4142
|
+
const NodeClass = tag6?.nodeClass ?? (isMap2 ? YAMLMap.YAMLMap : YAMLSeq.YAMLSeq);
|
|
4143
4143
|
const coll = new NodeClass(ctx.schema);
|
|
4144
4144
|
coll.flow = true;
|
|
4145
4145
|
const atRoot = ctx.atRoot;
|
|
@@ -4326,8 +4326,8 @@ var require_compose_collection = __commonJS({
|
|
|
4326
4326
|
var resolveBlockMap = require_resolve_block_map();
|
|
4327
4327
|
var resolveBlockSeq = require_resolve_block_seq();
|
|
4328
4328
|
var resolveFlowCollection = require_resolve_flow_collection();
|
|
4329
|
-
function resolveCollection(CN, ctx, token, onError4, tagName,
|
|
4330
|
-
const coll = token.type === "block-map" ? resolveBlockMap.resolveBlockMap(CN, ctx, token, onError4,
|
|
4329
|
+
function resolveCollection(CN, ctx, token, onError4, tagName, tag6) {
|
|
4330
|
+
const coll = token.type === "block-map" ? resolveBlockMap.resolveBlockMap(CN, ctx, token, onError4, tag6) : token.type === "block-seq" ? resolveBlockSeq.resolveBlockSeq(CN, ctx, token, onError4, tag6) : resolveFlowCollection.resolveFlowCollection(CN, ctx, token, onError4, tag6);
|
|
4331
4331
|
const Coll = coll.constructor;
|
|
4332
4332
|
if (tagName === "!" || tagName === Coll.tagName) {
|
|
4333
4333
|
coll.tag = Coll.tagName;
|
|
@@ -4352,12 +4352,12 @@ var require_compose_collection = __commonJS({
|
|
|
4352
4352
|
if (!tagToken || !tagName || tagName === "!" || tagName === YAMLMap.YAMLMap.tagName && expType === "map" || tagName === YAMLSeq.YAMLSeq.tagName && expType === "seq") {
|
|
4353
4353
|
return resolveCollection(CN, ctx, token, onError4, tagName);
|
|
4354
4354
|
}
|
|
4355
|
-
let
|
|
4356
|
-
if (!
|
|
4355
|
+
let tag6 = ctx.schema.tags.find((t) => t.tag === tagName && t.collection === expType);
|
|
4356
|
+
if (!tag6) {
|
|
4357
4357
|
const kt = ctx.schema.knownTags[tagName];
|
|
4358
4358
|
if (kt?.collection === expType) {
|
|
4359
4359
|
ctx.schema.tags.push(Object.assign({}, kt, { default: false }));
|
|
4360
|
-
|
|
4360
|
+
tag6 = kt;
|
|
4361
4361
|
} else {
|
|
4362
4362
|
if (kt) {
|
|
4363
4363
|
onError4(tagToken, "BAD_COLLECTION_TYPE", `${kt.tag} used for ${expType} collection, but expects ${kt.collection ?? "scalar"}`, true);
|
|
@@ -4367,13 +4367,13 @@ var require_compose_collection = __commonJS({
|
|
|
4367
4367
|
return resolveCollection(CN, ctx, token, onError4, tagName);
|
|
4368
4368
|
}
|
|
4369
4369
|
}
|
|
4370
|
-
const coll = resolveCollection(CN, ctx, token, onError4, tagName,
|
|
4371
|
-
const res =
|
|
4370
|
+
const coll = resolveCollection(CN, ctx, token, onError4, tagName, tag6);
|
|
4371
|
+
const res = tag6.resolve?.(coll, (msg) => onError4(tagToken, "TAG_RESOLVE_FAILED", msg), ctx.options) ?? coll;
|
|
4372
4372
|
const node = identity3.isNode(res) ? res : new Scalar.Scalar(res);
|
|
4373
4373
|
node.range = coll.range;
|
|
4374
4374
|
node.tag = tagName;
|
|
4375
|
-
if (
|
|
4376
|
-
node.format =
|
|
4375
|
+
if (tag6?.format)
|
|
4376
|
+
node.format = tag6.format;
|
|
4377
4377
|
return node;
|
|
4378
4378
|
}
|
|
4379
4379
|
exports$1.composeCollection = composeCollection;
|
|
@@ -4389,7 +4389,7 @@ var require_resolve_block_scalar = __commonJS({
|
|
|
4389
4389
|
const header = parseBlockScalarHeader(scalar, ctx.options.strict, onError4);
|
|
4390
4390
|
if (!header)
|
|
4391
4391
|
return { value: "", type: null, comment: "", range: [start4, start4, start4] };
|
|
4392
|
-
const
|
|
4392
|
+
const type3 = header.mode === ">" ? Scalar.Scalar.BLOCK_FOLDED : Scalar.Scalar.BLOCK_LITERAL;
|
|
4393
4393
|
const lines3 = scalar.source ? splitLines4(scalar.source) : [];
|
|
4394
4394
|
let chompStart = lines3.length;
|
|
4395
4395
|
for (let i = lines3.length - 1; i >= 0; --i) {
|
|
@@ -4404,7 +4404,7 @@ var require_resolve_block_scalar = __commonJS({
|
|
|
4404
4404
|
let end6 = start4 + header.length;
|
|
4405
4405
|
if (scalar.source)
|
|
4406
4406
|
end6 += scalar.source.length;
|
|
4407
|
-
return { value: value6, type:
|
|
4407
|
+
return { value: value6, type: type3, comment: header.comment, range: [start4, end6, end6] };
|
|
4408
4408
|
}
|
|
4409
4409
|
let trimIndent = scalar.indent + header.indent;
|
|
4410
4410
|
let offset = scalar.offset + header.length;
|
|
@@ -4451,7 +4451,7 @@ var require_resolve_block_scalar = __commonJS({
|
|
|
4451
4451
|
onError4(offset - content.length - (crlf ? 2 : 1), "BAD_INDENT", message);
|
|
4452
4452
|
indent3 = "";
|
|
4453
4453
|
}
|
|
4454
|
-
if (
|
|
4454
|
+
if (type3 === Scalar.Scalar.BLOCK_LITERAL) {
|
|
4455
4455
|
value5 += sep + indent3.slice(trimIndent) + content;
|
|
4456
4456
|
sep = "\n";
|
|
4457
4457
|
} else if (indent3.length > trimIndent || content[0] === " ") {
|
|
@@ -4486,7 +4486,7 @@ var require_resolve_block_scalar = __commonJS({
|
|
|
4486
4486
|
value5 += "\n";
|
|
4487
4487
|
}
|
|
4488
4488
|
const end5 = start4 + header.length + scalar.source.length;
|
|
4489
|
-
return { value: value5, type:
|
|
4489
|
+
return { value: value5, type: type3, comment: header.comment, range: [start4, end5, end5] };
|
|
4490
4490
|
}
|
|
4491
4491
|
function parseBlockScalarHeader({ offset, props }, strict2, onError4) {
|
|
4492
4492
|
if (props[0].type !== "block-scalar-header") {
|
|
@@ -4568,11 +4568,11 @@ var require_resolve_flow_scalar = __commonJS({
|
|
|
4568
4568
|
var Scalar = require_Scalar();
|
|
4569
4569
|
var resolveEnd = require_resolve_end();
|
|
4570
4570
|
function resolveFlowScalar(scalar, strict2, onError4) {
|
|
4571
|
-
const { offset, type:
|
|
4571
|
+
const { offset, type: type3, source, end: end5 } = scalar;
|
|
4572
4572
|
let _type;
|
|
4573
4573
|
let value5;
|
|
4574
4574
|
const _onError = (rel, code2, msg) => onError4(offset + rel, code2, msg);
|
|
4575
|
-
switch (
|
|
4575
|
+
switch (type3) {
|
|
4576
4576
|
case "scalar":
|
|
4577
4577
|
_type = Scalar.Scalar.PLAIN;
|
|
4578
4578
|
value5 = plainValue(source, _onError);
|
|
@@ -4587,7 +4587,7 @@ var require_resolve_flow_scalar = __commonJS({
|
|
|
4587
4587
|
break;
|
|
4588
4588
|
/* istanbul ignore next should not happen */
|
|
4589
4589
|
default:
|
|
4590
|
-
onError4(scalar, "UNEXPECTED_TOKEN", `Expected a flow scalar value, but found: ${
|
|
4590
|
+
onError4(scalar, "UNEXPECTED_TOKEN", `Expected a flow scalar value, but found: ${type3}`);
|
|
4591
4591
|
return {
|
|
4592
4592
|
value: "",
|
|
4593
4593
|
type: null,
|
|
@@ -4788,20 +4788,20 @@ var require_compose_scalar = __commonJS({
|
|
|
4788
4788
|
var resolveBlockScalar = require_resolve_block_scalar();
|
|
4789
4789
|
var resolveFlowScalar = require_resolve_flow_scalar();
|
|
4790
4790
|
function composeScalar(ctx, token, tagToken, onError4) {
|
|
4791
|
-
const { value: value5, type:
|
|
4791
|
+
const { value: value5, type: type3, comment, range: range3 } = token.type === "block-scalar" ? resolveBlockScalar.resolveBlockScalar(ctx, token, onError4) : resolveFlowScalar.resolveFlowScalar(token, ctx.options.strict, onError4);
|
|
4792
4792
|
const tagName = tagToken ? ctx.directives.tagName(tagToken.source, (msg) => onError4(tagToken, "TAG_RESOLVE_FAILED", msg)) : null;
|
|
4793
|
-
let
|
|
4793
|
+
let tag6;
|
|
4794
4794
|
if (ctx.options.stringKeys && ctx.atKey) {
|
|
4795
|
-
|
|
4795
|
+
tag6 = ctx.schema[identity3.SCALAR];
|
|
4796
4796
|
} else if (tagName)
|
|
4797
|
-
|
|
4797
|
+
tag6 = findScalarTagByName(ctx.schema, value5, tagName, tagToken, onError4);
|
|
4798
4798
|
else if (token.type === "scalar")
|
|
4799
|
-
|
|
4799
|
+
tag6 = findScalarTagByTest(ctx, value5, token, onError4);
|
|
4800
4800
|
else
|
|
4801
|
-
|
|
4801
|
+
tag6 = ctx.schema[identity3.SCALAR];
|
|
4802
4802
|
let scalar;
|
|
4803
4803
|
try {
|
|
4804
|
-
const res =
|
|
4804
|
+
const res = tag6.resolve(value5, (msg) => onError4(tagToken ?? token, "TAG_RESOLVE_FAILED", msg), ctx.options);
|
|
4805
4805
|
scalar = identity3.isScalar(res) ? res : new Scalar.Scalar(res);
|
|
4806
4806
|
} catch (error4) {
|
|
4807
4807
|
const msg = error4 instanceof Error ? error4.message : String(error4);
|
|
@@ -4810,12 +4810,12 @@ var require_compose_scalar = __commonJS({
|
|
|
4810
4810
|
}
|
|
4811
4811
|
scalar.range = range3;
|
|
4812
4812
|
scalar.source = value5;
|
|
4813
|
-
if (
|
|
4814
|
-
scalar.type =
|
|
4813
|
+
if (type3)
|
|
4814
|
+
scalar.type = type3;
|
|
4815
4815
|
if (tagName)
|
|
4816
4816
|
scalar.tag = tagName;
|
|
4817
|
-
if (
|
|
4818
|
-
scalar.format =
|
|
4817
|
+
if (tag6.format)
|
|
4818
|
+
scalar.format = tag6.format;
|
|
4819
4819
|
if (comment)
|
|
4820
4820
|
scalar.comment = comment;
|
|
4821
4821
|
return scalar;
|
|
@@ -4824,17 +4824,17 @@ var require_compose_scalar = __commonJS({
|
|
|
4824
4824
|
if (tagName === "!")
|
|
4825
4825
|
return schema[identity3.SCALAR];
|
|
4826
4826
|
const matchWithTest = [];
|
|
4827
|
-
for (const
|
|
4828
|
-
if (!
|
|
4829
|
-
if (
|
|
4830
|
-
matchWithTest.push(
|
|
4827
|
+
for (const tag6 of schema.tags) {
|
|
4828
|
+
if (!tag6.collection && tag6.tag === tagName) {
|
|
4829
|
+
if (tag6.default && tag6.test)
|
|
4830
|
+
matchWithTest.push(tag6);
|
|
4831
4831
|
else
|
|
4832
|
-
return
|
|
4832
|
+
return tag6;
|
|
4833
4833
|
}
|
|
4834
4834
|
}
|
|
4835
|
-
for (const
|
|
4836
|
-
if (
|
|
4837
|
-
return
|
|
4835
|
+
for (const tag6 of matchWithTest)
|
|
4836
|
+
if (tag6.test?.test(value5))
|
|
4837
|
+
return tag6;
|
|
4838
4838
|
const kt = schema.knownTags[tagName];
|
|
4839
4839
|
if (kt && !kt.collection) {
|
|
4840
4840
|
schema.tags.push(Object.assign({}, kt, { default: false, test: void 0 }));
|
|
@@ -4844,17 +4844,17 @@ var require_compose_scalar = __commonJS({
|
|
|
4844
4844
|
return schema[identity3.SCALAR];
|
|
4845
4845
|
}
|
|
4846
4846
|
function findScalarTagByTest({ atKey, directives, schema }, value5, token, onError4) {
|
|
4847
|
-
const
|
|
4847
|
+
const tag6 = schema.tags.find((tag7) => (tag7.default === true || atKey && tag7.default === "key") && tag7.test?.test(value5)) || schema[identity3.SCALAR];
|
|
4848
4848
|
if (schema.compat) {
|
|
4849
|
-
const compat = schema.compat.find((
|
|
4850
|
-
if (
|
|
4851
|
-
const ts = directives.tagString(
|
|
4849
|
+
const compat = schema.compat.find((tag7) => tag7.default && tag7.test?.test(value5)) ?? schema[identity3.SCALAR];
|
|
4850
|
+
if (tag6.tag !== compat.tag) {
|
|
4851
|
+
const ts = directives.tagString(tag6.tag);
|
|
4852
4852
|
const cs = directives.tagString(compat.tag);
|
|
4853
4853
|
const msg = `Value may be parsed as either ${ts} or ${cs}`;
|
|
4854
4854
|
onError4(token, "TAG_RESOLVE_FAILED", msg, true);
|
|
4855
4855
|
}
|
|
4856
4856
|
}
|
|
4857
|
-
return
|
|
4857
|
+
return tag6;
|
|
4858
4858
|
}
|
|
4859
4859
|
exports$1.composeScalar = composeScalar;
|
|
4860
4860
|
}
|
|
@@ -4901,20 +4901,20 @@ var require_compose_node = __commonJS({
|
|
|
4901
4901
|
var CN = { composeNode, composeEmptyNode };
|
|
4902
4902
|
function composeNode(ctx, token, props, onError4) {
|
|
4903
4903
|
const atKey = ctx.atKey;
|
|
4904
|
-
const { spaceBefore, comment, anchor, tag:
|
|
4904
|
+
const { spaceBefore, comment, anchor, tag: tag6 } = props;
|
|
4905
4905
|
let node;
|
|
4906
4906
|
let isSrcToken = true;
|
|
4907
4907
|
switch (token.type) {
|
|
4908
4908
|
case "alias":
|
|
4909
4909
|
node = composeAlias(ctx, token, onError4);
|
|
4910
|
-
if (anchor ||
|
|
4910
|
+
if (anchor || tag6)
|
|
4911
4911
|
onError4(token, "ALIAS_PROPS", "An alias node must not specify any properties");
|
|
4912
4912
|
break;
|
|
4913
4913
|
case "scalar":
|
|
4914
4914
|
case "single-quoted-scalar":
|
|
4915
4915
|
case "double-quoted-scalar":
|
|
4916
4916
|
case "block-scalar":
|
|
4917
|
-
node = composeScalar.composeScalar(ctx, token,
|
|
4917
|
+
node = composeScalar.composeScalar(ctx, token, tag6, onError4);
|
|
4918
4918
|
if (anchor)
|
|
4919
4919
|
node.anchor = anchor.source.substring(1);
|
|
4920
4920
|
break;
|
|
@@ -4936,7 +4936,7 @@ var require_compose_node = __commonJS({
|
|
|
4936
4936
|
onError4(anchor, "BAD_ALIAS", "Anchor cannot be an empty string");
|
|
4937
4937
|
if (atKey && ctx.options.stringKeys && (!identity3.isScalar(node) || typeof node.value !== "string" || node.tag && node.tag !== "tag:yaml.org,2002:str")) {
|
|
4938
4938
|
const msg = "With stringKeys, all keys must be strings";
|
|
4939
|
-
onError4(
|
|
4939
|
+
onError4(tag6 ?? token, "NON_STRING_KEY", msg);
|
|
4940
4940
|
}
|
|
4941
4941
|
if (spaceBefore)
|
|
4942
4942
|
node.spaceBefore = true;
|
|
@@ -4950,14 +4950,14 @@ var require_compose_node = __commonJS({
|
|
|
4950
4950
|
node.srcToken = token;
|
|
4951
4951
|
return node;
|
|
4952
4952
|
}
|
|
4953
|
-
function composeEmptyNode(ctx, offset, before2, pos, { spaceBefore, comment, anchor, tag:
|
|
4953
|
+
function composeEmptyNode(ctx, offset, before2, pos, { spaceBefore, comment, anchor, tag: tag6, end: end5 }, onError4) {
|
|
4954
4954
|
const token = {
|
|
4955
4955
|
type: "scalar",
|
|
4956
4956
|
offset: utilEmptyScalarPosition.emptyScalarPosition(offset, before2, pos),
|
|
4957
4957
|
indent: -1,
|
|
4958
4958
|
source: ""
|
|
4959
4959
|
};
|
|
4960
|
-
const node = composeScalar.composeScalar(ctx, token,
|
|
4960
|
+
const node = composeScalar.composeScalar(ctx, token, tag6, onError4);
|
|
4961
4961
|
if (anchor) {
|
|
4962
4962
|
node.anchor = anchor.source.substring(1);
|
|
4963
4963
|
if (node.anchor === "")
|
|
@@ -5264,8 +5264,8 @@ var require_cst_scalar = __commonJS({
|
|
|
5264
5264
|
return null;
|
|
5265
5265
|
}
|
|
5266
5266
|
function createScalarToken(value5, context7) {
|
|
5267
|
-
const { implicitKey = false, indent: indent3, inFlow = false, offset = -1, type:
|
|
5268
|
-
const source = stringifyString.stringifyString({ type:
|
|
5267
|
+
const { implicitKey = false, indent: indent3, inFlow = false, offset = -1, type: type3 = "PLAIN" } = context7;
|
|
5268
|
+
const source = stringifyString.stringifyString({ type: type3, value: value5 }, {
|
|
5269
5269
|
implicitKey,
|
|
5270
5270
|
indent: indent3 > 0 ? " ".repeat(indent3) : "",
|
|
5271
5271
|
inFlow,
|
|
@@ -5296,29 +5296,29 @@ var require_cst_scalar = __commonJS({
|
|
|
5296
5296
|
}
|
|
5297
5297
|
}
|
|
5298
5298
|
function setScalarValue(token, value5, context7 = {}) {
|
|
5299
|
-
let { afterKey = false, implicitKey = false, inFlow = false, type:
|
|
5299
|
+
let { afterKey = false, implicitKey = false, inFlow = false, type: type3 } = context7;
|
|
5300
5300
|
let indent3 = "indent" in token ? token.indent : null;
|
|
5301
5301
|
if (afterKey && typeof indent3 === "number")
|
|
5302
5302
|
indent3 += 2;
|
|
5303
|
-
if (!
|
|
5303
|
+
if (!type3)
|
|
5304
5304
|
switch (token.type) {
|
|
5305
5305
|
case "single-quoted-scalar":
|
|
5306
|
-
|
|
5306
|
+
type3 = "QUOTE_SINGLE";
|
|
5307
5307
|
break;
|
|
5308
5308
|
case "double-quoted-scalar":
|
|
5309
|
-
|
|
5309
|
+
type3 = "QUOTE_DOUBLE";
|
|
5310
5310
|
break;
|
|
5311
5311
|
case "block-scalar": {
|
|
5312
5312
|
const header = token.props[0];
|
|
5313
5313
|
if (header.type !== "block-scalar-header")
|
|
5314
5314
|
throw new Error("Invalid block scalar header");
|
|
5315
|
-
|
|
5315
|
+
type3 = header.source[0] === ">" ? "BLOCK_FOLDED" : "BLOCK_LITERAL";
|
|
5316
5316
|
break;
|
|
5317
5317
|
}
|
|
5318
5318
|
default:
|
|
5319
|
-
|
|
5319
|
+
type3 = "PLAIN";
|
|
5320
5320
|
}
|
|
5321
|
-
const source = stringifyString.stringifyString({ type:
|
|
5321
|
+
const source = stringifyString.stringifyString({ type: type3, value: value5 }, {
|
|
5322
5322
|
implicitKey: implicitKey || indent3 === null,
|
|
5323
5323
|
indent: indent3 !== null && indent3 > 0 ? " ".repeat(indent3) : "",
|
|
5324
5324
|
inFlow,
|
|
@@ -5377,12 +5377,12 @@ var require_cst_scalar = __commonJS({
|
|
|
5377
5377
|
}
|
|
5378
5378
|
return false;
|
|
5379
5379
|
}
|
|
5380
|
-
function setFlowScalarValue(token, source,
|
|
5380
|
+
function setFlowScalarValue(token, source, type3) {
|
|
5381
5381
|
switch (token.type) {
|
|
5382
5382
|
case "scalar":
|
|
5383
5383
|
case "double-quoted-scalar":
|
|
5384
5384
|
case "single-quoted-scalar":
|
|
5385
|
-
token.type =
|
|
5385
|
+
token.type = type3;
|
|
5386
5386
|
token.source = source;
|
|
5387
5387
|
break;
|
|
5388
5388
|
case "block-scalar": {
|
|
@@ -5393,7 +5393,7 @@ var require_cst_scalar = __commonJS({
|
|
|
5393
5393
|
for (const tok of end5)
|
|
5394
5394
|
tok.offset += oa;
|
|
5395
5395
|
delete token.props;
|
|
5396
|
-
Object.assign(token, { type:
|
|
5396
|
+
Object.assign(token, { type: type3, source, end: end5 });
|
|
5397
5397
|
break;
|
|
5398
5398
|
}
|
|
5399
5399
|
case "block-map":
|
|
@@ -5401,7 +5401,7 @@ var require_cst_scalar = __commonJS({
|
|
|
5401
5401
|
const offset = token.offset + source.length;
|
|
5402
5402
|
const nl = { type: "newline", offset, indent: token.indent, source: "\n" };
|
|
5403
5403
|
delete token.items;
|
|
5404
|
-
Object.assign(token, { type:
|
|
5404
|
+
Object.assign(token, { type: type3, source, end: [nl] });
|
|
5405
5405
|
break;
|
|
5406
5406
|
}
|
|
5407
5407
|
default: {
|
|
@@ -5410,7 +5410,7 @@ var require_cst_scalar = __commonJS({
|
|
|
5410
5410
|
for (const key of Object.keys(token))
|
|
5411
5411
|
if (key !== "type" && key !== "offset")
|
|
5412
5412
|
delete token[key];
|
|
5413
|
-
Object.assign(token, { type:
|
|
5413
|
+
Object.assign(token, { type: type3, indent: indent3, source, end: end5 });
|
|
5414
5414
|
}
|
|
5415
5415
|
}
|
|
5416
5416
|
}
|
|
@@ -6256,9 +6256,9 @@ var require_parser = __commonJS({
|
|
|
6256
6256
|
var node_process = __require("process");
|
|
6257
6257
|
var cst = require_cst();
|
|
6258
6258
|
var lexer = require_lexer();
|
|
6259
|
-
function includesToken(list4,
|
|
6259
|
+
function includesToken(list4, type3) {
|
|
6260
6260
|
for (let i = 0; i < list4.length; ++i)
|
|
6261
|
-
if (list4[i].type ===
|
|
6261
|
+
if (list4[i].type === type3)
|
|
6262
6262
|
return true;
|
|
6263
6263
|
return false;
|
|
6264
6264
|
}
|
|
@@ -6385,19 +6385,19 @@ var require_parser = __commonJS({
|
|
|
6385
6385
|
this.offset += source.length;
|
|
6386
6386
|
return;
|
|
6387
6387
|
}
|
|
6388
|
-
const
|
|
6389
|
-
if (!
|
|
6388
|
+
const type3 = cst.tokenType(source);
|
|
6389
|
+
if (!type3) {
|
|
6390
6390
|
const message = `Not a YAML token: ${source}`;
|
|
6391
6391
|
yield* this.pop({ type: "error", offset: this.offset, message, source });
|
|
6392
6392
|
this.offset += source.length;
|
|
6393
|
-
} else if (
|
|
6393
|
+
} else if (type3 === "scalar") {
|
|
6394
6394
|
this.atNewLine = false;
|
|
6395
6395
|
this.atScalar = true;
|
|
6396
6396
|
this.type = "scalar";
|
|
6397
6397
|
} else {
|
|
6398
|
-
this.type =
|
|
6398
|
+
this.type = type3;
|
|
6399
6399
|
yield* this.step();
|
|
6400
|
-
switch (
|
|
6400
|
+
switch (type3) {
|
|
6401
6401
|
case "newline":
|
|
6402
6402
|
this.atNewLine = true;
|
|
6403
6403
|
this.indent = 0;
|
|
@@ -6996,7 +6996,7 @@ var require_parser = __commonJS({
|
|
|
6996
6996
|
}
|
|
6997
6997
|
}
|
|
6998
6998
|
}
|
|
6999
|
-
flowScalar(
|
|
6999
|
+
flowScalar(type3) {
|
|
7000
7000
|
if (this.onNewLine) {
|
|
7001
7001
|
let nl = this.source.indexOf("\n") + 1;
|
|
7002
7002
|
while (nl !== 0) {
|
|
@@ -7005,7 +7005,7 @@ var require_parser = __commonJS({
|
|
|
7005
7005
|
}
|
|
7006
7006
|
}
|
|
7007
7007
|
return {
|
|
7008
|
-
type:
|
|
7008
|
+
type: type3,
|
|
7009
7009
|
offset: this.offset,
|
|
7010
7010
|
indent: this.indent,
|
|
7011
7011
|
source: this.source
|
|
@@ -7507,14 +7507,14 @@ var require_inspect = __commonJS({
|
|
|
7507
7507
|
}
|
|
7508
7508
|
}
|
|
7509
7509
|
function getObjectTag(object) {
|
|
7510
|
-
var
|
|
7511
|
-
if (
|
|
7510
|
+
var tag6 = Object.prototype.toString.call(object).replace(/^\[object /, "").replace(/]$/, "");
|
|
7511
|
+
if (tag6 === "Object" && typeof object.constructor === "function") {
|
|
7512
7512
|
var name = object.constructor.name;
|
|
7513
7513
|
if (typeof name === "string" && name !== "") {
|
|
7514
7514
|
return name;
|
|
7515
7515
|
}
|
|
7516
7516
|
}
|
|
7517
|
-
return
|
|
7517
|
+
return tag6;
|
|
7518
7518
|
}
|
|
7519
7519
|
}
|
|
7520
7520
|
});
|
|
@@ -8008,8 +8008,8 @@ var require_printer = __commonJS({
|
|
|
8008
8008
|
return !name && !directives && !varDefs && op === "query" ? selectionSet : join6([op, join6([name, varDefs]), directives, selectionSet], " ");
|
|
8009
8009
|
},
|
|
8010
8010
|
VariableDefinition: function VariableDefinition(_ref) {
|
|
8011
|
-
var variable = _ref.variable,
|
|
8012
|
-
return variable + ": " +
|
|
8011
|
+
var variable = _ref.variable, type3 = _ref.type, defaultValue = _ref.defaultValue, directives = _ref.directives;
|
|
8012
|
+
return variable + ": " + type3 + wrap(" = ", defaultValue) + wrap(" ", join6(directives, " "));
|
|
8013
8013
|
},
|
|
8014
8014
|
SelectionSet: function SelectionSet(_ref2) {
|
|
8015
8015
|
var selections = _ref2.selections;
|
|
@@ -8092,12 +8092,12 @@ var require_printer = __commonJS({
|
|
|
8092
8092
|
return name;
|
|
8093
8093
|
},
|
|
8094
8094
|
ListType: function ListType(_ref18) {
|
|
8095
|
-
var
|
|
8096
|
-
return "[" +
|
|
8095
|
+
var type3 = _ref18.type;
|
|
8096
|
+
return "[" + type3 + "]";
|
|
8097
8097
|
},
|
|
8098
8098
|
NonNullType: function NonNullType(_ref19) {
|
|
8099
|
-
var
|
|
8100
|
-
return
|
|
8099
|
+
var type3 = _ref19.type;
|
|
8100
|
+
return type3 + "!";
|
|
8101
8101
|
},
|
|
8102
8102
|
// Type System Definitions
|
|
8103
8103
|
SchemaDefinition: addDescription(function(_ref20) {
|
|
@@ -8105,8 +8105,8 @@ var require_printer = __commonJS({
|
|
|
8105
8105
|
return join6(["schema", join6(directives, " "), block(operationTypes)], " ");
|
|
8106
8106
|
}),
|
|
8107
8107
|
OperationTypeDefinition: function OperationTypeDefinition(_ref21) {
|
|
8108
|
-
var operation = _ref21.operation,
|
|
8109
|
-
return operation + ": " +
|
|
8108
|
+
var operation = _ref21.operation, type3 = _ref21.type;
|
|
8109
|
+
return operation + ": " + type3;
|
|
8110
8110
|
},
|
|
8111
8111
|
ScalarTypeDefinition: addDescription(function(_ref22) {
|
|
8112
8112
|
var name = _ref22.name, directives = _ref22.directives;
|
|
@@ -8117,12 +8117,12 @@ var require_printer = __commonJS({
|
|
|
8117
8117
|
return join6(["type", name, wrap("implements ", join6(interfaces, " & ")), join6(directives, " "), block(fields)], " ");
|
|
8118
8118
|
}),
|
|
8119
8119
|
FieldDefinition: addDescription(function(_ref24) {
|
|
8120
|
-
var name = _ref24.name, args2 = _ref24.arguments,
|
|
8121
|
-
return name + (hasMultilineItems(args2) ? wrap("(\n", indent3(join6(args2, "\n")), "\n)") : wrap("(", join6(args2, ", "), ")")) + ": " +
|
|
8120
|
+
var name = _ref24.name, args2 = _ref24.arguments, type3 = _ref24.type, directives = _ref24.directives;
|
|
8121
|
+
return name + (hasMultilineItems(args2) ? wrap("(\n", indent3(join6(args2, "\n")), "\n)") : wrap("(", join6(args2, ", "), ")")) + ": " + type3 + wrap(" ", join6(directives, " "));
|
|
8122
8122
|
}),
|
|
8123
8123
|
InputValueDefinition: addDescription(function(_ref25) {
|
|
8124
|
-
var name = _ref25.name,
|
|
8125
|
-
return join6([name + ": " +
|
|
8124
|
+
var name = _ref25.name, type3 = _ref25.type, defaultValue = _ref25.defaultValue, directives = _ref25.directives;
|
|
8125
|
+
return join6([name + ": " + type3, wrap("= ", defaultValue), join6(directives, " ")], " ");
|
|
8126
8126
|
}),
|
|
8127
8127
|
InterfaceTypeDefinition: addDescription(function(_ref26) {
|
|
8128
8128
|
var name = _ref26.name, interfaces = _ref26.interfaces, directives = _ref26.directives, fields = _ref26.fields;
|
|
@@ -10031,9 +10031,9 @@ var require_event_target = __commonJS({
|
|
|
10031
10031
|
* @param {String} type The name of the event
|
|
10032
10032
|
* @throws {TypeError} If the `type` argument is not specified
|
|
10033
10033
|
*/
|
|
10034
|
-
constructor(
|
|
10034
|
+
constructor(type3) {
|
|
10035
10035
|
this[kTarget] = null;
|
|
10036
|
-
this[kType] =
|
|
10036
|
+
this[kType] = type3;
|
|
10037
10037
|
}
|
|
10038
10038
|
/**
|
|
10039
10039
|
* @type {*}
|
|
@@ -10064,8 +10064,8 @@ var require_event_target = __commonJS({
|
|
|
10064
10064
|
* @param {Boolean} [options.wasClean=false] Indicates whether or not the
|
|
10065
10065
|
* connection was cleanly closed
|
|
10066
10066
|
*/
|
|
10067
|
-
constructor(
|
|
10068
|
-
super(
|
|
10067
|
+
constructor(type3, options5 = {}) {
|
|
10068
|
+
super(type3);
|
|
10069
10069
|
this[kCode] = options5.code === void 0 ? 0 : options5.code;
|
|
10070
10070
|
this[kReason] = options5.reason === void 0 ? "" : options5.reason;
|
|
10071
10071
|
this[kWasClean] = options5.wasClean === void 0 ? false : options5.wasClean;
|
|
@@ -10102,8 +10102,8 @@ var require_event_target = __commonJS({
|
|
|
10102
10102
|
* @param {*} [options.error=null] The error that generated this event
|
|
10103
10103
|
* @param {String} [options.message=''] The error message
|
|
10104
10104
|
*/
|
|
10105
|
-
constructor(
|
|
10106
|
-
super(
|
|
10105
|
+
constructor(type3, options5 = {}) {
|
|
10106
|
+
super(type3);
|
|
10107
10107
|
this[kError] = options5.error === void 0 ? null : options5.error;
|
|
10108
10108
|
this[kMessage] = options5.message === void 0 ? "" : options5.message;
|
|
10109
10109
|
}
|
|
@@ -10131,8 +10131,8 @@ var require_event_target = __commonJS({
|
|
|
10131
10131
|
* attributes via object members of the same name
|
|
10132
10132
|
* @param {*} [options.data=null] The message content
|
|
10133
10133
|
*/
|
|
10134
|
-
constructor(
|
|
10135
|
-
super(
|
|
10134
|
+
constructor(type3, options5 = {}) {
|
|
10135
|
+
super(type3);
|
|
10136
10136
|
this[kData] = options5.data === void 0 ? null : options5.data;
|
|
10137
10137
|
}
|
|
10138
10138
|
/**
|
|
@@ -10156,14 +10156,14 @@ var require_event_target = __commonJS({
|
|
|
10156
10156
|
* the listener would be automatically removed when invoked.
|
|
10157
10157
|
* @public
|
|
10158
10158
|
*/
|
|
10159
|
-
addEventListener(
|
|
10160
|
-
for (const listener of this.listeners(
|
|
10159
|
+
addEventListener(type3, handler, options5 = {}) {
|
|
10160
|
+
for (const listener of this.listeners(type3)) {
|
|
10161
10161
|
if (!options5[kForOnEventAttribute] && listener[kListener] === handler && !listener[kForOnEventAttribute]) {
|
|
10162
10162
|
return;
|
|
10163
10163
|
}
|
|
10164
10164
|
}
|
|
10165
10165
|
let wrapper;
|
|
10166
|
-
if (
|
|
10166
|
+
if (type3 === "message") {
|
|
10167
10167
|
wrapper = function onMessage(data, isBinary) {
|
|
10168
10168
|
const event = new MessageEvent("message", {
|
|
10169
10169
|
data: isBinary ? data : data.toString()
|
|
@@ -10171,7 +10171,7 @@ var require_event_target = __commonJS({
|
|
|
10171
10171
|
event[kTarget] = this;
|
|
10172
10172
|
callListener(handler, this, event);
|
|
10173
10173
|
};
|
|
10174
|
-
} else if (
|
|
10174
|
+
} else if (type3 === "close") {
|
|
10175
10175
|
wrapper = function onClose(code2, message) {
|
|
10176
10176
|
const event = new CloseEvent2("close", {
|
|
10177
10177
|
code: code2,
|
|
@@ -10181,7 +10181,7 @@ var require_event_target = __commonJS({
|
|
|
10181
10181
|
event[kTarget] = this;
|
|
10182
10182
|
callListener(handler, this, event);
|
|
10183
10183
|
};
|
|
10184
|
-
} else if (
|
|
10184
|
+
} else if (type3 === "error") {
|
|
10185
10185
|
wrapper = function onError4(error4) {
|
|
10186
10186
|
const event = new ErrorEvent("error", {
|
|
10187
10187
|
error: error4,
|
|
@@ -10190,7 +10190,7 @@ var require_event_target = __commonJS({
|
|
|
10190
10190
|
event[kTarget] = this;
|
|
10191
10191
|
callListener(handler, this, event);
|
|
10192
10192
|
};
|
|
10193
|
-
} else if (
|
|
10193
|
+
} else if (type3 === "open") {
|
|
10194
10194
|
wrapper = function onOpen() {
|
|
10195
10195
|
const event = new Event("open");
|
|
10196
10196
|
event[kTarget] = this;
|
|
@@ -10202,9 +10202,9 @@ var require_event_target = __commonJS({
|
|
|
10202
10202
|
wrapper[kForOnEventAttribute] = !!options5[kForOnEventAttribute];
|
|
10203
10203
|
wrapper[kListener] = handler;
|
|
10204
10204
|
if (options5.once) {
|
|
10205
|
-
this.once(
|
|
10205
|
+
this.once(type3, wrapper);
|
|
10206
10206
|
} else {
|
|
10207
|
-
this.on(
|
|
10207
|
+
this.on(type3, wrapper);
|
|
10208
10208
|
}
|
|
10209
10209
|
},
|
|
10210
10210
|
/**
|
|
@@ -10214,10 +10214,10 @@ var require_event_target = __commonJS({
|
|
|
10214
10214
|
* @param {(Function|Object)} handler The listener to remove
|
|
10215
10215
|
* @public
|
|
10216
10216
|
*/
|
|
10217
|
-
removeEventListener(
|
|
10218
|
-
for (const listener of this.listeners(
|
|
10217
|
+
removeEventListener(type3, handler) {
|
|
10218
|
+
for (const listener of this.listeners(type3)) {
|
|
10219
10219
|
if (listener[kListener] === handler && !listener[kForOnEventAttribute]) {
|
|
10220
|
-
this.removeListener(
|
|
10220
|
+
this.removeListener(type3, listener);
|
|
10221
10221
|
break;
|
|
10222
10222
|
}
|
|
10223
10223
|
}
|
|
@@ -10480,10 +10480,10 @@ var require_websocket = __commonJS({
|
|
|
10480
10480
|
get binaryType() {
|
|
10481
10481
|
return this._binaryType;
|
|
10482
10482
|
}
|
|
10483
|
-
set binaryType(
|
|
10484
|
-
if (!BINARY_TYPES.includes(
|
|
10485
|
-
this._binaryType =
|
|
10486
|
-
if (this._receiver) this._receiver._binaryType =
|
|
10483
|
+
set binaryType(type3) {
|
|
10484
|
+
if (!BINARY_TYPES.includes(type3)) return;
|
|
10485
|
+
this._binaryType = type3;
|
|
10486
|
+
if (this._receiver) this._receiver._binaryType = type3;
|
|
10487
10487
|
}
|
|
10488
10488
|
/**
|
|
10489
10489
|
* @type {Number}
|
|
@@ -11960,7 +11960,7 @@ var isNever = (_3) => false;
|
|
|
11960
11960
|
var isRecordOrArray = (input) => typeof input === "object" && input !== null;
|
|
11961
11961
|
var isObject = (input) => isRecordOrArray(input) || isFunction2(input);
|
|
11962
11962
|
var hasProperty = /* @__PURE__ */ dual(2, (self, property) => isObject(self) && property in self);
|
|
11963
|
-
var isTagged = /* @__PURE__ */ dual(2, (self,
|
|
11963
|
+
var isTagged = /* @__PURE__ */ dual(2, (self, tag6) => hasProperty(self, "_tag") && self["_tag"] === tag6);
|
|
11964
11964
|
var isNullable = (input) => input === null || input === void 0;
|
|
11965
11965
|
var isNotNullable = (input) => input !== null && input !== void 0;
|
|
11966
11966
|
var isDate = (input) => input instanceof Date;
|
|
@@ -14763,14 +14763,14 @@ var makeGenericTag = (key) => {
|
|
|
14763
14763
|
Error.stackTraceLimit = 2;
|
|
14764
14764
|
const creationError = new Error();
|
|
14765
14765
|
Error.stackTraceLimit = limit;
|
|
14766
|
-
const
|
|
14767
|
-
Object.defineProperty(
|
|
14766
|
+
const tag6 = Object.create(TagProto);
|
|
14767
|
+
Object.defineProperty(tag6, "stack", {
|
|
14768
14768
|
get() {
|
|
14769
14769
|
return creationError.stack;
|
|
14770
14770
|
}
|
|
14771
14771
|
});
|
|
14772
|
-
|
|
14773
|
-
return
|
|
14772
|
+
tag6.key = key;
|
|
14773
|
+
return tag6;
|
|
14774
14774
|
};
|
|
14775
14775
|
var Tag = (id2) => () => {
|
|
14776
14776
|
const limit = Error.stackTraceLimit;
|
|
@@ -14847,10 +14847,10 @@ var makeContext = (unsafeMap) => {
|
|
|
14847
14847
|
context7.unsafeMap = unsafeMap;
|
|
14848
14848
|
return context7;
|
|
14849
14849
|
};
|
|
14850
|
-
var serviceNotFoundError = (
|
|
14851
|
-
const error4 = new Error(`Service not found${
|
|
14852
|
-
if (
|
|
14853
|
-
const lines3 =
|
|
14850
|
+
var serviceNotFoundError = (tag6) => {
|
|
14851
|
+
const error4 = new Error(`Service not found${tag6.key ? `: ${String(tag6.key)}` : ""}`);
|
|
14852
|
+
if (tag6.stack) {
|
|
14853
|
+
const lines3 = tag6.stack.split("\n");
|
|
14854
14854
|
if (lines3.length > 2) {
|
|
14855
14855
|
const afterAt = lines3[2].match(/at (.*)/);
|
|
14856
14856
|
if (afterAt) {
|
|
@@ -14870,42 +14870,42 @@ var isTag = (u2) => hasProperty(u2, TagTypeId);
|
|
|
14870
14870
|
var isReference = (u2) => hasProperty(u2, ReferenceTypeId);
|
|
14871
14871
|
var _empty4 = /* @__PURE__ */ makeContext(/* @__PURE__ */ new Map());
|
|
14872
14872
|
var empty8 = () => _empty4;
|
|
14873
|
-
var make10 = (
|
|
14874
|
-
var add3 = /* @__PURE__ */ dual(3, (self,
|
|
14873
|
+
var make10 = (tag6, service2) => makeContext(/* @__PURE__ */ new Map([[tag6.key, service2]]));
|
|
14874
|
+
var add3 = /* @__PURE__ */ dual(3, (self, tag6, service2) => {
|
|
14875
14875
|
const map34 = new Map(self.unsafeMap);
|
|
14876
|
-
map34.set(
|
|
14876
|
+
map34.set(tag6.key, service2);
|
|
14877
14877
|
return makeContext(map34);
|
|
14878
14878
|
});
|
|
14879
14879
|
var defaultValueCache = /* @__PURE__ */ globalValue("effect/Context/defaultValueCache", () => /* @__PURE__ */ new Map());
|
|
14880
|
-
var getDefaultValue = (
|
|
14881
|
-
if (defaultValueCache.has(
|
|
14882
|
-
return defaultValueCache.get(
|
|
14880
|
+
var getDefaultValue = (tag6) => {
|
|
14881
|
+
if (defaultValueCache.has(tag6.key)) {
|
|
14882
|
+
return defaultValueCache.get(tag6.key);
|
|
14883
14883
|
}
|
|
14884
|
-
const value5 =
|
|
14885
|
-
defaultValueCache.set(
|
|
14884
|
+
const value5 = tag6.defaultValue();
|
|
14885
|
+
defaultValueCache.set(tag6.key, value5);
|
|
14886
14886
|
return value5;
|
|
14887
14887
|
};
|
|
14888
|
-
var unsafeGetReference = (self,
|
|
14889
|
-
return self.unsafeMap.has(
|
|
14888
|
+
var unsafeGetReference = (self, tag6) => {
|
|
14889
|
+
return self.unsafeMap.has(tag6.key) ? self.unsafeMap.get(tag6.key) : getDefaultValue(tag6);
|
|
14890
14890
|
};
|
|
14891
|
-
var unsafeGet3 = /* @__PURE__ */ dual(2, (self,
|
|
14892
|
-
if (!self.unsafeMap.has(
|
|
14893
|
-
if (ReferenceTypeId in
|
|
14894
|
-
throw serviceNotFoundError(
|
|
14891
|
+
var unsafeGet3 = /* @__PURE__ */ dual(2, (self, tag6) => {
|
|
14892
|
+
if (!self.unsafeMap.has(tag6.key)) {
|
|
14893
|
+
if (ReferenceTypeId in tag6) return getDefaultValue(tag6);
|
|
14894
|
+
throw serviceNotFoundError(tag6);
|
|
14895
14895
|
}
|
|
14896
|
-
return self.unsafeMap.get(
|
|
14896
|
+
return self.unsafeMap.get(tag6.key);
|
|
14897
14897
|
});
|
|
14898
14898
|
var get4 = unsafeGet3;
|
|
14899
|
-
var getOption = /* @__PURE__ */ dual(2, (self,
|
|
14900
|
-
if (!self.unsafeMap.has(
|
|
14901
|
-
return isReference(
|
|
14899
|
+
var getOption = /* @__PURE__ */ dual(2, (self, tag6) => {
|
|
14900
|
+
if (!self.unsafeMap.has(tag6.key)) {
|
|
14901
|
+
return isReference(tag6) ? some(getDefaultValue(tag6)) : none;
|
|
14902
14902
|
}
|
|
14903
|
-
return some(self.unsafeMap.get(
|
|
14903
|
+
return some(self.unsafeMap.get(tag6.key));
|
|
14904
14904
|
});
|
|
14905
14905
|
var merge2 = /* @__PURE__ */ dual(2, (self, that) => {
|
|
14906
14906
|
const map34 = new Map(self.unsafeMap);
|
|
14907
|
-
for (const [
|
|
14908
|
-
map34.set(
|
|
14907
|
+
for (const [tag6, s] of that.unsafeMap) {
|
|
14908
|
+
map34.set(tag6, s);
|
|
14909
14909
|
}
|
|
14910
14910
|
return makeContext(map34);
|
|
14911
14911
|
});
|
|
@@ -14920,8 +14920,8 @@ var mergeAll = (...ctxs) => {
|
|
|
14920
14920
|
};
|
|
14921
14921
|
var omit = (...tags2) => (self) => {
|
|
14922
14922
|
const newEnv = new Map(self.unsafeMap);
|
|
14923
|
-
for (const
|
|
14924
|
-
newEnv.delete(
|
|
14923
|
+
for (const tag6 of tags2) {
|
|
14924
|
+
newEnv.delete(tag6.key);
|
|
14925
14925
|
}
|
|
14926
14926
|
return makeContext(newEnv);
|
|
14927
14927
|
};
|
|
@@ -15648,20 +15648,20 @@ var makeUpdateService = (key, update5) => {
|
|
|
15648
15648
|
var diff = (oldValue, newValue) => {
|
|
15649
15649
|
const missingServices = new Map(oldValue.unsafeMap);
|
|
15650
15650
|
let patch11 = empty12();
|
|
15651
|
-
for (const [
|
|
15652
|
-
if (missingServices.has(
|
|
15653
|
-
const old = missingServices.get(
|
|
15654
|
-
missingServices.delete(
|
|
15651
|
+
for (const [tag6, newService] of newValue.unsafeMap.entries()) {
|
|
15652
|
+
if (missingServices.has(tag6)) {
|
|
15653
|
+
const old = missingServices.get(tag6);
|
|
15654
|
+
missingServices.delete(tag6);
|
|
15655
15655
|
if (!equals(old, newService)) {
|
|
15656
|
-
patch11 = combine4(makeUpdateService(
|
|
15656
|
+
patch11 = combine4(makeUpdateService(tag6, () => newService))(patch11);
|
|
15657
15657
|
}
|
|
15658
15658
|
} else {
|
|
15659
|
-
missingServices.delete(
|
|
15660
|
-
patch11 = combine4(makeAddService(
|
|
15659
|
+
missingServices.delete(tag6);
|
|
15660
|
+
patch11 = combine4(makeAddService(tag6, newService))(patch11);
|
|
15661
15661
|
}
|
|
15662
15662
|
}
|
|
15663
|
-
for (const [
|
|
15664
|
-
patch11 = combine4(makeRemoveService(
|
|
15663
|
+
for (const [tag6] of missingServices.entries()) {
|
|
15664
|
+
patch11 = combine4(makeRemoveService(tag6))(patch11);
|
|
15665
15665
|
}
|
|
15666
15666
|
return patch11;
|
|
15667
15667
|
};
|
|
@@ -15707,14 +15707,14 @@ var patch = /* @__PURE__ */ dual(2, (self, context7) => {
|
|
|
15707
15707
|
return makeContext(updatedContext);
|
|
15708
15708
|
}
|
|
15709
15709
|
const map34 = /* @__PURE__ */ new Map();
|
|
15710
|
-
for (const [
|
|
15711
|
-
if (updatedContext.has(
|
|
15712
|
-
map34.set(
|
|
15713
|
-
updatedContext.delete(
|
|
15710
|
+
for (const [tag6] of context7.unsafeMap) {
|
|
15711
|
+
if (updatedContext.has(tag6)) {
|
|
15712
|
+
map34.set(tag6, updatedContext.get(tag6));
|
|
15713
|
+
updatedContext.delete(tag6);
|
|
15714
15714
|
}
|
|
15715
15715
|
}
|
|
15716
|
-
for (const [
|
|
15717
|
-
map34.set(
|
|
15716
|
+
for (const [tag6, s] of updatedContext) {
|
|
15717
|
+
map34.set(tag6, s);
|
|
15718
15718
|
}
|
|
15719
15719
|
return makeContext(map34);
|
|
15720
15720
|
});
|
|
@@ -16985,12 +16985,12 @@ ${this.stack.split("\n").slice(1).join("\n")}` : this.toString();
|
|
|
16985
16985
|
Object.assign(YieldableError2.prototype, StructuralCommitPrototype);
|
|
16986
16986
|
return YieldableError2;
|
|
16987
16987
|
})();
|
|
16988
|
-
var makeException = (proto25,
|
|
16988
|
+
var makeException = (proto25, tag6) => {
|
|
16989
16989
|
class Base3 extends YieldableError {
|
|
16990
|
-
_tag =
|
|
16990
|
+
_tag = tag6;
|
|
16991
16991
|
}
|
|
16992
16992
|
Object.assign(Base3.prototype, proto25);
|
|
16993
|
-
Base3.prototype.name =
|
|
16993
|
+
Base3.prototype.name = tag6;
|
|
16994
16994
|
return Base3;
|
|
16995
16995
|
};
|
|
16996
16996
|
var RuntimeExceptionTypeId = /* @__PURE__ */ Symbol.for("effect/Cause/errors/RuntimeException");
|
|
@@ -19207,10 +19207,10 @@ var catchTag = /* @__PURE__ */ dual((args2) => isEffect(args2[0]), (self, ...arg
|
|
|
19207
19207
|
predicate = isTagged(args2[0]);
|
|
19208
19208
|
} else {
|
|
19209
19209
|
predicate = (e2) => {
|
|
19210
|
-
const
|
|
19211
|
-
if (!
|
|
19210
|
+
const tag6 = hasProperty(e2, "_tag") ? e2["_tag"] : void 0;
|
|
19211
|
+
if (!tag6) return false;
|
|
19212
19212
|
for (let i = 0; i < args2.length - 1; i++) {
|
|
19213
|
-
if (args2[i] ===
|
|
19213
|
+
if (args2[i] === tag6) return true;
|
|
19214
19214
|
}
|
|
19215
19215
|
return false;
|
|
19216
19216
|
};
|
|
@@ -19293,8 +19293,8 @@ var promise = (evaluate2) => evaluate2.length >= 1 ? async_((resolve3, signal) =
|
|
|
19293
19293
|
resolve3(die2(e2));
|
|
19294
19294
|
}
|
|
19295
19295
|
});
|
|
19296
|
-
var provideService = /* @__PURE__ */ dual(3, (self,
|
|
19297
|
-
var provideServiceEffect = /* @__PURE__ */ dual(3, (self,
|
|
19296
|
+
var provideService = /* @__PURE__ */ dual(3, (self, tag6, service2) => contextWithEffect((env2) => provideContext(self, add4(env2, tag6, service2))));
|
|
19297
|
+
var provideServiceEffect = /* @__PURE__ */ dual(3, (self, tag6, effect3) => contextWithEffect((env2) => flatMap7(effect3, (service2) => provideContext(self, pipe(env2, add4(tag6, service2))))));
|
|
19298
19298
|
var repeatN = /* @__PURE__ */ dual(2, (self, n) => suspend(() => repeatNLoop(self, n)));
|
|
19299
19299
|
var repeatNLoop = (self, n) => flatMap7(self, (a) => n <= 0 ? succeed(a) : zipRight(yieldNow(), repeatNLoop(self, n - 1)));
|
|
19300
19300
|
var sleep3 = sleep2;
|
|
@@ -19353,7 +19353,7 @@ var updateFiberRefs = (f) => withFiberRuntime((state) => {
|
|
|
19353
19353
|
return void_;
|
|
19354
19354
|
});
|
|
19355
19355
|
var when = /* @__PURE__ */ dual(2, (self, condition) => suspend(() => condition() ? map11(self, some2) : succeed(none2())));
|
|
19356
|
-
var serviceOption = (
|
|
19356
|
+
var serviceOption = (tag6) => map11(context(), getOption2(tag6));
|
|
19357
19357
|
var bigint02 = /* @__PURE__ */ BigInt(0);
|
|
19358
19358
|
var filterDisablePropagation = /* @__PURE__ */ flatMap((span2) => get5(span2.context, DisablePropagation) ? span2._tag === "Span" ? filterDisablePropagation(span2.parent) : none2() : some2(span2));
|
|
19359
19359
|
var unsafeMakeSpan = (fiber, name, options5) => {
|
|
@@ -23199,9 +23199,9 @@ var makeBuilder = (self, scope4, inMemoMap = false) => {
|
|
|
23199
23199
|
var context2 = () => fromEffectContext(context());
|
|
23200
23200
|
var fromEffect3 = /* @__PURE__ */ dual(2, (a, b3) => {
|
|
23201
23201
|
const tagFirst = isTag2(a);
|
|
23202
|
-
const
|
|
23202
|
+
const tag6 = tagFirst ? a : b3;
|
|
23203
23203
|
const effect3 = tagFirst ? b3 : a;
|
|
23204
|
-
return fromEffectContext(map11(effect3, (service2) => make11(
|
|
23204
|
+
return fromEffectContext(map11(effect3, (service2) => make11(tag6, service2)));
|
|
23205
23205
|
});
|
|
23206
23206
|
function fromEffectContext(effect3) {
|
|
23207
23207
|
const fromEffect9 = Object.create(proto3);
|
|
@@ -23217,9 +23217,9 @@ var mergeAll3 = (...layers) => {
|
|
|
23217
23217
|
};
|
|
23218
23218
|
var scoped = /* @__PURE__ */ dual(2, (a, b3) => {
|
|
23219
23219
|
const tagFirst = isTag2(a);
|
|
23220
|
-
const
|
|
23220
|
+
const tag6 = tagFirst ? a : b3;
|
|
23221
23221
|
const effect3 = tagFirst ? b3 : a;
|
|
23222
|
-
return scopedContext(map11(effect3, (service2) => make11(
|
|
23222
|
+
return scopedContext(map11(effect3, (service2) => make11(tag6, service2)));
|
|
23223
23223
|
});
|
|
23224
23224
|
var scopedContext = (effect3) => {
|
|
23225
23225
|
const scoped6 = Object.create(proto3);
|
|
@@ -23229,9 +23229,9 @@ var scopedContext = (effect3) => {
|
|
|
23229
23229
|
};
|
|
23230
23230
|
var succeed5 = /* @__PURE__ */ dual(2, (a, b3) => {
|
|
23231
23231
|
const tagFirst = isTag2(a);
|
|
23232
|
-
const
|
|
23232
|
+
const tag6 = tagFirst ? a : b3;
|
|
23233
23233
|
const resource = tagFirst ? b3 : a;
|
|
23234
|
-
return fromEffectContext(succeed(make11(
|
|
23234
|
+
return fromEffectContext(succeed(make11(tag6, resource)));
|
|
23235
23235
|
});
|
|
23236
23236
|
var suspend3 = (evaluate2) => {
|
|
23237
23237
|
const suspend12 = Object.create(proto3);
|
|
@@ -23313,20 +23313,20 @@ var log = (...args2) => consoleWith((_3) => _3.log(...args2));
|
|
|
23313
23313
|
|
|
23314
23314
|
// ../../node_modules/.pnpm/effect@3.19.13/node_modules/effect/dist/esm/Data.js
|
|
23315
23315
|
var struct2 = struct;
|
|
23316
|
-
var tagged2 = (
|
|
23316
|
+
var tagged2 = (tag6) => (args2) => {
|
|
23317
23317
|
const value5 = args2 === void 0 ? Object.create(StructuralPrototype) : struct2(args2);
|
|
23318
|
-
value5._tag =
|
|
23318
|
+
value5._tag = tag6;
|
|
23319
23319
|
return value5;
|
|
23320
23320
|
};
|
|
23321
23321
|
var Class3 = Structural;
|
|
23322
23322
|
var taggedEnum = () => new Proxy({}, {
|
|
23323
|
-
get(_target,
|
|
23324
|
-
if (
|
|
23323
|
+
get(_target, tag6, _receiver) {
|
|
23324
|
+
if (tag6 === "$is") {
|
|
23325
23325
|
return isTagged;
|
|
23326
|
-
} else if (
|
|
23326
|
+
} else if (tag6 === "$match") {
|
|
23327
23327
|
return taggedMatch;
|
|
23328
23328
|
}
|
|
23329
|
-
return tagged2(
|
|
23329
|
+
return tagged2(tag6);
|
|
23330
23330
|
}
|
|
23331
23331
|
});
|
|
23332
23332
|
function taggedMatch() {
|
|
@@ -23366,13 +23366,13 @@ var Error3 = /* @__PURE__ */ (function() {
|
|
|
23366
23366
|
};
|
|
23367
23367
|
return O2.BaseEffectError;
|
|
23368
23368
|
})();
|
|
23369
|
-
var TaggedError = (
|
|
23369
|
+
var TaggedError = (tag6) => {
|
|
23370
23370
|
const O2 = {
|
|
23371
23371
|
BaseEffectError: class extends Error3 {
|
|
23372
|
-
_tag =
|
|
23372
|
+
_tag = tag6;
|
|
23373
23373
|
}
|
|
23374
23374
|
};
|
|
23375
|
-
O2.BaseEffectError.prototype.name =
|
|
23375
|
+
O2.BaseEffectError.prototype.name = tag6;
|
|
23376
23376
|
return O2.BaseEffectError;
|
|
23377
23377
|
};
|
|
23378
23378
|
|
|
@@ -25694,7 +25694,7 @@ schema (${ast._tag}): ${ast}`;
|
|
|
25694
25694
|
var getSchemaExtendErrorMessage = (x2, y3, path3) => getErrorMessage("Unsupported schema or overlapping types", `cannot extend ${x2} with ${y3}`, path3);
|
|
25695
25695
|
var getASTUnsupportedKeySchemaErrorMessage = (ast) => getErrorMessage("Unsupported key schema", void 0, void 0, ast);
|
|
25696
25696
|
var getASTUnsupportedLiteralErrorMessage = (literal2) => getErrorMessage("Unsupported literal", `literal value: ${formatUnknown(literal2)}`);
|
|
25697
|
-
var getASTDuplicateIndexSignatureErrorMessage = (
|
|
25697
|
+
var getASTDuplicateIndexSignatureErrorMessage = (type3) => getErrorMessage("Duplicate index signature", `${type3} index signature`);
|
|
25698
25698
|
var getASTIndexSignatureParameterErrorMessage = /* @__PURE__ */ getErrorMessage("Unsupported index signature parameter", "An index signature parameter type must be `string`, `symbol`, a template literal type or a refinement of the previous types");
|
|
25699
25699
|
var getASTRequiredElementFollowinAnOptionalElementErrorMessage = /* @__PURE__ */ getErrorMessage("Invalid element", "A required element cannot follow an optional element. ts(1257)");
|
|
25700
25700
|
var getASTDuplicatePropertySignatureTransformationErrorMessage = (key) => getErrorMessage("Duplicate property signature transformation", `Duplicate key ${formatUnknown(key)}`);
|
|
@@ -25775,7 +25775,7 @@ var Declaration = class {
|
|
|
25775
25775
|
};
|
|
25776
25776
|
}
|
|
25777
25777
|
};
|
|
25778
|
-
var createASTGuard = (
|
|
25778
|
+
var createASTGuard = (tag6) => (ast) => ast._tag === tag6;
|
|
25779
25779
|
var Literal = class {
|
|
25780
25780
|
literal;
|
|
25781
25781
|
annotations;
|
|
@@ -26040,8 +26040,8 @@ var isSymbolKeyword = /* @__PURE__ */ createASTGuard("SymbolKeyword");
|
|
|
26040
26040
|
var Type = class {
|
|
26041
26041
|
type;
|
|
26042
26042
|
annotations;
|
|
26043
|
-
constructor(
|
|
26044
|
-
this.type =
|
|
26043
|
+
constructor(type3, annotations2 = {}) {
|
|
26044
|
+
this.type = type3;
|
|
26045
26045
|
this.annotations = annotations2;
|
|
26046
26046
|
}
|
|
26047
26047
|
/**
|
|
@@ -26062,8 +26062,8 @@ var Type = class {
|
|
|
26062
26062
|
};
|
|
26063
26063
|
var OptionalType = class extends Type {
|
|
26064
26064
|
isOptional;
|
|
26065
|
-
constructor(
|
|
26066
|
-
super(
|
|
26065
|
+
constructor(type3, isOptional, annotations2 = {}) {
|
|
26066
|
+
super(type3, annotations2);
|
|
26067
26067
|
this.isOptional = isOptional;
|
|
26068
26068
|
}
|
|
26069
26069
|
/**
|
|
@@ -26158,8 +26158,8 @@ var formatTuple = (ast) => {
|
|
|
26158
26158
|
var PropertySignature = class extends OptionalType {
|
|
26159
26159
|
name;
|
|
26160
26160
|
isReadonly;
|
|
26161
|
-
constructor(name,
|
|
26162
|
-
super(
|
|
26161
|
+
constructor(name, type3, isOptional, isReadonly, annotations2) {
|
|
26162
|
+
super(type3, isOptional, annotations2);
|
|
26163
26163
|
this.name = name;
|
|
26164
26164
|
this.isReadonly = isReadonly;
|
|
26165
26165
|
}
|
|
@@ -26200,8 +26200,8 @@ var IndexSignature = class {
|
|
|
26200
26200
|
* @since 3.10.0
|
|
26201
26201
|
*/
|
|
26202
26202
|
parameter;
|
|
26203
|
-
constructor(parameter,
|
|
26204
|
-
this.type =
|
|
26203
|
+
constructor(parameter, type3, isReadonly) {
|
|
26204
|
+
this.type = type3;
|
|
26205
26205
|
this.isReadonly = isReadonly;
|
|
26206
26206
|
if (isParameter(parameter)) {
|
|
26207
26207
|
this.parameter = parameter;
|
|
@@ -26360,13 +26360,13 @@ var unify = (candidates) => {
|
|
|
26360
26360
|
break;
|
|
26361
26361
|
}
|
|
26362
26362
|
case "Literal": {
|
|
26363
|
-
const
|
|
26364
|
-
switch (
|
|
26363
|
+
const type3 = typeof ast.literal;
|
|
26364
|
+
switch (type3) {
|
|
26365
26365
|
case "string":
|
|
26366
26366
|
case "number":
|
|
26367
26367
|
case "bigint":
|
|
26368
26368
|
case "boolean": {
|
|
26369
|
-
const _tag = literalMap[
|
|
26369
|
+
const _tag = literalMap[type3];
|
|
26370
26370
|
if (!uniques[_tag] && !literals.includes(ast.literal)) {
|
|
26371
26371
|
literals.push(ast.literal);
|
|
26372
26372
|
out.push(ast);
|
|
@@ -26573,7 +26573,7 @@ var FinalTransformation = class {
|
|
|
26573
26573
|
this.encode = encode;
|
|
26574
26574
|
}
|
|
26575
26575
|
};
|
|
26576
|
-
var createTransformationGuard = (
|
|
26576
|
+
var createTransformationGuard = (tag6) => (ast) => ast._tag === tag6;
|
|
26577
26577
|
var ComposeTransformation = class {
|
|
26578
26578
|
/**
|
|
26579
26579
|
* @since 3.10.0
|
|
@@ -26637,22 +26637,22 @@ var annotations = (ast, overrides) => {
|
|
|
26637
26637
|
};
|
|
26638
26638
|
var STRING_KEYWORD_PATTERN = "[\\s\\S]*?";
|
|
26639
26639
|
var NUMBER_KEYWORD_PATTERN = "[+-]?\\d*\\.?\\d+(?:[Ee][+-]?\\d+)?";
|
|
26640
|
-
var getTemplateLiteralSpanTypePattern = (
|
|
26641
|
-
switch (
|
|
26640
|
+
var getTemplateLiteralSpanTypePattern = (type3, capture2) => {
|
|
26641
|
+
switch (type3._tag) {
|
|
26642
26642
|
case "Literal":
|
|
26643
|
-
return escape(String(
|
|
26643
|
+
return escape(String(type3.literal));
|
|
26644
26644
|
case "StringKeyword":
|
|
26645
26645
|
return STRING_KEYWORD_PATTERN;
|
|
26646
26646
|
case "NumberKeyword":
|
|
26647
26647
|
return NUMBER_KEYWORD_PATTERN;
|
|
26648
26648
|
case "TemplateLiteral":
|
|
26649
|
-
return getTemplateLiteralPattern(
|
|
26649
|
+
return getTemplateLiteralPattern(type3);
|
|
26650
26650
|
case "Union":
|
|
26651
|
-
return
|
|
26651
|
+
return type3.types.map((type4) => getTemplateLiteralSpanTypePattern(type4)).join("|");
|
|
26652
26652
|
}
|
|
26653
26653
|
};
|
|
26654
|
-
var handleTemplateLiteralSpanTypeParens = (
|
|
26655
|
-
if (isUnion3(
|
|
26654
|
+
var handleTemplateLiteralSpanTypeParens = (type3, s, capture2, top) => {
|
|
26655
|
+
if (isUnion3(type3)) ; else {
|
|
26656
26656
|
return s;
|
|
26657
26657
|
}
|
|
26658
26658
|
return `(${s})`;
|
|
@@ -26746,21 +26746,21 @@ var typeAST = (ast) => {
|
|
|
26746
26746
|
}
|
|
26747
26747
|
case "TupleType": {
|
|
26748
26748
|
const elements = changeMap(ast.elements, (e2) => {
|
|
26749
|
-
const
|
|
26750
|
-
return
|
|
26749
|
+
const type3 = typeAST(e2.type);
|
|
26750
|
+
return type3 === e2.type ? e2 : new OptionalType(type3, e2.isOptional);
|
|
26751
26751
|
});
|
|
26752
26752
|
const restASTs = getRestASTs(ast.rest);
|
|
26753
26753
|
const rest = changeMap(restASTs, typeAST);
|
|
26754
|
-
return elements === ast.elements && rest === restASTs ? ast : new TupleType(elements, rest.map((
|
|
26754
|
+
return elements === ast.elements && rest === restASTs ? ast : new TupleType(elements, rest.map((type3) => new Type(type3)), ast.isReadonly, ast.annotations);
|
|
26755
26755
|
}
|
|
26756
26756
|
case "TypeLiteral": {
|
|
26757
26757
|
const propertySignatures = changeMap(ast.propertySignatures, (p4) => {
|
|
26758
|
-
const
|
|
26759
|
-
return
|
|
26758
|
+
const type3 = typeAST(p4.type);
|
|
26759
|
+
return type3 === p4.type ? p4 : new PropertySignature(p4.name, type3, p4.isOptional, p4.isReadonly);
|
|
26760
26760
|
});
|
|
26761
26761
|
const indexSignatures = changeMap(ast.indexSignatures, (is3) => {
|
|
26762
|
-
const
|
|
26763
|
-
return
|
|
26762
|
+
const type3 = typeAST(is3.type);
|
|
26763
|
+
return type3 === is3.type ? is3 : new IndexSignature(is3.parameter, type3, is3.isReadonly);
|
|
26764
26764
|
});
|
|
26765
26765
|
return propertySignatures === ast.propertySignatures && indexSignatures === ast.indexSignatures ? ast : new TypeLiteral(propertySignatures, indexSignatures, ast.annotations);
|
|
26766
26766
|
}
|
|
@@ -26802,8 +26802,8 @@ var encodedAST_ = (ast, isBound) => {
|
|
|
26802
26802
|
}
|
|
26803
26803
|
case "TupleType": {
|
|
26804
26804
|
const elements = changeMap(ast.elements, (e2) => {
|
|
26805
|
-
const
|
|
26806
|
-
return
|
|
26805
|
+
const type3 = encodedAST_(e2.type);
|
|
26806
|
+
return type3 === e2.type ? e2 : new OptionalType(type3, e2.isOptional);
|
|
26807
26807
|
});
|
|
26808
26808
|
const restASTs = getRestASTs(ast.rest);
|
|
26809
26809
|
const rest = changeMap(restASTs, (ast2) => encodedAST_(ast2));
|
|
@@ -26811,12 +26811,12 @@ var encodedAST_ = (ast, isBound) => {
|
|
|
26811
26811
|
}
|
|
26812
26812
|
case "TypeLiteral": {
|
|
26813
26813
|
const propertySignatures = changeMap(ast.propertySignatures, (ps) => {
|
|
26814
|
-
const
|
|
26815
|
-
return
|
|
26814
|
+
const type3 = encodedAST_(ps.type);
|
|
26815
|
+
return type3 === ps.type ? ps : new PropertySignature(ps.name, type3, ps.isOptional, ps.isReadonly);
|
|
26816
26816
|
});
|
|
26817
26817
|
const indexSignatures = changeMap(ast.indexSignatures, (is3) => {
|
|
26818
|
-
const
|
|
26819
|
-
return
|
|
26818
|
+
const type3 = encodedAST_(is3.type);
|
|
26819
|
+
return type3 === is3.type ? is3 : new IndexSignature(is3.parameter, type3, is3.isReadonly);
|
|
26820
26820
|
});
|
|
26821
26821
|
return propertySignatures === ast.propertySignatures && indexSignatures === ast.indexSignatures ? ast : new TypeLiteral(propertySignatures, indexSignatures);
|
|
26822
26822
|
}
|
|
@@ -27485,12 +27485,12 @@ var go = (ast, isDecoding) => {
|
|
|
27485
27485
|
for (let i = 0; i < indexSignatures.length; i++) {
|
|
27486
27486
|
const indexSignature = indexSignatures[i];
|
|
27487
27487
|
const parameter = indexSignature[0];
|
|
27488
|
-
const
|
|
27488
|
+
const type3 = indexSignature[1];
|
|
27489
27489
|
const keys6 = getKeysForIndexSignature(input, indexSignature[2]);
|
|
27490
27490
|
for (const key of keys6) {
|
|
27491
27491
|
const keu = parameter(key, options5);
|
|
27492
27492
|
if (isEither3(keu) && isRight2(keu)) {
|
|
27493
|
-
const vpr =
|
|
27493
|
+
const vpr = type3(input[key], options5);
|
|
27494
27494
|
if (isEither3(vpr)) {
|
|
27495
27495
|
if (isLeft2(vpr)) {
|
|
27496
27496
|
const e2 = new Pointer(key, input, vpr.left);
|
|
@@ -27705,9 +27705,9 @@ var getLiterals = (ast, isDecoding) => {
|
|
|
27705
27705
|
const out = [];
|
|
27706
27706
|
for (let i = 0; i < ast.propertySignatures.length; i++) {
|
|
27707
27707
|
const propertySignature2 = ast.propertySignatures[i];
|
|
27708
|
-
const
|
|
27709
|
-
if (isLiteral(
|
|
27710
|
-
out.push([propertySignature2.name,
|
|
27708
|
+
const type3 = isDecoding ? encodedAST(propertySignature2.type) : typeAST(propertySignature2.type);
|
|
27709
|
+
if (isLiteral(type3) && !propertySignature2.isOptional) {
|
|
27710
|
+
out.push([propertySignature2.name, type3]);
|
|
27711
27711
|
}
|
|
27712
27712
|
}
|
|
27713
27713
|
return out;
|
|
@@ -27716,9 +27716,9 @@ var getLiterals = (ast, isDecoding) => {
|
|
|
27716
27716
|
const out = [];
|
|
27717
27717
|
for (let i = 0; i < ast.elements.length; i++) {
|
|
27718
27718
|
const element = ast.elements[i];
|
|
27719
|
-
const
|
|
27720
|
-
if (isLiteral(
|
|
27721
|
-
out.push([i,
|
|
27719
|
+
const type3 = isDecoding ? encodedAST(element.type) : typeAST(element.type);
|
|
27720
|
+
if (isLiteral(type3) && !element.isOptional) {
|
|
27721
|
+
out.push([i, type3]);
|
|
27722
27722
|
}
|
|
27723
27723
|
}
|
|
27724
27724
|
return out;
|
|
@@ -27904,7 +27904,7 @@ var getCurrentMessage = (issue) => getAnnotated(issue).pipe(flatMap(getMessageAn
|
|
|
27904
27904
|
}));
|
|
27905
27905
|
}
|
|
27906
27906
|
}));
|
|
27907
|
-
var createParseIssueGuard = (
|
|
27907
|
+
var createParseIssueGuard = (tag6) => (issue) => issue._tag === tag6;
|
|
27908
27908
|
var isComposite2 = /* @__PURE__ */ createParseIssueGuard("Composite");
|
|
27909
27909
|
var isRefinement2 = /* @__PURE__ */ createParseIssueGuard("Refinement");
|
|
27910
27910
|
var isTransformation2 = /* @__PURE__ */ createParseIssueGuard("Transformation");
|
|
@@ -30612,8 +30612,8 @@ var mapEffectSequential = /* @__PURE__ */ dual(2, (self, f) => {
|
|
|
30612
30612
|
});
|
|
30613
30613
|
var pipeThroughChannel = /* @__PURE__ */ dual(2, (self, channel) => new StreamImpl(pipeTo(toChannel2(self), channel)));
|
|
30614
30614
|
var provideContext5 = /* @__PURE__ */ dual(2, (self, context7) => new StreamImpl(pipe(toChannel2(self), provideContext3(context7))));
|
|
30615
|
-
var provideServiceEffect3 = /* @__PURE__ */ dual(3, (self,
|
|
30616
|
-
var provideServiceStream = /* @__PURE__ */ dual(3, (self,
|
|
30615
|
+
var provideServiceEffect3 = /* @__PURE__ */ dual(3, (self, tag6, effect3) => provideServiceStream(self, tag6, fromEffect7(effect3)));
|
|
30616
|
+
var provideServiceStream = /* @__PURE__ */ dual(3, (self, tag6, stream4) => contextWithStream((env2) => flatMap14(stream4, (service2) => pipe(self, provideContext5(add4(env2, tag6, service2))))));
|
|
30617
30617
|
var repeatEffectChunkOption = (effect3) => unfoldChunkEffect(effect3, (effect4) => pipe(map17(effect4, (chunk4) => some2([chunk4, effect4])), catchAll2(match2({
|
|
30618
30618
|
onNone: () => succeed7(none2()),
|
|
30619
30619
|
onSome: fail7
|
|
@@ -30982,8 +30982,8 @@ var PropertySignatureDeclaration = class extends OptionalType {
|
|
|
30982
30982
|
* @since 3.10.0
|
|
30983
30983
|
*/
|
|
30984
30984
|
_tag = "PropertySignatureDeclaration";
|
|
30985
|
-
constructor(
|
|
30986
|
-
super(
|
|
30985
|
+
constructor(type3, isOptional, isReadonly, annotations2, defaultValue) {
|
|
30986
|
+
super(type3, isOptional, annotations2);
|
|
30987
30987
|
this.isReadonly = isReadonly;
|
|
30988
30988
|
this.defaultValue = defaultValue;
|
|
30989
30989
|
}
|
|
@@ -30992,15 +30992,15 @@ var PropertySignatureDeclaration = class extends OptionalType {
|
|
|
30992
30992
|
*/
|
|
30993
30993
|
toString() {
|
|
30994
30994
|
const token = formatPropertySignatureToken(this.isOptional);
|
|
30995
|
-
const
|
|
30996
|
-
return `PropertySignature<${token}, ${
|
|
30995
|
+
const type3 = String(this.type);
|
|
30996
|
+
return `PropertySignature<${token}, ${type3}, never, ${token}, ${type3}>`;
|
|
30997
30997
|
}
|
|
30998
30998
|
};
|
|
30999
30999
|
var FromPropertySignature = class extends OptionalType {
|
|
31000
31000
|
isReadonly;
|
|
31001
31001
|
fromKey;
|
|
31002
|
-
constructor(
|
|
31003
|
-
super(
|
|
31002
|
+
constructor(type3, isOptional, isReadonly, annotations2, fromKey) {
|
|
31003
|
+
super(type3, isOptional, annotations2);
|
|
31004
31004
|
this.isReadonly = isReadonly;
|
|
31005
31005
|
this.fromKey = fromKey;
|
|
31006
31006
|
}
|
|
@@ -31008,8 +31008,8 @@ var FromPropertySignature = class extends OptionalType {
|
|
|
31008
31008
|
var ToPropertySignature = class extends OptionalType {
|
|
31009
31009
|
isReadonly;
|
|
31010
31010
|
defaultValue;
|
|
31011
|
-
constructor(
|
|
31012
|
-
super(
|
|
31011
|
+
constructor(type3, isOptional, isReadonly, annotations2, defaultValue) {
|
|
31012
|
+
super(type3, isOptional, annotations2);
|
|
31013
31013
|
this.isReadonly = isReadonly;
|
|
31014
31014
|
this.defaultValue = defaultValue;
|
|
31015
31015
|
}
|
|
@@ -31221,12 +31221,12 @@ var getDefaultTypeLiteralAST = (fields, records) => {
|
|
|
31221
31221
|
const ast = field.ast;
|
|
31222
31222
|
switch (ast._tag) {
|
|
31223
31223
|
case "PropertySignatureDeclaration": {
|
|
31224
|
-
const
|
|
31224
|
+
const type3 = ast.type;
|
|
31225
31225
|
const isOptional = ast.isOptional;
|
|
31226
31226
|
const toAnnotations = ast.annotations;
|
|
31227
|
-
from.push(new PropertySignature(key,
|
|
31228
|
-
to.push(new PropertySignature(key, typeAST(
|
|
31229
|
-
pss.push(new PropertySignature(key,
|
|
31227
|
+
from.push(new PropertySignature(key, type3, isOptional, true, preserveMissingMessageAnnotation(ast)));
|
|
31228
|
+
to.push(new PropertySignature(key, typeAST(type3), isOptional, true, toAnnotations));
|
|
31229
|
+
pss.push(new PropertySignature(key, type3, isOptional, true, toAnnotations));
|
|
31230
31230
|
break;
|
|
31231
31231
|
}
|
|
31232
31232
|
case "PropertySignatureTransformation": {
|
|
@@ -31364,9 +31364,9 @@ var intersectTypeLiterals = (x2, y3, path3) => {
|
|
|
31364
31364
|
} else {
|
|
31365
31365
|
const {
|
|
31366
31366
|
isOptional,
|
|
31367
|
-
type:
|
|
31367
|
+
type: type3
|
|
31368
31368
|
} = propertySignatures[i];
|
|
31369
|
-
propertySignatures[i] = new PropertySignature(name, extendAST(
|
|
31369
|
+
propertySignatures[i] = new PropertySignature(name, extendAST(type3, ps.type, path3.concat(name)), isOptional, true);
|
|
31370
31370
|
}
|
|
31371
31371
|
}
|
|
31372
31372
|
return new TypeLiteral(propertySignatures, x2.indexSignatures.concat(y3.indexSignatures));
|
|
@@ -31664,28 +31664,28 @@ var Class4 = (identifier2) => (fieldsOr, annotations2) => makeClass({
|
|
|
31664
31664
|
Base: Class3,
|
|
31665
31665
|
annotations: annotations2
|
|
31666
31666
|
});
|
|
31667
|
-
var getClassTag = (
|
|
31668
|
-
var TaggedError2 = (identifier2) => (
|
|
31667
|
+
var getClassTag = (tag6) => withConstructorDefault(propertySignature(Literal2(tag6)), () => tag6);
|
|
31668
|
+
var TaggedError2 = (identifier2) => (tag6, fieldsOr, annotations2) => {
|
|
31669
31669
|
class Base3 extends Error3 {
|
|
31670
31670
|
}
|
|
31671
|
-
Base3.prototype.name =
|
|
31671
|
+
Base3.prototype.name = tag6;
|
|
31672
31672
|
const fields = getFieldsFromFieldsOr(fieldsOr);
|
|
31673
31673
|
const schema = getSchemaFromFieldsOr(fieldsOr);
|
|
31674
31674
|
const newFields = {
|
|
31675
|
-
_tag: getClassTag(
|
|
31675
|
+
_tag: getClassTag(tag6)
|
|
31676
31676
|
};
|
|
31677
31677
|
const taggedFields = extendFields(newFields, fields);
|
|
31678
31678
|
const hasMessageField = "message" in taggedFields;
|
|
31679
31679
|
class TaggedErrorClass extends makeClass({
|
|
31680
31680
|
kind: "TaggedError",
|
|
31681
|
-
identifier: identifier2 ??
|
|
31681
|
+
identifier: identifier2 ?? tag6,
|
|
31682
31682
|
schema: extend3(schema, Struct(newFields)),
|
|
31683
31683
|
fields: taggedFields,
|
|
31684
31684
|
Base: Base3,
|
|
31685
31685
|
annotations: annotations2,
|
|
31686
31686
|
disableToString: true
|
|
31687
31687
|
}) {
|
|
31688
|
-
static _tag =
|
|
31688
|
+
static _tag = tag6;
|
|
31689
31689
|
}
|
|
31690
31690
|
if (!hasMessageField) {
|
|
31691
31691
|
Object.defineProperty(TaggedErrorClass.prototype, "message", {
|
|
@@ -32137,12 +32137,12 @@ var Defect = class extends (/* @__PURE__ */ transform2(Unknown, Unknown, {
|
|
|
32137
32137
|
|
|
32138
32138
|
// ../../node_modules/.pnpm/@effect+platform@0.94.0_effect@3.19.13/node_modules/@effect/platform/dist/esm/Error.js
|
|
32139
32139
|
var TypeId18 = /* @__PURE__ */ Symbol.for("@effect/platform/Error");
|
|
32140
|
-
var TypeIdError = (typeId,
|
|
32140
|
+
var TypeIdError = (typeId, tag6) => {
|
|
32141
32141
|
class Base3 extends Error3 {
|
|
32142
|
-
_tag =
|
|
32142
|
+
_tag = tag6;
|
|
32143
32143
|
}
|
|
32144
32144
|
Base3.prototype[typeId] = typeId;
|
|
32145
|
-
Base3.prototype.name =
|
|
32145
|
+
Base3.prototype.name = tag6;
|
|
32146
32146
|
return Base3;
|
|
32147
32147
|
};
|
|
32148
32148
|
var Module = /* @__PURE__ */ Literal2("Clipboard", "Command", "FileSystem", "KeyValueStore", "Path", "Stream", "Terminal");
|
|
@@ -32358,6 +32358,27 @@ var succeed16 = (value5) => {
|
|
|
32358
32358
|
|
|
32359
32359
|
// ../../node_modules/.pnpm/effect@3.19.13/node_modules/effect/dist/esm/internal/matcher.js
|
|
32360
32360
|
var TypeId19 = /* @__PURE__ */ Symbol.for("@effect/matcher/Matcher");
|
|
32361
|
+
var TypeMatcherProto = {
|
|
32362
|
+
[TypeId19]: {
|
|
32363
|
+
_input: identity,
|
|
32364
|
+
_filters: identity,
|
|
32365
|
+
_remaining: identity,
|
|
32366
|
+
_result: identity,
|
|
32367
|
+
_return: identity
|
|
32368
|
+
},
|
|
32369
|
+
_tag: "TypeMatcher",
|
|
32370
|
+
add(_case) {
|
|
32371
|
+
return makeTypeMatcher([...this.cases, _case]);
|
|
32372
|
+
},
|
|
32373
|
+
pipe() {
|
|
32374
|
+
return pipeArguments(this, arguments);
|
|
32375
|
+
}
|
|
32376
|
+
};
|
|
32377
|
+
function makeTypeMatcher(cases) {
|
|
32378
|
+
const matcher = Object.create(TypeMatcherProto);
|
|
32379
|
+
matcher.cases = cases;
|
|
32380
|
+
return matcher;
|
|
32381
|
+
}
|
|
32361
32382
|
var ValueMatcherProto = {
|
|
32362
32383
|
[TypeId19]: {
|
|
32363
32384
|
_input: identity,
|
|
@@ -32429,8 +32450,16 @@ var makePredicate = (pattern2) => {
|
|
|
32429
32450
|
}
|
|
32430
32451
|
return (u2) => u2 === pattern2;
|
|
32431
32452
|
};
|
|
32453
|
+
var type = () => makeTypeMatcher([]);
|
|
32432
32454
|
var value3 = (i) => makeValueMatcher(i, left2(i));
|
|
32433
32455
|
var when4 = (pattern2, f) => (self) => self.add(makeWhen(makePredicate(pattern2), f));
|
|
32456
|
+
var discriminator = (field) => (...pattern2) => {
|
|
32457
|
+
const f = pattern2[pattern2.length - 1];
|
|
32458
|
+
const values5 = pattern2.slice(0, -1);
|
|
32459
|
+
const pred = values5.length === 1 ? (_3) => _3[field] === values5[0] : (_3) => values5.includes(_3[field]);
|
|
32460
|
+
return (self) => self.add(makeWhen(pred, f));
|
|
32461
|
+
};
|
|
32462
|
+
var tag3 = /* @__PURE__ */ discriminator("_tag");
|
|
32434
32463
|
var orElse12 = (f) => (self) => {
|
|
32435
32464
|
const result = either6(self);
|
|
32436
32465
|
if (isEither2(result)) {
|
|
@@ -32469,11 +32498,31 @@ var either6 = (self) => {
|
|
|
32469
32498
|
return left2(input);
|
|
32470
32499
|
};
|
|
32471
32500
|
};
|
|
32501
|
+
var getExhaustiveAbsurdErrorMessage = "effect/Match/exhaustive: absurd";
|
|
32502
|
+
var exhaustive = (self) => {
|
|
32503
|
+
const toEither = either6(self);
|
|
32504
|
+
if (isEither2(toEither)) {
|
|
32505
|
+
if (toEither._tag === "Right") {
|
|
32506
|
+
return toEither.right;
|
|
32507
|
+
}
|
|
32508
|
+
throw new Error(getExhaustiveAbsurdErrorMessage);
|
|
32509
|
+
}
|
|
32510
|
+
return (u2) => {
|
|
32511
|
+
const result = toEither(u2);
|
|
32512
|
+
if (result._tag === "Right") {
|
|
32513
|
+
return result.right;
|
|
32514
|
+
}
|
|
32515
|
+
throw new Error(getExhaustiveAbsurdErrorMessage);
|
|
32516
|
+
};
|
|
32517
|
+
};
|
|
32472
32518
|
|
|
32473
32519
|
// ../../node_modules/.pnpm/effect@3.19.13/node_modules/effect/dist/esm/Match.js
|
|
32520
|
+
var type2 = type;
|
|
32474
32521
|
var value4 = value3;
|
|
32475
32522
|
var when5 = when4;
|
|
32523
|
+
var tag4 = tag3;
|
|
32476
32524
|
var orElse13 = orElse12;
|
|
32525
|
+
var exhaustive2 = exhaustive;
|
|
32477
32526
|
|
|
32478
32527
|
// ../../node_modules/.pnpm/@effect+cli@0.73.0_@effect+platform@0.94.0_effect@3.19.13__@effect+printer-ansi@0.47.0__3d74b155affbb701ff8b68df3bab36d4/node_modules/@effect/cli/dist/esm/internal/prompt/ansi-utils.js
|
|
32479
32528
|
var defaultFigures = {
|
|
@@ -34098,10 +34147,10 @@ function handleClear5(options5) {
|
|
|
34098
34147
|
return renderClearScreen(state, options5);
|
|
34099
34148
|
};
|
|
34100
34149
|
}
|
|
34101
|
-
function basePrompt(options5,
|
|
34150
|
+
function basePrompt(options5, type3) {
|
|
34102
34151
|
const opts = {
|
|
34103
34152
|
default: "",
|
|
34104
|
-
type:
|
|
34153
|
+
type: type3,
|
|
34105
34154
|
validate: succeed7,
|
|
34106
34155
|
...options5
|
|
34107
34156
|
};
|
|
@@ -37204,12 +37253,12 @@ var Prototype = {
|
|
|
37204
37253
|
};
|
|
37205
37254
|
var registeredDescriptors = /* @__PURE__ */ globalValue("@effect/cli/Command/registeredDescriptors", () => /* @__PURE__ */ new WeakMap());
|
|
37206
37255
|
var getDescriptor = (self) => registeredDescriptors.get(self.tag) ?? self.descriptor;
|
|
37207
|
-
var makeProto = (descriptor2, handler,
|
|
37256
|
+
var makeProto = (descriptor2, handler, tag6, transform4 = identity) => {
|
|
37208
37257
|
const self = Object.create(Prototype);
|
|
37209
37258
|
self.descriptor = descriptor2;
|
|
37210
37259
|
self.handler = handler;
|
|
37211
37260
|
self.transform = transform4;
|
|
37212
|
-
self.tag =
|
|
37261
|
+
self.tag = tag6;
|
|
37213
37262
|
return self;
|
|
37214
37263
|
};
|
|
37215
37264
|
var makeDerive = (self, options5) => {
|
|
@@ -37249,8 +37298,8 @@ var withSubcommands2 = /* @__PURE__ */ dual(2, (self, subcommands) => {
|
|
|
37249
37298
|
});
|
|
37250
37299
|
function handler(args2) {
|
|
37251
37300
|
if (args2.subcommand._tag === "Some") {
|
|
37252
|
-
const [
|
|
37253
|
-
const subcommand = subcommandMap.get(
|
|
37301
|
+
const [tag6, value5] = args2.subcommand.value;
|
|
37302
|
+
const subcommand = subcommandMap.get(tag6);
|
|
37254
37303
|
const subcommandEffect = subcommand.transform(subcommand.handler(value5), value5);
|
|
37255
37304
|
return provideService2(subcommandEffect, self.tag, args2);
|
|
37256
37305
|
}
|
|
@@ -39463,8 +39512,8 @@ var errorMap = {
|
|
|
39463
39512
|
[LinearErrorType.LockTimeout]: "lock timeout",
|
|
39464
39513
|
[LinearErrorType.UsageLimitExceeded]: "usage limit exceeded"
|
|
39465
39514
|
};
|
|
39466
|
-
function getErrorType(
|
|
39467
|
-
return getKeyByValue(errorMap,
|
|
39515
|
+
function getErrorType(type3) {
|
|
39516
|
+
return getKeyByValue(errorMap, type3) ?? LinearErrorType.Unknown;
|
|
39468
39517
|
}
|
|
39469
39518
|
var defaultError = "Unknown error from LinearClient";
|
|
39470
39519
|
var LinearGraphQLError = class {
|
|
@@ -39498,13 +39547,13 @@ var LinearError = class extends Error {
|
|
|
39498
39547
|
status;
|
|
39499
39548
|
/** The raw LinearGraphQLClient error */
|
|
39500
39549
|
raw;
|
|
39501
|
-
constructor(error4, errors,
|
|
39550
|
+
constructor(error4, errors, type3) {
|
|
39502
39551
|
super(Array.from(new Set([
|
|
39503
39552
|
capitalize(error4?.message?.split(": {")?.[0]),
|
|
39504
39553
|
error4?.response?.error,
|
|
39505
39554
|
errors?.[0]?.message
|
|
39506
39555
|
].filter(nonNullable))).filter(nonNullable).join(" - ") ?? defaultError);
|
|
39507
|
-
this.type =
|
|
39556
|
+
this.type = type3;
|
|
39508
39557
|
this.errors = errors;
|
|
39509
39558
|
this.query = error4?.request?.query;
|
|
39510
39559
|
this.variables = error4?.request?.variables;
|
|
@@ -174431,10 +174480,10 @@ var SsoUrlFromEmailQuery = class extends Request {
|
|
|
174431
174480
|
* @param variables - variables without 'email', 'type' to pass into the SsoUrlFromEmailQuery
|
|
174432
174481
|
* @returns parsed response from SsoUrlFromEmailQuery
|
|
174433
174482
|
*/
|
|
174434
|
-
async fetch(email,
|
|
174483
|
+
async fetch(email, type3, variables) {
|
|
174435
174484
|
const data = (await this._request(SsoUrlFromEmailDocument, {
|
|
174436
174485
|
email,
|
|
174437
|
-
type:
|
|
174486
|
+
type: type3,
|
|
174438
174487
|
...variables
|
|
174439
174488
|
})).ssoUrlFromEmail;
|
|
174440
174489
|
return new SsoUrlFromEmailResponse(this._request, data);
|
|
@@ -182421,8 +182470,8 @@ var LinearSdk = class extends Request {
|
|
|
182421
182470
|
* @param variables - variables without 'email', 'type' to pass into the SsoUrlFromEmailQuery
|
|
182422
182471
|
* @returns SsoUrlFromEmailResponse
|
|
182423
182472
|
*/
|
|
182424
|
-
ssoUrlFromEmail(email,
|
|
182425
|
-
return new SsoUrlFromEmailQuery(this._request).fetch(email,
|
|
182473
|
+
ssoUrlFromEmail(email, type3, variables) {
|
|
182474
|
+
return new SsoUrlFromEmailQuery(this._request).fetch(email, type3, variables);
|
|
182426
182475
|
}
|
|
182427
182476
|
/**
|
|
182428
182477
|
* One specific team.
|
|
@@ -185661,7 +185710,7 @@ var createTaskCommand = make58(
|
|
|
185661
185710
|
json: jsonOption9,
|
|
185662
185711
|
dryRun: dryRunOption
|
|
185663
185712
|
},
|
|
185664
|
-
({ title, description, priority, type:
|
|
185713
|
+
({ title, description, priority, type: type3, template, parent, json: json2, dryRun }) => gen2(function* () {
|
|
185665
185714
|
const config2 = yield* ConfigRepository;
|
|
185666
185715
|
const issueRepo = yield* IssueRepository;
|
|
185667
185716
|
const templateService = yield* TemplateService;
|
|
@@ -185688,7 +185737,7 @@ var createTaskCommand = make58(
|
|
|
185688
185737
|
onSome: (tmpl) => tmpl.priority ?? "medium"
|
|
185689
185738
|
})
|
|
185690
185739
|
});
|
|
185691
|
-
const finalType = match2(
|
|
185740
|
+
const finalType = match2(type3, {
|
|
185692
185741
|
onSome: (t) => t,
|
|
185693
185742
|
onNone: () => match2(templateData, {
|
|
185694
185743
|
onNone: () => "task",
|
|
@@ -186291,8 +186340,8 @@ var extractErrorInfo = (e2) => {
|
|
|
186291
186340
|
return { tag: "UnknownError", message: String(e2) };
|
|
186292
186341
|
};
|
|
186293
186342
|
var formatEffectError = (e2) => {
|
|
186294
|
-
const { tag:
|
|
186295
|
-
return `[${
|
|
186343
|
+
const { tag: tag6, message } = extractErrorInfo(e2);
|
|
186344
|
+
return `[${tag6}] ${message}`;
|
|
186296
186345
|
};
|
|
186297
186346
|
var getDefaultBranch = () => gen2(function* () {
|
|
186298
186347
|
const configRepo = yield* ConfigRepository;
|
|
@@ -188796,6 +188845,212 @@ Repository: ${repoName}
|
|
|
188796
188845
|
\u2192 Action: Check this event`;
|
|
188797
188846
|
}
|
|
188798
188847
|
|
|
188848
|
+
// ../../node_modules/.pnpm/@effect+platform@0.94.0_effect@3.19.13/node_modules/@effect/platform/dist/esm/internal/commandExecutor.js
|
|
188849
|
+
var TypeId24 = /* @__PURE__ */ Symbol.for("@effect/platform/CommandExecutor");
|
|
188850
|
+
var ProcessTypeId = /* @__PURE__ */ Symbol.for("@effect/platform/Process");
|
|
188851
|
+
var ExitCode = /* @__PURE__ */ nominal();
|
|
188852
|
+
var ProcessId = /* @__PURE__ */ nominal();
|
|
188853
|
+
var CommandExecutor = /* @__PURE__ */ GenericTag("@effect/platform/CommandExecutor");
|
|
188854
|
+
var makeExecutor = (start4) => {
|
|
188855
|
+
const stream4 = (command2) => unwrapScoped6(map17(start4(command2), (process2) => process2.stdout));
|
|
188856
|
+
const streamLines2 = (command2, encoding) => {
|
|
188857
|
+
const decoder = new TextDecoder(encoding);
|
|
188858
|
+
return splitLines3(mapChunks2(stream4(command2), map5((bytes) => decoder.decode(bytes))));
|
|
188859
|
+
};
|
|
188860
|
+
return {
|
|
188861
|
+
[TypeId24]: TypeId24,
|
|
188862
|
+
start: start4,
|
|
188863
|
+
exitCode: (command2) => scoped2(flatMap9(start4(command2), (process2) => process2.exitCode)),
|
|
188864
|
+
stream: stream4,
|
|
188865
|
+
string: (command2, encoding = "utf-8") => {
|
|
188866
|
+
const decoder = new TextDecoder(encoding);
|
|
188867
|
+
return pipe(start4(command2), flatMap9((process2) => run4(process2.stdout, collectUint8Array)), map17((bytes) => decoder.decode(bytes)), scoped2);
|
|
188868
|
+
},
|
|
188869
|
+
lines: (command2, encoding = "utf-8") => {
|
|
188870
|
+
return pipe(streamLines2(command2, encoding), runCollect3, map17(toArray2));
|
|
188871
|
+
},
|
|
188872
|
+
streamLines: streamLines2
|
|
188873
|
+
};
|
|
188874
|
+
};
|
|
188875
|
+
var collectUint8Array = /* @__PURE__ */ foldLeftChunks2(/* @__PURE__ */ new Uint8Array(), (bytes, chunk4) => reduce2(chunk4, bytes, (acc, curr) => {
|
|
188876
|
+
const newArray = new Uint8Array(acc.length + curr.length);
|
|
188877
|
+
newArray.set(acc);
|
|
188878
|
+
newArray.set(curr, acc.length);
|
|
188879
|
+
return newArray;
|
|
188880
|
+
}));
|
|
188881
|
+
|
|
188882
|
+
// ../../node_modules/.pnpm/@effect+platform@0.94.0_effect@3.19.13/node_modules/@effect/platform/dist/esm/internal/command.js
|
|
188883
|
+
var CommandTypeId = /* @__PURE__ */ Symbol.for("@effect/platform/Command");
|
|
188884
|
+
var isCommand2 = (u2) => typeof u2 === "object" && u2 != null && CommandTypeId in u2;
|
|
188885
|
+
var exitCode = (self) => flatMap9(CommandExecutor, (executor) => executor.exitCode(self));
|
|
188886
|
+
var flatten13 = (self) => Array.from(flattenLoop(self));
|
|
188887
|
+
var flattenLoop = (self) => {
|
|
188888
|
+
switch (self._tag) {
|
|
188889
|
+
case "StandardCommand": {
|
|
188890
|
+
return of2(self);
|
|
188891
|
+
}
|
|
188892
|
+
case "PipedCommand": {
|
|
188893
|
+
return appendAll2(flattenLoop(self.left), flattenLoop(self.right));
|
|
188894
|
+
}
|
|
188895
|
+
}
|
|
188896
|
+
};
|
|
188897
|
+
var Proto2 = {
|
|
188898
|
+
[CommandTypeId]: CommandTypeId,
|
|
188899
|
+
pipe() {
|
|
188900
|
+
return pipeArguments(this, arguments);
|
|
188901
|
+
},
|
|
188902
|
+
...BaseProto
|
|
188903
|
+
};
|
|
188904
|
+
var StandardProto = {
|
|
188905
|
+
...Proto2,
|
|
188906
|
+
_tag: "StandardCommand",
|
|
188907
|
+
toJSON() {
|
|
188908
|
+
return {
|
|
188909
|
+
_id: "@effect/platform/Command",
|
|
188910
|
+
_tag: this._tag,
|
|
188911
|
+
command: this.command,
|
|
188912
|
+
args: this.args,
|
|
188913
|
+
env: Object.fromEntries(this.env),
|
|
188914
|
+
cwd: this.cwd.toJSON(),
|
|
188915
|
+
shell: this.shell,
|
|
188916
|
+
gid: this.gid.toJSON(),
|
|
188917
|
+
uid: this.uid.toJSON()
|
|
188918
|
+
};
|
|
188919
|
+
}
|
|
188920
|
+
};
|
|
188921
|
+
var makeStandard = (options5) => Object.assign(Object.create(StandardProto), options5);
|
|
188922
|
+
var PipedProto = {
|
|
188923
|
+
...Proto2,
|
|
188924
|
+
_tag: "PipedCommand",
|
|
188925
|
+
toJSON() {
|
|
188926
|
+
return {
|
|
188927
|
+
_id: "@effect/platform/Command",
|
|
188928
|
+
_tag: this._tag,
|
|
188929
|
+
left: this.left.toJSON(),
|
|
188930
|
+
right: this.right.toJSON()
|
|
188931
|
+
};
|
|
188932
|
+
}
|
|
188933
|
+
};
|
|
188934
|
+
var makePiped = (options5) => Object.assign(Object.create(PipedProto), options5);
|
|
188935
|
+
var make60 = (command2, ...args2) => makeStandard({
|
|
188936
|
+
command: command2,
|
|
188937
|
+
args: args2,
|
|
188938
|
+
env: empty10(),
|
|
188939
|
+
cwd: none2(),
|
|
188940
|
+
shell: false,
|
|
188941
|
+
stdin: "pipe",
|
|
188942
|
+
stdout: "pipe",
|
|
188943
|
+
stderr: "pipe",
|
|
188944
|
+
gid: none2(),
|
|
188945
|
+
uid: none2()
|
|
188946
|
+
});
|
|
188947
|
+
var stdin = /* @__PURE__ */ dual(2, (self, input) => {
|
|
188948
|
+
switch (self._tag) {
|
|
188949
|
+
case "StandardCommand": {
|
|
188950
|
+
return makeStandard({
|
|
188951
|
+
...self,
|
|
188952
|
+
stdin: input
|
|
188953
|
+
});
|
|
188954
|
+
}
|
|
188955
|
+
// For piped commands it only makes sense to provide `stdin` for the
|
|
188956
|
+
// left-most command as the rest will be piped in.
|
|
188957
|
+
case "PipedCommand": {
|
|
188958
|
+
return makePiped({
|
|
188959
|
+
...self,
|
|
188960
|
+
left: stdin(self.left, input)
|
|
188961
|
+
});
|
|
188962
|
+
}
|
|
188963
|
+
}
|
|
188964
|
+
});
|
|
188965
|
+
var string6 = /* @__PURE__ */ dual((args2) => isCommand2(args2[0]), (command2, encoding) => flatMap9(CommandExecutor, (executor) => executor.string(command2, encoding)));
|
|
188966
|
+
|
|
188967
|
+
// ../../node_modules/.pnpm/@effect+platform@0.94.0_effect@3.19.13/node_modules/@effect/platform/dist/esm/Command.js
|
|
188968
|
+
var exitCode2 = exitCode;
|
|
188969
|
+
var flatten14 = flatten13;
|
|
188970
|
+
var make61 = make60;
|
|
188971
|
+
var string7 = string6;
|
|
188972
|
+
var stdin2 = stdin;
|
|
188973
|
+
|
|
188974
|
+
// ../../node_modules/.pnpm/@effect+platform@0.94.0_effect@3.19.13/node_modules/@effect/platform/dist/esm/CommandExecutor.js
|
|
188975
|
+
var CommandExecutor2 = CommandExecutor;
|
|
188976
|
+
var ProcessTypeId2 = ProcessTypeId;
|
|
188977
|
+
var ExitCode2 = ExitCode;
|
|
188978
|
+
var ProcessId2 = ProcessId;
|
|
188979
|
+
var makeExecutor2 = makeExecutor;
|
|
188980
|
+
|
|
188981
|
+
// src/adapters/driving/cli/commands/webhook/diagnostics.ts
|
|
188982
|
+
var RepoIssue = taggedEnum();
|
|
188983
|
+
var diagnoseRepoIssue = (cwd) => gen2(function* () {
|
|
188984
|
+
const executor = yield* CommandExecutor2;
|
|
188985
|
+
const fs = yield* FileSystem;
|
|
188986
|
+
const workdir = (yield* sync4(() => process.cwd()));
|
|
188987
|
+
const hasGitDir = yield* fs.exists(`${workdir}/.git`).pipe(orElseSucceed2(() => false));
|
|
188988
|
+
const hasJjDir = yield* fs.exists(`${workdir}/.jj`).pipe(orElseSucceed2(() => false));
|
|
188989
|
+
if (!hasGitDir && !hasJjDir) {
|
|
188990
|
+
return RepoIssue.NotGitRepo();
|
|
188991
|
+
}
|
|
188992
|
+
if (hasGitDir && !hasJjDir) {
|
|
188993
|
+
const remoteResult = yield* string7(
|
|
188994
|
+
make61("git", "remote", "-v")
|
|
188995
|
+
).pipe(
|
|
188996
|
+
provideService2(CommandExecutor2, executor),
|
|
188997
|
+
map17((output) => output.trim()),
|
|
188998
|
+
orElseSucceed2(() => "")
|
|
188999
|
+
);
|
|
189000
|
+
if (!remoteResult) {
|
|
189001
|
+
return RepoIssue.NoRemote({ hasJj: false });
|
|
189002
|
+
}
|
|
189003
|
+
return RepoIssue.JjNotInitialized();
|
|
189004
|
+
}
|
|
189005
|
+
const jjRemoteResult = yield* string7(
|
|
189006
|
+
make61("jj", "git", "remote", "list")
|
|
189007
|
+
).pipe(
|
|
189008
|
+
provideService2(CommandExecutor2, executor),
|
|
189009
|
+
map17((output) => output.trim()),
|
|
189010
|
+
orElseSucceed2(() => "")
|
|
189011
|
+
);
|
|
189012
|
+
if (!jjRemoteResult) {
|
|
189013
|
+
return RepoIssue.NoRemote({ hasJj: true });
|
|
189014
|
+
}
|
|
189015
|
+
return RepoIssue.NoRemote({ hasJj: hasJjDir });
|
|
189016
|
+
});
|
|
189017
|
+
var formatRepoError = type2().pipe(
|
|
189018
|
+
tag4("NotGitRepo", () => [
|
|
189019
|
+
"Error: Not in a git repository.",
|
|
189020
|
+
"",
|
|
189021
|
+
"Hint: Initialize a repository first:",
|
|
189022
|
+
" git init && gh repo create"
|
|
189023
|
+
]),
|
|
189024
|
+
tag4(
|
|
189025
|
+
"NoRemote",
|
|
189026
|
+
({ hasJj }) => hasJj ? [
|
|
189027
|
+
"Error: No GitHub remote configured.",
|
|
189028
|
+
"",
|
|
189029
|
+
"Hint: Add a GitHub remote to your jj repository:",
|
|
189030
|
+
" jj git remote add origin git@github.com:OWNER/REPO.git",
|
|
189031
|
+
"",
|
|
189032
|
+
"Or create a new GitHub repo:",
|
|
189033
|
+
" gh repo create REPO --source=. --remote=origin"
|
|
189034
|
+
] : [
|
|
189035
|
+
"Error: No GitHub remote configured.",
|
|
189036
|
+
"",
|
|
189037
|
+
"Hint: Create a GitHub repository:",
|
|
189038
|
+
" gh repo create REPO --source=. --remote=origin",
|
|
189039
|
+
"",
|
|
189040
|
+
"Or add an existing remote:",
|
|
189041
|
+
" git remote add origin git@github.com:OWNER/REPO.git"
|
|
189042
|
+
]
|
|
189043
|
+
),
|
|
189044
|
+
tag4("JjNotInitialized", () => [
|
|
189045
|
+
"Error: This is a git repository but jj is not initialized.",
|
|
189046
|
+
"",
|
|
189047
|
+
"Hint: Ship CLI works best with jj. Initialize jj for this repo:",
|
|
189048
|
+
" jj git init --colocate"
|
|
189049
|
+
]),
|
|
189050
|
+
exhaustive2
|
|
189051
|
+
);
|
|
189052
|
+
var printRepoError = (issue) => forEach8(formatRepoError(issue), (line4) => error2(line4), { discard: true });
|
|
189053
|
+
|
|
188799
189054
|
// src/adapters/driving/cli/commands/webhook/forward.ts
|
|
188800
189055
|
var eventsOption = text8("events").pipe(
|
|
188801
189056
|
withAlias2("e"),
|
|
@@ -188832,7 +189087,8 @@ var forwardCommand = make58(
|
|
|
188832
189087
|
}
|
|
188833
189088
|
const repo = yield* prService.getCurrentRepo();
|
|
188834
189089
|
if (!repo) {
|
|
188835
|
-
yield*
|
|
189090
|
+
const issue = yield* diagnoseRepoIssue();
|
|
189091
|
+
yield* printRepoError(issue);
|
|
188836
189092
|
return;
|
|
188837
189093
|
}
|
|
188838
189094
|
const openCodeAvailable = yield* openCodeService.isAvailable();
|
|
@@ -188961,7 +189217,8 @@ var startCommand = make58(
|
|
|
188961
189217
|
}
|
|
188962
189218
|
const repo = yield* prService.getCurrentRepo();
|
|
188963
189219
|
if (!repo) {
|
|
188964
|
-
yield*
|
|
189220
|
+
const issue = yield* diagnoseRepoIssue();
|
|
189221
|
+
yield* printRepoError(issue);
|
|
188965
189222
|
return;
|
|
188966
189223
|
}
|
|
188967
189224
|
const eventList = events.split(",").map((e2) => e2.trim()).filter(Boolean);
|
|
@@ -190858,145 +191115,12 @@ var command = ship.pipe(
|
|
|
190858
191115
|
prCommand
|
|
190859
191116
|
])
|
|
190860
191117
|
);
|
|
190861
|
-
var version = "0.1.
|
|
191118
|
+
var version = "0.1.3" ;
|
|
190862
191119
|
var run9 = run8(command, {
|
|
190863
191120
|
name: "ship",
|
|
190864
191121
|
version
|
|
190865
191122
|
});
|
|
190866
191123
|
|
|
190867
|
-
// ../../node_modules/.pnpm/@effect+platform@0.94.0_effect@3.19.13/node_modules/@effect/platform/dist/esm/internal/commandExecutor.js
|
|
190868
|
-
var TypeId24 = /* @__PURE__ */ Symbol.for("@effect/platform/CommandExecutor");
|
|
190869
|
-
var ProcessTypeId = /* @__PURE__ */ Symbol.for("@effect/platform/Process");
|
|
190870
|
-
var ExitCode = /* @__PURE__ */ nominal();
|
|
190871
|
-
var ProcessId = /* @__PURE__ */ nominal();
|
|
190872
|
-
var CommandExecutor = /* @__PURE__ */ GenericTag("@effect/platform/CommandExecutor");
|
|
190873
|
-
var makeExecutor = (start4) => {
|
|
190874
|
-
const stream4 = (command2) => unwrapScoped6(map17(start4(command2), (process2) => process2.stdout));
|
|
190875
|
-
const streamLines2 = (command2, encoding) => {
|
|
190876
|
-
const decoder = new TextDecoder(encoding);
|
|
190877
|
-
return splitLines3(mapChunks2(stream4(command2), map5((bytes) => decoder.decode(bytes))));
|
|
190878
|
-
};
|
|
190879
|
-
return {
|
|
190880
|
-
[TypeId24]: TypeId24,
|
|
190881
|
-
start: start4,
|
|
190882
|
-
exitCode: (command2) => scoped2(flatMap9(start4(command2), (process2) => process2.exitCode)),
|
|
190883
|
-
stream: stream4,
|
|
190884
|
-
string: (command2, encoding = "utf-8") => {
|
|
190885
|
-
const decoder = new TextDecoder(encoding);
|
|
190886
|
-
return pipe(start4(command2), flatMap9((process2) => run4(process2.stdout, collectUint8Array)), map17((bytes) => decoder.decode(bytes)), scoped2);
|
|
190887
|
-
},
|
|
190888
|
-
lines: (command2, encoding = "utf-8") => {
|
|
190889
|
-
return pipe(streamLines2(command2, encoding), runCollect3, map17(toArray2));
|
|
190890
|
-
},
|
|
190891
|
-
streamLines: streamLines2
|
|
190892
|
-
};
|
|
190893
|
-
};
|
|
190894
|
-
var collectUint8Array = /* @__PURE__ */ foldLeftChunks2(/* @__PURE__ */ new Uint8Array(), (bytes, chunk4) => reduce2(chunk4, bytes, (acc, curr) => {
|
|
190895
|
-
const newArray = new Uint8Array(acc.length + curr.length);
|
|
190896
|
-
newArray.set(acc);
|
|
190897
|
-
newArray.set(curr, acc.length);
|
|
190898
|
-
return newArray;
|
|
190899
|
-
}));
|
|
190900
|
-
|
|
190901
|
-
// ../../node_modules/.pnpm/@effect+platform@0.94.0_effect@3.19.13/node_modules/@effect/platform/dist/esm/internal/command.js
|
|
190902
|
-
var CommandTypeId = /* @__PURE__ */ Symbol.for("@effect/platform/Command");
|
|
190903
|
-
var isCommand2 = (u2) => typeof u2 === "object" && u2 != null && CommandTypeId in u2;
|
|
190904
|
-
var exitCode = (self) => flatMap9(CommandExecutor, (executor) => executor.exitCode(self));
|
|
190905
|
-
var flatten13 = (self) => Array.from(flattenLoop(self));
|
|
190906
|
-
var flattenLoop = (self) => {
|
|
190907
|
-
switch (self._tag) {
|
|
190908
|
-
case "StandardCommand": {
|
|
190909
|
-
return of2(self);
|
|
190910
|
-
}
|
|
190911
|
-
case "PipedCommand": {
|
|
190912
|
-
return appendAll2(flattenLoop(self.left), flattenLoop(self.right));
|
|
190913
|
-
}
|
|
190914
|
-
}
|
|
190915
|
-
};
|
|
190916
|
-
var Proto2 = {
|
|
190917
|
-
[CommandTypeId]: CommandTypeId,
|
|
190918
|
-
pipe() {
|
|
190919
|
-
return pipeArguments(this, arguments);
|
|
190920
|
-
},
|
|
190921
|
-
...BaseProto
|
|
190922
|
-
};
|
|
190923
|
-
var StandardProto = {
|
|
190924
|
-
...Proto2,
|
|
190925
|
-
_tag: "StandardCommand",
|
|
190926
|
-
toJSON() {
|
|
190927
|
-
return {
|
|
190928
|
-
_id: "@effect/platform/Command",
|
|
190929
|
-
_tag: this._tag,
|
|
190930
|
-
command: this.command,
|
|
190931
|
-
args: this.args,
|
|
190932
|
-
env: Object.fromEntries(this.env),
|
|
190933
|
-
cwd: this.cwd.toJSON(),
|
|
190934
|
-
shell: this.shell,
|
|
190935
|
-
gid: this.gid.toJSON(),
|
|
190936
|
-
uid: this.uid.toJSON()
|
|
190937
|
-
};
|
|
190938
|
-
}
|
|
190939
|
-
};
|
|
190940
|
-
var makeStandard = (options5) => Object.assign(Object.create(StandardProto), options5);
|
|
190941
|
-
var PipedProto = {
|
|
190942
|
-
...Proto2,
|
|
190943
|
-
_tag: "PipedCommand",
|
|
190944
|
-
toJSON() {
|
|
190945
|
-
return {
|
|
190946
|
-
_id: "@effect/platform/Command",
|
|
190947
|
-
_tag: this._tag,
|
|
190948
|
-
left: this.left.toJSON(),
|
|
190949
|
-
right: this.right.toJSON()
|
|
190950
|
-
};
|
|
190951
|
-
}
|
|
190952
|
-
};
|
|
190953
|
-
var makePiped = (options5) => Object.assign(Object.create(PipedProto), options5);
|
|
190954
|
-
var make60 = (command2, ...args2) => makeStandard({
|
|
190955
|
-
command: command2,
|
|
190956
|
-
args: args2,
|
|
190957
|
-
env: empty10(),
|
|
190958
|
-
cwd: none2(),
|
|
190959
|
-
shell: false,
|
|
190960
|
-
stdin: "pipe",
|
|
190961
|
-
stdout: "pipe",
|
|
190962
|
-
stderr: "pipe",
|
|
190963
|
-
gid: none2(),
|
|
190964
|
-
uid: none2()
|
|
190965
|
-
});
|
|
190966
|
-
var stdin = /* @__PURE__ */ dual(2, (self, input) => {
|
|
190967
|
-
switch (self._tag) {
|
|
190968
|
-
case "StandardCommand": {
|
|
190969
|
-
return makeStandard({
|
|
190970
|
-
...self,
|
|
190971
|
-
stdin: input
|
|
190972
|
-
});
|
|
190973
|
-
}
|
|
190974
|
-
// For piped commands it only makes sense to provide `stdin` for the
|
|
190975
|
-
// left-most command as the rest will be piped in.
|
|
190976
|
-
case "PipedCommand": {
|
|
190977
|
-
return makePiped({
|
|
190978
|
-
...self,
|
|
190979
|
-
left: stdin(self.left, input)
|
|
190980
|
-
});
|
|
190981
|
-
}
|
|
190982
|
-
}
|
|
190983
|
-
});
|
|
190984
|
-
var string6 = /* @__PURE__ */ dual((args2) => isCommand2(args2[0]), (command2, encoding) => flatMap9(CommandExecutor, (executor) => executor.string(command2, encoding)));
|
|
190985
|
-
|
|
190986
|
-
// ../../node_modules/.pnpm/@effect+platform@0.94.0_effect@3.19.13/node_modules/@effect/platform/dist/esm/Command.js
|
|
190987
|
-
var exitCode2 = exitCode;
|
|
190988
|
-
var flatten14 = flatten13;
|
|
190989
|
-
var make61 = make60;
|
|
190990
|
-
var string7 = string6;
|
|
190991
|
-
var stdin2 = stdin;
|
|
190992
|
-
|
|
190993
|
-
// ../../node_modules/.pnpm/@effect+platform@0.94.0_effect@3.19.13/node_modules/@effect/platform/dist/esm/CommandExecutor.js
|
|
190994
|
-
var CommandExecutor2 = CommandExecutor;
|
|
190995
|
-
var ProcessTypeId2 = ProcessTypeId;
|
|
190996
|
-
var ExitCode2 = ExitCode;
|
|
190997
|
-
var ProcessId2 = ProcessId;
|
|
190998
|
-
var makeExecutor2 = makeExecutor;
|
|
190999
|
-
|
|
191000
191124
|
// ../../node_modules/.pnpm/@effect+platform-node-shared@0.57.0_@effect+cluster@0.56.0_@effect+platform@0.94.0_effe_08ca31cc3a331797a95b11f76dec1725/node_modules/@effect/platform-node-shared/dist/esm/internal/error.js
|
|
191001
191125
|
var handleErrnoException = (module, method) => (err, [path3]) => {
|
|
191002
191126
|
let reason = "Unknown";
|
|
@@ -193805,7 +193929,7 @@ var ATTR_URL_PATH = "url.path";
|
|
|
193805
193929
|
var ATTR_URL_SCHEME = "url.scheme";
|
|
193806
193930
|
var ATTR_URL_QUERY = "url.query";
|
|
193807
193931
|
var TypeId35 = /* @__PURE__ */ Symbol.for("@effect/platform/HttpClient");
|
|
193808
|
-
var
|
|
193932
|
+
var tag5 = /* @__PURE__ */ GenericTag("@effect/platform/HttpClient");
|
|
193809
193933
|
var currentTracerDisabledWhen = /* @__PURE__ */ globalValue(/* @__PURE__ */ Symbol.for("@effect/platform/HttpClient/tracerDisabledWhen"), () => unsafeMake8(constFalse));
|
|
193810
193934
|
var currentTracerPropagation = /* @__PURE__ */ globalValue(/* @__PURE__ */ Symbol.for("@effect/platform/HttpClient/currentTracerPropagation"), () => unsafeMake8(true));
|
|
193811
193935
|
var SpanNameGenerator = /* @__PURE__ */ Reference2()("@effect/platform/HttpClient/SpanNameGenerator", {
|
|
@@ -194019,7 +194143,7 @@ var transformResponse = /* @__PURE__ */ dual(2, (self, f) => {
|
|
|
194019
194143
|
const client = self;
|
|
194020
194144
|
return makeWith((request) => f(client.postprocess(request)), client.preprocess);
|
|
194021
194145
|
});
|
|
194022
|
-
var layerMergedContext = (effect3) => effect(
|
|
194146
|
+
var layerMergedContext = (effect3) => effect(tag5, flatMap9(context3(), (context7) => map17(effect3, (client) => transformResponse(client, mapInputContext2((input) => merge3(context7, input))))));
|
|
194023
194147
|
|
|
194024
194148
|
// ../../node_modules/.pnpm/@effect+platform@0.94.0_effect@3.19.13/node_modules/@effect/platform/dist/esm/internal/fetchHttpClient.js
|
|
194025
194149
|
var fetchTagKey = "@effect/platform/FetchHttpClient/Fetch";
|
|
@@ -194061,7 +194185,7 @@ var layer12 = /* @__PURE__ */ layerMergedContext(/* @__PURE__ */ succeed7(fetch2
|
|
|
194061
194185
|
var layer13 = layer12;
|
|
194062
194186
|
|
|
194063
194187
|
// ../../node_modules/.pnpm/@effect+platform@0.94.0_effect@3.19.13/node_modules/@effect/platform/dist/esm/HttpClient.js
|
|
194064
|
-
var HttpClient =
|
|
194188
|
+
var HttpClient = tag5;
|
|
194065
194189
|
|
|
194066
194190
|
// ../../node_modules/.pnpm/@effect+platform@0.94.0_effect@3.19.13/node_modules/@effect/platform/dist/esm/HttpClientRequest.js
|
|
194067
194191
|
var post3 = post;
|
|
@@ -194558,8 +194682,8 @@ var make73 = gen2(function* () {
|
|
|
194558
194682
|
}),
|
|
194559
194683
|
"Fetching task by identifier"
|
|
194560
194684
|
);
|
|
194561
|
-
const getTypeColor = (
|
|
194562
|
-
switch (
|
|
194685
|
+
const getTypeColor = (type3) => {
|
|
194686
|
+
switch (type3) {
|
|
194563
194687
|
case "bug":
|
|
194564
194688
|
return "#EF4444";
|
|
194565
194689
|
// Red
|
|
@@ -194576,7 +194700,7 @@ var make73 = gen2(function* () {
|
|
|
194576
194700
|
return "#6B7280";
|
|
194577
194701
|
}
|
|
194578
194702
|
};
|
|
194579
|
-
const setTypeLabelInternal = (client, id2,
|
|
194703
|
+
const setTypeLabelInternal = (client, id2, type3) => gen2(function* () {
|
|
194580
194704
|
const issue = yield* tryPromise2({
|
|
194581
194705
|
try: () => client.issue(id2),
|
|
194582
194706
|
catch: (e2) => new LinearApiError({ message: `Failed to fetch issue: ${e2}`, cause: e2 })
|
|
@@ -194592,7 +194716,7 @@ var make73 = gen2(function* () {
|
|
|
194592
194716
|
try: () => issue.team,
|
|
194593
194717
|
catch: (e2) => new LinearApiError({ message: `Failed to fetch team: ${e2}`, cause: e2 })
|
|
194594
194718
|
});
|
|
194595
|
-
const targetLabelName = `${TYPE_LABEL_PREFIX}${
|
|
194719
|
+
const targetLabelName = `${TYPE_LABEL_PREFIX}${type3}`;
|
|
194596
194720
|
const allLabels = yield* tryPromise2({
|
|
194597
194721
|
try: () => client.issueLabels({
|
|
194598
194722
|
filter: {
|
|
@@ -194609,8 +194733,8 @@ var make73 = gen2(function* () {
|
|
|
194609
194733
|
try: () => client.createIssueLabel({
|
|
194610
194734
|
name: targetLabelName,
|
|
194611
194735
|
teamId: team.id,
|
|
194612
|
-
color: getTypeColor(
|
|
194613
|
-
description: `Task type: ${
|
|
194736
|
+
color: getTypeColor(type3),
|
|
194737
|
+
description: `Task type: ${type3}`
|
|
194614
194738
|
}),
|
|
194615
194739
|
catch: (e2) => new LinearApiError({ message: `Failed to create type label: ${e2}`, cause: e2 })
|
|
194616
194740
|
});
|
|
@@ -194947,10 +195071,10 @@ var make73 = gen2(function* () {
|
|
|
194947
195071
|
"Getting branch name"
|
|
194948
195072
|
);
|
|
194949
195073
|
const SESSION_LABEL_PREFIX = "session:";
|
|
194950
|
-
const setTypeLabel = (id2,
|
|
195074
|
+
const setTypeLabel = (id2, type3) => withRetryAndTimeout3(
|
|
194951
195075
|
gen2(function* () {
|
|
194952
195076
|
const client = yield* linearClient.client();
|
|
194953
|
-
yield* setTypeLabelInternal(client, id2,
|
|
195077
|
+
yield* setTypeLabelInternal(client, id2, type3);
|
|
194954
195078
|
}),
|
|
194955
195079
|
"Setting type label"
|
|
194956
195080
|
);
|
|
@@ -196117,8 +196241,12 @@ var make76 = gen2(function* () {
|
|
|
196117
196241
|
if (!result.success) {
|
|
196118
196242
|
return null;
|
|
196119
196243
|
}
|
|
196244
|
+
const trimmedOutput = result.output.trim();
|
|
196245
|
+
if (!trimmedOutput) {
|
|
196246
|
+
return null;
|
|
196247
|
+
}
|
|
196120
196248
|
const parsed = yield* try_2({
|
|
196121
|
-
try: () => JSON.parse(
|
|
196249
|
+
try: () => JSON.parse(trimmedOutput),
|
|
196122
196250
|
catch: (e2) => new PrError({ message: `Failed to parse repo info: ${e2}`, cause: e2 })
|
|
196123
196251
|
});
|
|
196124
196252
|
return parsed.nameWithOwner;
|
|
@@ -196988,7 +197116,7 @@ var make78 = gen2(function* () {
|
|
|
196988
197116
|
var OpenCodeServiceLive = effect(OpenCodeService, make78);
|
|
196989
197117
|
var SubscriptionEntry = class extends Class3 {
|
|
196990
197118
|
};
|
|
196991
|
-
var isTaggedError = (e2,
|
|
197119
|
+
var isTaggedError = (e2, tag6) => typeof e2 === "object" && e2 !== null && "_tag" in e2 && e2._tag === tag6;
|
|
196992
197120
|
var sendCommand = (command2) => async2((resume2, signal) => {
|
|
196993
197121
|
if (!NFS.existsSync(DAEMON_SOCKET_PATH)) {
|
|
196994
197122
|
resume2(fail7(DaemonNotRunningError.default));
|