Source snapshot bcc79fcc · Declared package version 5.0.4. This page combines the checked-in package guide and manifest; commands and runtime behavior were not executed in this review.
Files, documents and attachments module for ContractSpec applications.
What It Provides
Layer: lib.
Consumers: bundles.
@lssm-tech/lib.files/storage now includes immutable tenant-scoped artifact storage helpers.
src/contracts/ contains contract specs, operations, entities, and registry exports.
src/docs/ contains docblocks and documentation-facing exports.
src/contracts/ contains contract specs, operations, entities, and registry exports.
src/docs/ contains docblocks and documentation-facing exports.
Installation
npm install @lssm-tech/lib.files
or
bun add @lssm-tech/lib.files
Usage
Import the root entrypoint from @lssm-tech/lib.files, or choose a documented subpath when you only need one part of the package surface.
Architecture
src/contracts/ contains contract specs, operations, entities, and registry exports.
src/docs/ contains docblocks and documentation-facing exports.
src/entities/ contains domain entities and value objects.
src/events.ts is package-level event definitions.
src/files.capability.ts defines a capability surface.
src/files.feature.ts defines a feature entrypoint.
src/index.ts is the root public barrel and package entrypoint.
src/storage/artifact-store.ts provides immutable, tenant-scoped artifact metadata/retrieval with MIME/size policy, retention cleanup, crash recovery, cursor listing, and content/metadata tamper checks.
Public Entry Points
Export . resolves through ./src/index.ts.
Export ./contracts resolves through ./src/contracts/index.ts.
Export ./docs resolves through ./src/docs/index.ts.
Export ./docs/files.docblock resolves through ./src/docs/files.docblock.ts.
Export ./entities resolves through ./src/entities/index.ts.
Export ./events resolves through ./src/events.ts.
Export ./files.capability resolves through ./src/files.capability.ts.
Export ./files.feature resolves through ./src/files.feature.ts.
Export ./storage resolves through ./src/storage/index.ts.
Local Commands
bun run dev — contractspec-bun-build dev
bun run build — contractspec-bun-build build
bun run lint — bun lint:fix
bun run lint:check — biome check .
bun run lint:fix — biome check --write --unsafe --only=nursery/useSortedClasses . && biome check --write .
bun run typecheck — tsgo --noEmit
bun run publish:pkg — bun publish --tolerate-republish --ignore-scripts --verbose
bun run publish:pkg:canary — bun publish:pkg --tag canary
bun run clean — rimraf dist .turbo
bun run build:bundle — contractspec-bun-build transpile
bun run build:types — contractspec-bun-build types
bun run prebuild — contractspec-bun-build prebuild
Recent Updates
Replace eslint+prettier by biomejs to optimize speed.
Notes
Storage interface is the adapter boundary — do not couple consumers to a specific storage provider.
File entity schema is shared; field changes require migration coordination.
Capability contract is public API.
Declared capabilities.
Lib Files
Files, documents and attachments module for ContractSpec applications
Use it to
Adopt files, documents and attachments module for contractspec applications
Requires
TypeScript
Choose another boundary when
The @lssm-tech/lib.files package constraints do not match the target runtime or platform.
@lssm-tech/lib.files
@lssm-tech/lib.files/contracts
@lssm-tech/lib.files/docs
@lssm-tech/lib.files/docs/files.docblock
@lssm-tech/lib.files/entities
@lssm-tech/lib.files/events
@lssm-tech/lib.files/files.capability
@lssm-tech/lib.files/files.feature
@lssm-tech/lib.files/storage
@lssm-tech/lib.files/storage/artifact-content
@lssm-tech/lib.files/storage/artifact-cursor
@lssm-tech/lib.files/storage/artifact-record
Imports and export paths.
16 entries
These are package-manifest entry points. Named symbols listed above come from the capability catalogue; this is not an exhaustive TypeScript symbol reference.