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:
Radosław Smoliński
2026-11-25 17:24:21 +01:00
co-authored by Claude Fable 5.2
parent 414a4702df
commit 0a4f001797
262 changed files with 955 additions and 950 deletions
+6 -6
View File
@@ -167,7 +167,7 @@ export const graphAdapter =
const env = readGraphEnv()
if (!env) {
payload.logger.error(
'[ipal] Email not sent: Graph is not configured. Set GRAPH_TENANT_ID, GRAPH_CLIENT_ID, GRAPH_CLIENT_SECRET, GRAPH_SENDER.',
'[iapl] Email not sent: Graph is not configured. Set GRAPH_TENANT_ID, GRAPH_CLIENT_ID, GRAPH_CLIENT_SECRET, GRAPH_SENDER.',
)
return {
code: 'graph-not-configured',
@@ -192,7 +192,7 @@ export const graphAdapter =
const to = toRecipients(message.to)
if (to.length === 0) {
payload.logger.error('[ipal] Email not sent: no valid recipient.')
payload.logger.error('[iapl] Email not sent: no valid recipient.')
return { error: 'Enter a valid recipient address.', sent: false }
}
@@ -226,7 +226,7 @@ export const graphAdapter =
// Attachments: small ones ride in the same call; larger ones need a draft and an upload session.
const attachments = toGraphAttachments(message)
if (!attachments) {
payload.logger.error('[ipal] Graph: an attachment is not in memory (a path or a stream) — pass its content as a Buffer.')
payload.logger.error('[iapl] Graph: an attachment is not in memory (a path or a stream) — pass its content as a Buffer.')
return { detail: 'Attachment content must be a Buffer or a string.', error: 'The e-mail was not sent.', sent: false }
}
const fetchImpl = args.fetchImpl ?? fetch
@@ -245,7 +245,7 @@ export const graphAdapter =
const roles = tokenRoles(token)
if (roles && !roles.includes(GRAPH_LARGE_PERMISSION)) {
const detail = `The Microsoft Graph app lacks the ${GRAPH_LARGE_PERMISSION} application permission, so it cannot send attachments of 3 MB and more.`
payload.logger.error(`[ipal] ${detail}`)
payload.logger.error(`[iapl] ${detail}`)
return { code: 'graph-permission', detail, error: 'The e-mail was not sent.', sent: false }
}
const large = await sendLargeGraphMail(attachments, {
@@ -277,11 +277,11 @@ export const graphAdapter =
return { sent: true }
}
const detail = await res.text()
payload.logger.error(`[ipal] Graph sendMail failed (${res.status}): ${detail}`)
payload.logger.error(`[iapl] Graph sendMail failed (${res.status}): ${detail}`)
return { detail: `Microsoft Graph refused the e-mail (${res.status}).`, error: 'The e-mail was not sent.', sent: false }
} catch (err) {
const msg = err instanceof Error ? err.message : String(err)
payload.logger.error(`[ipal] Graph send error: ${msg}`)
payload.logger.error(`[iapl] Graph send error: ${msg}`)
return { detail: msg, error: 'The e-mail was not sent.', sent: false }
}
},
+4 -4
View File
@@ -126,7 +126,7 @@ export async function sendLargeGraphMail(attachments: GraphAttachment[], { clean
method: 'POST',
})
if (created.status === 401 || created.status === 403) {
log.error(`[ipal] ${permissionDetail} (${await describe(created)})`)
log.error(`[iapl] ${permissionDetail} (${await describe(created)})`)
return { code: 'graph-permission', detail: permissionDetail, sent: false }
}
if (created.status !== 201 && created.status !== 200) {
@@ -167,10 +167,10 @@ export async function sendLargeGraphMail(attachments: GraphAttachment[], { clean
if (sent.status !== 202) {throw new Error(`send failed (${await describe(sent)})`)}
} catch (err) {
const detail = err instanceof Error ? err.message : String(err)
log.error(`[ipal] Graph send with a large attachment failed: ${detail}`)
log.error(`[iapl] Graph send with a large attachment failed: ${detail}`)
// Nothing went out: take the draft (and the file in it) out of the mailbox.
if (draftId && !(await remove(draftId))) {
log.error(`[ipal] Graph: could not delete the draft ${draftId} from ${sender} — delete it by hand (it holds a form file).`)
log.error(`[iapl] Graph: could not delete the draft ${draftId} from ${sender} — delete it by hand (it holds a form file).`)
}
return { code: 'graph-error', detail, sent: false }
}
@@ -190,7 +190,7 @@ export async function sendLargeGraphMail(attachments: GraphAttachment[], { clean
/* try again after the next delay */
}
}
log.warn(`[ipal] Graph: the sent copy ${sentId} is still in the mailbox ${sender} — delete it by hand (it holds a form file).`)
log.warn(`[iapl] Graph: the sent copy ${sentId} is still in the mailbox ${sender} — delete it by hand (it holds a form file).`)
return 'left'
})()
cleanup.catch(() => undefined)
+1 -1
View File
@@ -109,7 +109,7 @@ export const mailAdapter =
// Panel asked for Graph but the agency creds aren't configured for
// this project. Fall back to SMTP rather than silently dropping mail.
payload.logger.warn(
'[ipal] Transport set to Graph but GRAPH_* env vars are missing; falling back to SMTP.',
'[iapl] Transport set to Graph but GRAPH_* env vars are missing; falling back to SMTP.',
)
}
+2 -2
View File
@@ -60,7 +60,7 @@ export const panelSmtpAdapter =
if (!host || !user || !pass) {
payload.logger.error(
'[ipal] Email not sent: SMTP host, user or password is empty in Site integrations → E-mail sending.',
'[iapl] Email not sent: SMTP host, user or password is empty in Site integrations → E-mail sending.',
)
return { code: 'not-configured', error: 'Fill in the server, user name and password.', sent: false }
}
@@ -100,7 +100,7 @@ export const panelSmtpAdapter =
} catch (err) {
// Never surface SMTP internals to the caller — a form submission
// shouldn't fail loudly because the mailbox is misconfigured.
payload.logger.error(`[ipal] Email send failed: ${(err as Error).message}`)
payload.logger.error(`[iapl] Email send failed: ${(err as Error).message}`)
// `detail` is for the panel status (mailAdapter), not for end users.
return { detail: (err as Error).message, error: 'The e-mail was not sent.', sent: false }
}
+1 -1
View File
@@ -89,7 +89,7 @@ export async function sendEmail({
})
return { messageId: info.messageId, sent: true }
} catch (err) {
payload.logger.error(`[ipal] Email send failed: ${(err as Error).message}`)
payload.logger.error(`[iapl] Email send failed: ${(err as Error).message}`)
return { error: 'The e-mail was not sent.', sent: false }
}
}
+3 -3
View File
@@ -66,7 +66,7 @@ export const testEmailEndpoint: Endpoint = {
try {
const info = await req.payload.sendEmail({
...(attachmentMB
? { attachments: [{ content: Buffer.alloc(attachmentMB * 1024 * 1024, 'ipal-kit test file\n'), contentType: 'text/plain', filename: `test-${attachmentMB}MB.txt` }] }
? { attachments: [{ content: Buffer.alloc(attachmentMB * 1024 * 1024, 'IAPL test file\n'), contentType: 'text/plain', filename: `test-${attachmentMB}MB.txt` }] }
: {}),
html: `<p>${escapeHtml(text)}</p>`,
subject,
@@ -84,7 +84,7 @@ export const testEmailEndpoint: Endpoint = {
if (!sent) {
const failed = info as { code?: string; detail?: string; error?: string }
req.payload.logger.error(`[ipal] Test email not sent: ${failed?.detail ?? failed?.error ?? 'unknown reason'}`)
req.payload.logger.error(`[iapl] Test email not sent: ${failed?.detail ?? failed?.error ?? 'unknown reason'}`)
const error =
failed?.code === 'not-configured'
? serverText(i18n, 'testEmailNotConfigured')
@@ -95,7 +95,7 @@ export const testEmailEndpoint: Endpoint = {
return Response.json({ message: serverText(i18n, 'testEmailSent', { to }), ok: true })
} catch (err) {
const message = err instanceof Error ? err.message : String(err)
req.payload.logger.error(`[ipal] Test email failed: ${message}`)
req.payload.logger.error(`[iapl] Test email failed: ${message}`)
return Response.json({ error: serverText(i18n, 'testEmailFailed'), ok: false }, { status: 502 })
}
},