@ibgib/vcs-gib 0.0.49 → 0.0.52
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 +7 -7
- 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 +8 -8
- 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 +4 -4
- 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 +2 -2
- package/dist/cli/commands/cli-status-cmd.d.mts.map +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 +1 -1
- package/dist/cli/vcs-repo-helper.d.mts.map +1 -1
- package/dist/cli/vcs-repo-helper.mjs +10 -10
- package/dist/cli/vcs-repo-helper.mjs.map +1 -1
- package/dist/test/test-helpers.d.mts +2 -2
- package/dist/test/test-helpers.d.mts.map +1 -1
- package/dist/test/test-helpers.mjs +1 -1
- package/dist/test/test-helpers.mjs.map +1 -1
- package/package.json +6 -6
- package/src/AUTO-GENERATED-version.mts +1 -1
- package/src/bootstrap/node-bootstrap.mts +7 -7
- 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 +8 -8
- package/src/cli/commands/cli-log-cmd.mts +2 -23
- package/src/cli/commands/cli-merge-cmd.mts +4 -4
- 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 +2 -2
- package/src/cli/commands/commit-log-cmd.respec.mts +14 -14
- 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 +10 -11
- package/src/engine/branch/branch-space.respec.mts +4 -4
- package/src/engine/merge/b2tfs-sync-comments.respec.mts +4 -4
- package/src/test/test-helpers.mts +2 -2
- package/src/vcs-gib.respec.mts +12 -12
- package/tsconfig.test.tsbuildinfo +1 -1
- package/tsconfig.tsbuildinfo +1 -1
- package/vcs-gib_test_output.md +18 -18
|
@@ -2,13 +2,13 @@
|
|
|
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';
|
|
9
9
|
|
|
10
10
|
import { extractErrorMsg } from '@ibgib/helper-gib/dist/helpers/utils-helper.mjs';
|
|
11
|
-
import { VcsStatusItem, PendingCommentInfo } from '@ibgib/core-gib/dist/
|
|
11
|
+
import { VcsStatusItem, PendingCommentInfo } from '@ibgib/core-gib/dist/cosmology/branching/status/status-types.mjs';
|
|
12
12
|
import { openVcsRepository } from '../vcs-repo-helper.mjs';
|
|
13
13
|
import { GLOBAL_LOG_A_LOT } from '../../vcs-gib-constants.mjs';
|
|
14
14
|
|
|
@@ -14,10 +14,10 @@ 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 {
|
|
18
|
-
import { getOrCreateBranchSpace, parseBranchIb } from '@ibgib/core-gib/dist/
|
|
19
|
-
import { B2tFSBranchIbGib_V1 } from '@ibgib/core-gib/dist/
|
|
20
|
-
import { B2tFSItemIbGib_V1 } from '@ibgib/core-gib/dist/
|
|
17
|
+
import { getB2tFSGalaxyIbGib, } from '@ibgib/core-gib/dist/cosmology/branching/repo/b2tfs-repo-helpers.mjs';
|
|
18
|
+
import { getOrCreateBranchSpace, parseBranchIb } from '@ibgib/core-gib/dist/cosmology/branching/branch/branch-helpers.mjs';
|
|
19
|
+
import { B2tFSBranchIbGib_V1 } from '@ibgib/core-gib/dist/cosmology/branching/branch/branch-types.mjs';
|
|
20
|
+
import { B2tFSItemIbGib_V1 } from '@ibgib/core-gib/dist/cosmology/branching/item/item-types.mjs';
|
|
21
21
|
import { getIbGibFromSpace, parseSpaceQualifiedIbGibAddr } from '@ibgib/core-gib/dist/common/other/ibgib-helper.mjs';
|
|
22
22
|
|
|
23
23
|
import { executeInitCmd } from './cli-init-cmd.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/cosmology/branching/repo/b2tfs-repo-helpers.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,
|
package/src/cli/vcs-cli-main.mts
CHANGED
|
@@ -48,7 +48,7 @@ Commands:
|
|
|
48
48
|
branch [name] List or create branches
|
|
49
49
|
checkout <branch> Switch to a specified branch and project worktree
|
|
50
50
|
merge <branch> Merge specified branch into active branch
|
|
51
|
-
reset [path...] Unstage specified files from
|
|
51
|
+
reset [path...] Unstage specified files from galaxy (-a, --all for all)
|
|
52
52
|
restore [path...] Restore working tree files or unstage (--staged)
|
|
53
53
|
|
|
54
54
|
Flags:
|
|
@@ -58,7 +58,7 @@ Flags:
|
|
|
58
58
|
-b <branch> Target branch name
|
|
59
59
|
-c, --comments Show full comment content in status
|
|
60
60
|
-a, --all Stage all tracked/untracked files (for add/reset)
|
|
61
|
-
-s, --staged Unstage specified files from
|
|
61
|
+
-s, --staged Unstage specified files from galaxy (for restore)
|
|
62
62
|
-w, --worktree Revert physical working tree files (for restore)
|
|
63
63
|
-y, --yes Automatically confirm interactive prompts
|
|
64
64
|
-f, --force Force operation execution
|
|
@@ -76,7 +76,7 @@ export async function main({
|
|
|
76
76
|
const lc = `${lcFile}[${main.name}]`;
|
|
77
77
|
try {
|
|
78
78
|
if (logalot) {
|
|
79
|
-
console.log(`${lc} starting... (I:
|
|
79
|
+
console.log(`${lc} starting... (I: 600b85201b637bb3581aa4eff3c37826)`);
|
|
80
80
|
}
|
|
81
81
|
|
|
82
82
|
const parsed = parseVcsArgs(argv);
|
|
@@ -198,7 +198,7 @@ export async function main({
|
|
|
198
198
|
const branchMatch = cleanMsg.match(/["']([^"']+)["']/);
|
|
199
199
|
const name = branchMatch ? branchMatch[1] : '';
|
|
200
200
|
console.error(name ? `fatal: a branch named '${name}' already exists.` : `fatal: ${cleanMsg}`);
|
|
201
|
-
} else if (cleanMsg.toLowerCase().includes('not found in
|
|
201
|
+
} else if (cleanMsg.toLowerCase().includes('not found in galaxyIbgib') || cleanMsg.toLowerCase().includes('not found on branch')) {
|
|
202
202
|
const branchMatch = cleanMsg.match(/\(([^)]+)\)/) || cleanMsg.match(/['"]([^'"]+)['"]/);
|
|
203
203
|
const name = branchMatch ? branchMatch[1] : '';
|
|
204
204
|
console.error(name ? `error: pathspec '${name}' did not match any file(s) known to ibgib` : `error: ${cleanMsg}`);
|
|
@@ -208,7 +208,7 @@ export async function main({
|
|
|
208
208
|
return 1;
|
|
209
209
|
} finally {
|
|
210
210
|
if (logalot) {
|
|
211
|
-
console.log(`${lc} complete. (I:
|
|
211
|
+
console.log(`${lc} complete. (I: d68908b0f736b838ef4ac3b8d266d826)`);
|
|
212
212
|
}
|
|
213
213
|
}
|
|
214
214
|
}
|
|
@@ -5,18 +5,17 @@
|
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
import path from 'node:path';
|
|
8
|
-
import fs from 'node:fs/promises';
|
|
9
8
|
|
|
10
9
|
import { extractErrorMsg } from '@ibgib/helper-gib/dist/helpers/utils-helper.mjs';
|
|
11
|
-
import { VcsRepository, WorkspaceProjectionSpaceFactory } from '@ibgib/core-gib/dist/
|
|
12
|
-
import { resolveContextualBranchName } from '@ibgib/core-gib/dist/
|
|
13
|
-
import {
|
|
14
|
-
import { getOrCreateBranchSpace } from '@ibgib/core-gib/dist/
|
|
10
|
+
import { VcsRepository, WorkspaceProjectionSpaceFactory } from '@ibgib/core-gib/dist/cosmology/branching/branching-facade.mjs';
|
|
11
|
+
import { resolveContextualBranchName } from '@ibgib/core-gib/dist/cosmology/branching/branch/branch-helpers.mjs';
|
|
12
|
+
import { getB2tFSGalaxyIbGib } from '@ibgib/core-gib/dist/cosmology/branching/repo/b2tfs-repo-helpers.mjs';
|
|
13
|
+
import { getOrCreateBranchSpace } from '@ibgib/core-gib/dist/cosmology/branching/branch/branch-helpers.mjs';
|
|
14
|
+
import { B2TFS_BRANCH_DEFAULT_NAME } from '@ibgib/core-gib/dist/cosmology/branching/branch/branch-constants.mjs';
|
|
15
15
|
import { getOrCreateWorkspaceProjectionSpace } from '@ibgib/node-gib/dist/vcs/workspace-space-helper.mjs';
|
|
16
16
|
|
|
17
17
|
import { GLOBAL_LOG_A_LOT } from '../vcs-gib-constants.mjs';
|
|
18
18
|
import { bootstrapVcsMetaspace } from '../bootstrap/node-bootstrap.mjs';
|
|
19
|
-
import { B2TFS_BRANCH_DEFAULT_NAME } from '@ibgib/core-gib/dist/vcs/branch/branch-constants.mjs';
|
|
20
19
|
|
|
21
20
|
const logalot = GLOBAL_LOG_A_LOT;
|
|
22
21
|
|
|
@@ -55,17 +54,17 @@ export async function openVcsRepository({
|
|
|
55
54
|
throw new Error(`fatal: not an ibgib repository (or any of the parent directories): ${vcsFolderName}`);
|
|
56
55
|
}
|
|
57
56
|
|
|
58
|
-
// 2. Fetch authoritative in-band
|
|
59
|
-
const
|
|
60
|
-
if (!
|
|
61
|
-
throw new Error(`fatal: not an ibgib repository (
|
|
57
|
+
// 2. Fetch authoritative in-band galaxy from localSpace
|
|
58
|
+
const galaxyIbGib = await getB2tFSGalaxyIbGib({ space: localSpace, metaspace });
|
|
59
|
+
if (!galaxyIbGib) {
|
|
60
|
+
throw new Error(`fatal: not an ibgib repository (galaxy not found in ${vcsPath}) (E: 615a88627ba8daf8cbb9684bbd8d3826)`);
|
|
62
61
|
}
|
|
63
62
|
|
|
64
63
|
// 3. Determine active branch and worktree directory
|
|
65
64
|
const activeBranchName = branchName || resolveContextualBranchName({
|
|
66
65
|
targetDir: absTargetDir,
|
|
67
66
|
repoRoot,
|
|
68
|
-
|
|
67
|
+
galaxyIbGib,
|
|
69
68
|
});
|
|
70
69
|
|
|
71
70
|
const activeWorktreeDir = activeBranchName === B2TFS_BRANCH_DEFAULT_NAME
|
|
@@ -14,10 +14,10 @@ import { ROOT } from '@ibgib/ts-gib/dist/V1/constants.mjs';
|
|
|
14
14
|
import { Factory_V1 } from '@ibgib/ts-gib/dist/V1/factory.mjs';
|
|
15
15
|
import { getIbGibAddr } from '@ibgib/ts-gib/dist/helper.mjs';
|
|
16
16
|
import { getFromSpace, persistTransformResult } from '@ibgib/core-gib/dist/witness/space/space-helper.mjs';
|
|
17
|
-
import { getB2tFSItemIb } from '@ibgib/core-gib/dist/
|
|
18
|
-
import { populateBranchSpaceFromGraph } from '@ibgib/core-gib/dist/
|
|
19
|
-
import { B2tFSItemIbGib_V1 } from '@ibgib/core-gib/dist/
|
|
20
|
-
import { getOrCreateBranchSpace } from '@ibgib/core-gib/dist/
|
|
17
|
+
import { getB2tFSItemIb } from '@ibgib/core-gib/dist/cosmology/branching/item/item-atom-helpers.mjs';
|
|
18
|
+
import { populateBranchSpaceFromGraph } from '@ibgib/core-gib/dist/cosmology/branching/branch/branch-graph-helpers.mjs';
|
|
19
|
+
import { B2tFSItemIbGib_V1 } from '@ibgib/core-gib/dist/cosmology/branching/item/item-types.mjs';
|
|
20
|
+
import { getOrCreateBranchSpace } from '@ibgib/core-gib/dist/cosmology/branching/branch/branch-helpers.mjs';
|
|
21
21
|
import { getSpaceQualifiedIbGibAddr, parseSpaceQualifiedIbGibAddr, isSpaceQualifiedAddr } from '@ibgib/core-gib/dist/common/other/ibgib-helper.mjs';
|
|
22
22
|
|
|
23
23
|
import { bootstrapVcsMetaspace } from '../../bootstrap/node-bootstrap.mjs';
|
|
@@ -25,10 +25,10 @@ import { createCommentIbGib } from '@ibgib/core-gib/dist/common/comment/comment-
|
|
|
25
25
|
import { getBinIb } from '@ibgib/core-gib/dist/common/other/ibgib-helper.mjs';
|
|
26
26
|
import { BinIbGib_V1 } from '@ibgib/core-gib/dist/common/bin/bin-types.mjs';
|
|
27
27
|
import { putInSpace, persistTransformResult, registerNewIbGib, getFromSpace, getLatestAddrs } from '@ibgib/core-gib/dist/witness/space/space-helper.mjs';
|
|
28
|
-
import { createB2tFSItemIbGib, evolveB2tFSItemIbGib } from '@ibgib/core-gib/dist/
|
|
29
|
-
import { B2tFSItemIbGib_V1, BINARY_REL8N_NAME } from '@ibgib/core-gib/dist/
|
|
30
|
-
import { B2tFS3WayGraftStrategy } from '@ibgib/core-gib/dist/
|
|
31
|
-
import { getOrCreateBranchSpace } from '@ibgib/core-gib/dist/
|
|
28
|
+
import { createB2tFSItemIbGib, evolveB2tFSItemIbGib } from '@ibgib/core-gib/dist/cosmology/branching/item/item-helpers.mjs';
|
|
29
|
+
import { B2tFSItemIbGib_V1, BINARY_REL8N_NAME } from '@ibgib/core-gib/dist/cosmology/branching/item/item-types.mjs';
|
|
30
|
+
import { B2tFS3WayGraftStrategy } from '@ibgib/core-gib/dist/cosmology/branching/merge/b2tfs-3way-graft-strategy.mjs';
|
|
31
|
+
import { getOrCreateBranchSpace } from '@ibgib/core-gib/dist/cosmology/branching/branch/branch-helpers.mjs';
|
|
32
32
|
|
|
33
33
|
import { bootstrapVcsMetaspace } from '../../bootstrap/node-bootstrap.mjs';
|
|
34
34
|
|
|
@@ -20,8 +20,8 @@ import { IbGibAddr } from '@ibgib/ts-gib/dist/types.mjs';
|
|
|
20
20
|
import { getLatestAddrs } from '@ibgib/core-gib/dist/witness/space/space-helper.mjs';
|
|
21
21
|
import { IbGibSpaceAny } from '@ibgib/core-gib/dist/witness/space/space-base-v1.mjs';
|
|
22
22
|
|
|
23
|
-
import { B2tFSBranchIbGib_V1 } from '@ibgib/core-gib/dist/
|
|
24
|
-
import { B2tFSItemIbGib_V1, B2TFS_CHILD_ITEM_REL8N_NAME } from '@ibgib/core-gib/dist/
|
|
23
|
+
import { B2tFSBranchIbGib_V1 } from '@ibgib/core-gib/dist/cosmology/branching/branch/branch-types.mjs';
|
|
24
|
+
import { B2tFSItemIbGib_V1, B2TFS_CHILD_ITEM_REL8N_NAME } from '@ibgib/core-gib/dist/cosmology/branching/item/item-types.mjs';
|
|
25
25
|
import { getIbGibFromSpace } from '@ibgib/core-gib/dist/common/other/ibgib-helper.mjs';
|
|
26
26
|
|
|
27
27
|
|
package/src/vcs-gib.respec.mts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @module vcs-gib.respec.node
|
|
3
3
|
*
|
|
4
4
|
* Full Engine Cycle Integration Tests for @ibgib/vcs-gib.
|
|
5
|
-
* Tests Metaspace bootstrap, canonical ib atoms, item creation, branch spaces, and
|
|
5
|
+
* Tests Metaspace bootstrap, canonical ib atoms, item creation, branch spaces, and galaxy tracking.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
import path from 'node:path';
|
|
@@ -12,10 +12,10 @@ import { respecfully, ifWe, iReckon } from '@ibgib/helper-gib/dist/respec-gib/re
|
|
|
12
12
|
import { ROOT } from '@ibgib/ts-gib/dist/V1/constants.mjs';
|
|
13
13
|
import { Factory_V1 } from '@ibgib/ts-gib/dist/V1/factory.mjs';
|
|
14
14
|
import { getIbGibAddr } from '@ibgib/ts-gib/dist/helper.mjs';
|
|
15
|
-
import { getB2tFSItemIb } from '@ibgib/core-gib/dist/
|
|
16
|
-
import { createB2tFSBranchIbGib, getB2tFSBranchSpaceName } from '@ibgib/core-gib/dist/
|
|
17
|
-
import {
|
|
18
|
-
import { B2tFSItemIbGib_V1 } from '@ibgib/core-gib/dist/
|
|
15
|
+
import { getB2tFSItemIb } from '@ibgib/core-gib/dist/cosmology/branching/item/item-atom-helpers.mjs';
|
|
16
|
+
import { createB2tFSBranchIbGib, getB2tFSBranchSpaceName } from '@ibgib/core-gib/dist/cosmology/branching/branch/branch-helpers.mjs';
|
|
17
|
+
import { createB2tFSGalaxyIbGib, } from '@ibgib/core-gib/dist/cosmology/branching/repo/b2tfs-repo-helpers.mjs';
|
|
18
|
+
import { B2tFSItemIbGib_V1 } from '@ibgib/core-gib/dist/cosmology/branching/item/item-types.mjs';
|
|
19
19
|
import { getSpaceQualifiedIbGibAddr, parseSpaceQualifiedIbGibAddr } from '@ibgib/core-gib/dist/common/other/ibgib-helper.mjs';
|
|
20
20
|
import { getSpaceIdFromIb } from '@ibgib/core-gib/dist/witness/space/metaspace/metaspace-innerspace/metaspace-innerspace-helper.mjs';
|
|
21
21
|
|
|
@@ -43,8 +43,8 @@ await respecfully(lc, `vcs-gib Full Engine Cycle`, async () => {
|
|
|
43
43
|
});
|
|
44
44
|
});
|
|
45
45
|
|
|
46
|
-
await respecfully(lc, `Branch Spaces &
|
|
47
|
-
await ifWe(lc, `initializes metaspace, creates branch, and registers
|
|
46
|
+
await respecfully(lc, `Branch Spaces & Galaxy Tracking`, async () => {
|
|
47
|
+
await ifWe(lc, `initializes metaspace, creates branch, and registers galaxy`, async () => {
|
|
48
48
|
const testDir = path.join(process.cwd(), '.test_cycle_repo');
|
|
49
49
|
try {
|
|
50
50
|
const { metaspace, localSpace } = await bootstrapVcsMetaspace({
|
|
@@ -86,17 +86,17 @@ await respecfully(lc, `vcs-gib Full Engine Cycle`, async () => {
|
|
|
86
86
|
spaceId: localSpaceId,
|
|
87
87
|
});
|
|
88
88
|
|
|
89
|
-
// Create
|
|
90
|
-
const
|
|
89
|
+
// Create Galaxy IbGib
|
|
90
|
+
const galaxyIbGib = await createB2tFSGalaxyIbGib({
|
|
91
91
|
activeSpaceId: localSpaceId,
|
|
92
92
|
space: localSpace,
|
|
93
93
|
activeBranchName: branchName,
|
|
94
94
|
sqBranchAddr,
|
|
95
95
|
metaspace,
|
|
96
96
|
});
|
|
97
|
-
iReckon(lc,
|
|
98
|
-
iReckon(lc,
|
|
99
|
-
iReckon(lc,
|
|
97
|
+
iReckon(lc, galaxyIbGib.data?.mySpaceId).willEqual(localSpaceId);
|
|
98
|
+
iReckon(lc, galaxyIbGib.data?.staged_item).willEqual([]);
|
|
99
|
+
iReckon(lc, galaxyIbGib.rel8ns?.staged_item).isGonnaBeFalsy();
|
|
100
100
|
} finally {
|
|
101
101
|
await fs.rm(testDir, { recursive: true, force: true });
|
|
102
102
|
}
|