@launchdarkly/cloudflare-server-sdk 2.1.3 → 2.2.0-alpha
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/cjs/package.json +1 -1
- package/dist/cjs/src/index.d.ts +4 -4
- package/dist/cjs/src/index.d.ts.map +1 -1
- package/dist/cjs/src/index.js +5 -5
- package/dist/cjs/src/index.js.map +1 -1
- package/dist/esm/package.json +1 -1
- package/dist/esm/src/index.d.ts +4 -4
- package/dist/esm/src/index.d.ts.map +1 -1
- package/dist/esm/src/index.js +5 -5
- package/dist/esm/src/index.js.map +1 -1
- package/package.json +3 -4
package/dist/cjs/package.json
CHANGED
package/dist/cjs/src/index.d.ts
CHANGED
|
@@ -23,15 +23,15 @@ export type { LDClient };
|
|
|
23
23
|
* (`new LDClient()/new LDClientImpl()/new LDClient()`); the SDK does not currently support
|
|
24
24
|
* this.
|
|
25
25
|
*
|
|
26
|
+
* @param clientSideID
|
|
27
|
+
* The client side ID. This is only used to query the kvNamespace above,
|
|
28
|
+
* not to connect with LaunchDarkly servers.
|
|
26
29
|
* @param kvNamespace
|
|
27
30
|
* The Cloudflare KV configured for LaunchDarkly.
|
|
28
|
-
* @param sdkKey
|
|
29
|
-
* The client side SDK key. This is only used to query the kvNamespace above,
|
|
30
|
-
* not to connect with LaunchDarkly servers.
|
|
31
31
|
* @param options
|
|
32
32
|
* Optional configuration settings. The only supported option is logger.
|
|
33
33
|
* @return
|
|
34
34
|
* The new {@link LDClient} instance.
|
|
35
35
|
*/
|
|
36
|
-
export declare const init: (
|
|
36
|
+
export declare const init: (clientSideID: string, kvNamespace: KVNamespace, options?: LDOptions) => LDClient;
|
|
37
37
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAE7D,OAAO,EAIL,QAAQ,EACR,SAAS,EACV,MAAM,yCAAyC,CAAC;AAIjD,cAAc,yCAAyC,CAAC;AAExD,YAAY,EAAE,QAAQ,EAAE,CAAC;AAEzB;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,IAAI,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAE7D,OAAO,EAIL,QAAQ,EACR,SAAS,EACV,MAAM,yCAAyC,CAAC;AAIjD,cAAc,yCAAyC,CAAC;AAExD,YAAY,EAAE,QAAQ,EAAE,CAAC;AAEzB;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,IAAI,iBAAkB,MAAM,eAAe,WAAW,YAAW,SAAS,aAOtF,CAAC"}
|
package/dist/cjs/src/index.js
CHANGED
|
@@ -29,20 +29,20 @@ __exportStar(require("@launchdarkly/js-server-sdk-common-edge"), exports);
|
|
|
29
29
|
* (`new LDClient()/new LDClientImpl()/new LDClient()`); the SDK does not currently support
|
|
30
30
|
* this.
|
|
31
31
|
*
|
|
32
|
+
* @param clientSideID
|
|
33
|
+
* The client side ID. This is only used to query the kvNamespace above,
|
|
34
|
+
* not to connect with LaunchDarkly servers.
|
|
32
35
|
* @param kvNamespace
|
|
33
36
|
* The Cloudflare KV configured for LaunchDarkly.
|
|
34
|
-
* @param sdkKey
|
|
35
|
-
* The client side SDK key. This is only used to query the kvNamespace above,
|
|
36
|
-
* not to connect with LaunchDarkly servers.
|
|
37
37
|
* @param options
|
|
38
38
|
* Optional configuration settings. The only supported option is logger.
|
|
39
39
|
* @return
|
|
40
40
|
* The new {@link LDClient} instance.
|
|
41
41
|
*/
|
|
42
|
-
const init = (
|
|
42
|
+
const init = (clientSideID, kvNamespace, options = {}) => {
|
|
43
43
|
var _a;
|
|
44
44
|
const logger = (_a = options.logger) !== null && _a !== void 0 ? _a : js_server_sdk_common_edge_1.BasicLogger.get();
|
|
45
|
-
return (0, js_server_sdk_common_edge_1.init)(
|
|
45
|
+
return (0, js_server_sdk_common_edge_1.init)(clientSideID, (0, createPlatformInfo_1.default)(), Object.assign({ featureStore: new js_server_sdk_common_edge_1.EdgeFeatureStore(kvNamespace, clientSideID, 'Cloudflare', logger), logger }, options));
|
|
46
46
|
};
|
|
47
47
|
exports.init = init;
|
|
48
48
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAYA,uFAMiD;AAEjD,6DAAsD;AAEtD,0EAAwD;AAIxD;;;;;;;;;;;;;;;;;;;;GAoBG;AACI,MAAM,IAAI,GAAG,CAAC,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAYA,uFAMiD;AAEjD,6DAAsD;AAEtD,0EAAwD;AAIxD;;;;;;;;;;;;;;;;;;;;GAoBG;AACI,MAAM,IAAI,GAAG,CAAC,YAAoB,EAAE,WAAwB,EAAE,UAAqB,EAAE,EAAE,EAAE;;IAC9F,MAAM,MAAM,GAAG,MAAA,OAAO,CAAC,MAAM,mCAAI,uCAAW,CAAC,GAAG,EAAE,CAAC;IACnD,OAAO,IAAA,gCAAQ,EAAC,YAAY,EAAE,IAAA,4BAAkB,GAAE,kBAChD,YAAY,EAAE,IAAI,4CAAgB,CAAC,WAAW,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,CAAC,EACnF,MAAM,IACH,OAAO,EACV,CAAC;AACL,CAAC,CAAC;AAPW,QAAA,IAAI,QAOf"}
|
package/dist/esm/package.json
CHANGED
package/dist/esm/src/index.d.ts
CHANGED
|
@@ -23,15 +23,15 @@ export type { LDClient };
|
|
|
23
23
|
* (`new LDClient()/new LDClientImpl()/new LDClient()`); the SDK does not currently support
|
|
24
24
|
* this.
|
|
25
25
|
*
|
|
26
|
+
* @param clientSideID
|
|
27
|
+
* The client side ID. This is only used to query the kvNamespace above,
|
|
28
|
+
* not to connect with LaunchDarkly servers.
|
|
26
29
|
* @param kvNamespace
|
|
27
30
|
* The Cloudflare KV configured for LaunchDarkly.
|
|
28
|
-
* @param sdkKey
|
|
29
|
-
* The client side SDK key. This is only used to query the kvNamespace above,
|
|
30
|
-
* not to connect with LaunchDarkly servers.
|
|
31
31
|
* @param options
|
|
32
32
|
* Optional configuration settings. The only supported option is logger.
|
|
33
33
|
* @return
|
|
34
34
|
* The new {@link LDClient} instance.
|
|
35
35
|
*/
|
|
36
|
-
export declare const init: (
|
|
36
|
+
export declare const init: (clientSideID: string, kvNamespace: KVNamespace, options?: LDOptions) => LDClient;
|
|
37
37
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAE7D,OAAO,EAIL,QAAQ,EACR,SAAS,EACV,MAAM,yCAAyC,CAAC;AAIjD,cAAc,yCAAyC,CAAC;AAExD,YAAY,EAAE,QAAQ,EAAE,CAAC;AAEzB;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,IAAI,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAE7D,OAAO,EAIL,QAAQ,EACR,SAAS,EACV,MAAM,yCAAyC,CAAC;AAIjD,cAAc,yCAAyC,CAAC;AAExD,YAAY,EAAE,QAAQ,EAAE,CAAC;AAEzB;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,IAAI,iBAAkB,MAAM,eAAe,WAAW,YAAW,SAAS,aAOtF,CAAC"}
|
package/dist/esm/src/index.js
CHANGED
|
@@ -12,19 +12,19 @@ export * from '@launchdarkly/js-server-sdk-common-edge';
|
|
|
12
12
|
* (`new LDClient()/new LDClientImpl()/new LDClient()`); the SDK does not currently support
|
|
13
13
|
* this.
|
|
14
14
|
*
|
|
15
|
+
* @param clientSideID
|
|
16
|
+
* The client side ID. This is only used to query the kvNamespace above,
|
|
17
|
+
* not to connect with LaunchDarkly servers.
|
|
15
18
|
* @param kvNamespace
|
|
16
19
|
* The Cloudflare KV configured for LaunchDarkly.
|
|
17
|
-
* @param sdkKey
|
|
18
|
-
* The client side SDK key. This is only used to query the kvNamespace above,
|
|
19
|
-
* not to connect with LaunchDarkly servers.
|
|
20
20
|
* @param options
|
|
21
21
|
* Optional configuration settings. The only supported option is logger.
|
|
22
22
|
* @return
|
|
23
23
|
* The new {@link LDClient} instance.
|
|
24
24
|
*/
|
|
25
|
-
export const init = (
|
|
25
|
+
export const init = (clientSideID, kvNamespace, options = {}) => {
|
|
26
26
|
var _a;
|
|
27
27
|
const logger = (_a = options.logger) !== null && _a !== void 0 ? _a : BasicLogger.get();
|
|
28
|
-
return initEdge(
|
|
28
|
+
return initEdge(clientSideID, createPlatformInfo(), Object.assign({ featureStore: new EdgeFeatureStore(kvNamespace, clientSideID, 'Cloudflare', logger), logger }, options));
|
|
29
29
|
};
|
|
30
30
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAYA,OAAO,EACL,WAAW,EACX,gBAAgB,EAChB,IAAI,IAAI,QAAQ,GAGjB,MAAM,yCAAyC,CAAC;AAEjD,OAAO,kBAAkB,MAAM,sBAAsB,CAAC;AAEtD,cAAc,yCAAyC,CAAC;AAIxD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,CAAC,MAAM,IAAI,GAAG,CAAC,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAYA,OAAO,EACL,WAAW,EACX,gBAAgB,EAChB,IAAI,IAAI,QAAQ,GAGjB,MAAM,yCAAyC,CAAC;AAEjD,OAAO,kBAAkB,MAAM,sBAAsB,CAAC;AAEtD,cAAc,yCAAyC,CAAC;AAIxD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,CAAC,MAAM,IAAI,GAAG,CAAC,YAAoB,EAAE,WAAwB,EAAE,UAAqB,EAAE,EAAE,EAAE;;IAC9F,MAAM,MAAM,GAAG,MAAA,OAAO,CAAC,MAAM,mCAAI,WAAW,CAAC,GAAG,EAAE,CAAC;IACnD,OAAO,QAAQ,CAAC,YAAY,EAAE,kBAAkB,EAAE,kBAChD,YAAY,EAAE,IAAI,gBAAgB,CAAC,WAAW,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,CAAC,EACnF,MAAM,IACH,OAAO,EACV,CAAC;AACL,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@launchdarkly/cloudflare-server-sdk",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.2.0-alpha",
|
|
4
4
|
"description": "Cloudflare LaunchDarkly SDK",
|
|
5
5
|
"homepage": "https://github.com/launchdarkly/js-core/tree/main/packages/sdk/cloudflare",
|
|
6
6
|
"repository": {
|
|
@@ -26,7 +26,6 @@
|
|
|
26
26
|
"dist"
|
|
27
27
|
],
|
|
28
28
|
"scripts": {
|
|
29
|
-
"doc": "../../../scripts/build-doc.sh .",
|
|
30
29
|
"build": "../../../scripts/build-package.sh",
|
|
31
30
|
"clean": "rimraf dist",
|
|
32
31
|
"tsw": "yarn tsc --watch",
|
|
@@ -39,7 +38,7 @@
|
|
|
39
38
|
},
|
|
40
39
|
"dependencies": {
|
|
41
40
|
"@cloudflare/workers-types": "^4.20230321.0",
|
|
42
|
-
"@launchdarkly/js-server-sdk-common-edge": "1.0
|
|
41
|
+
"@launchdarkly/js-server-sdk-common-edge": "1.1.0-alpha",
|
|
43
42
|
"crypto-js": "^4.1.1"
|
|
44
43
|
},
|
|
45
44
|
"devDependencies": {
|
|
@@ -60,7 +59,7 @@
|
|
|
60
59
|
"prettier": "^3.0.0",
|
|
61
60
|
"rimraf": "^5.0.0",
|
|
62
61
|
"ts-jest": "^29.1.0",
|
|
63
|
-
"typedoc": "0.
|
|
62
|
+
"typedoc": "0.25.0",
|
|
64
63
|
"typescript": "5.1.6"
|
|
65
64
|
}
|
|
66
65
|
}
|