@fern-api/generator-cli 0.6.11 → 0.8.0
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/api.d.ts +19 -16
- package/dist/api.js +178 -178
- package/dist/cli.js +908 -638
- package/package.json +3 -3
package/dist/cli.js
CHANGED
|
@@ -91,7 +91,7 @@ var init_esm = __esm({
|
|
|
91
91
|
}
|
|
92
92
|
});
|
|
93
93
|
|
|
94
|
-
// ../../node_modules/.pnpm/brace-expansion@5.0.
|
|
94
|
+
// ../../node_modules/.pnpm/brace-expansion@5.0.5/node_modules/brace-expansion/dist/esm/index.js
|
|
95
95
|
function numeric(str) {
|
|
96
96
|
return !isNaN(str) ? parseInt(str, 10) : str.charCodeAt(0);
|
|
97
97
|
}
|
|
@@ -185,7 +185,7 @@ function expand_(str, max, isTop) {
|
|
|
185
185
|
const x = numeric(n[0]);
|
|
186
186
|
const y = numeric(n[1]);
|
|
187
187
|
const width = Math.max(n[0].length, n[1].length);
|
|
188
|
-
let incr = n.length === 3 && n[2] !== void 0 ? Math.abs(numeric(n[2])) : 1;
|
|
188
|
+
let incr = n.length === 3 && n[2] !== void 0 ? Math.max(Math.abs(numeric(n[2])), 1) : 1;
|
|
189
189
|
let test = lte;
|
|
190
190
|
const reverse = y < x;
|
|
191
191
|
if (reverse) {
|
|
@@ -236,7 +236,7 @@ function expand_(str, max, isTop) {
|
|
|
236
236
|
}
|
|
237
237
|
var escSlash, escOpen, escClose, escComma, escPeriod, escSlashPattern, escOpenPattern, escClosePattern, escCommaPattern, escPeriodPattern, slashPattern, openPattern, closePattern, commaPattern, periodPattern, EXPANSION_MAX;
|
|
238
238
|
var init_esm2 = __esm({
|
|
239
|
-
"../../node_modules/.pnpm/brace-expansion@5.0.
|
|
239
|
+
"../../node_modules/.pnpm/brace-expansion@5.0.5/node_modules/brace-expansion/dist/esm/index.js"() {
|
|
240
240
|
"use strict";
|
|
241
241
|
init_esm();
|
|
242
242
|
escSlash = "\0SLASH" + Math.random() + "\0";
|
|
@@ -253,7 +253,7 @@ var init_esm2 = __esm({
|
|
|
253
253
|
openPattern = /\\{/g;
|
|
254
254
|
closePattern = /\\}/g;
|
|
255
255
|
commaPattern = /\\,/g;
|
|
256
|
-
periodPattern =
|
|
256
|
+
periodPattern = /\\\./g;
|
|
257
257
|
EXPANSION_MAX = 1e5;
|
|
258
258
|
}
|
|
259
259
|
});
|
|
@@ -7678,7 +7678,7 @@ var require_dist2 = __commonJS({
|
|
|
7678
7678
|
}
|
|
7679
7679
|
});
|
|
7680
7680
|
|
|
7681
|
-
// ../../node_modules/.pnpm/simple-git@3.
|
|
7681
|
+
// ../../node_modules/.pnpm/simple-git@3.33.0/node_modules/simple-git/dist/esm/index.js
|
|
7682
7682
|
function pathspec(...paths) {
|
|
7683
7683
|
const key = new String(paths);
|
|
7684
7684
|
cache.set(key, paths);
|
|
@@ -8778,15 +8778,15 @@ function parser3(indexX, indexY, handler2) {
|
|
|
8778
8778
|
return [`${indexX}${indexY}`, handler2];
|
|
8779
8779
|
}
|
|
8780
8780
|
function conflicts(indexX, ...indexY) {
|
|
8781
|
-
return indexY.map((y) => parser3(indexX, y, (result, file) =>
|
|
8781
|
+
return indexY.map((y) => parser3(indexX, y, (result, file) => result.conflicted.push(file)));
|
|
8782
8782
|
}
|
|
8783
8783
|
function splitLine(result, lineStr) {
|
|
8784
8784
|
const trimmed2 = lineStr.trim();
|
|
8785
8785
|
switch (" ") {
|
|
8786
8786
|
case trimmed2.charAt(2):
|
|
8787
|
-
return data(trimmed2.charAt(0), trimmed2.charAt(1), trimmed2.
|
|
8787
|
+
return data(trimmed2.charAt(0), trimmed2.charAt(1), trimmed2.slice(3));
|
|
8788
8788
|
case trimmed2.charAt(1):
|
|
8789
|
-
return data(" ", trimmed2.charAt(0), trimmed2.
|
|
8789
|
+
return data(" ", trimmed2.charAt(0), trimmed2.slice(2));
|
|
8790
8790
|
default:
|
|
8791
8791
|
return;
|
|
8792
8792
|
}
|
|
@@ -8863,6 +8863,28 @@ function versionParser(stdOut) {
|
|
|
8863
8863
|
}
|
|
8864
8864
|
return parseStringResponse(versionResponse(0, 0, 0, stdOut), parsers7, stdOut);
|
|
8865
8865
|
}
|
|
8866
|
+
function createCloneTask(api, task, repoPath, ...args) {
|
|
8867
|
+
if (!filterString(repoPath)) {
|
|
8868
|
+
return configurationErrorTask(`git.${api}() requires a string 'repoPath'`);
|
|
8869
|
+
}
|
|
8870
|
+
return task(repoPath, filterType(args[0], filterString), getTrailingOptions(arguments));
|
|
8871
|
+
}
|
|
8872
|
+
function clone_default() {
|
|
8873
|
+
return {
|
|
8874
|
+
clone(repo, ...rest) {
|
|
8875
|
+
return this._runTask(
|
|
8876
|
+
createCloneTask("clone", cloneTask, filterType(repo, filterString), ...rest),
|
|
8877
|
+
trailingFunctionArgument(arguments)
|
|
8878
|
+
);
|
|
8879
|
+
},
|
|
8880
|
+
mirror(repo, ...rest) {
|
|
8881
|
+
return this._runTask(
|
|
8882
|
+
createCloneTask("mirror", cloneMirrorTask, filterType(repo, filterString), ...rest),
|
|
8883
|
+
trailingFunctionArgument(arguments)
|
|
8884
|
+
);
|
|
8885
|
+
}
|
|
8886
|
+
};
|
|
8887
|
+
}
|
|
8866
8888
|
function applyPatchTask(patches, customArgs) {
|
|
8867
8889
|
return straightThroughStringTask(["apply", ...customArgs, ...patches]);
|
|
8868
8890
|
}
|
|
@@ -8972,23 +8994,6 @@ function checkIgnoreTask(paths) {
|
|
|
8972
8994
|
parser: parseCheckIgnore
|
|
8973
8995
|
};
|
|
8974
8996
|
}
|
|
8975
|
-
function disallowedCommand(command) {
|
|
8976
|
-
return /^--upload-pack(=|$)/.test(command);
|
|
8977
|
-
}
|
|
8978
|
-
function cloneTask(repo, directory, customArgs) {
|
|
8979
|
-
const commands = ["clone", ...customArgs];
|
|
8980
|
-
filterString(repo) && commands.push(repo);
|
|
8981
|
-
filterString(directory) && commands.push(directory);
|
|
8982
|
-
const banned = commands.find(disallowedCommand);
|
|
8983
|
-
if (banned) {
|
|
8984
|
-
return configurationErrorTask(`git.fetch: potential exploit argument blocked.`);
|
|
8985
|
-
}
|
|
8986
|
-
return straightThroughStringTask(commands);
|
|
8987
|
-
}
|
|
8988
|
-
function cloneMirrorTask(repo, directory, customArgs) {
|
|
8989
|
-
append(customArgs, "--mirror");
|
|
8990
|
-
return cloneTask(repo, directory, customArgs);
|
|
8991
|
-
}
|
|
8992
8997
|
function parseFetchResult(stdOut, stdErr) {
|
|
8993
8998
|
const result = {
|
|
8994
8999
|
raw: stdOut,
|
|
@@ -9000,7 +9005,7 @@ function parseFetchResult(stdOut, stdErr) {
|
|
|
9000
9005
|
};
|
|
9001
9006
|
return parseStringResponse(result, parsers10, [stdOut, stdErr]);
|
|
9002
9007
|
}
|
|
9003
|
-
function
|
|
9008
|
+
function disallowedCommand(command) {
|
|
9004
9009
|
return /^--upload-pack(=|$)/.test(command);
|
|
9005
9010
|
}
|
|
9006
9011
|
function fetchTask(remote, branch, customArgs) {
|
|
@@ -9008,7 +9013,7 @@ function fetchTask(remote, branch, customArgs) {
|
|
|
9008
9013
|
if (remote && branch) {
|
|
9009
9014
|
commands.push(remote, branch);
|
|
9010
9015
|
}
|
|
9011
|
-
const banned = commands.find(
|
|
9016
|
+
const banned = commands.find(disallowedCommand);
|
|
9012
9017
|
if (banned) {
|
|
9013
9018
|
return configurationErrorTask(`git.fetch: potential exploit argument blocked.`);
|
|
9014
9019
|
}
|
|
@@ -9210,18 +9215,24 @@ function abortPlugin(signal) {
|
|
|
9210
9215
|
function isConfigSwitch(arg) {
|
|
9211
9216
|
return typeof arg === "string" && arg.trim().toLowerCase() === "-c";
|
|
9212
9217
|
}
|
|
9213
|
-
function
|
|
9214
|
-
if (!
|
|
9215
|
-
return;
|
|
9216
|
-
}
|
|
9217
|
-
if (!/^\s*protocol(.[a-z]+)?.allow/.test(next)) {
|
|
9218
|
-
return;
|
|
9218
|
+
function isCloneUploadPackSwitch(char, arg) {
|
|
9219
|
+
if (typeof arg !== "string" || !arg.includes(char)) {
|
|
9220
|
+
return false;
|
|
9219
9221
|
}
|
|
9220
|
-
|
|
9221
|
-
|
|
9222
|
-
|
|
9223
|
-
|
|
9224
|
-
);
|
|
9222
|
+
const cleaned = arg.trim().replace(/\0/g, "");
|
|
9223
|
+
return /^(--no)?-{1,2}[\dlsqvnobucj]+(\s|$)/.test(cleaned);
|
|
9224
|
+
}
|
|
9225
|
+
function preventConfigBuilder(config, setting, message = String(config)) {
|
|
9226
|
+
const regex = typeof config === "string" ? new RegExp(`\\s*${config}`, "i") : config;
|
|
9227
|
+
return function preventCommand(options, arg, next) {
|
|
9228
|
+
if (options[setting] !== true && isConfigSwitch(arg) && regex.test(next)) {
|
|
9229
|
+
throw new GitPluginError(
|
|
9230
|
+
void 0,
|
|
9231
|
+
"unsafe",
|
|
9232
|
+
`Configuring ${message} is not permitted without enabling ${setting}`
|
|
9233
|
+
);
|
|
9234
|
+
}
|
|
9235
|
+
};
|
|
9225
9236
|
}
|
|
9226
9237
|
function preventUploadPack(arg, method) {
|
|
9227
9238
|
if (/^\s*--(upload|receive)-pack/.test(arg)) {
|
|
@@ -9231,7 +9242,7 @@ function preventUploadPack(arg, method) {
|
|
|
9231
9242
|
`Use of --upload-pack or --receive-pack is not permitted without enabling allowUnsafePack`
|
|
9232
9243
|
);
|
|
9233
9244
|
}
|
|
9234
|
-
if (method === "clone" &&
|
|
9245
|
+
if (method === "clone" && isCloneUploadPackSwitch("u", arg)) {
|
|
9235
9246
|
throw new GitPluginError(
|
|
9236
9247
|
void 0,
|
|
9237
9248
|
"unsafe",
|
|
@@ -9247,16 +9258,16 @@ function preventUploadPack(arg, method) {
|
|
|
9247
9258
|
}
|
|
9248
9259
|
}
|
|
9249
9260
|
function blockUnsafeOperationsPlugin({
|
|
9250
|
-
|
|
9251
|
-
|
|
9261
|
+
allowUnsafePack = false,
|
|
9262
|
+
...options
|
|
9252
9263
|
} = {}) {
|
|
9253
9264
|
return {
|
|
9254
9265
|
type: "spawn.args",
|
|
9255
9266
|
action(args, context) {
|
|
9256
9267
|
args.forEach((current, index) => {
|
|
9257
9268
|
const next = index < args.length ? args[index + 1] : "";
|
|
9258
|
-
allowUnsafeProtocolOverride || preventProtocolOverride(current, next);
|
|
9259
9269
|
allowUnsafePack || preventUploadPack(current, context.method);
|
|
9270
|
+
preventUnsafeConfig.forEach((helper) => helper(options, current, next));
|
|
9260
9271
|
});
|
|
9261
9272
|
return args;
|
|
9262
9273
|
}
|
|
@@ -9334,7 +9345,7 @@ function completionDetectionPlugin({
|
|
|
9334
9345
|
};
|
|
9335
9346
|
}
|
|
9336
9347
|
function isBadArgument(arg) {
|
|
9337
|
-
return !arg || !/^([a-z]:)?([a-z0-9/.\\_
|
|
9348
|
+
return !arg || !/^([a-z]:)?([a-z0-9/.\\_~-]+)$/i.test(arg);
|
|
9338
9349
|
}
|
|
9339
9350
|
function toBinaryConfig(input, allowUnsafe) {
|
|
9340
9351
|
if (input.length < 1 || input.length > 2) {
|
|
@@ -9522,20 +9533,20 @@ function gitInstanceFactory(baseDir, options) {
|
|
|
9522
9533
|
plugins.add(commandConfigPrefixingPlugin(config.config));
|
|
9523
9534
|
}
|
|
9524
9535
|
plugins.add(blockUnsafeOperationsPlugin(config.unsafe));
|
|
9525
|
-
plugins.add(suffixPathsPlugin());
|
|
9526
9536
|
plugins.add(completionDetectionPlugin(config.completion));
|
|
9527
9537
|
config.abort && plugins.add(abortPlugin(config.abort));
|
|
9528
9538
|
config.progress && plugins.add(progressMonitorPlugin(config.progress));
|
|
9529
9539
|
config.timeout && plugins.add(timeoutPlugin(config.timeout));
|
|
9530
9540
|
config.spawnOptions && plugins.add(spawnOptionsPlugin(config.spawnOptions));
|
|
9541
|
+
plugins.add(suffixPathsPlugin());
|
|
9531
9542
|
plugins.add(errorDetectionPlugin(errorDetectionHandler(true)));
|
|
9532
9543
|
config.errors && plugins.add(errorDetectionPlugin(config.errors));
|
|
9533
9544
|
customBinaryPlugin(plugins, config.binary, config.unsafe?.allowUnsafeCustomBinary);
|
|
9534
9545
|
return new Git(config, plugins);
|
|
9535
9546
|
}
|
|
9536
|
-
var import_node_buffer, import_file_exists, import_debug, import_child_process, import_promise_deferred, import_node_path, import_promise_deferred2, import_node_events, __defProp2, __getOwnPropDesc2, __getOwnPropNames2, __hasOwnProp2, __esm2, __commonJS2, __export2, __copyProps2, __toCommonJS, cache, init_pathspec, GitError, init_git_error, GitResponseError, init_git_response_error, TaskConfigurationError, init_task_configuration_error, NULL, NOOP, objectToString, init_util, filterArray, filterNumber, filterString, filterStringOrStringArray, filterHasLength, init_argument_filters, ExitCodes, init_exit_codes, GitOutputStreams, init_git_output_streams, LineParser, RemoteLineParser, init_line_parser, defaultOptions, init_simple_git_options, init_task_options, init_task_parser, utils_exports, init_utils, check_is_repo_exports, CheckRepoActions, onError, parser2, init_check_is_repo, CleanResponse, removalRegexp, dryRunRemovalRegexp, isFolderRegexp, init_CleanSummary, task_exports, EMPTY_COMMANDS, init_task, clean_exports, CONFIG_ERROR_INTERACTIVE_MODE, CONFIG_ERROR_MODE_REQUIRED, CONFIG_ERROR_UNKNOWN_OPTION, CleanOptions, CleanOptionValues, init_clean, ConfigList, init_ConfigList, GitConfigScope, init_config, DiffNameStatus, diffNameStatus, init_diff_name_status, disallowedOptions, Query, _a3, GrepQuery, init_grep, reset_exports, ResetMode, validResetModes, init_reset, init_git_logger, TasksPendingQueue, init_tasks_pending_queue, GitExecutorChain, init_git_executor_chain, git_executor_exports, GitExecutor, init_git_executor, init_task_callback, init_change_working_directory, init_checkout, parser22, init_count_objects, parsers, init_parse_commit, init_commit, init_first_commit, init_hash_object, InitSummary, initResponseRegex, reInitResponseRegex, init_InitSummary, bareCommand, init_init, logFormatRegex, init_log_format, DiffSummary, init_DiffSummary, statParser, numStatParser, nameOnlyParser, nameStatusParser, diffSummaryParsers, init_parse_diff_summary, START_BOUNDARY, COMMIT_BOUNDARY, SPLITTER, defaultFieldNames, init_parse_list_log_summary, diff_exports, init_diff, excludeOptions, init_log, MergeSummaryConflict, MergeSummaryDetail, init_MergeSummary, PullSummary, PullFailedSummary, init_PullSummary, remoteMessagesObjectParsers, init_parse_remote_objects, parsers2, RemoteMessageSummary, init_parse_remote_messages, FILE_UPDATE_REGEX, SUMMARY_REGEX, ACTION_REGEX, parsers3, errorParsers, parsePullDetail, parsePullResult, init_parse_pull, parsers4, parseMergeResult, parseMergeDetail, init_parse_merge, init_merge, parsers5, parsePushResult, parsePushDetail, init_parse_push, push_exports, init_push, init_show, fromPathRegex, FileStatusSummary, init_FileStatusSummary, StatusSummary, parsers6, parseStatusSummary, init_StatusSummary, ignoredOptions, init_status, NOT_INSTALLED, parsers7, init_version, simple_git_api_exports, SimpleGitApi, init_simple_git_api, scheduler_exports, createScheduledTask, Scheduler, init_scheduler, apply_patch_exports, init_apply_patch, BranchDeletionBatch, init_BranchDeleteSummary, deleteSuccessRegex, deleteErrorRegex, parsers8, parseBranchDeletions, init_parse_branch_delete, BranchSummaryResult, init_BranchSummary, parsers9, currentBranchParser, init_parse_branch, branch_exports, init_branch, parseCheckIgnore, init_CheckIgnore, check_ignore_exports, init_check_ignore,
|
|
9547
|
+
var import_node_buffer, import_file_exists, import_debug, import_child_process, import_promise_deferred, import_node_path, import_promise_deferred2, import_node_events, __defProp2, __getOwnPropDesc2, __getOwnPropNames2, __hasOwnProp2, __esm2, __commonJS2, __export2, __copyProps2, __toCommonJS, cache, init_pathspec, GitError, init_git_error, GitResponseError, init_git_response_error, TaskConfigurationError, init_task_configuration_error, NULL, NOOP, objectToString, init_util, filterArray, filterNumber, filterString, filterStringOrStringArray, filterHasLength, init_argument_filters, ExitCodes, init_exit_codes, GitOutputStreams, init_git_output_streams, LineParser, RemoteLineParser, init_line_parser, defaultOptions, init_simple_git_options, init_task_options, init_task_parser, utils_exports, init_utils, check_is_repo_exports, CheckRepoActions, onError, parser2, init_check_is_repo, CleanResponse, removalRegexp, dryRunRemovalRegexp, isFolderRegexp, init_CleanSummary, task_exports, EMPTY_COMMANDS, init_task, clean_exports, CONFIG_ERROR_INTERACTIVE_MODE, CONFIG_ERROR_MODE_REQUIRED, CONFIG_ERROR_UNKNOWN_OPTION, CleanOptions, CleanOptionValues, init_clean, ConfigList, init_ConfigList, GitConfigScope, init_config, DiffNameStatus, diffNameStatus, init_diff_name_status, disallowedOptions, Query, _a3, GrepQuery, init_grep, reset_exports, ResetMode, validResetModes, init_reset, init_git_logger, TasksPendingQueue, init_tasks_pending_queue, GitExecutorChain, init_git_executor_chain, git_executor_exports, GitExecutor, init_git_executor, init_task_callback, init_change_working_directory, init_checkout, parser22, init_count_objects, parsers, init_parse_commit, init_commit, init_first_commit, init_hash_object, InitSummary, initResponseRegex, reInitResponseRegex, init_InitSummary, bareCommand, init_init, logFormatRegex, init_log_format, DiffSummary, init_DiffSummary, statParser, numStatParser, nameOnlyParser, nameStatusParser, diffSummaryParsers, init_parse_diff_summary, START_BOUNDARY, COMMIT_BOUNDARY, SPLITTER, defaultFieldNames, init_parse_list_log_summary, diff_exports, init_diff, excludeOptions, init_log, MergeSummaryConflict, MergeSummaryDetail, init_MergeSummary, PullSummary, PullFailedSummary, init_PullSummary, remoteMessagesObjectParsers, init_parse_remote_objects, parsers2, RemoteMessageSummary, init_parse_remote_messages, FILE_UPDATE_REGEX, SUMMARY_REGEX, ACTION_REGEX, parsers3, errorParsers, parsePullDetail, parsePullResult, init_parse_pull, parsers4, parseMergeResult, parseMergeDetail, init_parse_merge, init_merge, parsers5, parsePushResult, parsePushDetail, init_parse_push, push_exports, init_push, init_show, fromPathRegex, FileStatusSummary, init_FileStatusSummary, StatusSummary, parsers6, parseStatusSummary, init_StatusSummary, ignoredOptions, init_status, NOT_INSTALLED, parsers7, init_version, cloneTask, cloneMirrorTask, init_clone, simple_git_api_exports, SimpleGitApi, init_simple_git_api, scheduler_exports, createScheduledTask, Scheduler, init_scheduler, apply_patch_exports, init_apply_patch, BranchDeletionBatch, init_BranchDeleteSummary, deleteSuccessRegex, deleteErrorRegex, parsers8, parseBranchDeletions, init_parse_branch_delete, BranchSummaryResult, init_BranchSummary, parsers9, currentBranchParser, init_parse_branch, branch_exports, init_branch, parseCheckIgnore, init_CheckIgnore, check_ignore_exports, init_check_ignore, parsers10, init_parse_fetch, fetch_exports, init_fetch, parsers11, init_parse_move, move_exports, init_move, pull_exports, init_pull, init_GetRemoteSummary, remote_exports, init_remote, stash_list_exports, init_stash_list, sub_module_exports, init_sub_module, TagList, parseTagList, init_TagList, tag_exports, init_tag, require_git, GitConstructError, GitPluginError, preventUnsafeConfig, never, WRONG_NUMBER_ERR, WRONG_CHARS_ERR, PluginStore, Git, simpleGit;
|
|
9537
9548
|
var init_esm4 = __esm({
|
|
9538
|
-
"../../node_modules/.pnpm/simple-git@3.
|
|
9549
|
+
"../../node_modules/.pnpm/simple-git@3.33.0/node_modules/simple-git/dist/esm/index.js"() {
|
|
9539
9550
|
"use strict";
|
|
9540
9551
|
import_node_buffer = require("buffer");
|
|
9541
9552
|
import_file_exists = __toESM(require_dist(), 1);
|
|
@@ -9631,7 +9642,7 @@ var init_esm4 = __esm({
|
|
|
9631
9642
|
return typeof input === "number";
|
|
9632
9643
|
};
|
|
9633
9644
|
filterString = (input) => {
|
|
9634
|
-
return typeof input === "string";
|
|
9645
|
+
return typeof input === "string" || isPathSpec(input);
|
|
9635
9646
|
};
|
|
9636
9647
|
filterStringOrStringArray = (input) => {
|
|
9637
9648
|
return filterString(input) || Array.isArray(input) && input.every(filterString);
|
|
@@ -11010,58 +11021,54 @@ var init_esm4 = __esm({
|
|
|
11010
11021
|
parser3(
|
|
11011
11022
|
" ",
|
|
11012
11023
|
"A",
|
|
11013
|
-
(result, file) =>
|
|
11024
|
+
(result, file) => result.created.push(file)
|
|
11014
11025
|
),
|
|
11015
11026
|
parser3(
|
|
11016
11027
|
" ",
|
|
11017
11028
|
"D",
|
|
11018
|
-
(result, file) =>
|
|
11029
|
+
(result, file) => result.deleted.push(file)
|
|
11019
11030
|
),
|
|
11020
11031
|
parser3(
|
|
11021
11032
|
" ",
|
|
11022
11033
|
"M",
|
|
11023
|
-
(result, file) =>
|
|
11024
|
-
),
|
|
11025
|
-
parser3(
|
|
11026
|
-
"A",
|
|
11027
|
-
" ",
|
|
11028
|
-
(result, file) => append(result.created, file) && append(result.staged, file)
|
|
11029
|
-
),
|
|
11030
|
-
parser3(
|
|
11031
|
-
"A",
|
|
11032
|
-
"M",
|
|
11033
|
-
(result, file) => append(result.created, file) && append(result.staged, file) && append(result.modified, file)
|
|
11034
|
-
),
|
|
11035
|
-
parser3(
|
|
11036
|
-
"D",
|
|
11037
|
-
" ",
|
|
11038
|
-
(result, file) => append(result.deleted, file) && append(result.staged, file)
|
|
11039
|
-
),
|
|
11040
|
-
parser3(
|
|
11041
|
-
"M",
|
|
11042
|
-
" ",
|
|
11043
|
-
(result, file) => append(result.modified, file) && append(result.staged, file)
|
|
11044
|
-
),
|
|
11045
|
-
parser3(
|
|
11046
|
-
"M",
|
|
11047
|
-
"M",
|
|
11048
|
-
(result, file) => append(result.modified, file) && append(result.staged, file)
|
|
11034
|
+
(result, file) => result.modified.push(file)
|
|
11049
11035
|
),
|
|
11036
|
+
parser3("A", " ", (result, file) => {
|
|
11037
|
+
result.created.push(file);
|
|
11038
|
+
result.staged.push(file);
|
|
11039
|
+
}),
|
|
11040
|
+
parser3("A", "M", (result, file) => {
|
|
11041
|
+
result.created.push(file);
|
|
11042
|
+
result.staged.push(file);
|
|
11043
|
+
result.modified.push(file);
|
|
11044
|
+
}),
|
|
11045
|
+
parser3("D", " ", (result, file) => {
|
|
11046
|
+
result.deleted.push(file);
|
|
11047
|
+
result.staged.push(file);
|
|
11048
|
+
}),
|
|
11049
|
+
parser3("M", " ", (result, file) => {
|
|
11050
|
+
result.modified.push(file);
|
|
11051
|
+
result.staged.push(file);
|
|
11052
|
+
}),
|
|
11053
|
+
parser3("M", "M", (result, file) => {
|
|
11054
|
+
result.modified.push(file);
|
|
11055
|
+
result.staged.push(file);
|
|
11056
|
+
}),
|
|
11050
11057
|
parser3("R", " ", (result, file) => {
|
|
11051
|
-
|
|
11058
|
+
result.renamed.push(renamedFile(file));
|
|
11052
11059
|
}),
|
|
11053
11060
|
parser3("R", "M", (result, file) => {
|
|
11054
11061
|
const renamed = renamedFile(file);
|
|
11055
|
-
|
|
11056
|
-
|
|
11062
|
+
result.renamed.push(renamed);
|
|
11063
|
+
result.modified.push(renamed.to);
|
|
11057
11064
|
}),
|
|
11058
11065
|
parser3("!", "!", (_result, _file) => {
|
|
11059
|
-
|
|
11066
|
+
(_result.ignored = _result.ignored || []).push(_file);
|
|
11060
11067
|
}),
|
|
11061
11068
|
parser3(
|
|
11062
11069
|
"?",
|
|
11063
11070
|
"?",
|
|
11064
|
-
(result, file) =>
|
|
11071
|
+
(result, file) => result.not_added.push(file)
|
|
11065
11072
|
),
|
|
11066
11073
|
...conflicts(
|
|
11067
11074
|
"A",
|
|
@@ -11154,6 +11161,24 @@ var init_esm4 = __esm({
|
|
|
11154
11161
|
];
|
|
11155
11162
|
}
|
|
11156
11163
|
});
|
|
11164
|
+
init_clone = __esm2({
|
|
11165
|
+
"src/lib/tasks/clone.ts"() {
|
|
11166
|
+
"use strict";
|
|
11167
|
+
init_task();
|
|
11168
|
+
init_utils();
|
|
11169
|
+
init_pathspec();
|
|
11170
|
+
cloneTask = (repo, directory, customArgs) => {
|
|
11171
|
+
const commands = ["clone", ...customArgs];
|
|
11172
|
+
filterString(repo) && commands.push(pathspec(repo));
|
|
11173
|
+
filterString(directory) && commands.push(pathspec(directory));
|
|
11174
|
+
return straightThroughStringTask(commands);
|
|
11175
|
+
};
|
|
11176
|
+
cloneMirrorTask = (repo, directory, customArgs) => {
|
|
11177
|
+
append(customArgs, "--mirror");
|
|
11178
|
+
return cloneTask(repo, directory, customArgs);
|
|
11179
|
+
};
|
|
11180
|
+
}
|
|
11181
|
+
});
|
|
11157
11182
|
simple_git_api_exports = {};
|
|
11158
11183
|
__export2(simple_git_api_exports, {
|
|
11159
11184
|
SimpleGitApi: () => SimpleGitApi
|
|
@@ -11179,6 +11204,7 @@ var init_esm4 = __esm({
|
|
|
11179
11204
|
init_task();
|
|
11180
11205
|
init_version();
|
|
11181
11206
|
init_utils();
|
|
11207
|
+
init_clone();
|
|
11182
11208
|
SimpleGitApi = class {
|
|
11183
11209
|
constructor(_executor) {
|
|
11184
11210
|
this._executor = _executor;
|
|
@@ -11281,6 +11307,7 @@ var init_esm4 = __esm({
|
|
|
11281
11307
|
Object.assign(
|
|
11282
11308
|
SimpleGitApi.prototype,
|
|
11283
11309
|
checkout_default(),
|
|
11310
|
+
clone_default(),
|
|
11284
11311
|
commit_default(),
|
|
11285
11312
|
config_default(),
|
|
11286
11313
|
count_objects_default(),
|
|
@@ -11484,18 +11511,6 @@ var init_esm4 = __esm({
|
|
|
11484
11511
|
init_CheckIgnore();
|
|
11485
11512
|
}
|
|
11486
11513
|
});
|
|
11487
|
-
clone_exports = {};
|
|
11488
|
-
__export2(clone_exports, {
|
|
11489
|
-
cloneMirrorTask: () => cloneMirrorTask,
|
|
11490
|
-
cloneTask: () => cloneTask
|
|
11491
|
-
});
|
|
11492
|
-
init_clone = __esm2({
|
|
11493
|
-
"src/lib/tasks/clone.ts"() {
|
|
11494
|
-
"use strict";
|
|
11495
|
-
init_task();
|
|
11496
|
-
init_utils();
|
|
11497
|
-
}
|
|
11498
|
-
});
|
|
11499
11514
|
init_parse_fetch = __esm2({
|
|
11500
11515
|
"src/lib/parsers/parse-fetch.ts"() {
|
|
11501
11516
|
"use strict";
|
|
@@ -11677,7 +11692,7 @@ var init_esm4 = __esm({
|
|
|
11677
11692
|
var { GitExecutor: GitExecutor2 } = (init_git_executor(), __toCommonJS(git_executor_exports));
|
|
11678
11693
|
var { SimpleGitApi: SimpleGitApi2 } = (init_simple_git_api(), __toCommonJS(simple_git_api_exports));
|
|
11679
11694
|
var { Scheduler: Scheduler2 } = (init_scheduler(), __toCommonJS(scheduler_exports));
|
|
11680
|
-
var { configurationErrorTask: configurationErrorTask2 } = (init_task(), __toCommonJS(task_exports));
|
|
11695
|
+
var { adhocExecTask: adhocExecTask2, configurationErrorTask: configurationErrorTask2 } = (init_task(), __toCommonJS(task_exports));
|
|
11681
11696
|
var {
|
|
11682
11697
|
asArray: asArray2,
|
|
11683
11698
|
filterArray: filterArray2,
|
|
@@ -11698,7 +11713,6 @@ var init_esm4 = __esm({
|
|
|
11698
11713
|
} = (init_branch(), __toCommonJS(branch_exports));
|
|
11699
11714
|
var { checkIgnoreTask: checkIgnoreTask2 } = (init_check_ignore(), __toCommonJS(check_ignore_exports));
|
|
11700
11715
|
var { checkIsRepoTask: checkIsRepoTask2 } = (init_check_is_repo(), __toCommonJS(check_is_repo_exports));
|
|
11701
|
-
var { cloneTask: cloneTask2, cloneMirrorTask: cloneMirrorTask2 } = (init_clone(), __toCommonJS(clone_exports));
|
|
11702
11716
|
var { cleanWithOptionsTask: cleanWithOptionsTask2, isCleanOptionsArray: isCleanOptionsArray2 } = (init_clean(), __toCommonJS(clean_exports));
|
|
11703
11717
|
var { diffSummaryTask: diffSummaryTask2 } = (init_diff(), __toCommonJS(diff_exports));
|
|
11704
11718
|
var { fetchTask: fetchTask2 } = (init_fetch(), __toCommonJS(fetch_exports));
|
|
@@ -11753,24 +11767,6 @@ var init_esm4 = __esm({
|
|
|
11753
11767
|
trailingFunctionArgument2(arguments)
|
|
11754
11768
|
);
|
|
11755
11769
|
};
|
|
11756
|
-
function createCloneTask(api, task, repoPath, localPath) {
|
|
11757
|
-
if (typeof repoPath !== "string") {
|
|
11758
|
-
return configurationErrorTask2(`git.${api}() requires a string 'repoPath'`);
|
|
11759
|
-
}
|
|
11760
|
-
return task(repoPath, filterType2(localPath, filterString2), getTrailingOptions2(arguments));
|
|
11761
|
-
}
|
|
11762
|
-
Git2.prototype.clone = function() {
|
|
11763
|
-
return this._runTask(
|
|
11764
|
-
createCloneTask("clone", cloneTask2, ...arguments),
|
|
11765
|
-
trailingFunctionArgument2(arguments)
|
|
11766
|
-
);
|
|
11767
|
-
};
|
|
11768
|
-
Git2.prototype.mirror = function() {
|
|
11769
|
-
return this._runTask(
|
|
11770
|
-
createCloneTask("mirror", cloneMirrorTask2, ...arguments),
|
|
11771
|
-
trailingFunctionArgument2(arguments)
|
|
11772
|
-
);
|
|
11773
|
-
};
|
|
11774
11770
|
Git2.prototype.mv = function(from, to) {
|
|
11775
11771
|
return this._runTask(moveTask2(from, to), trailingFunctionArgument2(arguments));
|
|
11776
11772
|
};
|
|
@@ -11803,10 +11799,13 @@ var init_esm4 = __esm({
|
|
|
11803
11799
|
);
|
|
11804
11800
|
};
|
|
11805
11801
|
Git2.prototype.silent = function(silence) {
|
|
11806
|
-
|
|
11807
|
-
|
|
11802
|
+
return this._runTask(
|
|
11803
|
+
adhocExecTask2(
|
|
11804
|
+
() => console.warn(
|
|
11805
|
+
"simple-git deprecation notice: git.silent: logging should be configured using the `debug` library / `DEBUG` environment variable, this method will be removed."
|
|
11806
|
+
)
|
|
11807
|
+
)
|
|
11808
11808
|
);
|
|
11809
|
-
return this;
|
|
11810
11809
|
};
|
|
11811
11810
|
Git2.prototype.tags = function(options, then) {
|
|
11812
11811
|
return this._runTask(
|
|
@@ -12032,7 +12031,13 @@ var init_esm4 = __esm({
|
|
|
12032
12031
|
return this._runTask(task);
|
|
12033
12032
|
};
|
|
12034
12033
|
Git2.prototype.clearQueue = function() {
|
|
12035
|
-
return this
|
|
12034
|
+
return this._runTask(
|
|
12035
|
+
adhocExecTask2(
|
|
12036
|
+
() => console.warn(
|
|
12037
|
+
"simple-git deprecation notice: clearQueue() is deprecated and will be removed, switch to using the abortPlugin instead."
|
|
12038
|
+
)
|
|
12039
|
+
)
|
|
12040
|
+
);
|
|
12036
12041
|
};
|
|
12037
12042
|
Git2.prototype.checkIgnore = function(pathnames, then) {
|
|
12038
12043
|
return this._runTask(
|
|
@@ -12075,6 +12080,17 @@ var init_esm4 = __esm({
|
|
|
12075
12080
|
init_diff_name_status();
|
|
12076
12081
|
init_grep();
|
|
12077
12082
|
init_reset();
|
|
12083
|
+
preventUnsafeConfig = [
|
|
12084
|
+
preventConfigBuilder(
|
|
12085
|
+
/^\s*protocol(.[a-z]+)?.allow/i,
|
|
12086
|
+
"allowUnsafeProtocolOverride",
|
|
12087
|
+
"protocol.allow"
|
|
12088
|
+
),
|
|
12089
|
+
preventConfigBuilder("core.sshCommand", "allowUnsafeSshCommand"),
|
|
12090
|
+
preventConfigBuilder("core.gitProxy", "allowUnsafeGitProxy"),
|
|
12091
|
+
preventConfigBuilder("core.hooksPath", "allowUnsafeHooksPath"),
|
|
12092
|
+
preventConfigBuilder("diff.external", "allowUnsafeDiffExternal")
|
|
12093
|
+
];
|
|
12078
12094
|
init_utils();
|
|
12079
12095
|
init_utils();
|
|
12080
12096
|
never = (0, import_promise_deferred2.deferred)().promise;
|
|
@@ -12222,9 +12238,9 @@ var require_fast_content_type_parse = __commonJS({
|
|
|
12222
12238
|
}
|
|
12223
12239
|
});
|
|
12224
12240
|
|
|
12225
|
-
// ../../node_modules/.pnpm/yaml@2.
|
|
12241
|
+
// ../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/nodes/identity.js
|
|
12226
12242
|
var require_identity = __commonJS({
|
|
12227
|
-
"../../node_modules/.pnpm/yaml@2.
|
|
12243
|
+
"../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/nodes/identity.js"(exports2) {
|
|
12228
12244
|
"use strict";
|
|
12229
12245
|
var ALIAS = /* @__PURE__ */ Symbol.for("yaml.alias");
|
|
12230
12246
|
var DOC = /* @__PURE__ */ Symbol.for("yaml.document");
|
|
@@ -12279,9 +12295,9 @@ var require_identity = __commonJS({
|
|
|
12279
12295
|
}
|
|
12280
12296
|
});
|
|
12281
12297
|
|
|
12282
|
-
// ../../node_modules/.pnpm/yaml@2.
|
|
12298
|
+
// ../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/visit.js
|
|
12283
12299
|
var require_visit = __commonJS({
|
|
12284
|
-
"../../node_modules/.pnpm/yaml@2.
|
|
12300
|
+
"../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/visit.js"(exports2) {
|
|
12285
12301
|
"use strict";
|
|
12286
12302
|
var identity = require_identity();
|
|
12287
12303
|
var BREAK = /* @__PURE__ */ Symbol("break visit");
|
|
@@ -12437,9 +12453,9 @@ var require_visit = __commonJS({
|
|
|
12437
12453
|
}
|
|
12438
12454
|
});
|
|
12439
12455
|
|
|
12440
|
-
// ../../node_modules/.pnpm/yaml@2.
|
|
12456
|
+
// ../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/doc/directives.js
|
|
12441
12457
|
var require_directives = __commonJS({
|
|
12442
|
-
"../../node_modules/.pnpm/yaml@2.
|
|
12458
|
+
"../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/doc/directives.js"(exports2) {
|
|
12443
12459
|
"use strict";
|
|
12444
12460
|
var identity = require_identity();
|
|
12445
12461
|
var visit = require_visit();
|
|
@@ -12552,7 +12568,7 @@ var require_directives = __commonJS({
|
|
|
12552
12568
|
onError2("Verbatim tags must end with a >");
|
|
12553
12569
|
return verbatim;
|
|
12554
12570
|
}
|
|
12555
|
-
const [, handle, suffix] = source.match(/^(.*!)([^!]*)$/);
|
|
12571
|
+
const [, handle, suffix] = source.match(/^(.*!)([^!]*)$/s);
|
|
12556
12572
|
if (!suffix)
|
|
12557
12573
|
onError2(`The ${source} tag has no suffix`);
|
|
12558
12574
|
const prefix = this.tags[handle];
|
|
@@ -12608,9 +12624,9 @@ var require_directives = __commonJS({
|
|
|
12608
12624
|
}
|
|
12609
12625
|
});
|
|
12610
12626
|
|
|
12611
|
-
// ../../node_modules/.pnpm/yaml@2.
|
|
12627
|
+
// ../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/doc/anchors.js
|
|
12612
12628
|
var require_anchors = __commonJS({
|
|
12613
|
-
"../../node_modules/.pnpm/yaml@2.
|
|
12629
|
+
"../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/doc/anchors.js"(exports2) {
|
|
12614
12630
|
"use strict";
|
|
12615
12631
|
var identity = require_identity();
|
|
12616
12632
|
var visit = require_visit();
|
|
@@ -12646,8 +12662,7 @@ var require_anchors = __commonJS({
|
|
|
12646
12662
|
return {
|
|
12647
12663
|
onAnchor: (source) => {
|
|
12648
12664
|
aliasObjects.push(source);
|
|
12649
|
-
|
|
12650
|
-
prevAnchors = anchorNames(doc);
|
|
12665
|
+
prevAnchors ?? (prevAnchors = anchorNames(doc));
|
|
12651
12666
|
const anchor = findNewAnchor(prefix, prevAnchors);
|
|
12652
12667
|
prevAnchors.add(anchor);
|
|
12653
12668
|
return anchor;
|
|
@@ -12679,9 +12694,9 @@ var require_anchors = __commonJS({
|
|
|
12679
12694
|
}
|
|
12680
12695
|
});
|
|
12681
12696
|
|
|
12682
|
-
// ../../node_modules/.pnpm/yaml@2.
|
|
12697
|
+
// ../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/doc/applyReviver.js
|
|
12683
12698
|
var require_applyReviver = __commonJS({
|
|
12684
|
-
"../../node_modules/.pnpm/yaml@2.
|
|
12699
|
+
"../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/doc/applyReviver.js"(exports2) {
|
|
12685
12700
|
"use strict";
|
|
12686
12701
|
function applyReviver(reviver, obj, key, val) {
|
|
12687
12702
|
if (val && typeof val === "object") {
|
|
@@ -12729,9 +12744,9 @@ var require_applyReviver = __commonJS({
|
|
|
12729
12744
|
}
|
|
12730
12745
|
});
|
|
12731
12746
|
|
|
12732
|
-
// ../../node_modules/.pnpm/yaml@2.
|
|
12747
|
+
// ../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/nodes/toJS.js
|
|
12733
12748
|
var require_toJS = __commonJS({
|
|
12734
|
-
"../../node_modules/.pnpm/yaml@2.
|
|
12749
|
+
"../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/nodes/toJS.js"(exports2) {
|
|
12735
12750
|
"use strict";
|
|
12736
12751
|
var identity = require_identity();
|
|
12737
12752
|
function toJS(value, arg, ctx) {
|
|
@@ -12759,9 +12774,9 @@ var require_toJS = __commonJS({
|
|
|
12759
12774
|
}
|
|
12760
12775
|
});
|
|
12761
12776
|
|
|
12762
|
-
// ../../node_modules/.pnpm/yaml@2.
|
|
12777
|
+
// ../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/nodes/Node.js
|
|
12763
12778
|
var require_Node = __commonJS({
|
|
12764
|
-
"../../node_modules/.pnpm/yaml@2.
|
|
12779
|
+
"../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/nodes/Node.js"(exports2) {
|
|
12765
12780
|
"use strict";
|
|
12766
12781
|
var applyReviver = require_applyReviver();
|
|
12767
12782
|
var identity = require_identity();
|
|
@@ -12800,9 +12815,9 @@ var require_Node = __commonJS({
|
|
|
12800
12815
|
}
|
|
12801
12816
|
});
|
|
12802
12817
|
|
|
12803
|
-
// ../../node_modules/.pnpm/yaml@2.
|
|
12818
|
+
// ../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/nodes/Alias.js
|
|
12804
12819
|
var require_Alias = __commonJS({
|
|
12805
|
-
"../../node_modules/.pnpm/yaml@2.
|
|
12820
|
+
"../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/nodes/Alias.js"(exports2) {
|
|
12806
12821
|
"use strict";
|
|
12807
12822
|
var anchors = require_anchors();
|
|
12808
12823
|
var visit = require_visit();
|
|
@@ -12823,23 +12838,35 @@ var require_Alias = __commonJS({
|
|
|
12823
12838
|
* Resolve the value of this alias within `doc`, finding the last
|
|
12824
12839
|
* instance of the `source` anchor before this node.
|
|
12825
12840
|
*/
|
|
12826
|
-
resolve(doc) {
|
|
12841
|
+
resolve(doc, ctx) {
|
|
12842
|
+
let nodes;
|
|
12843
|
+
if (ctx?.aliasResolveCache) {
|
|
12844
|
+
nodes = ctx.aliasResolveCache;
|
|
12845
|
+
} else {
|
|
12846
|
+
nodes = [];
|
|
12847
|
+
visit.visit(doc, {
|
|
12848
|
+
Node: (_key, node) => {
|
|
12849
|
+
if (identity.isAlias(node) || identity.hasAnchor(node))
|
|
12850
|
+
nodes.push(node);
|
|
12851
|
+
}
|
|
12852
|
+
});
|
|
12853
|
+
if (ctx)
|
|
12854
|
+
ctx.aliasResolveCache = nodes;
|
|
12855
|
+
}
|
|
12827
12856
|
let found = void 0;
|
|
12828
|
-
|
|
12829
|
-
|
|
12830
|
-
|
|
12831
|
-
|
|
12832
|
-
|
|
12833
|
-
|
|
12834
|
-
}
|
|
12835
|
-
});
|
|
12857
|
+
for (const node of nodes) {
|
|
12858
|
+
if (node === this)
|
|
12859
|
+
break;
|
|
12860
|
+
if (node.anchor === this.source)
|
|
12861
|
+
found = node;
|
|
12862
|
+
}
|
|
12836
12863
|
return found;
|
|
12837
12864
|
}
|
|
12838
12865
|
toJSON(_arg, ctx) {
|
|
12839
12866
|
if (!ctx)
|
|
12840
12867
|
return { source: this.source };
|
|
12841
12868
|
const { anchors: anchors2, doc, maxAliasCount } = ctx;
|
|
12842
|
-
const source = this.resolve(doc);
|
|
12869
|
+
const source = this.resolve(doc, ctx);
|
|
12843
12870
|
if (!source) {
|
|
12844
12871
|
const msg = `Unresolved alias (the anchor must be set before the alias): ${this.source}`;
|
|
12845
12872
|
throw new ReferenceError(msg);
|
|
@@ -12849,7 +12876,7 @@ var require_Alias = __commonJS({
|
|
|
12849
12876
|
toJS.toJS(source, null, ctx);
|
|
12850
12877
|
data = anchors2.get(source);
|
|
12851
12878
|
}
|
|
12852
|
-
if (
|
|
12879
|
+
if (data?.res === void 0) {
|
|
12853
12880
|
const msg = "This should not happen: Alias anchor was not resolved?";
|
|
12854
12881
|
throw new ReferenceError(msg);
|
|
12855
12882
|
}
|
|
@@ -12902,9 +12929,9 @@ var require_Alias = __commonJS({
|
|
|
12902
12929
|
}
|
|
12903
12930
|
});
|
|
12904
12931
|
|
|
12905
|
-
// ../../node_modules/.pnpm/yaml@2.
|
|
12932
|
+
// ../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/nodes/Scalar.js
|
|
12906
12933
|
var require_Scalar = __commonJS({
|
|
12907
|
-
"../../node_modules/.pnpm/yaml@2.
|
|
12934
|
+
"../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/nodes/Scalar.js"(exports2) {
|
|
12908
12935
|
"use strict";
|
|
12909
12936
|
var identity = require_identity();
|
|
12910
12937
|
var Node = require_Node();
|
|
@@ -12932,9 +12959,9 @@ var require_Scalar = __commonJS({
|
|
|
12932
12959
|
}
|
|
12933
12960
|
});
|
|
12934
12961
|
|
|
12935
|
-
// ../../node_modules/.pnpm/yaml@2.
|
|
12962
|
+
// ../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/doc/createNode.js
|
|
12936
12963
|
var require_createNode = __commonJS({
|
|
12937
|
-
"../../node_modules/.pnpm/yaml@2.
|
|
12964
|
+
"../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/doc/createNode.js"(exports2) {
|
|
12938
12965
|
"use strict";
|
|
12939
12966
|
var Alias = require_Alias();
|
|
12940
12967
|
var identity = require_identity();
|
|
@@ -12968,8 +12995,7 @@ var require_createNode = __commonJS({
|
|
|
12968
12995
|
if (aliasDuplicateObjects && value && typeof value === "object") {
|
|
12969
12996
|
ref = sourceObjects.get(value);
|
|
12970
12997
|
if (ref) {
|
|
12971
|
-
|
|
12972
|
-
ref.anchor = onAnchor(value);
|
|
12998
|
+
ref.anchor ?? (ref.anchor = onAnchor(value));
|
|
12973
12999
|
return new Alias.Alias(ref.anchor);
|
|
12974
13000
|
} else {
|
|
12975
13001
|
ref = { anchor: null, node: null };
|
|
@@ -13008,9 +13034,9 @@ var require_createNode = __commonJS({
|
|
|
13008
13034
|
}
|
|
13009
13035
|
});
|
|
13010
13036
|
|
|
13011
|
-
// ../../node_modules/.pnpm/yaml@2.
|
|
13037
|
+
// ../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/nodes/Collection.js
|
|
13012
13038
|
var require_Collection = __commonJS({
|
|
13013
|
-
"../../node_modules/.pnpm/yaml@2.
|
|
13039
|
+
"../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/nodes/Collection.js"(exports2) {
|
|
13014
13040
|
"use strict";
|
|
13015
13041
|
var createNode = require_createNode();
|
|
13016
13042
|
var identity = require_identity();
|
|
@@ -13145,16 +13171,15 @@ var require_Collection = __commonJS({
|
|
|
13145
13171
|
}
|
|
13146
13172
|
}
|
|
13147
13173
|
};
|
|
13148
|
-
Collection2.maxFlowStringSingleLineLength = 60;
|
|
13149
13174
|
exports2.Collection = Collection2;
|
|
13150
13175
|
exports2.collectionFromPath = collectionFromPath;
|
|
13151
13176
|
exports2.isEmptyPath = isEmptyPath;
|
|
13152
13177
|
}
|
|
13153
13178
|
});
|
|
13154
13179
|
|
|
13155
|
-
// ../../node_modules/.pnpm/yaml@2.
|
|
13180
|
+
// ../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/stringify/stringifyComment.js
|
|
13156
13181
|
var require_stringifyComment = __commonJS({
|
|
13157
|
-
"../../node_modules/.pnpm/yaml@2.
|
|
13182
|
+
"../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/stringify/stringifyComment.js"(exports2) {
|
|
13158
13183
|
"use strict";
|
|
13159
13184
|
var stringifyComment = (str) => str.replace(/^(?!$)(?: $)?/gm, "#");
|
|
13160
13185
|
function indentComment(comment, indent) {
|
|
@@ -13169,9 +13194,9 @@ var require_stringifyComment = __commonJS({
|
|
|
13169
13194
|
}
|
|
13170
13195
|
});
|
|
13171
13196
|
|
|
13172
|
-
// ../../node_modules/.pnpm/yaml@2.
|
|
13197
|
+
// ../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/stringify/foldFlowLines.js
|
|
13173
13198
|
var require_foldFlowLines = __commonJS({
|
|
13174
|
-
"../../node_modules/.pnpm/yaml@2.
|
|
13199
|
+
"../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/stringify/foldFlowLines.js"(exports2) {
|
|
13175
13200
|
"use strict";
|
|
13176
13201
|
var FOLD_FLOW = "flow";
|
|
13177
13202
|
var FOLD_BLOCK = "block";
|
|
@@ -13179,6 +13204,8 @@ var require_foldFlowLines = __commonJS({
|
|
|
13179
13204
|
function foldFlowLines(text, indent, mode = "flow", { indentAtStart, lineWidth = 80, minContentWidth = 20, onFold, onOverflow } = {}) {
|
|
13180
13205
|
if (!lineWidth || lineWidth < 0)
|
|
13181
13206
|
return text;
|
|
13207
|
+
if (lineWidth < minContentWidth)
|
|
13208
|
+
minContentWidth = 0;
|
|
13182
13209
|
const endStep = Math.max(1 + minContentWidth, 1 + lineWidth - indent.length);
|
|
13183
13210
|
if (text.length <= endStep)
|
|
13184
13211
|
return text;
|
|
@@ -13198,7 +13225,7 @@ var require_foldFlowLines = __commonJS({
|
|
|
13198
13225
|
let escStart = -1;
|
|
13199
13226
|
let escEnd = -1;
|
|
13200
13227
|
if (mode === FOLD_BLOCK) {
|
|
13201
|
-
i = consumeMoreIndentedLines(text, i);
|
|
13228
|
+
i = consumeMoreIndentedLines(text, i, indent.length);
|
|
13202
13229
|
if (i !== -1)
|
|
13203
13230
|
end = i + endStep;
|
|
13204
13231
|
}
|
|
@@ -13222,8 +13249,8 @@ var require_foldFlowLines = __commonJS({
|
|
|
13222
13249
|
}
|
|
13223
13250
|
if (ch === "\n") {
|
|
13224
13251
|
if (mode === FOLD_BLOCK)
|
|
13225
|
-
i = consumeMoreIndentedLines(text, i);
|
|
13226
|
-
end = i + endStep;
|
|
13252
|
+
i = consumeMoreIndentedLines(text, i, indent.length);
|
|
13253
|
+
end = i + indent.length + endStep;
|
|
13227
13254
|
split = void 0;
|
|
13228
13255
|
} else {
|
|
13229
13256
|
if (ch === " " && prev && prev !== " " && prev !== "\n" && prev !== " ") {
|
|
@@ -13278,15 +13305,23 @@ ${indent}${text.slice(fold + 1, end2)}`;
|
|
|
13278
13305
|
}
|
|
13279
13306
|
return res;
|
|
13280
13307
|
}
|
|
13281
|
-
function consumeMoreIndentedLines(text, i) {
|
|
13282
|
-
let
|
|
13308
|
+
function consumeMoreIndentedLines(text, i, indent) {
|
|
13309
|
+
let end = i;
|
|
13310
|
+
let start = i + 1;
|
|
13311
|
+
let ch = text[start];
|
|
13283
13312
|
while (ch === " " || ch === " ") {
|
|
13284
|
-
|
|
13285
|
-
ch = text[i
|
|
13286
|
-
}
|
|
13287
|
-
|
|
13313
|
+
if (i < start + indent) {
|
|
13314
|
+
ch = text[++i];
|
|
13315
|
+
} else {
|
|
13316
|
+
do {
|
|
13317
|
+
ch = text[++i];
|
|
13318
|
+
} while (ch && ch !== "\n");
|
|
13319
|
+
end = i;
|
|
13320
|
+
start = i + 1;
|
|
13321
|
+
ch = text[start];
|
|
13322
|
+
}
|
|
13288
13323
|
}
|
|
13289
|
-
return
|
|
13324
|
+
return end;
|
|
13290
13325
|
}
|
|
13291
13326
|
exports2.FOLD_BLOCK = FOLD_BLOCK;
|
|
13292
13327
|
exports2.FOLD_FLOW = FOLD_FLOW;
|
|
@@ -13295,9 +13330,9 @@ ${indent}${text.slice(fold + 1, end2)}`;
|
|
|
13295
13330
|
}
|
|
13296
13331
|
});
|
|
13297
13332
|
|
|
13298
|
-
// ../../node_modules/.pnpm/yaml@2.
|
|
13333
|
+
// ../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/stringify/stringifyString.js
|
|
13299
13334
|
var require_stringifyString = __commonJS({
|
|
13300
|
-
"../../node_modules/.pnpm/yaml@2.
|
|
13335
|
+
"../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/stringify/stringifyString.js"(exports2) {
|
|
13301
13336
|
"use strict";
|
|
13302
13337
|
var Scalar = require_Scalar();
|
|
13303
13338
|
var foldFlowLines = require_foldFlowLines();
|
|
@@ -13438,7 +13473,7 @@ ${indent}`) + "'";
|
|
|
13438
13473
|
}
|
|
13439
13474
|
function blockString({ comment, type, value }, ctx, onComment, onChompKeep) {
|
|
13440
13475
|
const { blockQuote, commentString, lineWidth } = ctx.options;
|
|
13441
|
-
if (!blockQuote || /\n[\t ]+$/.test(value)
|
|
13476
|
+
if (!blockQuote || /\n[\t ]+$/.test(value)) {
|
|
13442
13477
|
return quotedString(value, ctx);
|
|
13443
13478
|
}
|
|
13444
13479
|
const indent = ctx.indent || (ctx.forceBlockIndent || containsDocumentMarker(value) ? " " : "");
|
|
@@ -13487,21 +13522,29 @@ ${indent}`) + "'";
|
|
|
13487
13522
|
start = start.replace(/\n+/g, `$&${indent}`);
|
|
13488
13523
|
}
|
|
13489
13524
|
const indentSize = indent ? "2" : "1";
|
|
13490
|
-
let header = (
|
|
13525
|
+
let header = (startWithSpace ? indentSize : "") + chomp;
|
|
13491
13526
|
if (comment) {
|
|
13492
13527
|
header += " " + commentString(comment.replace(/ ?[\r\n]+/g, " "));
|
|
13493
13528
|
if (onComment)
|
|
13494
13529
|
onComment();
|
|
13495
13530
|
}
|
|
13496
|
-
if (literal) {
|
|
13497
|
-
|
|
13498
|
-
|
|
13499
|
-
|
|
13500
|
-
|
|
13501
|
-
|
|
13502
|
-
|
|
13503
|
-
|
|
13531
|
+
if (!literal) {
|
|
13532
|
+
const foldedValue = value.replace(/\n+/g, "\n$&").replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g, "$1$2").replace(/\n+/g, `$&${indent}`);
|
|
13533
|
+
let literalFallback = false;
|
|
13534
|
+
const foldOptions = getFoldOptions(ctx, true);
|
|
13535
|
+
if (blockQuote !== "folded" && type !== Scalar.Scalar.BLOCK_FOLDED) {
|
|
13536
|
+
foldOptions.onOverflow = () => {
|
|
13537
|
+
literalFallback = true;
|
|
13538
|
+
};
|
|
13539
|
+
}
|
|
13540
|
+
const body = foldFlowLines.foldFlowLines(`${start}${foldedValue}${end}`, indent, foldFlowLines.FOLD_BLOCK, foldOptions);
|
|
13541
|
+
if (!literalFallback)
|
|
13542
|
+
return `>${header}
|
|
13504
13543
|
${indent}${body}`;
|
|
13544
|
+
}
|
|
13545
|
+
value = value.replace(/\n+/g, `$&${indent}`);
|
|
13546
|
+
return `|${header}
|
|
13547
|
+
${indent}${start}${value}${end}`;
|
|
13505
13548
|
}
|
|
13506
13549
|
function plainString(item, ctx, onComment, onChompKeep) {
|
|
13507
13550
|
const { type, value } = item;
|
|
@@ -13509,7 +13552,7 @@ ${indent}${body}`;
|
|
|
13509
13552
|
if (implicitKey && value.includes("\n") || inFlow && /[[\]{},]/.test(value)) {
|
|
13510
13553
|
return quotedString(value, ctx);
|
|
13511
13554
|
}
|
|
13512
|
-
if (
|
|
13555
|
+
if (/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(value)) {
|
|
13513
13556
|
return implicitKey || inFlow || !value.includes("\n") ? quotedString(value, ctx) : blockString(item, ctx, onComment, onChompKeep);
|
|
13514
13557
|
}
|
|
13515
13558
|
if (!implicitKey && !inFlow && type !== Scalar.Scalar.PLAIN && value.includes("\n")) {
|
|
@@ -13570,9 +13613,9 @@ ${indent}`);
|
|
|
13570
13613
|
}
|
|
13571
13614
|
});
|
|
13572
13615
|
|
|
13573
|
-
// ../../node_modules/.pnpm/yaml@2.
|
|
13616
|
+
// ../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/stringify/stringify.js
|
|
13574
13617
|
var require_stringify = __commonJS({
|
|
13575
|
-
"../../node_modules/.pnpm/yaml@2.
|
|
13618
|
+
"../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/stringify/stringify.js"(exports2) {
|
|
13576
13619
|
"use strict";
|
|
13577
13620
|
var anchors = require_anchors();
|
|
13578
13621
|
var identity = require_identity();
|
|
@@ -13595,6 +13638,7 @@ var require_stringify = __commonJS({
|
|
|
13595
13638
|
nullStr: "null",
|
|
13596
13639
|
simpleKeys: false,
|
|
13597
13640
|
singleQuote: null,
|
|
13641
|
+
trailingComma: false,
|
|
13598
13642
|
trueStr: "true",
|
|
13599
13643
|
verifyAliasOrder: true
|
|
13600
13644
|
}, doc.schema.toStringOptions, options);
|
|
@@ -13629,14 +13673,19 @@ var require_stringify = __commonJS({
|
|
|
13629
13673
|
let obj;
|
|
13630
13674
|
if (identity.isScalar(item)) {
|
|
13631
13675
|
obj = item.value;
|
|
13632
|
-
|
|
13676
|
+
let match2 = tags.filter((t) => t.identify?.(obj));
|
|
13677
|
+
if (match2.length > 1) {
|
|
13678
|
+
const testMatch = match2.filter((t) => t.test);
|
|
13679
|
+
if (testMatch.length > 0)
|
|
13680
|
+
match2 = testMatch;
|
|
13681
|
+
}
|
|
13633
13682
|
tagObj = match2.find((t) => t.format === item.format) ?? match2.find((t) => !t.format);
|
|
13634
13683
|
} else {
|
|
13635
13684
|
obj = item;
|
|
13636
13685
|
tagObj = tags.find((t) => t.nodeClass && obj instanceof t.nodeClass);
|
|
13637
13686
|
}
|
|
13638
13687
|
if (!tagObj) {
|
|
13639
|
-
const name = obj?.constructor?.name ?? typeof obj;
|
|
13688
|
+
const name = obj?.constructor?.name ?? (obj === null ? "null" : typeof obj);
|
|
13640
13689
|
throw new Error(`Tag not resolved for ${name} value`);
|
|
13641
13690
|
}
|
|
13642
13691
|
return tagObj;
|
|
@@ -13650,7 +13699,7 @@ var require_stringify = __commonJS({
|
|
|
13650
13699
|
anchors$1.add(anchor);
|
|
13651
13700
|
props.push(`&${anchor}`);
|
|
13652
13701
|
}
|
|
13653
|
-
const tag = node.tag
|
|
13702
|
+
const tag = node.tag ?? (tagObj.default ? null : tagObj.tag);
|
|
13654
13703
|
if (tag)
|
|
13655
13704
|
props.push(doc.directives.tagString(tag));
|
|
13656
13705
|
return props.join(" ");
|
|
@@ -13673,8 +13722,7 @@ var require_stringify = __commonJS({
|
|
|
13673
13722
|
}
|
|
13674
13723
|
let tagObj = void 0;
|
|
13675
13724
|
const node = identity.isNode(item) ? item : ctx.doc.createNode(item, { onTagObj: (o) => tagObj = o });
|
|
13676
|
-
|
|
13677
|
-
tagObj = getTagObject(ctx.doc.schema.tags, node);
|
|
13725
|
+
tagObj ?? (tagObj = getTagObject(ctx.doc.schema.tags, node));
|
|
13678
13726
|
const props = stringifyProps(node, tagObj, ctx);
|
|
13679
13727
|
if (props.length > 0)
|
|
13680
13728
|
ctx.indentAtStart = (ctx.indentAtStart ?? 0) + props.length + 1;
|
|
@@ -13689,9 +13737,9 @@ ${ctx.indent}${str}`;
|
|
|
13689
13737
|
}
|
|
13690
13738
|
});
|
|
13691
13739
|
|
|
13692
|
-
// ../../node_modules/.pnpm/yaml@2.
|
|
13740
|
+
// ../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/stringify/stringifyPair.js
|
|
13693
13741
|
var require_stringifyPair = __commonJS({
|
|
13694
|
-
"../../node_modules/.pnpm/yaml@2.
|
|
13742
|
+
"../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/stringify/stringifyPair.js"(exports2) {
|
|
13695
13743
|
"use strict";
|
|
13696
13744
|
var identity = require_identity();
|
|
13697
13745
|
var Scalar = require_Scalar();
|
|
@@ -13704,7 +13752,7 @@ var require_stringifyPair = __commonJS({
|
|
|
13704
13752
|
if (keyComment) {
|
|
13705
13753
|
throw new Error("With simple keys, key nodes cannot have comments");
|
|
13706
13754
|
}
|
|
13707
|
-
if (identity.isCollection(key)) {
|
|
13755
|
+
if (identity.isCollection(key) || !identity.isNode(key) && typeof key === "object") {
|
|
13708
13756
|
const msg = "With simple keys, collection cannot be used as a key value";
|
|
13709
13757
|
throw new Error(msg);
|
|
13710
13758
|
}
|
|
@@ -13779,7 +13827,7 @@ ${indent}:`;
|
|
|
13779
13827
|
${stringifyComment.indentComment(cs, ctx.indent)}`;
|
|
13780
13828
|
}
|
|
13781
13829
|
if (valueStr === "" && !ctx.inFlow) {
|
|
13782
|
-
if (ws === "\n")
|
|
13830
|
+
if (ws === "\n" && valueComment)
|
|
13783
13831
|
ws = "\n\n";
|
|
13784
13832
|
} else {
|
|
13785
13833
|
ws += `
|
|
@@ -13822,18 +13870,19 @@ ${ctx.indent}`;
|
|
|
13822
13870
|
}
|
|
13823
13871
|
});
|
|
13824
13872
|
|
|
13825
|
-
// ../../node_modules/.pnpm/yaml@2.
|
|
13873
|
+
// ../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/log.js
|
|
13826
13874
|
var require_log = __commonJS({
|
|
13827
|
-
"../../node_modules/.pnpm/yaml@2.
|
|
13875
|
+
"../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/log.js"(exports2) {
|
|
13828
13876
|
"use strict";
|
|
13877
|
+
var node_process = require("process");
|
|
13829
13878
|
function debug2(logLevel, ...messages) {
|
|
13830
13879
|
if (logLevel === "debug")
|
|
13831
13880
|
console.log(...messages);
|
|
13832
13881
|
}
|
|
13833
13882
|
function warn(logLevel, warning) {
|
|
13834
13883
|
if (logLevel === "debug" || logLevel === "warn") {
|
|
13835
|
-
if (typeof
|
|
13836
|
-
|
|
13884
|
+
if (typeof node_process.emitWarning === "function")
|
|
13885
|
+
node_process.emitWarning(warning);
|
|
13837
13886
|
else
|
|
13838
13887
|
console.warn(warning);
|
|
13839
13888
|
}
|
|
@@ -13843,28 +13892,78 @@ var require_log = __commonJS({
|
|
|
13843
13892
|
}
|
|
13844
13893
|
});
|
|
13845
13894
|
|
|
13846
|
-
// ../../node_modules/.pnpm/yaml@2.
|
|
13895
|
+
// ../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/schema/yaml-1.1/merge.js
|
|
13896
|
+
var require_merge = __commonJS({
|
|
13897
|
+
"../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/schema/yaml-1.1/merge.js"(exports2) {
|
|
13898
|
+
"use strict";
|
|
13899
|
+
var identity = require_identity();
|
|
13900
|
+
var Scalar = require_Scalar();
|
|
13901
|
+
var MERGE_KEY = "<<";
|
|
13902
|
+
var merge2 = {
|
|
13903
|
+
identify: (value) => value === MERGE_KEY || typeof value === "symbol" && value.description === MERGE_KEY,
|
|
13904
|
+
default: "key",
|
|
13905
|
+
tag: "tag:yaml.org,2002:merge",
|
|
13906
|
+
test: /^<<$/,
|
|
13907
|
+
resolve: () => Object.assign(new Scalar.Scalar(Symbol(MERGE_KEY)), {
|
|
13908
|
+
addToJSMap: addMergeToJSMap
|
|
13909
|
+
}),
|
|
13910
|
+
stringify: () => MERGE_KEY
|
|
13911
|
+
};
|
|
13912
|
+
var isMergeKey = (ctx, key) => (merge2.identify(key) || identity.isScalar(key) && (!key.type || key.type === Scalar.Scalar.PLAIN) && merge2.identify(key.value)) && ctx?.doc.schema.tags.some((tag) => tag.tag === merge2.tag && tag.default);
|
|
13913
|
+
function addMergeToJSMap(ctx, map, value) {
|
|
13914
|
+
value = ctx && identity.isAlias(value) ? value.resolve(ctx.doc) : value;
|
|
13915
|
+
if (identity.isSeq(value))
|
|
13916
|
+
for (const it of value.items)
|
|
13917
|
+
mergeValue(ctx, map, it);
|
|
13918
|
+
else if (Array.isArray(value))
|
|
13919
|
+
for (const it of value)
|
|
13920
|
+
mergeValue(ctx, map, it);
|
|
13921
|
+
else
|
|
13922
|
+
mergeValue(ctx, map, value);
|
|
13923
|
+
}
|
|
13924
|
+
function mergeValue(ctx, map, value) {
|
|
13925
|
+
const source = ctx && identity.isAlias(value) ? value.resolve(ctx.doc) : value;
|
|
13926
|
+
if (!identity.isMap(source))
|
|
13927
|
+
throw new Error("Merge sources must be maps or map aliases");
|
|
13928
|
+
const srcMap = source.toJSON(null, ctx, Map);
|
|
13929
|
+
for (const [key, value2] of srcMap) {
|
|
13930
|
+
if (map instanceof Map) {
|
|
13931
|
+
if (!map.has(key))
|
|
13932
|
+
map.set(key, value2);
|
|
13933
|
+
} else if (map instanceof Set) {
|
|
13934
|
+
map.add(key);
|
|
13935
|
+
} else if (!Object.prototype.hasOwnProperty.call(map, key)) {
|
|
13936
|
+
Object.defineProperty(map, key, {
|
|
13937
|
+
value: value2,
|
|
13938
|
+
writable: true,
|
|
13939
|
+
enumerable: true,
|
|
13940
|
+
configurable: true
|
|
13941
|
+
});
|
|
13942
|
+
}
|
|
13943
|
+
}
|
|
13944
|
+
return map;
|
|
13945
|
+
}
|
|
13946
|
+
exports2.addMergeToJSMap = addMergeToJSMap;
|
|
13947
|
+
exports2.isMergeKey = isMergeKey;
|
|
13948
|
+
exports2.merge = merge2;
|
|
13949
|
+
}
|
|
13950
|
+
});
|
|
13951
|
+
|
|
13952
|
+
// ../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/nodes/addPairToJSMap.js
|
|
13847
13953
|
var require_addPairToJSMap = __commonJS({
|
|
13848
|
-
"../../node_modules/.pnpm/yaml@2.
|
|
13954
|
+
"../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/nodes/addPairToJSMap.js"(exports2) {
|
|
13849
13955
|
"use strict";
|
|
13850
13956
|
var log = require_log();
|
|
13957
|
+
var merge2 = require_merge();
|
|
13851
13958
|
var stringify3 = require_stringify();
|
|
13852
13959
|
var identity = require_identity();
|
|
13853
|
-
var Scalar = require_Scalar();
|
|
13854
13960
|
var toJS = require_toJS();
|
|
13855
|
-
var MERGE_KEY = "<<";
|
|
13856
13961
|
function addPairToJSMap(ctx, map, { key, value }) {
|
|
13857
|
-
if (
|
|
13858
|
-
|
|
13859
|
-
|
|
13860
|
-
|
|
13861
|
-
|
|
13862
|
-
else if (Array.isArray(value))
|
|
13863
|
-
for (const it of value)
|
|
13864
|
-
mergeToJSMap(ctx, map, it);
|
|
13865
|
-
else
|
|
13866
|
-
mergeToJSMap(ctx, map, value);
|
|
13867
|
-
} else {
|
|
13962
|
+
if (identity.isNode(key) && key.addToJSMap)
|
|
13963
|
+
key.addToJSMap(ctx, map, value);
|
|
13964
|
+
else if (merge2.isMergeKey(ctx, key))
|
|
13965
|
+
merge2.addMergeToJSMap(ctx, map, value);
|
|
13966
|
+
else {
|
|
13868
13967
|
const jsKey = toJS.toJS(key, "", ctx);
|
|
13869
13968
|
if (map instanceof Map) {
|
|
13870
13969
|
map.set(jsKey, toJS.toJS(value, jsKey, ctx));
|
|
@@ -13886,29 +13985,6 @@ var require_addPairToJSMap = __commonJS({
|
|
|
13886
13985
|
}
|
|
13887
13986
|
return map;
|
|
13888
13987
|
}
|
|
13889
|
-
var isMergeKey = (key) => key === MERGE_KEY || identity.isScalar(key) && key.value === MERGE_KEY && (!key.type || key.type === Scalar.Scalar.PLAIN);
|
|
13890
|
-
function mergeToJSMap(ctx, map, value) {
|
|
13891
|
-
const source = ctx && identity.isAlias(value) ? value.resolve(ctx.doc) : value;
|
|
13892
|
-
if (!identity.isMap(source))
|
|
13893
|
-
throw new Error("Merge sources must be maps or map aliases");
|
|
13894
|
-
const srcMap = source.toJSON(null, ctx, Map);
|
|
13895
|
-
for (const [key, value2] of srcMap) {
|
|
13896
|
-
if (map instanceof Map) {
|
|
13897
|
-
if (!map.has(key))
|
|
13898
|
-
map.set(key, value2);
|
|
13899
|
-
} else if (map instanceof Set) {
|
|
13900
|
-
map.add(key);
|
|
13901
|
-
} else if (!Object.prototype.hasOwnProperty.call(map, key)) {
|
|
13902
|
-
Object.defineProperty(map, key, {
|
|
13903
|
-
value: value2,
|
|
13904
|
-
writable: true,
|
|
13905
|
-
enumerable: true,
|
|
13906
|
-
configurable: true
|
|
13907
|
-
});
|
|
13908
|
-
}
|
|
13909
|
-
}
|
|
13910
|
-
return map;
|
|
13911
|
-
}
|
|
13912
13988
|
function stringifyKey(key, jsKey, ctx) {
|
|
13913
13989
|
if (jsKey === null)
|
|
13914
13990
|
return "";
|
|
@@ -13937,9 +14013,9 @@ var require_addPairToJSMap = __commonJS({
|
|
|
13937
14013
|
}
|
|
13938
14014
|
});
|
|
13939
14015
|
|
|
13940
|
-
// ../../node_modules/.pnpm/yaml@2.
|
|
14016
|
+
// ../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/nodes/Pair.js
|
|
13941
14017
|
var require_Pair = __commonJS({
|
|
13942
|
-
"../../node_modules/.pnpm/yaml@2.
|
|
14018
|
+
"../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/nodes/Pair.js"(exports2) {
|
|
13943
14019
|
"use strict";
|
|
13944
14020
|
var createNode = require_createNode();
|
|
13945
14021
|
var stringifyPair = require_stringifyPair();
|
|
@@ -13977,11 +14053,10 @@ var require_Pair = __commonJS({
|
|
|
13977
14053
|
}
|
|
13978
14054
|
});
|
|
13979
14055
|
|
|
13980
|
-
// ../../node_modules/.pnpm/yaml@2.
|
|
14056
|
+
// ../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/stringify/stringifyCollection.js
|
|
13981
14057
|
var require_stringifyCollection = __commonJS({
|
|
13982
|
-
"../../node_modules/.pnpm/yaml@2.
|
|
14058
|
+
"../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/stringify/stringifyCollection.js"(exports2) {
|
|
13983
14059
|
"use strict";
|
|
13984
|
-
var Collection2 = require_Collection();
|
|
13985
14060
|
var identity = require_identity();
|
|
13986
14061
|
var stringify3 = require_stringify();
|
|
13987
14062
|
var stringifyComment = require_stringifyComment();
|
|
@@ -14039,7 +14114,7 @@ ${indent}${line}` : "\n";
|
|
|
14039
14114
|
onChompKeep();
|
|
14040
14115
|
return str;
|
|
14041
14116
|
}
|
|
14042
|
-
function stringifyFlowCollection({
|
|
14117
|
+
function stringifyFlowCollection({ items }, ctx, { flowChars, itemIndent }) {
|
|
14043
14118
|
const { indent, indentStep, flowCollectionPadding: fcPadding, options: { commentString } } = ctx;
|
|
14044
14119
|
itemIndent += indentStep;
|
|
14045
14120
|
const itemCtx = Object.assign({}, ctx, {
|
|
@@ -14052,13 +14127,13 @@ ${indent}${line}` : "\n";
|
|
|
14052
14127
|
const lines = [];
|
|
14053
14128
|
for (let i = 0; i < items.length; ++i) {
|
|
14054
14129
|
const item = items[i];
|
|
14055
|
-
let
|
|
14130
|
+
let comment = null;
|
|
14056
14131
|
if (identity.isNode(item)) {
|
|
14057
14132
|
if (item.spaceBefore)
|
|
14058
14133
|
lines.push("");
|
|
14059
14134
|
addCommentBefore(ctx, lines, item.commentBefore, false);
|
|
14060
14135
|
if (item.comment)
|
|
14061
|
-
|
|
14136
|
+
comment = item.comment;
|
|
14062
14137
|
} else if (identity.isPair(item)) {
|
|
14063
14138
|
const ik = identity.isNode(item.key) ? item.key : null;
|
|
14064
14139
|
if (ik) {
|
|
@@ -14071,51 +14146,51 @@ ${indent}${line}` : "\n";
|
|
|
14071
14146
|
const iv = identity.isNode(item.value) ? item.value : null;
|
|
14072
14147
|
if (iv) {
|
|
14073
14148
|
if (iv.comment)
|
|
14074
|
-
|
|
14149
|
+
comment = iv.comment;
|
|
14075
14150
|
if (iv.commentBefore)
|
|
14076
14151
|
reqNewline = true;
|
|
14077
14152
|
} else if (item.value == null && ik?.comment) {
|
|
14078
|
-
|
|
14153
|
+
comment = ik.comment;
|
|
14079
14154
|
}
|
|
14080
14155
|
}
|
|
14081
|
-
if (
|
|
14082
|
-
reqNewline = true;
|
|
14083
|
-
let str2 = stringify3.stringify(item, itemCtx, () => comment2 = null);
|
|
14084
|
-
if (i < items.length - 1)
|
|
14085
|
-
str2 += ",";
|
|
14086
|
-
if (comment2)
|
|
14087
|
-
str2 += stringifyComment.lineComment(str2, itemIndent, commentString(comment2));
|
|
14088
|
-
if (!reqNewline && (lines.length > linesAtValue || str2.includes("\n")))
|
|
14156
|
+
if (comment)
|
|
14089
14157
|
reqNewline = true;
|
|
14090
|
-
|
|
14158
|
+
let str = stringify3.stringify(item, itemCtx, () => comment = null);
|
|
14159
|
+
reqNewline || (reqNewline = lines.length > linesAtValue || str.includes("\n"));
|
|
14160
|
+
if (i < items.length - 1) {
|
|
14161
|
+
str += ",";
|
|
14162
|
+
} else if (ctx.options.trailingComma) {
|
|
14163
|
+
if (ctx.options.lineWidth > 0) {
|
|
14164
|
+
reqNewline || (reqNewline = lines.reduce((sum, line) => sum + line.length + 2, 2) + (str.length + 2) > ctx.options.lineWidth);
|
|
14165
|
+
}
|
|
14166
|
+
if (reqNewline) {
|
|
14167
|
+
str += ",";
|
|
14168
|
+
}
|
|
14169
|
+
}
|
|
14170
|
+
if (comment)
|
|
14171
|
+
str += stringifyComment.lineComment(str, itemIndent, commentString(comment));
|
|
14172
|
+
lines.push(str);
|
|
14091
14173
|
linesAtValue = lines.length;
|
|
14092
14174
|
}
|
|
14093
|
-
let str;
|
|
14094
14175
|
const { start, end } = flowChars;
|
|
14095
14176
|
if (lines.length === 0) {
|
|
14096
|
-
|
|
14177
|
+
return start + end;
|
|
14097
14178
|
} else {
|
|
14098
14179
|
if (!reqNewline) {
|
|
14099
14180
|
const len = lines.reduce((sum, line) => sum + line.length + 2, 2);
|
|
14100
|
-
reqNewline = len >
|
|
14181
|
+
reqNewline = ctx.options.lineWidth > 0 && len > ctx.options.lineWidth;
|
|
14101
14182
|
}
|
|
14102
14183
|
if (reqNewline) {
|
|
14103
|
-
str = start;
|
|
14184
|
+
let str = start;
|
|
14104
14185
|
for (const line of lines)
|
|
14105
14186
|
str += line ? `
|
|
14106
14187
|
${indentStep}${indent}${line}` : "\n";
|
|
14107
|
-
str
|
|
14188
|
+
return `${str}
|
|
14108
14189
|
${indent}${end}`;
|
|
14109
14190
|
} else {
|
|
14110
|
-
|
|
14191
|
+
return `${start}${fcPadding}${lines.join(" ")}${fcPadding}${end}`;
|
|
14111
14192
|
}
|
|
14112
14193
|
}
|
|
14113
|
-
if (comment) {
|
|
14114
|
-
str += stringifyComment.lineComment(str, indent, commentString(comment));
|
|
14115
|
-
if (onComment)
|
|
14116
|
-
onComment();
|
|
14117
|
-
}
|
|
14118
|
-
return str;
|
|
14119
14194
|
}
|
|
14120
14195
|
function addCommentBefore({ indent, options: { commentString } }, lines, comment, chompKeep) {
|
|
14121
14196
|
if (comment && chompKeep)
|
|
@@ -14129,9 +14204,9 @@ ${indent}${end}`;
|
|
|
14129
14204
|
}
|
|
14130
14205
|
});
|
|
14131
14206
|
|
|
14132
|
-
// ../../node_modules/.pnpm/yaml@2.
|
|
14207
|
+
// ../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/nodes/YAMLMap.js
|
|
14133
14208
|
var require_YAMLMap = __commonJS({
|
|
14134
|
-
"../../node_modules/.pnpm/yaml@2.
|
|
14209
|
+
"../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/nodes/YAMLMap.js"(exports2) {
|
|
14135
14210
|
"use strict";
|
|
14136
14211
|
var stringifyCollection = require_stringifyCollection();
|
|
14137
14212
|
var addPairToJSMap = require_addPairToJSMap();
|
|
@@ -14273,9 +14348,9 @@ var require_YAMLMap = __commonJS({
|
|
|
14273
14348
|
}
|
|
14274
14349
|
});
|
|
14275
14350
|
|
|
14276
|
-
// ../../node_modules/.pnpm/yaml@2.
|
|
14351
|
+
// ../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/schema/common/map.js
|
|
14277
14352
|
var require_map = __commonJS({
|
|
14278
|
-
"../../node_modules/.pnpm/yaml@2.
|
|
14353
|
+
"../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/schema/common/map.js"(exports2) {
|
|
14279
14354
|
"use strict";
|
|
14280
14355
|
var identity = require_identity();
|
|
14281
14356
|
var YAMLMap = require_YAMLMap();
|
|
@@ -14295,9 +14370,9 @@ var require_map = __commonJS({
|
|
|
14295
14370
|
}
|
|
14296
14371
|
});
|
|
14297
14372
|
|
|
14298
|
-
// ../../node_modules/.pnpm/yaml@2.
|
|
14373
|
+
// ../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/nodes/YAMLSeq.js
|
|
14299
14374
|
var require_YAMLSeq = __commonJS({
|
|
14300
|
-
"../../node_modules/.pnpm/yaml@2.
|
|
14375
|
+
"../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/nodes/YAMLSeq.js"(exports2) {
|
|
14301
14376
|
"use strict";
|
|
14302
14377
|
var createNode = require_createNode();
|
|
14303
14378
|
var stringifyCollection = require_stringifyCollection();
|
|
@@ -14411,9 +14486,9 @@ var require_YAMLSeq = __commonJS({
|
|
|
14411
14486
|
}
|
|
14412
14487
|
});
|
|
14413
14488
|
|
|
14414
|
-
// ../../node_modules/.pnpm/yaml@2.
|
|
14489
|
+
// ../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/schema/common/seq.js
|
|
14415
14490
|
var require_seq = __commonJS({
|
|
14416
|
-
"../../node_modules/.pnpm/yaml@2.
|
|
14491
|
+
"../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/schema/common/seq.js"(exports2) {
|
|
14417
14492
|
"use strict";
|
|
14418
14493
|
var identity = require_identity();
|
|
14419
14494
|
var YAMLSeq = require_YAMLSeq();
|
|
@@ -14433,9 +14508,9 @@ var require_seq = __commonJS({
|
|
|
14433
14508
|
}
|
|
14434
14509
|
});
|
|
14435
14510
|
|
|
14436
|
-
// ../../node_modules/.pnpm/yaml@2.
|
|
14511
|
+
// ../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/schema/common/string.js
|
|
14437
14512
|
var require_string = __commonJS({
|
|
14438
|
-
"../../node_modules/.pnpm/yaml@2.
|
|
14513
|
+
"../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/schema/common/string.js"(exports2) {
|
|
14439
14514
|
"use strict";
|
|
14440
14515
|
var stringifyString = require_stringifyString();
|
|
14441
14516
|
var string2 = {
|
|
@@ -14452,9 +14527,9 @@ var require_string = __commonJS({
|
|
|
14452
14527
|
}
|
|
14453
14528
|
});
|
|
14454
14529
|
|
|
14455
|
-
// ../../node_modules/.pnpm/yaml@2.
|
|
14530
|
+
// ../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/schema/common/null.js
|
|
14456
14531
|
var require_null = __commonJS({
|
|
14457
|
-
"../../node_modules/.pnpm/yaml@2.
|
|
14532
|
+
"../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/schema/common/null.js"(exports2) {
|
|
14458
14533
|
"use strict";
|
|
14459
14534
|
var Scalar = require_Scalar();
|
|
14460
14535
|
var nullTag = {
|
|
@@ -14470,9 +14545,9 @@ var require_null = __commonJS({
|
|
|
14470
14545
|
}
|
|
14471
14546
|
});
|
|
14472
14547
|
|
|
14473
|
-
// ../../node_modules/.pnpm/yaml@2.
|
|
14548
|
+
// ../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/schema/core/bool.js
|
|
14474
14549
|
var require_bool = __commonJS({
|
|
14475
|
-
"../../node_modules/.pnpm/yaml@2.
|
|
14550
|
+
"../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/schema/core/bool.js"(exports2) {
|
|
14476
14551
|
"use strict";
|
|
14477
14552
|
var Scalar = require_Scalar();
|
|
14478
14553
|
var boolTag = {
|
|
@@ -14494,9 +14569,9 @@ var require_bool = __commonJS({
|
|
|
14494
14569
|
}
|
|
14495
14570
|
});
|
|
14496
14571
|
|
|
14497
|
-
// ../../node_modules/.pnpm/yaml@2.
|
|
14572
|
+
// ../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/stringify/stringifyNumber.js
|
|
14498
14573
|
var require_stringifyNumber = __commonJS({
|
|
14499
|
-
"../../node_modules/.pnpm/yaml@2.
|
|
14574
|
+
"../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/stringify/stringifyNumber.js"(exports2) {
|
|
14500
14575
|
"use strict";
|
|
14501
14576
|
function stringifyNumber({ format: format3, minFractionDigits, tag, value }) {
|
|
14502
14577
|
if (typeof value === "bigint")
|
|
@@ -14504,7 +14579,7 @@ var require_stringifyNumber = __commonJS({
|
|
|
14504
14579
|
const num = typeof value === "number" ? value : Number(value);
|
|
14505
14580
|
if (!isFinite(num))
|
|
14506
14581
|
return isNaN(num) ? ".nan" : num < 0 ? "-.inf" : ".inf";
|
|
14507
|
-
let n = JSON.stringify(value);
|
|
14582
|
+
let n = Object.is(value, -0) ? "-0" : JSON.stringify(value);
|
|
14508
14583
|
if (!format3 && minFractionDigits && (!tag || tag === "tag:yaml.org,2002:float") && /^\d/.test(n)) {
|
|
14509
14584
|
let i = n.indexOf(".");
|
|
14510
14585
|
if (i < 0) {
|
|
@@ -14521,9 +14596,9 @@ var require_stringifyNumber = __commonJS({
|
|
|
14521
14596
|
}
|
|
14522
14597
|
});
|
|
14523
14598
|
|
|
14524
|
-
// ../../node_modules/.pnpm/yaml@2.
|
|
14599
|
+
// ../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/schema/core/float.js
|
|
14525
14600
|
var require_float = __commonJS({
|
|
14526
|
-
"../../node_modules/.pnpm/yaml@2.
|
|
14601
|
+
"../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/schema/core/float.js"(exports2) {
|
|
14527
14602
|
"use strict";
|
|
14528
14603
|
var Scalar = require_Scalar();
|
|
14529
14604
|
var stringifyNumber = require_stringifyNumber();
|
|
@@ -14531,7 +14606,7 @@ var require_float = __commonJS({
|
|
|
14531
14606
|
identify: (value) => typeof value === "number",
|
|
14532
14607
|
default: true,
|
|
14533
14608
|
tag: "tag:yaml.org,2002:float",
|
|
14534
|
-
test: /^(?:[-+]?\.(?:inf|Inf|INF
|
|
14609
|
+
test: /^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,
|
|
14535
14610
|
resolve: (str) => str.slice(-3).toLowerCase() === "nan" ? NaN : str[0] === "-" ? Number.NEGATIVE_INFINITY : Number.POSITIVE_INFINITY,
|
|
14536
14611
|
stringify: stringifyNumber.stringifyNumber
|
|
14537
14612
|
};
|
|
@@ -14567,9 +14642,9 @@ var require_float = __commonJS({
|
|
|
14567
14642
|
}
|
|
14568
14643
|
});
|
|
14569
14644
|
|
|
14570
|
-
// ../../node_modules/.pnpm/yaml@2.
|
|
14645
|
+
// ../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/schema/core/int.js
|
|
14571
14646
|
var require_int = __commonJS({
|
|
14572
|
-
"../../node_modules/.pnpm/yaml@2.
|
|
14647
|
+
"../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/schema/core/int.js"(exports2) {
|
|
14573
14648
|
"use strict";
|
|
14574
14649
|
var stringifyNumber = require_stringifyNumber();
|
|
14575
14650
|
var intIdentify = (value) => typeof value === "bigint" || Number.isInteger(value);
|
|
@@ -14612,9 +14687,9 @@ var require_int = __commonJS({
|
|
|
14612
14687
|
}
|
|
14613
14688
|
});
|
|
14614
14689
|
|
|
14615
|
-
// ../../node_modules/.pnpm/yaml@2.
|
|
14690
|
+
// ../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/schema/core/schema.js
|
|
14616
14691
|
var require_schema = __commonJS({
|
|
14617
|
-
"../../node_modules/.pnpm/yaml@2.
|
|
14692
|
+
"../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/schema/core/schema.js"(exports2) {
|
|
14618
14693
|
"use strict";
|
|
14619
14694
|
var map = require_map();
|
|
14620
14695
|
var _null = require_null();
|
|
@@ -14640,9 +14715,9 @@ var require_schema = __commonJS({
|
|
|
14640
14715
|
}
|
|
14641
14716
|
});
|
|
14642
14717
|
|
|
14643
|
-
// ../../node_modules/.pnpm/yaml@2.
|
|
14718
|
+
// ../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/schema/json/schema.js
|
|
14644
14719
|
var require_schema2 = __commonJS({
|
|
14645
|
-
"../../node_modules/.pnpm/yaml@2.
|
|
14720
|
+
"../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/schema/json/schema.js"(exports2) {
|
|
14646
14721
|
"use strict";
|
|
14647
14722
|
var Scalar = require_Scalar();
|
|
14648
14723
|
var map = require_map();
|
|
@@ -14672,7 +14747,7 @@ var require_schema2 = __commonJS({
|
|
|
14672
14747
|
identify: (value) => typeof value === "boolean",
|
|
14673
14748
|
default: true,
|
|
14674
14749
|
tag: "tag:yaml.org,2002:bool",
|
|
14675
|
-
test: /^true
|
|
14750
|
+
test: /^true$|^false$/,
|
|
14676
14751
|
resolve: (str) => str === "true",
|
|
14677
14752
|
stringify: stringifyJSON
|
|
14678
14753
|
},
|
|
@@ -14707,14 +14782,16 @@ var require_schema2 = __commonJS({
|
|
|
14707
14782
|
}
|
|
14708
14783
|
});
|
|
14709
14784
|
|
|
14710
|
-
// ../../node_modules/.pnpm/yaml@2.
|
|
14785
|
+
// ../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/schema/yaml-1.1/binary.js
|
|
14711
14786
|
var require_binary = __commonJS({
|
|
14712
|
-
"../../node_modules/.pnpm/yaml@2.
|
|
14787
|
+
"../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/schema/yaml-1.1/binary.js"(exports2) {
|
|
14713
14788
|
"use strict";
|
|
14789
|
+
var node_buffer = require("buffer");
|
|
14714
14790
|
var Scalar = require_Scalar();
|
|
14715
14791
|
var stringifyString = require_stringifyString();
|
|
14716
14792
|
var binary = {
|
|
14717
14793
|
identify: (value) => value instanceof Uint8Array,
|
|
14794
|
+
// Buffer inherits from Uint8Array
|
|
14718
14795
|
default: false,
|
|
14719
14796
|
tag: "tag:yaml.org,2002:binary",
|
|
14720
14797
|
/**
|
|
@@ -14726,8 +14803,8 @@ var require_binary = __commonJS({
|
|
|
14726
14803
|
* document.querySelector('#photo').src = URL.createObjectURL(blob)
|
|
14727
14804
|
*/
|
|
14728
14805
|
resolve(src, onError2) {
|
|
14729
|
-
if (typeof Buffer === "function") {
|
|
14730
|
-
return Buffer.from(src, "base64");
|
|
14806
|
+
if (typeof node_buffer.Buffer === "function") {
|
|
14807
|
+
return node_buffer.Buffer.from(src, "base64");
|
|
14731
14808
|
} else if (typeof atob === "function") {
|
|
14732
14809
|
const str = atob(src.replace(/[\n\r]/g, ""));
|
|
14733
14810
|
const buffer = new Uint8Array(str.length);
|
|
@@ -14740,10 +14817,12 @@ var require_binary = __commonJS({
|
|
|
14740
14817
|
}
|
|
14741
14818
|
},
|
|
14742
14819
|
stringify({ comment, type, value }, ctx, onComment, onChompKeep) {
|
|
14820
|
+
if (!value)
|
|
14821
|
+
return "";
|
|
14743
14822
|
const buf = value;
|
|
14744
14823
|
let str;
|
|
14745
|
-
if (typeof Buffer === "function") {
|
|
14746
|
-
str = buf instanceof Buffer ? buf.toString("base64") : Buffer.from(buf.buffer).toString("base64");
|
|
14824
|
+
if (typeof node_buffer.Buffer === "function") {
|
|
14825
|
+
str = buf instanceof node_buffer.Buffer ? buf.toString("base64") : node_buffer.Buffer.from(buf.buffer).toString("base64");
|
|
14747
14826
|
} else if (typeof btoa === "function") {
|
|
14748
14827
|
let s = "";
|
|
14749
14828
|
for (let i = 0; i < buf.length; ++i)
|
|
@@ -14752,8 +14831,7 @@ var require_binary = __commonJS({
|
|
|
14752
14831
|
} else {
|
|
14753
14832
|
throw new Error("This environment does not support writing binary tags; either Buffer or btoa is required");
|
|
14754
14833
|
}
|
|
14755
|
-
|
|
14756
|
-
type = Scalar.Scalar.BLOCK_LITERAL;
|
|
14834
|
+
type ?? (type = Scalar.Scalar.BLOCK_LITERAL);
|
|
14757
14835
|
if (type !== Scalar.Scalar.QUOTE_DOUBLE) {
|
|
14758
14836
|
const lineWidth = Math.max(ctx.options.lineWidth - ctx.indent.length, ctx.options.minContentWidth);
|
|
14759
14837
|
const n = Math.ceil(str.length / lineWidth);
|
|
@@ -14770,9 +14848,9 @@ var require_binary = __commonJS({
|
|
|
14770
14848
|
}
|
|
14771
14849
|
});
|
|
14772
14850
|
|
|
14773
|
-
// ../../node_modules/.pnpm/yaml@2.
|
|
14851
|
+
// ../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/schema/yaml-1.1/pairs.js
|
|
14774
14852
|
var require_pairs = __commonJS({
|
|
14775
|
-
"../../node_modules/.pnpm/yaml@2.
|
|
14853
|
+
"../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/schema/yaml-1.1/pairs.js"(exports2) {
|
|
14776
14854
|
"use strict";
|
|
14777
14855
|
var identity = require_identity();
|
|
14778
14856
|
var Pair = require_Pair();
|
|
@@ -14848,9 +14926,9 @@ ${cn.comment}` : item.comment;
|
|
|
14848
14926
|
}
|
|
14849
14927
|
});
|
|
14850
14928
|
|
|
14851
|
-
// ../../node_modules/.pnpm/yaml@2.
|
|
14929
|
+
// ../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/schema/yaml-1.1/omap.js
|
|
14852
14930
|
var require_omap = __commonJS({
|
|
14853
|
-
"../../node_modules/.pnpm/yaml@2.
|
|
14931
|
+
"../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/schema/yaml-1.1/omap.js"(exports2) {
|
|
14854
14932
|
"use strict";
|
|
14855
14933
|
var identity = require_identity();
|
|
14856
14934
|
var toJS = require_toJS();
|
|
@@ -14926,9 +15004,9 @@ var require_omap = __commonJS({
|
|
|
14926
15004
|
}
|
|
14927
15005
|
});
|
|
14928
15006
|
|
|
14929
|
-
// ../../node_modules/.pnpm/yaml@2.
|
|
15007
|
+
// ../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/schema/yaml-1.1/bool.js
|
|
14930
15008
|
var require_bool2 = __commonJS({
|
|
14931
|
-
"../../node_modules/.pnpm/yaml@2.
|
|
15009
|
+
"../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/schema/yaml-1.1/bool.js"(exports2) {
|
|
14932
15010
|
"use strict";
|
|
14933
15011
|
var Scalar = require_Scalar();
|
|
14934
15012
|
function boolStringify({ value, source }, ctx) {
|
|
@@ -14949,7 +15027,7 @@ var require_bool2 = __commonJS({
|
|
|
14949
15027
|
identify: (value) => value === false,
|
|
14950
15028
|
default: true,
|
|
14951
15029
|
tag: "tag:yaml.org,2002:bool",
|
|
14952
|
-
test: /^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)
|
|
15030
|
+
test: /^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,
|
|
14953
15031
|
resolve: () => new Scalar.Scalar(false),
|
|
14954
15032
|
stringify: boolStringify
|
|
14955
15033
|
};
|
|
@@ -14958,9 +15036,9 @@ var require_bool2 = __commonJS({
|
|
|
14958
15036
|
}
|
|
14959
15037
|
});
|
|
14960
15038
|
|
|
14961
|
-
// ../../node_modules/.pnpm/yaml@2.
|
|
15039
|
+
// ../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/schema/yaml-1.1/float.js
|
|
14962
15040
|
var require_float2 = __commonJS({
|
|
14963
|
-
"../../node_modules/.pnpm/yaml@2.
|
|
15041
|
+
"../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/schema/yaml-1.1/float.js"(exports2) {
|
|
14964
15042
|
"use strict";
|
|
14965
15043
|
var Scalar = require_Scalar();
|
|
14966
15044
|
var stringifyNumber = require_stringifyNumber();
|
|
@@ -14968,7 +15046,7 @@ var require_float2 = __commonJS({
|
|
|
14968
15046
|
identify: (value) => typeof value === "number",
|
|
14969
15047
|
default: true,
|
|
14970
15048
|
tag: "tag:yaml.org,2002:float",
|
|
14971
|
-
test: /^[-+]?\.(?:inf|Inf|INF
|
|
15049
|
+
test: /^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,
|
|
14972
15050
|
resolve: (str) => str.slice(-3).toLowerCase() === "nan" ? NaN : str[0] === "-" ? Number.NEGATIVE_INFINITY : Number.POSITIVE_INFINITY,
|
|
14973
15051
|
stringify: stringifyNumber.stringifyNumber
|
|
14974
15052
|
};
|
|
@@ -15007,9 +15085,9 @@ var require_float2 = __commonJS({
|
|
|
15007
15085
|
}
|
|
15008
15086
|
});
|
|
15009
15087
|
|
|
15010
|
-
// ../../node_modules/.pnpm/yaml@2.
|
|
15088
|
+
// ../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/schema/yaml-1.1/int.js
|
|
15011
15089
|
var require_int2 = __commonJS({
|
|
15012
|
-
"../../node_modules/.pnpm/yaml@2.
|
|
15090
|
+
"../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/schema/yaml-1.1/int.js"(exports2) {
|
|
15013
15091
|
"use strict";
|
|
15014
15092
|
var stringifyNumber = require_stringifyNumber();
|
|
15015
15093
|
var intIdentify = (value) => typeof value === "bigint" || Number.isInteger(value);
|
|
@@ -15086,9 +15164,9 @@ var require_int2 = __commonJS({
|
|
|
15086
15164
|
}
|
|
15087
15165
|
});
|
|
15088
15166
|
|
|
15089
|
-
// ../../node_modules/.pnpm/yaml@2.
|
|
15167
|
+
// ../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/schema/yaml-1.1/set.js
|
|
15090
15168
|
var require_set = __commonJS({
|
|
15091
|
-
"../../node_modules/.pnpm/yaml@2.
|
|
15169
|
+
"../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/schema/yaml-1.1/set.js"(exports2) {
|
|
15092
15170
|
"use strict";
|
|
15093
15171
|
var identity = require_identity();
|
|
15094
15172
|
var Pair = require_Pair();
|
|
@@ -15175,9 +15253,9 @@ var require_set = __commonJS({
|
|
|
15175
15253
|
}
|
|
15176
15254
|
});
|
|
15177
15255
|
|
|
15178
|
-
// ../../node_modules/.pnpm/yaml@2.
|
|
15256
|
+
// ../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/schema/yaml-1.1/timestamp.js
|
|
15179
15257
|
var require_timestamp = __commonJS({
|
|
15180
|
-
"../../node_modules/.pnpm/yaml@2.
|
|
15258
|
+
"../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/schema/yaml-1.1/timestamp.js"(exports2) {
|
|
15181
15259
|
"use strict";
|
|
15182
15260
|
var stringifyNumber = require_stringifyNumber();
|
|
15183
15261
|
function parseSexagesimal(str, asBigInt) {
|
|
@@ -15255,7 +15333,7 @@ var require_timestamp = __commonJS({
|
|
|
15255
15333
|
}
|
|
15256
15334
|
return new Date(date2);
|
|
15257
15335
|
},
|
|
15258
|
-
stringify: ({ value }) => value
|
|
15336
|
+
stringify: ({ value }) => value?.toISOString().replace(/(T00:00:00)?\.000Z$/, "") ?? ""
|
|
15259
15337
|
};
|
|
15260
15338
|
exports2.floatTime = floatTime;
|
|
15261
15339
|
exports2.intTime = intTime;
|
|
@@ -15263,9 +15341,9 @@ var require_timestamp = __commonJS({
|
|
|
15263
15341
|
}
|
|
15264
15342
|
});
|
|
15265
15343
|
|
|
15266
|
-
// ../../node_modules/.pnpm/yaml@2.
|
|
15344
|
+
// ../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/schema/yaml-1.1/schema.js
|
|
15267
15345
|
var require_schema3 = __commonJS({
|
|
15268
|
-
"../../node_modules/.pnpm/yaml@2.
|
|
15346
|
+
"../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/schema/yaml-1.1/schema.js"(exports2) {
|
|
15269
15347
|
"use strict";
|
|
15270
15348
|
var map = require_map();
|
|
15271
15349
|
var _null = require_null();
|
|
@@ -15275,6 +15353,7 @@ var require_schema3 = __commonJS({
|
|
|
15275
15353
|
var bool = require_bool2();
|
|
15276
15354
|
var float = require_float2();
|
|
15277
15355
|
var int = require_int2();
|
|
15356
|
+
var merge2 = require_merge();
|
|
15278
15357
|
var omap = require_omap();
|
|
15279
15358
|
var pairs = require_pairs();
|
|
15280
15359
|
var set2 = require_set();
|
|
@@ -15294,6 +15373,7 @@ var require_schema3 = __commonJS({
|
|
|
15294
15373
|
float.floatExp,
|
|
15295
15374
|
float.float,
|
|
15296
15375
|
binary.binary,
|
|
15376
|
+
merge2.merge,
|
|
15297
15377
|
omap.omap,
|
|
15298
15378
|
pairs.pairs,
|
|
15299
15379
|
set2.set,
|
|
@@ -15305,9 +15385,9 @@ var require_schema3 = __commonJS({
|
|
|
15305
15385
|
}
|
|
15306
15386
|
});
|
|
15307
15387
|
|
|
15308
|
-
// ../../node_modules/.pnpm/yaml@2.
|
|
15388
|
+
// ../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/schema/tags.js
|
|
15309
15389
|
var require_tags = __commonJS({
|
|
15310
|
-
"../../node_modules/.pnpm/yaml@2.
|
|
15390
|
+
"../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/schema/tags.js"(exports2) {
|
|
15311
15391
|
"use strict";
|
|
15312
15392
|
var map = require_map();
|
|
15313
15393
|
var _null = require_null();
|
|
@@ -15319,6 +15399,7 @@ var require_tags = __commonJS({
|
|
|
15319
15399
|
var schema = require_schema();
|
|
15320
15400
|
var schema$1 = require_schema2();
|
|
15321
15401
|
var binary = require_binary();
|
|
15402
|
+
var merge2 = require_merge();
|
|
15322
15403
|
var omap = require_omap();
|
|
15323
15404
|
var pairs = require_pairs();
|
|
15324
15405
|
var schema$2 = require_schema3();
|
|
@@ -15343,6 +15424,7 @@ var require_tags = __commonJS({
|
|
|
15343
15424
|
intOct: int.intOct,
|
|
15344
15425
|
intTime: timestamp.intTime,
|
|
15345
15426
|
map: map.map,
|
|
15427
|
+
merge: merge2.merge,
|
|
15346
15428
|
null: _null.nullTag,
|
|
15347
15429
|
omap: omap.omap,
|
|
15348
15430
|
pairs: pairs.pairs,
|
|
@@ -15352,13 +15434,18 @@ var require_tags = __commonJS({
|
|
|
15352
15434
|
};
|
|
15353
15435
|
var coreKnownTags = {
|
|
15354
15436
|
"tag:yaml.org,2002:binary": binary.binary,
|
|
15437
|
+
"tag:yaml.org,2002:merge": merge2.merge,
|
|
15355
15438
|
"tag:yaml.org,2002:omap": omap.omap,
|
|
15356
15439
|
"tag:yaml.org,2002:pairs": pairs.pairs,
|
|
15357
15440
|
"tag:yaml.org,2002:set": set2.set,
|
|
15358
15441
|
"tag:yaml.org,2002:timestamp": timestamp.timestamp
|
|
15359
15442
|
};
|
|
15360
|
-
function getTags(customTags, schemaName) {
|
|
15361
|
-
|
|
15443
|
+
function getTags(customTags, schemaName, addMergeTag) {
|
|
15444
|
+
const schemaTags = schemas.get(schemaName);
|
|
15445
|
+
if (schemaTags && !customTags) {
|
|
15446
|
+
return addMergeTag && !schemaTags.includes(merge2.merge) ? schemaTags.concat(merge2.merge) : schemaTags.slice();
|
|
15447
|
+
}
|
|
15448
|
+
let tags = schemaTags;
|
|
15362
15449
|
if (!tags) {
|
|
15363
15450
|
if (Array.isArray(customTags))
|
|
15364
15451
|
tags = [];
|
|
@@ -15373,24 +15460,28 @@ var require_tags = __commonJS({
|
|
|
15373
15460
|
} else if (typeof customTags === "function") {
|
|
15374
15461
|
tags = customTags(tags.slice());
|
|
15375
15462
|
}
|
|
15376
|
-
|
|
15377
|
-
|
|
15378
|
-
|
|
15379
|
-
const tagObj = tagsByName[tag];
|
|
15380
|
-
if (tagObj)
|
|
15381
|
-
|
|
15382
|
-
|
|
15383
|
-
|
|
15384
|
-
|
|
15463
|
+
if (addMergeTag)
|
|
15464
|
+
tags = tags.concat(merge2.merge);
|
|
15465
|
+
return tags.reduce((tags2, tag) => {
|
|
15466
|
+
const tagObj = typeof tag === "string" ? tagsByName[tag] : tag;
|
|
15467
|
+
if (!tagObj) {
|
|
15468
|
+
const tagName = JSON.stringify(tag);
|
|
15469
|
+
const keys2 = Object.keys(tagsByName).map((key) => JSON.stringify(key)).join(", ");
|
|
15470
|
+
throw new Error(`Unknown custom tag ${tagName}; use one of ${keys2}`);
|
|
15471
|
+
}
|
|
15472
|
+
if (!tags2.includes(tagObj))
|
|
15473
|
+
tags2.push(tagObj);
|
|
15474
|
+
return tags2;
|
|
15475
|
+
}, []);
|
|
15385
15476
|
}
|
|
15386
15477
|
exports2.coreKnownTags = coreKnownTags;
|
|
15387
15478
|
exports2.getTags = getTags;
|
|
15388
15479
|
}
|
|
15389
15480
|
});
|
|
15390
15481
|
|
|
15391
|
-
// ../../node_modules/.pnpm/yaml@2.
|
|
15482
|
+
// ../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/schema/Schema.js
|
|
15392
15483
|
var require_Schema = __commonJS({
|
|
15393
|
-
"../../node_modules/.pnpm/yaml@2.
|
|
15484
|
+
"../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/schema/Schema.js"(exports2) {
|
|
15394
15485
|
"use strict";
|
|
15395
15486
|
var identity = require_identity();
|
|
15396
15487
|
var map = require_map();
|
|
@@ -15401,10 +15492,9 @@ var require_Schema = __commonJS({
|
|
|
15401
15492
|
var Schema = class _Schema {
|
|
15402
15493
|
constructor({ compat, customTags, merge: merge2, resolveKnownTags, schema, sortMapEntries, toStringDefaults }) {
|
|
15403
15494
|
this.compat = Array.isArray(compat) ? tags.getTags(compat, "compat") : compat ? tags.getTags(null, compat) : null;
|
|
15404
|
-
this.merge = !!merge2;
|
|
15405
15495
|
this.name = typeof schema === "string" && schema || "core";
|
|
15406
15496
|
this.knownTags = resolveKnownTags ? tags.coreKnownTags : {};
|
|
15407
|
-
this.tags = tags.getTags(customTags, this.name);
|
|
15497
|
+
this.tags = tags.getTags(customTags, this.name, merge2);
|
|
15408
15498
|
this.toStringOptions = toStringDefaults ?? null;
|
|
15409
15499
|
Object.defineProperty(this, identity.MAP, { value: map.map });
|
|
15410
15500
|
Object.defineProperty(this, identity.SCALAR, { value: string2.string });
|
|
@@ -15421,9 +15511,9 @@ var require_Schema = __commonJS({
|
|
|
15421
15511
|
}
|
|
15422
15512
|
});
|
|
15423
15513
|
|
|
15424
|
-
// ../../node_modules/.pnpm/yaml@2.
|
|
15514
|
+
// ../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/stringify/stringifyDocument.js
|
|
15425
15515
|
var require_stringifyDocument = __commonJS({
|
|
15426
|
-
"../../node_modules/.pnpm/yaml@2.
|
|
15516
|
+
"../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/stringify/stringifyDocument.js"(exports2) {
|
|
15427
15517
|
"use strict";
|
|
15428
15518
|
var identity = require_identity();
|
|
15429
15519
|
var stringify3 = require_stringify();
|
|
@@ -15501,9 +15591,9 @@ var require_stringifyDocument = __commonJS({
|
|
|
15501
15591
|
}
|
|
15502
15592
|
});
|
|
15503
15593
|
|
|
15504
|
-
// ../../node_modules/.pnpm/yaml@2.
|
|
15594
|
+
// ../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/doc/Document.js
|
|
15505
15595
|
var require_Document = __commonJS({
|
|
15506
|
-
"../../node_modules/.pnpm/yaml@2.
|
|
15596
|
+
"../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/doc/Document.js"(exports2) {
|
|
15507
15597
|
"use strict";
|
|
15508
15598
|
var Alias = require_Alias();
|
|
15509
15599
|
var Collection2 = require_Collection();
|
|
@@ -15536,6 +15626,7 @@ var require_Document = __commonJS({
|
|
|
15536
15626
|
logLevel: "warn",
|
|
15537
15627
|
prettyErrors: true,
|
|
15538
15628
|
strict: true,
|
|
15629
|
+
stringKeys: false,
|
|
15539
15630
|
uniqueKeys: true,
|
|
15540
15631
|
version: "1.2"
|
|
15541
15632
|
}, options);
|
|
@@ -15737,7 +15828,7 @@ var require_Document = __commonJS({
|
|
|
15737
15828
|
this.directives.yaml.version = "1.1";
|
|
15738
15829
|
else
|
|
15739
15830
|
this.directives = new directives.Directives({ version: "1.1" });
|
|
15740
|
-
opt = {
|
|
15831
|
+
opt = { resolveKnownTags: false, schema: "yaml-1.1" };
|
|
15741
15832
|
break;
|
|
15742
15833
|
case "1.2":
|
|
15743
15834
|
case "next":
|
|
@@ -15745,7 +15836,7 @@ var require_Document = __commonJS({
|
|
|
15745
15836
|
this.directives.yaml.version = version;
|
|
15746
15837
|
else
|
|
15747
15838
|
this.directives = new directives.Directives({ version });
|
|
15748
|
-
opt = {
|
|
15839
|
+
opt = { resolveKnownTags: true, schema: "core" };
|
|
15749
15840
|
break;
|
|
15750
15841
|
case null:
|
|
15751
15842
|
if (this.directives)
|
|
@@ -15809,9 +15900,9 @@ var require_Document = __commonJS({
|
|
|
15809
15900
|
}
|
|
15810
15901
|
});
|
|
15811
15902
|
|
|
15812
|
-
// ../../node_modules/.pnpm/yaml@2.
|
|
15903
|
+
// ../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/errors.js
|
|
15813
15904
|
var require_errors = __commonJS({
|
|
15814
|
-
"../../node_modules/.pnpm/yaml@2.
|
|
15905
|
+
"../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/errors.js"(exports2) {
|
|
15815
15906
|
"use strict";
|
|
15816
15907
|
var YAMLError = class extends Error {
|
|
15817
15908
|
constructor(name, pos, code, message) {
|
|
@@ -15856,7 +15947,7 @@ var require_errors = __commonJS({
|
|
|
15856
15947
|
if (/[^ ]/.test(lineStr)) {
|
|
15857
15948
|
let count = 1;
|
|
15858
15949
|
const end = error.linePos[1];
|
|
15859
|
-
if (end
|
|
15950
|
+
if (end?.line === line && end.col > col) {
|
|
15860
15951
|
count = Math.max(1, Math.min(end.col - col, 80 - ci));
|
|
15861
15952
|
}
|
|
15862
15953
|
const pointer = " ".repeat(ci) + "^".repeat(count);
|
|
@@ -15874,21 +15965,22 @@ ${pointer}
|
|
|
15874
15965
|
}
|
|
15875
15966
|
});
|
|
15876
15967
|
|
|
15877
|
-
// ../../node_modules/.pnpm/yaml@2.
|
|
15968
|
+
// ../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/compose/resolve-props.js
|
|
15878
15969
|
var require_resolve_props = __commonJS({
|
|
15879
|
-
"../../node_modules/.pnpm/yaml@2.
|
|
15970
|
+
"../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/compose/resolve-props.js"(exports2) {
|
|
15880
15971
|
"use strict";
|
|
15881
|
-
function resolveProps(tokens, { flow, indicator, next, offset, onError: onError2, startOnNewline }) {
|
|
15972
|
+
function resolveProps(tokens, { flow, indicator, next, offset, onError: onError2, parentIndent, startOnNewline }) {
|
|
15882
15973
|
let spaceBefore = false;
|
|
15883
15974
|
let atNewline = startOnNewline;
|
|
15884
15975
|
let hasSpace = startOnNewline;
|
|
15885
15976
|
let comment = "";
|
|
15886
15977
|
let commentSep = "";
|
|
15887
15978
|
let hasNewline = false;
|
|
15888
|
-
let hasNewlineAfterProp = false;
|
|
15889
15979
|
let reqSpace = false;
|
|
15980
|
+
let tab = null;
|
|
15890
15981
|
let anchor = null;
|
|
15891
15982
|
let tag = null;
|
|
15983
|
+
let newlineAfterProp = null;
|
|
15892
15984
|
let comma = null;
|
|
15893
15985
|
let found = null;
|
|
15894
15986
|
let start = null;
|
|
@@ -15898,10 +15990,17 @@ var require_resolve_props = __commonJS({
|
|
|
15898
15990
|
onError2(token.offset, "MISSING_CHAR", "Tags and anchors must be separated from the next token by white space");
|
|
15899
15991
|
reqSpace = false;
|
|
15900
15992
|
}
|
|
15993
|
+
if (tab) {
|
|
15994
|
+
if (atNewline && token.type !== "comment" && token.type !== "newline") {
|
|
15995
|
+
onError2(tab, "TAB_AS_INDENT", "Tabs are not allowed as indentation");
|
|
15996
|
+
}
|
|
15997
|
+
tab = null;
|
|
15998
|
+
}
|
|
15901
15999
|
switch (token.type) {
|
|
15902
16000
|
case "space":
|
|
15903
|
-
if (!flow &&
|
|
15904
|
-
|
|
16001
|
+
if (!flow && (indicator !== "doc-start" || next?.type !== "flow-collection") && token.source.includes(" ")) {
|
|
16002
|
+
tab = token;
|
|
16003
|
+
}
|
|
15905
16004
|
hasSpace = true;
|
|
15906
16005
|
break;
|
|
15907
16006
|
case "comment": {
|
|
@@ -15920,14 +16019,14 @@ var require_resolve_props = __commonJS({
|
|
|
15920
16019
|
if (atNewline) {
|
|
15921
16020
|
if (comment)
|
|
15922
16021
|
comment += token.source;
|
|
15923
|
-
else
|
|
16022
|
+
else if (!found || indicator !== "seq-item-ind")
|
|
15924
16023
|
spaceBefore = true;
|
|
15925
16024
|
} else
|
|
15926
16025
|
commentSep += token.source;
|
|
15927
16026
|
atNewline = true;
|
|
15928
16027
|
hasNewline = true;
|
|
15929
16028
|
if (anchor || tag)
|
|
15930
|
-
|
|
16029
|
+
newlineAfterProp = token;
|
|
15931
16030
|
hasSpace = true;
|
|
15932
16031
|
break;
|
|
15933
16032
|
case "anchor":
|
|
@@ -15936,8 +16035,7 @@ var require_resolve_props = __commonJS({
|
|
|
15936
16035
|
if (token.source.endsWith(":"))
|
|
15937
16036
|
onError2(token.offset + token.source.length - 1, "BAD_ALIAS", "Anchor ending in : is ambiguous", true);
|
|
15938
16037
|
anchor = token;
|
|
15939
|
-
|
|
15940
|
-
start = token.offset;
|
|
16038
|
+
start ?? (start = token.offset);
|
|
15941
16039
|
atNewline = false;
|
|
15942
16040
|
hasSpace = false;
|
|
15943
16041
|
reqSpace = true;
|
|
@@ -15946,8 +16044,7 @@ var require_resolve_props = __commonJS({
|
|
|
15946
16044
|
if (tag)
|
|
15947
16045
|
onError2(token, "MULTIPLE_TAGS", "A node can have at most one tag");
|
|
15948
16046
|
tag = token;
|
|
15949
|
-
|
|
15950
|
-
start = token.offset;
|
|
16047
|
+
start ?? (start = token.offset);
|
|
15951
16048
|
atNewline = false;
|
|
15952
16049
|
hasSpace = false;
|
|
15953
16050
|
reqSpace = true;
|
|
@@ -15959,7 +16056,7 @@ var require_resolve_props = __commonJS({
|
|
|
15959
16056
|
if (found)
|
|
15960
16057
|
onError2(token, "UNEXPECTED_TOKEN", `Unexpected ${token.source} in ${flow ?? "collection"}`);
|
|
15961
16058
|
found = token;
|
|
15962
|
-
atNewline =
|
|
16059
|
+
atNewline = indicator === "seq-item-ind" || indicator === "explicit-key-ind";
|
|
15963
16060
|
hasSpace = false;
|
|
15964
16061
|
break;
|
|
15965
16062
|
case "comma":
|
|
@@ -15980,17 +16077,20 @@ var require_resolve_props = __commonJS({
|
|
|
15980
16077
|
}
|
|
15981
16078
|
const last2 = tokens[tokens.length - 1];
|
|
15982
16079
|
const end = last2 ? last2.offset + last2.source.length : offset;
|
|
15983
|
-
if (reqSpace && next && next.type !== "space" && next.type !== "newline" && next.type !== "comma" && (next.type !== "scalar" || next.source !== ""))
|
|
16080
|
+
if (reqSpace && next && next.type !== "space" && next.type !== "newline" && next.type !== "comma" && (next.type !== "scalar" || next.source !== "")) {
|
|
15984
16081
|
onError2(next.offset, "MISSING_CHAR", "Tags and anchors must be separated from the next token by white space");
|
|
16082
|
+
}
|
|
16083
|
+
if (tab && (atNewline && tab.indent <= parentIndent || next?.type === "block-map" || next?.type === "block-seq"))
|
|
16084
|
+
onError2(tab, "TAB_AS_INDENT", "Tabs are not allowed as indentation");
|
|
15985
16085
|
return {
|
|
15986
16086
|
comma,
|
|
15987
16087
|
found,
|
|
15988
16088
|
spaceBefore,
|
|
15989
16089
|
comment,
|
|
15990
16090
|
hasNewline,
|
|
15991
|
-
hasNewlineAfterProp,
|
|
15992
16091
|
anchor,
|
|
15993
16092
|
tag,
|
|
16093
|
+
newlineAfterProp,
|
|
15994
16094
|
end,
|
|
15995
16095
|
start: start ?? end
|
|
15996
16096
|
};
|
|
@@ -15999,9 +16099,9 @@ var require_resolve_props = __commonJS({
|
|
|
15999
16099
|
}
|
|
16000
16100
|
});
|
|
16001
16101
|
|
|
16002
|
-
// ../../node_modules/.pnpm/yaml@2.
|
|
16102
|
+
// ../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/compose/util-contains-newline.js
|
|
16003
16103
|
var require_util_contains_newline = __commonJS({
|
|
16004
|
-
"../../node_modules/.pnpm/yaml@2.
|
|
16104
|
+
"../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/compose/util-contains-newline.js"(exports2) {
|
|
16005
16105
|
"use strict";
|
|
16006
16106
|
function containsNewline(key) {
|
|
16007
16107
|
if (!key)
|
|
@@ -16041,9 +16141,9 @@ var require_util_contains_newline = __commonJS({
|
|
|
16041
16141
|
}
|
|
16042
16142
|
});
|
|
16043
16143
|
|
|
16044
|
-
// ../../node_modules/.pnpm/yaml@2.
|
|
16144
|
+
// ../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/compose/util-flow-indent-check.js
|
|
16045
16145
|
var require_util_flow_indent_check = __commonJS({
|
|
16046
|
-
"../../node_modules/.pnpm/yaml@2.
|
|
16146
|
+
"../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/compose/util-flow-indent-check.js"(exports2) {
|
|
16047
16147
|
"use strict";
|
|
16048
16148
|
var utilContainsNewline = require_util_contains_newline();
|
|
16049
16149
|
function flowIndentCheck(indent, fc, onError2) {
|
|
@@ -16059,25 +16159,25 @@ var require_util_flow_indent_check = __commonJS({
|
|
|
16059
16159
|
}
|
|
16060
16160
|
});
|
|
16061
16161
|
|
|
16062
|
-
// ../../node_modules/.pnpm/yaml@2.
|
|
16162
|
+
// ../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/compose/util-map-includes.js
|
|
16063
16163
|
var require_util_map_includes = __commonJS({
|
|
16064
|
-
"../../node_modules/.pnpm/yaml@2.
|
|
16164
|
+
"../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/compose/util-map-includes.js"(exports2) {
|
|
16065
16165
|
"use strict";
|
|
16066
16166
|
var identity = require_identity();
|
|
16067
16167
|
function mapIncludes(ctx, items, search) {
|
|
16068
16168
|
const { uniqueKeys } = ctx.options;
|
|
16069
16169
|
if (uniqueKeys === false)
|
|
16070
16170
|
return false;
|
|
16071
|
-
const isEqual = typeof uniqueKeys === "function" ? uniqueKeys : (a, b) => a === b || identity.isScalar(a) && identity.isScalar(b) && a.value === b.value
|
|
16171
|
+
const isEqual = typeof uniqueKeys === "function" ? uniqueKeys : (a, b) => a === b || identity.isScalar(a) && identity.isScalar(b) && a.value === b.value;
|
|
16072
16172
|
return items.some((pair) => isEqual(pair.key, search));
|
|
16073
16173
|
}
|
|
16074
16174
|
exports2.mapIncludes = mapIncludes;
|
|
16075
16175
|
}
|
|
16076
16176
|
});
|
|
16077
16177
|
|
|
16078
|
-
// ../../node_modules/.pnpm/yaml@2.
|
|
16178
|
+
// ../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/compose/resolve-block-map.js
|
|
16079
16179
|
var require_resolve_block_map = __commonJS({
|
|
16080
|
-
"../../node_modules/.pnpm/yaml@2.
|
|
16180
|
+
"../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/compose/resolve-block-map.js"(exports2) {
|
|
16081
16181
|
"use strict";
|
|
16082
16182
|
var Pair = require_Pair();
|
|
16083
16183
|
var YAMLMap = require_YAMLMap();
|
|
@@ -16100,6 +16200,7 @@ var require_resolve_block_map = __commonJS({
|
|
|
16100
16200
|
next: key ?? sep3?.[0],
|
|
16101
16201
|
offset,
|
|
16102
16202
|
onError: onError2,
|
|
16203
|
+
parentIndent: bm.indent,
|
|
16103
16204
|
startOnNewline: true
|
|
16104
16205
|
});
|
|
16105
16206
|
const implicitKey = !keyProps.found;
|
|
@@ -16120,16 +16221,18 @@ var require_resolve_block_map = __commonJS({
|
|
|
16120
16221
|
}
|
|
16121
16222
|
continue;
|
|
16122
16223
|
}
|
|
16123
|
-
if (keyProps.
|
|
16224
|
+
if (keyProps.newlineAfterProp || utilContainsNewline.containsNewline(key)) {
|
|
16124
16225
|
onError2(key ?? start[start.length - 1], "MULTILINE_IMPLICIT_KEY", "Implicit keys need to be on a single line");
|
|
16125
16226
|
}
|
|
16126
16227
|
} else if (keyProps.found?.indent !== bm.indent) {
|
|
16127
16228
|
onError2(offset, "BAD_INDENT", startColMsg);
|
|
16128
16229
|
}
|
|
16230
|
+
ctx.atKey = true;
|
|
16129
16231
|
const keyStart = keyProps.end;
|
|
16130
16232
|
const keyNode = key ? composeNode(ctx, key, keyProps, onError2) : composeEmptyNode(ctx, keyStart, start, null, keyProps, onError2);
|
|
16131
16233
|
if (ctx.schema.compat)
|
|
16132
16234
|
utilFlowIndentCheck.flowIndentCheck(bm.indent, key, onError2);
|
|
16235
|
+
ctx.atKey = false;
|
|
16133
16236
|
if (utilMapIncludes.mapIncludes(ctx, map.items, keyNode))
|
|
16134
16237
|
onError2(keyStart, "DUPLICATE_KEY", "Map keys must be unique");
|
|
16135
16238
|
const valueProps = resolveProps.resolveProps(sep3 ?? [], {
|
|
@@ -16137,6 +16240,7 @@ var require_resolve_block_map = __commonJS({
|
|
|
16137
16240
|
next: value,
|
|
16138
16241
|
offset: keyNode.range[2],
|
|
16139
16242
|
onError: onError2,
|
|
16243
|
+
parentIndent: bm.indent,
|
|
16140
16244
|
startOnNewline: !key || key.type === "block-scalar"
|
|
16141
16245
|
});
|
|
16142
16246
|
offset = valueProps.end;
|
|
@@ -16179,9 +16283,9 @@ var require_resolve_block_map = __commonJS({
|
|
|
16179
16283
|
}
|
|
16180
16284
|
});
|
|
16181
16285
|
|
|
16182
|
-
// ../../node_modules/.pnpm/yaml@2.
|
|
16286
|
+
// ../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/compose/resolve-block-seq.js
|
|
16183
16287
|
var require_resolve_block_seq = __commonJS({
|
|
16184
|
-
"../../node_modules/.pnpm/yaml@2.
|
|
16288
|
+
"../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/compose/resolve-block-seq.js"(exports2) {
|
|
16185
16289
|
"use strict";
|
|
16186
16290
|
var YAMLSeq = require_YAMLSeq();
|
|
16187
16291
|
var resolveProps = require_resolve_props();
|
|
@@ -16191,6 +16295,8 @@ var require_resolve_block_seq = __commonJS({
|
|
|
16191
16295
|
const seq = new NodeClass(ctx.schema);
|
|
16192
16296
|
if (ctx.atRoot)
|
|
16193
16297
|
ctx.atRoot = false;
|
|
16298
|
+
if (ctx.atKey)
|
|
16299
|
+
ctx.atKey = false;
|
|
16194
16300
|
let offset = bs.offset;
|
|
16195
16301
|
let commentEnd = null;
|
|
16196
16302
|
for (const { start, value } of bs.items) {
|
|
@@ -16199,11 +16305,12 @@ var require_resolve_block_seq = __commonJS({
|
|
|
16199
16305
|
next: value,
|
|
16200
16306
|
offset,
|
|
16201
16307
|
onError: onError2,
|
|
16308
|
+
parentIndent: bs.indent,
|
|
16202
16309
|
startOnNewline: true
|
|
16203
16310
|
});
|
|
16204
16311
|
if (!props.found) {
|
|
16205
16312
|
if (props.anchor || props.tag || value) {
|
|
16206
|
-
if (value
|
|
16313
|
+
if (value?.type === "block-seq")
|
|
16207
16314
|
onError2(props.end, "BAD_INDENT", "All sequence items must start at the same column");
|
|
16208
16315
|
else
|
|
16209
16316
|
onError2(offset, "MISSING_CHAR", "Sequence item without - indicator");
|
|
@@ -16227,9 +16334,9 @@ var require_resolve_block_seq = __commonJS({
|
|
|
16227
16334
|
}
|
|
16228
16335
|
});
|
|
16229
16336
|
|
|
16230
|
-
// ../../node_modules/.pnpm/yaml@2.
|
|
16337
|
+
// ../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/compose/resolve-end.js
|
|
16231
16338
|
var require_resolve_end = __commonJS({
|
|
16232
|
-
"../../node_modules/.pnpm/yaml@2.
|
|
16339
|
+
"../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/compose/resolve-end.js"(exports2) {
|
|
16233
16340
|
"use strict";
|
|
16234
16341
|
function resolveEnd(end, offset, reqSpace, onError2) {
|
|
16235
16342
|
let comment = "";
|
|
@@ -16270,9 +16377,9 @@ var require_resolve_end = __commonJS({
|
|
|
16270
16377
|
}
|
|
16271
16378
|
});
|
|
16272
16379
|
|
|
16273
|
-
// ../../node_modules/.pnpm/yaml@2.
|
|
16380
|
+
// ../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/compose/resolve-flow-collection.js
|
|
16274
16381
|
var require_resolve_flow_collection = __commonJS({
|
|
16275
|
-
"../../node_modules/.pnpm/yaml@2.
|
|
16382
|
+
"../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/compose/resolve-flow-collection.js"(exports2) {
|
|
16276
16383
|
"use strict";
|
|
16277
16384
|
var identity = require_identity();
|
|
16278
16385
|
var Pair = require_Pair();
|
|
@@ -16293,6 +16400,8 @@ var require_resolve_flow_collection = __commonJS({
|
|
|
16293
16400
|
const atRoot = ctx.atRoot;
|
|
16294
16401
|
if (atRoot)
|
|
16295
16402
|
ctx.atRoot = false;
|
|
16403
|
+
if (ctx.atKey)
|
|
16404
|
+
ctx.atKey = false;
|
|
16296
16405
|
let offset = fc.offset + fc.start.source.length;
|
|
16297
16406
|
for (let i = 0; i < fc.items.length; ++i) {
|
|
16298
16407
|
const collItem = fc.items[i];
|
|
@@ -16303,6 +16412,7 @@ var require_resolve_flow_collection = __commonJS({
|
|
|
16303
16412
|
next: key ?? sep3?.[0],
|
|
16304
16413
|
offset,
|
|
16305
16414
|
onError: onError2,
|
|
16415
|
+
parentIndent: fc.indent,
|
|
16306
16416
|
startOnNewline: false
|
|
16307
16417
|
});
|
|
16308
16418
|
if (!props.found) {
|
|
@@ -16367,16 +16477,19 @@ var require_resolve_flow_collection = __commonJS({
|
|
|
16367
16477
|
if (isBlock(value))
|
|
16368
16478
|
onError2(valueNode.range, "BLOCK_IN_FLOW", blockMsg);
|
|
16369
16479
|
} else {
|
|
16480
|
+
ctx.atKey = true;
|
|
16370
16481
|
const keyStart = props.end;
|
|
16371
16482
|
const keyNode = key ? composeNode(ctx, key, props, onError2) : composeEmptyNode(ctx, keyStart, start, null, props, onError2);
|
|
16372
16483
|
if (isBlock(key))
|
|
16373
16484
|
onError2(keyNode.range, "BLOCK_IN_FLOW", blockMsg);
|
|
16485
|
+
ctx.atKey = false;
|
|
16374
16486
|
const valueProps = resolveProps.resolveProps(sep3 ?? [], {
|
|
16375
16487
|
flow: fcName,
|
|
16376
16488
|
indicator: "map-value-ind",
|
|
16377
16489
|
next: value,
|
|
16378
16490
|
offset: keyNode.range[2],
|
|
16379
16491
|
onError: onError2,
|
|
16492
|
+
parentIndent: fc.indent,
|
|
16380
16493
|
startOnNewline: false
|
|
16381
16494
|
});
|
|
16382
16495
|
if (valueProps.found) {
|
|
@@ -16394,7 +16507,7 @@ var require_resolve_flow_collection = __commonJS({
|
|
|
16394
16507
|
onError2(valueProps.found, "KEY_OVER_1024_CHARS", "The : indicator must be at most 1024 chars after the start of an implicit flow sequence key");
|
|
16395
16508
|
}
|
|
16396
16509
|
} else if (value) {
|
|
16397
|
-
if ("source" in value && value.source
|
|
16510
|
+
if ("source" in value && value.source?.[0] === ":")
|
|
16398
16511
|
onError2(value, "MISSING_CHAR", `Missing space after : in ${fcName}`);
|
|
16399
16512
|
else
|
|
16400
16513
|
onError2(valueProps.start, "MISSING_CHAR", `Missing , or : between ${fcName} items`);
|
|
@@ -16421,6 +16534,8 @@ var require_resolve_flow_collection = __commonJS({
|
|
|
16421
16534
|
const map = new YAMLMap.YAMLMap(ctx.schema);
|
|
16422
16535
|
map.flow = true;
|
|
16423
16536
|
map.items.push(pair);
|
|
16537
|
+
const endRange = (valueNode ?? keyNode).range;
|
|
16538
|
+
map.range = [keyNode.range[0], endRange[1], endRange[2]];
|
|
16424
16539
|
coll.items.push(map);
|
|
16425
16540
|
}
|
|
16426
16541
|
offset = valueNode ? valueNode.range[2] : valueProps.end;
|
|
@@ -16429,7 +16544,7 @@ var require_resolve_flow_collection = __commonJS({
|
|
|
16429
16544
|
const expectedEnd = isMap ? "}" : "]";
|
|
16430
16545
|
const [ce, ...ee] = fc.end;
|
|
16431
16546
|
let cePos = offset;
|
|
16432
|
-
if (ce
|
|
16547
|
+
if (ce?.source === expectedEnd)
|
|
16433
16548
|
cePos = ce.offset + ce.source.length;
|
|
16434
16549
|
else {
|
|
16435
16550
|
const name = fcName[0].toUpperCase() + fcName.substring(1);
|
|
@@ -16456,9 +16571,9 @@ var require_resolve_flow_collection = __commonJS({
|
|
|
16456
16571
|
}
|
|
16457
16572
|
});
|
|
16458
16573
|
|
|
16459
|
-
// ../../node_modules/.pnpm/yaml@2.
|
|
16574
|
+
// ../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/compose/compose-collection.js
|
|
16460
16575
|
var require_compose_collection = __commonJS({
|
|
16461
|
-
"../../node_modules/.pnpm/yaml@2.
|
|
16576
|
+
"../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/compose/compose-collection.js"(exports2) {
|
|
16462
16577
|
"use strict";
|
|
16463
16578
|
var identity = require_identity();
|
|
16464
16579
|
var Scalar = require_Scalar();
|
|
@@ -16478,21 +16593,30 @@ var require_compose_collection = __commonJS({
|
|
|
16478
16593
|
coll.tag = tagName;
|
|
16479
16594
|
return coll;
|
|
16480
16595
|
}
|
|
16481
|
-
function composeCollection(CN, ctx, token,
|
|
16596
|
+
function composeCollection(CN, ctx, token, props, onError2) {
|
|
16597
|
+
const tagToken = props.tag;
|
|
16482
16598
|
const tagName = !tagToken ? null : ctx.directives.tagName(tagToken.source, (msg) => onError2(tagToken, "TAG_RESOLVE_FAILED", msg));
|
|
16599
|
+
if (token.type === "block-seq") {
|
|
16600
|
+
const { anchor, newlineAfterProp: nl } = props;
|
|
16601
|
+
const lastProp = anchor && tagToken ? anchor.offset > tagToken.offset ? anchor : tagToken : anchor ?? tagToken;
|
|
16602
|
+
if (lastProp && (!nl || nl.offset < lastProp.offset)) {
|
|
16603
|
+
const message = "Missing newline after block sequence props";
|
|
16604
|
+
onError2(lastProp, "MISSING_CHAR", message);
|
|
16605
|
+
}
|
|
16606
|
+
}
|
|
16483
16607
|
const expType = token.type === "block-map" ? "map" : token.type === "block-seq" ? "seq" : token.start.source === "{" ? "map" : "seq";
|
|
16484
|
-
if (!tagToken || !tagName || tagName === "!" || tagName === YAMLMap.YAMLMap.tagName && expType === "map" || tagName === YAMLSeq.YAMLSeq.tagName && expType === "seq"
|
|
16608
|
+
if (!tagToken || !tagName || tagName === "!" || tagName === YAMLMap.YAMLMap.tagName && expType === "map" || tagName === YAMLSeq.YAMLSeq.tagName && expType === "seq") {
|
|
16485
16609
|
return resolveCollection(CN, ctx, token, onError2, tagName);
|
|
16486
16610
|
}
|
|
16487
16611
|
let tag = ctx.schema.tags.find((t) => t.tag === tagName && t.collection === expType);
|
|
16488
16612
|
if (!tag) {
|
|
16489
16613
|
const kt = ctx.schema.knownTags[tagName];
|
|
16490
|
-
if (kt
|
|
16614
|
+
if (kt?.collection === expType) {
|
|
16491
16615
|
ctx.schema.tags.push(Object.assign({}, kt, { default: false }));
|
|
16492
16616
|
tag = kt;
|
|
16493
16617
|
} else {
|
|
16494
|
-
if (kt
|
|
16495
|
-
onError2(tagToken, "BAD_COLLECTION_TYPE", `${kt.tag} used for ${expType} collection, but expects ${kt.collection}`, true);
|
|
16618
|
+
if (kt) {
|
|
16619
|
+
onError2(tagToken, "BAD_COLLECTION_TYPE", `${kt.tag} used for ${expType} collection, but expects ${kt.collection ?? "scalar"}`, true);
|
|
16496
16620
|
} else {
|
|
16497
16621
|
onError2(tagToken, "TAG_RESOLVE_FAILED", `Unresolved tag: ${tagName}`, true);
|
|
16498
16622
|
}
|
|
@@ -16512,14 +16636,14 @@ var require_compose_collection = __commonJS({
|
|
|
16512
16636
|
}
|
|
16513
16637
|
});
|
|
16514
16638
|
|
|
16515
|
-
// ../../node_modules/.pnpm/yaml@2.
|
|
16639
|
+
// ../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/compose/resolve-block-scalar.js
|
|
16516
16640
|
var require_resolve_block_scalar = __commonJS({
|
|
16517
|
-
"../../node_modules/.pnpm/yaml@2.
|
|
16641
|
+
"../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/compose/resolve-block-scalar.js"(exports2) {
|
|
16518
16642
|
"use strict";
|
|
16519
16643
|
var Scalar = require_Scalar();
|
|
16520
|
-
function resolveBlockScalar(
|
|
16644
|
+
function resolveBlockScalar(ctx, scalar, onError2) {
|
|
16521
16645
|
const start = scalar.offset;
|
|
16522
|
-
const header = parseBlockScalarHeader(scalar, strict, onError2);
|
|
16646
|
+
const header = parseBlockScalarHeader(scalar, ctx.options.strict, onError2);
|
|
16523
16647
|
if (!header)
|
|
16524
16648
|
return { value: "", type: null, comment: "", range: [start, start, start] };
|
|
16525
16649
|
const type = header.mode === ">" ? Scalar.Scalar.BLOCK_FOLDED : Scalar.Scalar.BLOCK_LITERAL;
|
|
@@ -16555,6 +16679,10 @@ var require_resolve_block_scalar = __commonJS({
|
|
|
16555
16679
|
if (header.indent === 0)
|
|
16556
16680
|
trimIndent = indent.length;
|
|
16557
16681
|
contentStart = i;
|
|
16682
|
+
if (trimIndent === 0 && !ctx.atRoot) {
|
|
16683
|
+
const message = "Block scalar values in collections must be indented";
|
|
16684
|
+
onError2(offset, "BAD_INDENT", message);
|
|
16685
|
+
}
|
|
16558
16686
|
break;
|
|
16559
16687
|
}
|
|
16560
16688
|
offset += indent.length + content.length + 1;
|
|
@@ -16691,9 +16819,9 @@ var require_resolve_block_scalar = __commonJS({
|
|
|
16691
16819
|
}
|
|
16692
16820
|
});
|
|
16693
16821
|
|
|
16694
|
-
// ../../node_modules/.pnpm/yaml@2.
|
|
16822
|
+
// ../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/compose/resolve-flow-scalar.js
|
|
16695
16823
|
var require_resolve_flow_scalar = __commonJS({
|
|
16696
|
-
"../../node_modules/.pnpm/yaml@2.
|
|
16824
|
+
"../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/compose/resolve-flow-scalar.js"(exports2) {
|
|
16697
16825
|
"use strict";
|
|
16698
16826
|
var Scalar = require_Scalar();
|
|
16699
16827
|
var resolveEnd = require_resolve_end();
|
|
@@ -16772,7 +16900,7 @@ var require_resolve_flow_scalar = __commonJS({
|
|
|
16772
16900
|
try {
|
|
16773
16901
|
first2 = new RegExp("(.*?)(?<![ ])[ ]*\r?\n", "sy");
|
|
16774
16902
|
line = new RegExp("[ ]*(.*?)(?:(?<![ ])[ ]*)?\r?\n", "sy");
|
|
16775
|
-
} catch
|
|
16903
|
+
} catch {
|
|
16776
16904
|
first2 = /(.*?)[ \t]*\r?\n/sy;
|
|
16777
16905
|
line = /[ \t]*(.*?)[ \t]*\r?\n/sy;
|
|
16778
16906
|
}
|
|
@@ -16864,18 +16992,31 @@ var require_resolve_flow_scalar = __commonJS({
|
|
|
16864
16992
|
}
|
|
16865
16993
|
var escapeCodes = {
|
|
16866
16994
|
"0": "\0",
|
|
16995
|
+
// null character
|
|
16867
16996
|
a: "\x07",
|
|
16997
|
+
// bell character
|
|
16868
16998
|
b: "\b",
|
|
16999
|
+
// backspace
|
|
16869
17000
|
e: "\x1B",
|
|
17001
|
+
// escape character
|
|
16870
17002
|
f: "\f",
|
|
17003
|
+
// form feed
|
|
16871
17004
|
n: "\n",
|
|
17005
|
+
// line feed
|
|
16872
17006
|
r: "\r",
|
|
17007
|
+
// carriage return
|
|
16873
17008
|
t: " ",
|
|
17009
|
+
// horizontal tab
|
|
16874
17010
|
v: "\v",
|
|
17011
|
+
// vertical tab
|
|
16875
17012
|
N: "\x85",
|
|
17013
|
+
// Unicode next line
|
|
16876
17014
|
_: "\xA0",
|
|
17015
|
+
// Unicode non-breaking space
|
|
16877
17016
|
L: "\u2028",
|
|
17017
|
+
// Unicode line separator
|
|
16878
17018
|
P: "\u2029",
|
|
17019
|
+
// Unicode paragraph separator
|
|
16879
17020
|
" ": " ",
|
|
16880
17021
|
'"': '"',
|
|
16881
17022
|
"/": "/",
|
|
@@ -16897,18 +17038,26 @@ var require_resolve_flow_scalar = __commonJS({
|
|
|
16897
17038
|
}
|
|
16898
17039
|
});
|
|
16899
17040
|
|
|
16900
|
-
// ../../node_modules/.pnpm/yaml@2.
|
|
17041
|
+
// ../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/compose/compose-scalar.js
|
|
16901
17042
|
var require_compose_scalar = __commonJS({
|
|
16902
|
-
"../../node_modules/.pnpm/yaml@2.
|
|
17043
|
+
"../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/compose/compose-scalar.js"(exports2) {
|
|
16903
17044
|
"use strict";
|
|
16904
17045
|
var identity = require_identity();
|
|
16905
17046
|
var Scalar = require_Scalar();
|
|
16906
17047
|
var resolveBlockScalar = require_resolve_block_scalar();
|
|
16907
17048
|
var resolveFlowScalar = require_resolve_flow_scalar();
|
|
16908
17049
|
function composeScalar(ctx, token, tagToken, onError2) {
|
|
16909
|
-
const { value, type, comment, range: range2 } = token.type === "block-scalar" ? resolveBlockScalar.resolveBlockScalar(
|
|
17050
|
+
const { value, type, comment, range: range2 } = token.type === "block-scalar" ? resolveBlockScalar.resolveBlockScalar(ctx, token, onError2) : resolveFlowScalar.resolveFlowScalar(token, ctx.options.strict, onError2);
|
|
16910
17051
|
const tagName = tagToken ? ctx.directives.tagName(tagToken.source, (msg) => onError2(tagToken, "TAG_RESOLVE_FAILED", msg)) : null;
|
|
16911
|
-
|
|
17052
|
+
let tag;
|
|
17053
|
+
if (ctx.options.stringKeys && ctx.atKey) {
|
|
17054
|
+
tag = ctx.schema[identity.SCALAR];
|
|
17055
|
+
} else if (tagName)
|
|
17056
|
+
tag = findScalarTagByName(ctx.schema, value, tagName, tagToken, onError2);
|
|
17057
|
+
else if (token.type === "scalar")
|
|
17058
|
+
tag = findScalarTagByTest(ctx, value, token, onError2);
|
|
17059
|
+
else
|
|
17060
|
+
tag = ctx.schema[identity.SCALAR];
|
|
16912
17061
|
let scalar;
|
|
16913
17062
|
try {
|
|
16914
17063
|
const res = tag.resolve(value, (msg) => onError2(tagToken ?? token, "TAG_RESOLVE_FAILED", msg), ctx.options);
|
|
@@ -16953,8 +17102,8 @@ var require_compose_scalar = __commonJS({
|
|
|
16953
17102
|
onError2(tagToken, "TAG_RESOLVE_FAILED", `Unresolved tag: ${tagName}`, tagName !== "tag:yaml.org,2002:str");
|
|
16954
17103
|
return schema[identity.SCALAR];
|
|
16955
17104
|
}
|
|
16956
|
-
function findScalarTagByTest({ directives, schema }, value, token, onError2) {
|
|
16957
|
-
const tag = schema.tags.find((tag2) => tag2.default && tag2.test?.test(value)) || schema[identity.SCALAR];
|
|
17105
|
+
function findScalarTagByTest({ atKey, directives, schema }, value, token, onError2) {
|
|
17106
|
+
const tag = schema.tags.find((tag2) => (tag2.default === true || atKey && tag2.default === "key") && tag2.test?.test(value)) || schema[identity.SCALAR];
|
|
16958
17107
|
if (schema.compat) {
|
|
16959
17108
|
const compat = schema.compat.find((tag2) => tag2.default && tag2.test?.test(value)) ?? schema[identity.SCALAR];
|
|
16960
17109
|
if (tag.tag !== compat.tag) {
|
|
@@ -16970,14 +17119,13 @@ var require_compose_scalar = __commonJS({
|
|
|
16970
17119
|
}
|
|
16971
17120
|
});
|
|
16972
17121
|
|
|
16973
|
-
// ../../node_modules/.pnpm/yaml@2.
|
|
17122
|
+
// ../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/compose/util-empty-scalar-position.js
|
|
16974
17123
|
var require_util_empty_scalar_position = __commonJS({
|
|
16975
|
-
"../../node_modules/.pnpm/yaml@2.
|
|
17124
|
+
"../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/compose/util-empty-scalar-position.js"(exports2) {
|
|
16976
17125
|
"use strict";
|
|
16977
17126
|
function emptyScalarPosition(offset, before, pos) {
|
|
16978
17127
|
if (before) {
|
|
16979
|
-
|
|
16980
|
-
pos = before.length;
|
|
17128
|
+
pos ?? (pos = before.length);
|
|
16981
17129
|
for (let i = pos - 1; i >= 0; --i) {
|
|
16982
17130
|
let st = before[i];
|
|
16983
17131
|
switch (st.type) {
|
|
@@ -17001,17 +17149,19 @@ var require_util_empty_scalar_position = __commonJS({
|
|
|
17001
17149
|
}
|
|
17002
17150
|
});
|
|
17003
17151
|
|
|
17004
|
-
// ../../node_modules/.pnpm/yaml@2.
|
|
17152
|
+
// ../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/compose/compose-node.js
|
|
17005
17153
|
var require_compose_node = __commonJS({
|
|
17006
|
-
"../../node_modules/.pnpm/yaml@2.
|
|
17154
|
+
"../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/compose/compose-node.js"(exports2) {
|
|
17007
17155
|
"use strict";
|
|
17008
17156
|
var Alias = require_Alias();
|
|
17157
|
+
var identity = require_identity();
|
|
17009
17158
|
var composeCollection = require_compose_collection();
|
|
17010
17159
|
var composeScalar = require_compose_scalar();
|
|
17011
17160
|
var resolveEnd = require_resolve_end();
|
|
17012
17161
|
var utilEmptyScalarPosition = require_util_empty_scalar_position();
|
|
17013
17162
|
var CN = { composeNode, composeEmptyNode };
|
|
17014
17163
|
function composeNode(ctx, token, props, onError2) {
|
|
17164
|
+
const atKey = ctx.atKey;
|
|
17015
17165
|
const { spaceBefore, comment, anchor, tag } = props;
|
|
17016
17166
|
let node;
|
|
17017
17167
|
let isSrcToken = true;
|
|
@@ -17032,19 +17182,28 @@ var require_compose_node = __commonJS({
|
|
|
17032
17182
|
case "block-map":
|
|
17033
17183
|
case "block-seq":
|
|
17034
17184
|
case "flow-collection":
|
|
17035
|
-
|
|
17036
|
-
|
|
17037
|
-
|
|
17185
|
+
try {
|
|
17186
|
+
node = composeCollection.composeCollection(CN, ctx, token, props, onError2);
|
|
17187
|
+
if (anchor)
|
|
17188
|
+
node.anchor = anchor.source.substring(1);
|
|
17189
|
+
} catch (error) {
|
|
17190
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
17191
|
+
onError2(token, "RESOURCE_EXHAUSTION", message);
|
|
17192
|
+
}
|
|
17038
17193
|
break;
|
|
17039
17194
|
default: {
|
|
17040
17195
|
const message = token.type === "error" ? token.message : `Unsupported token (type: ${token.type})`;
|
|
17041
17196
|
onError2(token, "UNEXPECTED_TOKEN", message);
|
|
17042
|
-
node = composeEmptyNode(ctx, token.offset, void 0, null, props, onError2);
|
|
17043
17197
|
isSrcToken = false;
|
|
17044
17198
|
}
|
|
17045
17199
|
}
|
|
17200
|
+
node ?? (node = composeEmptyNode(ctx, token.offset, void 0, null, props, onError2));
|
|
17046
17201
|
if (anchor && node.anchor === "")
|
|
17047
17202
|
onError2(anchor, "BAD_ALIAS", "Anchor cannot be an empty string");
|
|
17203
|
+
if (atKey && ctx.options.stringKeys && (!identity.isScalar(node) || typeof node.value !== "string" || node.tag && node.tag !== "tag:yaml.org,2002:str")) {
|
|
17204
|
+
const msg = "With stringKeys, all keys must be strings";
|
|
17205
|
+
onError2(tag ?? token, "NON_STRING_KEY", msg);
|
|
17206
|
+
}
|
|
17048
17207
|
if (spaceBefore)
|
|
17049
17208
|
node.spaceBefore = true;
|
|
17050
17209
|
if (comment) {
|
|
@@ -17096,9 +17255,9 @@ var require_compose_node = __commonJS({
|
|
|
17096
17255
|
}
|
|
17097
17256
|
});
|
|
17098
17257
|
|
|
17099
|
-
// ../../node_modules/.pnpm/yaml@2.
|
|
17258
|
+
// ../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/compose/compose-doc.js
|
|
17100
17259
|
var require_compose_doc = __commonJS({
|
|
17101
|
-
"../../node_modules/.pnpm/yaml@2.
|
|
17260
|
+
"../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/compose/compose-doc.js"(exports2) {
|
|
17102
17261
|
"use strict";
|
|
17103
17262
|
var Document = require_Document();
|
|
17104
17263
|
var composeNode = require_compose_node();
|
|
@@ -17108,6 +17267,7 @@ var require_compose_doc = __commonJS({
|
|
|
17108
17267
|
const opts = Object.assign({ _directives: directives }, options);
|
|
17109
17268
|
const doc = new Document.Document(void 0, opts);
|
|
17110
17269
|
const ctx = {
|
|
17270
|
+
atKey: false,
|
|
17111
17271
|
atRoot: true,
|
|
17112
17272
|
directives: doc.directives,
|
|
17113
17273
|
options: doc.options,
|
|
@@ -17118,6 +17278,7 @@ var require_compose_doc = __commonJS({
|
|
|
17118
17278
|
next: value ?? end?.[0],
|
|
17119
17279
|
offset,
|
|
17120
17280
|
onError: onError2,
|
|
17281
|
+
parentIndent: 0,
|
|
17121
17282
|
startOnNewline: true
|
|
17122
17283
|
});
|
|
17123
17284
|
if (props.found) {
|
|
@@ -17137,10 +17298,11 @@ var require_compose_doc = __commonJS({
|
|
|
17137
17298
|
}
|
|
17138
17299
|
});
|
|
17139
17300
|
|
|
17140
|
-
// ../../node_modules/.pnpm/yaml@2.
|
|
17301
|
+
// ../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/compose/composer.js
|
|
17141
17302
|
var require_composer = __commonJS({
|
|
17142
|
-
"../../node_modules/.pnpm/yaml@2.
|
|
17303
|
+
"../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/compose/composer.js"(exports2) {
|
|
17143
17304
|
"use strict";
|
|
17305
|
+
var node_process = require("process");
|
|
17144
17306
|
var directives = require_directives();
|
|
17145
17307
|
var Document = require_Document();
|
|
17146
17308
|
var errors = require_errors();
|
|
@@ -17256,7 +17418,7 @@ ${cb}` : comment;
|
|
|
17256
17418
|
}
|
|
17257
17419
|
/** Advance the composer by one CST token. */
|
|
17258
17420
|
*next(token) {
|
|
17259
|
-
if (
|
|
17421
|
+
if (node_process.env.LOG_STREAM)
|
|
17260
17422
|
console.dir(token, { depth: null });
|
|
17261
17423
|
switch (token.type) {
|
|
17262
17424
|
case "directive":
|
|
@@ -17342,9 +17504,9 @@ ${end.comment}` : end.comment;
|
|
|
17342
17504
|
}
|
|
17343
17505
|
});
|
|
17344
17506
|
|
|
17345
|
-
// ../../node_modules/.pnpm/yaml@2.
|
|
17507
|
+
// ../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/parse/cst-scalar.js
|
|
17346
17508
|
var require_cst_scalar = __commonJS({
|
|
17347
|
-
"../../node_modules/.pnpm/yaml@2.
|
|
17509
|
+
"../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/parse/cst-scalar.js"(exports2) {
|
|
17348
17510
|
"use strict";
|
|
17349
17511
|
var resolveBlockScalar = require_resolve_block_scalar();
|
|
17350
17512
|
var resolveFlowScalar = require_resolve_flow_scalar();
|
|
@@ -17365,7 +17527,7 @@ var require_cst_scalar = __commonJS({
|
|
|
17365
17527
|
case "double-quoted-scalar":
|
|
17366
17528
|
return resolveFlowScalar.resolveFlowScalar(token, strict, _onError);
|
|
17367
17529
|
case "block-scalar":
|
|
17368
|
-
return resolveBlockScalar.resolveBlockScalar(
|
|
17530
|
+
return resolveBlockScalar.resolveBlockScalar({ options: { strict } }, token, _onError);
|
|
17369
17531
|
}
|
|
17370
17532
|
}
|
|
17371
17533
|
return null;
|
|
@@ -17527,9 +17689,9 @@ var require_cst_scalar = __commonJS({
|
|
|
17527
17689
|
}
|
|
17528
17690
|
});
|
|
17529
17691
|
|
|
17530
|
-
// ../../node_modules/.pnpm/yaml@2.
|
|
17692
|
+
// ../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/parse/cst-stringify.js
|
|
17531
17693
|
var require_cst_stringify = __commonJS({
|
|
17532
|
-
"../../node_modules/.pnpm/yaml@2.
|
|
17694
|
+
"../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/parse/cst-stringify.js"(exports2) {
|
|
17533
17695
|
"use strict";
|
|
17534
17696
|
var stringify3 = (cst) => "type" in cst ? stringifyToken(cst) : stringifyItem(cst);
|
|
17535
17697
|
function stringifyToken(token) {
|
|
@@ -17588,9 +17750,9 @@ var require_cst_stringify = __commonJS({
|
|
|
17588
17750
|
}
|
|
17589
17751
|
});
|
|
17590
17752
|
|
|
17591
|
-
// ../../node_modules/.pnpm/yaml@2.
|
|
17753
|
+
// ../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/parse/cst-visit.js
|
|
17592
17754
|
var require_cst_visit = __commonJS({
|
|
17593
|
-
"../../node_modules/.pnpm/yaml@2.
|
|
17755
|
+
"../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/parse/cst-visit.js"(exports2) {
|
|
17594
17756
|
"use strict";
|
|
17595
17757
|
var BREAK = /* @__PURE__ */ Symbol("break visit");
|
|
17596
17758
|
var SKIP = /* @__PURE__ */ Symbol("skip children");
|
|
@@ -17650,9 +17812,9 @@ var require_cst_visit = __commonJS({
|
|
|
17650
17812
|
}
|
|
17651
17813
|
});
|
|
17652
17814
|
|
|
17653
|
-
// ../../node_modules/.pnpm/yaml@2.
|
|
17815
|
+
// ../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/parse/cst.js
|
|
17654
17816
|
var require_cst = __commonJS({
|
|
17655
|
-
"../../node_modules/.pnpm/yaml@2.
|
|
17817
|
+
"../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/parse/cst.js"(exports2) {
|
|
17656
17818
|
"use strict";
|
|
17657
17819
|
var cstScalar = require_cst_scalar();
|
|
17658
17820
|
var cstStringify = require_cst_stringify();
|
|
@@ -17752,9 +17914,9 @@ var require_cst = __commonJS({
|
|
|
17752
17914
|
}
|
|
17753
17915
|
});
|
|
17754
17916
|
|
|
17755
|
-
// ../../node_modules/.pnpm/yaml@2.
|
|
17917
|
+
// ../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/parse/lexer.js
|
|
17756
17918
|
var require_lexer = __commonJS({
|
|
17757
|
-
"../../node_modules/.pnpm/yaml@2.
|
|
17919
|
+
"../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/parse/lexer.js"(exports2) {
|
|
17758
17920
|
"use strict";
|
|
17759
17921
|
var cst = require_cst();
|
|
17760
17922
|
function isEmpty(ch) {
|
|
@@ -17769,11 +17931,11 @@ var require_lexer = __commonJS({
|
|
|
17769
17931
|
return false;
|
|
17770
17932
|
}
|
|
17771
17933
|
}
|
|
17772
|
-
var hexDigits = "0123456789ABCDEFabcdef"
|
|
17773
|
-
var tagChars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"
|
|
17774
|
-
var
|
|
17775
|
-
var invalidAnchorChars = " ,[]{}\n\r "
|
|
17776
|
-
var isNotAnchorChar = (ch) => !ch || invalidAnchorChars.
|
|
17934
|
+
var hexDigits = new Set("0123456789ABCDEFabcdef");
|
|
17935
|
+
var tagChars = new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()");
|
|
17936
|
+
var flowIndicatorChars = new Set(",[]{}");
|
|
17937
|
+
var invalidAnchorChars = new Set(" ,[]{}\n\r ");
|
|
17938
|
+
var isNotAnchorChar = (ch) => !ch || invalidAnchorChars.has(ch);
|
|
17777
17939
|
var Lexer = class {
|
|
17778
17940
|
constructor() {
|
|
17779
17941
|
this.atEnd = false;
|
|
@@ -17796,6 +17958,8 @@ var require_lexer = __commonJS({
|
|
|
17796
17958
|
*/
|
|
17797
17959
|
*lex(source, incomplete = false) {
|
|
17798
17960
|
if (source) {
|
|
17961
|
+
if (typeof source !== "string")
|
|
17962
|
+
throw TypeError("source is not a string");
|
|
17799
17963
|
this.buffer = this.buffer ? this.buffer + source : source;
|
|
17800
17964
|
this.lineEndPos = null;
|
|
17801
17965
|
}
|
|
@@ -17893,11 +18057,15 @@ var require_lexer = __commonJS({
|
|
|
17893
18057
|
}
|
|
17894
18058
|
if (line[0] === "%") {
|
|
17895
18059
|
let dirEnd = line.length;
|
|
17896
|
-
|
|
17897
|
-
|
|
18060
|
+
let cs = line.indexOf("#");
|
|
18061
|
+
while (cs !== -1) {
|
|
17898
18062
|
const ch = line[cs - 1];
|
|
17899
|
-
if (ch === " " || ch === " ")
|
|
18063
|
+
if (ch === " " || ch === " ") {
|
|
17900
18064
|
dirEnd = cs - 1;
|
|
18065
|
+
break;
|
|
18066
|
+
} else {
|
|
18067
|
+
cs = line.indexOf("#", cs + 1);
|
|
18068
|
+
}
|
|
17901
18069
|
}
|
|
17902
18070
|
while (true) {
|
|
17903
18071
|
const ch = line[dirEnd - 1];
|
|
@@ -17928,14 +18096,11 @@ var require_lexer = __commonJS({
|
|
|
17928
18096
|
if (!this.atEnd && !this.hasChars(4))
|
|
17929
18097
|
return this.setNext("line-start");
|
|
17930
18098
|
const s = this.peek(3);
|
|
17931
|
-
if (s === "---" && isEmpty(this.charAt(3))) {
|
|
18099
|
+
if ((s === "---" || s === "...") && isEmpty(this.charAt(3))) {
|
|
17932
18100
|
yield* this.pushCount(3);
|
|
17933
18101
|
this.indentValue = 0;
|
|
17934
18102
|
this.indentNext = 0;
|
|
17935
|
-
return "doc";
|
|
17936
|
-
} else if (s === "..." && isEmpty(this.charAt(3))) {
|
|
17937
|
-
yield* this.pushCount(3);
|
|
17938
|
-
return "stream";
|
|
18103
|
+
return s === "---" ? "doc" : "stream";
|
|
17939
18104
|
}
|
|
17940
18105
|
}
|
|
17941
18106
|
this.indentValue = yield* this.pushSpaces(false);
|
|
@@ -18122,17 +18287,17 @@ var require_lexer = __commonJS({
|
|
|
18122
18287
|
let nl = this.pos - 1;
|
|
18123
18288
|
let indent = 0;
|
|
18124
18289
|
let ch;
|
|
18125
|
-
loop: for (let
|
|
18290
|
+
loop: for (let i2 = this.pos; ch = this.buffer[i2]; ++i2) {
|
|
18126
18291
|
switch (ch) {
|
|
18127
18292
|
case " ":
|
|
18128
18293
|
indent += 1;
|
|
18129
18294
|
break;
|
|
18130
18295
|
case "\n":
|
|
18131
|
-
nl =
|
|
18296
|
+
nl = i2;
|
|
18132
18297
|
indent = 0;
|
|
18133
18298
|
break;
|
|
18134
18299
|
case "\r": {
|
|
18135
|
-
const next = this.buffer[
|
|
18300
|
+
const next = this.buffer[i2 + 1];
|
|
18136
18301
|
if (!next && !this.atEnd)
|
|
18137
18302
|
return this.setNext("block-scalar");
|
|
18138
18303
|
if (next === "\n")
|
|
@@ -18148,8 +18313,9 @@ var require_lexer = __commonJS({
|
|
|
18148
18313
|
if (indent >= this.indentNext) {
|
|
18149
18314
|
if (this.blockScalarIndent === -1)
|
|
18150
18315
|
this.indentNext = indent;
|
|
18151
|
-
else
|
|
18152
|
-
this.indentNext
|
|
18316
|
+
else {
|
|
18317
|
+
this.indentNext = this.blockScalarIndent + (this.indentNext === 0 ? 1 : this.indentNext);
|
|
18318
|
+
}
|
|
18153
18319
|
do {
|
|
18154
18320
|
const cs = this.continueScalar(nl + 1);
|
|
18155
18321
|
if (cs === -1)
|
|
@@ -18162,17 +18328,25 @@ var require_lexer = __commonJS({
|
|
|
18162
18328
|
nl = this.buffer.length;
|
|
18163
18329
|
}
|
|
18164
18330
|
}
|
|
18165
|
-
|
|
18331
|
+
let i = nl + 1;
|
|
18332
|
+
ch = this.buffer[i];
|
|
18333
|
+
while (ch === " ")
|
|
18334
|
+
ch = this.buffer[++i];
|
|
18335
|
+
if (ch === " ") {
|
|
18336
|
+
while (ch === " " || ch === " " || ch === "\r" || ch === "\n")
|
|
18337
|
+
ch = this.buffer[++i];
|
|
18338
|
+
nl = i - 1;
|
|
18339
|
+
} else if (!this.blockScalarKeep) {
|
|
18166
18340
|
do {
|
|
18167
|
-
let
|
|
18168
|
-
let ch2 = this.buffer[
|
|
18341
|
+
let i2 = nl - 1;
|
|
18342
|
+
let ch2 = this.buffer[i2];
|
|
18169
18343
|
if (ch2 === "\r")
|
|
18170
|
-
ch2 = this.buffer[--
|
|
18171
|
-
const lastChar =
|
|
18172
|
-
while (ch2 === " "
|
|
18173
|
-
ch2 = this.buffer[--
|
|
18174
|
-
if (ch2 === "\n" &&
|
|
18175
|
-
nl =
|
|
18344
|
+
ch2 = this.buffer[--i2];
|
|
18345
|
+
const lastChar = i2;
|
|
18346
|
+
while (ch2 === " ")
|
|
18347
|
+
ch2 = this.buffer[--i2];
|
|
18348
|
+
if (ch2 === "\n" && i2 >= this.pos && i2 + 1 + indent > lastChar)
|
|
18349
|
+
nl = i2;
|
|
18176
18350
|
else
|
|
18177
18351
|
break;
|
|
18178
18352
|
} while (true);
|
|
@@ -18189,7 +18363,7 @@ var require_lexer = __commonJS({
|
|
|
18189
18363
|
while (ch = this.buffer[++i]) {
|
|
18190
18364
|
if (ch === ":") {
|
|
18191
18365
|
const next = this.buffer[i + 1];
|
|
18192
|
-
if (isEmpty(next) || inFlow && next
|
|
18366
|
+
if (isEmpty(next) || inFlow && flowIndicatorChars.has(next))
|
|
18193
18367
|
break;
|
|
18194
18368
|
end = i;
|
|
18195
18369
|
} else if (isEmpty(ch)) {
|
|
@@ -18202,7 +18376,7 @@ var require_lexer = __commonJS({
|
|
|
18202
18376
|
} else
|
|
18203
18377
|
end = i;
|
|
18204
18378
|
}
|
|
18205
|
-
if (next === "#" || inFlow &&
|
|
18379
|
+
if (next === "#" || inFlow && flowIndicatorChars.has(next))
|
|
18206
18380
|
break;
|
|
18207
18381
|
if (ch === "\n") {
|
|
18208
18382
|
const cs = this.continueScalar(i + 1);
|
|
@@ -18211,7 +18385,7 @@ var require_lexer = __commonJS({
|
|
|
18211
18385
|
i = Math.max(i, cs - 2);
|
|
18212
18386
|
}
|
|
18213
18387
|
} else {
|
|
18214
|
-
if (inFlow &&
|
|
18388
|
+
if (inFlow && flowIndicatorChars.has(ch))
|
|
18215
18389
|
break;
|
|
18216
18390
|
end = i;
|
|
18217
18391
|
}
|
|
@@ -18253,7 +18427,7 @@ var require_lexer = __commonJS({
|
|
|
18253
18427
|
case ":": {
|
|
18254
18428
|
const inFlow = this.flowLevel > 0;
|
|
18255
18429
|
const ch1 = this.charAt(1);
|
|
18256
|
-
if (isEmpty(ch1) || inFlow &&
|
|
18430
|
+
if (isEmpty(ch1) || inFlow && flowIndicatorChars.has(ch1)) {
|
|
18257
18431
|
if (!inFlow)
|
|
18258
18432
|
this.indentNext = this.indentValue + 1;
|
|
18259
18433
|
else if (this.flowKey)
|
|
@@ -18275,9 +18449,9 @@ var require_lexer = __commonJS({
|
|
|
18275
18449
|
let i = this.pos + 1;
|
|
18276
18450
|
let ch = this.buffer[i];
|
|
18277
18451
|
while (ch) {
|
|
18278
|
-
if (tagChars.
|
|
18452
|
+
if (tagChars.has(ch))
|
|
18279
18453
|
ch = this.buffer[++i];
|
|
18280
|
-
else if (ch === "%" && hexDigits.
|
|
18454
|
+
else if (ch === "%" && hexDigits.has(this.buffer[i + 1]) && hexDigits.has(this.buffer[i + 2])) {
|
|
18281
18455
|
ch = this.buffer[i += 3];
|
|
18282
18456
|
} else
|
|
18283
18457
|
break;
|
|
@@ -18319,9 +18493,9 @@ var require_lexer = __commonJS({
|
|
|
18319
18493
|
}
|
|
18320
18494
|
});
|
|
18321
18495
|
|
|
18322
|
-
// ../../node_modules/.pnpm/yaml@2.
|
|
18496
|
+
// ../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/parse/line-counter.js
|
|
18323
18497
|
var require_line_counter = __commonJS({
|
|
18324
|
-
"../../node_modules/.pnpm/yaml@2.
|
|
18498
|
+
"../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/parse/line-counter.js"(exports2) {
|
|
18325
18499
|
"use strict";
|
|
18326
18500
|
var LineCounter = class {
|
|
18327
18501
|
constructor() {
|
|
@@ -18350,10 +18524,11 @@ var require_line_counter = __commonJS({
|
|
|
18350
18524
|
}
|
|
18351
18525
|
});
|
|
18352
18526
|
|
|
18353
|
-
// ../../node_modules/.pnpm/yaml@2.
|
|
18527
|
+
// ../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/parse/parser.js
|
|
18354
18528
|
var require_parser = __commonJS({
|
|
18355
|
-
"../../node_modules/.pnpm/yaml@2.
|
|
18529
|
+
"../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/parse/parser.js"(exports2) {
|
|
18356
18530
|
"use strict";
|
|
18531
|
+
var node_process = require("process");
|
|
18357
18532
|
var cst = require_cst();
|
|
18358
18533
|
var lexer = require_lexer();
|
|
18359
18534
|
function includesToken(list2, type) {
|
|
@@ -18477,7 +18652,7 @@ var require_parser = __commonJS({
|
|
|
18477
18652
|
*/
|
|
18478
18653
|
*next(source) {
|
|
18479
18654
|
this.source = source;
|
|
18480
|
-
if (
|
|
18655
|
+
if (node_process.env.LOG_TOKENS)
|
|
18481
18656
|
console.log("|", cst.prettyToken(source));
|
|
18482
18657
|
if (this.atScalar) {
|
|
18483
18658
|
this.atScalar = false;
|
|
@@ -18539,7 +18714,7 @@ var require_parser = __commonJS({
|
|
|
18539
18714
|
}
|
|
18540
18715
|
*step() {
|
|
18541
18716
|
const top2 = this.peek(1);
|
|
18542
|
-
if (this.type === "doc-end" &&
|
|
18717
|
+
if (this.type === "doc-end" && top2?.type !== "doc-end") {
|
|
18543
18718
|
while (this.stack.length > 0)
|
|
18544
18719
|
yield* this.pop();
|
|
18545
18720
|
this.stack.push({
|
|
@@ -18608,7 +18783,7 @@ var require_parser = __commonJS({
|
|
|
18608
18783
|
it.value = token;
|
|
18609
18784
|
} else {
|
|
18610
18785
|
Object.assign(it, { key: token, sep: [] });
|
|
18611
|
-
this.onKeyLine = !
|
|
18786
|
+
this.onKeyLine = !it.explicitKey;
|
|
18612
18787
|
return;
|
|
18613
18788
|
}
|
|
18614
18789
|
break;
|
|
@@ -18799,7 +18974,8 @@ var require_parser = __commonJS({
|
|
|
18799
18974
|
return;
|
|
18800
18975
|
}
|
|
18801
18976
|
if (this.indent >= map.indent) {
|
|
18802
|
-
const
|
|
18977
|
+
const atMapIndent = !this.onKeyLine && this.indent === map.indent;
|
|
18978
|
+
const atNextItem = atMapIndent && (it.sep || it.explicitKey) && this.type !== "seq-item-ind";
|
|
18803
18979
|
let start = [];
|
|
18804
18980
|
if (atNextItem && it.sep && !it.value) {
|
|
18805
18981
|
const nl = [];
|
|
@@ -18836,23 +19012,24 @@ var require_parser = __commonJS({
|
|
|
18836
19012
|
}
|
|
18837
19013
|
return;
|
|
18838
19014
|
case "explicit-key-ind":
|
|
18839
|
-
if (!it.sep && !
|
|
19015
|
+
if (!it.sep && !it.explicitKey) {
|
|
18840
19016
|
it.start.push(this.sourceToken);
|
|
19017
|
+
it.explicitKey = true;
|
|
18841
19018
|
} else if (atNextItem || it.value) {
|
|
18842
19019
|
start.push(this.sourceToken);
|
|
18843
|
-
map.items.push({ start });
|
|
19020
|
+
map.items.push({ start, explicitKey: true });
|
|
18844
19021
|
} else {
|
|
18845
19022
|
this.stack.push({
|
|
18846
19023
|
type: "block-map",
|
|
18847
19024
|
offset: this.offset,
|
|
18848
19025
|
indent: this.indent,
|
|
18849
|
-
items: [{ start: [this.sourceToken] }]
|
|
19026
|
+
items: [{ start: [this.sourceToken], explicitKey: true }]
|
|
18850
19027
|
});
|
|
18851
19028
|
}
|
|
18852
19029
|
this.onKeyLine = true;
|
|
18853
19030
|
return;
|
|
18854
19031
|
case "map-value-ind":
|
|
18855
|
-
if (
|
|
19032
|
+
if (it.explicitKey) {
|
|
18856
19033
|
if (!it.sep) {
|
|
18857
19034
|
if (includesToken(it.start, "newline")) {
|
|
18858
19035
|
Object.assign(it, { key: null, sep: [this.sourceToken] });
|
|
@@ -18879,7 +19056,8 @@ var require_parser = __commonJS({
|
|
|
18879
19056
|
const key = it.key;
|
|
18880
19057
|
const sep3 = it.sep;
|
|
18881
19058
|
sep3.push(this.sourceToken);
|
|
18882
|
-
delete it.key
|
|
19059
|
+
delete it.key;
|
|
19060
|
+
delete it.sep;
|
|
18883
19061
|
this.stack.push({
|
|
18884
19062
|
type: "block-map",
|
|
18885
19063
|
offset: this.offset,
|
|
@@ -18928,7 +19106,17 @@ var require_parser = __commonJS({
|
|
|
18928
19106
|
default: {
|
|
18929
19107
|
const bv = this.startBlockValue(map);
|
|
18930
19108
|
if (bv) {
|
|
18931
|
-
if (
|
|
19109
|
+
if (bv.type === "block-seq") {
|
|
19110
|
+
if (!it.explicitKey && it.sep && !includesToken(it.sep, "newline")) {
|
|
19111
|
+
yield* this.pop({
|
|
19112
|
+
type: "error",
|
|
19113
|
+
offset: this.offset,
|
|
19114
|
+
message: "Unexpected block-seq-ind on same line with key",
|
|
19115
|
+
source: this.source
|
|
19116
|
+
});
|
|
19117
|
+
return;
|
|
19118
|
+
}
|
|
19119
|
+
} else if (atMapIndent) {
|
|
18932
19120
|
map.items.push({ start });
|
|
18933
19121
|
}
|
|
18934
19122
|
this.stack.push(bv);
|
|
@@ -19004,7 +19192,7 @@ var require_parser = __commonJS({
|
|
|
19004
19192
|
do {
|
|
19005
19193
|
yield* this.pop();
|
|
19006
19194
|
top2 = this.peek(1);
|
|
19007
|
-
} while (top2
|
|
19195
|
+
} while (top2?.type === "flow-collection");
|
|
19008
19196
|
} else if (fc.end.length === 0) {
|
|
19009
19197
|
switch (this.type) {
|
|
19010
19198
|
case "comma":
|
|
@@ -19139,7 +19327,7 @@ var require_parser = __commonJS({
|
|
|
19139
19327
|
type: "block-map",
|
|
19140
19328
|
offset: this.offset,
|
|
19141
19329
|
indent: this.indent,
|
|
19142
|
-
items: [{ start }]
|
|
19330
|
+
items: [{ start, explicitKey: true }]
|
|
19143
19331
|
};
|
|
19144
19332
|
}
|
|
19145
19333
|
case "map-value-ind": {
|
|
@@ -19203,14 +19391,15 @@ var require_parser = __commonJS({
|
|
|
19203
19391
|
}
|
|
19204
19392
|
});
|
|
19205
19393
|
|
|
19206
|
-
// ../../node_modules/.pnpm/yaml@2.
|
|
19394
|
+
// ../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/public-api.js
|
|
19207
19395
|
var require_public_api = __commonJS({
|
|
19208
|
-
"../../node_modules/.pnpm/yaml@2.
|
|
19396
|
+
"../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/public-api.js"(exports2) {
|
|
19209
19397
|
"use strict";
|
|
19210
19398
|
var composer = require_composer();
|
|
19211
19399
|
var Document = require_Document();
|
|
19212
19400
|
var errors = require_errors();
|
|
19213
19401
|
var log = require_log();
|
|
19402
|
+
var identity = require_identity();
|
|
19214
19403
|
var lineCounter = require_line_counter();
|
|
19215
19404
|
var parser4 = require_parser();
|
|
19216
19405
|
function parseOptions(options) {
|
|
@@ -19288,6 +19477,8 @@ var require_public_api = __commonJS({
|
|
|
19288
19477
|
if (!keepUndefined)
|
|
19289
19478
|
return void 0;
|
|
19290
19479
|
}
|
|
19480
|
+
if (identity.isDocument(value) && !_replacer)
|
|
19481
|
+
return value.toString(options);
|
|
19291
19482
|
return new Document.Document(value, _replacer, options).toString(options);
|
|
19292
19483
|
}
|
|
19293
19484
|
exports2.parse = parse3;
|
|
@@ -19297,9 +19488,9 @@ var require_public_api = __commonJS({
|
|
|
19297
19488
|
}
|
|
19298
19489
|
});
|
|
19299
19490
|
|
|
19300
|
-
// ../../node_modules/.pnpm/yaml@2.
|
|
19491
|
+
// ../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/index.js
|
|
19301
19492
|
var require_dist3 = __commonJS({
|
|
19302
|
-
"../../node_modules/.pnpm/yaml@2.
|
|
19493
|
+
"../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/index.js"(exports2) {
|
|
19303
19494
|
"use strict";
|
|
19304
19495
|
var composer = require_composer();
|
|
19305
19496
|
var Document = require_Document();
|
|
@@ -19568,7 +19759,7 @@ var init_diff3 = __esm({
|
|
|
19568
19759
|
}
|
|
19569
19760
|
});
|
|
19570
19761
|
|
|
19571
|
-
// ../../node_modules/.pnpm/@fern-api+replay@0.
|
|
19762
|
+
// ../../node_modules/.pnpm/@fern-api+replay@0.8.0/node_modules/@fern-api/replay/dist/index.js
|
|
19572
19763
|
var dist_exports = {};
|
|
19573
19764
|
__export(dist_exports, {
|
|
19574
19765
|
FERN_BOT_EMAIL: () => FERN_BOT_EMAIL2,
|
|
@@ -19585,6 +19776,9 @@ __export(dist_exports, {
|
|
|
19585
19776
|
forget: () => forget,
|
|
19586
19777
|
isGenerationCommit: () => isGenerationCommit,
|
|
19587
19778
|
isReplayCommit: () => isReplayCommit,
|
|
19779
|
+
isRevertCommit: () => isRevertCommit,
|
|
19780
|
+
parseRevertedMessage: () => parseRevertedMessage,
|
|
19781
|
+
parseRevertedSha: () => parseRevertedSha,
|
|
19588
19782
|
reset: () => reset,
|
|
19589
19783
|
resolve: () => resolve7,
|
|
19590
19784
|
status: () => status,
|
|
@@ -19602,6 +19796,17 @@ function isGenerationCommit(commit) {
|
|
|
19602
19796
|
function isReplayCommit(commit) {
|
|
19603
19797
|
return commit.message.startsWith("[fern-replay]");
|
|
19604
19798
|
}
|
|
19799
|
+
function isRevertCommit(message) {
|
|
19800
|
+
return message.startsWith('Revert "');
|
|
19801
|
+
}
|
|
19802
|
+
function parseRevertedSha(fullBody) {
|
|
19803
|
+
const match2 = fullBody.match(/This reverts commit ([0-9a-f]{40})\./);
|
|
19804
|
+
return match2?.[1];
|
|
19805
|
+
}
|
|
19806
|
+
function parseRevertedMessage(subject) {
|
|
19807
|
+
const match2 = subject.match(/^Revert "(.+)"$/);
|
|
19808
|
+
return match2?.[1];
|
|
19809
|
+
}
|
|
19605
19810
|
function threeWayMerge(base, ours, theirs) {
|
|
19606
19811
|
const baseLines = base.split("\n");
|
|
19607
19812
|
const oursLines = ours.split("\n");
|
|
@@ -19645,6 +19850,32 @@ function isDiffLineForFile(diffLine, filePath) {
|
|
|
19645
19850
|
const match2 = diffLine.match(/^diff --git a\/.+ b\/(.+)$/);
|
|
19646
19851
|
return match2 !== null && match2[1] === filePath;
|
|
19647
19852
|
}
|
|
19853
|
+
function stripConflictMarkers(content) {
|
|
19854
|
+
const lines = content.split("\n");
|
|
19855
|
+
const result = [];
|
|
19856
|
+
let inConflict = false;
|
|
19857
|
+
let inOurs = false;
|
|
19858
|
+
for (const line of lines) {
|
|
19859
|
+
if (line.startsWith("<<<<<<< ")) {
|
|
19860
|
+
inConflict = true;
|
|
19861
|
+
inOurs = true;
|
|
19862
|
+
continue;
|
|
19863
|
+
}
|
|
19864
|
+
if (inConflict && line === "=======") {
|
|
19865
|
+
inOurs = false;
|
|
19866
|
+
continue;
|
|
19867
|
+
}
|
|
19868
|
+
if (inConflict && line.startsWith(">>>>>>> ")) {
|
|
19869
|
+
inConflict = false;
|
|
19870
|
+
inOurs = false;
|
|
19871
|
+
continue;
|
|
19872
|
+
}
|
|
19873
|
+
if (!inConflict || inOurs) {
|
|
19874
|
+
result.push(line);
|
|
19875
|
+
}
|
|
19876
|
+
}
|
|
19877
|
+
return result.join("\n");
|
|
19878
|
+
}
|
|
19648
19879
|
async function bootstrap(outputDir, options) {
|
|
19649
19880
|
const git = new GitClient(outputDir);
|
|
19650
19881
|
const lockManager = new LockfileManager(outputDir);
|
|
@@ -19992,7 +20223,7 @@ function status(outputDir) {
|
|
|
19992
20223
|
}
|
|
19993
20224
|
var import_fs6, import_path8, import_yaml, import_crypto, import_promises4, import_os, import_path9, import_fs7, import_path10, import_crypto2, import_fs8, import_path11, import_yaml2, import_crypto3, import_fs9, import_path12, import_fs10, __defProp3, __getOwnPropNames3, __esm3, __export3, GitClient_exports, GitClient, init_GitClient, FERN_BOT_NAME2, FERN_BOT_EMAIL2, FERN_BOT_LOGIN2, FERN_SUPPORT_NAMES, LOCKFILE_HEADER, LockfileManager, INFRASTRUCTURE_FILES, ReplayDetector, BINARY_EXTENSIONS, ReplayApplicator, ReplayCommitter, ReplayService, FernignoreMigrator, REPLAY_FERNIGNORE_ENTRIES;
|
|
19994
20225
|
var init_dist = __esm({
|
|
19995
|
-
"../../node_modules/.pnpm/@fern-api+replay@0.
|
|
20226
|
+
"../../node_modules/.pnpm/@fern-api+replay@0.8.0/node_modules/@fern-api/replay/dist/index.js"() {
|
|
19996
20227
|
"use strict";
|
|
19997
20228
|
init_esm4();
|
|
19998
20229
|
import_fs6 = require("fs");
|
|
@@ -20126,6 +20357,9 @@ var init_dist = __esm({
|
|
|
20126
20357
|
return false;
|
|
20127
20358
|
}
|
|
20128
20359
|
}
|
|
20360
|
+
async getCommitBody(commitSha) {
|
|
20361
|
+
return this.exec(["log", "-1", "--format=%B", commitSha]);
|
|
20362
|
+
}
|
|
20129
20363
|
getRepoPath() {
|
|
20130
20364
|
return this.repoPath;
|
|
20131
20365
|
}
|
|
@@ -20291,14 +20525,14 @@ var init_dist = __esm({
|
|
|
20291
20525
|
const lock = this.lockManager.read();
|
|
20292
20526
|
const lastGen = this.getLastGeneration(lock);
|
|
20293
20527
|
if (!lastGen) {
|
|
20294
|
-
return [];
|
|
20528
|
+
return { patches: [], revertedPatchIds: [] };
|
|
20295
20529
|
}
|
|
20296
20530
|
const exists2 = await this.git.commitExists(lastGen.commit_sha);
|
|
20297
20531
|
if (!exists2) {
|
|
20298
20532
|
this.warnings.push(
|
|
20299
20533
|
`Generation commit ${lastGen.commit_sha.slice(0, 7)} not found in git history. Skipping new patch detection. Existing lockfile patches will still be applied.`
|
|
20300
20534
|
);
|
|
20301
|
-
return [];
|
|
20535
|
+
return { patches: [], revertedPatchIds: [] };
|
|
20302
20536
|
}
|
|
20303
20537
|
const isAncestor = await this.git.isAncestor(lastGen.commit_sha, "HEAD");
|
|
20304
20538
|
if (!isAncestor) {
|
|
@@ -20312,7 +20546,7 @@ var init_dist = __esm({
|
|
|
20312
20546
|
this.sdkOutputDir
|
|
20313
20547
|
]);
|
|
20314
20548
|
if (!log.trim()) {
|
|
20315
|
-
return [];
|
|
20549
|
+
return { patches: [], revertedPatchIds: [] };
|
|
20316
20550
|
}
|
|
20317
20551
|
const commits = this.parseGitLog(log);
|
|
20318
20552
|
const newPatches = [];
|
|
@@ -20348,7 +20582,60 @@ var init_dist = __esm({
|
|
|
20348
20582
|
patch_content: patchContent
|
|
20349
20583
|
});
|
|
20350
20584
|
}
|
|
20351
|
-
|
|
20585
|
+
newPatches.reverse();
|
|
20586
|
+
const revertedPatchIdSet = /* @__PURE__ */ new Set();
|
|
20587
|
+
const revertIndicesToRemove = /* @__PURE__ */ new Set();
|
|
20588
|
+
for (let i = 0; i < newPatches.length; i++) {
|
|
20589
|
+
const patch = newPatches[i];
|
|
20590
|
+
if (!isRevertCommit(patch.original_message)) continue;
|
|
20591
|
+
let body = "";
|
|
20592
|
+
try {
|
|
20593
|
+
body = await this.git.getCommitBody(patch.original_commit);
|
|
20594
|
+
} catch {
|
|
20595
|
+
}
|
|
20596
|
+
const revertedSha = parseRevertedSha(body);
|
|
20597
|
+
const revertedMessage = parseRevertedMessage(patch.original_message);
|
|
20598
|
+
let matchedExisting = false;
|
|
20599
|
+
if (revertedSha) {
|
|
20600
|
+
const existing = lock.patches.find((p) => p.original_commit === revertedSha);
|
|
20601
|
+
if (existing) {
|
|
20602
|
+
revertedPatchIdSet.add(existing.id);
|
|
20603
|
+
revertIndicesToRemove.add(i);
|
|
20604
|
+
matchedExisting = true;
|
|
20605
|
+
}
|
|
20606
|
+
}
|
|
20607
|
+
if (!matchedExisting && revertedMessage) {
|
|
20608
|
+
const existing = lock.patches.find((p) => p.original_message === revertedMessage);
|
|
20609
|
+
if (existing) {
|
|
20610
|
+
revertedPatchIdSet.add(existing.id);
|
|
20611
|
+
revertIndicesToRemove.add(i);
|
|
20612
|
+
matchedExisting = true;
|
|
20613
|
+
}
|
|
20614
|
+
}
|
|
20615
|
+
if (matchedExisting) continue;
|
|
20616
|
+
let matchedNew = false;
|
|
20617
|
+
if (revertedSha) {
|
|
20618
|
+
const idx = newPatches.findIndex(
|
|
20619
|
+
(p, j) => j !== i && !revertIndicesToRemove.has(j) && p.original_commit === revertedSha
|
|
20620
|
+
);
|
|
20621
|
+
if (idx !== -1) {
|
|
20622
|
+
revertIndicesToRemove.add(i);
|
|
20623
|
+
revertIndicesToRemove.add(idx);
|
|
20624
|
+
matchedNew = true;
|
|
20625
|
+
}
|
|
20626
|
+
}
|
|
20627
|
+
if (!matchedNew && revertedMessage) {
|
|
20628
|
+
const idx = newPatches.findIndex(
|
|
20629
|
+
(p, j) => j !== i && !revertIndicesToRemove.has(j) && p.original_message === revertedMessage
|
|
20630
|
+
);
|
|
20631
|
+
if (idx !== -1) {
|
|
20632
|
+
revertIndicesToRemove.add(i);
|
|
20633
|
+
revertIndicesToRemove.add(idx);
|
|
20634
|
+
}
|
|
20635
|
+
}
|
|
20636
|
+
}
|
|
20637
|
+
const filteredPatches = newPatches.filter((_, i) => !revertIndicesToRemove.has(i));
|
|
20638
|
+
return { patches: filteredPatches, revertedPatchIds: [...revertedPatchIdSet] };
|
|
20352
20639
|
}
|
|
20353
20640
|
/**
|
|
20354
20641
|
* Compute content hash for deduplication.
|
|
@@ -20359,31 +20646,34 @@ var init_dist = __esm({
|
|
|
20359
20646
|
const normalized = patchContent.split("\n").filter((line) => !line.startsWith("From ") && !line.startsWith("index ") && !line.startsWith("Date: ")).join("\n");
|
|
20360
20647
|
return `sha256:${(0, import_crypto.createHash)("sha256").update(normalized).digest("hex")}`;
|
|
20361
20648
|
}
|
|
20362
|
-
/**
|
|
20649
|
+
/**
|
|
20650
|
+
* Detect patches via tree diff for non-linear history. Returns a composite patch.
|
|
20651
|
+
* Revert reconciliation is skipped here because tree-diff produces a single composite
|
|
20652
|
+
* patch from the aggregate diff — individual revert commits are not distinguishable.
|
|
20653
|
+
*/
|
|
20363
20654
|
async detectPatchesViaTreeDiff(lastGen) {
|
|
20364
20655
|
const filesOutput = await this.git.exec(["diff", "--name-only", lastGen.commit_sha, "HEAD"]);
|
|
20365
20656
|
const files = filesOutput.trim().split("\n").filter(Boolean).filter((f) => !INFRASTRUCTURE_FILES.has(f)).filter((f) => !f.startsWith(".fern/"));
|
|
20366
|
-
if (files.length === 0) return [];
|
|
20657
|
+
if (files.length === 0) return { patches: [], revertedPatchIds: [] };
|
|
20367
20658
|
const diff = await this.git.exec(["diff", lastGen.commit_sha, "HEAD", "--", ...files]);
|
|
20368
|
-
if (!diff.trim()) return [];
|
|
20659
|
+
if (!diff.trim()) return { patches: [], revertedPatchIds: [] };
|
|
20369
20660
|
const contentHash = this.computeContentHash(diff);
|
|
20370
20661
|
const lock = this.lockManager.read();
|
|
20371
20662
|
if (lock.patches.some((p) => p.content_hash === contentHash)) {
|
|
20372
|
-
return [];
|
|
20663
|
+
return { patches: [], revertedPatchIds: [] };
|
|
20373
20664
|
}
|
|
20374
20665
|
const headSha = (await this.git.exec(["rev-parse", "HEAD"])).trim();
|
|
20375
|
-
|
|
20376
|
-
{
|
|
20377
|
-
|
|
20378
|
-
|
|
20379
|
-
|
|
20380
|
-
|
|
20381
|
-
|
|
20382
|
-
|
|
20383
|
-
|
|
20384
|
-
|
|
20385
|
-
|
|
20386
|
-
];
|
|
20666
|
+
const compositePatch = {
|
|
20667
|
+
id: `patch-composite-${headSha.slice(0, 8)}`,
|
|
20668
|
+
content_hash: contentHash,
|
|
20669
|
+
original_commit: headSha,
|
|
20670
|
+
original_message: "Customer customizations (composite)",
|
|
20671
|
+
original_author: "composite",
|
|
20672
|
+
base_generation: lastGen.commit_sha,
|
|
20673
|
+
files,
|
|
20674
|
+
patch_content: diff
|
|
20675
|
+
};
|
|
20676
|
+
return { patches: [compositePatch], revertedPatchIds: [] };
|
|
20387
20677
|
}
|
|
20388
20678
|
parseGitLog(log) {
|
|
20389
20679
|
return log.trim().split("\n").map((line) => {
|
|
@@ -20993,7 +21283,7 @@ CLI Version: ${options.cliVersion}`;
|
|
|
20993
21283
|
}
|
|
20994
21284
|
this.lockManager.save();
|
|
20995
21285
|
try {
|
|
20996
|
-
const redetectedPatches = await this.detector.detectNewPatches();
|
|
21286
|
+
const { patches: redetectedPatches } = await this.detector.detectNewPatches();
|
|
20997
21287
|
if (redetectedPatches.length > 0) {
|
|
20998
21288
|
const redetectedFiles = new Set(redetectedPatches.flatMap((p) => p.files));
|
|
20999
21289
|
const currentPatches = this.lockManager.getPatches();
|
|
@@ -21084,7 +21374,7 @@ CLI Version: ${options.cliVersion}`;
|
|
|
21084
21374
|
};
|
|
21085
21375
|
}
|
|
21086
21376
|
async handleNoPatchesRegeneration(options) {
|
|
21087
|
-
const newPatches = await this.detector.detectNewPatches();
|
|
21377
|
+
const { patches: newPatches, revertedPatchIds } = await this.detector.detectNewPatches();
|
|
21088
21378
|
const warnings = [...this.detector.warnings];
|
|
21089
21379
|
if (options?.dryRun) {
|
|
21090
21380
|
return {
|
|
@@ -21093,11 +21383,18 @@ CLI Version: ${options.cliVersion}`;
|
|
|
21093
21383
|
patchesApplied: 0,
|
|
21094
21384
|
patchesWithConflicts: 0,
|
|
21095
21385
|
patchesSkipped: 0,
|
|
21386
|
+
patchesReverted: revertedPatchIds.length,
|
|
21096
21387
|
conflicts: [],
|
|
21097
21388
|
wouldApply: newPatches,
|
|
21098
21389
|
warnings: warnings.length > 0 ? warnings : void 0
|
|
21099
21390
|
};
|
|
21100
21391
|
}
|
|
21392
|
+
for (const id of revertedPatchIds) {
|
|
21393
|
+
try {
|
|
21394
|
+
this.lockManager.removePatch(id);
|
|
21395
|
+
} catch {
|
|
21396
|
+
}
|
|
21397
|
+
}
|
|
21101
21398
|
const commitOpts = options ? {
|
|
21102
21399
|
cliVersion: options.cliVersion ?? "unknown",
|
|
21103
21400
|
generatorVersions: options.generatorVersions ?? {},
|
|
@@ -21131,12 +21428,12 @@ CLI Version: ${options.cliVersion}`;
|
|
|
21131
21428
|
await this.committer.stageAll();
|
|
21132
21429
|
}
|
|
21133
21430
|
}
|
|
21134
|
-
return this.buildReport("no-patches", newPatches, results, options, warnings, rebaseCounts);
|
|
21431
|
+
return this.buildReport("no-patches", newPatches, results, options, warnings, rebaseCounts, void 0, revertedPatchIds.length);
|
|
21135
21432
|
}
|
|
21136
21433
|
async handleNormalRegeneration(options) {
|
|
21137
21434
|
if (options?.dryRun) {
|
|
21138
21435
|
const existingPatches2 = this.lockManager.getPatches();
|
|
21139
|
-
const newPatches2 = await this.detector.detectNewPatches();
|
|
21436
|
+
const { patches: newPatches2, revertedPatchIds: dryRunReverted } = await this.detector.detectNewPatches();
|
|
21140
21437
|
const warnings2 = [...this.detector.warnings];
|
|
21141
21438
|
const allPatches2 = [...existingPatches2, ...newPatches2];
|
|
21142
21439
|
return {
|
|
@@ -21145,13 +21442,19 @@ CLI Version: ${options.cliVersion}`;
|
|
|
21145
21442
|
patchesApplied: 0,
|
|
21146
21443
|
patchesWithConflicts: 0,
|
|
21147
21444
|
patchesSkipped: 0,
|
|
21445
|
+
patchesReverted: dryRunReverted.length,
|
|
21148
21446
|
conflicts: [],
|
|
21149
21447
|
wouldApply: allPatches2,
|
|
21150
21448
|
warnings: warnings2.length > 0 ? warnings2 : void 0
|
|
21151
21449
|
};
|
|
21152
21450
|
}
|
|
21153
21451
|
let existingPatches = this.lockManager.getPatches();
|
|
21452
|
+
const preRebasePatchIds = new Set(existingPatches.map((p) => p.id));
|
|
21154
21453
|
const preRebaseCounts = await this.preGenerationRebase(existingPatches);
|
|
21454
|
+
const postRebasePatchIds = new Set(this.lockManager.getPatches().map((p) => p.id));
|
|
21455
|
+
const removedByPreRebase = existingPatches.filter(
|
|
21456
|
+
(p) => preRebasePatchIds.has(p.id) && !postRebasePatchIds.has(p.id)
|
|
21457
|
+
);
|
|
21155
21458
|
existingPatches = this.lockManager.getPatches();
|
|
21156
21459
|
const seenHashes = /* @__PURE__ */ new Set();
|
|
21157
21460
|
for (const p of existingPatches) {
|
|
@@ -21162,8 +21465,28 @@ CLI Version: ${options.cliVersion}`;
|
|
|
21162
21465
|
}
|
|
21163
21466
|
}
|
|
21164
21467
|
existingPatches = this.lockManager.getPatches();
|
|
21165
|
-
|
|
21468
|
+
let { patches: newPatches, revertedPatchIds } = await this.detector.detectNewPatches();
|
|
21166
21469
|
const warnings = [...this.detector.warnings];
|
|
21470
|
+
if (removedByPreRebase.length > 0) {
|
|
21471
|
+
const removedOriginalCommits = new Set(removedByPreRebase.map((p) => p.original_commit));
|
|
21472
|
+
const removedOriginalMessages = new Set(removedByPreRebase.map((p) => p.original_message));
|
|
21473
|
+
newPatches = newPatches.filter((p) => {
|
|
21474
|
+
if (removedOriginalCommits.has(p.original_commit)) return false;
|
|
21475
|
+
if (isRevertCommit(p.original_message)) {
|
|
21476
|
+
const revertedMsg = parseRevertedMessage(p.original_message);
|
|
21477
|
+
if (revertedMsg && removedOriginalMessages.has(revertedMsg)) return false;
|
|
21478
|
+
}
|
|
21479
|
+
return true;
|
|
21480
|
+
});
|
|
21481
|
+
}
|
|
21482
|
+
for (const id of revertedPatchIds) {
|
|
21483
|
+
try {
|
|
21484
|
+
this.lockManager.removePatch(id);
|
|
21485
|
+
} catch {
|
|
21486
|
+
}
|
|
21487
|
+
}
|
|
21488
|
+
const revertedSet = new Set(revertedPatchIds);
|
|
21489
|
+
existingPatches = existingPatches.filter((p) => !revertedSet.has(p.id));
|
|
21167
21490
|
const allPatches = [...existingPatches, ...newPatches];
|
|
21168
21491
|
const commitOpts = options ? {
|
|
21169
21492
|
cliVersion: options.cliVersion ?? "unknown",
|
|
@@ -21208,7 +21531,8 @@ CLI Version: ${options.cliVersion}`;
|
|
|
21208
21531
|
options,
|
|
21209
21532
|
warnings,
|
|
21210
21533
|
rebaseCounts,
|
|
21211
|
-
preRebaseCounts
|
|
21534
|
+
preRebaseCounts,
|
|
21535
|
+
revertedPatchIds.length
|
|
21212
21536
|
);
|
|
21213
21537
|
}
|
|
21214
21538
|
/**
|
|
@@ -21401,36 +21725,6 @@ CLI Version: ${options.cliVersion}`;
|
|
|
21401
21725
|
}
|
|
21402
21726
|
return { conflictResolved, conflictAbsorbed, contentRefreshed };
|
|
21403
21727
|
}
|
|
21404
|
-
/**
|
|
21405
|
-
* Strip conflict markers from file content, keeping the OURS (Generated) side.
|
|
21406
|
-
* Preserves clean patches' non-conflicting changes on shared files.
|
|
21407
|
-
*/
|
|
21408
|
-
stripConflictMarkers(content) {
|
|
21409
|
-
const lines = content.split("\n");
|
|
21410
|
-
const result = [];
|
|
21411
|
-
let inConflict = false;
|
|
21412
|
-
let inOurs = false;
|
|
21413
|
-
for (const line of lines) {
|
|
21414
|
-
if (line.startsWith("<<<<<<< ")) {
|
|
21415
|
-
inConflict = true;
|
|
21416
|
-
inOurs = true;
|
|
21417
|
-
continue;
|
|
21418
|
-
}
|
|
21419
|
-
if (inConflict && line === "=======") {
|
|
21420
|
-
inOurs = false;
|
|
21421
|
-
continue;
|
|
21422
|
-
}
|
|
21423
|
-
if (inConflict && line.startsWith(">>>>>>> ")) {
|
|
21424
|
-
inConflict = false;
|
|
21425
|
-
inOurs = false;
|
|
21426
|
-
continue;
|
|
21427
|
-
}
|
|
21428
|
-
if (!inConflict || inOurs) {
|
|
21429
|
-
result.push(line);
|
|
21430
|
-
}
|
|
21431
|
-
}
|
|
21432
|
-
return result.join("\n");
|
|
21433
|
-
}
|
|
21434
21728
|
/**
|
|
21435
21729
|
* After applyPatches(), strip conflict markers from conflicting files
|
|
21436
21730
|
* so only clean content is committed. Keeps the Generated (OURS) side.
|
|
@@ -21443,7 +21737,7 @@ CLI Version: ${options.cliVersion}`;
|
|
|
21443
21737
|
const filePath = (0, import_path10.join)(this.outputDir, fileResult.file);
|
|
21444
21738
|
try {
|
|
21445
21739
|
const content = (0, import_fs7.readFileSync)(filePath, "utf-8");
|
|
21446
|
-
const stripped =
|
|
21740
|
+
const stripped = stripConflictMarkers(content);
|
|
21447
21741
|
(0, import_fs7.writeFileSync)(filePath, stripped);
|
|
21448
21742
|
} catch {
|
|
21449
21743
|
}
|
|
@@ -21455,7 +21749,7 @@ CLI Version: ${options.cliVersion}`;
|
|
|
21455
21749
|
if (!(0, import_fs7.existsSync)(fernignorePath)) return [];
|
|
21456
21750
|
return (0, import_fs7.readFileSync)(fernignorePath, "utf-8").split("\n").map((line) => line.trim()).filter((line) => line && !line.startsWith("#"));
|
|
21457
21751
|
}
|
|
21458
|
-
buildReport(flow, patches, results, options, warnings, rebaseCounts, preRebaseCounts) {
|
|
21752
|
+
buildReport(flow, patches, results, options, warnings, rebaseCounts, preRebaseCounts, patchesReverted) {
|
|
21459
21753
|
const conflictResults = results.filter((r) => r.status === "conflict");
|
|
21460
21754
|
const conflictDetails = conflictResults.map((r) => {
|
|
21461
21755
|
const conflictFiles = r.fileResults?.filter((f) => f.status === "conflict") ?? [];
|
|
@@ -21480,6 +21774,7 @@ CLI Version: ${options.cliVersion}`;
|
|
|
21480
21774
|
patchesRepointed: rebaseCounts && rebaseCounts.repointed > 0 ? rebaseCounts.repointed : void 0,
|
|
21481
21775
|
patchesContentRebased: rebaseCounts && rebaseCounts.contentRebased > 0 ? rebaseCounts.contentRebased : void 0,
|
|
21482
21776
|
patchesKeptAsUserOwned: rebaseCounts && rebaseCounts.keptAsUserOwned > 0 ? rebaseCounts.keptAsUserOwned : void 0,
|
|
21777
|
+
patchesReverted: patchesReverted && patchesReverted > 0 ? patchesReverted : void 0,
|
|
21483
21778
|
patchesConflictResolved: preRebaseCounts && preRebaseCounts.conflictResolved + preRebaseCounts.conflictAbsorbed > 0 ? preRebaseCounts.conflictResolved + preRebaseCounts.conflictAbsorbed : void 0,
|
|
21484
21779
|
patchesRefreshed: preRebaseCounts && preRebaseCounts.contentRefreshed > 0 ? preRebaseCounts.contentRefreshed : void 0,
|
|
21485
21780
|
conflicts: conflictResults.flatMap((r) => r.fileResults?.filter((f) => f.status === "conflict") ?? []),
|
|
@@ -21519,7 +21814,7 @@ CLI Version: ${options.cliVersion}`;
|
|
|
21519
21814
|
async analyzeMigration() {
|
|
21520
21815
|
const patterns = this.readFernignorePatterns();
|
|
21521
21816
|
const detector = new ReplayDetector(this.git, this.lockManager, this.outputDir);
|
|
21522
|
-
const patches = await detector.detectNewPatches();
|
|
21817
|
+
const { patches } = await detector.detectNewPatches();
|
|
21523
21818
|
const trackedByBoth = [];
|
|
21524
21819
|
const fernignoreOnly = [];
|
|
21525
21820
|
const commitsOnly = [];
|
|
@@ -21644,7 +21939,7 @@ CLI Version: ${options.cliVersion}`;
|
|
|
21644
21939
|
async migrate() {
|
|
21645
21940
|
const analysis = await this.analyzeMigration();
|
|
21646
21941
|
const detector = new ReplayDetector(this.git, this.lockManager, this.outputDir);
|
|
21647
|
-
const patches = await detector.detectNewPatches();
|
|
21942
|
+
const { patches } = await detector.detectNewPatches();
|
|
21648
21943
|
const warnings = [];
|
|
21649
21944
|
let patchesCreated = 0;
|
|
21650
21945
|
for (const patch of patches) {
|
|
@@ -21688,6 +21983,21 @@ CLI Version: ${options.cliVersion}`;
|
|
|
21688
21983
|
}
|
|
21689
21984
|
});
|
|
21690
21985
|
|
|
21986
|
+
// ../commons/core-utils/lib/extractErrorMessage.js
|
|
21987
|
+
function extractErrorMessage(e) {
|
|
21988
|
+
if (typeof e === "string") {
|
|
21989
|
+
return e.length > 0 ? e : "Unknown error";
|
|
21990
|
+
}
|
|
21991
|
+
if (e instanceof Error) {
|
|
21992
|
+
return e.message.length > 0 ? e.message : "Unknown error";
|
|
21993
|
+
}
|
|
21994
|
+
if (typeof e === "object" && e !== null && "message" in e && typeof e["message"] === "string") {
|
|
21995
|
+
return e["message"].length > 0 ? e["message"] : "Unknown error";
|
|
21996
|
+
}
|
|
21997
|
+
const stringified = String(e);
|
|
21998
|
+
return stringified.length > 0 ? stringified : "Unknown error";
|
|
21999
|
+
}
|
|
22000
|
+
|
|
21691
22001
|
// ../commons/path-utils/lib/convertToOsPath.js
|
|
21692
22002
|
function convertToOsPath(path5) {
|
|
21693
22003
|
return path5.replace(/\\/g, "/");
|
|
@@ -23638,7 +23948,7 @@ function parseRepository(githubRepository) {
|
|
|
23638
23948
|
} else if (parts.length === 3 && parts[0] != null && parts[1] != null && parts[2] != null) {
|
|
23639
23949
|
[remote, owner, repo] = parts;
|
|
23640
23950
|
} else {
|
|
23641
|
-
throw new Error(`Failed to parse GitHub
|
|
23951
|
+
throw new Error(`Failed to parse GitHub repository ${githubRepository}`);
|
|
23642
23952
|
}
|
|
23643
23953
|
return newRepositoryReference({ remote, owner, repo });
|
|
23644
23954
|
}
|
|
@@ -23719,7 +24029,7 @@ async function cloneRepository({ githubRepository, installationToken, targetDire
|
|
|
23719
24029
|
await git.clone(cloneUrl, ".");
|
|
23720
24030
|
} catch (error) {
|
|
23721
24031
|
const elapsed = Date.now() - startTime;
|
|
23722
|
-
const errorMessage =
|
|
24032
|
+
const errorMessage = extractErrorMessage(error);
|
|
23723
24033
|
if (errorMessage.includes("ENOENT") || errorMessage.includes("spawn git")) {
|
|
23724
24034
|
const diagnostics = getGitDiagnostics();
|
|
23725
24035
|
throw new Error(`Failed to clone repository: git command not found. Self-hosted GitHub mode requires git to be installed on the host machine where the Fern CLI runs. URL: ${sanitizedUrl}. Elapsed: ${elapsed}ms. Debug info: ${diagnostics}. Original error: ${errorMessage}`);
|
|
@@ -27401,17 +27711,17 @@ async function githubRelease(params) {
|
|
|
27401
27711
|
await github.release();
|
|
27402
27712
|
}
|
|
27403
27713
|
|
|
27404
|
-
// ../../node_modules/.pnpm/es-toolkit@1.
|
|
27714
|
+
// ../../node_modules/.pnpm/es-toolkit@1.45.1/node_modules/es-toolkit/dist/predicate/isLength.mjs
|
|
27405
27715
|
function isLength(value) {
|
|
27406
27716
|
return Number.isSafeInteger(value) && value >= 0;
|
|
27407
27717
|
}
|
|
27408
27718
|
|
|
27409
|
-
// ../../node_modules/.pnpm/es-toolkit@1.
|
|
27719
|
+
// ../../node_modules/.pnpm/es-toolkit@1.45.1/node_modules/es-toolkit/dist/compat/predicate/isArrayLike.mjs
|
|
27410
27720
|
function isArrayLike2(value) {
|
|
27411
27721
|
return value != null && typeof value !== "function" && isLength(value.length);
|
|
27412
27722
|
}
|
|
27413
27723
|
|
|
27414
|
-
// ../../node_modules/.pnpm/es-toolkit@1.
|
|
27724
|
+
// ../../node_modules/.pnpm/es-toolkit@1.45.1/node_modules/es-toolkit/dist/compat/util/toString.mjs
|
|
27415
27725
|
function toString(value) {
|
|
27416
27726
|
if (value == null) {
|
|
27417
27727
|
return "";
|
|
@@ -27429,17 +27739,17 @@ function toString(value) {
|
|
|
27429
27739
|
return result;
|
|
27430
27740
|
}
|
|
27431
27741
|
|
|
27432
|
-
// ../../node_modules/.pnpm/es-toolkit@1.
|
|
27742
|
+
// ../../node_modules/.pnpm/es-toolkit@1.45.1/node_modules/es-toolkit/dist/compat/predicate/isObject.mjs
|
|
27433
27743
|
function isObject(value) {
|
|
27434
27744
|
return value !== null && (typeof value === "object" || typeof value === "function");
|
|
27435
27745
|
}
|
|
27436
27746
|
|
|
27437
|
-
// ../../node_modules/.pnpm/es-toolkit@1.
|
|
27747
|
+
// ../../node_modules/.pnpm/es-toolkit@1.45.1/node_modules/es-toolkit/dist/_internal/isEqualsSameValueZero.mjs
|
|
27438
27748
|
function isEqualsSameValueZero(value, other) {
|
|
27439
27749
|
return value === other || Number.isNaN(value) && Number.isNaN(other);
|
|
27440
27750
|
}
|
|
27441
27751
|
|
|
27442
|
-
// ../../node_modules/.pnpm/es-toolkit@1.
|
|
27752
|
+
// ../../node_modules/.pnpm/es-toolkit@1.45.1/node_modules/es-toolkit/dist/compat/_internal/isIndex.mjs
|
|
27443
27753
|
var IS_UNSIGNED_INTEGER = /^(?:0|[1-9]\d*)$/;
|
|
27444
27754
|
function isIndex(value, length = Number.MAX_SAFE_INTEGER) {
|
|
27445
27755
|
switch (typeof value) {
|
|
@@ -27455,7 +27765,7 @@ function isIndex(value, length = Number.MAX_SAFE_INTEGER) {
|
|
|
27455
27765
|
}
|
|
27456
27766
|
}
|
|
27457
27767
|
|
|
27458
|
-
// ../../node_modules/.pnpm/es-toolkit@1.
|
|
27768
|
+
// ../../node_modules/.pnpm/es-toolkit@1.45.1/node_modules/es-toolkit/dist/compat/_internal/isIterateeCall.mjs
|
|
27459
27769
|
function isIterateeCall(value, index, object2) {
|
|
27460
27770
|
if (!isObject(object2)) {
|
|
27461
27771
|
return false;
|
|
@@ -27466,12 +27776,12 @@ function isIterateeCall(value, index, object2) {
|
|
|
27466
27776
|
return false;
|
|
27467
27777
|
}
|
|
27468
27778
|
|
|
27469
|
-
// ../../node_modules/.pnpm/es-toolkit@1.
|
|
27779
|
+
// ../../node_modules/.pnpm/es-toolkit@1.45.1/node_modules/es-toolkit/dist/predicate/isNil.mjs
|
|
27470
27780
|
function isNil(x) {
|
|
27471
27781
|
return x == null;
|
|
27472
27782
|
}
|
|
27473
27783
|
|
|
27474
|
-
// ../../node_modules/.pnpm/es-toolkit@1.
|
|
27784
|
+
// ../../node_modules/.pnpm/es-toolkit@1.45.1/node_modules/es-toolkit/dist/compat/function/attempt.mjs
|
|
27475
27785
|
function attempt(func, ...args) {
|
|
27476
27786
|
try {
|
|
27477
27787
|
return func(...args);
|
|
@@ -27480,7 +27790,7 @@ function attempt(func, ...args) {
|
|
|
27480
27790
|
}
|
|
27481
27791
|
}
|
|
27482
27792
|
|
|
27483
|
-
// ../../node_modules/.pnpm/es-toolkit@1.
|
|
27793
|
+
// ../../node_modules/.pnpm/es-toolkit@1.45.1/node_modules/es-toolkit/dist/compat/object/defaults.mjs
|
|
27484
27794
|
function defaults2(object2, ...sources) {
|
|
27485
27795
|
object2 = Object(object2);
|
|
27486
27796
|
const objectProto = Object.prototype;
|
|
@@ -27506,18 +27816,18 @@ function defaults2(object2, ...sources) {
|
|
|
27506
27816
|
return object2;
|
|
27507
27817
|
}
|
|
27508
27818
|
|
|
27509
|
-
// ../../node_modules/.pnpm/es-toolkit@1.
|
|
27819
|
+
// ../../node_modules/.pnpm/es-toolkit@1.45.1/node_modules/es-toolkit/dist/string/capitalize.mjs
|
|
27510
27820
|
function capitalize(str) {
|
|
27511
27821
|
return str.charAt(0).toUpperCase() + str.slice(1).toLowerCase();
|
|
27512
27822
|
}
|
|
27513
27823
|
|
|
27514
|
-
// ../../node_modules/.pnpm/es-toolkit@1.
|
|
27824
|
+
// ../../node_modules/.pnpm/es-toolkit@1.45.1/node_modules/es-toolkit/dist/string/words.mjs
|
|
27515
27825
|
var CASE_SPLIT_PATTERN = /\p{Lu}?\p{Ll}+|[0-9]+|\p{Lu}+(?!\p{Ll})|\p{Emoji_Presentation}|\p{Extended_Pictographic}|\p{L}+/gu;
|
|
27516
27826
|
function words(str) {
|
|
27517
27827
|
return Array.from(str.match(CASE_SPLIT_PATTERN) ?? []);
|
|
27518
27828
|
}
|
|
27519
27829
|
|
|
27520
|
-
// ../../node_modules/.pnpm/es-toolkit@1.
|
|
27830
|
+
// ../../node_modules/.pnpm/es-toolkit@1.45.1/node_modules/es-toolkit/dist/string/camelCase.mjs
|
|
27521
27831
|
function camelCase2(str) {
|
|
27522
27832
|
const words$1 = words(str);
|
|
27523
27833
|
if (words$1.length === 0) {
|
|
@@ -27527,7 +27837,7 @@ function camelCase2(str) {
|
|
|
27527
27837
|
return `${first2.toLowerCase()}${rest.map((word) => capitalize(word)).join("")}`;
|
|
27528
27838
|
}
|
|
27529
27839
|
|
|
27530
|
-
// ../../node_modules/.pnpm/es-toolkit@1.
|
|
27840
|
+
// ../../node_modules/.pnpm/es-toolkit@1.45.1/node_modules/es-toolkit/dist/string/escape.mjs
|
|
27531
27841
|
var htmlEscapes = {
|
|
27532
27842
|
"&": "&",
|
|
27533
27843
|
"<": "<",
|
|
@@ -27539,18 +27849,18 @@ function escape2(str) {
|
|
|
27539
27849
|
return str.replace(/[&<>"']/g, (match2) => htmlEscapes[match2]);
|
|
27540
27850
|
}
|
|
27541
27851
|
|
|
27542
|
-
// ../../node_modules/.pnpm/es-toolkit@1.
|
|
27852
|
+
// ../../node_modules/.pnpm/es-toolkit@1.45.1/node_modules/es-toolkit/dist/compat/string/escape.mjs
|
|
27543
27853
|
function escape3(string2) {
|
|
27544
27854
|
return escape2(toString(string2));
|
|
27545
27855
|
}
|
|
27546
27856
|
|
|
27547
|
-
// ../../node_modules/.pnpm/es-toolkit@1.
|
|
27857
|
+
// ../../node_modules/.pnpm/es-toolkit@1.45.1/node_modules/es-toolkit/dist/string/snakeCase.mjs
|
|
27548
27858
|
function snakeCase(str) {
|
|
27549
27859
|
const words$1 = words(str);
|
|
27550
27860
|
return words$1.map((word) => word.toLowerCase()).join("_");
|
|
27551
27861
|
}
|
|
27552
27862
|
|
|
27553
|
-
// ../../node_modules/.pnpm/es-toolkit@1.
|
|
27863
|
+
// ../../node_modules/.pnpm/es-toolkit@1.45.1/node_modules/es-toolkit/dist/compat/string/template.mjs
|
|
27554
27864
|
var esTemplateRegExp = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g;
|
|
27555
27865
|
var unEscapedRegExp = /['\n\r\u2028\u2029\\]/g;
|
|
27556
27866
|
var noMatchExp = /($^)/;
|
|
@@ -27636,7 +27946,7 @@ ${source}
|
|
|
27636
27946
|
return result;
|
|
27637
27947
|
}
|
|
27638
27948
|
|
|
27639
|
-
// ../../node_modules/.pnpm/es-toolkit@1.
|
|
27949
|
+
// ../../node_modules/.pnpm/es-toolkit@1.45.1/node_modules/es-toolkit/dist/string/upperFirst.mjs
|
|
27640
27950
|
function upperFirst(str) {
|
|
27641
27951
|
return str.substring(0, 1).toUpperCase() + str.substring(1);
|
|
27642
27952
|
}
|
|
@@ -30687,7 +30997,7 @@ var ReadmeGenerator = class {
|
|
|
30687
30997
|
await writer.writeLine();
|
|
30688
30998
|
await writer.writeLine("```groovy");
|
|
30689
30999
|
await writer.writeLine("dependencies {");
|
|
30690
|
-
await writer.writeLine(` implementation '${maven.group}:${maven.artifact}'`);
|
|
31000
|
+
await writer.writeLine(` implementation '${maven.group}:${maven.artifact}:${maven.version}'`);
|
|
30691
31001
|
await writer.writeLine("}");
|
|
30692
31002
|
await writer.writeLine("```");
|
|
30693
31003
|
await writer.writeLine();
|
|
@@ -31334,7 +31644,7 @@ async function findExistingUpdatablePR(octokit, owner, repo, baseBranch, logger)
|
|
|
31334
31644
|
}
|
|
31335
31645
|
return void 0;
|
|
31336
31646
|
} catch (error) {
|
|
31337
|
-
logger.debug(`Error finding existing PRs: ${
|
|
31647
|
+
logger.debug(`Error finding existing PRs: ${extractErrorMessage(error)}`);
|
|
31338
31648
|
return void 0;
|
|
31339
31649
|
}
|
|
31340
31650
|
}
|
|
@@ -31361,16 +31671,22 @@ async function checkPRHasOnlyGenerationCommits(octokit, owner, repo, pullNumber,
|
|
|
31361
31671
|
}
|
|
31362
31672
|
return true;
|
|
31363
31673
|
} catch (error) {
|
|
31364
|
-
logger.debug(`Error checking PR commits: ${
|
|
31674
|
+
logger.debug(`Error checking PR commits: ${extractErrorMessage(error)}`);
|
|
31365
31675
|
return false;
|
|
31366
31676
|
}
|
|
31367
31677
|
}
|
|
31368
31678
|
|
|
31369
31679
|
// src/pipeline/github/parseCommitMessage.ts
|
|
31370
|
-
function parseCommitMessageForPR(commitMessage) {
|
|
31680
|
+
function parseCommitMessageForPR(commitMessage, changelogEntry, prDescription, versionBumpReason) {
|
|
31371
31681
|
const lines = commitMessage.split("\n");
|
|
31372
31682
|
const prTitle = lines[0]?.trim() || "SDK Generation";
|
|
31373
|
-
const
|
|
31683
|
+
const bodyFromCommit = lines.slice(1).join("\n").trim() || "Automated SDK generation by Fern";
|
|
31684
|
+
let prBody = prDescription?.trim() || changelogEntry?.trim() || bodyFromCommit;
|
|
31685
|
+
if (versionBumpReason?.trim()) {
|
|
31686
|
+
prBody = `**Version Bump:** ${versionBumpReason.trim()}
|
|
31687
|
+
|
|
31688
|
+
${prBody}`;
|
|
31689
|
+
}
|
|
31374
31690
|
return { prTitle, prBody };
|
|
31375
31691
|
}
|
|
31376
31692
|
|
|
@@ -31594,14 +31910,17 @@ var GithubStep = class extends BaseStep {
|
|
|
31594
31910
|
this.logger.debug(`Pushed ${tagName} tag for generation tracking`);
|
|
31595
31911
|
result.generationBaseTagSha = generationBaseSha;
|
|
31596
31912
|
} catch (error) {
|
|
31597
|
-
this.logger.debug(
|
|
31598
|
-
`Could not push generation tag: ${error instanceof Error ? error.message : String(error)}`
|
|
31599
|
-
);
|
|
31913
|
+
this.logger.debug(`Could not push generation tag: ${extractErrorMessage(error)}`);
|
|
31600
31914
|
}
|
|
31601
31915
|
}
|
|
31602
31916
|
}
|
|
31603
31917
|
const finalCommitMessage = this.config.commitMessage ?? "SDK Generation";
|
|
31604
|
-
const { prTitle, prBody } = parseCommitMessageForPR(
|
|
31918
|
+
const { prTitle, prBody } = parseCommitMessageForPR(
|
|
31919
|
+
finalCommitMessage,
|
|
31920
|
+
this.config.changelogEntry,
|
|
31921
|
+
this.config.prDescription,
|
|
31922
|
+
this.config.versionBumpReason
|
|
31923
|
+
);
|
|
31605
31924
|
const replaySection = formatReplayPrBody(replayResult, { branchName: prBranch, repoUri: this.config.uri });
|
|
31606
31925
|
const enrichedBody = replaySection != null ? prBody + "\n\n---\n\n" + replaySection : prBody;
|
|
31607
31926
|
if (isUpdatingExistingPR && existingPR != null) {
|
|
@@ -31618,9 +31937,7 @@ var GithubStep = class extends BaseStep {
|
|
|
31618
31937
|
});
|
|
31619
31938
|
this.logger.debug(`Updated PR #${existingPR.number} title and body`);
|
|
31620
31939
|
} catch (error) {
|
|
31621
|
-
this.logger.debug(
|
|
31622
|
-
`Failed to update PR title/body: ${error instanceof Error ? error.message : String(error)}`
|
|
31623
|
-
);
|
|
31940
|
+
this.logger.debug(`Failed to update PR title/body: ${extractErrorMessage(error)}`);
|
|
31624
31941
|
}
|
|
31625
31942
|
} else {
|
|
31626
31943
|
const head = `${owner}:${prBranch}`;
|
|
@@ -31637,7 +31954,7 @@ var GithubStep = class extends BaseStep {
|
|
|
31637
31954
|
result.prUrl = pullRequest.html_url;
|
|
31638
31955
|
result.prNumber = pullRequest.number;
|
|
31639
31956
|
} catch (error) {
|
|
31640
|
-
const message =
|
|
31957
|
+
const message = extractErrorMessage(error);
|
|
31641
31958
|
if (message.includes("A pull request already exists for")) {
|
|
31642
31959
|
this.logger.warn(`A pull request already exists for ${head}`);
|
|
31643
31960
|
} else {
|
|
@@ -31712,7 +32029,7 @@ var import_path14 = require("path");
|
|
|
31712
32029
|
var import_fs11 = require("fs");
|
|
31713
32030
|
var import_promises5 = require("fs/promises");
|
|
31714
32031
|
var import_path13 = require("path");
|
|
31715
|
-
var REPLAY_FERNIGNORE_ENTRIES2 = [".fern/replay.lock"
|
|
32032
|
+
var REPLAY_FERNIGNORE_ENTRIES2 = [".fern/replay.lock"];
|
|
31716
32033
|
async function ensureReplayFernignoreEntries(outputDir) {
|
|
31717
32034
|
const fernignorePath = (0, import_path13.join)(outputDir, ".fernignore");
|
|
31718
32035
|
let content = "";
|
|
@@ -32003,7 +32320,7 @@ var PostGenerationPipeline = class {
|
|
|
32003
32320
|
} catch (error) {
|
|
32004
32321
|
result.success = false;
|
|
32005
32322
|
result.errors = result.errors ?? [];
|
|
32006
|
-
const errorMessage =
|
|
32323
|
+
const errorMessage = extractErrorMessage(error);
|
|
32007
32324
|
result.errors.push(`${step.name} step error: ${errorMessage}`);
|
|
32008
32325
|
}
|
|
32009
32326
|
}
|
|
@@ -32020,12 +32337,11 @@ async function replayInit(params) {
|
|
|
32020
32337
|
const { githubRepo, token, dryRun } = params;
|
|
32021
32338
|
const tmpDir = await import_tmp_promise2.default.dir({ unsafeCleanup: true });
|
|
32022
32339
|
const repoPath = tmpDir.path;
|
|
32023
|
-
|
|
32340
|
+
await cloneRepository({
|
|
32024
32341
|
githubRepository: githubRepo,
|
|
32025
32342
|
installationToken: token,
|
|
32026
32343
|
targetDirectory: repoPath
|
|
32027
32344
|
});
|
|
32028
|
-
const defaultBranch = await repository.getDefaultBranch();
|
|
32029
32345
|
const bootstrapResult = await bootstrap(repoPath, {
|
|
32030
32346
|
dryRun,
|
|
32031
32347
|
fernignoreAction: "skip",
|
|
@@ -32034,52 +32350,22 @@ async function replayInit(params) {
|
|
|
32034
32350
|
importHistory: params.importHistory
|
|
32035
32351
|
});
|
|
32036
32352
|
if (!bootstrapResult.generationCommit) {
|
|
32037
|
-
return { bootstrap: bootstrapResult };
|
|
32353
|
+
return { bootstrap: bootstrapResult, fernignoreEntries: [] };
|
|
32038
32354
|
}
|
|
32039
32355
|
if (dryRun) {
|
|
32040
|
-
return { bootstrap: bootstrapResult };
|
|
32356
|
+
return { bootstrap: bootstrapResult, fernignoreEntries: [] };
|
|
32041
32357
|
}
|
|
32042
32358
|
ensureReplayFernignoreEntriesSync(repoPath);
|
|
32043
|
-
const
|
|
32044
|
-
|
|
32045
|
-
|
|
32046
|
-
|
|
32047
|
-
const filesToAdd = [".fern/replay.lock", ".fern/replay.yml", ".fernignore"].filter(
|
|
32048
|
-
(f) => (0, import_fs13.existsSync)((0, import_path15.join)(repoPath, f))
|
|
32049
|
-
);
|
|
32050
|
-
const branchName = `fern-replay/init-${Date.now()}`;
|
|
32051
|
-
await repository.checkoutOrCreateLocal(branchName);
|
|
32052
|
-
const git = new GitClient(repoPath);
|
|
32053
|
-
await git.exec(["add", ...filesToAdd]);
|
|
32054
|
-
await git.exec([
|
|
32055
|
-
"-c",
|
|
32056
|
-
`user.name=${FERN_BOT_NAME2}`,
|
|
32057
|
-
"-c",
|
|
32058
|
-
`user.email=${FERN_BOT_EMAIL2}`,
|
|
32059
|
-
"-c",
|
|
32060
|
-
"commit.gpgsign=false",
|
|
32061
|
-
"commit",
|
|
32062
|
-
"--no-verify",
|
|
32063
|
-
"-m",
|
|
32064
|
-
commitMessage
|
|
32065
|
-
]);
|
|
32066
|
-
await repository.pushUpstream(branchName);
|
|
32067
|
-
const parsed = parseRepository(githubRepo);
|
|
32068
|
-
const octokit = new Octokit2({ auth: token });
|
|
32069
|
-
const prTitle = params.prTitle ?? "[fern-replay] Initialize Replay for SDK customizations";
|
|
32070
|
-
const prBody = params.prBody ?? buildPrBody(bootstrapResult);
|
|
32071
|
-
const { data: pr } = await octokit.pulls.create({
|
|
32072
|
-
owner: parsed.owner,
|
|
32073
|
-
repo: parsed.repo,
|
|
32074
|
-
head: branchName,
|
|
32075
|
-
base: defaultBranch,
|
|
32076
|
-
title: prTitle,
|
|
32077
|
-
body: prBody
|
|
32078
|
-
});
|
|
32359
|
+
const lockfilePath = (0, import_path15.join)(repoPath, ".fern", "replay.lock");
|
|
32360
|
+
const lockfileContent = (0, import_fs13.existsSync)(lockfilePath) ? (0, import_fs13.readFileSync)(lockfilePath, "utf-8") : void 0;
|
|
32361
|
+
const replayYmlPath = (0, import_path15.join)(repoPath, ".fern", "replay.yml");
|
|
32362
|
+
const replayYmlContent = (0, import_fs13.existsSync)(replayYmlPath) ? (0, import_fs13.readFileSync)(replayYmlPath, "utf-8") : void 0;
|
|
32079
32363
|
return {
|
|
32080
32364
|
bootstrap: bootstrapResult,
|
|
32081
|
-
|
|
32082
|
-
|
|
32365
|
+
lockfileContent,
|
|
32366
|
+
replayYmlContent,
|
|
32367
|
+
fernignoreEntries: REPLAY_FERNIGNORE_ENTRIES2,
|
|
32368
|
+
prBody: buildPrBody(bootstrapResult)
|
|
32083
32369
|
};
|
|
32084
32370
|
}
|
|
32085
32371
|
function formatBootstrapSummary(result) {
|
|
@@ -32138,14 +32424,6 @@ function formatBootstrapSummary(result) {
|
|
|
32138
32424
|
entries2.push({ level: "warn", message: ` ${w}` });
|
|
32139
32425
|
}
|
|
32140
32426
|
}
|
|
32141
|
-
if (result.prUrl) {
|
|
32142
|
-
entries2.push({ level: "info", message: `
|
|
32143
|
-
PR created: ${result.prUrl}` });
|
|
32144
|
-
entries2.push({ level: "info", message: "Merge the PR to enable Replay for this repository." });
|
|
32145
|
-
} else if (result.branch) {
|
|
32146
|
-
entries2.push({ level: "info", message: `
|
|
32147
|
-
Pushed to branch: ${result.branch}` });
|
|
32148
|
-
}
|
|
32149
32427
|
return entries2;
|
|
32150
32428
|
}
|
|
32151
32429
|
function buildPrBody(result) {
|
|
@@ -32383,7 +32661,7 @@ void yargs_default(hideBin(process.argv)).scriptName(process.env.CLI_NAME ?? "ge
|
|
|
32383
32661
|
try {
|
|
32384
32662
|
config = JSON.parse(configContent);
|
|
32385
32663
|
} catch (parseError) {
|
|
32386
|
-
const parseMessage =
|
|
32664
|
+
const parseMessage = extractErrorMessage(parseError);
|
|
32387
32665
|
throw new Error(`Failed to parse pipeline config as JSON: ${parseMessage}`);
|
|
32388
32666
|
}
|
|
32389
32667
|
config.outputDir = resolve(wd, argv["output-dir"]);
|
|
@@ -32417,7 +32695,7 @@ ${result.errors.map((e) => ` - ${e}`).join("\n")}
|
|
|
32417
32695
|
process.stdout.write(JSON.stringify(result) + "\n");
|
|
32418
32696
|
process.exitCode = result.success ? 0 : 1;
|
|
32419
32697
|
} catch (error) {
|
|
32420
|
-
const errorMessage =
|
|
32698
|
+
const errorMessage = extractErrorMessage(error);
|
|
32421
32699
|
process.stderr.write(`Pipeline failed: ${errorMessage}
|
|
32422
32700
|
`);
|
|
32423
32701
|
process.exitCode = 1;
|
|
@@ -32448,12 +32726,6 @@ ${result.errors.map((e) => ` - ${e}`).join("\n")}
|
|
|
32448
32726
|
}).option("max-commits", {
|
|
32449
32727
|
type: "number",
|
|
32450
32728
|
description: "Max commits to scan for generation history"
|
|
32451
|
-
}).option("pr-title", {
|
|
32452
|
-
type: "string",
|
|
32453
|
-
description: "Custom title for the PR"
|
|
32454
|
-
}).option("pr-body", {
|
|
32455
|
-
type: "string",
|
|
32456
|
-
description: "Custom body for the PR"
|
|
32457
32729
|
}).option("force", {
|
|
32458
32730
|
type: "boolean",
|
|
32459
32731
|
default: false,
|
|
@@ -32477,8 +32749,6 @@ ${result.errors.map((e) => ` - ${e}`).join("\n")}
|
|
|
32477
32749
|
token: argv.token,
|
|
32478
32750
|
dryRun: argv["dry-run"],
|
|
32479
32751
|
maxCommitsToScan: argv["max-commits"],
|
|
32480
|
-
prTitle: argv["pr-title"],
|
|
32481
|
-
prBody: argv["pr-body"],
|
|
32482
32752
|
force: argv.force,
|
|
32483
32753
|
importHistory: argv["import-history"]
|
|
32484
32754
|
});
|
|
@@ -32496,7 +32766,7 @@ ${result.errors.map((e) => ` - ${e}`).join("\n")}
|
|
|
32496
32766
|
process.stdout.write(JSON.stringify(result, null, 2) + "\n");
|
|
32497
32767
|
process.exit(0);
|
|
32498
32768
|
} catch (error) {
|
|
32499
|
-
const errorMessage =
|
|
32769
|
+
const errorMessage = extractErrorMessage(error);
|
|
32500
32770
|
process.stderr.write(`Replay init failed: ${errorMessage}
|
|
32501
32771
|
`);
|
|
32502
32772
|
process.exit(1);
|
|
@@ -32578,7 +32848,7 @@ Bootstrap complete! Lockfile saved to ${outputDir}/.fern/replay.lock
|
|
|
32578
32848
|
}
|
|
32579
32849
|
process.exit(0);
|
|
32580
32850
|
} catch (error) {
|
|
32581
|
-
const errorMessage =
|
|
32851
|
+
const errorMessage = extractErrorMessage(error);
|
|
32582
32852
|
process.stderr.write(`Bootstrap failed: ${errorMessage}
|
|
32583
32853
|
`);
|
|
32584
32854
|
process.exit(1);
|