@codedazur/cdk-next-app 0.0.1 → 0.0.2
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/.turbo/turbo-lint.log +11 -11
- package/.turbo/turbo-test.log +1 -1
- package/CHANGELOG.md +6 -0
- package/constructs/NextApp.ts +63 -63
- package/index.ts +13 -0
- package/package.json +4 -4
package/.turbo/turbo-lint.log
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
|
|
2
|
-
> @codedazur/cdk-next-app@0.0.
|
|
2
|
+
> @codedazur/cdk-next-app@0.0.2 lint
|
|
3
3
|
> TIMING=1 eslint "**/*.ts*"
|
|
4
4
|
|
|
5
5
|
Rule | Time (ms) | Relative
|
|
6
6
|
:------------------------------|----------:|--------:
|
|
7
|
-
react/display-name |
|
|
8
|
-
|
|
9
|
-
react/no-
|
|
10
|
-
react
|
|
11
|
-
react/
|
|
12
|
-
react/no-deprecated | 0.
|
|
13
|
-
|
|
14
|
-
react-hooks/exhaustive-deps | 0.
|
|
15
|
-
react/jsx-no-comment-textnodes | 0.
|
|
16
|
-
react/no-render-return-value | 0.
|
|
7
|
+
react/display-name | 110.889 | 76.6%
|
|
8
|
+
turbo/no-undeclared-env-vars | 14.348 | 9.9%
|
|
9
|
+
react/no-direct-mutation-state | 10.400 | 7.2%
|
|
10
|
+
react/require-render-return | 4.000 | 2.8%
|
|
11
|
+
react/no-string-refs | 1.033 | 0.7%
|
|
12
|
+
react/no-deprecated | 0.883 | 0.6%
|
|
13
|
+
react-hooks/rules-of-hooks | 0.540 | 0.4%
|
|
14
|
+
react-hooks/exhaustive-deps | 0.275 | 0.2%
|
|
15
|
+
react/jsx-no-comment-textnodes | 0.272 | 0.2%
|
|
16
|
+
react/no-render-return-value | 0.214 | 0.1%
|
package/.turbo/turbo-test.log
CHANGED
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @codedazur/cdk-next-app
|
|
2
2
|
|
|
3
|
+
## 0.0.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`43029b6`](https://github.com/codedazur/toolkit/commit/43029b6f7d19422d889c0c608efd0064d584c2f3) Thanks [@thijsdaniels](https://github.com/thijsdaniels)! - Added a main index file.
|
|
8
|
+
|
|
3
9
|
## 0.0.1
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
package/constructs/NextApp.ts
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { Construct } from "constructs";
|
|
2
2
|
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
3
|
+
AmplifyApp,
|
|
4
|
+
AmplifyAppProps,
|
|
5
|
+
Framework,
|
|
6
|
+
Platform,
|
|
7
|
+
RewriteStatus,
|
|
8
8
|
} from "@codedazur/cdk-amplify-app";
|
|
9
9
|
|
|
10
10
|
export interface NextAppProps
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
11
|
+
extends Omit<
|
|
12
|
+
AmplifyAppProps,
|
|
13
|
+
"platform" | "framework" | "buildSpec" | "headers"
|
|
14
|
+
> {}
|
|
15
15
|
|
|
16
16
|
/**
|
|
17
17
|
* @todo Document that if this is used with a monorepo, the `next.config.js`
|
|
@@ -29,58 +29,58 @@ export interface NextAppProps
|
|
|
29
29
|
* @see https://nextjs.org/docs/advanced-features/output-file-tracing#caveats
|
|
30
30
|
*/
|
|
31
31
|
export class NextApp extends AmplifyApp {
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
32
|
+
constructor(scope: Construct, id: string, props: NextAppProps) {
|
|
33
|
+
super(scope, id, {
|
|
34
|
+
platform: Platform.WEB_COMPUTE,
|
|
35
|
+
framework: Framework.NEXTJS_SSR,
|
|
36
|
+
buildSpec: {
|
|
37
|
+
version: 1,
|
|
38
|
+
applications: [
|
|
39
|
+
{
|
|
40
|
+
appRoot: props.source.directory,
|
|
41
|
+
frontend: {
|
|
42
|
+
phases: {
|
|
43
|
+
preBuild: {
|
|
44
|
+
commands: [
|
|
45
|
+
"npm config set //registry.npmjs.org/:_authToken ${NPM_TOKEN}",
|
|
46
|
+
"npm install",
|
|
47
|
+
],
|
|
48
|
+
},
|
|
49
|
+
build: {
|
|
50
|
+
commands: ["npm run build"],
|
|
51
|
+
},
|
|
52
|
+
postBuild: {
|
|
53
|
+
commands: [
|
|
54
|
+
/**
|
|
55
|
+
* This command moves the Next.js `standalone` directory
|
|
56
|
+
* into the right location for AWS to recognize it.
|
|
57
|
+
* @todo Remove this command when AWS has implemented a fix.
|
|
58
|
+
* @see https://github.com/aws-amplify/amplify-hosting/issues/3179
|
|
59
|
+
*/
|
|
60
|
+
`cp -r .next/standalone/${props.source.directory}/. .next/standalone`,
|
|
61
|
+
],
|
|
62
|
+
},
|
|
63
|
+
},
|
|
64
|
+
artifacts: {
|
|
65
|
+
baseDirectory: ".next",
|
|
66
|
+
files: ["**/*"],
|
|
67
|
+
},
|
|
68
|
+
cache: {
|
|
69
|
+
paths: ["node_modules/**/*"],
|
|
70
|
+
},
|
|
71
|
+
},
|
|
72
|
+
},
|
|
73
|
+
],
|
|
74
|
+
},
|
|
75
|
+
rewrites: [
|
|
76
|
+
{
|
|
77
|
+
source: "/<*>",
|
|
78
|
+
status: RewriteStatus.NOT_FOUND,
|
|
79
|
+
target: "/index.html",
|
|
80
|
+
},
|
|
81
|
+
...(props.rewrites ?? []),
|
|
82
|
+
],
|
|
83
|
+
...props,
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
86
|
}
|
package/index.ts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export {
|
|
2
|
+
type GitSource,
|
|
3
|
+
type GitRegistry,
|
|
4
|
+
type Environment,
|
|
5
|
+
type Rewrite,
|
|
6
|
+
type RewriteStatus,
|
|
7
|
+
type Redirect,
|
|
8
|
+
type RedirectStatus,
|
|
9
|
+
type BasicAuth,
|
|
10
|
+
type Branch,
|
|
11
|
+
} from "@codedazur/cdk-amplify-app";
|
|
12
|
+
|
|
13
|
+
export * from "./constructs/NextApp";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codedazur/cdk-next-app",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.2",
|
|
4
4
|
"main": "./index.ts",
|
|
5
5
|
"types": "./index.ts",
|
|
6
6
|
"license": "MIT",
|
|
@@ -17,13 +17,13 @@
|
|
|
17
17
|
"constructs": ">=10"
|
|
18
18
|
},
|
|
19
19
|
"devDependencies": {
|
|
20
|
-
"@types/node": "^16.18.3",
|
|
20
|
+
"@types/node": "^16.18.3 || ^18.18.0",
|
|
21
21
|
"aws-cdk-lib": "^2.55.1",
|
|
22
22
|
"constructs": "^10.1.194",
|
|
23
|
-
"esbuild": "^0.16.9",
|
|
23
|
+
"esbuild": "^0.16.9 || ^0.19.1",
|
|
24
24
|
"eslint": "^8.30.0",
|
|
25
25
|
"eslint-config-custom": "*",
|
|
26
26
|
"tsconfig": "*",
|
|
27
|
-
"typescript": "^4.9.4"
|
|
27
|
+
"typescript": "^4.9.4 || ^5.2.2"
|
|
28
28
|
}
|
|
29
29
|
}
|