mlm

MyLifeMatter split repositories

@mylifematter/shared-types (1.3.0)

Published 2026-08-06 21:49:10 +03:00 by ci-bot

Installation

@mylifematter:registry=https://git.mylifematter.ru/api/packages/mlm/npm/
npm install @mylifematter/shared-types@1.3.0
"@mylifematter/shared-types": "1.3.0"

About this package

Shared TypeScript types and event contracts used by the MyLifeMatter **api** and **web** services. Published as a private npm package to the Gitea registry of the `mlm` org.

@mylifematter/shared-types

Shared TypeScript types and event contracts used by the MyLifeMatter api and web services. Published as a private npm package to the Gitea registry of the mlm org.

Part of the MyLifeMatter platform — see mlm/infra for the overall architecture and how the services fit together.

Build

pnpm install
pnpm build      # tsc -> dist/ (index.js + index.d.ts)
pnpm typecheck  # tsc --noEmit
pnpm test       # golden vectors of the E2EE envelope (node --test)

Specs

spec/ holds cross-client wire contracts that no single client owns — they are kept here because all of mlm/web, mlm/desktop and mlm/android must agree on them byte for byte.

  • spec/e2ee-envelope-v2.md — chat E2EE message envelope (per-device keys), with pseudocode and a pitfalls section.
  • spec/e2ee-envelope-v2.golden.json — machine-readable golden vectors every client must reproduce.
  • spec/e2ee-attachment-v1.md — encrypted chat attachments: the 1 MiB AES-256-GCM frame stream, the encrypted descriptor (name, mime, dimensions, thumbnail) and what the server still learns.
  • spec/e2ee-attachment-v1.golden.json — golden vectors for the frame stream, range reads, tampering and key wrapping.
  • spec/reference/ — the executable spec (TypeScript reference implementation) and the test that pins the vectors. Not published in the package.

Publishing

The package is published to https://git.mylifematter.ru/api/packages/mlm/npm/ (see publishConfig in package.json). You need a Gitea token with write:package.

Create a ~/.npmrc (do not commit it) with:

@mylifematter:registry=https://git.mylifematter.ru/api/packages/mlm/npm/
//git.mylifematter.ru/api/packages/mlm/npm/:_authToken=<YOUR_GITEA_TOKEN>

Then:

npm publish

Consuming

Consumers (mlm/api, mlm/web) depend on @mylifematter/shared-types at a fixed version and ship a repo-local .npmrc pointing the @mylifematter scope at the registry above. The auth token is supplied via a personal ~/.npmrc or a CI secret, never committed.

Dependencies

Development Dependencies

ID Version
@types/node ^20.14.0
typescript ^5.4.0
Details
npm
2026-08-06 21:49:10 +03:00
327
42 KiB
Assets (1)
Versions (6) View all
1.5.0 2026-10-23
1.4.0 2026-10-22
1.3.0 2026-08-06
1.2.0 2026-07-29
1.1.0 2026-07-29