@hexah/create-skin 0.1.0 → 0.1.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/index.js CHANGED
@@ -36,16 +36,18 @@ function main(argv) {
36
36
  console.log("Dalej:");
37
37
  console.log(` cd ${target}`);
38
38
  console.log(" npm install");
39
- console.log(" npm run dev # rspack serve z HMR (np. http://localhost:3001/remoteEntry.js)");
39
+ console.log(" npm run dev # rspack serve z HMR (np. https://localhost:3001/remoteEntry.js)");
40
40
  console.log("");
41
41
  console.log("Podłączenie do hosta (środowisko testowe) — w konsoli przeglądarki:");
42
42
  console.log(
43
43
  ` localStorage.setItem('hexah.skinRemote', JSON.stringify({ name: '${federationName}',`,
44
44
  );
45
45
  console.log(
46
- " entry: 'http://localhost:3001/remoteEntry.js', template: 'sdkremote',",
46
+ " entry: 'https://localhost:3001/remoteEntry.js', template: 'sdkremote',",
47
47
  );
48
48
  console.log(" screens: { report: './ReportScreen' }, apiVersion: '0.2.0' }))");
49
+ console.log("Dev server jedzie po HTTPS — wejdź raz na https://localhost:3001/remoteEntry.js");
50
+ console.log("i zaakceptuj samopodpisany cert (inaczej host na HTTPS zablokuje ładowanie).");
49
51
  console.log("Następnie w Ustawieniach Gry wybierz motyw „SDK Remote (zdalna skórka)\".");
50
52
  return 0;
51
53
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hexah/create-skin",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Scaffolder skórki Hexah (zdalny kontener Module Federation, harness dev z HMR).",
5
5
  "bin": {
6
6
  "create-hexah-skin": "index.js"
@@ -7,7 +7,7 @@ aplikacji Hexah (host) podpiętej do środowiska testowego — bez dostępu do k
7
7
 
8
8
  ```bash
9
9
  npm install
10
- npm run dev # rspack serve z HMR → http://localhost:3001/remoteEntry.js
10
+ npm run dev # rspack serve z HMR → https://localhost:3001/remoteEntry.js
11
11
  ```
12
12
 
13
13
  ## Podłączenie do hosta (środowisko testowe)
@@ -17,13 +17,18 @@ W konsoli przeglądarki na środowisku testowym Hexah:
17
17
  ```js
18
18
  localStorage.setItem('hexah.skinRemote', JSON.stringify({
19
19
  name: '__SKIN_FEDERATION_NAME__',
20
- entry: 'http://localhost:3001/remoteEntry.js',
20
+ entry: 'https://localhost:3001/remoteEntry.js',
21
21
  template: 'sdkremote',
22
22
  screens: { report: './ReportScreen' },
23
23
  apiVersion: '0.2.0',
24
24
  }))
25
25
  ```
26
26
 
27
+ > **Pierwsze uruchomienie:** dev server jedzie po **HTTPS** z samopodpisanym certem (host na
28
+ > teście jest HTTPS — remote po HTTP byłby zablokowany jako mixed content / „dostęp do sieci
29
+ > lokalnej"). Wejdź **raz** na <https://localhost:3001/remoteEntry.js> i zaakceptuj wyjątek
30
+ > certyfikatu, dopiero potem odśwież `test.kf2.pl`.
31
+
27
32
  Odśwież, w **Ustawieniach Gry** wybierz motyw **„SDK Remote (zdalna skórka)"** i wejdź na ekran
28
33
  zgłoszeń — zobaczysz swój `ReportScreen` na realnych danych. Dzięki HMR zmiany w `src/` są
29
34
  widoczne po odświeżeniu (rebuild remote'a).
@@ -52,5 +52,17 @@ module.exports = {
52
52
  },
53
53
  }),
54
54
  ],
55
- devServer: { port: 3001, headers: { "Access-Control-Allow-Origin": "*" } },
55
+ // Dev server po HTTPS: host (np. https://test.kf2.pl) jest na HTTPS, więc remote po HTTP
56
+ // byłby zablokowany jako mixed content + „dostęp do sieci lokalnej" (NS_BINDING_ABORTED).
57
+ // HTTPS daje samopodpisany cert — wejdź raz na https://localhost:3001/remoteEntry.js i
58
+ // zaakceptuj wyjątek. Nagłówki: CORS (cross-origin load) + Private Network Access
59
+ // (Chrome wymaga przy żądaniu z publicznego hosta do localhost).
60
+ devServer: {
61
+ port: 3001,
62
+ server: "https",
63
+ headers: {
64
+ "Access-Control-Allow-Origin": "*",
65
+ "Access-Control-Allow-Private-Network": "true",
66
+ },
67
+ },
56
68
  };