@webiny/utils 6.3.0 → 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.
Files changed (67) hide show
  1. package/GenericRecord.js +0 -3
  2. package/cacheKey.js +10 -12
  3. package/cacheKey.js.map +1 -1
  4. package/compose.js +23 -32
  5. package/compose.js.map +1 -1
  6. package/createIdentifier.js +4 -14
  7. package/createIdentifier.js.map +1 -1
  8. package/createZodError.js +22 -27
  9. package/createZodError.js.map +1 -1
  10. package/cursor.js +20 -25
  11. package/cursor.js.map +1 -1
  12. package/exception.js +8 -13
  13. package/exception.js.map +1 -1
  14. package/executeWithRetry.js +11 -10
  15. package/executeWithRetry.js.map +1 -1
  16. package/exports/api.js +0 -2
  17. package/features/compression/CompressionHandler.js +21 -27
  18. package/features/compression/CompressionHandler.js.map +1 -1
  19. package/features/compression/GzipCompression.js +21 -20
  20. package/features/compression/GzipCompression.js.map +1 -1
  21. package/features/compression/JsonpackCompression.js +21 -23
  22. package/features/compression/JsonpackCompression.js.map +1 -1
  23. package/features/compression/abstractions/Compression.js +2 -1
  24. package/features/compression/abstractions/Compression.js.map +1 -1
  25. package/features/compression/abstractions/CompressionHandler.js +2 -1
  26. package/features/compression/abstractions/CompressionHandler.js.map +1 -1
  27. package/features/compression/feature.js +8 -7
  28. package/features/compression/feature.js.map +1 -1
  29. package/features/compression/legacy/CompressionPlugin.js +5 -2
  30. package/features/compression/legacy/CompressionPlugin.js.map +1 -1
  31. package/features/compression/legacy/Compressor.js +41 -53
  32. package/features/compression/legacy/Compressor.js.map +1 -1
  33. package/features/compression/legacy/gzip.js +12 -21
  34. package/features/compression/legacy/gzip.js.map +1 -1
  35. package/features/compression/legacy/index.js +0 -2
  36. package/features/compression/legacy/jsonpack.js +5 -8
  37. package/features/compression/legacy/jsonpack.js.map +1 -1
  38. package/features/compression/legacy/plugins/GzipCompression.js +52 -45
  39. package/features/compression/legacy/plugins/GzipCompression.js.map +1 -1
  40. package/features/compression/legacy/plugins/JsonpackCompression.js +32 -41
  41. package/features/compression/legacy/plugins/JsonpackCompression.js.map +1 -1
  42. package/generateId.js +7 -8
  43. package/generateId.js.map +1 -1
  44. package/getObjectProperties.js +7 -12
  45. package/getObjectProperties.js.map +1 -1
  46. package/headers.js +9 -13
  47. package/headers.js.map +1 -1
  48. package/index.js +1 -4
  49. package/mdbid.js +3 -4
  50. package/mdbid.js.map +1 -1
  51. package/middleware.js +25 -37
  52. package/middleware.js.map +1 -1
  53. package/package.json +8 -8
  54. package/parseIdentifier.js +16 -26
  55. package/parseIdentifier.js.map +1 -1
  56. package/removeNullValues.js +5 -9
  57. package/removeNullValues.js.map +1 -1
  58. package/removeUndefinedValues.js +5 -9
  59. package/removeUndefinedValues.js.map +1 -1
  60. package/utcTimezones.js +159 -118
  61. package/utcTimezones.js.map +1 -1
  62. package/zeroPad.js +2 -7
  63. package/zeroPad.js.map +1 -1
  64. package/GenericRecord.js.map +0 -1
  65. package/exports/api.js.map +0 -1
  66. package/features/compression/legacy/index.js.map +0 -1
  67. package/index.js.map +0 -1
