@layerzerolabs/vm-tooling 0.2.22 → 0.2.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +23 -0
- package/dist/4JD7YXQE.js +47 -0
- package/dist/4JD7YXQE.js.map +1 -0
- package/dist/C75WADM5.js +15 -0
- package/dist/C75WADM5.js.map +1 -0
- package/dist/{GEZ3XVTG.cjs → GD5UJA6I.cjs} +11 -17
- package/dist/GD5UJA6I.cjs.map +1 -0
- package/dist/{EP2ZMEJO.js → GNUGNPEQ.js} +47 -13
- package/dist/GNUGNPEQ.js.map +1 -0
- package/dist/ICMHRFCX.cjs +78 -0
- package/dist/ICMHRFCX.cjs.map +1 -0
- package/dist/{OMZA67EH.js → J2675KOZ.js} +5 -5
- package/dist/J2675KOZ.js.map +1 -0
- package/dist/{BEHAXLXQ.js → K5MQ7DAS.js} +4 -4
- package/dist/{BEHAXLXQ.js.map → K5MQ7DAS.js.map} +1 -1
- package/dist/{Y7XA7YWK.cjs → M7FR43QL.cjs} +5 -5
- package/dist/M7FR43QL.cjs.map +1 -0
- package/dist/{UGOYXDC2.js → V3AKNVHN.js} +10 -16
- package/dist/V3AKNVHN.js.map +1 -0
- package/dist/{VH4UXRKG.cjs → VAGPJO44.cjs} +49 -15
- package/dist/VAGPJO44.cjs.map +1 -0
- package/dist/{GG2ZAAIE.cjs → VFGI4IPI.cjs} +6 -6
- package/dist/{GG2ZAAIE.cjs.map → VFGI4IPI.cjs.map} +1 -1
- package/dist/Y6ZP4DWX.cjs +49 -0
- package/dist/Y6ZP4DWX.cjs.map +1 -0
- package/dist/YI63OKDP.js +53 -0
- package/dist/YI63OKDP.js.map +1 -0
- package/dist/Z55JUIO3.cjs +17 -0
- package/dist/Z55JUIO3.cjs.map +1 -0
- package/dist/cli.cjs +9 -9
- package/dist/cli.js +8 -8
- package/dist/config.cjs +8 -12
- package/dist/config.d.ts +6 -4
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +1 -1
- package/dist/core/index.cjs +5 -5
- package/dist/core/index.js +4 -4
- package/dist/core/tool-executor.cjs +5 -5
- package/dist/core/tool-executor.d.ts.map +1 -1
- package/dist/core/tool-executor.js +4 -4
- package/dist/github/index.cjs +5 -16
- package/dist/github/index.d.ts.map +1 -1
- package/dist/github/index.js +4 -15
- package/dist/github/matrix.cjs +4 -15
- package/dist/github/matrix.d.ts +13 -3
- package/dist/github/matrix.d.ts.map +1 -1
- package/dist/github/matrix.js +3 -14
- package/dist/index.cjs +22 -29
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +11 -22
- package/dist/index.js.map +1 -1
- package/dist/test.cjs +4 -4
- package/dist/test.d.ts +1 -1
- package/dist/test.d.ts.map +1 -1
- package/dist/test.js +3 -3
- package/dist/utils/docker.cjs +6 -6
- package/dist/utils/docker.d.ts +2 -2
- package/dist/utils/docker.d.ts.map +1 -1
- package/dist/utils/docker.js +2 -2
- package/package.json +11 -5
- package/dist/3NXVR3DC.cjs +0 -18
- package/dist/3NXVR3DC.cjs.map +0 -1
- package/dist/3TIEGVTO.cjs +0 -431
- package/dist/3TIEGVTO.cjs.map +0 -1
- package/dist/3V7HWCTZ.js +0 -190
- package/dist/3V7HWCTZ.js.map +0 -1
- package/dist/3YN24Z7J.js +0 -261
- package/dist/3YN24Z7J.js.map +0 -1
- package/dist/427QOV7V.js +0 -348
- package/dist/427QOV7V.js.map +0 -1
- package/dist/4DNHANRV.cjs +0 -39
- package/dist/4DNHANRV.cjs.map +0 -1
- package/dist/5IOOBAVX.cjs +0 -832
- package/dist/5IOOBAVX.cjs.map +0 -1
- package/dist/5QZDX45Q.js +0 -1975
- package/dist/5QZDX45Q.js.map +0 -1
- package/dist/634Q3MUX.cjs +0 -1128
- package/dist/634Q3MUX.cjs.map +0 -1
- package/dist/77LS3AZK.cjs +0 -1977
- package/dist/77LS3AZK.cjs.map +0 -1
- package/dist/7AUJV34E.cjs +0 -144
- package/dist/7AUJV34E.cjs.map +0 -1
- package/dist/7HA6JSWY.cjs +0 -103
- package/dist/7HA6JSWY.cjs.map +0 -1
- package/dist/7JWBGU62.js +0 -141
- package/dist/7JWBGU62.js.map +0 -1
- package/dist/7O5SJUXT.cjs +0 -354
- package/dist/7O5SJUXT.cjs.map +0 -1
- package/dist/7R4LC2OX.js +0 -3246
- package/dist/7R4LC2OX.js.map +0 -1
- package/dist/DDKMZ6EE.js +0 -6
- package/dist/DDKMZ6EE.js.map +0 -1
- package/dist/DS4LZJHX.cjs +0 -252
- package/dist/DS4LZJHX.cjs.map +0 -1
- package/dist/EP2ZMEJO.js.map +0 -1
- package/dist/ERGNNQ6N.js +0 -16
- package/dist/ERGNNQ6N.js.map +0 -1
- package/dist/EXBTG2GQ.js +0 -4823
- package/dist/EXBTG2GQ.js.map +0 -1
- package/dist/FBKCEQT5.cjs +0 -263
- package/dist/FBKCEQT5.cjs.map +0 -1
- package/dist/FC7UGQEI.cjs +0 -19
- package/dist/FC7UGQEI.cjs.map +0 -1
- package/dist/FDH37YWR.cjs +0 -52
- package/dist/FDH37YWR.cjs.map +0 -1
- package/dist/FQPOYRQJ.cjs +0 -59
- package/dist/FQPOYRQJ.cjs.map +0 -1
- package/dist/GEZ3XVTG.cjs.map +0 -1
- package/dist/GHQS37WK.js +0 -251
- package/dist/GHQS37WK.js.map +0 -1
- package/dist/GVS7FGYI.cjs +0 -49
- package/dist/GVS7FGYI.cjs.map +0 -1
- package/dist/HVDH52K5.cjs +0 -3273
- package/dist/HVDH52K5.cjs.map +0 -1
- package/dist/HVR3WYCV.js +0 -70
- package/dist/HVR3WYCV.js.map +0 -1
- package/dist/I24EDDRD.cjs +0 -30
- package/dist/I24EDDRD.cjs.map +0 -1
- package/dist/IYIFH7LC.js +0 -29
- package/dist/IYIFH7LC.js.map +0 -1
- package/dist/J2A64VZU.js +0 -143
- package/dist/J2A64VZU.js.map +0 -1
- package/dist/JXS7ZGGU.js +0 -350
- package/dist/JXS7ZGGU.js.map +0 -1
- package/dist/MDE37STN.cjs +0 -146
- package/dist/MDE37STN.cjs.map +0 -1
- package/dist/OBHJ2FSI.cjs +0 -103
- package/dist/OBHJ2FSI.cjs.map +0 -1
- package/dist/OLCI6QQA.cjs +0 -73
- package/dist/OLCI6QQA.cjs.map +0 -1
- package/dist/OMZA67EH.js.map +0 -1
- package/dist/PFRT6NBP.js +0 -30
- package/dist/PFRT6NBP.js.map +0 -1
- package/dist/PQ4H7UWU.js +0 -51
- package/dist/PQ4H7UWU.js.map +0 -1
- package/dist/Q5L3QIKZ.cjs +0 -825
- package/dist/Q5L3QIKZ.cjs.map +0 -1
- package/dist/QDUIE3K3.js +0 -829
- package/dist/QDUIE3K3.js.map +0 -1
- package/dist/QEUMSA6O.cjs +0 -260
- package/dist/QEUMSA6O.cjs.map +0 -1
- package/dist/QHFDWPE3.js +0 -28
- package/dist/QHFDWPE3.js.map +0 -1
- package/dist/TQHAG73D.js +0 -46
- package/dist/TQHAG73D.js.map +0 -1
- package/dist/UFZOOGMQ.js +0 -46
- package/dist/UFZOOGMQ.js.map +0 -1
- package/dist/UGOYXDC2.js.map +0 -1
- package/dist/UOMNLT53.cjs +0 -33
- package/dist/UOMNLT53.cjs.map +0 -1
- package/dist/UUMDUUBJ.cjs +0 -194
- package/dist/UUMDUUBJ.cjs.map +0 -1
- package/dist/VEHBRPVG.js +0 -175
- package/dist/VEHBRPVG.js.map +0 -1
- package/dist/VH4UXRKG.cjs.map +0 -1
- package/dist/VM366GYK.js +0 -101
- package/dist/VM366GYK.js.map +0 -1
- package/dist/W3F4RJVY.js +0 -1103
- package/dist/W3F4RJVY.js.map +0 -1
- package/dist/W4QDYLOA.js +0 -17
- package/dist/W4QDYLOA.js.map +0 -1
- package/dist/WSDEGNMI.cjs +0 -56
- package/dist/WSDEGNMI.cjs.map +0 -1
- package/dist/WSES6SE2.js +0 -420
- package/dist/WSES6SE2.js.map +0 -1
- package/dist/XCUEIITH.js +0 -101
- package/dist/XCUEIITH.js.map +0 -1
- package/dist/XVWZAEKK.js +0 -807
- package/dist/XVWZAEKK.js.map +0 -1
- package/dist/Y7XA7YWK.cjs.map +0 -1
- package/dist/YHGTF22I.cjs +0 -4881
- package/dist/YHGTF22I.cjs.map +0 -1
- package/dist/Z7SRDY43.js +0 -250
- package/dist/Z7SRDY43.js.map +0 -1
- package/dist/ZGCH6KFP.cjs +0 -354
- package/dist/ZGCH6KFP.cjs.map +0 -1
- package/dist/ZTSEHGET.cjs +0 -182
- package/dist/ZTSEHGET.cjs.map +0 -1
package/dist/7AUJV34E.cjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../node_modules/.pnpm/@smithy+core@3.18.5/node_modules/@smithy/core/dist-es/submodules/serde/date-utils.js"],"names":["init_cjs_shims","MONTHS","RFC3339","RegExp","parseRfc3339DateTime","value","undefined","TypeError","match","exec","_","yearStr","monthStr","dayStr","hours","minutes","seconds","fractionalMilliseconds","year","strictParseShort","stripLeadingZeroes","month","parseDateValue","day","buildDate","RFC3339_WITH_OFFSET","parseRfc3339DateTimeWithOffset","offsetStr","date","toUpperCase","setTime","getTime","parseOffsetToMilliseconds","__name","time","adjustedMonth","validateDayOfMonth","Date","UTC","parseMilliseconds","DAYS_IN_MONTH","maxDays","isLeapYear","type","lower","upper","dateVal","strictParseByte","strictParseFloat32","directionStr","direction","hour","Number","substring","minute","idx","length","charAt","slice"],"mappings":";;;;;;AAAAA,4BAAA,EAAA;AAEA,IAAMC,MAAAA,GAAS;AAAC,EAAA,KAAA;AAAO,EAAA,KAAA;AAAO,EAAA,KAAA;AAAO,EAAA,KAAA;AAAO,EAAA,KAAA;AAAO,EAAA,KAAA;AAAO,EAAA,KAAA;AAAO,EAAA,KAAA;AAAO,EAAA,KAAA;AAAO,EAAA,KAAA;AAAO,EAAA,KAAA;AAAO,EAAA;;AAe7F,IAAMC,OAAAA,GAAU,IAAIC,MAAAA,CAAO,sEAAA,CAAA;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AA,EAAK;AACrBC,IAAAA,SAAAA,GAAY,CAAA;AAChB,EAAA,CAAA,MAAA,IACSD,gBAAgB,GAAA,EAAK;AAC1BC,IAAAA,SAAAA,GAAY,EAAA;EAChB,CAAA,MACK;AACD,IAAA,MAAM,IAAI3C,SAAAA,CAAU,CAAA,kBAAA,EAAqB0C,YAAAA,CAAAA,oBAAAA,CAAkC,CAAA;AAC/E,EAAA;AACA,EAAA,MAAME,OAAOC,MAAAA,CAAO/C,KAAAA,CAAMgD,SAAAA,CAAU,CAAA,EAAG,CAAA,CAAA,CAAA;AACvC,EAAA,MAAMC,SAASF,MAAAA,CAAO/C,KAAAA,CAAMgD,SAAAA,CAAU,CAAA,EAAG,CAAA,CAAA,CAAA;AACzC,EAAA,OAAOH,SAAAA,IAAaC,IAAAA,GAAO,EAAA,GAAKG,MAAAA,CAAAA,GAAU,EAAA,GAAK,GAAA;AACnD,CAAA,EAfkC,2BAAA,CAAA;AAgBlC,IAAMlC,kBAAAA,yCAAsBf,KAAAA,KAAAA;AACxB,EAAA,IAAIkD,GAAAA,GAAM,CAAA;AACV,EAAA,OAAOA,GAAAA,GAAMlD,MAAMmD,MAAAA,GAAS,CAAA,IAAKnD,MAAMoD,MAAAA,CAAOF,GAAAA,MAAS,GAAA,EAAK;AACxDA,IAAAA,GAAAA,EAAAA;AACJ,EAAA;AACA,EAAA,IAAIA,QAAQ,CAAA,EAAG;AACX,IAAA,OAAOlD,KAAAA;AACX,EAAA;AACA,EAAA,OAAOA,KAAAA,CAAMqD,MAAMH,GAAAA,CAAAA;AACvB,CAAA,EAT2B,oBAAA,CAAA","file":"7AUJV34E.cjs","sourcesContent":["import { strictParseByte, strictParseDouble, strictParseFloat32, strictParseShort } from \"./parse-utils\";\nconst DAYS = [\"Sun\", \"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\"];\nconst MONTHS = [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\"];\nexport function dateToUtcString(date) {\n const year = date.getUTCFullYear();\n const month = date.getUTCMonth();\n const dayOfWeek = date.getUTCDay();\n const dayOfMonthInt = date.getUTCDate();\n const hoursInt = date.getUTCHours();\n const minutesInt = date.getUTCMinutes();\n const secondsInt = date.getUTCSeconds();\n const dayOfMonthString = dayOfMonthInt < 10 ? `0${dayOfMonthInt}` : `${dayOfMonthInt}`;\n const hoursString = hoursInt < 10 ? `0${hoursInt}` : `${hoursInt}`;\n const minutesString = minutesInt < 10 ? `0${minutesInt}` : `${minutesInt}`;\n const secondsString = secondsInt < 10 ? `0${secondsInt}` : `${secondsInt}`;\n return `${DAYS[dayOfWeek]}, ${dayOfMonthString} ${MONTHS[month]} ${year} ${hoursString}:${minutesString}:${secondsString} GMT`;\n}\nconst RFC3339 = new RegExp(/^(\\d{4})-(\\d{2})-(\\d{2})[tT](\\d{2}):(\\d{2}):(\\d{2})(?:\\.(\\d+))?[zZ]$/);\nexport const parseRfc3339DateTime = (value) => {\n if (value === null || value === undefined) {\n return undefined;\n }\n if (typeof value !== \"string\") {\n throw new TypeError(\"RFC-3339 date-times must be expressed as strings\");\n }\n const match = RFC3339.exec(value);\n if (!match) {\n throw new TypeError(\"Invalid RFC-3339 date-time value\");\n }\n const [_, yearStr, monthStr, dayStr, hours, minutes, seconds, fractionalMilliseconds] = match;\n const year = strictParseShort(stripLeadingZeroes(yearStr));\n const month = parseDateValue(monthStr, \"month\", 1, 12);\n const day = parseDateValue(dayStr, \"day\", 1, 31);\n return buildDate(year, month, day, { hours, minutes, seconds, fractionalMilliseconds });\n};\nconst RFC3339_WITH_OFFSET = new RegExp(/^(\\d{4})-(\\d{2})-(\\d{2})[tT](\\d{2}):(\\d{2}):(\\d{2})(?:\\.(\\d+))?(([-+]\\d{2}\\:\\d{2})|[zZ])$/);\nexport const parseRfc3339DateTimeWithOffset = (value) => {\n if (value === null || value === undefined) {\n return undefined;\n }\n if (typeof value !== \"string\") {\n throw new TypeError(\"RFC-3339 date-times must be expressed as strings\");\n }\n const match = RFC3339_WITH_OFFSET.exec(value);\n if (!match) {\n throw new TypeError(\"Invalid RFC-3339 date-time value\");\n }\n const [_, yearStr, monthStr, dayStr, hours, minutes, seconds, fractionalMilliseconds, offsetStr] = match;\n const year = strictParseShort(stripLeadingZeroes(yearStr));\n const month = parseDateValue(monthStr, \"month\", 1, 12);\n const day = parseDateValue(dayStr, \"day\", 1, 31);\n const date = buildDate(year, month, day, { hours, minutes, seconds, fractionalMilliseconds });\n if (offsetStr.toUpperCase() != \"Z\") {\n date.setTime(date.getTime() - parseOffsetToMilliseconds(offsetStr));\n }\n return date;\n};\nconst IMF_FIXDATE = new RegExp(/^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\\d{2}) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\\d{4}) (\\d{1,2}):(\\d{2}):(\\d{2})(?:\\.(\\d+))? GMT$/);\nconst RFC_850_DATE = new RegExp(/^(?:Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\\d{2})-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\\d{2}) (\\d{1,2}):(\\d{2}):(\\d{2})(?:\\.(\\d+))? GMT$/);\nconst ASC_TIME = new RegExp(/^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( [1-9]|\\d{2}) (\\d{1,2}):(\\d{2}):(\\d{2})(?:\\.(\\d+))? (\\d{4})$/);\nexport const parseRfc7231DateTime = (value) => {\n if (value === null || value === undefined) {\n return undefined;\n }\n if (typeof value !== \"string\") {\n throw new TypeError(\"RFC-7231 date-times must be expressed as strings\");\n }\n let match = IMF_FIXDATE.exec(value);\n if (match) {\n const [_, dayStr, monthStr, yearStr, hours, minutes, seconds, fractionalMilliseconds] = match;\n return buildDate(strictParseShort(stripLeadingZeroes(yearStr)), parseMonthByShortName(monthStr), parseDateValue(dayStr, \"day\", 1, 31), { hours, minutes, seconds, fractionalMilliseconds });\n }\n match = RFC_850_DATE.exec(value);\n if (match) {\n const [_, dayStr, monthStr, yearStr, hours, minutes, seconds, fractionalMilliseconds] = match;\n return adjustRfc850Year(buildDate(parseTwoDigitYear(yearStr), parseMonthByShortName(monthStr), parseDateValue(dayStr, \"day\", 1, 31), {\n hours,\n minutes,\n seconds,\n fractionalMilliseconds,\n }));\n }\n match = ASC_TIME.exec(value);\n if (match) {\n const [_, monthStr, dayStr, hours, minutes, seconds, fractionalMilliseconds, yearStr] = match;\n return buildDate(strictParseShort(stripLeadingZeroes(yearStr)), parseMonthByShortName(monthStr), parseDateValue(dayStr.trimLeft(), \"day\", 1, 31), { hours, minutes, seconds, fractionalMilliseconds });\n }\n throw new TypeError(\"Invalid RFC-7231 date-time value\");\n};\nexport const parseEpochTimestamp = (value) => {\n if (value === null || value === undefined) {\n return undefined;\n }\n let valueAsDouble;\n if (typeof value === \"number\") {\n valueAsDouble = value;\n }\n else if (typeof value === \"string\") {\n valueAsDouble = strictParseDouble(value);\n }\n else if (typeof value === \"object\" && value.tag === 1) {\n valueAsDouble = value.value;\n }\n else {\n throw new TypeError(\"Epoch timestamps must be expressed as floating point numbers or their string representation\");\n }\n if (Number.isNaN(valueAsDouble) || valueAsDouble === Infinity || valueAsDouble === -Infinity) {\n throw new TypeError(\"Epoch timestamps must be valid, non-Infinite, non-NaN numerics\");\n }\n return new Date(Math.round(valueAsDouble * 1000));\n};\nconst buildDate = (year, month, day, time) => {\n const adjustedMonth = month - 1;\n validateDayOfMonth(year, adjustedMonth, day);\n return new Date(Date.UTC(year, adjustedMonth, day, parseDateValue(time.hours, \"hour\", 0, 23), parseDateValue(time.minutes, \"minute\", 0, 59), parseDateValue(time.seconds, \"seconds\", 0, 60), parseMilliseconds(time.fractionalMilliseconds)));\n};\nconst parseTwoDigitYear = (value) => {\n const thisYear = new Date().getUTCFullYear();\n const valueInThisCentury = Math.floor(thisYear / 100) * 100 + strictParseShort(stripLeadingZeroes(value));\n if (valueInThisCentury < thisYear) {\n return valueInThisCentury + 100;\n }\n return valueInThisCentury;\n};\nconst FIFTY_YEARS_IN_MILLIS = 50 * 365 * 24 * 60 * 60 * 1000;\nconst adjustRfc850Year = (input) => {\n if (input.getTime() - new Date().getTime() > FIFTY_YEARS_IN_MILLIS) {\n return new Date(Date.UTC(input.getUTCFullYear() - 100, input.getUTCMonth(), input.getUTCDate(), input.getUTCHours(), input.getUTCMinutes(), input.getUTCSeconds(), input.getUTCMilliseconds()));\n }\n return input;\n};\nconst parseMonthByShortName = (value) => {\n const monthIdx = MONTHS.indexOf(value);\n if (monthIdx < 0) {\n throw new TypeError(`Invalid month: ${value}`);\n }\n return monthIdx + 1;\n};\nconst DAYS_IN_MONTH = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];\nconst validateDayOfMonth = (year, month, day) => {\n let maxDays = DAYS_IN_MONTH[month];\n if (month === 1 && isLeapYear(year)) {\n maxDays = 29;\n }\n if (day > maxDays) {\n throw new TypeError(`Invalid day for ${MONTHS[month]} in ${year}: ${day}`);\n }\n};\nconst isLeapYear = (year) => {\n return year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0);\n};\nconst parseDateValue = (value, type, lower, upper) => {\n const dateVal = strictParseByte(stripLeadingZeroes(value));\n if (dateVal < lower || dateVal > upper) {\n throw new TypeError(`${type} must be between ${lower} and ${upper}, inclusive`);\n }\n return dateVal;\n};\nconst parseMilliseconds = (value) => {\n if (value === null || value === undefined) {\n return 0;\n }\n return strictParseFloat32(\"0.\" + value) * 1000;\n};\nconst parseOffsetToMilliseconds = (value) => {\n const directionStr = value[0];\n let direction = 1;\n if (directionStr == \"+\") {\n direction = 1;\n }\n else if (directionStr == \"-\") {\n direction = -1;\n }\n else {\n throw new TypeError(`Offset direction, ${directionStr}, must be \"+\" or \"-\"`);\n }\n const hour = Number(value.substring(1, 3));\n const minute = Number(value.substring(4, 6));\n return direction * (hour * 60 + minute) * 60 * 1000;\n};\nconst stripLeadingZeroes = (value) => {\n let idx = 0;\n while (idx < value.length - 1 && value.charAt(idx) === \"0\") {\n idx++;\n }\n if (idx === 0) {\n return value;\n }\n return value.slice(idx);\n};\n"]}
|
package/dist/7HA6JSWY.cjs
DELETED
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var QEUMSA6O_cjs = require('./QEUMSA6O.cjs');
|
|
4
|
-
var _3NXVR3DC_cjs = require('./3NXVR3DC.cjs');
|
|
5
|
-
var GVS7FGYI_cjs = require('./GVS7FGYI.cjs');
|
|
6
|
-
var _24WEKBY3_cjs = require('./24WEKBY3.cjs');
|
|
7
|
-
var child_process = require('child_process');
|
|
8
|
-
var util = require('util');
|
|
9
|
-
|
|
10
|
-
// ../../node_modules/.pnpm/@aws-sdk+credential-provider-process@3.879.0/node_modules/@aws-sdk/credential-provider-process/dist-es/index.js
|
|
11
|
-
_24WEKBY3_cjs.init_cjs_shims();
|
|
12
|
-
|
|
13
|
-
// ../../node_modules/.pnpm/@aws-sdk+credential-provider-process@3.879.0/node_modules/@aws-sdk/credential-provider-process/dist-es/fromProcess.js
|
|
14
|
-
_24WEKBY3_cjs.init_cjs_shims();
|
|
15
|
-
|
|
16
|
-
// ../../node_modules/.pnpm/@aws-sdk+credential-provider-process@3.879.0/node_modules/@aws-sdk/credential-provider-process/dist-es/resolveProcessCredentials.js
|
|
17
|
-
_24WEKBY3_cjs.init_cjs_shims();
|
|
18
|
-
|
|
19
|
-
// ../../node_modules/.pnpm/@aws-sdk+credential-provider-process@3.879.0/node_modules/@aws-sdk/credential-provider-process/dist-es/getValidatedProcessCredentials.js
|
|
20
|
-
_24WEKBY3_cjs.init_cjs_shims();
|
|
21
|
-
var getValidatedProcessCredentials = /* @__PURE__ */ _24WEKBY3_cjs.__name((profileName, data, profiles) => {
|
|
22
|
-
if (data.Version !== 1) {
|
|
23
|
-
throw Error(`Profile ${profileName} credential_process did not return Version 1.`);
|
|
24
|
-
}
|
|
25
|
-
if (data.AccessKeyId === void 0 || data.SecretAccessKey === void 0) {
|
|
26
|
-
throw Error(`Profile ${profileName} credential_process returned invalid credentials.`);
|
|
27
|
-
}
|
|
28
|
-
if (data.Expiration) {
|
|
29
|
-
const currentTime = /* @__PURE__ */ new Date();
|
|
30
|
-
const expireTime = new Date(data.Expiration);
|
|
31
|
-
if (expireTime < currentTime) {
|
|
32
|
-
throw Error(`Profile ${profileName} credential_process returned expired credentials.`);
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
let accountId = data.AccountId;
|
|
36
|
-
if (!accountId && profiles?.[profileName]?.aws_account_id) {
|
|
37
|
-
accountId = profiles[profileName].aws_account_id;
|
|
38
|
-
}
|
|
39
|
-
const credentials = {
|
|
40
|
-
accessKeyId: data.AccessKeyId,
|
|
41
|
-
secretAccessKey: data.SecretAccessKey,
|
|
42
|
-
...data.SessionToken && {
|
|
43
|
-
sessionToken: data.SessionToken
|
|
44
|
-
},
|
|
45
|
-
...data.Expiration && {
|
|
46
|
-
expiration: new Date(data.Expiration)
|
|
47
|
-
},
|
|
48
|
-
...data.CredentialScope && {
|
|
49
|
-
credentialScope: data.CredentialScope
|
|
50
|
-
},
|
|
51
|
-
...accountId && {
|
|
52
|
-
accountId
|
|
53
|
-
}
|
|
54
|
-
};
|
|
55
|
-
_3NXVR3DC_cjs.setCredentialFeature(credentials, "CREDENTIALS_PROCESS", "w");
|
|
56
|
-
return credentials;
|
|
57
|
-
}, "getValidatedProcessCredentials");
|
|
58
|
-
|
|
59
|
-
// ../../node_modules/.pnpm/@aws-sdk+credential-provider-process@3.879.0/node_modules/@aws-sdk/credential-provider-process/dist-es/resolveProcessCredentials.js
|
|
60
|
-
var resolveProcessCredentials = /* @__PURE__ */ _24WEKBY3_cjs.__name(async (profileName, profiles, logger) => {
|
|
61
|
-
const profile = profiles[profileName];
|
|
62
|
-
if (profiles[profileName]) {
|
|
63
|
-
const credentialProcess = profile["credential_process"];
|
|
64
|
-
if (credentialProcess !== void 0) {
|
|
65
|
-
const execPromise = util.promisify(child_process.exec);
|
|
66
|
-
try {
|
|
67
|
-
const { stdout } = await execPromise(credentialProcess);
|
|
68
|
-
let data;
|
|
69
|
-
try {
|
|
70
|
-
data = JSON.parse(stdout.trim());
|
|
71
|
-
} catch {
|
|
72
|
-
throw Error(`Profile ${profileName} credential_process returned invalid JSON.`);
|
|
73
|
-
}
|
|
74
|
-
return getValidatedProcessCredentials(profileName, data, profiles);
|
|
75
|
-
} catch (error) {
|
|
76
|
-
throw new GVS7FGYI_cjs.CredentialsProviderError(error.message, {
|
|
77
|
-
logger
|
|
78
|
-
});
|
|
79
|
-
}
|
|
80
|
-
} else {
|
|
81
|
-
throw new GVS7FGYI_cjs.CredentialsProviderError(`Profile ${profileName} did not contain credential_process.`, {
|
|
82
|
-
logger
|
|
83
|
-
});
|
|
84
|
-
}
|
|
85
|
-
} else {
|
|
86
|
-
throw new GVS7FGYI_cjs.CredentialsProviderError(`Profile ${profileName} could not be found in shared credentials file.`, {
|
|
87
|
-
logger
|
|
88
|
-
});
|
|
89
|
-
}
|
|
90
|
-
}, "resolveProcessCredentials");
|
|
91
|
-
|
|
92
|
-
// ../../node_modules/.pnpm/@aws-sdk+credential-provider-process@3.879.0/node_modules/@aws-sdk/credential-provider-process/dist-es/fromProcess.js
|
|
93
|
-
var fromProcess = /* @__PURE__ */ _24WEKBY3_cjs.__name((init = {}) => async ({ callerClientConfig } = {}) => {
|
|
94
|
-
init.logger?.debug("@aws-sdk/credential-provider-process - fromProcess");
|
|
95
|
-
const profiles = await QEUMSA6O_cjs.parseKnownFiles(init);
|
|
96
|
-
return resolveProcessCredentials(QEUMSA6O_cjs.getProfileName({
|
|
97
|
-
profile: init.profile ?? callerClientConfig?.profile
|
|
98
|
-
}), profiles, init.logger);
|
|
99
|
-
}, "fromProcess");
|
|
100
|
-
|
|
101
|
-
exports.fromProcess = fromProcess;
|
|
102
|
-
//# sourceMappingURL=7HA6JSWY.cjs.map
|
|
103
|
-
//# sourceMappingURL=7HA6JSWY.cjs.map
|
package/dist/7HA6JSWY.cjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../node_modules/.pnpm/@aws-sdk+credential-provider-process@3.879.0/node_modules/@aws-sdk/credential-provider-process/dist-es/index.js","../../../node_modules/.pnpm/@aws-sdk+credential-provider-process@3.879.0/node_modules/@aws-sdk/credential-provider-process/dist-es/fromProcess.js","../../../node_modules/.pnpm/@aws-sdk+credential-provider-process@3.879.0/node_modules/@aws-sdk/credential-provider-process/dist-es/resolveProcessCredentials.js","../../../node_modules/.pnpm/@aws-sdk+credential-provider-process@3.879.0/node_modules/@aws-sdk/credential-provider-process/dist-es/getValidatedProcessCredentials.js"],"names":["init_cjs_shims","getValidatedProcessCredentials","__name","profileName","data","profiles","Version","Error","AccessKeyId","undefined","SecretAccessKey","Expiration","currentTime","Date","expireTime","accountId","AccountId","aws_account_id","credentials","accessKeyId","secretAccessKey","SessionToken","sessionToken","expiration","CredentialScope","credentialScope","setCredentialFeature","resolveProcessCredentials","logger","profile","credentialProcess","execPromise","promisify","exec","stdout","JSON","parse","trim","error","CredentialsProviderError","message","fromProcess","init","callerClientConfig","debug","parseKnownFiles","getProfileName"],"mappings":";;;;;;;;;;AAAAA,4BAAA,EAAA;;;ACAAA,4BAAA,EAAA;;;ACAAA,4BAAA,EAAA;;;ACAAA,4BAAA,EAAA;AACO,IAAMC,8BAAAA,mBAAiCC,oBAAA,CAAA,CAACC,WAAAA,EAAaC,IAAAA,EAAMC,QAAAA,KAAAA;AAC9D,EAAA,IAAID,IAAAA,CAAKE,YAAY,CAAA,EAAG;AACpB,IAAA,MAAMC,KAAAA,CAAM,CAAA,QAAA,EAAWJ,WAAAA,CAAAA,6CAAAA,CAA0D,CAAA;AACrF,EAAA;AACA,EAAA,IAAIC,IAAAA,CAAKI,WAAAA,KAAgBC,MA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AM,IAAIW,qCAAAA,CAAyB,CAAA,QAAA,EAAWpC,WAAAA,CAAAA,+CAAAA,CAAAA,EAA8D;AACxGyB,MAAAA;KACJ,CAAA;AACJ,EAAA;AACJ,CAAA,EA9ByC,2BAAA,CAAA;;;ADFlC,IAAMa,WAAAA,mBAAcvC,oBAAA,CAAA,CAACwC,IAAAA,GAAO,EAAC,KAAM,OAAO,EAAEC,kBAAAA,EAAkB,GAAK,EAAC,KAAC;AACxED,EAAAA,IAAAA,CAAKd,MAAAA,EAAQgB,MAAM,oDAAA,CAAA;AACnB,EAAA,MAAMvC,QAAAA,GAAW,MAAMwC,4BAAAA,CAAgBH,IAAAA,CAAAA;AACvC,EAAA,OAAOf,0BAA0BmB,2BAAAA,CAAe;IAC5CjB,OAAAA,EAASa,IAAAA,CAAKb,WAAWc,kBAAAA,EAAoBd;GACjD,CAAA,EAAIxB,QAAAA,EAAUqC,IAAAA,CAAKd,MAAM,CAAA;AAC7B,CAAA,EAN2B,aAAA","file":"7HA6JSWY.cjs","sourcesContent":["export * from \"./fromProcess\";\n","import { getProfileName, parseKnownFiles } from \"@smithy/shared-ini-file-loader\";\nimport { resolveProcessCredentials } from \"./resolveProcessCredentials\";\nexport const fromProcess = (init = {}) => async ({ callerClientConfig } = {}) => {\n init.logger?.debug(\"@aws-sdk/credential-provider-process - fromProcess\");\n const profiles = await parseKnownFiles(init);\n return resolveProcessCredentials(getProfileName({\n profile: init.profile ?? callerClientConfig?.profile,\n }), profiles, init.logger);\n};\n","import { CredentialsProviderError } from \"@smithy/property-provider\";\nimport { exec } from \"child_process\";\nimport { promisify } from \"util\";\nimport { getValidatedProcessCredentials } from \"./getValidatedProcessCredentials\";\nexport const resolveProcessCredentials = async (profileName, profiles, logger) => {\n const profile = profiles[profileName];\n if (profiles[profileName]) {\n const credentialProcess = profile[\"credential_process\"];\n if (credentialProcess !== undefined) {\n const execPromise = promisify(exec);\n try {\n const { stdout } = await execPromise(credentialProcess);\n let data;\n try {\n data = JSON.parse(stdout.trim());\n }\n catch {\n throw Error(`Profile ${profileName} credential_process returned invalid JSON.`);\n }\n return getValidatedProcessCredentials(profileName, data, profiles);\n }\n catch (error) {\n throw new CredentialsProviderError(error.message, { logger });\n }\n }\n else {\n throw new CredentialsProviderError(`Profile ${profileName} did not contain credential_process.`, { logger });\n }\n }\n else {\n throw new CredentialsProviderError(`Profile ${profileName} could not be found in shared credentials file.`, {\n logger,\n });\n }\n};\n","import { setCredentialFeature } from \"@aws-sdk/core/client\";\nexport const getValidatedProcessCredentials = (profileName, data, profiles) => {\n if (data.Version !== 1) {\n throw Error(`Profile ${profileName} credential_process did not return Version 1.`);\n }\n if (data.AccessKeyId === undefined || data.SecretAccessKey === undefined) {\n throw Error(`Profile ${profileName} credential_process returned invalid credentials.`);\n }\n if (data.Expiration) {\n const currentTime = new Date();\n const expireTime = new Date(data.Expiration);\n if (expireTime < currentTime) {\n throw Error(`Profile ${profileName} credential_process returned expired credentials.`);\n }\n }\n let accountId = data.AccountId;\n if (!accountId && profiles?.[profileName]?.aws_account_id) {\n accountId = profiles[profileName].aws_account_id;\n }\n const credentials = {\n accessKeyId: data.AccessKeyId,\n secretAccessKey: data.SecretAccessKey,\n ...(data.SessionToken && { sessionToken: data.SessionToken }),\n ...(data.Expiration && { expiration: new Date(data.Expiration) }),\n ...(data.CredentialScope && { credentialScope: data.CredentialScope }),\n ...(accountId && { accountId }),\n };\n setCredentialFeature(credentials, \"CREDENTIALS_PROCESS\", \"w\");\n return credentials;\n};\n"]}
|
package/dist/7JWBGU62.js
DELETED
|
@@ -1,141 +0,0 @@
|
|
|
1
|
-
import { strictParseShort, strictParseByte, strictParseFloat32 } from './XVWZAEKK.js';
|
|
2
|
-
import { init_esm_shims, __name } from './6AHA7PAZ.js';
|
|
3
|
-
|
|
4
|
-
// ../../node_modules/.pnpm/@smithy+core@3.18.5/node_modules/@smithy/core/dist-es/submodules/serde/date-utils.js
|
|
5
|
-
init_esm_shims();
|
|
6
|
-
var MONTHS = [
|
|
7
|
-
"Jan",
|
|
8
|
-
"Feb",
|
|
9
|
-
"Mar",
|
|
10
|
-
"Apr",
|
|
11
|
-
"May",
|
|
12
|
-
"Jun",
|
|
13
|
-
"Jul",
|
|
14
|
-
"Aug",
|
|
15
|
-
"Sep",
|
|
16
|
-
"Oct",
|
|
17
|
-
"Nov",
|
|
18
|
-
"Dec"
|
|
19
|
-
];
|
|
20
|
-
var RFC3339 = new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?[zZ]$/);
|
|
21
|
-
var parseRfc3339DateTime = /* @__PURE__ */ __name((value) => {
|
|
22
|
-
if (value === null || value === void 0) {
|
|
23
|
-
return void 0;
|
|
24
|
-
}
|
|
25
|
-
if (typeof value !== "string") {
|
|
26
|
-
throw new TypeError("RFC-3339 date-times must be expressed as strings");
|
|
27
|
-
}
|
|
28
|
-
const match = RFC3339.exec(value);
|
|
29
|
-
if (!match) {
|
|
30
|
-
throw new TypeError("Invalid RFC-3339 date-time value");
|
|
31
|
-
}
|
|
32
|
-
const [_, yearStr, monthStr, dayStr, hours, minutes, seconds, fractionalMilliseconds] = match;
|
|
33
|
-
const year = strictParseShort(stripLeadingZeroes(yearStr));
|
|
34
|
-
const month = parseDateValue(monthStr, "month", 1, 12);
|
|
35
|
-
const day = parseDateValue(dayStr, "day", 1, 31);
|
|
36
|
-
return buildDate(year, month, day, {
|
|
37
|
-
hours,
|
|
38
|
-
minutes,
|
|
39
|
-
seconds,
|
|
40
|
-
fractionalMilliseconds
|
|
41
|
-
});
|
|
42
|
-
}, "parseRfc3339DateTime");
|
|
43
|
-
var RFC3339_WITH_OFFSET = new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(([-+]\d{2}\:\d{2})|[zZ])$/);
|
|
44
|
-
var parseRfc3339DateTimeWithOffset = /* @__PURE__ */ __name((value) => {
|
|
45
|
-
if (value === null || value === void 0) {
|
|
46
|
-
return void 0;
|
|
47
|
-
}
|
|
48
|
-
if (typeof value !== "string") {
|
|
49
|
-
throw new TypeError("RFC-3339 date-times must be expressed as strings");
|
|
50
|
-
}
|
|
51
|
-
const match = RFC3339_WITH_OFFSET.exec(value);
|
|
52
|
-
if (!match) {
|
|
53
|
-
throw new TypeError("Invalid RFC-3339 date-time value");
|
|
54
|
-
}
|
|
55
|
-
const [_, yearStr, monthStr, dayStr, hours, minutes, seconds, fractionalMilliseconds, offsetStr] = match;
|
|
56
|
-
const year = strictParseShort(stripLeadingZeroes(yearStr));
|
|
57
|
-
const month = parseDateValue(monthStr, "month", 1, 12);
|
|
58
|
-
const day = parseDateValue(dayStr, "day", 1, 31);
|
|
59
|
-
const date = buildDate(year, month, day, {
|
|
60
|
-
hours,
|
|
61
|
-
minutes,
|
|
62
|
-
seconds,
|
|
63
|
-
fractionalMilliseconds
|
|
64
|
-
});
|
|
65
|
-
if (offsetStr.toUpperCase() != "Z") {
|
|
66
|
-
date.setTime(date.getTime() - parseOffsetToMilliseconds(offsetStr));
|
|
67
|
-
}
|
|
68
|
-
return date;
|
|
69
|
-
}, "parseRfc3339DateTimeWithOffset");
|
|
70
|
-
var buildDate = /* @__PURE__ */ __name((year, month, day, time) => {
|
|
71
|
-
const adjustedMonth = month - 1;
|
|
72
|
-
validateDayOfMonth(year, adjustedMonth, day);
|
|
73
|
-
return new Date(Date.UTC(year, adjustedMonth, day, parseDateValue(time.hours, "hour", 0, 23), parseDateValue(time.minutes, "minute", 0, 59), parseDateValue(time.seconds, "seconds", 0, 60), parseMilliseconds(time.fractionalMilliseconds)));
|
|
74
|
-
}, "buildDate");
|
|
75
|
-
var DAYS_IN_MONTH = [
|
|
76
|
-
31,
|
|
77
|
-
28,
|
|
78
|
-
31,
|
|
79
|
-
30,
|
|
80
|
-
31,
|
|
81
|
-
30,
|
|
82
|
-
31,
|
|
83
|
-
31,
|
|
84
|
-
30,
|
|
85
|
-
31,
|
|
86
|
-
30,
|
|
87
|
-
31
|
|
88
|
-
];
|
|
89
|
-
var validateDayOfMonth = /* @__PURE__ */ __name((year, month, day) => {
|
|
90
|
-
let maxDays = DAYS_IN_MONTH[month];
|
|
91
|
-
if (month === 1 && isLeapYear(year)) {
|
|
92
|
-
maxDays = 29;
|
|
93
|
-
}
|
|
94
|
-
if (day > maxDays) {
|
|
95
|
-
throw new TypeError(`Invalid day for ${MONTHS[month]} in ${year}: ${day}`);
|
|
96
|
-
}
|
|
97
|
-
}, "validateDayOfMonth");
|
|
98
|
-
var isLeapYear = /* @__PURE__ */ __name((year) => {
|
|
99
|
-
return year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0);
|
|
100
|
-
}, "isLeapYear");
|
|
101
|
-
var parseDateValue = /* @__PURE__ */ __name((value, type, lower, upper) => {
|
|
102
|
-
const dateVal = strictParseByte(stripLeadingZeroes(value));
|
|
103
|
-
if (dateVal < lower || dateVal > upper) {
|
|
104
|
-
throw new TypeError(`${type} must be between ${lower} and ${upper}, inclusive`);
|
|
105
|
-
}
|
|
106
|
-
return dateVal;
|
|
107
|
-
}, "parseDateValue");
|
|
108
|
-
var parseMilliseconds = /* @__PURE__ */ __name((value) => {
|
|
109
|
-
if (value === null || value === void 0) {
|
|
110
|
-
return 0;
|
|
111
|
-
}
|
|
112
|
-
return strictParseFloat32("0." + value) * 1e3;
|
|
113
|
-
}, "parseMilliseconds");
|
|
114
|
-
var parseOffsetToMilliseconds = /* @__PURE__ */ __name((value) => {
|
|
115
|
-
const directionStr = value[0];
|
|
116
|
-
let direction = 1;
|
|
117
|
-
if (directionStr == "+") {
|
|
118
|
-
direction = 1;
|
|
119
|
-
} else if (directionStr == "-") {
|
|
120
|
-
direction = -1;
|
|
121
|
-
} else {
|
|
122
|
-
throw new TypeError(`Offset direction, ${directionStr}, must be "+" or "-"`);
|
|
123
|
-
}
|
|
124
|
-
const hour = Number(value.substring(1, 3));
|
|
125
|
-
const minute = Number(value.substring(4, 6));
|
|
126
|
-
return direction * (hour * 60 + minute) * 60 * 1e3;
|
|
127
|
-
}, "parseOffsetToMilliseconds");
|
|
128
|
-
var stripLeadingZeroes = /* @__PURE__ */ __name((value) => {
|
|
129
|
-
let idx = 0;
|
|
130
|
-
while (idx < value.length - 1 && value.charAt(idx) === "0") {
|
|
131
|
-
idx++;
|
|
132
|
-
}
|
|
133
|
-
if (idx === 0) {
|
|
134
|
-
return value;
|
|
135
|
-
}
|
|
136
|
-
return value.slice(idx);
|
|
137
|
-
}, "stripLeadingZeroes");
|
|
138
|
-
|
|
139
|
-
export { parseRfc3339DateTime, parseRfc3339DateTimeWithOffset };
|
|
140
|
-
//# sourceMappingURL=7JWBGU62.js.map
|
|
141
|
-
//# sourceMappingURL=7JWBGU62.js.map
|
package/dist/7JWBGU62.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../node_modules/.pnpm/@smithy+core@3.18.5/node_modules/@smithy/core/dist-es/submodules/serde/date-utils.js"],"names":["MONTHS","RFC3339","RegExp","parseRfc3339DateTime","value","undefined","TypeError","match","exec","_","yearStr","monthStr","dayStr","hours","minutes","seconds","fractionalMilliseconds","year","strictParseShort","stripLeadingZeroes","month","parseDateValue","day","buildDate","RFC3339_WITH_OFFSET","parseRfc3339DateTimeWithOffset","offsetStr","date","toUpperCase","setTime","getTime","parseOffsetToMilliseconds","time","adjustedMonth","validateDayOfMonth","Date","UTC","parseMilliseconds","DAYS_IN_MONTH","maxDays","isLeapYear","type","lower","upper","dateVal","strictParseByte","strictParseFloat32","directionStr","direction","hour","Number","substring","minute","idx","length","charAt","slice"],"mappings":";;;;AAAA,cAAA,EAAA;AAEA,IAAMA,MAAAA,GAAS;AAAC,EAAA,KAAA;AAAO,EAAA,KAAA;AAAO,EAAA,KAAA;AAAO,EAAA,KAAA;AAAO,EAAA,KAAA;AAAO,EAAA,KAAA;AAAO,EAAA,KAAA;AAAO,EAAA,KAAA;AAAO,EAAA,KAAA;AAAO,EAAA,KAAA;AAAO,EAAA,K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AC3B,EAAA,IAAI4C,SAAAA,GAAY,CAAA;AAChB,EAAA,IAAID,gBAAgB,GAAA,EAAK;AACrBC,IAAAA,SAAAA,GAAY,CAAA;AAChB,EAAA,CAAA,MAAA,IACSD,gBAAgB,GAAA,EAAK;AAC1BC,IAAAA,SAAAA,GAAY,EAAA;EAChB,CAAA,MACK;AACD,IAAA,MAAM,IAAI1C,SAAAA,CAAU,CAAA,kBAAA,EAAqByC,YAAAA,CAAAA,oBAAAA,CAAkC,CAAA;AAC/E,EAAA;AACA,EAAA,MAAME,OAAOC,MAAAA,CAAO9C,KAAAA,CAAM+C,SAAAA,CAAU,CAAA,EAAG,CAAA,CAAA,CAAA;AACvC,EAAA,MAAMC,SAASF,MAAAA,CAAO9C,KAAAA,CAAM+C,SAAAA,CAAU,CAAA,EAAG,CAAA,CAAA,CAAA;AACzC,EAAA,OAAOH,SAAAA,IAAaC,IAAAA,GAAO,EAAA,GAAKG,MAAAA,CAAAA,GAAU,EAAA,GAAK,GAAA;AACnD,CAAA,EAfkC,2BAAA,CAAA;AAgBlC,IAAMjC,kBAAAA,2BAAsBf,KAAAA,KAAAA;AACxB,EAAA,IAAIiD,GAAAA,GAAM,CAAA;AACV,EAAA,OAAOA,GAAAA,GAAMjD,MAAMkD,MAAAA,GAAS,CAAA,IAAKlD,MAAMmD,MAAAA,CAAOF,GAAAA,MAAS,GAAA,EAAK;AACxDA,IAAAA,GAAAA,EAAAA;AACJ,EAAA;AACA,EAAA,IAAIA,QAAQ,CAAA,EAAG;AACX,IAAA,OAAOjD,KAAAA;AACX,EAAA;AACA,EAAA,OAAOA,KAAAA,CAAMoD,MAAMH,GAAAA,CAAAA;AACvB,CAAA,EAT2B,oBAAA,CAAA","file":"7JWBGU62.js","sourcesContent":["import { strictParseByte, strictParseDouble, strictParseFloat32, strictParseShort } from \"./parse-utils\";\nconst DAYS = [\"Sun\", \"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\"];\nconst MONTHS = [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\"];\nexport function dateToUtcString(date) {\n const year = date.getUTCFullYear();\n const month = date.getUTCMonth();\n const dayOfWeek = date.getUTCDay();\n const dayOfMonthInt = date.getUTCDate();\n const hoursInt = date.getUTCHours();\n const minutesInt = date.getUTCMinutes();\n const secondsInt = date.getUTCSeconds();\n const dayOfMonthString = dayOfMonthInt < 10 ? `0${dayOfMonthInt}` : `${dayOfMonthInt}`;\n const hoursString = hoursInt < 10 ? `0${hoursInt}` : `${hoursInt}`;\n const minutesString = minutesInt < 10 ? `0${minutesInt}` : `${minutesInt}`;\n const secondsString = secondsInt < 10 ? `0${secondsInt}` : `${secondsInt}`;\n return `${DAYS[dayOfWeek]}, ${dayOfMonthString} ${MONTHS[month]} ${year} ${hoursString}:${minutesString}:${secondsString} GMT`;\n}\nconst RFC3339 = new RegExp(/^(\\d{4})-(\\d{2})-(\\d{2})[tT](\\d{2}):(\\d{2}):(\\d{2})(?:\\.(\\d+))?[zZ]$/);\nexport const parseRfc3339DateTime = (value) => {\n if (value === null || value === undefined) {\n return undefined;\n }\n if (typeof value !== \"string\") {\n throw new TypeError(\"RFC-3339 date-times must be expressed as strings\");\n }\n const match = RFC3339.exec(value);\n if (!match) {\n throw new TypeError(\"Invalid RFC-3339 date-time value\");\n }\n const [_, yearStr, monthStr, dayStr, hours, minutes, seconds, fractionalMilliseconds] = match;\n const year = strictParseShort(stripLeadingZeroes(yearStr));\n const month = parseDateValue(monthStr, \"month\", 1, 12);\n const day = parseDateValue(dayStr, \"day\", 1, 31);\n return buildDate(year, month, day, { hours, minutes, seconds, fractionalMilliseconds });\n};\nconst RFC3339_WITH_OFFSET = new RegExp(/^(\\d{4})-(\\d{2})-(\\d{2})[tT](\\d{2}):(\\d{2}):(\\d{2})(?:\\.(\\d+))?(([-+]\\d{2}\\:\\d{2})|[zZ])$/);\nexport const parseRfc3339DateTimeWithOffset = (value) => {\n if (value === null || value === undefined) {\n return undefined;\n }\n if (typeof value !== \"string\") {\n throw new TypeError(\"RFC-3339 date-times must be expressed as strings\");\n }\n const match = RFC3339_WITH_OFFSET.exec(value);\n if (!match) {\n throw new TypeError(\"Invalid RFC-3339 date-time value\");\n }\n const [_, yearStr, monthStr, dayStr, hours, minutes, seconds, fractionalMilliseconds, offsetStr] = match;\n const year = strictParseShort(stripLeadingZeroes(yearStr));\n const month = parseDateValue(monthStr, \"month\", 1, 12);\n const day = parseDateValue(dayStr, \"day\", 1, 31);\n const date = buildDate(year, month, day, { hours, minutes, seconds, fractionalMilliseconds });\n if (offsetStr.toUpperCase() != \"Z\") {\n date.setTime(date.getTime() - parseOffsetToMilliseconds(offsetStr));\n }\n return date;\n};\nconst IMF_FIXDATE = new RegExp(/^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\\d{2}) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\\d{4}) (\\d{1,2}):(\\d{2}):(\\d{2})(?:\\.(\\d+))? GMT$/);\nconst RFC_850_DATE = new RegExp(/^(?:Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\\d{2})-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\\d{2}) (\\d{1,2}):(\\d{2}):(\\d{2})(?:\\.(\\d+))? GMT$/);\nconst ASC_TIME = new RegExp(/^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( [1-9]|\\d{2}) (\\d{1,2}):(\\d{2}):(\\d{2})(?:\\.(\\d+))? (\\d{4})$/);\nexport const parseRfc7231DateTime = (value) => {\n if (value === null || value === undefined) {\n return undefined;\n }\n if (typeof value !== \"string\") {\n throw new TypeError(\"RFC-7231 date-times must be expressed as strings\");\n }\n let match = IMF_FIXDATE.exec(value);\n if (match) {\n const [_, dayStr, monthStr, yearStr, hours, minutes, seconds, fractionalMilliseconds] = match;\n return buildDate(strictParseShort(stripLeadingZeroes(yearStr)), parseMonthByShortName(monthStr), parseDateValue(dayStr, \"day\", 1, 31), { hours, minutes, seconds, fractionalMilliseconds });\n }\n match = RFC_850_DATE.exec(value);\n if (match) {\n const [_, dayStr, monthStr, yearStr, hours, minutes, seconds, fractionalMilliseconds] = match;\n return adjustRfc850Year(buildDate(parseTwoDigitYear(yearStr), parseMonthByShortName(monthStr), parseDateValue(dayStr, \"day\", 1, 31), {\n hours,\n minutes,\n seconds,\n fractionalMilliseconds,\n }));\n }\n match = ASC_TIME.exec(value);\n if (match) {\n const [_, monthStr, dayStr, hours, minutes, seconds, fractionalMilliseconds, yearStr] = match;\n return buildDate(strictParseShort(stripLeadingZeroes(yearStr)), parseMonthByShortName(monthStr), parseDateValue(dayStr.trimLeft(), \"day\", 1, 31), { hours, minutes, seconds, fractionalMilliseconds });\n }\n throw new TypeError(\"Invalid RFC-7231 date-time value\");\n};\nexport const parseEpochTimestamp = (value) => {\n if (value === null || value === undefined) {\n return undefined;\n }\n let valueAsDouble;\n if (typeof value === \"number\") {\n valueAsDouble = value;\n }\n else if (typeof value === \"string\") {\n valueAsDouble = strictParseDouble(value);\n }\n else if (typeof value === \"object\" && value.tag === 1) {\n valueAsDouble = value.value;\n }\n else {\n throw new TypeError(\"Epoch timestamps must be expressed as floating point numbers or their string representation\");\n }\n if (Number.isNaN(valueAsDouble) || valueAsDouble === Infinity || valueAsDouble === -Infinity) {\n throw new TypeError(\"Epoch timestamps must be valid, non-Infinite, non-NaN numerics\");\n }\n return new Date(Math.round(valueAsDouble * 1000));\n};\nconst buildDate = (year, month, day, time) => {\n const adjustedMonth = month - 1;\n validateDayOfMonth(year, adjustedMonth, day);\n return new Date(Date.UTC(year, adjustedMonth, day, parseDateValue(time.hours, \"hour\", 0, 23), parseDateValue(time.minutes, \"minute\", 0, 59), parseDateValue(time.seconds, \"seconds\", 0, 60), parseMilliseconds(time.fractionalMilliseconds)));\n};\nconst parseTwoDigitYear = (value) => {\n const thisYear = new Date().getUTCFullYear();\n const valueInThisCentury = Math.floor(thisYear / 100) * 100 + strictParseShort(stripLeadingZeroes(value));\n if (valueInThisCentury < thisYear) {\n return valueInThisCentury + 100;\n }\n return valueInThisCentury;\n};\nconst FIFTY_YEARS_IN_MILLIS = 50 * 365 * 24 * 60 * 60 * 1000;\nconst adjustRfc850Year = (input) => {\n if (input.getTime() - new Date().getTime() > FIFTY_YEARS_IN_MILLIS) {\n return new Date(Date.UTC(input.getUTCFullYear() - 100, input.getUTCMonth(), input.getUTCDate(), input.getUTCHours(), input.getUTCMinutes(), input.getUTCSeconds(), input.getUTCMilliseconds()));\n }\n return input;\n};\nconst parseMonthByShortName = (value) => {\n const monthIdx = MONTHS.indexOf(value);\n if (monthIdx < 0) {\n throw new TypeError(`Invalid month: ${value}`);\n }\n return monthIdx + 1;\n};\nconst DAYS_IN_MONTH = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];\nconst validateDayOfMonth = (year, month, day) => {\n let maxDays = DAYS_IN_MONTH[month];\n if (month === 1 && isLeapYear(year)) {\n maxDays = 29;\n }\n if (day > maxDays) {\n throw new TypeError(`Invalid day for ${MONTHS[month]} in ${year}: ${day}`);\n }\n};\nconst isLeapYear = (year) => {\n return year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0);\n};\nconst parseDateValue = (value, type, lower, upper) => {\n const dateVal = strictParseByte(stripLeadingZeroes(value));\n if (dateVal < lower || dateVal > upper) {\n throw new TypeError(`${type} must be between ${lower} and ${upper}, inclusive`);\n }\n return dateVal;\n};\nconst parseMilliseconds = (value) => {\n if (value === null || value === undefined) {\n return 0;\n }\n return strictParseFloat32(\"0.\" + value) * 1000;\n};\nconst parseOffsetToMilliseconds = (value) => {\n const directionStr = value[0];\n let direction = 1;\n if (directionStr == \"+\") {\n direction = 1;\n }\n else if (directionStr == \"-\") {\n direction = -1;\n }\n else {\n throw new TypeError(`Offset direction, ${directionStr}, must be \"+\" or \"-\"`);\n }\n const hour = Number(value.substring(1, 3));\n const minute = Number(value.substring(4, 6));\n return direction * (hour * 60 + minute) * 60 * 1000;\n};\nconst stripLeadingZeroes = (value) => {\n let idx = 0;\n while (idx < value.length - 1 && value.charAt(idx) === \"0\") {\n idx++;\n }\n if (idx === 0) {\n return value;\n }\n return value.slice(idx);\n};\n"]}
|