code-foundry 1.16.0 → 1.18.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.
@@ -0,0 +1,17 @@
1
+ #!/usr/bin/env node
2
+ // @ts-check
3
+ import { readFileSync } from 'node:fs'
4
+ import { resolve } from 'node:path'
5
+ import { ownedPath, runProductQuality } from './lib/product-quality.mjs'
6
+
7
+ try {
8
+ const [configPath, phase = 'build', ...extra] = process.argv.slice(2)
9
+ if (!configPath || extra.length)
10
+ throw new Error('Usage: node quality.mjs MANIFEST.json [build|browser|deployed]')
11
+ const root = resolve(process.cwd())
12
+ const config = JSON.parse(readFileSync(ownedPath(root, configPath), 'utf8'))
13
+ console.log(JSON.stringify(runProductQuality(root, config, phase)))
14
+ } catch (error) {
15
+ console.error(error instanceof Error ? error.message : String(error))
16
+ process.exitCode = 1
17
+ }