@launchdarkly/js-sdk-common 1.1.0 → 1.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.
@@ -0,0 +1,16 @@
1
+ /**
2
+ * This is for internal use only.
3
+ *
4
+ * Edge sdks use clientSideID to query feature stores. They also send analytics
5
+ * using this clientSideID. This is a hybrid behavior because they are based
6
+ * on js-server-common, but uses the clientSideID instead of the sdkKey for the
7
+ * above reasons. These internal options allow the edge sdks to use the
8
+ * EventSender to send analytics to the correct LD endpoints using
9
+ * the clientSideId.
10
+ */
11
+ export type LDInternalOptions = {
12
+ analyticsEventPath?: string;
13
+ diagnosticEventPath?: string;
14
+ includeAuthorizationHeader?: boolean;
15
+ };
16
+ //# sourceMappingURL=LDInternalOptions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LDInternalOptions.d.ts","sourceRoot":"","sources":["../../../src/internal/events/LDInternalOptions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,MAAM,MAAM,iBAAiB,GAAG;IAC9B,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,0BAA0B,CAAC,EAAE,OAAO,CAAC;CACtC,CAAC"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=LDInternalOptions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LDInternalOptions.js","sourceRoot":"","sources":["../../../src/internal/events/LDInternalOptions.ts"],"names":[],"mappings":""}
@@ -3,5 +3,6 @@ import InputCustomEvent from './InputCustomEvent';
3
3
  import InputEvalEvent from './InputEvalEvent';
4
4
  import InputEvent from './InputEvent';
5
5
  import InputIdentifyEvent from './InputIdentifyEvent';
6
- export { InputCustomEvent, InputEvalEvent, InputEvent, InputIdentifyEvent, EventProcessor };
6
+ import type { LDInternalOptions } from './LDInternalOptions';
7
+ export { EventProcessor, InputCustomEvent, InputEvalEvent, InputEvent, InputIdentifyEvent, LDInternalOptions, };
7
8
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/internal/events/index.ts"],"names":[],"mappings":"AAAA,OAAO,cAAc,MAAM,kBAAkB,CAAC;AAC9C,OAAO,gBAAgB,MAAM,oBAAoB,CAAC;AAClD,OAAO,cAAc,MAAM,kBAAkB,CAAC;AAC9C,OAAO,UAAU,MAAM,cAAc,CAAC;AACtC,OAAO,kBAAkB,MAAM,sBAAsB,CAAC;AAEtD,OAAO,EAAE,gBAAgB,EAAE,cAAc,EAAE,UAAU,EAAE,kBAAkB,EAAE,cAAc,EAAE,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/internal/events/index.ts"],"names":[],"mappings":"AAAA,OAAO,cAAc,MAAM,kBAAkB,CAAC;AAC9C,OAAO,gBAAgB,MAAM,oBAAoB,CAAC;AAClD,OAAO,cAAc,MAAM,kBAAkB,CAAC;AAC9C,OAAO,UAAU,MAAM,cAAc,CAAC;AACtC,OAAO,kBAAkB,MAAM,sBAAsB,CAAC;AACtD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAE7D,OAAO,EACL,cAAc,EACd,gBAAgB,EAChB,cAAc,EACd,UAAU,EACV,kBAAkB,EAClB,iBAAiB,GAClB,CAAC"}
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.EventProcessor = exports.InputIdentifyEvent = exports.InputEvalEvent = exports.InputCustomEvent = void 0;
3
+ exports.InputIdentifyEvent = exports.InputEvalEvent = exports.InputCustomEvent = exports.EventProcessor = void 0;
4
4
  const EventProcessor_1 = require("./EventProcessor");
5
5
  exports.EventProcessor = EventProcessor_1.default;
