@ankhorage/devtools 2.3.8 → 2.3.10
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
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
# @ankhorage/devtools
|
|
5
5
|
|
|
6
|
-
         
|
|
7
7
|
|
|
8
8
|
Shared tooling, repository automation, and agent standards for Ankhorage TypeScript projects
|
|
9
9
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*** Materialize the trusted canonical capability surface for one package checkout. */
|
|
2
|
-
import { access } from 'node:fs/promises';
|
|
3
|
-
import { resolve } from 'node:path';
|
|
2
|
+
import { access, mkdtemp, rm } from 'node:fs/promises';
|
|
3
|
+
import { join, resolve } from 'node:path';
|
|
4
4
|
import { pathToFileURL } from 'node:url';
|
|
5
5
|
import { isCapability, normalizeCapability } from '@ankhorage/capability';
|
|
6
6
|
const CAPABILITIES_SOURCE_PATH = 'src/capabilities/index.ts';
|
|
@@ -21,7 +21,7 @@ export async function resolvePackageCapabilitiesAsync(targetDirectory, manifest)
|
|
|
21
21
|
if (!isRecord(manifest.ankh)) {
|
|
22
22
|
throw new Error(`${CAPABILITIES_SOURCE_PATH} requires package.json ankh discovery metadata for publication.`);
|
|
23
23
|
}
|
|
24
|
-
const source = await
|
|
24
|
+
const source = await loadCapabilityCatalogAsync(targetDirectory, sourcePath);
|
|
25
25
|
const catalog = isRecord(source) ? source.CAPABILITIES : undefined;
|
|
26
26
|
if (!Array.isArray(catalog)) {
|
|
27
27
|
throw new Error(`${CAPABILITIES_SOURCE_PATH} must export CAPABILITIES as an array.`);
|
|
@@ -35,6 +35,27 @@ export async function resolvePackageCapabilitiesAsync(targetDirectory, manifest)
|
|
|
35
35
|
assertUniqueCapabilityIds(capabilities);
|
|
36
36
|
return capabilities;
|
|
37
37
|
}
|
|
38
|
+
/*** Build and load the catalog's local TypeScript module closure through Bun resolution. */
|
|
39
|
+
async function loadCapabilityCatalogAsync(targetDirectory, sourcePath) {
|
|
40
|
+
const buildDirectory = await mkdtemp(join(targetDirectory, '.ankh-capability-catalog-'));
|
|
41
|
+
try {
|
|
42
|
+
const build = await Bun.build({
|
|
43
|
+
entrypoints: [sourcePath],
|
|
44
|
+
outdir: buildDirectory,
|
|
45
|
+
naming: 'catalog.[ext]',
|
|
46
|
+
format: 'esm',
|
|
47
|
+
sourcemap: 'none',
|
|
48
|
+
target: 'bun',
|
|
49
|
+
});
|
|
50
|
+
if (!build.success) {
|
|
51
|
+
throw new Error(`Unable to build ${CAPABILITIES_SOURCE_PATH} for materialization.`);
|
|
52
|
+
}
|
|
53
|
+
return await import(pathToFileURL(join(buildDirectory, 'catalog.js')).href);
|
|
54
|
+
}
|
|
55
|
+
finally {
|
|
56
|
+
await rm(buildDirectory, { force: true, recursive: true });
|
|
57
|
+
}
|
|
58
|
+
}
|
|
38
59
|
/*** Check whether a manifest declares published capability discovery metadata. */
|
|
39
60
|
function hasCapabilityMetadata(manifest) {
|
|
40
61
|
return isRecord(manifest.ankh) && Object.hasOwn(manifest.ankh, 'capabilities');
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ankhorage/devtools",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.10",
|
|
4
4
|
"description": "Shared tooling, repository automation, and agent standards for Ankhorage TypeScript projects",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://github.com/ankhorage/devtools#readme",
|
|
@@ -492,7 +492,7 @@
|
|
|
492
492
|
"dependencies": {
|
|
493
493
|
"@ankhorage/apm": "^0.8.14",
|
|
494
494
|
"@ankhorage/capability": "^0.2.1",
|
|
495
|
-
"@ankhorage/contracts": "^25.0.
|
|
495
|
+
"@ankhorage/contracts": "^25.0.1",
|
|
496
496
|
"@ankhorage/project-detector": "^0.3.4",
|
|
497
497
|
"@ankhorage/rules-repository": "^0.2.0",
|
|
498
498
|
"@ankhorage/utility": "^0.5.5",
|
|
@@ -510,18 +510,18 @@
|
|
|
510
510
|
"eslint-plugin-security": "^4.2.0",
|
|
511
511
|
"eslint-plugin-simple-import-sort": "^14.0.0",
|
|
512
512
|
"eslint-plugin-unused-imports": "^4.4.1",
|
|
513
|
-
"knip": "^6.
|
|
513
|
+
"knip": "^6.41.0",
|
|
514
514
|
"prettier": "^3.9.9",
|
|
515
515
|
"typescript": "~6.0.3",
|
|
516
516
|
"typescript-eslint": "^8.71.1"
|
|
517
517
|
},
|
|
518
518
|
"devDependencies": {
|
|
519
519
|
"@ankhorage/paradox": "^0.3.1",
|
|
520
|
-
"@ankhorage/ankh": "^0.
|
|
520
|
+
"@ankhorage/ankh": "^0.13.0",
|
|
521
521
|
"@ankhorage/doctor": "0.14.6",
|
|
522
522
|
"@techstark/opencv-js": "^5.0.0-release.1",
|
|
523
523
|
"@types/bun": "^1.4.2",
|
|
524
|
-
"@types/node": "^26.6.
|
|
524
|
+
"@types/node": "^26.6.5",
|
|
525
525
|
"sharp": "^0.35.5"
|
|
526
526
|
},
|
|
527
527
|
"packageManager": "bun@1.4.2"
|