@simitgroup/simpleapp-generator 2.0.0-m-alpha → 2.0.0-n-alpha

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/ReleaseNote.md CHANGED
@@ -1,3 +1,7 @@
1
+ [2.0.0n-alpha]
2
+ 1. fix bugs on declare generator version
3
+ 2. show generator version on swagger ui
4
+
1
5
  [2.0.0m-alpha]
2
6
  1. support before/after patch resource
3
7
  2. fix auto increament bugs cause cannot create branch and tenant
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@simitgroup/simpleapp-generator",
3
- "version": "2.0.0m-alpha",
3
+ "version": "2.0.0n-alpha",
4
4
  "description": "frontend nuxtjs and backend nests code generator using jsonschema",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
@@ -9,14 +9,14 @@ import { NestFactory } from '@nestjs/core';
9
9
  import { AppModule } from './app.module';
10
10
  import { SimpleAppExceptionFilter } from './simple-app/_core/framework/exception-filter';
11
11
  import { HttpAdapterHost } from '@nestjs/core';
12
-
12
+ import {generatorVersion} from 'src/simple-app/_core/framework/generator-version'
13
13
  import { SwaggerModule, DocumentBuilder } from '@nestjs/swagger';
14
- import {writeFileSync} from 'fs';
14
+ import { writeFileSync } from 'fs';
15
15
  import { LogLevel } from '@nestjs/common';
16
16
  const yaml = require('yaml');
17
17
 
18
18
  async function bootstrap() {
19
- const logs:LogLevel[] = String(process.env.LOGGER).split(',') as LogLevel[]
19
+ const logs: LogLevel[] = String(process.env.LOGGER).split(',') as LogLevel[];
20
20
  const app = await NestFactory.create(AppModule, {
21
21
  logger: logs,
22
22
  });
@@ -28,7 +28,7 @@ async function bootstrap() {
28
28
  const config = new DocumentBuilder()
29
29
  .setTitle(process.env.PROJECT_NAME)
30
30
  .addServer(process.env.BACKEND_URL)
31
- .setDescription(process.env.PROJECT_DESCRIPTION)
31
+ .setDescription(`${process.env.PROJECT_DESCRIPTION} (generator: ${generatorVersion})`)
32
32
  .setVersion(process.env.PROJECT_VERSION)
33
33
  .addApiKey(
34
34
  {
@@ -50,8 +50,8 @@ async function bootstrap() {
50
50
  },
51
51
  },
52
52
  'oauth2',
53
- ).
54
- addApiKey(
53
+ )
54
+ .addApiKey(
55
55
  {
56
56
  in: 'header',
57
57
  name: 'x-api-key',
@@ -59,7 +59,8 @@ async function bootstrap() {
59
59
  description: 'optional only use for specal case',
60
60
  },
61
61
  'x-api-key',
62
- ).addApiKey(
62
+ )
63
+ .addApiKey(
63
64
  {
64
65
  in: 'header',
65
66
  name: 'x-api-secret',
@@ -77,12 +78,12 @@ async function bootstrap() {
77
78
  },
78
79
  'x-guest-accesstoken',
79
80
  )
80
-
81
+
81
82
  .addSecurityRequirements('x-org')
82
83
  .addSecurityRequirements('oauth2')
83
84
  .addSecurityRequirements('x-api-key')
84
- .addSecurityRequirements('x-api-secret')
85
- .addSecurityRequirements('x-guest-accesstoken')
85
+ .addSecurityRequirements('x-api-secret')
86
+ .addSecurityRequirements('x-guest-accesstoken')
86
87
  .build();
87
88
  const document = SwaggerModule.createDocument(app, config);
88
89
  SwaggerModule.setup('api', app, document, {
@@ -90,7 +91,7 @@ async function bootstrap() {
90
91
  });
91
92
 
92
93
  writeFileSync('./openapi.yaml', yaml.stringify(document));
93
-
94
+
94
95
  await app.listen(process.env.HTTP_PORT ?? 8000); //listen which port
95
96
  }
96
97
  bootstrap();
@@ -1 +1 @@
1
- export generatorVersion='<%=it.version%>'
1
+ export const generatorVersion='<%=it.version%>'
@@ -89,6 +89,7 @@
89
89
  {{ t("more") }}
90
90
  <p class="text-danger-600">{{ t("onlyAppearInDebugMode") }}</p>
91
91
  <p class="text-danger-600">{{ getUserProfile().sessionId }}</p>
92
+ <div>generator: {{generatorVersion}} </div>
92
93
  </dt>
93
94
  <dd
94
95
  class="mt-1 text-sm leading-6 text-gray-700 sm:col-span-2 sm:mt-0"
@@ -1 +1 @@
1
- export generatorVersion='<%=it.version%>'
1
+ export const generatorVersion='<%=it.version%>'