6
6
  const InputCustomEvent_1 = require("./InputCustomEvent");
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/internal/events/index.ts"],"names":[],"mappings":";;;AAAA,qDAA8C;AAM6B,yBANpE,wBAAc,CAMoE;AALzF,yDAAkD;AAKzC,2BALF,0BAAgB,CAKE;AAJzB,qDAA8C;AAInB,yBAJpB,wBAAc,CAIoB;AAFzC,6DAAsD;AAEC,6BAFhD,4BAAkB,CAEgD"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/internal/events/index.ts"],"names":[],"mappings":";;;AAAA,qDAA8C;AAQ5C,yBARK,wBAAc,CAQL;AAPhB,yDAAkD;AAQhD,2BARK,0BAAgB,CAQL;AAPlB,qDAA8C;AAQ5C,yBARK,wBAAc,CAQL;AANhB,6DAAsD;AAQpD,6BARK,4BAAkB,CAQL"}
@@ -5,6 +5,19 @@ export default class ServiceEndpoints {
5
5
  readonly streaming: string;
6
6
  readonly polling: string;
7
7
  readonly events: string;
8
- constructor(streaming: string, polling: string, events: string);
8
+ /** Valid paths are:
9
+ * /bulk
10
+ * /events/bulk/envId
11
+ * /mobile
12
+ */
13
+ readonly analyticsEventPath: string;
14
+ /** Valid paths are:
15
+ * /diagnostic
16
+ * /events/diagnostic/envId
17
+ * /mobile/events/diagnostic
18
+ */
19
+ readonly diagnosticEventPath: string;
20
+ readonly includeAuthorizationHeader: boolean;
21
+ constructor(streaming: string, polling: string, events: string, analyticsEventPath?: string, diagnosticEventPath?: string, includeAuthorizationHeader?: boolean);
9
22
  }
10
23
  //# sourceMappingURL=ServiceEndpoints.d.ts.map
@@ -1 +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"}
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;IAE/B;;;;OAIG;IACH,SAAgB,kBAAkB,EAAE,MAAM,CAAC;IAE3C;;;;OAIG;IACH,SAAgB,mBAAmB,EAAE,MAAM,CAAC;IAG5C,SAAgB,0BAA0B,EAAE,OAAO,CAAC;gBAGlD,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,MAAM,EACd,kBAAkB,GAAE,MAAgB,EACpC,mBAAmB,GAAE,MAAsB,EAC3C,0BAA0B,GAAE,OAAc;CAS7C"}
@@ -7,10 +7,13 @@ function canonicalizeUri(uri) {
7
7
  * Specifies the base service URIs used by SDK components.
8
8
  */
9
9
  class ServiceEndpoints {
10
- constructor(streaming, polling, events) {
10
+ constructor(streaming, polling, events, analyticsEventPath = '/bulk', diagnosticEventPath = '/diagnostic', includeAuthorizationHeader = true) {
11
11
  this.streaming = canonicalizeUri(streaming);
12
12
  this.polling = canonicalizeUri(polling);
13
13
  this.events = canonicalizeUri(events);
14
+ this.analyticsEventPath = analyticsEventPath;
15
+ this.diagnosticEventPath = diagnosticEventPath;
16
+ this.includeAuthorizationHeader = includeAuthorizationHeader;
14
17
  }
15
18
  }
16
19
  exports.default = ServiceEndpoints;
@@ -1 +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"}
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;IAwBnC,YACE,SAAiB,EACjB,OAAe,EACf,MAAc,EACd,qBAA6B,OAAO,EACpC,sBAA8B,aAAa,EAC3C,6BAAsC,IAAI;QAE1C,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;QACtC,IAAI,CAAC,kBAAkB,GAAG,kBAAkB,CAAC;QAC7C,IAAI,CAAC,mBAAmB,GAAG,mBAAmB,CAAC;QAC/C,IAAI,CAAC,0BAA0B,GAAG,0BAA0B,CAAC;IAC/D,CAAC;CACF;AAvCD,mCAuCC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@launchdarkly/js-sdk-common",
3
- "version": "1.1.0",
3
+ "version": "1.2.0-alpha",
4
4
  "type": "commonjs",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -19,7 +19,6 @@
19
19
  "client"
20
20
  ],
21
21
  "scripts": {
22
- "doc": "../../../scripts/build-doc.sh .",
23
22
  "test": "npx jest --ci",
24
23
  "build": "npx tsc",
25
24
  "clean": "npx tsc --build --clean",
@@ -42,7 +41,7 @@
42
41
  "launchdarkly-js-test-helpers": "^2.2.0",
43
42
  "prettier": "^3.0.0",
44
43
  "ts-jest": "^29.0.5",
45
- "typedoc": "0.23.26",
46
- "typescript": "^5.1.6"
44
+ "typedoc": "0.25.0",
45
+ "typescript": "5.1.6"
47
46
  }
48
47
  }