gitdog 0.1.1 → 0.1.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/README.md +22 -22
- package/dist/auth.js +4 -4
- package/dist/catalog.js +1 -1
- package/dist/client.js +5 -5
- package/dist/commands.js +15 -11
- package/dist/projects.js +12 -12
- package/dist/storage.js +1 -1
- package/dist/ui.d.ts +1 -1
- package/dist/ui.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -17,29 +17,29 @@
|
|
|
17
17
|
</p>
|
|
18
18
|
|
|
19
19
|
<p align="center">
|
|
20
|
-
<img src="https://raw.githubusercontent.com/hyodotdev/gitdog-cli/main/.github/assets/terminal.svg?v=0.1.
|
|
20
|
+
<img src="https://raw.githubusercontent.com/hyodotdev/gitdog-cli/main/.github/assets/terminal.svg?v=0.1.2" alt="Gitdog terminal: connect a project, configure automation and review pending actions" width="800">
|
|
21
21
|
</p>
|
|
22
22
|
|
|
23
23
|
Connect repositories, configure Gitdog's issue and discussion assistants, review
|
|
24
24
|
AI actions, and automate project tasks from your terminal or CI.
|
|
25
25
|
|
|
26
|
-
##
|
|
26
|
+
## Run with npx
|
|
27
27
|
|
|
28
|
-
Requires **Node.js 22.14+**.
|
|
28
|
+
Requires **Node.js 22.14+**. No global installation needed.
|
|
29
29
|
|
|
30
30
|
```sh
|
|
31
|
-
|
|
31
|
+
npx gitdog@latest --help
|
|
32
32
|
```
|
|
33
33
|
|
|
34
34
|
## Quick start
|
|
35
35
|
|
|
36
36
|
```sh
|
|
37
|
-
gitdog login
|
|
38
|
-
gitdog github install
|
|
39
|
-
gitdog github recover
|
|
40
|
-
gitdog init owner/repo
|
|
41
|
-
gitdog config set requireApproval true
|
|
42
|
-
gitdog config push
|
|
37
|
+
npx gitdog@latest login
|
|
38
|
+
npx gitdog@latest github install
|
|
39
|
+
npx gitdog@latest github recover
|
|
40
|
+
npx gitdog@latest init owner/repo
|
|
41
|
+
npx gitdog@latest config set requireApproval true
|
|
42
|
+
npx gitdog@latest config push
|
|
43
43
|
```
|
|
44
44
|
|
|
45
45
|
GitHub App setup is only needed once. A project connects an existing GitHub
|
|
@@ -47,23 +47,23 @@ repository to Gitdog.
|
|
|
47
47
|
|
|
48
48
|
## Everyday commands
|
|
49
49
|
|
|
50
|
-
| Task | Command
|
|
51
|
-
| ------------------------ |
|
|
52
|
-
| List projects | `gitdog projects list` |
|
|
53
|
-
| Read automation settings | `gitdog config get --remote` |
|
|
54
|
-
| Review pending actions | `gitdog tickets pending` |
|
|
55
|
-
| Check code indexing | `gitdog index status` |
|
|
56
|
-
| List team members | `gitdog team members` |
|
|
57
|
-
| Check usage | `gitdog usage summary` |
|
|
50
|
+
| Task | Command |
|
|
51
|
+
| ------------------------ | --------------------------------------- |
|
|
52
|
+
| List projects | `npx gitdog@latest projects list` |
|
|
53
|
+
| Read automation settings | `npx gitdog@latest config get --remote` |
|
|
54
|
+
| Review pending actions | `npx gitdog@latest tickets pending` |
|
|
55
|
+
| Check code indexing | `npx gitdog@latest index status` |
|
|
56
|
+
| List team members | `npx gitdog@latest team members` |
|
|
57
|
+
| Check usage | `npx gitdog@latest usage summary` |
|
|
58
58
|
|
|
59
|
-
Use `gitdog --help` to explore commands. Add `--json` for scripts.
|
|
59
|
+
Use `npx gitdog@latest --help` to explore commands. Add `--json` for scripts.
|
|
60
60
|
|
|
61
61
|
## Use in CI
|
|
62
62
|
|
|
63
63
|
```sh
|
|
64
|
-
gitdog keys create --name ci
|
|
65
|
-
gitdog --key-file /path/to/key.json projects list --json
|
|
66
|
-
gitdog keys revoke KEY_ID --yes
|
|
64
|
+
npx gitdog@latest keys create --name ci
|
|
65
|
+
npx --yes gitdog@0.1.2 --key-file /path/to/key.json projects list --json
|
|
66
|
+
npx gitdog@latest keys revoke KEY_ID --yes
|
|
67
67
|
```
|
|
68
68
|
|
|
69
69
|
`keys create` prints the private key file's path. Keys are project-scoped and
|
package/dist/auth.js
CHANGED
|
@@ -112,7 +112,7 @@ export async function createLoginListener(timeoutMs = 300_000) {
|
|
|
112
112
|
response.end("Gitdog received your sign-in. Return to your terminal to finish. You can close this tab.");
|
|
113
113
|
finish(undefined, value);
|
|
114
114
|
});
|
|
115
|
-
const timer = setTimeout(() => finish(new Error("Sign-in timed out. Run gitdog login to try again.")), timeoutMs);
|
|
115
|
+
const timer = setTimeout(() => finish(new Error("Sign-in timed out. Run npx gitdog@latest login to try again.")), timeoutMs);
|
|
116
116
|
try {
|
|
117
117
|
await new Promise((resolve, reject) => {
|
|
118
118
|
server.once("error", reject);
|
|
@@ -195,11 +195,11 @@ export async function login(apiUrl, siteUrl, ui, noBrowser = false) {
|
|
|
195
195
|
}
|
|
196
196
|
catch {
|
|
197
197
|
listener.signal.throwIfAborted();
|
|
198
|
-
throw new Error("Could not finish sign-in. Check that the CLI loopback callback is deployed, then run gitdog login again.");
|
|
198
|
+
throw new Error("Could not finish sign-in. Check that the CLI loopback callback is deployed, then run npx gitdog@latest login again.");
|
|
199
199
|
}
|
|
200
200
|
const tokens = asRecord(exchange)?.tokens;
|
|
201
201
|
if (!validTokens(tokens))
|
|
202
|
-
throw new Error("Sign-in did not return a session. Run gitdog login again.");
|
|
202
|
+
throw new Error("Sign-in did not return a session. Run npx gitdog@latest login again.");
|
|
203
203
|
client.setAuth(tokens.token);
|
|
204
204
|
const user = asRecord(await invoke(client, "query", "users/query:getCurrentUser"));
|
|
205
205
|
if (!user)
|
|
@@ -210,7 +210,7 @@ export async function login(apiUrl, siteUrl, ui, noBrowser = false) {
|
|
|
210
210
|
ui.output(`✓ Signed in as ${String(user.name ?? "GitHub user")}.`);
|
|
211
211
|
if (user.requiresCurrentLegalAttestation)
|
|
212
212
|
ui.info(`Complete account consent at ${siteUrl}/legal/consent before running AI workflows.`);
|
|
213
|
-
ui.info("Next: gitdog init");
|
|
213
|
+
ui.info("Next: npx gitdog@latest init");
|
|
214
214
|
}
|
|
215
215
|
finally {
|
|
216
216
|
await listener.close();
|
package/dist/catalog.js
CHANGED
|
@@ -3,6 +3,6 @@ export const API_CATALOG = catalog;
|
|
|
3
3
|
export function publicOperation(path) {
|
|
4
4
|
const operation = API_CATALOG.find((entry) => entry.path === path);
|
|
5
5
|
if (!operation)
|
|
6
|
-
throw new Error("Unknown public operation. Run gitdog api list. Internal functions cannot be called.");
|
|
6
|
+
throw new Error("Unknown public operation. Run npx gitdog@latest api list. Internal functions cannot be called.");
|
|
7
7
|
return operation;
|
|
8
8
|
}
|
package/dist/client.js
CHANGED
|
@@ -60,15 +60,15 @@ export class GitdogApi {
|
|
|
60
60
|
}
|
|
61
61
|
const initial = await this.store.read();
|
|
62
62
|
if (!initial)
|
|
63
|
-
throw new Error("You are not logged in. Run gitdog login.");
|
|
63
|
+
throw new Error("You are not logged in. Run npx gitdog@latest login.");
|
|
64
64
|
if (initial.apiUrl !== this.apiUrl)
|
|
65
|
-
throw new Error("This session belongs to another API URL. Run gitdog login --api-url <url> first.");
|
|
65
|
+
throw new Error("This session belongs to another API URL. Run npx gitdog@latest login --api-url <url> first.");
|
|
66
66
|
this.session = initial;
|
|
67
67
|
if (tokenExpiresSoon(initial.token)) {
|
|
68
68
|
this.session = await this.store.locked(async () => {
|
|
69
69
|
const current = await this.store.read();
|
|
70
70
|
if (!current || current.apiUrl !== this.apiUrl)
|
|
71
|
-
throw new Error("Session changed. Run gitdog login again.");
|
|
71
|
+
throw new Error("Session changed. Run npx gitdog@latest login again.");
|
|
72
72
|
if (!tokenExpiresSoon(current.token))
|
|
73
73
|
return current;
|
|
74
74
|
let result;
|
|
@@ -78,11 +78,11 @@ export class GitdogApi {
|
|
|
78
78
|
});
|
|
79
79
|
}
|
|
80
80
|
catch {
|
|
81
|
-
throw new Error("Could not refresh your session. Check your connection or run gitdog login again.");
|
|
81
|
+
throw new Error("Could not refresh your session. Check your connection or run npx gitdog@latest login again.");
|
|
82
82
|
}
|
|
83
83
|
const tokens = asRecord(result)?.tokens;
|
|
84
84
|
if (!validTokens(tokens))
|
|
85
|
-
throw new Error("Your session expired. Run gitdog login again.");
|
|
85
|
+
throw new Error("Your session expired. Run npx gitdog@latest login again.");
|
|
86
86
|
const updated = { ...current, ...tokens };
|
|
87
87
|
await this.store.save(updated);
|
|
88
88
|
return updated;
|
package/dist/commands.js
CHANGED
|
@@ -44,7 +44,7 @@ export function createProgram(dependencies = {}) {
|
|
|
44
44
|
.option("-y, --yes", "Confirm the requested operation without prompting")
|
|
45
45
|
.showHelpAfterError()
|
|
46
46
|
.showSuggestionAfterError()
|
|
47
|
-
.addHelpText("after", `\nGetting started:\n gitdog login\n gitdog init\n gitdog config set requireApproval true\n gitdog config push --dry-run\n gitdog config push\n\nFirebase-style aliases also work: projects:list, projects:create, config:push.\nRun gitdog <command> --help for details.`);
|
|
47
|
+
.addHelpText("after", `\nGetting started:\n npx gitdog@latest login\n npx gitdog@latest init\n npx gitdog@latest config set requireApproval true\n npx gitdog@latest config push --dry-run\n npx gitdog@latest config push\n\nFirebase-style aliases also work: projects:list, projects:create, config:push.\nRun npx gitdog@latest <command> --help for details.`);
|
|
48
48
|
async function context(command) {
|
|
49
49
|
const options = command.optsWithGlobals();
|
|
50
50
|
const ui = dependencies.ui ?? new Ui(flag(options.json));
|
|
@@ -104,10 +104,14 @@ export function createProgram(dependencies = {}) {
|
|
|
104
104
|
ui.output({
|
|
105
105
|
name: "gitdog",
|
|
106
106
|
version: VERSION,
|
|
107
|
-
next: [
|
|
107
|
+
next: [
|
|
108
|
+
"npx gitdog@latest login",
|
|
109
|
+
"npx gitdog@latest init",
|
|
110
|
+
"npx gitdog@latest --help",
|
|
111
|
+
],
|
|
108
112
|
});
|
|
109
113
|
else
|
|
110
|
-
ui.output("Get started\n 1. gitdog login Sign in with GitHub\n 2. gitdog init Connect a project\n 3. gitdog status Check your assistant\n\nRun gitdog --help to explore all commands.");
|
|
114
|
+
ui.output("Get started\n 1. npx gitdog@latest login Sign in with GitHub\n 2. npx gitdog@latest init Connect a project\n 3. npx gitdog@latest status Check your assistant\n\nRun npx gitdog@latest --help to explore all commands.");
|
|
111
115
|
});
|
|
112
116
|
command(program, "login", "Sign in with GitHub using your browser", async ({ apiUrl, siteUrl, ui }, _args, opts) => login(apiUrl, siteUrl, ui, opts.browser === false)).option("--no-browser", "Print the sign-in URL without opening a browser");
|
|
113
117
|
command(program, "logout", "Revoke this session and remove saved credentials", async ({ ui }, _args, opts) => logout(ui, flag(opts.local))).option("--local", "Remove local credentials without contacting the server");
|
|
@@ -120,7 +124,7 @@ export function createProgram(dependencies = {}) {
|
|
|
120
124
|
!process.env.GITDOG_API_KEY &&
|
|
121
125
|
!(await new SessionStore().read())) {
|
|
122
126
|
if (!process.stdin.isTTY || ui.json)
|
|
123
|
-
throw new Error("Run gitdog login before gitdog init.");
|
|
127
|
+
throw new Error("Run npx gitdog@latest login before npx gitdog@latest init.");
|
|
124
128
|
await login(apiUrl, siteUrl, ui);
|
|
125
129
|
}
|
|
126
130
|
await project.init(args[0], text(opts.alias) ?? "default", flag(opts.force));
|
|
@@ -212,7 +216,7 @@ export function createProgram(dependencies = {}) {
|
|
|
212
216
|
expiresAt: issued.expiresAt,
|
|
213
217
|
keyFile,
|
|
214
218
|
});
|
|
215
|
-
ui.info(`Key saved privately. Use: gitdog --key-file ${JSON.stringify(keyFile)} projects list`);
|
|
219
|
+
ui.info(`Key saved privately. Use: npx gitdog@latest --key-file ${JSON.stringify(keyFile)} projects list`);
|
|
216
220
|
})
|
|
217
221
|
.option("--name <name>", "Key name", "CLI key")
|
|
218
222
|
.option("--write", "Grant project settings and ticket write access (read access is always included)")
|
|
@@ -324,7 +328,7 @@ export function createProgram(dependencies = {}) {
|
|
|
324
328
|
do {
|
|
325
329
|
const remaining = deadline - Date.now();
|
|
326
330
|
if (flag(opts.wait) && remaining <= 0)
|
|
327
|
-
throw new Error("Timed out waiting for indexing. Indexing continues on the server; check gitdog index status.");
|
|
331
|
+
throw new Error("Timed out waiting for indexing. Indexing continues on the server; check npx gitdog@latest index status.");
|
|
328
332
|
const state = await api.call("query", "repoIndexing/query:getIndexingStatus", { repositoryId: repo._id }, flag(opts.wait) ? { timeoutMs: remaining } : undefined);
|
|
329
333
|
const record = asRecord(state);
|
|
330
334
|
if (!record)
|
|
@@ -339,14 +343,14 @@ export function createProgram(dependencies = {}) {
|
|
|
339
343
|
last = fingerprint;
|
|
340
344
|
}
|
|
341
345
|
if (record.status === "failed" || record.ragStatus === "failed")
|
|
342
|
-
throw new Error("Indexing failed. Run gitdog index logs for details.");
|
|
346
|
+
throw new Error("Indexing failed. Run npx gitdog@latest index logs for details.");
|
|
343
347
|
if (record.status === "completed" &&
|
|
344
348
|
["completed", "skipped"].includes(String(record.ragStatus))) {
|
|
345
349
|
ui.output(state);
|
|
346
350
|
return;
|
|
347
351
|
}
|
|
348
352
|
if (Date.now() >= deadline)
|
|
349
|
-
throw new Error("Timed out waiting for indexing. Indexing continues on the server; check gitdog index status.");
|
|
353
|
+
throw new Error("Timed out waiting for indexing. Indexing continues on the server; check npx gitdog@latest index status.");
|
|
350
354
|
await new Promise((resolve) => setTimeout(resolve, Math.min(2000, Math.max(1, deadline - Date.now()))));
|
|
351
355
|
} while (true);
|
|
352
356
|
})
|
|
@@ -516,7 +520,7 @@ export function createProgram(dependencies = {}) {
|
|
|
516
520
|
await openBrowser(url);
|
|
517
521
|
ui.output({
|
|
518
522
|
url,
|
|
519
|
-
next: "After GitHub authorization, run gitdog github recover, then gitdog projects available.",
|
|
523
|
+
next: "After GitHub authorization, run npx gitdog@latest github recover, then npx gitdog@latest projects available.",
|
|
520
524
|
});
|
|
521
525
|
})
|
|
522
526
|
.option("--app <slug>", "GitHub App slug (use gitdogbot-dev for development)", "gitdogbot")
|
|
@@ -527,7 +531,7 @@ export function createProgram(dependencies = {}) {
|
|
|
527
531
|
if (result?.status !== "recovered") {
|
|
528
532
|
ui.output({ ...result, recoveredCount: count });
|
|
529
533
|
if (result?.status === "reauth_required")
|
|
530
|
-
throw new Error("Refresh GitHub authorization with gitdog login, then run github recover again.");
|
|
534
|
+
throw new Error("Refresh GitHub authorization with npx gitdog@latest login, then run github recover again.");
|
|
531
535
|
return;
|
|
532
536
|
}
|
|
533
537
|
ui.info(`Recovered installation ${String(result.installationId)}.`);
|
|
@@ -568,7 +572,7 @@ export function createProgram(dependencies = {}) {
|
|
|
568
572
|
if (operation.path === "apiKeys/action:create")
|
|
569
573
|
throw new Error("Use keys create to issue API keys securely into a private file.");
|
|
570
574
|
if (!operation.path.startsWith("admin/"))
|
|
571
|
-
throw new Error("Use gitdog api call for non-admin operations.");
|
|
575
|
+
throw new Error("Use npx gitdog@latest api call for non-admin operations.");
|
|
572
576
|
const data = await jsonArguments(text(opts.data) ?? "{}");
|
|
573
577
|
if (operation.kind !== "query") {
|
|
574
578
|
if (!ui.json)
|
package/dist/projects.js
CHANGED
|
@@ -48,7 +48,7 @@ export function validateSettings(value, complete = false) {
|
|
|
48
48
|
throw new Error(`${key} must be a string.`);
|
|
49
49
|
}
|
|
50
50
|
else
|
|
51
|
-
throw new Error(`Unknown setting: ${key}. Run gitdog config keys.`);
|
|
51
|
+
throw new Error(`Unknown setting: ${key}. Run npx gitdog@latest config keys.`);
|
|
52
52
|
settings[key] = item;
|
|
53
53
|
}
|
|
54
54
|
if (complete &&
|
|
@@ -63,7 +63,7 @@ export function validateProjectConfig(value) {
|
|
|
63
63
|
typeof config.defaultProject !== "string" ||
|
|
64
64
|
!projects ||
|
|
65
65
|
!Object.hasOwn(projects, config.defaultProject))
|
|
66
|
-
throw new Error("Invalid gitdog.json. Run gitdog init in a new directory, or repair the project configuration.");
|
|
66
|
+
throw new Error("Invalid gitdog.json. Run npx gitdog@latest init in a new directory, or repair the project configuration.");
|
|
67
67
|
const result = {};
|
|
68
68
|
for (const [alias, value] of Object.entries(projects)) {
|
|
69
69
|
aliasName(alias);
|
|
@@ -114,10 +114,10 @@ export class ProjectContext {
|
|
|
114
114
|
async config() {
|
|
115
115
|
const path = await findConfig(this.configOption);
|
|
116
116
|
if (!path)
|
|
117
|
-
throw new Error("No gitdog.json found. Run gitdog init, or pass --project owner/repo.");
|
|
117
|
+
throw new Error("No gitdog.json found. Run npx gitdog@latest init, or pass --project owner/repo.");
|
|
118
118
|
const value = await readJson(path);
|
|
119
119
|
if (value === undefined)
|
|
120
|
-
throw new Error(`No project configuration at ${path}. Run gitdog init.`);
|
|
120
|
+
throw new Error(`No project configuration at ${path}. Run npx gitdog@latest init.`);
|
|
121
121
|
return { path, value: validateProjectConfig(value) };
|
|
122
122
|
}
|
|
123
123
|
async target(override) {
|
|
@@ -134,7 +134,7 @@ export class ProjectContext {
|
|
|
134
134
|
const { value } = await this.config();
|
|
135
135
|
const alias = selection ?? value.defaultProject;
|
|
136
136
|
if (!Object.hasOwn(value.projects, alias))
|
|
137
|
-
throw new Error(`Unknown project alias ${alias}. Run gitdog use --list.`);
|
|
137
|
+
throw new Error(`Unknown project alias ${alias}. Run npx gitdog@latest use --list.`);
|
|
138
138
|
return value.projects[alias].repository;
|
|
139
139
|
}
|
|
140
140
|
async repository(override) {
|
|
@@ -143,7 +143,7 @@ export class ProjectContext {
|
|
|
143
143
|
? await this.api.call("query", "repositories/query:get", { owner: target.split("/")[0], repo: target.split("/")[1] })
|
|
144
144
|
: await this.api.call("query", "repositories/query:getById", { repositoryId: target });
|
|
145
145
|
if (!repository)
|
|
146
|
-
throw new Error(`Project ${target} is not connected or accessible. Run gitdog projects create ${target}.`);
|
|
146
|
+
throw new Error(`Project ${target} is not connected or accessible. Run npx gitdog@latest projects create ${target}.`);
|
|
147
147
|
return repository;
|
|
148
148
|
}
|
|
149
149
|
async available(reconnectRepositoryId) {
|
|
@@ -174,7 +174,7 @@ export class ProjectContext {
|
|
|
174
174
|
const available = await this.available(reconnectRepositoryId);
|
|
175
175
|
const matches = available.filter((item) => String(item.fullName).toLowerCase() === name.toLowerCase());
|
|
176
176
|
if (matches.length !== 1)
|
|
177
|
-
throw new Error(`Repository ${name} is unavailable. Run gitdog github install, authorize it, then gitdog github recover. Check projects available.`);
|
|
177
|
+
throw new Error(`Repository ${name} is unavailable. Run npx gitdog@latest github install, authorize it, then npx gitdog@latest github recover. Check projects available.`);
|
|
178
178
|
const item = matches[0];
|
|
179
179
|
if (typeof item.installationId !== "number" || typeof item.id !== "number")
|
|
180
180
|
throw new Error("GitHub returned invalid repository identifiers.");
|
|
@@ -196,7 +196,7 @@ export class ProjectContext {
|
|
|
196
196
|
join(process.cwd(), "gitdog.json");
|
|
197
197
|
const previous = await readJson(path);
|
|
198
198
|
if (previous !== undefined && !force)
|
|
199
|
-
throw new Error(`Project configuration already exists at ${path}. Use gitdog use --add, or --force to replace it.`);
|
|
199
|
+
throw new Error(`Project configuration already exists at ${path}. Use npx gitdog@latest use --add, or --force to replace it.`);
|
|
200
200
|
if (!name) {
|
|
201
201
|
let detected;
|
|
202
202
|
try {
|
|
@@ -231,14 +231,14 @@ export class ProjectContext {
|
|
|
231
231
|
alias,
|
|
232
232
|
config: path,
|
|
233
233
|
});
|
|
234
|
-
this.ui.info("✓ Ready. Try gitdog status, gitdog config get, or gitdog tickets list.");
|
|
234
|
+
this.ui.info("✓ Ready. Try npx gitdog@latest status, npx gitdog@latest config get, or npx gitdog@latest tickets list.");
|
|
235
235
|
}
|
|
236
236
|
async use(selection, add, list = false) {
|
|
237
237
|
const { path, value } = await this.config();
|
|
238
238
|
if (add) {
|
|
239
239
|
aliasName(add);
|
|
240
240
|
if (!selection)
|
|
241
|
-
throw new Error("Use gitdog use owner/repo --add alias.");
|
|
241
|
+
throw new Error("Use npx gitdog@latest use owner/repo --add alias.");
|
|
242
242
|
if (Object.hasOwn(value.projects, add))
|
|
243
243
|
throw new Error(`Alias ${add} already exists. Choose a new alias.`);
|
|
244
244
|
const repo = await this.repository(selection);
|
|
@@ -274,7 +274,7 @@ export class ProjectContext {
|
|
|
274
274
|
: Object.keys(value.projects).find((key) => value.projects[key].repository.toLowerCase() ===
|
|
275
275
|
alias.toLowerCase());
|
|
276
276
|
if (!match)
|
|
277
|
-
throw new Error("This project has no local settings. Add it with gitdog use owner/repo --add alias.");
|
|
277
|
+
throw new Error("This project has no local settings. Add it with npx gitdog@latest use owner/repo --add alias.");
|
|
278
278
|
return { path, value, alias: match, project: value.projects[match] };
|
|
279
279
|
}
|
|
280
280
|
async configGet(key, remote = false) {
|
|
@@ -298,7 +298,7 @@ export class ProjectContext {
|
|
|
298
298
|
local.project.settings = { ...local.project.settings, ...patch };
|
|
299
299
|
await writeJson(local.path, local.value);
|
|
300
300
|
this.ui.output({ saved: true, settings: patch });
|
|
301
|
-
this.ui.info("Saved locally. Run gitdog config push to apply.");
|
|
301
|
+
this.ui.info("Saved locally. Run npx gitdog@latest config push to apply.");
|
|
302
302
|
}
|
|
303
303
|
async configPull(force = false) {
|
|
304
304
|
const local = await this.localProject();
|
package/dist/storage.js
CHANGED
|
@@ -80,7 +80,7 @@ export class SessionStore {
|
|
|
80
80
|
if (!validTokens(value) ||
|
|
81
81
|
typeof item?.apiUrl !== "string" ||
|
|
82
82
|
typeof item.siteUrl !== "string")
|
|
83
|
-
throw new Error("Invalid saved session. Run gitdog logout, then gitdog login.");
|
|
83
|
+
throw new Error("Invalid saved session. Run npx gitdog@latest logout, then npx gitdog@latest login.");
|
|
84
84
|
return {
|
|
85
85
|
...value,
|
|
86
86
|
apiUrl: validateUrl(item.apiUrl, "Saved API URL"),
|
package/dist/ui.d.ts
CHANGED
package/dist/ui.js
CHANGED