cabloy 5.1.182 → 5.1.184
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/.cabloy-version +1 -1
- package/CHANGELOG.md +13 -0
- package/package.json +1 -1
- package/vona/src/suite/a-demo/modules/demo-demonstration/src/bean/guard.demonstration.ts +8 -1
- package/vona/src/suite-vendor/a-cabloy/modules/a-ssr/package.json +1 -1
- package/vona/src/suite-vendor/a-cabloy/modules/a-ssr/src/lib/beanSsrSiteBase.ts +3 -1
- package/vona/src/suite-vendor/a-cabloy/package.json +1 -1
package/.cabloy-version
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
5.1.
|
|
1
|
+
5.1.184
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 5.1.184
|
|
4
|
+
|
|
5
|
+
### Improvements
|
|
6
|
+
|
|
7
|
+
- Update guard demonstration examples.
|
|
8
|
+
|
|
9
|
+
## 5.1.183
|
|
10
|
+
|
|
11
|
+
### Improvements
|
|
12
|
+
|
|
13
|
+
- Update the Stripe sandbox runbook documentation.
|
|
14
|
+
- Update the SSR site base configuration.
|
|
15
|
+
|
|
3
16
|
## 5.1.182
|
|
4
17
|
|
|
5
18
|
### Improvements
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Next } from 'vona';
|
|
2
2
|
import type { IDecoratorGuardOptionsGlobal, IGuardExecute } from 'vona-module-a-aspect';
|
|
3
3
|
|
|
4
|
-
import { BeanBase, Global, useApp } from 'vona';
|
|
4
|
+
import { $protocolKey, BeanBase, Global, useApp } from 'vona';
|
|
5
5
|
import { Guard } from 'vona-module-a-aspect';
|
|
6
6
|
|
|
7
7
|
const app = useApp();
|
|
@@ -40,12 +40,19 @@ export interface IGuardOptionsDemonstration extends IDecoratorGuardOptionsGlobal
|
|
|
40
40
|
'/home/user/passport/createPassportJwtFromOauthCode',
|
|
41
41
|
'/home/user/passport/createTempAuthToken',
|
|
42
42
|
'/auth/passport/callback',
|
|
43
|
+
'/auth/mock/authorize',
|
|
44
|
+
'/captcha/create',
|
|
45
|
+
'/image/upload-policy',
|
|
46
|
+
'/file/upload-policy',
|
|
43
47
|
],
|
|
44
48
|
dependencies: 'a-user:passport',
|
|
45
49
|
})
|
|
46
50
|
@Global()
|
|
47
51
|
export class GuardDemonstration extends BeanBase implements IGuardExecute {
|
|
48
52
|
async execute(options: IGuardOptionsDemonstration, next: Next): Promise<boolean> {
|
|
53
|
+
const headerOpenapiSchema = this.ctx.headers[$protocolKey('x-vona-openapi-schema')];
|
|
54
|
+
if (headerOpenapiSchema?.toString() === 'true') return next();
|
|
55
|
+
|
|
49
56
|
const method = this.ctx.method.toUpperCase();
|
|
50
57
|
if (!options.methodsForWrite.some(item => item.toUpperCase() === method)) {
|
|
51
58
|
return next();
|
|
@@ -185,7 +185,9 @@ export class BeanSsrSiteBase<
|
|
|
185
185
|
const onionOptions = this.$onionOptions as IDecoratorSsrSiteOptions;
|
|
186
186
|
const SSR_WITH_VONA = 'true';
|
|
187
187
|
const META_MODE: ZovaMetaMode =
|
|
188
|
-
|
|
188
|
+
this.app.meta.env.META_MODE === 'dev' || this.app.meta.env.DEMONSTRATION_ENABLED === 'true'
|
|
189
|
+
? 'development'
|
|
190
|
+
: 'production';
|
|
189
191
|
const baseUrl = `${this.app.util.protocol}://${this.app.util.host}`;
|
|
190
192
|
this._siteOptions = deepExtend(
|
|
191
193
|
{
|