@lark-apaas/fullstack-nestjs-core 1.1.48-alpha.0 → 1.1.48-alpha.1

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
@@ -35219,11 +35219,14 @@ var PlatformHttpClientService = class _PlatformHttpClientService {
35219
35219
  "x-tt-env": ttEnv
35220
35220
  };
35221
35221
  }
35222
- const userId = this.requestContext.get("userId");
35222
+ const userIdRaw = this.requestContext.get("userId");
35223
35223
  const tenantIdRaw = this.requestContext.get("tenantId");
35224
35224
  const contextClaims = {};
35225
- if (userId) {
35226
- contextClaims.user_id = userId;
35225
+ if (userIdRaw !== void 0 && userIdRaw !== "") {
35226
+ const userIdNum = typeof userIdRaw === "number" ? userIdRaw : Number(userIdRaw);
35227
+ if (Number.isFinite(userIdNum)) {
35228
+ contextClaims.user_id = userIdNum;
35229
+ }
35227
35230
  }
35228
35231
  if (tenantIdRaw !== void 0 && tenantIdRaw !== "") {
35229
35232
  const tenantIdNum = typeof tenantIdRaw === "number" ? tenantIdRaw : Number(tenantIdRaw);
package/dist/index.js CHANGED
@@ -35192,11 +35192,14 @@ var PlatformHttpClientService = class _PlatformHttpClientService {
35192
35192
  "x-tt-env": ttEnv
35193
35193
  };
35194
35194
  }
35195
- const userId = this.requestContext.get("userId");
35195
+ const userIdRaw = this.requestContext.get("userId");
35196
35196
  const tenantIdRaw = this.requestContext.get("tenantId");
35197
35197
  const contextClaims = {};
35198
- if (userId) {
35199
- contextClaims.user_id = userId;
35198
+ if (userIdRaw !== void 0 && userIdRaw !== "") {
35199
+ const userIdNum = typeof userIdRaw === "number" ? userIdRaw : Number(userIdRaw);
35200
+ if (Number.isFinite(userIdNum)) {
35201
+ contextClaims.user_id = userIdNum;
35202
+ }
35200
35203
  }
35201
35204
  if (tenantIdRaw !== void 0 && tenantIdRaw !== "") {
35202
35205
  const tenantIdNum = typeof tenantIdRaw === "number" ? tenantIdRaw : Number(tenantIdRaw);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lark-apaas/fullstack-nestjs-core",
3
- "version": "1.1.48-alpha.0",
3
+ "version": "1.1.48-alpha.1",
4
4
  "description": "FullStack Nestjs Core",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -40,7 +40,7 @@
40
40
  },
41
41
  "dependencies": {
42
42
  "@lark-apaas/file-service": "^0.1.2",
43
- "@lark-apaas/http-client": "^0.1.5",
43
+ "@lark-apaas/http-client": "0.1.6-alpha.0",
44
44
  "@lark-apaas/nestjs-authnpaas": "^1.0.3",
45
45
  "@lark-apaas/nestjs-authzpaas": "^0.1.8",
46
46
  "@lark-apaas/nestjs-capability": "^0.1.13",