@anthusai/papyrus 1.0.0-next.24 → 1.0.0-next.25
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 +6 -6
- package/infra/build-specs.ts +8 -6
- package/package.json +1 -1
- package/routes.manifest.json +1 -1
package/infra/build-specs.js
CHANGED
|
@@ -15,10 +15,8 @@ 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
|
|
19
|
-
|
|
20
|
-
"echo PAPYRUS_AMPLIFY_OUTPUTS=.next/amplify_outputs.json >> .env.production",
|
|
21
|
-
];
|
|
18
|
+
const RUNTIME_OUTPUTS_ENVIRONMENT = "echo PAPYRUS_AMPLIFY_OUTPUTS=.next/amplify_outputs.json >> .env.production";
|
|
19
|
+
const RUNTIME_OUTPUTS_COPY = "cp amplify_outputs.json .next/amplify_outputs.json";
|
|
22
20
|
function pythonProvisioningCommands(config) {
|
|
23
21
|
return [
|
|
24
22
|
"export UV_CACHE_DIR=\"$PWD/.uv-cache\"",
|
|
@@ -57,8 +55,9 @@ export function cmsProductionBuildSpec(config) {
|
|
|
57
55
|
], " "),
|
|
58
56
|
...frontendSection([], [
|
|
59
57
|
FRONTEND_ENVIRONMENT_CAPTURE,
|
|
58
|
+
...(config.frontend === "pretext" ? [RUNTIME_OUTPUTS_ENVIRONMENT] : []),
|
|
60
59
|
"npx papyrus-app sync && npm run build",
|
|
61
|
-
...(config.frontend === "pretext" ?
|
|
60
|
+
...(config.frontend === "pretext" ? [RUNTIME_OUTPUTS_COPY] : []),
|
|
62
61
|
], ".next", [".next/cache/**/*", ".npm/**/*"]),
|
|
63
62
|
].join("\n") + "\n";
|
|
64
63
|
}
|
|
@@ -74,8 +73,9 @@ export function cmsStagingBuildSpec(config) {
|
|
|
74
73
|
"version: 1",
|
|
75
74
|
...frontendSection(preBuild, [
|
|
76
75
|
FRONTEND_ENVIRONMENT_CAPTURE,
|
|
76
|
+
RUNTIME_OUTPUTS_ENVIRONMENT,
|
|
77
77
|
"npx papyrus-app sync && npm run build",
|
|
78
|
-
|
|
78
|
+
RUNTIME_OUTPUTS_COPY,
|
|
79
79
|
], ".next", cachePaths),
|
|
80
80
|
].join("\n") + "\n";
|
|
81
81
|
}
|
package/infra/build-specs.ts
CHANGED
|
@@ -24,10 +24,10 @@ const FRONTEND_ENVIRONMENT_CAPTURE =
|
|
|
24
24
|
|
|
25
25
|
const CHECKOUT_AS_PAPYRUS_ROOT = "PAPYRUS_ROOT=\"$PWD\"";
|
|
26
26
|
|
|
27
|
-
const
|
|
28
|
-
"
|
|
29
|
-
|
|
30
|
-
|
|
27
|
+
const RUNTIME_OUTPUTS_ENVIRONMENT =
|
|
28
|
+
"echo PAPYRUS_AMPLIFY_OUTPUTS=.next/amplify_outputs.json >> .env.production";
|
|
29
|
+
|
|
30
|
+
const RUNTIME_OUTPUTS_COPY = "cp amplify_outputs.json .next/amplify_outputs.json";
|
|
31
31
|
|
|
32
32
|
function pythonProvisioningCommands(config: AmplifyAppShellSiteConfig): string[] {
|
|
33
33
|
return [
|
|
@@ -85,8 +85,9 @@ export function cmsProductionBuildSpec(config: AmplifyAppShellSiteConfig): strin
|
|
|
85
85
|
[],
|
|
86
86
|
[
|
|
87
87
|
FRONTEND_ENVIRONMENT_CAPTURE,
|
|
88
|
+
...(config.frontend === "pretext" ? [RUNTIME_OUTPUTS_ENVIRONMENT] : []),
|
|
88
89
|
"npx papyrus-app sync && npm run build",
|
|
89
|
-
...(config.frontend === "pretext" ?
|
|
90
|
+
...(config.frontend === "pretext" ? [RUNTIME_OUTPUTS_COPY] : []),
|
|
90
91
|
],
|
|
91
92
|
".next",
|
|
92
93
|
[".next/cache/**/*", ".npm/**/*"],
|
|
@@ -113,8 +114,9 @@ export function cmsStagingBuildSpec(config: AmplifyAppShellSiteConfig): string {
|
|
|
113
114
|
preBuild,
|
|
114
115
|
[
|
|
115
116
|
FRONTEND_ENVIRONMENT_CAPTURE,
|
|
117
|
+
RUNTIME_OUTPUTS_ENVIRONMENT,
|
|
116
118
|
"npx papyrus-app sync && npm run build",
|
|
117
|
-
|
|
119
|
+
RUNTIME_OUTPUTS_COPY,
|
|
118
120
|
],
|
|
119
121
|
".next",
|
|
120
122
|
cachePaths,
|
package/package.json
CHANGED
package/routes.manifest.json
CHANGED