@magitch/vite-plugin-dev-connect 1.0.0 → 1.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/dist/index.js +7 -1
- package/dist/index.mjs +7 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -25,10 +25,16 @@ __export(index_exports, {
|
|
|
25
25
|
});
|
|
26
26
|
module.exports = __toCommonJS(index_exports);
|
|
27
27
|
var DEFAULT_PREVIEW_PROTOCOL_URL = "https://magitch.s3.eu-north-1.amazonaws.com/assets/js/preview-protocol.min.js?v=1.2.2";
|
|
28
|
+
var DEFAULT_TRUSTED_HOSTS = [
|
|
29
|
+
"preview.magitch.app",
|
|
30
|
+
"sandbox.magitch.app",
|
|
31
|
+
"localhost",
|
|
32
|
+
"supgen.ai"
|
|
33
|
+
];
|
|
28
34
|
function magitchDevConnect(options = {}) {
|
|
29
35
|
const {
|
|
30
36
|
previewProtocolUrl = DEFAULT_PREVIEW_PROTOCOL_URL,
|
|
31
|
-
trustedHosts =
|
|
37
|
+
trustedHosts = DEFAULT_TRUSTED_HOSTS,
|
|
32
38
|
debug = false
|
|
33
39
|
} = options;
|
|
34
40
|
return {
|
package/dist/index.mjs
CHANGED
|
@@ -1,9 +1,15 @@
|
|
|
1
1
|
// src/index.ts
|
|
2
2
|
var DEFAULT_PREVIEW_PROTOCOL_URL = "https://magitch.s3.eu-north-1.amazonaws.com/assets/js/preview-protocol.min.js?v=1.2.2";
|
|
3
|
+
var DEFAULT_TRUSTED_HOSTS = [
|
|
4
|
+
"preview.magitch.app",
|
|
5
|
+
"sandbox.magitch.app",
|
|
6
|
+
"localhost",
|
|
7
|
+
"supgen.ai"
|
|
8
|
+
];
|
|
3
9
|
function magitchDevConnect(options = {}) {
|
|
4
10
|
const {
|
|
5
11
|
previewProtocolUrl = DEFAULT_PREVIEW_PROTOCOL_URL,
|
|
6
|
-
trustedHosts =
|
|
12
|
+
trustedHosts = DEFAULT_TRUSTED_HOSTS,
|
|
7
13
|
debug = false
|
|
8
14
|
} = options;
|
|
9
15
|
return {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@magitch/vite-plugin-dev-connect",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"description": "Vite plugin for Magitch dev environment — injects preview bridge (preview-protocol) for cross-origin communication between IDE and sandbox preview.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"vite-plugin",
|