token-goat 2.6.31 → 2.6.32
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/README.md +1 -1
- package/SECURITY.md +67 -3
- package/dist/{token-goat-chunk-VYC34TBW.mjs → token-goat-chunk-3KW5C2KQ.mjs} +1 -1
- package/dist/{token-goat-chunk-4WGVGN6W.mjs → token-goat-chunk-3UOG7PSZ.mjs} +12 -3
- package/dist/{token-goat-chunk-Q4N6SQWR.mjs → token-goat-chunk-4M7PSAO3.mjs} +8 -8
- package/dist/{token-goat-chunk-X7PIWZMB.mjs → token-goat-chunk-5EXIMDHA.mjs} +3 -227
- package/dist/{token-goat-chunk-PWD5XZ6C.mjs → token-goat-chunk-DFBD2FFU.mjs} +276 -90
- package/dist/{token-goat-chunk-56C3XUQY.mjs → token-goat-chunk-DNEPSN3P.mjs} +4 -4
- package/dist/{token-goat-chunk-N2S7UAVU.mjs → token-goat-chunk-GWZJ5SI2.mjs} +12 -2
- package/dist/{token-goat-chunk-P7I6LS5H.mjs → token-goat-chunk-N53GXI2Z.mjs} +39 -22
- package/dist/{token-goat-chunk-OIBTYBVR.mjs → token-goat-chunk-O7TGKV5I.mjs} +4 -4
- package/dist/{token-goat-chunk-XEJBPPD7.mjs → token-goat-chunk-RD6O3PJU.mjs} +150 -89
- package/dist/{token-goat-chunk-J6JTYE2B.mjs → token-goat-chunk-TBCLQTPG.mjs} +7 -7
- package/dist/{token-goat-chunk-QL2743EW.mjs → token-goat-chunk-W3MX4LQV.mjs} +6 -6
- package/dist/{token-goat-chunk-HPY7XE77.mjs → token-goat-chunk-X5OPORR4.mjs} +28 -8
- package/dist/{token-goat-chunk-DCGBS2YZ.mjs → token-goat-chunk-YWYITDOS.mjs} +4 -4
- package/dist/{token-goat-hook-chunk-YHRJMMEF.mjs → token-goat-hook-chunk-6NF4WM2U.mjs} +151 -90
- package/dist/token-goat-hook-chunk-ANFXTEQO.mjs +23 -0
- package/dist/{token-goat-hook-chunk-NIVRFAJ4.mjs → token-goat-hook-chunk-DHW6SRHR.mjs} +3 -227
- package/dist/{token-goat-hook-chunk-2K7FV2ME.mjs → token-goat-hook-chunk-DJZGX27J.mjs} +275 -89
- package/dist/{token-goat-hook-chunk-KNVHTGEX.mjs → token-goat-hook-chunk-J2ZK2FYW.mjs} +1 -1
- package/dist/{token-goat-hook-chunk-7WC2H3EW.mjs → token-goat-hook-chunk-K33JMLL7.mjs} +12 -3
- package/dist/{token-goat-hook-chunk-JT5RMRIY.mjs → token-goat-hook-chunk-LFYT4DLB.mjs} +4 -4
- package/dist/{token-goat-hook-chunk-5AQYD2SZ.mjs → token-goat-hook-chunk-PCP4W65Z.mjs} +4 -4
- package/dist/{token-goat-hook-chunk-66W63A4Y.mjs → token-goat-hook-chunk-Q5URQRIF.mjs} +39 -22
- package/dist/{token-goat-hook-chunk-K6HLYRRI.mjs → token-goat-hook-chunk-TBJ5PUPQ.mjs} +6 -6
- package/dist/{token-goat-hook-chunk-FKZ5RBT4.mjs → token-goat-hook-chunk-TKXOXN4J.mjs} +8 -8
- package/dist/{token-goat-hook-chunk-3OJELLK5.mjs → token-goat-hook-chunk-UXD3B4OY.mjs} +4 -4
- package/dist/{token-goat-hook-chunk-JVJUBWKT.mjs → token-goat-hook-chunk-VHZECEQD.mjs} +12 -2
- package/dist/{token-goat-hook-chunk-SJM4BUZQ.mjs → token-goat-hook-chunk-WBTHUYJP.mjs} +28 -8
- package/dist/token-goat-hook.mjs +7 -7
- package/dist/token-goat.core.mjs +7 -7
- package/package.json +12 -4
- package/dist/token-goat-hook-chunk-ULGSXGZK.mjs +0 -23
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
isRewriteWorthwhile,
|
|
9
9
|
resolveMinNetSavingsBytes,
|
|
10
10
|
shlexSplit
|
|
11
|
-
} from "./token-goat-chunk-
|
|
11
|
+
} from "./token-goat-chunk-GWZJ5SI2.mjs";
|
|
12
12
|
import {
|
|
13
13
|
BASH_OUTPUT_SUBDIR,
|
|
14
14
|
HOOK_EVENTS,
|
|
@@ -27,7 +27,7 @@ import {
|
|
|
27
27
|
storeBashOutput,
|
|
28
28
|
storeWebOutput,
|
|
29
29
|
summarizeOutputDelta
|
|
30
|
-
} from "./token-goat-chunk-
|
|
30
|
+
} from "./token-goat-chunk-O7TGKV5I.mjs";
|
|
31
31
|
import {
|
|
32
32
|
BODY_FIRST_TOOL_RESPONSE_KEYS,
|
|
33
33
|
OUTPUT_FIRST_TOOL_RESPONSE_KEYS,
|
|
@@ -118,7 +118,7 @@ import {
|
|
|
118
118
|
wasCliReadThisSession,
|
|
119
119
|
wasFileReadThisSession,
|
|
120
120
|
wasHintShown
|
|
121
|
-
} from "./token-goat-chunk-
|
|
121
|
+
} from "./token-goat-chunk-X5OPORR4.mjs";
|
|
122
122
|
import {
|
|
123
123
|
VERSION,
|
|
124
124
|
detectHarness,
|
|
@@ -135,11 +135,11 @@ import {
|
|
|
135
135
|
runGit,
|
|
136
136
|
shortFingerprint,
|
|
137
137
|
toKB
|
|
138
|
-
} from "./token-goat-chunk-
|
|
139
|
-
import "./token-goat-chunk-
|
|
138
|
+
} from "./token-goat-chunk-5EXIMDHA.mjs";
|
|
139
|
+
import "./token-goat-chunk-3KW5C2KQ.mjs";
|
|
140
140
|
import {
|
|
141
141
|
init_define_import_meta_env
|
|
142
|
-
} from "./token-goat-chunk-
|
|
142
|
+
} from "./token-goat-chunk-3UOG7PSZ.mjs";
|
|
143
143
|
|
|
144
144
|
// src/relay.ts
|
|
145
145
|
init_define_import_meta_env();
|
|
@@ -587,7 +587,7 @@ init_define_import_meta_env();
|
|
|
587
587
|
var TRACKED_SKILL = "token-goat";
|
|
588
588
|
var MAX_COMMANDS_SHOWN = 8;
|
|
589
589
|
async function currentCommandNames() {
|
|
590
|
-
const { buildProgram } = await import("./token-goat-chunk-
|
|
590
|
+
const { buildProgram } = await import("./token-goat-chunk-TBCLQTPG.mjs");
|
|
591
591
|
return flattenCommandNames(buildCommandManifest(buildProgram()));
|
|
592
592
|
}
|
|
593
593
|
async function recordSkillVersionSnapshot(sessionId, skillName) {
|
|
@@ -2472,7 +2472,7 @@ var decodeMap = /* @__PURE__ */ new Map([
|
|
|
2472
2472
|
]);
|
|
2473
2473
|
var fromCodePoint = (
|
|
2474
2474
|
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition, n/no-unsupported-features/es-builtins
|
|
2475
|
-
(_a = String.fromCodePoint) !== null && _a !== void 0 ? _a : (codePoint) => {
|
|
2475
|
+
(_a = String.fromCodePoint) !== null && _a !== void 0 ? _a : ((codePoint) => {
|
|
2476
2476
|
let output = "";
|
|
2477
2477
|
if (codePoint > 65535) {
|
|
2478
2478
|
codePoint -= 65536;
|
|
@@ -2481,7 +2481,7 @@ var fromCodePoint = (
|
|
|
2481
2481
|
}
|
|
2482
2482
|
output += String.fromCharCode(codePoint);
|
|
2483
2483
|
return output;
|
|
2484
|
-
}
|
|
2484
|
+
})
|
|
2485
2485
|
);
|
|
2486
2486
|
function replaceCodePoint(codePoint) {
|
|
2487
2487
|
var _a3;
|
|
@@ -4885,17 +4885,51 @@ function parseDocument(data, options) {
|
|
|
4885
4885
|
// node_modules/deepmerge-ts/dist/index.mjs
|
|
4886
4886
|
init_define_import_meta_env();
|
|
4887
4887
|
var actions = {
|
|
4888
|
-
defaultMerge: Symbol("deepmerge-ts: default merge"),
|
|
4889
|
-
skip: Symbol("deepmerge-ts: skip")
|
|
4888
|
+
defaultMerge: /* @__PURE__ */ Symbol("deepmerge-ts: default merge"),
|
|
4889
|
+
skip: /* @__PURE__ */ Symbol("deepmerge-ts: skip")
|
|
4890
4890
|
};
|
|
4891
4891
|
var actionsInto = {
|
|
4892
4892
|
defaultMerge: actions.defaultMerge
|
|
4893
4893
|
};
|
|
4894
|
-
function defaultMetaDataUpdater(previousMeta,
|
|
4895
|
-
|
|
4894
|
+
function defaultMetaDataUpdater(previousMeta, mergeInfo) {
|
|
4895
|
+
const ancestor = {
|
|
4896
|
+
key: mergeInfo.key,
|
|
4897
|
+
parents: mergeInfo.parents,
|
|
4898
|
+
values: mergeInfo.values,
|
|
4899
|
+
result: mergeInfo.result
|
|
4900
|
+
};
|
|
4901
|
+
const prevHierarchy = previousMeta?.hierarchy;
|
|
4902
|
+
return {
|
|
4903
|
+
...ancestor,
|
|
4904
|
+
hierarchy: prevHierarchy === void 0 ? [ancestor] : [...prevHierarchy, ancestor]
|
|
4905
|
+
};
|
|
4896
4906
|
}
|
|
4897
4907
|
function defaultFilterValues(values, meta) {
|
|
4898
|
-
return values.filter((value) => value !== void 0);
|
|
4908
|
+
return values.includes(void 0) ? values.filter((value) => value !== void 0) : values;
|
|
4909
|
+
}
|
|
4910
|
+
function shouldFallbackToDefault(utils, fallback, result) {
|
|
4911
|
+
return result === actions.defaultMerge || utils.useImplicitDefaultMerging && result === void 0 && utils.mergeFunctions[fallback] !== utils.defaultMergeFunctions[fallback];
|
|
4912
|
+
}
|
|
4913
|
+
function resolveCustomMergeFunctions(options, defaultMergeFunctions) {
|
|
4914
|
+
return {
|
|
4915
|
+
...defaultMergeFunctions,
|
|
4916
|
+
...Object.fromEntries(Object.entries(options).filter(([key]) => Object.hasOwn(defaultMergeFunctions, key)).map(([key, option2]) => option2 === false ? [key, defaultMergeFunctions.mergeOthers] : typeof option2 === "function" ? [key, option2] : [key, defaultMergeFunctions[key]]))
|
|
4917
|
+
};
|
|
4918
|
+
}
|
|
4919
|
+
function mergeArrays$1(values, utils, meta) {
|
|
4920
|
+
return values.flat();
|
|
4921
|
+
}
|
|
4922
|
+
function mergeSets$1(values, utils, meta) {
|
|
4923
|
+
const result = /* @__PURE__ */ new Set();
|
|
4924
|
+
for (const set of values) {
|
|
4925
|
+
for (const element of set) {
|
|
4926
|
+
result.add(element);
|
|
4927
|
+
}
|
|
4928
|
+
}
|
|
4929
|
+
return result;
|
|
4930
|
+
}
|
|
4931
|
+
function mergeOthers$1(values, utils, meta) {
|
|
4932
|
+
return values.at(-1);
|
|
4899
4933
|
}
|
|
4900
4934
|
var ObjectType;
|
|
4901
4935
|
(function(ObjectType2) {
|
|
@@ -4924,78 +4958,127 @@ function getObjectType(object) {
|
|
|
4924
4958
|
}
|
|
4925
4959
|
return ObjectType.OTHER;
|
|
4926
4960
|
}
|
|
4927
|
-
function
|
|
4961
|
+
function getKeysOfObjects(objects) {
|
|
4928
4962
|
const keys = /* @__PURE__ */ new Set();
|
|
4929
|
-
for (const
|
|
4930
|
-
|
|
4931
|
-
|
|
4963
|
+
for (const currentObject of objects) {
|
|
4964
|
+
const stringKeys = Object.keys(currentObject);
|
|
4965
|
+
for (const stringKey of stringKeys) {
|
|
4966
|
+
keys.add(stringKey);
|
|
4967
|
+
}
|
|
4968
|
+
const symbols = Object.getOwnPropertySymbols(currentObject);
|
|
4969
|
+
if (symbols.length > 0) {
|
|
4970
|
+
for (const symbol of symbols) {
|
|
4971
|
+
if (Object.prototype.propertyIsEnumerable.call(currentObject, symbol)) {
|
|
4972
|
+
keys.add(symbol);
|
|
4973
|
+
}
|
|
4974
|
+
}
|
|
4932
4975
|
}
|
|
4933
4976
|
}
|
|
4934
4977
|
return keys;
|
|
4935
4978
|
}
|
|
4979
|
+
function getKeysOfObject(object) {
|
|
4980
|
+
const symbols = Object.getOwnPropertySymbols(object).filter((symbol) => Object.prototype.propertyIsEnumerable.call(object, symbol));
|
|
4981
|
+
return [...Object.keys(object), ...symbols];
|
|
4982
|
+
}
|
|
4936
4983
|
function objectHasProperty(object, property) {
|
|
4937
4984
|
return typeof object === "object" && Object.prototype.propertyIsEnumerable.call(object, property);
|
|
4938
4985
|
}
|
|
4939
|
-
function getIterableOfIterables(iterables) {
|
|
4940
|
-
let mut_iterablesIndex = 0;
|
|
4941
|
-
let mut_iterator = iterables[0]?.[Symbol.iterator]();
|
|
4942
|
-
return {
|
|
4943
|
-
[Symbol.iterator]() {
|
|
4944
|
-
return {
|
|
4945
|
-
next() {
|
|
4946
|
-
do {
|
|
4947
|
-
if (mut_iterator === void 0) {
|
|
4948
|
-
return { done: true, value: void 0 };
|
|
4949
|
-
}
|
|
4950
|
-
const result = mut_iterator.next();
|
|
4951
|
-
if (result.done === true) {
|
|
4952
|
-
mut_iterablesIndex += 1;
|
|
4953
|
-
mut_iterator = iterables[mut_iterablesIndex]?.[Symbol.iterator]();
|
|
4954
|
-
continue;
|
|
4955
|
-
}
|
|
4956
|
-
return {
|
|
4957
|
-
done: false,
|
|
4958
|
-
value: result.value
|
|
4959
|
-
};
|
|
4960
|
-
} while (true);
|
|
4961
|
-
}
|
|
4962
|
-
};
|
|
4963
|
-
}
|
|
4964
|
-
};
|
|
4965
|
-
}
|
|
4966
|
-
var validRecordToStringValues = ["[object Object]", "[object Module]"];
|
|
4967
4986
|
function isRecord(value) {
|
|
4968
|
-
|
|
4987
|
+
const prototype = Object.getPrototypeOf(value);
|
|
4988
|
+
if (prototype === null || prototype === Object.prototype) {
|
|
4989
|
+
return true;
|
|
4990
|
+
}
|
|
4991
|
+
const objectToString = Object.prototype.toString.call(value);
|
|
4992
|
+
if (objectToString !== "[object Object]" && objectToString !== "[object Module]") {
|
|
4969
4993
|
return false;
|
|
4970
4994
|
}
|
|
4971
4995
|
const { constructor } = value;
|
|
4972
4996
|
if (constructor === void 0) {
|
|
4973
4997
|
return true;
|
|
4974
4998
|
}
|
|
4975
|
-
const
|
|
4976
|
-
if (
|
|
4999
|
+
const constructorPrototype = constructor.prototype;
|
|
5000
|
+
if (constructorPrototype === null || typeof constructorPrototype !== "object") {
|
|
5001
|
+
return false;
|
|
5002
|
+
}
|
|
5003
|
+
const constructorToString = Object.prototype.toString.call(constructorPrototype);
|
|
5004
|
+
if (constructorToString !== "[object Object]" && constructorToString !== "[object Module]") {
|
|
4977
5005
|
return false;
|
|
4978
5006
|
}
|
|
4979
|
-
if (!
|
|
5007
|
+
if (!Object.hasOwn(constructorPrototype, "isPrototypeOf")) {
|
|
4980
5008
|
return false;
|
|
4981
5009
|
}
|
|
4982
5010
|
return true;
|
|
4983
5011
|
}
|
|
5012
|
+
function getCyclicReferenceDepth(object, hierarchy, index) {
|
|
5013
|
+
if (hierarchy === void 0 || hierarchy.length === 0) {
|
|
5014
|
+
return 0;
|
|
5015
|
+
}
|
|
5016
|
+
let mut_depth = 1;
|
|
5017
|
+
for (let mut_index = hierarchy.length - 1; mut_index >= 0; mut_index--) {
|
|
5018
|
+
const { parents } = hierarchy[mut_index];
|
|
5019
|
+
if (parents[index] === object || parents.includes(object)) {
|
|
5020
|
+
return mut_depth;
|
|
5021
|
+
}
|
|
5022
|
+
mut_depth += 1;
|
|
5023
|
+
}
|
|
5024
|
+
return 0;
|
|
5025
|
+
}
|
|
5026
|
+
function getMetaDataHierarchy(meta) {
|
|
5027
|
+
return meta?.hierarchy;
|
|
5028
|
+
}
|
|
4984
5029
|
function mergeRecords$1(values, utils, meta) {
|
|
5030
|
+
if (values.length === 2) {
|
|
5031
|
+
const result = {};
|
|
5032
|
+
const mergeProperty = (key, propValues) => {
|
|
5033
|
+
const updatedMeta = utils.metaDataUpdater(meta, {
|
|
5034
|
+
key,
|
|
5035
|
+
parents: values,
|
|
5036
|
+
values: propValues,
|
|
5037
|
+
result
|
|
5038
|
+
});
|
|
5039
|
+
const propertyResult = mergeUnknowns(propValues, utils, updatedMeta);
|
|
5040
|
+
if (propertyResult === actions.skip) {
|
|
5041
|
+
return;
|
|
5042
|
+
}
|
|
5043
|
+
if (key === "__proto__") {
|
|
5044
|
+
Object.defineProperty(result, key, {
|
|
5045
|
+
value: propertyResult,
|
|
5046
|
+
configurable: true,
|
|
5047
|
+
enumerable: true,
|
|
5048
|
+
writable: true
|
|
5049
|
+
});
|
|
5050
|
+
} else {
|
|
5051
|
+
result[key] = propertyResult;
|
|
5052
|
+
}
|
|
5053
|
+
};
|
|
5054
|
+
const firstValue = values[0];
|
|
5055
|
+
const secondValue = values[1];
|
|
5056
|
+
for (const key of getKeysOfObject(firstValue)) {
|
|
5057
|
+
mergeProperty(key, objectHasProperty(secondValue, key) ? [firstValue[key], secondValue[key]] : [firstValue[key]]);
|
|
5058
|
+
}
|
|
5059
|
+
for (const key of getKeysOfObject(secondValue)) {
|
|
5060
|
+
if (!objectHasProperty(firstValue, key)) {
|
|
5061
|
+
mergeProperty(key, [secondValue[key]]);
|
|
5062
|
+
}
|
|
5063
|
+
}
|
|
5064
|
+
return result;
|
|
5065
|
+
}
|
|
5066
|
+
return mergeRecordsGeneral(values, utils, meta);
|
|
5067
|
+
}
|
|
5068
|
+
function mergeRecordsGeneral(values, utils, meta) {
|
|
4985
5069
|
const result = {};
|
|
4986
|
-
for (const key of
|
|
5070
|
+
for (const key of getKeysOfObjects(values)) {
|
|
4987
5071
|
const propValues = [];
|
|
4988
5072
|
for (const value of values) {
|
|
4989
5073
|
if (objectHasProperty(value, key)) {
|
|
4990
5074
|
propValues.push(value[key]);
|
|
4991
5075
|
}
|
|
4992
5076
|
}
|
|
4993
|
-
if (propValues.length === 0) {
|
|
4994
|
-
continue;
|
|
4995
|
-
}
|
|
4996
5077
|
const updatedMeta = utils.metaDataUpdater(meta, {
|
|
4997
5078
|
key,
|
|
4998
|
-
parents: values
|
|
5079
|
+
parents: values,
|
|
5080
|
+
values: propValues,
|
|
5081
|
+
result
|
|
4999
5082
|
});
|
|
5000
5083
|
const propertyResult = mergeUnknowns(propValues, utils, updatedMeta);
|
|
5001
5084
|
if (propertyResult === actions.skip) {
|
|
@@ -5014,43 +5097,112 @@ function mergeRecords$1(values, utils, meta) {
|
|
|
5014
5097
|
}
|
|
5015
5098
|
return result;
|
|
5016
5099
|
}
|
|
5017
|
-
function
|
|
5018
|
-
|
|
5019
|
-
|
|
5020
|
-
|
|
5021
|
-
|
|
5100
|
+
function mergeMaps$1(values, utils, meta) {
|
|
5101
|
+
const result = /* @__PURE__ */ new Map();
|
|
5102
|
+
const valuesByKey = /* @__PURE__ */ new Map();
|
|
5103
|
+
for (const map2 of values) {
|
|
5104
|
+
for (const [key, value] of map2) {
|
|
5105
|
+
const mut_keyValues = valuesByKey.get(key);
|
|
5106
|
+
if (mut_keyValues === void 0) {
|
|
5107
|
+
valuesByKey.set(key, [value]);
|
|
5108
|
+
} else {
|
|
5109
|
+
mut_keyValues.push(value);
|
|
5110
|
+
}
|
|
5111
|
+
}
|
|
5112
|
+
}
|
|
5113
|
+
for (const [key, keyValues] of valuesByKey) {
|
|
5114
|
+
const updatedMeta = utils.metaDataUpdater(meta, {
|
|
5115
|
+
key,
|
|
5116
|
+
parents: values,
|
|
5117
|
+
values: keyValues,
|
|
5118
|
+
result
|
|
5119
|
+
});
|
|
5120
|
+
const keyResult = mergeUnknowns(keyValues, utils, updatedMeta);
|
|
5121
|
+
if (keyResult === actions.skip) {
|
|
5122
|
+
continue;
|
|
5123
|
+
}
|
|
5124
|
+
result.set(key, keyResult);
|
|
5125
|
+
}
|
|
5126
|
+
return result;
|
|
5022
5127
|
}
|
|
5023
|
-
function
|
|
5024
|
-
|
|
5128
|
+
function resolveCyclicReferences(value, utils, meta) {
|
|
5129
|
+
if (typeof value !== "object" || value === null) {
|
|
5130
|
+
return value;
|
|
5131
|
+
}
|
|
5132
|
+
const hierarchy = getMetaDataHierarchy(meta);
|
|
5133
|
+
const depth = getCyclicReferenceDepth(value, hierarchy, 0);
|
|
5134
|
+
if (depth > 0 && hierarchy !== void 0) {
|
|
5135
|
+
return hierarchy[hierarchy.length - depth]?.result;
|
|
5136
|
+
}
|
|
5137
|
+
const type = getObjectType(value);
|
|
5138
|
+
if (type === ObjectType.RECORD) {
|
|
5139
|
+
const record = value;
|
|
5140
|
+
let mut_changed = false;
|
|
5141
|
+
const result = {};
|
|
5142
|
+
for (const key of getKeysOfObject(record)) {
|
|
5143
|
+
const propVal = record[key];
|
|
5144
|
+
const updatedMeta = utils.metaDataUpdater(meta, {
|
|
5145
|
+
key,
|
|
5146
|
+
parents: [record],
|
|
5147
|
+
values: [propVal],
|
|
5148
|
+
result
|
|
5149
|
+
});
|
|
5150
|
+
const resolvedProp = resolveCyclicReferences(propVal, utils, updatedMeta);
|
|
5151
|
+
if (resolvedProp !== propVal) {
|
|
5152
|
+
mut_changed = true;
|
|
5153
|
+
}
|
|
5154
|
+
if (key === "__proto__") {
|
|
5155
|
+
Object.defineProperty(result, key, {
|
|
5156
|
+
value: resolvedProp,
|
|
5157
|
+
configurable: true,
|
|
5158
|
+
enumerable: true,
|
|
5159
|
+
writable: true
|
|
5160
|
+
});
|
|
5161
|
+
} else {
|
|
5162
|
+
result[key] = resolvedProp;
|
|
5163
|
+
}
|
|
5164
|
+
}
|
|
5165
|
+
return mut_changed ? result : value;
|
|
5166
|
+
}
|
|
5167
|
+
return value;
|
|
5025
5168
|
}
|
|
5026
|
-
function
|
|
5027
|
-
|
|
5169
|
+
function mergeCircularReferences$1(values, cyclicDepths, utils, meta) {
|
|
5170
|
+
const depth = cyclicDepths[0];
|
|
5171
|
+
const hierarchy = getMetaDataHierarchy(meta);
|
|
5172
|
+
for (let mut_index = 1; mut_index < values.length; mut_index++) {
|
|
5173
|
+
if (cyclicDepths[mut_index] !== depth) {
|
|
5174
|
+
const lastCyclicDepth = cyclicDepths.at(-1);
|
|
5175
|
+
return lastCyclicDepth === 0 ? resolveCyclicReferences(values.at(-1), utils, meta) : hierarchy?.[hierarchy.length - lastCyclicDepth]?.result;
|
|
5176
|
+
}
|
|
5177
|
+
}
|
|
5178
|
+
return hierarchy?.[hierarchy.length - depth]?.result;
|
|
5028
5179
|
}
|
|
5029
5180
|
var mergeFunctions = {
|
|
5030
5181
|
mergeRecords: mergeRecords$1,
|
|
5031
5182
|
mergeArrays: mergeArrays$1,
|
|
5032
5183
|
mergeSets: mergeSets$1,
|
|
5033
5184
|
mergeMaps: mergeMaps$1,
|
|
5185
|
+
mergeCircularReferences: mergeCircularReferences$1,
|
|
5034
5186
|
mergeOthers: mergeOthers$1
|
|
5035
5187
|
};
|
|
5036
|
-
function deepmergeCustom(options, rootMetaData) {
|
|
5037
|
-
const utils = getUtils(options, customizedDeepmerge);
|
|
5188
|
+
function deepmergeCustom(options = {}, rootMetaData) {
|
|
5189
|
+
const utils = getUtils$1(options, customizedDeepmerge);
|
|
5038
5190
|
function customizedDeepmerge(...objects) {
|
|
5039
|
-
return mergeUnknowns(objects, utils, rootMetaData);
|
|
5191
|
+
return mergeUnknowns(objects, utils, rootMetaData ?? void 0);
|
|
5040
5192
|
}
|
|
5041
5193
|
return customizedDeepmerge;
|
|
5042
5194
|
}
|
|
5043
|
-
function getUtils(options, customizedDeepmerge) {
|
|
5195
|
+
function getUtils$1(options, customizedDeepmerge) {
|
|
5196
|
+
const defaultMergeFns = mergeFunctions;
|
|
5197
|
+
const defaultMetaDataUpd = defaultMetaDataUpdater;
|
|
5044
5198
|
return {
|
|
5045
|
-
defaultMergeFunctions:
|
|
5046
|
-
mergeFunctions:
|
|
5047
|
-
|
|
5048
|
-
...Object.fromEntries(Object.entries(options).filter(([key, option2]) => Object.hasOwn(mergeFunctions, key)).map(([key, option2]) => option2 === false ? [key, mergeFunctions.mergeOthers] : [key, option2]))
|
|
5049
|
-
},
|
|
5050
|
-
metaDataUpdater: options.metaDataUpdater ?? defaultMetaDataUpdater,
|
|
5199
|
+
defaultMergeFunctions: defaultMergeFns,
|
|
5200
|
+
mergeFunctions: resolveCustomMergeFunctions(options, defaultMergeFns),
|
|
5201
|
+
metaDataUpdater: typeof options.metaDataUpdater === "function" ? options.metaDataUpdater : defaultMetaDataUpd,
|
|
5051
5202
|
deepmerge: customizedDeepmerge,
|
|
5052
5203
|
useImplicitDefaultMerging: options.enableImplicitDefaultMerging ?? false,
|
|
5053
|
-
filterValues: options.filterValues === false ? void 0 : options.filterValues
|
|
5204
|
+
filterValues: options.filterValues === false ? void 0 : typeof options.filterValues === "function" ? options.filterValues : defaultFilterValues,
|
|
5205
|
+
maxDepth: typeof options.maxDepth === "number" && !Number.isNaN(options.maxDepth) && options.maxDepth >= 0 ? options.maxDepth : 1e3,
|
|
5054
5206
|
actions
|
|
5055
5207
|
};
|
|
5056
5208
|
}
|
|
@@ -5059,16 +5211,43 @@ function mergeUnknowns(values, utils, meta) {
|
|
|
5059
5211
|
if (filteredValues.length === 0) {
|
|
5060
5212
|
return void 0;
|
|
5061
5213
|
}
|
|
5214
|
+
const hierarchy = getMetaDataHierarchy(meta);
|
|
5215
|
+
const currentDepth = hierarchy?.length ?? (typeof meta === "number" ? meta : meta?.depth ?? 0);
|
|
5216
|
+
if (utils.maxDepth !== void 0 && currentDepth >= utils.maxDepth) {
|
|
5217
|
+
return mergeOthers(filteredValues, utils, meta);
|
|
5218
|
+
}
|
|
5062
5219
|
if (filteredValues.length === 1) {
|
|
5220
|
+
if (hierarchy !== void 0) {
|
|
5221
|
+
const depth = getCyclicReferenceDepth(filteredValues[0], hierarchy, 0);
|
|
5222
|
+
if (depth > 0) {
|
|
5223
|
+
return hierarchy[hierarchy.length - depth]?.result ?? hierarchy[hierarchy.length - depth]?.parents[0];
|
|
5224
|
+
}
|
|
5225
|
+
}
|
|
5063
5226
|
return mergeOthers(filteredValues, utils, meta);
|
|
5064
5227
|
}
|
|
5065
5228
|
const type = getObjectType(filteredValues[0]);
|
|
5066
5229
|
if (type !== ObjectType.NOT && type !== ObjectType.OTHER) {
|
|
5067
|
-
|
|
5068
|
-
if (getObjectType(filteredValues[
|
|
5069
|
-
|
|
5230
|
+
if (filteredValues.length === 2) {
|
|
5231
|
+
if (getObjectType(filteredValues[1]) !== type) {
|
|
5232
|
+
return mergeOthers(filteredValues, utils, meta);
|
|
5233
|
+
}
|
|
5234
|
+
const d0 = getCyclicReferenceDepth(filteredValues[0], hierarchy, 0);
|
|
5235
|
+
const d1 = getCyclicReferenceDepth(filteredValues[1], hierarchy, 1);
|
|
5236
|
+
if (d0 !== 0 || d1 !== 0) {
|
|
5237
|
+
return mergeCircularReferences(filteredValues, [d0, d1], utils, meta);
|
|
5238
|
+
}
|
|
5239
|
+
} else {
|
|
5240
|
+
const cyclicDepths = new Array(filteredValues.length);
|
|
5241
|
+
cyclicDepths[0] = getCyclicReferenceDepth(filteredValues[0], hierarchy, 0);
|
|
5242
|
+
for (let mut_index = 1; mut_index < filteredValues.length; mut_index++) {
|
|
5243
|
+
if (getObjectType(filteredValues[mut_index]) !== type) {
|
|
5244
|
+
return mergeOthers(filteredValues, utils, meta);
|
|
5245
|
+
}
|
|
5246
|
+
cyclicDepths[mut_index] = getCyclicReferenceDepth(filteredValues[mut_index], hierarchy, mut_index);
|
|
5247
|
+
}
|
|
5248
|
+
if (cyclicDepths.some((depth) => depth !== 0)) {
|
|
5249
|
+
return mergeCircularReferences(filteredValues, cyclicDepths, utils, meta);
|
|
5070
5250
|
}
|
|
5071
|
-
return mergeOthers(filteredValues, utils, meta);
|
|
5072
5251
|
}
|
|
5073
5252
|
}
|
|
5074
5253
|
switch (type) {
|
|
@@ -5091,35 +5270,42 @@ function mergeUnknowns(values, utils, meta) {
|
|
|
5091
5270
|
}
|
|
5092
5271
|
function mergeRecords(values, utils, meta) {
|
|
5093
5272
|
const result = utils.mergeFunctions.mergeRecords(values, utils, meta);
|
|
5094
|
-
if (
|
|
5273
|
+
if (shouldFallbackToDefault(utils, "mergeRecords", result)) {
|
|
5095
5274
|
return utils.defaultMergeFunctions.mergeRecords(values, utils, meta);
|
|
5096
5275
|
}
|
|
5097
5276
|
return result;
|
|
5098
5277
|
}
|
|
5099
5278
|
function mergeArrays(values, utils, meta) {
|
|
5100
5279
|
const result = utils.mergeFunctions.mergeArrays(values, utils, meta);
|
|
5101
|
-
if (
|
|
5280
|
+
if (shouldFallbackToDefault(utils, "mergeArrays", result)) {
|
|
5102
5281
|
return utils.defaultMergeFunctions.mergeArrays(values);
|
|
5103
5282
|
}
|
|
5104
5283
|
return result;
|
|
5105
5284
|
}
|
|
5106
5285
|
function mergeSets(values, utils, meta) {
|
|
5107
5286
|
const result = utils.mergeFunctions.mergeSets(values, utils, meta);
|
|
5108
|
-
if (
|
|
5287
|
+
if (shouldFallbackToDefault(utils, "mergeSets", result)) {
|
|
5109
5288
|
return utils.defaultMergeFunctions.mergeSets(values);
|
|
5110
5289
|
}
|
|
5111
5290
|
return result;
|
|
5112
5291
|
}
|
|
5113
5292
|
function mergeMaps(values, utils, meta) {
|
|
5114
5293
|
const result = utils.mergeFunctions.mergeMaps(values, utils, meta);
|
|
5115
|
-
if (
|
|
5116
|
-
return utils.defaultMergeFunctions.mergeMaps(values);
|
|
5294
|
+
if (shouldFallbackToDefault(utils, "mergeMaps", result)) {
|
|
5295
|
+
return utils.defaultMergeFunctions.mergeMaps(values, utils, meta);
|
|
5296
|
+
}
|
|
5297
|
+
return result;
|
|
5298
|
+
}
|
|
5299
|
+
function mergeCircularReferences(values, cyclicDepths, utils, meta) {
|
|
5300
|
+
const result = utils.mergeFunctions.mergeCircularReferences(values, cyclicDepths, utils, meta);
|
|
5301
|
+
if (shouldFallbackToDefault(utils, "mergeCircularReferences", result)) {
|
|
5302
|
+
return utils.defaultMergeFunctions.mergeCircularReferences(values, cyclicDepths, utils, meta);
|
|
5117
5303
|
}
|
|
5118
5304
|
return result;
|
|
5119
5305
|
}
|
|
5120
5306
|
function mergeOthers(values, utils, meta) {
|
|
5121
5307
|
const result = utils.mergeFunctions.mergeOthers(values, utils, meta);
|
|
5122
|
-
if (
|
|
5308
|
+
if (shouldFallbackToDefault(utils, "mergeOthers", result)) {
|
|
5123
5309
|
return utils.defaultMergeFunctions.mergeOthers(values);
|
|
5124
5310
|
}
|
|
5125
5311
|
return result;
|
|
@@ -5433,7 +5619,7 @@ var WhitespaceProcessor = class {
|
|
|
5433
5619
|
this.newlineOrNonNewlineStringRe = new RegExp(`(\\n|[^\\n]+)`, "g");
|
|
5434
5620
|
if (options.preserveNewlines) {
|
|
5435
5621
|
const wordOrNewlineRe = new RegExp(`\\n|[^\\n${whitespaceCodes}]+`, "gm");
|
|
5436
|
-
this.shrinkWrapAdd = function(text, inlineTextBuilder, transform = (str) => str, noWrap = false) {
|
|
5622
|
+
this.shrinkWrapAdd = function(text, inlineTextBuilder, transform = ((str) => str), noWrap = false) {
|
|
5437
5623
|
if (!text) {
|
|
5438
5624
|
return;
|
|
5439
5625
|
}
|
|
@@ -5461,7 +5647,7 @@ var WhitespaceProcessor = class {
|
|
|
5461
5647
|
};
|
|
5462
5648
|
} else {
|
|
5463
5649
|
const wordRe = new RegExp(`[^${whitespaceCodes}]+`, "g");
|
|
5464
|
-
this.shrinkWrapAdd = function(text, inlineTextBuilder, transform = (str) => str, noWrap = false) {
|
|
5650
|
+
this.shrinkWrapAdd = function(text, inlineTextBuilder, transform = ((str) => str), noWrap = false) {
|
|
5465
5651
|
if (!text) {
|
|
5466
5652
|
return;
|
|
5467
5653
|
}
|
|
@@ -5626,7 +5812,7 @@ var BlockTextBuilder = class {
|
|
|
5626
5812
|
}
|
|
5627
5813
|
/** @returns { (str: string) => string } */
|
|
5628
5814
|
_getCombinedWordTransformer() {
|
|
5629
|
-
const wt = this._wordTransformer ? (str) => applyTransformer(str, this._wordTransformer) : void 0;
|
|
5815
|
+
const wt = this._wordTransformer ? ((str) => applyTransformer(str, this._wordTransformer)) : void 0;
|
|
5630
5816
|
const ce = this.options.encodeCharacters;
|
|
5631
5817
|
return wt ? ce ? (str) => ce(wt(str)) : wt : ce;
|
|
5632
5818
|
}
|
|
@@ -6207,7 +6393,7 @@ function composeOptions({
|
|
|
6207
6393
|
}) {
|
|
6208
6394
|
const options = deepMergeWithOptionsComposeRules(defaultOptions, userOptions);
|
|
6209
6395
|
options.formatters = Object.assign({}, genericFormatters2, packageFormatters, options.formatters);
|
|
6210
|
-
options.selectors = mergeDuplicatesPreferLast(options.selectors, (s) => s.selector);
|
|
6396
|
+
options.selectors = mergeDuplicatesPreferLast(options.selectors, ((s) => s.selector));
|
|
6211
6397
|
if (handleMergedOptions) {
|
|
6212
6398
|
handleMergedOptions(options);
|
|
6213
6399
|
}
|
|
@@ -6686,7 +6872,7 @@ function handleDeprecatedOptions(options) {
|
|
|
6686
6872
|
([selector, definition]) => ({ ...definition, selector: selector || "*" })
|
|
6687
6873
|
);
|
|
6688
6874
|
options.selectors.push(...tagDefinitions);
|
|
6689
|
-
options.selectors = mergeDuplicatesPreferLast(options.selectors, (s) => s.selector);
|
|
6875
|
+
options.selectors = mergeDuplicatesPreferLast(options.selectors, ((s) => s.selector));
|
|
6690
6876
|
}
|
|
6691
6877
|
function set(obj, path2, value) {
|
|
6692
6878
|
const valueKey = path2.pop();
|
|
@@ -10,15 +10,15 @@ import {
|
|
|
10
10
|
selectFilter,
|
|
11
11
|
shlexSplit,
|
|
12
12
|
wrappedShell
|
|
13
|
-
} from "./token-goat-chunk-
|
|
13
|
+
} from "./token-goat-chunk-GWZJ5SI2.mjs";
|
|
14
14
|
import {
|
|
15
15
|
loadConfig,
|
|
16
16
|
recordStat
|
|
17
|
-
} from "./token-goat-chunk-
|
|
18
|
-
import "./token-goat-chunk-
|
|
17
|
+
} from "./token-goat-chunk-5EXIMDHA.mjs";
|
|
18
|
+
import "./token-goat-chunk-3KW5C2KQ.mjs";
|
|
19
19
|
import {
|
|
20
20
|
init_define_import_meta_env
|
|
21
|
-
} from "./token-goat-chunk-
|
|
21
|
+
} from "./token-goat-chunk-3UOG7PSZ.mjs";
|
|
22
22
|
|
|
23
23
|
// src/bash_runner.ts
|
|
24
24
|
init_define_import_meta_env();
|
|
@@ -4,10 +4,10 @@ import {
|
|
|
4
4
|
loadConfig,
|
|
5
5
|
redactSecrets,
|
|
6
6
|
stripAnsiCodes
|
|
7
|
-
} from "./token-goat-chunk-
|
|
7
|
+
} from "./token-goat-chunk-5EXIMDHA.mjs";
|
|
8
8
|
import {
|
|
9
9
|
init_define_import_meta_env
|
|
10
|
-
} from "./token-goat-chunk-
|
|
10
|
+
} from "./token-goat-chunk-3UOG7PSZ.mjs";
|
|
11
11
|
|
|
12
12
|
// src/tool_filters/helpers.ts
|
|
13
13
|
init_define_import_meta_env();
|
|
@@ -622,6 +622,12 @@ var CompressedOutput = class {
|
|
|
622
622
|
this.exitCode = exitCode;
|
|
623
623
|
this.notes = notes;
|
|
624
624
|
}
|
|
625
|
+
text;
|
|
626
|
+
originalBytes;
|
|
627
|
+
compressedBytes;
|
|
628
|
+
filterName;
|
|
629
|
+
exitCode;
|
|
630
|
+
notes;
|
|
625
631
|
/** Non-negative byte savings (`original - compressed`, clamped at 0). */
|
|
626
632
|
get bytesSaved() {
|
|
627
633
|
return Math.max(0, this.originalBytes - this.compressedBytes);
|
|
@@ -9272,6 +9278,10 @@ var DockerFilter = class extends ToolFilter {
|
|
|
9272
9278
|
oldNew.unshift(`[building ${oldStepCount} layers, ${oldCacheCount} cached]`);
|
|
9273
9279
|
}
|
|
9274
9280
|
kept = oldNew;
|
|
9281
|
+
void oldDroppedCache;
|
|
9282
|
+
void oldDroppedSha;
|
|
9283
|
+
void oldDroppedImd;
|
|
9284
|
+
void oldDroppedStep;
|
|
9275
9285
|
}
|
|
9276
9286
|
const parts = [];
|
|
9277
9287
|
if (droppedDigest) parts.push(`${droppedDigest} digest`);
|