@ankhorage/devtools 2.3.6 → 2.3.8
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/dist/cli/bin/apm-release.js +1 -1
- package/dist/cli/bin/structure.js +1 -1
- package/dist/cli/{runApmReleaseCommandAsync.js → commands/apm/runApmReleaseCommandAsync.js} +2 -2
- package/dist/cli/commands/apm/sync.d.ts +1 -1
- package/dist/cli/commands/apm/sync.js +1 -1
- package/dist/cli/commands/apm/validate.d.ts +1 -1
- package/dist/cli/commands/apm/validate.js +1 -1
- package/dist/cli/commands/structure/build.d.ts +1 -1
- package/dist/cli/commands/structure/build.js +1 -1
- package/dist/cli/commands/structure/check.d.ts +1 -1
- package/dist/cli/commands/structure/check.js +1 -1
- package/dist/cli/{runStructureGenerationCommandAsync.js → commands/structure/runStructureGenerationCommandAsync.js} +1 -1
- package/dist/cli/commands.d.ts +1 -1
- package/dist/cli/runProviderCommand.d.ts +1 -4
- package/dist/cli/runProviderCommand.js +1 -1
- package/dist/cli/runRepositoryCommand.d.ts +1 -7
- package/dist/tools/package/resolvePackageCapabilitiesAsync.d.ts +1 -1
- package/dist/tools/package/resolvePackageCapabilitiesAsync.js +1 -1
- package/dist/tools/workflows/files/release.yml +2 -2
- package/dist/types/provider-command.d.ts +12 -0
- package/dist/types/provider-command.js +1 -0
- package/package.json +4 -3
- /package/dist/cli/{runApmReleaseCommandAsync.d.ts → commands/apm/runApmReleaseCommandAsync.d.ts} +0 -0
- /package/dist/cli/{runStructureGenerationCommandAsync.d.ts → commands/structure/runStructureGenerationCommandAsync.d.ts} +0 -0
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,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { runApmReleaseCommandAsync } from '../runApmReleaseCommandAsync.js';
|
|
2
|
+
import { runApmReleaseCommandAsync } from '../commands/apm/runApmReleaseCommandAsync.js';
|
|
3
3
|
const [operation, ...argv] = process.argv.slice(2);
|
|
4
4
|
if (operation !== 'sync' && operation !== 'validate') {
|
|
5
5
|
console.error('Usage: ankhorage-apm-release <sync|validate> [directory] [--allow-owner-code] [--artifact path] [--expected-integrity value]');
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { runStructureGenerationCommandAsync } from '../runStructureGenerationCommandAsync.js';
|
|
2
|
+
import { runStructureGenerationCommandAsync } from '../commands/structure/runStructureGenerationCommandAsync.js';
|
|
3
3
|
const [operation, ...argv] = process.argv.slice(2);
|
|
4
4
|
if (operation !== 'build' && operation !== 'check') {
|
|
5
5
|
console.error('Usage: ankhorage-structure <build|check> [directory]');
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { resolve } from 'node:path';
|
|
2
|
-
import { synchronizeApmReleaseDescriptorAsync } from '
|
|
3
|
-
import { validatePackedApmReleaseAsync } from '
|
|
2
|
+
import { synchronizeApmReleaseDescriptorAsync } from '../../../features/apm-release-validation/composition/synchronizeApmReleaseDescriptorAsync.js';
|
|
3
|
+
import { validatePackedApmReleaseAsync } from '../../../features/apm-release-validation/composition/validatePackedApmReleaseAsync.js';
|
|
4
4
|
/*** Parse release CLI input and report the same structured validation result on every entrypoint. */
|
|
5
5
|
export async function runApmReleaseCommandAsync(operation, argv, context) {
|
|
6
6
|
try {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { DevtoolsProviderCommandContext } from '
|
|
1
|
+
import type { DevtoolsProviderCommandContext } from '../../../types/provider-command.js';
|
|
2
2
|
/*** Adapt the public APM release sync command to the shared release boundary. */
|
|
3
3
|
export declare function sync(argv: readonly string[], context: DevtoolsProviderCommandContext): Promise<{
|
|
4
4
|
readonly exitCode: number;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { runApmReleaseCommandAsync } from '
|
|
1
|
+
import { runApmReleaseCommandAsync } from './runApmReleaseCommandAsync.js';
|
|
2
2
|
/*** Adapt the public APM release sync command to the shared release boundary. */
|
|
3
3
|
export async function sync(argv, context) {
|
|
4
4
|
return runApmReleaseCommandAsync('sync', argv, context);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { DevtoolsProviderCommandContext } from '
|
|
1
|
+
import type { DevtoolsProviderCommandContext } from '../../../types/provider-command.js';
|
|
2
2
|
/*** Adapt the public APM release validate command to the shared release boundary. */
|
|
3
3
|
export declare function validate(argv: readonly string[], context: DevtoolsProviderCommandContext): Promise<{
|
|
4
4
|
readonly exitCode: number;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { runApmReleaseCommandAsync } from '
|
|
1
|
+
import { runApmReleaseCommandAsync } from './runApmReleaseCommandAsync.js';
|
|
2
2
|
/*** Adapt the public APM release validate command to the shared release boundary. */
|
|
3
3
|
export async function validate(argv, context) {
|
|
4
4
|
return runApmReleaseCommandAsync('validate', argv, context);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { DevtoolsProviderCommandContext } from '
|
|
1
|
+
import type { DevtoolsProviderCommandContext } from '../../../types/provider-command.js';
|
|
2
2
|
/*** Adapt the public structure build command to deterministic owner artifact generation. */
|
|
3
3
|
export declare function build(argv: readonly string[], context: DevtoolsProviderCommandContext): Promise<{
|
|
4
4
|
readonly exitCode: number;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { runStructureGenerationCommandAsync } from '
|
|
1
|
+
import { runStructureGenerationCommandAsync } from './runStructureGenerationCommandAsync.js';
|
|
2
2
|
/*** Adapt the public structure build command to deterministic owner artifact generation. */
|
|
3
3
|
export async function build(argv, context) {
|
|
4
4
|
return runStructureGenerationCommandAsync('build', argv, context);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { DevtoolsProviderCommandContext } from '
|
|
1
|
+
import type { DevtoolsProviderCommandContext } from '../../../types/provider-command.js';
|
|
2
2
|
/*** Adapt the public structure check command to deterministic owner artifact verification. */
|
|
3
3
|
export declare function check(argv: readonly string[], context: DevtoolsProviderCommandContext): Promise<{
|
|
4
4
|
readonly exitCode: number;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { runStructureGenerationCommandAsync } from '
|
|
1
|
+
import { runStructureGenerationCommandAsync } from './runStructureGenerationCommandAsync.js';
|
|
2
2
|
/*** Adapt the public structure check command to deterministic owner artifact verification. */
|
|
3
3
|
export async function check(argv, context) {
|
|
4
4
|
return runStructureGenerationCommandAsync('check', argv, context);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { resolve } from 'node:path';
|
|
2
|
-
import { synchronizeStructureArtifactForDirectoryAsync } from '
|
|
2
|
+
import { synchronizeStructureArtifactForDirectoryAsync } from '../../../features/structure-descriptor-generation/composition/synchronizeStructureArtifactForDirectoryAsync.js';
|
|
3
3
|
/*** Parse structure build/check CLI input and emit one machine-readable result. */
|
|
4
4
|
export async function runStructureGenerationCommandAsync(operation, argv, context) {
|
|
5
5
|
try {
|
package/dist/cli/commands.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Capability } from '@ankhorage/contracts/
|
|
1
|
+
import type { Capability } from '@ankhorage/contracts/capability';
|
|
2
2
|
export type DevtoolsToolName = 'changeset' | 'format' | 'knip' | 'lint';
|
|
3
3
|
type DevtoolsManagedScope = 'agents' | 'all' | 'eslint' | 'knip' | 'package' | 'prettier' | 'skills' | 'vscode' | 'workflows';
|
|
4
4
|
type DevtoolsManagedOperation = 'status' | 'sync';
|
|
@@ -1,8 +1,5 @@
|
|
|
1
|
+
import type { DevtoolsProviderCommandContext } from '../types/provider-command.js';
|
|
1
2
|
import type { DevtoolsCommandDefinition } from './commands.js';
|
|
2
|
-
import { type DevtoolsRepositoryCommandContext } from './runRepositoryCommand.js';
|
|
3
|
-
export interface DevtoolsProviderCommandContext extends DevtoolsRepositoryCommandContext {
|
|
4
|
-
readonly env: Readonly<Record<string, string | undefined>>;
|
|
5
|
-
}
|
|
6
3
|
export declare function runProviderCommand(command: DevtoolsCommandDefinition, argv: readonly string[], context: DevtoolsProviderCommandContext): Promise<{
|
|
7
4
|
readonly exitCode: number;
|
|
8
5
|
}>;
|
|
@@ -3,7 +3,7 @@ import { validate } from './commands/apm/validate.js';
|
|
|
3
3
|
import { build } from './commands/structure/build.js';
|
|
4
4
|
import { check } from './commands/structure/check.js';
|
|
5
5
|
import { runExternalTool } from './runExternalTool.js';
|
|
6
|
-
import { runRepositoryCommand
|
|
6
|
+
import { runRepositoryCommand } from './runRepositoryCommand.js';
|
|
7
7
|
export async function runProviderCommand(command, argv, context) {
|
|
8
8
|
if (command.kind === 'apm-release') {
|
|
9
9
|
return command.operation === 'sync' ? sync(argv, context) : validate(argv, context);
|
|
@@ -1,11 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { DevtoolsRepositoryCommandContext } from '../types/provider-command.js';
|
|
2
2
|
import type { DevtoolsRepositoryCommandDefinition } from './commands.js';
|
|
3
|
-
export interface DevtoolsRepositoryCommandContext {
|
|
4
|
-
readonly cwd: string;
|
|
5
|
-
readonly syncDependencies?: (targetDirectory: string) => Promise<ManagedFileSyncResult>;
|
|
6
|
-
writeStdout(text: string): void;
|
|
7
|
-
writeStderr(text: string): void;
|
|
8
|
-
}
|
|
9
3
|
export interface DevtoolsRepositoryCommandResult {
|
|
10
4
|
readonly exitCode: number;
|
|
11
5
|
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { Capability } from '@ankhorage/contracts/capability';
|
|
2
2
|
/*** Resolve, validate, and normalize one opted-in package's canonical capability catalog. */
|
|
3
3
|
export declare function resolvePackageCapabilitiesAsync(targetDirectory: string, manifest: Readonly<Record<string, unknown>>): Promise<readonly Capability[] | undefined>;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { access } from 'node:fs/promises';
|
|
3
3
|
import { resolve } from 'node:path';
|
|
4
4
|
import { pathToFileURL } from 'node:url';
|
|
5
|
-
import { isCapability, normalizeCapability
|
|
5
|
+
import { isCapability, normalizeCapability } from '@ankhorage/capability';
|
|
6
6
|
const CAPABILITIES_SOURCE_PATH = 'src/capabilities/index.ts';
|
|
7
7
|
/*** Resolve, validate, and normalize one opted-in package's canonical capability catalog. */
|
|
8
8
|
export async function resolvePackageCapabilitiesAsync(targetDirectory, manifest) {
|
|
@@ -285,8 +285,8 @@ jobs:
|
|
|
285
285
|
!Object.hasOwn(manifest.ankh, 'capabilities')
|
|
286
286
|
) process.exit(0);
|
|
287
287
|
const requireFromPackage = createRequire(join(packageDir, 'package.json'));
|
|
288
|
-
const
|
|
289
|
-
const { areCapabilitiesEqual, isCapability, normalizeCapability } = await import(pathToFileURL(
|
|
288
|
+
const capabilityPath = requireFromPackage.resolve('@ankhorage/capability');
|
|
289
|
+
const { areCapabilitiesEqual, isCapability, normalizeCapability } = await import(pathToFileURL(capabilityPath).href);
|
|
290
290
|
const { CAPABILITIES } = await import(`${name}/capabilities`);
|
|
291
291
|
const metadata = manifest.ankh.capabilities;
|
|
292
292
|
if (!Array.isArray(CAPABILITIES) || !Array.isArray(metadata) ||
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { ManagedFileSyncResult } from '../features/managed-files/managedFiles.js';
|
|
2
|
+
/*** Shared process context for repository-management command adapters. */
|
|
3
|
+
export interface DevtoolsRepositoryCommandContext {
|
|
4
|
+
readonly cwd: string;
|
|
5
|
+
readonly syncDependencies?: (targetDirectory: string) => Promise<ManagedFileSyncResult>;
|
|
6
|
+
writeStdout(text: string): void;
|
|
7
|
+
writeStderr(text: string): void;
|
|
8
|
+
}
|
|
9
|
+
/*** Shared process context for all Devtools provider command adapters. */
|
|
10
|
+
export interface DevtoolsProviderCommandContext extends DevtoolsRepositoryCommandContext {
|
|
11
|
+
readonly env: Readonly<Record<string, string | undefined>>;
|
|
12
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ankhorage/devtools",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.8",
|
|
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",
|
|
@@ -491,7 +491,8 @@
|
|
|
491
491
|
},
|
|
492
492
|
"dependencies": {
|
|
493
493
|
"@ankhorage/apm": "^0.8.14",
|
|
494
|
-
"@ankhorage/
|
|
494
|
+
"@ankhorage/capability": "^0.2.1",
|
|
495
|
+
"@ankhorage/contracts": "^25.0.0",
|
|
495
496
|
"@ankhorage/project-detector": "^0.3.4",
|
|
496
497
|
"@ankhorage/rules-repository": "^0.2.0",
|
|
497
498
|
"@ankhorage/utility": "^0.5.5",
|
|
@@ -517,7 +518,7 @@
|
|
|
517
518
|
"devDependencies": {
|
|
518
519
|
"@ankhorage/paradox": "^0.3.1",
|
|
519
520
|
"@ankhorage/ankh": "^0.12.2",
|
|
520
|
-
"@ankhorage/doctor": "0.14.
|
|
521
|
+
"@ankhorage/doctor": "0.14.6",
|
|
521
522
|
"@techstark/opencv-js": "^5.0.0-release.1",
|
|
522
523
|
"@types/bun": "^1.4.2",
|
|
523
524
|
"@types/node": "^26.6.4",
|
/package/dist/cli/{runApmReleaseCommandAsync.d.ts → commands/apm/runApmReleaseCommandAsync.d.ts}
RENAMED
|
File without changes
|