@anthusai/papyrus 1.0.0-next.21 → 1.0.0-next.22
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/infra/build-specs.js +7 -3
- package/infra/build-specs.ts +7 -3
- package/package.json +1 -1
- package/routes.manifest.json +1 -1
package/infra/build-specs.js
CHANGED
|
@@ -15,7 +15,7 @@ function commandLines(commands, indent) {
|
|
|
15
15
|
const NPM_CLEAN_INSTALL = "npm ci --cache .npm --prefer-offline";
|
|
16
16
|
const FRONTEND_ENVIRONMENT_CAPTURE = "env | grep -e '^PAPYRUS_' -e '^SITE_ENV=' -e '^NEXT_PUBLIC_' >> .env.production";
|
|
17
17
|
const CHECKOUT_AS_PAPYRUS_ROOT = "PAPYRUS_ROOT=\"$PWD\"";
|
|
18
|
-
const
|
|
18
|
+
const RUNTIME_OUTPUTS_COMMANDS = [
|
|
19
19
|
"cp amplify_outputs.json .next/amplify_outputs.json",
|
|
20
20
|
"echo PAPYRUS_AMPLIFY_OUTPUTS=.next/amplify_outputs.json >> .env.production",
|
|
21
21
|
];
|
|
@@ -55,7 +55,11 @@ export function cmsProductionBuildSpec(config) {
|
|
|
55
55
|
"if [ -z \"${PAPYRUS_CONSOLE_RESPONDER_IMAGE_URI:-}\" ]; then export PAPYRUS_CONSOLE_RESPONDER_ALLOW_LOCAL_BUILD=true; fi",
|
|
56
56
|
"npx ampx pipeline-deploy --branch $AWS_BRANCH --app-id $AWS_APP_ID",
|
|
57
57
|
], " "),
|
|
58
|
-
...frontendSection([], [
|
|
58
|
+
...frontendSection([], [
|
|
59
|
+
FRONTEND_ENVIRONMENT_CAPTURE,
|
|
60
|
+
"npx papyrus-app sync && npm run build",
|
|
61
|
+
...(config.frontend === "pretext" ? RUNTIME_OUTPUTS_COMMANDS : []),
|
|
62
|
+
], ".next", [".next/cache/**/*", ".npm/**/*"]),
|
|
59
63
|
].join("\n") + "\n";
|
|
60
64
|
}
|
|
61
65
|
export function cmsStagingBuildSpec(config) {
|
|
@@ -71,7 +75,7 @@ export function cmsStagingBuildSpec(config) {
|
|
|
71
75
|
...frontendSection(preBuild, [
|
|
72
76
|
FRONTEND_ENVIRONMENT_CAPTURE,
|
|
73
77
|
"npx papyrus-app sync && npm run build",
|
|
74
|
-
...
|
|
78
|
+
...RUNTIME_OUTPUTS_COMMANDS,
|
|
75
79
|
], ".next", cachePaths),
|
|
76
80
|
].join("\n") + "\n";
|
|
77
81
|
}
|
package/infra/build-specs.ts
CHANGED
|
@@ -24,7 +24,7 @@ const FRONTEND_ENVIRONMENT_CAPTURE =
|
|
|
24
24
|
|
|
25
25
|
const CHECKOUT_AS_PAPYRUS_ROOT = "PAPYRUS_ROOT=\"$PWD\"";
|
|
26
26
|
|
|
27
|
-
const
|
|
27
|
+
const RUNTIME_OUTPUTS_COMMANDS = [
|
|
28
28
|
"cp amplify_outputs.json .next/amplify_outputs.json",
|
|
29
29
|
"echo PAPYRUS_AMPLIFY_OUTPUTS=.next/amplify_outputs.json >> .env.production",
|
|
30
30
|
];
|
|
@@ -83,7 +83,11 @@ export function cmsProductionBuildSpec(config: AmplifyAppShellSiteConfig): strin
|
|
|
83
83
|
),
|
|
84
84
|
...frontendSection(
|
|
85
85
|
[],
|
|
86
|
-
[
|
|
86
|
+
[
|
|
87
|
+
FRONTEND_ENVIRONMENT_CAPTURE,
|
|
88
|
+
"npx papyrus-app sync && npm run build",
|
|
89
|
+
...(config.frontend === "pretext" ? RUNTIME_OUTPUTS_COMMANDS : []),
|
|
90
|
+
],
|
|
87
91
|
".next",
|
|
88
92
|
[".next/cache/**/*", ".npm/**/*"],
|
|
89
93
|
),
|
|
@@ -110,7 +114,7 @@ export function cmsStagingBuildSpec(config: AmplifyAppShellSiteConfig): string {
|
|
|
110
114
|
[
|
|
111
115
|
FRONTEND_ENVIRONMENT_CAPTURE,
|
|
112
116
|
"npx papyrus-app sync && npm run build",
|
|
113
|
-
...
|
|
117
|
+
...RUNTIME_OUTPUTS_COMMANDS,
|
|
114
118
|
],
|
|
115
119
|
".next",
|
|
116
120
|
cachePaths,
|
package/package.json
CHANGED
package/routes.manifest.json
CHANGED