16 lines
685 B
JavaScript
16 lines
685 B
JavaScript
import path from 'node:path'
|
|
import { fileURLToPath } from 'node:url'
|
|
import { loadAndValidateManifest } from './manifest-v2.mjs'
|
|
|
|
const scriptDirectory = path.dirname(fileURLToPath(import.meta.url))
|
|
const pipelineDirectory = path.resolve(scriptDirectory, '..')
|
|
const workspace = path.resolve(pipelineDirectory, '..')
|
|
const manifestArgument = process.argv[2]
|
|
|
|
if (!manifestArgument) throw new Error('Usage: node validate-manifest-v2.mjs <manifest>')
|
|
|
|
const manifestPath = path.resolve(pipelineDirectory, manifestArgument)
|
|
await loadAndValidateManifest(manifestPath, workspace)
|
|
process.stdout.write(`MANIFEST-V2 PASS ${path.relative(workspace, manifestPath).replaceAll('\\', '/')}\n`)
|
|
|