@ibgib/vcs-gib 0.0.47 → 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.
Files changed (70) hide show
  1. package/README.md +1 -1
  2. package/VCS_CLI_USER_GUIDE.md +12 -7
  3. package/dist/AUTO-GENERATED-version.d.mts +1 -1
  4. package/dist/AUTO-GENERATED-version.mjs +1 -1
  5. package/dist/bootstrap/node-bootstrap.mjs +6 -6
  6. package/dist/bootstrap/node-bootstrap.mjs.map +1 -1
  7. package/dist/cli/cli-arg-parser.d.mts +2 -0
  8. package/dist/cli/cli-arg-parser.d.mts.map +1 -1
  9. package/dist/cli/cli-arg-parser.mjs +12 -1
  10. package/dist/cli/cli-arg-parser.mjs.map +1 -1
  11. package/dist/cli/cli-constants.d.mts +2 -0
  12. package/dist/cli/cli-constants.d.mts.map +1 -1
  13. package/dist/cli/cli-constants.mjs +15 -1
  14. package/dist/cli/cli-constants.mjs.map +1 -1
  15. package/dist/cli/commands/cli-add-cmd.mjs +3 -3
  16. package/dist/cli/commands/cli-add-cmd.mjs.map +1 -1
  17. package/dist/cli/commands/cli-branch-cmd.mjs +3 -3
  18. package/dist/cli/commands/cli-branch-cmd.mjs.map +1 -1
  19. package/dist/cli/commands/cli-commit-cmd.d.mts +2 -1
  20. package/dist/cli/commands/cli-commit-cmd.d.mts.map +1 -1
  21. package/dist/cli/commands/cli-commit-cmd.mjs +4 -3
  22. package/dist/cli/commands/cli-commit-cmd.mjs.map +1 -1
  23. package/dist/cli/commands/cli-init-cmd.mjs +6 -6
  24. package/dist/cli/commands/cli-init-cmd.mjs.map +1 -1
  25. package/dist/cli/commands/cli-log-cmd.d.mts.map +1 -1
  26. package/dist/cli/commands/cli-log-cmd.mjs +2 -18
  27. package/dist/cli/commands/cli-log-cmd.mjs.map +1 -1
  28. package/dist/cli/commands/cli-merge-cmd.mjs +3 -3
  29. package/dist/cli/commands/cli-merge-cmd.mjs.map +1 -1
  30. package/dist/cli/commands/cli-reset-cmd.d.mts +1 -1
  31. package/dist/cli/commands/cli-reset-cmd.mjs +9 -9
  32. package/dist/cli/commands/cli-reset-cmd.mjs.map +1 -1
  33. package/dist/cli/commands/cli-restore-cmd.mjs +3 -3
  34. package/dist/cli/commands/cli-restore-cmd.mjs.map +1 -1
  35. package/dist/cli/commands/cli-status-cmd.d.mts +1 -1
  36. package/dist/cli/commands/cli-status-cmd.d.mts.map +1 -1
  37. package/dist/cli/commands/cli-status-cmd.mjs +5 -2
  38. package/dist/cli/commands/cli-status-cmd.mjs.map +1 -1
  39. package/dist/cli/vcs-cli-main.d.mts.map +1 -1
  40. package/dist/cli/vcs-cli-main.mjs +6 -5
  41. package/dist/cli/vcs-cli-main.mjs.map +1 -1
  42. package/dist/cli/vcs-repo-helper.d.mts.map +1 -1
  43. package/dist/cli/vcs-repo-helper.mjs +7 -7
  44. package/dist/cli/vcs-repo-helper.mjs.map +1 -1
  45. package/package.json +6 -6
  46. package/src/AUTO-GENERATED-version.mts +1 -1
  47. package/src/bootstrap/node-bootstrap.mts +6 -6
  48. package/src/cli/cli-arg-parser.mts +14 -0
  49. package/src/cli/cli-constants.mts +19 -2
  50. package/src/cli/cli-e2e.respec.mts +7 -7
  51. package/src/cli/commands/cli-add-cmd.mts +3 -3
  52. package/src/cli/commands/cli-branch-cmd.mts +3 -3
  53. package/src/cli/commands/cli-commit-cmd.mts +5 -2
  54. package/src/cli/commands/cli-init-cmd.mts +6 -6
  55. package/src/cli/commands/cli-log-cmd.mts +2 -23
  56. package/src/cli/commands/cli-merge-cmd.mts +3 -3
  57. package/src/cli/commands/cli-reset-cmd.mts +9 -9
  58. package/src/cli/commands/cli-restore-cmd.mts +3 -3
  59. package/src/cli/commands/cli-status-cmd.mts +5 -2
  60. package/src/cli/commands/commit-log-cmd.respec.mts +11 -11
  61. package/src/cli/commands/delete-files.respec.mts +366 -0
  62. package/src/cli/commands/init-cmd.respec.mts +1 -1
  63. package/src/cli/commands/reset-restore-cmd.respec.mts +3 -3
  64. package/src/cli/commands/status-add-cmd.respec.mts +4 -4
  65. package/src/cli/vcs-cli-main.mts +6 -5
  66. package/src/cli/vcs-repo-helper.mts +7 -8
  67. package/src/vcs-gib.respec.mts +9 -9
  68. package/tsconfig.test.tsbuildinfo +1 -1
  69. package/tsconfig.tsbuildinfo +1 -1
  70. package/vcs-gib_test_output.md +18 -18
