@jfrz38/adaptive-admission-node 0.0.0-stage → 0.1.0
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/COMPONENT.md +60 -0
- package/README.md +171 -2
- package/component/COMPONENT.json +44 -0
- package/component/SHA256SUMS +5 -0
- package/component/adaptive-admission-build-v0.1.0.json +36 -0
- package/component/adaptive-admission-component-v0.1.0.wasm +0 -0
- package/component/adaptive-admission-conformance-v0.1.0.tar.gz +0 -0
- package/component/adaptive-admission-release-v0.1.0.json +34 -0
- package/component/adaptive-admission-world-v0.1.0.wit +193 -0
- package/dist/component-runtime.d.ts +13 -0
- package/dist/component-runtime.js +26 -0
- package/dist/configuration.d.ts +4 -0
- package/dist/configuration.js +81 -0
- package/dist/controller.d.ts +46 -0
- package/dist/controller.js +311 -0
- package/dist/errors.d.ts +38 -0
- package/dist/errors.js +68 -0
- package/dist/generated/adaptive-admission.core.wasm +0 -0
- package/dist/generated/adaptive-admission.core2.wasm +0 -0
- package/dist/generated/adaptive-admission.core3.wasm +0 -0
- package/dist/generated/adaptive-admission.d.ts +57 -0
- package/dist/generated/adaptive-admission.js +5869 -0
- package/dist/generated/interfaces/jfrz38-adaptive-admission-controller.d.ts +258 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +3 -0
- package/dist/priority.d.ts +12 -0
- package/dist/priority.js +30 -0
- package/dist/types.d.ts +71 -0
- package/dist/types.js +1 -0
- package/package.json +58 -6
|
@@ -0,0 +1,258 @@
|
|
|
1
|
+
/** @module Interface jfrz38:adaptive-admission/controller@0.1.0 **/
|
|
2
|
+
export function defaultConfig(): Config;
|
|
3
|
+
export function create(configuration: Config): AdmissionController;
|
|
4
|
+
export interface StatisticsConfig {
|
|
5
|
+
minWindowMs: bigint,
|
|
6
|
+
maxWindowMs: bigint,
|
|
7
|
+
minSamples: bigint,
|
|
8
|
+
minPercentileSamples: bigint,
|
|
9
|
+
maxSamples: bigint,
|
|
10
|
+
latencyPercentile: number,
|
|
11
|
+
}
|
|
12
|
+
export interface PidConfig {
|
|
13
|
+
proportionalGain: number,
|
|
14
|
+
integralGain: number,
|
|
15
|
+
derivativeGain: number,
|
|
16
|
+
intervalMs: bigint,
|
|
17
|
+
maxDeltaPercentage: number,
|
|
18
|
+
integralDecay: number,
|
|
19
|
+
}
|
|
20
|
+
export interface Config {
|
|
21
|
+
initialThreshold: number,
|
|
22
|
+
maxConcurrentRequests: bigint,
|
|
23
|
+
maxQueuedRequests: bigint,
|
|
24
|
+
queueTimeoutMs: bigint,
|
|
25
|
+
queueTimeoutRatio: number,
|
|
26
|
+
statistics: StatisticsConfig,
|
|
27
|
+
pid: PidConfig,
|
|
28
|
+
}
|
|
29
|
+
export interface StatisticsWindowOrder {
|
|
30
|
+
minimumMs: bigint,
|
|
31
|
+
maximumMs: bigint,
|
|
32
|
+
}
|
|
33
|
+
export interface StatisticsSampleLimit {
|
|
34
|
+
maximum: bigint,
|
|
35
|
+
required: bigint,
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* # Variants
|
|
39
|
+
*
|
|
40
|
+
* ## `"proportional"`
|
|
41
|
+
*
|
|
42
|
+
* ## `"integral"`
|
|
43
|
+
*
|
|
44
|
+
* ## `"derivative"`
|
|
45
|
+
*/
|
|
46
|
+
export type PidGain = "proportional" | "integral" | "derivative";
|
|
47
|
+
export type ConfigError = ConfigErrorThresholdOutOfRange | ConfigErrorZeroConcurrency | ConfigErrorZeroQueueTimeout | ConfigErrorQueueTimeoutRatioOutOfRange | ConfigErrorZeroStatisticsMinWindow | ConfigErrorStatisticsWindowOrder | ConfigErrorZeroStatisticsMinSamples | ConfigErrorZeroStatisticsPercentileSamples | ConfigErrorStatisticsSampleLimitTooSmall | ConfigErrorStatisticsPercentileOutOfRange | ConfigErrorInvalidPidGain | ConfigErrorZeroPidInterval | ConfigErrorPidDeltaOutOfRange | ConfigErrorPidDecayOutOfRange | ConfigErrorNumericOverflow;
|
|
48
|
+
export interface ConfigErrorThresholdOutOfRange {
|
|
49
|
+
tag: 'threshold-out-of-range',
|
|
50
|
+
val: number,
|
|
51
|
+
}
|
|
52
|
+
export interface ConfigErrorZeroConcurrency {
|
|
53
|
+
tag: 'zero-concurrency',
|
|
54
|
+
}
|
|
55
|
+
export interface ConfigErrorZeroQueueTimeout {
|
|
56
|
+
tag: 'zero-queue-timeout',
|
|
57
|
+
}
|
|
58
|
+
export interface ConfigErrorQueueTimeoutRatioOutOfRange {
|
|
59
|
+
tag: 'queue-timeout-ratio-out-of-range',
|
|
60
|
+
}
|
|
61
|
+
export interface ConfigErrorZeroStatisticsMinWindow {
|
|
62
|
+
tag: 'zero-statistics-min-window',
|
|
63
|
+
}
|
|
64
|
+
export interface ConfigErrorStatisticsWindowOrder {
|
|
65
|
+
tag: 'statistics-window-order',
|
|
66
|
+
val: StatisticsWindowOrder,
|
|
67
|
+
}
|
|
68
|
+
export interface ConfigErrorZeroStatisticsMinSamples {
|
|
69
|
+
tag: 'zero-statistics-min-samples',
|
|
70
|
+
}
|
|
71
|
+
export interface ConfigErrorZeroStatisticsPercentileSamples {
|
|
72
|
+
tag: 'zero-statistics-percentile-samples',
|
|
73
|
+
}
|
|
74
|
+
export interface ConfigErrorStatisticsSampleLimitTooSmall {
|
|
75
|
+
tag: 'statistics-sample-limit-too-small',
|
|
76
|
+
val: StatisticsSampleLimit,
|
|
77
|
+
}
|
|
78
|
+
export interface ConfigErrorStatisticsPercentileOutOfRange {
|
|
79
|
+
tag: 'statistics-percentile-out-of-range',
|
|
80
|
+
val: number,
|
|
81
|
+
}
|
|
82
|
+
export interface ConfigErrorInvalidPidGain {
|
|
83
|
+
tag: 'invalid-pid-gain',
|
|
84
|
+
val: PidGain,
|
|
85
|
+
}
|
|
86
|
+
export interface ConfigErrorZeroPidInterval {
|
|
87
|
+
tag: 'zero-pid-interval',
|
|
88
|
+
}
|
|
89
|
+
export interface ConfigErrorPidDeltaOutOfRange {
|
|
90
|
+
tag: 'pid-delta-out-of-range',
|
|
91
|
+
}
|
|
92
|
+
export interface ConfigErrorPidDecayOutOfRange {
|
|
93
|
+
tag: 'pid-decay-out-of-range',
|
|
94
|
+
}
|
|
95
|
+
export interface ConfigErrorNumericOverflow {
|
|
96
|
+
tag: 'numeric-overflow',
|
|
97
|
+
val: string,
|
|
98
|
+
}
|
|
99
|
+
export interface ThresholdRejection {
|
|
100
|
+
priority: number,
|
|
101
|
+
threshold: number,
|
|
102
|
+
}
|
|
103
|
+
export type RejectionReason = RejectionReasonThreshold | RejectionReasonQueueFull | RejectionReasonShutdown;
|
|
104
|
+
export interface RejectionReasonThreshold {
|
|
105
|
+
tag: 'threshold',
|
|
106
|
+
val: ThresholdRejection,
|
|
107
|
+
}
|
|
108
|
+
export interface RejectionReasonQueueFull {
|
|
109
|
+
tag: 'queue-full',
|
|
110
|
+
}
|
|
111
|
+
export interface RejectionReasonShutdown {
|
|
112
|
+
tag: 'shutdown',
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* # Variants
|
|
116
|
+
*
|
|
117
|
+
* ## `"queue-timeout"`
|
|
118
|
+
*/
|
|
119
|
+
export type EvictionReason = "queue-timeout";
|
|
120
|
+
/**
|
|
121
|
+
* # Variants
|
|
122
|
+
*
|
|
123
|
+
* ## `"requested"`
|
|
124
|
+
*
|
|
125
|
+
* ## `"shutdown"`
|
|
126
|
+
*/
|
|
127
|
+
export type CancellationReason = "requested" | "shutdown";
|
|
128
|
+
export interface ThresholdChange {
|
|
129
|
+
previous: number,
|
|
130
|
+
current: number,
|
|
131
|
+
}
|
|
132
|
+
export interface ConcurrencyChange {
|
|
133
|
+
previous: bigint,
|
|
134
|
+
current: bigint,
|
|
135
|
+
}
|
|
136
|
+
export interface RejectedRequest {
|
|
137
|
+
requestId: bigint,
|
|
138
|
+
reason: RejectionReason,
|
|
139
|
+
}
|
|
140
|
+
export interface EvictedRequest {
|
|
141
|
+
requestId: bigint,
|
|
142
|
+
reason: EvictionReason,
|
|
143
|
+
}
|
|
144
|
+
export interface CancelledRequest {
|
|
145
|
+
requestId: bigint,
|
|
146
|
+
reason: CancellationReason,
|
|
147
|
+
}
|
|
148
|
+
export type Action = ActionThresholdChanged | ActionConcurrencyChanged | ActionStart | ActionReject | ActionEvict | ActionCancel;
|
|
149
|
+
export interface ActionThresholdChanged {
|
|
150
|
+
tag: 'threshold-changed',
|
|
151
|
+
val: ThresholdChange,
|
|
152
|
+
}
|
|
153
|
+
export interface ActionConcurrencyChanged {
|
|
154
|
+
tag: 'concurrency-changed',
|
|
155
|
+
val: ConcurrencyChange,
|
|
156
|
+
}
|
|
157
|
+
export interface ActionStart {
|
|
158
|
+
tag: 'start',
|
|
159
|
+
val: bigint,
|
|
160
|
+
}
|
|
161
|
+
export interface ActionReject {
|
|
162
|
+
tag: 'reject',
|
|
163
|
+
val: RejectedRequest,
|
|
164
|
+
}
|
|
165
|
+
export interface ActionEvict {
|
|
166
|
+
tag: 'evict',
|
|
167
|
+
val: EvictedRequest,
|
|
168
|
+
}
|
|
169
|
+
export interface ActionCancel {
|
|
170
|
+
tag: 'cancel',
|
|
171
|
+
val: CancelledRequest,
|
|
172
|
+
}
|
|
173
|
+
export interface Submission {
|
|
174
|
+
requestId: bigint,
|
|
175
|
+
actions: Array<Action>,
|
|
176
|
+
}
|
|
177
|
+
/**
|
|
178
|
+
* # Variants
|
|
179
|
+
*
|
|
180
|
+
* ## `"success"`
|
|
181
|
+
*
|
|
182
|
+
* ## `"failure"`
|
|
183
|
+
*/
|
|
184
|
+
export type Outcome = "success" | "failure";
|
|
185
|
+
export interface TimeRegression {
|
|
186
|
+
previousMs: bigint,
|
|
187
|
+
receivedMs: bigint,
|
|
188
|
+
}
|
|
189
|
+
export interface InvalidTransition {
|
|
190
|
+
requestId: bigint,
|
|
191
|
+
operation: string,
|
|
192
|
+
state: string,
|
|
193
|
+
}
|
|
194
|
+
export type ControllerError = ControllerErrorTimeRegression | ControllerErrorUnknownRequest | ControllerErrorInvalidTransition | ControllerErrorRequestIdExhausted | ControllerErrorSequenceExhausted | ControllerErrorDeadlineOverflow;
|
|
195
|
+
export interface ControllerErrorTimeRegression {
|
|
196
|
+
tag: 'time-regression',
|
|
197
|
+
val: TimeRegression,
|
|
198
|
+
}
|
|
199
|
+
export interface ControllerErrorUnknownRequest {
|
|
200
|
+
tag: 'unknown-request',
|
|
201
|
+
val: bigint,
|
|
202
|
+
}
|
|
203
|
+
export interface ControllerErrorInvalidTransition {
|
|
204
|
+
tag: 'invalid-transition',
|
|
205
|
+
val: InvalidTransition,
|
|
206
|
+
}
|
|
207
|
+
export interface ControllerErrorRequestIdExhausted {
|
|
208
|
+
tag: 'request-id-exhausted',
|
|
209
|
+
}
|
|
210
|
+
export interface ControllerErrorSequenceExhausted {
|
|
211
|
+
tag: 'sequence-exhausted',
|
|
212
|
+
}
|
|
213
|
+
export interface ControllerErrorDeadlineOverflow {
|
|
214
|
+
tag: 'deadline-overflow',
|
|
215
|
+
}
|
|
216
|
+
export type SubmitError = SubmitErrorPriorityOutOfRange | SubmitErrorController;
|
|
217
|
+
export interface SubmitErrorPriorityOutOfRange {
|
|
218
|
+
tag: 'priority-out-of-range',
|
|
219
|
+
val: number,
|
|
220
|
+
}
|
|
221
|
+
export interface SubmitErrorController {
|
|
222
|
+
tag: 'controller',
|
|
223
|
+
val: ControllerError,
|
|
224
|
+
}
|
|
225
|
+
export interface StatisticsSnapshot {
|
|
226
|
+
id: bigint,
|
|
227
|
+
startedAtMs: bigint,
|
|
228
|
+
endedAtMs: bigint,
|
|
229
|
+
percentileLatencyMs: bigint,
|
|
230
|
+
minimumLatencyMs: bigint,
|
|
231
|
+
averageLatencyMs: number,
|
|
232
|
+
successfulRequests: bigint,
|
|
233
|
+
throughputPerSecond: number,
|
|
234
|
+
maxInFlight: bigint,
|
|
235
|
+
}
|
|
236
|
+
export interface ControllerDiagnostics {
|
|
237
|
+
threshold: number,
|
|
238
|
+
concurrencyLimit: bigint,
|
|
239
|
+
queueTimeoutMs: bigint,
|
|
240
|
+
targetLatencyMs: number,
|
|
241
|
+
aggregatedLatencyMs?: number,
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
export class AdmissionController {
|
|
245
|
+
/**
|
|
246
|
+
* This type does not have a public constructor.
|
|
247
|
+
*/
|
|
248
|
+
private constructor();
|
|
249
|
+
submit(priority: number, nowMs: bigint): Submission;
|
|
250
|
+
complete(requestId: bigint, outcome: Outcome, nowMs: bigint): Array<Action>;
|
|
251
|
+
cancel(requestId: bigint, nowMs: bigint): Array<Action>;
|
|
252
|
+
advanceTime(nowMs: bigint): Array<Action>;
|
|
253
|
+
shutdown(nowMs: bigint): Array<Action>;
|
|
254
|
+
nextDeadline(): bigint | undefined;
|
|
255
|
+
latestStatistics(): StatisticsSnapshot | undefined;
|
|
256
|
+
latestDiagnostics(): ControllerDiagnostics;
|
|
257
|
+
priorityPercentile(percentile: number): number | undefined;
|
|
258
|
+
}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { AdaptiveAdmissionController } from './controller.js';
|
|
2
|
+
export { AdaptiveAdmissionError, AdmissionRequestError, CancelledRequestError, ConfigurationError, ControllerProtocolError, ControllerShutdownError, EvictedRequestError, QueueFullError, RejectedRequestError, ThresholdRejectedError, } from './errors.js';
|
|
3
|
+
export { Priority } from './priority.js';
|
|
4
|
+
export type { ControllerDiagnosticEvent, ControllerDiagnosticListener, ControllerDiagnostics, ControllerOptions, PidOptions, RunOptions, StatisticsOptions, StatisticsSnapshot, U64Input, } from './types.js';
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { AdaptiveAdmissionController } from './controller.js';
|
|
2
|
+
export { AdaptiveAdmissionError, AdmissionRequestError, CancelledRequestError, ConfigurationError, ControllerProtocolError, ControllerShutdownError, EvictedRequestError, QueueFullError, RejectedRequestError, ThresholdRejectedError, } from './errors.js';
|
|
3
|
+
export { Priority } from './priority.js';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare class Priority {
|
|
2
|
+
readonly value: number;
|
|
3
|
+
static readonly HIGHEST = 0;
|
|
4
|
+
static readonly LOWEST = 767;
|
|
5
|
+
static readonly TIERS = 6;
|
|
6
|
+
static readonly COHORTS_PER_TIER = 128;
|
|
7
|
+
static readonly ALLOW_ALL_THRESHOLD = 768;
|
|
8
|
+
private constructor();
|
|
9
|
+
static fromValue(value: number): Priority;
|
|
10
|
+
static fromTier(tier: number, cohort?: number): Priority;
|
|
11
|
+
static default(cohort?: number): Priority;
|
|
12
|
+
}
|
package/dist/priority.js
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { randomInt } from 'node:crypto';
|
|
2
|
+
export class Priority {
|
|
3
|
+
value;
|
|
4
|
+
static HIGHEST = 0;
|
|
5
|
+
static LOWEST = 767;
|
|
6
|
+
static TIERS = 6;
|
|
7
|
+
static COHORTS_PER_TIER = 128;
|
|
8
|
+
static ALLOW_ALL_THRESHOLD = 768;
|
|
9
|
+
constructor(value) {
|
|
10
|
+
this.value = value;
|
|
11
|
+
}
|
|
12
|
+
static fromValue(value) {
|
|
13
|
+
if (!Number.isInteger(value) || value < Priority.HIGHEST || value > Priority.LOWEST) {
|
|
14
|
+
throw new RangeError(`priority must be an integer between ${Priority.HIGHEST} and ${Priority.LOWEST}`);
|
|
15
|
+
}
|
|
16
|
+
return new Priority(value);
|
|
17
|
+
}
|
|
18
|
+
static fromTier(tier, cohort = randomInt(Priority.COHORTS_PER_TIER)) {
|
|
19
|
+
if (!Number.isInteger(tier) || tier < 0 || tier >= Priority.TIERS) {
|
|
20
|
+
throw new RangeError(`tier must be an integer between 0 and ${Priority.TIERS - 1}`);
|
|
21
|
+
}
|
|
22
|
+
if (!Number.isInteger(cohort) || cohort < 0 || cohort >= Priority.COHORTS_PER_TIER) {
|
|
23
|
+
throw new RangeError(`cohort must be an integer between 0 and ${Priority.COHORTS_PER_TIER - 1}`);
|
|
24
|
+
}
|
|
25
|
+
return new Priority(tier * Priority.COHORTS_PER_TIER + cohort);
|
|
26
|
+
}
|
|
27
|
+
static default(cohort) {
|
|
28
|
+
return Priority.fromTier(Priority.TIERS - 1, cohort);
|
|
29
|
+
}
|
|
30
|
+
}
|
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
export type U64Input = number | bigint;
|
|
2
|
+
export interface StatisticsOptions {
|
|
3
|
+
minWindowMs?: U64Input;
|
|
4
|
+
maxWindowMs?: U64Input;
|
|
5
|
+
minSamples?: U64Input;
|
|
6
|
+
minPercentileSamples?: U64Input;
|
|
7
|
+
maxSamples?: U64Input;
|
|
8
|
+
latencyPercentile?: number;
|
|
9
|
+
}
|
|
10
|
+
export interface PidOptions {
|
|
11
|
+
proportionalGain?: number;
|
|
12
|
+
integralGain?: number;
|
|
13
|
+
derivativeGain?: number;
|
|
14
|
+
intervalMs?: U64Input;
|
|
15
|
+
maxDeltaPercentage?: number;
|
|
16
|
+
integralDecay?: number;
|
|
17
|
+
}
|
|
18
|
+
export interface ControllerOptions {
|
|
19
|
+
initialThreshold?: number;
|
|
20
|
+
maxConcurrentRequests?: U64Input;
|
|
21
|
+
maxQueuedRequests?: U64Input;
|
|
22
|
+
queueTimeoutMs?: U64Input;
|
|
23
|
+
queueTimeoutRatio?: number;
|
|
24
|
+
statistics?: StatisticsOptions;
|
|
25
|
+
pid?: PidOptions;
|
|
26
|
+
}
|
|
27
|
+
export interface RunOptions {
|
|
28
|
+
signal?: AbortSignal;
|
|
29
|
+
}
|
|
30
|
+
export interface StatisticsSnapshot {
|
|
31
|
+
id: bigint;
|
|
32
|
+
startedAtMs: bigint;
|
|
33
|
+
endedAtMs: bigint;
|
|
34
|
+
percentileLatencyMs: bigint;
|
|
35
|
+
minimumLatencyMs: bigint;
|
|
36
|
+
averageLatencyMs: number;
|
|
37
|
+
successfulRequests: bigint;
|
|
38
|
+
throughputPerSecond: number;
|
|
39
|
+
maxInFlight: bigint;
|
|
40
|
+
}
|
|
41
|
+
export type ControllerDiagnosticEvent = {
|
|
42
|
+
type: 'threshold-changed';
|
|
43
|
+
previous: number;
|
|
44
|
+
current: number;
|
|
45
|
+
} | {
|
|
46
|
+
type: 'concurrency-changed';
|
|
47
|
+
previous: bigint;
|
|
48
|
+
current: bigint;
|
|
49
|
+
} | {
|
|
50
|
+
type: 'statistics-published';
|
|
51
|
+
snapshot: StatisticsSnapshot;
|
|
52
|
+
} | {
|
|
53
|
+
type: 'controller-diagnostics';
|
|
54
|
+
diagnostics: ControllerDiagnostics;
|
|
55
|
+
};
|
|
56
|
+
export interface ControllerDiagnostics {
|
|
57
|
+
threshold: number;
|
|
58
|
+
concurrencyLimit: bigint;
|
|
59
|
+
queueTimeoutMs: bigint;
|
|
60
|
+
targetLatencyMs: number;
|
|
61
|
+
aggregatedLatencyMs?: number;
|
|
62
|
+
}
|
|
63
|
+
export type ControllerDiagnosticListener = (event: ControllerDiagnosticEvent) => void;
|
|
64
|
+
export type ConfigurationErrorPayload = {
|
|
65
|
+
tag: string;
|
|
66
|
+
val?: unknown;
|
|
67
|
+
};
|
|
68
|
+
export type ControllerErrorPayload = {
|
|
69
|
+
tag: string;
|
|
70
|
+
val?: unknown;
|
|
71
|
+
};
|
package/dist/types.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,58 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@jfrz38/adaptive-admission-node",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "@jfrz38/adaptive-admission-node",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Node.js host SDK for the Adaptive Admission Controller WebAssembly component",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"engines": {
|
|
8
|
+
"node": ">=24"
|
|
9
|
+
},
|
|
10
|
+
"main": "./dist/index.js",
|
|
11
|
+
"types": "./dist/index.d.ts",
|
|
12
|
+
"exports": {
|
|
13
|
+
".": {
|
|
14
|
+
"types": "./dist/index.d.ts",
|
|
15
|
+
"import": "./dist/index.js"
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
"files": [
|
|
19
|
+
"dist",
|
|
20
|
+
"component",
|
|
21
|
+
"README.md",
|
|
22
|
+
"COMPONENT.md"
|
|
23
|
+
],
|
|
24
|
+
"scripts": {
|
|
25
|
+
"generate": "node scripts/generate.mjs",
|
|
26
|
+
"validate:component": "node scripts/generate.mjs",
|
|
27
|
+
"build": "node scripts/build.mjs",
|
|
28
|
+
"clean": "node scripts/clean.mjs",
|
|
29
|
+
"test": "pnpm generate && vitest run",
|
|
30
|
+
"test:coverage": "pnpm generate && vitest run --coverage",
|
|
31
|
+
"test:conformance": "pnpm generate && vitest run tests/conformance.spec.ts",
|
|
32
|
+
"test:package": "node scripts/package-smoke.mjs",
|
|
33
|
+
"test:component-build": "node scripts/verify-component-build.mjs",
|
|
34
|
+
"lint": "eslint src tests --ignore-pattern src/generated/**",
|
|
35
|
+
"lint:src": "eslint src --ignore-pattern src/generated/**",
|
|
36
|
+
"lint:fix": "eslint \"{src,tests}/**/*.ts\" --fix",
|
|
37
|
+
"prepack": "node scripts/verify-package-policy.mjs pack && pnpm build",
|
|
38
|
+
"prepublishOnly": "node scripts/verify-package-policy.mjs publish"
|
|
39
|
+
},
|
|
40
|
+
"repository": {
|
|
41
|
+
"type": "git",
|
|
42
|
+
"url": "git+https://github.com/jfrz38/rate-limit-pid-controller.git",
|
|
43
|
+
"directory": "code/hosts/node"
|
|
44
|
+
},
|
|
45
|
+
"publishConfig": {
|
|
46
|
+
"access": "public"
|
|
47
|
+
},
|
|
48
|
+
"keywords": [
|
|
49
|
+
"admission-control",
|
|
50
|
+
"load-shedding",
|
|
51
|
+
"pid-controller",
|
|
52
|
+
"webassembly",
|
|
53
|
+
"nodejs"
|
|
54
|
+
],
|
|
55
|
+
"devDependencies": {
|
|
56
|
+
"@bytecodealliance/jco-transpile": "0.21.0"
|
|
57
|
+
}
|
|
58
|
+
}
|