@kensio/yulin 0.1.1 → 0.1.2
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/service/cloudfront/factory/cloudfront-functions.factory.d.ts +1 -2
- package/dist/service/cloudfront/factory/cloudfront-functions.factory.d.ts.map +1 -1
- package/dist/service/cloudfront/factory/cloudfront-functions.factory.js.map +1 -1
- package/dist/service/cloudfront/globals.d.ts +22 -0
- package/dist/service/cloudfront/globals.d.ts.map +1 -0
- package/dist/service/cloudfront/globals.js +7 -0
- package/dist/service/cloudfront/globals.js.map +1 -0
- package/dist/service/cloudfront/index.d.ts +1 -1
- package/dist/service/cloudfront/index.d.ts.map +1 -1
- package/dist/service/cloudfront/typings/cloudfront-functions.namespace.d.ts +39 -0
- package/dist/service/cloudfront/typings/cloudfront-functions.namespace.d.ts.map +1 -0
- package/dist/service/cloudfront/typings/cloudfront-functions.namespace.js +2 -0
- package/dist/service/cloudfront/typings/cloudfront-functions.namespace.js.map +1 -0
- package/package.json +5 -1
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import type { CloudFrontEvent } from "../typings/cloudfront-functions.js";
|
|
2
1
|
import { VariantFactory } from "@kensio/part-factory";
|
|
3
2
|
/**
|
|
4
3
|
* Makes instances of the viewer-request CloudFrontEvent objects.
|
|
5
4
|
*/
|
|
6
|
-
export declare const cloudFrontViewerRequestEventFactory: VariantFactory<
|
|
5
|
+
export declare const cloudFrontViewerRequestEventFactory: VariantFactory<import("../index.js").CloudFrontFunction.Event>;
|
|
7
6
|
//# sourceMappingURL=cloudfront-functions.factory.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cloudfront-functions.factory.d.ts","sourceRoot":"","sources":["../../../../src/service/cloudfront/factory/cloudfront-functions.factory.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"cloudfront-functions.factory.d.ts","sourceRoot":"","sources":["../../../../src/service/cloudfront/factory/cloudfront-functions.factory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkB,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAoBtE;;GAEG;AACH,eAAO,MAAM,mCAAmC,gEAG5C,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cloudfront-functions.factory.js","sourceRoot":"","sources":["../../../../src/service/cloudfront/factory/cloudfront-functions.factory.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"cloudfront-functions.factory.js","sourceRoot":"","sources":["../../../../src/service/cloudfront/factory/cloudfront-functions.factory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtE,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAExC;;GAEG;AACH,MAAM,sBAAsB,GAAG,IAAI,cAAc,CAC/C,GAAG,EAAE,CAAC,CAAC;IACL,OAAO,EAAE;QACP,SAAS,EAAE,KAAK,CAAC,OAAO,CAAC,YAAY,CAAC;YACpC,gBAAgB;YAChB,iBAAiB;SAClB,CAAC;QACF,SAAS,EAAE,KAAK,CAAC,MAAM,CAAC,IAAI,EAAE;KAC/B;IACD,OAAO,EAAE,wBAAwB,CAAC,IAAI,EAAE;IACxC,MAAM,EAAE,EAAE,EAAE,EAAE,KAAK,CAAC,QAAQ,CAAC,IAAI,EAAE,EAAE;CACtC,CAAC,CACH,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,mCAAmC,GAC9C,IAAI,cAAc,CAA2B,sBAAsB,EAAE;IACnE,OAAO,EAAE,EAAE,SAAS,EAAE,gBAAgB,EAAE;CACzC,CAAC,CAAC;AAEL;;GAEG;AACH,MAAM,wBAAwB,GAAG,IAAI,cAAc,CACjD,GAAG,EAAE,CAAC,CAAC;IACL,OAAO,EAAE;QACP,SAAS,EAAE;YACT,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,IAAI,EAAE;SAC3B;KACF;IACD,OAAO,EAAE;QACP,MAAM,EAAE;YACN,KAAK,EACH,iEAAiE;SACpE;QACD,iBAAiB,EAAE;YACjB,KAAK,EAAE,gBAAgB;SACxB;QACD,IAAI,EAAE;YACJ,KAAK,EAAE,YAAY;SACpB;QACD,YAAY,EAAE;YACZ,KAAK,EAAE,KAAK,CAAC,QAAQ,CAAC,SAAS,EAAE;SAClC;KACF;IACD,MAAM,EAAE,KAAK,CAAC,QAAQ,CAAC,UAAU,EAAE;IACnC,WAAW,EAAE;QACX,IAAI,EAAE;YACJ,KAAK,EAAE,GAAG;SACX;KACF;IACD,GAAG,EAAE,cAAc;CACpB,CAAC,CACH,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Optional global types for CloudFront Functions code.
|
|
3
|
+
* This is helpful because CloudFront Function JS2 syntax does not support
|
|
4
|
+
* imports, so global types provide useful type information.
|
|
5
|
+
*/
|
|
6
|
+
import type { CloudFrontFunction as CloudFrontFunctionType } from "./typings/cloudfront-functions.namespace.js";
|
|
7
|
+
declare global {
|
|
8
|
+
namespace CloudFrontFunction {
|
|
9
|
+
type Value = CloudFrontFunctionType.Value;
|
|
10
|
+
type MultiValue = CloudFrontFunctionType.MultiValue;
|
|
11
|
+
type Headers = CloudFrontFunctionType.Headers;
|
|
12
|
+
type QueryString = CloudFrontFunctionType.QueryString;
|
|
13
|
+
type Cookies = CloudFrontFunctionType.Cookies;
|
|
14
|
+
type Request = CloudFrontFunctionType.Request;
|
|
15
|
+
type Response = CloudFrontFunctionType.Response;
|
|
16
|
+
type EventContext = CloudFrontFunctionType.EventContext;
|
|
17
|
+
type Viewer = CloudFrontFunctionType.Viewer;
|
|
18
|
+
type Event = CloudFrontFunctionType.Event;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
export {};
|
|
22
|
+
//# sourceMappingURL=globals.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"globals.d.ts","sourceRoot":"","sources":["../../../src/service/cloudfront/globals.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,kBAAkB,IAAI,sBAAsB,EAAE,MAAM,6CAA6C,CAAC;AAEhH,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,kBAAkB,CAAC;QAC3B,KAAK,KAAK,GAAG,sBAAsB,CAAC,KAAK,CAAC;QAC1C,KAAK,UAAU,GAAG,sBAAsB,CAAC,UAAU,CAAC;QACpD,KAAK,OAAO,GAAG,sBAAsB,CAAC,OAAO,CAAC;QAC9C,KAAK,WAAW,GAAG,sBAAsB,CAAC,WAAW,CAAC;QACtD,KAAK,OAAO,GAAG,sBAAsB,CAAC,OAAO,CAAC;QAC9C,KAAK,OAAO,GAAG,sBAAsB,CAAC,OAAO,CAAC;QAC9C,KAAK,QAAQ,GAAG,sBAAsB,CAAC,QAAQ,CAAC;QAChD,KAAK,YAAY,GAAG,sBAAsB,CAAC,YAAY,CAAC;QACxD,KAAK,MAAM,GAAG,sBAAsB,CAAC,MAAM,CAAC;QAC5C,KAAK,KAAK,GAAG,sBAAsB,CAAC,KAAK,CAAC;KAC3C;CACF;AAED,OAAO,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"globals.js","sourceRoot":"","sources":["../../../src/service/cloudfront/globals.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAmBH,OAAO,EAAE,CAAC"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export { cloudFrontViewerRequestEventFactory } from "./factory/cloudfront-functions.factory.js";
|
|
2
|
-
export type {
|
|
2
|
+
export type { CloudFrontFunction } from "./typings/cloudfront-functions.namespace.js";
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/service/cloudfront/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mCAAmC,EAAE,MAAM,2CAA2C,CAAC;AAChG,YAAY,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/service/cloudfront/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mCAAmC,EAAE,MAAM,2CAA2C,CAAC;AAChG,YAAY,EAAE,kBAAkB,EAAE,MAAM,6CAA6C,CAAC"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
export declare namespace CloudFrontFunction {
|
|
2
|
+
interface Value {
|
|
3
|
+
value: string;
|
|
4
|
+
}
|
|
5
|
+
interface MultiValue {
|
|
6
|
+
multiValue: Value[];
|
|
7
|
+
}
|
|
8
|
+
type Headers = Record<string, Value>;
|
|
9
|
+
type QueryString = Record<string, Value | MultiValue>;
|
|
10
|
+
type Cookies = Record<string, Value>;
|
|
11
|
+
interface Request {
|
|
12
|
+
method: string;
|
|
13
|
+
uri: string;
|
|
14
|
+
headers: Headers;
|
|
15
|
+
querystring: QueryString;
|
|
16
|
+
cookies: Cookies;
|
|
17
|
+
}
|
|
18
|
+
interface Response {
|
|
19
|
+
statusCode: number;
|
|
20
|
+
statusDescription?: string;
|
|
21
|
+
headers?: Headers;
|
|
22
|
+
}
|
|
23
|
+
interface EventContext {
|
|
24
|
+
distributionDomainName?: string;
|
|
25
|
+
endpoint?: string;
|
|
26
|
+
distributionId?: string;
|
|
27
|
+
eventType: "viewer-request" | "viewer-response";
|
|
28
|
+
requestId: string;
|
|
29
|
+
}
|
|
30
|
+
interface Viewer {
|
|
31
|
+
ip: string;
|
|
32
|
+
}
|
|
33
|
+
interface Event {
|
|
34
|
+
context: EventContext;
|
|
35
|
+
viewer: Viewer;
|
|
36
|
+
request: Request;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
//# sourceMappingURL=cloudfront-functions.namespace.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cloudfront-functions.namespace.d.ts","sourceRoot":"","sources":["../../../../src/service/cloudfront/typings/cloudfront-functions.namespace.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,OAAO,WAAW,kBAAkB,CAAC;IAC1C,UAAiB,KAAK;QACpB,KAAK,EAAE,MAAM,CAAC;KACf;IAED,UAAiB,UAAU;QACzB,UAAU,EAAE,KAAK,EAAE,CAAC;KACrB;IAED,KAAY,OAAO,GAAG,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;IAE5C,KAAY,WAAW,GAAG,MAAM,CAAC,MAAM,EAAE,KAAK,GAAG,UAAU,CAAC,CAAC;IAE7D,KAAY,OAAO,GAAG,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;IAE5C,UAAiB,OAAO;QACtB,MAAM,EAAE,MAAM,CAAC;QACf,GAAG,EAAE,MAAM,CAAC;QACZ,OAAO,EAAE,OAAO,CAAC;QACjB,WAAW,EAAE,WAAW,CAAC;QACzB,OAAO,EAAE,OAAO,CAAC;KAClB;IAED,UAAiB,QAAQ;QACvB,UAAU,EAAE,MAAM,CAAC;QACnB,iBAAiB,CAAC,EAAE,MAAM,CAAC;QAC3B,OAAO,CAAC,EAAE,OAAO,CAAC;KACnB;IAED,UAAiB,YAAY;QAC3B,sBAAsB,CAAC,EAAE,MAAM,CAAC;QAChC,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,cAAc,CAAC,EAAE,MAAM,CAAC;QACxB,SAAS,EAAE,gBAAgB,GAAG,iBAAiB,CAAC;QAChD,SAAS,EAAE,MAAM,CAAC;KACnB;IAED,UAAiB,MAAM;QACrB,EAAE,EAAE,MAAM,CAAC;KACZ;IAED,UAAiB,KAAK;QACpB,OAAO,EAAE,YAAY,CAAC;QACtB,MAAM,EAAE,MAAM,CAAC;QACf,OAAO,EAAE,OAAO,CAAC;KAClB;CACF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cloudfront-functions.namespace.js","sourceRoot":"","sources":["../../../../src/service/cloudfront/typings/cloudfront-functions.namespace.ts"],"names":[],"mappings":""}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kensio/yulin",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "AWS system behaviour simulation for isolated unit testing",
|
|
5
5
|
"repository": "https://github.com/KensioSoftware/yulin",
|
|
6
6
|
"type": "module",
|
|
@@ -23,6 +23,10 @@
|
|
|
23
23
|
"types": "./dist/service/cloudfront/index.d.ts",
|
|
24
24
|
"import": "./dist/service/cloudfront/index.js"
|
|
25
25
|
},
|
|
26
|
+
"./cloudfront/globals": {
|
|
27
|
+
"types": "./dist/service/cloudfront/globals.d.ts",
|
|
28
|
+
"import": "./dist/service/cloudfront/globals.js"
|
|
29
|
+
},
|
|
26
30
|
"./package.json": "./package.json"
|
|
27
31
|
},
|
|
28
32
|
"files": [
|