@rdyl/node-koa-controller 0.5.4 → 0.5.6

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/CHANGELOG.md CHANGED
@@ -1,4 +1,4 @@
1
- ## 0.5.4 (2025-12-31)
1
+ ## 0.5.5 (2025-12-31)
2
2
 
3
3
 
4
4
 
package/dist/cache.js CHANGED
@@ -126,26 +126,44 @@ var ASTCache = /** @class */ (function () {
126
126
  });
127
127
  }); };
128
128
  var execWithJwt = !!useJwt
129
- ? function (instance) { return __awaiter(_this, void 0, void 0, function () {
130
- var jwt;
131
- return __generator(this, function (_a) {
132
- switch (_a.label) {
133
- case 0: return [4 /*yield*/, useJwt(instance.ctx)];
134
- case 1:
135
- jwt = _a.sent();
136
- if (jwt) {
137
- instance.jwt = jwt;
138
- }
139
- if (!jwt && !isPublic) {
140
- return [2 /*return*/, instance.status.unauthorized()];
141
- }
142
- return [4 /*yield*/, next(instance)];
143
- case 2:
144
- _a.sent();
145
- return [2 /*return*/];
146
- }
147
- });
148
- }); }
129
+ ? isPublic
130
+ ? function (instance) { return __awaiter(_this, void 0, void 0, function () {
131
+ var jwt;
132
+ return __generator(this, function (_a) {
133
+ switch (_a.label) {
134
+ case 0: return [4 /*yield*/, useJwt(instance._ctx)];
135
+ case 1:
136
+ jwt = _a.sent();
137
+ if (jwt) {
138
+ instance.jwt = jwt;
139
+ }
140
+ return [4 /*yield*/, next(instance)];
141
+ case 2:
142
+ _a.sent();
143
+ return [2 /*return*/];
144
+ }
145
+ });
146
+ }); }
147
+ : function (instance) { return __awaiter(_this, void 0, void 0, function () {
148
+ var jwt;
149
+ return __generator(this, function (_a) {
150
+ switch (_a.label) {
151
+ case 0: return [4 /*yield*/, useJwt(instance._ctx)];
152
+ case 1:
153
+ jwt = _a.sent();
154
+ if (!jwt) {
155
+ return [2 /*return*/, instance.status.unauthorized()];
156
+ }
157
+ if (jwt) {
158
+ instance.jwt = jwt;
159
+ }
160
+ return [4 /*yield*/, next(instance)];
161
+ case 2:
162
+ _a.sent();
163
+ return [2 /*return*/];
164
+ }
165
+ });
166
+ }); }
149
167
  : next;
150
168
  var finalHandler = hasLogs
151
169
  ? function (ctx) { return __awaiter(_this, void 0, void 0, function () {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rdyl/node-koa-controller",
3
- "version": "0.5.4",
3
+ "version": "0.5.6",
4
4
  "license": "MIT",
5
5
  "main": "dist/index.js",
6
6
  "types": "types/index.d.ts",