create-analog 3.0.0-beta.25 → 3.0.0-beta.26
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/files/nestjs/src/server/main.ts +16 -20
- package/index.js +1 -0
- package/package.json +4 -4
- package/template-angular-v20/package.json +6 -6
- package/template-angular-v21/package.json +5 -5
- package/template-blog/package.json +6 -6
- package/template-latest/package.json +6 -6
- package/template-minimal/package.json +6 -6
|
@@ -2,33 +2,29 @@ import 'reflect-metadata';
|
|
|
2
2
|
import { NestFactory } from '@nestjs/core';
|
|
3
3
|
import type { NestExpressApplication } from '@nestjs/platform-express';
|
|
4
4
|
import { fileURLToPath } from 'node:url';
|
|
5
|
+
import { toFetchHandler } from 'srvx/node';
|
|
5
6
|
|
|
6
7
|
import { AppModule } from './app.module';
|
|
7
8
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
});
|
|
9
|
+
// Keeps the request body for Analog after Nest's body parsers have run.
|
|
10
|
+
const app = await NestFactory.create<NestExpressApplication>(AppModule, {
|
|
11
|
+
rawBody: true,
|
|
12
|
+
});
|
|
13
13
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
return app.init();
|
|
14
|
+
// Vite serves client files in development.
|
|
15
|
+
if (!import.meta.env.DEV) {
|
|
16
|
+
const clientDir = fileURLToPath(new URL('../client', import.meta.url));
|
|
17
|
+
app.useStaticAssets(clientDir, { index: false });
|
|
21
18
|
}
|
|
22
19
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
return {
|
|
26
|
-
handle: app.getHttpAdapter().getInstance(),
|
|
27
|
-
close: () => app.close(),
|
|
28
|
-
};
|
|
29
|
-
}
|
|
20
|
+
await app.init();
|
|
21
|
+
const server = app.getHttpAdapter().getInstance();
|
|
30
22
|
|
|
31
23
|
if (!import.meta.env.DEV) {
|
|
32
|
-
const app = await createNestApp();
|
|
33
24
|
await app.listen(process.env['PORT'] ?? 3000);
|
|
34
25
|
}
|
|
26
|
+
|
|
27
|
+
export default {
|
|
28
|
+
fetch: toFetchHandler((req, res) => server(req, res)),
|
|
29
|
+
close: () => app.close(),
|
|
30
|
+
};
|
package/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-analog",
|
|
3
|
-
"version": "3.0.0-beta.
|
|
3
|
+
"version": "3.0.0-beta.26",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Brandon Roberts",
|
|
@@ -39,9 +39,9 @@
|
|
|
39
39
|
"prompts": "^2.4.2"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
|
-
"@analogjs/platform": "3.0.0-beta.
|
|
43
|
-
"@analogjs/vite-plugin-angular": "3.0.0-beta.
|
|
44
|
-
"@analogjs/vite-plugin-nitro": "3.0.0-beta.
|
|
42
|
+
"@analogjs/platform": "3.0.0-beta.26",
|
|
43
|
+
"@analogjs/vite-plugin-angular": "3.0.0-beta.26",
|
|
44
|
+
"@analogjs/vite-plugin-nitro": "3.0.0-beta.26",
|
|
45
45
|
"h3": "^1.15.11"
|
|
46
46
|
},
|
|
47
47
|
"publishConfig": {
|
|
@@ -16,8 +16,8 @@
|
|
|
16
16
|
},
|
|
17
17
|
"private": true,
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@analogjs/content": "^3.0.0-beta.
|
|
20
|
-
"@analogjs/router": "^3.0.0-beta.
|
|
19
|
+
"@analogjs/content": "^3.0.0-beta.26",
|
|
20
|
+
"@analogjs/router": "^3.0.0-beta.26",
|
|
21
21
|
"@angular/animations": "^20.0.0",
|
|
22
22
|
"@angular/common": "^20.0.0",
|
|
23
23
|
"@angular/compiler": "^20.0.0",
|
|
@@ -37,10 +37,10 @@
|
|
|
37
37
|
"zone.js": "~0.15.0"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
|
-
"@analogjs/platform": "^3.0.0-beta.
|
|
41
|
-
"@analogjs/vite-plugin-angular": "^3.0.0-beta.
|
|
42
|
-
"@analogjs/vite-plugin-nitro": "^3.0.0-beta.
|
|
43
|
-
"@analogjs/vitest-angular": "^3.0.0-beta.
|
|
40
|
+
"@analogjs/platform": "^3.0.0-beta.26",
|
|
41
|
+
"@analogjs/vite-plugin-angular": "^3.0.0-beta.26",
|
|
42
|
+
"@analogjs/vite-plugin-nitro": "^3.0.0-beta.26",
|
|
43
|
+
"@analogjs/vitest-angular": "^3.0.0-beta.26",
|
|
44
44
|
"@angular-devkit/build-angular": "^20.0.0",
|
|
45
45
|
"@angular/build": "^20.0.0",
|
|
46
46
|
"@angular/cli": "^20.0.0",
|
|
@@ -16,8 +16,8 @@
|
|
|
16
16
|
},
|
|
17
17
|
"private": true,
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@analogjs/content": "^3.0.0-beta.
|
|
20
|
-
"@analogjs/router": "^3.0.0-beta.
|
|
19
|
+
"@analogjs/content": "^3.0.0-beta.26",
|
|
20
|
+
"@analogjs/router": "^3.0.0-beta.26",
|
|
21
21
|
"@angular/animations": "^21.0.0",
|
|
22
22
|
"@angular/common": "^21.0.0",
|
|
23
23
|
"@angular/compiler": "^21.0.0",
|
|
@@ -36,9 +36,9 @@
|
|
|
36
36
|
"tslib": "^2.3.0"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
|
-
"@analogjs/platform": "^3.0.0-beta.
|
|
40
|
-
"@analogjs/vite-plugin-angular": "^3.0.0-beta.
|
|
41
|
-
"@analogjs/vitest-angular": "^3.0.0-beta.
|
|
39
|
+
"@analogjs/platform": "^3.0.0-beta.26",
|
|
40
|
+
"@analogjs/vite-plugin-angular": "^3.0.0-beta.26",
|
|
41
|
+
"@analogjs/vitest-angular": "^3.0.0-beta.26",
|
|
42
42
|
"@angular/build": "^21.0.0",
|
|
43
43
|
"@angular/cli": "^21.0.0",
|
|
44
44
|
"@angular/compiler-cli": "^21.0.0",
|
|
@@ -16,8 +16,8 @@
|
|
|
16
16
|
},
|
|
17
17
|
"private": true,
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@analogjs/content": "^3.0.0-beta.
|
|
20
|
-
"@analogjs/router": "^3.0.0-beta.
|
|
19
|
+
"@analogjs/content": "^3.0.0-beta.26",
|
|
20
|
+
"@analogjs/router": "^3.0.0-beta.26",
|
|
21
21
|
"@angular/animations": "^22.0.0",
|
|
22
22
|
"@angular/common": "^22.0.0",
|
|
23
23
|
"@angular/compiler": "^22.0.0",
|
|
@@ -35,10 +35,10 @@
|
|
|
35
35
|
"tslib": "^2.3.0"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
|
-
"@analogjs/platform": "^3.0.0-beta.
|
|
39
|
-
"@analogjs/vite-plugin-angular": "^3.0.0-beta.
|
|
40
|
-
"@analogjs/vite-plugin-nitro": "^3.0.0-beta.
|
|
41
|
-
"@analogjs/vitest-angular": "^3.0.0-beta.
|
|
38
|
+
"@analogjs/platform": "^3.0.0-beta.26",
|
|
39
|
+
"@analogjs/vite-plugin-angular": "^3.0.0-beta.26",
|
|
40
|
+
"@analogjs/vite-plugin-nitro": "^3.0.0-beta.26",
|
|
41
|
+
"@analogjs/vitest-angular": "^3.0.0-beta.26",
|
|
42
42
|
"@angular/build": "^22.0.0",
|
|
43
43
|
"@angular/cli": "^22.0.0",
|
|
44
44
|
"@angular/compiler-cli": "^22.0.0",
|
|
@@ -16,8 +16,8 @@
|
|
|
16
16
|
},
|
|
17
17
|
"private": true,
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@analogjs/content": "^3.0.0-beta.
|
|
20
|
-
"@analogjs/router": "^3.0.0-beta.
|
|
19
|
+
"@analogjs/content": "^3.0.0-beta.26",
|
|
20
|
+
"@analogjs/router": "^3.0.0-beta.26",
|
|
21
21
|
"@angular/animations": "^22.0.0",
|
|
22
22
|
"@angular/common": "^22.0.0",
|
|
23
23
|
"@angular/compiler": "^22.0.0",
|
|
@@ -36,10 +36,10 @@
|
|
|
36
36
|
"tslib": "^2.3.0"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
|
-
"@analogjs/platform": "^3.0.0-beta.
|
|
40
|
-
"@analogjs/vite-plugin-angular": "^3.0.0-beta.
|
|
41
|
-
"@analogjs/vite-plugin-nitro": "^3.0.0-beta.
|
|
42
|
-
"@analogjs/vitest-angular": "^3.0.0-beta.
|
|
39
|
+
"@analogjs/platform": "^3.0.0-beta.26",
|
|
40
|
+
"@analogjs/vite-plugin-angular": "^3.0.0-beta.26",
|
|
41
|
+
"@analogjs/vite-plugin-nitro": "^3.0.0-beta.26",
|
|
42
|
+
"@analogjs/vitest-angular": "^3.0.0-beta.26",
|
|
43
43
|
"@angular/build": "^22.0.0",
|
|
44
44
|
"@angular/cli": "^22.0.0",
|
|
45
45
|
"@angular/compiler-cli": "^22.0.0",
|
|
@@ -16,8 +16,8 @@
|
|
|
16
16
|
},
|
|
17
17
|
"private": true,
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@analogjs/content": "^3.0.0-beta.
|
|
20
|
-
"@analogjs/router": "^3.0.0-beta.
|
|
19
|
+
"@analogjs/content": "^3.0.0-beta.26",
|
|
20
|
+
"@analogjs/router": "^3.0.0-beta.26",
|
|
21
21
|
"@angular/animations": "^22.0.0",
|
|
22
22
|
"@angular/common": "^22.0.0",
|
|
23
23
|
"@angular/compiler": "^22.0.0",
|
|
@@ -36,10 +36,10 @@
|
|
|
36
36
|
"tslib": "^2.3.0"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
|
-
"@analogjs/platform": "^3.0.0-beta.
|
|
40
|
-
"@analogjs/vite-plugin-angular": "^3.0.0-beta.
|
|
41
|
-
"@analogjs/vite-plugin-nitro": "^3.0.0-beta.
|
|
42
|
-
"@analogjs/vitest-angular": "^3.0.0-beta.
|
|
39
|
+
"@analogjs/platform": "^3.0.0-beta.26",
|
|
40
|
+
"@analogjs/vite-plugin-angular": "^3.0.0-beta.26",
|
|
41
|
+
"@analogjs/vite-plugin-nitro": "^3.0.0-beta.26",
|
|
42
|
+
"@analogjs/vitest-angular": "^3.0.0-beta.26",
|
|
43
43
|
"@angular/build": "^22.0.0",
|
|
44
44
|
"@angular/cli": "^22.0.0",
|
|
45
45
|
"@angular/compiler-cli": "^22.0.0",
|