@hexah/create-skin 0.1.3 → 0.1.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.
Files changed (2) hide show
  1. package/README.md +28 -2
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -13,8 +13,34 @@ npm install
13
13
  npm run dev # rspack serve z HMR
14
14
  ```
15
15
 
16
- Następnie podłącz remote do hosta na teście (instrukcja w wygenerowanym `README.md` skórki):
17
- `localStorage["hexah.skinRemote"]` + motyw „SDK Remote (zdalna skórka)".
16
+ ## Podłączenie do test.kf2.pl
17
+
18
+ Skórkę ładuje aplikacja działająca pod publicznym adresem (HTTPS), a przeglądarka nie pozwala
19
+ takiej stronie pobrać zasobu z `localhost`. Wystaw więc dev server pod **publicznym URL przez
20
+ tunel**:
21
+
22
+ ```bash
23
+ npx cloudflared tunnel --url http://localhost:3001 # → https://<rand>.trycloudflare.com
24
+ ```
25
+
26
+ `<rand>.trycloudflare.com` to adres, który cloudflared wypisze w terminalu — skopiuj go
27
+ (zmienia się po każdym restarcie tunelu). Następnie otwórz `https://test.kf2.pl`, zaloguj się i
28
+ **w konsoli przeglądarki (F12 → Console)** wklej:
29
+
30
+ ```js
31
+ localStorage.setItem('hexah.skinRemoteAllowedOrigins', JSON.stringify(['https://<rand>.trycloudflare.com']))
32
+ localStorage.setItem('hexah.skinRemote', JSON.stringify({
33
+ name: 'moja_skorka', // = nazwa kontenera (uniqueName w rspack.config.js)
34
+ entry: 'https://<rand>.trycloudflare.com/remoteEntry.js',
35
+ template: 'sdkremote',
36
+ screens: { report: './ReportScreen' },
37
+ apiVersion: '0.2.0',
38
+ }))
39
+ ```
40
+
41
+ Odśwież stronę, w **Ustawieniach Gry** wybierz motyw **„SDK Remote (zdalna skórka)"** i wejdź na
42
+ ekran zgłoszeń — zobaczysz swój `ReportScreen` na realnych danych. Po każdej zmianie w `src/`
43
+ odśwież stronę (remote przebuduje się przez HMR).
18
44
 
19
45
  ## Co generuje
20
46
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hexah/create-skin",
3
- "version": "0.1.3",
3
+ "version": "0.1.4",
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"