@gxp-dev/tools 2.0.53 → 2.0.54

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gxp-dev/tools",
3
- "version": "2.0.53",
3
+ "version": "2.0.54",
4
4
  "description": "Dev tools to create platform plugins",
5
5
  "type": "commonjs",
6
6
  "publishConfig": {
@@ -313,17 +313,24 @@ export default defineConfig(({ mode }) => {
313
313
  https: getHttpsConfig(env),
314
314
  allowedHosts: env.ALLOWED_HOSTS
315
315
  ? env.ALLOWED_HOSTS.split(",").map((h) => h.trim()).filter(Boolean)
316
- : [],
316
+ : "all",
317
317
  cors: {
318
318
  origin: "*",
319
- methods: ["GET", "POST", "PUT", "DELETE", "OPTIONS"],
319
+ methods: ["GET", "POST", "PUT, DELETE", "OPTIONS"],
320
320
  allowedHeaders: ["*"],
321
321
  credentials: false,
322
322
  },
323
- hmr: {
324
- clientPort:
325
- parseInt(env.CLIENT_PORT) || parseInt(env.NODE_PORT) || 3060,
326
- },
323
+ hmr: env.HMR_HOST
324
+ ? {
325
+ protocol: env.HMR_PROTOCOL || "wss",
326
+ host: env.HMR_HOST,
327
+ port: parseInt(env.HMR_PORT) || 443,
328
+ clientPort: parseInt(env.HMR_PORT) || 443,
329
+ }
330
+ : {
331
+ clientPort:
332
+ parseInt(env.CLIENT_PORT) || parseInt(env.NODE_PORT) || 3060,
333
+ },
327
334
  host: true, // Allow access from network
328
335
  // Allow serving files from the toolkit runtime directory
329
336
  // Also resolve symlinks to allow files from the real path
@@ -262,17 +262,24 @@ export default defineConfig(({ mode }) => {
262
262
  https: getHttpsConfig(env),
263
263
  allowedHosts: env.ALLOWED_HOSTS
264
264
  ? env.ALLOWED_HOSTS.split(",").map((h) => h.trim()).filter(Boolean)
265
- : [],
265
+ : "all",
266
266
  cors: {
267
267
  origin: "*",
268
268
  methods: ["GET", "POST", "PUT", "DELETE", "OPTIONS"],
269
269
  allowedHeaders: ["*"],
270
270
  credentials: false,
271
271
  },
272
- hmr: {
273
- clientPort:
274
- parseInt(env.CLIENT_PORT) || parseInt(env.NODE_PORT) || 3060,
275
- },
272
+ hmr: env.HMR_HOST
273
+ ? {
274
+ protocol: env.HMR_PROTOCOL || "wss",
275
+ host: env.HMR_HOST,
276
+ port: parseInt(env.HMR_PORT) || 443,
277
+ clientPort: parseInt(env.HMR_PORT) || 443,
278
+ }
279
+ : {
280
+ clientPort:
281
+ parseInt(env.CLIENT_PORT) || parseInt(env.NODE_PORT) || 3060,
282
+ },
276
283
  host: true, // Allow access from network
277
284
  // API proxy for non-mock environments
278
285
  proxy: apiProxyTarget