@@ -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 index (-a, --all for all)
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 index (for restore)
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: genuuid)`);
79
+ console.log(`${lc} starting... (I: 600b85201b637bb3581aa4eff3c37826)`);
80
80
  }
81
81
 
82
82
  const parsed = parseVcsArgs(argv);
@@ -120,6 +120,7 @@ export async function main({
120
120
  case VCS_SUBCOMMANDS.COMMIT: {
121
121
  await executeCommitCmd({
122
122
  message: parsed.flags.message,
123
+ keepEmptyFolders: parsed.flags.keepEmptyFolders,
123
124
  });
124
125
  break;
125
126
  }
@@ -197,7 +198,7 @@ export async function main({
197
198
  const branchMatch = cleanMsg.match(/["']([^"']+)["']/);
198
199
  const name = branchMatch ? branchMatch[1] : '';
199
200
  console.error(name ? `fatal: a branch named '${name}' already exists.` : `fatal: ${cleanMsg}`);
200
- } else if (cleanMsg.toLowerCase().includes('not found in indexibgib') || cleanMsg.toLowerCase().includes('not found on branch')) {
201
+ } else if (cleanMsg.toLowerCase().includes('not found in galaxyIbgib') || cleanMsg.toLowerCase().includes('not found on branch')) {
201
202
  const branchMatch = cleanMsg.match(/\(([^)]+)\)/) || cleanMsg.match(/['"]([^'"]+)['"]/);
202
203
  const name = branchMatch ? branchMatch[1] : '';
203
204
  console.error(name ? `error: pathspec '${name}' did not match any file(s) known to ibgib` : `error: ${cleanMsg}`);
@@ -207,7 +208,7 @@ export async function main({
207
208
  return 1;
208
209
  } finally {
209
210
  if (logalot) {
210
- console.log(`${lc} complete. (I: genuuid)`);
211
+ console.log(`${lc} complete. (I: d68908b0f736b838ef4ac3b8d266d826)`);
211
212
  }
212
213
  }
213
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
10
  import { VcsRepository, WorkspaceProjectionSpaceFactory } from '@ibgib/core-gib/dist/vcs/vcs-repository.mjs';
12
11
  import { resolveContextualBranchName } from '@ibgib/core-gib/dist/vcs/branch/branch-helper.mjs';
13
- import { getB2tFSIndexIbGib } from '@ibgib/core-gib/dist/vcs/index/index-helper.mjs';
12
+ import { getB2tFSGalaxyIbGib } from '@ibgib/core-gib/dist/vcs/galaxy/galaxy-helper.mjs';
14
13
  import { getOrCreateBranchSpace } from '@ibgib/core-gib/dist/vcs/branch/branch-helper.mjs';
14
+ import { B2TFS_BRANCH_DEFAULT_NAME } from '@ibgib/core-gib/dist/vcs/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 index from localSpace
59
- const indexIbGib = await getB2tFSIndexIbGib({ space: localSpace, metaspace });
60
- if (!indexIbGib) {
61
- throw new Error(`fatal: not an ibgib repository (index not found in ${vcsPath})`);
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
- indexIbGib,
67
+ galaxyIbGib,
69
68
  });
70
69
 
71
70
  const activeWorktreeDir = activeBranchName === B2TFS_BRANCH_DEFAULT_NAME
@@ -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 index tracking.
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';
@@ -14,7 +14,7 @@ import { Factory_V1 } from '@ibgib/ts-gib/dist/V1/factory.mjs';
14
14
  import { getIbGibAddr } from '@ibgib/ts-gib/dist/helper.mjs';
15
15
  import { getB2tFSItemIb } from '@ibgib/core-gib/dist/vcs/item/item-atom-helper.mjs';
16
16
  import { createB2tFSBranchIbGib, getB2tFSBranchSpaceName } from '@ibgib/core-gib/dist/vcs/branch/branch-helper.mjs';
17
- import { createB2tFSIndexIbGib, } from '@ibgib/core-gib/dist/vcs/index/index-helper.mjs';
17
+ import { createB2tFSGalaxyIbGib, } from '@ibgib/core-gib/dist/vcs/galaxy/galaxy-helper.mjs';
18
18
  import { B2tFSItemIbGib_V1 } from '@ibgib/core-gib/dist/vcs/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';
@@ -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 & Index Tracking`, async () => {
47
- await ifWe(lc, `initializes metaspace, creates branch, and registers index`, async () => {
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 Index IbGib
90
- const indexIbGib = await createB2tFSIndexIbGib({
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, indexIbGib.data?.mySpaceId).willEqual(localSpaceId);
98
- iReckon(lc, indexIbGib.data?.staged_item).willEqual([]);
99
- iReckon(lc, indexIbGib.rel8ns?.staged_item).isGonnaBeFalsy();
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
  }