@n1k1t/mock-server 0.1.7 → 0.1.9
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/README.md +71 -8
- package/lib/package.json +4 -1
- package/lib/src/client/helpers/expectations.d.ts +18 -18
- package/lib/src/client/helpers/expectations.d.ts.map +1 -1
- package/lib/src/client/helpers/expectations.js.map +1 -1
- package/lib/src/client/methods/expectations.create.method.d.ts +1 -1
- package/lib/src/client/methods/expectations.create.method.js +2 -2
- package/lib/src/client/methods/expectations.create.method.js.map +1 -1
- package/lib/src/client/methods/expectations.delete.method.js +2 -2
- package/lib/src/client/methods/expectations.delete.method.js.map +1 -1
- package/lib/src/client/methods/expectations.update.method.d.ts +1 -1
- package/lib/src/client/methods/expectations.update.method.js +4 -4
- package/lib/src/client/methods/expectations.update.method.js.map +1 -1
- package/lib/src/client/models/client.d.ts +13 -13
- package/lib/src/client/models/client.d.ts.map +1 -1
- package/lib/src/client/models/client.js.map +1 -1
- package/lib/src/config/model.d.ts +4 -1
- package/lib/src/config/model.d.ts.map +1 -1
- package/lib/src/config/model.js +5 -1
- package/lib/src/config/model.js.map +1 -1
- package/lib/src/expectations/__utils__/index.d.ts +1 -2
- package/lib/src/expectations/__utils__/index.d.ts.map +1 -1
- package/lib/src/expectations/__utils__/index.js +8 -0
- package/lib/src/expectations/__utils__/index.js.map +1 -1
- package/lib/src/expectations/models/expectation.d.ts +15 -9
- package/lib/src/expectations/models/expectation.d.ts.map +1 -1
- package/lib/src/expectations/models/expectation.js.map +1 -1
- package/lib/src/expectations/models/operator.d.ts +3 -3
- package/lib/src/expectations/models/operator.d.ts.map +1 -1
- package/lib/src/expectations/models/storage.d.ts +1 -2
- package/lib/src/expectations/models/storage.d.ts.map +1 -1
- package/lib/src/expectations/models/storage.js.map +1 -1
- package/lib/src/expectations/operators/and.operator.d.ts +1 -2
- package/lib/src/expectations/operators/and.operator.d.ts.map +1 -1
- package/lib/src/expectations/operators/and.operator.js.map +1 -1
- package/lib/src/expectations/operators/exec.operator.d.ts +2 -2
- package/lib/src/expectations/operators/exec.operator.d.ts.map +1 -1
- package/lib/src/expectations/operators/exec.operator.js.map +1 -1
- package/lib/src/expectations/operators/exec.operator.spec.js.map +1 -1
- package/lib/src/expectations/operators/has.operator.d.ts +1 -1
- package/lib/src/expectations/operators/has.operator.d.ts.map +1 -1
- package/lib/src/expectations/operators/has.operator.spec.js.map +1 -1
- package/lib/src/expectations/operators/if.operator.d.ts +1 -2
- package/lib/src/expectations/operators/if.operator.d.ts.map +1 -1
- package/lib/src/expectations/operators/if.operator.js.map +1 -1
- package/lib/src/expectations/operators/merge.operator.d.ts +3 -3
- package/lib/src/expectations/operators/merge.operator.d.ts.map +1 -1
- package/lib/src/expectations/operators/merge.operator.js +2 -2
- package/lib/src/expectations/operators/merge.operator.js.map +1 -1
- package/lib/src/expectations/operators/merge.operator.spec.js.map +1 -1
- package/lib/src/expectations/operators/not.operator.d.ts +1 -2
- package/lib/src/expectations/operators/not.operator.d.ts.map +1 -1
- package/lib/src/expectations/operators/not.operator.js.map +1 -1
- package/lib/src/expectations/operators/or.operator.d.ts +1 -2
- package/lib/src/expectations/operators/or.operator.d.ts.map +1 -1
- package/lib/src/expectations/operators/or.operator.js.map +1 -1
- package/lib/src/expectations/operators/remove.operator.d.ts +1 -2
- package/lib/src/expectations/operators/remove.operator.d.ts.map +1 -1
- package/lib/src/expectations/operators/remove.operator.js.map +1 -1
- package/lib/src/expectations/operators/remove.operator.spec.js.map +1 -1
- package/lib/src/expectations/operators/root.operator.d.ts +1 -2
- package/lib/src/expectations/operators/root.operator.d.ts.map +1 -1
- package/lib/src/expectations/operators/root.operator.js.map +1 -1
- package/lib/src/expectations/operators/set.operator.d.ts +2 -2
- package/lib/src/expectations/operators/set.operator.d.ts.map +1 -1
- package/lib/src/expectations/operators/set.operator.js.map +1 -1
- package/lib/src/expectations/operators/switch.operator.d.ts +2 -2
- package/lib/src/expectations/operators/switch.operator.d.ts.map +1 -1
- package/lib/src/expectations/types.d.ts +28 -14
- package/lib/src/expectations/types.d.ts.map +1 -1
- package/lib/src/expectations/types.js +2 -0
- package/lib/src/expectations/types.js.map +1 -1
- package/lib/src/expectations/utils.d.ts +3 -4
- package/lib/src/expectations/utils.d.ts.map +1 -1
- package/lib/src/expectations/utils.js +12 -0
- package/lib/src/expectations/utils.js.map +1 -1
- package/lib/src/server/endpoints/config.get.endpoint.d.ts +3 -0
- package/lib/src/server/endpoints/config.get.endpoint.d.ts.map +1 -1
- package/lib/src/server/endpoints/expectations.create.endpoint.d.ts +2 -2
- package/lib/src/server/endpoints/expectations.get-list.endpoint.d.ts +2 -2
- package/lib/src/server/endpoints/expectations.get-list.endpoint.js +1 -1
- package/lib/src/server/endpoints/expectations.get-list.endpoint.js.map +1 -1
- package/lib/src/server/endpoints/expectations.update.endpoint.d.ts +2 -2
- package/lib/src/server/endpoints/history.get-list.endpoint.d.ts +6 -3
- package/lib/src/server/endpoints/history.get-list.endpoint.d.ts.map +1 -1
- package/lib/src/server/endpoints/history.get-list.endpoint.js +1 -1
- package/lib/src/server/endpoints/history.get-list.endpoint.js.map +1 -1
- package/lib/src/server/history/index.d.ts +0 -1
- package/lib/src/server/history/index.d.ts.map +1 -1
- package/lib/src/server/history/index.js +0 -1
- package/lib/src/server/history/index.js.map +1 -1
- package/lib/src/server/history/model.d.ts +12 -12
- package/lib/src/server/history/model.d.ts.map +1 -1
- package/lib/src/server/history/model.js +8 -23
- package/lib/src/server/history/model.js.map +1 -1
- package/lib/src/server/history/storage.d.ts +1 -1
- package/lib/src/server/history/storage.d.ts.map +1 -1
- package/lib/src/server/history/storage.js.map +1 -1
- package/lib/src/server/index.d.ts.map +1 -1
- package/lib/src/server/index.js +6 -0
- package/lib/src/server/index.js.map +1 -1
- package/lib/src/server/middlewares/delay.middleware.d.ts +7 -13
- package/lib/src/server/middlewares/delay.middleware.d.ts.map +1 -1
- package/lib/src/server/middlewares/delay.middleware.js +4 -4
- package/lib/src/server/middlewares/delay.middleware.js.map +1 -1
- package/lib/src/server/middlewares/destroy.midleware.d.ts +7 -13
- package/lib/src/server/middlewares/destroy.midleware.d.ts.map +1 -1
- package/lib/src/server/middlewares/destroy.midleware.js +7 -8
- package/lib/src/server/middlewares/destroy.midleware.js.map +1 -1
- package/lib/src/server/middlewares/forward.middleware.d.ts +7 -13
- package/lib/src/server/middlewares/forward.middleware.d.ts.map +1 -1
- package/lib/src/server/middlewares/forward.middleware.js +81 -27
- package/lib/src/server/middlewares/forward.middleware.js.map +1 -1
- package/lib/src/server/middlewares/history.middleware.d.ts +4 -10
- package/lib/src/server/middlewares/history.middleware.d.ts.map +1 -1
- package/lib/src/server/middlewares/history.middleware.js +7 -3
- package/lib/src/server/middlewares/history.middleware.js.map +1 -1
- package/lib/src/server/middlewares/internal.middleware.d.ts +4 -10
- package/lib/src/server/middlewares/internal.middleware.d.ts.map +1 -1
- package/lib/src/server/middlewares/manipulate-expectation.middleware.d.ts +4 -10
- package/lib/src/server/middlewares/manipulate-expectation.middleware.d.ts.map +1 -1
- package/lib/src/server/middlewares/manipulate-expectation.middleware.js +1 -7
- package/lib/src/server/middlewares/manipulate-expectation.middleware.js.map +1 -1
- package/lib/src/server/middlewares/match-expectation.middleware.d.ts +4 -10
- package/lib/src/server/middlewares/match-expectation.middleware.d.ts.map +1 -1
- package/lib/src/server/middlewares/match-expectation.middleware.js +7 -8
- package/lib/src/server/middlewares/match-expectation.middleware.js.map +1 -1
- package/lib/src/server/middlewares/public.middleware.d.ts +4 -10
- package/lib/src/server/middlewares/public.middleware.d.ts.map +1 -1
- package/lib/src/server/middlewares/reply.middleware.d.ts +9 -15
- package/lib/src/server/middlewares/reply.middleware.d.ts.map +1 -1
- package/lib/src/server/middlewares/reply.middleware.js +23 -28
- package/lib/src/server/middlewares/reply.middleware.js.map +1 -1
- package/lib/src/server/models/containers/index.d.ts +3 -0
- package/lib/src/server/models/containers/index.d.ts.map +1 -0
- package/lib/src/server/models/containers/index.js +19 -0
- package/lib/src/server/models/containers/index.js.map +1 -0
- package/lib/src/server/models/containers/model.d.ts +44 -0
- package/lib/src/server/models/containers/model.d.ts.map +1 -0
- package/lib/src/server/models/containers/model.js +43 -0
- package/lib/src/server/models/containers/model.js.map +1 -0
- package/lib/src/server/models/containers/storage.d.ts +19 -0
- package/lib/src/server/models/containers/storage.d.ts.map +1 -0
- package/lib/src/server/models/containers/storage.js +42 -0
- package/lib/src/server/models/containers/storage.js.map +1 -0
- package/lib/src/server/models/containers/utils.d.ts +2 -0
- package/lib/src/server/models/containers/utils.d.ts.map +1 -0
- package/lib/src/server/models/containers/utils.js +7 -0
- package/lib/src/server/models/containers/utils.js.map +1 -0
- package/lib/src/server/models/index.d.ts +1 -0
- package/lib/src/server/models/index.d.ts.map +1 -1
- package/lib/src/server/models/index.js +1 -0
- package/lib/src/server/models/index.js.map +1 -1
- package/lib/src/server/models/middleware.d.ts +2 -5
- package/lib/src/server/models/middleware.d.ts.map +1 -1
- package/lib/src/server/models/plugins.d.ts +7 -2
- package/lib/src/server/models/plugins.d.ts.map +1 -1
- package/lib/src/server/models/plugins.js.map +1 -1
- package/lib/src/server/models/request-context/http.d.ts +20 -15
- package/lib/src/server/models/request-context/http.d.ts.map +1 -1
- package/lib/src/server/models/request-context/http.js +25 -31
- package/lib/src/server/models/request-context/http.js.map +1 -1
- package/lib/src/server/models/request-context/index.d.ts +1 -0
- package/lib/src/server/models/request-context/index.d.ts.map +1 -1
- package/lib/src/server/models/request-context/index.js +1 -0
- package/lib/src/server/models/request-context/index.js.map +1 -1
- package/lib/src/server/models/request-context/snapshot.d.ts +28 -0
- package/lib/src/server/models/request-context/snapshot.d.ts.map +1 -0
- package/lib/src/server/models/request-context/snapshot.js +49 -0
- package/lib/src/server/models/request-context/snapshot.js.map +1 -0
- package/lib/src/server/models/request-context/types.d.ts +12 -0
- package/lib/src/server/models/request-context/types.d.ts.map +1 -1
- package/lib/src/server/models/request-context/utils.d.ts +1 -0
- package/lib/src/server/models/request-context/utils.d.ts.map +1 -1
- package/lib/src/server/models/request-context/utils.js +1 -1
- package/lib/src/server/models/request-context/utils.js.map +1 -1
- package/lib/src/server/models/server-context.d.ts +7 -2
- package/lib/src/server/models/server-context.d.ts.map +1 -1
- package/lib/src/server/models/server-context.js +17 -3
- package/lib/src/server/models/server-context.js.map +1 -1
- package/lib/src/server/ws-exchange/types.d.ts +2 -2
- package/lib/src/server/ws-exchange/types.d.ts.map +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/package.json +4 -1
- package/public/scripts/main.js +18 -17
- package/public/styles/main.css +4 -0
- package/lib/src/server/history/types.d.ts +0 -14
- package/lib/src/server/history/types.d.ts.map +0 -1
- package/lib/src/server/history/types.js +0 -3
- package/lib/src/server/history/types.js.map +0 -1
|
@@ -3,7 +3,7 @@ import type { faker } from '@faker-js/faker';
|
|
|
3
3
|
import type dayjs from 'dayjs';
|
|
4
4
|
import type _ from 'lodash';
|
|
5
5
|
import type { ConvertTupleToUnion, ExtractObjectValueByPath, PartialDeep, TRequestProtocol } from '../types';
|
|
6
|
-
import type {
|
|
6
|
+
import type { Container, ContainersStorage, RequestContextSnapshot } from '../server/models';
|
|
7
7
|
import type { MetaContext } from '../meta';
|
|
8
8
|
import type { Logger } from '../logger';
|
|
9
9
|
import type * as operators from './operators';
|
|
@@ -36,12 +36,20 @@ export interface IExpectationMeta {
|
|
|
36
36
|
}
|
|
37
37
|
export type TExpectationContextLocation = 'request' | 'response';
|
|
38
38
|
export type TExpectationOperatorLocation = ConvertTupleToUnion<typeof LExpectationOperatorLocation>;
|
|
39
|
-
export declare const LExpectationOperatorLocation: readonly ["error", "delay", "state", "seed", "path", "method", "incoming.body", "incoming.bodyRaw", "incoming.query", "incoming.headers", "outgoing.status", "outgoing.headers", "outgoing.data", "outgoing.dataRaw"];
|
|
40
|
-
export type TExpectationOperatorObjectLocation = 'state' | 'incoming.body' | 'incoming.headers' | 'incoming.query' | 'outgoing.data' | 'outgoing.headers';
|
|
39
|
+
export declare const LExpectationOperatorLocation: readonly ["container", "options", "error", "delay", "state", "seed", "path", "method", "incoming.body", "incoming.bodyRaw", "incoming.query", "incoming.headers", "outgoing.status", "outgoing.headers", "outgoing.data", "outgoing.dataRaw"];
|
|
40
|
+
export type TExpectationOperatorObjectLocation = 'options' | 'state' | 'incoming.body' | 'incoming.headers' | 'incoming.query' | 'outgoing.data' | 'outgoing.headers';
|
|
41
41
|
export type TExpectationOperators = Omit<typeof operators, 'root'>;
|
|
42
|
-
export interface
|
|
43
|
-
|
|
44
|
-
|
|
42
|
+
export interface IExpectationOperatorContextInput extends PartialDeep<Pick<RequestContextSnapshot, 'incoming' | 'outgoing' | 'state'>> {
|
|
43
|
+
container?: object;
|
|
44
|
+
}
|
|
45
|
+
export interface IExpectationOperatorContext<TInput extends IExpectationOperatorContextInput = {}> {
|
|
46
|
+
options: RequestContextSnapshot['options'];
|
|
47
|
+
state: TInput['state'];
|
|
48
|
+
seed?: RequestContextSnapshot['seed'];
|
|
49
|
+
storage: ContainersStorage<NonNullable<TInput['container']>>;
|
|
50
|
+
container?: Container<NonNullable<TInput['container']>>;
|
|
51
|
+
incoming: TInput['incoming'] extends undefined ? RequestContextSnapshot['incoming'] : RequestContextSnapshot['incoming'] & TInput['incoming'];
|
|
52
|
+
outgoing: TInput['outgoing'] extends undefined ? RequestContextSnapshot['outgoing'] : NonNullable<RequestContextSnapshot['outgoing']> & TInput['outgoing'];
|
|
45
53
|
}
|
|
46
54
|
type ConvertExpectationLocationToContextPath<TLocation extends TExpectationOperatorLocation> = TLocation extends 'path' | 'method' | 'error' | 'delay' ? {
|
|
47
55
|
path: 'incoming.path';
|
|
@@ -50,10 +58,10 @@ type ConvertExpectationLocationToContextPath<TLocation extends TExpectationOpera
|
|
|
50
58
|
method: 'incoming.method';
|
|
51
59
|
}[TLocation] : TLocation;
|
|
52
60
|
export type ExtractExpectationContextValueByLocation<TContext extends object, TLocation extends TExpectationOperatorLocation, T = ExtractObjectValueByPath<TContext, ConvertExpectationLocationToContextPath<TLocation>>, U = ExtractObjectValueByPath<IExpectationOperatorContext, ConvertExpectationLocationToContextPath<TLocation>>> = Exclude<T, never> extends never ? Exclude<U, never> extends never ? any : U : T;
|
|
53
|
-
export type ExtractExpectationContextValue<TContext extends
|
|
54
|
-
export type CompileExpectationOperatorValue<TContext extends
|
|
55
|
-
export type CompileExpectationOperatorValueWithPredicate<TContext extends
|
|
56
|
-
export interface IExpectationOperatorsSchema<TContext extends
|
|
61
|
+
export type ExtractExpectationContextValue<TContext extends IExpectationOperatorContext<any>, TLocation extends TExpectationOperatorLocation, TPath extends string | void = void, T = ExtractExpectationContextValueByLocation<TContext, TLocation>, U = TPath extends string ? T extends object ? ExtractObjectValueByPath<T, TPath> : any : T> = Exclude<U, never> extends never ? any : U;
|
|
62
|
+
export type CompileExpectationOperatorValue<TContext extends IExpectationOperatorContext<any>, TLocation extends TExpectationOperatorLocation, TProvided = void, T = ExtractExpectationContextValue<TContext, TLocation>> = Exclude<TProvided, void> extends never ? T : TProvided;
|
|
63
|
+
export type CompileExpectationOperatorValueWithPredicate<TContext extends IExpectationOperatorContext<any>, TLocation extends TExpectationOperatorLocation, TProvided = void, T = CompileExpectationOperatorValue<TContext, TLocation, TProvided>> = T extends object ? (T | object) : T;
|
|
64
|
+
export interface IExpectationOperatorsSchema<TContext extends IExpectationOperatorContext<any> = IExpectationOperatorContext<any>, TLocation extends TExpectationOperatorLocation = TExpectationOperatorLocation, TValue = void> {
|
|
57
65
|
$and?: AndExpectationOperator<TContext, TLocation, TValue>['TSchema'];
|
|
58
66
|
$or?: OrExpectationOperator<TContext, TLocation, TValue>['TSchema'];
|
|
59
67
|
$not?: NotExpectationOperator<TContext, TLocation, TValue>['TSchema'];
|
|
@@ -61,25 +69,31 @@ export interface IExpectationOperatorsSchema<TContext extends PartialDeep<IExpec
|
|
|
61
69
|
$switch?: SwitchExpectationOperator<TContext, TLocation, TValue, TLocation, TValue>['TSchema'];
|
|
62
70
|
$set?: SetExpectationOperator<TContext, TLocation, TValue>['TSchema'];
|
|
63
71
|
$has?: HasExpectationOperator<TContext, TLocation, TValue>['TSchema'];
|
|
64
|
-
$merge?: MergeExpectationOperator<TContext, TLocation, TValue>['TSchema'];
|
|
72
|
+
$merge?: MergeExpectationOperator<TContext, Extract<TLocation, TExpectationOperatorObjectLocation>, TValue>['TSchema'];
|
|
65
73
|
$remove?: RemoveExpectationOperator<TContext, TLocation>['TSchema'];
|
|
66
74
|
$exec?: ExecExpectationOperator<TContext>['TSchema'];
|
|
67
75
|
}
|
|
68
|
-
export interface IExpectationSchema<TContext extends
|
|
76
|
+
export interface IExpectationSchema<TContext extends IExpectationOperatorContext<any> = IExpectationOperatorContext<any>> {
|
|
69
77
|
request?: IExpectationOperatorsSchema<TContext>;
|
|
70
78
|
response?: IExpectationOperatorsSchema<TContext>;
|
|
71
79
|
forward?: {
|
|
72
80
|
url?: string;
|
|
73
81
|
baseUrl?: string;
|
|
74
82
|
timeout?: number;
|
|
83
|
+
options?: {
|
|
84
|
+
host?: 'origin';
|
|
85
|
+
cache?: Pick<TContext['options']['cache'], 'key' | 'prefix' | 'ttl'> & {
|
|
86
|
+
storage?: 'redis';
|
|
87
|
+
};
|
|
88
|
+
};
|
|
75
89
|
proxy?: AxiosProxyConfig & {
|
|
76
90
|
protocol: TRequestProtocol;
|
|
77
91
|
};
|
|
78
92
|
};
|
|
79
93
|
}
|
|
80
94
|
export type IExpectationOperatorExecMode = 'match' | 'manipulate';
|
|
81
|
-
export interface IExpectationOperatorExecUtils<T extends
|
|
82
|
-
context:
|
|
95
|
+
export interface IExpectationOperatorExecUtils<T extends IExpectationOperatorContext<any>> {
|
|
96
|
+
context: T;
|
|
83
97
|
logger: Logger;
|
|
84
98
|
mode: IExpectationOperatorExecMode;
|
|
85
99
|
meta: MetaContext;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/expectations/types.ts"],"names":[],"mappings":"AAAA,OAAO,K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ge', '$exec', '$has'
|
|
|
6
6
|
exports.LExpectationMetaTagLocation = ['path', 'method', 'outgoing.status'];
|
|
7
7
|
;
|
|
8
8
|
exports.LExpectationOperatorLocation = [
|
|
9
|
+
'container',
|
|
10
|
+
'options',
|
|
9
11
|
'error',
|
|
10
12
|
'delay',
|
|
11
13
|
'state',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/expectations/types.ts"],"names":[],"mappings":";;;AAwBa,QAAA,gBAAgB,GAAU,CAAC,MAAM,CAAC,CAAC;AAGnC,QAAA,wBAAwB,GAAU,CAAC,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;AAGjF,QAAA,2BAA2B,GAAU,CAAC,MAAM,EAAE,QAAQ,EAAE,iBAAiB,CAAC,CAAC;AASvF,CAAC;AAKW,QAAA,4BAA4B,GAAU;IACjD,OAAO;IACP,OAAO;IACP,OAAO;IACP,MAAM;IAEN,MAAM;IACN,QAAQ;IACR,eAAe;IACf,kBAAkB;IAClB,gBAAgB;IAChB,kBAAkB;IAClB,iBAAiB;IACjB,kBAAkB;IAClB,eAAe;IACf,kBAAkB;CACnB,CAAC;
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/expectations/types.ts"],"names":[],"mappings":";;;AAwBa,QAAA,gBAAgB,GAAU,CAAC,MAAM,CAAC,CAAC;AAGnC,QAAA,wBAAwB,GAAU,CAAC,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;AAGjF,QAAA,2BAA2B,GAAU,CAAC,MAAM,EAAE,QAAQ,EAAE,iBAAiB,CAAC,CAAC;AASvF,CAAC;AAKW,QAAA,4BAA4B,GAAU;IACjD,WAAW;IACX,SAAS;IACT,OAAO;IACP,OAAO;IACP,OAAO;IACP,MAAM;IAEN,MAAM;IACN,QAAQ;IACR,eAAe;IACf,kBAAkB;IAClB,gBAAgB;IAChB,kBAAkB;IAClB,iBAAiB;IACjB,kBAAkB;IAClB,eAAe;IACf,kBAAkB;CACnB,CAAC;AAmCC,CAAC;AA2DH,CAAC;AAwBD,CAAC"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { PartialDeep } from '../types';
|
|
2
1
|
import { IExpectationSchema, IExpectationOperatorContext, TExpectationOperatorLocation } from './types';
|
|
3
2
|
type TBaseExtractedContext = {
|
|
4
3
|
parent: object;
|
|
@@ -14,8 +13,8 @@ type TExtractedContext = (TBaseExtractedContext & {
|
|
|
14
13
|
value?: number;
|
|
15
14
|
type: 'number';
|
|
16
15
|
});
|
|
17
|
-
export declare const checkIsLocationInContext: (location: TExpectationOperatorLocation, context:
|
|
18
|
-
export declare const extractContextByLocation: (location: TExpectationOperatorLocation, context:
|
|
19
|
-
export declare const introspectExpectationOperatorsSchema: <T extends object = IExpectationSchema<
|
|
16
|
+
export declare const checkIsLocationInContext: (location: TExpectationOperatorLocation, context: IExpectationOperatorContext<any>) => boolean;
|
|
17
|
+
export declare const extractContextByLocation: (location: TExpectationOperatorLocation, context: IExpectationOperatorContext<any>) => TExtractedContext | null;
|
|
18
|
+
export declare const introspectExpectationOperatorsSchema: <T extends object = IExpectationSchema<IExpectationOperatorContext<any>>, K extends keyof T = keyof T>(schema: T, handler: (key: K, schema: T, path: string) => unknown, location?: string) => void;
|
|
20
19
|
export {};
|
|
21
20
|
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/expectations/utils.ts"],"names":[],"mappings":"AAEA,OAAO,
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/expectations/utils.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,kBAAkB,EAGlB,2BAA2B,EAC3B,4BAA4B,EAC7B,MAAM,SAAS,CAAC;AAEjB,KAAK,qBAAqB,GAAG;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,CAAC;AAC7D,KAAK,iBAAiB,GAClB,CAAC,qBAAqB,GAAG;IAAE,KAAK,CAAC,EAAE,OAAO,CAAC;IAAC,IAAI,EAAE,QAAQ,CAAA;CAAE,CAAC,GAC7D,CAAC,qBAAqB,GAAG;IAAE,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,QAAQ,CAAA;CAAE,CAAC,GAC5D,CAAC,qBAAqB,GAAG;IAAE,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,QAAQ,CAAA;CAAE,CAAC,CAAC;AAEjE,eAAO,MAAM,wBAAwB,aACzB,4BAA4B,WAC7B,2BAA2B,CAAC,GAAG,CAAC,KACxC,OASF,CAAA;AAED,eAAO,MAAM,wBAAwB,aACzB,4BAA4B,WAC7B,2BAA2B,CAAC,GAAG,CAAC,KACxC,iBAAiB,GAAG,IAoHtB,CAAA;AAED,eAAO,MAAM,oCAAoC,GAAI,CAAC,SAAS,MAAM,yDAAuB,CAAC,SAAS,MAAM,CAAC,oBACnG,CAAC,WACA,CAAC,GAAG,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,KAAK,OAAO,aAC3C,MAAM,KACf,IAUF,CAAA"}
|
|
@@ -102,6 +102,18 @@ const extractContextByLocation = (location, context) => {
|
|
|
102
102
|
parent: context,
|
|
103
103
|
value: context.state,
|
|
104
104
|
};
|
|
105
|
+
case 'options': return {
|
|
106
|
+
key: 'options',
|
|
107
|
+
type: 'object',
|
|
108
|
+
parent: context,
|
|
109
|
+
value: context.options,
|
|
110
|
+
};
|
|
111
|
+
case 'container': return {
|
|
112
|
+
key: 'container',
|
|
113
|
+
type: 'object',
|
|
114
|
+
parent: context,
|
|
115
|
+
value: context.container,
|
|
116
|
+
};
|
|
105
117
|
default: return null;
|
|
106
118
|
}
|
|
107
119
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../src/expectations/utils.ts"],"names":[],"mappings":";;;;;;AAAA,oDAAuB;
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../src/expectations/utils.ts"],"names":[],"mappings":";;;;;;AAAA,oDAAuB;AAEvB,mCAMiB;AAQV,MAAM,wBAAwB,GAAG,CACtC,QAAsC,EACtC,OAAyC,EAChC,EAAE;IACX,QAAO,QAAQ,EAAE,CAAC;QAChB,KAAK,OAAO,CAAC;QACb,KAAK,OAAO,CAAC;QACb,KAAK,QAAQ,CAAC;QACd,KAAK,MAAM,CAAC,CAAC,OAAO,gBAAC,CAAC,GAAG,CAAC,OAAO,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;QAEtD,OAAO,CAAC,CAAC,OAAO,gBAAC,CAAC,GAAG,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;IAC3C,CAAC;AACH,CAAC,CAAA;AAZY,QAAA,wBAAwB,4BAYpC;AAEM,MAAM,wBAAwB,GAAG,CACtC,QAAsC,EACtC,OAAyC,EACf,EAAE;IAC5B,QAAO,QAAQ,EAAE,CAAC;QAChB,KAAK,MAAM,CAAC,CAAC,OAAO;YAClB,GAAG,EAAE,eAAe;YACpB,IAAI,EAAE,QAAQ;YACd,MAAM,EAAE,OAAO;YACf,KAAK,EAAE,OAAO,CAAC,QAAQ,EAAE,IAAI;SAC9B,CAAC;QAEF,KAAK,QAAQ,CAAC,CAAC,OAAO;YACpB,GAAG,EAAE,iBAAiB;YACtB,IAAI,EAAE,QAAQ;YACd,MAAM,EAAE,OAAO;YACf,KAAK,EAAE,OAAO,CAAC,QAAQ,EAAE,MAAM;SAChC,CAAC;QAEF,KAAK,eAAe,CAAC,CAAC,OAAO;YAC3B,GAAG,EAAE,eAAe;YACpB,IAAI,EAAE,QAAQ;YACd,MAAM,EAAE,OAAO;YACf,KAAK,EAAE,OAAO,CAAC,QAAQ,EAAE,IAAI;SAC9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M,IAAI,GAAG,QAAQ,CAAC,CAAC,CAAC,GAAG,QAAQ,IAAI,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;QAEnE,OAAO,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,CAAC,CAAC;QAE3B,IAAI,gBAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,gCAAwB,CAAC,QAAQ,CAA2B,GAAG,CAAC,EAAE,CAAC;YACjG,IAAA,4CAAoC,EAAI,MAAM,CAAC,GAAG,CAAC,EAAE,OAAO,EAAE,IAAI,CAAC,CAAC;QACtE,CAAC;IACH,CAAC,CAAC,CAAC;AACL,CAAC,CAAA;AAdY,QAAA,oCAAoC,wCAchD"}
|
|
@@ -15,6 +15,7 @@ declare const _default: Endpoint<{
|
|
|
15
15
|
logger: {
|
|
16
16
|
level: import("../..").TLoggerLevel;
|
|
17
17
|
};
|
|
18
|
+
redis: import("ioredis").RedisOptions;
|
|
18
19
|
}, {}> & {
|
|
19
20
|
http: {
|
|
20
21
|
readonly method: "GET";
|
|
@@ -41,6 +42,7 @@ declare const _default: Endpoint<{
|
|
|
41
42
|
logger: {
|
|
42
43
|
level: import("../..").TLoggerLevel;
|
|
43
44
|
};
|
|
45
|
+
redis: import("ioredis").RedisOptions;
|
|
44
46
|
}> | import("../models").WsRequestContext<{
|
|
45
47
|
statics: {
|
|
46
48
|
public: {
|
|
@@ -57,6 +59,7 @@ declare const _default: Endpoint<{
|
|
|
57
59
|
logger: {
|
|
58
60
|
level: import("../..").TLoggerLevel;
|
|
59
61
|
};
|
|
62
|
+
redis: import("ioredis").RedisOptions;
|
|
60
63
|
}>) & {
|
|
61
64
|
incoming: import("../..").OmitPartial<{
|
|
62
65
|
body: void | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.get.endpoint.d.ts","sourceRoot":"","sources":["../../../../src/server/endpoints/config.get.endpoint.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC
|
|
1
|
+
{"version":3,"file":"config.get.endpoint.d.ts","sourceRoot":"","sources":["../../../../src/server/endpoints/config.get.endpoint.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAErC,wBAIgE"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Expectation, TBuildExpectationConfiguration } from '../../expectations';
|
|
2
2
|
import { Endpoint } from '../models';
|
|
3
|
-
declare const _default: Endpoint<Pick<Expectation<{}
|
|
3
|
+
declare const _default: Endpoint<Pick<Expectation<{}, import("../../expectations").IExpectationOperatorContext<{}>>, "name" | "type" | "schema" | "isEnabled" | "id" | "meta">, {
|
|
4
4
|
body: TBuildExpectationConfiguration<any>;
|
|
5
5
|
}> & {
|
|
6
6
|
http: {
|
|
@@ -8,7 +8,7 @@ declare const _default: Endpoint<Pick<Expectation<{}>, "name" | "type" | "schema
|
|
|
8
8
|
readonly path: "/_mock/expectations";
|
|
9
9
|
};
|
|
10
10
|
} & {
|
|
11
|
-
handler: ({ reply, incoming, server }: (import("../models").HttpRequestContext<Pick<Expectation<{}
|
|
11
|
+
handler: ({ reply, incoming, server }: (import("../models").HttpRequestContext<Pick<Expectation<{}, import("../../expectations").IExpectationOperatorContext<{}>>, "name" | "type" | "schema" | "isEnabled" | "id" | "meta">> | import("../models").WsRequestContext<Pick<Expectation<{}, import("../../expectations").IExpectationOperatorContext<{}>>, "name" | "type" | "schema" | "isEnabled" | "id" | "meta">>) & {
|
|
12
12
|
incoming: import("../..").OmitPartial<{
|
|
13
13
|
body: TBuildExpectationConfiguration<any>;
|
|
14
14
|
query: void | undefined;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Expectation } from '../../expectations';
|
|
2
2
|
import { Endpoint } from '../models';
|
|
3
|
-
declare const _default: Endpoint<Pick<Expectation<{}
|
|
3
|
+
declare const _default: Endpoint<Pick<Expectation<{}, import("../../expectations").IExpectationOperatorContext<{}>>, "name" | "type" | "schema" | "isEnabled" | "id" | "meta">[], {}> & {
|
|
4
4
|
http: {
|
|
5
5
|
readonly method: "GET";
|
|
6
6
|
readonly path: "/_mock/expectations";
|
|
@@ -10,7 +10,7 @@ declare const _default: Endpoint<Pick<Expectation<{}>, "name" | "type" | "schema
|
|
|
10
10
|
readonly path: "expectations:get";
|
|
11
11
|
};
|
|
12
12
|
} & {
|
|
13
|
-
handler: ({ reply, server }: (import("../models").HttpRequestContext<Pick<Expectation<{}
|
|
13
|
+
handler: ({ reply, server }: (import("../models").HttpRequestContext<Pick<Expectation<{}, import("../../expectations").IExpectationOperatorContext<{}>>, "name" | "type" | "schema" | "isEnabled" | "id" | "meta">[]> | import("../models").WsRequestContext<Pick<Expectation<{}, import("../../expectations").IExpectationOperatorContext<{}>>, "name" | "type" | "schema" | "isEnabled" | "id" | "meta">[]>) & {
|
|
14
14
|
incoming: import("../..").OmitPartial<{
|
|
15
15
|
body: void | undefined;
|
|
16
16
|
query: void | undefined;
|
|
@@ -5,5 +5,5 @@ exports.default = models_1.Endpoint
|
|
|
5
5
|
.build()
|
|
6
6
|
.bindToHttp({ method: 'GET', path: '/_mock/expectations' })
|
|
7
7
|
.bindToWs({ path: 'expectations:get' })
|
|
8
|
-
.assignHandler(({ reply, server }) => reply.ok([...server.
|
|
8
|
+
.assignHandler(({ reply, server }) => reply.ok([...server.storages.expectations.values()].map((expectation) => expectation.toPlain())));
|
|
9
9
|
//# sourceMappingURL=expectations.get-list.endpoint.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"expectations.get-list.endpoint.js","sourceRoot":"","sources":["../../../../src/server/endpoints/expectations.get-list.endpoint.ts"],"names":[],"mappings":";;AACA,sCAAqC;AAErC,kBAAe,iBAAQ;KACpB,KAAK,EAA2B;KAChC,UAAU,CAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,qBAAqB,EAAE,CAAC;KACjE,QAAQ,CAAQ,EAAE,IAAI,EAAE,kBAAkB,EAAE,CAAC;KAC7C,aAAa,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,EAAE,CACnC,KAAK,CAAC,EAAE,CACN,CAAC,GAAG,MAAM,CAAC,
|
|
1
|
+
{"version":3,"file":"expectations.get-list.endpoint.js","sourceRoot":"","sources":["../../../../src/server/endpoints/expectations.get-list.endpoint.ts"],"names":[],"mappings":";;AACA,sCAAqC;AAErC,kBAAe,iBAAQ;KACpB,KAAK,EAA2B;KAChC,UAAU,CAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,qBAAqB,EAAE,CAAC;KACjE,QAAQ,CAAQ,EAAE,IAAI,EAAE,kBAAkB,EAAE,CAAC;KAC7C,aAAa,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,EAAE,CACnC,KAAK,CAAC,EAAE,CACN,CAAC,GAAG,MAAM,CAAC,QAAQ,CAAC,YAAY,CAAC,MAAM,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,WAAW,EAAE,EAAE,CAAC,WAAW,CAAC,OAAO,EAAE,CAAC,CACvF,CACF,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Expectation, TBuildExpectationConfiguration } from '../../expectations';
|
|
2
2
|
import { Endpoint } from '../models';
|
|
3
|
-
declare const _default: Endpoint<Pick<Expectation<{}
|
|
3
|
+
declare const _default: Endpoint<Pick<Expectation<{}, import("../../expectations").IExpectationOperatorContext<{}>>, "name" | "type" | "schema" | "isEnabled" | "id" | "meta">, {
|
|
4
4
|
body: {
|
|
5
5
|
id: string;
|
|
6
6
|
set: Partial<Omit<TBuildExpectationConfiguration<any>, "type">>;
|
|
@@ -15,7 +15,7 @@ declare const _default: Endpoint<Pick<Expectation<{}>, "name" | "type" | "schema
|
|
|
15
15
|
readonly path: "expectations:update";
|
|
16
16
|
};
|
|
17
17
|
} & {
|
|
18
|
-
handler: ({ reply, incoming, server }: (import("../models").HttpRequestContext<Pick<Expectation<{}
|
|
18
|
+
handler: ({ reply, incoming, server }: (import("../models").HttpRequestContext<Pick<Expectation<{}, import("../../expectations").IExpectationOperatorContext<{}>>, "name" | "type" | "schema" | "isEnabled" | "id" | "meta">> | import("../models").WsRequestContext<Pick<Expectation<{}, import("../../expectations").IExpectationOperatorContext<{}>>, "name" | "type" | "schema" | "isEnabled" | "id" | "meta">>) & {
|
|
19
19
|
incoming: import("../..").OmitPartial<{
|
|
20
20
|
body: {
|
|
21
21
|
id: string;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { History } from '../history';
|
|
2
2
|
import { Endpoint } from '../models';
|
|
3
|
-
declare const _default: Endpoint<(Pick<History, "
|
|
3
|
+
declare const _default: Endpoint<(Pick<History, "status" | "id" | "meta"> & {
|
|
4
|
+
snapshot: import("../models").RequestContextSnapshot["TPlain"];
|
|
4
5
|
expectation?: import("../../expectations").Expectation<any>["TPlain"];
|
|
5
6
|
})[], {}> & {
|
|
6
7
|
http: {
|
|
@@ -12,9 +13,11 @@ declare const _default: Endpoint<(Pick<History, "request" | "id" | "meta" | "for
|
|
|
12
13
|
readonly path: "history:get";
|
|
13
14
|
};
|
|
14
15
|
} & {
|
|
15
|
-
handler: ({ reply, server }: (import("../models").HttpRequestContext<(Pick<History, "
|
|
16
|
+
handler: ({ reply, server }: (import("../models").HttpRequestContext<(Pick<History, "status" | "id" | "meta"> & {
|
|
17
|
+
snapshot: import("../models").RequestContextSnapshot["TPlain"];
|
|
16
18
|
expectation?: import("../../expectations").Expectation<any>["TPlain"];
|
|
17
|
-
})[]> | import("../models").WsRequestContext<(Pick<History, "
|
|
19
|
+
})[]> | import("../models").WsRequestContext<(Pick<History, "status" | "id" | "meta"> & {
|
|
20
|
+
snapshot: import("../models").RequestContextSnapshot["TPlain"];
|
|
18
21
|
expectation?: import("../../expectations").Expectation<any>["TPlain"];
|
|
19
22
|
})[]>) & {
|
|
20
23
|
incoming: import("../..").OmitPartial<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"history.get-list.endpoint.d.ts","sourceRoot":"","sources":["../../../../src/server/endpoints/history.get-list.endpoint.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC
|
|
1
|
+
{"version":3,"file":"history.get-list.endpoint.d.ts","sourceRoot":"","sources":["../../../../src/server/endpoints/history.get-list.endpoint.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;AAErC,wBAUI"}
|
|
@@ -5,7 +5,7 @@ exports.default = models_1.Endpoint
|
|
|
5
5
|
.build()
|
|
6
6
|
.bindToHttp({ method: 'GET', path: '/_mock/history' })
|
|
7
7
|
.bindToWs({ path: 'history:get' })
|
|
8
|
-
.assignHandler(({ reply, server }) => reply.ok([...server.
|
|
8
|
+
.assignHandler(({ reply, server }) => reply.ok([...server.storages.history.values()]
|
|
9
9
|
.sort((a, b) => b.meta.requestedAt - a.meta.requestedAt)
|
|
10
10
|
.map((history) => history.toPlain())));
|
|
11
11
|
//# sourceMappingURL=history.get-list.endpoint.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"history.get-list.endpoint.js","sourceRoot":"","sources":["../../../../src/server/endpoints/history.get-list.endpoint.ts"],"names":[],"mappings":";;AACA,sCAAqC;AAErC,kBAAe,iBAAQ;KACpB,KAAK,EAAuB;KAC5B,UAAU,CAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,gBAAgB,EAAE,CAAC;KAC5D,QAAQ,CAAQ,EAAE,IAAI,EAAE,aAAa,EAAE,CAAC;KACxC,aAAa,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,EAAE,CACnC,KAAK,CAAC,EAAE,CACN,CAAC,GAAG,MAAM,CAAC,
|
|
1
|
+
{"version":3,"file":"history.get-list.endpoint.js","sourceRoot":"","sources":["../../../../src/server/endpoints/history.get-list.endpoint.ts"],"names":[],"mappings":";;AACA,sCAAqC;AAErC,kBAAe,iBAAQ;KACpB,KAAK,EAAuB;KAC5B,UAAU,CAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,gBAAgB,EAAE,CAAC;KAC5D,QAAQ,CAAQ,EAAE,IAAI,EAAE,aAAa,EAAE,CAAC;KACxC,aAAa,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,EAAE,CACnC,KAAK,CAAC,EAAE,CACN,CAAC,GAAG,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,MAAM,EAAE,CAAC;KAClC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,WAAW,GAAG,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC;KACvD,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC,CACvC,CACF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/server/history/index.ts"],"names":[],"mappings":"AAAA,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/server/history/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC"}
|
|
@@ -14,7 +14,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./types"), exports);
|
|
18
17
|
__exportStar(require("./storage"), exports);
|
|
19
18
|
__exportStar(require("./model"), exports);
|
|
20
19
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/server/history/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/server/history/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4CAA0B;AAC1B,0CAAwB"}
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type { HttpRequestContext } from '../models';
|
|
1
|
+
import type { RequestContextSnapshot } from '../models';
|
|
3
2
|
import type { Expectation } from '../../expectations';
|
|
4
3
|
export declare class History {
|
|
5
|
-
|
|
6
|
-
TPlain: Pick<History, 'id' | '
|
|
4
|
+
snapshot: RequestContextSnapshot;
|
|
5
|
+
TPlain: Pick<History, 'id' | 'status' | 'meta'> & {
|
|
6
|
+
snapshot: RequestContextSnapshot['TPlain'];
|
|
7
7
|
expectation?: Expectation<any>['TPlain'];
|
|
8
8
|
};
|
|
9
9
|
id: string;
|
|
10
|
+
status: "pending" | "finished";
|
|
10
11
|
expectation?: Expectation<any>;
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
meta: {
|
|
13
|
+
requestedAt: number;
|
|
14
|
+
updatedAt: number;
|
|
15
|
+
};
|
|
16
|
+
constructor(snapshot: RequestContextSnapshot);
|
|
17
|
+
switchStatus(status: History['status']): this;
|
|
15
18
|
assignExpectation(expectation: NonNullable<History['expectation']>): this;
|
|
16
|
-
assignError(error: NonNullable<IHistoryRequest['error']>): this;
|
|
17
|
-
assignOutgoing(outgoing: NonNullable<HttpRequestContext['outgoing']>): this;
|
|
18
|
-
extendForwarded(forwarded: Partial<NonNullable<History['forwaded']>>): this;
|
|
19
19
|
toPlain(): History['TPlain'];
|
|
20
|
-
static build(request: History['
|
|
20
|
+
static build(request: History['snapshot']): History;
|
|
21
21
|
}
|
|
22
22
|
//# sourceMappingURL=model.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"model.d.ts","sourceRoot":"","sources":["../../../../src/server/history/model.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"model.d.ts","sourceRoot":"","sources":["../../../../src/server/history/model.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,WAAW,CAAC;AACxD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAItD,qBAAa,OAAO;IAgBC,QAAQ,EAAE,sBAAsB;IAf5C,MAAM,EAAG,IAAI,CAAC,OAAO,EAAE,IAAI,GAAG,QAAQ,GAAG,MAAM,CAAC,GAAG;QACxD,QAAQ,EAAE,sBAAsB,CAAC,QAAQ,CAAC,CAAC;QAC3C,WAAW,CAAC,EAAE,WAAW,CAAC,GAAG,CAAC,CAAC,QAAQ,CAAC,CAAC;KAC1C,CAAC;IAEK,EAAE,EAAE,MAAM,CAAY;IAEtB,MAAM,yBAA2C;IACjD,WAAW,CAAC,EAAE,WAAW,CAAC,GAAG,CAAC,CAAC;IAE/B,IAAI;;;MAGT;gBAEiB,QAAQ,EAAE,sBAAsB;IAE5C,YAAY,CAAC,MAAM,EAAE,OAAO,CAAC,QAAQ,CAAC,GAAG,IAAI;IAO7C,iBAAiB,CAAC,WAAW,EAAE,WAAW,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC,GAAG,IAAI;IAKzE,OAAO,IAAI,OAAO,CAAC,QAAQ,CAAC;IAWnC,MAAM,CAAC,KAAK,CAAC,OAAO,EAAE,OAAO,CAAC,UAAU,CAAC;CAG1C"}
|
|
@@ -2,47 +2,32 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.History = void 0;
|
|
4
4
|
const uuid_1 = require("uuid");
|
|
5
|
+
const utils_1 = require("../../utils");
|
|
5
6
|
class History {
|
|
6
|
-
constructor(
|
|
7
|
-
this.
|
|
7
|
+
constructor(snapshot) {
|
|
8
|
+
this.snapshot = snapshot;
|
|
8
9
|
this.id = (0, uuid_1.v4)();
|
|
10
|
+
this.status = (0, utils_1.cast)('pending');
|
|
9
11
|
this.meta = {
|
|
10
|
-
state: 'pending',
|
|
11
12
|
requestedAt: Date.now(),
|
|
12
13
|
updatedAt: Date.now(),
|
|
13
14
|
};
|
|
14
15
|
}
|
|
15
|
-
|
|
16
|
+
switchStatus(status) {
|
|
16
17
|
this.meta.updatedAt = Date.now();
|
|
17
|
-
this.
|
|
18
|
+
this.status = status;
|
|
18
19
|
return this;
|
|
19
20
|
}
|
|
20
21
|
assignExpectation(expectation) {
|
|
21
22
|
this.meta.updatedAt = Date.now();
|
|
22
23
|
return Object.assign(this, { expectation });
|
|
23
24
|
}
|
|
24
|
-
assignError(error) {
|
|
25
|
-
this.meta.updatedAt = Date.now();
|
|
26
|
-
this.request.error = error;
|
|
27
|
-
return this;
|
|
28
|
-
}
|
|
29
|
-
assignOutgoing(outgoing) {
|
|
30
|
-
this.meta.updatedAt = Date.now();
|
|
31
|
-
this.request.outgoing = outgoing;
|
|
32
|
-
return this;
|
|
33
|
-
}
|
|
34
|
-
extendForwarded(forwarded) {
|
|
35
|
-
this.meta.updatedAt = Date.now();
|
|
36
|
-
return Object.assign(this, {
|
|
37
|
-
forwarded: Object.assign((this.forwaded ?? {}), forwarded)
|
|
38
|
-
});
|
|
39
|
-
}
|
|
40
25
|
toPlain() {
|
|
41
26
|
return {
|
|
42
27
|
id: this.id,
|
|
43
28
|
meta: this.meta,
|
|
44
|
-
|
|
45
|
-
|
|
29
|
+
status: this.status,
|
|
30
|
+
snapshot: this.snapshot.toPlain(),
|
|
46
31
|
expectation: this.expectation?.toPlain(),
|
|
47
32
|
};
|
|
48
33
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"model.js","sourceRoot":"","sources":["../../../../src/server/history/model.ts"],"names":[],"mappings":";;;AAAA,+BAAoC;
|
|
1
|
+
{"version":3,"file":"model.js","sourceRoot":"","sources":["../../../../src/server/history/model.ts"],"names":[],"mappings":";;;AAAA,+BAAoC;AAKpC,uCAAmC;AAEnC,MAAa,OAAO;IAgBlB,YAAmB,QAAgC;QAAhC,aAAQ,GAAR,QAAQ,CAAwB;QAV5C,OAAE,GAAW,IAAA,SAAM,GAAE,CAAC;QAEtB,WAAM,GAAG,IAAA,YAAI,EAAyB,SAAS,CAAC,CAAC;QAGjD,SAAI,GAAG;YACZ,WAAW,EAAE,IAAI,CAAC,GAAG,EAAE;YACvB,SAAS,EAAE,IAAI,CAAC,GAAG,EAAE;SACtB,CAAC;IAEoD,CAAC;IAEhD,YAAY,CAAC,MAAyB;QAC3C,IAAI,CAAC,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;QACjC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QAErB,OAAO,IAAI,CAAC;IACd,CAAC;IAEM,iBAAiB,CAAC,WAAgD;QACvE,IAAI,CAAC,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;QACjC,OAAO,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,EAAE,WAAW,EAAE,CAAC,CAAC;IAC9C,CAAC;IAEM,OAAO;QACZ,OAAO;YACL,EAAE,EAAE,IAAI,CAAC,EAAE;YACX,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,MAAM,EAAE,IAAI,CAAC,MAAM;YAEnB,QAAQ,EAAE,IAAI,CAAC,QAAQ,CAAC,OAAO,EAAE;YACjC,WAAW,EAAE,IAAI,CAAC,WAAW,EAAE,OAAO,EAAE;SACzC,CAAC;IACJ,CAAC;IAED,MAAM,CAAC,KAAK,CAAC,OAA4B;QACvC,OAAO,IAAI,OAAO,CAAC,OAAO,CAAC,CAAC;IAC9B,CAAC;CACF;AA5CD,0BA4CC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"storage.d.ts","sourceRoot":"","sources":["../../../../src/server/history/storage.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAElC,qBAAa,cAAe,SAAQ,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC;IACtD,OAAO,CAAC,GAAG,CAAgB;IAEpB,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC,
|
|
1
|
+
{"version":3,"file":"storage.d.ts","sourceRoot":"","sources":["../../../../src/server/history/storage.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAElC,qBAAa,cAAe,SAAQ,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC;IACtD,OAAO,CAAC,GAAG,CAAgB;IAEpB,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC,UAAU,CAAC,GAAG,OAAO;CAUvD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"storage.js","sourceRoot":"","sources":["../../../../src/server/history/storage.ts"],"names":[],"mappings":";;;;;;AAAA,0DAAkC;AAClC,mCAAkC;AAElC,MAAa,cAAe,SAAQ,GAAoB;IAAxD;;QACU,QAAG,GAAa,EAAE,CAAC;IAY7B,CAAC;IAVQ,QAAQ,CAAC,
|
|
1
|
+
{"version":3,"file":"storage.js","sourceRoot":"","sources":["../../../../src/server/history/storage.ts"],"names":[],"mappings":";;;;;;AAAA,0DAAkC;AAClC,mCAAkC;AAElC,MAAa,cAAe,SAAQ,GAAoB;IAAxD;;QACU,QAAG,GAAa,EAAE,CAAC;IAY7B,CAAC;IAVQ,QAAQ,CAAC,OAA4B;QAC1C,MAAM,OAAO,GAAG,eAAO,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;QACvC,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE,EAAE,OAAO,CAAC,CAAC;QAE9B,IAAI,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC,GAAG,gBAAM,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC,KAAK,EAAE,CAAC;YAC5D,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,EAAG,CAAC,CAAC;QACjC,CAAC;QAED,OAAO,OAAO,CAAC;IACjB,CAAC;CACF;AAbD,wCAaC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/server/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAkC,aAAa,EAAoB,MAAM,UAAU,CAAC;AAO3F,OAAO,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AA+C1D,qBAAa,UAAU;IAIF,OAAO,EAAE;QAC1B,IAAI,EAAE,MAAM,CAAC;QACb,IAAI,EAAE,MAAM,CAAC;KACd;IANM,SAAS,SAAsD;IAC/D,OAAO,gBAAyB;gBAEpB,OAAO,EAAE;QAC1B,IAAI,EAAE,MAAM,CAAC;QACb,IAAI,EAAE,MAAM,CAAC;KACd;IAED,IAAI,MAAM,8BAET;WAEY,KAAK,CAAC,OAAO,EAAE,UAAU,CAAC,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/server/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAkC,aAAa,EAAoB,MAAM,UAAU,CAAC;AAO3F,OAAO,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AA+C1D,qBAAa,UAAU;IAIF,OAAO,EAAE;QAC1B,IAAI,EAAE,MAAM,CAAC;QACb,IAAI,EAAE,MAAM,CAAC;KACd;IANM,SAAS,SAAsD;IAC/D,OAAO,gBAAyB;gBAEpB,OAAO,EAAE;QAC1B,IAAI,EAAE,MAAM,CAAC;QACb,IAAI,EAAE,MAAM,CAAC;KACd;IAED,IAAI,MAAM,8BAET;WAEY,KAAK,CAAC,OAAO,EAAE,UAAU,CAAC,SAAS,CAAC;CAsClD"}
|
package/lib/src/server/index.js
CHANGED
|
@@ -98,6 +98,12 @@ class MockServer {
|
|
|
98
98
|
logger.info(`GUI is available on [${server.authority}/_mock/gui]`);
|
|
99
99
|
resolve();
|
|
100
100
|
}));
|
|
101
|
+
setInterval(() => {
|
|
102
|
+
server.context.storages.containers.getExpired().forEach((container) => {
|
|
103
|
+
container.unbind();
|
|
104
|
+
logger.info(`Container [${container.link}] has unbinded by expiration of [${container.configuration.ttl}] seconds`);
|
|
105
|
+
});
|
|
106
|
+
}, 60 * 60 * 1000);
|
|
101
107
|
return server;
|
|
102
108
|
}
|
|
103
109
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/server/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+BAAqE;AACrE,yCAAmC;AACnC,oDAAuB;AAEvB,qCAA2F;AAC3F,kCAAsC;AACtC,sCAAmC;AACnC,qCAAkC;AAElC,2DAA6C;AAE7C,mCAA0D;AAAjD,0GAAA,gBAAgB,OAAA;AAAE,sGAAA,YAAY,OAAA;AAEvC,MAAM,MAAM,GAAG,eAAM,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;AAEtC,MAAM,gBAAgB,GAAwC;IAC5D,WAAW,CAAC,gBAAgB;IAC5B,WAAW,CAAC,kBAAkB;IAC9B,WAAW,CAAC,0BAA0B;IACtC,WAAW,CAAC,+BAA+B;IAC3C,WAAW,CAAC,iBAAiB;IAC7B,WAAW,CAAC,eAAe;IAC3B,WAAW,CAAC,iBAAiB;IAC7B,WAAW,CAAC,iBAAiB;IAC7B,WAAW,CAAC,eAAe;CAC5B,CAAC;AAEF,MAAM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IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,IAAI,EAAE,GAAG,EAAE;YAC3C,MAAM,CAAC,IAAI,CAAC,0BAA0B,MAAM,CAAC,SAAS,GAAG,CAAC,CAAC;YAC3D,MAAM,CAAC,IAAI,CAAC,wBAAwB,MAAM,CAAC,SAAS,aAAa,CAAC,CAAC;YAEnE,OAAO,EAAE,CAAC;QACZ,CAAC,CAAC,CACH,CAAC;QAEF,WAAW,CAAC,GAAG,EAAE;YACf,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAC,UAAU,EAAE,CAAC,OAAO,CAAC,CAAC,SAAS,EAAE,EAAE;gBACpE,SAAS,CAAC,MAAM,EAAE,CAAC;gBACnB,MAAM,CAAC,IAAI,CAAC,cAAc,SAAS,CAAC,IAAI,oCAAoC,SAAS,CAAC,aAAa,CAAC,GAAG,WAAW,CAAC,CAAC;YACtH,CAAC,CAAC,CAAC;QACL,CAAC,EAAE,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC,CAAC;QAEnB,OAAO,MAAM,CAAC;IAChB,CAAC;CACF;AAnDD,gCAmDC"}
|
|
@@ -1,23 +1,17 @@
|
|
|
1
1
|
import { Middleware } from '../models';
|
|
2
|
-
declare const _default: Middleware<
|
|
2
|
+
declare const _default: Middleware<never, import("../models").HttpRequestContext<unknown> & {
|
|
3
3
|
shared: import("../..").SetRequiredKeys<{
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
expectation?: import("../../expectations").Expectation<Pick<import("../models").HttpRequestContext, "incoming" | "outgoing">>;
|
|
7
|
-
manipulated?: import("../../expectations").IExpectationOperatorContext;
|
|
8
|
-
forwarded?: Pick<import("../models").HttpRequestContext, "incoming" | "outgoing">;
|
|
4
|
+
snapshot: import("../models").RequestContextSnapshot;
|
|
5
|
+
expectation?: import("../../expectations").Expectation<any>;
|
|
9
6
|
history?: import("../history").History;
|
|
10
|
-
},
|
|
7
|
+
}, never>;
|
|
11
8
|
}> & {
|
|
12
9
|
handler: import("../..").TFunction<unknown, [import("../models").HttpRequestContext<unknown> & {
|
|
13
10
|
shared: import("../..").SetRequiredKeys<{
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
expectation?: import("../../expectations").Expectation<Pick<import("../models").HttpRequestContext, "incoming" | "outgoing">>;
|
|
17
|
-
manipulated?: import("../../expectations").IExpectationOperatorContext;
|
|
18
|
-
forwarded?: Pick<import("../models").HttpRequestContext, "incoming" | "outgoing">;
|
|
11
|
+
snapshot: import("../models").RequestContextSnapshot;
|
|
12
|
+
expectation?: import("../../expectations").Expectation<any>;
|
|
19
13
|
history?: import("../history").History;
|
|
20
|
-
},
|
|
14
|
+
}, never>;
|
|
21
15
|
}, {
|
|
22
16
|
logger: import("../..").Logger;
|
|
23
17
|
}]>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"delay.middleware.d.ts","sourceRoot":"","sources":["../../../../src/server/middlewares/delay.middleware.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC
|
|
1
|
+
{"version":3,"file":"delay.middleware.d.ts","sourceRoot":"","sources":["../../../../src/server/middlewares/delay.middleware.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;;;;;;;;;;;;;;;;;;AAGvC,wBAOK"}
|