@launchdarkly/js-sdk-common 0.1.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.
Files changed (227) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/README.md +25 -0
  3. package/dist/AttributeReference.d.ts +35 -0
  4. package/dist/AttributeReference.d.ts.map +1 -0
  5. package/dist/AttributeReference.js +126 -0
  6. package/dist/AttributeReference.js.map +1 -0
  7. package/dist/Context.d.ts +90 -0
  8. package/dist/Context.d.ts.map +1 -0
  9. package/dist/Context.js +385 -0
  10. package/dist/Context.js.map +1 -0
  11. package/dist/ContextFilter.d.ts +11 -0
  12. package/dist/ContextFilter.d.ts.map +1 -0
  13. package/dist/ContextFilter.js +122 -0
  14. package/dist/ContextFilter.js.map +1 -0
  15. package/dist/api/context/LDContext.d.ts +8 -0
  16. package/dist/api/context/LDContext.d.ts.map +1 -0
  17. package/dist/api/context/LDContext.js +3 -0
  18. package/dist/api/context/LDContext.js.map +1 -0
  19. package/dist/api/context/LDContextCommon.d.ts +29 -0
  20. package/dist/api/context/LDContextCommon.d.ts.map +1 -0
  21. package/dist/api/context/LDContextCommon.js +3 -0
  22. package/dist/api/context/LDContextCommon.js.map +1 -0
  23. package/dist/api/context/LDContextMeta.d.ts +52 -0
  24. package/dist/api/context/LDContextMeta.d.ts.map +1 -0
  25. package/dist/api/context/LDContextMeta.js +3 -0
  26. package/dist/api/context/LDContextMeta.js.map +1 -0
  27. package/dist/api/context/LDMultiKindContext.d.ts +46 -0
  28. package/dist/api/context/LDMultiKindContext.d.ts.map +1 -0
  29. package/dist/api/context/LDMultiKindContext.js +3 -0
  30. package/dist/api/context/LDMultiKindContext.js.map +1 -0
  31. package/dist/api/context/LDSingleKindContext.d.ts +24 -0
  32. package/dist/api/context/LDSingleKindContext.d.ts.map +1 -0
  33. package/dist/api/context/LDSingleKindContext.js +3 -0
  34. package/dist/api/context/LDSingleKindContext.js.map +1 -0
  35. package/dist/api/context/LDUser.d.ts +66 -0
  36. package/dist/api/context/LDUser.d.ts.map +1 -0
  37. package/dist/api/context/LDUser.js +3 -0
  38. package/dist/api/context/LDUser.js.map +1 -0
  39. package/dist/api/context/index.d.ts +7 -0
  40. package/dist/api/context/index.d.ts.map +1 -0
  41. package/dist/api/context/index.js +23 -0
  42. package/dist/api/context/index.js.map +1 -0
  43. package/dist/api/data/LDEvaluationDetail.d.ts +27 -0
  44. package/dist/api/data/LDEvaluationDetail.d.ts.map +1 -0
  45. package/dist/api/data/LDEvaluationDetail.js +3 -0
  46. package/dist/api/data/LDEvaluationDetail.js.map +1 -0
  47. package/dist/api/data/LDEvaluationReason.d.ts +57 -0
  48. package/dist/api/data/LDEvaluationReason.d.ts.map +1 -0
  49. package/dist/api/data/LDEvaluationReason.js +3 -0
  50. package/dist/api/data/LDEvaluationReason.js.map +1 -0
  51. package/dist/api/data/LDFlagSet.d.ts +8 -0
  52. package/dist/api/data/LDFlagSet.d.ts.map +1 -0
  53. package/dist/api/data/LDFlagSet.js +3 -0
  54. package/dist/api/data/LDFlagSet.js.map +1 -0
  55. package/dist/api/data/LDFlagValue.d.ts +7 -0
  56. package/dist/api/data/LDFlagValue.d.ts.map +1 -0
  57. package/dist/api/data/LDFlagValue.js +3 -0
  58. package/dist/api/data/LDFlagValue.js.map +1 -0
  59. package/dist/api/data/index.d.ts +5 -0
  60. package/dist/api/data/index.d.ts.map +1 -0
  61. package/dist/api/data/index.js +21 -0
  62. package/dist/api/data/index.js.map +1 -0
  63. package/dist/api/index.d.ts +7 -0
  64. package/dist/api/index.d.ts.map +1 -0
  65. package/dist/api/index.js +24 -0
  66. package/dist/api/index.js.map +1 -0
  67. package/dist/api/logging/BasicLoggerOptions.d.ts +43 -0
  68. package/dist/api/logging/BasicLoggerOptions.d.ts.map +1 -0
  69. package/dist/api/logging/BasicLoggerOptions.js +3 -0
  70. package/dist/api/logging/BasicLoggerOptions.js.map +1 -0
  71. package/dist/api/logging/LDLogLevel.d.ts +10 -0
  72. package/dist/api/logging/LDLogLevel.d.ts.map +1 -0
  73. package/dist/api/logging/LDLogLevel.js +3 -0
  74. package/dist/api/logging/LDLogLevel.js.map +1 -0
  75. package/dist/api/logging/LDLogger.d.ts +47 -0
  76. package/dist/api/logging/LDLogger.d.ts.map +1 -0
  77. package/dist/api/logging/LDLogger.js +3 -0
  78. package/dist/api/logging/LDLogger.js.map +1 -0
  79. package/dist/api/logging/index.d.ts +4 -0
  80. package/dist/api/logging/index.d.ts.map +1 -0
  81. package/dist/api/logging/index.js +20 -0
  82. package/dist/api/logging/index.js.map +1 -0
  83. package/dist/api/options/LDClientContext.d.ts +43 -0
  84. package/dist/api/options/LDClientContext.d.ts.map +1 -0
  85. package/dist/api/options/LDClientContext.js +3 -0
  86. package/dist/api/options/LDClientContext.js.map +1 -0
  87. package/dist/api/options/index.d.ts +3 -0
  88. package/dist/api/options/index.d.ts.map +1 -0
  89. package/dist/api/options/index.js +3 -0
  90. package/dist/api/options/index.js.map +1 -0
  91. package/dist/api/platform/Crypto.d.ts +31 -0
  92. package/dist/api/platform/Crypto.d.ts.map +1 -0
  93. package/dist/api/platform/Crypto.js +3 -0
  94. package/dist/api/platform/Crypto.js.map +1 -0
  95. package/dist/api/platform/EventSource.d.ts +25 -0
  96. package/dist/api/platform/EventSource.d.ts.map +1 -0
  97. package/dist/api/platform/EventSource.js +3 -0
  98. package/dist/api/platform/EventSource.js.map +1 -0
  99. package/dist/api/platform/Filesystem.d.ts +40 -0
  100. package/dist/api/platform/Filesystem.d.ts.map +1 -0
  101. package/dist/api/platform/Filesystem.js +3 -0
  102. package/dist/api/platform/Filesystem.js.map +1 -0
  103. package/dist/api/platform/Info.d.ts +64 -0
  104. package/dist/api/platform/Info.d.ts.map +1 -0
  105. package/dist/api/platform/Info.js +3 -0
  106. package/dist/api/platform/Info.js.map +1 -0
  107. package/dist/api/platform/Platform.d.ts +25 -0
  108. package/dist/api/platform/Platform.d.ts.map +1 -0
  109. package/dist/api/platform/Platform.js +3 -0
  110. package/dist/api/platform/Platform.js.map +1 -0
  111. package/dist/api/platform/Requests.d.ts +75 -0
  112. package/dist/api/platform/Requests.d.ts.map +1 -0
  113. package/dist/api/platform/Requests.js +6 -0
  114. package/dist/api/platform/Requests.js.map +1 -0
  115. package/dist/api/platform/index.d.ts +7 -0
  116. package/dist/api/platform/index.d.ts.map +1 -0
  117. package/dist/api/platform/index.js +23 -0
  118. package/dist/api/platform/index.js.map +1 -0
  119. package/dist/api/subsystem/LDContextDeduplicator.d.ts +24 -0
  120. package/dist/api/subsystem/LDContextDeduplicator.d.ts.map +1 -0
  121. package/dist/api/subsystem/LDContextDeduplicator.js +3 -0
  122. package/dist/api/subsystem/LDContextDeduplicator.js.map +1 -0
  123. package/dist/api/subsystem/LDEventProcessor.d.ts +7 -0
  124. package/dist/api/subsystem/LDEventProcessor.d.ts.map +1 -0
  125. package/dist/api/subsystem/LDEventProcessor.js +3 -0
  126. package/dist/api/subsystem/LDEventProcessor.js.map +1 -0
  127. package/dist/api/subsystem/LDEventSender.d.ts +18 -0
  128. package/dist/api/subsystem/LDEventSender.d.ts.map +1 -0
  129. package/dist/api/subsystem/LDEventSender.js +15 -0
  130. package/dist/api/subsystem/LDEventSender.js.map +1 -0
  131. package/dist/api/subsystem/index.d.ts +5 -0
  132. package/dist/api/subsystem/index.d.ts.map +1 -0
  133. package/dist/api/subsystem/index.js +7 -0
  134. package/dist/api/subsystem/index.js.map +1 -0
  135. package/dist/index.d.ts +10 -0
  136. package/dist/index.d.ts.map +1 -0
  137. package/dist/index.js +29 -0
  138. package/dist/index.js.map +1 -0
  139. package/dist/internal/events/EventProcessor.d.ts +51 -0
  140. package/dist/internal/events/EventProcessor.d.ts.map +1 -0
  141. package/dist/internal/events/EventProcessor.js +214 -0
  142. package/dist/internal/events/EventProcessor.js.map +1 -0
  143. package/dist/internal/events/EventSummarizer.d.ts +2 -0
  144. package/dist/internal/events/EventSummarizer.d.ts.map +1 -0
  145. package/dist/internal/events/EventSummarizer.js +84 -0
  146. package/dist/internal/events/EventSummarizer.js.map +1 -0
  147. package/dist/internal/events/InputCustomEvent.d.ts +11 -0
  148. package/dist/internal/events/InputCustomEvent.d.ts.map +1 -0
  149. package/dist/internal/events/InputCustomEvent.js +14 -0
  150. package/dist/internal/events/InputCustomEvent.js.map +1 -0
  151. package/dist/internal/events/InputEvalEvent.d.ts +19 -0
  152. package/dist/internal/events/InputEvalEvent.d.ts.map +1 -0
  153. package/dist/internal/events/InputEvalEvent.js +35 -0
  154. package/dist/internal/events/InputEvalEvent.js.map +1 -0
  155. package/dist/internal/events/InputEvent.d.ts +6 -0
  156. package/dist/internal/events/InputEvent.d.ts.map +1 -0
  157. package/dist/internal/events/InputEvent.js +3 -0
  158. package/dist/internal/events/InputEvent.js.map +1 -0
  159. package/dist/internal/events/InputEventBase.d.ts +8 -0
  160. package/dist/internal/events/InputEventBase.d.ts.map +1 -0
  161. package/dist/internal/events/InputEventBase.js +11 -0
  162. package/dist/internal/events/InputEventBase.js.map +1 -0
  163. package/dist/internal/events/InputIdentifyEvent.d.ts +8 -0
  164. package/dist/internal/events/InputIdentifyEvent.d.ts.map +1 -0
  165. package/dist/internal/events/InputIdentifyEvent.js +11 -0
  166. package/dist/internal/events/InputIdentifyEvent.js.map +1 -0
  167. package/dist/internal/events/LDInvalidSDKKeyError.d.ts +4 -0
  168. package/dist/internal/events/LDInvalidSDKKeyError.d.ts.map +1 -0
  169. package/dist/internal/events/LDInvalidSDKKeyError.js +10 -0
  170. package/dist/internal/events/LDInvalidSDKKeyError.js.map +1 -0
  171. package/dist/internal/events/SummaryCounter.d.ts +2 -0
  172. package/dist/internal/events/SummaryCounter.d.ts.map +1 -0
  173. package/dist/internal/events/SummaryCounter.js +20 -0
  174. package/dist/internal/events/SummaryCounter.js.map +1 -0
  175. package/dist/internal/events/guards.d.ts +7 -0
  176. package/dist/internal/events/guards.d.ts.map +1 -0
  177. package/dist/internal/events/guards.js +16 -0
  178. package/dist/internal/events/guards.js.map +1 -0
  179. package/dist/internal/events/index.d.ts +7 -0
  180. package/dist/internal/events/index.d.ts.map +1 -0
  181. package/dist/internal/events/index.js +12 -0
  182. package/dist/internal/events/index.js.map +1 -0
  183. package/dist/internal/index.d.ts +2 -0
  184. package/dist/internal/index.d.ts.map +1 -0
  185. package/dist/internal/index.js +18 -0
  186. package/dist/internal/index.js.map +1 -0
  187. package/dist/logging/BasicLogger.d.ts +27 -0
  188. package/dist/logging/BasicLogger.d.ts.map +1 -0
  189. package/dist/logging/BasicLogger.js +89 -0
  190. package/dist/logging/BasicLogger.js.map +1 -0
  191. package/dist/logging/SafeLogger.d.ts +28 -0
  192. package/dist/logging/SafeLogger.d.ts.map +1 -0
  193. package/dist/logging/SafeLogger.js +63 -0
  194. package/dist/logging/SafeLogger.js.map +1 -0
  195. package/dist/logging/format.d.ts +2 -0
  196. package/dist/logging/format.d.ts.map +1 -0
  197. package/dist/logging/format.js +156 -0
  198. package/dist/logging/format.js.map +1 -0
  199. package/dist/logging/index.d.ts +4 -0
  200. package/dist/logging/index.d.ts.map +1 -0
  201. package/dist/logging/index.js +8 -0
  202. package/dist/logging/index.js.map +1 -0
  203. package/dist/options/ApplicationTags.d.ts +15 -0
  204. package/dist/options/ApplicationTags.d.ts.map +1 -0
  205. package/dist/options/ApplicationTags.js +57 -0
  206. package/dist/options/ApplicationTags.js.map +1 -0
  207. package/dist/options/ClientContext.d.ts +36 -0
  208. package/dist/options/ClientContext.d.ts.map +1 -0
  209. package/dist/options/ClientContext.js +19 -0
  210. package/dist/options/ClientContext.js.map +1 -0
  211. package/dist/options/OptionMessages.d.ts +14 -0
  212. package/dist/options/OptionMessages.d.ts.map +1 -0
  213. package/dist/options/OptionMessages.js +33 -0
  214. package/dist/options/OptionMessages.js.map +1 -0
  215. package/dist/options/ServiceEndpoints.d.ts +10 -0
  216. package/dist/options/ServiceEndpoints.d.ts.map +1 -0
  217. package/dist/options/ServiceEndpoints.js +17 -0
  218. package/dist/options/ServiceEndpoints.js.map +1 -0
  219. package/dist/options/index.d.ts +6 -0
  220. package/dist/options/index.d.ts.map +1 -0
  221. package/dist/options/index.js +12 -0
  222. package/dist/options/index.js.map +1 -0
  223. package/dist/validators.d.ts +84 -0
  224. package/dist/validators.d.ts.map +1 -0
  225. package/dist/validators.js +149 -0
  226. package/dist/validators.js.map +1 -0
  227. package/package.json +40 -0
