Compare commits

..
1 Commits
7 changed files with 11 additions and 11 deletions
+2 -2
View File
@@ -3,8 +3,8 @@ import { getPayload } from 'payload';
async function loadBranding(settingsSlug, nameField, imageField) { async function loadBranding(settingsSlug, nameField, imageField) {
try { try {
// Consumer alias — resolved in the project's build, hidden from plugin tsc. // Consumer alias — resolved in the project's build, hidden from plugin tsc.
const spec = '@payload-config'; // @ts-ignore
const mod = await import(spec); const mod = await import('@payload-config');
const payload = await getPayload({ const payload = await getPayload({
config: mod.default config: mod.default
}); });
File diff suppressed because one or more lines are too long
+2 -2
View File
@@ -67,8 +67,8 @@ import { buildSeoPlugin, injectAutoFillMeta, injectSeoTabs } from './modules/seo
// optional peer dependency at build time (it isn't in the plugin's own // optional peer dependency at build time (it isn't in the plugin's own
// node_modules). Avoids TS2307 without @ts-expect-error; the module // node_modules). Avoids TS2307 without @ts-expect-error; the module
// exists at runtime in projects that installed it. // exists at runtime in projects that installed it.
const pkg = '@clocklimited/payload-2fa'; // @ts-ignore
const mod = await import(pkg); const mod = await import('@clocklimited/payload-2fa');
// The package exports `payloadTotp`; older/other builds may use // The package exports `payloadTotp`; older/other builds may use
// `totpPlugin`. Accept either so a rename doesn't break us. // `totpPlugin`. Accept either so a rename doesn't break us.
const totp = mod.payloadTotp ?? mod.totpPlugin; const totp = mod.payloadTotp ?? mod.totpPlugin;
+1 -1
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "@intecion/ipal-kit", "name": "@intecion/ipal-kit",
"version": "1.7.2", "version": "1.7.3",
"description": "Intecion Payload Advanced Library — a Payload CMS 3 plugin: i18n, SEO, forms, consent, analytics, blog/archives.", "description": "Intecion Payload Advanced Library — a Payload CMS 3 plugin: i18n, SEO, forms, consent, analytics, blog/archives.",
"license": "MIT", "license": "MIT",
"repository": { "repository": {
+2 -2
View File
@@ -37,8 +37,8 @@ async function loadBranding(
): Promise<{ name: string | null; url: string | null }> { ): Promise<{ name: string | null; url: string | null }> {
try { try {
// Consumer alias — resolved in the project's build, hidden from plugin tsc. // Consumer alias — resolved in the project's build, hidden from plugin tsc.
const spec = '@payload-config' // @ts-ignore
const mod = (await import(spec)) as { default: unknown } const mod = (await import('@payload-config')) as { default: unknown }
const payload = await getPayload({ config: mod.default as never }) const payload = await getPayload({ config: mod.default as never })
const settings = (await payload.findGlobal({ const settings = (await payload.findGlobal({
slug: settingsSlug as never, slug: settingsSlug as never,
+2 -2
View File
@@ -76,8 +76,8 @@ export const ipalKit = (options: IpalOptions): Plugin => {
// optional peer dependency at build time (it isn't in the plugin's own // optional peer dependency at build time (it isn't in the plugin's own
// node_modules). Avoids TS2307 without @ts-expect-error; the module // node_modules). Avoids TS2307 without @ts-expect-error; the module
// exists at runtime in projects that installed it. // exists at runtime in projects that installed it.
const pkg = '@clocklimited/payload-2fa' // @ts-ignore
const mod = (await import(pkg)) as { const mod = (await import('@clocklimited/payload-2fa')) as {
payloadTotp?: (opts: Record<string, unknown>) => Plugin payloadTotp?: (opts: Record<string, unknown>) => Plugin
totpPlugin?: (opts: Record<string, unknown>) => Plugin totpPlugin?: (opts: Record<string, unknown>) => Plugin
} }