@anthusai/papyrus 1.0.0-next.36 → 1.0.0-next.38

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/package.json CHANGED
@@ -300,7 +300,7 @@
300
300
  "optional": true
301
301
  }
302
302
  },
303
- "version": "1.0.0-next.36",
303
+ "version": "1.0.0-next.38",
304
304
  "dependencies": {
305
305
  "@aws-amplify/adapter-nextjs": "^1.7.3",
306
306
  "@aws-sdk/client-cognito-identity-provider": "3.1045.0",
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.0.0-next.36",
2
+ "version": "1.0.0-next.38",
3
3
  "routes": [
4
4
  {
5
5
  "file": "app/%5F_preview/[[...path]]/route.ts",
@@ -4,7 +4,7 @@ import { fileURLToPath } from "node:url";
4
4
 
5
5
  /**
6
6
  * Wrap a publication repo's Next config for Papyrus (SPIKE, PPY-82be6c).
7
- * - transpile the package (it ships TypeScript source),
7
+ * - transpile the package and the dependencies that ship TypeScript source (cyclotron),
8
8
  * - alias `papyrus-site` -> ./papyrus.config.ts,
9
9
  * `papyrus-amplify-outputs` -> ./amplify_outputs.json and
10
10
  * `papyrus-site-theme` -> ./publication/theme.css when it exists, else the shipped
@@ -23,6 +23,12 @@ const SERVER_EXTERNAL = [
23
23
  "@aws-amplify/data-schema",
24
24
  ];
25
25
 
26
+ export const DEFAULT_TRANSPILE_PACKAGES = ["@anthusai/papyrus", "cyclotron"];
27
+
28
+ export function mergeTranspilePackages(existing = []) {
29
+ return [...new Set([...existing, ...DEFAULT_TRANSPILE_PACKAGES])];
30
+ }
31
+
26
32
  export const RUNTIME_TRACED_FILES = ["./corpora/**/*", "./amplify_outputs.json"];
27
33
 
28
34
  export function mergeOutputFileTracingIncludes(existing = {}) {
@@ -49,7 +55,7 @@ export function withPapyrus(nextConfig = {}, options = {}) {
49
55
  return {
50
56
  distDir: process.env.NEXT_DIST_DIR || ".next",
51
57
  ...nextConfig,
52
- transpilePackages: [...new Set([...(nextConfig.transpilePackages ?? []), "@anthusai/papyrus"])],
58
+ transpilePackages: mergeTranspilePackages(nextConfig.transpilePackages),
53
59
  serverExternalPackages: [...new Set([...(nextConfig.serverExternalPackages ?? []), ...SERVER_EXTERNAL])],
54
60
  outputFileTracingIncludes: mergeOutputFileTracingIncludes(nextConfig.outputFileTracingIncludes),
55
61
  images: nextConfig.images ?? { remotePatterns: [{ protocol: "https", hostname: "**" }] },