ucode-agent 1.45.0 → 1.47.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/README.md +6 -5
- package/package.json +4 -3
- package/src/core/history.js +6 -1
- package/src/core/loop.js +3005 -2885
- package/src/core/provider.js +931 -924
- package/src/core/relink.js +2 -1
- package/src/tools/blocks.js +2 -2
- package/src/tools/files.js +750 -743
- package/src/tools/rename.js +2 -2
- package/src/tools/scaffold.js +502 -502
- package/src/tools/shared.js +469 -389
- package/src/tools/shell.js +844 -818
- package/ucode.js +1 -1
package/src/core/relink.js
CHANGED
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
|
|
17
17
|
import { promises as fs } from 'node:fs';
|
|
18
18
|
import path from 'node:path';
|
|
19
|
+
import { writeTracked } from '../tools/shared.js';
|
|
19
20
|
|
|
20
21
|
/** Relative href/src only — absolute paths, URLs, data: and anchors are left alone. */
|
|
21
22
|
const ASSET_REF = /\b(href|src)=("|')(?!https?:|\/\/|\/|data:|#|mailto:|tel:)([^"']+)\2/g;
|
|
@@ -53,7 +54,7 @@ export async function unprefixOwnFolder(root, files) {
|
|
|
53
54
|
|
|
54
55
|
if (!hits) continue;
|
|
55
56
|
try {
|
|
56
|
-
await
|
|
57
|
+
await writeTracked(abs, next);
|
|
57
58
|
fixed.push(`${rel} (${hits})`);
|
|
58
59
|
} catch { /* unwritable: leave it, and say nothing that is not true */ }
|
|
59
60
|
}
|
package/src/tools/blocks.js
CHANGED
|
@@ -20,7 +20,7 @@ import { promises as fs } from 'node:fs';
|
|
|
20
20
|
import path from 'node:path';
|
|
21
21
|
import { fileURLToPath } from 'node:url';
|
|
22
22
|
import { ToolFailure } from '../core/failure.js';
|
|
23
|
-
import { resolveIn, guard, result } from './shared.js';
|
|
23
|
+
import { resolveIn, guard, result, writeTracked } from './shared.js';
|
|
24
24
|
|
|
25
25
|
const BLOCKS = path.join(path.dirname(fileURLToPath(import.meta.url)), '..', '..', 'templates', 'blocks');
|
|
26
26
|
|
|
@@ -193,7 +193,7 @@ export async function addBlock({ name, folder = '.' }) {
|
|
|
193
193
|
}
|
|
194
194
|
|
|
195
195
|
await fs.mkdir(path.dirname(dest), { recursive: true });
|
|
196
|
-
await
|
|
196
|
+
await writeTracked(dest, source);
|
|
197
197
|
|
|
198
198
|
const first = catalogue[wanted].exports.split(',')[0].trim();
|
|
199
199
|
return result(
|