@ibgib/vcs-gib 0.0.49 → 0.0.51
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 +1 -1
- package/VCS_CLI_USER_GUIDE.md +12 -7
- package/dist/AUTO-GENERATED-version.d.mts +1 -1
- package/dist/AUTO-GENERATED-version.mjs +1 -1
- package/dist/bootstrap/node-bootstrap.mjs +6 -6
- package/dist/bootstrap/node-bootstrap.mjs.map +1 -1
- package/dist/cli/cli-constants.mjs +1 -1
- package/dist/cli/cli-constants.mjs.map +1 -1
- package/dist/cli/commands/cli-add-cmd.mjs +3 -3
- package/dist/cli/commands/cli-add-cmd.mjs.map +1 -1
- package/dist/cli/commands/cli-branch-cmd.mjs +3 -3
- package/dist/cli/commands/cli-branch-cmd.mjs.map +1 -1
- package/dist/cli/commands/cli-commit-cmd.mjs +2 -2
- package/dist/cli/commands/cli-commit-cmd.mjs.map +1 -1
- package/dist/cli/commands/cli-init-cmd.mjs +6 -6
- package/dist/cli/commands/cli-init-cmd.mjs.map +1 -1
- package/dist/cli/commands/cli-log-cmd.d.mts.map +1 -1
- package/dist/cli/commands/cli-log-cmd.mjs +2 -18
- package/dist/cli/commands/cli-log-cmd.mjs.map +1 -1
- package/dist/cli/commands/cli-merge-cmd.mjs +3 -3
- package/dist/cli/commands/cli-merge-cmd.mjs.map +1 -1
- package/dist/cli/commands/cli-reset-cmd.d.mts +1 -1
- package/dist/cli/commands/cli-reset-cmd.mjs +9 -9
- package/dist/cli/commands/cli-reset-cmd.mjs.map +1 -1
- package/dist/cli/commands/cli-restore-cmd.mjs +3 -3
- package/dist/cli/commands/cli-restore-cmd.mjs.map +1 -1
- package/dist/cli/commands/cli-status-cmd.d.mts +1 -1
- package/dist/cli/commands/cli-status-cmd.mjs +1 -1
- package/dist/cli/vcs-cli-main.mjs +5 -5
- package/dist/cli/vcs-cli-main.mjs.map +1 -1
- package/dist/cli/vcs-repo-helper.d.mts.map +1 -1
- package/dist/cli/vcs-repo-helper.mjs +7 -7
- package/dist/cli/vcs-repo-helper.mjs.map +1 -1
- package/package.json +6 -6
- package/src/AUTO-GENERATED-version.mts +1 -1
- package/src/bootstrap/node-bootstrap.mts +6 -6
- package/src/cli/cli-constants.mts +2 -2
- package/src/cli/cli-e2e.respec.mts +7 -7
- package/src/cli/commands/cli-add-cmd.mts +3 -3
- package/src/cli/commands/cli-branch-cmd.mts +3 -3
- package/src/cli/commands/cli-commit-cmd.mts +2 -2
- package/src/cli/commands/cli-init-cmd.mts +6 -6
- package/src/cli/commands/cli-log-cmd.mts +2 -23
- package/src/cli/commands/cli-merge-cmd.mts +3 -3
- package/src/cli/commands/cli-reset-cmd.mts +9 -9
- package/src/cli/commands/cli-restore-cmd.mts +3 -3
- package/src/cli/commands/cli-status-cmd.mts +1 -1
- package/src/cli/commands/commit-log-cmd.respec.mts +11 -11
- package/src/cli/commands/init-cmd.respec.mts +1 -1
- package/src/cli/commands/reset-restore-cmd.respec.mts +3 -3
- package/src/cli/commands/status-add-cmd.respec.mts +4 -4
- package/src/cli/vcs-cli-main.mts +5 -5
- package/src/cli/vcs-repo-helper.mts +7 -8
- package/src/vcs-gib.respec.mts +9 -9
- package/tsconfig.test.tsbuildinfo +1 -1
- package/tsconfig.tsbuildinfo +1 -1
- package/vcs-gib_test_output.md +18 -18
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vcs-cli-main.mjs","sourceRoot":"","sources":["../../src/cli/vcs-cli-main.mts"],"names":[],"mappings":";AACA;;;;;GAKG;AAEH,OAAO,EAAE,eAAe,EAAE,MAAM,iDAAiD,CAAC;AAElF,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAC7D,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,a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"","sources":["../../src/cli/vcs-repo-helper.mts"],"names":[],"mappings":"AAAA;;;;GAIG;
|
|
1
|
+
{"version":3,"file":"vcs-repo-helper.d.mts","sourceRoot":"","sources":["../../src/cli/vcs-repo-helper.mts"],"names":[],"mappings":"AAAA;;;;GAIG;AAKH,OAAO,EAAE,aAAa,EAAmC,MAAM,6CAA6C,CAAC;AAY7G,MAAM,WAAW,qBAAqB;IAClC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,UAAU,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,uBAAuB;IACpC,IAAI,EAAE,aAAa,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,iBAAiB,EAAE,MAAM,CAAC;CAC7B;AAED,wBAAsB,iBAAiB,CAAC,EACpC,SAAyB,EACzB,aAAyB,EACzB,UAAU,GACb,GAAE,qBAA0B,GAAG,OAAO,CAAC,uBAAuB,CAAC,CA8E/D"}
|
|
@@ -7,12 +7,12 @@ import path from 'node:path';
|
|
|
7
7
|
import { extractErrorMsg } from '@ibgib/helper-gib/dist/helpers/utils-helper.mjs';
|
|
8
8
|
import { VcsRepository } from '@ibgib/core-gib/dist/vcs/vcs-repository.mjs';
|
|
9
9
|
import { resolveContextualBranchName } from '@ibgib/core-gib/dist/vcs/branch/branch-helper.mjs';
|
|
10
|
-
import {
|
|
10
|
+
import { getB2tFSGalaxyIbGib } from '@ibgib/core-gib/dist/vcs/galaxy/galaxy-helper.mjs';
|
|
11
11
|
import { getOrCreateBranchSpace } from '@ibgib/core-gib/dist/vcs/branch/branch-helper.mjs';
|
|
12
|
+
import { B2TFS_BRANCH_DEFAULT_NAME } from '@ibgib/core-gib/dist/vcs/branch/branch-constants.mjs';
|
|
12
13
|
import { getOrCreateWorkspaceProjectionSpace } from '@ibgib/node-gib/dist/vcs/workspace-space-helper.mjs';
|
|
13
14
|
import { GLOBAL_LOG_A_LOT } from '../vcs-gib-constants.mjs';
|
|
14
15
|
import { bootstrapVcsMetaspace } from '../bootstrap/node-bootstrap.mjs';
|
|
15
|
-
import { B2TFS_BRANCH_DEFAULT_NAME } from '@ibgib/core-gib/dist/vcs/branch/branch-constants.mjs';
|
|
16
16
|
const logalot = GLOBAL_LOG_A_LOT;
|
|
17
17
|
export async function openVcsRepository({ targetDir = process.cwd(), vcsFolderName = '.vcsgib', branchName, } = {}) {
|
|
18
18
|
const lc = `[${openVcsRepository.name}]`;
|
|
@@ -30,16 +30,16 @@ export async function openVcsRepository({ targetDir = process.cwd(), vcsFolderNa
|
|
|
30
30
|
if (!foundVcsPath) {
|
|
31
31
|
throw new Error(`fatal: not an ibgib repository (or any of the parent directories): ${vcsFolderName}`);
|
|
32
32
|
}
|
|
33
|
-
// 2. Fetch authoritative in-band
|
|
34
|
-
const
|
|
35
|
-
if (!
|
|
36
|
-
throw new Error(`fatal: not an ibgib repository (
|
|
33
|
+
// 2. Fetch authoritative in-band galaxy from localSpace
|
|
34
|
+
const galaxyIbGib = await getB2tFSGalaxyIbGib({ space: localSpace, metaspace });
|
|
35
|
+
if (!galaxyIbGib) {
|
|
36
|
+
throw new Error(`fatal: not an ibgib repository (galaxy not found in ${vcsPath}) (E: 615a88627ba8daf8cbb9684bbd8d3826)`);
|
|
37
37
|
}
|
|
38
38
|
// 3. Determine active branch and worktree directory
|
|
39
39
|
const activeBranchName = branchName || resolveContextualBranchName({
|
|
40
40
|
targetDir: absTargetDir,
|
|
41
41
|
repoRoot,
|
|
42
|
-
|
|
42
|
+
galaxyIbGib,
|
|
43
43
|
});
|
|
44
44
|
const activeWorktreeDir = activeBranchName === B2TFS_BRANCH_DEFAULT_NAME
|
|
45
45
|
? repoRoot
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vcs-repo-helper.mjs","sourceRoot":"","sources":["../../src/cli/vcs-repo-helper.mts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,O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CAAC,CAAC;QAEF,6BAA6B;QAC7B,MAAM,IAAI,GAAG,IAAI,aAAa,CAAC;YAC3B,SAAS;YACT,UAAU;YACV,cAAc;YACd,6BAA6B;YAC7B,QAAQ;YACR,aAAa;SAChB,CAAC,CAAC;QAEH,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,iBAAiB,EAAE,OAAO,EAAE,CAAC;IAC1D,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACb,OAAO,CAAC,KAAK,CAAC,GAAG,EAAE,IAAI,eAAe,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;QACjD,MAAM,KAAK,CAAC;IAChB,CAAC;YAAS,CAAC;QACP,IAAI,OAAO,EAAE,CAAC;YAAC,OAAO,CAAC,GAAG,CAAC,GAAG,EAAE,YAAY,CAAC,CAAC;QAAC,CAAC;IACpD,CAAC;AACL,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ibgib/vcs-gib",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.51",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.mjs",
|
|
@@ -19,10 +19,10 @@
|
|
|
19
19
|
"prepare:publish": "npm version patch && node ../../build/dist/concrete-build/build-vcs-gib.mjs --prod && npm run pack"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@ibgib/helper-gib": "^0.0.
|
|
23
|
-
"@ibgib/ts-gib": "^0.5.
|
|
24
|
-
"@ibgib/encrypt-gib": "^0.3.
|
|
25
|
-
"@ibgib/core-gib": "^0.1.
|
|
26
|
-
"@ibgib/node-gib": "^0.0.
|
|
22
|
+
"@ibgib/helper-gib": "^0.0.40",
|
|
23
|
+
"@ibgib/ts-gib": "^0.5.37",
|
|
24
|
+
"@ibgib/encrypt-gib": "^0.3.4",
|
|
25
|
+
"@ibgib/core-gib": "^0.1.88",
|
|
26
|
+
"@ibgib/node-gib": "^0.0.35"
|
|
27
27
|
}
|
|
28
28
|
}
|
|
@@ -61,7 +61,7 @@ export async function bootstrapVcsMetaspace(
|
|
|
61
61
|
): Promise<BootstrapVcsMetaspaceResult> {
|
|
62
62
|
const lc = `${lcFile}[${bootstrapVcsMetaspace.name}]`;
|
|
63
63
|
try {
|
|
64
|
-
if (logalot) { console.log(`${lc} starting... (I:
|
|
64
|
+
if (logalot) { console.log(`${lc} starting... (I: 022c3a0b1aa42f4c98f13499ef46d826)`); }
|
|
65
65
|
|
|
66
66
|
GraftStrategyService.instance.registerStrategy(new B2tFS3WayGraftStrategy());
|
|
67
67
|
|
|
@@ -111,7 +111,7 @@ export async function bootstrapVcsMetaspace(
|
|
|
111
111
|
const safeRepoDir = path.basename(repoRoot).replace(/[^a-zA-Z0-9_\-]/g, '_');
|
|
112
112
|
const defaultSpaceName = opts.defaultSpaceName || `vcs_${safeRepoDir}`;
|
|
113
113
|
|
|
114
|
-
if (logalot) { console.log(`${lc} initializing vcsMetaspace at vcsPath: ${vcsPath}, repoRoot: ${repoRoot} (I:
|
|
114
|
+
if (logalot) { console.log(`${lc} initializing vcsMetaspace at vcsPath: ${vcsPath}, repoRoot: ${repoRoot} (I: 1c9b38684cdf77226dc77ebbb9d59226)`); }
|
|
115
115
|
|
|
116
116
|
// Instantiate Metaspace_Nodespace
|
|
117
117
|
const metaspace = new Metaspace_Nodespace(undefined);
|
|
@@ -153,7 +153,7 @@ export async function bootstrapVcsMetaspace(
|
|
|
153
153
|
if (logalot) { console.log(`${lc} [Alert] ${title}: ${msg} (I: 7e6f5d4c3b2a1f0e9d8c7b6a5f4e3d2c)`); }
|
|
154
154
|
},
|
|
155
155
|
getFnPrompt: () => async ({ title, msg }) => {
|
|
156
|
-
if (logalot) { console.log(`${lc} [Prompt] ${title}: ${msg} (I:
|
|
156
|
+
if (logalot) { console.log(`${lc} [Prompt] ${title}: ${msg} (I: 1b8c483495728d1618d71c13c7ea3826)`); }
|
|
157
157
|
return defaultSpaceName;
|
|
158
158
|
},
|
|
159
159
|
getFnPromptPassword: () => async (title, msg) => {
|
|
@@ -182,7 +182,7 @@ export async function bootstrapVcsMetaspace(
|
|
|
182
182
|
|
|
183
183
|
if (logalot) {
|
|
184
184
|
const spaceName = localSpace.data?.name || localSpace.ib;
|
|
185
|
-
console.log(`${lc} Metaspace ready. LocalSpace name/ib: ${spaceName} (I:
|
|
185
|
+
console.log(`${lc} Metaspace ready. LocalSpace name/ib: ${spaceName} (I: 1f0c6168a3630b230976c368b229c826)`);
|
|
186
186
|
}
|
|
187
187
|
|
|
188
188
|
return {
|
|
@@ -193,9 +193,9 @@ export async function bootstrapVcsMetaspace(
|
|
|
193
193
|
foundVcsPath,
|
|
194
194
|
};
|
|
195
195
|
} catch (error: any) {
|
|
196
|
-
console.error(`${lc} ${error?.message || error} (E:
|
|
196
|
+
console.error(`${lc} ${error?.message || error} (E: 7cd7c8960f0aceedb8116e27e5eb5826)`);
|
|
197
197
|
throw error;
|
|
198
198
|
} finally {
|
|
199
|
-
if (logalot) { console.log(`${lc} complete. (I:
|
|
199
|
+
if (logalot) { console.log(`${lc} complete. (I: f182211ae627bfc9c5529c48a09aca26)`); }
|
|
200
200
|
}
|
|
201
201
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @module cli-constants
|
|
3
|
-
*
|
|
3
|
+
*
|
|
4
4
|
* Constants and RCLIParamInfo parameter definitions for vcs CLI commands.
|
|
5
5
|
*/
|
|
6
6
|
|
|
@@ -103,7 +103,7 @@ export const VCS_PARAM_YES: RCLIParamInfo = {
|
|
|
103
103
|
export const VCS_PARAM_STAGED: RCLIParamInfo = {
|
|
104
104
|
name: 'staged',
|
|
105
105
|
synonyms: ['s'],
|
|
106
|
-
description: 'Unstage specified files from
|
|
106
|
+
description: 'Unstage specified files from galaxy',
|
|
107
107
|
isFlag: true,
|
|
108
108
|
argTypeName: 'boolean',
|
|
109
109
|
};
|
|
@@ -23,7 +23,7 @@ import { executeBranchCmd } from './commands/cli-branch-cmd.mjs';
|
|
|
23
23
|
import { executeCheckoutCmd } from './commands/cli-checkout-cmd.mjs';
|
|
24
24
|
import { executeMergeCmd } from './commands/cli-merge-cmd.mjs';
|
|
25
25
|
import { bootstrapVcsMetaspace } from '../bootstrap/node-bootstrap.mjs';
|
|
26
|
-
import {
|
|
26
|
+
import { getB2tFSGalaxyIbGib } from '@ibgib/core-gib/dist/vcs/galaxy/galaxy-helper.mjs';
|
|
27
27
|
|
|
28
28
|
const lc = `[apps/vcs-gib/src/cli/cli-e2e.respec.mts]`;
|
|
29
29
|
|
|
@@ -113,9 +113,9 @@ await respecfully(lc, `Full E2E CLI Integration Spec`, async () => {
|
|
|
113
113
|
repoPath: testDir,
|
|
114
114
|
vcsFolderName,
|
|
115
115
|
});
|
|
116
|
-
const
|
|
117
|
-
iReckon(lc, Boolean(
|
|
118
|
-
iReckon(lc,
|
|
116
|
+
const e2eGalaxyAdd = await getB2tFSGalaxyIbGib({ space: e2eSpaceAdd, metaspace: e2eMetaspaceAdd });
|
|
117
|
+
iReckon(lc, Boolean(e2eGalaxyAdd?.data?.staged_item && e2eGalaxyAdd.data.staged_item.length >= 2)).isGonnaBeTrue();
|
|
118
|
+
iReckon(lc, e2eGalaxyAdd?.rel8ns?.staged_item).isGonnaBeFalsy();
|
|
119
119
|
|
|
120
120
|
const status2 = await executeStatusCmd({
|
|
121
121
|
targetDir: testDir,
|
|
@@ -136,9 +136,9 @@ await respecfully(lc, `Full E2E CLI Integration Spec`, async () => {
|
|
|
136
136
|
repoPath: testDir,
|
|
137
137
|
vcsFolderName,
|
|
138
138
|
});
|
|
139
|
-
const
|
|
140
|
-
iReckon(lc,
|
|
141
|
-
iReckon(lc,
|
|
139
|
+
const e2eGalaxyCommit = await getB2tFSGalaxyIbGib({ space: e2eSpaceCommit, metaspace: e2eMetaspaceCommit });
|
|
140
|
+
iReckon(lc, e2eGalaxyCommit?.data?.staged_item).willEqual([]);
|
|
141
|
+
iReckon(lc, e2eGalaxyCommit?.rel8ns?.staged_item).isGonnaBeFalsy();
|
|
142
142
|
|
|
143
143
|
iReckon(lc, Boolean(commitRes.commitAddr)).isGonnaBeTrue();
|
|
144
144
|
iReckon(lc, Boolean(commitRes.commentAddr)).isGonnaBeTrue();
|
|
@@ -36,7 +36,7 @@ export async function executeAddCmd({
|
|
|
36
36
|
}: AddCmdOpts = {}): Promise<AddCmdResult> {
|
|
37
37
|
const lc = `${lcFile}[${executeAddCmd.name}]`;
|
|
38
38
|
try {
|
|
39
|
-
if (logalot) { console.log(`${lc} starting... (I:
|
|
39
|
+
if (logalot) { console.log(`${lc} starting... (I: 1720d235dcd8c4873843fafc922f3126)`); }
|
|
40
40
|
|
|
41
41
|
const absTargetDir = path.resolve(targetDir);
|
|
42
42
|
const { repo } = await openVcsRepository({ targetDir: absTargetDir, vcsFolderName });
|
|
@@ -57,9 +57,9 @@ export async function executeAddCmd({
|
|
|
57
57
|
stagedCount: addRes.stagedCount,
|
|
58
58
|
};
|
|
59
59
|
} catch (error) {
|
|
60
|
-
console.error(`${lc} ${extractErrorMsg(error)} (E:
|
|
60
|
+
console.error(`${lc} ${extractErrorMsg(error)} (E: 25551515dd5889fac898b8f87e834826)`);
|
|
61
61
|
throw error;
|
|
62
62
|
} finally {
|
|
63
|
-
if (logalot) { console.log(`${lc} complete. (I:
|
|
63
|
+
if (logalot) { console.log(`${lc} complete. (I: 79bc2688bc087dad878f4528eba18826)`); }
|
|
64
64
|
}
|
|
65
65
|
}
|
|
@@ -44,7 +44,7 @@ export async function executeBranchCmd({
|
|
|
44
44
|
}: BranchCmdOpts = {}): Promise<BranchCmdResult> {
|
|
45
45
|
const lc = `${lcFile}[${executeBranchCmd.name}]`;
|
|
46
46
|
try {
|
|
47
|
-
if (logalot) { console.log(`${lc} starting... (I:
|
|
47
|
+
if (logalot) { console.log(`${lc} starting... (I: bc1cd7cf5a79327a6807d81812f2d326)`); }
|
|
48
48
|
|
|
49
49
|
const absTargetDir = path.resolve(targetDir);
|
|
50
50
|
const { repo, } = await openVcsRepository({ targetDir: absTargetDir, vcsFolderName });
|
|
@@ -79,9 +79,9 @@ export async function executeBranchCmd({
|
|
|
79
79
|
createdBranchAddr: branchRes.createdBranchAddr,
|
|
80
80
|
};
|
|
81
81
|
} catch (error) {
|
|
82
|
-
console.error(`${lc} ${extractErrorMsg(error)} (E:
|
|
82
|
+
console.error(`${lc} ${extractErrorMsg(error)} (E: f2ff7c0bb2a81b21aefbbb7726b2bb26)`);
|
|
83
83
|
throw error;
|
|
84
84
|
} finally {
|
|
85
|
-
if (logalot) { console.log(`${lc} complete. (I:
|
|
85
|
+
if (logalot) { console.log(`${lc} complete. (I: 3f86a81c5ea8c945f364be484c533826)`); }
|
|
86
86
|
}
|
|
87
87
|
}
|
|
@@ -43,7 +43,7 @@ export async function executeCommitCmd({
|
|
|
43
43
|
}: CommitCmdOpts = {}): Promise<CommitCmdResult> {
|
|
44
44
|
const lc = `${lcFile}[${executeCommitCmd.name}]`;
|
|
45
45
|
try {
|
|
46
|
-
if (logalot) { console.log(`${lc} starting... (I:
|
|
46
|
+
if (logalot) { console.log(`${lc} starting... (I: 7ff973ef1a14aaa2feee7f9b69f12826)`); }
|
|
47
47
|
|
|
48
48
|
const absTargetDir = path.resolve(targetDir);
|
|
49
49
|
const { repo } = await openVcsRepository({ targetDir: absTargetDir, vcsFolderName });
|
|
@@ -75,6 +75,6 @@ export async function executeCommitCmd({
|
|
|
75
75
|
console.error(`${lc} ${extractErrorMsg(error)} (E: 4c453a4e7648a5f6058edf489254c826)`);
|
|
76
76
|
throw error;
|
|
77
77
|
} finally {
|
|
78
|
-
if (logalot) { console.log(`${lc} complete. (I:
|
|
78
|
+
if (logalot) { console.log(`${lc} complete. (I: c935a86ff47fd9f43e11c5688942ba26)`); }
|
|
79
79
|
}
|
|
80
80
|
}
|
|
@@ -11,7 +11,7 @@ import fs from 'node:fs/promises';
|
|
|
11
11
|
import { extractErrorMsg } from '@ibgib/helper-gib/dist/helpers/utils-helper.mjs';
|
|
12
12
|
import { VcsRepository } from '@ibgib/core-gib/dist/vcs/vcs-repository.mjs';
|
|
13
13
|
import { B2TFS_BRANCH_DEFAULT_NAME } from '@ibgib/core-gib/dist/vcs/branch/branch-constants.mjs';
|
|
14
|
-
import {
|
|
14
|
+
import { getB2tFSGalaxyIbGib } from '@ibgib/core-gib/dist/vcs/galaxy/galaxy-helper.mjs';
|
|
15
15
|
|
|
16
16
|
import { GLOBAL_LOG_A_LOT } from '../../vcs-gib-constants.mjs';
|
|
17
17
|
import { bootstrapVcsMetaspace } from '../../bootstrap/node-bootstrap.mjs';
|
|
@@ -53,15 +53,15 @@ export async function executeInitCmd({
|
|
|
53
53
|
});
|
|
54
54
|
|
|
55
55
|
if (foundVcsPath) {
|
|
56
|
-
const
|
|
57
|
-
if (
|
|
56
|
+
const existingGalaxyIbGib = await getB2tFSGalaxyIbGib({ space: localSpace, metaspace });
|
|
57
|
+
if (existingGalaxyIbGib) {
|
|
58
58
|
if (!quiet) {
|
|
59
|
-
console.log(`Reinitialized existing ibgib repository in ${vcsPath}`);
|
|
59
|
+
console.log(`Reinitialized existing ibgib repository in ${vcsPath} (I: 7c6058dcc958eb2ff8d984b317346826)`);
|
|
60
60
|
}
|
|
61
61
|
return {
|
|
62
62
|
vcsPath,
|
|
63
|
-
spaceId:
|
|
64
|
-
branchName:
|
|
63
|
+
spaceId: existingGalaxyIbGib.data.activeSpaceId,
|
|
64
|
+
branchName: existingGalaxyIbGib.data.activeBranchName || defaultBranchName,
|
|
65
65
|
rootItemIb: '',
|
|
66
66
|
};
|
|
67
67
|
}
|
|
@@ -6,10 +6,8 @@
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
import path from 'node:path';
|
|
9
|
-
import fs from 'node:fs/promises';
|
|
10
9
|
|
|
11
10
|
import { extractErrorMsg } from '@ibgib/helper-gib/dist/helpers/utils-helper.mjs';
|
|
12
|
-
import { getAllBranchInfosFromIndex } from '@ibgib/core-gib/dist/vcs/branch/branch-helper.mjs';
|
|
13
11
|
|
|
14
12
|
import { GLOBAL_LOG_A_LOT } from '../../vcs-gib-constants.mjs';
|
|
15
13
|
import { openVcsRepository } from '../vcs-repo-helper.mjs';
|
|
@@ -61,30 +59,11 @@ export async function executeLogCmd({
|
|
|
61
59
|
|
|
62
60
|
const absTargetDir = path.resolve(targetDir);
|
|
63
61
|
const { repo } = await openVcsRepository({ targetDir: absTargetDir, vcsFolderName });
|
|
64
|
-
const
|
|
65
|
-
|
|
66
|
-
// let resolvedBranchName = branchName;
|
|
67
|
-
// let resolvedFilePath = filePath;
|
|
68
|
-
|
|
69
|
-
// if (!resolvedBranchName && resolvedFilePath) {
|
|
70
|
-
// const branchInfos = await getAllBranchInfosFromIndex({ indexIbGib });
|
|
71
|
-
// if (branchInfos.some(b => b.branchName === resolvedFilePath)) {
|
|
72
|
-
// resolvedBranchName = resolvedFilePath;
|
|
73
|
-
// resolvedFilePath = undefined;
|
|
74
|
-
// }
|
|
75
|
-
// }
|
|
76
|
-
|
|
77
|
-
// const activeBranchSpace = await repo.getActiveBranchSpace({
|
|
78
|
-
// indexIbGib,
|
|
79
|
-
// targetDir: absTargetDir,
|
|
80
|
-
// branchName: resolvedBranchName,
|
|
81
|
-
// });
|
|
62
|
+
const galaxyIbGib = await repo.getGalaxyIbGib();
|
|
82
63
|
|
|
83
64
|
const logRes = await repo.log({
|
|
84
|
-
|
|
85
|
-
// branchName: resolvedBranchName,
|
|
65
|
+
galaxyIbGib,
|
|
86
66
|
branchName,
|
|
87
|
-
// filePath: resolvedFilePath,
|
|
88
67
|
filePath,
|
|
89
68
|
allComments,
|
|
90
69
|
targetDir: absTargetDir,
|
|
@@ -54,15 +54,15 @@ export async function executeMergeCmd({
|
|
|
54
54
|
const { repo, vcsPath, activeWorktreeDir } =
|
|
55
55
|
await openVcsRepository({ targetDir: absTargetDir, vcsFolderName });
|
|
56
56
|
|
|
57
|
-
const
|
|
58
|
-
const baseBranchName = await repo.getActiveBranchName({
|
|
57
|
+
const galaxyIbGib = await repo.getGalaxyIbGib();
|
|
58
|
+
const baseBranchName = await repo.getActiveBranchName({ galaxyIbGib, targetDir: absTargetDir });
|
|
59
59
|
|
|
60
60
|
const incomingSpaceRes = await getOrCreateBranchSpace({
|
|
61
61
|
metaspace: repo.metaspace,
|
|
62
62
|
branchName: trimmedIncomingBranchName,
|
|
63
63
|
});
|
|
64
64
|
|
|
65
|
-
const activeBranchSpace = await repo.getActiveBranchSpace({
|
|
65
|
+
const activeBranchSpace = await repo.getActiveBranchSpace({ galaxyIbGib, targetDir: absTargetDir });
|
|
66
66
|
const activeBranchSpaceId = getSpaceIdFromIb(activeBranchSpace.ib);
|
|
67
67
|
|
|
68
68
|
const mergeRes = await repo.merge({
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @module reset-cmd
|
|
3
3
|
*
|
|
4
4
|
* CLI command handler for `vcs reset [path...]`.
|
|
5
|
-
* Unstages specified files (or all files) from active branch
|
|
5
|
+
* Unstages specified files (or all files) from active branch galaxy in localSpace.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
import path from 'node:path';
|
|
@@ -43,30 +43,30 @@ export async function executeResetCmd({
|
|
|
43
43
|
const lc = `${lcFile}[${executeResetCmd.name}]`;
|
|
44
44
|
try {
|
|
45
45
|
if (logalot) {
|
|
46
|
-
console.log(`${lc} starting... (I:
|
|
46
|
+
console.log(`${lc} starting... (I: 1cd248c3453365b299a5de8aaa83cd26)`);
|
|
47
47
|
}
|
|
48
48
|
|
|
49
49
|
const absTargetDir = path.resolve(targetDir);
|
|
50
50
|
const { repo, activeWorktreeDir } = await openVcsRepository({ targetDir: absTargetDir, vcsFolderName });
|
|
51
51
|
|
|
52
|
-
const
|
|
53
|
-
const activeBranchSpace = await repo.getActiveBranchSpace(
|
|
52
|
+
const galaxyIbGib = await repo.getGalaxyIbGib();
|
|
53
|
+
const activeBranchSpace = await repo.getActiveBranchSpace(galaxyIbGib);
|
|
54
54
|
|
|
55
55
|
const skipPrompt = yes || force || quiet || !process.stdin.isTTY;
|
|
56
56
|
if (!skipPrompt) {
|
|
57
|
-
const confirmed = await promptForConfirm({ msg: 'Unstage specified files from
|
|
57
|
+
const confirmed = await promptForConfirm({ msg: 'Unstage specified files from galaxy?' });
|
|
58
58
|
if (!confirmed) {
|
|
59
59
|
if (!quiet) {
|
|
60
60
|
console.log('Operation cancelled.');
|
|
61
61
|
}
|
|
62
|
-
const stagedCount = Object.keys(
|
|
62
|
+
const stagedCount = Object.keys(galaxyIbGib.data.stagedPaths || {}).length;
|
|
63
63
|
return { unstagedPaths: [], stagedCount };
|
|
64
64
|
}
|
|
65
65
|
}
|
|
66
66
|
|
|
67
67
|
const resetRes = await repo.reset({
|
|
68
68
|
activeBranchSpace,
|
|
69
|
-
|
|
69
|
+
galaxyIbGib,
|
|
70
70
|
paths,
|
|
71
71
|
all,
|
|
72
72
|
targetDir: absTargetDir,
|
|
@@ -84,11 +84,11 @@ export async function executeResetCmd({
|
|
|
84
84
|
stagedCount: resetRes.stagedCount,
|
|
85
85
|
};
|
|
86
86
|
} catch (error) {
|
|
87
|
-
console.error(`${lc} ${extractErrorMsg(error)} (E:
|
|
87
|
+
console.error(`${lc} ${extractErrorMsg(error)} (E: baac0f845bb883f4555f2d482cfca826)`);
|
|
88
88
|
throw error;
|
|
89
89
|
} finally {
|
|
90
90
|
if (logalot) {
|
|
91
|
-
console.log(`${lc} complete. (I:
|
|
91
|
+
console.log(`${lc} complete. (I: 6a21182695fd4b5e08ae518119929826)`);
|
|
92
92
|
}
|
|
93
93
|
}
|
|
94
94
|
}
|
|
@@ -46,7 +46,7 @@ export async function executeRestoreCmd({
|
|
|
46
46
|
const lc = `${lcFile}[${executeRestoreCmd.name}]`;
|
|
47
47
|
try {
|
|
48
48
|
if (logalot) {
|
|
49
|
-
console.log(`${lc} starting... (I:
|
|
49
|
+
console.log(`${lc} starting... (I: f2ec77129a713122ed9ee0ff8246d826)`);
|
|
50
50
|
}
|
|
51
51
|
|
|
52
52
|
const absTargetDir = path.resolve(targetDir);
|
|
@@ -77,11 +77,11 @@ export async function executeRestoreCmd({
|
|
|
77
77
|
unstagedPaths: restoreRes.unstagedPaths,
|
|
78
78
|
};
|
|
79
79
|
} catch (error) {
|
|
80
|
-
console.error(`${lc} ${extractErrorMsg(error)} (E:
|
|
80
|
+
console.error(`${lc} ${extractErrorMsg(error)} (E: 0b423fc29e538c25988e9ac8f3674726)`);
|
|
81
81
|
throw error;
|
|
82
82
|
} finally {
|
|
83
83
|
if (logalot) {
|
|
84
|
-
console.log(`${lc} complete. (I:
|
|
84
|
+
console.log(`${lc} complete. (I: ba5d22e40298355f44077da8823da826)`);
|
|
85
85
|
}
|
|
86
86
|
}
|
|
87
87
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @module status-cmd
|
|
3
3
|
*
|
|
4
4
|
* CLI command handler for `vcs status`.
|
|
5
|
-
* Compares physical workspace state against active branch snapshot tip and in-band
|
|
5
|
+
* Compares physical workspace state against active branch snapshot tip and in-band galaxy staging area.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
import path from 'node:path';
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
import { extractErrorMsg, pretty } from '@ibgib/helper-gib/dist/helpers/utils-helper.mjs';
|
|
15
15
|
import { getDependencyGraph } from '@ibgib/core-gib/dist/common/other/graph-helper.mjs';
|
|
16
16
|
import { getLatestAddrs } from '@ibgib/core-gib/dist/witness/space/space-helper.mjs';
|
|
17
|
-
import {
|
|
17
|
+
import { getB2tFSGalaxyIbGib, } from '@ibgib/core-gib/dist/vcs/galaxy/galaxy-helper.mjs';
|
|
18
18
|
import { getOrCreateBranchSpace, parseBranchIb } from '@ibgib/core-gib/dist/vcs/branch/branch-helper.mjs';
|
|
19
19
|
import { B2tFSBranchIbGib_V1 } from '@ibgib/core-gib/dist/vcs/branch/branch-types.mjs';
|
|
20
20
|
import { B2tFSItemIbGib_V1 } from '@ibgib/core-gib/dist/vcs/item/item-types.mjs';
|
|
@@ -123,9 +123,9 @@ await respecfully(lc, `vcs commit and vcs log Command Handlers`, async () => {
|
|
|
123
123
|
repoPath: testDir,
|
|
124
124
|
vcsFolderName,
|
|
125
125
|
});
|
|
126
|
-
const
|
|
127
|
-
iReckon(lc, Boolean(
|
|
128
|
-
iReckon(lc,
|
|
126
|
+
const galaxyAdd = await getB2tFSGalaxyIbGib({ space: spaceAdd, metaspace: metaspaceAdd });
|
|
127
|
+
iReckon(lc, Boolean(galaxyAdd?.data?.staged_item && galaxyAdd.data.staged_item.length > 0)).isGonnaBeTrue();
|
|
128
|
+
iReckon(lc, galaxyAdd?.rel8ns?.staged_item).isGonnaBeFalsy();
|
|
129
129
|
|
|
130
130
|
const commitRes = await executeCommitCmd({
|
|
131
131
|
message: 'Initial repository commit',
|
|
@@ -138,9 +138,9 @@ await respecfully(lc, `vcs commit and vcs log Command Handlers`, async () => {
|
|
|
138
138
|
repoPath: testDir,
|
|
139
139
|
vcsFolderName,
|
|
140
140
|
});
|
|
141
|
-
const
|
|
142
|
-
iReckon(lc,
|
|
143
|
-
iReckon(lc,
|
|
141
|
+
const galaxyCommit = await getB2tFSGalaxyIbGib({ space: spaceCommit, metaspace: metaspaceCommit });
|
|
142
|
+
iReckon(lc, galaxyCommit?.data?.staged_item).willEqual([]);
|
|
143
|
+
iReckon(lc, galaxyCommit?.rel8ns?.staged_item).isGonnaBeFalsy();
|
|
144
144
|
|
|
145
145
|
iReckon(lc, commitRes.branchName).willEqual('main');
|
|
146
146
|
iReckon(lc, commitRes.committedPaths).includes('hello.txt');
|
|
@@ -466,11 +466,11 @@ await respecfully(lc, `vcs commit and vcs log Command Handlers`, async () => {
|
|
|
466
466
|
metaspace,
|
|
467
467
|
branchName: 'main',
|
|
468
468
|
});
|
|
469
|
-
const
|
|
470
|
-
if (!
|
|
471
|
-
const branchAddrs_spacequalified =
|
|
469
|
+
const galaxyIbGib = await getB2tFSGalaxyIbGib({ space: localSpace, metaspace });
|
|
470
|
+
if (!galaxyIbGib) { throw new Error(`(UNEXPECTED) galaxyIbGib falsy? (E: d4ec1b6f86cbf18808fba957b7b83826)`); }
|
|
471
|
+
const branchAddrs_spacequalified = galaxyIbGib.data['$@branch'] ?? [];
|
|
472
472
|
if (branchAddrs_spacequalified.length === 0) {
|
|
473
|
-
throw new Error(`(UNEXPECTED)
|
|
473
|
+
throw new Error(`(UNEXPECTED) galaxyIbGib doesn't have any branch addrs in data? (E: 7069280124b81c6d1806fc580c704826)`);
|
|
474
474
|
}
|
|
475
475
|
const branchAddrs_spacequalified_main = branchAddrs_spacequalified
|
|
476
476
|
.filter(x => {
|
|
@@ -18,7 +18,7 @@ const lc = `[apps/vcs-gib/src/cli/commands/init-cmd.respec.mts]`;
|
|
|
18
18
|
|
|
19
19
|
await respecfully(lc, `vcs init Command Handler`, async () => {
|
|
20
20
|
|
|
21
|
-
await ifWe(lc, `initializes repository space, branch, and
|
|
21
|
+
await ifWe(lc, `initializes repository space, branch, and galaxy in target folder`, async () => {
|
|
22
22
|
const testDir = path.join(process.cwd(), '.test_init_repo');
|
|
23
23
|
const vcsFolderName = '.vcsgib_init_test';
|
|
24
24
|
try {
|
|
@@ -22,7 +22,7 @@ const lc = `[apps/vcs-gib/src/cli/commands/reset-restore-cmd.respec.mts]`;
|
|
|
22
22
|
|
|
23
23
|
await respecfully(lc, `vcs reset and vcs restore Command Handlers`, async () => {
|
|
24
24
|
|
|
25
|
-
await ifWe(lc, `vcs reset clears staged file from
|
|
25
|
+
await ifWe(lc, `vcs reset clears staged file from galaxy while keeping disk file edits intact`, async () => {
|
|
26
26
|
const testDir = path.join(process.cwd(), '.test_reset_1');
|
|
27
27
|
const vcsFolderName = '.vcsgib_test_reset_1';
|
|
28
28
|
try {
|
|
@@ -79,7 +79,7 @@ await respecfully(lc, `vcs reset and vcs restore Command Handlers`, async () =>
|
|
|
79
79
|
}
|
|
80
80
|
});
|
|
81
81
|
|
|
82
|
-
await ifWe(lc, `vcs restore --staged unstages file from
|
|
82
|
+
await ifWe(lc, `vcs restore --staged unstages file from galaxy while keeping disk edits intact`, async () => {
|
|
83
83
|
const testDir = path.join(process.cwd(), '.test_restore_staged');
|
|
84
84
|
const vcsFolderName = '.vcsgib_test_restore_staged';
|
|
85
85
|
try {
|
|
@@ -172,7 +172,7 @@ await respecfully(lc, `vcs reset and vcs restore Command Handlers`, async () =>
|
|
|
172
172
|
}
|
|
173
173
|
});
|
|
174
174
|
|
|
175
|
-
await ifWe(lc, `vcs reset --all unstages all files from
|
|
175
|
+
await ifWe(lc, `vcs reset --all unstages all files from galaxy`, async () => {
|
|
176
176
|
const testDir = path.join(process.cwd(), '.test_reset_all');
|
|
177
177
|
const vcsFolderName = '.vcsgib_test_reset_all';
|
|
178
178
|
try {
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
} from '@ibgib/helper-gib/dist/respec-gib/respec-gib.mjs';
|
|
13
13
|
|
|
14
14
|
import { extractErrorMsg } from '@ibgib/helper-gib/dist/helpers/utils-helper.mjs';
|
|
15
|
-
import {
|
|
15
|
+
import { getB2tFSGalaxyIbGib } from '@ibgib/core-gib/dist/vcs/galaxy/galaxy-helper.mjs';
|
|
16
16
|
|
|
17
17
|
import { executeInitCmd } from './cli-init-cmd.mjs';
|
|
18
18
|
import { executeStatusCmd } from './cli-status-cmd.mjs';
|
|
@@ -144,9 +144,9 @@ await respecfully(lc, `vcs status and vcs add Command Handlers`, async () => {
|
|
|
144
144
|
repoPath: testDir,
|
|
145
145
|
vcsFolderName,
|
|
146
146
|
});
|
|
147
|
-
const
|
|
148
|
-
iReckon(lc, Boolean(
|
|
149
|
-
iReckon(lc,
|
|
147
|
+
const galaxyIbGib = await getB2tFSGalaxyIbGib({ space: localSpace, metaspace });
|
|
148
|
+
iReckon(lc, Boolean(galaxyIbGib?.data?.staged_item && galaxyIbGib.data.staged_item.length > 0)).isGonnaBeTrue();
|
|
149
|
+
iReckon(lc, galaxyIbGib?.rel8ns?.staged_item).isGonnaBeFalsy();
|
|
150
150
|
|
|
151
151
|
const statusRes = await executeStatusCmd({
|
|
152
152
|
targetDir: testDir,
|