@fias/create-fias-plugin 1.1.0 → 1.1.2
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/package.json
CHANGED
|
@@ -367,9 +367,16 @@ A separate **runaway-loop detector** fires if any method is called >50 times in
|
|
|
367
367
|
|
|
368
368
|
### Check for Updates (DO THIS FIRST)
|
|
369
369
|
|
|
370
|
-
**At the start of every new session**, check if the FIAS packages and tooling are up to date:
|
|
370
|
+
**At the start of every new session**, install dependencies if they aren't already, then check if the FIAS packages and tooling are up to date:
|
|
371
371
|
|
|
372
372
|
```bash
|
|
373
|
+
# 1. Install deps first if node_modules/ is missing.
|
|
374
|
+
# fias-dev is a binary inside @fias/plugin-dev-harness, not a standalone
|
|
375
|
+
# npm package — `npx fias-dev …` before `npm install` falls through to
|
|
376
|
+
# the registry and prints a misleading "404 Not Found" for fias-dev.
|
|
377
|
+
[ -d node_modules ] || npm install
|
|
378
|
+
|
|
379
|
+
# 2. Then check for updates.
|
|
373
380
|
npm outdated @fias/arche-sdk @fias/plugin-dev-harness
|
|
374
381
|
npx fias-dev sync --dry-run
|
|
375
382
|
```
|
|
@@ -367,9 +367,16 @@ A separate **runaway-loop detector** fires if any method is called >50 times in
|
|
|
367
367
|
|
|
368
368
|
### Check for Updates (DO THIS FIRST)
|
|
369
369
|
|
|
370
|
-
**At the start of every new session**, check if the FIAS packages and tooling are up to date:
|
|
370
|
+
**At the start of every new session**, install dependencies if they aren't already, then check if the FIAS packages and tooling are up to date:
|
|
371
371
|
|
|
372
372
|
```bash
|
|
373
|
+
# 1. Install deps first if node_modules/ is missing.
|
|
374
|
+
# fias-dev is a binary inside @fias/plugin-dev-harness, not a standalone
|
|
375
|
+
# npm package — `npx fias-dev …` before `npm install` falls through to
|
|
376
|
+
# the registry and prints a misleading "404 Not Found" for fias-dev.
|
|
377
|
+
[ -d node_modules ] || npm install
|
|
378
|
+
|
|
379
|
+
# 2. Then check for updates.
|
|
373
380
|
npm outdated @fias/arche-sdk @fias/plugin-dev-harness
|
|
374
381
|
npx fias-dev sync --dry-run
|
|
375
382
|
```
|
|
@@ -1,6 +1,14 @@
|
|
|
1
1
|
import { defineConfig } from 'vite';
|
|
2
2
|
import react from '@vitejs/plugin-react';
|
|
3
3
|
|
|
4
|
+
// In a GitHub Codespace, the dev server is reached through the *.app.github.dev
|
|
5
|
+
// forwarded URL, never directly via localhost. Bind to all interfaces, declare
|
|
6
|
+
// the forwarded host trusted, and route HMR websockets through the public
|
|
7
|
+
// domain on port 443.
|
|
8
|
+
const codespaceHost = process.env.CODESPACE_NAME
|
|
9
|
+
? `${process.env.CODESPACE_NAME}-3100.${process.env.GITHUB_CODESPACES_PORT_FORWARDING_DOMAIN}`
|
|
10
|
+
: null;
|
|
11
|
+
|
|
4
12
|
export default defineConfig({
|
|
5
13
|
plugins: [react()],
|
|
6
14
|
build: {
|
|
@@ -10,9 +18,13 @@ export default defineConfig({
|
|
|
10
18
|
},
|
|
11
19
|
},
|
|
12
20
|
server: {
|
|
21
|
+
host: true,
|
|
13
22
|
port: 3100,
|
|
14
23
|
cors: true,
|
|
15
24
|
headers: { 'Access-Control-Allow-Origin': '*' },
|
|
16
|
-
hmr:
|
|
25
|
+
hmr: codespaceHost
|
|
26
|
+
? { host: codespaceHost, protocol: 'wss', clientPort: 443 }
|
|
27
|
+
: { host: 'localhost' },
|
|
28
|
+
allowedHosts: codespaceHost ? [codespaceHost] : undefined,
|
|
17
29
|
},
|
|
18
30
|
});
|