Single-factory, flattened versions of the per-format coverage bundles. Generated by tools/generate-bundles.mjs — do not edit the output files by hand. Re-run via :

bun run gen:bundles

Each logical bundle (odt / odt-large / odt-full and the same for ods / odp) ships as two surfaces, side by side under dist/ :

Surface Path dependencies Use when
standalone dist/standalone/<root>.{js,min.js,meta.json} [] You want a single self-contained factory — every fw and odf-local module is inlined. Zero runtime registration. Largest file size.
build dist/build/<root>.{js,min.js,meta.json} ['xml', 'bitstream', 'huffman', 'deflate', 'zip', 'crc32'] You already have an fw ModuleRuntime with the 6 fw modules registered. The bundle factory receives the fw instances by DI, inlines every odf-local factory itself. Smallest payload.

Each .js has a minified .min.js twin and a .meta.json sidecar (declared fwDependencies, source modules, byte sizes). A dist/build/index.js barrel re-exports the whole @awacloud/odf namespace (the four registration arrays + every named descriptor) for bulk registration on an @awacloud/fw runtime.

The exported factory name inside each file is unchanged from the retired generated-descriptor layout (the former prebuilt directory under src/bundles/) — only the on-disk location moved :

Freshness

The committed tree is pinned by tests/dist-freshness.integration.test.js: it regenerates both variants in a temporary directory with the same generator call and compares each of the 18 .js files (minus the licence banner) byte-for-byte, then checks that every .meta.json size matches the files on disk. The .min.js twins are not regenerated by the test — they are produced in the same driver run as the .js, so a drifted .js implies a drifted .min.js. After any change under src/, run bun run gen:bundles and commit the regenerated dist/. The byte comparison runs in a plain bun test; under --coverage the runtime transpiles factories differently, so the test skips itself there.

Resolve keys

Bundle standalone export build export
odt odtBundled odtPackage
odt-large odtLargeBundled odtLargePackage
odt-full odtFullBundled odtFullPackage
ods odsBundled odsPackage
ods-large odsLargeBundled odsLargePackage
ods-full odsFullBundled odsFullPackage
odp odpBundled odpPackage
odp-large odpLargeBundled odpLargePackage
odp-full odpFullBundled odpFullPackage

Usage — standalone

Direct factory call, no DI needed :

import { odtLargeBundled } from '@awacloud/odf/standalone/odt-large.js';

const odt = odtLargeBundled.factory();
const result = odt.read(bytes);

Or via a runtime (the descriptor declares no dependencies, so registration is trivial) :

import { ModuleRuntime } from '@awacloud/fw';
import { odtLargeBundled } from '@awacloud/odf/standalone/odt-large.js';

const rt = new ModuleRuntime();
rt.register(odtLargeBundled);
const odt = rt.resolve('odtLargeBundled');

Usage — build

The factory takes the 6 fw modules positionally. With a runtime :

import { ModuleRuntime } from '@awacloud/fw';
import { xml } from '@awacloud/fw/io/codec/xml.js';
import { bitstream } from '@awacloud/fw/io/compress/bitstream.js';
import { huffman } from '@awacloud/fw/io/compress/huffman.js';
import { deflate } from '@awacloud/fw/io/compress/deflate.js';
import { zip } from '@awacloud/fw/io/compress/zip.js';
import { crc32 } from '@awacloud/fw/io/calc/crc32.js';
import { odtLargePackage } from '@awacloud/odf/build/odt-large.js';

const rt = new ModuleRuntime();
rt.register(xml); rt.register(bitstream); rt.register(huffman); rt.register(lz77);
rt.register(deflate); rt.register(zip); rt.register(crc32);
rt.register(odtLargePackage);

const odt = rt.resolve('odtLargePackage');

Or register everything at once via the fw-mode barrel :

import { ModuleRuntime } from '@awacloud/fw';
import * as odfBuild from '@awacloud/odf/build/index.js';

const rt = new ModuleRuntime();
for (const m of odfBuild.modules) rt.register(m);

Notes

  • The build/standalone surfaces coexist with the legacy declarative bundles (odtLargeBundle, etc., see ../README.md). Pick whichever fits your wiring style.
  • Surface returned by the factory is the same odt / ods / odp instance the legacy bundles return — read, write, use, plus all the typed extras layered via core.use(...).
  • The 18 files under dist/build/ and dist/standalone/ (9 roots × 2 surfaces) carry the header /* GENERATED — do not edit. Source: packages/front/office/odf/tools/generate-bundles.mjs */. Modify the generator driver instead.
  • For -full bundles, the generator flattens both the Large extras and the Full-only extras into a single core.use(...) call against the raw odt / ods / odp orchestrator (no wrapping through *LargeBundle).