@fjall/payload 0.87.9 → 0.87.11
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/adapters/postgres.d.ts +3 -32
- package/dist/adapters/postgres.d.ts.map +1 -1
- package/dist/adapters/postgres.js +17 -43
- package/dist/adapters/postgres.js.map +1 -1
- package/dist/config/defaults.d.ts +20 -0
- package/dist/config/defaults.d.ts.map +1 -1
- package/dist/config/defaults.js +22 -0
- package/dist/config/defaults.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +5 -3
|
@@ -8,50 +8,21 @@
|
|
|
8
8
|
* - Falls back to DATABASE_URL for local development
|
|
9
9
|
*/
|
|
10
10
|
import { postgresAdapter } from "@payloadcms/db-postgres";
|
|
11
|
-
/** The return type of postgresAdapter */
|
|
12
11
|
type PostgresAdapterResult = ReturnType<typeof postgresAdapter>;
|
|
13
|
-
/**
|
|
14
|
-
* Options for the Fjall PostgreSQL adapter.
|
|
15
|
-
*/
|
|
16
12
|
export interface FjallPostgresAdapterOptions {
|
|
17
|
-
/**
|
|
18
|
-
* Path to migrations directory (relative to project root).
|
|
19
|
-
* @default './src/migrations'
|
|
20
|
-
*/
|
|
13
|
+
/** @default './src/migrations' */
|
|
21
14
|
migrationDir?: string;
|
|
22
|
-
/**
|
|
23
|
-
* Pre-compiled migrations for production.
|
|
24
|
-
* Required for Lambda deployments where filesystem migrations aren't available.
|
|
25
|
-
*
|
|
26
|
-
* Pass the migrations array exported from your migrations index file:
|
|
27
|
-
* ```typescript
|
|
28
|
-
* import { migrations } from './migrations'
|
|
29
|
-
* ```
|
|
30
|
-
*
|
|
31
|
-
* Type is `unknown[]` to avoid contravariance issues with Payload's
|
|
32
|
-
* specific migration argument types (MigrateUpArgs, MigrateDownArgs).
|
|
33
|
-
*/
|
|
15
|
+
/** Required for Lambda - filesystem migrations aren't available at runtime. */
|
|
34
16
|
prodMigrations?: unknown[];
|
|
35
17
|
}
|
|
36
18
|
/**
|
|
37
|
-
* Create a Fjall-configured PostgreSQL adapter for Payload CMS.
|
|
38
|
-
*
|
|
39
|
-
* This is an async function because it needs to fetch credentials from
|
|
40
|
-
* Secrets Manager. Call it with top-level await in your payload.config.ts.
|
|
41
|
-
*
|
|
42
19
|
* @example
|
|
43
20
|
* ```typescript
|
|
44
21
|
* import { fjallPostgresAdapter } from '@fjall/payload'
|
|
45
22
|
* import { migrations } from './migrations'
|
|
46
23
|
*
|
|
47
|
-
* const db = await fjallPostgresAdapter({
|
|
48
|
-
* migrationDir: './src/migrations',
|
|
49
|
-
* prodMigrations: migrations,
|
|
50
|
-
* })
|
|
51
|
-
*
|
|
52
24
|
* export default buildConfig({
|
|
53
|
-
* db,
|
|
54
|
-
* // ...
|
|
25
|
+
* db: await fjallPostgresAdapter({ prodMigrations: migrations }),
|
|
55
26
|
* })
|
|
56
27
|
* ```
|
|
57
28
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"postgres.d.ts","sourceRoot":"","sources":["../../src/adapters/postgres.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAG1D,
|
|
1
|
+
{"version":3,"file":"postgres.d.ts","sourceRoot":"","sources":["../../src/adapters/postgres.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAG1D,KAAK,qBAAqB,GAAG,UAAU,CAAC,OAAO,eAAe,CAAC,CAAC;AAyDhE,MAAM,WAAW,2BAA2B;IAC1C,kCAAkC;IAClC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,+EAA+E;IAC/E,cAAc,CAAC,EAAE,OAAO,EAAE,CAAC;CAC5B;AAED;;;;;;;;;;GAUG;AACH,wBAAsB,oBAAoB,CACxC,OAAO,GAAE,2BAAgC,GACxC,OAAO,CAAC,qBAAqB,CAAC,CAgBhC"}
|
|
@@ -9,24 +9,12 @@
|
|
|
9
9
|
*/
|
|
10
10
|
import { postgresAdapter } from "@payloadcms/db-postgres";
|
|
11
11
|
import { fetchSecretField } from "./secrets.js";
|
|
12
|
-
//
|
|
13
|
-
//
|
|
14
|
-
// invocations, so caching avoids repeated Secrets Manager calls.
|
|
12
|
+
// Module-level cache: Lambda reuses modules across invocations,
|
|
13
|
+
// so caching avoids repeated Secrets Manager calls.
|
|
15
14
|
let cachedDbUrl = null;
|
|
16
|
-
/**
|
|
17
|
-
* Build the database connection URL from Fjall environment variables.
|
|
18
|
-
*
|
|
19
|
-
* In production (Lambda), uses:
|
|
20
|
-
* - DATABASE_HOST, DATABASE_PORT, DATABASE_NAME from environment
|
|
21
|
-
* - DATABASE_USERNAME/PASSWORD from Secrets Manager via Lambda Extension
|
|
22
|
-
*
|
|
23
|
-
* In development, falls back to DATABASE_URL environment variable.
|
|
24
|
-
*/
|
|
25
15
|
async function getDatabaseUrl() {
|
|
26
|
-
// Return cached URL if already resolved (use explicit null check to handle empty string cache)
|
|
27
16
|
if (cachedDbUrl !== null)
|
|
28
17
|
return cachedDbUrl;
|
|
29
|
-
// If Fjall env vars are present (production Lambda environment)
|
|
30
18
|
if (process.env.DATABASE_HOST) {
|
|
31
19
|
const host = process.env.DATABASE_HOST;
|
|
32
20
|
const port = process.env.DATABASE_PORT || "5432";
|
|
@@ -35,7 +23,6 @@ async function getDatabaseUrl() {
|
|
|
35
23
|
throw new Error("[fjall] DATABASE_NAME environment variable not configured. " +
|
|
36
24
|
"Ensure DATABASE_NAME is set alongside DATABASE_HOST.");
|
|
37
25
|
}
|
|
38
|
-
// Fetch credentials from Lambda Extension
|
|
39
26
|
const user = await fetchSecretField("DATABASE_USERNAME");
|
|
40
27
|
const pass = await fetchSecretField("DATABASE_PASSWORD");
|
|
41
28
|
if (!user || !pass) {
|
|
@@ -45,45 +32,34 @@ async function getDatabaseUrl() {
|
|
|
45
32
|
cachedDbUrl = `postgresql://${user}:${encodeURIComponent(pass)}@${host}:${port}/${name}`;
|
|
46
33
|
return cachedDbUrl;
|
|
47
34
|
}
|
|
48
|
-
//
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
35
|
+
// Build-time handling: when no database is configured, use a connection string
|
|
36
|
+
// that fails fast with a clear error. An empty string causes pg.Pool to default
|
|
37
|
+
// to localhost:5432, which hangs or gives confusing errors.
|
|
38
|
+
//
|
|
39
|
+
// This allows Payload to initialise, but any database query will fail immediately
|
|
40
|
+
// with a clear DNS resolution error instead of trying to connect to localhost.
|
|
41
|
+
//
|
|
42
|
+
// Users should wrap generateStaticParams with isBuildTime() to skip DB calls:
|
|
43
|
+
// if (isBuildTime()) return []
|
|
44
|
+
cachedDbUrl =
|
|
45
|
+
process.env.DATABASE_URL ||
|
|
46
|
+
"postgresql://fjall-build-time-no-database:5432/none";
|
|
55
47
|
return cachedDbUrl;
|
|
56
48
|
}
|
|
57
|
-
|
|
58
|
-
* Get SSL configuration for Aurora PostgreSQL.
|
|
59
|
-
*
|
|
60
|
-
* In production (DATABASE_SSL=true), enables SSL but skips certificate
|
|
61
|
-
* verification since Aurora uses Amazon's internal CA.
|
|
62
|
-
*/
|
|
49
|
+
// Aurora uses Amazon's internal CA, so we skip certificate verification.
|
|
63
50
|
function getSslConfig() {
|
|
64
51
|
return process.env.DATABASE_SSL === "true"
|
|
65
52
|
? { rejectUnauthorized: false }
|
|
66
53
|
: false;
|
|
67
54
|
}
|
|
68
55
|
/**
|
|
69
|
-
* Create a Fjall-configured PostgreSQL adapter for Payload CMS.
|
|
70
|
-
*
|
|
71
|
-
* This is an async function because it needs to fetch credentials from
|
|
72
|
-
* Secrets Manager. Call it with top-level await in your payload.config.ts.
|
|
73
|
-
*
|
|
74
56
|
* @example
|
|
75
57
|
* ```typescript
|
|
76
58
|
* import { fjallPostgresAdapter } from '@fjall/payload'
|
|
77
59
|
* import { migrations } from './migrations'
|
|
78
60
|
*
|
|
79
|
-
* const db = await fjallPostgresAdapter({
|
|
80
|
-
* migrationDir: './src/migrations',
|
|
81
|
-
* prodMigrations: migrations,
|
|
82
|
-
* })
|
|
83
|
-
*
|
|
84
61
|
* export default buildConfig({
|
|
85
|
-
* db,
|
|
86
|
-
* // ...
|
|
62
|
+
* db: await fjallPostgresAdapter({ prodMigrations: migrations }),
|
|
87
63
|
* })
|
|
88
64
|
* ```
|
|
89
65
|
*/
|
|
@@ -96,9 +72,7 @@ export async function fjallPostgresAdapter(options = {}) {
|
|
|
96
72
|
ssl: getSslConfig(),
|
|
97
73
|
},
|
|
98
74
|
migrationDir,
|
|
99
|
-
//
|
|
100
|
-
// exposing Payload's internal migration types. The assertion is safe because
|
|
101
|
-
// migrations are generated by `payload migrate:create` which produces the correct type.
|
|
75
|
+
// Safe assertion: migrations are generated by `payload migrate:create`.
|
|
102
76
|
prodMigrations: prodMigrations,
|
|
103
77
|
});
|
|
104
78
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"postgres.js","sourceRoot":"","sources":["../../src/adapters/postgres.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"postgres.js","sourceRoot":"","sources":["../../src/adapters/postgres.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAIhD,gEAAgE;AAChE,oDAAoD;AACpD,IAAI,WAAW,GAAkB,IAAI,CAAC;AAEtC,KAAK,UAAU,cAAc;IAC3B,IAAI,WAAW,KAAK,IAAI;QAAE,OAAO,WAAW,CAAC;IAE7C,IAAI,OAAO,CAAC,GAAG,CAAC,aAAa,EAAE,CAAC;QAC9B,MAAM,IAAI,GAAG,OAAO,CAAC,GAAG,CAAC,aAAa,CAAC;QACvC,MAAM,IAAI,GAAG,OAAO,CAAC,GAAG,CAAC,aAAa,IAAI,MAAM,CAAC;QACjD,MAAM,IAAI,GAAG,OAAO,CAAC,GAAG,CAAC,aAAa,CAAC;QAEvC,IAAI,CAAC,IAAI,EAAE,CAAC;YACV,MAAM,IAAI,KAAK,CACb,6DAA6D;gBAC3D,sDAAsD,CACzD,CAAC;QACJ,CAAC;QAED,MAAM,IAAI,GAAG,MAAM,gBAAgB,CAAC,mBAAmB,CAAC,CAAC;QACzD,MAAM,IAAI,GAAG,MAAM,gBAAgB,CAAC,mBAAmB,CAAC,CAAC;QAEzD,IAAI,CAAC,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC;YACnB,MAAM,IAAI,KAAK,CACb,6DAA6D;gBAC3D,gFAAgF,CACnF,CAAC;QACJ,CAAC;QAED,WAAW,GAAG,gBAAgB,IAAI,IAAI,kBAAkB,CAAC,IAAI,CAAC,IAAI,IAAI,IAAI,IAAI,IAAI,IAAI,EAAE,CAAC;QACzF,OAAO,WAAW,CAAC;IACrB,CAAC;IAED,+EAA+E;IAC/E,gFAAgF;IAChF,4DAA4D;IAC5D,EAAE;IACF,kFAAkF;IAClF,+EAA+E;IAC/E,EAAE;IACF,8EAA8E;IAC9E,iCAAiC;IACjC,WAAW;QACT,OAAO,CAAC,GAAG,CAAC,YAAY;YACxB,qDAAqD,CAAC;IACxD,OAAO,WAAW,CAAC;AACrB,CAAC;AAED,yEAAyE;AACzE,SAAS,YAAY;IACnB,OAAO,OAAO,CAAC,GAAG,CAAC,YAAY,KAAK,MAAM;QACxC,CAAC,CAAC,EAAE,kBAAkB,EAAE,KAAK,EAAE;QAC/B,CAAC,CAAC,KAAK,CAAC;AACZ,CAAC;AASD;;;;;;;;;;GAUG;AACH,MAAM,CAAC,KAAK,UAAU,oBAAoB,CACxC,UAAuC,EAAE;IAEzC,MAAM,EAAE,YAAY,GAAG,kBAAkB,EAAE,cAAc,EAAE,GAAG,OAAO,CAAC;IAEtE,MAAM,WAAW,GAAG,MAAM,cAAc,EAAE,CAAC;IAE3C,OAAO,eAAe,CAAC;QACrB,IAAI,EAAE;YACJ,gBAAgB,EAAE,WAAW;YAC7B,GAAG,EAAE,YAAY,EAAE;SACpB;QACD,YAAY;QACZ,wEAAwE;QACxE,cAAc,EAAE,cAEM;KACvB,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -6,6 +6,26 @@
|
|
|
6
6
|
* - CSRF configuration for security
|
|
7
7
|
* - Environment detection helpers
|
|
8
8
|
*/
|
|
9
|
+
/**
|
|
10
|
+
* Check if running during Next.js build phase.
|
|
11
|
+
*
|
|
12
|
+
* During build, there's no database connection available. Use this to skip
|
|
13
|
+
* database queries in generateStaticParams and other build-time code.
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* ```typescript
|
|
17
|
+
* import { isBuildTime } from '@fjall/payload'
|
|
18
|
+
*
|
|
19
|
+
* export async function generateStaticParams() {
|
|
20
|
+
* if (isBuildTime()) {
|
|
21
|
+
* return [] // Skip static generation - pages render on-demand
|
|
22
|
+
* }
|
|
23
|
+
* const payload = await getPayload({ config: configPromise })
|
|
24
|
+
* // ... fetch data
|
|
25
|
+
* }
|
|
26
|
+
* ```
|
|
27
|
+
*/
|
|
28
|
+
export declare function isBuildTime(): boolean;
|
|
9
29
|
/**
|
|
10
30
|
* Check if running in a production AWS environment.
|
|
11
31
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"defaults.d.ts","sourceRoot":"","sources":["../../src/config/defaults.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH;;;;;GAKG;AACH,wBAAgB,YAAY,IAAI,OAAO,CAEtC;AAED;;;;GAIG;AACH,wBAAgB,QAAQ,IAAI,OAAO,CAElC;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,aAAa,IAAI;IAC/B,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,IAAI,EAAE,MAAM,EAAE,CAAC;CAChB,CAUA;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,oBAAoB,CAClC,SAAS,EAAE,MAAM,GAChB;IAAE,SAAS,EAAE,MAAM,CAAA;CAAE,GAAG,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAE/C"}
|
|
1
|
+
{"version":3,"file":"defaults.d.ts","sourceRoot":"","sources":["../../src/config/defaults.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,WAAW,IAAI,OAAO,CAErC;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,IAAI,OAAO,CAEtC;AAED;;;;GAIG;AACH,wBAAgB,QAAQ,IAAI,OAAO,CAElC;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,aAAa,IAAI;IAC/B,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,IAAI,EAAE,MAAM,EAAE,CAAC;CAChB,CAUA;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,oBAAoB,CAClC,SAAS,EAAE,MAAM,GAChB;IAAE,SAAS,EAAE,MAAM,CAAA;CAAE,GAAG,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAE/C"}
|
package/dist/config/defaults.js
CHANGED
|
@@ -6,6 +6,28 @@
|
|
|
6
6
|
* - CSRF configuration for security
|
|
7
7
|
* - Environment detection helpers
|
|
8
8
|
*/
|
|
9
|
+
/**
|
|
10
|
+
* Check if running during Next.js build phase.
|
|
11
|
+
*
|
|
12
|
+
* During build, there's no database connection available. Use this to skip
|
|
13
|
+
* database queries in generateStaticParams and other build-time code.
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* ```typescript
|
|
17
|
+
* import { isBuildTime } from '@fjall/payload'
|
|
18
|
+
*
|
|
19
|
+
* export async function generateStaticParams() {
|
|
20
|
+
* if (isBuildTime()) {
|
|
21
|
+
* return [] // Skip static generation - pages render on-demand
|
|
22
|
+
* }
|
|
23
|
+
* const payload = await getPayload({ config: configPromise })
|
|
24
|
+
* // ... fetch data
|
|
25
|
+
* }
|
|
26
|
+
* ```
|
|
27
|
+
*/
|
|
28
|
+
export function isBuildTime() {
|
|
29
|
+
return process.env.NEXT_PHASE === "phase-production-build";
|
|
30
|
+
}
|
|
9
31
|
/**
|
|
10
32
|
* Check if running in a production AWS environment.
|
|
11
33
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"defaults.js","sourceRoot":"","sources":["../../src/config/defaults.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH;;;;;GAKG;AACH,MAAM,UAAU,YAAY;IAC1B,OAAO,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC;AAChD,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,QAAQ;IACtB,OAAO,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,wBAAwB,CAAC,CAAC;AACvD,CAAC;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,UAAU,aAAa;IAI3B,MAAM,SAAS,GAAG,OAAO,CAAC,GAAG,CAAC,sBAAsB,CAAC;IAErD,OAAO;QACL,uEAAuE;QACvE,kDAAkD;QAClD,IAAI,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC;QACrC,4DAA4D;QAC5D,IAAI,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,EAAE;KACnC,CAAC;AACJ,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,UAAU,oBAAoB,CAClC,SAAiB;IAEjB,OAAO,YAAY,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,SAAS,EAAE,CAAC;AACxD,CAAC"}
|
|
1
|
+
{"version":3,"file":"defaults.js","sourceRoot":"","sources":["../../src/config/defaults.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,UAAU,WAAW;IACzB,OAAO,OAAO,CAAC,GAAG,CAAC,UAAU,KAAK,wBAAwB,CAAC;AAC7D,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,YAAY;IAC1B,OAAO,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC;AAChD,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,QAAQ;IACtB,OAAO,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,wBAAwB,CAAC,CAAC;AACvD,CAAC;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,UAAU,aAAa;IAI3B,MAAM,SAAS,GAAG,OAAO,CAAC,GAAG,CAAC,sBAAsB,CAAC;IAErD,OAAO;QACL,uEAAuE;QACvE,kDAAkD;QAClD,IAAI,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC;QACrC,4DAA4D;QAC5D,IAAI,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,EAAE;KACnC,CAAC;AACJ,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,UAAU,oBAAoB,CAClC,SAAiB;IAEjB,OAAO,YAAY,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,SAAS,EAAE,CAAC;AACxD,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -33,5 +33,5 @@
|
|
|
33
33
|
export { fjallPostgresAdapter, type FjallPostgresAdapterOptions, } from "./adapters/postgres.js";
|
|
34
34
|
export { fetchSecretField } from "./adapters/secrets.js";
|
|
35
35
|
export { awsS3Storage, type AwsS3StorageOptions } from "./storage/s3.js";
|
|
36
|
-
export { fjallDefaults, isProduction, isLambda, conditionalStaticDir, } from "./config/defaults.js";
|
|
36
|
+
export { fjallDefaults, isProduction, isLambda, isBuildTime, conditionalStaticDir, } from "./config/defaults.js";
|
|
37
37
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAGH,OAAO,EACL,oBAAoB,EACpB,KAAK,2BAA2B,GACjC,MAAM,wBAAwB,CAAC;AAGhC,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAGzD,OAAO,EAAE,YAAY,EAAE,KAAK,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAGzE,OAAO,EACL,aAAa,EACb,YAAY,EACZ,QAAQ,EACR,oBAAoB,GACrB,MAAM,sBAAsB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAGH,OAAO,EACL,oBAAoB,EACpB,KAAK,2BAA2B,GACjC,MAAM,wBAAwB,CAAC;AAGhC,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAGzD,OAAO,EAAE,YAAY,EAAE,KAAK,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAGzE,OAAO,EACL,aAAa,EACb,YAAY,EACZ,QAAQ,EACR,WAAW,EACX,oBAAoB,GACrB,MAAM,sBAAsB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -37,5 +37,5 @@ export { fetchSecretField } from "./adapters/secrets.js";
|
|
|
37
37
|
// S3 storage plugin
|
|
38
38
|
export { awsS3Storage } from "./storage/s3.js";
|
|
39
39
|
// Configuration helpers
|
|
40
|
-
export { fjallDefaults, isProduction, isLambda, conditionalStaticDir, } from "./config/defaults.js";
|
|
40
|
+
export { fjallDefaults, isProduction, isLambda, isBuildTime, conditionalStaticDir, } from "./config/defaults.js";
|
|
41
41
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAEH,mBAAmB;AACnB,OAAO,EACL,oBAAoB,GAErB,MAAM,wBAAwB,CAAC;AAEhC,qBAAqB;AACrB,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAEzD,oBAAoB;AACpB,OAAO,EAAE,YAAY,EAA4B,MAAM,iBAAiB,CAAC;AAEzE,wBAAwB;AACxB,OAAO,EACL,aAAa,EACb,YAAY,EACZ,QAAQ,EACR,oBAAoB,GACrB,MAAM,sBAAsB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAEH,mBAAmB;AACnB,OAAO,EACL,oBAAoB,GAErB,MAAM,wBAAwB,CAAC;AAEhC,qBAAqB;AACrB,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAEzD,oBAAoB;AACpB,OAAO,EAAE,YAAY,EAA4B,MAAM,iBAAiB,CAAC;AAEzE,wBAAwB;AACxB,OAAO,EACL,aAAa,EACb,YAAY,EACZ,QAAQ,EACR,WAAW,EACX,oBAAoB,GACrB,MAAM,sBAAsB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fjall/payload",
|
|
3
|
-
"version": "0.87.
|
|
3
|
+
"version": "0.87.11",
|
|
4
4
|
"description": "Fjall AWS adapters and utilities for Payload CMS",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -19,6 +19,7 @@
|
|
|
19
19
|
"build": "npm run clean && npx tsc",
|
|
20
20
|
"watch": "npm run build && npx tsc-watch",
|
|
21
21
|
"typecheck": "tsc --noEmit",
|
|
22
|
+
"test": "vitest run",
|
|
22
23
|
"format": "prettier --write \"src/**/*.ts\"",
|
|
23
24
|
"format:check": "prettier --check \"src/**/*.ts\"",
|
|
24
25
|
"lint": "eslint src/",
|
|
@@ -47,7 +48,8 @@
|
|
|
47
48
|
"@payloadcms/storage-s3": "^3.73.0",
|
|
48
49
|
"@types/node": "^22.0.0",
|
|
49
50
|
"payload": "^3.73.0",
|
|
50
|
-
"typescript": "^5.8.2"
|
|
51
|
+
"typescript": "^5.8.2",
|
|
52
|
+
"vitest": "^3.2.3"
|
|
51
53
|
},
|
|
52
|
-
"gitHead": "
|
|
54
|
+
"gitHead": "7f161f3047d8230c40c75273147d15043c1bface"
|
|
53
55
|
}
|