Skip to content
Merged
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: 2 additions & 2 deletions .github/workflows/build-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: "20"
node-version: "22"
cache: "npm"

- name: Install dependencies
Expand Down Expand Up @@ -57,7 +57,7 @@ jobs:
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: "20"
node-version: "22"
cache: "npm"

- name: Install dependencies
Expand Down
12 changes: 12 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,20 @@ module.exports = {
rootDir: 'src',
testRegex: '.*\\.spec\\.ts$',
transform: {
// Some deps pulled in by @stellar/stellar-sdk (uint8array-extras, @noble/*,
// smol-toml, eventsource) publish untranspiled ESM (`export`/`import`) in
// their .js. Jest ignores node_modules by default (see
// transformIgnorePatterns below); down-level just those files with an
// isolated, no-type-check transpile so they load under CommonJS.
'.+/node_modules/.+\\.js$': ['ts-jest', { isolatedModules: true }],
'^.+\\.(t|j)s$': 'ts-jest',
},
transformIgnorePatterns: [
// Keep ignoring node_modules EXCEPT the ESM-only chain under
// @stellar/stellar-sdk, which must be transpiled to load in Jest.
'/node_modules/(?!(@stellar|@noble|@exodus|stellar-base|uint8array-extras|smol-toml|eventsource)/)',
'\\.pnp\\.[^\\/]+$',
],
moduleNameMapper: {
// Resolve absolute "src/..." imports (tsconfig baseUrl) under rootDir.
'^src/(.*)$': '<rootDir>/$1',
Expand Down
145 changes: 144 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@
"@opentelemetry/sdk-trace-base": "^2.5.0",
"@sentry/nestjs": "^10.59.0",
"@sentry/node": "^8.4.0",
"@stellar/stellar-sdk": "^17.0.0",
"@types/bcrypt": "^6.0.0",
"@types/multer": "^2.1.0",
"@types/qrcode": "^1.5.6",
Expand Down
3 changes: 3 additions & 0 deletions src/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ import { LoggerModule } from "./logging/logger.module";
// Modules – cache
import { CacheModule } from "./common/cache/cache.module";
import { BillingModule } from "./billing/billing.module";
// Modules – payments (plugin system)
import { PaymentsModule } from "./payments/payments.module";
import { RateLimitingModule } from "./rate-limiting/rate-limiting.module";
import { ReconciliationModule } from "./reconciliation/reconciliation.module";

Expand Down Expand Up @@ -268,6 +270,7 @@ import { TenantModuleState } from "./modules/registry/entities/tenant-module-sta
}),
}),
BillingModule,
PaymentsModule,
ReconciliationModule,
],

Expand Down
31 changes: 31 additions & 0 deletions src/config/env.validation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -538,6 +538,37 @@ export class EnvironmentVariables {
@IsString()
REDIS_PASSWORD?: string;

// ── Payment Processors (plugin system) ─────────────────────────────

/** Default processor when no `X-Payment-Processor` header is supplied, e.g. "stellar". */
@IsOptional()
@IsString()
PAYMENTS_DEFAULT_PROCESSOR?: string;

/** Stellar Horizon endpoint. Default: https://horizon-testnet.stellar.org */
@IsOptional()
@IsString()
STELLAR_HORIZON_URL?: string;

/** Stellar network passphrase. Default: testnet passphrase. */
@IsOptional()
@IsString()
STELLAR_NETWORK_PASSPHRASE?: string;

/** Secret seed the server signs Stellar transactions/refunds with. */
@IsOptional()
@IsString()
STELLAR_SIGNING_SECRET?: string;

/** Base URL of the Grantfox REST gateway. */
@IsOptional()
@IsString()
GRANTFOX_API_URL?: string;

/** Bearer API key for the Grantfox gateway. */
@IsOptional()
@IsString()
GRANTFOX_API_KEY?: string;
// Rate Limiting & Abuse Protection (distributed, Redis-backed)

/** Redis key prefix for rate-limit entries. Default: "alian:rl:". */
Expand Down
Loading
Loading