@lightsparkdev/core 1.0.16 → 1.0.17

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 CHANGED
@@ -1,5 +1,12 @@
1
1
  # @lightsparkdev/core
2
2
 
3
+ ## 1.0.17
4
+
5
+ ### Patch Changes
6
+
7
+ - 20fb70b: - Update deps
8
+ - Expose LoggingLevel
9
+
3
10
  ## 1.0.16
4
11
 
5
12
  ### Patch Changes
package/README.md CHANGED
@@ -11,3 +11,5 @@ To use the package, you'll need to install it from npm:
11
11
  ```bash
12
12
  $ npm install @lightsparkdev/core
13
13
  ```
14
+
15
+ TODO
@@ -768,83 +768,8 @@ var deleteLocalStorageItem = (key) => {
768
768
  }
769
769
  };
770
770
 
771
- // ../../node_modules/lodash-es/_freeGlobal.js
772
- var freeGlobal = typeof global == "object" && global && global.Object === Object && global;
773
- var freeGlobal_default = freeGlobal;
774
-
775
- // ../../node_modules/lodash-es/_root.js
776
- var freeSelf = typeof self == "object" && self && self.Object === Object && self;
777
- var root = freeGlobal_default || freeSelf || Function("return this")();
778
- var root_default = root;
779
-
780
- // ../../node_modules/lodash-es/_Symbol.js
781
- var Symbol = root_default.Symbol;
782
- var Symbol_default = Symbol;
783
-
784
- // ../../node_modules/lodash-es/_getRawTag.js
785
- var objectProto = Object.prototype;
786
- var hasOwnProperty = objectProto.hasOwnProperty;
787
- var nativeObjectToString = objectProto.toString;
788
- var symToStringTag = Symbol_default ? Symbol_default.toStringTag : void 0;
789
- function getRawTag(value) {
790
- var isOwn = hasOwnProperty.call(value, symToStringTag), tag = value[symToStringTag];
791
- try {
792
- value[symToStringTag] = void 0;
793
- var unmasked = true;
794
- } catch (e) {
795
- }
796
- var result = nativeObjectToString.call(value);
797
- if (unmasked) {
798
- if (isOwn) {
799
- value[symToStringTag] = tag;
800
- } else {
801
- delete value[symToStringTag];
802
- }
803
- }
804
- return result;
805
- }
806
- var getRawTag_default = getRawTag;
807
-
808
- // ../../node_modules/lodash-es/_objectToString.js
809
- var objectProto2 = Object.prototype;
810
- var nativeObjectToString2 = objectProto2.toString;
811
- function objectToString(value) {
812
- return nativeObjectToString2.call(value);
813
- }
814
- var objectToString_default = objectToString;
815
-
816
- // ../../node_modules/lodash-es/_baseGetTag.js
817
- var nullTag = "[object Null]";
818
- var undefinedTag = "[object Undefined]";
819
- var symToStringTag2 = Symbol_default ? Symbol_default.toStringTag : void 0;
820
- function baseGetTag(value) {
821
- if (value == null) {
822
- return value === void 0 ? undefinedTag : nullTag;
823
- }
824
- return symToStringTag2 && symToStringTag2 in Object(value) ? getRawTag_default(value) : objectToString_default(value);
825
- }
826
- var baseGetTag_default = baseGetTag;
827
-
828
- // ../../node_modules/lodash-es/isObject.js
829
- function isObject(value) {
830
- var type = typeof value;
831
- return value != null && (type == "object" || type == "function");
832
- }
833
- var isObject_default = isObject;
834
-
835
- // ../../node_modules/lodash-es/isFunction.js
836
- var asyncTag = "[object AsyncFunction]";
837
- var funcTag = "[object Function]";
838
- var genTag = "[object GeneratorFunction]";
839
- var proxyTag = "[object Proxy]";
840
- function isFunction(value) {
841
- if (!isObject_default(value)) {
842
- return false;
843
- }
844
- var tag = baseGetTag_default(value);
845
- return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
846
- }
847
- var isFunction_default = isFunction;
771
+ // src/utils/pollUntil.ts
772
+ import { isFunction } from "lodash-es";
848
773
 
849
774
  // src/utils/sleep.ts
