@repobit/dex-launch 1.5.0 → 2.0.1

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
@@ -3,6 +3,27 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [2.0.1](https://github.com/bitdefender/dex-core/compare/@repobit/dex-launch@2.0.0...@repobit/dex-launch@2.0.1) (2025-05-28)
7
+
8
+ **Note:** Version bump only for package @repobit/dex-launch
9
+
10
+
11
+
12
+
13
+
14
+ ## [2.0.0](https://github.com/bitdefender/dex-core/compare/@repobit/dex-launch@1.5.0...@repobit/dex-launch@2.0.0) (2025-05-13)
15
+
16
+
17
+ ### ⚠ BREAKING CHANGES
18
+
19
+ * **DEX-21820:** refactored Target to require initialisation
20
+
21
+ ### Features
22
+
23
+ * **DEX-21820:** refactored Target to require initialisation ([398be98](https://github.com/bitdefender/dex-core/commit/398be98f6d90f808bbeac409cdb1cb39dd03a705))
24
+
25
+
26
+
6
27
  ## [1.5.0](https://github.com/bitdefender/dex-core/compare/@repobit/dex-launch@1.4.1...@repobit/dex-launch@1.5.0) (2025-05-12)
7
28
 
8
29
 
package/README.md CHANGED
@@ -67,6 +67,8 @@ If one wishes to use both Launch and Target in the same project, I recommend usi
67
67
  import Launch from '@repobit/dex-launch';
68
68
  import Target from '@repobit/dex-target';
69
69
 
70
+ const target = new Target();
71
+
70
72
  try {
71
73
  await Launch.load('prod');
72
74
  } catch (e) {
@@ -1,3 +1,12 @@
1
+ declare global {
2
+ interface Window {
3
+ BD: {
4
+ state: {
5
+ launchScript: string;
6
+ };
7
+ };
8
+ }
9
+ }
1
10
  export default abstract class Launch {
2
11
  static load(environment: 'dev' | 'stage' | 'prod'): Promise<void>;
3
12
  }
package/dist/src/index.js CHANGED
@@ -2,8 +2,13 @@ import { Constants } from '@repobit/dex-constants';
2
2
  import { loadScript } from "@repobit/dex-utils";
3
3
  export default class Launch {
4
4
  static async load(environment) {
5
- const adobeLaunchScriptUrl = `${Constants.LAUNCH_URL}/${Constants.ADOBE_MC_URL_ENV_MAP.get(environment)}`;
6
- await loadScript(adobeLaunchScriptUrl);
5
+ if (window.BD.state.launchScript) {
6
+ return;
7
+ }
8
+ window.BD.state.launchScript = `${Constants.LAUNCH_URL}/${Constants.ADOBE_MC_URL_ENV_MAP.get(environment)}`;
9
+ await loadScript(window.BD.state.launchScript);
7
10
  }
8
11
  }
12
+ window.BD = window.BD || {};
13
+ window.BD.state = window.BD.state || {};
9
14
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAGhD,MAAM,CAAC,OAAO,OAAgB,MAAM;IAC3B,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,WAAqC;QAC5D,MAAM,oBAAoB,GAAG,GAAG,SAAS,CAAC,UAAU,IAAI,SAAS,CAAC,oBAAoB,CAAC,GAAG,CAAC,WAAW,CAAC,EAAE,CAAC;QAE1G,MAAM,UAAU,CAAC,oBAAoB,CAAC,CAAC;IACzC,CAAC;CACF"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAYhD,MAAM,CAAC,OAAO,OAAgB,MAAM;IAC3B,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,WAAqC;QAC5D,IAAI,MAAM,CAAC,EAAE,CAAC,KAAK,CAAC,YAAY,EAAE,CAAC;YACjC,OAAO;QACT,CAAC;QAED,MAAM,CAAC,EAAE,CAAC,KAAK,CAAC,YAAY,GAAG,GAAG,SAAS,CAAC,UAAU,IAAI,SAAS,CAAC,oBAAoB,CAAC,GAAG,CAAC,WAAW,CAAC,EAAE,CAAC;QAC5G,MAAM,UAAU,CAAC,MAAM,CAAC,EAAE,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC;IACjD,CAAC;CACF;AAED,MAAM,CAAC,EAAE,GAAG,MAAM,CAAC,EAAE,IAAI,EAAE,CAAC;AAC5B,MAAM,CAAC,EAAE,CAAC,KAAK,GAAG,MAAM,CAAC,EAAE,CAAC,KAAK,IAAI,EAAE,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@repobit/dex-launch",
3
- "version": "1.5.0",
3
+ "version": "2.0.1",
4
4
  "description": "Client for Adobe Launch",
5
5
  "author": "Constantin Ioan Mihai <iconstantin@bitdefender.com>",
6
6
  "homepage": "https://github.com/bitdefender/dex-core#readme",
@@ -36,5 +36,5 @@
36
36
  "volta": {
37
37
  "node": "22.14.0"
38
38
  },
39
- "gitHead": "cac3128091c62b4905b3625f23ee357093465256"
39
+ "gitHead": "579ca83084bfc675baac3e9757a077c6762d526d"
40
40
  }