@tomradex/repos 0.19.0 → 0.21.0
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/index.d.ts +1 -1
- package/dist/service.d.ts +23 -1
- package/package.json +10 -10
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { Repos, ReposConfig, BranchInUseError, CheckoutUnsetError, HubUnsetError, type CheckoutSelection, type CheckoutView, type FolderRepo, type MissingWorkdir, type WorkdirView } from "./service.js";
|
|
1
|
+
export { Repos, ReposConfig, BranchInUseError, CheckoutUnsetError, HubUnsetError, RepoPathOutsideError, type CheckoutProblem, type CheckoutSelection, type CheckoutView, type FolderRepo, type MissingWorkdir, type WorkdirView } from "./service.js";
|
|
2
2
|
export { isLocalRemote, normalizeRemote, remoteIdentity, sameRepository, serverHost, sshHostName, type RemoteIdentity } from "./remotes.js";
|
|
3
3
|
export { Repos as default } from "./service.js";
|
|
4
4
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/service.d.ts
CHANGED
|
@@ -16,7 +16,10 @@ export interface CheckoutView {
|
|
|
16
16
|
remote: string;
|
|
17
17
|
checkout: string | null;
|
|
18
18
|
runInCheckout: boolean;
|
|
19
|
+
/** The folder this machine names cannot be worked in: gone from disk, or no longer a git checkout. */
|
|
20
|
+
problem?: CheckoutProblem;
|
|
19
21
|
}
|
|
22
|
+
export type CheckoutProblem = "missing" | "not-git";
|
|
20
23
|
/** Result of inspecting the folder the user explicitly chose. */
|
|
21
24
|
export type CheckoutSelection = {
|
|
22
25
|
state: "ready";
|
|
@@ -36,6 +39,10 @@ export interface FolderRepo {
|
|
|
36
39
|
local: boolean;
|
|
37
40
|
/** The project already had this repository; the folder became its checkout. */
|
|
38
41
|
existing: boolean;
|
|
42
|
+
/** The folder was not a repository: Tomrade ran git init in it. */
|
|
43
|
+
initialised: boolean;
|
|
44
|
+
/** Files committed because the repository had no commit yet; 0 when it already had one. */
|
|
45
|
+
committed: number;
|
|
39
46
|
}
|
|
40
47
|
export interface WorkdirView {
|
|
41
48
|
repo: Repo;
|
|
@@ -84,6 +91,12 @@ export declare class HubUnsetError extends Error {
|
|
|
84
91
|
constructor();
|
|
85
92
|
}
|
|
86
93
|
/** git keeps a branch in one worktree at a time, and another worktree already has this one. */
|
|
94
|
+
/** The workstream's folder is a place on this machine outside the checkout: only a folder in the repository can be run in. */
|
|
95
|
+
export declare class RepoPathOutsideError extends Error {
|
|
96
|
+
readonly repoPath: string;
|
|
97
|
+
readonly checkout: string;
|
|
98
|
+
constructor(repoPath: string, checkout: string);
|
|
99
|
+
}
|
|
87
100
|
export declare class BranchInUseError extends Error {
|
|
88
101
|
readonly branch: string;
|
|
89
102
|
readonly at: string;
|
|
@@ -117,9 +130,18 @@ export declare class Repos extends Service implements ReposReader {
|
|
|
117
130
|
* A folder chosen as a repository. Its origin, when it has one, is the
|
|
118
131
|
* identity, and a row already naming it under any spelling is reused. With
|
|
119
132
|
* no origin the folder itself is the repository, local to this machine until
|
|
120
|
-
* it gains one (see adoptOrigins).
|
|
133
|
+
* it gains one (see adoptOrigins). A folder that is not a repository yet
|
|
134
|
+
* becomes one here, and a repository with nothing committed gets its first
|
|
135
|
+
* commit: worktrees, scans and merges all need a default branch to stand on.
|
|
121
136
|
*/
|
|
122
137
|
addFromFolder(projectId: string, rawDir: string): Promise<FolderRepo>;
|
|
138
|
+
/**
|
|
139
|
+
* A repository with no commit has no branch to scan, branch from or merge
|
|
140
|
+
* into. What its working tree holds becomes the first commit, as the user's
|
|
141
|
+
* .gitignore says; a folder without one still keeps dependency and cache
|
|
142
|
+
* folders out, through .git/info/exclude so no file of theirs is written.
|
|
143
|
+
*/
|
|
144
|
+
private commitUnborn;
|
|
123
145
|
/** Where a folder's branches start: origin's HEAD, else main or master, else whatever is checked out. */
|
|
124
146
|
private trunkOf;
|
|
125
147
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tomradex/repos",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.21.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"author": "Haoyuan Tang",
|
|
6
6
|
"engines": {
|
|
@@ -27,15 +27,15 @@
|
|
|
27
27
|
"dist"
|
|
28
28
|
],
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@tomradex/boards": "0.
|
|
31
|
-
"@tomradex/contracts": "0.
|
|
32
|
-
"@tomradex/db": "0.
|
|
33
|
-
"@tomradex/domain": "0.2.
|
|
34
|
-
"@tomradex/git": "0.
|
|
35
|
-
"@tomradex/hub": "0.
|
|
36
|
-
"@tomradex/ipc": "0.
|
|
37
|
-
"@tomradex/storage": "0.
|
|
38
|
-
"@tomradex/tools": "0.
|
|
30
|
+
"@tomradex/boards": "0.21.0",
|
|
31
|
+
"@tomradex/contracts": "0.21.0",
|
|
32
|
+
"@tomradex/db": "0.21.0",
|
|
33
|
+
"@tomradex/domain": "0.2.29",
|
|
34
|
+
"@tomradex/git": "0.21.0",
|
|
35
|
+
"@tomradex/hub": "0.21.0",
|
|
36
|
+
"@tomradex/ipc": "0.21.0",
|
|
37
|
+
"@tomradex/storage": "0.21.0",
|
|
38
|
+
"@tomradex/tools": "0.21.0",
|
|
39
39
|
"cordis": "4.0.0-rc.8",
|
|
40
40
|
"zod": "^4.4.3"
|
|
41
41
|
}
|