850
775
  function sleep(ms) {
@@ -879,7 +804,7 @@ async function pollUntil(asyncFn, getValue, maxPolls = 60, pollIntervalMs = 500,
879
804
  stopPolling = true;
880
805
  }
881
806
  } catch (e) {
882
- if (!ignoreErrors || isFunction_default(ignoreErrors) && !ignoreErrors(e)) {
807
+ if (!ignoreErrors || isFunction(ignoreErrors) && !ignoreErrors(e)) {
883
808
  stopPolling = true;
884
809
  throw e;
885
810
  }
@@ -937,16 +862,3 @@ export {
937
862
  pollUntil,
938
863
  isType
939
864
  };
940
- /*! Bundled license information:
941
-
942
- lodash-es/lodash.js:
943
- (**
944
- * @license
945
- * Lodash (Custom Build) <https://lodash.com/>
946
- * Build: `lodash modularize exports="es" -o ./`
947
- * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
948
- * Released under MIT license <https://lodash.com/license>
949
- * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
950
- * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
951
- *)
952
- */
package/dist/index.cjs CHANGED
@@ -38,6 +38,7 @@ __export(src_exports, {
38
38
  LightsparkException: () => LightsparkException_default,
39
39
  LightsparkSigningException: () => LightsparkSigningException_default,
40
40
  Logger: () => Logger,
41
+ LoggingLevel: () => LoggingLevel,
41
42
  NodeKeyCache: () => NodeKeyCache_default,
42
43
  RSASigningKey: () => RSASigningKey,
43
44
  Requester: () => Requester_default,
@@ -109,6 +110,11 @@ var isNode = typeof process !== "undefined" && process.versions != null && proce
109
110
  var isTest = isNode && process.env.NODE_ENV === "test";
110
111
 
111
112
  // src/Logger.ts
113
+ var LoggingLevel = /* @__PURE__ */ ((LoggingLevel2) => {
114
+ LoggingLevel2[LoggingLevel2["Trace"] = 0] = "Trace";
115
+ LoggingLevel2[LoggingLevel2["Info"] = 1] = "Info";
116
+ return LoggingLevel2;
117
+ })(LoggingLevel || {});
112
118
  var Logger = class {
113
119
  context;
114
120
  loggingEnabled = false;
@@ -1171,83 +1177,8 @@ var deleteLocalStorageItem = (key) => {
1171
1177
  }
1172
1178
  };
1173
1179
 
1174
- // ../../node_modules/lodash-es/_freeGlobal.js
1175
- var freeGlobal = typeof global == "object" && global && global.Object === Object && global;
1176
- var freeGlobal_default = freeGlobal;
1177
-
1178
- // ../../node_modules/lodash-es/_root.js
1179
- var freeSelf = typeof self == "object" && self && self.Object === Object && self;
1180
- var root = freeGlobal_default || freeSelf || Function("return this")();
1181
- var root_default = root;
1182
-
1183
- // ../../node_modules/lodash-es/_Symbol.js
1184
- var Symbol2 = root_default.Symbol;
1185
- var Symbol_default = Symbol2;
1186
-
1187
- // ../../node_modules/lodash-es/_getRawTag.js
1188
- var objectProto = Object.prototype;
1189
- var hasOwnProperty = objectProto.hasOwnProperty;
1190
- var nativeObjectToString = objectProto.toString;
1191
- var symToStringTag = Symbol_default ? Symbol_default.toStringTag : void 0;
1192
- function getRawTag(value) {
1193
- var isOwn = hasOwnProperty.call(value, symToStringTag), tag = value[symToStringTag];
1194
- try {
1195
- value[symToStringTag] = void 0;
1196
- var unmasked = true;
1197
- } catch (e) {
1198
- }
1199
- var result = nativeObjectToString.call(value);
1200
- if (unmasked) {
1201
- if (isOwn) {
1202
- value[symToStringTag] = tag;
1203
- } else {
1204
- delete value[symToStringTag];
1205
- }
1206
- }
1207
- return result;
1208
- }
1209
- var getRawTag_default = getRawTag;
1210
-
1211
- // ../../node_modules/lodash-es/_objectToString.js
1212
- var objectProto2 = Object.prototype;
1213
- var nativeObjectToString2 = objectProto2.toString;
1214
- function objectToString(value) {
1215
- return nativeObjectToString2.call(value);
1216
- }
1217
- var objectToString_default = objectToString;
1218
-
1219
- // ../../node_modules/lodash-es/_baseGetTag.js
1220
- var nullTag = "[object Null]";
1221
- var undefinedTag = "[object Undefined]";
1222
- var symToStringTag2 = Symbol_default ? Symbol_default.toStringTag : void 0;
1223
- function baseGetTag(value) {
1224
- if (value == null) {
1225
- return value === void 0 ? undefinedTag : nullTag;
1226
- }
1227
- return symToStringTag2 && symToStringTag2 in Object(value) ? getRawTag_default(value) : objectToString_default(value);
1228
- }
1229
- var baseGetTag_default = baseGetTag;
1230
-
1231
- // ../../node_modules/lodash-es/isObject.js
1232
- function isObject(value) {
1233
- var type = typeof value;
1234
- return value != null && (type == "object" || type == "function");
1235
- }
1236
- var isObject_default = isObject;
1237
-
1238
- // ../../node_modules/lodash-es/isFunction.js
1239
- var asyncTag = "[object AsyncFunction]";
1240
- var funcTag = "[object Function]";
1241
- var genTag = "[object GeneratorFunction]";
1242
- var proxyTag = "[object Proxy]";
1243
- function isFunction(value) {
1244
- if (!isObject_default(value)) {
1245
- return false;
1246
- }
1247
- var tag = baseGetTag_default(value);
1248
- return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
1249
- }
1250
- var isFunction_default = isFunction;
1180
+ // src/utils/pollUntil.ts
1181
+ var import_lodash_es = require("lodash-es");
1251
1182
 
1252
1183
  // src/utils/sleep.ts
1253
1184
  function sleep(ms) {
@@ -1282,7 +1213,7 @@ async function pollUntil(asyncFn, getValue, maxPolls = 60, pollIntervalMs = 500,
1282
1213
  stopPolling = true;
1283
1214
  }
1284
1215
  } catch (e) {
1285
- if (!ignoreErrors || isFunction_default(ignoreErrors) && !ignoreErrors(e)) {
1216
+ if (!ignoreErrors || (0, import_lodash_es.isFunction)(ignoreErrors) && !ignoreErrors(e)) {
1286
1217
  stopPolling = true;
1287
1218
  throw e;
1288
1219
  }
@@ -1596,6 +1527,7 @@ var Requester_default = Requester;
1596
1527
  LightsparkException,
1597
1528
  LightsparkSigningException,
1598
1529
  Logger,
1530
+ LoggingLevel,
1599
1531
  NodeKeyCache,
1600
1532
  RSASigningKey,
1601
1533
  Requester,
@@ -1645,16 +1577,3 @@ var Requester_default = Requester;
1645
1577
  sleep,
1646
1578
  urlsafe_b64decode
1647
1579
  });
1648
- /*! Bundled license information:
1649
-
1650
- lodash-es/lodash.js:
1651
- (**
1652
- * @license
1653
- * Lodash (Custom Build) <https://lodash.com/>
1654
- * Build: `lodash modularize exports="es" -o ./`
1655
- * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
1656
- * Released under MIT license <https://lodash.com/license>
1657
- * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
1658
- * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
1659
- *)
1660
- */
package/dist/index.d.cts CHANGED
@@ -165,4 +165,4 @@ declare class Requester {
165
165
  private addSigningDataIfNeeded;
166
166
  }
167
167
 
168
- export { AuthProvider, CryptoInterface, DefaultCrypto, GeneratedKeyPair, KeyOrAlias, KeyOrAliasType, LightsparkAuthException, LightsparkException, LightsparkSigningException, Logger, NodeKeyCache, Query, RSASigningKey, Requester, Secp256k1SigningKey, ServerEnvironment, SigningKey, SigningKeyType, StubAuthProvider, apiDomainForEnvironment };
168
+ export { AuthProvider, CryptoInterface, DefaultCrypto, GeneratedKeyPair, KeyOrAlias, KeyOrAliasType, LightsparkAuthException, LightsparkException, LightsparkSigningException, Logger, LoggingLevel, NodeKeyCache, Query, RSASigningKey, Requester, Secp256k1SigningKey, ServerEnvironment, SigningKey, SigningKeyType, StubAuthProvider, apiDomainForEnvironment };
package/dist/index.d.ts CHANGED
@@ -165,4 +165,4 @@ declare class Requester {
165
165
  private addSigningDataIfNeeded;
166
166
  }
167
167
 
168
- export { AuthProvider, CryptoInterface, DefaultCrypto, GeneratedKeyPair, KeyOrAlias, KeyOrAliasType, LightsparkAuthException, LightsparkException, LightsparkSigningException, Logger, NodeKeyCache, Query, RSASigningKey, Requester, Secp256k1SigningKey, ServerEnvironment, SigningKey, SigningKeyType, StubAuthProvider, apiDomainForEnvironment };
168
+ export { AuthProvider, CryptoInterface, DefaultCrypto, GeneratedKeyPair, KeyOrAlias, KeyOrAliasType, LightsparkAuthException, LightsparkException, LightsparkSigningException, Logger, LoggingLevel, NodeKeyCache, Query, RSASigningKey, Requester, Secp256k1SigningKey, ServerEnvironment, SigningKey, SigningKeyType, StubAuthProvider, apiDomainForEnvironment };
package/dist/index.js CHANGED
@@ -40,9 +40,14 @@ import {
40
40
  setLocalStorageBoolean,
41
41
  sleep,
42
42
  urlsafe_b64decode
43
- } from "./chunk-JTLRW26V.js";
43
+ } from "./chunk-XPHRCMJA.js";
44
44
 
45
45
  // src/Logger.ts
46
+ var LoggingLevel = /* @__PURE__ */ ((LoggingLevel2) => {
47
+ LoggingLevel2[LoggingLevel2["Trace"] = 0] = "Trace";
48
+ LoggingLevel2[LoggingLevel2["Info"] = 1] = "Info";
49
+ return LoggingLevel2;
50
+ })(LoggingLevel || {});
46
51
  var Logger = class {
47
52
  context;
48
53
  loggingEnabled = false;
@@ -650,6 +655,7 @@ export {
650
655
  LightsparkException_default as LightsparkException,
651
656
  LightsparkSigningException_default as LightsparkSigningException,
652
657
  Logger,
658
+ LoggingLevel,
653
659
  NodeKeyCache_default as NodeKeyCache,
654
660
  RSASigningKey,
655
661
  Requester_default as Requester,
@@ -843,83 +843,8 @@ var deleteLocalStorageItem = (key) => {
843
843
  }
844
844
  };
845
845
 
846
- // ../../node_modules/lodash-es/_freeGlobal.js
847
- var freeGlobal = typeof global == "object" && global && global.Object === Object && global;
848
- var freeGlobal_default = freeGlobal;
849
-
850
- // ../../node_modules/lodash-es/_root.js
851
- var freeSelf = typeof self == "object" && self && self.Object === Object && self;
852
- var root = freeGlobal_default || freeSelf || Function("return this")();
853
- var root_default = root;
854
-
855
- // ../../node_modules/lodash-es/_Symbol.js
856
- var Symbol2 = root_default.Symbol;
857
- var Symbol_default = Symbol2;
858
-
859
- // ../../node_modules/lodash-es/_getRawTag.js
860
- var objectProto = Object.prototype;
861
- var hasOwnProperty = objectProto.hasOwnProperty;
862
- var nativeObjectToString = objectProto.toString;
863
- var symToStringTag = Symbol_default ? Symbol_default.toStringTag : void 0;
864
- function getRawTag(value) {
865
- var isOwn = hasOwnProperty.call(value, symToStringTag), tag = value[symToStringTag];
866
- try {
867
- value[symToStringTag] = void 0;
868
- var unmasked = true;
869
- } catch (e) {
870
- }
871
- var result = nativeObjectToString.call(value);
872
- if (unmasked) {
873
- if (isOwn) {
874
- value[symToStringTag] = tag;
875
- } else {
876
- delete value[symToStringTag];
877
- }
878
- }
879
- return result;
880
- }
881
- var getRawTag_default = getRawTag;
882
-
883
- // ../../node_modules/lodash-es/_objectToString.js
884
- var objectProto2 = Object.prototype;
885
- var nativeObjectToString2 = objectProto2.toString;
886
- function objectToString(value) {
887
- return nativeObjectToString2.call(value);
888
- }
889
- var objectToString_default = objectToString;
890
-
891
- // ../../node_modules/lodash-es/_baseGetTag.js
892
- var nullTag = "[object Null]";
893
- var undefinedTag = "[object Undefined]";
894
- var symToStringTag2 = Symbol_default ? Symbol_default.toStringTag : void 0;
895
- function baseGetTag(value) {
896
- if (value == null) {
897
- return value === void 0 ? undefinedTag : nullTag;
898
- }
899
- return symToStringTag2 && symToStringTag2 in Object(value) ? getRawTag_default(value) : objectToString_default(value);
900
- }
901
- var baseGetTag_default = baseGetTag;
902
-
903
- // ../../node_modules/lodash-es/isObject.js
904
- function isObject(value) {
905
- var type = typeof value;
906
- return value != null && (type == "object" || type == "function");
907
- }
908
- var isObject_default = isObject;
909
-
910
- // ../../node_modules/lodash-es/isFunction.js
911
- var asyncTag = "[object AsyncFunction]";
912
- var funcTag = "[object Function]";
913
- var genTag = "[object GeneratorFunction]";
914
- var proxyTag = "[object Proxy]";
915
- function isFunction(value) {
916
- if (!isObject_default(value)) {
917
- return false;
918
- }
919
- var tag = baseGetTag_default(value);
920
- return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
921
- }
922
- var isFunction_default = isFunction;
846
+ // src/utils/pollUntil.ts
847
+ var import_lodash_es = require("lodash-es");
923
848
 
924
849
  // src/utils/sleep.ts
925
850
  function sleep(ms) {
@@ -954,7 +879,7 @@ async function pollUntil(asyncFn, getValue, maxPolls = 60, pollIntervalMs = 500,
954
879
  stopPolling = true;
955
880
  }
956
881
  } catch (e) {
957
- if (!ignoreErrors || isFunction_default(ignoreErrors) && !ignoreErrors(e)) {
882
+ if (!ignoreErrors || (0, import_lodash_es.isFunction)(ignoreErrors) && !ignoreErrors(e)) {
958
883
  stopPolling = true;
959
884
  throw e;
960
885
  }
@@ -1011,16 +936,3 @@ var isType = (typename) => (node) => {
1011
936
  sleep,
1012
937
  urlsafe_b64decode
1013
938
  });
1014
- /*! Bundled license information:
1015
-
1016
- lodash-es/lodash.js:
1017
- (**
1018
- * @license
1019
- * Lodash (Custom Build) <https://lodash.com/>
1020
- * Build: `lodash modularize exports="es" -o ./`
1021
- * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
1022
- * Released under MIT license <https://lodash.com/license>
1023
- * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
1024
- * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
1025
- *)
1026
- */
@@ -39,7 +39,7 @@ import {
39
39
  setLocalStorageBoolean,
40
40
  sleep,
41
41
  urlsafe_b64decode
42
- } from "../chunk-JTLRW26V.js";
42
+ } from "../chunk-XPHRCMJA.js";
43
43
  export {
44
44
  CurrencyUnit,
45
45
  abbrCurrencyUnit,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lightsparkdev/core",
3
- "version": "1.0.16",
3
+ "version": "1.0.17",
4
4
  "description": "Lightspark JS SDK",
5
5
  "author": "Lightspark Inc.",
6
6
  "keywords": [
@@ -81,6 +81,7 @@
81
81
  "dayjs": "^1.11.7",
82
82
  "graphql": "^16.6.0",
83
83
  "graphql-ws": "^5.11.3",
84
+ "lodash-es": "^4.17.21",
84
85
  "secp256k1": "^5.0.0",
85
86
  "text-encoding": "^0.7.0",
86
87
  "ws": "^8.12.1",
@@ -91,7 +92,9 @@
91
92
  "@lightsparkdev/tsconfig": "0.0.0",
92
93
  "@types/crypto-js": "^4.1.1",
93
94
  "@types/jest": "^29.5.3",
95
+ "@types/lodash-es": "^4.17.6",
94
96
  "@types/secp256k1": "^4.0.3",
97
+ "@types/text-encoding": "^0.0.36",
95
98
  "@types/ws": "^8.5.4",
96
99
  "eslint": "^8.3.0",
97
100
  "eslint-watch": "^8.0.0",
package/src/index.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  // Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved
2
2
 
3
3
  export { default as LightsparkException } from "./LightsparkException.js";
4
- export { Logger } from "./Logger.js";
4
+ export { Logger, LoggingLevel } from "./Logger.js";
5
5
  export {
6
6
  default as ServerEnvironment,
7
7
  apiDomainForEnvironment,