@trayio/commons 0.11.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/LICENSE.txt +22 -0
- package/dist/base64/Base64.d.ts +18 -0
- package/dist/base64/Base64.d.ts.map +1 -0
- package/dist/base64/Base64.js +52 -0
- package/dist/base64/Base64.unit.test.d.ts +2 -0
- package/dist/base64/Base64.unit.test.d.ts.map +1 -0
- package/dist/base64/Base64.unit.test.js +50 -0
- package/dist/buffer/Buffer.d.ts +5 -0
- package/dist/buffer/Buffer.d.ts.map +1 -0
- package/dist/buffer/Buffer.js +52 -0
- package/dist/buffer/Buffer.unit.test.d.ts +2 -0
- package/dist/buffer/Buffer.unit.test.d.ts.map +1 -0
- package/dist/buffer/Buffer.unit.test.js +19 -0
- package/dist/cli/CliLogging.d.ts +11 -0
- package/dist/cli/CliLogging.d.ts.map +1 -0
- package/dist/cli/CliLogging.js +9 -0
- package/dist/codec/Codec.abstract.test.d.ts +8 -0
- package/dist/codec/Codec.abstract.test.d.ts.map +1 -0
- package/dist/codec/Codec.abstract.test.js +42 -0
- package/dist/codec/Codec.d.ts +6 -0
- package/dist/codec/Codec.d.ts.map +1 -0
- package/dist/codec/Codec.js +2 -0
- package/dist/codec/CompositeCodec.d.ts +11 -0
- package/dist/codec/CompositeCodec.d.ts.map +1 -0
- package/dist/codec/CompositeCodec.js +44 -0
- package/dist/codec/RemoveNullValuesCodec.d.ts +11 -0
- package/dist/codec/RemoveNullValuesCodec.d.ts.map +1 -0
- package/dist/codec/RemoveNullValuesCodec.js +61 -0
- package/dist/codec/TypeCodec.d.ts +15 -0
- package/dist/codec/TypeCodec.d.ts.map +1 -0
- package/dist/codec/TypeCodec.js +51 -0
- package/dist/codec/TypeCodec.unit.test.d.ts +2 -0
- package/dist/codec/TypeCodec.unit.test.d.ts.map +1 -0
- package/dist/codec/TypeCodec.unit.test.js +97 -0
- package/dist/dynamictype/DynamicType.d.ts +18 -0
- package/dist/dynamictype/DynamicType.d.ts.map +1 -0
- package/dist/dynamictype/DynamicType.js +46 -0
- package/dist/error/Error.d.ts +2 -0
- package/dist/error/Error.d.ts.map +1 -0
- package/dist/error/Error.js +13 -0
- package/dist/file/File.d.ts +17 -0
- package/dist/file/File.d.ts.map +1 -0
- package/dist/file/File.js +31 -0
- package/dist/file/FileStorage.abstract.test.d.ts +3 -0
- package/dist/file/FileStorage.abstract.test.d.ts.map +1 -0
- package/dist/file/FileStorage.abstract.test.js +78 -0
- package/dist/file/NodeFsFileStorage.d.ts +10 -0
- package/dist/file/NodeFsFileStorage.d.ts.map +1 -0
- package/dist/file/NodeFsFileStorage.integration.test.d.ts +2 -0
- package/dist/file/NodeFsFileStorage.integration.test.d.ts.map +1 -0
- package/dist/file/NodeFsFileStorage.integration.test.js +5 -0
- package/dist/file/NodeFsFileStorage.js +57 -0
- package/dist/http/Http.d.ts +51 -0
- package/dist/http/Http.d.ts.map +1 -0
- package/dist/http/Http.js +62 -0
- package/dist/http/HttpClient.abstract.test.d.ts +3 -0
- package/dist/http/HttpClient.abstract.test.d.ts.map +1 -0
- package/dist/http/HttpClient.abstract.test.js +191 -0
- package/dist/http/HttpClient.d.ts +6 -0
- package/dist/http/HttpClient.d.ts.map +1 -0
- package/dist/http/HttpClient.js +2 -0
- package/dist/http/HttpController.d.ts +11 -0
- package/dist/http/HttpController.d.ts.map +1 -0
- package/dist/http/HttpController.js +2 -0
- package/dist/logging/Logging.d.ts +10 -0
- package/dist/logging/Logging.d.ts.map +1 -0
- package/dist/logging/Logging.js +2 -0
- package/dist/record/Record.d.ts +4 -0
- package/dist/record/Record.d.ts.map +1 -0
- package/dist/record/Record.js +35 -0
- package/dist/result/Result.d.ts +31 -0
- package/dist/result/Result.d.ts.map +1 -0
- package/dist/result/Result.js +68 -0
- package/dist/serialization/JsonSerialization.d.ts +10 -0
- package/dist/serialization/JsonSerialization.d.ts.map +1 -0
- package/dist/serialization/JsonSerialization.js +49 -0
- package/dist/serialization/JsonSerialization.unit.test.d.ts +2 -0
- package/dist/serialization/JsonSerialization.unit.test.d.ts.map +1 -0
- package/dist/serialization/JsonSerialization.unit.test.js +5 -0
- package/dist/serialization/Serialization.abstract.test.d.ts +3 -0
- package/dist/serialization/Serialization.abstract.test.d.ts.map +1 -0
- package/dist/serialization/Serialization.abstract.test.js +54 -0
- package/dist/serialization/Serialization.d.ts +10 -0
- package/dist/serialization/Serialization.d.ts.map +1 -0
- package/dist/serialization/Serialization.js +7 -0
- package/dist/string/StringExtensions.d.ts +6 -0
- package/dist/string/StringExtensions.d.ts.map +1 -0
- package/dist/string/StringExtensions.js +8 -0
- package/dist/string/StringExtensions.unit.test.d.ts +2 -0
- package/dist/string/StringExtensions.unit.test.d.ts.map +1 -0
- package/dist/string/StringExtensions.unit.test.js +39 -0
- package/dist/task/Task.d.ts +7 -0
- package/dist/task/Task.d.ts.map +1 -0
- package/dist/task/Task.js +14 -0
- package/dist/try/Try.d.ts +3 -0
- package/dist/try/Try.d.ts.map +1 -0
- package/dist/try/Try.js +37 -0
- package/package.json +38 -0
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
const E = __importStar(require("fp-ts/Either"));
|
|
27
|
+
const O = __importStar(require("fp-ts/Option"));
|
|
28
|
+
const t = __importStar(require("io-ts"));
|
|
29
|
+
const io_ts_types_1 = require("io-ts-types");
|
|
30
|
+
const TypeCodec_1 = require("./TypeCodec");
|
|
31
|
+
const Codec_abstract_test_1 = require("./Codec.abstract.test");
|
|
32
|
+
const testTypeCodec = TypeCodec_1.TypeCodec.fromDescriptor(t.type({
|
|
33
|
+
strField: t.string,
|
|
34
|
+
intField: (0, io_ts_types_1.optionFromNullable)(t.number),
|
|
35
|
+
}));
|
|
36
|
+
(0, Codec_abstract_test_1.testCodec)(testTypeCodec);
|
|
37
|
+
describe('Type Codec Test', () => {
|
|
38
|
+
test('should encode option some without the extra layer', () => {
|
|
39
|
+
const testValue = {
|
|
40
|
+
strField: 'str',
|
|
41
|
+
intField: O.some(123),
|
|
42
|
+
};
|
|
43
|
+
const result = testTypeCodec.encode(testValue);
|
|
44
|
+
const expected = {
|
|
45
|
+
strField: 'str',
|
|
46
|
+
intField: 123,
|
|
47
|
+
};
|
|
48
|
+
expect(result).toStrictEqual(expected);
|
|
49
|
+
});
|
|
50
|
+
test('should encode option none without the extra layer', () => {
|
|
51
|
+
const testValue = {
|
|
52
|
+
strField: 'str',
|
|
53
|
+
intField: O.none,
|
|
54
|
+
};
|
|
55
|
+
const result = testTypeCodec.encode(testValue);
|
|
56
|
+
const expected = {
|
|
57
|
+
strField: 'str',
|
|
58
|
+
intField: null,
|
|
59
|
+
};
|
|
60
|
+
expect(result).toStrictEqual(expected);
|
|
61
|
+
});
|
|
62
|
+
test('should decode option some without the extra layer', () => {
|
|
63
|
+
const testValueEncoded = {
|
|
64
|
+
strField: 'str',
|
|
65
|
+
intField: 123,
|
|
66
|
+
};
|
|
67
|
+
const result = testTypeCodec.decode(testValueEncoded);
|
|
68
|
+
const expected = E.right({
|
|
69
|
+
strField: 'str',
|
|
70
|
+
intField: O.some(123),
|
|
71
|
+
});
|
|
72
|
+
expect(result).toStrictEqual(expected);
|
|
73
|
+
});
|
|
74
|
+
test('should decode option none without the extra layer from null', () => {
|
|
75
|
+
const testValueEncoded = {
|
|
76
|
+
strField: 'str',
|
|
77
|
+
intField: null,
|
|
78
|
+
};
|
|
79
|
+
const result = testTypeCodec.decode(testValueEncoded);
|
|
80
|
+
const expected = E.right({
|
|
81
|
+
strField: 'str',
|
|
82
|
+
intField: O.none,
|
|
83
|
+
});
|
|
84
|
+
expect(result).toStrictEqual(expected);
|
|
85
|
+
});
|
|
86
|
+
test('should decode option none without the extra layer from a non existing property', () => {
|
|
87
|
+
const testValueEncoded = {
|
|
88
|
+
strField: 'str',
|
|
89
|
+
};
|
|
90
|
+
const result = testTypeCodec.decode(testValueEncoded);
|
|
91
|
+
const expected = E.right({
|
|
92
|
+
strField: 'str',
|
|
93
|
+
intField: O.none,
|
|
94
|
+
});
|
|
95
|
+
expect(result).toStrictEqual(expected);
|
|
96
|
+
});
|
|
97
|
+
});
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import * as E from 'fp-ts/Either';
|
|
2
|
+
import * as t from 'io-ts';
|
|
3
|
+
import { Codec } from '../codec/Codec';
|
|
4
|
+
export type DynamicType = string | number | boolean | null | DynamicObject | DynamicArray;
|
|
5
|
+
export type DynamicObject = {
|
|
6
|
+
[x: string]: DynamicType;
|
|
7
|
+
};
|
|
8
|
+
export type DynamicArray = Array<DynamicType>;
|
|
9
|
+
export interface DynamicTypeInterface {
|
|
10
|
+
readFromFile: (path: string) => E.Either<Error, DynamicType>;
|
|
11
|
+
writeToFile: (path: string, value: DynamicType) => E.Either<Error, undefined>;
|
|
12
|
+
safeCast: <T>(dynamicType: DynamicType, codec: Codec<T>) => E.Either<Error, T>;
|
|
13
|
+
}
|
|
14
|
+
export declare const DynamicType: DynamicTypeInterface;
|
|
15
|
+
export declare const dynamicTypeDescriptor: t.Type<DynamicType>;
|
|
16
|
+
export declare const dynamicObjectTypeDescriptor: t.Type<DynamicObject>;
|
|
17
|
+
export declare const dynamicArrayTypeDescriptor: t.Type<DynamicArray>;
|
|
18
|
+
//# sourceMappingURL=DynamicType.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DynamicType.d.ts","sourceRoot":"","sources":["../../src/dynamictype/DynamicType.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,CAAC,MAAM,cAAc,CAAC;AAElC,OAAO,KAAK,CAAC,MAAM,OAAO,CAAC;AAE3B,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAEvC,MAAM,MAAM,WAAW,GACpB,MAAM,GACN,MAAM,GACN,OAAO,GACP,IAAI,GACJ,aAAa,GACb,YAAY,CAAC;AAEhB,MAAM,MAAM,aAAa,GAAG;IAAE,CAAC,CAAC,EAAE,MAAM,GAAG,WAAW,CAAA;CAAE,CAAC;AAEzD,MAAM,MAAM,YAAY,GAAG,KAAK,CAAC,WAAW,CAAC,CAAC;AAE9C,MAAM,WAAW,oBAAoB;IACpC,YAAY,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,CAAC,CAAC,MAAM,CAAC,KAAK,EAAE,WAAW,CAAC,CAAC;IAC7D,WAAW,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,WAAW,KAAK,CAAC,CAAC,MAAM,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC;IAC9E,QAAQ,EAAE,CAAC,CAAC,EACX,WAAW,EAAE,WAAW,EACxB,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,KACX,CAAC,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;CACxB;AAED,eAAO,MAAM,WAAW,EAAE,oBAYzB,CAAC;AACF,eAAO,MAAM,qBAAqB,EAAE,CAAC,CAAC,IAAI,CAAC,WAAW,CAWrD,CAAC;AAEF,eAAO,MAAM,2BAA2B,EAAE,CAAC,CAAC,IAAI,CAAC,aAAa,CAG7D,CAAC;AAEF,eAAO,MAAM,0BAA0B,EAAE,CAAC,CAAC,IAAI,CAAC,YAAY,CAG3D,CAAC"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.dynamicArrayTypeDescriptor = exports.dynamicObjectTypeDescriptor = exports.dynamicTypeDescriptor = exports.DynamicType = void 0;
|
|
27
|
+
const fs = __importStar(require("fs"));
|
|
28
|
+
const E = __importStar(require("fp-ts/Either"));
|
|
29
|
+
const function_1 = require("fp-ts/function");
|
|
30
|
+
const t = __importStar(require("io-ts"));
|
|
31
|
+
const Try_1 = require("../try/Try");
|
|
32
|
+
exports.DynamicType = {
|
|
33
|
+
readFromFile: (path) => (0, Try_1.tryToEither)(() => JSON.parse(fs.readFileSync(path, 'utf8'))),
|
|
34
|
+
writeToFile: (path, value) => (0, function_1.pipe)((0, Try_1.tryToEither)(() => fs.writeFileSync(path, JSON.stringify(value))), E.map(() => undefined)),
|
|
35
|
+
safeCast: (dynamicType, codec) => codec.decode(dynamicType),
|
|
36
|
+
};
|
|
37
|
+
exports.dynamicTypeDescriptor = t.recursion('DynamicType', () => t.union([
|
|
38
|
+
t.string,
|
|
39
|
+
t.number,
|
|
40
|
+
t.boolean,
|
|
41
|
+
t.null,
|
|
42
|
+
exports.dynamicObjectTypeDescriptor,
|
|
43
|
+
exports.dynamicArrayTypeDescriptor,
|
|
44
|
+
]));
|
|
45
|
+
exports.dynamicObjectTypeDescriptor = t.recursion('DynamicObject', () => t.record(t.string, exports.dynamicTypeDescriptor));
|
|
46
|
+
exports.dynamicArrayTypeDescriptor = t.recursion('DynamicArray', () => t.array(exports.dynamicTypeDescriptor));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Error.d.ts","sourceRoot":"","sources":["../../src/error/Error.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,SAAS,EAAE,CAAC,KAAK,EAAE,GAAG,KAAK,KAQvC,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.castError = void 0;
|
|
4
|
+
const castError = (error) => {
|
|
5
|
+
if (typeof error === 'string') {
|
|
6
|
+
return new Error(error);
|
|
7
|
+
}
|
|
8
|
+
if (error instanceof Error) {
|
|
9
|
+
return error;
|
|
10
|
+
}
|
|
11
|
+
return new Error('Internal Error');
|
|
12
|
+
};
|
|
13
|
+
exports.castError = castError;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { TaskEither } from 'fp-ts/TaskEither';
|
|
2
|
+
import * as t from 'io-ts';
|
|
3
|
+
export type FileMetadata = {
|
|
4
|
+
key: string;
|
|
5
|
+
size: number;
|
|
6
|
+
};
|
|
7
|
+
export declare const fileMetadataDescriptor: t.Type<FileMetadata, unknown>;
|
|
8
|
+
export type File = {
|
|
9
|
+
metadata: FileMetadata;
|
|
10
|
+
content: ArrayBuffer;
|
|
11
|
+
};
|
|
12
|
+
export interface FileStorage {
|
|
13
|
+
write(file: File): TaskEither<Error, undefined>;
|
|
14
|
+
read(key: string): TaskEither<Error, File>;
|
|
15
|
+
delete(key: string): TaskEither<Error, undefined>;
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=File.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"File.d.ts","sourceRoot":"","sources":["../../src/file/File.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,KAAK,CAAC,MAAM,OAAO,CAAC;AAE3B,MAAM,MAAM,YAAY,GAAG;IAC1B,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;CACb,CAAC;AAEF,eAAO,MAAM,sBAAsB,EAAE,CAAC,CAAC,IAAI,CAAC,YAAY,EAAE,OAAO,CAMhE,CAAC;AAEF,MAAM,MAAM,IAAI,GAAG;IAClB,QAAQ,EAAE,YAAY,CAAC;IACvB,OAAO,EAAE,WAAW,CAAC;CACrB,CAAC;AAEF,MAAM,WAAW,WAAW;IAC3B,KAAK,CAAC,IAAI,EAAE,IAAI,GAAG,UAAU,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC;IAChD,IAAI,CAAC,GAAG,EAAE,MAAM,GAAG,UAAU,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;IAC3C,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,UAAU,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC;CAClD"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.fileMetadataDescriptor = void 0;
|
|
27
|
+
const t = __importStar(require("io-ts"));
|
|
28
|
+
exports.fileMetadataDescriptor = t.type({
|
|
29
|
+
key: t.string,
|
|
30
|
+
size: t.number,
|
|
31
|
+
}, 'FileMetadata');
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FileStorage.abstract.test.d.ts","sourceRoot":"","sources":["../../src/file/FileStorage.abstract.test.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,WAAW,EAAQ,MAAM,QAAQ,CAAC;AAE3C,eAAO,MAAM,eAAe,gBAAiB,WAAW,SAiDvD,CAAC"}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
26
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
27
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
28
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
29
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
30
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
31
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
32
|
+
});
|
|
33
|
+
};
|
|
34
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
35
|
+
exports.fileStorageTest = void 0;
|
|
36
|
+
const E = __importStar(require("fp-ts/Either"));
|
|
37
|
+
const uuid_1 = require("uuid");
|
|
38
|
+
const JsonSerialization_1 = require("../serialization/JsonSerialization");
|
|
39
|
+
const fileStorageTest = (fileStorage) => {
|
|
40
|
+
describe('FileStorage Tests', () => {
|
|
41
|
+
describe('Writing a file', () => {
|
|
42
|
+
describe("when it's successful", () => {
|
|
43
|
+
it('should write a file, read the file then delete the file', () => __awaiter(void 0, void 0, void 0, function* () {
|
|
44
|
+
const serialization = new JsonSerialization_1.JsonSerialization();
|
|
45
|
+
const fileContent = Buffer.from(serialization.serialize({ test: 'someValue' }));
|
|
46
|
+
const file = {
|
|
47
|
+
metadata: {
|
|
48
|
+
key: `test-${(0, uuid_1.v4)()}.json`,
|
|
49
|
+
size: fileContent.byteLength,
|
|
50
|
+
},
|
|
51
|
+
content: fileContent,
|
|
52
|
+
};
|
|
53
|
+
const writtenFile = yield fileStorage.write(file)();
|
|
54
|
+
expect(writtenFile).toEqual(E.right(undefined));
|
|
55
|
+
const read = yield fileStorage.read(file.metadata.key)();
|
|
56
|
+
const readResponse = E.getOrElse(() => {
|
|
57
|
+
throw new Error('Expected right');
|
|
58
|
+
})(read);
|
|
59
|
+
expect(fileContent).toEqual(readResponse.content);
|
|
60
|
+
const deleted = yield fileStorage.delete(file.metadata.key)();
|
|
61
|
+
expect(deleted).toEqual(E.right(undefined));
|
|
62
|
+
}));
|
|
63
|
+
});
|
|
64
|
+
});
|
|
65
|
+
describe('Reading a file', () => {
|
|
66
|
+
describe('when the file does not exist', () => {
|
|
67
|
+
it('should return does not exist error', () => __awaiter(void 0, void 0, void 0, function* () {
|
|
68
|
+
const read = yield fileStorage.read(`fail_test-${(0, uuid_1.v4)()}.zip`)();
|
|
69
|
+
if (E.isRight(read)) {
|
|
70
|
+
throw new Error('Expected left');
|
|
71
|
+
}
|
|
72
|
+
expect(read.left).toBeInstanceOf(Error);
|
|
73
|
+
}));
|
|
74
|
+
});
|
|
75
|
+
});
|
|
76
|
+
});
|
|
77
|
+
};
|
|
78
|
+
exports.fileStorageTest = fileStorageTest;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as TE from 'fp-ts/lib/TaskEither';
|
|
2
|
+
import { File, FileStorage } from './File';
|
|
3
|
+
export declare class NodeFsFileStorage implements FileStorage {
|
|
4
|
+
private basePath;
|
|
5
|
+
constructor(basePath: string);
|
|
6
|
+
write(file: File): TE.TaskEither<Error, undefined>;
|
|
7
|
+
read(key: string): TE.TaskEither<Error, File>;
|
|
8
|
+
delete(key: string): TE.TaskEither<Error, undefined>;
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=NodeFsFileStorage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NodeFsFileStorage.d.ts","sourceRoot":"","sources":["../../src/file/NodeFsFileStorage.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAG3C,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAC;AAG3C,qBAAa,iBAAkB,YAAW,WAAW;IACxC,OAAO,CAAC,QAAQ;gBAAR,QAAQ,EAAE,MAAM;IAEpC,KAAK,CAAC,IAAI,EAAE,IAAI,GAAG,EAAE,CAAC,UAAU,CAAC,KAAK,EAAE,SAAS,CAAC;IAalD,IAAI,CAAC,GAAG,EAAE,MAAM,GAAG,EAAE,CAAC,UAAU,CAAC,KAAK,EAAE,IAAI,CAAC;IAkB7C,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,EAAE,CAAC,UAAU,CAAC,KAAK,EAAE,SAAS,CAAC;CAWpD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NodeFsFileStorage.integration.test.d.ts","sourceRoot":"","sources":["../../src/file/NodeFsFileStorage.integration.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const FileStorage_abstract_test_1 = require("@trayio/commons/src/file/FileStorage.abstract.test");
|
|
4
|
+
const NodeFsFileStorage_1 = require("./NodeFsFileStorage");
|
|
5
|
+
(0, FileStorage_abstract_test_1.fileStorageTest)(new NodeFsFileStorage_1.NodeFsFileStorage('/tmp'));
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.NodeFsFileStorage = void 0;
|
|
27
|
+
const TE = __importStar(require("fp-ts/lib/TaskEither"));
|
|
28
|
+
const fs = __importStar(require("fs/promises"));
|
|
29
|
+
const function_1 = require("fp-ts/lib/function");
|
|
30
|
+
const Task_1 = require("../task/Task");
|
|
31
|
+
class NodeFsFileStorage {
|
|
32
|
+
constructor(basePath) {
|
|
33
|
+
this.basePath = basePath;
|
|
34
|
+
}
|
|
35
|
+
write(file) {
|
|
36
|
+
const path = `${this.basePath}/${file.metadata.key}`;
|
|
37
|
+
const result = (0, Task_1.createTaskEitherFromPromiseWithSimpleError)(() => fs.writeFile(path, Buffer.from(file.content)));
|
|
38
|
+
return (0, function_1.pipe)(result, TE.map(() => undefined));
|
|
39
|
+
}
|
|
40
|
+
read(key) {
|
|
41
|
+
const filePath = `${this.basePath}/${key}`;
|
|
42
|
+
const result = (0, Task_1.createTaskEitherFromPromiseWithSimpleError)(() => fs.readFile(filePath));
|
|
43
|
+
return (0, function_1.pipe)(result, TE.map((content) => ({
|
|
44
|
+
metadata: {
|
|
45
|
+
key,
|
|
46
|
+
size: content.byteLength,
|
|
47
|
+
},
|
|
48
|
+
content,
|
|
49
|
+
})));
|
|
50
|
+
}
|
|
51
|
+
delete(key) {
|
|
52
|
+
const filePath = `${this.basePath}/${key}`;
|
|
53
|
+
const result = (0, Task_1.createTaskEitherFromPromiseWithSimpleError)(() => fs.unlink(filePath));
|
|
54
|
+
return (0, function_1.pipe)(result, TE.map(() => undefined));
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
exports.NodeFsFileStorage = NodeFsFileStorage;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import * as O from 'fp-ts/lib/Option';
|
|
2
|
+
import { FileMetadata } from '../file/File';
|
|
3
|
+
import { SerializationFormat } from '../serialization/Serialization';
|
|
4
|
+
export type HttpHeaderValue = string | string[];
|
|
5
|
+
export type HttpHeaders = Record<string, HttpHeaderValue | HttpContentType>;
|
|
6
|
+
export type HttpQueryStringSingleValue = number | string | boolean;
|
|
7
|
+
export type HttpQueryStringValue = HttpQueryStringSingleValue | HttpQueryStringSingleValue[];
|
|
8
|
+
export type HttpQueryString = Record<string, HttpQueryStringValue>;
|
|
9
|
+
export type RegularHttpRequestBody = ArrayBuffer;
|
|
10
|
+
export type MultipartHttpRequestBody = {
|
|
11
|
+
fields: Record<string, string>;
|
|
12
|
+
files: Record<string, FileMetadata>;
|
|
13
|
+
};
|
|
14
|
+
export type HttpRequestBody = RegularHttpRequestBody | MultipartHttpRequestBody;
|
|
15
|
+
export type HttpRequest = {
|
|
16
|
+
headers: HttpHeaders;
|
|
17
|
+
pathParams: Record<string, string>;
|
|
18
|
+
queryString: HttpQueryString;
|
|
19
|
+
body: HttpRequestBody;
|
|
20
|
+
};
|
|
21
|
+
export type HttpResponse = {
|
|
22
|
+
statusCode: number;
|
|
23
|
+
headers: HttpHeaders;
|
|
24
|
+
body: ArrayBuffer;
|
|
25
|
+
};
|
|
26
|
+
export declare enum HttpMethod {
|
|
27
|
+
Get = "GET",
|
|
28
|
+
Put = "PUT",
|
|
29
|
+
Post = "POST",
|
|
30
|
+
Patch = "PATCH",
|
|
31
|
+
Delete = "DELETE"
|
|
32
|
+
}
|
|
33
|
+
export declare enum HttpContentType {
|
|
34
|
+
Json = "application/json",
|
|
35
|
+
OctetStream = "application/octet-stream",
|
|
36
|
+
MultipartRequestBody = "multipart/form-data"
|
|
37
|
+
}
|
|
38
|
+
export declare enum HttpHeader {
|
|
39
|
+
Authorization = "Authorization",
|
|
40
|
+
ContentType = "Content-Type",
|
|
41
|
+
Impersonation = "X-Tray-Admin-Impersonate",
|
|
42
|
+
UserAgent = "User-Agent"
|
|
43
|
+
}
|
|
44
|
+
export interface HttpHeadersInterface {
|
|
45
|
+
get: (headers: HttpHeaders, name: string) => O.Option<HttpHeaderValue>;
|
|
46
|
+
extractBearerToken: (headers: HttpHeaders) => O.Option<string>;
|
|
47
|
+
}
|
|
48
|
+
export declare const HttpHeaders: HttpHeadersInterface;
|
|
49
|
+
export declare const serializationFormatToHttpContentType: Record<SerializationFormat, HttpContentType>;
|
|
50
|
+
export declare const isMultiPartBody: (body: HttpRequestBody) => body is MultipartHttpRequestBody;
|
|
51
|
+
//# sourceMappingURL=Http.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Http.d.ts","sourceRoot":"","sources":["../../src/http/Http.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,kBAAkB,CAAC;AAEtC,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AAOrE,MAAM,MAAM,eAAe,GAAG,MAAM,GAAG,MAAM,EAAE,CAAC;AAEhD,MAAM,MAAM,WAAW,GAAG,MAAM,CAAC,MAAM,EAAE,eAAe,GAAG,eAAe,CAAC,CAAC;AAE5E,MAAM,MAAM,0BAA0B,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;AAEnE,MAAM,MAAM,oBAAoB,GAC7B,0BAA0B,GAC1B,0BAA0B,EAAE,CAAC;AAEhC,MAAM,MAAM,eAAe,GAAG,MAAM,CAAC,MAAM,EAAE,oBAAoB,CAAC,CAAC;AAEnE,MAAM,MAAM,sBAAsB,GAAG,WAAW,CAAC;AAEjD,MAAM,MAAM,wBAAwB,GAAG;IACtC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC/B,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC;CACpC,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG,sBAAsB,GAAG,wBAAwB,CAAC;AAEhF,MAAM,MAAM,WAAW,GAAG;IACzB,OAAO,EAAE,WAAW,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACnC,WAAW,EAAE,eAAe,CAAC;IAC7B,IAAI,EAAE,eAAe,CAAC;CACtB,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG;IAC1B,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,WAAW,CAAC;IACrB,IAAI,EAAE,WAAW,CAAC;CAClB,CAAC;AAEF,oBAAY,UAAU;IACrB,GAAG,QAAQ;IACX,GAAG,QAAQ;IACX,IAAI,SAAS;IACb,KAAK,UAAU;IACf,MAAM,WAAW;CACjB;AAED,oBAAY,eAAe;IAC1B,IAAI,qBAAqB;IACzB,WAAW,6BAA6B;IACxC,oBAAoB,wBAAwB;CAC5C;AAED,oBAAY,UAAU;IACrB,aAAa,kBAAkB;IAC/B,WAAW,iBAAiB;IAC5B,aAAa,6BAA6B;IAC1C,SAAS,eAAe;CACxB;AAED,MAAM,WAAW,oBAAoB;IACpC,GAAG,EAAE,CAAC,OAAO,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC,CAAC,MAAM,CAAC,eAAe,CAAC,CAAC;IACvE,kBAAkB,EAAE,CAAC,OAAO,EAAE,WAAW,KAAK,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;CAC/D;AAED,eAAO,MAAM,WAAW,EAAE,oBAYzB,CAAC;AAEF,eAAO,MAAM,oCAAoC,EAAE,MAAM,CACxD,mBAAmB,EACnB,eAAe,CAGf,CAAC;AAEF,eAAO,MAAM,eAAe,SACrB,eAAe,qCAEkC,CAAC"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.isMultiPartBody = exports.serializationFormatToHttpContentType = exports.HttpHeaders = exports.HttpHeader = exports.HttpContentType = exports.HttpMethod = void 0;
|
|
27
|
+
const O = __importStar(require("fp-ts/lib/Option"));
|
|
28
|
+
const function_1 = require("fp-ts/lib/function");
|
|
29
|
+
const Serialization_1 = require("../serialization/Serialization");
|
|
30
|
+
const getHeader = (headers, name) => O.fromNullable(headers[name.toLowerCase()]);
|
|
31
|
+
var HttpMethod;
|
|
32
|
+
(function (HttpMethod) {
|
|
33
|
+
HttpMethod["Get"] = "GET";
|
|
34
|
+
HttpMethod["Put"] = "PUT";
|
|
35
|
+
HttpMethod["Post"] = "POST";
|
|
36
|
+
HttpMethod["Patch"] = "PATCH";
|
|
37
|
+
HttpMethod["Delete"] = "DELETE";
|
|
38
|
+
})(HttpMethod || (exports.HttpMethod = HttpMethod = {}));
|
|
39
|
+
var HttpContentType;
|
|
40
|
+
(function (HttpContentType) {
|
|
41
|
+
HttpContentType["Json"] = "application/json";
|
|
42
|
+
HttpContentType["OctetStream"] = "application/octet-stream";
|
|
43
|
+
HttpContentType["MultipartRequestBody"] = "multipart/form-data";
|
|
44
|
+
})(HttpContentType || (exports.HttpContentType = HttpContentType = {}));
|
|
45
|
+
var HttpHeader;
|
|
46
|
+
(function (HttpHeader) {
|
|
47
|
+
HttpHeader["Authorization"] = "Authorization";
|
|
48
|
+
HttpHeader["ContentType"] = "Content-Type";
|
|
49
|
+
HttpHeader["Impersonation"] = "X-Tray-Admin-Impersonate";
|
|
50
|
+
HttpHeader["UserAgent"] = "User-Agent";
|
|
51
|
+
})(HttpHeader || (exports.HttpHeader = HttpHeader = {}));
|
|
52
|
+
exports.HttpHeaders = {
|
|
53
|
+
get: (headers, name) => getHeader(headers, name),
|
|
54
|
+
extractBearerToken: (headers) => (0, function_1.pipe)(getHeader(headers, HttpHeader.Authorization), O.chain((header) => header.toLowerCase().startsWith('bearer ')
|
|
55
|
+
? O.fromNullable(header.substring(7))
|
|
56
|
+
: O.fromNullable(null))),
|
|
57
|
+
};
|
|
58
|
+
exports.serializationFormatToHttpContentType = {
|
|
59
|
+
[Serialization_1.SerializationFormat.Json]: HttpContentType.Json,
|
|
60
|
+
};
|
|
61
|
+
const isMultiPartBody = (body) => (body === null || body === void 0 ? void 0 : body.files) !== undefined;
|
|
62
|
+
exports.isMultiPartBody = isMultiPartBody;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HttpClient.abstract.test.d.ts","sourceRoot":"","sources":["../../src/http/HttpClient.abstract.test.ts"],"names":[],"mappings":"AAeA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAG1C,wBAAgB,cAAc,CAAC,UAAU,EAAE,UAAU,QA0QpD"}
|