@webiny/utils 6.3.0-beta.4 → 6.4.0-beta.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/GenericRecord.js +0 -3
- package/cacheKey.js +10 -12
- package/cacheKey.js.map +1 -1
- package/compose.js +23 -32
- package/compose.js.map +1 -1
- package/createIdentifier.js +4 -14
- package/createIdentifier.js.map +1 -1
- package/createZodError.js +22 -27
- package/createZodError.js.map +1 -1
- package/cursor.js +20 -25
- package/cursor.js.map +1 -1
- package/exception.js +8 -13
- package/exception.js.map +1 -1
- package/executeWithRetry.js +11 -10
- package/executeWithRetry.js.map +1 -1
- package/exports/api.js +0 -2
- package/features/compression/CompressionHandler.js +21 -27
- package/features/compression/CompressionHandler.js.map +1 -1
- package/features/compression/GzipCompression.js +21 -20
- package/features/compression/GzipCompression.js.map +1 -1
- package/features/compression/JsonpackCompression.js +21 -23
- package/features/compression/JsonpackCompression.js.map +1 -1
- package/features/compression/abstractions/Compression.js +2 -1
- package/features/compression/abstractions/Compression.js.map +1 -1
- package/features/compression/abstractions/CompressionHandler.js +2 -1
- package/features/compression/abstractions/CompressionHandler.js.map +1 -1
- package/features/compression/feature.js +8 -7
- package/features/compression/feature.js.map +1 -1
- package/features/compression/legacy/CompressionPlugin.js +5 -2
- package/features/compression/legacy/CompressionPlugin.js.map +1 -1
- package/features/compression/legacy/Compressor.js +41 -53
- package/features/compression/legacy/Compressor.js.map +1 -1
- package/features/compression/legacy/gzip.js +12 -21
- package/features/compression/legacy/gzip.js.map +1 -1
- package/features/compression/legacy/index.js +0 -2
- package/features/compression/legacy/jsonpack.js +5 -8
- package/features/compression/legacy/jsonpack.js.map +1 -1
- package/features/compression/legacy/plugins/GzipCompression.js +52 -45
- package/features/compression/legacy/plugins/GzipCompression.js.map +1 -1
- package/features/compression/legacy/plugins/JsonpackCompression.js +32 -41
- package/features/compression/legacy/plugins/JsonpackCompression.js.map +1 -1
- package/generateId.js +7 -8
- package/generateId.js.map +1 -1
- package/getObjectProperties.js +7 -12
- package/getObjectProperties.js.map +1 -1
- package/headers.js +9 -13
- package/headers.js.map +1 -1
- package/index.js +1 -4
- package/mdbid.js +3 -4
- package/mdbid.js.map +1 -1
- package/middleware.js +25 -37
- package/middleware.js.map +1 -1
- package/package.json +8 -8
- package/parseIdentifier.js +16 -26
- package/parseIdentifier.js.map +1 -1
- package/removeNullValues.js +5 -9
- package/removeNullValues.js.map +1 -1
- package/removeUndefinedValues.js +5 -9
- package/removeUndefinedValues.js.map +1 -1
- package/utcTimezones.js +159 -118
- package/utcTimezones.js.map +1 -1
- package/zeroPad.js +2 -7
- package/zeroPad.js.map +1 -1
- package/GenericRecord.js.map +0 -1
- package/exports/api.js.map +0 -1
- package/features/compression/legacy/index.js.map +0 -1
- package/index.js.map +0 -1
package/headers.js
CHANGED
|
@@ -1,16 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
return {};
|
|
10
|
-
}
|
|
11
|
-
return {
|
|
12
|
-
"x-webiny-version": version
|
|
13
|
-
};
|
|
1
|
+
const WEBINY_VERSION_HEADER = "x-webiny-version";
|
|
2
|
+
const getWebinyVersionHeaders = ()=>{
|
|
3
|
+
const enable = process.env.WEBINY_ENABLE_VERSION_HEADER;
|
|
4
|
+
const version = process.env.WEBINY_VERSION;
|
|
5
|
+
if ("true" !== enable || !version) return {};
|
|
6
|
+
return {
|
|
7
|
+
"x-webiny-version": version
|
|
8
|
+
};
|
|
14
9
|
};
|
|
10
|
+
export { WEBINY_VERSION_HEADER, getWebinyVersionHeaders };
|
|
15
11
|
|
|
16
12
|
//# sourceMappingURL=headers.js.map
|
package/headers.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"headers.js","sources":["../src/headers.ts"],"sourcesContent":["export const WEBINY_VERSION_HEADER = \"x-webiny-version\";\n\nexport const getWebinyVersionHeaders = () => {\n const enable: string | undefined = process.env.WEBINY_ENABLE_VERSION_HEADER;\n const version: string | undefined = process.env.WEBINY_VERSION;\n /**\n * Disable version headers by default.\n */\n if (enable !== \"true\" || !version) {\n return {};\n }\n return {\n \"x-webiny-version\": version\n };\n};\n"],"names":["WEBINY_VERSION_HEADER","getWebinyVersionHeaders","enable","process","version"],"mappings":"AAAO,MAAMA,wBAAwB;AAE9B,MAAMC,0BAA0B;IACnC,MAAMC,SAA6BC,QAAQ,GAAG,CAAC,4BAA4B;IAC3E,MAAMC,UAA8BD,QAAQ,GAAG,CAAC,cAAc;IAI9D,IAAID,AAAW,WAAXA,UAAqB,CAACE,SACtB,OAAO,CAAC;IAEZ,OAAO;QACH,oBAAoBA;IACxB;AACJ"}
|
package/index.js
CHANGED
|
@@ -14,7 +14,4 @@ export * from "./utcTimezones.js";
|
|
|
14
14
|
export * from "./cacheKey.js";
|
|
15
15
|
export * from "./getObjectProperties.js";
|
|
16
16
|
export * from "./middleware.js";
|
|
17
|
-
|
|
18
|
-
export { composeAsync };
|
|
19
|
-
|
|
20
|
-
//# sourceMappingURL=index.js.map
|
|
17
|
+
export { composeAsync } from "./compose.js";
|
package/mdbid.js
CHANGED
package/mdbid.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"mdbid.js","sources":["../src/mdbid.ts"],"sourcesContent":["import ObjectID from \"bson-objectid\";\n\nexport const mdbid = () => {\n return ObjectID().toHexString();\n};\n"],"names":["mdbid","ObjectID"],"mappings":";AAEO,MAAMA,QAAQ,IACVC,gBAAW,WAAW"}
|
package/middleware.js
CHANGED
|
@@ -1,40 +1,28 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
} catch (e) {
|
|
25
|
-
reject(e);
|
|
26
|
-
}
|
|
27
|
-
}).then(() => {
|
|
28
|
-
return next();
|
|
29
|
-
}).then(() => {
|
|
30
|
-
parentResolve(...args);
|
|
31
|
-
}).catch(e => {
|
|
32
|
-
parentReject(e);
|
|
1
|
+
const middleware = (functions = [])=>(...args)=>{
|
|
2
|
+
if (!functions.length) return Promise.resolve(void 0);
|
|
3
|
+
const chain = [
|
|
4
|
+
...functions
|
|
5
|
+
];
|
|
6
|
+
return new Promise((parentResolve, parentReject)=>{
|
|
7
|
+
const next = async ()=>{
|
|
8
|
+
const fn = chain.shift();
|
|
9
|
+
if (!fn) return Promise.resolve();
|
|
10
|
+
return new Promise(async (resolve, reject)=>{
|
|
11
|
+
try {
|
|
12
|
+
const result = await fn(...args, resolve);
|
|
13
|
+
if (void 0 !== result) return parentResolve(result);
|
|
14
|
+
} catch (e) {
|
|
15
|
+
reject(e);
|
|
16
|
+
}
|
|
17
|
+
}).then(()=>next()).then(()=>{
|
|
18
|
+
parentResolve(...args);
|
|
19
|
+
}).catch((e)=>{
|
|
20
|
+
parentReject(e);
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
return next();
|
|
33
24
|
});
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
});
|
|
37
|
-
};
|
|
38
|
-
};
|
|
25
|
+
};
|
|
26
|
+
export { middleware };
|
|
39
27
|
|
|
40
28
|
//# sourceMappingURL=middleware.js.map
|
package/middleware.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"middleware.js","sources":["../src/middleware.ts"],"sourcesContent":["export interface MiddlewareCallable {\n (...args: any[]): Promise<any>;\n}\n\nexport interface MiddlewareResolve {\n (...args: any[]): void;\n}\n\nexport interface MiddlewareReject {\n (error: Error): void;\n}\n/**\n * Compose a single middleware from the array of middleware functions\n */\nexport const middleware = <Params = any, Response = any>(functions: MiddlewareCallable[] = []) => {\n return (...args: Params[]): Promise<Response | undefined> => {\n if (!functions.length) {\n return Promise.resolve<Response | undefined>(undefined);\n }\n\n // Create a clone of function chain to prevent modifying the original array with `shift()`\n const chain = [...functions];\n return new Promise((parentResolve: MiddlewareResolve, parentReject: MiddlewareReject) => {\n const next = async (): Promise<any> => {\n const fn = chain.shift();\n if (!fn) {\n return Promise.resolve();\n }\n\n return new Promise(async (resolve, reject) => {\n try {\n const result = await fn(...args, resolve);\n if (typeof result !== \"undefined\") {\n return parentResolve(result);\n }\n } catch (e) {\n reject(e);\n }\n })\n .then(() => {\n return next();\n })\n .then(() => {\n parentResolve(...args);\n })\n .catch(e => {\n parentReject(e);\n });\n };\n\n return next();\n });\n };\n};\n"],"names":["middleware","functions","args","Promise","undefined","chain","parentResolve","parentReject","next","fn","resolve","reject","result","e"],"mappings":"AAcO,MAAMA,aAAa,CAA+BC,YAAkC,EAAE,GAClF,CAAC,GAAGC;QACP,IAAI,CAACD,UAAU,MAAM,EACjB,OAAOE,QAAQ,OAAO,CAAuBC;QAIjD,MAAMC,QAAQ;eAAIJ;SAAU;QAC5B,OAAO,IAAIE,QAAQ,CAACG,eAAkCC;YAClD,MAAMC,OAAO;gBACT,MAAMC,KAAKJ,MAAM,KAAK;gBACtB,IAAI,CAACI,IACD,OAAON,QAAQ,OAAO;gBAG1B,OAAO,IAAIA,QAAQ,OAAOO,SAASC;oBAC/B,IAAI;wBACA,MAAMC,SAAS,MAAMH,MAAMP,MAAMQ;wBACjC,IAAI,AAAkB,WAAXE,QACP,OAAON,cAAcM;oBAE7B,EAAE,OAAOC,GAAG;wBACRF,OAAOE;oBACX;gBACJ,GACK,IAAI,CAAC,IACKL,QAEV,IAAI,CAAC;oBACFF,iBAAiBJ;gBACrB,GACC,KAAK,CAACW,CAAAA;oBACHN,aAAaM;gBACjB;YACR;YAEA,OAAOL;QACX;IACJ"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webiny/utils",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.4.0-beta.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": "./index.js",
|
|
@@ -20,21 +20,21 @@
|
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"@noble/hashes": "2.2.0",
|
|
23
|
-
"@webiny/error": "6.
|
|
24
|
-
"@webiny/feature": "6.
|
|
25
|
-
"@webiny/plugins": "6.
|
|
23
|
+
"@webiny/error": "6.4.0-beta.0",
|
|
24
|
+
"@webiny/feature": "6.4.0-beta.0",
|
|
25
|
+
"@webiny/plugins": "6.4.0-beta.0",
|
|
26
26
|
"bson-objectid": "2.0.4",
|
|
27
27
|
"jsonpack": "1.1.5",
|
|
28
28
|
"nanoid": "5.1.11",
|
|
29
29
|
"nanoid-dictionary": "5.0.0",
|
|
30
30
|
"p-retry": "8.0.0",
|
|
31
|
-
"zod": "4.3
|
|
31
|
+
"zod": "4.4.3"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
|
-
"@webiny/build-tools": "6.
|
|
34
|
+
"@webiny/build-tools": "6.4.0-beta.0",
|
|
35
35
|
"rimraf": "6.1.3",
|
|
36
36
|
"typescript": "6.0.3",
|
|
37
|
-
"vitest": "4.1.
|
|
37
|
+
"vitest": "4.1.6"
|
|
38
38
|
},
|
|
39
|
-
"gitHead": "
|
|
39
|
+
"gitHead": "a545d7529828af07d08d49c3da1bcb967483b9ce"
|
|
40
40
|
}
|
package/parseIdentifier.js
CHANGED
|
@@ -1,31 +1,21 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
export const parseIdentifier = value => {
|
|
8
|
-
if (!value) {
|
|
9
|
-
throw new WebinyError("Missing value to be parsed for the identifier.", "MALFORMED_VALUE");
|
|
10
|
-
}
|
|
11
|
-
const [id, initialVersion] = value.split("#");
|
|
12
|
-
if (!id) {
|
|
13
|
-
throw new WebinyError("Missing ID in given value.", "MALFORMED_VALUE", {
|
|
14
|
-
value
|
|
1
|
+
import error from "@webiny/error";
|
|
2
|
+
const parseIdentifier = (value)=>{
|
|
3
|
+
if (!value) throw new error("Missing value to be parsed for the identifier.", "MALFORMED_VALUE");
|
|
4
|
+
const [id, initialVersion] = value.split("#");
|
|
5
|
+
if (!id) throw new error("Missing ID in given value.", "MALFORMED_VALUE", {
|
|
6
|
+
value
|
|
15
7
|
});
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
version,
|
|
22
|
-
value
|
|
8
|
+
const version = initialVersion ? Number(initialVersion) : null;
|
|
9
|
+
if (null !== version && version <= 0) throw new error("Version parsed from ID is less or equal to zero.", "MALFORMED_VALUE", {
|
|
10
|
+
id,
|
|
11
|
+
version,
|
|
12
|
+
value
|
|
23
13
|
});
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
};
|
|
14
|
+
return {
|
|
15
|
+
id,
|
|
16
|
+
version
|
|
17
|
+
};
|
|
29
18
|
};
|
|
19
|
+
export { parseIdentifier };
|
|
30
20
|
|
|
31
21
|
//# sourceMappingURL=parseIdentifier.js.map
|
package/parseIdentifier.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"parseIdentifier.js","sources":["../src/parseIdentifier.ts"],"sourcesContent":["/**\n * When you want to extract the generated ID and version out of the identifier string.\n * In case there is no version, it's not a problem, possibly only generated ID was sent.\n * It does not cause an error. Write check for that in the code using this fn.\n */\nimport WebinyError from \"@webiny/error\";\n\nexport interface ParseIdentifierResult {\n id: string;\n version: number | null;\n}\n\nexport const parseIdentifier = (value: string | undefined): ParseIdentifierResult => {\n if (!value) {\n throw new WebinyError(\"Missing value to be parsed for the identifier.\", \"MALFORMED_VALUE\");\n }\n const [id, initialVersion] = value.split(\"#\");\n if (!id) {\n throw new WebinyError(\"Missing ID in given value.\", \"MALFORMED_VALUE\", {\n value\n });\n }\n const version = initialVersion ? Number(initialVersion) : null;\n if (version !== null && version <= 0) {\n throw new WebinyError(\n \"Version parsed from ID is less or equal to zero.\",\n \"MALFORMED_VALUE\",\n {\n id,\n version,\n value\n }\n );\n }\n return {\n id,\n version\n };\n};\n"],"names":["parseIdentifier","value","WebinyError","id","initialVersion","version","Number"],"mappings":";AAYO,MAAMA,kBAAkB,CAACC;IAC5B,IAAI,CAACA,OACD,MAAM,IAAIC,MAAY,kDAAkD;IAE5E,MAAM,CAACC,IAAIC,eAAe,GAAGH,MAAM,KAAK,CAAC;IACzC,IAAI,CAACE,IACD,MAAM,IAAID,MAAY,8BAA8B,mBAAmB;QACnED;IACJ;IAEJ,MAAMI,UAAUD,iBAAiBE,OAAOF,kBAAkB;IAC1D,IAAIC,AAAY,SAAZA,WAAoBA,WAAW,GAC/B,MAAM,IAAIH,MACN,oDACA,mBACA;QACIC;QACAE;QACAJ;IACJ;IAGR,OAAO;QACHE;QACAE;IACJ;AACJ"}
|
package/removeNullValues.js
CHANGED
|
@@ -1,12 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
continue;
|
|
6
|
-
}
|
|
7
|
-
result[key] = target[key];
|
|
8
|
-
}
|
|
9
|
-
return result;
|
|
1
|
+
const removeNullValues = (target)=>{
|
|
2
|
+
const result = {};
|
|
3
|
+
for(const key in target)if (null !== target[key]) result[key] = target[key];
|
|
4
|
+
return result;
|
|
10
5
|
};
|
|
6
|
+
export { removeNullValues };
|
|
11
7
|
|
|
12
8
|
//# sourceMappingURL=removeNullValues.js.map
|
package/removeNullValues.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"removeNullValues.js","sources":["../src/removeNullValues.ts"],"sourcesContent":["type WithoutNullableKeys<Type> = {\n [Key in keyof Type]-?: WithoutNullableKeys<NonNullable<Type[Key]>>;\n};\n\nexport const removeNullValues = <T extends Record<string, any>>(target: T) => {\n const result = {} as WithoutNullableKeys<T>;\n for (const key in target) {\n if (target[key] === null) {\n continue;\n }\n\n result[key] = target[key];\n }\n return result;\n};\n"],"names":["removeNullValues","target","result","key"],"mappings":"AAIO,MAAMA,mBAAmB,CAAgCC;IAC5D,MAAMC,SAAS,CAAC;IAChB,IAAK,MAAMC,OAAOF,OACd,IAAIA,AAAgB,SAAhBA,MAAM,CAACE,IAAI,EAIfD,MAAM,CAACC,IAAI,GAAGF,MAAM,CAACE,IAAI;IAE7B,OAAOD;AACX"}
|
package/removeUndefinedValues.js
CHANGED
|
@@ -1,12 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
continue;
|
|
6
|
-
}
|
|
7
|
-
result[key] = target[key];
|
|
8
|
-
}
|
|
9
|
-
return result;
|
|
1
|
+
const removeUndefinedValues = (target)=>{
|
|
2
|
+
const result = {};
|
|
3
|
+
for(const key in target)if (void 0 !== target[key]) result[key] = target[key];
|
|
4
|
+
return result;
|
|
10
5
|
};
|
|
6
|
+
export { removeUndefinedValues };
|
|
11
7
|
|
|
12
8
|
//# sourceMappingURL=removeUndefinedValues.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"removeUndefinedValues.js","sources":["../src/removeUndefinedValues.ts"],"sourcesContent":["export const removeUndefinedValues = <T extends Record<string, any>>(target: T) => {\n const result = {} as T;\n for (const key in target) {\n if (target[key] === undefined) {\n continue;\n }\n\n result[key] = target[key];\n }\n return result;\n};\n"],"names":["removeUndefinedValues","target","result","key","undefined"],"mappings":"AAAO,MAAMA,wBAAwB,CAAgCC;IACjE,MAAMC,SAAS,CAAC;IAChB,IAAK,MAAMC,OAAOF,OACd,IAAIA,AAAgBG,WAAhBH,MAAM,CAACE,IAAI,EAIfD,MAAM,CAACC,IAAI,GAAGF,MAAM,CAACE,IAAI;IAE7B,OAAOD;AACX"}
|
package/utcTimezones.js
CHANGED
|
@@ -1,120 +1,161 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
},
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
},
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
},
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
},
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
},
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
},
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
},
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
},
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
},
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
1
|
+
const UTC_TIMEZONES = [
|
|
2
|
+
{
|
|
3
|
+
value: "-12:00",
|
|
4
|
+
label: "UTC-12:00"
|
|
5
|
+
},
|
|
6
|
+
{
|
|
7
|
+
value: "-11:00",
|
|
8
|
+
label: "UTC-11:00"
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
value: "-10:00",
|
|
12
|
+
label: "UTC-10:00"
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
value: "-09:30",
|
|
16
|
+
label: "UTC-09:30"
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
value: "-09:00",
|
|
20
|
+
label: "UTC-09:00"
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
value: "-08:00",
|
|
24
|
+
label: "UTC-08:00"
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
value: "-07:00",
|
|
28
|
+
label: "UTC-07:00"
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
value: "-06:00",
|
|
32
|
+
label: "UTC-06:00"
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
value: "-05:00",
|
|
36
|
+
label: "UTC-05:00"
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
value: "-04:30",
|
|
40
|
+
label: "UTC-04:30"
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
value: "-04:00",
|
|
44
|
+
label: "UTC-04:00"
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
value: "-03:30",
|
|
48
|
+
label: "UTC-03:30"
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
value: "-03:00",
|
|
52
|
+
label: "UTC-03:00"
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
value: "-02:00",
|
|
56
|
+
label: "UTC-02:00"
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
value: "-01:00",
|
|
60
|
+
label: "UTC-01:00"
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
value: "+00:00",
|
|
64
|
+
label: "UTC+00:00"
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
value: "+01:00",
|
|
68
|
+
label: "UTC+01:00"
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
value: "+02:00",
|
|
72
|
+
label: "UTC+02:00"
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
value: "+03:00",
|
|
76
|
+
label: "UTC+03:00"
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
value: "+03:30",
|
|
80
|
+
label: "UTC+03:30"
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
value: "+04:00",
|
|
84
|
+
label: "UTC+04:00"
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
value: "+04:30",
|
|
88
|
+
label: "UTC+04:30"
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
value: "+05:30",
|
|
92
|
+
label: "UTC+05:30"
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
value: "+05:45",
|
|
96
|
+
label: "UTC+05:45"
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
value: "+06:00",
|
|
100
|
+
label: "UTC+06:00"
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
value: "+06:30",
|
|
104
|
+
label: "UTC+06:30"
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
value: "+07:00",
|
|
108
|
+
label: "UTC+07:00"
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
value: "+08:00",
|
|
112
|
+
label: "UTC+08:00"
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
value: "+08:45",
|
|
116
|
+
label: "UTC+08:45"
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
value: "+09:00",
|
|
120
|
+
label: "UTC+09:00"
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
value: "+09:30",
|
|
124
|
+
label: "UTC+09:30"
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
value: "+10:00",
|
|
128
|
+
label: "UTC+10:00"
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
value: "+10:30",
|
|
132
|
+
label: "UTC+10:30"
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
value: "+11:00",
|
|
136
|
+
label: "UTC+11:00"
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
value: "+11:30",
|
|
140
|
+
label: "UTC+11:30"
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
value: "+12:00",
|
|
144
|
+
label: "UTC+12:00"
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
value: "+12:45",
|
|
148
|
+
label: "UTC+12:45"
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
value: "+13:00",
|
|
152
|
+
label: "UTC+13:00"
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
value: "+14:00",
|
|
156
|
+
label: "UTC+14:00"
|
|
157
|
+
}
|
|
158
|
+
];
|
|
159
|
+
export { UTC_TIMEZONES };
|
|
119
160
|
|
|
120
161
|
//# sourceMappingURL=utcTimezones.js.map
|
package/utcTimezones.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"utcTimezones.js","sources":["../src/utcTimezones.ts"],"sourcesContent":["export const UTC_TIMEZONES = [\n {\n value: \"-12:00\",\n label: \"UTC-12:00\"\n },\n {\n value: \"-11:00\",\n label: \"UTC-11:00\"\n },\n {\n value: \"-10:00\",\n label: \"UTC-10:00\"\n },\n {\n value: \"-09:30\",\n label: \"UTC-09:30\"\n },\n {\n value: \"-09:00\",\n label: \"UTC-09:00\"\n },\n {\n value: \"-08:00\",\n label: \"UTC-08:00\"\n },\n {\n value: \"-07:00\",\n label: \"UTC-07:00\"\n },\n {\n value: \"-06:00\",\n label: \"UTC-06:00\"\n },\n {\n value: \"-05:00\",\n label: \"UTC-05:00\"\n },\n {\n value: \"-04:30\",\n label: \"UTC-04:30\"\n },\n {\n value: \"-04:00\",\n label: \"UTC-04:00\"\n },\n {\n value: \"-03:30\",\n label: \"UTC-03:30\"\n },\n {\n value: \"-03:00\",\n label: \"UTC-03:00\"\n },\n {\n value: \"-02:00\",\n label: \"UTC-02:00\"\n },\n {\n value: \"-01:00\",\n label: \"UTC-01:00\"\n },\n {\n value: \"+00:00\",\n label: \"UTC+00:00\"\n },\n {\n value: \"+01:00\",\n label: \"UTC+01:00\"\n },\n {\n value: \"+02:00\",\n label: \"UTC+02:00\"\n },\n {\n value: \"+03:00\",\n label: \"UTC+03:00\"\n },\n {\n value: \"+03:30\",\n label: \"UTC+03:30\"\n },\n {\n value: \"+04:00\",\n label: \"UTC+04:00\"\n },\n {\n value: \"+04:30\",\n label: \"UTC+04:30\"\n },\n {\n value: \"+05:30\",\n label: \"UTC+05:30\"\n },\n {\n value: \"+05:45\",\n label: \"UTC+05:45\"\n },\n {\n value: \"+06:00\",\n label: \"UTC+06:00\"\n },\n {\n value: \"+06:30\",\n label: \"UTC+06:30\"\n },\n {\n value: \"+07:00\",\n label: \"UTC+07:00\"\n },\n {\n value: \"+08:00\",\n label: \"UTC+08:00\"\n },\n {\n value: \"+08:45\",\n label: \"UTC+08:45\"\n },\n {\n value: \"+09:00\",\n label: \"UTC+09:00\"\n },\n {\n value: \"+09:30\",\n label: \"UTC+09:30\"\n },\n {\n value: \"+10:00\",\n label: \"UTC+10:00\"\n },\n {\n value: \"+10:30\",\n label: \"UTC+10:30\"\n },\n {\n value: \"+11:00\",\n label: \"UTC+11:00\"\n },\n {\n value: \"+11:30\",\n label: \"UTC+11:30\"\n },\n {\n value: \"+12:00\",\n label: \"UTC+12:00\"\n },\n {\n value: \"+12:45\",\n label: \"UTC+12:45\"\n },\n {\n value: \"+13:00\",\n label: \"UTC+13:00\"\n },\n {\n value: \"+14:00\",\n label: \"UTC+14:00\"\n }\n];\n"],"names":["UTC_TIMEZONES"],"mappings":"AAAO,MAAMA,gBAAgB;IACzB;QACI,OAAO;QACP,OAAO;IACX;IACA;QACI,OAAO;QACP,OAAO;IACX;IACA;QACI,OAAO;QACP,OAAO;IACX;IACA;QACI,OAAO;QACP,OAAO;IACX;IACA;QACI,OAAO;QACP,OAAO;IACX;IACA;QACI,OAAO;QACP,OAAO;IACX;IACA;QACI,OAAO;QACP,OAAO;IACX;IACA;QACI,OAAO;QACP,OAAO;IACX;IACA;QACI,OAAO;QACP,OAAO;IACX;IACA;QACI,OAAO;QACP,OAAO;IACX;IACA;QACI,OAAO;QACP,OAAO;IACX;IACA;QACI,OAAO;QACP,OAAO;IACX;IACA;QACI,OAAO;QACP,OAAO;IACX;IACA;QACI,OAAO;QACP,OAAO;IACX;IACA;QACI,OAAO;QACP,OAAO;IACX;IACA;QACI,OAAO;QACP,OAAO;IACX;IACA;QACI,OAAO;QACP,OAAO;IACX;IACA;QACI,OAAO;QACP,OAAO;IACX;IACA;QACI,OAAO;QACP,OAAO;IACX;IACA;QACI,OAAO;QACP,OAAO;IACX;IACA;QACI,OAAO;QACP,OAAO;IACX;IACA;QACI,OAAO;QACP,OAAO;IACX;IACA;QACI,OAAO;QACP,OAAO;IACX;IACA;QACI,OAAO;QACP,OAAO;IACX;IACA;QACI,OAAO;QACP,OAAO;IACX;IACA;QACI,OAAO;QACP,OAAO;IACX;IACA;QACI,OAAO;QACP,OAAO;IACX;IACA;QACI,OAAO;QACP,OAAO;IACX;IACA;QACI,OAAO;QACP,OAAO;IACX;IACA;QACI,OAAO;QACP,OAAO;IACX;IACA;QACI,OAAO;QACP,OAAO;IACX;IACA;QACI,OAAO;QACP,OAAO;IACX;IACA;QACI,OAAO;QACP,OAAO;IACX;IACA;QACI,OAAO;QACP,OAAO;IACX;IACA;QACI,OAAO;QACP,OAAO;IACX;IACA;QACI,OAAO;QACP,OAAO;IACX;IACA;QACI,OAAO;QACP,OAAO;IACX;IACA;QACI,OAAO;QACP,OAAO;IACX;IACA;QACI,OAAO;QACP,OAAO;IACX;CACH"}
|
package/zeroPad.js
CHANGED
|
@@ -1,9 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
* Or, for example, when adding the revision record to the DynamoDB table.
|
|
4
|
-
*/
|
|
5
|
-
export const zeroPad = (version, amount = 4) => {
|
|
6
|
-
return `${version}`.padStart(amount, "0");
|
|
7
|
-
};
|
|
1
|
+
const zeroPad = (version, amount = 4)=>`${version}`.padStart(amount, "0");
|
|
2
|
+
export { zeroPad };
|
|
8
3
|
|
|
9
4
|
//# sourceMappingURL=zeroPad.js.map
|