@fjall/payload 2.33.0 → 3.0.0
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/dist/.minified
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
6 files minified at 2026-07-
|
|
1
|
+
6 files minified at 2026-07-18T01:56:32.847Z
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{postgresAdapter as
|
|
1
|
+
var i=Object.defineProperty;var s=(r,n)=>i(r,"name",{value:n,configurable:!0});import{postgresAdapter as c}from"@payloadcms/db-postgres";import{fetchSecretField as a}from"./secrets.js";let e=null;async function l(){if(e!==null)return e;if(process.env.DATABASE_HOST){const r=process.env.DATABASE_HOST,n=process.env.DATABASE_PORT||"5432",t=process.env.DATABASE_NAME;if(!t)throw new Error("[fjall] DATABASE_NAME environment variable not configured. Ensure DATABASE_NAME is set alongside DATABASE_HOST.");const o=await a("DATABASE_USERNAME"),A=await a("DATABASE_PASSWORD");if(!o||!A)throw new Error("[fjall] Database credentials not found in Secrets Manager. Ensure DATABASE_USERNAME and DATABASE_PASSWORD are configured in your secrets.");return e=`postgresql://${o}:${encodeURIComponent(A)}@${r}:${n}/${t}`,e}return e=process.env.DATABASE_URL||"postgresql://fjall-build-time-no-database:5432/none",e}s(l,"getDatabaseUrl");function S(){return process.env.DATABASE_SSL==="true"?{rejectUnauthorized:!1}:!1}s(S,"getSslConfig");async function u(r={}){const{migrationDir:n="./src/migrations",prodMigrations:t}=r,o=await l();return c({pool:{connectionString:o,ssl:S()},migrationDir:n,prodMigrations:t})}s(u,"fjallPostgresAdapter");export{u as fjallPostgresAdapter};
|
package/dist/adapters/secrets.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
async function
|
|
1
|
+
var a=Object.defineProperty;var i=(e,r)=>a(e,"name",{value:r,configurable:!0});async function f(e){const r=process.env[`${e}_SECRET_ARN`],c=process.env[`${e}_SECRET_FIELD`];if(!r)return;const o=process.env.AWS_SESSION_TOKEN;if(!o){console.error("fetchSecretField: AWS_SESSION_TOKEN not set (not running in Lambda?)");return}try{const t=`http://localhost:2773/secretsmanager/get?secretId=${encodeURIComponent(r)}`,n=await fetch(t,{headers:{"X-Aws-Parameters-Secrets-Token":o}});if(!n.ok){console.error(`Failed to fetch secret ${e}: ${n.status}`);return}const s=await n.json();return s.SecretString?c?JSON.parse(s.SecretString)[c]:s.SecretString:void 0}catch(t){console.error(`Error fetching secret ${e}:`,t);return}}i(f,"fetchSecretField");export{f as fetchSecretField};
|
package/dist/cache/invalidate.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{readFileSync as
|
|
1
|
+
var m=Object.defineProperty;var a=(e,n)=>m(e,"name",{value:n,configurable:!0});import{readFileSync as f}from"node:fs";let c=null,r=null;function C(){return c!==null||(c=f("/var/task/.next/BUILD_ID","utf8").trim()),c}a(C,"getBuildId");function w(e,n){return`${e}${n==="/"?"/index":n}.cache`}a(w,"pageToCacheKey");async function v(e,n){try{const t=process.env.CACHE_BUCKET_NAME,i=process.env.AWS_LAMBDA_FUNCTION_NAME;if(!t||!i)return;const o=C(),s=w(o,e);if(!r){const{S3Client:u}=await import("@aws-sdk/client-s3");r=new u({})}const{DeleteObjectCommand:l}=await import("@aws-sdk/client-s3"),d=new l({Bucket:t,Key:s});await r.send(d),n?.info(`[fjall] Invalidated S3 cache: ${s}`)}catch(t){const{maskSensitiveOutput:i}=await import("@fjall/util/securityHelpers"),o=i(t instanceof Error?t.message:"Unknown error");n?.warn?.(`[fjall] S3 cache invalidation failed for ${e}: ${o}`)}}a(v,"invalidateS3Cache");export{v as invalidateS3Cache};
|
package/dist/config/defaults.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
var e=Object.defineProperty;var n=(r,o)=>e(r,"name",{value:o,configurable:!0});function s(){return process.env.NEXT_PHASE==="phase-production-build"}n(s,"isBuildTime");function t(){return!!process.env.MEDIA_BUCKET_NAME}n(t,"isProduction");function c(){return!!process.env.AWS_LAMBDA_FUNCTION_NAME}n(c,"isLambda");function u(){const r=process.env.NEXT_PUBLIC_SERVER_URL;return{cors:r?[r]:["*"],csrf:r?[r]:[]}}n(u,"fjallDefaults");function p(r){return t()?{}:{staticDir:r}}n(p,"conditionalStaticDir");export{p as conditionalStaticDir,u as fjallDefaults,s as isBuildTime,c as isLambda,t as isProduction};
|
package/dist/storage/s3.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{s3Storage as
|
|
1
|
+
var a=Object.defineProperty;var t=(e,o)=>a(e,"name",{value:o,configurable:!0});import{s3Storage as l}from"@payloadcms/storage-s3";function g(e={}){const{collections:o=["media"],prefix:r="media",bucket:c=process.env.MEDIA_BUCKET_NAME,region:n=process.env.AWS_REGION||"us-east-1"}=e,s=Object.fromEntries(o.map(i=>[i,{prefix:r,disableLocalStorage:!!c}]));return l({collections:s,bucket:c||"placeholder",config:{region:n}})}t(g,"awsS3Storage");export{g as awsS3Storage};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fjall/payload",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0",
|
|
4
4
|
"description": "Fjall AWS adapters and utilities for Payload CMS",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
}
|
|
53
53
|
},
|
|
54
54
|
"dependencies": {
|
|
55
|
-
"@fjall/util": "^
|
|
55
|
+
"@fjall/util": "^3.0.0"
|
|
56
56
|
},
|
|
57
57
|
"devDependencies": {
|
|
58
58
|
"@aws-sdk/client-s3": "^3.1038.0",
|
|
@@ -63,5 +63,5 @@
|
|
|
63
63
|
"typescript": "^6.0.3",
|
|
64
64
|
"vitest": "^4.1.5"
|
|
65
65
|
},
|
|
66
|
-
"gitHead": "
|
|
66
|
+
"gitHead": "848a386e3e2244401b76faabd02818c682d231e8"
|
|
67
67
|
}
|