mirror of
https://github.com/stablyai/orca.git
synced 2026-11-15 02:17:31 +00:00
* refactor(tooling): organize test runtime and maintenance owners * test(tooling): preserve relocated runtime fixture dependency edges * refactor(tooling): preserve xterm routing owner checks * ci(tooling): include routing owner in sparse checkout * test(tooling): preserve copied workflow dependency closures * fix(tooling): normalize hashed JSON assets in release parity * fix(tooling): distinguish asset aliases from literal references * fix(tooling): frame normalized asset reference payloads * fix(tooling): normalize decoded JSON asset references * refactor(tooling): organize build, CI and release owners * fix(tooling): align moved generator and workflow path contracts * fix(tooling): update generated plugin bundle owner banners * test(tooling): create relocated mobile verifier fixture directories * test(tooling): copy headless detector dependency closure * test(tooling): align native batch policy fixtures with owner path * fix(tooling): link moved reliability command to historical evidence * fix(tooling): preserve nested sandbox owners and canonical guide source * fix(tooling): target release version owners in checkout fixture
31 lines
1.3 KiB
JavaScript
31 lines
1.3 KiB
JavaScript
import { cpSync, readFileSync } from 'node:fs'
|
|
import { createRequire } from 'node:module'
|
|
import { join } from 'node:path'
|
|
import {
|
|
ORCAD_MOBILE_WEB_DIR,
|
|
ORCAD_MOBILE_WEB_MANIFEST,
|
|
orcadMobileWebAssetFilenames
|
|
} from '../../../../src/shared/orcad-artifacts.ts'
|
|
|
|
const { MOBILE_WEB_BUNDLE_DIR, assertMobileWebBundleBuilt } = createRequire(import.meta.url)(
|
|
'../../desktop-distribution/runtime-verification/verify-packaged-mobile-web-bundle.cjs'
|
|
)
|
|
const { assertNoDarkOutputOfOffSwitches } = createRequire(import.meta.url)(
|
|
'../../../dark-build-switches.cjs'
|
|
)
|
|
|
|
// Require a fresh built page as beforePack does: an orcad package without it cannot serve phones.
|
|
export function stageOrcadMobileWebBundle(outputDir, bundleDir = MOBILE_WEB_BUNDLE_DIR) {
|
|
// The release template refuses the variable itself.
|
|
assertNoDarkOutputOfOffSwitches([bundleDir])
|
|
assertMobileWebBundleBuilt(bundleDir)
|
|
// The guard refuses unlisted files, so the tree is the manifest, its assets and a dark marker.
|
|
cpSync(bundleDir, join(outputDir, ...ORCAD_MOBILE_WEB_DIR.split('/')), { recursive: true })
|
|
}
|
|
|
|
export function readOrcadMobileWebAssetFilenames(packageDir) {
|
|
return orcadMobileWebAssetFilenames(
|
|
readFileSync(join(packageDir, ...ORCAD_MOBILE_WEB_MANIFEST.split('/')), 'utf8')
|
|
)
|
|
}
|