Every emitted JavaScript map ships beside the bundle it describes, and the workspace build and the client preset compress bundles without mangling identifiers. The documentation payload now mirrors the website publication manifest and is removed again by `postpack`; Desktop and the Python executable exclude the published source, documentation, and maps; `clean` removes a staged copy. Typert's publication contract gains the Remote declaration map.
18 lines
967 B
TypeScript
18 lines
967 B
TypeScript
/** Publication payload facts shared by static manifests and packed tarballs. */
|
|
|
|
/**
|
|
* Whether a package manifest exports generated Host-for-Client metadata.
|
|
* @param manifest - parsed package manifest to inspect.
|
|
* @returns whether the canonical `./remote` export pair is present.
|
|
*/
|
|
export function hasTypertRemoteNavigation(manifest: unknown): boolean {
|
|
if (manifest === null || typeof manifest !== 'object' || Array.isArray(manifest)) return false
|
|
const exportsField = (manifest as Record<string, unknown>).exports
|
|
if (exportsField === null || typeof exportsField !== 'object' || Array.isArray(exportsField)) return false
|
|
const remote = (exportsField as Record<string, unknown>)['./remote']
|
|
if (remote === null || typeof remote !== 'object' || Array.isArray(remote)) return false
|
|
const entry = remote as Record<string, unknown>
|
|
return entry.types === './lib/typert.remote-client.d.ts'
|
|
&& entry.default === './lib/typert.remote-client.js'
|
|
}
|