@bleedingdev/modern-js-server-runtime-extensions 3.9.0-ultramodern.4 → 3.9.0-ultramodern.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/bff-policy/crossProjectPolicy.js +309 -0
- package/dist/cjs/bff-policy/index.js +62 -0
- package/dist/cjs/bff-policy/node.js +69 -0
- package/dist/cjs/bff-policy/operationContracts.js +182 -0
- package/dist/cjs/bff-policy/resolveCrossProjectPolicy.js +65 -0
- package/dist/cjs/errorResponsePlugin.js +57 -0
- package/dist/cjs/localisedLoaderPlugin.js +62 -0
- package/dist/cjs/mfCache.js +6 -0
- package/dist/cjs/module-federation-css/plugin.js +6 -0
- package/dist/cjs/serverConfig.js +18 -0
- package/dist/cjs/serverPlugin.js +74 -0
- package/dist/cjs/static-serving/plugin.js +57 -0
- package/dist/cjs/static-serving/responders.js +158 -0
- package/dist/cjs/static-serving/staticModuleFederation.js +173 -0
- package/dist/cjs/static-serving/staticPrecompressed.js +152 -0
- package/dist/cjs/telemetry/canaryCompatibility.js +73 -0
- package/dist/cjs/telemetry/healthSetup.js +4 -0
- package/dist/cjs/telemetry/lifecycle.js +15 -16
- package/dist/cjs/telemetry/plugin.js +10 -3
- package/dist/cjs/telemetry/runtimeEndpoints.js +10 -3
- package/dist/esm/bff-policy/crossProjectPolicy.mjs +259 -0
- package/dist/esm/bff-policy/index.mjs +1 -0
- package/dist/esm/errorResponsePlugin.mjs +19 -0
- package/dist/esm/localisedLoaderPlugin.mjs +24 -0
- package/dist/esm/mfCache.mjs +6 -0
- package/dist/esm/module-federation-css/plugin.mjs +6 -0
- package/dist/esm/serverConfig.mjs +0 -0
- package/dist/esm/serverPlugin.mjs +34 -0
- package/dist/esm/telemetry/canaryCompatibility.mjs +35 -0
- package/dist/esm/telemetry/healthSetup.mjs +4 -0
- package/dist/esm/telemetry/lifecycle.mjs +15 -16
- package/dist/esm/telemetry/plugin.mjs +9 -2
- package/dist/esm/telemetry/runtimeEndpoints.mjs +10 -3
- package/dist/esm-node/bff-policy/crossProjectPolicy.mjs +260 -0
- package/dist/esm-node/bff-policy/index.mjs +2 -0
- package/dist/esm-node/bff-policy/node.mjs +3 -0
- package/dist/esm-node/bff-policy/operationContracts.mjs +129 -0
- package/dist/esm-node/bff-policy/resolveCrossProjectPolicy.mjs +28 -0
- package/dist/esm-node/errorResponsePlugin.mjs +20 -0
- package/dist/esm-node/localisedLoaderPlugin.mjs +25 -0
- package/dist/esm-node/mfCache.mjs +6 -0
- package/dist/esm-node/module-federation-css/plugin.mjs +6 -0
- package/dist/esm-node/serverConfig.mjs +1 -0
- package/dist/esm-node/serverPlugin.mjs +35 -0
- package/dist/esm-node/static-serving/plugin.mjs +18 -0
- package/dist/esm-node/static-serving/responders.mjs +111 -0
- package/dist/esm-node/static-serving/staticModuleFederation.mjs +105 -0
- package/dist/esm-node/static-serving/staticPrecompressed.mjs +112 -0
- package/dist/esm-node/telemetry/canaryCompatibility.mjs +36 -0
- package/dist/esm-node/telemetry/healthSetup.mjs +4 -0
- package/dist/esm-node/telemetry/lifecycle.mjs +15 -16
- package/dist/esm-node/telemetry/plugin.mjs +9 -2
- package/dist/esm-node/telemetry/runtimeEndpoints.mjs +10 -3
- package/dist/types/bff-policy/crossProjectPolicy.d.ts +110 -0
- package/dist/types/bff-policy/index.d.ts +1 -0
- package/dist/types/bff-policy/node.d.ts +2 -0
- package/dist/types/bff-policy/operationContracts.d.ts +85 -0
- package/dist/types/bff-policy/resolveCrossProjectPolicy.d.ts +39 -0
- package/dist/types/errorResponsePlugin.d.ts +3 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/localisedLoaderPlugin.d.ts +2 -0
- package/dist/types/mfCache.d.ts +2 -3
- package/dist/types/module-federation-css/plugin.d.ts +2 -3
- package/dist/types/serverConfig.d.ts +17 -0
- package/dist/types/serverPlugin.d.ts +5 -0
- package/dist/types/static-serving/plugin.d.ts +3 -0
- package/dist/types/static-serving/responders.d.ts +2 -0
- package/dist/types/static-serving/staticModuleFederation.d.ts +13 -0
- package/dist/types/static-serving/staticPrecompressed.d.ts +13 -0
- package/dist/types/telemetry/canaryCompatibility.d.ts +19 -0
- package/dist/types/telemetry/healthSetup.d.ts +3 -1
- package/dist/types/telemetry/lifecycle.d.ts +2 -2
- package/dist/types/telemetry/plugin.d.ts +2 -1
- package/dist/types/telemetry/runtimeEndpoints.d.ts +3 -1
- package/dist/types-esm/backend-federation-security/index.d.mts +68 -0
- package/dist/types-esm/backend-federation-security/node.d.mts +3 -0
- package/dist/types-esm/bff-policy/crossProjectPolicy.d.mts +110 -0
- package/dist/types-esm/bff-policy/index.d.mts +1 -0
- package/dist/types-esm/bff-policy/node.d.mts +2 -0
- package/dist/types-esm/bff-policy/operationContracts.d.mts +85 -0
- package/dist/types-esm/bff-policy/resolveCrossProjectPolicy.d.mts +39 -0
- package/dist/types-esm/contract-gate-snapshot-normalization.d.mts +15 -0
- package/dist/types-esm/contract-gate-snapshot-store/file-store.d.mts +3 -0
- package/dist/types-esm/contract-gate-snapshot-store/http-store.d.mts +5 -0
- package/dist/types-esm/contract-gate-snapshot-store/index.d.mts +5 -0
- package/dist/types-esm/contract-gate-snapshot-store/resolve.d.mts +9 -0
- package/dist/types-esm/contract-gate-snapshot-store/types.d.mts +47 -0
- package/dist/types-esm/contractGateSnapshotObserver.d.mts +33 -0
- package/dist/types-esm/env.d.mts +40 -0
- package/dist/types-esm/errorResponsePlugin.d.mts +3 -0
- package/dist/types-esm/index.d.mts +8 -0
- package/dist/types-esm/localisedLoaderPlugin.d.mts +2 -0
- package/dist/types-esm/mfCache.d.mts +26 -0
- package/dist/types-esm/module-federation-css/collector.d.mts +25 -0
- package/dist/types-esm/module-federation-css/index.d.mts +8 -0
- package/dist/types-esm/module-federation-css/manifest.d.mts +28 -0
- package/dist/types-esm/module-federation-css/plugin.d.mts +22 -0
- package/dist/types-esm/module-federation-css/remote.d.mts +20 -0
- package/dist/types-esm/runtime-fallback-signal/index.d.mts +4 -0
- package/dist/types-esm/runtime-fallback-signal/model.d.mts +70 -0
- package/dist/types-esm/runtime-fallback-signal/resolver.d.mts +29 -0
- package/dist/types-esm/runtime-fallback-signal/store.d.mts +4 -0
- package/dist/types-esm/runtimeFallbackSignal.d.mts +1 -0
- package/dist/types-esm/runtimeLifecycle.d.mts +10 -0
- package/dist/types-esm/serverConfig.d.mts +17 -0
- package/dist/types-esm/serverPlugin.d.mts +5 -0
- package/dist/types-esm/static-serving/plugin.d.mts +3 -0
- package/dist/types-esm/static-serving/responders.d.mts +2 -0
- package/dist/types-esm/static-serving/staticModuleFederation.d.mts +13 -0
- package/dist/types-esm/static-serving/staticPrecompressed.d.mts +13 -0
- package/dist/types-esm/telemetry/canaryCompatibility.d.mts +19 -0
- package/dist/types-esm/telemetry/envelope.d.mts +55 -0
- package/dist/types-esm/telemetry/exporters.d.mts +12 -0
- package/dist/types-esm/telemetry/healthEvaluation.d.mts +20 -0
- package/dist/types-esm/telemetry/healthMonitor.d.mts +88 -0
- package/dist/types-esm/telemetry/healthSetup.d.mts +19 -0
- package/dist/types-esm/telemetry/lifecycle.d.mts +18 -0
- package/dist/types-esm/telemetry/metrics.d.mts +3 -0
- package/dist/types-esm/telemetry/plugin.d.mts +13 -0
- package/dist/types-esm/telemetry/registry.d.mts +69 -0
- package/dist/types-esm/telemetry/registryTypes.d.mts +50 -0
- package/dist/types-esm/telemetry/runtimeEndpoints.d.mts +37 -0
- package/dist/types-esm/telemetry.d.mts +1 -0
- package/dist/types-esm/telemetryCore.d.mts +6 -0
- package/package.json +158 -26
- package/rslib.config.mts +36 -2
- package/rstest.config.mts +11 -0
- package/src/bff-policy/crossProjectPolicy.ts +781 -0
- package/src/bff-policy/index.ts +1 -0
- package/src/bff-policy/node.ts +2 -0
- package/src/bff-policy/operationContracts.ts +298 -0
- package/src/bff-policy/resolveCrossProjectPolicy.ts +88 -0
- package/src/errorResponsePlugin.ts +21 -0
- package/src/index.ts +4 -0
- package/src/localisedLoaderPlugin.ts +34 -0
- package/src/mfCache.ts +4 -3
- package/src/module-federation-css/plugin.ts +4 -3
- package/src/serverConfig.ts +32 -0
- package/src/serverPlugin.ts +38 -0
- package/src/static-serving/plugin.ts +16 -0
- package/src/static-serving/responders.ts +208 -0
- package/src/static-serving/staticModuleFederation.ts +255 -0
- package/src/static-serving/staticPrecompressed.ts +193 -0
- package/src/telemetry/canaryCompatibility.ts +55 -0
- package/src/telemetry/healthSetup.ts +9 -1
- package/src/telemetry/lifecycle.ts +20 -32
- package/src/telemetry/plugin.ts +6 -2
- package/src/telemetry/runtimeEndpoints.ts +13 -2
- package/tests/bff-policy/crossProjectPolicy.matrix.test.ts +487 -0
- package/tests/bff-policy/crossProjectPolicy.test.ts +1004 -0
- package/tests/bff-policy/operationContracts.test.ts +221 -0
- package/tests/bff-policy/optionalZodPeer.test.ts +30 -0
- package/tests/bff-policy/resolveCrossProjectPolicy.test.ts +134 -0
- package/tests/contractGateSnapshotObserver.test.ts +0 -58
- package/tests/env.test.ts +45 -64
- package/tests/localisedLoader.test.ts +120 -0
- package/tests/mfCache.test.ts +1 -88
- package/tests/moduleFederationCss.test.ts +4 -48
- package/tests/nativeErrorResponse.test.ts +199 -0
- package/tests/nativeServerAssembly.test.ts +402 -0
- package/tests/registration.test.ts +1 -86
- package/tests/runtimeLifecycle.test.ts +69 -17
- package/tests/static-serving/ordering.test.ts +214 -0
- package/tests/static-serving/provider.test.ts +83 -0
- package/tests/static-serving/static.test.ts +400 -0
- package/tests/telemetry.test.ts +35 -101
- package/tests/telemetryAutopilot.test.ts +5 -146
- package/tests/telemetryCanaryCompatibility.test.ts +152 -0
- package/tests/telemetryHealthMonitor.test.ts +0 -2
- package/tests/telemetryLifecycle.test.ts +11 -253
- package/tests/telemetryRegistryQueueMatrix.test.ts +0 -1
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import type { TelemetryRegistry } from './registry.mjs';
|
|
2
|
+
import type { TelemetryQueueStats } from './registryTypes.mjs';
|
|
3
|
+
export type TelemetryHealthState = 'pending' | 'healthy' | 'unhealthy';
|
|
4
|
+
export type TelemetryHealthTransition = 'none' | 'became_healthy' | 'became_unhealthy';
|
|
5
|
+
export type TelemetryHealthFailureReason = 'queue_utilization' | 'queue_dropped' | 'unhealthy_exporter' | 'contract_gate_missing' | 'contract_gate_failed';
|
|
6
|
+
export interface TelemetryHealthFailure {
|
|
7
|
+
reason: TelemetryHealthFailureReason;
|
|
8
|
+
gate?: string;
|
|
9
|
+
message?: string;
|
|
10
|
+
threshold?: number;
|
|
11
|
+
value?: number;
|
|
12
|
+
}
|
|
13
|
+
export interface TelemetryContractGateStatus {
|
|
14
|
+
name: string;
|
|
15
|
+
passed: boolean;
|
|
16
|
+
reason?: string;
|
|
17
|
+
updatedAt: number;
|
|
18
|
+
}
|
|
19
|
+
export interface TelemetryHealthEvaluation {
|
|
20
|
+
timestamp: number;
|
|
21
|
+
transition: TelemetryHealthTransition;
|
|
22
|
+
state: TelemetryHealthState;
|
|
23
|
+
consecutiveHealthy: number;
|
|
24
|
+
consecutiveFailures: number;
|
|
25
|
+
failures: TelemetryHealthFailure[];
|
|
26
|
+
queueStats: TelemetryQueueStats;
|
|
27
|
+
unhealthyExporterCount: number;
|
|
28
|
+
contractGates: TelemetryContractGateStatus[];
|
|
29
|
+
}
|
|
30
|
+
export interface TelemetryHealthStatusSnapshot {
|
|
31
|
+
timestamp: number;
|
|
32
|
+
state: TelemetryHealthState;
|
|
33
|
+
consecutiveHealthy: number;
|
|
34
|
+
consecutiveFailures: number;
|
|
35
|
+
queueStats: TelemetryQueueStats;
|
|
36
|
+
unhealthyExporterCount: number;
|
|
37
|
+
requiredContractGates: string[];
|
|
38
|
+
contractGates: TelemetryContractGateStatus[];
|
|
39
|
+
failurePreview: TelemetryHealthFailure[];
|
|
40
|
+
}
|
|
41
|
+
export interface TelemetryHealthMonitorOptions {
|
|
42
|
+
registry: TelemetryRegistry;
|
|
43
|
+
evaluationIntervalMs?: number;
|
|
44
|
+
minConsecutiveHealthyEvaluations?: number;
|
|
45
|
+
minConsecutiveFailedEvaluations?: number;
|
|
46
|
+
maxQueueUtilization?: number;
|
|
47
|
+
maxTotalDropped?: number;
|
|
48
|
+
maxUnhealthyExporters?: number;
|
|
49
|
+
requiredContractGates?: string[];
|
|
50
|
+
onEvaluate?: (evaluation: TelemetryHealthEvaluation) => void;
|
|
51
|
+
onTransition?: (evaluation: TelemetryHealthEvaluation) => void;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Observes telemetry and contract-gate health with hysteresis.
|
|
55
|
+
*
|
|
56
|
+
* This class reports health only. It does not deploy, promote, route, or roll
|
|
57
|
+
* back application revisions.
|
|
58
|
+
*/
|
|
59
|
+
export declare class TelemetryHealthMonitor {
|
|
60
|
+
private readonly registry;
|
|
61
|
+
private readonly evaluationIntervalMs;
|
|
62
|
+
private readonly minConsecutiveHealthyEvaluations;
|
|
63
|
+
private readonly minConsecutiveFailedEvaluations;
|
|
64
|
+
private readonly maxQueueUtilization;
|
|
65
|
+
private readonly maxTotalDropped;
|
|
66
|
+
private readonly maxUnhealthyExporters;
|
|
67
|
+
private requiredContractGates;
|
|
68
|
+
private readonly onEvaluate?;
|
|
69
|
+
private readonly onTransition?;
|
|
70
|
+
private readonly contractGates;
|
|
71
|
+
private state;
|
|
72
|
+
private consecutiveHealthy;
|
|
73
|
+
private consecutiveFailures;
|
|
74
|
+
private evaluationTimer?;
|
|
75
|
+
constructor(options: TelemetryHealthMonitorOptions);
|
|
76
|
+
setRequiredContractGates(gates: string[]): void;
|
|
77
|
+
addRequiredContractGate(name: string): void;
|
|
78
|
+
setContractGate(name: string, passed: boolean, reason?: string): void;
|
|
79
|
+
setContractGates(gates: Record<string, boolean | {
|
|
80
|
+
passed: boolean;
|
|
81
|
+
reason?: string;
|
|
82
|
+
}>): void;
|
|
83
|
+
private collectFailures;
|
|
84
|
+
evaluate(): TelemetryHealthEvaluation;
|
|
85
|
+
getStatusSnapshot(): TelemetryHealthStatusSnapshot;
|
|
86
|
+
start(): void;
|
|
87
|
+
stop(): void;
|
|
88
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { ServerTelemetryUserConfig } from '@modern-js/runtime-extensions/server-config';
|
|
2
|
+
import { type ContractGateSnapshotStore } from '../contract-gate-snapshot-store/index.mjs';
|
|
3
|
+
import { type RuntimeFallbackSignalAuthConfig, type RuntimeFallbackSignalConfig } from '../runtimeFallbackSignal.mjs';
|
|
4
|
+
import { TelemetryHealthMonitor, TelemetryRegistry } from '../telemetryCore.mjs';
|
|
5
|
+
import { type TelemetryCanaryCompatibility } from './canaryCompatibility.mjs';
|
|
6
|
+
type SetupTelemetryHealthMonitoringOptions = {
|
|
7
|
+
registry: TelemetryRegistry;
|
|
8
|
+
appDirectory: string;
|
|
9
|
+
legacyHealthConfig: ServerTelemetryUserConfig['canary'] | undefined;
|
|
10
|
+
};
|
|
11
|
+
type SetupTelemetryHealthMonitoringResult = {
|
|
12
|
+
healthMonitor?: TelemetryHealthMonitor;
|
|
13
|
+
canaryCompatibility?: TelemetryCanaryCompatibility;
|
|
14
|
+
gateSnapshotStorePromise?: Promise<ContractGateSnapshotStore>;
|
|
15
|
+
runtimeFallbackSignalConfig?: RuntimeFallbackSignalConfig;
|
|
16
|
+
runtimeStatusAuthConfig?: RuntimeFallbackSignalAuthConfig;
|
|
17
|
+
};
|
|
18
|
+
export declare const setupTelemetryHealthMonitoring: ({ registry, appDirectory, legacyHealthConfig, }: SetupTelemetryHealthMonitoringOptions) => SetupTelemetryHealthMonitoringResult;
|
|
19
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { ServerTelemetryUserConfig } from '@modern-js/runtime-extensions/server-config';
|
|
2
|
+
import { type ContractGateSnapshotStore } from '../contract-gate-snapshot-store/index.mjs';
|
|
3
|
+
import { TelemetryHealthMonitor, TelemetryRegistry } from '../telemetryCore.mjs';
|
|
4
|
+
type TelemetryLifecycleApi = {
|
|
5
|
+
onDispose: (disposer: () => Promise<void>) => () => void;
|
|
6
|
+
onPrepare: (prepare: () => Promise<void>) => void;
|
|
7
|
+
};
|
|
8
|
+
type RegisterTelemetryLifecycleOptions = {
|
|
9
|
+
api: TelemetryLifecycleApi;
|
|
10
|
+
registry: TelemetryRegistry;
|
|
11
|
+
telemetryConfig: ServerTelemetryUserConfig;
|
|
12
|
+
legacyHealthConfig: ServerTelemetryUserConfig['canary'] | undefined;
|
|
13
|
+
healthMonitor?: TelemetryHealthMonitor;
|
|
14
|
+
gateSnapshotStorePromise?: Promise<ContractGateSnapshotStore>;
|
|
15
|
+
appDirectory: string;
|
|
16
|
+
};
|
|
17
|
+
export declare const registerTelemetryLifecycle: ({ api, registry, telemetryConfig, legacyHealthConfig, healthMonitor, gateSnapshotStorePromise, appDirectory, }: RegisterTelemetryLifecycleOptions) => void;
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { ServerTelemetryUserConfig } from '@modern-js/runtime-extensions/server-config';
|
|
2
|
+
import type { ServerPlugin } from '@modern-js/server-core';
|
|
3
|
+
import { type TelemetryRegistryOptions } from '../telemetryCore.mjs';
|
|
4
|
+
export { createRuntimeFallbackSignalRuntimeState, createRuntimeSignalError, DEFAULT_RUNTIME_FALLBACK_SIGNAL_ENDPOINT, DEFAULT_RUNTIME_STATUS_ENDPOINT, enforceRuntimeFallbackSignalAuthToken, enforceRuntimeFallbackSignalTrustPolicy, getRuntimeSignalErrorStatusCode, normalizeRequiredRuntimeFallbackSignalAuthConfig, normalizeRuntimeFallbackSignalAuthConfig, normalizeRuntimeFallbackTrustPolicy, parseRuntimeFallbackSignalPayloadFromRawBody, type RuntimeFallbackSignalAuthConfig, type RuntimeFallbackSignalRuntimeState, type RuntimeFallbackSignalSource, type RuntimeFallbackSignalTrustContext, type RuntimeFallbackSignalTrustPolicy, type RuntimeSignalError, type RuntimeSignalErrorCode, resolveRuntimeFallbackSignalEndpoint, } from '../runtimeFallbackSignal.mjs';
|
|
5
|
+
export { createOtlpTelemetryExporter, createTelemetryAwareMetrics, createVictoriaMetricsTelemetryExporter, type OtlpExporterOptions, type TelemetryContractGateStatus, type TelemetryEnvelope, type TelemetryExporter, type TelemetryExporterHealthStatus, type TelemetryHealthEvaluation, type TelemetryHealthFailure, type TelemetryHealthFailureReason, TelemetryHealthMonitor, type TelemetryHealthMonitorOptions, type TelemetryHealthState, type TelemetryHealthStatusSnapshot, type TelemetryHealthTransition, type TelemetryQueueStats, TelemetryRegistry, type TelemetryRegistryOptions, type TelemetrySignalType, type TelemetrySloAlert, type TelemetrySloAlertType, TelemetryStartupHealthError, type VictoriaMetricsExporterOptions, } from '../telemetryCore.mjs';
|
|
6
|
+
export declare const hasEnabledTelemetryExporters: (config: ServerTelemetryUserConfig | undefined) => boolean;
|
|
7
|
+
/**
|
|
8
|
+
* Builds the registry SLO options from `server.telemetry.slo`, attaching a
|
|
9
|
+
* logger sink so threshold breaches surface as server warnings (parity with
|
|
10
|
+
* the pre-extraction prod-server harness).
|
|
11
|
+
*/
|
|
12
|
+
export declare const resolveTelemetrySloOptions: (sloConfig: ServerTelemetryUserConfig['slo'], warnSink?: (message: string) => void) => NonNullable<TelemetryRegistryOptions['slo']>;
|
|
13
|
+
export declare const injectTelemetryPlugin: () => ServerPlugin;
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { type TelemetryEnvelope, type TelemetryExporter } from './envelope.mjs';
|
|
2
|
+
import { type TelemetryExporterHealthStatus, type TelemetryQueueStats, type TelemetryRegistryOptions } from './registryTypes.mjs';
|
|
3
|
+
export declare class TelemetryRegistry {
|
|
4
|
+
private readonly exporters;
|
|
5
|
+
private readonly queue;
|
|
6
|
+
private readonly redactionKeys;
|
|
7
|
+
private readonly service;
|
|
8
|
+
private readonly module;
|
|
9
|
+
private readonly environment;
|
|
10
|
+
private readonly samplingRate;
|
|
11
|
+
private readonly maxBatchSize;
|
|
12
|
+
private readonly maxQueueSize;
|
|
13
|
+
private readonly flushIntervalMs;
|
|
14
|
+
private readonly flushTimer?;
|
|
15
|
+
private droppedCount;
|
|
16
|
+
private totalDroppedCount;
|
|
17
|
+
private flushing;
|
|
18
|
+
private readonly exporterHealth;
|
|
19
|
+
private readonly queueUtilizationWarnThreshold;
|
|
20
|
+
private readonly queueDroppedWarnThreshold;
|
|
21
|
+
private readonly alertCooldownMs;
|
|
22
|
+
private readonly onSloAlert?;
|
|
23
|
+
private readonly lastSloAlertAt;
|
|
24
|
+
constructor(options: TelemetryRegistryOptions);
|
|
25
|
+
register(exporter: TelemetryExporter): Promise<void>;
|
|
26
|
+
private getOrCreateExporterHealth;
|
|
27
|
+
private markExporterHealthy;
|
|
28
|
+
private markExporterFailure;
|
|
29
|
+
private maybeEmitSloAlert;
|
|
30
|
+
enqueue(envelope: TelemetryEnvelope): void;
|
|
31
|
+
enqueueMetric(input: {
|
|
32
|
+
name: string;
|
|
33
|
+
value: number;
|
|
34
|
+
unit?: string;
|
|
35
|
+
traceId?: string;
|
|
36
|
+
spanId?: string;
|
|
37
|
+
parentSpanId?: string;
|
|
38
|
+
tags?: Record<string, string>;
|
|
39
|
+
attributes?: Record<string, unknown>;
|
|
40
|
+
}): void;
|
|
41
|
+
enqueueLog(input: {
|
|
42
|
+
name: string;
|
|
43
|
+
level: string;
|
|
44
|
+
traceId?: string;
|
|
45
|
+
spanId?: string;
|
|
46
|
+
parentSpanId?: string;
|
|
47
|
+
tags?: Record<string, string>;
|
|
48
|
+
attributes?: Record<string, unknown>;
|
|
49
|
+
error?: TelemetryEnvelope['error'];
|
|
50
|
+
}): void;
|
|
51
|
+
enqueueTrace(input: {
|
|
52
|
+
name: string;
|
|
53
|
+
traceId?: string;
|
|
54
|
+
spanId?: string;
|
|
55
|
+
parentSpanId?: string;
|
|
56
|
+
tags?: Record<string, string>;
|
|
57
|
+
attributes?: Record<string, unknown>;
|
|
58
|
+
}): void;
|
|
59
|
+
private baseEnvelope;
|
|
60
|
+
private emitBatch;
|
|
61
|
+
startupHealthCheck(options?: {
|
|
62
|
+
failLoud?: boolean;
|
|
63
|
+
}): Promise<void>;
|
|
64
|
+
getExporterHealth(): TelemetryExporterHealthStatus[];
|
|
65
|
+
getQueueStats(): TelemetryQueueStats;
|
|
66
|
+
private flushInternal;
|
|
67
|
+
flush(): Promise<void>;
|
|
68
|
+
shutdown(): Promise<void>;
|
|
69
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
export interface TelemetryRegistryOptions {
|
|
2
|
+
service: string;
|
|
3
|
+
module: string;
|
|
4
|
+
environment: string;
|
|
5
|
+
samplingRate?: number;
|
|
6
|
+
flushIntervalMs?: number;
|
|
7
|
+
maxBatchSize?: number;
|
|
8
|
+
maxQueueSize?: number;
|
|
9
|
+
redactionKeys?: string[];
|
|
10
|
+
slo?: {
|
|
11
|
+
queueUtilizationWarnThreshold?: number;
|
|
12
|
+
queueDroppedWarnThreshold?: number;
|
|
13
|
+
alertCooldownMs?: number;
|
|
14
|
+
onAlert?: (alert: TelemetrySloAlert) => void;
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
export type TelemetrySloAlertType = 'queue.utilization' | 'queue.drop';
|
|
18
|
+
export interface TelemetrySloAlert {
|
|
19
|
+
timestamp: number;
|
|
20
|
+
service: string;
|
|
21
|
+
module: string;
|
|
22
|
+
environment: string;
|
|
23
|
+
type: TelemetrySloAlertType;
|
|
24
|
+
value: number;
|
|
25
|
+
threshold: number;
|
|
26
|
+
queueDepth: number;
|
|
27
|
+
queueCapacity: number;
|
|
28
|
+
queueUtilization: number;
|
|
29
|
+
totalDropped: number;
|
|
30
|
+
}
|
|
31
|
+
export interface TelemetryQueueStats {
|
|
32
|
+
depth: number;
|
|
33
|
+
capacity: number;
|
|
34
|
+
utilization: number;
|
|
35
|
+
pendingDropped: number;
|
|
36
|
+
totalDropped: number;
|
|
37
|
+
}
|
|
38
|
+
export interface TelemetryExporterHealthStatus {
|
|
39
|
+
name: string;
|
|
40
|
+
healthy: boolean;
|
|
41
|
+
failures: number;
|
|
42
|
+
lastError?: string;
|
|
43
|
+
lastSuccessAt?: number;
|
|
44
|
+
lastFailureAt?: number;
|
|
45
|
+
}
|
|
46
|
+
export declare class TelemetryStartupHealthError extends Error {
|
|
47
|
+
readonly code = "TELEMETRY_EXPORTER_STARTUP_HEALTH_FAILED";
|
|
48
|
+
readonly failedExporters: TelemetryExporterHealthStatus[];
|
|
49
|
+
constructor(failedExporters: TelemetryExporterHealthStatus[]);
|
|
50
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import type { Context, ServerEnv } from '@modern-js/server-core';
|
|
2
|
+
import { type RuntimeFallbackSignalAuthConfig, type RuntimeFallbackSignalConfig } from '../runtimeFallbackSignal.mjs';
|
|
3
|
+
import type { TelemetryHealthMonitor, TelemetryRegistry } from '../telemetryCore.mjs';
|
|
4
|
+
import type { TelemetryCanaryCompatibility } from './canaryCompatibility.mjs';
|
|
5
|
+
type RuntimeStatusMiddlewareOptions = {
|
|
6
|
+
registry: TelemetryRegistry;
|
|
7
|
+
healthMonitor?: TelemetryHealthMonitor;
|
|
8
|
+
canaryCompatibility?: TelemetryCanaryCompatibility;
|
|
9
|
+
runtimeFallbackSignalConfig?: RuntimeFallbackSignalConfig;
|
|
10
|
+
runtimeStatusAuthConfig?: RuntimeFallbackSignalAuthConfig;
|
|
11
|
+
};
|
|
12
|
+
export declare const createRuntimeFallbackSignalMiddleware: (signalConfig: RuntimeFallbackSignalConfig) => {
|
|
13
|
+
name: string;
|
|
14
|
+
path: string;
|
|
15
|
+
method: 'post';
|
|
16
|
+
order: 'pre';
|
|
17
|
+
handler: (c: Context<ServerEnv>) => Promise<(Response & import("hono").TypedResponse<{
|
|
18
|
+
ok: true;
|
|
19
|
+
}, 202, "json">) | (Response & import("hono").TypedResponse<{
|
|
20
|
+
ok: false;
|
|
21
|
+
error: string;
|
|
22
|
+
}, 400 | 401 | 403 | 413 | 429 | 500, "json">)>;
|
|
23
|
+
};
|
|
24
|
+
export declare const createRuntimeStatusMiddleware: ({ registry, healthMonitor, canaryCompatibility, runtimeFallbackSignalConfig, runtimeStatusAuthConfig, }: RuntimeStatusMiddlewareOptions) => {
|
|
25
|
+
name: string;
|
|
26
|
+
path: string;
|
|
27
|
+
method: 'get';
|
|
28
|
+
order: 'pre';
|
|
29
|
+
handler: (c: Context<ServerEnv>) => Promise<(Response & import("hono").TypedResponse<{
|
|
30
|
+
ok: true;
|
|
31
|
+
timestamp: number;
|
|
32
|
+
}, import("hono/utils/http-status").ContentfulStatusCode, "json">) | (Response & import("hono").TypedResponse<{
|
|
33
|
+
ok: false;
|
|
34
|
+
error: string;
|
|
35
|
+
}, 400 | 401 | 403 | 413 | 429 | 500, "json">)>;
|
|
36
|
+
};
|
|
37
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './telemetry/plugin.mjs';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { type TelemetryEnvelope, type TelemetryExporter, type TelemetrySignalType, toTelemetryEnvelope, } from './telemetry/envelope.mjs';
|
|
2
|
+
export { createOtlpTelemetryExporter, createVictoriaMetricsTelemetryExporter, maybeWarnLegacyOtlpEndpoint, type OtlpExporterOptions, type VictoriaMetricsExporterOptions, } from './telemetry/exporters.mjs';
|
|
3
|
+
export { type TelemetryContractGateStatus, type TelemetryHealthEvaluation, type TelemetryHealthFailure, type TelemetryHealthFailureReason, TelemetryHealthMonitor, type TelemetryHealthMonitorOptions, type TelemetryHealthState, type TelemetryHealthStatusSnapshot, type TelemetryHealthTransition, } from './telemetry/healthMonitor.mjs';
|
|
4
|
+
export { createTelemetryAwareMetrics } from './telemetry/metrics.mjs';
|
|
5
|
+
export { TelemetryRegistry } from './telemetry/registry.mjs';
|
|
6
|
+
export { type TelemetryExporterHealthStatus, type TelemetryQueueStats, type TelemetryRegistryOptions, type TelemetrySloAlert, type TelemetrySloAlertType, TelemetryStartupHealthError, } from './telemetry/registryTypes.mjs';
|
package/package.json
CHANGED
|
@@ -17,43 +17,140 @@
|
|
|
17
17
|
"modern",
|
|
18
18
|
"modern.js"
|
|
19
19
|
],
|
|
20
|
-
"version": "3.9.0-ultramodern.
|
|
20
|
+
"version": "3.9.0-ultramodern.5",
|
|
21
21
|
"types": "./dist/types/index.d.ts",
|
|
22
22
|
"main": "./dist/cjs/index.js",
|
|
23
23
|
"exports": {
|
|
24
24
|
".": {
|
|
25
|
-
"types": "./dist/types/index.d.ts",
|
|
26
25
|
"node": {
|
|
27
|
-
"import":
|
|
28
|
-
|
|
26
|
+
"import": {
|
|
27
|
+
"types": "./dist/types-esm/index.d.mts",
|
|
28
|
+
"default": "./dist/esm-node/index.mjs"
|
|
29
|
+
},
|
|
30
|
+
"require": {
|
|
31
|
+
"types": "./dist/types/index.d.ts",
|
|
32
|
+
"default": "./dist/cjs/index.js"
|
|
33
|
+
}
|
|
29
34
|
},
|
|
30
|
-
"default": "./dist/cjs/index.js"
|
|
35
|
+
"default": "./dist/cjs/index.js",
|
|
36
|
+
"types": "./dist/types/index.d.ts"
|
|
31
37
|
},
|
|
32
38
|
"./backend-federation-security": {
|
|
33
|
-
"types": "./dist/types/backend-federation-security/index.d.ts",
|
|
34
39
|
"node": {
|
|
35
|
-
"import":
|
|
36
|
-
|
|
40
|
+
"import": {
|
|
41
|
+
"types": "./dist/types-esm/backend-federation-security/index.d.mts",
|
|
42
|
+
"default": "./dist/esm-node/backend-federation-security/index.mjs"
|
|
43
|
+
},
|
|
44
|
+
"require": {
|
|
45
|
+
"types": "./dist/types/backend-federation-security/index.d.ts",
|
|
46
|
+
"default": "./dist/cjs/backend-federation-security/index.js"
|
|
47
|
+
}
|
|
37
48
|
},
|
|
38
|
-
"import":
|
|
39
|
-
|
|
49
|
+
"import": {
|
|
50
|
+
"types": "./dist/types-esm/backend-federation-security/index.d.mts",
|
|
51
|
+
"default": "./dist/esm/backend-federation-security/index.mjs"
|
|
52
|
+
},
|
|
53
|
+
"default": "./dist/esm/backend-federation-security/index.mjs",
|
|
54
|
+
"types": "./dist/types-esm/backend-federation-security/index.d.mts"
|
|
40
55
|
},
|
|
41
56
|
"./backend-federation-security/node": {
|
|
42
|
-
"types": "./dist/types/backend-federation-security/node.d.ts",
|
|
43
57
|
"node": {
|
|
44
|
-
"import":
|
|
45
|
-
|
|
58
|
+
"import": {
|
|
59
|
+
"types": "./dist/types-esm/backend-federation-security/node.d.mts",
|
|
60
|
+
"default": "./dist/esm-node/backend-federation-security/node.mjs"
|
|
61
|
+
},
|
|
62
|
+
"require": {
|
|
63
|
+
"types": "./dist/types/backend-federation-security/node.d.ts",
|
|
64
|
+
"default": "./dist/cjs/backend-federation-security/node.js"
|
|
65
|
+
}
|
|
46
66
|
},
|
|
47
|
-
"default": "./dist/esm-node/backend-federation-security/node.mjs"
|
|
67
|
+
"default": "./dist/esm-node/backend-federation-security/node.mjs",
|
|
68
|
+
"types": "./dist/types/backend-federation-security/node.d.ts"
|
|
48
69
|
},
|
|
49
70
|
"./runtime-lifecycle": {
|
|
50
|
-
"types": "./dist/types/runtimeLifecycle.d.ts",
|
|
51
71
|
"node": {
|
|
52
|
-
"import":
|
|
53
|
-
|
|
72
|
+
"import": {
|
|
73
|
+
"types": "./dist/types-esm/runtimeLifecycle.d.mts",
|
|
74
|
+
"default": "./dist/esm-node/runtimeLifecycle.mjs"
|
|
75
|
+
},
|
|
76
|
+
"require": {
|
|
77
|
+
"types": "./dist/types/runtimeLifecycle.d.ts",
|
|
78
|
+
"default": "./dist/cjs/runtimeLifecycle.js"
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
"import": {
|
|
82
|
+
"types": "./dist/types-esm/runtimeLifecycle.d.mts",
|
|
83
|
+
"default": "./dist/esm/runtimeLifecycle.mjs"
|
|
54
84
|
},
|
|
55
|
-
"
|
|
56
|
-
"
|
|
85
|
+
"default": "./dist/esm/runtimeLifecycle.mjs",
|
|
86
|
+
"types": "./dist/types-esm/runtimeLifecycle.d.mts"
|
|
87
|
+
},
|
|
88
|
+
"./static-serving/node": {
|
|
89
|
+
"node": {
|
|
90
|
+
"import": {
|
|
91
|
+
"types": "./dist/types-esm/static-serving/plugin.d.mts",
|
|
92
|
+
"default": "./dist/esm-node/static-serving/plugin.mjs"
|
|
93
|
+
},
|
|
94
|
+
"require": {
|
|
95
|
+
"types": "./dist/types/static-serving/plugin.d.ts",
|
|
96
|
+
"default": "./dist/cjs/static-serving/plugin.js"
|
|
97
|
+
}
|
|
98
|
+
},
|
|
99
|
+
"types": "./dist/types/static-serving/plugin.d.ts"
|
|
100
|
+
},
|
|
101
|
+
"./server-plugin": {
|
|
102
|
+
"node": {
|
|
103
|
+
"import": {
|
|
104
|
+
"types": "./dist/types-esm/serverPlugin.d.mts",
|
|
105
|
+
"default": "./dist/esm-node/serverPlugin.mjs"
|
|
106
|
+
},
|
|
107
|
+
"require": {
|
|
108
|
+
"types": "./dist/types/serverPlugin.d.ts",
|
|
109
|
+
"default": "./dist/cjs/serverPlugin.js"
|
|
110
|
+
}
|
|
111
|
+
},
|
|
112
|
+
"types": "./dist/types/serverPlugin.d.ts"
|
|
113
|
+
},
|
|
114
|
+
"./bff-policy": {
|
|
115
|
+
"node": {
|
|
116
|
+
"import": {
|
|
117
|
+
"types": "./dist/types-esm/bff-policy/index.d.mts",
|
|
118
|
+
"default": "./dist/esm-node/bff-policy/index.mjs"
|
|
119
|
+
},
|
|
120
|
+
"require": {
|
|
121
|
+
"types": "./dist/types/bff-policy/index.d.ts",
|
|
122
|
+
"default": "./dist/cjs/bff-policy/index.js"
|
|
123
|
+
}
|
|
124
|
+
},
|
|
125
|
+
"default": "./dist/esm/bff-policy/index.mjs",
|
|
126
|
+
"types": "./dist/types-esm/bff-policy/index.d.mts"
|
|
127
|
+
},
|
|
128
|
+
"./bff-policy/node": {
|
|
129
|
+
"node": {
|
|
130
|
+
"import": {
|
|
131
|
+
"types": "./dist/types-esm/bff-policy/node.d.mts",
|
|
132
|
+
"default": "./dist/esm-node/bff-policy/node.mjs"
|
|
133
|
+
},
|
|
134
|
+
"require": {
|
|
135
|
+
"types": "./dist/types/bff-policy/node.d.ts",
|
|
136
|
+
"default": "./dist/cjs/bff-policy/node.js"
|
|
137
|
+
}
|
|
138
|
+
},
|
|
139
|
+
"types": "./dist/types/bff-policy/node.d.ts"
|
|
140
|
+
},
|
|
141
|
+
"./server-config": {
|
|
142
|
+
"node": {
|
|
143
|
+
"import": {
|
|
144
|
+
"types": "./dist/types-esm/serverConfig.d.mts",
|
|
145
|
+
"default": "./dist/esm-node/serverConfig.mjs"
|
|
146
|
+
},
|
|
147
|
+
"require": {
|
|
148
|
+
"types": "./dist/types/serverConfig.d.ts",
|
|
149
|
+
"default": "./dist/cjs/serverConfig.js"
|
|
150
|
+
}
|
|
151
|
+
},
|
|
152
|
+
"default": "./dist/esm/serverConfig.mjs",
|
|
153
|
+
"types": "./dist/types-esm/serverConfig.d.mts"
|
|
57
154
|
}
|
|
58
155
|
},
|
|
59
156
|
"typesVersions": {
|
|
@@ -73,6 +170,26 @@
|
|
|
73
170
|
"runtime-lifecycle": [
|
|
74
171
|
"./dist/types/runtimeLifecycle.d.ts",
|
|
75
172
|
"./src/runtimeLifecycle.ts"
|
|
173
|
+
],
|
|
174
|
+
"static-serving/node": [
|
|
175
|
+
"./dist/types/static-serving/plugin.d.ts",
|
|
176
|
+
"./src/static-serving/plugin.ts"
|
|
177
|
+
],
|
|
178
|
+
"server-plugin": [
|
|
179
|
+
"./dist/types/serverPlugin.d.ts",
|
|
180
|
+
"./src/serverPlugin.ts"
|
|
181
|
+
],
|
|
182
|
+
"bff-policy": [
|
|
183
|
+
"./dist/types/bff-policy/index.d.ts",
|
|
184
|
+
"./src/bff-policy/index.ts"
|
|
185
|
+
],
|
|
186
|
+
"bff-policy/node": [
|
|
187
|
+
"./dist/types/bff-policy/node.d.ts",
|
|
188
|
+
"./src/bff-policy/node.ts"
|
|
189
|
+
],
|
|
190
|
+
"server-config": [
|
|
191
|
+
"./dist/types/serverConfig.d.ts",
|
|
192
|
+
"./src/serverConfig.ts"
|
|
76
193
|
]
|
|
77
194
|
}
|
|
78
195
|
},
|
|
@@ -80,23 +197,38 @@
|
|
|
80
197
|
"node": ">=26.7.0"
|
|
81
198
|
},
|
|
82
199
|
"dependencies": {
|
|
83
|
-
"@modern-js/create-request": "npm:@bleedingdev/modern-js-create-request@3.9.0-ultramodern.
|
|
84
|
-
"@modern-js/
|
|
85
|
-
"@modern-js/
|
|
86
|
-
"@modern-js/
|
|
87
|
-
"@
|
|
200
|
+
"@modern-js/create-request": "npm:@bleedingdev/modern-js-create-request@3.9.0-ultramodern.5",
|
|
201
|
+
"@modern-js/plugin": "npm:@bleedingdev/modern-js-plugin@3.9.0-ultramodern.5",
|
|
202
|
+
"@modern-js/plugin-data-loader": "npm:@bleedingdev/modern-js-plugin-data-loader@3.9.0-ultramodern.5",
|
|
203
|
+
"@modern-js/runtime-extensions": "npm:@bleedingdev/modern-js-runtime-extensions@3.9.0-ultramodern.5",
|
|
204
|
+
"@modern-js/runtime-utils": "npm:@bleedingdev/modern-js-runtime-utils@3.9.0-ultramodern.5",
|
|
205
|
+
"@modern-js/server-core": "npm:@bleedingdev/modern-js-server-core@3.9.0-ultramodern.5",
|
|
206
|
+
"@modern-js/utils": "npm:@bleedingdev/modern-js-utils@3.9.0-ultramodern.5",
|
|
207
|
+
"@swc/helpers": "^0.5.23",
|
|
208
|
+
"reflect-metadata": "^0.2.2"
|
|
88
209
|
},
|
|
89
210
|
"devDependencies": {
|
|
90
|
-
"@modern-js/
|
|
211
|
+
"@modern-js/prod-server": "npm:@bleedingdev/modern-js-prod-server@3.9.0-ultramodern.5",
|
|
212
|
+
"@modern-js/types": "npm:@bleedingdev/modern-js-types@3.9.0-ultramodern.5",
|
|
91
213
|
"@rslib/core": "1.0.0",
|
|
92
214
|
"@scripts/rstest-config": "2.66.0",
|
|
93
215
|
"@types/node": "^26.4.1",
|
|
94
|
-
"@typescript/native-preview": "7.0.0-dev.20260707.2"
|
|
216
|
+
"@typescript/native-preview": "7.0.0-dev.20260707.2",
|
|
217
|
+
"esbuild": "^0.28.2",
|
|
218
|
+
"zod": "^4.5.4"
|
|
95
219
|
},
|
|
96
220
|
"sideEffects": false,
|
|
97
221
|
"publishConfig": {
|
|
98
222
|
"access": "public"
|
|
99
223
|
},
|
|
224
|
+
"peerDependencies": {
|
|
225
|
+
"zod": "^4.5.4"
|
|
226
|
+
},
|
|
227
|
+
"peerDependenciesMeta": {
|
|
228
|
+
"zod": {
|
|
229
|
+
"optional": true
|
|
230
|
+
}
|
|
231
|
+
},
|
|
100
232
|
"scripts": {
|
|
101
233
|
"dev": "rslib build --watch",
|
|
102
234
|
"build": "rslib build",
|
package/rslib.config.mts
CHANGED
|
@@ -1,4 +1,38 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
RSLIB_CODE_ENTRY_GLOB,
|
|
3
|
+
rslibConfig,
|
|
4
|
+
ts7DtsConfig,
|
|
5
|
+
} from '@modern-js/rslib';
|
|
2
6
|
import { defineConfig } from '@rslib/core';
|
|
3
7
|
|
|
4
|
-
export default defineConfig(
|
|
8
|
+
export default defineConfig({
|
|
9
|
+
...rslibConfig,
|
|
10
|
+
lib: rslibConfig.lib.map(lib =>
|
|
11
|
+
lib.id === 'esm-web'
|
|
12
|
+
? {
|
|
13
|
+
...lib,
|
|
14
|
+
source: {
|
|
15
|
+
...lib.source,
|
|
16
|
+
entry: {
|
|
17
|
+
index: [
|
|
18
|
+
RSLIB_CODE_ENTRY_GLOB,
|
|
19
|
+
'!./src/static-serving/**',
|
|
20
|
+
'!./src/bff-policy/node.ts',
|
|
21
|
+
'!./src/bff-policy/operationContracts.ts',
|
|
22
|
+
'!./src/bff-policy/resolveCrossProjectPolicy.ts',
|
|
23
|
+
],
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
}
|
|
27
|
+
: lib.id === 'esm-node'
|
|
28
|
+
? {
|
|
29
|
+
...lib,
|
|
30
|
+
dts: {
|
|
31
|
+
...ts7DtsConfig,
|
|
32
|
+
autoExtension: true,
|
|
33
|
+
distPath: './dist/types-esm',
|
|
34
|
+
},
|
|
35
|
+
}
|
|
36
|
+
: lib,
|
|
37
|
+
),
|
|
38
|
+
});
|