@c8y/devkit 1019.23.7 → 1019.23.9

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.
@@ -14,10 +14,26 @@ function webpackDevelopmentConfig(env, webpackConfiguration, builderOptions) {
14
14
  if (!builderOptions.proxyConfig) {
15
15
  webpackConfiguration.devServer.proxy = (0, proxy_1.getProxyConfig)(builderOptions.url);
16
16
  }
17
+ if (webpackConfiguration?.devServer?.client) {
18
+ alignNgWebsocketPort(webpackConfiguration.devServer.client, webpackConfiguration.devServer.port);
19
+ }
17
20
  }
18
21
  return webpackConfiguration;
19
22
  }
20
23
  exports.webpackDevelopmentConfig = webpackDevelopmentConfig;
24
+ /**
25
+ * Somehow the port changes done in webpack are not reflected in the ws: server used by ng for live reload
26
+ * This function aligns the port of the ws: client with the port of the dev server.
27
+ * @param wsClientConfiguration The client configuration of the dev server.
28
+ * @param port The port of the dev server.
29
+ */
30
+ function alignNgWebsocketPort(wsClientConfiguration, port) {
31
+ if (!!wsClientConfiguration.webSocketURL && !!port) {
32
+ wsClientConfiguration.webSocketURL = wsClientConfiguration.webSocketURL
33
+ .toString()
34
+ .replace(/:[0-9]{1,5}/, `:${port}`);
35
+ }
36
+ }
21
37
  /**
22
38
  * Redirect request -> from :9090/apps/contextPath (without slash!) -> to :9090/apps/contextPath/index.html
23
39
  * @param contextPath The context path of the application.
@@ -1 +1 @@
1
- {"version":3,"file":"development.js","sourceRoot":"","sources":["../../../../src/webpack/config/development.ts"],"names":[],"mappings":";;;AAAA,0CAAgD;AAMhD,SAAgB,wBAAwB,CACtC,GAAuB,EACvB,oBAA0C,EAC1C,cAA0C;IAE1C,IAAI,oBAAoB,CAAC,SAAS,EAAE;QAClC,oBAAoB,CAAC,SAAS,CAAC,kBAAkB,CAAC,GAAG,WAAW,CAAC,EAAE,CACjE,mCAAmC,CAAC,GAAG,CAAC,OAAO,CAAC,WAAW,EAAE,WAAW,CAAC,CAAC;QAE5E;;WAEG;Q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CAAC,OAAO,CAAC,WAAW,EAAE,CAAC;SAC9F;QAED,IAAI,CAAC,cAAc,CAAC,WAAW,EAAE;YAC/B,oBAAoB,CAAC,SAAS,CAAC,KAAK,GAAG,IAAA,sBAAc,EAAC,cAAc,CAAC,GAAG,CAAC,CAAC;SAC3E;QACD,IAAI,oBAAoB,EAAE,SAAS,EAAE,MAAM,EAAE;YAC3C,oBAAoB,CAClB,oBAAoB,CAAC,SAAS,CAAC,MAA6B,EAC5D,oBAAoB,CAAC,SAAS,CAAC,IAAI,CACpC,CAAC;SACH;KACF;IACD,OAAO,oBAAoB,CAAC;AAC9B,CAAC;AA3BD,4DA2BC;AAED;;;;;GAKG;AACH,SAAS,oBAAoB,CAAC,qBAA0C,EAAE,IAAsB;IAC9F,IAAI,CAAC,CAAC,qBAAqB,CAAC,YAAY,IAAI,CAAC,CAAC,IAAI,EAAE;QAClD,qBAAqB,CAAC,YAAY,GAAG,qBAAqB,CAAC,YAAY;aACpE,QAAQ,EAAE;aACV,OAAO,CAAC,aAAa,EAAE,IAAI,IAAI,EAAE,CAAC,CAAC;KACvC;AACH,CAAC;AAED;;;;;GAKG;AACH,SAAS,mCAAmC,CAAC,WAAmB,EAAE,WAAyB;IACzF,WAAW,CAAC,OAAO,CAAC;QAClB,IAAI,EAAE,wBAAwB;QAC9B,IAAI,EAAE,UAAU,WAAW,GAAG;QAC9B,UAAU,EAAE,CAAC,GAAY,EAAE,GAAa,EAAE,EAAE;YAC1C,GAAG,CAAC,QAAQ,CAAC,GAAG,EAAE,SAAS,WAAW,aAAa,CAAC,CAAC;QACvD,CAAC;KACF,CAAC,CAAC;IACH,OAAO,WAAW,CAAC;AACrB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@c8y/devkit",
3
- "version": "1019.23.7",
3
+ "version": "1019.23.9",
4
4
  "license": "Apache-2.0",
5
5
  "author": "Cumulocity",
6
6
  "description": "Cumulocity Webpack Build Facade",
@@ -44,7 +44,7 @@
44
44
  "@babel/plugin-syntax-dynamic-import": "7.8.3",
45
45
  "@babel/plugin-transform-async-to-generator": "^7.18.6",
46
46
  "@babel/preset-env": "^7.23.8",
47
- "@c8y/client": "1019.23.7",
47
+ "@c8y/client": "1019.23.9",
48
48
  "@schematics/angular": "^16.2.10",
49
49
  "angular-gettext-tools": "2.5.3",
50
50
  "autoprefixer": "^10.4.12",