@stackone/utils 0.18.0 → 0.20.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/edge/index.d.mts +6 -1
- package/dist/edge/index.mjs +3 -3
- package/dist/node/index.cjs +3 -3
- package/dist/node/index.d.cts +6 -1
- package/dist/node/index.d.mts +6 -1
- package/dist/node/index.mjs +3 -3
- package/package.json +1 -1
package/dist/node/index.d.cts
CHANGED
|
@@ -90,6 +90,10 @@ declare const isValidIpRanges: (patterns: string[]) => boolean;
|
|
|
90
90
|
declare const isIpInRanges: (ip: string, patterns: string[]) => boolean;
|
|
91
91
|
declare const isIpInRange: (ip: string, pattern: string) => boolean;
|
|
92
92
|
//#endregion
|
|
93
|
+
//#region src/shared/objectSize.d.ts
|
|
94
|
+
declare function calculateSize(obj: unknown): number;
|
|
95
|
+
declare function exceedsSize(obj: unknown, maxSize: number): boolean;
|
|
96
|
+
//#endregion
|
|
93
97
|
//#region src/shared/parsers.d.ts
|
|
94
98
|
declare const safeParseToString: ({
|
|
95
99
|
value
|
|
@@ -167,6 +171,7 @@ declare enum RequestSourceType {
|
|
|
167
171
|
MONITORING = "MONITORING",
|
|
168
172
|
EXTERNAL_TRIGGER = "EXTERNAL_TRIGGER",
|
|
169
173
|
API_SESSION = "API_SESSION",
|
|
174
|
+
SESSION_TOKEN = "SESSION_TOKEN",
|
|
170
175
|
NATIVE_WEBHOOK_SETUP_WORKER = "NATIVE_WEBHOOK_SETUP_WORKER",
|
|
171
176
|
COOKIE_SESSION = "COOKIE_SESSION",
|
|
172
177
|
MCP_TOOL = "MCP_TOOL",
|
|
@@ -202,4 +207,4 @@ declare const generateRequestId: (randomUUIDGenerator?: typeof randomUUID) => st
|
|
|
202
207
|
declare const generateActionRunId: (randomUUIDGenerator?: typeof randomUUID) => string;
|
|
203
208
|
declare const generateEventId: (randomUUIDGenerator?: typeof randomUUID) => string;
|
|
204
209
|
//#endregion
|
|
205
|
-
export { NON_BACKGROUND_LOGS_SOURCE_TYPES, NormalizedKeyMap, RequestSourceType, ZodType, calculateNextAnniversary, calculateYearsElapsed, dateHasPassed, decodeFromBase64, deepCopy, delay, encodeToBase64, exponentialBackoffInMS, generateActionRunId, generateEventId, generateRequestId, generateSamlAssertion, getContentHash, getCountryAlpha2CodeByAlpha2Code, getCountryAlpha2CodeByAlpha3Code, getCountryAlpha2CodeByCitizenship, getCountryAlpha2CodeByCountryCode, getCountryAlpha2CodeByCountryName, getCountryAlpha3CodeByAlpha2Code, getCountryAlpha3CodeByAlpha3Code, getCountryAlpha3CodeByCountryCode, getCountryAlpha3CodeByCountryName, getCountryCodeByAlpha2Code, getCountryCodeByAlpha3Code, getCountryCodeByCountryCode, getCountryCodeByCountryName, getCountryNameByAlpha2Code, getCountryNameByAlpha3Code, getCountryNameByCountryCode, getCountryNameByCountryName, getCountrySubDivisionByAlpha2CodeAndName, getCountrySubDivisionCodeBySubDivisionName, getCountrySubDivisionNameBySubDivisionCode, getCountrySubDivisionsByAlpha2Code, getDocumentFileFormatFromExtension, isBoolean, isDate, isFunction, isFutureUnixTimestamp, isIpInRange, isIpInRanges, isMissing, isNumber, isObject, isString, isValidIp, isValidIpRange, isValidIpRanges, isValidUUID, notMissing, safeParseToBoolean, safeParseToDateTime, safeParseToDateTimeString, safeParseToNumber, safeParseToString, z, zStrictObject };
|
|
210
|
+
export { NON_BACKGROUND_LOGS_SOURCE_TYPES, NormalizedKeyMap, RequestSourceType, ZodType, calculateNextAnniversary, calculateSize, calculateYearsElapsed, dateHasPassed, decodeFromBase64, deepCopy, delay, encodeToBase64, exceedsSize, exponentialBackoffInMS, generateActionRunId, generateEventId, generateRequestId, generateSamlAssertion, getContentHash, getCountryAlpha2CodeByAlpha2Code, getCountryAlpha2CodeByAlpha3Code, getCountryAlpha2CodeByCitizenship, getCountryAlpha2CodeByCountryCode, getCountryAlpha2CodeByCountryName, getCountryAlpha3CodeByAlpha2Code, getCountryAlpha3CodeByAlpha3Code, getCountryAlpha3CodeByCountryCode, getCountryAlpha3CodeByCountryName, getCountryCodeByAlpha2Code, getCountryCodeByAlpha3Code, getCountryCodeByCountryCode, getCountryCodeByCountryName, getCountryNameByAlpha2Code, getCountryNameByAlpha3Code, getCountryNameByCountryCode, getCountryNameByCountryName, getCountrySubDivisionByAlpha2CodeAndName, getCountrySubDivisionCodeBySubDivisionName, getCountrySubDivisionNameBySubDivisionCode, getCountrySubDivisionsByAlpha2Code, getDocumentFileFormatFromExtension, isBoolean, isDate, isFunction, isFutureUnixTimestamp, isIpInRange, isIpInRanges, isMissing, isNumber, isObject, isString, isValidIp, isValidIpRange, isValidIpRanges, isValidUUID, notMissing, safeParseToBoolean, safeParseToDateTime, safeParseToDateTimeString, safeParseToNumber, safeParseToString, z, zStrictObject };
|
package/dist/node/index.d.mts
CHANGED
|
@@ -90,6 +90,10 @@ declare const isValidIpRanges: (patterns: string[]) => boolean;
|
|
|
90
90
|
declare const isIpInRanges: (ip: string, patterns: string[]) => boolean;
|
|
91
91
|
declare const isIpInRange: (ip: string, pattern: string) => boolean;
|
|
92
92
|
//#endregion
|
|
93
|
+
//#region src/shared/objectSize.d.ts
|
|
94
|
+
declare function calculateSize(obj: unknown): number;
|
|
95
|
+
declare function exceedsSize(obj: unknown, maxSize: number): boolean;
|
|
96
|
+
//#endregion
|
|
93
97
|
//#region src/shared/parsers.d.ts
|
|
94
98
|
declare const safeParseToString: ({
|
|
95
99
|
value
|
|
@@ -167,6 +171,7 @@ declare enum RequestSourceType {
|
|
|
167
171
|
MONITORING = "MONITORING",
|
|
168
172
|
EXTERNAL_TRIGGER = "EXTERNAL_TRIGGER",
|
|
169
173
|
API_SESSION = "API_SESSION",
|
|
174
|
+
SESSION_TOKEN = "SESSION_TOKEN",
|
|
170
175
|
NATIVE_WEBHOOK_SETUP_WORKER = "NATIVE_WEBHOOK_SETUP_WORKER",
|
|
171
176
|
COOKIE_SESSION = "COOKIE_SESSION",
|
|
172
177
|
MCP_TOOL = "MCP_TOOL",
|
|
@@ -202,4 +207,4 @@ declare const generateRequestId: (randomUUIDGenerator?: typeof randomUUID) => st
|
|
|
202
207
|
declare const generateActionRunId: (randomUUIDGenerator?: typeof randomUUID) => string;
|
|
203
208
|
declare const generateEventId: (randomUUIDGenerator?: typeof randomUUID) => string;
|
|
204
209
|
//#endregion
|
|
205
|
-
export { NON_BACKGROUND_LOGS_SOURCE_TYPES, NormalizedKeyMap, RequestSourceType, type ZodType, calculateNextAnniversary, calculateYearsElapsed, dateHasPassed, decodeFromBase64, deepCopy, delay, encodeToBase64, exponentialBackoffInMS, generateActionRunId, generateEventId, generateRequestId, generateSamlAssertion, getContentHash, getCountryAlpha2CodeByAlpha2Code, getCountryAlpha2CodeByAlpha3Code, getCountryAlpha2CodeByCitizenship, getCountryAlpha2CodeByCountryCode, getCountryAlpha2CodeByCountryName, getCountryAlpha3CodeByAlpha2Code, getCountryAlpha3CodeByAlpha3Code, getCountryAlpha3CodeByCountryCode, getCountryAlpha3CodeByCountryName, getCountryCodeByAlpha2Code, getCountryCodeByAlpha3Code, getCountryCodeByCountryCode, getCountryCodeByCountryName, getCountryNameByAlpha2Code, getCountryNameByAlpha3Code, getCountryNameByCountryCode, getCountryNameByCountryName, getCountrySubDivisionByAlpha2CodeAndName, getCountrySubDivisionCodeBySubDivisionName, getCountrySubDivisionNameBySubDivisionCode, getCountrySubDivisionsByAlpha2Code, getDocumentFileFormatFromExtension, isBoolean, isDate, isFunction, isFutureUnixTimestamp, isIpInRange, isIpInRanges, isMissing, isNumber, isObject, isString, isValidIp, isValidIpRange, isValidIpRanges, isValidUUID, notMissing, safeParseToBoolean, safeParseToDateTime, safeParseToDateTimeString, safeParseToNumber, safeParseToString, z, zStrictObject };
|
|
210
|
+
export { NON_BACKGROUND_LOGS_SOURCE_TYPES, NormalizedKeyMap, RequestSourceType, type ZodType, calculateNextAnniversary, calculateSize, calculateYearsElapsed, dateHasPassed, decodeFromBase64, deepCopy, delay, encodeToBase64, exceedsSize, exponentialBackoffInMS, generateActionRunId, generateEventId, generateRequestId, generateSamlAssertion, getContentHash, getCountryAlpha2CodeByAlpha2Code, getCountryAlpha2CodeByAlpha3Code, getCountryAlpha2CodeByCitizenship, getCountryAlpha2CodeByCountryCode, getCountryAlpha2CodeByCountryName, getCountryAlpha3CodeByAlpha2Code, getCountryAlpha3CodeByAlpha3Code, getCountryAlpha3CodeByCountryCode, getCountryAlpha3CodeByCountryName, getCountryCodeByAlpha2Code, getCountryCodeByAlpha3Code, getCountryCodeByCountryCode, getCountryCodeByCountryName, getCountryNameByAlpha2Code, getCountryNameByAlpha3Code, getCountryNameByCountryCode, getCountryNameByCountryName, getCountrySubDivisionByAlpha2CodeAndName, getCountrySubDivisionCodeBySubDivisionName, getCountrySubDivisionNameBySubDivisionCode, getCountrySubDivisionsByAlpha2Code, getDocumentFileFormatFromExtension, isBoolean, isDate, isFunction, isFutureUnixTimestamp, isIpInRange, isIpInRanges, isMissing, isNumber, isObject, isString, isValidIp, isValidIpRange, isValidIpRanges, isValidUUID, notMissing, safeParseToBoolean, safeParseToDateTime, safeParseToDateTimeString, safeParseToNumber, safeParseToString, z, zStrictObject };
|