openxiangda-cli 2.0.0-alpha.70 → 2.0.0-alpha.71

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "openxiangda-cli",
3
- "version": "2.0.0-alpha.70",
3
+ "version": "2.0.0-alpha.71",
4
4
  "description": "Thin application-level CLI for OpenXiangda 2.0.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -15,7 +15,7 @@
15
15
  "@nestjs/common": "11.1.29",
16
16
  "@nestjs/core": "11.1.29",
17
17
  "@nestjs/platform-fastify": "11.1.29",
18
- "openxiangda-nest": "2.0.0-alpha.39",
18
+ "openxiangda-nest": "2.0.0-alpha.40",
19
19
  "reflect-metadata": "0.2.2",
20
20
  "rxjs": "7.8.2"
21
21
  },
@@ -1,18 +1,5 @@
1
1
  import 'reflect-metadata';
2
- import { NestFactory } from '@nestjs/core';
3
- import {
4
- FastifyAdapter,
5
- type NestFastifyApplication,
6
- } from '@nestjs/platform-fastify';
2
+ import { bootstrapOpenXiangdaApplication } from 'openxiangda-nest';
7
3
  import { AppModule } from './app.module.js';
8
4
 
9
- const app = await NestFactory.create<NestFastifyApplication>(
10
- AppModule,
11
- new FastifyAdapter({ trustProxy: true })
12
- );
13
- app.enableShutdownHooks();
14
- const production = process.env.NODE_ENV === 'production';
15
- await app.listen(
16
- Number(process.env.OPENXIANGDA_APP_PORT || process.env.PORT || 3000),
17
- production ? '0.0.0.0' : '127.0.0.1'
18
- );
5
+ await bootstrapOpenXiangdaApplication(AppModule);
@@ -4,7 +4,10 @@ import test from 'node:test';
4
4
 
5
5
  test('the clean server template only owns platform bootstrap', () => {
6
6
  const source = readFileSync(new URL('../src/app.module.ts', import.meta.url), 'utf8');
7
+ const main = readFileSync(new URL('../src/main.ts', import.meta.url), 'utf8');
7
8
  assert.match(source, /OpenXiangdaModule\.forRoot/);
9
+ assert.match(main, /bootstrapOpenXiangdaApplication\(AppModule\)/);
10
+ assert.doesNotMatch(main, /NestFactory|FastifyAdapter/);
8
11
  const legacyMarkers = ['oauth' + 'Client', 'event' + 'Signing', 'Workflow', 'instrument' + '-context'];
9
12
  assert.doesNotMatch(source, new RegExp(legacyMarkers.join('|')));
10
13
  assert.doesNotMatch(source, /createData|updateData|deleteData|queryData/);
@@ -22,7 +22,7 @@
22
22
  "build": "pnpm --recursive build"
23
23
  },
24
24
  "devDependencies": {
25
- "openxiangda-cli": "2.0.0-alpha.70",
25
+ "openxiangda-cli": "2.0.0-alpha.71",
26
26
  "openxiangda-contracts": "2.0.0-alpha.33",
27
27
  "openxiangda-devkit-core": "2.0.0-alpha.43",
28
28
  "typescript": "5.9.3"