@instafy/cli 0.1.8-staging.379 → 0.1.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/git-credential.js +4 -0
- package/dist/git-wrapper.js +7 -2
- package/package.json +1 -1
package/dist/git-credential.js
CHANGED
|
@@ -81,6 +81,10 @@ function isAllowedGitHost(rawHost) {
|
|
|
81
81
|
normalized.hostname === "host.docker.internal") {
|
|
82
82
|
return true;
|
|
83
83
|
}
|
|
84
|
+
// Local dev stack defaults to docker-compose service names.
|
|
85
|
+
if (normalized.hostname === "git-edge" || normalized.hostname.startsWith("git-shard")) {
|
|
86
|
+
return true;
|
|
87
|
+
}
|
|
84
88
|
return normalized.hostname.endsWith(".instafy.dev");
|
|
85
89
|
}
|
|
86
90
|
function normalizeRepoName(raw) {
|
package/dist/git-wrapper.js
CHANGED
|
@@ -3,6 +3,7 @@ import { randomUUID } from "node:crypto";
|
|
|
3
3
|
import fs from "node:fs";
|
|
4
4
|
import path from "node:path";
|
|
5
5
|
import kleur from "kleur";
|
|
6
|
+
const INSTAFY_GIT_HELPER_VALUE = "!instafy git credential";
|
|
6
7
|
function pathExists(candidate) {
|
|
7
8
|
try {
|
|
8
9
|
fs.statSync(candidate);
|
|
@@ -300,8 +301,12 @@ export function runInstafyGit(userArgs, options) {
|
|
|
300
301
|
if (split.command === "add") {
|
|
301
302
|
return runInstafyGitAdd(context, split.globalArgs, split.commandArgs, { cwd });
|
|
302
303
|
}
|
|
303
|
-
const args = buildInstafyGitArgs(context, userArgs);
|
|
304
|
-
const result = spawnSync("git", args, {
|
|
304
|
+
const args = buildInstafyGitArgs(context, ["-c", `credential.helper=${INSTAFY_GIT_HELPER_VALUE}`, ...userArgs]);
|
|
305
|
+
const result = spawnSync("git", args, {
|
|
306
|
+
stdio: "inherit",
|
|
307
|
+
cwd,
|
|
308
|
+
env: { ...process.env, GIT_TERMINAL_PROMPT: "0" },
|
|
309
|
+
});
|
|
305
310
|
if (result.error) {
|
|
306
311
|
throw new Error(`Failed to run git: ${result.error.message}`);
|
|
307
312
|
}
|
package/package.json
CHANGED