@nosnibor89/svelte-client-sdk 0.1.26 → 0.1.28
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.
@@ -42,6 +42,7 @@ function toFlagsProxy(client, flags) {
|
|
42
42
|
* @returns {Object} The LaunchDarkly instance object.
|
43
43
|
*/
|
44
44
|
function createLD() {
|
45
|
+
console.log('instantiating client');
|
45
46
|
let coreLdClient;
|
46
47
|
const loading = writable(true);
|
47
48
|
const flagsWritable = writable({});
|
@@ -80,12 +81,16 @@ function createLD() {
|
|
80
81
|
* @param {LDContext} context - The user context.
|
81
82
|
* @returns {Promise} A promise that resolves when the user is identified.
|
82
83
|
*/
|
84
|
+
// async function identify(context: LDContext): Promise<LDFlagSet> {
|
85
|
+
// isClientInitialized(coreLdClient);
|
86
|
+
// const allFlags = await coreLdClient.identify(context);
|
87
|
+
// // const allFlags = toFlagsProxy(coreLdClient!, rawFlags);
|
88
|
+
// flagsWritable.set(allFlags);
|
89
|
+
// return allFlags;
|
90
|
+
// }
|
83
91
|
async function identify(context) {
|
84
92
|
isClientInitialized(coreLdClient);
|
85
|
-
|
86
|
-
// const allFlags = toFlagsProxy(coreLdClient!, rawFlags);
|
87
|
-
flagsWritable.set(allFlags);
|
88
|
-
return allFlags;
|
93
|
+
return coreLdClient.identify(context);
|
89
94
|
}
|
90
95
|
/**
|
91
96
|
* Watches a flag for changes.
|
package/package.json
CHANGED