@webiny/utils 5.37.0-beta.0 → 5.37.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/compose.js.map +1 -1
- package/compression/gzip.js.map +1 -1
- package/createIdentifier.js +8 -0
- package/createIdentifier.js.map +1 -1
- package/createZodError.js.map +1 -1
- package/cursor.js.map +1 -1
- package/executeWithRetry.js.map +1 -1
- package/generateId.js +1 -3
- package/generateId.js.map +1 -1
- package/headers.js.map +1 -1
- package/index.d.ts +1 -0
- package/index.js +12 -0
- package/index.js.map +1 -1
- package/mdbid.js.map +1 -1
- package/package.json +11 -11
- package/parseIdentifier.js.map +1 -1
- package/removeNullValues.js.map +1 -1
- package/removeUndefinedValues.js.map +1 -1
- package/utcTimezones.d.ts +4 -0
- package/utcTimezones.js +125 -0
- package/utcTimezones.js.map +1 -0
- package/zeroPad.js.map +1 -1
package/compose.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["composeAsync","functions","input","length","Promise","resolve","index","next","fn","composeSync"],"sources":["compose.ts"],"sourcesContent":["export interface NextAsyncProcessor<TInput, TOutput> {\n (input: TInput): Promise<TOutput>;\n}\n\nexport interface AsyncProcessor<TInput, TOutput = TInput> {\n (next: NextAsyncProcessor<TInput, TOutput>): NextAsyncProcessor<TInput, TOutput>;\n}\n\nexport interface NextSyncProcessor<TInput, TOutput = TInput> {\n (input: TInput): TOutput;\n}\n\nexport interface SyncProcessor<TInput, TOutput = TInput> {\n (next: NextSyncProcessor<TInput, TOutput>): NextSyncProcessor<TInput, TOutput>;\n}\n\nexport function composeAsync<TInput = unknown, TOutput = TInput>(\n functions: Array<AsyncProcessor<TInput, TOutput>> = []\n): NextAsyncProcessor<TInput, TOutput> {\n return (input: TInput): Promise<TOutput> => {\n if (!functions.length) {\n return Promise.resolve(input as unknown as TOutput);\n }\n\n let index = -1;\n\n const next: NextAsyncProcessor<TInput, TOutput> = async input => {\n index++;\n\n const fn = functions[index];\n if (!fn) {\n return input as unknown as TOutput;\n }\n\n return fn(next)(input);\n };\n\n return next(input);\n };\n}\n\nexport function composeSync<TInput = unknown, TOutput = TInput>(\n functions: Array<SyncProcessor<TInput, TOutput>> = []\n): NextSyncProcessor<TInput, TOutput> {\n return (input: TInput): TOutput => {\n if (!functions.length) {\n return input as unknown as TOutput;\n }\n\n // Create a clone of function chain to prevent modifying the original array with `shift()`\n let index = -1;\n\n const next: NextSyncProcessor<TInput, TOutput> = input => {\n index++;\n\n const fn = functions[index];\n if (!fn) {\n return input as unknown as TOutput;\n }\n\n return fn(next)(input);\n };\n\n return next(input);\n };\n}\n"],"mappings":";;;;;;;AAgBO,SAASA,
|
|
1
|
+
{"version":3,"names":["composeAsync","functions","input","length","Promise","resolve","index","next","fn","composeSync"],"sources":["compose.ts"],"sourcesContent":["export interface NextAsyncProcessor<TInput, TOutput> {\n (input: TInput): Promise<TOutput>;\n}\n\nexport interface AsyncProcessor<TInput, TOutput = TInput> {\n (next: NextAsyncProcessor<TInput, TOutput>): NextAsyncProcessor<TInput, TOutput>;\n}\n\nexport interface NextSyncProcessor<TInput, TOutput = TInput> {\n (input: TInput): TOutput;\n}\n\nexport interface SyncProcessor<TInput, TOutput = TInput> {\n (next: NextSyncProcessor<TInput, TOutput>): NextSyncProcessor<TInput, TOutput>;\n}\n\nexport function composeAsync<TInput = unknown, TOutput = TInput>(\n functions: Array<AsyncProcessor<TInput, TOutput>> = []\n): NextAsyncProcessor<TInput, TOutput> {\n return (input: TInput): Promise<TOutput> => {\n if (!functions.length) {\n return Promise.resolve(input as unknown as TOutput);\n }\n\n let index = -1;\n\n const next: NextAsyncProcessor<TInput, TOutput> = async input => {\n index++;\n\n const fn = functions[index];\n if (!fn) {\n return input as unknown as TOutput;\n }\n\n return fn(next)(input);\n };\n\n return next(input);\n };\n}\n\nexport function composeSync<TInput = unknown, TOutput = TInput>(\n functions: Array<SyncProcessor<TInput, TOutput>> = []\n): NextSyncProcessor<TInput, TOutput> {\n return (input: TInput): TOutput => {\n if (!functions.length) {\n return input as unknown as TOutput;\n }\n\n // Create a clone of function chain to prevent modifying the original array with `shift()`\n let index = -1;\n\n const next: NextSyncProcessor<TInput, TOutput> = input => {\n index++;\n\n const fn = functions[index];\n if (!fn) {\n return input as unknown as TOutput;\n }\n\n return fn(next)(input);\n };\n\n return next(input);\n };\n}\n"],"mappings":";;;;;;;AAgBO,SAASA,YAAYA,CACxBC,SAAiD,GAAG,EAAE,EACnB;EACnC,OAAQC,KAAa,IAAuB;IACxC,IAAI,CAACD,SAAS,CAACE,MAAM,EAAE;MACnB,OAAOC,OAAO,CAACC,OAAO,CAACH,KAA2B,CAAC;IACvD;IAEA,IAAII,KAAK,GAAG,CAAC,CAAC;IAEd,MAAMC,IAAyC,GAAG,MAAML,KAAK,IAAI;MAC7DI,KAAK,EAAE;MAEP,MAAME,EAAE,GAAGP,SAAS,CAACK,KAAK,CAAC;MAC3B,IAAI,CAACE,EAAE,EAAE;QACL,OAAON,KAAK;MAChB;MAEA,OAAOM,EAAE,CAACD,IAAI,CAAC,CAACL,KAAK,CAAC;IAC1B,CAAC;IAED,OAAOK,IAAI,CAACL,KAAK,CAAC;EACtB,CAAC;AACL;AAEO,SAASO,WAAWA,CACvBR,SAAgD,GAAG,EAAE,EACnB;EAClC,OAAQC,KAAa,IAAc;IAC/B,IAAI,CAACD,SAAS,CAACE,MAAM,EAAE;MACnB,OAAOD,KAAK;IAChB;;IAEA;IACA,IAAII,KAAK,GAAG,CAAC,CAAC;IAEd,MAAMC,IAAwC,GAAGL,KAAK,IAAI;MACtDI,KAAK,EAAE;MAEP,MAAME,EAAE,GAAGP,SAAS,CAACK,KAAK,CAAC;MAC3B,IAAI,CAACE,EAAE,EAAE;QACL,OAAON,KAAK;MAChB;MAEA,OAAOM,EAAE,CAACD,IAAI,CAAC,CAACL,KAAK,CAAC;IAC1B,CAAC;IAED,OAAOK,IAAI,CAACL,KAAK,CAAC;EACtB,CAAC;AACL"}
|
package/compression/gzip.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["compress","input","options","Promise","resolve","reject","zlib","gzip","error","result","decompress","gunzip"],"sources":["gzip.ts"],"sourcesContent":["import zlib from \"zlib\";\n\nexport const compress = (input: zlib.InputType, options?: zlib.ZlibOptions): Promise<Buffer> => {\n return new Promise(function (resolve, reject) {\n zlib.gzip(input, options || {}, function (error, result) {\n if (!error) {\n resolve(result);\n } else {\n reject(error);\n }\n });\n });\n};\nexport const decompress = (input: zlib.InputType, options?: zlib.ZlibOptions): Promise<Buffer> => {\n return new Promise(function (resolve, reject) {\n zlib.gunzip(input, options || {}, function (error, result) {\n if (!error) {\n resolve(result);\n } else {\n reject(error);\n }\n });\n });\n};\n"],"mappings":";;;;;;;AAAA;AAEO,
|
|
1
|
+
{"version":3,"names":["_zlib","_interopRequireDefault","require","compress","input","options","Promise","resolve","reject","zlib","gzip","error","result","exports","decompress","gunzip"],"sources":["gzip.ts"],"sourcesContent":["import zlib from \"zlib\";\n\nexport const compress = (input: zlib.InputType, options?: zlib.ZlibOptions): Promise<Buffer> => {\n return new Promise(function (resolve, reject) {\n zlib.gzip(input, options || {}, function (error, result) {\n if (!error) {\n resolve(result);\n } else {\n reject(error);\n }\n });\n });\n};\nexport const decompress = (input: zlib.InputType, options?: zlib.ZlibOptions): Promise<Buffer> => {\n return new Promise(function (resolve, reject) {\n zlib.gunzip(input, options || {}, function (error, result) {\n if (!error) {\n resolve(result);\n } else {\n reject(error);\n }\n });\n });\n};\n"],"mappings":";;;;;;;AAAA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AAEO,MAAMC,QAAQ,GAAGA,CAACC,KAAqB,EAAEC,OAA0B,KAAsB;EAC5F,OAAO,IAAIC,OAAO,CAAC,UAAUC,OAAO,EAAEC,MAAM,EAAE;IAC1CC,aAAI,CAACC,IAAI,CAACN,KAAK,EAAEC,OAAO,IAAI,CAAC,CAAC,EAAE,UAAUM,KAAK,EAAEC,MAAM,EAAE;MACrD,IAAI,CAACD,KAAK,EAAE;QACRJ,OAAO,CAACK,MAAM,CAAC;MACnB,CAAC,MAAM;QACHJ,MAAM,CAACG,KAAK,CAAC;MACjB;IACJ,CAAC,CAAC;EACN,CAAC,CAAC;AACN,CAAC;AAACE,OAAA,CAAAV,QAAA,GAAAA,QAAA;AACK,MAAMW,UAAU,GAAGA,CAACV,KAAqB,EAAEC,OAA0B,KAAsB;EAC9F,OAAO,IAAIC,OAAO,CAAC,UAAUC,OAAO,EAAEC,MAAM,EAAE;IAC1CC,aAAI,CAACM,MAAM,CAACX,KAAK,EAAEC,OAAO,IAAI,CAAC,CAAC,EAAE,UAAUM,KAAK,EAAEC,MAAM,EAAE;MACvD,IAAI,CAACD,KAAK,EAAE;QACRJ,OAAO,CAACK,MAAM,CAAC;MACnB,CAAC,MAAM;QACHJ,MAAM,CAACG,KAAK,CAAC;MACjB;IACJ,CAAC,CAAC;EACN,CAAC,CAAC;AACN,CAAC;AAACE,OAAA,CAAAC,UAAA,GAAAA,UAAA"}
|
package/createIdentifier.js
CHANGED
|
@@ -6,6 +6,14 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.createIdentifier = void 0;
|
|
7
7
|
var _zeroPad = require("./zeroPad");
|
|
8
8
|
var _parseIdentifier = require("./parseIdentifier");
|
|
9
|
+
/**
|
|
10
|
+
* Used to create the identifier that is an absolute unique for the record.
|
|
11
|
+
* It is created out of the generated ID and version of the record.
|
|
12
|
+
*
|
|
13
|
+
*
|
|
14
|
+
* The input ID is being parsed as you might send a full ID instead of only the generated one.
|
|
15
|
+
*/
|
|
16
|
+
|
|
9
17
|
const createIdentifier = values => {
|
|
10
18
|
const {
|
|
11
19
|
id
|
package/createIdentifier.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["createIdentifier","values","id","parseIdentifier","zeroPad","version"],"sources":["createIdentifier.ts"],"sourcesContent":["import { zeroPad } from \"~/zeroPad\";\nimport { parseIdentifier } from \"~/parseIdentifier\";\n\n/**\n * Used to create the identifier that is an absolute unique for the record.\n * It is created out of the generated ID and version of the record.\n *\n *\n * The input ID is being parsed as you might send a full ID instead of only the generated one.\n */\nexport interface CreateIdentifierParams {\n id: string;\n version: number;\n}\n\nexport const createIdentifier = (values: CreateIdentifierParams): string => {\n const { id } = parseIdentifier(values.id);\n\n return `${id}#${zeroPad(values.version)}`;\n};\n"],"mappings":";;;;;;AAAA;AACA;
|
|
1
|
+
{"version":3,"names":["_zeroPad","require","_parseIdentifier","createIdentifier","values","id","parseIdentifier","zeroPad","version","exports"],"sources":["createIdentifier.ts"],"sourcesContent":["import { zeroPad } from \"~/zeroPad\";\nimport { parseIdentifier } from \"~/parseIdentifier\";\n\n/**\n * Used to create the identifier that is an absolute unique for the record.\n * It is created out of the generated ID and version of the record.\n *\n *\n * The input ID is being parsed as you might send a full ID instead of only the generated one.\n */\nexport interface CreateIdentifierParams {\n id: string;\n version: number;\n}\n\nexport const createIdentifier = (values: CreateIdentifierParams): string => {\n const { id } = parseIdentifier(values.id);\n\n return `${id}#${zeroPad(values.version)}`;\n};\n"],"mappings":";;;;;;AAAA,IAAAA,QAAA,GAAAC,OAAA;AACA,IAAAC,gBAAA,GAAAD,OAAA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAMO,MAAME,gBAAgB,GAAIC,MAA8B,IAAa;EACxE,MAAM;IAAEC;EAAG,CAAC,GAAG,IAAAC,gCAAe,EAACF,MAAM,CAACC,EAAE,CAAC;EAEzC,OAAQ,GAAEA,EAAG,IAAG,IAAAE,gBAAO,EAACH,MAAM,CAACI,OAAO,CAAE,EAAC;AAC7C,CAAC;AAACC,OAAA,CAAAN,gBAAA,GAAAA,gBAAA"}
|
package/createZodError.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["createValidationErrorData","error","invalidFields","issues","reduce","collection","issue","name","path","join","code","message","data","fatal","createZodError","WebinyError"],"sources":["createZodError.ts"],"sourcesContent":["import WebinyError from \"@webiny/error\";\nimport { ZodError } from \"zod/lib/ZodError\";\n\ninterface OutputError {\n code: string;\n data: Record<string, any> | null;\n message: string;\n}\n\ninterface OutputErrors {\n [key: string]: OutputError;\n}\n\nconst createValidationErrorData = (error: ZodError) => {\n return {\n invalidFields: error.issues.reduce<OutputErrors>((collection, issue) => {\n const name = issue.path.join(\".\");\n if (!name) {\n return collection;\n }\n collection[name] = {\n code: issue.code,\n message: issue.message,\n data: {\n fatal: issue.fatal,\n path: issue.path\n }\n };\n\n return collection;\n }, {})\n };\n};\n\nexport const createZodError = (error: ZodError) => {\n return new WebinyError({\n message: `Validation failed.`,\n code: \"VALIDATION_FAILED_INVALID_FIELDS\",\n data: createValidationErrorData(error)\n });\n};\n"],"mappings":";;;;;;;AAAA;AAaA,
|
|
1
|
+
{"version":3,"names":["_error","_interopRequireDefault","require","createValidationErrorData","error","invalidFields","issues","reduce","collection","issue","name","path","join","code","message","data","fatal","createZodError","WebinyError","exports"],"sources":["createZodError.ts"],"sourcesContent":["import WebinyError from \"@webiny/error\";\nimport { ZodError } from \"zod/lib/ZodError\";\n\ninterface OutputError {\n code: string;\n data: Record<string, any> | null;\n message: string;\n}\n\ninterface OutputErrors {\n [key: string]: OutputError;\n}\n\nconst createValidationErrorData = (error: ZodError) => {\n return {\n invalidFields: error.issues.reduce<OutputErrors>((collection, issue) => {\n const name = issue.path.join(\".\");\n if (!name) {\n return collection;\n }\n collection[name] = {\n code: issue.code,\n message: issue.message,\n data: {\n fatal: issue.fatal,\n path: issue.path\n }\n };\n\n return collection;\n }, {})\n };\n};\n\nexport const createZodError = (error: ZodError) => {\n return new WebinyError({\n message: `Validation failed.`,\n code: \"VALIDATION_FAILED_INVALID_FIELDS\",\n data: createValidationErrorData(error)\n });\n};\n"],"mappings":";;;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AAaA,MAAMC,yBAAyB,GAAIC,KAAe,IAAK;EACnD,OAAO;IACHC,aAAa,EAAED,KAAK,CAACE,MAAM,CAACC,MAAM,CAAe,CAACC,UAAU,EAAEC,KAAK,KAAK;MACpE,MAAMC,IAAI,GAAGD,KAAK,CAACE,IAAI,CAACC,IAAI,CAAC,GAAG,CAAC;MACjC,IAAI,CAACF,IAAI,EAAE;QACP,OAAOF,UAAU;MACrB;MACAA,UAAU,CAACE,IAAI,CAAC,GAAG;QACfG,IAAI,EAAEJ,KAAK,CAACI,IAAI;QAChBC,OAAO,EAAEL,KAAK,CAACK,OAAO;QACtBC,IAAI,EAAE;UACFC,KAAK,EAAEP,KAAK,CAACO,KAAK;UAClBL,IAAI,EAAEF,KAAK,CAACE;QAChB;MACJ,CAAC;MAED,OAAOH,UAAU;IACrB,CAAC,EAAE,CAAC,CAAC;EACT,CAAC;AACL,CAAC;AAEM,MAAMS,cAAc,GAAIb,KAAe,IAAK;EAC/C,OAAO,IAAIc,cAAW,CAAC;IACnBJ,OAAO,EAAG,oBAAmB;IAC7BD,IAAI,EAAE,kCAAkC;IACxCE,IAAI,EAAEZ,yBAAyB,CAACC,KAAK;EACzC,CAAC,CAAC;AACN,CAAC;AAACe,OAAA,CAAAF,cAAA,GAAAA,cAAA"}
|
package/cursor.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["encodeCursor","cursor","Buffer","from","JSON","stringify","toString","ex","console","log","message","decodeCursor","value","parse"],"sources":["cursor.ts"],"sourcesContent":["export type CursorInput = string | number | (string | number)[] | null;\nexport type CursorOutput = string | null;\n\nexport const encodeCursor = (cursor?: CursorInput): CursorOutput => {\n if (!cursor) {\n return null;\n }\n\n try {\n return Buffer.from(JSON.stringify(cursor)).toString(\"base64\");\n } catch (ex) {\n console.log(\"Utils encode cursor.\");\n console.log(ex.message);\n return null;\n }\n};\n\nexport const decodeCursor = (cursor?: CursorOutput): CursorInput => {\n if (!cursor) {\n return null;\n }\n\n try {\n const value = Buffer.from(cursor, \"base64\").toString(\"ascii\");\n if (!value) {\n return null;\n }\n return JSON.parse(value);\n } catch (ex) {\n console.log(\"Utils decode cursor.\");\n console.log(ex.message);\n return null;\n }\n};\n"],"mappings":";;;;;;AAGO,MAAMA,YAAY,GAAIC,MAAoB,IAAmB;EAChE,IAAI,CAACA,MAAM,EAAE;IACT,OAAO,IAAI;EACf;EAEA,IAAI;IACA,OAAOC,MAAM,CAACC,IAAI,CAACC,IAAI,CAACC,SAAS,CAACJ,MAAM,CAAC,CAAC,CAACK,QAAQ,CAAC,QAAQ,CAAC;EACjE,CAAC,CAAC,OAAOC,EAAE,EAAE;IACTC,OAAO,CAACC,GAAG,CAAC,sBAAsB,CAAC;IACnCD,OAAO,CAACC,GAAG,CAACF,EAAE,CAACG,OAAO,CAAC;IACvB,OAAO,IAAI;EACf;AACJ,CAAC;
|
|
1
|
+
{"version":3,"names":["encodeCursor","cursor","Buffer","from","JSON","stringify","toString","ex","console","log","message","exports","decodeCursor","value","parse"],"sources":["cursor.ts"],"sourcesContent":["export type CursorInput = string | number | (string | number)[] | null;\nexport type CursorOutput = string | null;\n\nexport const encodeCursor = (cursor?: CursorInput): CursorOutput => {\n if (!cursor) {\n return null;\n }\n\n try {\n return Buffer.from(JSON.stringify(cursor)).toString(\"base64\");\n } catch (ex) {\n console.log(\"Utils encode cursor.\");\n console.log(ex.message);\n return null;\n }\n};\n\nexport const decodeCursor = (cursor?: CursorOutput): CursorInput => {\n if (!cursor) {\n return null;\n }\n\n try {\n const value = Buffer.from(cursor, \"base64\").toString(\"ascii\");\n if (!value) {\n return null;\n }\n return JSON.parse(value);\n } catch (ex) {\n console.log(\"Utils decode cursor.\");\n console.log(ex.message);\n return null;\n }\n};\n"],"mappings":";;;;;;AAGO,MAAMA,YAAY,GAAIC,MAAoB,IAAmB;EAChE,IAAI,CAACA,MAAM,EAAE;IACT,OAAO,IAAI;EACf;EAEA,IAAI;IACA,OAAOC,MAAM,CAACC,IAAI,CAACC,IAAI,CAACC,SAAS,CAACJ,MAAM,CAAC,CAAC,CAACK,QAAQ,CAAC,QAAQ,CAAC;EACjE,CAAC,CAAC,OAAOC,EAAE,EAAE;IACTC,OAAO,CAACC,GAAG,CAAC,sBAAsB,CAAC;IACnCD,OAAO,CAACC,GAAG,CAACF,EAAE,CAACG,OAAO,CAAC;IACvB,OAAO,IAAI;EACf;AACJ,CAAC;AAACC,OAAA,CAAAX,YAAA,GAAAA,YAAA;AAEK,MAAMY,YAAY,GAAIX,MAAqB,IAAkB;EAChE,IAAI,CAACA,MAAM,EAAE;IACT,OAAO,IAAI;EACf;EAEA,IAAI;IACA,MAAMY,KAAK,GAAGX,MAAM,CAACC,IAAI,CAACF,MAAM,EAAE,QAAQ,CAAC,CAACK,QAAQ,CAAC,OAAO,CAAC;IAC7D,IAAI,CAACO,KAAK,EAAE;MACR,OAAO,IAAI;IACf;IACA,OAAOT,IAAI,CAACU,KAAK,CAACD,KAAK,CAAC;EAC5B,CAAC,CAAC,OAAON,EAAE,EAAE;IACTC,OAAO,CAACC,GAAG,CAAC,sBAAsB,CAAC;IACnCD,OAAO,CAACC,GAAG,CAACF,EAAE,CAACG,OAAO,CAAC;IACvB,OAAO,IAAI;EACf;AACJ,CAAC;AAACC,OAAA,CAAAC,YAAA,GAAAA,YAAA"}
|
package/executeWithRetry.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["executeWithRetry","execute","options","retries","pRetry","maxRetryTime","minTimeout","maxTimeout"],"sources":["executeWithRetry.ts"],"sourcesContent":["import pRetry from \"p-retry\";\n\nexport const executeWithRetry = <T>(\n execute: () => Promise<T>,\n options?: Parameters<typeof pRetry>[1]\n) => {\n const retries = 20;\n return pRetry(execute, {\n maxRetryTime: 300000,\n retries,\n minTimeout: 1500,\n maxTimeout: 30000,\n ...options\n });\n};\n"],"mappings":";;;;;;;;AAAA;AAEO,
|
|
1
|
+
{"version":3,"names":["_pRetry","_interopRequireDefault","require","executeWithRetry","execute","options","retries","pRetry","_objectSpread2","default","maxRetryTime","minTimeout","maxTimeout","exports"],"sources":["executeWithRetry.ts"],"sourcesContent":["import pRetry from \"p-retry\";\n\nexport const executeWithRetry = <T>(\n execute: () => Promise<T>,\n options?: Parameters<typeof pRetry>[1]\n) => {\n const retries = 20;\n return pRetry(execute, {\n maxRetryTime: 300000,\n retries,\n minTimeout: 1500,\n maxTimeout: 30000,\n ...options\n });\n};\n"],"mappings":";;;;;;;;AAAA,IAAAA,OAAA,GAAAC,sBAAA,CAAAC,OAAA;AAEO,MAAMC,gBAAgB,GAAGA,CAC5BC,OAAyB,EACzBC,OAAsC,KACrC;EACD,MAAMC,OAAO,GAAG,EAAE;EAClB,OAAO,IAAAC,eAAM,EAACH,OAAO,MAAAI,cAAA,CAAAC,OAAA;IACjBC,YAAY,EAAE,MAAM;IACpBJ,OAAO;IACPK,UAAU,EAAE,IAAI;IAChBC,UAAU,EAAE;EAAK,GACdP,OAAO,CACb,CAAC;AACN,CAAC;AAACQ,OAAA,CAAAV,gBAAA,GAAAA,gBAAA"}
|
package/generateId.js
CHANGED
|
@@ -8,9 +8,7 @@ var _nanoid = require("nanoid");
|
|
|
8
8
|
var _nanoidDictionary = require("nanoid-dictionary");
|
|
9
9
|
/**
|
|
10
10
|
* Package nanoid-dictionary is missing types
|
|
11
|
-
*/
|
|
12
|
-
// @ts-ignore
|
|
13
|
-
|
|
11
|
+
*/ // @ts-ignore
|
|
14
12
|
const DEFAULT_SIZE = 21;
|
|
15
13
|
const generateAlphaNumericId = (0, _nanoid.customAlphabet)(_nanoidDictionary.alphanumeric, DEFAULT_SIZE);
|
|
16
14
|
exports.generateAlphaNumericId = generateAlphaNumericId;
|
package/generateId.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["DEFAULT_SIZE","generateAlphaNumericId","customAlphabet","alphanumeric","generateAlphaNumericLowerCaseId","lowercase","numbers","generateAlphaId","uppercase","generateAlphaLowerCaseId","generateAlphaUpperCaseId","generateId","size","nanoid"],"sources":["generateId.ts"],"sourcesContent":["import { nanoid, customAlphabet } from \"nanoid\";\n/**\n * Package nanoid-dictionary is missing types\n */\n// @ts-ignore\nimport { lowercase, uppercase, alphanumeric, numbers } from \"nanoid-dictionary\";\n\nconst DEFAULT_SIZE = 21;\n\nexport const generateAlphaNumericId = customAlphabet(alphanumeric, DEFAULT_SIZE);\n\nexport const generateAlphaNumericLowerCaseId = customAlphabet(\n `${lowercase}${numbers}`,\n DEFAULT_SIZE\n);\n\nexport const generateAlphaId = customAlphabet(`${lowercase}${uppercase}`, DEFAULT_SIZE);\n\nexport const generateAlphaLowerCaseId = customAlphabet(lowercase, DEFAULT_SIZE);\n\nexport const generateAlphaUpperCaseId = customAlphabet(uppercase, DEFAULT_SIZE);\n\nexport const generateId = (size = DEFAULT_SIZE): string => {\n return nanoid(size);\n};\n"],"mappings":";;;;;;AAAA;AAKA;AAJA;AACA;AACA;
|
|
1
|
+
{"version":3,"names":["_nanoid","require","_nanoidDictionary","DEFAULT_SIZE","generateAlphaNumericId","customAlphabet","alphanumeric","exports","generateAlphaNumericLowerCaseId","lowercase","numbers","generateAlphaId","uppercase","generateAlphaLowerCaseId","generateAlphaUpperCaseId","generateId","size","nanoid"],"sources":["generateId.ts"],"sourcesContent":["import { nanoid, customAlphabet } from \"nanoid\";\n/**\n * Package nanoid-dictionary is missing types\n */\n// @ts-ignore\nimport { lowercase, uppercase, alphanumeric, numbers } from \"nanoid-dictionary\";\n\nconst DEFAULT_SIZE = 21;\n\nexport const generateAlphaNumericId = customAlphabet(alphanumeric, DEFAULT_SIZE);\n\nexport const generateAlphaNumericLowerCaseId = customAlphabet(\n `${lowercase}${numbers}`,\n DEFAULT_SIZE\n);\n\nexport const generateAlphaId = customAlphabet(`${lowercase}${uppercase}`, DEFAULT_SIZE);\n\nexport const generateAlphaLowerCaseId = customAlphabet(lowercase, DEFAULT_SIZE);\n\nexport const generateAlphaUpperCaseId = customAlphabet(uppercase, DEFAULT_SIZE);\n\nexport const generateId = (size = DEFAULT_SIZE): string => {\n return nanoid(size);\n};\n"],"mappings":";;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AAKA,IAAAC,iBAAA,GAAAD,OAAA;AAJA;AACA;AACA,GAFA,CAGA;AAGA,MAAME,YAAY,GAAG,EAAE;AAEhB,MAAMC,sBAAsB,GAAG,IAAAC,sBAAc,EAACC,8BAAY,EAAEH,YAAY,CAAC;AAACI,OAAA,CAAAH,sBAAA,GAAAA,sBAAA;AAE1E,MAAMI,+BAA+B,GAAG,IAAAH,sBAAc,EACxD,GAAEI,2BAAU,GAAEC,yBAAQ,EAAC,EACxBP,YACJ,CAAC;AAACI,OAAA,CAAAC,+BAAA,GAAAA,+BAAA;AAEK,MAAMG,eAAe,GAAG,IAAAN,sBAAc,EAAE,GAAEI,2BAAU,GAAEG,2BAAU,EAAC,EAAET,YAAY,CAAC;AAACI,OAAA,CAAAI,eAAA,GAAAA,eAAA;AAEjF,MAAME,wBAAwB,GAAG,IAAAR,sBAAc,EAACI,2BAAS,EAAEN,YAAY,CAAC;AAACI,OAAA,CAAAM,wBAAA,GAAAA,wBAAA;AAEzE,MAAMC,wBAAwB,GAAG,IAAAT,sBAAc,EAACO,2BAAS,EAAET,YAAY,CAAC;AAACI,OAAA,CAAAO,wBAAA,GAAAA,wBAAA;AAEzE,MAAMC,UAAU,GAAGA,CAACC,IAAI,GAAGb,YAAY,KAAa;EACvD,OAAO,IAAAc,cAAM,EAACD,IAAI,CAAC;AACvB,CAAC;AAACT,OAAA,CAAAQ,UAAA,GAAAA,UAAA"}
|
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\";\nexport interface Headers {\n [WEBINY_VERSION_HEADER]: string;\n}\nexport const getWebinyVersionHeaders = (): Headers => {\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 {} as Headers;\n }\n return {\n [WEBINY_VERSION_HEADER]: version\n };\n};\n"],"mappings":";;;;;;AAAO,MAAMA,qBAAqB,GAAG,kBAAkB;
|
|
1
|
+
{"version":3,"names":["WEBINY_VERSION_HEADER","exports","getWebinyVersionHeaders","enable","process","env","WEBINY_ENABLE_VERSION_HEADER","version","WEBINY_VERSION"],"sources":["headers.ts"],"sourcesContent":["export const WEBINY_VERSION_HEADER = \"x-webiny-version\";\nexport interface Headers {\n [WEBINY_VERSION_HEADER]: string;\n}\nexport const getWebinyVersionHeaders = (): Headers => {\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 {} as Headers;\n }\n return {\n [WEBINY_VERSION_HEADER]: version\n };\n};\n"],"mappings":";;;;;;AAAO,MAAMA,qBAAqB,GAAG,kBAAkB;AAACC,OAAA,CAAAD,qBAAA,GAAAA,qBAAA;AAIjD,MAAME,uBAAuB,GAAGA,CAAA,KAAe;EAClD,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,CAACP,qBAAqB,GAAGO;EAC7B,CAAC;AACL,CAAC;AAACN,OAAA,CAAAC,uBAAA,GAAAA,uBAAA"}
|
package/index.d.ts
CHANGED
|
@@ -9,6 +9,7 @@ export * from "./createZodError";
|
|
|
9
9
|
export * from "./executeWithRetry";
|
|
10
10
|
export * from "./removeUndefinedValues";
|
|
11
11
|
export * from "./removeNullValues";
|
|
12
|
+
export * from "./utcTimezones";
|
|
12
13
|
import { composeAsync, AsyncProcessor, NextAsyncProcessor } from "./compose";
|
|
13
14
|
export { composeAsync };
|
|
14
15
|
export type { AsyncProcessor, NextAsyncProcessor };
|
package/index.js
CHANGED
|
@@ -144,4 +144,16 @@ Object.keys(_removeNullValues).forEach(function (key) {
|
|
|
144
144
|
}
|
|
145
145
|
});
|
|
146
146
|
});
|
|
147
|
+
var _utcTimezones = require("./utcTimezones");
|
|
148
|
+
Object.keys(_utcTimezones).forEach(function (key) {
|
|
149
|
+
if (key === "default" || key === "__esModule") return;
|
|
150
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
151
|
+
if (key in exports && exports[key] === _utcTimezones[key]) return;
|
|
152
|
+
Object.defineProperty(exports, key, {
|
|
153
|
+
enumerable: true,
|
|
154
|
+
get: function () {
|
|
155
|
+
return _utcTimezones[key];
|
|
156
|
+
}
|
|
157
|
+
});
|
|
158
|
+
});
|
|
147
159
|
var _compose = require("./compose");
|
package/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export * from \"~/parseIdentifier\";\nexport * from \"~/zeroPad\";\nexport * from \"~/createIdentifier\";\nexport * from \"~/cursor\";\nexport * from \"~/headers\";\nexport * from \"~/generateId\";\nexport * from \"~/mdbid\";\nexport * from \"~/createZodError\";\nexport * from \"~/executeWithRetry\";\nexport * from \"~/removeUndefinedValues\";\nexport * from \"~/removeNullValues\";\nimport { composeAsync, AsyncProcessor, NextAsyncProcessor } from \"~/compose\";\n\nexport { composeAsync };\nexport type { AsyncProcessor, NextAsyncProcessor };\n"],"mappings":";;;;;;;;;;;;;;AAAA;
|
|
1
|
+
{"version":3,"names":["_parseIdentifier","require","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","_zeroPad","_createIdentifier","_cursor","_headers","_generateId","_mdbid","_createZodError","_executeWithRetry","_removeUndefinedValues","_removeNullValues","_utcTimezones","_compose"],"sources":["index.ts"],"sourcesContent":["export * from \"~/parseIdentifier\";\nexport * from \"~/zeroPad\";\nexport * from \"~/createIdentifier\";\nexport * from \"~/cursor\";\nexport * from \"~/headers\";\nexport * from \"~/generateId\";\nexport * from \"~/mdbid\";\nexport * from \"~/createZodError\";\nexport * from \"~/executeWithRetry\";\nexport * from \"~/removeUndefinedValues\";\nexport * from \"~/removeNullValues\";\nexport * from \"~/utcTimezones\";\nimport { composeAsync, AsyncProcessor, NextAsyncProcessor } from \"~/compose\";\n\nexport { composeAsync };\nexport type { AsyncProcessor, NextAsyncProcessor };\n"],"mappings":";;;;;;;;;;;;;;AAAA,IAAAA,gBAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,gBAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAC,YAAA,EAAAJ,GAAA;EAAA,IAAAA,GAAA,IAAAK,OAAA,IAAAA,OAAA,CAAAL,GAAA,MAAAL,gBAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAS,cAAA,CAAAD,OAAA,EAAAL,GAAA;IAAAO,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAb,gBAAA,CAAAK,GAAA;IAAA;EAAA;AAAA;AACA,IAAAS,QAAA,GAAAb,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAW,QAAA,EAAAV,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAC,YAAA,EAAAJ,GAAA;EAAA,IAAAA,GAAA,IAAAK,OAAA,IAAAA,OAAA,CAAAL,GAAA,MAAAS,QAAA,CAAAT,GAAA;EAAAH,MAAA,CAAAS,cAAA,CAAAD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jB,GAAA;IAAA;EAAA;AAAA;AACA,IAAAkB,iBAAA,GAAAtB,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAoB,iBAAA,EAAAnB,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAC,YAAA,EAAAJ,GAAA;EAAA,IAAAA,GAAA,IAAAK,OAAA,IAAAA,OAAA,CAAAL,GAAA,MAAAkB,iBAAA,CAAAlB,GAAA;EAAAH,MAAA,CAAAS,cAAA,CAAAD,OAAA,EAAAL,GAAA;IAAAO,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAU,iBAAA,CAAAlB,GAAA;IAAA;EAAA;AAAA;AACA,IAAAmB,aAAA,GAAAvB,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAqB,aAAA,EAAApB,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAC,YAAA,EAAAJ,GAAA;EAAA,IAAAA,GAAA,IAAAK,OAAA,IAAAA,OAAA,CAAAL,GAAA,MAAAmB,aAAA,CAAAnB,GAAA;EAAAH,MAAA,CAAAS,cAAA,CAAAD,OAAA,EAAAL,GAAA;IAAAO,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAW,aAAA,CAAAnB,GAAA;IAAA;EAAA;AAAA;AACA,IAAAoB,QAAA,GAAAxB,OAAA"}
|
package/mdbid.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["mdbid","generateId"],"sources":["mdbid.ts"],"sourcesContent":["// @ts-ignore `mdbid` package has no types\nimport generateId from \"mdbid\";\n\nexport const mdbid = (): string => generateId();\n"],"mappings":";;;;;;;AACA;AADA;;AAGO,
|
|
1
|
+
{"version":3,"names":["_mdbid","_interopRequireDefault","require","mdbid","generateId","exports"],"sources":["mdbid.ts"],"sourcesContent":["// @ts-ignore `mdbid` package has no types\nimport generateId from \"mdbid\";\n\nexport const mdbid = (): string => generateId();\n"],"mappings":";;;;;;;AACA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AADA;;AAGO,MAAMC,KAAK,GAAGA,CAAA,KAAc,IAAAC,cAAU,EAAC,CAAC;AAACC,OAAA,CAAAF,KAAA,GAAAA,KAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webiny/utils",
|
|
3
|
-
"version": "5.37.0-beta.
|
|
3
|
+
"version": "5.37.0-beta.2",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"types": "index.d.ts",
|
|
6
6
|
"repository": {
|
|
@@ -15,26 +15,26 @@
|
|
|
15
15
|
"directory": "dist"
|
|
16
16
|
},
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@webiny/error": "5.37.0-beta.
|
|
18
|
+
"@webiny/error": "5.37.0-beta.2",
|
|
19
19
|
"mdbid": "1.0.0",
|
|
20
20
|
"nanoid": "3.3.4",
|
|
21
21
|
"nanoid-dictionary": "4.3.0",
|
|
22
22
|
"p-retry": "4.6.2"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
|
-
"@babel/cli": "7.
|
|
26
|
-
"@babel/core": "7.
|
|
27
|
-
"@babel/preset-env": "7.
|
|
28
|
-
"@babel/preset-typescript": "7.
|
|
29
|
-
"@babel/runtime": "7.
|
|
30
|
-
"@webiny/cli": "5.37.0-beta.
|
|
31
|
-
"@webiny/project-utils": "5.37.0-beta.
|
|
25
|
+
"@babel/cli": "7.22.6",
|
|
26
|
+
"@babel/core": "7.22.8",
|
|
27
|
+
"@babel/preset-env": "7.22.7",
|
|
28
|
+
"@babel/preset-typescript": "7.22.5",
|
|
29
|
+
"@babel/runtime": "7.22.6",
|
|
30
|
+
"@webiny/cli": "5.37.0-beta.2",
|
|
31
|
+
"@webiny/project-utils": "5.37.0-beta.2",
|
|
32
32
|
"rimraf": "3.0.2",
|
|
33
33
|
"ttypescript": "1.5.15",
|
|
34
34
|
"typescript": "4.7.4"
|
|
35
35
|
},
|
|
36
36
|
"peerDependencies": {
|
|
37
|
-
"zod": "^3.
|
|
37
|
+
"zod": "^3.21.4"
|
|
38
38
|
},
|
|
39
39
|
"scripts": {
|
|
40
40
|
"build": "yarn webiny run build",
|
|
@@ -47,5 +47,5 @@
|
|
|
47
47
|
]
|
|
48
48
|
}
|
|
49
49
|
},
|
|
50
|
-
"gitHead": "
|
|
50
|
+
"gitHead": "8d3f4ba102f9f73b0a17455fc401a15aea68ce63"
|
|
51
51
|
}
|
package/parseIdentifier.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["parseIdentifier","value","WebinyError","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): 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":";;;;;;;AAKA;AALA;AACA;AACA;AACA;AACA;;AAQO,
|
|
1
|
+
{"version":3,"names":["_error","_interopRequireDefault","require","parseIdentifier","value","WebinyError","id","initialVersion","split","version","Number","exports"],"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): 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":";;;;;;;AAKA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AALA;AACA;AACA;AACA;AACA;;AAQO,MAAMC,eAAe,GAAIC,KAAc,IAA4B;EACtE,IAAI,CAACA,KAAK,EAAE;IACR,MAAM,IAAIC,cAAW,CAAC,gDAAgD,EAAE,iBAAiB,CAAC;EAC9F;EACA,MAAM,CAACC,EAAE,EAAEC,cAAc,CAAC,GAAGH,KAAK,CAACI,KAAK,CAAC,GAAG,CAAC;EAC7C,IAAI,CAACF,EAAE,EAAE;IACL,MAAM,IAAID,cAAW,CAAC,4BAA4B,EAAE,iBAAiB,EAAE;MACnED;IACJ,CAAC,CAAC;EACN;EACA,MAAMK,OAAO,GAAGF,cAAc,GAAGG,MAAM,CAACH,cAAc,CAAC,GAAG,IAAI;EAC9D,IAAIE,OAAO,KAAK,IAAI,IAAIA,OAAO,IAAI,CAAC,EAAE;IAClC,MAAM,IAAIJ,cAAW,CACjB,kDAAkD,EAClD,iBAAiB,EACjB;MACIC,EAAE;MACFG,OAAO;MACPL;IACJ,CACJ,CAAC;EACL;EACA,OAAO;IACHE,EAAE;IACFG;EACJ,CAAC;AACL,CAAC;AAACE,OAAA,CAAAR,eAAA,GAAAA,eAAA"}
|
package/removeNullValues.js.map
CHANGED
|
@@ -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":";;;;;;AAIO,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;
|
|
1
|
+
{"version":3,"names":["removeNullValues","target","result","key","exports"],"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":";;;;;;AAIO,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;AAACE,OAAA,CAAAJ,gBAAA,GAAAA,gBAAA"}
|
|
@@ -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":";;;;;;AAAO,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;
|
|
1
|
+
{"version":3,"names":["removeUndefinedValues","target","result","key","undefined","exports"],"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":";;;;;;AAAO,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;AAACG,OAAA,CAAAL,qBAAA,GAAAA,qBAAA"}
|
package/utcTimezones.js
ADDED
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.UTC_TIMEZONES = void 0;
|
|
7
|
+
const UTC_TIMEZONES = [{
|
|
8
|
+
value: "-12:00",
|
|
9
|
+
label: "UTC-12:00"
|
|
10
|
+
}, {
|
|
11
|
+
value: "-11:00",
|
|
12
|
+
label: "UTC-11:00"
|
|
13
|
+
}, {
|
|
14
|
+
value: "-10:00",
|
|
15
|
+
label: "UTC-10:00"
|
|
16
|
+
}, {
|
|
17
|
+
value: "-09:30",
|
|
18
|
+
label: "UTC-09:30"
|
|
19
|
+
}, {
|
|
20
|
+
value: "-09:00",
|
|
21
|
+
label: "UTC-09:00"
|
|
22
|
+
}, {
|
|
23
|
+
value: "-08:00",
|
|
24
|
+
label: "UTC-08:00"
|
|
25
|
+
}, {
|
|
26
|
+
value: "-07:00",
|
|
27
|
+
label: "UTC-07:00"
|
|
28
|
+
}, {
|
|
29
|
+
value: "-06:00",
|
|
30
|
+
label: "UTC-06:00"
|
|
31
|
+
}, {
|
|
32
|
+
value: "-05:00",
|
|
33
|
+
label: "UTC-05:00"
|
|
34
|
+
}, {
|
|
35
|
+
value: "-04:30",
|
|
36
|
+
label: "UTC-04:30"
|
|
37
|
+
}, {
|
|
38
|
+
value: "-04:00",
|
|
39
|
+
label: "UTC-04:00"
|
|
40
|
+
}, {
|
|
41
|
+
value: "-03:30",
|
|
42
|
+
label: "UTC-03:30"
|
|
43
|
+
}, {
|
|
44
|
+
value: "-03:00",
|
|
45
|
+
label: "UTC-03:00"
|
|
46
|
+
}, {
|
|
47
|
+
value: "-02:00",
|
|
48
|
+
label: "UTC-02:00"
|
|
49
|
+
}, {
|
|
50
|
+
value: "-01:00",
|
|
51
|
+
label: "UTC-01:00"
|
|
52
|
+
}, {
|
|
53
|
+
value: "+00:00",
|
|
54
|
+
label: "UTC+00:00"
|
|
55
|
+
}, {
|
|
56
|
+
value: "+01:00",
|
|
57
|
+
label: "UTC+01:00"
|
|
58
|
+
}, {
|
|
59
|
+
value: "+02:00",
|
|
60
|
+
label: "UTC+02:00"
|
|
61
|
+
}, {
|
|
62
|
+
value: "+03:00",
|
|
63
|
+
label: "UTC+03:00"
|
|
64
|
+
}, {
|
|
65
|
+
value: "+03:30",
|
|
66
|
+
label: "UTC+03:30"
|
|
67
|
+
}, {
|
|
68
|
+
value: "+04:00",
|
|
69
|
+
label: "UTC+04:00"
|
|
70
|
+
}, {
|
|
71
|
+
value: "+04:30",
|
|
72
|
+
label: "UTC+04:30"
|
|
73
|
+
}, {
|
|
74
|
+
value: "+05:30",
|
|
75
|
+
label: "UTC+05:30"
|
|
76
|
+
}, {
|
|
77
|
+
value: "+05:45",
|
|
78
|
+
label: "UTC+05:45"
|
|
79
|
+
}, {
|
|
80
|
+
value: "+06:00",
|
|
81
|
+
label: "UTC+06:00"
|
|
82
|
+
}, {
|
|
83
|
+
value: "+06:30",
|
|
84
|
+
label: "UTC+06:30"
|
|
85
|
+
}, {
|
|
86
|
+
value: "+07:00",
|
|
87
|
+
label: "UTC+07:00"
|
|
88
|
+
}, {
|
|
89
|
+
value: "+08:00",
|
|
90
|
+
label: "UTC+08:00"
|
|
91
|
+
}, {
|
|
92
|
+
value: "+08:45",
|
|
93
|
+
label: "UTC+08:45"
|
|
94
|
+
}, {
|
|
95
|
+
value: "+09:00",
|
|
96
|
+
label: "UTC+09:00"
|
|
97
|
+
}, {
|
|
98
|
+
value: "+09:30",
|
|
99
|
+
label: "UTC+09:30"
|
|
100
|
+
}, {
|
|
101
|
+
value: "+10:00",
|
|
102
|
+
label: "UTC+10:00"
|
|
103
|
+
}, {
|
|
104
|
+
value: "+10:30",
|
|
105
|
+
label: "UTC+10:30"
|
|
106
|
+
}, {
|
|
107
|
+
value: "+11:00",
|
|
108
|
+
label: "UTC+11:00"
|
|
109
|
+
}, {
|
|
110
|
+
value: "+11:30",
|
|
111
|
+
label: "UTC+11:30"
|
|
112
|
+
}, {
|
|
113
|
+
value: "+12:00",
|
|
114
|
+
label: "UTC+12:00"
|
|
115
|
+
}, {
|
|
116
|
+
value: "+12:45",
|
|
117
|
+
label: "UTC+12:45"
|
|
118
|
+
}, {
|
|
119
|
+
value: "+13:00",
|
|
120
|
+
label: "UTC+13:00"
|
|
121
|
+
}, {
|
|
122
|
+
value: "+14:00",
|
|
123
|
+
label: "UTC+14:00"
|
|
124
|
+
}];
|
|
125
|
+
exports.UTC_TIMEZONES = UTC_TIMEZONES;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["UTC_TIMEZONES","value","label","exports"],"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":";;;;;;AAAO,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,K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ACfC,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;AAACC,OAAA,CAAAH,aAAA,GAAAA,aAAA"}
|
package/zeroPad.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["zeroPad","version","amount","padStart"],"sources":["zeroPad.ts"],"sourcesContent":["/**\n * Used when we need to create an ID of some data record.\n * Or, for example, when adding the revision record to the DynamoDB table.\n */\nexport const zeroPad = (version: string | number, amount = 4): string => {\n return `${version}`.padStart(amount, \"0\");\n};\n"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACO,MAAMA,OAAO,
|
|
1
|
+
{"version":3,"names":["zeroPad","version","amount","padStart","exports"],"sources":["zeroPad.ts"],"sourcesContent":["/**\n * Used when we need to create an ID of some data record.\n * Or, for example, when adding the revision record to the DynamoDB table.\n */\nexport const zeroPad = (version: string | number, amount = 4): string => {\n return `${version}`.padStart(amount, \"0\");\n};\n"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACO,MAAMA,OAAO,GAAGA,CAACC,OAAwB,EAAEC,MAAM,GAAG,CAAC,KAAa;EACrE,OAAQ,GAAED,OAAQ,EAAC,CAACE,QAAQ,CAACD,MAAM,EAAE,GAAG,CAAC;AAC7C,CAAC;AAACE,OAAA,CAAAJ,OAAA,GAAAA,OAAA"}
|