@docyrus/animaguru 0.16.0 → 0.16.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/NOTICE.md +27 -0
- package/README.md +12 -0
- package/dist/animaguru.js +386 -282
- package/package.json +1 -1
- package/skills/animaguru/SKILL.md +2 -0
- package/skills/animaguru-art-motion/LICENSE +21 -0
- package/skills/animaguru-art-motion/SKILL.md +35 -0
- package/skills/animaguru-art-motion/agents/openai.yaml +4 -0
- package/skills/animaguru-art-motion/references/art/art-nouveau.md +27 -0
- package/skills/animaguru-art-motion/references/art/bauhaus-geometry.md +27 -0
- package/skills/animaguru-art-motion/references/art/blue-period.md +27 -0
- package/skills/animaguru-art-motion/references/art/cave-painting.md +27 -0
- package/skills/animaguru-art-motion/references/art/cinematic-anime-light.md +27 -0
- package/skills/animaguru-art-motion/references/art/constructivist-poster.md +27 -0
- package/skills/animaguru-art-motion/references/art/contemporary-flat.md +27 -0
- package/skills/animaguru-art-motion/references/art/cosmic-comic.md +27 -0
- package/skills/animaguru-art-motion/references/art/cubist-facets.md +27 -0
- package/skills/animaguru-art-motion/references/art/dunhuang-mural.md +27 -0
- package/skills/animaguru-art-motion/references/art/early-cgi.md +27 -0
- package/skills/animaguru-art-motion/references/art/egyptian-wall-painting.md +27 -0
- package/skills/animaguru-art-motion/references/art/expressionist-waves.md +27 -0
- package/skills/animaguru-art-motion/references/art/flat-outline-cartoon.md +27 -0
- package/skills/animaguru-art-motion/references/art/gothic-illumination.md +27 -0
- package/skills/animaguru-art-motion/references/art/greek-vase-painting.md +27 -0
- package/skills/animaguru-art-motion/references/art/hopper-hard-light.md +27 -0
- package/skills/animaguru-art-motion/references/art/impressionist-dabs.md +27 -0
- package/skills/animaguru-art-motion/references/art/ink-wash.md +27 -0
- package/skills/animaguru-art-motion/references/art/klimt-gold.md +27 -0
- package/skills/animaguru-art-motion/references/art/matisse-cut-paper.md +27 -0
- package/skills/animaguru-art-motion/references/art/monet-water-garden.md +27 -0
- package/skills/animaguru-art-motion/references/art/pixel-art.md +27 -0
- package/skills/animaguru-art-motion/references/art/polka-dot-infinity.md +27 -0
- package/skills/animaguru-art-motion/references/art/pop-print.md +27 -0
- package/skills/animaguru-art-motion/references/art/post-impressionist-flow.md +27 -0
- package/skills/animaguru-art-motion/references/art/radiant-line-figures.md +27 -0
- package/skills/animaguru-art-motion/references/art/rembrandt-chiaroscuro.md +27 -0
- package/skills/animaguru-art-motion/references/art/renaissance-sfumato.md +27 -0
- package/skills/animaguru-art-motion/references/art/roman-mosaic.md +27 -0
- package/skills/animaguru-art-motion/references/art/rubber-hose.md +27 -0
- package/skills/animaguru-art-motion/references/art/seurat-pointillism.md +27 -0
- package/skills/animaguru-art-motion/references/art/shadow-puppet.md +27 -0
- package/skills/animaguru-art-motion/references/art/surrealist-soft-forms.md +27 -0
- package/skills/animaguru-art-motion/references/art/vaporwave-vhs.md +27 -0
- package/skills/animaguru-art-motion/references/art/watercolor-cel-world.md +27 -0
- package/skills/animaguru-art-motion/references/art-styles.md +44 -0
- package/skills/animaguru-art-motion/references/coverage.json +190 -0
- package/skills/animaguru-art-motion/references/explainer-grammars.md +17 -0
- package/skills/animaguru-art-motion/references/explainers/concept-morph.md +21 -0
- package/skills/animaguru-art-motion/references/explainers/editorial-evidence.md +21 -0
- package/skills/animaguru-art-motion/references/explainers/honest-data-chart.md +21 -0
- package/skills/animaguru-art-motion/references/explainers/kinetic-type.md +21 -0
- package/skills/animaguru-art-motion/references/explainers/luminous-science.md +21 -0
- package/skills/animaguru-art-motion/references/explainers/presenter-explainer.md +21 -0
- package/skills/animaguru-art-motion/references/explainers/product-interface.md +21 -0
- package/skills/animaguru-art-motion/references/explainers/storytime-acting.md +21 -0
- package/skills/animaguru-art-motion/references/explainers/whiteboard-reasoning.md +21 -0
- package/skills/animaguru-art-motion/references/production.md +78 -0
- package/skills/animaguru-art-motion/references/rendering.md +84 -0
- package/skills/animaguru-art-motion/references/sources.md +40 -0
- package/skills/animaguru-cutcraft/SKILL.md +48 -0
- package/skills/animaguru-cutcraft/agents/openai.yaml +4 -0
- package/skills/animaguru-cutcraft/references/generation.md +61 -0
- package/skills/animaguru-video/SKILL.md +2 -0
package/dist/animaguru.js
CHANGED
|
@@ -8208,7 +8208,7 @@ If you're a developer and you believe this is a bug in isomorphic-git, please fi
|
|
|
8208
8208
|
}
|
|
8209
8209
|
return path;
|
|
8210
8210
|
}
|
|
8211
|
-
function
|
|
8211
|
+
function dirname12(path) {
|
|
8212
8212
|
const last = Math.max(path.lastIndexOf("/"), path.lastIndexOf("\\"));
|
|
8213
8213
|
if (last === -1) return ".";
|
|
8214
8214
|
if (last === 0) return "/";
|
|
@@ -8216,7 +8216,7 @@ If you're a developer and you believe this is a bug in isomorphic-git, please fi
|
|
|
8216
8216
|
}
|
|
8217
8217
|
function flatFileListToDirectoryStructure(files) {
|
|
8218
8218
|
const inodes = /* @__PURE__ */ new Map();
|
|
8219
|
-
const
|
|
8219
|
+
const mkdir13 = function(name2) {
|
|
8220
8220
|
if (!inodes.has(name2)) {
|
|
8221
8221
|
const dir = {
|
|
8222
8222
|
type: "tree",
|
|
@@ -8226,7 +8226,7 @@ If you're a developer and you believe this is a bug in isomorphic-git, please fi
|
|
|
8226
8226
|
children: []
|
|
8227
8227
|
};
|
|
8228
8228
|
inodes.set(name2, dir);
|
|
8229
|
-
dir.parent =
|
|
8229
|
+
dir.parent = mkdir13(dirname12(name2));
|
|
8230
8230
|
if (dir.parent && dir.parent !== dir) dir.parent.children.push(dir);
|
|
8231
8231
|
}
|
|
8232
8232
|
return inodes.get(name2);
|
|
@@ -8239,7 +8239,7 @@ If you're a developer and you believe this is a bug in isomorphic-git, please fi
|
|
|
8239
8239
|
basename: basename6(name2),
|
|
8240
8240
|
metadata,
|
|
8241
8241
|
// This recursively generates any missing parent folders.
|
|
8242
|
-
parent:
|
|
8242
|
+
parent: mkdir13(dirname12(name2)),
|
|
8243
8243
|
children: []
|
|
8244
8244
|
};
|
|
8245
8245
|
if (file2.parent) file2.parent.children.push(file2);
|
|
@@ -8247,7 +8247,7 @@ If you're a developer and you believe this is a bug in isomorphic-git, please fi
|
|
|
8247
8247
|
}
|
|
8248
8248
|
return inodes.get(name2);
|
|
8249
8249
|
};
|
|
8250
|
-
|
|
8250
|
+
mkdir13(".");
|
|
8251
8251
|
for (const file2 of files) {
|
|
8252
8252
|
mkfile(file2.path, file2);
|
|
8253
8253
|
}
|
|
@@ -8650,7 +8650,7 @@ If you're a developer and you believe this is a bug in isomorphic-git, please fi
|
|
|
8650
8650
|
}
|
|
8651
8651
|
return isAbsolute2 ? `/${normalized}` : normalized;
|
|
8652
8652
|
}
|
|
8653
|
-
function
|
|
8653
|
+
function join16(...args) {
|
|
8654
8654
|
if (args.length === 0) return ".";
|
|
8655
8655
|
let joined;
|
|
8656
8656
|
for (let i2 = 0; i2 < args.length; ++i2) {
|
|
@@ -9052,7 +9052,7 @@ If you're a developer and you believe this is a bug in isomorphic-git, please fi
|
|
|
9052
9052
|
for (const [key, value] of actualRefsToWrite) {
|
|
9053
9053
|
await acquireLock(
|
|
9054
9054
|
key,
|
|
9055
|
-
async () => fs2.write(
|
|
9055
|
+
async () => fs2.write(join16(gitdir, key), `${value.trim()}
|
|
9056
9056
|
`, "utf8")
|
|
9057
9057
|
);
|
|
9058
9058
|
}
|
|
@@ -9076,7 +9076,7 @@ If you're a developer and you believe this is a bug in isomorphic-git, please fi
|
|
|
9076
9076
|
}
|
|
9077
9077
|
await acquireLock(
|
|
9078
9078
|
ref,
|
|
9079
|
-
async () => fs2.write(
|
|
9079
|
+
async () => fs2.write(join16(gitdir, ref), `${value.trim()}
|
|
9080
9080
|
`, "utf8")
|
|
9081
9081
|
);
|
|
9082
9082
|
}
|
|
@@ -9094,7 +9094,7 @@ If you're a developer and you believe this is a bug in isomorphic-git, please fi
|
|
|
9094
9094
|
assertWritableRef(ref);
|
|
9095
9095
|
await acquireLock(
|
|
9096
9096
|
ref,
|
|
9097
|
-
async () => fs2.write(
|
|
9097
|
+
async () => fs2.write(join16(gitdir, ref), `ref: ${value.trim()}
|
|
9098
9098
|
`, "utf8")
|
|
9099
9099
|
);
|
|
9100
9100
|
}
|
|
@@ -9121,7 +9121,7 @@ If you're a developer and you believe this is a bug in isomorphic-git, please fi
|
|
|
9121
9121
|
*/
|
|
9122
9122
|
static async deleteRefs({ fs: fs2, gitdir, refs }) {
|
|
9123
9123
|
refs.forEach(assertWritableRef);
|
|
9124
|
-
await Promise.all(refs.map((ref) => fs2.rm(
|
|
9124
|
+
await Promise.all(refs.map((ref) => fs2.rm(join16(gitdir, ref))));
|
|
9125
9125
|
let text2 = await acquireLock(
|
|
9126
9126
|
"packed-refs",
|
|
9127
9127
|
async () => fs2.read(`${gitdir}/packed-refs`, { encoding: "utf8" })
|
|
@@ -10208,7 +10208,7 @@ If you're a developer and you believe this is a bug in isomorphic-git, please fi
|
|
|
10208
10208
|
format = "content",
|
|
10209
10209
|
getExternalRefDelta
|
|
10210
10210
|
}) {
|
|
10211
|
-
let list3 = await fs2.readdir(
|
|
10211
|
+
let list3 = await fs2.readdir(join16(gitdir, "objects/pack"));
|
|
10212
10212
|
list3 = list3.filter((x2) => x2.endsWith(".idx"));
|
|
10213
10213
|
for (const filename of list3) {
|
|
10214
10214
|
const indexFile = `${gitdir}/objects/pack/${filename}`;
|
|
@@ -10605,12 +10605,12 @@ If you're a developer and you believe this is a bug in isomorphic-git, please fi
|
|
|
10605
10605
|
* @param {string} transport
|
|
10606
10606
|
* @param {string} [suggestion]
|
|
10607
10607
|
*/
|
|
10608
|
-
constructor(
|
|
10608
|
+
constructor(url3, transport, suggestion) {
|
|
10609
10609
|
super(
|
|
10610
|
-
`Git remote "${
|
|
10610
|
+
`Git remote "${url3}" uses an unrecognized transport protocol: "${transport}"`
|
|
10611
10611
|
);
|
|
10612
10612
|
this.code = this.name = _UnknownTransportError.code;
|
|
10613
|
-
this.data = { url:
|
|
10613
|
+
this.data = { url: url3, transport, suggestion };
|
|
10614
10614
|
}
|
|
10615
10615
|
};
|
|
10616
10616
|
UnknownTransportError.code = "UnknownTransportError";
|
|
@@ -10618,10 +10618,10 @@ If you're a developer and you believe this is a bug in isomorphic-git, please fi
|
|
|
10618
10618
|
/**
|
|
10619
10619
|
* @param {string} url
|
|
10620
10620
|
*/
|
|
10621
|
-
constructor(
|
|
10622
|
-
super(`Cannot parse remote URL: "${
|
|
10621
|
+
constructor(url3) {
|
|
10622
|
+
super(`Cannot parse remote URL: "${url3}"`);
|
|
10623
10623
|
this.code = this.name = _UrlParseError.code;
|
|
10624
|
-
this.data = { url:
|
|
10624
|
+
this.data = { url: url3 };
|
|
10625
10625
|
}
|
|
10626
10626
|
};
|
|
10627
10627
|
UrlParseError.code = "UrlParseError";
|
|
@@ -11065,9 +11065,9 @@ ${obj.gpgsig ? obj.gpgsig : ""}`;
|
|
|
11065
11065
|
}
|
|
11066
11066
|
const tree = GitTree.from(object2);
|
|
11067
11067
|
for (const entry2 of tree) {
|
|
11068
|
-
map2.set(
|
|
11068
|
+
map2.set(join16(filepath, entry2.path), entry2);
|
|
11069
11069
|
}
|
|
11070
|
-
return tree.entries().map((entry2) =>
|
|
11070
|
+
return tree.entries().map((entry2) => join16(filepath, entry2.path));
|
|
11071
11071
|
}
|
|
11072
11072
|
async type(entry) {
|
|
11073
11073
|
if (entry._type === false) {
|
|
@@ -11160,9 +11160,9 @@ ${obj.gpgsig ? obj.gpgsig : ""}`;
|
|
|
11160
11160
|
if (await entry.type() !== "tree") return null;
|
|
11161
11161
|
const filepath = entry._fullpath;
|
|
11162
11162
|
const { fs: fs2, dir } = this;
|
|
11163
|
-
const names = await fs2.readdir(
|
|
11163
|
+
const names = await fs2.readdir(join16(dir, filepath));
|
|
11164
11164
|
if (names === null) return null;
|
|
11165
|
-
return names.map((name2) =>
|
|
11165
|
+
return names.map((name2) => join16(filepath, name2));
|
|
11166
11166
|
}
|
|
11167
11167
|
async type(entry) {
|
|
11168
11168
|
if (entry._type === false) {
|
|
@@ -11383,19 +11383,19 @@ ${obj.gpgsig ? obj.gpgsig : ""}`;
|
|
|
11383
11383
|
};
|
|
11384
11384
|
return walk2(root);
|
|
11385
11385
|
}
|
|
11386
|
-
async function mkdirp(
|
|
11386
|
+
async function mkdirp(mkdir13, filepath, retries = 10) {
|
|
11387
11387
|
try {
|
|
11388
|
-
await
|
|
11388
|
+
await mkdir13(filepath);
|
|
11389
11389
|
} catch (err2) {
|
|
11390
11390
|
if (err2 === null) return;
|
|
11391
11391
|
if (err2.code === "EEXIST") return;
|
|
11392
11392
|
if (err2.code !== "ENOENT") throw err2;
|
|
11393
|
-
const parent =
|
|
11393
|
+
const parent = dirname12(filepath);
|
|
11394
11394
|
if (parent === "." || parent === "/" || parent === filepath) throw err2;
|
|
11395
|
-
await mkdirp(
|
|
11395
|
+
await mkdirp(mkdir13, parent, retries);
|
|
11396
11396
|
for (let attempt = 0; ; attempt++) {
|
|
11397
11397
|
try {
|
|
11398
|
-
await
|
|
11398
|
+
await mkdir13(filepath);
|
|
11399
11399
|
return;
|
|
11400
11400
|
} catch (err22) {
|
|
11401
11401
|
if (err22 === null || err22.code === "EEXIST") return;
|
|
@@ -11415,7 +11415,7 @@ ${obj.gpgsig ? obj.gpgsig : ""}`;
|
|
|
11415
11415
|
} else if (entries.length) {
|
|
11416
11416
|
await Promise.all(
|
|
11417
11417
|
entries.map((entry) => {
|
|
11418
|
-
const subpath =
|
|
11418
|
+
const subpath = join16(filepath, entry);
|
|
11419
11419
|
return fs2.lstat(subpath).then((stat8) => {
|
|
11420
11420
|
if (!stat8) return;
|
|
11421
11421
|
return stat8.isDirectory() ? rmRecursive(fs2, subpath) : fs2.rm(subpath);
|
|
@@ -11554,7 +11554,7 @@ ${obj.gpgsig ? obj.gpgsig : ""}`;
|
|
|
11554
11554
|
try {
|
|
11555
11555
|
await this._writeFile(filepath, contents, options);
|
|
11556
11556
|
} catch (err2) {
|
|
11557
|
-
await this.mkdir(
|
|
11557
|
+
await this.mkdir(dirname12(filepath));
|
|
11558
11558
|
await this._writeFile(filepath, contents, options);
|
|
11559
11559
|
}
|
|
11560
11560
|
}
|
|
@@ -11700,7 +11700,7 @@ ${obj.gpgsig ? obj.gpgsig : ""}`;
|
|
|
11700
11700
|
if (isAbsolute(submoduleGitdir)) {
|
|
11701
11701
|
return submoduleGitdir;
|
|
11702
11702
|
}
|
|
11703
|
-
const gitdir =
|
|
11703
|
+
const gitdir = join16(dirname12(dotgit), submoduleGitdir);
|
|
11704
11704
|
return gitdir;
|
|
11705
11705
|
});
|
|
11706
11706
|
} else {
|
|
@@ -11722,7 +11722,7 @@ ${obj.gpgsig ? obj.gpgsig : ""}`;
|
|
|
11722
11722
|
async function abortMerge({
|
|
11723
11723
|
fs: _fs,
|
|
11724
11724
|
dir,
|
|
11725
|
-
gitdir =
|
|
11725
|
+
gitdir = join16(dir, ".git"),
|
|
11726
11726
|
commit: commit2 = "HEAD",
|
|
11727
11727
|
cache = {}
|
|
11728
11728
|
}) {
|
|
@@ -11803,17 +11803,17 @@ ${obj.gpgsig ? obj.gpgsig : ""}`;
|
|
|
11803
11803
|
* @param {string} args.filepath - The path of the file to check.
|
|
11804
11804
|
* @returns {Promise<boolean>} - `true` if the file is ignored, `false` otherwise.
|
|
11805
11805
|
*/
|
|
11806
|
-
static async isIgnored({ fs: fs2, dir, gitdir =
|
|
11806
|
+
static async isIgnored({ fs: fs2, dir, gitdir = join16(dir, ".git"), filepath }) {
|
|
11807
11807
|
if (basename6(filepath) === ".git") return true;
|
|
11808
11808
|
if (filepath === ".") return false;
|
|
11809
11809
|
let excludes = "";
|
|
11810
|
-
const excludesFile =
|
|
11810
|
+
const excludesFile = join16(gitdir, "info", "exclude");
|
|
11811
11811
|
if (await fs2.exists(excludesFile)) {
|
|
11812
11812
|
excludes = await fs2.read(excludesFile, "utf8");
|
|
11813
11813
|
}
|
|
11814
11814
|
const pairs = [
|
|
11815
11815
|
{
|
|
11816
|
-
gitignore:
|
|
11816
|
+
gitignore: join16(dir, ".gitignore"),
|
|
11817
11817
|
filepath
|
|
11818
11818
|
}
|
|
11819
11819
|
];
|
|
@@ -11822,7 +11822,7 @@ ${obj.gpgsig ? obj.gpgsig : ""}`;
|
|
|
11822
11822
|
const folder = pieces.slice(0, i2).join("/");
|
|
11823
11823
|
const file2 = pieces.slice(i2).join("/");
|
|
11824
11824
|
pairs.push({
|
|
11825
|
-
gitignore:
|
|
11825
|
+
gitignore: join16(dir, folder, ".gitignore"),
|
|
11826
11826
|
filepath: file2
|
|
11827
11827
|
});
|
|
11828
11828
|
}
|
|
@@ -11836,7 +11836,7 @@ ${obj.gpgsig ? obj.gpgsig : ""}`;
|
|
|
11836
11836
|
}
|
|
11837
11837
|
const ign = ignore2().add(excludes);
|
|
11838
11838
|
ign.add(file2);
|
|
11839
|
-
const parentdir =
|
|
11839
|
+
const parentdir = dirname12(p.filepath);
|
|
11840
11840
|
if (parentdir !== "." && ign.ignores(parentdir)) return true;
|
|
11841
11841
|
if (ignoredStatus) {
|
|
11842
11842
|
ignoredStatus = !ign.test(p.filepath).unignored;
|
|
@@ -11909,7 +11909,7 @@ ${obj.gpgsig ? obj.gpgsig : ""}`;
|
|
|
11909
11909
|
async function add({
|
|
11910
11910
|
fs: _fs,
|
|
11911
11911
|
dir,
|
|
11912
|
-
gitdir =
|
|
11912
|
+
gitdir = join16(dir, ".git"),
|
|
11913
11913
|
filepath,
|
|
11914
11914
|
cache = {},
|
|
11915
11915
|
force = false,
|
|
@@ -11973,17 +11973,17 @@ ${obj.gpgsig ? obj.gpgsig : ""}`;
|
|
|
11973
11973
|
});
|
|
11974
11974
|
if (ignored) return;
|
|
11975
11975
|
}
|
|
11976
|
-
const stats = await fs2.lstat(
|
|
11976
|
+
const stats = await fs2.lstat(join16(dir, currentFilepath));
|
|
11977
11977
|
if (!stats) throw new NotFoundError(currentFilepath);
|
|
11978
11978
|
if (stats.isDirectory()) {
|
|
11979
|
-
const children = await fs2.readdir(
|
|
11979
|
+
const children = await fs2.readdir(join16(dir, currentFilepath));
|
|
11980
11980
|
if (parallel) {
|
|
11981
11981
|
const promises3 = children.map(
|
|
11982
11982
|
(child) => addToIndex({
|
|
11983
11983
|
dir,
|
|
11984
11984
|
gitdir,
|
|
11985
11985
|
fs: fs2,
|
|
11986
|
-
filepath: [
|
|
11986
|
+
filepath: [join16(currentFilepath, child)],
|
|
11987
11987
|
index: index3,
|
|
11988
11988
|
force,
|
|
11989
11989
|
parallel,
|
|
@@ -11997,7 +11997,7 @@ ${obj.gpgsig ? obj.gpgsig : ""}`;
|
|
|
11997
11997
|
dir,
|
|
11998
11998
|
gitdir,
|
|
11999
11999
|
fs: fs2,
|
|
12000
|
-
filepath: [
|
|
12000
|
+
filepath: [join16(currentFilepath, child)],
|
|
12001
12001
|
index: index3,
|
|
12002
12002
|
force,
|
|
12003
12003
|
parallel,
|
|
@@ -12006,7 +12006,7 @@ ${obj.gpgsig ? obj.gpgsig : ""}`;
|
|
|
12006
12006
|
}
|
|
12007
12007
|
}
|
|
12008
12008
|
} else {
|
|
12009
|
-
const object2 = stats.isSymbolicLink() ? await fs2.readlink(
|
|
12009
|
+
const object2 = stats.isSymbolicLink() ? await fs2.readlink(join16(dir, currentFilepath)).then(posixifyPathBuffer) : await fs2.read(join16(dir, currentFilepath), { autocrlf });
|
|
12010
12010
|
if (object2 === null) throw new NotFoundError(currentFilepath);
|
|
12011
12011
|
const oid = await _writeObject({ fs: fs2, gitdir, type: "blob", object: object2 });
|
|
12012
12012
|
index3.insert({ filepath: currentFilepath, stats, oid });
|
|
@@ -12440,7 +12440,7 @@ ${obj.gpgsig ? obj.gpgsig : ""}`;
|
|
|
12440
12440
|
fs: _fs,
|
|
12441
12441
|
onSign,
|
|
12442
12442
|
dir,
|
|
12443
|
-
gitdir =
|
|
12443
|
+
gitdir = join16(dir, ".git"),
|
|
12444
12444
|
ref = "refs/notes/commits",
|
|
12445
12445
|
oid,
|
|
12446
12446
|
note,
|
|
@@ -12487,7 +12487,7 @@ ${obj.gpgsig ? obj.gpgsig : ""}`;
|
|
|
12487
12487
|
throw err2;
|
|
12488
12488
|
}
|
|
12489
12489
|
}
|
|
12490
|
-
async function _addRemote({ fs: fs2, gitdir, remote, url:
|
|
12490
|
+
async function _addRemote({ fs: fs2, gitdir, remote, url: url3, force }) {
|
|
12491
12491
|
if (!isValidRef(remote, true)) {
|
|
12492
12492
|
throw new InvalidRefNameError(remote, cleanGitRef.clean(remote));
|
|
12493
12493
|
}
|
|
@@ -12495,12 +12495,12 @@ ${obj.gpgsig ? obj.gpgsig : ""}`;
|
|
|
12495
12495
|
if (!force) {
|
|
12496
12496
|
const remoteNames = await config2.getSubsections("remote");
|
|
12497
12497
|
if (remoteNames.includes(remote)) {
|
|
12498
|
-
if (
|
|
12498
|
+
if (url3 !== await config2.get(`remote.${remote}.url`)) {
|
|
12499
12499
|
throw new AlreadyExistsError("remote", remote);
|
|
12500
12500
|
}
|
|
12501
12501
|
}
|
|
12502
12502
|
}
|
|
12503
|
-
await config2.set(`remote.${remote}.url`,
|
|
12503
|
+
await config2.set(`remote.${remote}.url`, url3);
|
|
12504
12504
|
await config2.set(
|
|
12505
12505
|
`remote.${remote}.fetch`,
|
|
12506
12506
|
`+refs/heads/*:refs/remotes/${remote}/*`
|
|
@@ -12510,23 +12510,23 @@ ${obj.gpgsig ? obj.gpgsig : ""}`;
|
|
|
12510
12510
|
async function addRemote({
|
|
12511
12511
|
fs: fs2,
|
|
12512
12512
|
dir,
|
|
12513
|
-
gitdir =
|
|
12513
|
+
gitdir = join16(dir, ".git"),
|
|
12514
12514
|
remote,
|
|
12515
|
-
url:
|
|
12515
|
+
url: url3,
|
|
12516
12516
|
force = false
|
|
12517
12517
|
}) {
|
|
12518
12518
|
try {
|
|
12519
12519
|
assertParameter("fs", fs2);
|
|
12520
12520
|
assertParameter("gitdir", gitdir);
|
|
12521
12521
|
assertParameter("remote", remote);
|
|
12522
|
-
assertParameter("url",
|
|
12522
|
+
assertParameter("url", url3);
|
|
12523
12523
|
const fsp = new FileSystem(fs2);
|
|
12524
12524
|
const updatedGitdir = await discoverGitdir({ fsp, dotgit: gitdir });
|
|
12525
12525
|
return await _addRemote({
|
|
12526
12526
|
fs: fsp,
|
|
12527
12527
|
gitdir: updatedGitdir,
|
|
12528
12528
|
remote,
|
|
12529
|
-
url:
|
|
12529
|
+
url: url3,
|
|
12530
12530
|
force
|
|
12531
12531
|
});
|
|
12532
12532
|
} catch (err2) {
|
|
@@ -12580,7 +12580,7 @@ ${obj.gpgsig ? obj.gpgsig : ""}`;
|
|
|
12580
12580
|
fs: _fs,
|
|
12581
12581
|
onSign,
|
|
12582
12582
|
dir,
|
|
12583
|
-
gitdir =
|
|
12583
|
+
gitdir = join16(dir, ".git"),
|
|
12584
12584
|
ref,
|
|
12585
12585
|
tagger: _tagger,
|
|
12586
12586
|
message = ref,
|
|
@@ -12661,7 +12661,7 @@ ${obj.gpgsig ? obj.gpgsig : ""}`;
|
|
|
12661
12661
|
async function branch({
|
|
12662
12662
|
fs: fs2,
|
|
12663
12663
|
dir,
|
|
12664
|
-
gitdir =
|
|
12664
|
+
gitdir = join16(dir, ".git"),
|
|
12665
12665
|
ref,
|
|
12666
12666
|
object: object2,
|
|
12667
12667
|
checkout: checkout2 = false,
|
|
@@ -13325,7 +13325,7 @@ ${obj.gpgsig ? obj.gpgsig : ""}`;
|
|
|
13325
13325
|
onProgress,
|
|
13326
13326
|
onPostCheckout,
|
|
13327
13327
|
dir,
|
|
13328
|
-
gitdir =
|
|
13328
|
+
gitdir = join16(dir, ".git"),
|
|
13329
13329
|
remote = "origin",
|
|
13330
13330
|
ref: _ref,
|
|
13331
13331
|
filepaths,
|
|
@@ -13406,7 +13406,7 @@ ${obj.gpgsig ? obj.gpgsig : ""}`;
|
|
|
13406
13406
|
fs: fs2,
|
|
13407
13407
|
cache,
|
|
13408
13408
|
dir,
|
|
13409
|
-
gitdir =
|
|
13409
|
+
gitdir = join16(dir, ".git"),
|
|
13410
13410
|
index: index3,
|
|
13411
13411
|
ourOid,
|
|
13412
13412
|
baseOid,
|
|
@@ -13676,7 +13676,7 @@ ${obj.gpgsig ? obj.gpgsig : ""}`;
|
|
|
13676
13676
|
workdir: WORKDIR
|
|
13677
13677
|
};
|
|
13678
13678
|
async function checkAndWriteBlob(fs2, gitdir, dir, filepath, oid = null) {
|
|
13679
|
-
const currentFilepath =
|
|
13679
|
+
const currentFilepath = join16(dir, filepath);
|
|
13680
13680
|
const stats = await fs2.lstat(currentFilepath);
|
|
13681
13681
|
if (!stats) throw new NotFoundError(currentFilepath);
|
|
13682
13682
|
if (stats.isDirectory())
|
|
@@ -13845,7 +13845,7 @@ ${obj.gpgsig ? obj.gpgsig : ""}`;
|
|
|
13845
13845
|
stageUpdated.push({
|
|
13846
13846
|
filepath,
|
|
13847
13847
|
oid,
|
|
13848
|
-
stats: await fs2.lstat(
|
|
13848
|
+
stats: await fs2.lstat(join16(dir, filepath))
|
|
13849
13849
|
});
|
|
13850
13850
|
return {
|
|
13851
13851
|
method: "write",
|
|
@@ -13858,7 +13858,7 @@ ${obj.gpgsig ? obj.gpgsig : ""}`;
|
|
|
13858
13858
|
});
|
|
13859
13859
|
await acquireLock(gitdir, async () => {
|
|
13860
13860
|
for (const op of ops) {
|
|
13861
|
-
const currentFilepath =
|
|
13861
|
+
const currentFilepath = join16(dir, op.filepath);
|
|
13862
13862
|
switch (op.method) {
|
|
13863
13863
|
case "rmdir":
|
|
13864
13864
|
await fs2.rmdir(currentFilepath);
|
|
@@ -13992,7 +13992,7 @@ ${obj.gpgsig ? obj.gpgsig : ""}`;
|
|
|
13992
13992
|
async function cherryPick({
|
|
13993
13993
|
fs: _fs,
|
|
13994
13994
|
dir,
|
|
13995
|
-
gitdir =
|
|
13995
|
+
gitdir = join16(dir, ".git"),
|
|
13996
13996
|
oid,
|
|
13997
13997
|
cache = {},
|
|
13998
13998
|
committer,
|
|
@@ -14086,10 +14086,10 @@ ${obj.gpgsig ? obj.gpgsig : ""}`;
|
|
|
14086
14086
|
if (!ref.startsWith("refs/")) return;
|
|
14087
14087
|
return fullname ? ref : abbreviateRef(ref);
|
|
14088
14088
|
}
|
|
14089
|
-
function translateSSHtoHTTP(
|
|
14090
|
-
|
|
14091
|
-
|
|
14092
|
-
return
|
|
14089
|
+
function translateSSHtoHTTP(url3) {
|
|
14090
|
+
url3 = url3.replace(/^[^/@:]+@([^/@:]+):/, "https://$1/");
|
|
14091
|
+
url3 = url3.replace(/^ssh:\/\//, "https://");
|
|
14092
|
+
return url3;
|
|
14093
14093
|
}
|
|
14094
14094
|
function calculateBasicAuthHeader({ username = "", password = "" }) {
|
|
14095
14095
|
return `Basic ${Buffer.from(`${username}:${password}`).toString("base64")}`;
|
|
@@ -14119,16 +14119,16 @@ ${obj.gpgsig ? obj.gpgsig : ""}`;
|
|
|
14119
14119
|
return result;
|
|
14120
14120
|
}
|
|
14121
14121
|
var CREDENTIALS = /^(https?:\/\/)([^/?#]+)@/i;
|
|
14122
|
-
function extractAuthFromUrl(
|
|
14123
|
-
const credentials =
|
|
14124
|
-
if (credentials == null) return { url:
|
|
14122
|
+
function extractAuthFromUrl(url3) {
|
|
14123
|
+
const credentials = url3.match(CREDENTIALS);
|
|
14124
|
+
if (credentials == null) return { url: url3, auth: {} };
|
|
14125
14125
|
return {
|
|
14126
|
-
url:
|
|
14127
|
-
auth: parseUserinfo(
|
|
14126
|
+
url: url3.replace(CREDENTIALS, "$1"),
|
|
14127
|
+
auth: parseUserinfo(url3, credentials[2])
|
|
14128
14128
|
};
|
|
14129
14129
|
}
|
|
14130
|
-
function parseUserinfo(
|
|
14131
|
-
const parsed = parseUrl(
|
|
14130
|
+
function parseUserinfo(url3, userpass) {
|
|
14131
|
+
const parsed = parseUrl(url3);
|
|
14132
14132
|
const hasPassword = userpass.indexOf(":") !== -1;
|
|
14133
14133
|
if (parsed !== null) {
|
|
14134
14134
|
return {
|
|
@@ -14142,10 +14142,10 @@ ${obj.gpgsig ? obj.gpgsig : ""}`;
|
|
|
14142
14142
|
password: hasPassword ? userpass.slice(separatorIndex + 1) : void 0
|
|
14143
14143
|
};
|
|
14144
14144
|
}
|
|
14145
|
-
function parseUrl(
|
|
14145
|
+
function parseUrl(url3) {
|
|
14146
14146
|
if (typeof URL !== "function") return null;
|
|
14147
14147
|
try {
|
|
14148
|
-
return new URL(
|
|
14148
|
+
return new URL(url3);
|
|
14149
14149
|
} catch (_) {
|
|
14150
14150
|
return null;
|
|
14151
14151
|
}
|
|
@@ -14269,7 +14269,7 @@ ${obj.gpgsig ? obj.gpgsig : ""}`;
|
|
|
14269
14269
|
}
|
|
14270
14270
|
return split;
|
|
14271
14271
|
}
|
|
14272
|
-
var corsProxify = (corsProxy,
|
|
14272
|
+
var corsProxify = (corsProxy, url3) => corsProxy.endsWith("?") ? `${corsProxy}${url3}` : `${corsProxy}/${url3.replace(/^https?:\/\//, "")}`;
|
|
14273
14273
|
var updateHeaders = (headers, auth) => {
|
|
14274
14274
|
if (auth.username || auth.password) {
|
|
14275
14275
|
headers.Authorization = calculateBasicAuthHeader(auth);
|
|
@@ -14330,8 +14330,8 @@ ${obj.gpgsig ? obj.gpgsig : ""}`;
|
|
|
14330
14330
|
signal,
|
|
14331
14331
|
protocolVersion
|
|
14332
14332
|
}) {
|
|
14333
|
-
let { url:
|
|
14334
|
-
const proxifiedURL = corsProxy ? corsProxify(corsProxy,
|
|
14333
|
+
let { url: url3, auth } = extractAuthFromUrl(_origUrl);
|
|
14334
|
+
const proxifiedURL = corsProxy ? corsProxify(corsProxy, url3) : url3;
|
|
14335
14335
|
if (auth.username || auth.password) {
|
|
14336
14336
|
headers.Authorization = calculateBasicAuthHeader(auth);
|
|
14337
14337
|
}
|
|
@@ -14353,7 +14353,7 @@ ${obj.gpgsig ? obj.gpgsig : ""}`;
|
|
|
14353
14353
|
if (res.statusCode === 401 || res.statusCode === 203) {
|
|
14354
14354
|
const getAuth = providedAuthBefore ? onAuthFailure : onAuth;
|
|
14355
14355
|
if (getAuth) {
|
|
14356
|
-
auth = await getAuth(
|
|
14356
|
+
auth = await getAuth(url3, {
|
|
14357
14357
|
...auth,
|
|
14358
14358
|
headers: { ...headers }
|
|
14359
14359
|
});
|
|
@@ -14366,7 +14366,7 @@ ${obj.gpgsig ? obj.gpgsig : ""}`;
|
|
|
14366
14366
|
}
|
|
14367
14367
|
}
|
|
14368
14368
|
} else if (res.statusCode === 200 && providedAuthBefore && onAuthSuccess) {
|
|
14369
|
-
await onAuthSuccess(
|
|
14369
|
+
await onAuthSuccess(url3, auth);
|
|
14370
14370
|
}
|
|
14371
14371
|
} while (tryAgain);
|
|
14372
14372
|
if (res.statusCode !== 200) {
|
|
@@ -14409,22 +14409,22 @@ ${obj.gpgsig ? obj.gpgsig : ""}`;
|
|
|
14409
14409
|
onProgress,
|
|
14410
14410
|
corsProxy,
|
|
14411
14411
|
service,
|
|
14412
|
-
url:
|
|
14412
|
+
url: url3,
|
|
14413
14413
|
auth,
|
|
14414
14414
|
body,
|
|
14415
14415
|
headers,
|
|
14416
14416
|
signal
|
|
14417
14417
|
}) {
|
|
14418
|
-
const urlAuth = extractAuthFromUrl(
|
|
14419
|
-
if (urlAuth)
|
|
14420
|
-
if (corsProxy)
|
|
14418
|
+
const urlAuth = extractAuthFromUrl(url3);
|
|
14419
|
+
if (urlAuth) url3 = urlAuth.url;
|
|
14420
|
+
if (corsProxy) url3 = corsProxify(corsProxy, url3);
|
|
14421
14421
|
headers["content-type"] = `application/x-${service}-request`;
|
|
14422
14422
|
headers.accept = `application/x-${service}-result`;
|
|
14423
14423
|
updateHeaders(headers, auth);
|
|
14424
14424
|
const res = await http.request({
|
|
14425
14425
|
onProgress,
|
|
14426
14426
|
method: "POST",
|
|
14427
|
-
url: `${
|
|
14427
|
+
url: `${url3}/${service}`,
|
|
14428
14428
|
body,
|
|
14429
14429
|
headers,
|
|
14430
14430
|
signal
|
|
@@ -14446,33 +14446,33 @@ ${obj.gpgsig ? obj.gpgsig : ""}`;
|
|
|
14446
14446
|
* @throws {UrlParseError} - If the URL cannot be parsed.
|
|
14447
14447
|
* @throws {UnknownTransportError} - If the transport is not supported.
|
|
14448
14448
|
*/
|
|
14449
|
-
static getRemoteHelperFor({ url:
|
|
14449
|
+
static getRemoteHelperFor({ url: url3 }) {
|
|
14450
14450
|
const remoteHelpers = /* @__PURE__ */ new Map();
|
|
14451
14451
|
remoteHelpers.set("http", GitRemoteHTTP);
|
|
14452
14452
|
remoteHelpers.set("https", GitRemoteHTTP);
|
|
14453
|
-
const parts = parseRemoteUrl({ url:
|
|
14453
|
+
const parts = parseRemoteUrl({ url: url3 });
|
|
14454
14454
|
if (!parts) {
|
|
14455
|
-
throw new UrlParseError(
|
|
14455
|
+
throw new UrlParseError(url3);
|
|
14456
14456
|
}
|
|
14457
14457
|
if (remoteHelpers.has(parts.transport)) {
|
|
14458
14458
|
return remoteHelpers.get(parts.transport);
|
|
14459
14459
|
}
|
|
14460
14460
|
throw new UnknownTransportError(
|
|
14461
|
-
|
|
14461
|
+
url3,
|
|
14462
14462
|
parts.transport,
|
|
14463
|
-
parts.transport === "ssh" ? translateSSHtoHTTP(
|
|
14463
|
+
parts.transport === "ssh" ? translateSSHtoHTTP(url3) : void 0
|
|
14464
14464
|
);
|
|
14465
14465
|
}
|
|
14466
14466
|
};
|
|
14467
14467
|
var scpLike = /^[^/@:]+@[^/@:]+:/;
|
|
14468
|
-
function parseRemoteUrl({ url:
|
|
14469
|
-
if (scpLike.test(
|
|
14468
|
+
function parseRemoteUrl({ url: url3 }) {
|
|
14469
|
+
if (scpLike.test(url3)) {
|
|
14470
14470
|
return {
|
|
14471
14471
|
transport: "ssh",
|
|
14472
|
-
address:
|
|
14472
|
+
address: url3
|
|
14473
14473
|
};
|
|
14474
14474
|
}
|
|
14475
|
-
const matches =
|
|
14475
|
+
const matches = url3.match(/(\w+)(:\/\/|::)(.*)/);
|
|
14476
14476
|
if (matches === null) return;
|
|
14477
14477
|
if (matches[2] === "://") {
|
|
14478
14478
|
return {
|
|
@@ -14497,7 +14497,7 @@ ${obj.gpgsig ? obj.gpgsig : ""}`;
|
|
|
14497
14497
|
* @returns {Promise<Set<string>>} - A set of shallow object IDs.
|
|
14498
14498
|
*/
|
|
14499
14499
|
static async read({ fs: fs2, gitdir }) {
|
|
14500
|
-
const filepath =
|
|
14500
|
+
const filepath = join16(gitdir, "shallow");
|
|
14501
14501
|
const oids = /* @__PURE__ */ new Set();
|
|
14502
14502
|
await acquireLock(filepath, async function() {
|
|
14503
14503
|
const text2 = await fs2.read(filepath, { encoding: "utf8" });
|
|
@@ -14518,7 +14518,7 @@ ${obj.gpgsig ? obj.gpgsig : ""}`;
|
|
|
14518
14518
|
* @returns {Promise<void>}
|
|
14519
14519
|
*/
|
|
14520
14520
|
static async write({ fs: fs2, gitdir, oids }) {
|
|
14521
|
-
const filepath =
|
|
14521
|
+
const filepath = join16(gitdir, "shallow");
|
|
14522
14522
|
if (oids.size > 0) {
|
|
14523
14523
|
const text2 = [...oids].join("\n") + "\n";
|
|
14524
14524
|
await acquireLock(filepath, async function() {
|
|
@@ -14544,7 +14544,7 @@ ${obj.gpgsig ? obj.gpgsig : ""}`;
|
|
|
14544
14544
|
oid,
|
|
14545
14545
|
getExternalRefDelta
|
|
14546
14546
|
}) {
|
|
14547
|
-
let list3 = await fs2.readdir(
|
|
14547
|
+
let list3 = await fs2.readdir(join16(gitdir, "objects/pack"));
|
|
14548
14548
|
list3 = list3.filter((x2) => x2.endsWith(".idx"));
|
|
14549
14549
|
for (const filename of list3) {
|
|
14550
14550
|
const indexFile = `${gitdir}/objects/pack/${filename}`;
|
|
@@ -14583,9 +14583,9 @@ ${obj.gpgsig ? obj.gpgsig : ""}`;
|
|
|
14583
14583
|
}
|
|
14584
14584
|
function addCredentialUsername({ config: config2, onAuth }) {
|
|
14585
14585
|
if (!onAuth) return onAuth;
|
|
14586
|
-
return async (
|
|
14587
|
-
const username = auth.username || await config2.get(`credential.${
|
|
14588
|
-
return onAuth(
|
|
14586
|
+
return async (url3, auth) => {
|
|
14587
|
+
const username = auth.username || await config2.get(`credential.${url3}.username`);
|
|
14588
|
+
return onAuth(url3, username ? { ...auth, username } : auth);
|
|
14589
14589
|
};
|
|
14590
14590
|
}
|
|
14591
14591
|
function emptyPackfile(pack) {
|
|
@@ -14911,15 +14911,15 @@ ${obj.gpgsig ? obj.gpgsig : ""}`;
|
|
|
14911
14911
|
const ref = _ref || await _currentBranch({ fs: fs2, gitdir, test: true });
|
|
14912
14912
|
const config2 = await GitConfigManager.get({ fs: fs2, gitdir });
|
|
14913
14913
|
const remote = _remote || ref && await config2.get(`branch.${ref}.remote`) || "origin";
|
|
14914
|
-
const
|
|
14915
|
-
if (typeof
|
|
14914
|
+
const url3 = _url2 || await config2.get(`remote.${remote}.url`);
|
|
14915
|
+
if (typeof url3 === "undefined") {
|
|
14916
14916
|
throw new MissingParameterError("remote OR url");
|
|
14917
14917
|
}
|
|
14918
14918
|
const remoteRef = _remoteRef || ref && await config2.get(`branch.${ref}.merge`) || _ref || "HEAD";
|
|
14919
14919
|
if (corsProxy === void 0) {
|
|
14920
14920
|
corsProxy = await config2.get("http.corsProxy");
|
|
14921
14921
|
}
|
|
14922
|
-
const GitRemoteHTTP2 = GitRemoteManager.getRemoteHelperFor({ url:
|
|
14922
|
+
const GitRemoteHTTP2 = GitRemoteManager.getRemoteHelperFor({ url: url3 });
|
|
14923
14923
|
const remoteHTTP = await GitRemoteHTTP2.discover({
|
|
14924
14924
|
http,
|
|
14925
14925
|
onAuth: addCredentialUsername({ config: config2, onAuth }),
|
|
@@ -14927,7 +14927,7 @@ ${obj.gpgsig ? obj.gpgsig : ""}`;
|
|
|
14927
14927
|
onAuthFailure: addCredentialUsername({ config: config2, onAuth: onAuthFailure }),
|
|
14928
14928
|
corsProxy,
|
|
14929
14929
|
service: "git-upload-pack",
|
|
14930
|
-
url:
|
|
14930
|
+
url: url3,
|
|
14931
14931
|
headers,
|
|
14932
14932
|
protocolVersion: 1
|
|
14933
14933
|
});
|
|
@@ -15013,7 +15013,7 @@ ${obj.gpgsig ? obj.gpgsig : ""}`;
|
|
|
15013
15013
|
onProgress,
|
|
15014
15014
|
corsProxy,
|
|
15015
15015
|
service: "git-upload-pack",
|
|
15016
|
-
url:
|
|
15016
|
+
url: url3,
|
|
15017
15017
|
auth,
|
|
15018
15018
|
body: [packbuffer],
|
|
15019
15019
|
headers
|
|
@@ -15101,7 +15101,7 @@ ${obj.gpgsig ? obj.gpgsig : ""}`;
|
|
|
15101
15101
|
const noun = fullref.startsWith("refs/tags") ? "tag" : "branch";
|
|
15102
15102
|
response.FETCH_HEAD = {
|
|
15103
15103
|
oid,
|
|
15104
|
-
description: `${noun} '${abbreviateRef(fullref)}' of ${
|
|
15104
|
+
description: `${noun} '${abbreviateRef(fullref)}' of ${url3}`
|
|
15105
15105
|
};
|
|
15106
15106
|
if (onProgress || onMessage) {
|
|
15107
15107
|
const lines = splitLines(response.progress);
|
|
@@ -15135,7 +15135,7 @@ ${obj.gpgsig ? obj.gpgsig : ""}`;
|
|
|
15135
15135
|
}
|
|
15136
15136
|
if (packfileSha !== "" && !emptyPackfile(packfile)) {
|
|
15137
15137
|
res.packfile = `objects/pack/pack-${packfileSha}.pack`;
|
|
15138
|
-
const fullpath =
|
|
15138
|
+
const fullpath = join16(gitdir, res.packfile);
|
|
15139
15139
|
await fs2.write(fullpath, packfile);
|
|
15140
15140
|
const getExternalRefDelta = (oid2) => _readObject({ fs: fs2, cache, gitdir, oid: oid2 });
|
|
15141
15141
|
const idx = await GitPackIndex.fromPack({
|
|
@@ -15151,7 +15151,7 @@ ${obj.gpgsig ? obj.gpgsig : ""}`;
|
|
|
15151
15151
|
fs: fs2,
|
|
15152
15152
|
bare = false,
|
|
15153
15153
|
dir,
|
|
15154
|
-
gitdir = bare ? dir :
|
|
15154
|
+
gitdir = bare ? dir : join16(dir, ".git"),
|
|
15155
15155
|
defaultBranch = "master"
|
|
15156
15156
|
}) {
|
|
15157
15157
|
if (await fs2.exists(gitdir + "/config")) return;
|
|
@@ -15190,7 +15190,7 @@ ${obj.gpgsig ? obj.gpgsig : ""}`;
|
|
|
15190
15190
|
onPostCheckout,
|
|
15191
15191
|
dir,
|
|
15192
15192
|
gitdir,
|
|
15193
|
-
url:
|
|
15193
|
+
url: url3,
|
|
15194
15194
|
corsProxy,
|
|
15195
15195
|
ref,
|
|
15196
15196
|
remote,
|
|
@@ -15207,7 +15207,7 @@ ${obj.gpgsig ? obj.gpgsig : ""}`;
|
|
|
15207
15207
|
}) {
|
|
15208
15208
|
try {
|
|
15209
15209
|
await _init({ fs: fs2, gitdir });
|
|
15210
|
-
await _addRemote({ fs: fs2, gitdir, remote, url:
|
|
15210
|
+
await _addRemote({ fs: fs2, gitdir, remote, url: url3, force: false });
|
|
15211
15211
|
if (corsProxy) {
|
|
15212
15212
|
const config2 = await GitConfigManager.get({ fs: fs2, gitdir });
|
|
15213
15213
|
await config2.set(`http.corsProxy`, corsProxy);
|
|
@@ -15265,8 +15265,8 @@ ${obj.gpgsig ? obj.gpgsig : ""}`;
|
|
|
15265
15265
|
onAuthFailure,
|
|
15266
15266
|
onPostCheckout,
|
|
15267
15267
|
dir,
|
|
15268
|
-
gitdir =
|
|
15269
|
-
url:
|
|
15268
|
+
gitdir = join16(dir, ".git"),
|
|
15269
|
+
url: url3,
|
|
15270
15270
|
corsProxy = void 0,
|
|
15271
15271
|
ref = void 0,
|
|
15272
15272
|
remote = "origin",
|
|
@@ -15289,7 +15289,7 @@ ${obj.gpgsig ? obj.gpgsig : ""}`;
|
|
|
15289
15289
|
if (!noCheckout) {
|
|
15290
15290
|
assertParameter("dir", dir);
|
|
15291
15291
|
}
|
|
15292
|
-
assertParameter("url",
|
|
15292
|
+
assertParameter("url", url3);
|
|
15293
15293
|
const fsp = new FileSystem(fs2);
|
|
15294
15294
|
const updatedGitdir = await discoverGitdir({ fsp, dotgit: gitdir });
|
|
15295
15295
|
return await _clone({
|
|
@@ -15304,7 +15304,7 @@ ${obj.gpgsig ? obj.gpgsig : ""}`;
|
|
|
15304
15304
|
onPostCheckout,
|
|
15305
15305
|
dir,
|
|
15306
15306
|
gitdir: updatedGitdir,
|
|
15307
|
-
url:
|
|
15307
|
+
url: url3,
|
|
15308
15308
|
corsProxy,
|
|
15309
15309
|
ref,
|
|
15310
15310
|
remote,
|
|
@@ -15328,7 +15328,7 @@ ${obj.gpgsig ? obj.gpgsig : ""}`;
|
|
|
15328
15328
|
fs: _fs,
|
|
15329
15329
|
onSign,
|
|
15330
15330
|
dir,
|
|
15331
|
-
gitdir =
|
|
15331
|
+
gitdir = join16(dir, ".git"),
|
|
15332
15332
|
message,
|
|
15333
15333
|
author,
|
|
15334
15334
|
committer,
|
|
@@ -15377,7 +15377,7 @@ ${obj.gpgsig ? obj.gpgsig : ""}`;
|
|
|
15377
15377
|
async function currentBranch({
|
|
15378
15378
|
fs: fs2,
|
|
15379
15379
|
dir,
|
|
15380
|
-
gitdir =
|
|
15380
|
+
gitdir = join16(dir, ".git"),
|
|
15381
15381
|
fullname = false,
|
|
15382
15382
|
test = false
|
|
15383
15383
|
}) {
|
|
@@ -15418,7 +15418,7 @@ ${obj.gpgsig ? obj.gpgsig : ""}`;
|
|
|
15418
15418
|
async function deleteBranch({
|
|
15419
15419
|
fs: fs2,
|
|
15420
15420
|
dir,
|
|
15421
|
-
gitdir =
|
|
15421
|
+
gitdir = join16(dir, ".git"),
|
|
15422
15422
|
ref
|
|
15423
15423
|
}) {
|
|
15424
15424
|
try {
|
|
@@ -15436,7 +15436,7 @@ ${obj.gpgsig ? obj.gpgsig : ""}`;
|
|
|
15436
15436
|
throw err2;
|
|
15437
15437
|
}
|
|
15438
15438
|
}
|
|
15439
|
-
async function deleteRef({ fs: fs2, dir, gitdir =
|
|
15439
|
+
async function deleteRef({ fs: fs2, dir, gitdir = join16(dir, ".git"), ref }) {
|
|
15440
15440
|
try {
|
|
15441
15441
|
assertParameter("fs", fs2);
|
|
15442
15442
|
assertParameter("ref", ref);
|
|
@@ -15456,7 +15456,7 @@ ${obj.gpgsig ? obj.gpgsig : ""}`;
|
|
|
15456
15456
|
async function deleteRemote({
|
|
15457
15457
|
fs: fs2,
|
|
15458
15458
|
dir,
|
|
15459
|
-
gitdir =
|
|
15459
|
+
gitdir = join16(dir, ".git"),
|
|
15460
15460
|
remote
|
|
15461
15461
|
}) {
|
|
15462
15462
|
try {
|
|
@@ -15478,7 +15478,7 @@ ${obj.gpgsig ? obj.gpgsig : ""}`;
|
|
|
15478
15478
|
ref = ref.startsWith("refs/tags/") ? ref : `refs/tags/${ref}`;
|
|
15479
15479
|
await GitRefManager.deleteRef({ fs: fs2, gitdir, ref });
|
|
15480
15480
|
}
|
|
15481
|
-
async function deleteTag({ fs: fs2, dir, gitdir =
|
|
15481
|
+
async function deleteTag({ fs: fs2, dir, gitdir = join16(dir, ".git"), ref }) {
|
|
15482
15482
|
try {
|
|
15483
15483
|
assertParameter("fs", fs2);
|
|
15484
15484
|
assertParameter("ref", ref);
|
|
@@ -15507,7 +15507,7 @@ ${obj.gpgsig ? obj.gpgsig : ""}`;
|
|
|
15507
15507
|
getExternalRefDelta
|
|
15508
15508
|
}) {
|
|
15509
15509
|
const results = [];
|
|
15510
|
-
let list3 = await fs2.readdir(
|
|
15510
|
+
let list3 = await fs2.readdir(join16(gitdir, "objects/pack"));
|
|
15511
15511
|
list3 = list3.filter((x2) => x2.endsWith(".idx"));
|
|
15512
15512
|
for (const filename of list3) {
|
|
15513
15513
|
const indexFile = `${gitdir}/objects/pack/${filename}`;
|
|
@@ -15550,7 +15550,7 @@ ${obj.gpgsig ? obj.gpgsig : ""}`;
|
|
|
15550
15550
|
async function expandOid({
|
|
15551
15551
|
fs: fs2,
|
|
15552
15552
|
dir,
|
|
15553
|
-
gitdir =
|
|
15553
|
+
gitdir = join16(dir, ".git"),
|
|
15554
15554
|
oid,
|
|
15555
15555
|
cache = {}
|
|
15556
15556
|
}) {
|
|
@@ -15571,7 +15571,7 @@ ${obj.gpgsig ? obj.gpgsig : ""}`;
|
|
|
15571
15571
|
throw err2;
|
|
15572
15572
|
}
|
|
15573
15573
|
}
|
|
15574
|
-
async function expandRef({ fs: fs2, dir, gitdir =
|
|
15574
|
+
async function expandRef({ fs: fs2, dir, gitdir = join16(dir, ".git"), ref }) {
|
|
15575
15575
|
try {
|
|
15576
15576
|
assertParameter("fs", fs2);
|
|
15577
15577
|
assertParameter("gitdir", gitdir);
|
|
@@ -15781,7 +15781,7 @@ ${obj.gpgsig ? obj.gpgsig : ""}`;
|
|
|
15781
15781
|
dir,
|
|
15782
15782
|
gitdir,
|
|
15783
15783
|
ref,
|
|
15784
|
-
url:
|
|
15784
|
+
url: url3,
|
|
15785
15785
|
remote,
|
|
15786
15786
|
remoteRef,
|
|
15787
15787
|
prune,
|
|
@@ -15815,7 +15815,7 @@ ${obj.gpgsig ? obj.gpgsig : ""}`;
|
|
|
15815
15815
|
gitdir,
|
|
15816
15816
|
corsProxy,
|
|
15817
15817
|
ref,
|
|
15818
|
-
url:
|
|
15818
|
+
url: url3,
|
|
15819
15819
|
remote,
|
|
15820
15820
|
remoteRef,
|
|
15821
15821
|
singleBranch,
|
|
@@ -15862,9 +15862,9 @@ ${obj.gpgsig ? obj.gpgsig : ""}`;
|
|
|
15862
15862
|
onAuthSuccess,
|
|
15863
15863
|
onAuthFailure,
|
|
15864
15864
|
dir,
|
|
15865
|
-
gitdir =
|
|
15865
|
+
gitdir = join16(dir, ".git"),
|
|
15866
15866
|
ref,
|
|
15867
|
-
url:
|
|
15867
|
+
url: url3,
|
|
15868
15868
|
remote,
|
|
15869
15869
|
remoteRef,
|
|
15870
15870
|
corsProxy,
|
|
@@ -15896,7 +15896,7 @@ ${obj.gpgsig ? obj.gpgsig : ""}`;
|
|
|
15896
15896
|
dir,
|
|
15897
15897
|
gitdir: updatedGitdir,
|
|
15898
15898
|
ref,
|
|
15899
|
-
url:
|
|
15899
|
+
url: url3,
|
|
15900
15900
|
remote,
|
|
15901
15901
|
remoteRef,
|
|
15902
15902
|
fastForwardOnly: true,
|
|
@@ -15920,11 +15920,11 @@ ${obj.gpgsig ? obj.gpgsig : ""}`;
|
|
|
15920
15920
|
onAuthSuccess,
|
|
15921
15921
|
onAuthFailure,
|
|
15922
15922
|
dir,
|
|
15923
|
-
gitdir =
|
|
15923
|
+
gitdir = join16(dir, ".git"),
|
|
15924
15924
|
ref,
|
|
15925
15925
|
remote,
|
|
15926
15926
|
remoteRef,
|
|
15927
|
-
url:
|
|
15927
|
+
url: url3,
|
|
15928
15928
|
corsProxy,
|
|
15929
15929
|
depth = null,
|
|
15930
15930
|
since = null,
|
|
@@ -15956,7 +15956,7 @@ ${obj.gpgsig ? obj.gpgsig : ""}`;
|
|
|
15956
15956
|
ref,
|
|
15957
15957
|
remote,
|
|
15958
15958
|
remoteRef,
|
|
15959
|
-
url:
|
|
15959
|
+
url: url3,
|
|
15960
15960
|
corsProxy,
|
|
15961
15961
|
depth,
|
|
15962
15962
|
since,
|
|
@@ -15976,7 +15976,7 @@ ${obj.gpgsig ? obj.gpgsig : ""}`;
|
|
|
15976
15976
|
async function findMergeBase({
|
|
15977
15977
|
fs: fs2,
|
|
15978
15978
|
dir,
|
|
15979
|
-
gitdir =
|
|
15979
|
+
gitdir = join16(dir, ".git"),
|
|
15980
15980
|
oids,
|
|
15981
15981
|
cache = {}
|
|
15982
15982
|
}) {
|
|
@@ -15998,10 +15998,10 @@ ${obj.gpgsig ? obj.gpgsig : ""}`;
|
|
|
15998
15998
|
}
|
|
15999
15999
|
}
|
|
16000
16000
|
async function _findRoot({ fs: fs2, filepath }) {
|
|
16001
|
-
if (await fs2.exists(
|
|
16001
|
+
if (await fs2.exists(join16(filepath, ".git"))) {
|
|
16002
16002
|
return filepath;
|
|
16003
16003
|
} else {
|
|
16004
|
-
const parent =
|
|
16004
|
+
const parent = dirname12(filepath);
|
|
16005
16005
|
if (parent === filepath) {
|
|
16006
16006
|
throw new NotFoundError(`git root for ${filepath}`);
|
|
16007
16007
|
}
|
|
@@ -16018,7 +16018,7 @@ ${obj.gpgsig ? obj.gpgsig : ""}`;
|
|
|
16018
16018
|
throw err2;
|
|
16019
16019
|
}
|
|
16020
16020
|
}
|
|
16021
|
-
async function getConfig({ fs: fs2, dir, gitdir =
|
|
16021
|
+
async function getConfig({ fs: fs2, dir, gitdir = join16(dir, ".git"), path }) {
|
|
16022
16022
|
try {
|
|
16023
16023
|
assertParameter("fs", fs2);
|
|
16024
16024
|
assertParameter("gitdir", gitdir);
|
|
@@ -16042,7 +16042,7 @@ ${obj.gpgsig ? obj.gpgsig : ""}`;
|
|
|
16042
16042
|
async function getConfigAll({
|
|
16043
16043
|
fs: fs2,
|
|
16044
16044
|
dir,
|
|
16045
|
-
gitdir =
|
|
16045
|
+
gitdir = join16(dir, ".git"),
|
|
16046
16046
|
path
|
|
16047
16047
|
}) {
|
|
16048
16048
|
try {
|
|
@@ -16078,14 +16078,14 @@ ${obj.gpgsig ? obj.gpgsig : ""}`;
|
|
|
16078
16078
|
onAuthSuccess,
|
|
16079
16079
|
onAuthFailure,
|
|
16080
16080
|
corsProxy,
|
|
16081
|
-
url:
|
|
16081
|
+
url: url3,
|
|
16082
16082
|
headers = {},
|
|
16083
16083
|
forPush = false
|
|
16084
16084
|
}) {
|
|
16085
16085
|
try {
|
|
16086
16086
|
assertParameter("http", http);
|
|
16087
|
-
assertParameter("url",
|
|
16088
|
-
const GitRemoteHTTP2 = GitRemoteManager.getRemoteHelperFor({ url:
|
|
16087
|
+
assertParameter("url", url3);
|
|
16088
|
+
const GitRemoteHTTP2 = GitRemoteManager.getRemoteHelperFor({ url: url3 });
|
|
16089
16089
|
const remote = await GitRemoteHTTP2.discover({
|
|
16090
16090
|
http,
|
|
16091
16091
|
onAuth,
|
|
@@ -16093,7 +16093,7 @@ ${obj.gpgsig ? obj.gpgsig : ""}`;
|
|
|
16093
16093
|
onAuthFailure,
|
|
16094
16094
|
corsProxy,
|
|
16095
16095
|
service: forPush ? "git-receive-pack" : "git-upload-pack",
|
|
16096
|
-
url:
|
|
16096
|
+
url: url3,
|
|
16097
16097
|
headers,
|
|
16098
16098
|
protocolVersion: 1
|
|
16099
16099
|
});
|
|
@@ -16143,15 +16143,15 @@ ${obj.gpgsig ? obj.gpgsig : ""}`;
|
|
|
16143
16143
|
onAuthSuccess,
|
|
16144
16144
|
onAuthFailure,
|
|
16145
16145
|
corsProxy,
|
|
16146
|
-
url:
|
|
16146
|
+
url: url3,
|
|
16147
16147
|
headers = {},
|
|
16148
16148
|
forPush = false,
|
|
16149
16149
|
protocolVersion = 2
|
|
16150
16150
|
}) {
|
|
16151
16151
|
try {
|
|
16152
16152
|
assertParameter("http", http);
|
|
16153
|
-
assertParameter("url",
|
|
16154
|
-
const GitRemoteHTTP2 = GitRemoteManager.getRemoteHelperFor({ url:
|
|
16153
|
+
assertParameter("url", url3);
|
|
16154
|
+
const GitRemoteHTTP2 = GitRemoteManager.getRemoteHelperFor({ url: url3 });
|
|
16155
16155
|
const remote = await GitRemoteHTTP2.discover({
|
|
16156
16156
|
http,
|
|
16157
16157
|
onAuth,
|
|
@@ -16159,7 +16159,7 @@ ${obj.gpgsig ? obj.gpgsig : ""}`;
|
|
|
16159
16159
|
onAuthFailure,
|
|
16160
16160
|
corsProxy,
|
|
16161
16161
|
service: forPush ? "git-receive-pack" : "git-upload-pack",
|
|
16162
|
-
url:
|
|
16162
|
+
url: url3,
|
|
16163
16163
|
headers,
|
|
16164
16164
|
protocolVersion
|
|
16165
16165
|
});
|
|
@@ -16231,7 +16231,7 @@ ${obj.gpgsig ? obj.gpgsig : ""}`;
|
|
|
16231
16231
|
filepath
|
|
16232
16232
|
}) {
|
|
16233
16233
|
try {
|
|
16234
|
-
filepath =
|
|
16234
|
+
filepath = join16(dir, filepath);
|
|
16235
16235
|
const pack = await fs2.read(filepath);
|
|
16236
16236
|
const getExternalRefDelta = (oid) => _readObject({ fs: fs2, cache, gitdir, oid });
|
|
16237
16237
|
const idx = await GitPackIndex.fromPack({
|
|
@@ -16252,7 +16252,7 @@ ${obj.gpgsig ? obj.gpgsig : ""}`;
|
|
|
16252
16252
|
fs: fs2,
|
|
16253
16253
|
onProgress,
|
|
16254
16254
|
dir,
|
|
16255
|
-
gitdir =
|
|
16255
|
+
gitdir = join16(dir, ".git"),
|
|
16256
16256
|
filepath,
|
|
16257
16257
|
cache = {}
|
|
16258
16258
|
}) {
|
|
@@ -16280,7 +16280,7 @@ ${obj.gpgsig ? obj.gpgsig : ""}`;
|
|
|
16280
16280
|
fs: fs2,
|
|
16281
16281
|
bare = false,
|
|
16282
16282
|
dir,
|
|
16283
|
-
gitdir = bare ? dir :
|
|
16283
|
+
gitdir = bare ? dir : join16(dir, ".git"),
|
|
16284
16284
|
defaultBranch = "master"
|
|
16285
16285
|
}) {
|
|
16286
16286
|
try {
|
|
@@ -16354,7 +16354,7 @@ ${obj.gpgsig ? obj.gpgsig : ""}`;
|
|
|
16354
16354
|
async function isDescendent({
|
|
16355
16355
|
fs: fs2,
|
|
16356
16356
|
dir,
|
|
16357
|
-
gitdir =
|
|
16357
|
+
gitdir = join16(dir, ".git"),
|
|
16358
16358
|
oid,
|
|
16359
16359
|
ancestor,
|
|
16360
16360
|
depth = -1,
|
|
@@ -16383,7 +16383,7 @@ ${obj.gpgsig ? obj.gpgsig : ""}`;
|
|
|
16383
16383
|
async function isIgnored({
|
|
16384
16384
|
fs: fs2,
|
|
16385
16385
|
dir,
|
|
16386
|
-
gitdir =
|
|
16386
|
+
gitdir = join16(dir, ".git"),
|
|
16387
16387
|
filepath
|
|
16388
16388
|
}) {
|
|
16389
16389
|
try {
|
|
@@ -16407,7 +16407,7 @@ ${obj.gpgsig ? obj.gpgsig : ""}`;
|
|
|
16407
16407
|
async function listBranches({
|
|
16408
16408
|
fs: fs2,
|
|
16409
16409
|
dir,
|
|
16410
|
-
gitdir =
|
|
16410
|
+
gitdir = join16(dir, ".git"),
|
|
16411
16411
|
remote
|
|
16412
16412
|
}) {
|
|
16413
16413
|
try {
|
|
@@ -16464,17 +16464,17 @@ ${obj.gpgsig ? obj.gpgsig : ""}`;
|
|
|
16464
16464
|
gitdir,
|
|
16465
16465
|
oid: entry.oid,
|
|
16466
16466
|
filenames,
|
|
16467
|
-
prefix:
|
|
16467
|
+
prefix: join16(prefix, entry.path)
|
|
16468
16468
|
});
|
|
16469
16469
|
} else {
|
|
16470
|
-
filenames.push(
|
|
16470
|
+
filenames.push(join16(prefix, entry.path));
|
|
16471
16471
|
}
|
|
16472
16472
|
}
|
|
16473
16473
|
}
|
|
16474
16474
|
async function listFiles({
|
|
16475
16475
|
fs: fs2,
|
|
16476
16476
|
dir,
|
|
16477
|
-
gitdir =
|
|
16477
|
+
gitdir = join16(dir, ".git"),
|
|
16478
16478
|
ref,
|
|
16479
16479
|
cache = {}
|
|
16480
16480
|
}) {
|
|
@@ -16518,7 +16518,7 @@ ${obj.gpgsig ? obj.gpgsig : ""}`;
|
|
|
16518
16518
|
async function listNotes({
|
|
16519
16519
|
fs: fs2,
|
|
16520
16520
|
dir,
|
|
16521
|
-
gitdir =
|
|
16521
|
+
gitdir = join16(dir, ".git"),
|
|
16522
16522
|
ref = "refs/notes/commits",
|
|
16523
16523
|
cache = {}
|
|
16524
16524
|
}) {
|
|
@@ -16542,7 +16542,7 @@ ${obj.gpgsig ? obj.gpgsig : ""}`;
|
|
|
16542
16542
|
async function listRefs({
|
|
16543
16543
|
fs: fs2,
|
|
16544
16544
|
dir,
|
|
16545
|
-
gitdir =
|
|
16545
|
+
gitdir = join16(dir, ".git"),
|
|
16546
16546
|
filepath
|
|
16547
16547
|
}) {
|
|
16548
16548
|
try {
|
|
@@ -16561,13 +16561,13 @@ ${obj.gpgsig ? obj.gpgsig : ""}`;
|
|
|
16561
16561
|
const remoteNames = await config2.getSubsections("remote");
|
|
16562
16562
|
const remotes = Promise.all(
|
|
16563
16563
|
remoteNames.map(async (remote) => {
|
|
16564
|
-
const
|
|
16565
|
-
return { remote, url:
|
|
16564
|
+
const url3 = await config2.get(`remote.${remote}.url`);
|
|
16565
|
+
return { remote, url: url3 };
|
|
16566
16566
|
})
|
|
16567
16567
|
);
|
|
16568
16568
|
return remotes;
|
|
16569
16569
|
}
|
|
16570
|
-
async function listRemotes({ fs: fs2, dir, gitdir =
|
|
16570
|
+
async function listRemotes({ fs: fs2, dir, gitdir = join16(dir, ".git") }) {
|
|
16571
16571
|
try {
|
|
16572
16572
|
assertParameter("fs", fs2);
|
|
16573
16573
|
assertParameter("gitdir", gitdir);
|
|
@@ -16625,7 +16625,7 @@ ${obj.gpgsig ? obj.gpgsig : ""}`;
|
|
|
16625
16625
|
onAuthSuccess,
|
|
16626
16626
|
onAuthFailure,
|
|
16627
16627
|
corsProxy,
|
|
16628
|
-
url:
|
|
16628
|
+
url: url3,
|
|
16629
16629
|
headers = {},
|
|
16630
16630
|
forPush = false,
|
|
16631
16631
|
protocolVersion = 2,
|
|
@@ -16635,7 +16635,7 @@ ${obj.gpgsig ? obj.gpgsig : ""}`;
|
|
|
16635
16635
|
}) {
|
|
16636
16636
|
try {
|
|
16637
16637
|
assertParameter("http", http);
|
|
16638
|
-
assertParameter("url",
|
|
16638
|
+
assertParameter("url", url3);
|
|
16639
16639
|
const remote = await GitRemoteHTTP.discover({
|
|
16640
16640
|
http,
|
|
16641
16641
|
onAuth,
|
|
@@ -16643,7 +16643,7 @@ ${obj.gpgsig ? obj.gpgsig : ""}`;
|
|
|
16643
16643
|
onAuthFailure,
|
|
16644
16644
|
corsProxy,
|
|
16645
16645
|
service: forPush ? "git-receive-pack" : "git-upload-pack",
|
|
16646
|
-
url:
|
|
16646
|
+
url: url3,
|
|
16647
16647
|
headers,
|
|
16648
16648
|
protocolVersion
|
|
16649
16649
|
});
|
|
@@ -16657,7 +16657,7 @@ ${obj.gpgsig ? obj.gpgsig : ""}`;
|
|
|
16657
16657
|
headers,
|
|
16658
16658
|
corsProxy,
|
|
16659
16659
|
service: forPush ? "git-receive-pack" : "git-upload-pack",
|
|
16660
|
-
url:
|
|
16660
|
+
url: url3,
|
|
16661
16661
|
body
|
|
16662
16662
|
});
|
|
16663
16663
|
return parseListRefsResponse(res.body);
|
|
@@ -16666,7 +16666,7 @@ ${obj.gpgsig ? obj.gpgsig : ""}`;
|
|
|
16666
16666
|
throw err2;
|
|
16667
16667
|
}
|
|
16668
16668
|
}
|
|
16669
|
-
async function listTags({ fs: fs2, dir, gitdir =
|
|
16669
|
+
async function listTags({ fs: fs2, dir, gitdir = join16(dir, ".git") }) {
|
|
16670
16670
|
try {
|
|
16671
16671
|
assertParameter("fs", fs2);
|
|
16672
16672
|
assertParameter("gitdir", gitdir);
|
|
@@ -16719,7 +16719,7 @@ ${obj.gpgsig ? obj.gpgsig : ""}`;
|
|
|
16719
16719
|
const walks = tree.entries().map(function(entry) {
|
|
16720
16720
|
let result;
|
|
16721
16721
|
if (entry.oid === fileId) {
|
|
16722
|
-
result =
|
|
16722
|
+
result = join16(parentPath, entry.path);
|
|
16723
16723
|
filepaths.push(result);
|
|
16724
16724
|
} else if (entry.type === "tree") {
|
|
16725
16725
|
result = _readObject({
|
|
@@ -16736,7 +16736,7 @@ ${obj.gpgsig ? obj.gpgsig : ""}`;
|
|
|
16736
16736
|
fileId,
|
|
16737
16737
|
oid,
|
|
16738
16738
|
filepaths,
|
|
16739
|
-
parentPath:
|
|
16739
|
+
parentPath: join16(parentPath, entry.path)
|
|
16740
16740
|
});
|
|
16741
16741
|
});
|
|
16742
16742
|
}
|
|
@@ -16911,7 +16911,7 @@ ${obj.gpgsig ? obj.gpgsig : ""}`;
|
|
|
16911
16911
|
async function log({
|
|
16912
16912
|
fs: fs2,
|
|
16913
16913
|
dir,
|
|
16914
|
-
gitdir =
|
|
16914
|
+
gitdir = join16(dir, ".git"),
|
|
16915
16915
|
filepath,
|
|
16916
16916
|
ref = "HEAD",
|
|
16917
16917
|
depth,
|
|
@@ -16949,7 +16949,7 @@ ${obj.gpgsig ? obj.gpgsig : ""}`;
|
|
|
16949
16949
|
fs: _fs,
|
|
16950
16950
|
onSign,
|
|
16951
16951
|
dir,
|
|
16952
|
-
gitdir =
|
|
16952
|
+
gitdir = join16(dir, ".git"),
|
|
16953
16953
|
ours,
|
|
16954
16954
|
theirs,
|
|
16955
16955
|
fastForward: fastForward2 = true,
|
|
@@ -17026,7 +17026,7 @@ ${obj.gpgsig ? obj.gpgsig : ""}`;
|
|
|
17026
17026
|
fs: fs2,
|
|
17027
17027
|
cache,
|
|
17028
17028
|
dir,
|
|
17029
|
-
gitdir =
|
|
17029
|
+
gitdir = join16(dir, ".git"),
|
|
17030
17030
|
oids
|
|
17031
17031
|
}) {
|
|
17032
17032
|
const hash2 = new Hash();
|
|
@@ -17069,7 +17069,7 @@ ${obj.gpgsig ? obj.gpgsig : ""}`;
|
|
|
17069
17069
|
const packfileSha = packfile.slice(-20).toString("hex");
|
|
17070
17070
|
const filename = `pack-${packfileSha}.pack`;
|
|
17071
17071
|
if (write) {
|
|
17072
|
-
await fs2.write(
|
|
17072
|
+
await fs2.write(join16(gitdir, `objects/pack/${filename}`), packfile);
|
|
17073
17073
|
return { filename };
|
|
17074
17074
|
}
|
|
17075
17075
|
return {
|
|
@@ -17080,7 +17080,7 @@ ${obj.gpgsig ? obj.gpgsig : ""}`;
|
|
|
17080
17080
|
async function packObjects({
|
|
17081
17081
|
fs: fs2,
|
|
17082
17082
|
dir,
|
|
17083
|
-
gitdir =
|
|
17083
|
+
gitdir = join16(dir, ".git"),
|
|
17084
17084
|
oids,
|
|
17085
17085
|
write = false,
|
|
17086
17086
|
cache = {}
|
|
@@ -17112,9 +17112,9 @@ ${obj.gpgsig ? obj.gpgsig : ""}`;
|
|
|
17112
17112
|
onAuthSuccess,
|
|
17113
17113
|
onAuthFailure,
|
|
17114
17114
|
dir,
|
|
17115
|
-
gitdir =
|
|
17115
|
+
gitdir = join16(dir, ".git"),
|
|
17116
17116
|
ref,
|
|
17117
|
-
url:
|
|
17117
|
+
url: url3,
|
|
17118
17118
|
remote,
|
|
17119
17119
|
remoteRef,
|
|
17120
17120
|
prune = false,
|
|
@@ -17159,7 +17159,7 @@ ${obj.gpgsig ? obj.gpgsig : ""}`;
|
|
|
17159
17159
|
dir,
|
|
17160
17160
|
gitdir: updatedGitdir,
|
|
17161
17161
|
ref,
|
|
17162
|
-
url:
|
|
17162
|
+
url: url3,
|
|
17163
17163
|
remote,
|
|
17164
17164
|
remoteRef,
|
|
17165
17165
|
fastForward: fastForward2,
|
|
@@ -17182,7 +17182,7 @@ ${obj.gpgsig ? obj.gpgsig : ""}`;
|
|
|
17182
17182
|
fs: fs2,
|
|
17183
17183
|
cache,
|
|
17184
17184
|
dir,
|
|
17185
|
-
gitdir =
|
|
17185
|
+
gitdir = join16(dir, ".git"),
|
|
17186
17186
|
start,
|
|
17187
17187
|
finish
|
|
17188
17188
|
}) {
|
|
@@ -17230,7 +17230,7 @@ ${obj.gpgsig ? obj.gpgsig : ""}`;
|
|
|
17230
17230
|
fs: fs2,
|
|
17231
17231
|
cache,
|
|
17232
17232
|
dir,
|
|
17233
|
-
gitdir =
|
|
17233
|
+
gitdir = join16(dir, ".git"),
|
|
17234
17234
|
oids
|
|
17235
17235
|
}) {
|
|
17236
17236
|
const visited = /* @__PURE__ */ new Set();
|
|
@@ -17342,12 +17342,12 @@ ${obj.gpgsig ? obj.gpgsig : ""}`;
|
|
|
17342
17342
|
}
|
|
17343
17343
|
const config2 = await GitConfigManager.get({ fs: fs2, gitdir });
|
|
17344
17344
|
remote = remote || await config2.get(`branch.${ref}.pushRemote`) || await config2.get("remote.pushDefault") || await config2.get(`branch.${ref}.remote`) || "origin";
|
|
17345
|
-
const
|
|
17346
|
-
if (typeof
|
|
17345
|
+
const url3 = _url2 || await config2.get(`remote.${remote}.pushurl`) || await config2.get(`remote.${remote}.url`);
|
|
17346
|
+
if (typeof url3 === "undefined") {
|
|
17347
17347
|
throw new MissingParameterError("remote OR url");
|
|
17348
17348
|
}
|
|
17349
17349
|
const remoteRef = _remoteRef || await config2.get(`branch.${ref}.merge`);
|
|
17350
|
-
if (typeof
|
|
17350
|
+
if (typeof url3 === "undefined") {
|
|
17351
17351
|
throw new MissingParameterError("remoteRef");
|
|
17352
17352
|
}
|
|
17353
17353
|
if (corsProxy === void 0) {
|
|
@@ -17355,7 +17355,7 @@ ${obj.gpgsig ? obj.gpgsig : ""}`;
|
|
|
17355
17355
|
}
|
|
17356
17356
|
const fullRef = await GitRefManager.expand({ fs: fs2, gitdir, ref });
|
|
17357
17357
|
const oid = _delete ? "0000000000000000000000000000000000000000" : await GitRefManager.resolve({ fs: fs2, gitdir, ref: fullRef });
|
|
17358
|
-
const GitRemoteHTTP2 = GitRemoteManager.getRemoteHelperFor({ url:
|
|
17358
|
+
const GitRemoteHTTP2 = GitRemoteManager.getRemoteHelperFor({ url: url3 });
|
|
17359
17359
|
const httpRemote = await GitRemoteHTTP2.discover({
|
|
17360
17360
|
http,
|
|
17361
17361
|
onAuth: addCredentialUsername({ config: config2, onAuth }),
|
|
@@ -17363,7 +17363,7 @@ ${obj.gpgsig ? obj.gpgsig : ""}`;
|
|
|
17363
17363
|
onAuthFailure: addCredentialUsername({ config: config2, onAuth: onAuthFailure }),
|
|
17364
17364
|
corsProxy,
|
|
17365
17365
|
service: "git-receive-pack",
|
|
17366
|
-
url:
|
|
17366
|
+
url: url3,
|
|
17367
17367
|
headers,
|
|
17368
17368
|
protocolVersion: 1,
|
|
17369
17369
|
signal
|
|
@@ -17390,7 +17390,7 @@ ${obj.gpgsig ? obj.gpgsig : ""}`;
|
|
|
17390
17390
|
if (onPrePush) {
|
|
17391
17391
|
const hookCancel = await onPrePush({
|
|
17392
17392
|
remote,
|
|
17393
|
-
url:
|
|
17393
|
+
url: url3,
|
|
17394
17394
|
localRef: { ref: _delete ? "(delete)" : fullRef, oid },
|
|
17395
17395
|
remoteRef: { ref: fullRemoteRef, oid: oldoid }
|
|
17396
17396
|
});
|
|
@@ -17487,7 +17487,7 @@ ${obj.gpgsig ? obj.gpgsig : ""}`;
|
|
|
17487
17487
|
onProgress,
|
|
17488
17488
|
corsProxy,
|
|
17489
17489
|
service: "git-receive-pack",
|
|
17490
|
-
url:
|
|
17490
|
+
url: url3,
|
|
17491
17491
|
auth,
|
|
17492
17492
|
headers,
|
|
17493
17493
|
body: [...packstream1, ...packstream2],
|
|
@@ -17533,11 +17533,11 @@ ${obj.gpgsig ? obj.gpgsig : ""}`;
|
|
|
17533
17533
|
onAuthFailure,
|
|
17534
17534
|
onPrePush,
|
|
17535
17535
|
dir,
|
|
17536
|
-
gitdir =
|
|
17536
|
+
gitdir = join16(dir, ".git"),
|
|
17537
17537
|
ref,
|
|
17538
17538
|
remoteRef,
|
|
17539
17539
|
remote = "origin",
|
|
17540
|
-
url:
|
|
17540
|
+
url: url3,
|
|
17541
17541
|
force = false,
|
|
17542
17542
|
delete: _delete = false,
|
|
17543
17543
|
corsProxy,
|
|
@@ -17565,7 +17565,7 @@ ${obj.gpgsig ? obj.gpgsig : ""}`;
|
|
|
17565
17565
|
ref,
|
|
17566
17566
|
remoteRef,
|
|
17567
17567
|
remote,
|
|
17568
|
-
url:
|
|
17568
|
+
url: url3,
|
|
17569
17569
|
force,
|
|
17570
17570
|
delete: _delete,
|
|
17571
17571
|
corsProxy,
|
|
@@ -17609,7 +17609,7 @@ ${obj.gpgsig ? obj.gpgsig : ""}`;
|
|
|
17609
17609
|
async function readBlob({
|
|
17610
17610
|
fs: fs2,
|
|
17611
17611
|
dir,
|
|
17612
|
-
gitdir =
|
|
17612
|
+
gitdir = join16(dir, ".git"),
|
|
17613
17613
|
oid,
|
|
17614
17614
|
filepath,
|
|
17615
17615
|
cache = {}
|
|
@@ -17635,7 +17635,7 @@ ${obj.gpgsig ? obj.gpgsig : ""}`;
|
|
|
17635
17635
|
async function readCommit({
|
|
17636
17636
|
fs: fs2,
|
|
17637
17637
|
dir,
|
|
17638
|
-
gitdir =
|
|
17638
|
+
gitdir = join16(dir, ".git"),
|
|
17639
17639
|
oid,
|
|
17640
17640
|
cache = {}
|
|
17641
17641
|
}) {
|
|
@@ -17676,7 +17676,7 @@ ${obj.gpgsig ? obj.gpgsig : ""}`;
|
|
|
17676
17676
|
async function readNote({
|
|
17677
17677
|
fs: fs2,
|
|
17678
17678
|
dir,
|
|
17679
|
-
gitdir =
|
|
17679
|
+
gitdir = join16(dir, ".git"),
|
|
17680
17680
|
ref = "refs/notes/commits",
|
|
17681
17681
|
oid,
|
|
17682
17682
|
cache = {}
|
|
@@ -17703,7 +17703,7 @@ ${obj.gpgsig ? obj.gpgsig : ""}`;
|
|
|
17703
17703
|
async function readObject({
|
|
17704
17704
|
fs: _fs,
|
|
17705
17705
|
dir,
|
|
17706
|
-
gitdir =
|
|
17706
|
+
gitdir = join16(dir, ".git"),
|
|
17707
17707
|
oid,
|
|
17708
17708
|
format = "parsed",
|
|
17709
17709
|
filepath = void 0,
|
|
@@ -17792,7 +17792,7 @@ ${obj.gpgsig ? obj.gpgsig : ""}`;
|
|
|
17792
17792
|
async function readTag({
|
|
17793
17793
|
fs: fs2,
|
|
17794
17794
|
dir,
|
|
17795
|
-
gitdir =
|
|
17795
|
+
gitdir = join16(dir, ".git"),
|
|
17796
17796
|
oid,
|
|
17797
17797
|
cache = {}
|
|
17798
17798
|
}) {
|
|
@@ -17816,7 +17816,7 @@ ${obj.gpgsig ? obj.gpgsig : ""}`;
|
|
|
17816
17816
|
async function readTree({
|
|
17817
17817
|
fs: fs2,
|
|
17818
17818
|
dir,
|
|
17819
|
-
gitdir =
|
|
17819
|
+
gitdir = join16(dir, ".git"),
|
|
17820
17820
|
oid,
|
|
17821
17821
|
filepath = void 0,
|
|
17822
17822
|
cache = {}
|
|
@@ -17842,7 +17842,7 @@ ${obj.gpgsig ? obj.gpgsig : ""}`;
|
|
|
17842
17842
|
async function remove2({
|
|
17843
17843
|
fs: _fs,
|
|
17844
17844
|
dir,
|
|
17845
|
-
gitdir =
|
|
17845
|
+
gitdir = join16(dir, ".git"),
|
|
17846
17846
|
filepath,
|
|
17847
17847
|
cache = {}
|
|
17848
17848
|
}) {
|
|
@@ -17915,7 +17915,7 @@ ${obj.gpgsig ? obj.gpgsig : ""}`;
|
|
|
17915
17915
|
fs: _fs,
|
|
17916
17916
|
onSign,
|
|
17917
17917
|
dir,
|
|
17918
|
-
gitdir =
|
|
17918
|
+
gitdir = join16(dir, ".git"),
|
|
17919
17919
|
ref = "refs/notes/commits",
|
|
17920
17920
|
oid,
|
|
17921
17921
|
author: _author,
|
|
@@ -18003,7 +18003,7 @@ ${obj.gpgsig ? obj.gpgsig : ""}`;
|
|
|
18003
18003
|
async function renameBranch({
|
|
18004
18004
|
fs: fs2,
|
|
18005
18005
|
dir,
|
|
18006
|
-
gitdir =
|
|
18006
|
+
gitdir = join16(dir, ".git"),
|
|
18007
18007
|
ref,
|
|
18008
18008
|
oldref,
|
|
18009
18009
|
checkout: checkout2 = false
|
|
@@ -18033,7 +18033,7 @@ ${obj.gpgsig ? obj.gpgsig : ""}`;
|
|
|
18033
18033
|
async function resetIndex({
|
|
18034
18034
|
fs: _fs,
|
|
18035
18035
|
dir,
|
|
18036
|
-
gitdir =
|
|
18036
|
+
gitdir = join16(dir, ".git"),
|
|
18037
18037
|
filepath,
|
|
18038
18038
|
ref,
|
|
18039
18039
|
cache = {}
|
|
@@ -18080,7 +18080,7 @@ ${obj.gpgsig ? obj.gpgsig : ""}`;
|
|
|
18080
18080
|
gid: 0,
|
|
18081
18081
|
size: 0
|
|
18082
18082
|
};
|
|
18083
|
-
const object2 = dir && await fs2.read(
|
|
18083
|
+
const object2 = dir && await fs2.read(join16(dir, filepath));
|
|
18084
18084
|
if (object2) {
|
|
18085
18085
|
workdirOid = await hashObject$1({
|
|
18086
18086
|
gitdir: updatedGitdir,
|
|
@@ -18088,7 +18088,7 @@ ${obj.gpgsig ? obj.gpgsig : ""}`;
|
|
|
18088
18088
|
object: object2
|
|
18089
18089
|
});
|
|
18090
18090
|
if (oid === workdirOid) {
|
|
18091
|
-
stats = await fs2.lstat(
|
|
18091
|
+
stats = await fs2.lstat(join16(dir, filepath));
|
|
18092
18092
|
}
|
|
18093
18093
|
}
|
|
18094
18094
|
await GitIndexManager.acquire(
|
|
@@ -18108,7 +18108,7 @@ ${obj.gpgsig ? obj.gpgsig : ""}`;
|
|
|
18108
18108
|
async function resolveRef2({
|
|
18109
18109
|
fs: fs2,
|
|
18110
18110
|
dir,
|
|
18111
|
-
gitdir =
|
|
18111
|
+
gitdir = join16(dir, ".git"),
|
|
18112
18112
|
ref,
|
|
18113
18113
|
depth
|
|
18114
18114
|
}) {
|
|
@@ -18133,7 +18133,7 @@ ${obj.gpgsig ? obj.gpgsig : ""}`;
|
|
|
18133
18133
|
async function setConfig({
|
|
18134
18134
|
fs: _fs,
|
|
18135
18135
|
dir,
|
|
18136
|
-
gitdir =
|
|
18136
|
+
gitdir = join16(dir, ".git"),
|
|
18137
18137
|
path,
|
|
18138
18138
|
value,
|
|
18139
18139
|
append = false
|
|
@@ -18201,7 +18201,7 @@ ${obj.gpgsig ? obj.gpgsig : ""}`;
|
|
|
18201
18201
|
* @param {string} args.dir - The working directory.
|
|
18202
18202
|
* @param {string}[args.gitdir=join(dir, '.git')] - [required] The [git directory](dir-vs-gitdir.md) path
|
|
18203
18203
|
*/
|
|
18204
|
-
constructor({ fs: fs2, dir, gitdir =
|
|
18204
|
+
constructor({ fs: fs2, dir, gitdir = join16(dir, ".git") }) {
|
|
18205
18205
|
Object.assign(this, {
|
|
18206
18206
|
fs: fs2,
|
|
18207
18207
|
dir,
|
|
@@ -18231,7 +18231,7 @@ ${obj.gpgsig ? obj.gpgsig : ""}`;
|
|
|
18231
18231
|
* @returns {string} - The file path for the stash reference.
|
|
18232
18232
|
*/
|
|
18233
18233
|
get refStashPath() {
|
|
18234
|
-
return
|
|
18234
|
+
return join16(this.gitdir, _GitStashManager.refStash);
|
|
18235
18235
|
}
|
|
18236
18236
|
/**
|
|
18237
18237
|
* Gets the file path for the stash reflogs.
|
|
@@ -18239,7 +18239,7 @@ ${obj.gpgsig ? obj.gpgsig : ""}`;
|
|
|
18239
18239
|
* @returns {string} - The file path for the stash reflogs.
|
|
18240
18240
|
*/
|
|
18241
18241
|
get refLogsStashPath() {
|
|
18242
|
-
return
|
|
18242
|
+
return join16(this.gitdir, _GitStashManager.refLogsStash);
|
|
18243
18243
|
}
|
|
18244
18244
|
/**
|
|
18245
18245
|
* Retrieves the author information for the stash.
|
|
@@ -18545,7 +18545,7 @@ ${obj.gpgsig ? obj.gpgsig : ""}`;
|
|
|
18545
18545
|
async function stash({
|
|
18546
18546
|
fs: fs2,
|
|
18547
18547
|
dir,
|
|
18548
|
-
gitdir =
|
|
18548
|
+
gitdir = join16(dir, ".git"),
|
|
18549
18549
|
op = "push",
|
|
18550
18550
|
message = "",
|
|
18551
18551
|
refIdx = 0
|
|
@@ -18568,7 +18568,7 @@ ${obj.gpgsig ? obj.gpgsig : ""}`;
|
|
|
18568
18568
|
const _fs = new FileSystem(fs2);
|
|
18569
18569
|
const updatedGitdir = await discoverGitdir({ fsp: _fs, dotgit: gitdir });
|
|
18570
18570
|
const folders = ["refs", "logs", "logs/refs"];
|
|
18571
|
-
folders.map((f) =>
|
|
18571
|
+
folders.map((f) => join16(updatedGitdir, f)).forEach(async (folder) => {
|
|
18572
18572
|
if (!await _fs.exists(folder)) {
|
|
18573
18573
|
await _fs.mkdir(folder);
|
|
18574
18574
|
}
|
|
@@ -18598,7 +18598,7 @@ ${obj.gpgsig ? obj.gpgsig : ""}`;
|
|
|
18598
18598
|
async function status({
|
|
18599
18599
|
fs: _fs,
|
|
18600
18600
|
dir,
|
|
18601
|
-
gitdir =
|
|
18601
|
+
gitdir = join16(dir, ".git"),
|
|
18602
18602
|
filepath,
|
|
18603
18603
|
cache = {},
|
|
18604
18604
|
refresh: refresh2 = true
|
|
@@ -18637,7 +18637,7 @@ ${obj.gpgsig ? obj.gpgsig : ""}`;
|
|
|
18637
18637
|
return "ignored";
|
|
18638
18638
|
}
|
|
18639
18639
|
}
|
|
18640
|
-
const stats = await fs2.lstat(
|
|
18640
|
+
const stats = await fs2.lstat(join16(dir, filepath));
|
|
18641
18641
|
const H = treeOid !== null;
|
|
18642
18642
|
const I = indexEntry !== null;
|
|
18643
18643
|
const W = stats !== null;
|
|
@@ -18647,7 +18647,7 @@ ${obj.gpgsig ? obj.gpgsig : ""}`;
|
|
|
18647
18647
|
} else {
|
|
18648
18648
|
const config2 = await GitConfigManager.get({ fs: fs2, gitdir: updatedGitdir });
|
|
18649
18649
|
const autocrlf = await config2.get("core.autocrlf");
|
|
18650
|
-
const object2 = await fs2.read(
|
|
18650
|
+
const object2 = await fs2.read(join16(dir, filepath), { autocrlf });
|
|
18651
18651
|
const workdirOid = await hashObject$1({
|
|
18652
18652
|
gitdir: updatedGitdir,
|
|
18653
18653
|
type: "blob",
|
|
@@ -18696,9 +18696,9 @@ ${obj.gpgsig ? obj.gpgsig : ""}`;
|
|
|
18696
18696
|
}
|
|
18697
18697
|
async function getOidAtPath({ fs: fs2, cache, gitdir: updatedGitdir, tree, path }) {
|
|
18698
18698
|
if (typeof path === "string") path = path.split("/");
|
|
18699
|
-
const
|
|
18699
|
+
const dirname13 = path.shift();
|
|
18700
18700
|
for (const entry of tree) {
|
|
18701
|
-
if (entry.path ===
|
|
18701
|
+
if (entry.path === dirname13) {
|
|
18702
18702
|
if (path.length === 0) {
|
|
18703
18703
|
return entry.oid;
|
|
18704
18704
|
}
|
|
@@ -18738,7 +18738,7 @@ ${obj.gpgsig ? obj.gpgsig : ""}`;
|
|
|
18738
18738
|
async function statusMatrix({
|
|
18739
18739
|
fs: _fs,
|
|
18740
18740
|
dir,
|
|
18741
|
-
gitdir =
|
|
18741
|
+
gitdir = join16(dir, ".git"),
|
|
18742
18742
|
ref = "HEAD",
|
|
18743
18743
|
filepaths = ["."],
|
|
18744
18744
|
filter,
|
|
@@ -18811,7 +18811,7 @@ ${obj.gpgsig ? obj.gpgsig : ""}`;
|
|
|
18811
18811
|
async function tag({
|
|
18812
18812
|
fs: _fs,
|
|
18813
18813
|
dir,
|
|
18814
|
-
gitdir =
|
|
18814
|
+
gitdir = join16(dir, ".git"),
|
|
18815
18815
|
ref,
|
|
18816
18816
|
object: object2,
|
|
18817
18817
|
force = false
|
|
@@ -18843,7 +18843,7 @@ ${obj.gpgsig ? obj.gpgsig : ""}`;
|
|
|
18843
18843
|
async function updateIndex$1({
|
|
18844
18844
|
fs: _fs,
|
|
18845
18845
|
dir,
|
|
18846
|
-
gitdir =
|
|
18846
|
+
gitdir = join16(dir, ".git"),
|
|
18847
18847
|
cache = {},
|
|
18848
18848
|
filepath,
|
|
18849
18849
|
oid,
|
|
@@ -18863,7 +18863,7 @@ ${obj.gpgsig ? obj.gpgsig : ""}`;
|
|
|
18863
18863
|
{ fs: fs2, gitdir: updatedGitdir, cache },
|
|
18864
18864
|
async function(index3) {
|
|
18865
18865
|
if (!force) {
|
|
18866
|
-
const fileStats2 = await fs2.lstat(
|
|
18866
|
+
const fileStats2 = await fs2.lstat(join16(dir, filepath));
|
|
18867
18867
|
if (fileStats2) {
|
|
18868
18868
|
if (fileStats2.isDirectory()) {
|
|
18869
18869
|
throw new InvalidFilepathError("directory");
|
|
@@ -18881,7 +18881,7 @@ ${obj.gpgsig ? obj.gpgsig : ""}`;
|
|
|
18881
18881
|
}
|
|
18882
18882
|
let fileStats;
|
|
18883
18883
|
if (!oid) {
|
|
18884
|
-
fileStats = await fs2.lstat(
|
|
18884
|
+
fileStats = await fs2.lstat(join16(dir, filepath));
|
|
18885
18885
|
if (!fileStats) {
|
|
18886
18886
|
throw new NotFoundError(
|
|
18887
18887
|
`file at "${filepath}" on disk and "remove" not set`
|
|
@@ -18902,7 +18902,7 @@ ${obj.gpgsig ? obj.gpgsig : ""}`;
|
|
|
18902
18902
|
let stats;
|
|
18903
18903
|
if (!oid) {
|
|
18904
18904
|
stats = fileStats;
|
|
18905
|
-
const object2 = stats.isSymbolicLink() ? await fs2.readlink(
|
|
18905
|
+
const object2 = stats.isSymbolicLink() ? await fs2.readlink(join16(dir, filepath)) : await fs2.read(join16(dir, filepath));
|
|
18906
18906
|
oid = await _writeObject({
|
|
18907
18907
|
fs: fs2,
|
|
18908
18908
|
gitdir: updatedGitdir,
|
|
@@ -18946,7 +18946,7 @@ ${obj.gpgsig ? obj.gpgsig : ""}`;
|
|
|
18946
18946
|
async function walk({
|
|
18947
18947
|
fs: fs2,
|
|
18948
18948
|
dir,
|
|
18949
|
-
gitdir =
|
|
18949
|
+
gitdir = join16(dir, ".git"),
|
|
18950
18950
|
trees,
|
|
18951
18951
|
map: map2,
|
|
18952
18952
|
reduce,
|
|
@@ -18974,7 +18974,7 @@ ${obj.gpgsig ? obj.gpgsig : ""}`;
|
|
|
18974
18974
|
throw err2;
|
|
18975
18975
|
}
|
|
18976
18976
|
}
|
|
18977
|
-
async function writeBlob({ fs: fs2, dir, gitdir =
|
|
18977
|
+
async function writeBlob({ fs: fs2, dir, gitdir = join16(dir, ".git"), blob: blob2 }) {
|
|
18978
18978
|
try {
|
|
18979
18979
|
assertParameter("fs", fs2);
|
|
18980
18980
|
assertParameter("gitdir", gitdir);
|
|
@@ -18996,7 +18996,7 @@ ${obj.gpgsig ? obj.gpgsig : ""}`;
|
|
|
18996
18996
|
async function writeCommit({
|
|
18997
18997
|
fs: fs2,
|
|
18998
18998
|
dir,
|
|
18999
|
-
gitdir =
|
|
18999
|
+
gitdir = join16(dir, ".git"),
|
|
19000
19000
|
commit: commit2
|
|
19001
19001
|
}) {
|
|
19002
19002
|
try {
|
|
@@ -19018,7 +19018,7 @@ ${obj.gpgsig ? obj.gpgsig : ""}`;
|
|
|
19018
19018
|
async function writeObject({
|
|
19019
19019
|
fs: _fs,
|
|
19020
19020
|
dir,
|
|
19021
|
-
gitdir =
|
|
19021
|
+
gitdir = join16(dir, ".git"),
|
|
19022
19022
|
type,
|
|
19023
19023
|
object: object2,
|
|
19024
19024
|
format = "parsed",
|
|
@@ -19064,7 +19064,7 @@ ${obj.gpgsig ? obj.gpgsig : ""}`;
|
|
|
19064
19064
|
async function writeRef({
|
|
19065
19065
|
fs: _fs,
|
|
19066
19066
|
dir,
|
|
19067
|
-
gitdir =
|
|
19067
|
+
gitdir = join16(dir, ".git"),
|
|
19068
19068
|
ref,
|
|
19069
19069
|
value,
|
|
19070
19070
|
force = false,
|
|
@@ -19119,7 +19119,7 @@ ${obj.gpgsig ? obj.gpgsig : ""}`;
|
|
|
19119
19119
|
});
|
|
19120
19120
|
return oid;
|
|
19121
19121
|
}
|
|
19122
|
-
async function writeTag({ fs: fs2, dir, gitdir =
|
|
19122
|
+
async function writeTag({ fs: fs2, dir, gitdir = join16(dir, ".git"), tag: tag2 }) {
|
|
19123
19123
|
try {
|
|
19124
19124
|
assertParameter("fs", fs2);
|
|
19125
19125
|
assertParameter("gitdir", gitdir);
|
|
@@ -19136,7 +19136,7 @@ ${obj.gpgsig ? obj.gpgsig : ""}`;
|
|
|
19136
19136
|
throw err2;
|
|
19137
19137
|
}
|
|
19138
19138
|
}
|
|
19139
|
-
async function writeTree2({ fs: fs2, dir, gitdir =
|
|
19139
|
+
async function writeTree2({ fs: fs2, dir, gitdir = join16(dir, ".git"), tree }) {
|
|
19140
19140
|
try {
|
|
19141
19141
|
assertParameter("fs", fs2);
|
|
19142
19142
|
assertParameter("gitdir", gitdir);
|
|
@@ -19761,7 +19761,7 @@ var require_ignore2 = __commonJS({
|
|
|
19761
19761
|
// cli/package.json
|
|
19762
19762
|
var package_default = {
|
|
19763
19763
|
name: "@docyrus/animaguru",
|
|
19764
|
-
version: "0.16.
|
|
19764
|
+
version: "0.16.2",
|
|
19765
19765
|
description: "Agent-friendly AnimaGuru CLI built with CrustJS",
|
|
19766
19766
|
type: "module",
|
|
19767
19767
|
bin: {
|
|
@@ -22817,16 +22817,16 @@ function serializeParams(options) {
|
|
|
22817
22817
|
if (id2.includes(":") || id2.includes(";")) throw new TypeError('Invalid hyperlink id: ":" and ";" are reserved by the OSC 8 format.');
|
|
22818
22818
|
return `id=${id2}`;
|
|
22819
22819
|
}
|
|
22820
|
-
function linkCode(
|
|
22821
|
-
assertMatches(
|
|
22820
|
+
function linkCode(url3, options) {
|
|
22821
|
+
assertMatches(url3, "hyperlink URL", /^[\x21-\x7e]*$/, " without spaces");
|
|
22822
22822
|
const params = serializeParams(options);
|
|
22823
22823
|
return {
|
|
22824
|
-
open: `${OSC}8;${params};${
|
|
22824
|
+
open: `${OSC}8;${params};${url3}${ST}`,
|
|
22825
22825
|
close: HYPERLINK_CLOSE
|
|
22826
22826
|
};
|
|
22827
22827
|
}
|
|
22828
|
-
function link$1(text2,
|
|
22829
|
-
return applyStyle(text2, linkCode(
|
|
22828
|
+
function link$1(text2, url3, options) {
|
|
22829
|
+
return applyStyle(text2, linkCode(url3, options));
|
|
22830
22830
|
}
|
|
22831
22831
|
var dynamicColorKinds = ["fg", "bg"];
|
|
22832
22832
|
function stepIsModifier(step) {
|
|
@@ -22966,9 +22966,9 @@ function createStyleInstance(options, runtime) {
|
|
|
22966
22966
|
get colorDepth() {
|
|
22967
22967
|
return resolveCapabilities().colorDepth;
|
|
22968
22968
|
},
|
|
22969
|
-
link(text2,
|
|
22970
|
-
if (resolveCapabilities().modifiersEnabled) return link$1(text2,
|
|
22971
|
-
linkCode(
|
|
22969
|
+
link(text2, url3, hyperlinkOptions) {
|
|
22970
|
+
if (resolveCapabilities().modifiersEnabled) return link$1(text2, url3, hyperlinkOptions);
|
|
22971
|
+
linkCode(url3, hyperlinkOptions);
|
|
22972
22972
|
return text2;
|
|
22973
22973
|
},
|
|
22974
22974
|
...Object.fromEntries(dynamicColorKinds.map((kind) => [kind, (...args) => {
|
|
@@ -24086,8 +24086,8 @@ function isNewerVersion(current, latest) {
|
|
|
24086
24086
|
}
|
|
24087
24087
|
async function fetchLatestVersion(packageName, registryUrl, timeoutMs) {
|
|
24088
24088
|
try {
|
|
24089
|
-
const
|
|
24090
|
-
const response = await fetch(
|
|
24089
|
+
const url3 = `${registryUrl.replace(/\/+$/, "")}/${encodeURIComponent(packageName)}`;
|
|
24090
|
+
const response = await fetch(url3, {
|
|
24091
24091
|
signal: AbortSignal.timeout(timeoutMs),
|
|
24092
24092
|
headers: { Accept: "application/vnd.npm.install-v1+json" }
|
|
24093
24093
|
});
|
|
@@ -24295,7 +24295,7 @@ var version = defineExtension(VERSION).factory((extension, value, options = {})
|
|
|
24295
24295
|
|
|
24296
24296
|
// cli/src/commands.ts
|
|
24297
24297
|
import { spawn as spawn3 } from "node:child_process";
|
|
24298
|
-
import { readFile as
|
|
24298
|
+
import { readFile as readFile16, writeFile as writeFile13 } from "node:fs/promises";
|
|
24299
24299
|
import { resolve as resolve14 } from "node:path";
|
|
24300
24300
|
import { setTimeout as delay6 } from "node:timers/promises";
|
|
24301
24301
|
|
|
@@ -28228,21 +28228,21 @@ var asciiTabOrNewline = /[\t\n\r]/g;
|
|
|
28228
28228
|
function stripTabAndNewline(value) {
|
|
28229
28229
|
return value.replace(asciiTabOrNewline, "");
|
|
28230
28230
|
}
|
|
28231
|
-
function urlHostnameOk(
|
|
28231
|
+
function urlHostnameOk(url3, hostname3) {
|
|
28232
28232
|
hostname3.lastIndex = 0;
|
|
28233
|
-
return hostname3.test(
|
|
28233
|
+
return hostname3.test(url3.hostname);
|
|
28234
28234
|
}
|
|
28235
|
-
function urlProtocolOk(
|
|
28235
|
+
function urlProtocolOk(url3, protocol) {
|
|
28236
28236
|
protocol.lastIndex = 0;
|
|
28237
|
-
return protocol.test(
|
|
28237
|
+
return protocol.test(url3.protocol.endsWith(":") ? url3.protocol.slice(0, -1) : url3.protocol);
|
|
28238
28238
|
}
|
|
28239
28239
|
var $ZodURL = /* @__PURE__ */ $constructor("$ZodURL", (inst, def) => {
|
|
28240
28240
|
$ZodStringFormat.init(inst, def);
|
|
28241
28241
|
inst._zod.check = (payload) => {
|
|
28242
28242
|
try {
|
|
28243
28243
|
const trimmed = payload.value.trim();
|
|
28244
|
-
const
|
|
28245
|
-
if (
|
|
28244
|
+
const url3 = validateURL(trimmed, def);
|
|
28245
|
+
if (url3 === URL_BAD_FORMAT) {
|
|
28246
28246
|
payload.issues.push({
|
|
28247
28247
|
code: "invalid_format",
|
|
28248
28248
|
format: "url",
|
|
@@ -28253,7 +28253,7 @@ var $ZodURL = /* @__PURE__ */ $constructor("$ZodURL", (inst, def) => {
|
|
|
28253
28253
|
});
|
|
28254
28254
|
return;
|
|
28255
28255
|
}
|
|
28256
|
-
if (
|
|
28256
|
+
if (url3 === URL_UNPARSEABLE) {
|
|
28257
28257
|
payload.issues.push({
|
|
28258
28258
|
code: "invalid_format",
|
|
28259
28259
|
format: "url",
|
|
@@ -28263,11 +28263,11 @@ var $ZodURL = /* @__PURE__ */ $constructor("$ZodURL", (inst, def) => {
|
|
|
28263
28263
|
});
|
|
28264
28264
|
return;
|
|
28265
28265
|
}
|
|
28266
|
-
if (
|
|
28266
|
+
if (url3 === true) {
|
|
28267
28267
|
payload.value = stripTabAndNewline(trimmed);
|
|
28268
28268
|
return;
|
|
28269
28269
|
}
|
|
28270
|
-
if (def.hostname && !urlHostnameOk(
|
|
28270
|
+
if (def.hostname && !urlHostnameOk(url3, def.hostname)) {
|
|
28271
28271
|
payload.issues.push({
|
|
28272
28272
|
code: "invalid_format",
|
|
28273
28273
|
format: "url",
|
|
@@ -28278,7 +28278,7 @@ var $ZodURL = /* @__PURE__ */ $constructor("$ZodURL", (inst, def) => {
|
|
|
28278
28278
|
continue: !def.abort
|
|
28279
28279
|
});
|
|
28280
28280
|
}
|
|
28281
|
-
if (def.protocol && !urlProtocolOk(
|
|
28281
|
+
if (def.protocol && !urlProtocolOk(url3, def.protocol)) {
|
|
28282
28282
|
payload.issues.push({
|
|
28283
28283
|
code: "invalid_format",
|
|
28284
28284
|
format: "url",
|
|
@@ -28289,7 +28289,7 @@ var $ZodURL = /* @__PURE__ */ $constructor("$ZodURL", (inst, def) => {
|
|
|
28289
28289
|
continue: !def.abort
|
|
28290
28290
|
});
|
|
28291
28291
|
}
|
|
28292
|
-
payload.value = def.normalize ?
|
|
28292
|
+
payload.value = def.normalize ? url3.href : stripTabAndNewline(trimmed);
|
|
28293
28293
|
return;
|
|
28294
28294
|
} catch (_) {
|
|
28295
28295
|
payload.issues.push({
|
|
@@ -45105,10 +45105,10 @@ import { dirname as dirname3, join as join4, resolve as resolve3 } from "node:pa
|
|
|
45105
45105
|
import { homedir as homedir3 } from "node:os";
|
|
45106
45106
|
import { createHash, randomUUID } from "node:crypto";
|
|
45107
45107
|
function serverUrl(value) {
|
|
45108
|
-
const
|
|
45109
|
-
if (
|
|
45110
|
-
if (
|
|
45111
|
-
return
|
|
45108
|
+
const url3 = new URL(value);
|
|
45109
|
+
if (url3.username || url3.password || url3.search || url3.hash || url3.pathname !== "/") throw new Error("Use an origin URL without credentials, path, query or fragment.");
|
|
45110
|
+
if (url3.protocol !== "https:" && !(url3.protocol === "http:" && ["localhost", "127.0.0.1", "[::1]"].includes(url3.hostname))) throw new Error("Use HTTPS, except for local development.");
|
|
45111
|
+
return url3.origin;
|
|
45112
45112
|
}
|
|
45113
45113
|
function credentialsPath() {
|
|
45114
45114
|
return resolve3(process.env.ANIMAGURU_CONFIG_DIR ?? join4(homedir3(), ".config", "animaguru"), "credentials.json");
|
|
@@ -46168,7 +46168,7 @@ async function createVideoProject(options, installer = installDependencies) {
|
|
|
46168
46168
|
const manifest = JSON.parse(await readFile4(packagePath, "utf8"));
|
|
46169
46169
|
manifest.name = basename2(directory).toLowerCase().replace(/[^a-z0-9-]+/g, "-").replace(/^-+|-+$/g, "").slice(0, 100) || "animaguru-video";
|
|
46170
46170
|
await writeFile6(packagePath, JSON.stringify(manifest, null, 2) + "\n");
|
|
46171
|
-
const skills = [.../* @__PURE__ */ new Set(["animaguru", "animaguru-video", "animaguru-brand-kit", ...VIDEO_PURPOSE_SKILLS, ...VIDEO_TEMPLATES.map((template) => template.skill)])];
|
|
46171
|
+
const skills = [.../* @__PURE__ */ new Set(["animaguru", "animaguru-video", "animaguru-brand-kit", "animaguru-cutcraft", "animaguru-art-motion", ...VIDEO_PURPOSE_SKILLS, ...VIDEO_TEMPLATES.map((template) => template.skill)])];
|
|
46172
46172
|
const pixiSkillsRoot = join6(packageRoot, "vendor/pixijs-skills/skills");
|
|
46173
46173
|
const pixiSkills = (await readdir2(pixiSkillsRoot, { withFileTypes: true })).filter((entry) => entry.isDirectory()).map((entry) => entry.name).sort();
|
|
46174
46174
|
for (const agent of [".agents", ".claude"]) {
|
|
@@ -46402,6 +46402,9 @@ var assetRequest = external_exports.discriminatedUnion("type", [
|
|
|
46402
46402
|
}).transform((p) => ({ ...p, voice: p.voice || (isElevenLabsSpeech(p.model) ? DEFAULT_ELEVENLABS_VOICE : "Kore") })),
|
|
46403
46403
|
external_exports.object({ ...base, type: external_exports.literal("sfx"), model: external_exports.literal("eleven_text_to_sound_v2").default("eleven_text_to_sound_v2"), seconds: external_exports.number().min(0.5).max(30).default(5), loop: external_exports.boolean().default(false), promptInfluence: external_exports.number().min(0).max(1).default(0.3) })
|
|
46404
46404
|
]);
|
|
46405
|
+
var LIBRARY_AUDIO_MODEL = "library-audio";
|
|
46406
|
+
var libraryAudio = external_exports.object({ name: base.name, prompt: external_exports.string().trim().max(4e3).default(""), type: external_exports.enum(["music", "sfx"]), model: external_exports.literal(LIBRARY_AUDIO_MODEL), loop: external_exports.boolean().default(false) });
|
|
46407
|
+
var savedAssetOptions = external_exports.union([assetRequest, libraryAudio]);
|
|
46405
46408
|
var speechCharacters = (text2) => Array.from(text2).length;
|
|
46406
46409
|
function assetEstimate(p, now = Date.now()) {
|
|
46407
46410
|
if (p.type === "image") return Math.ceil(130 * spriteImageModel(p.model).relCost);
|
|
@@ -46431,7 +46434,7 @@ import { createHash as createHash3 } from "node:crypto";
|
|
|
46431
46434
|
var VIDEO_PART_BYTES = 8 * 1024 * 1024;
|
|
46432
46435
|
var VIDEO_MAX_BYTES = { html5: 64 * 1024 * 1024, mp4: 512 * 1024 * 1024 };
|
|
46433
46436
|
var VIDEO_VISIBILITIES = ["private", "public"];
|
|
46434
|
-
var VIDEO_SHARING_AGREEMENT_VERSION = "2026-10-
|
|
46437
|
+
var VIDEO_SHARING_AGREEMENT_VERSION = "2026-10-15-draft-2";
|
|
46435
46438
|
var videoAgreementAcceptance = external_exports.object({
|
|
46436
46439
|
version: external_exports.literal(VIDEO_SHARING_AGREEMENT_VERSION),
|
|
46437
46440
|
language: external_exports.enum(["en", "tr"])
|
|
@@ -47088,7 +47091,7 @@ var avatarTemplate = (id2) => AVATAR_LOOK_TEMPLATES.find((t) => t.id === id2);
|
|
|
47088
47091
|
var heygenId = external_exports.string().trim().regex(/^(?!\.{1,2}$)[A-Za-z0-9_.-]{1,128}$/, "Use an avatar id returned by AnimaGuru.");
|
|
47089
47092
|
var sha = external_exports.string().regex(/^[a-f0-9]{64}$/);
|
|
47090
47093
|
var name = external_exports.string().trim().min(1).max(80);
|
|
47091
|
-
var https = external_exports.string().trim().max(2048).url().refine((
|
|
47094
|
+
var https = external_exports.string().trim().max(2048).url().refine((url3) => url3.startsWith("https://"), "Use an HTTPS URL.");
|
|
47092
47095
|
var AVATAR_INLINE_MAX_BYTES = 8 * 1024 * 1024;
|
|
47093
47096
|
var AVATAR_PHOTO_TYPES = ["image/png", "image/jpeg", "image/webp"];
|
|
47094
47097
|
var AVATAR_FOOTAGE_TYPES = ["video/mp4", "video/quicktime", "video/webm"];
|
|
@@ -47458,10 +47461,10 @@ async function providerError(response) {
|
|
|
47458
47461
|
if (response.status === 403) return new YouTubeError("YouTube denied this request. Check channel permissions and your Google project's YouTube API configuration.", false, false, reason);
|
|
47459
47462
|
return new YouTubeError(`YouTube request failed (${response.status}${reason ? `: ${reason}` : ""}).`, response.status === 429 || response.status >= 500, false, reason);
|
|
47460
47463
|
}
|
|
47461
|
-
async function googleFetch(
|
|
47464
|
+
async function googleFetch(url3, init, signal) {
|
|
47462
47465
|
signal?.throwIfAborted();
|
|
47463
47466
|
try {
|
|
47464
|
-
return await fetch(
|
|
47467
|
+
return await fetch(url3, { ...init, redirect: "manual", signal: AbortSignal.any([AbortSignal.timeout(18e4), ...signal ? [signal] : []]) });
|
|
47465
47468
|
} catch {
|
|
47466
47469
|
signal?.throwIfAborted();
|
|
47467
47470
|
throw new YouTubeError("YouTube connection interrupted.", true);
|
|
@@ -47493,8 +47496,8 @@ async function accessToken(credentials, signal, force = false) {
|
|
|
47493
47496
|
await saveYouTubeCredentials(credentials);
|
|
47494
47497
|
return credentials.accessToken;
|
|
47495
47498
|
}
|
|
47496
|
-
async function youtubeRequest(credentials,
|
|
47497
|
-
const send = (token3) => googleFetch(
|
|
47499
|
+
async function youtubeRequest(credentials, url3, init = {}, signal) {
|
|
47500
|
+
const send = (token3) => googleFetch(url3, { ...init, headers: { ...init.headers, Authorization: `Bearer ${token3}` } }, signal);
|
|
47498
47501
|
let response = await send(await accessToken(credentials, signal));
|
|
47499
47502
|
if (response.status === 401) {
|
|
47500
47503
|
await response.body?.cancel();
|
|
@@ -47567,26 +47570,26 @@ async function youtubeLogin(options) {
|
|
|
47567
47570
|
response.setHeader("Referrer-Policy", "no-referrer");
|
|
47568
47571
|
response.setHeader("Content-Type", "text/plain; charset=UTF-8");
|
|
47569
47572
|
response.setHeader("Content-Security-Policy", "default-src 'none'");
|
|
47570
|
-
let
|
|
47573
|
+
let url3;
|
|
47571
47574
|
try {
|
|
47572
|
-
|
|
47575
|
+
url3 = new URL(request2.url ?? "/", redirectUri);
|
|
47573
47576
|
} catch {
|
|
47574
47577
|
response.writeHead(400).end("Invalid request.");
|
|
47575
47578
|
return;
|
|
47576
47579
|
}
|
|
47577
|
-
if (request2.method !== "GET" || request2.headers.host !== new URL(redirectUri).host ||
|
|
47580
|
+
if (request2.method !== "GET" || request2.headers.host !== new URL(redirectUri).host || url3.pathname !== "/oauth2callback" || (request2.url?.length ?? 0) > 8192) {
|
|
47578
47581
|
response.writeHead(404).end("Not found.");
|
|
47579
47582
|
return;
|
|
47580
47583
|
}
|
|
47581
|
-
const returnedState = Buffer.from(
|
|
47584
|
+
const returnedState = Buffer.from(url3.searchParams.get("state") ?? "");
|
|
47582
47585
|
const expectedState = Buffer.from(state);
|
|
47583
47586
|
if (used || returnedState.length !== expectedState.length || !timingSafeEqual(returnedState, expectedState)) {
|
|
47584
47587
|
response.writeHead(400).end("Invalid authorization state.");
|
|
47585
47588
|
return;
|
|
47586
47589
|
}
|
|
47587
47590
|
used = true;
|
|
47588
|
-
const code =
|
|
47589
|
-
if (
|
|
47591
|
+
const code = url3.searchParams.get("code");
|
|
47592
|
+
if (url3.searchParams.has("error") || !code || code.length > 4096) {
|
|
47590
47593
|
response.writeHead(400).end("Authorization cancelled. Return to your terminal.");
|
|
47591
47594
|
fail(new Error("YouTube authorization cancelled."));
|
|
47592
47595
|
return;
|
|
@@ -47607,11 +47610,11 @@ async function youtubeLogin(options) {
|
|
|
47607
47610
|
let token3;
|
|
47608
47611
|
try {
|
|
47609
47612
|
options.signal?.throwIfAborted();
|
|
47610
|
-
const
|
|
47611
|
-
|
|
47613
|
+
const url3 = new URL("https://accounts.google.com/o/oauth2/v2/auth");
|
|
47614
|
+
url3.search = new URLSearchParams({ client_id: client.clientId, redirect_uri: redirectUri, response_type: "code", scope: requested.join(" "), state, code_challenge: createHash4("sha256").update(verifier).digest("base64url"), code_challenge_method: "S256", access_type: "offline", prompt: "consent select_account" }).toString();
|
|
47612
47615
|
options.log?.("YouTube authorization stays on this machine. Tokens and upload receipts are saved in owner-only local files. Video bytes go directly to Google. Google privacy: https://policies.google.com/privacy \xB7 YouTube terms: https://www.youtube.com/t/terms");
|
|
47613
|
-
options.log?.(`Open ${
|
|
47614
|
-
if (options.browser !== false) await options.openBrowser?.(
|
|
47616
|
+
options.log?.(`Open ${url3.href}`);
|
|
47617
|
+
if (options.browser !== false) await options.openBrowser?.(url3.href);
|
|
47615
47618
|
const body = await tokenRequest(client, { grant_type: "authorization_code", code: await callback, code_verifier: verifier, redirect_uri: redirectUri }, options.signal);
|
|
47616
47619
|
token3 = typeof body.refresh_token === "string" ? body.refresh_token : typeof body.access_token === "string" ? body.access_token : void 0;
|
|
47617
47620
|
const scopes = typeof body.scope === "string" ? body.scope.split(" ") : [];
|
|
@@ -47746,7 +47749,7 @@ function fromStream(stream) {
|
|
|
47746
47749
|
}
|
|
47747
47750
|
async function request({
|
|
47748
47751
|
onProgress,
|
|
47749
|
-
url:
|
|
47752
|
+
url: url3,
|
|
47750
47753
|
method = "GET",
|
|
47751
47754
|
headers = {},
|
|
47752
47755
|
fetchOptions = {},
|
|
@@ -47756,7 +47759,7 @@ async function request({
|
|
|
47756
47759
|
if (body) {
|
|
47757
47760
|
body = await collect(body);
|
|
47758
47761
|
}
|
|
47759
|
-
const res = await fetch(
|
|
47762
|
+
const res = await fetch(url3, {
|
|
47760
47763
|
...fetchOptions,
|
|
47761
47764
|
method,
|
|
47762
47765
|
headers,
|
|
@@ -47947,13 +47950,13 @@ async function withLock(root, run) {
|
|
|
47947
47950
|
await rm2(path, { force: true });
|
|
47948
47951
|
}
|
|
47949
47952
|
}
|
|
47950
|
-
async function openContext(dir, options,
|
|
47953
|
+
async function openContext(dir, options, url3) {
|
|
47951
47954
|
const root = await cloudRootFor(dir);
|
|
47952
47955
|
const link2 = await readJson2(join11(root, LINK_FILE));
|
|
47953
47956
|
if (!link2) throw new Error("This folder is not linked to a cloud project. Run animaguru cloud link, or animaguru cloud clone ID.");
|
|
47954
47957
|
if (link2.schemaVersion !== 1 || !cloudProjectId.safeParse(link2.projectId).success) throw new Error(`Unsupported cloud link in ${LINK_FILE}. Run animaguru cloud unlink and link again.`);
|
|
47955
47958
|
const state = await readJson2(join11(root, STATE_FILE)) ?? { schemaVersion: 1, base: null, files: {} };
|
|
47956
|
-
return { root, gitdir: join11(root, GIT_DIR), link: link2, state, client: new Client(
|
|
47959
|
+
return { root, gitdir: join11(root, GIT_DIR), link: link2, state, client: new Client(url3 ?? link2.origin, options.signal), options };
|
|
47957
47960
|
}
|
|
47958
47961
|
async function cloudLink(dir) {
|
|
47959
47962
|
const link2 = await readJson2(join11(await cloudRootFor(dir), LINK_FILE));
|
|
@@ -48431,14 +48434,14 @@ async function restoreCloud(options) {
|
|
|
48431
48434
|
// cli/src/youtube-upload.ts
|
|
48432
48435
|
var YOUTUBE_CHUNK_BYTES = 8 * 1024 * 1024;
|
|
48433
48436
|
function safeYouTubeSession(value) {
|
|
48434
|
-
let
|
|
48437
|
+
let url3;
|
|
48435
48438
|
try {
|
|
48436
|
-
|
|
48439
|
+
url3 = new URL(value);
|
|
48437
48440
|
} catch {
|
|
48438
48441
|
throw new YouTubeError("Google returned an invalid upload session.");
|
|
48439
48442
|
}
|
|
48440
|
-
if (
|
|
48441
|
-
return
|
|
48443
|
+
if (url3.protocol !== "https:" || !["www.googleapis.com", "youtube.googleapis.com"].includes(url3.hostname) || url3.port || url3.username || url3.password || url3.hash || !/^\/upload\/youtube\/v3\/videos\/?$/.test(url3.pathname) || !url3.searchParams.get("upload_id")) throw new YouTubeError("Google returned an invalid upload session.");
|
|
48444
|
+
return url3.href;
|
|
48442
48445
|
}
|
|
48443
48446
|
async function inspectMp4(file2, signal) {
|
|
48444
48447
|
const handle = await open6(file2, "r");
|
|
@@ -48632,14 +48635,14 @@ async function completed(job, response) {
|
|
|
48632
48635
|
return youtubeJobSummary(job);
|
|
48633
48636
|
}
|
|
48634
48637
|
async function transfer(credentials, job, source, options) {
|
|
48635
|
-
const
|
|
48638
|
+
const url3 = safeYouTubeSession(job.sessionUrl);
|
|
48636
48639
|
let attempts = 0;
|
|
48637
48640
|
let stalled = 0;
|
|
48638
48641
|
try {
|
|
48639
48642
|
while (true) {
|
|
48640
48643
|
await source.check();
|
|
48641
48644
|
try {
|
|
48642
|
-
const probe = await youtubeRequest(credentials,
|
|
48645
|
+
const probe = await youtubeRequest(credentials, url3, { method: "PUT", headers: { "Content-Range": `bytes */${job.bytes}`, "Content-Length": "0" }, body: Buffer.alloc(0) }, options.signal);
|
|
48643
48646
|
if (probe.ok) return await completed(job, probe);
|
|
48644
48647
|
const offset = receivedBytes(probe, job.bytes);
|
|
48645
48648
|
await probe.body?.cancel();
|
|
@@ -48648,7 +48651,7 @@ async function transfer(credentials, job, source, options) {
|
|
|
48648
48651
|
const read2 = await source.handle.read(bytes, 0, bytes.length, offset);
|
|
48649
48652
|
if (read2.bytesRead !== bytes.length) throw new Error("The MP4 changed during upload. Restore it before resuming.");
|
|
48650
48653
|
await source.check();
|
|
48651
|
-
const response = await youtubeRequest(credentials,
|
|
48654
|
+
const response = await youtubeRequest(credentials, url3, { method: "PUT", headers: { "Content-Type": "video/mp4", "Content-Length": String(bytes.length), "Content-Range": `bytes ${offset}-${offset + bytes.length - 1}/${job.bytes}` }, body: new Uint8Array(bytes) }, options.signal);
|
|
48652
48655
|
if (response.ok) return await completed(job, response);
|
|
48653
48656
|
const uploaded = receivedBytes(response, job.bytes);
|
|
48654
48657
|
await response.body?.cancel();
|
|
@@ -48891,18 +48894,32 @@ var metadataFields = {
|
|
|
48891
48894
|
/** Facts the server cannot read from the file, such as tempo or mood; they override what it measured. */
|
|
48892
48895
|
details: detailsInput.default({})
|
|
48893
48896
|
};
|
|
48897
|
+
var LIBRARY_UPLOAD_MAX_BYTES = 95 * 1024 * 1024;
|
|
48898
|
+
var libraryBlobSha = external_exports.string().regex(/^[a-f0-9]{64}$/, "Use the file's lowercase hex SHA-256.");
|
|
48899
|
+
var url2 = external_exports.string().trim().url().max(500);
|
|
48900
|
+
var libraryOrigin = external_exports.object({
|
|
48901
|
+
name: text(80),
|
|
48902
|
+
url: url2,
|
|
48903
|
+
author: external_exports.string().trim().min(1).max(120).optional(),
|
|
48904
|
+
authorUrl: url2.optional(),
|
|
48905
|
+
license: text(80),
|
|
48906
|
+
licenseUrl: url2.optional()
|
|
48907
|
+
});
|
|
48894
48908
|
var libraryPublishBody = external_exports.object({
|
|
48895
48909
|
/** Defaults to the title as a slug. */
|
|
48896
48910
|
id: slug.optional(),
|
|
48897
|
-
|
|
48911
|
+
/** The project an asset or sprite comes from; uploads have none. */
|
|
48912
|
+
projectId: external_exports.string().regex(/^prj_[A-Za-z0-9]{8,40}$/).optional(),
|
|
48898
48913
|
source: external_exports.discriminatedUnion("kind", [
|
|
48899
48914
|
external_exports.object({ kind: external_exports.literal("asset"), assetId: external_exports.string().uuid() }),
|
|
48900
|
-
external_exports.object({ kind: external_exports.literal("sprite"), character: slug })
|
|
48915
|
+
external_exports.object({ kind: external_exports.literal("sprite"), character: slug }),
|
|
48916
|
+
/** Audio uploaded with PUT /api/v1/asset-library/uploads/SHA256, e.g. a CC0 recording, with who made it. */
|
|
48917
|
+
external_exports.object({ kind: external_exports.literal("upload"), type: external_exports.enum(["music", "sfx"]), sha: libraryBlobSha, origin: libraryOrigin })
|
|
48901
48918
|
]),
|
|
48902
48919
|
/** Replace an existing entry with the same id. */
|
|
48903
48920
|
replace: external_exports.boolean().default(false),
|
|
48904
48921
|
...metadataFields
|
|
48905
|
-
});
|
|
48922
|
+
}).refine((body) => body.source.kind === "upload" || body.projectId, { message: "Choose a project.", path: ["projectId"] });
|
|
48906
48923
|
var libraryUpdateBody = external_exports.object({ ...metadataFields, keywords: keywordList, details: detailsInput }).partial().refine((value) => Object.keys(value).length > 0, "Change at least one field.");
|
|
48907
48924
|
|
|
48908
48925
|
// cli/src/library.ts
|
|
@@ -48979,6 +48996,89 @@ async function moveWork(client, project, flags) {
|
|
|
48979
48996
|
return client.request(`/api/v1/sprites/${encodeURIComponent(project)}/move`, { method: "POST", body: parsed.data });
|
|
48980
48997
|
}
|
|
48981
48998
|
|
|
48999
|
+
// cli/src/release.ts
|
|
49000
|
+
import { mkdir as mkdir12, readFile as readFile15, rename as rename6, unlink as unlink2, writeFile as writeFile12 } from "node:fs/promises";
|
|
49001
|
+
import { dirname as dirname11, join as join15 } from "node:path";
|
|
49002
|
+
import { randomUUID as randomUUID5 } from "node:crypto";
|
|
49003
|
+
var releaseUrl = "https://animaguru.com/cli/release.json";
|
|
49004
|
+
function versionParts(version3) {
|
|
49005
|
+
if (!/^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)$/.test(version3)) throw new Error("Invalid CLI release version.");
|
|
49006
|
+
const parts = version3.split(".").map(Number);
|
|
49007
|
+
if (!parts.every(Number.isSafeInteger)) throw new Error("Invalid CLI release version.");
|
|
49008
|
+
return parts;
|
|
49009
|
+
}
|
|
49010
|
+
function newerRelease(latest, current) {
|
|
49011
|
+
const a = versionParts(latest), b = versionParts(current);
|
|
49012
|
+
for (let i2 = 0; i2 < a.length; i2++) {
|
|
49013
|
+
if (a[i2] !== b[i2]) return a[i2] > b[i2];
|
|
49014
|
+
}
|
|
49015
|
+
return false;
|
|
49016
|
+
}
|
|
49017
|
+
function parseRelease(value) {
|
|
49018
|
+
if (!value || typeof value !== "object" || !("name" in value) || value.name !== package_default.name || !("version" in value) || typeof value.version !== "string") throw new Error("Invalid CLI release manifest.");
|
|
49019
|
+
versionParts(value.version);
|
|
49020
|
+
return { name: value.name, version: value.version };
|
|
49021
|
+
}
|
|
49022
|
+
var cachePath = () => join15(dirname11(credentialsPath()), "cli-release.json");
|
|
49023
|
+
async function cachedRelease() {
|
|
49024
|
+
try {
|
|
49025
|
+
return parseRelease(JSON.parse(await readFile15(cachePath(), "utf8")));
|
|
49026
|
+
} catch {
|
|
49027
|
+
return void 0;
|
|
49028
|
+
}
|
|
49029
|
+
}
|
|
49030
|
+
async function latestRelease(signal) {
|
|
49031
|
+
const response = await fetch(releaseUrl, {
|
|
49032
|
+
cache: "no-store",
|
|
49033
|
+
redirect: "error",
|
|
49034
|
+
signal: signal ? AbortSignal.any([signal, AbortSignal.timeout(3e3)]) : AbortSignal.timeout(3e3)
|
|
49035
|
+
});
|
|
49036
|
+
if (!response.ok) throw new Error(`CLI release check failed (${response.status}).`);
|
|
49037
|
+
const release = parseRelease(await response.json());
|
|
49038
|
+
const path = cachePath();
|
|
49039
|
+
const temp = `${path}.${randomUUID5()}.tmp`;
|
|
49040
|
+
try {
|
|
49041
|
+
await mkdir12(dirname11(path), { recursive: true, mode: 448 });
|
|
49042
|
+
await writeFile12(temp, JSON.stringify(release) + "\n", { flag: "wx", mode: 384 });
|
|
49043
|
+
await rename6(temp, path);
|
|
49044
|
+
} catch {
|
|
49045
|
+
await unlink2(temp).catch(() => void 0);
|
|
49046
|
+
}
|
|
49047
|
+
return release;
|
|
49048
|
+
}
|
|
49049
|
+
function releaseStatus(release) {
|
|
49050
|
+
return {
|
|
49051
|
+
currentVersion: package_default.version,
|
|
49052
|
+
latestVersion: release.version,
|
|
49053
|
+
updateRequired: newerRelease(release.version, package_default.version),
|
|
49054
|
+
instructions: {
|
|
49055
|
+
macos: "Rerun the macOS installer: https://animaguru.com/install.sh",
|
|
49056
|
+
npm: `npm install -g --ignore-scripts ${package_default.name}@${release.version}`,
|
|
49057
|
+
verify: "animaguru --version"
|
|
49058
|
+
}
|
|
49059
|
+
};
|
|
49060
|
+
}
|
|
49061
|
+
function needsReleaseCheck(argv) {
|
|
49062
|
+
const separator = argv.indexOf("--");
|
|
49063
|
+
if (separator !== -1) argv = argv.slice(0, separator);
|
|
49064
|
+
return argv.length > 0 && !["update", "schema", "completion"].includes(argv[0]) && !argv.some((arg) => ["--help", "-h", "--version", "-v"].includes(arg)) && !(argv[0] === "auth" && argv[1] === "logout");
|
|
49065
|
+
}
|
|
49066
|
+
async function requireCurrentRelease(argv, stderr) {
|
|
49067
|
+
if (!needsReleaseCheck(argv)) return true;
|
|
49068
|
+
let release;
|
|
49069
|
+
try {
|
|
49070
|
+
release = await latestRelease();
|
|
49071
|
+
} catch {
|
|
49072
|
+
release = await cachedRelease();
|
|
49073
|
+
stderr("AnimaGuru: could not check the latest CLI release; using the last known version when available.");
|
|
49074
|
+
}
|
|
49075
|
+
if (!release) return true;
|
|
49076
|
+
const status = releaseStatus(release);
|
|
49077
|
+
if (!status.updateRequired) return true;
|
|
49078
|
+
stderr(JSON.stringify({ error: "cli_update_required", message: `AnimaGuru CLI ${status.currentVersion} is outdated. Install ${status.latestVersion}, verify animaguru --version, then retry the command. Use the same installation method as your existing CLI.`, ...status }));
|
|
49079
|
+
return false;
|
|
49080
|
+
}
|
|
49081
|
+
|
|
48982
49082
|
// cli/src/commands.ts
|
|
48983
49083
|
var assetModelIds = [...SPRITE_IMAGE_MODEL_IDS, ...SPRITE_VIDEO_MODEL_IDS, ...MUSIC_MODELS.map((m) => m.id), ...SPEECH_MODELS.map((m) => m.id), ...SFX_MODELS.map((m) => m.id)];
|
|
48984
49084
|
var assetAuthorizationFlags = [
|
|
@@ -49025,9 +49125,9 @@ var workspaceQuery = async (client) => {
|
|
|
49025
49125
|
const selected = await selectedWorkspace(client.origin);
|
|
49026
49126
|
return selected === "me" ? "" : `?workspace=${encodeURIComponent(selected)}`;
|
|
49027
49127
|
};
|
|
49028
|
-
async function openBrowser(
|
|
49128
|
+
async function openBrowser(url3) {
|
|
49029
49129
|
const command = process.platform === "darwin" ? "open" : process.platform === "win32" ? "rundll32" : "xdg-open";
|
|
49030
|
-
const args = process.platform === "win32" ? ["url.dll,FileProtocolHandler",
|
|
49130
|
+
const args = process.platform === "win32" ? ["url.dll,FileProtocolHandler", url3] : [url3];
|
|
49031
49131
|
await new Promise((resolve15) => {
|
|
49032
49132
|
const child = spawn3(command, args, { stdio: "ignore", detached: true });
|
|
49033
49133
|
child.once("error", () => resolve15());
|
|
@@ -49038,7 +49138,7 @@ async function openBrowser(url2) {
|
|
|
49038
49138
|
});
|
|
49039
49139
|
}
|
|
49040
49140
|
function createCli() {
|
|
49041
|
-
return new Crust("animaguru", { description: "Sprite, asset and HeyGen avatar generation, the motion and asset libraries, video workspaces, video sharing, and direct local YouTube uploads. Successful commands output JSON. Paid jobs and uploads require --yes.", version: package_default.version }).command("youtube", (youtube) => youtube.command("auth", (auth) => auth.add(defineCommand("login", { description: "Connect a YouTube channel through Google; credentials stay on this computer" }, (command) => command.flags(
|
|
49141
|
+
return new Crust("animaguru", { description: "Sprite, asset and HeyGen avatar generation, the motion and asset libraries, video workspaces, video sharing, and direct local YouTube uploads. Successful commands output JSON. Paid jobs and uploads require --yes.", version: package_default.version }).add(defineCommand("update", { description: "Check the latest CLI release and print update instructions without installing" }, (command) => command.action(async ({ stdout, signal }) => out(stdout, releaseStatus(await latestRelease(signal)))))).command("youtube", (youtube) => youtube.command("auth", (auth) => auth.add(defineCommand("login", { description: "Connect a YouTube channel through Google; credentials stay on this computer" }, (command) => command.flags(
|
|
49042
49142
|
{ name: "client-file", type: "string", required: true, env: { name: "ANIMAGURU_YOUTUBE_CLIENT_FILE" }, description: "Google Desktop app OAuth client JSON" },
|
|
49043
49143
|
{ name: "browser", type: "boolean", default: true, description: "Open the system browser; --no-browser prints the URL" },
|
|
49044
49144
|
{ name: "timeout", type: "number", default: 300, description: "Authorization timeout in seconds (1\u2013600)" },
|
|
@@ -49273,7 +49373,7 @@ Confirm code: ${device.user_code}`);
|
|
|
49273
49373
|
out(stdout, await new Client(flags.url, signal).request(flags.look ? `${avatarsPath(args.id)}/looks/${encodeURIComponent(flags.look)}` : `${avatarsPath(args.id)}/${encodeURIComponent(flags.group)}`, { method: "DELETE" }));
|
|
49274
49374
|
})))).command("jobs", (jobs) => jobs.add(defineCommand("list", { description: "List the latest generation jobs" }, (command) => command.flags({ name: "url", type: "string", default: "https://animaguru.com", env: { name: "ANIMAGURU_URL" }, description: "Server origin" }).args(id).action(async ({ args, flags, stdout, signal }) => out(stdout, await new Client(flags.url, signal).request(`${projectPath(args.id)}/jobs`))))).add(defineCommand("submit", { description: "Submit a typed JSON job: character, animate, custom or redraw; spends credits" }, (command) => command.flags({ name: "url", type: "string", default: "https://animaguru.com", env: { name: "ANIMAGURU_URL" }, description: "Server origin" }).args(id).flags(...modelFlags).flags({ name: "file", type: "string", required: true, description: "JSON job file" }, { name: "yes", type: "boolean", required: true, description: "Authorize spending credits" }).action(async ({ args, flags, stdout, signal }) => {
|
|
49275
49375
|
if (!flags.yes) throw new Error("Pass --yes to authorize spending credits.");
|
|
49276
|
-
const body = spriteJobBody.parse({ ...JSON.parse(await
|
|
49376
|
+
const body = spriteJobBody.parse({ ...JSON.parse(await readFile16(flags.file, "utf8")), ...selectedModels(flags) });
|
|
49277
49377
|
out(stdout, await new Client(flags.url, signal).request(`${projectPath(args.id)}/jobs`, { method: "POST", body }));
|
|
49278
49378
|
}))).add(defineCommand("wait", { description: "Wait for a specific job; fail if generation fails or times out" }, (command) => command.flags({ name: "url", type: "string", default: "https://animaguru.com", env: { name: "ANIMAGURU_URL" }, description: "Server origin" }).args(id, { name: "job", type: "string", required: true }).flags({ name: "timeout", type: "number", default: 600, description: "Maximum seconds to wait" }).action(async ({ args, flags, stdout, signal }) => out(stdout, { job: await waitForJob(new Client(flags.url, signal), args.id, args.job, flags.timeout, signal) }))))).add(defineCommand("models", { description: "Set default image and/or video models for future project jobs" }, (command) => command.flags({ name: "url", type: "string", default: "https://animaguru.com", env: { name: "ANIMAGURU_URL" }, description: "Server origin" }).args(id).flags({ ...modelFlags[0], aliases: ["model"] }, modelFlags[1]).action(async ({ args, flags, stdout, signal }) => {
|
|
49279
49379
|
const body = selectedModels(flags);
|
|
@@ -49288,7 +49388,7 @@ Confirm code: ${device.user_code}`);
|
|
|
49288
49388
|
const extension = flags.file.split(".").at(-1)?.toLowerCase();
|
|
49289
49389
|
const type = extension === "png" ? "image/png" : extension === "jpg" || extension === "jpeg" ? "image/jpeg" : extension === "webp" ? "image/webp" : void 0;
|
|
49290
49390
|
if (!type) throw new Error("Use a PNG, JPEG or WebP image.");
|
|
49291
|
-
const bytes = await
|
|
49391
|
+
const bytes = await readFile16(flags.file);
|
|
49292
49392
|
if (bytes.length > 10 * 1024 * 1024) throw new Error("Image must be at most 10 MB.");
|
|
49293
49393
|
const form = new FormData();
|
|
49294
49394
|
form.set("image", new Blob([bytes], { type }), `reference.${extension}`);
|
|
@@ -49308,13 +49408,17 @@ Confirm code: ${device.user_code}`);
|
|
|
49308
49408
|
entries[path2] = new Uint8Array(await response.arrayBuffer());
|
|
49309
49409
|
}
|
|
49310
49410
|
const path = resolve14(flags.output);
|
|
49311
|
-
await
|
|
49411
|
+
await writeFile13(path, zipSync(entries, { level: 0 }), { flag: "wx" });
|
|
49312
49412
|
out(stdout, { path, files: manifest.files.length });
|
|
49313
49413
|
})))).extend(version(package_default.version, { format: "plain" })).extend(help()).extend(completion());
|
|
49314
49414
|
}
|
|
49315
49415
|
|
|
49316
49416
|
// cli/src/index.ts
|
|
49317
|
-
await
|
|
49417
|
+
if (await requireCurrentRelease(process.argv.slice(2), (line) => console.error(line))) {
|
|
49418
|
+
await createCli().execute();
|
|
49419
|
+
} else {
|
|
49420
|
+
process.exitCode = 1;
|
|
49421
|
+
}
|
|
49318
49422
|
/*! Bundled license information:
|
|
49319
49423
|
|
|
49320
49424
|
safe-buffer/index.js:
|