@lark-apaas/fullstack-nestjs-core 1.0.15-alpha.0 → 1.0.15
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 +3 -8
- package/dist/index.d.cts +0 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.js +3 -8
- package/package.json +3 -3
package/dist/index.cjs
CHANGED
|
@@ -91,8 +91,7 @@ var UserContextMiddleware = class {
|
|
|
91
91
|
userId: webUser?.user_id,
|
|
92
92
|
tenantId: webUser?.tenant_id,
|
|
93
93
|
appId: webUser?.app_id ?? "",
|
|
94
|
-
loginUrl: webUser?.login_url ?? ""
|
|
95
|
-
userType: webUser?.user_type ?? ""
|
|
94
|
+
loginUrl: webUser?.login_url ?? ""
|
|
96
95
|
};
|
|
97
96
|
next();
|
|
98
97
|
}
|
|
@@ -171,14 +170,12 @@ var ViewContextMiddleware = class {
|
|
|
171
170
|
__name(this, "ViewContextMiddleware");
|
|
172
171
|
}
|
|
173
172
|
use(req, res, next) {
|
|
174
|
-
const { userId, tenantId, appId
|
|
173
|
+
const { userId, tenantId, appId } = req.userContext;
|
|
175
174
|
const csrfToken = req.csrfToken;
|
|
176
175
|
req.__platform_data__ = {
|
|
177
176
|
csrfToken: csrfToken ?? "",
|
|
178
177
|
userId: userId ?? "",
|
|
179
178
|
appId: appId ?? "",
|
|
180
|
-
loginUrl: loginUrl ?? "",
|
|
181
|
-
userType: userType ?? "",
|
|
182
179
|
tenantId
|
|
183
180
|
};
|
|
184
181
|
res.locals = {
|
|
@@ -186,9 +183,7 @@ var ViewContextMiddleware = class {
|
|
|
186
183
|
csrfToken: csrfToken ?? "",
|
|
187
184
|
userId: userId ?? "",
|
|
188
185
|
tenantId: tenantId ?? "",
|
|
189
|
-
appId: appId ?? ""
|
|
190
|
-
loginUrl: loginUrl ?? "",
|
|
191
|
-
userType: userType ?? ""
|
|
186
|
+
appId: appId ?? ""
|
|
192
187
|
};
|
|
193
188
|
next();
|
|
194
189
|
}
|
package/dist/index.d.cts
CHANGED
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -49,8 +49,7 @@ var UserContextMiddleware = class {
|
|
|
49
49
|
userId: webUser?.user_id,
|
|
50
50
|
tenantId: webUser?.tenant_id,
|
|
51
51
|
appId: webUser?.app_id ?? "",
|
|
52
|
-
loginUrl: webUser?.login_url ?? ""
|
|
53
|
-
userType: webUser?.user_type ?? ""
|
|
52
|
+
loginUrl: webUser?.login_url ?? ""
|
|
54
53
|
};
|
|
55
54
|
next();
|
|
56
55
|
}
|
|
@@ -129,14 +128,12 @@ var ViewContextMiddleware = class {
|
|
|
129
128
|
__name(this, "ViewContextMiddleware");
|
|
130
129
|
}
|
|
131
130
|
use(req, res, next) {
|
|
132
|
-
const { userId, tenantId, appId
|
|
131
|
+
const { userId, tenantId, appId } = req.userContext;
|
|
133
132
|
const csrfToken = req.csrfToken;
|
|
134
133
|
req.__platform_data__ = {
|
|
135
134
|
csrfToken: csrfToken ?? "",
|
|
136
135
|
userId: userId ?? "",
|
|
137
136
|
appId: appId ?? "",
|
|
138
|
-
loginUrl: loginUrl ?? "",
|
|
139
|
-
userType: userType ?? "",
|
|
140
137
|
tenantId
|
|
141
138
|
};
|
|
142
139
|
res.locals = {
|
|
@@ -144,9 +141,7 @@ var ViewContextMiddleware = class {
|
|
|
144
141
|
csrfToken: csrfToken ?? "",
|
|
145
142
|
userId: userId ?? "",
|
|
146
143
|
tenantId: tenantId ?? "",
|
|
147
|
-
appId: appId ?? ""
|
|
148
|
-
loginUrl: loginUrl ?? "",
|
|
149
|
-
userType: userType ?? ""
|
|
144
|
+
appId: appId ?? ""
|
|
150
145
|
};
|
|
151
146
|
next();
|
|
152
147
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lark-apaas/fullstack-nestjs-core",
|
|
3
|
-
"version": "1.0.15
|
|
3
|
+
"version": "1.0.15",
|
|
4
4
|
"description": "FullStack Nestjs Core",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -38,8 +38,8 @@
|
|
|
38
38
|
"lint:fix": "eslint src --ext .ts --fix"
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@lark-apaas/nestjs-authnpaas": "^1.0.
|
|
42
|
-
"@lark-apaas/nestjs-datapaas": "1.0.
|
|
41
|
+
"@lark-apaas/nestjs-authnpaas": "^1.0.1",
|
|
42
|
+
"@lark-apaas/nestjs-datapaas": "^1.0.5",
|
|
43
43
|
"@lark-apaas/nestjs-logger": "^1.0.2",
|
|
44
44
|
"@lark-apaas/nestjs-openapi-devtools": "^1.0.7",
|
|
45
45
|
"cookie-parser": "^1.4.7"
|