@getmonoceros/workbench 1.11.9 → 1.11.10
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/bin.js +29 -7
- package/dist/bin.js.map +1 -1
- package/package.json +1 -1
package/dist/bin.js
CHANGED
|
@@ -667,9 +667,7 @@ var realGitCredentialFill = (input) => {
|
|
|
667
667
|
stdio: ["pipe", "pipe", "inherit"],
|
|
668
668
|
env: {
|
|
669
669
|
...process.env,
|
|
670
|
-
GIT_TERMINAL_PROMPT: "0"
|
|
671
|
-
GIT_ASKPASS: "",
|
|
672
|
-
SSH_ASKPASS: ""
|
|
670
|
+
GIT_TERMINAL_PROMPT: "0"
|
|
673
671
|
}
|
|
674
672
|
});
|
|
675
673
|
let stdout = "";
|
|
@@ -682,6 +680,21 @@ var realGitCredentialFill = (input) => {
|
|
|
682
680
|
child.stdin.end();
|
|
683
681
|
});
|
|
684
682
|
};
|
|
683
|
+
var realGitCredentialApprove = (input) => {
|
|
684
|
+
return new Promise((resolve, reject) => {
|
|
685
|
+
const child = spawn("git", ["credential", "approve"], {
|
|
686
|
+
stdio: ["pipe", "ignore", "inherit"],
|
|
687
|
+
env: {
|
|
688
|
+
...process.env,
|
|
689
|
+
GIT_TERMINAL_PROMPT: "0"
|
|
690
|
+
}
|
|
691
|
+
});
|
|
692
|
+
child.on("error", reject);
|
|
693
|
+
child.on("exit", () => resolve());
|
|
694
|
+
child.stdin.write(input);
|
|
695
|
+
child.stdin.end();
|
|
696
|
+
});
|
|
697
|
+
};
|
|
685
698
|
function resolveProvider(host, explicit) {
|
|
686
699
|
const canonical = KNOWN_PROVIDER_HOSTS[host.toLowerCase()];
|
|
687
700
|
if (canonical) return canonical;
|
|
@@ -834,6 +847,7 @@ async function collectGitCredentials(devContainerRoot, hosts, options = {}) {
|
|
|
834
847
|
const credsDir = path2.join(devContainerRoot, ".monoceros");
|
|
835
848
|
const credentialsPath = path2.join(credsDir, "git-credentials");
|
|
836
849
|
const spawnFn = options.spawn ?? realGitCredentialFill;
|
|
850
|
+
const approveFn = options.approve ?? realGitCredentialApprove;
|
|
837
851
|
const logger = options.logger ?? { info: () => {
|
|
838
852
|
}, warn: () => {
|
|
839
853
|
} };
|
|
@@ -884,6 +898,16 @@ host=${host}
|
|
|
884
898
|
}
|
|
885
899
|
lines.push(formatCredentialLine(host, username, password));
|
|
886
900
|
perHost.push({ host, provider, status: "ok", detail: "" });
|
|
901
|
+
const approveInput = `protocol=https
|
|
902
|
+
host=${host}
|
|
903
|
+
username=${username}
|
|
904
|
+
password=${password}
|
|
905
|
+
|
|
906
|
+
`;
|
|
907
|
+
try {
|
|
908
|
+
await approveFn(approveInput);
|
|
909
|
+
} catch {
|
|
910
|
+
}
|
|
887
911
|
}
|
|
888
912
|
await fs2.mkdir(credsDir, { recursive: true });
|
|
889
913
|
await fs2.writeFile(
|
|
@@ -4154,9 +4178,7 @@ var realGitLsRemote = (url) => {
|
|
|
4154
4178
|
stdio: ["ignore", "pipe", "pipe"],
|
|
4155
4179
|
env: {
|
|
4156
4180
|
...process.env,
|
|
4157
|
-
GIT_TERMINAL_PROMPT: "0"
|
|
4158
|
-
GIT_ASKPASS: "",
|
|
4159
|
-
SSH_ASKPASS: ""
|
|
4181
|
+
GIT_TERMINAL_PROMPT: "0"
|
|
4160
4182
|
}
|
|
4161
4183
|
});
|
|
4162
4184
|
let stdout = "";
|
|
@@ -4785,7 +4807,7 @@ async function persistPromptedIdentity(prompted, ymlPath, home, logger) {
|
|
|
4785
4807
|
}
|
|
4786
4808
|
|
|
4787
4809
|
// src/version.ts
|
|
4788
|
-
var CLI_VERSION = true ? "1.11.
|
|
4810
|
+
var CLI_VERSION = true ? "1.11.10" : "dev";
|
|
4789
4811
|
|
|
4790
4812
|
// src/commands/_dispatch.ts
|
|
4791
4813
|
import { consola as consola12 } from "consola";
|