@anthusai/papyrus 1.0.0-next.25 → 1.0.0-next.27

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.
@@ -15,7 +15,6 @@ 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 RUNTIME_OUTPUTS_ENVIRONMENT = "echo PAPYRUS_AMPLIFY_OUTPUTS=.next/amplify_outputs.json >> .env.production";
19
18
  const RUNTIME_OUTPUTS_COPY = "cp amplify_outputs.json .next/amplify_outputs.json";
20
19
  function pythonProvisioningCommands(config) {
21
20
  return [
@@ -55,7 +54,6 @@ export function cmsProductionBuildSpec(config) {
55
54
  ], " "),
56
55
  ...frontendSection([], [
57
56
  FRONTEND_ENVIRONMENT_CAPTURE,
58
- ...(config.frontend === "pretext" ? [RUNTIME_OUTPUTS_ENVIRONMENT] : []),
59
57
  "npx papyrus-app sync && npm run build",
60
58
  ...(config.frontend === "pretext" ? [RUNTIME_OUTPUTS_COPY] : []),
61
59
  ], ".next", [".next/cache/**/*", ".npm/**/*"]),
@@ -73,7 +71,6 @@ export function cmsStagingBuildSpec(config) {
73
71
  "version: 1",
74
72
  ...frontendSection(preBuild, [
75
73
  FRONTEND_ENVIRONMENT_CAPTURE,
76
- RUNTIME_OUTPUTS_ENVIRONMENT,
77
74
  "npx papyrus-app sync && npm run build",
78
75
  RUNTIME_OUTPUTS_COPY,
79
76
  ], ".next", cachePaths),
@@ -24,9 +24,6 @@ const FRONTEND_ENVIRONMENT_CAPTURE =
24
24
 
25
25
  const CHECKOUT_AS_PAPYRUS_ROOT = "PAPYRUS_ROOT=\"$PWD\"";
26
26
 
27
- const RUNTIME_OUTPUTS_ENVIRONMENT =
28
- "echo PAPYRUS_AMPLIFY_OUTPUTS=.next/amplify_outputs.json >> .env.production";
29
-
30
27
  const RUNTIME_OUTPUTS_COPY = "cp amplify_outputs.json .next/amplify_outputs.json";
31
28
 
32
29
  function pythonProvisioningCommands(config: AmplifyAppShellSiteConfig): string[] {
@@ -85,7 +82,6 @@ export function cmsProductionBuildSpec(config: AmplifyAppShellSiteConfig): strin
85
82
  [],
86
83
  [
87
84
  FRONTEND_ENVIRONMENT_CAPTURE,
88
- ...(config.frontend === "pretext" ? [RUNTIME_OUTPUTS_ENVIRONMENT] : []),
89
85
  "npx papyrus-app sync && npm run build",
90
86
  ...(config.frontend === "pretext" ? [RUNTIME_OUTPUTS_COPY] : []),
91
87
  ],
@@ -114,7 +110,6 @@ export function cmsStagingBuildSpec(config: AmplifyAppShellSiteConfig): string {
114
110
  preBuild,
115
111
  [
116
112
  FRONTEND_ENVIRONMENT_CAPTURE,
117
- RUNTIME_OUTPUTS_ENVIRONMENT,
118
113
  "npx papyrus-app sync && npm run build",
119
114
  RUNTIME_OUTPUTS_COPY,
120
115
  ],
@@ -6,7 +6,11 @@ export function getAmplifyOutputsPath(): string {
6
6
  if (explicit) {
7
7
  return path.isAbsolute(explicit) ? explicit : path.join(process.cwd(), explicit);
8
8
  }
9
- return path.join(process.cwd(), "amplify_outputs.json");
9
+ const checkoutRootPath = path.join(process.cwd(), "amplify_outputs.json");
10
+ if (fs.existsSync(checkoutRootPath)) return checkoutRootPath;
11
+ const shippedBundlePath = path.join(process.cwd(), ".next", "amplify_outputs.json");
12
+ if (fs.existsSync(shippedBundlePath)) return shippedBundlePath;
13
+ return checkoutRootPath;
10
14
  }
11
15
 
12
16
  export function readAmplifyOutputsFile(): Record<string, unknown> | null {
package/package.json CHANGED
@@ -293,7 +293,7 @@
293
293
  "optional": true
294
294
  }
295
295
  },
296
- "version": "1.0.0-next.25",
296
+ "version": "1.0.0-next.27",
297
297
  "dependencies": {
298
298
  "@aws-amplify/adapter-nextjs": "^1.7.3",
299
299
  "@aws-sdk/client-cognito-identity-provider": "3.1045.0",
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.0.0-next.25",
2
+ "version": "1.0.0-next.27",
3
3
  "routes": [
4
4
  {
5
5
  "file": "app/%5F_preview/[[...path]]/route.ts",