chrome-relay 0.2.2 → 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/dist/cli.js +11 -4
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
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.
|
|
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
|
|
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:
|
|
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
|
|
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
package/dist/index.js
CHANGED