Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,13 @@
test-dev.log
build.log
e2e.log
test-errors.log
e2e-errors.log

/Lumen
.nx/
express-suite
playwright-report/
test-outputs/
test-output.*
brightchain-lib/.cache/
Expand Down
2 changes: 1 addition & 1 deletion .kiro/specs/brightdate-default-timestamp/requirements.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ This feature establishes BrightDate (decimal days since J2000.0) as the native a

## Glossary

- **BrightDate**: A decimal number representing days since the J2000.0 epoch (January 1, 2000, 12:00:00 UTC). Implemented as the `BrightDate` class in `@digitaldefiance/brightdate`.
- **BrightDate**: A decimal number representing days since the J2000.0 epoch (January 1, 2000, 12:00:00 UTC). Implemented as the `BrightDate` class in `@brightchain/brightdate`.
- **BrightDateValue**: The numeric type alias (`number`) representing a raw BrightDate value without the class wrapper.
- **Transaction**: Any discrete operation recorded in the system that requires a timestamp (block creation, message send, key registration, delivery receipt, etc.).
- **Schema**: A TypeScript interface or type definition that includes one or more timestamp fields.
Expand Down
Binary file modified .yarn/install-state.gz
Binary file not shown.
2 changes: 1 addition & 1 deletion brightcal-api-lib
2 changes: 1 addition & 1 deletion brightcal-lib
2 changes: 1 addition & 1 deletion brightcal-react-components
2 changes: 1 addition & 1 deletion brightchain-api-e2e/jest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export default {
'^.+\\.ts$': [
'ts-jest',
{
tsconfig: '<rootDir>/tsconfig.spec.json',
tsconfig: './tsconfig.spec.json',
diagnostics: false,
},
],
Expand Down
2 changes: 1 addition & 1 deletion brightchain-api-lib/jest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export default {
'^.+\\.ts$': [
'ts-jest',
{
tsconfig: '<rootDir>/tsconfig.spec.json',
tsconfig: './tsconfig.spec.json',
useESM: true,
diagnostics: false,
},
Expand Down
12 changes: 6 additions & 6 deletions brightchain-api-lib/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@brightchain/brightchain-api-lib",
"version": "0.32.0",
"version": "0.32.1",
"main": "./src/index.js",
"types": "./src/index.d.ts",
"files": [
Expand All @@ -9,10 +9,10 @@
],
"dependencies": {
"@aws-sdk/client-ses": "^3.859.0",
"@brightchain/brightchain-identity": "^0.32.0",
"@brightchain/brightchain-lib": "^0.32.0",
"@brightchain/db": "^0.32.0",
"@brightchain/node-express-suite": "^0.32.0",
"@brightchain/brightchain-identity": "^0.32.1",
"@brightchain/brightchain-lib": "^0.32.1",
"@brightchain/db": "^0.32.1",
"@brightchain/node-express-suite": "^0.32.1",
"@digitaldefiance/branded-enum": "0.0.7",
"@digitaldefiance/ecies-lib": "5.2.2",
"@digitaldefiance/enclave-bridge-client": "^1.1.0",
Expand Down Expand Up @@ -59,7 +59,7 @@
"@types/node": "^24.1.0",
"@types/nodemailer": "^8.0.0",
"@types/sanitize-html": "^2",
"@types/sharp": "^0.32.0",
"@types/sharp": "^0.32.1",
"@types/uuid": "^10.0.0",
"@types/validator": "^13.15.2",
"@types/ws": "^8.18.1",
Expand Down
3 changes: 0 additions & 3 deletions brightchain-api-lib/src/lib/services/base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,7 @@ import { DefaultBackendIdType } from '../shared-types';
export abstract class BaseService<
TID extends PlatformID = DefaultBackendIdType,
> extends UpstreamBaseService<TID, IBrightChainApplication<TID>> {
protected override readonly application: IBrightChainApplication<TID>;

constructor(application: IBrightChainApplication<TID>) {
super(application);
this.application = application;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,16 @@
*
* No mocks — real Express servers, real HTTP requests, real WebSocket
* connections, real in-memory service graphs.
*
* These tests are sensitive to parallel Jest worker load because the i18n
* GlobalActiveContext singleton can be cleared by another worker between
* requests. jest.retryTimes(2) handles the rare flake without masking real
* failures (a genuine bug would fail all 3 attempts).
*/

// Retry up to 2 extra times on flaky parallel-load failures.
jest.retryTimes(2, { logErrorsBeforeRetry: false });

import {
ChannelService,
ChannelVisibility,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@
* Feature: node-ejs-splash-page, Property 1: Template variable completeness
* Validates: Requirements 2.1, 2.2, 2.3, 2.4, 2.5, 2.6, 2.7
*/
// Async React property tests can exceed 5 s under parallel load — give them room.
jest.retryTimes(2, { logErrorsBeforeRetry: false });
jest.setTimeout(30000);

import { afterEach, beforeEach, describe, expect, it } from '@jest/globals';
import * as fc from 'fast-check';
import { mkdtempSync, rmSync, writeFileSync } from 'fs';
Expand Down
2 changes: 1 addition & 1 deletion brightchain-api-lib/src/lib/services/sesEmail.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export class SESEmailService<TID extends PlatformID = DefaultBackendIdType>
this.debug = application.environment.debug;

// Initialize the SES client with provided AWS credentials and region.
const environment: Environment = application.environment as Environment;
const environment: Environment = application.environment as unknown as Environment;
this.sesClient = new SESClient({
region: environment.aws.region,
credentials: {
Expand Down
2 changes: 1 addition & 1 deletion brightchain-api/jest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export default {
testEnvironment: 'node',
setupFiles: ['reflect-metadata'],
transform: {
'^.+\\.ts$': ['ts-jest', { tsconfig: '<rootDir>/tsconfig.spec.json' }],
'^.+\\.ts$': ['ts-jest', { tsconfig: './tsconfig.spec.json' }],
'^.+\\.js$': [
'ts-jest',
{
Expand Down
2 changes: 1 addition & 1 deletion brightchain-azure-store/jest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export default {
'^.+\\.ts$': [
'ts-jest',
{
tsconfig: '<rootDir>/tsconfig.spec.json',
tsconfig: './tsconfig.spec.json',
useESM: true,
diagnostics: false,
},
Expand Down
6 changes: 3 additions & 3 deletions brightchain-azure-store/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@brightchain/azure-store",
"version": "0.32.0",
"version": "0.32.1",
"main": "./src/index.js",
"types": "./src/index.d.ts",
"files": [
Expand All @@ -10,8 +10,8 @@
"dependencies": {
"@azure/identity": "^4.6.0",
"@azure/storage-blob": "^12.26.0",
"@brightchain/brightchain-api-lib": "^0.32.0",
"@brightchain/brightchain-lib": "^0.32.0",
"@brightchain/brightchain-api-lib": "^0.32.1",
"@brightchain/brightchain-lib": "^0.32.1",
"tslib": "^2.3.0"
},
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion brightchain-db/jest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module.exports = {
preset: '../jest.preset.js',
testEnvironment: 'node',
transform: {
'^.+\\.[tj]s$': ['ts-jest', { tsconfig: '<rootDir>/tsconfig.spec.json' }],
'^.+\\.[tj]s$': ['ts-jest', { tsconfig: './tsconfig.spec.json' }],
},
moduleFileExtensions: ['ts', 'js', 'html'],
coverageDirectory: '../coverage/brightchain-db',
Expand Down
4 changes: 2 additions & 2 deletions brightchain-db/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@brightchain/db",
"version": "0.32.0",
"version": "0.32.1",
"description": "MongoDB-like document database driver backed by BrightChain block store",
"license": "MIT",
"main": "./src/index.js",
Expand All @@ -14,7 +14,7 @@
"tslib": "^2.8.1"
},
"peerDependencies": {
"@brightchain/brightchain-lib": "^0.32.0",
"@brightchain/brightchain-lib": "^0.32.1",
"@digitaldefiance/branded-interface": "0.0.5",
"@digitaldefiance/node-express-suite": "4.28.3",
"express": ">=5.0.0"
Expand Down
14 changes: 13 additions & 1 deletion brightchain-db/src/__tests__/helpers/multiNodeConsistency.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,22 @@ export interface MultiNodeFactory {

/**
* Allow pending `void` async calls (e.g. mergeFromGossipHead) to drain.
* Two ticks: first for the initial Promise, second for nested store.put.
*
* mergeFromGossipHead involves at least two real async I/O hops:
* 1. store.getData(checksum) — reads the gossip block
* 2. persistMeta() — writes the merged state back
*
* Two setImmediate ticks only drain the microtask queue; they don't wait
* for the I/O to complete. We use a short setTimeout to give the event
* loop time to process the pending I/O callbacks.
*/
async function flushAsync(): Promise<void> {
// Drain microtasks first
await new Promise<void>((r) => setImmediate(r));
await new Promise<void>((r) => setImmediate(r));
// Then yield to the I/O poll phase so store.getData / store.put can settle
await new Promise<void>((r) => setTimeout(r, 20));
// One more microtask drain in case the I/O callbacks queued more work
await new Promise<void>((r) => setImmediate(r));
}

Expand Down
2 changes: 1 addition & 1 deletion brightchain-identity/jest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export default {
'^.+\\.[tj]s$': [
'ts-jest',
{
tsconfig: '<rootDir>/tsconfig.spec.json',
tsconfig: './tsconfig.spec.json',
diagnostics: false,
},
],
Expand Down
4 changes: 2 additions & 2 deletions brightchain-identity/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@brightchain/brightchain-identity",
"version": "0.32.0",
"version": "0.32.1",
"description": "BrightChain identity library - mnemonic-based Member factories and identity descriptors",
"main": "src/index.js",
"types": "src/index.d.ts",
Expand Down Expand Up @@ -40,7 +40,7 @@
"author": "Digital Defiance",
"license": "MIT",
"peerDependencies": {
"@brightchain/brightchain-lib": "^0.32.0"
"@brightchain/brightchain-lib": "^0.32.1"
},
"dependencies": {
"@digitaldefiance/ecies-lib": "5.2.2",
Expand Down
2 changes: 1 addition & 1 deletion brightchain-inituserdb/jest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ export default {
preset: '../jest.preset.js',
testEnvironment: 'node',
transform: {
'^.+\\.[tj]s$': ['ts-jest', { tsconfig: '<rootDir>/tsconfig.spec.json' }],
'^.+\\.[tj]s$': ['ts-jest', { tsconfig: './tsconfig.spec.json' }],
},
moduleFileExtensions: ['ts', 'js', 'html'],
coverageDirectory: '../coverage/brightchain-inituserdb',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
export default {
module.exports = {
displayName: 'brightchain-lib',
preset: '../jest.preset.js',
testEnvironment: '<rootDir>/src/test/customEnvironment.ts',
transform: {
'^.+\\.[tj]s$': [
'ts-jest',
{
tsconfig: '<rootDir>/tsconfig.spec.json',
tsconfig: './tsconfig.spec.json',
useESM: true,
isolatedModules: false,
},
],
},
Expand Down
6 changes: 3 additions & 3 deletions brightchain-lib/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@brightchain/brightchain-lib",
"version": "0.32.0",
"version": "0.32.1",
"description": "BrightChain core library - browser-compatible blockchain storage",
"main": "src/index.js",
"types": "src/index.d.ts",
Expand Down Expand Up @@ -66,7 +66,7 @@
"author": "Digital Defiance",
"license": "MIT",
"dependencies": {
"@brightchain/brightdate": "0.32.0",
"@brightchain/brightdate": "0.32.2",
"@digitaldefiance/branded-interface": "0.0.5",
"@digitaldefiance/bzip2-wasm": "^1.1.1",
"@digitaldefiance/ecies-lib": "5.2.2",
Expand Down Expand Up @@ -97,7 +97,7 @@
"secp256k1": "^5.0.1",
"ts-brand": "^0.2.0",
"tslib": "^2.3.0",
"uuid": "11.0.5",
"uuid": "14.0.0",
"validator": "^13.15.0"
},
"devDependencies": {
Expand Down
5 changes: 1 addition & 4 deletions brightchain-lib/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,7 @@
"{workspaceRoot}/coverage/{projectRoot}"
],
"options": {
"jestConfig": "brightchain-lib/jest.config.ts",
"setupFilesAfterEnv": [
"<rootDir>/jest.setup.ts"
],
"jestConfig": "brightchain-lib/jest.config.cts",
"codeCoverage": false,
"coverageReporters": [
"text",
Expand Down
11 changes: 11 additions & 0 deletions brightchain-lib/src/lib/enumerations/brightChainStrings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1802,6 +1802,17 @@ const _brightChainKeys = {
JouleEventLog_Col_Kind: 'JouleEventLog_Col_Kind',
JouleEventLog_Col_Amount: 'JouleEventLog_Col_Amount',
JouleEventLog_Col_Description: 'JouleEventLog_Col_Description',

// Slogans
Slogan_Math_Search_Warrant: 'Slogan_Math_Search_Warrant',
Slogan_Signal_Belongs_To_You: 'Slogan_Signal_Belongs_To_You',
Slogan_Defiance_By_Design: 'Slogan_Defiance_By_Design',
Slogan_BrightChain_Privacy: 'Slogan_BrightChain_Privacy',
Slogan_BrightChain_Privacy_Long: 'Slogan_BrightChain_Privacy_Long',
Slogan_Speak_Freely: 'Slogan_Speak_Freely',
Slogan_Distributed_By_Many: 'Slogan_Distributed_By_Many',
Slogan_Truth_In_The_Signal: 'Slogan_Truth_In_The_Signal',
Slogan_Ideas_Paper_Trail: 'Slogan_Ideas_Paper_Trail',
} as const;

export const BrightChainStrings: BrandedStringKeys<typeof _brightChainKeys> =
Expand Down
25 changes: 21 additions & 4 deletions brightchain-lib/src/lib/i18n/strings/englishUs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1980,8 +1980,7 @@ export const AmericanEnglishStrings: ComponentStrings<BrightChainStringKey> = {
[BrightChainStrings.Dispute_IdTemplate]: 'Dispute #{ID}',
[BrightChainStrings.Dispute_State_Disputed]: 'Under review',
[BrightChainStrings.Dispute_State_ResolvedFinal]: 'Resolved (final)',
[BrightChainStrings.Dispute_State_ResolvedReplaced]:
'Resolved (superseded)',
[BrightChainStrings.Dispute_State_ResolvedReplaced]: 'Resolved (superseded)',
[BrightChainStrings.Dispute_Field_Amount]: 'Amount',
[BrightChainStrings.Dispute_Field_Opened]: 'Opened',
[BrightChainStrings.Dispute_Field_Reason]: 'Reason',
Expand All @@ -1996,8 +1995,7 @@ export const AmericanEnglishStrings: ComponentStrings<BrightChainStringKey> = {
'Joule Rate Table — Version {VERSION}',
[BrightChainStrings.RateTransparency_EffectiveTemplate]:
'Effective: {DATE} ({BD})',
[BrightChainStrings.RateTransparency_SignedByTemplate]:
'Signed by: {SIGNER}',
[BrightChainStrings.RateTransparency_SignedByTemplate]: 'Signed by: {SIGNER}',
[BrightChainStrings.RateTransparency_Col_ResourceClass]: 'Resource class',
[BrightChainStrings.RateTransparency_Col_Rate]: 'Rate',
[BrightChainStrings.RateTransparency_Col_PerUnit]: 'Per unit',
Expand All @@ -2011,6 +2009,25 @@ export const AmericanEnglishStrings: ComponentStrings<BrightChainStringKey> = {
[BrightChainStrings.JouleEventLog_Col_Kind]: 'Kind',
[BrightChainStrings.JouleEventLog_Col_Amount]: 'Amount',
[BrightChainStrings.JouleEventLog_Col_Description]: 'Description',

// Slogans
[BrightChainStrings.Slogan_Math_Search_Warrant]:
'Mathematics does not accept a search warrant.',
[BrightChainStrings.Slogan_Signal_Belongs_To_You]:
'The signal belongs to you. The noise belongs to everyone.',
[BrightChainStrings.Slogan_Defiance_By_Design]: 'Defiance by Design.',
[BrightChainStrings.Slogan_BrightChain_Privacy]:
"Privacy you don't have to ask for.",
[BrightChainStrings.Slogan_BrightChain_Privacy_Long]:
"BrightChain: Privacy you don't have to ask for.",
[BrightChainStrings.Slogan_Speak_Freely]:
'Speak freely; the math has your back.',
[BrightChainStrings.Slogan_Distributed_By_Many]:
'Distributed by many, owned by none.',
[BrightChainStrings.Slogan_Truth_In_The_Signal]:
'Truth in the signal, safety in the noise.',
[BrightChainStrings.Slogan_Ideas_Paper_Trail]:
"Ideas shouldn't have a paper trail.",
};

export default AmericanEnglishStrings;
Loading
Loading