@lightsparkdev/core 1.2.0 → 1.2.1
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/CHANGELOG.md +6 -0
- package/dist/{chunk-XRYQNSG7.js → chunk-YRWJVCZI.js} +7 -2
- package/dist/{index-4698c2db.d.ts → index-b1e5d968.d.ts} +3 -2
- package/dist/index.cjs +8 -2
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +3 -1
- package/dist/utils/index.cjs +8 -2
- package/dist/utils/index.d.cts +1 -1
- package/dist/utils/index.d.ts +1 -1
- package/dist/utils/index.js +3 -1
- package/package.json +1 -1
- package/src/utils/typeGuards.ts +7 -2
package/CHANGELOG.md
CHANGED
|
@@ -921,8 +921,12 @@ function lsidToUUID(lsid) {
|
|
|
921
921
|
}
|
|
922
922
|
|
|
923
923
|
// src/utils/typeGuards.ts
|
|
924
|
-
function isUint8Array(
|
|
925
|
-
return
|
|
924
|
+
function isUint8Array(value) {
|
|
925
|
+
return value instanceof Uint8Array;
|
|
926
|
+
}
|
|
927
|
+
function isObject2(value) {
|
|
928
|
+
const type = typeof value;
|
|
929
|
+
return value != null && (type == "object" || type == "function");
|
|
926
930
|
}
|
|
927
931
|
|
|
928
932
|
// src/utils/types.ts
|
|
@@ -976,6 +980,7 @@ export {
|
|
|
976
980
|
pollUntil,
|
|
977
981
|
lsidToUUID,
|
|
978
982
|
isUint8Array,
|
|
983
|
+
isObject2 as isObject,
|
|
979
984
|
isType,
|
|
980
985
|
notNullUndefined
|
|
981
986
|
};
|
|
@@ -236,6 +236,7 @@ declare function sleep(ms: number): Promise<unknown>;
|
|
|
236
236
|
|
|
237
237
|
declare function lsidToUUID(lsid: string): string;
|
|
238
238
|
|
|
239
|
-
declare function isUint8Array(
|
|
239
|
+
declare function isUint8Array(value: unknown): value is Uint8Array;
|
|
240
|
+
declare function isObject(value: unknown): value is Record<string, unknown>;
|
|
240
241
|
|
|
241
|
-
export {
|
|
242
|
+
export { OmitTypename as $, isErrorMsg as A, errorToJSON as B, ConfigKeys as C, bytesToHex as D, hexToBytes as E, getLocalStorageConfigItem as F, getLocalStorageBoolean as G, setLocalStorageBoolean as H, deleteLocalStorageItem as I, getCurrentLocale as J, countryCodesToCurrencyCodes as K, CurrencyLocales as L, CurrencyCodes as M, localeToCurrencyCode as N, clamp as O, linearInterpolate as P, round as Q, isNumber as R, SDKCurrencyAmountType as S, pollUntil as T, sleep as U, lsidToUUID as V, isUint8Array as W, isObject as X, Maybe as Y, ExpandRecursively as Z, ById as _, b64encode as a, isType as a0, DeepPartial as a1, JSONLiteral as a2, JSONType as a3, JSONObject as a4, NN as a5, notNullUndefined as a6, PartialBy as a7, Complete as a8, b64decode as b, createSha256Hash as c, defaultCurrencyCode as d, CurrencyUnit as e, CurrencyUnitType as f, convertCurrencyAmountValue as g, convertCurrencyAmount as h, CurrencyMap as i, CurrencyAmountObj as j, CurrencyAmountArg as k, isCurrencyAmountObj as l, isSDKCurrencyAmount as m, mapCurrencyAmount as n, isCurrencyMap as o, abbrCurrencyUnit as p, formatCurrencyStr as q, localeToCurrencySymbol as r, separateCurrencyStrParts as s, isBrowser as t, urlsafe_b64decode as u, isNode as v, isTest as w, isError as x, isErrorWithMessage as y, getErrorMsg as z };
|
package/dist/index.cjs
CHANGED
|
@@ -74,6 +74,7 @@ __export(src_exports, {
|
|
|
74
74
|
isErrorWithMessage: () => isErrorWithMessage,
|
|
75
75
|
isNode: () => isNode,
|
|
76
76
|
isNumber: () => isNumber,
|
|
77
|
+
isObject: () => isObject2,
|
|
77
78
|
isSDKCurrencyAmount: () => isSDKCurrencyAmount,
|
|
78
79
|
isTest: () => isTest,
|
|
79
80
|
isType: () => isType,
|
|
@@ -1365,8 +1366,12 @@ function lsidToUUID(lsid) {
|
|
|
1365
1366
|
}
|
|
1366
1367
|
|
|
1367
1368
|
// src/utils/typeGuards.ts
|
|
1368
|
-
function isUint8Array(
|
|
1369
|
-
return
|
|
1369
|
+
function isUint8Array(value) {
|
|
1370
|
+
return value instanceof Uint8Array;
|
|
1371
|
+
}
|
|
1372
|
+
function isObject2(value) {
|
|
1373
|
+
const type = typeof value;
|
|
1374
|
+
return value != null && (type == "object" || type == "function");
|
|
1370
1375
|
}
|
|
1371
1376
|
|
|
1372
1377
|
// src/utils/types.ts
|
|
@@ -1729,6 +1734,7 @@ var Requester_default = Requester;
|
|
|
1729
1734
|
isErrorWithMessage,
|
|
1730
1735
|
isNode,
|
|
1731
1736
|
isNumber,
|
|
1737
|
+
isObject,
|
|
1732
1738
|
isSDKCurrencyAmount,
|
|
1733
1739
|
isTest,
|
|
1734
1740
|
isType,
|
package/dist/index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { _ as ById, a8 as Complete, C as ConfigKeys, k as CurrencyAmountArg, j as CurrencyAmountObj, M as CurrencyCodes, L as CurrencyLocales, i as CurrencyMap, e as CurrencyUnit, f as CurrencyUnitType, a1 as DeepPartial, Z as ExpandRecursively, a2 as JSONLiteral, a4 as JSONObject, a3 as JSONType, Y as Maybe, a5 as NN, $ as OmitTypename, a7 as PartialBy, S as SDKCurrencyAmountType, p as abbrCurrencyUnit, b as b64decode, a as b64encode, D as bytesToHex, O as clamp, h as convertCurrencyAmount, g as convertCurrencyAmountValue, K as countryCodesToCurrencyCodes, c as createSha256Hash, d as defaultCurrencyCode, I as deleteLocalStorageItem, B as errorToJSON, q as formatCurrencyStr, J as getCurrentLocale, z as getErrorMsg, G as getLocalStorageBoolean, F as getLocalStorageConfigItem, E as hexToBytes, t as isBrowser, l as isCurrencyAmountObj, o as isCurrencyMap, x as isError, A as isErrorMsg, y as isErrorWithMessage, v as isNode, R as isNumber, X as isObject, m as isSDKCurrencyAmount, w as isTest, a0 as isType, W as isUint8Array, P as linearInterpolate, N as localeToCurrencyCode, r as localeToCurrencySymbol, V as lsidToUUID, n as mapCurrencyAmount, a6 as notNullUndefined, T as pollUntil, Q as round, s as separateCurrencyStrParts, H as setLocalStorageBoolean, U as sleep, u as urlsafe_b64decode } from './index-b1e5d968.js';
|
|
2
2
|
import { Observable } from 'zen-observable-ts';
|
|
3
3
|
|
|
4
4
|
declare class LightsparkException extends Error {
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { _ as ById, a8 as Complete, C as ConfigKeys, k as CurrencyAmountArg, j as CurrencyAmountObj, M as CurrencyCodes, L as CurrencyLocales, i as CurrencyMap, e as CurrencyUnit, f as CurrencyUnitType, a1 as DeepPartial, Z as ExpandRecursively, a2 as JSONLiteral, a4 as JSONObject, a3 as JSONType, Y as Maybe, a5 as NN, $ as OmitTypename, a7 as PartialBy, S as SDKCurrencyAmountType, p as abbrCurrencyUnit, b as b64decode, a as b64encode, D as bytesToHex, O as clamp, h as convertCurrencyAmount, g as convertCurrencyAmountValue, K as countryCodesToCurrencyCodes, c as createSha256Hash, d as defaultCurrencyCode, I as deleteLocalStorageItem, B as errorToJSON, q as formatCurrencyStr, J as getCurrentLocale, z as getErrorMsg, G as getLocalStorageBoolean, F as getLocalStorageConfigItem, E as hexToBytes, t as isBrowser, l as isCurrencyAmountObj, o as isCurrencyMap, x as isError, A as isErrorMsg, y as isErrorWithMessage, v as isNode, R as isNumber, X as isObject, m as isSDKCurrencyAmount, w as isTest, a0 as isType, W as isUint8Array, P as linearInterpolate, N as localeToCurrencyCode, r as localeToCurrencySymbol, V as lsidToUUID, n as mapCurrencyAmount, a6 as notNullUndefined, T as pollUntil, Q as round, s as separateCurrencyStrParts, H as setLocalStorageBoolean, U as sleep, u as urlsafe_b64decode } from './index-b1e5d968.js';
|
|
2
2
|
import { Observable } from 'zen-observable-ts';
|
|
3
3
|
|
|
4
4
|
declare class LightsparkException extends Error {
|
package/dist/index.js
CHANGED
|
@@ -27,6 +27,7 @@ import {
|
|
|
27
27
|
isErrorWithMessage,
|
|
28
28
|
isNode,
|
|
29
29
|
isNumber,
|
|
30
|
+
isObject,
|
|
30
31
|
isSDKCurrencyAmount,
|
|
31
32
|
isTest,
|
|
32
33
|
isType,
|
|
@@ -43,7 +44,7 @@ import {
|
|
|
43
44
|
setLocalStorageBoolean,
|
|
44
45
|
sleep,
|
|
45
46
|
urlsafe_b64decode
|
|
46
|
-
} from "./chunk-
|
|
47
|
+
} from "./chunk-YRWJVCZI.js";
|
|
47
48
|
|
|
48
49
|
// src/Logger.ts
|
|
49
50
|
var LoggingLevel = /* @__PURE__ */ ((LoggingLevel2) => {
|
|
@@ -743,6 +744,7 @@ export {
|
|
|
743
744
|
isErrorWithMessage,
|
|
744
745
|
isNode,
|
|
745
746
|
isNumber,
|
|
747
|
+
isObject,
|
|
746
748
|
isSDKCurrencyAmount,
|
|
747
749
|
isTest,
|
|
748
750
|
isType,
|
package/dist/utils/index.cjs
CHANGED
|
@@ -57,6 +57,7 @@ __export(utils_exports, {
|
|
|
57
57
|
isErrorWithMessage: () => isErrorWithMessage,
|
|
58
58
|
isNode: () => isNode,
|
|
59
59
|
isNumber: () => isNumber,
|
|
60
|
+
isObject: () => isObject2,
|
|
60
61
|
isSDKCurrencyAmount: () => isSDKCurrencyAmount,
|
|
61
62
|
isTest: () => isTest,
|
|
62
63
|
isType: () => isType,
|
|
@@ -999,8 +1000,12 @@ function lsidToUUID(lsid) {
|
|
|
999
1000
|
}
|
|
1000
1001
|
|
|
1001
1002
|
// src/utils/typeGuards.ts
|
|
1002
|
-
function isUint8Array(
|
|
1003
|
-
return
|
|
1003
|
+
function isUint8Array(value) {
|
|
1004
|
+
return value instanceof Uint8Array;
|
|
1005
|
+
}
|
|
1006
|
+
function isObject2(value) {
|
|
1007
|
+
const type = typeof value;
|
|
1008
|
+
return value != null && (type == "object" || type == "function");
|
|
1004
1009
|
}
|
|
1005
1010
|
|
|
1006
1011
|
// src/utils/types.ts
|
|
@@ -1039,6 +1044,7 @@ function notNullUndefined(value) {
|
|
|
1039
1044
|
isErrorWithMessage,
|
|
1040
1045
|
isNode,
|
|
1041
1046
|
isNumber,
|
|
1047
|
+
isObject,
|
|
1042
1048
|
isSDKCurrencyAmount,
|
|
1043
1049
|
isTest,
|
|
1044
1050
|
isType,
|
package/dist/utils/index.d.cts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { _ as ById, a8 as Complete, k as CurrencyAmountArg, j as CurrencyAmountObj, M as CurrencyCodes, L as CurrencyLocales, i as CurrencyMap, e as CurrencyUnit, f as CurrencyUnitType, a1 as DeepPartial, Z as ExpandRecursively, a2 as JSONLiteral, a4 as JSONObject, a3 as JSONType, Y as Maybe, a5 as NN, $ as OmitTypename, a7 as PartialBy, S as SDKCurrencyAmountType, p as abbrCurrencyUnit, b as b64decode, a as b64encode, D as bytesToHex, O as clamp, h as convertCurrencyAmount, g as convertCurrencyAmountValue, K as countryCodesToCurrencyCodes, c as createSha256Hash, d as defaultCurrencyCode, I as deleteLocalStorageItem, B as errorToJSON, q as formatCurrencyStr, J as getCurrentLocale, z as getErrorMsg, G as getLocalStorageBoolean, F as getLocalStorageConfigItem, E as hexToBytes, t as isBrowser, l as isCurrencyAmountObj, o as isCurrencyMap, x as isError, A as isErrorMsg, y as isErrorWithMessage, v as isNode, R as isNumber, X as isObject, m as isSDKCurrencyAmount, w as isTest, a0 as isType, W as isUint8Array, P as linearInterpolate, N as localeToCurrencyCode, r as localeToCurrencySymbol, V as lsidToUUID, n as mapCurrencyAmount, a6 as notNullUndefined, T as pollUntil, Q as round, s as separateCurrencyStrParts, H as setLocalStorageBoolean, U as sleep, u as urlsafe_b64decode } from '../index-b1e5d968.js';
|
package/dist/utils/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { _ as ById, a8 as Complete, k as CurrencyAmountArg, j as CurrencyAmountObj, M as CurrencyCodes, L as CurrencyLocales, i as CurrencyMap, e as CurrencyUnit, f as CurrencyUnitType, a1 as DeepPartial, Z as ExpandRecursively, a2 as JSONLiteral, a4 as JSONObject, a3 as JSONType, Y as Maybe, a5 as NN, $ as OmitTypename, a7 as PartialBy, S as SDKCurrencyAmountType, p as abbrCurrencyUnit, b as b64decode, a as b64encode, D as bytesToHex, O as clamp, h as convertCurrencyAmount, g as convertCurrencyAmountValue, K as countryCodesToCurrencyCodes, c as createSha256Hash, d as defaultCurrencyCode, I as deleteLocalStorageItem, B as errorToJSON, q as formatCurrencyStr, J as getCurrentLocale, z as getErrorMsg, G as getLocalStorageBoolean, F as getLocalStorageConfigItem, E as hexToBytes, t as isBrowser, l as isCurrencyAmountObj, o as isCurrencyMap, x as isError, A as isErrorMsg, y as isErrorWithMessage, v as isNode, R as isNumber, X as isObject, m as isSDKCurrencyAmount, w as isTest, a0 as isType, W as isUint8Array, P as linearInterpolate, N as localeToCurrencyCode, r as localeToCurrencySymbol, V as lsidToUUID, n as mapCurrencyAmount, a6 as notNullUndefined, T as pollUntil, Q as round, s as separateCurrencyStrParts, H as setLocalStorageBoolean, U as sleep, u as urlsafe_b64decode } from '../index-b1e5d968.js';
|
package/dist/utils/index.js
CHANGED
|
@@ -26,6 +26,7 @@ import {
|
|
|
26
26
|
isErrorWithMessage,
|
|
27
27
|
isNode,
|
|
28
28
|
isNumber,
|
|
29
|
+
isObject,
|
|
29
30
|
isSDKCurrencyAmount,
|
|
30
31
|
isTest,
|
|
31
32
|
isType,
|
|
@@ -42,7 +43,7 @@ import {
|
|
|
42
43
|
setLocalStorageBoolean,
|
|
43
44
|
sleep,
|
|
44
45
|
urlsafe_b64decode
|
|
45
|
-
} from "../chunk-
|
|
46
|
+
} from "../chunk-YRWJVCZI.js";
|
|
46
47
|
export {
|
|
47
48
|
CurrencyUnit,
|
|
48
49
|
abbrCurrencyUnit,
|
|
@@ -71,6 +72,7 @@ export {
|
|
|
71
72
|
isErrorWithMessage,
|
|
72
73
|
isNode,
|
|
73
74
|
isNumber,
|
|
75
|
+
isObject,
|
|
74
76
|
isSDKCurrencyAmount,
|
|
75
77
|
isTest,
|
|
76
78
|
isType,
|
package/package.json
CHANGED
package/src/utils/typeGuards.ts
CHANGED
|
@@ -1,3 +1,8 @@
|
|
|
1
|
-
export function isUint8Array(
|
|
2
|
-
return
|
|
1
|
+
export function isUint8Array(value: unknown): value is Uint8Array {
|
|
2
|
+
return value instanceof Uint8Array;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
export function isObject(value: unknown): value is Record<string, unknown> {
|
|
6
|
+
const type = typeof value;
|
|
7
|
+
return value != null && (type == "object" || type == "function");
|
|
3
8
|
}
|