mirror of
https://github.com/stablyai/orca.git
synced 2026-10-31 09:07:40 +00:00
* fix(sidebar): phone feed list leftovers before the flip (dark) Bump the feed's semantics version for P11's desktop facts; mark switch-on phone page bundles so packaging and orcad staging refuse them; show the page's last-listed rows before the first feed read; draw the host's pending creations; pass the listed host's own label into host sections instead of the running device's platform. * fix(sidebar): review fixes for the phone feed leftovers (dark) A dark orcad may stage the dark page (only a marker of an off switch is refused); the bundle tree writer leaves the marker; the pre-feed list keeps the view's filters; a creation names its project only outside that project's header and survives search when its project matches; the feed view and row labels read one resolved desktop platform. * fix(sidebar): second review fixes for the phone feed leftovers (dark) Test the off-switch marker check across switches; resolve the desktop platform once for rows and headers; a section search narrows keeps only matching rows.
35 lines
1.4 KiB
JavaScript
35 lines
1.4 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)(
|
|
'./verify-packaged-mobile-web-bundle.cjs'
|
|
)
|
|
const { assertNoDarkOutputOfOffSwitches } = createRequire(import.meta.url)(
|
|
'../dark-build-switches.cjs'
|
|
)
|
|
|
|
/**
|
|
* The built page (pnpm build:mobile-web) into an orcad package. Fatal when it is missing or stale,
|
|
* as electron-builder's beforePack is: a server without it serves phones no page.
|
|
*/
|
|
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 })
|
|
}
|
|
|
|
/** The asset half of a package's artifact list, read from the page it carries. */
|
|
export function readOrcadMobileWebAssetFilenames(packageDir) {
|
|
return orcadMobileWebAssetFilenames(
|
|
readFileSync(join(packageDir, ...ORCAD_MOBILE_WEB_MANIFEST.split('/')), 'utf8')
|
|
)
|
|
}
|