package/headers.js CHANGED
@@ -1,16 +1,12 @@
1
- export const WEBINY_VERSION_HEADER = "x-webiny-version";
2
- export const getWebinyVersionHeaders = () => {
3
- const enable = process.env.WEBINY_ENABLE_VERSION_HEADER;
4
- const version = process.env.WEBINY_VERSION;
5
- /**
6
- * Disable version headers by default.
7
- */
8
- if (enable !== "true" || !version) {
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,"names":["WEBINY_VERSION_HEADER","getWebinyVersionHeaders","enable","process","env","WEBINY_ENABLE_VERSION_HEADER","version","WEBINY_VERSION"],"sources":["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"],"mappings":"AAAA,OAAO,MAAMA,qBAAqB,GAAG,kBAAkB;AAEvD,OAAO,MAAMC,uBAAuB,GAAGA,CAAA,KAAM;EACzC,MAAMC,MAA0B,GAAGC,OAAO,CAACC,GAAG,CAACC,4BAA4B;EAC3E,MAAMC,OAA2B,GAAGH,OAAO,CAACC,GAAG,CAACG,cAAc;EAC9D;AACJ;AACA;EACI,IAAIL,MAAM,KAAK,MAAM,IAAI,CAACI,OAAO,EAAE;IAC/B,OAAO,CAAC,CAAC;EACb;EACA,OAAO;IACH,kBAAkB,EAAEA;EACxB,CAAC;AACL,CAAC","ignoreList":[]}
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
- import { composeAsync } from "./compose.js";
18
- export { composeAsync };
19
-
20
- //# sourceMappingURL=index.js.map
17
+ export { composeAsync } from "./compose.js";
package/mdbid.js CHANGED
@@ -1,6 +1,5 @@
1
- import ObjectID from "bson-objectid";
2
- export const mdbid = () => {
3
- return ObjectID().toHexString();
4
- };
1
+ import bson_objectid from "bson-objectid";
2
+ const mdbid = ()=>bson_objectid().toHexString();
3
+ export { mdbid };
5
4
 
6
5
  //# sourceMappingURL=mdbid.js.map
package/mdbid.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"names":["ObjectID","mdbid","toHexString"],"sources":["mdbid.ts"],"sourcesContent":["import ObjectID from \"bson-objectid\";\n\nexport const mdbid = () => {\n return ObjectID().toHexString();\n};\n"],"mappings":"AAAA,OAAOA,QAAQ,MAAM,eAAe;AAEpC,OAAO,MAAMC,KAAK,GAAGA,CAAA,KAAM;EACvB,OAAOD,QAAQ,CAAC,CAAC,CAACE,WAAW,CAAC,CAAC;AACnC,CAAC","ignoreList":[]}
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
- * Compose a single middleware from the array of middleware functions
3
- */
4
- export const middleware = (functions = []) => {
5
- return (...args) => {
6
- if (!functions.length) {
7
- return Promise.resolve(undefined);
8
- }
9
-
10
- // Create a clone of function chain to prevent modifying the original array with `shift()`
11
- const chain = [...functions];
12
- return new Promise((parentResolve, parentReject) => {
13
- const next = async () => {
14
- const fn = chain.shift();
15
- if (!fn) {
16
- return Promise.resolve();
17
- }
18
- return new Promise(async (resolve, reject) => {
19
- try {
20
- const result = await fn(...args, resolve);
21
- if (typeof result !== "undefined") {
22
- return parentResolve(result);
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
- return next();
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,"names":["middleware","functions","args","length","Promise","resolve","undefined","chain","parentResolve","parentReject","next","fn","shift","reject","result","e","then","catch"],"sources":["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"],"mappings":"AAWA;AACA;AACA;AACA,OAAO,MAAMA,UAAU,GAAGA,CAA+BC,SAA+B,GAAG,EAAE,KAAK;EAC9F,OAAO,CAAC,GAAGC,IAAc,KAAoC;IACzD,IAAI,CAACD,SAAS,CAACE,MAAM,EAAE;MACnB,OAAOC,OAAO,CAACC,OAAO,CAAuBC,SAAS,CAAC;IAC3D;;IAEA;IACA,MAAMC,KAAK,GAAG,CAAC,GAAGN,SAAS,CAAC;IAC5B,OAAO,IAAIG,OAAO,CAAC,CAACI,aAAgC,EAAEC,YAA8B,KAAK;MACrF,MAAMC,IAAI,GAAG,MAAAA,CAAA,KAA0B;QACnC,MAAMC,EAAE,GAAGJ,KAAK,CAACK,KAAK,CAAC,CAAC;QACxB,IAAI,CAACD,EAAE,EAAE;UACL,OAAOP,OAAO,CAACC,OAAO,CAAC,CAAC;QAC5B;QAEA,OAAO,IAAID,OAAO,CAAC,OAAOC,OAAO,EAAEQ,MAAM,KAAK;UAC1C,IAAI;YACA,MAAMC,MAAM,GAAG,MAAMH,EAAE,CAAC,GAAGT,IAAI,EAAEG,OAAO,CAAC;YACzC,IAAI,OAAOS,MAAM,KAAK,WAAW,EAAE;cAC/B,OAAON,aAAa,CAACM,MAAM,CAAC;YAChC;UACJ,CAAC,CAAC,OAAOC,CAAC,EAAE;YACRF,MAAM,CAACE,CAAC,CAAC;UACb;QACJ,CAAC,CAAC,CACGC,IAAI,CAAC,MAAM;UACR,OAAON,IAAI,CAAC,CAAC;QACjB,CAAC,CAAC,CACDM,IAAI,CAAC,MAAM;UACRR,aAAa,CAAC,GAAGN,IAAI,CAAC;QAC1B,CAAC,CAAC,CACDe,KAAK,CAACF,CAAC,IAAI;UACRN,YAAY,CAACM,CAAC,CAAC;QACnB,CAAC,CAAC;MACV,CAAC;MAED,OAAOL,IAAI,CAAC,CAAC;IACjB,CAAC,CAAC;EACN,CAAC;AACL,CAAC","ignoreList":[]}
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.0",
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.3.0",
24
- "@webiny/feature": "6.3.0",
25
- "@webiny/plugins": "6.3.0",
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.6"
31
+ "zod": "4.4.3"
32
32
  },
33
33
  "devDependencies": {
34
- "@webiny/build-tools": "6.3.0",
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.5"
37
+ "vitest": "4.1.6"
38
38
  },
39
- "gitHead": "7cefe15431dbd65504e1f58147dc9e55bcbfa693"
39
+ "gitHead": "a545d7529828af07d08d49c3da1bcb967483b9ce"
40
40
  }
@@ -1,31 +1,21 @@
1
- /**
2
- * When you want to extract the generated ID and version out of the identifier string.
3
- * In case there is no version, it's not a problem, possibly only generated ID was sent.
4
- * It does not cause an error. Write check for that in the code using this fn.
5
- */
6
- import WebinyError from "@webiny/error";
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
- const version = initialVersion ? Number(initialVersion) : null;
18
- if (version !== null && version <= 0) {
19
- throw new WebinyError("Version parsed from ID is less or equal to zero.", "MALFORMED_VALUE", {
20
- id,
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
- return {
26
- id,
27
- version
28
- };
14
+ return {
15
+ id,
16
+ version
17
+ };
29
18
  };
19
+ export { parseIdentifier };
30
20
 
31
21
  //# sourceMappingURL=parseIdentifier.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["WebinyError","parseIdentifier","value","id","initialVersion","split","version","Number"],"sources":["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"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA,OAAOA,WAAW,MAAM,eAAe;AAOvC,OAAO,MAAMC,eAAe,GAAIC,KAAyB,IAA4B;EACjF,IAAI,CAACA,KAAK,EAAE;IACR,MAAM,IAAIF,WAAW,CAAC,gDAAgD,EAAE,iBAAiB,CAAC;EAC9F;EACA,MAAM,CAACG,EAAE,EAAEC,cAAc,CAAC,GAAGF,KAAK,CAACG,KAAK,CAAC,GAAG,CAAC;EAC7C,IAAI,CAACF,EAAE,EAAE;IACL,MAAM,IAAIH,WAAW,CAAC,4BAA4B,EAAE,iBAAiB,EAAE;MACnEE;IACJ,CAAC,CAAC;EACN;EACA,MAAMI,OAAO,GAAGF,cAAc,GAAGG,MAAM,CAACH,cAAc,CAAC,GAAG,IAAI;EAC9D,IAAIE,OAAO,KAAK,IAAI,IAAIA,OAAO,IAAI,CAAC,EAAE;IAClC,MAAM,IAAIN,WAAW,CACjB,kDAAkD,EAClD,iBAAiB,EACjB;MACIG,EAAE;MACFG,OAAO;MACPJ;IACJ,CACJ,CAAC;EACL;EACA,OAAO;IACHC,EAAE;IACFG;EACJ,CAAC;AACL,CAAC","ignoreList":[]}
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"}
@@ -1,12 +1,8 @@
1
- export const removeNullValues = target => {
2
- const result = {};
3
- for (const key in target) {
4
- if (target[key] === null) {
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
@@ -1 +1 @@
1
- {"version":3,"names":["removeNullValues","target","result","key"],"sources":["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"],"mappings":"AAIA,OAAO,MAAMA,gBAAgB,GAAmCC,MAAS,IAAK;EAC1E,MAAMC,MAAM,GAAG,CAAC,CAA2B;EAC3C,KAAK,MAAMC,GAAG,IAAIF,MAAM,EAAE;IACtB,IAAIA,MAAM,CAACE,GAAG,CAAC,KAAK,IAAI,EAAE;MACtB;IACJ;IAEAD,MAAM,CAACC,GAAG,CAAC,GAAGF,MAAM,CAACE,GAAG,CAAC;EAC7B;EACA,OAAOD,MAAM;AACjB,CAAC","ignoreList":[]}
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"}
@@ -1,12 +1,8 @@
1
- export const removeUndefinedValues = target => {
2
- const result = {};
3
- for (const key in target) {
4
- if (target[key] === undefined) {
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,"names":["removeUndefinedValues","target","result","key","undefined"],"sources":["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"],"mappings":"AAAA,OAAO,MAAMA,qBAAqB,GAAmCC,MAAS,IAAK;EAC/E,MAAMC,MAAM,GAAG,CAAC,CAAM;EACtB,KAAK,MAAMC,GAAG,IAAIF,MAAM,EAAE;IACtB,IAAIA,MAAM,CAACE,GAAG,CAAC,KAAKC,SAAS,EAAE;MAC3B;IACJ;IAEAF,MAAM,CAACC,GAAG,CAAC,GAAGF,MAAM,CAACE,GAAG,CAAC;EAC7B;EACA,OAAOD,MAAM;AACjB,CAAC","ignoreList":[]}
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
- export const UTC_TIMEZONES = [{
2
- value: "-12:00",
3
- label: "UTC-12:00"
4
- }, {
5
- value: "-11:00",
6
- label: "UTC-11:00"
7
- }, {
8
- value: "-10:00",
9
- label: "UTC-10:00"
10
- }, {
11
- value: "-09:30",
12
- label: "UTC-09:30"
13
- }, {
14
- value: "-09:00",
15
- label: "UTC-09:00"
16
- }, {
17
- value: "-08:00",
18
- label: "UTC-08:00"
19
- }, {
20
- value: "-07:00",
21
- label: "UTC-07:00"
22
- }, {
23
- value: "-06:00",
24
- label: "UTC-06:00"
25
- }, {
26
- value: "-05:00",
27
- label: "UTC-05:00"
28
- }, {
29
- value: "-04:30",
30
- label: "UTC-04:30"
31
- }, {
32
- value: "-04:00",
33
- label: "UTC-04:00"
34
- }, {
35
- value: "-03:30",
36
- label: "UTC-03:30"
37
- }, {
38
- value: "-03:00",
39
- label: "UTC-03:00"
40
- }, {
41
- value: "-02:00",
42
- label: "UTC-02:00"
43
- }, {
44
- value: "-01:00",
45
- label: "UTC-01:00"
46
- }, {
47
- value: "+00:00",
48
- label: "UTC+00:00"
49
- }, {
50
- value: "+01:00",
51
- label: "UTC+01:00"
52
- }, {
53
- value: "+02:00",
54
- label: "UTC+02:00"
55
- }, {
56
- value: "+03:00",
57
- label: "UTC+03:00"
58
- }, {
59
- value: "+03:30",
60
- label: "UTC+03:30"
61
- }, {
62
- value: "+04:00",
63
- label: "UTC+04:00"
64
- }, {
65
- value: "+04:30",
66
- label: "UTC+04:30"
67
- }, {
68
- value: "+05:30",
69
- label: "UTC+05:30"
70
- }, {
71
- value: "+05:45",
72
- label: "UTC+05:45"
73
- }, {
74
- value: "+06:00",
75
- label: "UTC+06:00"
76
- }, {
77
- value: "+06:30",
78
- label: "UTC+06:30"
79
- }, {
80
- value: "+07:00",
81
- label: "UTC+07:00"
82
- }, {
83
- value: "+08:00",
84
- label: "UTC+08:00"
85
- }, {
86
- value: "+08:45",
87
- label: "UTC+08:45"
88
- }, {
89
- value: "+09:00",
90
- label: "UTC+09:00"
91
- }, {
92
- value: "+09:30",
93
- label: "UTC+09:30"
94
- }, {
95
- value: "+10:00",
96
- label: "UTC+10:00"
97
- }, {
98
- value: "+10:30",
99
- label: "UTC+10:30"
100
- }, {
101
- value: "+11:00",
102
- label: "UTC+11:00"
103
- }, {
104
- value: "+11:30",
105
- label: "UTC+11:30"
106
- }, {
107
- value: "+12:00",
108
- label: "UTC+12:00"
109
- }, {
110
- value: "+12:45",
111
- label: "UTC+12:45"
112
- }, {
113
- value: "+13:00",
114
- label: "UTC+13:00"
115
- }, {
116
- value: "+14:00",
117
- label: "UTC+14:00"
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
@@ -1 +1 @@
1
- {"version":3,"names":["UTC_TIMEZONES","value","label"],"sources":["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"],"mappings":"AAAA,OAAO,MAAMA,aAAa,GAAG,CACzB;EACIC,KAAK,EAAE,QAAQ;EACfC,KAAK,EAAE;AACX,CAAC,EACD;EACID,KAAK,EAAE,QAAQ;EACfC,KAAK,EAAE;AACX,CAAC,EACD;EACID,KAAK,EAAE,QAAQ;EACfC,KAAK,EAAE;AACX,CAAC,EACD;EACID,KAAK,EAAE,QAAQ;EACfC,KAAK,EAAE;AACX,CAAC,EACD;EACID,KAAK,EAAE,QAAQ;EACfC,KAAK,EAAE;AACX,CAAC,EACD;EACID,KAAK,EAAE,QAAQ;EACfC,KAAK,EAAE;AACX,CAAC,EACD;EACID,KAAK,EAAE,QAAQ;EACfC,KAAK,EAAE;AACX,CAAC,EACD;EACID,KAAK,EAAE,QAAQ;EACfC,KAAK,EAAE;AACX,CAAC,EACD;EACID,KAAK,EAAE,QAAQ;EACfC,KAAK,EAAE;AACX,CAAC,EACD;EACID,KAAK,EAAE,QAAQ;EACfC,KAAK,EAAE;AACX,CAAC,EACD;EACID,KAAK,EAAE,QAAQ;EACfC,KAAK,EAAE;AACX,CAAC,EACD;EACID,KAAK,EAAE,QAAQ;EACfC,KAAK,EAAE;AACX,CAAC,EACD;EACID,KAAK,EAAE,QAAQ;EACfC,KAAK,EAAE;AACX,CAAC,EACD;EACID,KAAK,EAAE,QAAQ;EACfC,KAAK,EAAE;AACX,CAAC,EACD;EACID,KAAK,EAAE,QAAQ;EACfC,KAAK,EAAE;AACX,CAAC,EACD;EACID,KAAK,EAAE,QAAQ;EACfC,KAAK,EAAE;AACX,CAAC,EACD;EACID,KAAK,EAAE,QAAQ;EACfC,KAAK,EAAE;AACX,CAAC,EACD;EACID,KAAK,EAAE,QAAQ;EACfC,KAAK,EAAE;AACX,CAAC,EACD;EACID,KAAK,EAAE,QAAQ;EACfC,KAAK,EAAE;AACX,CAAC,EACD;EACID,KAAK,EAAE,QAAQ;EACfC,KAAK,EAAE;AACX,CAAC,EACD;EACID,KAAK,EAAE,QAAQ;EACfC,KAAK,EAAE;AACX,CAAC,EACD;EACID,KAAK,EAAE,QAAQ;EACfC,KAAK,EAAE;AACX,CAAC,EACD;EACID,KAAK,EAAE,QAAQ;EACfC,KAAK,EAAE;AACX,CAAC,EACD;EACID,KAAK,EAAE,QAAQ;EACfC,KAAK,EAAE;AACX,CAAC,EACD;EACID,KAAK,EAAE,QAAQ;EACfC,KAAK,EAAE;AACX,CAAC,EACD;EACID,KAAK,EAAE,QAAQ;EACfC,KAAK,EAAE;AACX,CAAC,EACD;EACID,KAAK,EAAE,QAAQ;EACfC,KAAK,EAAE;AACX,CAAC,EACD;EACID,KAAK,EAAE,QAAQ;EACfC,KAAK,EAAE;AACX,CAAC,EACD;EACID,KAAK,EAAE,QAAQ;EACfC,KAAK,EAAE;AACX,CAAC,EACD;EACID,KAAK,EAAE,QAAQ;EACfC,KAAK,EAAE;AACX,CAAC,EACD;EACID,KAAK,EAAE,QAAQ;EACfC,KAAK,EAAE;AACX,CAAC,EACD;EACID,KAAK,EAAE,QAAQ;EACfC,KAAK,EAAE;AACX,CAAC,EACD;EACID,KAAK,EAAE,QAAQ;EACfC,KAAK,EAAE;AACX,CAAC,EACD;EACID,KAAK,EAAE,QAAQ;EACfC,KAAK,EAAE;AACX,CAAC,EACD;EACID,KAAK,EAAE,QAAQ;EACfC,KAAK,EAAE;AACX,CAAC,EACD;EACID,KAAK,EAAE,QAAQ;EACfC,KAAK,EAAE;AACX,CAAC,EACD;EACID,KAAK,EAAE,QAAQ;EACfC,KAAK,EAAE;AACX,CAAC,EACD;EACID,KAAK,EAAE,QAAQ;EACfC,KAAK,EAAE;AACX,CAAC,EACD;EACID,KAAK,EAAE,QAAQ;EACfC,KAAK,EAAE;AACX,CAAC,CACJ","ignoreList":[]}
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
- * Used when we need to create an ID of some data record.
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