fleetfizz 0.14.1 → 0.14.2
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/fleetfizz.mjs +7 -4
- package/package.json +1 -1
package/dist/fleetfizz.mjs
CHANGED
|
@@ -35654,7 +35654,7 @@ const runWith = (command, config) => {
|
|
|
35654
35654
|
};
|
|
35655
35655
|
//#endregion
|
|
35656
35656
|
//#region package.json
|
|
35657
|
-
var version = "0.14.
|
|
35657
|
+
var version = "0.14.2";
|
|
35658
35658
|
//#endregion
|
|
35659
35659
|
//#region ../../node_modules/.pnpm/jsonc-parser@3.3.1/node_modules/jsonc-parser/lib/esm/impl/scanner.js
|
|
35660
35660
|
/**
|
|
@@ -39479,7 +39479,7 @@ const applyScript = (plan, configRecord, init) => {
|
|
|
39479
39479
|
`IFS= read -r ff_schema || ff_schema=""`,
|
|
39480
39480
|
...inputsOf(plan).map((_, i) => `IFS= read -r ff_in_${i} || exit 1`),
|
|
39481
39481
|
`ff_git() { if [ -n "$ff_token" ]; then FF_TOKEN="$ff_token" git -c credential.helper= -c 'credential.helper=!f() { echo username=x-access-token; echo "password=$FF_TOKEN"; }; f' "$@"; else git "$@"; fi; }`,
|
|
39482
|
-
`ff_skills() { if [ -n "$ff_token" ]; then GH_TOKEN="$ff_token" GIT_CONFIG_COUNT=
|
|
39482
|
+
`ff_skills() { if [ -n "$ff_token" ]; then GH_TOKEN="$ff_token" GIT_CONFIG_COUNT=3 GIT_CONFIG_KEY_0=core.autocrlf GIT_CONFIG_VALUE_0=false GIT_CONFIG_KEY_1=credential.helper GIT_CONFIG_VALUE_1= GIT_CONFIG_KEY_2=credential.helper GIT_CONFIG_VALUE_2='!f() { echo username=x-access-token; echo "password=$GH_TOKEN"; }; f' DISABLE_TELEMETRY=1 skills "$@"; else GIT_CONFIG_COUNT=1 GIT_CONFIG_KEY_0=core.autocrlf GIT_CONFIG_VALUE_0=false DISABLE_TELEMETRY=1 skills "$@"; fi; }`,
|
|
39483
39483
|
...configStep(configRecord),
|
|
39484
39484
|
...plan.providers.flatMap((p) => providerSteps(p, offsets)),
|
|
39485
39485
|
doneLine("end", true)
|
|
@@ -42101,7 +42101,8 @@ const treeHash = (dir) => {
|
|
|
42101
42101
|
try {
|
|
42102
42102
|
execFileSync("git", ["init", "-q", "--bare", git]);
|
|
42103
42103
|
const env = { ...process.env, GIT_DIR: git, GIT_INDEX_FILE: join(git, "index") };
|
|
42104
|
-
|
|
42104
|
+
// As ff_skills clones: no line-ending conversion, so the hash is GitHub's.
|
|
42105
|
+
execFileSync("git", ["-c", "core.autocrlf=false", "--work-tree", dir, "add", "-A", "-f", "."], { cwd: dir, env, stdio: "ignore" });
|
|
42105
42106
|
return execFileSync("git", ["write-tree"], { env, encoding: "utf8" }).trim();
|
|
42106
42107
|
} catch {
|
|
42107
42108
|
return undefined;
|
|
@@ -42200,7 +42201,8 @@ const TreeResponse = Struct({
|
|
|
42200
42201
|
path: String$6,
|
|
42201
42202
|
type: String$6,
|
|
42202
42203
|
sha: String$6
|
|
42203
|
-
}))
|
|
42204
|
+
})),
|
|
42205
|
+
truncated: Boolean$4
|
|
42204
42206
|
});
|
|
42205
42207
|
const fetchFolders = fn("fetchFolders")(function* (repo, ref, token) {
|
|
42206
42208
|
const response = yield* execute(get(`https://api.github.com/repos/${repo}/git/trees/${encodeURIComponent(ref ?? "HEAD")}?recursive=1`).pipe(setHeaders({
|
|
@@ -42210,6 +42212,7 @@ const fetchFolders = fn("fetchFolders")(function* (repo, ref, token) {
|
|
|
42210
42212
|
if (response.status === 404) return { error: `no ${ref ?? "default branch"} in ${repo}, or no access to it` };
|
|
42211
42213
|
if (response.status !== 200) return { error: `GitHub answered ${response.status}` };
|
|
42212
42214
|
const body = yield* schemaBodyJson(TreeResponse)(response);
|
|
42215
|
+
if (body.truncated) return { error: "the repo is too large for GitHub to list its folders" };
|
|
42213
42216
|
return { folders: new Map([["", body.sha], ...body.tree.flatMap((e) => e.type === "tree" ? [[e.path, e.sha]] : [])]) };
|
|
42214
42217
|
}, timeout("15 seconds"), orElseSucceed(() => ({ error: "could not reach GitHub" })), provide(layer$2));
|
|
42215
42218
|
const skillQuestion = (subject, found, problem) => ({
|