create-egregore 0.3.13 → 0.3.14
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/lib/setup.js +11 -1
- package/package.json +1 -1
package/lib/setup.js
CHANGED
|
@@ -108,6 +108,7 @@ async function install(data, ui, targetDir) {
|
|
|
108
108
|
execFileSync("git", ["clone", authedForkUrl, egregoreDir], { stdio: "pipe", encoding: "utf-8", timeout: 60000 });
|
|
109
109
|
try { run(`git remote set-url origin ${fork_url}`, { cwd: egregoreDir }); } catch {}
|
|
110
110
|
}
|
|
111
|
+
try { run("git config credential.helper store", { cwd: egregoreDir }); } catch {}
|
|
111
112
|
ui.success("Cloned egregore");
|
|
112
113
|
|
|
113
114
|
// Set repo-local git identity from GitHub user (not machine-global config)
|
|
@@ -129,6 +130,13 @@ async function install(data, ui, targetDir) {
|
|
|
129
130
|
execFileSync("git", ["clone", authedMemoryUrl, memoryDir], { stdio: "pipe", encoding: "utf-8", timeout: 60000 });
|
|
130
131
|
try { run(`git remote set-url origin ${memory_url}`, { cwd: memoryDir }); } catch {}
|
|
131
132
|
}
|
|
133
|
+
try { run("git config credential.helper store", { cwd: memoryDir }); } catch {}
|
|
134
|
+
if (github_username) {
|
|
135
|
+
try {
|
|
136
|
+
run(`git config user.name "${github_name || github_username}"`, { cwd: memoryDir });
|
|
137
|
+
run(`git config user.email "${github_username}@users.noreply.github.com"`, { cwd: memoryDir });
|
|
138
|
+
} catch {}
|
|
139
|
+
}
|
|
132
140
|
ui.success("Cloned memory");
|
|
133
141
|
|
|
134
142
|
// 3. Symlink (use junction on Windows — no admin required)
|
|
@@ -196,6 +204,7 @@ async function install(data, ui, targetDir) {
|
|
|
196
204
|
execFileSync("git", ["clone", embedToken(repoUrl, github_token), repoDir], { stdio: "pipe", encoding: "utf-8", timeout: 60000 });
|
|
197
205
|
try { run(`git remote set-url origin ${repoUrl}`, { cwd: repoDir }); } catch {}
|
|
198
206
|
}
|
|
207
|
+
try { run("git config credential.helper store", { cwd: repoDir }); } catch {}
|
|
199
208
|
clonedRepos.push(repoName);
|
|
200
209
|
ui.success(`Cloned ${repoName}`);
|
|
201
210
|
} catch {
|
|
@@ -234,7 +243,8 @@ function embedToken(url, token) {
|
|
|
234
243
|
|
|
235
244
|
function configureGitCredentials(token) {
|
|
236
245
|
try {
|
|
237
|
-
|
|
246
|
+
// Use --global since this runs before any repos are cloned (no local .git exists)
|
|
247
|
+
run("git config --global credential.helper store");
|
|
238
248
|
const credentialInput = `protocol=https\nhost=github.com\nusername=x-access-token\npassword=${token}\n`;
|
|
239
249
|
execSync("git credential-store store", {
|
|
240
250
|
input: credentialInput,
|