IAPL rename, scripted: preferred names in src, bin, scripts, services, tests; bin files and skill folders moved
Replaced by an explicit list of forms only (ten exported names, runtime env names, project file names and marks, commands, skill names, the log prefix, the brand in prose). Package name, import paths, routes, CSS tokens, data attributes, custom keys, context flags, the cookie and kv keys are not touched. package.json keeps the five old bin names beside the five new ones. The old names stop working in this commit and come back as aliases in the next; docs follow. Co-Authored-By: Claude Fable 5.2 <[email protected]>
This commit is contained in:
co-authored by
Claude Fable 5.2
parent
414a4702df
commit
0a4f001797
@@ -87,13 +87,13 @@ export const buildR2Storage = (
|
||||
return (config) => {
|
||||
if (readOnly) {
|
||||
console.warn(
|
||||
`[ipal] R2 storage: read-only media from ${readOnly} (R2_PUBLIC_URL without credentials) — ` +
|
||||
`[iapl] R2 storage: read-only media from ${readOnly} (R2_PUBLIC_URL without credentials) — ` +
|
||||
'uploads are disabled. Set all R2_* to upload, or none for local disk.',
|
||||
)
|
||||
} else if (bucket || endpoint || accessKeyId || secretAccessKey) {
|
||||
// Only warn when SOME vars are set (partial config = likely a mistake).
|
||||
console.warn(
|
||||
'[ipal] R2 storage: incomplete env (need R2_BUCKET, R2_ENDPOINT, ' +
|
||||
'[iapl] R2 storage: incomplete env (need R2_BUCKET, R2_ENDPOINT, ' +
|
||||
'R2_ACCESS_KEY_ID, R2_SECRET_ACCESS_KEY). Falling back to local disk.',
|
||||
)
|
||||
}
|
||||
@@ -107,7 +107,7 @@ export const buildR2Storage = (
|
||||
// (media.klient.pl → bucket) set R2_PUBLIC_URL so Payload generates URLs
|
||||
// pointing there. Without it, uploads work but images don't display publicly.
|
||||
// See docs/storage.md.
|
||||
// Site-relative value ('/media', dev only — ipalEnvRules rejects it in production)
|
||||
// Site-relative value ('/media', dev only — iaplEnvRules rejects it in production)
|
||||
// → prefixed with NEXT_PUBLIC_SERVER_URL so Payload still stores absolute URLs.
|
||||
const rawPublicUrl = process.env.R2_PUBLIC_URL?.trim().replace(/\/$/, '') // strip trailing slash
|
||||
const serverUrl = process.env.NEXT_PUBLIC_SERVER_URL?.trim().replace(/\/$/, '')
|
||||
@@ -127,7 +127,7 @@ export const buildR2Storage = (
|
||||
// than silently storing media on the container disk (lost on redeploy).
|
||||
if (!s3Storage) {
|
||||
throw new Error(
|
||||
'[ipal] R2 storage: R2_* env is set but the S3 adapter was not injected. ' +
|
||||
'[iapl] R2 storage: R2_* env is set but the S3 adapter was not injected. ' +
|
||||
"Install @payloadcms/storage-s3 and pass it: buildR2Storage(['media'], { s3Storage }) " +
|
||||
"with `import { s3Storage } from '@payloadcms/storage-s3'`. See docs/storage.md.",
|
||||
)
|
||||
@@ -213,7 +213,7 @@ function withReadOnlyMedia(
|
||||
}).req
|
||||
if (operation === 'delete' || ((operation === 'create' || operation === 'update') && req?.file)) {
|
||||
req?.payload?.logger?.warn(
|
||||
'[ipal] R2 storage: media is read-only (R2_PUBLIC_URL without R2 credentials). Set all R2_* to upload or delete files.',
|
||||
'[iapl] R2 storage: media is read-only (R2_PUBLIC_URL without R2 credentials). Set all R2_* to upload or delete files.',
|
||||
)
|
||||
throw new APIError(
|
||||
req?.i18n?.language === 'pl'
|
||||
|
||||
Reference in New Issue
Block a user