@intuned/runtime-dev 1.3.4-dev.3 → 1.3.4-dev.4

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.
@@ -9,7 +9,7 @@ var _settingsSchema = require("../../../common/settingsSchema");
9
9
  var _promises = require("fs/promises");
10
10
  async function getSettings() {
11
11
  const settingsFilePath = (0, _fileUtils.getFullPathInProject)("Intuned.json");
12
- console.log("loading settings");
12
+ console.log("loading settings2");
13
13
  const settings = await (0, _promises.readFile)(settingsFilePath, {
14
14
  encoding: "utf-8"
15
15
  });
@@ -37,19 +37,22 @@ async function getIntunedExtensionWorker(context) {
37
37
  return null;
38
38
  }
39
39
  let attemptCount = 0;
40
+ console.log("Getting Intuned worker");
40
41
  while (attemptCount < 4) {
41
42
  const intunedServiceWorker = context.serviceWorkers().find(serviceWorker => serviceWorker.url().includes(INTUNED_WORKER));
42
43
  if (intunedServiceWorker) {
44
+ console.log(`Found Intuned Worker. URL ${intunedServiceWorker.url()}`);
43
45
  return intunedServiceWorker;
44
46
  }
45
47
  try {
48
+ console.log(`Worker not found. Awaiting for serviceworker event`);
46
49
  await context.waitForEvent("serviceworker", {
47
50
  timeout: 3000
48
51
  });
49
52
  } catch (err) {
50
- attemptCount++;
51
53
  console.log(`Error accessing service workers (attempt ${attemptCount})`);
52
54
  }
55
+ attemptCount++;
53
56
  }
54
57
  console.error("Failed to get intuned worker after 5 attmepts");
55
58
  return null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@intuned/runtime-dev",
3
- "version": "1.3.4-dev.3",
3
+ "version": "1.3.4-dev.4",
4
4
  "description": "Intuned runtime",
5
5
  "exports": {
6
6
  ".": "./dist/index.js",