amalgm 0.1.236 → 0.1.237

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "amalgm",
3
- "version": "0.1.236",
3
+ "version": "0.1.237",
4
4
  "description": "Amalgm local computer runtime: login, MCP, chat, events, previews, and tunnels.",
5
5
  "license": "UNLICENSED",
6
6
  "private": false,
@@ -389,6 +389,7 @@ test('an empty project folder hydrates from the winning card bundle without clon
389
389
  const source = sourceRepo.repo;
390
390
  fs.mkdirSync(path.join(source, '.amalgam', 'context'), { recursive: true });
391
391
  fs.writeFileSync(path.join(source, '.amalgam', 'context', 'notes.md'), 'committed note\n');
392
+ fs.symlinkSync('notes.md', path.join(source, '.amalgam', 'context', 'current.md'));
392
393
  await git(source, 'add', '.');
393
394
  await git(source, 'commit', '-m', 'track project memory');
394
395
  const oid = (await git(source, 'rev-parse', 'HEAD')).trim();
@@ -403,6 +404,7 @@ test('an empty project folder hydrates from the winning card bundle without clon
403
404
  const target = path.join(tempRoot, 'hydrate-target');
404
405
  fs.mkdirSync(path.join(target, '.amalgam', 'context'), { recursive: true });
405
406
  fs.writeFileSync(path.join(target, '.amalgam', 'context', 'notes.md'), 'local note\n');
407
+ fs.symlinkSync('notes.md', path.join(target, '.amalgam', 'context', 'current.md'));
406
408
  const winning = card('/remote', oid, 1);
407
409
  winning.repo.remote = 'https://example.com/org/repo';
408
410
  winning.objects = {
@@ -425,6 +427,7 @@ test('an empty project folder hydrates from the winning card bundle without clon
425
427
  assert.equal((await git(target, 'symbolic-ref', '--short', 'HEAD')).trim(), 'main');
426
428
  assert.equal(fs.readFileSync(path.join(target, 'a.txt'), 'utf8'), 'a0\n');
427
429
  assert.equal(fs.readFileSync(path.join(target, '.amalgam', 'context', 'notes.md'), 'utf8'), 'local note\n');
430
+ assert.equal(fs.readlinkSync(path.join(target, '.amalgam', 'context', 'current.md')), 'notes.md');
428
431
  assert.match(await git(target, 'status', '--porcelain=v1'), /\.amalgam\/context\/notes\.md/);
429
432
  });
430
433
 
@@ -158,7 +158,12 @@ function holdInitialFiles(worktreeRoot) {
158
158
 
159
159
  function restoreInitialFiles(worktreeRoot, holding) {
160
160
  if (!holding) return;
161
- fs.cpSync(holding, worktreeRoot, { recursive: true, force: true, dereference: false });
161
+ fs.cpSync(holding, worktreeRoot, {
162
+ recursive: true,
163
+ force: true,
164
+ dereference: false,
165
+ verbatimSymlinks: true,
166
+ });
162
167
  fs.rmSync(holding, { recursive: true, force: true });
163
168
  journal({ action: 'restore-initial-files', worktree: worktreeRoot, holding, ok: true });
164
169
  }