@loadstrike/loadstrike-sdk 1.0.18001 → 1.0.18901
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/runtime.js +15 -0
- package/dist/esm/runtime.js +15 -0
- package/dist/types/runtime.d.ts +5 -0
- package/package.json +1 -1
package/dist/cjs/runtime.js
CHANGED
|
@@ -375,6 +375,12 @@ class LoadStrikeStep {
|
|
|
375
375
|
static Run(stepName, context, run) {
|
|
376
376
|
return LoadStrikeStep.run(stepName, context, run);
|
|
377
377
|
}
|
|
378
|
+
static runAsync(stepName, context, run) {
|
|
379
|
+
return LoadStrikeStep.run(stepName, context, run);
|
|
380
|
+
}
|
|
381
|
+
static RunAsync(stepName, context, run) {
|
|
382
|
+
return LoadStrikeStep.runAsync(stepName, context, run);
|
|
383
|
+
}
|
|
378
384
|
}
|
|
379
385
|
exports.LoadStrikeStep = LoadStrikeStep;
|
|
380
386
|
class LoadStrikeSimulation {
|
|
@@ -645,6 +651,15 @@ class LoadStrikeThreshold {
|
|
|
645
651
|
StartCheckAfterSeconds: options.startCheckAfterSeconds
|
|
646
652
|
};
|
|
647
653
|
}
|
|
654
|
+
static ScenarioPredicate(checkExpression, predicate, options = {}) {
|
|
655
|
+
return LoadStrikeThreshold.scenarioPredicate(checkExpression, predicate, options);
|
|
656
|
+
}
|
|
657
|
+
static StepPredicate(stepName, checkExpression, predicate, options = {}) {
|
|
658
|
+
return LoadStrikeThreshold.stepPredicate(stepName, checkExpression, predicate, options);
|
|
659
|
+
}
|
|
660
|
+
static MetricPredicate(checkExpression, predicate, options = {}) {
|
|
661
|
+
return LoadStrikeThreshold.metricPredicate(checkExpression, predicate, options);
|
|
662
|
+
}
|
|
648
663
|
static CreateScenario(predicate, optionsOrAbortWhenErrorCount = {}, startCheckAfterSeconds) {
|
|
649
664
|
return LoadStrikeThreshold.scenarioPredicate("scenario-predicate", predicate, normalizeThresholdAliasOptions(optionsOrAbortWhenErrorCount, startCheckAfterSeconds));
|
|
650
665
|
}
|
package/dist/esm/runtime.js
CHANGED
|
@@ -366,6 +366,12 @@ export class LoadStrikeStep {
|
|
|
366
366
|
static Run(stepName, context, run) {
|
|
367
367
|
return LoadStrikeStep.run(stepName, context, run);
|
|
368
368
|
}
|
|
369
|
+
static runAsync(stepName, context, run) {
|
|
370
|
+
return LoadStrikeStep.run(stepName, context, run);
|
|
371
|
+
}
|
|
372
|
+
static RunAsync(stepName, context, run) {
|
|
373
|
+
return LoadStrikeStep.runAsync(stepName, context, run);
|
|
374
|
+
}
|
|
369
375
|
}
|
|
370
376
|
export class LoadStrikeSimulation {
|
|
371
377
|
static inject(rate, intervalSeconds, duringSeconds) {
|
|
@@ -631,6 +637,15 @@ export class LoadStrikeThreshold {
|
|
|
631
637
|
StartCheckAfterSeconds: options.startCheckAfterSeconds
|
|
632
638
|
};
|
|
633
639
|
}
|
|
640
|
+
static ScenarioPredicate(checkExpression, predicate, options = {}) {
|
|
641
|
+
return LoadStrikeThreshold.scenarioPredicate(checkExpression, predicate, options);
|
|
642
|
+
}
|
|
643
|
+
static StepPredicate(stepName, checkExpression, predicate, options = {}) {
|
|
644
|
+
return LoadStrikeThreshold.stepPredicate(stepName, checkExpression, predicate, options);
|
|
645
|
+
}
|
|
646
|
+
static MetricPredicate(checkExpression, predicate, options = {}) {
|
|
647
|
+
return LoadStrikeThreshold.metricPredicate(checkExpression, predicate, options);
|
|
648
|
+
}
|
|
634
649
|
static CreateScenario(predicate, optionsOrAbortWhenErrorCount = {}, startCheckAfterSeconds) {
|
|
635
650
|
return LoadStrikeThreshold.scenarioPredicate("scenario-predicate", predicate, normalizeThresholdAliasOptions(optionsOrAbortWhenErrorCount, startCheckAfterSeconds));
|
|
636
651
|
}
|
package/dist/types/runtime.d.ts
CHANGED
|
@@ -747,6 +747,8 @@ export declare class LoadStrikeResponse {
|
|
|
747
747
|
export declare class LoadStrikeStep {
|
|
748
748
|
static run<TPayload = unknown>(stepName: string, context: LoadStrikeScenarioContext, run: () => Promise<LoadStrikeReply<TPayload>> | LoadStrikeReply<TPayload>): Promise<LoadStrikeReply<TPayload>>;
|
|
749
749
|
static Run<TPayload = unknown>(stepName: string, context: LoadStrikeScenarioContext, run: () => Promise<LoadStrikeReply<TPayload>> | LoadStrikeReply<TPayload>): Promise<LoadStrikeReply<TPayload>>;
|
|
750
|
+
static runAsync<TPayload = unknown>(stepName: string, context: LoadStrikeScenarioContext, run: () => Promise<LoadStrikeReply<TPayload>> | LoadStrikeReply<TPayload>): Promise<LoadStrikeReply<TPayload>>;
|
|
751
|
+
static RunAsync<TPayload = unknown>(stepName: string, context: LoadStrikeScenarioContext, run: () => Promise<LoadStrikeReply<TPayload>> | LoadStrikeReply<TPayload>): Promise<LoadStrikeReply<TPayload>>;
|
|
750
752
|
}
|
|
751
753
|
export declare class LoadStrikeSimulation {
|
|
752
754
|
static inject(rate: number, intervalSeconds: number, duringSeconds: number): Record<string, unknown>;
|
|
@@ -815,6 +817,9 @@ export declare class LoadStrikeThreshold {
|
|
|
815
817
|
static scenarioPredicate(checkExpression: string, predicate: LoadStrikeThresholdPredicate, options?: LoadStrikeThresholdOptions): Record<string, unknown>;
|
|
816
818
|
static stepPredicate(stepName: string, checkExpression: string, predicate: LoadStrikeThresholdPredicate, options?: LoadStrikeThresholdOptions): Record<string, unknown>;
|
|
817
819
|
static metricPredicate(checkExpression: string, predicate: LoadStrikeThresholdPredicate, options?: LoadStrikeThresholdOptions): Record<string, unknown>;
|
|
820
|
+
static ScenarioPredicate(checkExpression: string, predicate: LoadStrikeThresholdPredicate, options?: LoadStrikeThresholdOptions): Record<string, unknown>;
|
|
821
|
+
static StepPredicate(stepName: string, checkExpression: string, predicate: LoadStrikeThresholdPredicate, options?: LoadStrikeThresholdOptions): Record<string, unknown>;
|
|
822
|
+
static MetricPredicate(checkExpression: string, predicate: LoadStrikeThresholdPredicate, options?: LoadStrikeThresholdOptions): Record<string, unknown>;
|
|
818
823
|
static CreateScenario(predicate: LoadStrikeThresholdPredicate, options?: LoadStrikeThresholdOptions): Record<string, unknown>;
|
|
819
824
|
static CreateScenario(predicate: LoadStrikeThresholdPredicate, abortWhenErrorCount?: number, startCheckAfterSeconds?: number): Record<string, unknown>;
|
|
820
825
|
static CreateStep(stepName: string, predicate: LoadStrikeThresholdPredicate, options?: LoadStrikeThresholdOptions): Record<string, unknown>;
|
package/package.json
CHANGED