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 CHANGED
@@ -1 +1 @@
1
- 5.1.182
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,6 +1,6 @@
1
1
  {
2
2
  "name": "cabloy",
3
- "version": "5.1.182",
3
+ "version": "5.1.184",
4
4
  "gitHead": "2c5c19284bab738e492856189acb6fad74b8a7b7",
5
5
  "description": "A Node.js fullstack framework",
6
6
  "keywords": [
@@ -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();
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vona-module-a-ssr",
3
- "version": "5.1.31",
3
+ "version": "5.1.32",
4
4
  "gitHead": "a79189b882c17af5911573896a781bbb0046d37d",
5
5
  "description": "",
6
6
  "keywords": [
@@ -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
- process.env.META_MODE === 'dev' ? 'development' : 'production';
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
  {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vona-suite-a-cabloy",
3
- "version": "5.1.55",
3
+ "version": "5.1.56",
4
4
  "gitHead": "a79189b882c17af5911573896a781bbb0046d37d",
5
5
  "description": "",
6
6
  "author": "",