@lark-apaas/fullstack-nestjs-core 1.1.33-alpha.6 → 1.1.33-alpha.8

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/dist/index.cjs CHANGED
@@ -5492,9 +5492,9 @@ var require_read = __commonJS({
5492
5492
  }
5493
5493
  });
5494
5494
 
5495
- // ../../../node_modules/media-typer/index.js
5495
+ // ../../../node_modules/type-is/node_modules/media-typer/index.js
5496
5496
  var require_media_typer = __commonJS({
5497
- "../../../node_modules/media-typer/index.js"(exports2) {
5497
+ "../../../node_modules/type-is/node_modules/media-typer/index.js"(exports2) {
5498
5498
  "use strict";
5499
5499
  var paramRegExp = /; *([!#$%&'\*\+\-\.0-9A-Z\^_`a-z\|~]+) *= *("(?:[ !\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\u0020-\u007e])*"|[!#$%&'\*\+\-\.0-9A-Z\^_`a-z\|~]+) */g;
5500
5500
  var textRegExp = /^[\u0020-\u007e\u0080-\u00ff]+$/;
@@ -36221,12 +36221,24 @@ var HtmlHotUpdateViewMiddleware = class _HtmlHotUpdateViewMiddleware {
36221
36221
  }
36222
36222
  const originalRender = res.render.bind(res);
36223
36223
  res.render = (view, options, callback) => {
36224
+ let renderOptions = options;
36225
+ let renderCallback = callback;
36226
+ if (typeof renderOptions === "function") {
36227
+ renderCallback = renderOptions;
36228
+ renderOptions = void 0;
36229
+ }
36224
36230
  const hotPath = (0, import_node_path2.join)(HOT_UPDATE_DIR, `${view}.html`);
36225
36231
  if ((0, import_node_fs3.existsSync)(hotPath)) {
36226
- this.logger.log(`[DEBUG] render hot-updated HTML: ${hotPath}`);
36227
- return originalRender(hotPath, options, callback);
36232
+ this.logger.log(`Render hot-updated HTML: ${hotPath}`);
36233
+ if (res.app?.cache) {
36234
+ delete res.app.cache[hotPath];
36235
+ }
36236
+ return originalRender(hotPath, {
36237
+ ...renderOptions ?? {},
36238
+ cache: false
36239
+ }, renderCallback);
36228
36240
  }
36229
- return originalRender(view, options, callback);
36241
+ return originalRender(view, renderOptions, renderCallback);
36230
36242
  };
36231
36243
  next();
36232
36244
  }
package/dist/index.js CHANGED
@@ -5491,9 +5491,9 @@ var require_read = __commonJS({
5491
5491
  }
5492
5492
  });
5493
5493
 
5494
- // ../../../node_modules/media-typer/index.js
5494
+ // ../../../node_modules/type-is/node_modules/media-typer/index.js
5495
5495
  var require_media_typer = __commonJS({
5496
- "../../../node_modules/media-typer/index.js"(exports) {
5496
+ "../../../node_modules/type-is/node_modules/media-typer/index.js"(exports) {
5497
5497
  "use strict";
5498
5498
  var paramRegExp = /; *([!#$%&'\*\+\-\.0-9A-Z\^_`a-z\|~]+) *= *("(?:[ !\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\u0020-\u007e])*"|[!#$%&'\*\+\-\.0-9A-Z\^_`a-z\|~]+) */g;
5499
5499
  var textRegExp = /^[\u0020-\u007e\u0080-\u00ff]+$/;
@@ -36198,12 +36198,24 @@ var HtmlHotUpdateViewMiddleware = class _HtmlHotUpdateViewMiddleware {
36198
36198
  }
36199
36199
  const originalRender = res.render.bind(res);
36200
36200
  res.render = (view, options, callback) => {
36201
+ let renderOptions = options;
36202
+ let renderCallback = callback;
36203
+ if (typeof renderOptions === "function") {
36204
+ renderCallback = renderOptions;
36205
+ renderOptions = void 0;
36206
+ }
36201
36207
  const hotPath = join3(HOT_UPDATE_DIR, `${view}.html`);
36202
36208
  if (existsSync3(hotPath)) {
36203
- this.logger.log(`[DEBUG] render hot-updated HTML: ${hotPath}`);
36204
- return originalRender(hotPath, options, callback);
36209
+ this.logger.log(`Render hot-updated HTML: ${hotPath}`);
36210
+ if (res.app?.cache) {
36211
+ delete res.app.cache[hotPath];
36212
+ }
36213
+ return originalRender(hotPath, {
36214
+ ...renderOptions ?? {},
36215
+ cache: false
36216
+ }, renderCallback);
36205
36217
  }
36206
- return originalRender(view, options, callback);
36218
+ return originalRender(view, renderOptions, renderCallback);
36207
36219
  };
36208
36220
  next();
36209
36221
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lark-apaas/fullstack-nestjs-core",
3
- "version": "1.1.33-alpha.6",
3
+ "version": "1.1.33-alpha.8",
4
4
  "description": "FullStack Nestjs Core",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -42,13 +42,13 @@
42
42
  "@lark-apaas/file-service": "^0.1.1",
43
43
  "@lark-apaas/http-client": "^0.1.2",
44
44
  "@lark-apaas/nestjs-authnpaas": "^1.0.2",
45
- "@lark-apaas/nestjs-authzpaas": "^0.1.2",
46
- "@lark-apaas/nestjs-capability": "^0.1.6",
47
- "@lark-apaas/nestjs-common": "^0.1.4",
48
- "@lark-apaas/nestjs-datapaas": "^1.0.11",
49
- "@lark-apaas/nestjs-logger": "^1.0.10",
50
- "@lark-apaas/nestjs-observable": "^0.0.5",
51
- "@lark-apaas/nestjs-openapi-devtools": "^1.0.9",
45
+ "@lark-apaas/nestjs-authzpaas": "^0.1.5",
46
+ "@lark-apaas/nestjs-capability": "^0.1.10",
47
+ "@lark-apaas/nestjs-common": "^0.1.7",
48
+ "@lark-apaas/nestjs-datapaas": "^1.0.14",
49
+ "@lark-apaas/nestjs-logger": "^1.0.13",
50
+ "@lark-apaas/nestjs-observable": "^0.0.9",
51
+ "@lark-apaas/nestjs-openapi-devtools": "^1.0.10",
52
52
  "@lark-apaas/nestjs-trigger": "^0.0.2",
53
53
  "@nestjs/axios": "^4.0.1",
54
54
  "axios": "^1.13.2",