chrome-relay 0.2.1 → 0.2.3

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/README.md CHANGED
@@ -10,7 +10,7 @@ chrome-relay install
10
10
  chrome-relay doctor
11
11
  ```
12
12
 
13
- Then load the Browser Relay extension in Chrome.
13
+ Then load the Chrome Relay extension in Chrome.
14
14
 
15
15
  ## Usage
16
16
 
@@ -33,7 +33,7 @@ chrome-relay screenshot --tab <tabId> -o page.png
33
33
  chrome-relay CLI
34
34
  -> local bridge on your machine
35
35
  -> Chrome native host
36
- -> Browser Relay extension
36
+ -> Chrome Relay extension
37
37
  -> Chrome APIs
38
38
  ```
39
39
 
package/dist/cli.js CHANGED
@@ -5,7 +5,7 @@ import { Command } from "commander";
5
5
  import { writeFileSync } from "fs";
6
6
 
7
7
  // src/index.ts
8
- var CHROME_RELAY_VERSION = "0.2.1";
8
+ var CHROME_RELAY_VERSION = "0.2.3";
9
9
 
10
10
  // src/install/install.ts
11
11
  import os from "os";
@@ -16,7 +16,14 @@ import { fileURLToPath } from "url";
16
16
  // ../protocol/dist/index.js
17
17
  var NATIVE_HOST_NAME = "dev.chrome_relay.native_host";
18
18
  var DEFAULT_HTTP_PORT = 12122;
19
- var DEFAULT_EXTENSION_ID = "cdmmkpadhnpcfjljhgpdnnljhjafmhop";
19
+ var CHROME_WEB_STORE_EXTENSION_ID = "cpdiapbifblhlcpnmlmfpgfjlacebokb";
20
+ var LEGACY_DEV_EXTENSION_ID = "cdmmkpadhnpcfjljhgpdnnljhjafmhop";
21
+ var LOCAL_UNPACKED_EXTENSION_ID = "cleiodnaklknhhfopegimjelfibjmbkc";
22
+ var DEFAULT_EXTENSION_IDS = [
23
+ CHROME_WEB_STORE_EXTENSION_ID,
24
+ LEGACY_DEV_EXTENSION_ID,
25
+ LOCAL_UNPACKED_EXTENSION_ID
26
+ ];
20
27
 
21
28
  // src/install/install.ts
22
29
  var APP_DIR = path.join(os.homedir(), ".chrome-relay");
@@ -54,7 +61,7 @@ async function writeManifest(wrapperPath) {
54
61
  description: "Native host for Chrome Relay",
55
62
  path: wrapperPath,
56
63
  type: "stdio",
57
- allowed_origins: [`chrome-extension://${DEFAULT_EXTENSION_ID}/`]
64
+ allowed_origins: DEFAULT_EXTENSION_IDS.map((id) => `chrome-extension://${id}/`)
58
65
  };
59
66
  await writeFile(manifestPath, `${JSON.stringify(manifest, null, 2)}
60
67
  `, "utf8");
@@ -86,7 +93,7 @@ async function runDoctor() {
86
93
  }
87
94
  console.log(`Wrapper present: yes`);
88
95
  console.log(`Manifest present: yes`);
89
- console.log(`Allowed origin: ${manifest.allowed_origins?.[0] ?? "missing"}`);
96
+ console.log(`Allowed origins: ${(manifest.allowed_origins ?? ["missing"]).join(", ")}`);
90
97
  console.log(`Local bridge reachable: ${serverReachable ? "yes" : "no"}`);
91
98
  if (!serverReachable) {
92
99
  console.log(`Tip: load the extension so it can launch the native host.`);
package/dist/index.d.ts CHANGED
@@ -1,3 +1,3 @@
1
- declare const CHROME_RELAY_VERSION = "0.2.1";
1
+ declare const CHROME_RELAY_VERSION = "0.2.3";
2
2
 
3
3
  export { CHROME_RELAY_VERSION };
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  // src/index.ts
2
- var CHROME_RELAY_VERSION = "0.2.1";
2
+ var CHROME_RELAY_VERSION = "0.2.3";
3
3
  export {
4
4
  CHROME_RELAY_VERSION
5
5
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "chrome-relay",
3
- "version": "0.2.1",
3
+ "version": "0.2.3",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",