@@ -0,0 +1,36 @@
1
+ import { LDLogger, LDClientContext, Platform } from '../api';
2
+ import ServiceEndpoints from './ServiceEndpoints';
3
+ /**
4
+ * Basic configuration applicable to many SDK components for both server and
5
+ * client SDKs.
6
+ */
7
+ interface BasicConfiguration {
8
+ logger?: LDLogger;
9
+ /**
10
+ * True if the SDK was configured to be completely offline.
11
+ */
12
+ offline: boolean;
13
+ /**
14
+ * The configured SDK key.
15
+ */
16
+ sdkKey: string;
17
+ /**
18
+ * Defines the base service URIs used by SDK components.
19
+ */
20
+ serviceEndpoints: ServiceEndpoints;
21
+ }
22
+ /**
23
+ * The client context provides basic configuration and platform support which are required
24
+ * when building SDK components.
25
+ */
26
+ export default class ClientContext implements LDClientContext {
27
+ readonly platform: Platform;
28
+ basicConfiguration: BasicConfiguration;
29
+ constructor(sdkKey: string, configuration: {
30
+ logger?: LDLogger;
31
+ offline: boolean;
32
+ serviceEndpoints: ServiceEndpoints;
33
+ }, platform: Platform);
34
+ }
35
+ export {};
36
+ //# sourceMappingURL=ClientContext.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ClientContext.d.ts","sourceRoot":"","sources":["../../src/options/ClientContext.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAC7D,OAAO,gBAAgB,MAAM,oBAAoB,CAAC;AAElD;;;GAGG;AACH,UAAU,kBAAkB;IAC1B,MAAM,CAAC,EAAE,QAAQ,CAAC;IAElB;;OAEG;IACH,OAAO,EAAE,OAAO,CAAC;IAEjB;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,gBAAgB,EAAE,gBAAgB,CAAC;CACpC;AAED;;;GAGG;AACH,MAAM,CAAC,OAAO,OAAO,aAAc,YAAW,eAAe;aAUzC,QAAQ,EAAE,QAAQ;IATpC,kBAAkB,EAAE,kBAAkB,CAAC;gBAGrC,MAAM,EAAE,MAAM,EACd,aAAa,EAAE;QACb,MAAM,CAAC,EAAE,QAAQ,CAAC;QAClB,OAAO,EAAE,OAAO,CAAC;QACjB,gBAAgB,EAAE,gBAAgB,CAAC;KACpC,EACe,QAAQ,EAAE,QAAQ;CASrC"}
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ /**
4
+ * The client context provides basic configuration and platform support which are required
5
+ * when building SDK components.
6
+ */
7
+ class ClientContext {
8
+ constructor(sdkKey, configuration, platform) {
9
+ this.platform = platform;
10
+ this.basicConfiguration = {
11
+ logger: configuration.logger,
12
+ offline: configuration.offline,
13
+ sdkKey,
14
+ serviceEndpoints: configuration.serviceEndpoints,
15
+ };
16
+ }
17
+ }
18
+ exports.default = ClientContext;
19
+ //# sourceMappingURL=ClientContext.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ClientContext.js","sourceRoot":"","sources":["../../src/options/ClientContext.ts"],"names":[],"mappings":";;AA0BA;;;GAGG;AACH,MAAqB,aAAa;IAGhC,YACE,MAAc,EACd,aAIC,EACe,QAAkB;QAAlB,aAAQ,GAAR,QAAQ,CAAU;QAElC,IAAI,CAAC,kBAAkB,GAAG;YACxB,MAAM,EAAE,aAAa,CAAC,MAAM;YAC5B,OAAO,EAAE,aAAa,CAAC,OAAO;YAC9B,MAAM;YACN,gBAAgB,EAAE,aAAa,CAAC,gBAAgB;SACjD,CAAC;IACJ,CAAC;CACF;AAnBD,gCAmBC"}
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Messages for issues which can be encountered from processing the configuration options.
3
+ */
4
+ export default class OptionMessages {
5
+ static deprecated(oldName: string, newName: string): string;
6
+ static optionBelowMinimum(name: string, value: number, min: number): string;
7
+ static unknownOption(name: string): string;
8
+ static wrongOptionType(name: string, expectedType: string, actualType: string): string;
9
+ static wrongOptionTypeBoolean(name: string, actualType: string): string;
10
+ static invalidTagValue(name: string): string;
11
+ static tagValueTooLong(name: string): string;
12
+ static partialEndpoint(name: string): string;
13
+ }
14
+ //# sourceMappingURL=OptionMessages.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"OptionMessages.d.ts","sourceRoot":"","sources":["../../src/options/OptionMessages.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,CAAC,OAAO,OAAO,cAAc;IACjC,MAAM,CAAC,UAAU,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM;IAI3D,MAAM,CAAC,kBAAkB,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM;IAI3E,MAAM,CAAC,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM;IAI1C,MAAM,CAAC,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,MAAM;IAItF,MAAM,CAAC,sBAAsB,CAAC,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,MAAM;IAIvE,MAAM,CAAC,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM;IAI5C,MAAM,CAAC,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM;IAI5C,MAAM,CAAC,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM;CAG7C"}
@@ -0,0 +1,33 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ /**
4
+ * Messages for issues which can be encountered from processing the configuration options.
5
+ */
6
+ class OptionMessages {
7
+ static deprecated(oldName, newName) {
8
+ return `"${oldName}" is deprecated, please use "${newName}"`;
9
+ }
10
+ static optionBelowMinimum(name, value, min) {
11
+ return `Config option "${name}" had invalid value of ${value}, using minimum of ${min} instead`;
12
+ }
13
+ static unknownOption(name) {
14
+ return `Ignoring unknown config option "${name}"`;
15
+ }
16
+ static wrongOptionType(name, expectedType, actualType) {
17
+ return `Config option "${name}" should be of type ${expectedType}, got ${actualType}, using default value`;
18
+ }
19
+ static wrongOptionTypeBoolean(name, actualType) {
20
+ return `Config option "${name}" should be a boolean, got ${actualType}, converting to boolean`;
21
+ }
22
+ static invalidTagValue(name) {
23
+ return `Config option "${name}" must only contain letters, numbers, ., _ or -.`;
24
+ }
25
+ static tagValueTooLong(name) {
26
+ return `Value of "${name}" was longer than 64 characters and was discarded.`;
27
+ }
28
+ static partialEndpoint(name) {
29
+ return `You have set custom uris without specifying the ${name} URI; connections may not work properly`;
30
+ }
31
+ }
32
+ exports.default = OptionMessages;
33
+ //# sourceMappingURL=OptionMessages.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"OptionMessages.js","sourceRoot":"","sources":["../../src/options/OptionMessages.ts"],"names":[],"mappings":";;AAAA;;GAEG;AACH,MAAqB,cAAc;IACjC,MAAM,CAAC,UAAU,CAAC,OAAe,EAAE,OAAe;QAChD,OAAO,IAAI,OAAO,gCAAgC,OAAO,GAAG,CAAC;IAC/D,CAAC;IAED,MAAM,CAAC,kBAAkB,CAAC,IAAY,EAAE,KAAa,EAAE,GAAW;QAChE,OAAO,kBAAkB,IAAI,0BAA0B,KAAK,sBAAsB,GAAG,UAAU,CAAC;IAClG,CAAC;IAED,MAAM,CAAC,aAAa,CAAC,IAAY;QAC/B,OAAO,mCAAmC,IAAI,GAAG,CAAC;IACpD,CAAC;IAED,MAAM,CAAC,eAAe,CAAC,IAAY,EAAE,YAAoB,EAAE,UAAkB;QAC3E,OAAO,kBAAkB,IAAI,uBAAuB,YAAY,SAAS,UAAU,uBAAuB,CAAC;IAC7G,CAAC;IAED,MAAM,CAAC,sBAAsB,CAAC,IAAY,EAAE,UAAkB;QAC5D,OAAO,kBAAkB,IAAI,8BAA8B,UAAU,yBAAyB,CAAC;IACjG,CAAC;IAED,MAAM,CAAC,eAAe,CAAC,IAAY;QACjC,OAAO,kBAAkB,IAAI,kDAAkD,CAAC;IAClF,CAAC;IAED,MAAM,CAAC,eAAe,CAAC,IAAY;QACjC,OAAO,aAAa,IAAI,oDAAoD,CAAC;IAC/E,CAAC;IAED,MAAM,CAAC,eAAe,CAAC,IAAY;QACjC,OAAO,mDAAmD,IAAI,yCAAyC,CAAC;IAC1G,CAAC;CACF;AAhCD,iCAgCC"}
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Specifies the base service URIs used by SDK components.
3
+ */
4
+ export default class ServiceEndpoints {
5
+ readonly streaming: string;
6
+ readonly polling: string;
7
+ readonly events: string;
8
+ constructor(streaming: string, polling: string, events: string);
9
+ }
10
+ //# sourceMappingURL=ServiceEndpoints.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ServiceEndpoints.d.ts","sourceRoot":"","sources":["../../src/options/ServiceEndpoints.ts"],"names":[],"mappings":"AAIA;;GAEG;AACH,MAAM,CAAC,OAAO,OAAO,gBAAgB;IACnC,SAAgB,SAAS,EAAE,MAAM,CAAC;IAElC,SAAgB,OAAO,EAAE,MAAM,CAAC;IAEhC,SAAgB,MAAM,EAAE,MAAM,CAAC;gBAEZ,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM;CAKtE"}
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ function canonicalizeUri(uri) {
4
+ return uri.replace(/\/+$/, '');
5
+ }
6
+ /**
7
+ * Specifies the base service URIs used by SDK components.
8
+ */
9
+ class ServiceEndpoints {
10
+ constructor(streaming, polling, events) {
11
+ this.streaming = canonicalizeUri(streaming);
12
+ this.polling = canonicalizeUri(polling);
13
+ this.events = canonicalizeUri(events);
14
+ }
15
+ }
16
+ exports.default = ServiceEndpoints;
17
+ //# sourceMappingURL=ServiceEndpoints.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ServiceEndpoints.js","sourceRoot":"","sources":["../../src/options/ServiceEndpoints.ts"],"names":[],"mappings":";;AAAA,SAAS,eAAe,CAAC,GAAW;IAClC,OAAO,GAAG,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;AACjC,CAAC;AAED;;GAEG;AACH,MAAqB,gBAAgB;IAOnC,YAAmB,SAAiB,EAAE,OAAe,EAAE,MAAc;QACnE,IAAI,CAAC,SAAS,GAAG,eAAe,CAAC,SAAS,CAAC,CAAC;QAC5C,IAAI,CAAC,OAAO,GAAG,eAAe,CAAC,OAAO,CAAC,CAAC;QACxC,IAAI,CAAC,MAAM,GAAG,eAAe,CAAC,MAAM,CAAC,CAAC;IACxC,CAAC;CACF;AAZD,mCAYC"}
@@ -0,0 +1,6 @@
1
+ import ApplicationTags from './ApplicationTags';
2
+ import OptionMessages from './OptionMessages';
3
+ import ServiceEndpoints from './ServiceEndpoints';
4
+ import ClientContext from './ClientContext';
5
+ export { ApplicationTags, OptionMessages, ServiceEndpoints, ClientContext };
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/options/index.ts"],"names":[],"mappings":"AAAA,OAAO,eAAe,MAAM,mBAAmB,CAAC;AAChD,OAAO,cAAc,MAAM,kBAAkB,CAAC;AAC9C,OAAO,gBAAgB,MAAM,oBAAoB,CAAC;AAClD,OAAO,aAAa,MAAM,iBAAiB,CAAC;AAE5C,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,gBAAgB,EAAE,aAAa,EAAE,CAAC"}
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ClientContext = exports.ServiceEndpoints = exports.OptionMessages = exports.ApplicationTags = void 0;
4
+ const ApplicationTags_1 = require("./ApplicationTags");
5
+ exports.ApplicationTags = ApplicationTags_1.default;
6
+ const OptionMessages_1 = require("./OptionMessages");
7
+ exports.OptionMessages = OptionMessages_1.default;
8
+ const ServiceEndpoints_1 = require("./ServiceEndpoints");
9
+ exports.ServiceEndpoints = ServiceEndpoints_1.default;
10
+ const ClientContext_1 = require("./ClientContext");
11
+ exports.ClientContext = ClientContext_1.default;
12
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/options/index.ts"],"names":[],"mappings":";;;AAAA,uDAAgD;AAKvC,0BALF,yBAAe,CAKE;AAJxB,qDAA8C;AAIpB,yBAJnB,wBAAc,CAImB;AAHxC,yDAAkD;AAGR,2BAHnC,0BAAgB,CAGmC;AAF1D,mDAA4C;AAEgB,wBAFrD,uBAAa,CAEqD"}
@@ -0,0 +1,84 @@
1
+ /**
2
+ * Interface for type validation.
3
+ */
4
+ export interface TypeValidator {
5
+ is(u: unknown): boolean;
6
+ getType(): string;
7
+ }
8
+ /**
9
+ * Validate a factory or instance.
10
+ */
11
+ export declare class FactoryOrInstance implements TypeValidator {
12
+ is(factoryOrInstance: unknown): boolean;
13
+ getType(): string;
14
+ }
15
+ /**
16
+ * Validate a basic type.
17
+ */
18
+ export declare class Type<T> implements TypeValidator {
19
+ private typeName;
20
+ protected typeOf: string;
21
+ constructor(typeName: string, example: T);
22
+ is(u: unknown): u is T;
23
+ getType(): string;
24
+ }
25
+ /**
26
+ * Validate an array of the specified type.
27
+ *
28
+ * This does not validate instances of types. All class instances
29
+ * of classes will simply objects.
30
+ */
31
+ export declare class TypeArray<T> implements TypeValidator {
32
+ private typeName;
33
+ protected typeOf: string;
34
+ constructor(typeName: string, example: T);
35
+ is(u: unknown): u is T;
36
+ getType(): string;
37
+ }
38
+ /**
39
+ * Validate a value is a number and is greater or eval than a minimum.
40
+ */
41
+ export declare class NumberWithMinimum extends Type<number> {
42
+ readonly min: number;
43
+ constructor(min: number);
44
+ is(u: unknown): u is number;
45
+ }
46
+ /**
47
+ * Validate a value is a string and it matches the given expression.
48
+ */
49
+ export declare class StringMatchingRegex extends Type<string> {
50
+ readonly expression: RegExp;
51
+ constructor(expression: RegExp);
52
+ is(u: unknown): u is string;
53
+ }
54
+ /**
55
+ * Validate a value is a function.
56
+ */
57
+ export declare class Function implements TypeValidator {
58
+ is(u: unknown): u is (...args: any[]) => void;
59
+ getType(): string;
60
+ }
61
+ /**
62
+ * Validate a value is a date. Values which are numbers are treated as dates and any string
63
+ * which if compliant with `time.RFC3339Nano` is a date.
64
+ */
65
+ export declare class DateValidator implements TypeValidator {
66
+ is(u: unknown): boolean;
67
+ getType(): string;
68
+ }
69
+ /**
70
+ * A set of standard type validators.
71
+ */
72
+ export declare class TypeValidators {
73
+ static readonly String: Type<string>;
74
+ static readonly Number: Type<number>;
75
+ static readonly ObjectOrFactory: FactoryOrInstance;
76
+ static readonly Object: Type<object>;
77
+ static readonly StringArray: TypeArray<string>;
78
+ static readonly Boolean: Type<boolean>;
79
+ static readonly Function: Function;
80
+ static numberWithMin(min: number): NumberWithMinimum;
81
+ static stringMatchingRegex(expression: RegExp): StringMatchingRegex;
82
+ static readonly Date: DateValidator;
83
+ }
84
+ //# sourceMappingURL=validators.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validators.d.ts","sourceRoot":"","sources":["../src/validators.ts"],"names":[],"mappings":"AAUA;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,EAAE,CAAC,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC;IACxB,OAAO,IAAI,MAAM,CAAC;CACnB;AAED;;GAEG;AACH,qBAAa,iBAAkB,YAAW,aAAa;IACrD,EAAE,CAAC,iBAAiB,EAAE,OAAO;IAS7B,OAAO,IAAI,MAAM;CAGlB;AAED;;GAEG;AACH,qBAAa,IAAI,CAAC,CAAC,CAAE,YAAW,aAAa;IAC3C,OAAO,CAAC,QAAQ,CAAS;IAEzB,SAAS,CAAC,MAAM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MAAM,CAAC,QAAQ,CAAC,MAAM,eAAiC;IAEvD,MAAM,CAAC,QAAQ,CAAC,eAAe,oBAA2B;IAE1D,MAAM,CAAC,QAAQ,CAAC,MAAM,eAAkC;IAExD,MAAM,CAAC,QAAQ,CAAC,WAAW,oBAAyC;IAEpE,MAAM,CAAC,QAAQ,CAAC,OAAO,gBAAsC;IAE7D,MAAM,CAAC,QAAQ,CAAC,QAAQ,WAAkB;IAE1C,MAAM,CAAC,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,iBAAiB;IAIpD,MAAM,CAAC,mBAAmB,CAAC,UAAU,EAAE,MAAM,GAAG,mBAAmB;IAInE,MAAM,CAAC,QAAQ,CAAC,IAAI,gBAAuB;CAC5C"}
@@ -0,0 +1,149 @@
1
+ "use strict";
2
+ /* eslint-disable class-methods-use-this */
3
+ /* eslint-disable max-classes-per-file */
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ exports.TypeValidators = exports.DateValidator = exports.Function = exports.StringMatchingRegex = exports.NumberWithMinimum = exports.TypeArray = exports.Type = exports.FactoryOrInstance = void 0;
6
+ /**
7
+ * Validate a factory or instance.
8
+ */
9
+ class FactoryOrInstance {
10
+ is(factoryOrInstance) {
11
+ if (Array.isArray(factoryOrInstance)) {
12
+ return false;
13
+ }
14
+ const anyFactory = factoryOrInstance;
15
+ const typeOfFactory = typeof anyFactory;
16
+ return typeOfFactory === 'function' || typeOfFactory === 'object';
17
+ }
18
+ getType() {
19
+ return 'factory method or object';
20
+ }
21
+ }
22
+ exports.FactoryOrInstance = FactoryOrInstance;
23
+ /**
24
+ * Validate a basic type.
25
+ */
26
+ class Type {
27
+ constructor(typeName, example) {
28
+ this.typeName = typeName;
29
+ this.typeOf = typeof example;
30
+ }
31
+ is(u) {
32
+ if (Array.isArray(u)) {
33
+ return false;
34
+ }
35
+ return typeof u === this.typeOf;
36
+ }
37
+ getType() {
38
+ return this.typeName;
39
+ }
40
+ }
41
+ exports.Type = Type;
42
+ /**
43
+ * Validate an array of the specified type.
44
+ *
45
+ * This does not validate instances of types. All class instances
46
+ * of classes will simply objects.
47
+ */
48
+ class TypeArray {
49
+ constructor(typeName, example) {
50
+ this.typeName = typeName;
51
+ this.typeOf = typeof example;
52
+ }
53
+ is(u) {
54
+ if (Array.isArray(u)) {
55
+ if (u.length > 0) {
56
+ return u.every((val) => typeof val === this.typeOf);
57
+ }
58
+ return true;
59
+ }
60
+ return false;
61
+ }
62
+ getType() {
63
+ return this.typeName;
64
+ }
65
+ }
66
+ exports.TypeArray = TypeArray;
67
+ /**
68
+ * Validate a value is a number and is greater or eval than a minimum.
69
+ */
70
+ class NumberWithMinimum extends Type {
71
+ constructor(min) {
72
+ super(`number with minimum value of ${min}`, 0);
73
+ this.min = min;
74
+ }
75
+ is(u) {
76
+ return typeof u === this.typeOf && u >= this.min;
77
+ }
78
+ }
79
+ exports.NumberWithMinimum = NumberWithMinimum;
80
+ /**
81
+ * Validate a value is a string and it matches the given expression.
82
+ */
83
+ class StringMatchingRegex extends Type {
84
+ constructor(expression) {
85
+ super(`string matching ${expression}`, '');
86
+ this.expression = expression;
87
+ }
88
+ is(u) {
89
+ return !!u.match(this.expression);
90
+ }
91
+ }
92
+ exports.StringMatchingRegex = StringMatchingRegex;
93
+ /**
94
+ * Validate a value is a function.
95
+ */
96
+ class Function {
97
+ is(u) {
98
+ // We cannot inspect the parameters and there isn't really
99
+ // a generic function type we can instantiate.
100
+ // So the type guard is here just to make TS comfortable
101
+ // calling something after using this guard.
102
+ return typeof u === 'function';
103
+ }
104
+ getType() {
105
+ return 'function';
106
+ }
107
+ }
108
+ exports.Function = Function;
109
+ // Our reference SDK, Go, parses date/time strings with the time.RFC3339Nano format.
110
+ // This regex should match strings that are valid in that format, and no others.
111
+ // Acceptable:
112
+ // 2019-10-31T23:59:59Z, 2019-10-31T23:59:59.100Z,
113
+ // 2019-10-31T23:59:59-07, 2019-10-31T23:59:59-07:00, etc.
114
+ // Unacceptable: no "T", no time zone designation
115
+ const DATE_REGEX = /^\d\d\d\d-\d\d-\d\dT\d\d:\d\d:\d\d(\.\d\d*)?(Z|[-+]\d\d(:\d\d)?)/;
116
+ /**
117
+ * Validate a value is a date. Values which are numbers are treated as dates and any string
118
+ * which if compliant with `time.RFC3339Nano` is a date.
119
+ */
120
+ class DateValidator {
121
+ is(u) {
122
+ return typeof u === 'number' || (typeof u === 'string' && DATE_REGEX.test(u));
123
+ }
124
+ getType() {
125
+ return 'date';
126
+ }
127
+ }
128
+ exports.DateValidator = DateValidator;
129
+ /**
130
+ * A set of standard type validators.
131
+ */
132
+ class TypeValidators {
133
+ static numberWithMin(min) {
134
+ return new NumberWithMinimum(min);
135
+ }
136
+ static stringMatchingRegex(expression) {
137
+ return new StringMatchingRegex(expression);
138
+ }
139
+ }
140
+ exports.TypeValidators = TypeValidators;
141
+ TypeValidators.String = new Type('string', '');
142
+ TypeValidators.Number = new Type('number', 0);
143
+ TypeValidators.ObjectOrFactory = new FactoryOrInstance();
144
+ TypeValidators.Object = new Type('object', {});
145
+ TypeValidators.StringArray = new TypeArray('string[]', '');
146
+ TypeValidators.Boolean = new Type('boolean', true);
147
+ TypeValidators.Function = new Function();
148
+ TypeValidators.Date = new DateValidator();
149
+ //# sourceMappingURL=validators.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validators.js","sourceRoot":"","sources":["../src/validators.ts"],"names":[],"mappings":";AAAA,2CAA2C;AAC3C,yCAAyC;;;AAiBzC;;GAEG;AACH,MAAa,iBAAiB;IAC5B,EAAE,CAAC,iBAA0B;QAC3B,IAAI,KAAK,CAAC,OAAO,CAAC,iBAAiB,CAAC,EAAE;YACpC,OAAO,KAAK,CAAC;SACd;QACD,MAAM,UAAU,GAAG,iBAAwB,CAAC;QAC5C,MAAM,aAAa,GAAG,OAAO,UAAU,CAAC;QACxC,OAAO,aAAa,KAAK,UAAU,IAAI,aAAa,KAAK,QAAQ,CAAC;IACpE,CAAC;IAED,OAAO;QACL,OAAO,0BAA0B,CAAC;IACpC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AC,CAAC;IAC7C,CAAC;;AArBH,wCAwBC;AAvBiB,qBAAM,GAAG,IAAI,IAAI,CAAS,QAAQ,EAAE,EAAE,CAAC,CAAC;AAExC,qBAAM,GAAG,IAAI,IAAI,CAAS,QAAQ,EAAE,CAAC,CAAC,CAAC;AAEvC,8BAAe,GAAG,IAAI,iBAAiB,EAAE,CAAC;AAE1C,qBAAM,GAAG,IAAI,IAAI,CAAS,QAAQ,EAAE,EAAE,CAAC,CAAC;AAExC,0BAAW,GAAG,IAAI,SAAS,CAAS,UAAU,EAAE,EAAE,CAAC,CAAC;AAEpD,sBAAO,GAAG,IAAI,IAAI,CAAU,SAAS,EAAE,IAAI,CAAC,CAAC;AAE7C,uBAAQ,GAAG,IAAI,QAAQ,EAAE,CAAC;AAU1B,mBAAI,GAAG,IAAI,aAAa,EAAE,CAAC"}
package/package.json ADDED
@@ -0,0 +1,40 @@
1
+ {
2
+ "name": "@launchdarkly/js-sdk-common",
3
+ "version": "0.1.0",
4
+ "type": "commonjs",
5
+ "main": "./dist/index.js",
6
+ "types": "./dist/index.d.ts",
7
+ "description": "LaunchDarkly SDK for JavaScript - common code",
8
+ "files": [
9
+ "/dist"
10
+ ],
11
+ "keywords": [
12
+ "launchdarkly",
13
+ "analytics",
14
+ "client"
15
+ ],
16
+ "scripts": {
17
+ "test": "npx jest --ci",
18
+ "build": "npx tsc",
19
+ "lint": "npx eslint . --ext .ts",
20
+ "lint:fix": "yarn run lint -- --fix"
21
+ },
22
+ "license": "Apache-2.0",
23
+ "devDependencies": {
24
+ "@types/jest": "^29.4.0",
25
+ "@typescript-eslint/eslint-plugin": "^5.22.0",
26
+ "@typescript-eslint/parser": "^5.22.0",
27
+ "eslint": "^8.14.0",
28
+ "eslint-config-airbnb-base": "^15.0.0",
29
+ "eslint-config-airbnb-typescript": "^17.0.0",
30
+ "eslint-config-prettier": "^8.7.0",
31
+ "eslint-plugin-import": "^2.26.0",
32
+ "eslint-plugin-prettier": "^4.2.1",
33
+ "jest": "^29.5.0",
34
+ "launchdarkly-js-test-helpers": "^2.2.0",
35
+ "prettier": "^2.8.4",
36
+ "ts-jest": "^29.0.5",
37
+ "typedoc": "0.23.26",
38
+ "typescript": "^4.6.3"
39
+ }
40
+ }