124 lines
4.9 KiB
JSON
124 lines
4.9 KiB
JSON
{
|
|
"name": "@suaveplan/api-2pc",
|
|
"version": "0.1.0",
|
|
"type": "module",
|
|
"sideEffects": false,
|
|
"description": "Two-phase commit coordinator for the Suaveplan API plugin foundation. Drives Postgres PREPARE TRANSACTION / COMMIT PREPARED / ROLLBACK PREPARED across registered participants with a host-owned ledger in suaveplan_2pc_transactions. Refuses non-preparable engines as writers (SQLite, SurrealDB) but accepts them as read-only voters. Default timeoutMs 5000, hard ceiling 30000, default outstanding-prepared cap 256, all operator-tunable. Ships boot-time orphan resolution via pg_prepared_xacts, the full TWOPC_* error namespace, OTel transaction/prepare/commit/rollback spans plus prepare_duration_ms / commit_duration_ms histograms / transactions_total counter / outstanding_prepared gauge, and run2pcParticipantConformance on the ./testing subpath. Server-tier — Bun + Node.",
|
|
"license": "MIT",
|
|
"author": "Suaveplan Team",
|
|
"main": "./dist/index.js",
|
|
"module": "./dist/index.js",
|
|
"types": "./dist/index.d.ts",
|
|
"exports": {
|
|
"./package.json": "./package.json",
|
|
".": {
|
|
"import": {
|
|
"types": "./dist/index.d.ts",
|
|
"default": "./dist/index.js"
|
|
},
|
|
"require": {
|
|
"types": "./dist/index.d.ts",
|
|
"default": "./dist/index.js"
|
|
}
|
|
},
|
|
"./coordinator": {
|
|
"import": {
|
|
"types": "./dist/coordinator/coordinator.d.ts",
|
|
"default": "./dist/coordinator/coordinator.js"
|
|
}
|
|
},
|
|
"./registry": {
|
|
"import": {
|
|
"types": "./dist/registry/participant-registry.d.ts",
|
|
"default": "./dist/registry/participant-registry.js"
|
|
}
|
|
},
|
|
"./phases": {
|
|
"import": {
|
|
"types": "./dist/phases/index.d.ts",
|
|
"default": "./dist/phases/index.js"
|
|
}
|
|
},
|
|
"./persistence": {
|
|
"import": {
|
|
"types": "./dist/persistence/persistence.d.ts",
|
|
"default": "./dist/persistence/persistence.js"
|
|
}
|
|
},
|
|
"./recovery": {
|
|
"import": {
|
|
"types": "./dist/recovery/recovery.d.ts",
|
|
"default": "./dist/recovery/recovery.js"
|
|
}
|
|
},
|
|
"./limits": {
|
|
"import": {
|
|
"types": "./dist/limits/index.d.ts",
|
|
"default": "./dist/limits/index.js"
|
|
}
|
|
},
|
|
"./instruments": {
|
|
"import": {
|
|
"types": "./dist/instruments/instruments.d.ts",
|
|
"default": "./dist/instruments/instruments.js"
|
|
}
|
|
},
|
|
"./error-codes": {
|
|
"import": {
|
|
"types": "./dist/error-codes/error-codes.d.ts",
|
|
"default": "./dist/error-codes/error-codes.js"
|
|
}
|
|
},
|
|
"./options": {
|
|
"import": {
|
|
"types": "./dist/options/options.d.ts",
|
|
"default": "./dist/options/options.js"
|
|
}
|
|
},
|
|
"./testing": {
|
|
"import": {
|
|
"types": "./dist/testing/conformance.d.ts",
|
|
"default": "./dist/testing/conformance.js"
|
|
}
|
|
}
|
|
},
|
|
"scripts": {
|
|
"build": "vite build",
|
|
"test": "bun test --timeout=30000 src/",
|
|
"test:watch": "bun test --watch src/",
|
|
"test:coverage": "bun test --coverage --coverage-reporter=lcov --timeout=30000 src/",
|
|
"test:integration": "vitest run --config vitest.integration.config.ts --passWithNoTests",
|
|
"lint": "bunx biome check src/ tests/",
|
|
"lint:fix": "bunx biome lint --fix --unsafe --max-diagnostics 500 src/ tests/",
|
|
"format": "bunx biome format --write --max-diagnostics 500 src/ tests/",
|
|
"check": "bunx biome check --write --unsafe --max-diagnostics 500 src/ tests/",
|
|
"typecheck": "bunx tsc --noEmit --composite false -p tsconfig.lib.json",
|
|
"docs:check": "bun run ../../../../scripts/docs-check.ts ."
|
|
},
|
|
"dependencies": {
|
|
"@opentelemetry/api": "catalog:observability",
|
|
"@suaveplan/api-types": "workspace:^",
|
|
"@suaveplan/error": "workspace:^",
|
|
"@suaveplan/types": "workspace:^",
|
|
"tslib": "catalog:build",
|
|
"zod": "catalog:forms"
|
|
},
|
|
"devDependencies": {
|
|
"@suaveplan/testing": "workspace:^",
|
|
"@suaveplan/testing-integration": "workspace:^",
|
|
"@suaveplan/testing-integration-postgres": "workspace:^",
|
|
"@types/node": "catalog:",
|
|
"@vitest/coverage-istanbul": "catalog:testing",
|
|
"postgres": "catalog:database",
|
|
"typescript": "catalog:",
|
|
"vite": "catalog:build",
|
|
"vite-plugin-dts": "catalog:build",
|
|
"vitest": "catalog:testing"
|
|
},
|
|
"publishConfig": {
|
|
"registry": "https://npmjs.fq.io/",
|
|
"access": "public"
|
|
},
|
|
"files": ["dist", "src", "README.md"]
|
|
}
|