@djangocfg/nextjs 2.1.42 → 2.1.44
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/ai/cli.mjs.map +1 -1
- package/dist/ai/index.mjs.map +1 -1
- package/dist/config/index.mjs +261 -263
- package/dist/config/index.mjs.map +1 -1
- package/dist/health/index.mjs.map +1 -1
- package/dist/index.mjs +580 -582
- package/dist/index.mjs.map +1 -1
- package/dist/og-image/index.mjs +468 -468
- package/dist/og-image/index.mjs.map +1 -1
- package/dist/og-image/utils/index.mjs.map +1 -1
- package/dist/pwa/server/index.mjs +1 -1
- package/dist/pwa/server/index.mjs.map +1 -1
- package/dist/pwa/server/routes.mjs +1 -1
- package/dist/pwa/server/routes.mjs.map +1 -1
- package/dist/pwa/worker/index.mjs +1 -1
- package/dist/pwa/worker/index.mjs.map +1 -1
- package/dist/scripts/index.mjs +75 -73
- package/dist/scripts/index.mjs.map +1 -1
- package/dist/sitemap/index.mjs.map +1 -1
- package/package.json +4 -4
- package/src/ai/cli.ts +2 -1
- package/src/ai/client.ts +2 -6
- package/src/config/createNextConfig.ts +5 -5
- package/src/config/packages/checker.ts +3 -2
- package/src/config/packages/installer.ts +6 -5
- package/src/config/packages/updater.ts +5 -4
- package/src/config/plugins/devStartup.ts +3 -2
- package/src/config/utils/version.ts +4 -3
- package/src/health/route.ts +1 -0
- package/src/og-image/route.tsx +4 -2
- package/src/og-image/utils/metadata.ts +1 -1
- package/src/pwa/server/push.ts +1 -1
- package/src/pwa/server/routes.ts +1 -0
- package/src/pwa/worker/index.ts +2 -1
- package/src/scripts/check-links.ts +4 -4
- package/src/sitemap/route.ts +3 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/pwa/server/routes.ts","../../../src/pwa/server/push.ts"],"sourcesContent":["/**\n * Ready-to-use Push Notification Route Handlers\n *\n * Import these in your app/api/push/ routes\n */\n\nimport { NextRequest, NextResponse } from 'next/server';\nimport { configureVapid, sendPushNotification, validateSubscription } from './push';\n\n// In-memory storage для demo (в production используй БД)\nconst subscriptions = new Set<string>();\n\n/**\n * POST /api/push/subscribe\n * Save push subscription\n *\n * @example\n * ```typescript\n * // app/api/push/subscribe/route.ts\n * export { POST } from '@djangocfg/nextjs/pwa/server/routes';\n * ```\n */\nexport async function handleSubscribe(request: NextRequest) {\n try {\n const subscription = await request.json();\n\n if (!validateSubscription(subscription)) {\n return NextResponse.json(\n { error: 'Invalid subscription format' },\n { status: 400 }\n );\n }\n\n // Сохраняем subscription (в demo просто в памяти)\n subscriptions.add(JSON.stringify(subscription));\n\n console.log('✅ Push subscription saved:', {\n endpoint: subscription.endpoint.substring(0, 50) + '...',\n total: subscriptions.size,\n });\n\n return NextResponse.json({\n success: true,\n message: 'Subscription saved',\n totalSubscriptions: subscriptions.size,\n });\n } catch (error: any) {\n console.error('Subscription error:', error);\n\n return NextResponse.json(\n {\n error: 'Failed to save subscription',\n details: error.message,\n },\n { status: 500 }\n );\n }\n}\n\n/**\n * GET /api/push/subscribe\n * Get all subscriptions (for testing)\n */\nexport async function handleGetSubscriptions() {\n return NextResponse.json({\n totalSubscriptions: subscriptions.size,\n subscriptions: Array.from(subscriptions).map((sub) => {\n const parsed = JSON.parse(sub);\n return {\n endpoint: parsed.endpoint.substring(0, 50) + '...',\n };\n }),\n });\n}\n\n/**\n * POST /api/push/send\n * Send push notification\n *\n * @example\n * ```typescript\n * // app/api/push/send/route.ts\n * export { POST as handleSend as POST } from '@djangocfg/nextjs/pwa/server/routes';\n * ```\n */\nexport async function handleSend(request: NextRequest) {\n try {\n const { subscription, notification } = await request.json();\n\n if (!subscription) {\n return NextResponse.json(\n { error: 'Subscription is required' },\n { status: 400 }\n );\n }\n\n if (!validateSubscription(subscription)) {\n return NextResponse.json(\n { error: 'Invalid subscription format' },\n { status: 400 }\n );\n }\n\n // Configure VAPID if not already configured\n configureVapid();\n\n await sendPushNotification(subscription, {\n title: notification?.title || 'Test Notification',\n body: notification?.body || 'This is a test push notification',\n icon: notification?.icon,\n badge: notification?.badge,\n data: notification?.data,\n });\n\n return NextResponse.json({\n success: true,\n message: 'Push notification sent',\n });\n } catch (error: any) {\n console.error('Push notification error:', error);\n\n return NextResponse.json(\n {\n error: 'Failed to send push notification',\n details: error.message,\n },\n { status: 500 }\n );\n }\n}\n\n/**\n * Combined route handlers\n * Use like: export { POST, GET } from '@djangocfg/nextjs/pwa/server/routes'\n */\nexport const POST = handleSubscribe;\nexport const GET = handleGetSubscriptions;\n","/**\n * Server-side Push Notification Utilities\n *\n * VAPID-based Web Push notifications using web-push library\n */\n\nimport webpush, { PushSubscription } from 'web-push';\nimport { consola } from 'consola';\n\nlet vapidConfigured = false;\n\n/**\n * Check if VAPID keys are configured\n */\nexport function isVapidConfigured(): boolean {\n return vapidConfigured;\n}\n\n/**\n * Get VAPID keys from environment\n */\nexport function getVapidKeys() {\n const publicKey = process.env.NEXT_PUBLIC_VAPID_PUBLIC_KEY;\n const privateKey = process.env.VAPID_PRIVATE_KEY;\n const mailto = process.env.VAPID_MAILTO || 'mailto:noreply@example.com';\n\n return { publicKey, privateKey, mailto };\n}\n\n/**\n * Configure VAPID keys for web-push\n * Call this once at app startup\n *\n * @example\n * ```typescript\n * // In your API route or middleware\n * import { configureVapid } from '@djangocfg/nextjs/pwa/server';\n *\n * configureVapid(); // Uses env vars automatically\n * ```\n */\nexport function configureVapid(options?: {\n publicKey?: string;\n privateKey?: string;\n mailto?: string;\n}): boolean {\n const { publicKey, privateKey, mailto } = options || getVapidKeys();\n\n if (!publicKey || !privateKey) {\n consola.warn(\n '⚠️ VAPID keys not configured!\\n' +\n ' Generate keys: npx web-push generate-vapid-keys\\n' +\n ' Add to .env.local:\\n' +\n ' NEXT_PUBLIC_VAPID_PUBLIC_KEY=your_public_key\\n' +\n ' VAPID_PRIVATE_KEY=your_private_key\\n' +\n ' Push notifications will not work without VAPID keys.'\n );\n return false;\n }\n\n try {\n webpush.setVapidDetails(mailto, publicKey, privateKey);\n vapidConfigured = true;\n consola.success('✅ VAPID keys configured for push notifications');\n return true;\n } catch (error: any) {\n consola.error('Failed to configure VAPID keys:', error.message);\n return false;\n }\n}\n\n/**\n * Send push notification to a subscription\n *\n * @example\n * ```typescript\n * await sendPushNotification(subscription, {\n * title: 'Hello!',\n * body: 'Test notification',\n * data: { url: '/page' },\n * });\n * ```\n */\nexport async function sendPushNotification(\n subscription: PushSubscription,\n notification: {\n title: string;\n body?: string;\n icon?: string;\n badge?: string;\n data?: any;\n tag?: string;\n requireInteraction?: boolean;\n }\n): Promise<void> {\n if (!vapidConfigured) {\n const configured = configureVapid();\n if (!configured) {\n throw new Error('VAPID keys not configured. Cannot send push notification.');\n }\n }\n\n const payload = JSON.stringify({\n title: notification.title,\n body: notification.body || '',\n icon: notification.icon,\n badge: notification.badge,\n data: notification.data,\n tag: notification.tag,\n requireInteraction: notification.requireInteraction,\n });\n\n const result = await webpush.sendNotification(subscription, payload);\n console.log('✅ Push Sent to FCM:', {\n statusCode: result.statusCode,\n headers: result.headers,\n bodyLength: result.body?.length\n });\n}\n\n/**\n * Send push notification to multiple subscriptions\n *\n * @example\n * ```typescript\n * const results = await sendPushToMultiple(subscriptions, {\n * title: 'Broadcast message',\n * body: 'Sent to all users',\n * });\n * console.log(`Sent: ${results.successful}, Failed: ${results.failed}`);\n * ```\n */\nexport async function sendPushToMultiple(\n subscriptions: PushSubscription[],\n notification: Parameters<typeof sendPushNotification>[1]\n): Promise<{\n successful: number;\n failed: number;\n errors: Array<{ subscription: PushSubscription; error: Error }>;\n}> {\n const results = await Promise.allSettled(\n subscriptions.map((sub) => sendPushNotification(sub, notification))\n );\n\n const successful = results.filter((r) => r.status === 'fulfilled').length;\n const failed = results.filter((r) => r.status === 'rejected').length;\n const errors = results\n .map((r, i) => (r.status === 'rejected' ? { subscription: subscriptions[i], error: r.reason } : null))\n .filter((e): e is NonNullable<typeof e> => e !== null);\n\n return { successful, failed, errors };\n}\n\n/**\n * Validate push subscription format\n */\nexport function validateSubscription(subscription: any): subscription is PushSubscription {\n return (\n subscription &&\n typeof subscription === 'object' &&\n typeof subscription.endpoint === 'string' &&\n subscription.keys &&\n typeof subscription.keys.p256dh === 'string' &&\n typeof subscription.keys.auth === 'string'\n );\n}\n"],"mappings":";AAMA,SAAsB,oBAAoB;;;ACA1C,OAAO,aAAmC;AAC1C,SAAS,eAAe;AAExB,IAAI,kBAAkB;AAYf,SAAS,eAAe;AAC7B,QAAM,YAAY,QAAQ,IAAI;AAC9B,QAAM,aAAa,QAAQ,IAAI;AAC/B,QAAM,SAAS,QAAQ,IAAI,gBAAgB;AAE3C,SAAO,EAAE,WAAW,YAAY,OAAO;AACzC;AAcO,SAAS,eAAe,SAInB;AACV,QAAM,EAAE,WAAW,YAAY,OAAO,IAAI,WAAW,aAAa;AAElE,MAAI,CAAC,aAAa,CAAC,YAAY;AAC7B,YAAQ;AAAA,MACN;AAAA,IAMF;AACA,WAAO;AAAA,EACT;AAEA,MAAI;AACF,YAAQ,gBAAgB,QAAQ,WAAW,UAAU;AACrD,sBAAkB;AAClB,YAAQ,QAAQ,qDAAgD;AAChE,WAAO;AAAA,EACT,SAAS,OAAY;AACnB,YAAQ,MAAM,mCAAmC,MAAM,OAAO;AAC9D,WAAO;AAAA,EACT;AACF;AAcA,eAAsB,qBACpB,cACA,cASe;AACf,MAAI,CAAC,iBAAiB;AACpB,UAAM,aAAa,eAAe;AAClC,QAAI,CAAC,YAAY;AACf,YAAM,IAAI,MAAM,2DAA2D;AAAA,IAC7E;AAAA,EACF;AAEA,QAAM,UAAU,KAAK,UAAU;AAAA,IAC7B,OAAO,aAAa;AAAA,IACpB,MAAM,aAAa,QAAQ;AAAA,IAC3B,MAAM,aAAa;AAAA,IACnB,OAAO,aAAa;AAAA,IACpB,MAAM,aAAa;AAAA,IACnB,KAAK,aAAa;AAAA,IAClB,oBAAoB,aAAa;AAAA,EACnC,CAAC;AAED,QAAM,SAAS,MAAM,QAAQ,iBAAiB,cAAc,OAAO;AACn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U,GAAG,EAAE,IAAI;AAAA,MAC/C;AAAA,IACF,CAAC;AAAA,EACH,CAAC;AACH;AAYA,eAAsB,WAAW,SAAsB;AACrD,MAAI;AACF,UAAM,EAAE,cAAc,aAAa,IAAI,MAAM,QAAQ,KAAK;AAE1D,QAAI,CAAC,cAAc;AACjB,aAAO,aAAa;AAAA,QAClB,EAAE,OAAO,2BAA2B;AAAA,QACpC,EAAE,QAAQ,IAAI;AAAA,MAChB;AAAA,IACF;AAEA,QAAI,CAAC,qBAAqB,YAAY,GAAG;AACvC,aAAO,aAAa;AAAA,QAClB,EAAE,OAAO,8BAA8B;AAAA,QACvC,EAAE,QAAQ,IAAI;AAAA,MAChB;AAAA,IACF;AAGA,mBAAe;AAEf,UAAM,qBAAqB,cAAc;AAAA,MACvC,OAAO,cAAc,SAAS;AAAA,MAC9B,MAAM,cAAc,QAAQ;AAAA,MAC5B,MAAM,cAAc;AAAA,MACpB,OAAO,cAAc;AAAA,MACrB,MAAM,cAAc;AAAA,IACtB,CAAC;AAED,WAAO,aAAa,KAAK;AAAA,MACvB,SAAS;AAAA,MACT,SAAS;AAAA,IACX,CAAC;AAAA,EACH,SAAS,OAAY;AACnB,YAAQ,MAAM,4BAA4B,KAAK;AAE/C,WAAO,aAAa;AAAA,MAClB;AAAA,QACE,OAAO;AAAA,QACP,SAAS,MAAM;AAAA,MACjB;AAAA,MACA,EAAE,QAAQ,IAAI;AAAA,IAChB;AAAA,EACF;AACF;AAMO,IAAM,OAAO;AACb,IAAM,MAAM;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../../src/pwa/server/routes.ts","../../../src/pwa/server/push.ts"],"sourcesContent":["/**\n * Ready-to-use Push Notification Route Handlers\n *\n * Import these in your app/api/push/ routes\n */\n\nimport { NextRequest, NextResponse } from 'next/server';\n\nimport { configureVapid, sendPushNotification, validateSubscription } from './push';\n\n// In-memory storage для demo (в production используй БД)\nconst subscriptions = new Set<string>();\n\n/**\n * POST /api/push/subscribe\n * Save push subscription\n *\n * @example\n * ```typescript\n * // app/api/push/subscribe/route.ts\n * export { POST } from '@djangocfg/nextjs/pwa/server/routes';\n * ```\n */\nexport async function handleSubscribe(request: NextRequest) {\n try {\n const subscription = await request.json();\n\n if (!validateSubscription(subscription)) {\n return NextResponse.json(\n { error: 'Invalid subscription format' },\n { status: 400 }\n );\n }\n\n // Сохраняем subscription (в demo просто в памяти)\n subscriptions.add(JSON.stringify(subscription));\n\n console.log('✅ Push subscription saved:', {\n endpoint: subscription.endpoint.substring(0, 50) + '...',\n total: subscriptions.size,\n });\n\n return NextResponse.json({\n success: true,\n message: 'Subscription saved',\n totalSubscriptions: subscriptions.size,\n });\n } catch (error: any) {\n console.error('Subscription error:', error);\n\n return NextResponse.json(\n {\n error: 'Failed to save subscription',\n details: error.message,\n },\n { status: 500 }\n );\n }\n}\n\n/**\n * GET /api/push/subscribe\n * Get all subscriptions (for testing)\n */\nexport async function handleGetSubscriptions() {\n return NextResponse.json({\n totalSubscriptions: subscriptions.size,\n subscriptions: Array.from(subscriptions).map((sub) => {\n const parsed = JSON.parse(sub);\n return {\n endpoint: parsed.endpoint.substring(0, 50) + '...',\n };\n }),\n });\n}\n\n/**\n * POST /api/push/send\n * Send push notification\n *\n * @example\n * ```typescript\n * // app/api/push/send/route.ts\n * export { POST as handleSend as POST } from '@djangocfg/nextjs/pwa/server/routes';\n * ```\n */\nexport async function handleSend(request: NextRequest) {\n try {\n const { subscription, notification } = await request.json();\n\n if (!subscription) {\n return NextResponse.json(\n { error: 'Subscription is required' },\n { status: 400 }\n );\n }\n\n if (!validateSubscription(subscription)) {\n return NextResponse.json(\n { error: 'Invalid subscription format' },\n { status: 400 }\n );\n }\n\n // Configure VAPID if not already configured\n configureVapid();\n\n await sendPushNotification(subscription, {\n title: notification?.title || 'Test Notification',\n body: notification?.body || 'This is a test push notification',\n icon: notification?.icon,\n badge: notification?.badge,\n data: notification?.data,\n });\n\n return NextResponse.json({\n success: true,\n message: 'Push notification sent',\n });\n } catch (error: any) {\n console.error('Push notification error:', error);\n\n return NextResponse.json(\n {\n error: 'Failed to send push notification',\n details: error.message,\n },\n { status: 500 }\n );\n }\n}\n\n/**\n * Combined route handlers\n * Use like: export { POST, GET } from '@djangocfg/nextjs/pwa/server/routes'\n */\nexport const POST = handleSubscribe;\nexport const GET = handleGetSubscriptions;\n","/**\n * Server-side Push Notification Utilities\n *\n * VAPID-based Web Push notifications using web-push library\n */\n\nimport { consola } from 'consola';\nimport webpush, { PushSubscription } from 'web-push';\n\nlet vapidConfigured = false;\n\n/**\n * Check if VAPID keys are configured\n */\nexport function isVapidConfigured(): boolean {\n return vapidConfigured;\n}\n\n/**\n * Get VAPID keys from environment\n */\nexport function getVapidKeys() {\n const publicKey = process.env.NEXT_PUBLIC_VAPID_PUBLIC_KEY;\n const privateKey = process.env.VAPID_PRIVATE_KEY;\n const mailto = process.env.VAPID_MAILTO || 'mailto:noreply@example.com';\n\n return { publicKey, privateKey, mailto };\n}\n\n/**\n * Configure VAPID keys for web-push\n * Call this once at app startup\n *\n * @example\n * ```typescript\n * // In your API route or middleware\n * import { configureVapid } from '@djangocfg/nextjs/pwa/server';\n *\n * configureVapid(); // Uses env vars automatically\n * ```\n */\nexport function configureVapid(options?: {\n publicKey?: string;\n privateKey?: string;\n mailto?: string;\n}): boolean {\n const { publicKey, privateKey, mailto } = options || getVapidKeys();\n\n if (!publicKey || !privateKey) {\n consola.warn(\n '⚠️ VAPID keys not configured!\\n' +\n ' Generate keys: npx web-push generate-vapid-keys\\n' +\n ' Add to .env.local:\\n' +\n ' NEXT_PUBLIC_VAPID_PUBLIC_KEY=your_public_key\\n' +\n ' VAPID_PRIVATE_KEY=your_private_key\\n' +\n ' Push notifications will not work without VAPID keys.'\n );\n return false;\n }\n\n try {\n webpush.setVapidDetails(mailto, publicKey, privateKey);\n vapidConfigured = true;\n consola.success('✅ VAPID keys configured for push notifications');\n return true;\n } catch (error: any) {\n consola.error('Failed to configure VAPID keys:', error.message);\n return false;\n }\n}\n\n/**\n * Send push notification to a subscription\n *\n * @example\n * ```typescript\n * await sendPushNotification(subscription, {\n * title: 'Hello!',\n * body: 'Test notification',\n * data: { url: '/page' },\n * });\n * ```\n */\nexport async function sendPushNotification(\n subscription: PushSubscription,\n notification: {\n title: string;\n body?: string;\n icon?: string;\n badge?: string;\n data?: any;\n tag?: string;\n requireInteraction?: boolean;\n }\n): Promise<void> {\n if (!vapidConfigured) {\n const configured = configureVapid();\n if (!configured) {\n throw new Error('VAPID keys not configured. Cannot send push notification.');\n }\n }\n\n const payload = JSON.stringify({\n title: notification.title,\n body: notification.body || '',\n icon: notification.icon,\n badge: notification.badge,\n data: notification.data,\n tag: notification.tag,\n requireInteraction: notification.requireInteraction,\n });\n\n const result = await webpush.sendNotification(subscription, payload);\n console.log('✅ Push Sent to FCM:', {\n statusCode: result.statusCode,\n headers: result.headers,\n bodyLength: result.body?.length\n });\n}\n\n/**\n * Send push notification to multiple subscriptions\n *\n * @example\n * ```typescript\n * const results = await sendPushToMultiple(subscriptions, {\n * title: 'Broadcast message',\n * body: 'Sent to all users',\n * });\n * console.log(`Sent: ${results.successful}, Failed: ${results.failed}`);\n * ```\n */\nexport async function sendPushToMultiple(\n subscriptions: PushSubscription[],\n notification: Parameters<typeof sendPushNotification>[1]\n): Promise<{\n successful: number;\n failed: number;\n errors: Array<{ subscription: PushSubscription; error: Error }>;\n}> {\n const results = await Promise.allSettled(\n subscriptions.map((sub) => sendPushNotification(sub, notification))\n );\n\n const successful = results.filter((r) => r.status === 'fulfilled').length;\n const failed = results.filter((r) => r.status === 'rejected').length;\n const errors = results\n .map((r, i) => (r.status === 'rejected' ? { subscription: subscriptions[i], error: r.reason } : null))\n .filter((e): e is NonNullable<typeof e> => e !== null);\n\n return { successful, failed, errors };\n}\n\n/**\n * Validate push subscription format\n */\nexport function validateSubscription(subscription: any): subscription is PushSubscription {\n return (\n subscription &&\n typeof subscription === 'object' &&\n typeof subscription.endpoint === 'string' &&\n subscription.keys &&\n typeof subscription.keys.p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,UAAM,EAAE,cAAc,aAAa,IAAI,MAAM,QAAQ,KAAK;AAE1D,QAAI,CAAC,cAAc;AACjB,aAAO,aAAa;AAAA,QAClB,EAAE,OAAO,2BAA2B;AAAA,QACpC,EAAE,QAAQ,IAAI;AAAA,MAChB;AAAA,IACF;AAEA,QAAI,CAAC,qBAAqB,YAAY,GAAG;AACvC,aAAO,aAAa;AAAA,QAClB,EAAE,OAAO,8BAA8B;AAAA,QACvC,EAAE,QAAQ,IAAI;AAAA,MAChB;AAAA,IACF;AAGA,mBAAe;AAEf,UAAM,qBAAqB,cAAc;AAAA,MACvC,OAAO,cAAc,SAAS;AAAA,MAC9B,MAAM,cAAc,QAAQ;AAAA,MAC5B,MAAM,cAAc;AAAA,MACpB,OAAO,cAAc;AAAA,MACrB,MAAM,cAAc;AAAA,IACtB,CAAC;AAED,WAAO,aAAa,KAAK;AAAA,MACvB,SAAS;AAAA,MACT,SAAS;AAAA,IACX,CAAC;AAAA,EACH,SAAS,OAAY;AACnB,YAAQ,MAAM,4BAA4B,KAAK;AAE/C,WAAO,aAAa;AAAA,MAClB;AAAA,QACE,OAAO;AAAA,QACP,SAAS,MAAM;AAAA,MACjB;AAAA,MACA,EAAE,QAAQ,IAAI;AAAA,IAChB;AAAA,EACF;AACF;AAMO,IAAM,OAAO;AACb,IAAM,MAAM;","names":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/pwa/worker/index.ts"],"sourcesContent":["/**\n * Service Worker Utilities\n *\n * Ready-to-use Serwist configuration for Next.js PWA\n */\n\n/// <reference lib=\"webworker\" />\n\nimport {
|
|
1
|
+
{"version":3,"sources":["../../../src/pwa/worker/index.ts"],"sourcesContent":["/**\n * Service Worker Utilities\n *\n * Ready-to-use Serwist configuration for Next.js PWA\n */\n\n/// <reference lib=\"webworker\" />\n\nimport { Serwist } from 'serwist';\n\nimport { defaultCache } from '@serwist/next/worker';\n\nexport interface ServiceWorkerOptions {\n /**\n * Offline fallback URL\n * @default '/_offline'\n */\n offlineFallback?: string;\n\n /**\n * Skip waiting - activate new SW immediately\n * @default true\n */\n skipWaiting?: boolean;\n\n /**\n * Take control of all clients immediately\n * @default true\n */\n clientsClaim?: boolean;\n\n /**\n * Enable navigation preload for faster loads\n * @default true\n */\n navigationPreload?: boolean;\n\n /**\n * Enable push notifications\n * @default false\n */\n enablePushNotifications?: boolean;\n\n /**\n * Default notification icon\n */\n notificationIcon?: string;\n\n /**\n * Default notification badge\n */\n notificationBadge?: string;\n}\n\n/**\n * Create and initialize Serwist service worker\n *\n * @example\n * ```ts\n * // app/sw.ts\n * import { createServiceWorker } from '@djangocfg/nextjs/worker';\n *\n * createServiceWorker({\n * offlineFallback: '/_offline',\n * });\n * ```\n */\nexport function createServiceWorker(options: ServiceWorkerOptions = {}) {\n const {\n offlineFallback = '/_offline',\n skipWaiting = true,\n clientsClaim = true,\n navigationPreload = true,\n enablePushNotifications = false,\n notificationIcon,\n notificationBadge,\n } = options;\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const self = globalThis as any;\n console.log('SW: Worker Initialized 🚀');\n\n const serwist = new Serwist({\n // Precache entries injected by Serwist build plugin\n precacheEntries: self.__SW_MANIFEST,\n\n // Skip waiting - activate new SW immediately\n skipWaiting,\n\n // Take control of all clients immediately\n clientsClaim,\n\n // Enable navigation preload for faster loads\n navigationPreload,\n\n // Use default Next.js runtime caching strategies\n runtimeCaching: defaultCache,\n\n // Fallback pages for offline\n fallbacks: {\n entries: [\n {\n url: offlineFallback,\n matcher({ request }) {\n return request.destination === 'document';\n },\n },\n ],\n },\n });\n\n serwist.addEventListeners();\n\n // Push notification support\n if (enablePushNotifications) {\n // Handle push events\n self.addEventListener('push', (event: PushEvent) => {\n let data;\n try {\n data = event.data?.json() || {};\n console.log('SW: Push Received (JSON)', data);\n } catch (err) {\n console.log('SW: Push Received (Raw)', event.data?.text());\n data = {};\n }\n\n const {\n title = 'Notification',\n body = '',\n icon = notificationIcon,\n badge = notificationBadge,\n data: notificationData = {},\n tag,\n requireInteraction = false,\n vibrate = [200, 100, 200], // Default vibration pattern\n silent = false, // Default to playing sound\n } = data;\n\n event.waitUntil(\n self.registration.showNotification(title, {\n body,\n icon,\n badge,\n data: notificationData,\n tag,\n requireInteraction,\n vibrate,\n silent,\n })\n );\n });\n\n // Handle notification clicks\n self.addEventListener('notificationclick', (event: NotificationEvent) => {\n event.notification.close();\n\n const urlToOpen = event.notification.data?.url || '/';\n\n event.waitUntil(\n self.clients.matchAll({ type: 'window', includeUncontrolled: true }).then((clientList: readonly WindowClient[]) => {\n // Check if there's already a window open with the URL\n for (const client of clientList) {\n if (client.url === urlToOpen && 'focus' in client) {\n return client.focus();\n }\n }\n // If not, open a new window\n if (self.clients.openWindow) {\n return self.clients.openWindow(urlToOpen);\n }\n })\n );\n });\n }\n}\n"],"mappings":";AAQA,SAAS,eAAe;AAExB,SAAS,oBAAoB;AAyDtB,SAAS,oBAAoB,UAAgC,CAAC,GAAG;AACtE,QAAM;AAAA,IACJ,kBAAkB;AAAA,IAClB,cAAc;AAAA,IACd,eAAe;AAAA,IACf,oBAAoB;AAAA,IACpB,0BAA0B;AAAA,IAC1B;AAAA,IACA;AAAA,EACF,IAAI;AAGJ,QAAM,OAAO;AACb,UAAQ,IAAI,kCAA2B;AAEvC,QAAM,UAAU,IAAI,QAAQ;AAAA;AAAA,IAE1B,iBAAiB,KAAK;AAAA;AAAA,IAGtB;AAAA;AAAA,IAGA;AAAA;AAAA,IAGA;AAAA;AAAA,IAGA,gBAAgB;AAAA;AAAA,IAGhB,WAAW;AAAA,MACT,SAAS;AAAA,QACP;AAAA,UACE,KAAK;AAAA,UACL,QAAQ,EAAE,QAAQ,GAAG;AACnB,mBAAO,QAAQ,gBAAgB;AAAA,UACjC;AAAA,QACF;AAAA,MACF;AAAA,IACF;AAAA,EACF,CAAC;AAED,UAAQ,kBAAkB;AAG1B,MAAI,yBAAyB;AAE3B,SAAK,iBAAiB,QAAQ,CAAC,UAAqB;AACl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
22775
22775
|
|
|
22776
|
+
// ../../node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.js
|
|
22777
|
+
var require_picocolors = __commonJS({
|
|
22778
|
+
"../../node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.js"(exports, module) {
|
|
22779
|
+
var p = process || {};
|
|
22780
|
+
var argv = p.argv || [];
|
|
22781
|
+
var env = p.env || {};
|
|
22782
|
+
var isColorSupported = !(!!env.NO_COLOR || argv.includes("--no-color")) && (!!env.FORCE_COLOR || argv.includes("--color") || p.platform === "win32" || (p.stdout || {}).isTTY && env.TERM !== "dumb" || !!env.CI);
|
|
22783
|
+
var formatter = (open, close, replace = open) => (input) => {
|
|
22784
|
+
let string = "" + input, index = string.indexOf(close, open.length);
|
|
22785
|
+
return ~index ? open + replaceClose(string, close, replace, index) + close : open + string + close;
|
|
22786
|
+
};
|
|
22787
|
+
var replaceClose = (string, close, replace, index) => {
|
|
22788
|
+
let result = "", cursor = 0;
|
|
22789
|
+
do {
|
|
22790
|
+
result += string.substring(cursor, index) + replace;
|
|
22791
|
+
cursor = index + close.length;
|
|
22792
|
+
index = string.indexOf(close, cursor);
|
|
22793
|
+
} while (~index);
|
|
22794
|
+
return result + string.substring(cursor);
|
|
22795
|
+
};
|
|
22796
|
+
var createColors = (enabled = isColorSupported) => {
|
|
22797
|
+
let f = enabled ? formatter : () => String;
|
|
22798
|
+
return {
|
|
22799
|
+
isColorSupported: enabled,
|
|
22800
|
+
reset: f("\x1B[0m", "\x1B[0m"),
|
|
22801
|
+
bold: f("\x1B[1m", "\x1B[22m", "\x1B[22m\x1B[1m"),
|
|
22802
|
+
dim: f("\x1B[2m", "\x1B[22m", "\x1B[22m\x1B[2m"),
|
|
22803
|
+
italic: f("\x1B[3m", "\x1B[23m"),
|
|
22804
|
+
underline: f("\x1B[4m", "\x1B[24m"),
|
|
22805
|
+
inverse: f("\x1B[7m", "\x1B[27m"),
|
|
22806
|
+
hidden: f("\x1B[8m", "\x1B[28m"),
|
|
22807
|
+
strikethrough: f("\x1B[9m", "\x1B[29m"),
|
|
22808
|
+
black: f("\x1B[30m", "\x1B[39m"),
|
|
22809
|
+
red: f("\x1B[31m", "\x1B[39m"),
|
|
22810
|
+
green: f("\x1B[32m", "\x1B[39m"),
|
|
22811
|
+
yellow: f("\x1B[33m", "\x1B[39m"),
|
|
22812
|
+
blue: f("\x1B[34m", "\x1B[39m"),
|
|
22813
|
+
magenta: f("\x1B[35m", "\x1B[39m"),
|
|
22814
|
+
cyan: f("\x1B[36m", "\x1B[39m"),
|
|
22815
|
+
white: f("\x1B[37m", "\x1B[39m"),
|
|
22816
|
+
gray: f("\x1B[90m", "\x1B[39m"),
|
|
22817
|
+
bgBlack: f("\x1B[40m", "\x1B[49m"),
|
|
22818
|
+
bgRed: f("\x1B[41m", "\x1B[49m"),
|
|
22819
|
+
bgGreen: f("\x1B[42m", "\x1B[49m"),
|
|
22820
|
+
bgYellow: f("\x1B[43m", "\x1B[49m"),
|
|
22821
|
+
bgBlue: f("\x1B[44m", "\x1B[49m"),
|
|
22822
|
+
bgMagenta: f("\x1B[45m", "\x1B[49m"),
|
|
22823
|
+
bgCyan: f("\x1B[46m", "\x1B[49m"),
|
|
22824
|
+
bgWhite: f("\x1B[47m", "\x1B[49m"),
|
|
22825
|
+
blackBright: f("\x1B[90m", "\x1B[39m"),
|
|
22826
|
+
redBright: f("\x1B[91m", "\x1B[39m"),
|
|
22827
|
+
greenBright: f("\x1B[92m", "\x1B[39m"),
|
|
22828
|
+
yellowBright: f("\x1B[93m", "\x1B[39m"),
|
|
22829
|
+
blueBright: f("\x1B[94m", "\x1B[39m"),
|
|
22830
|
+
magentaBright: f("\x1B[95m", "\x1B[39m"),
|
|
22831
|
+
cyanBright: f("\x1B[96m", "\x1B[39m"),
|
|
22832
|
+
whiteBright: f("\x1B[97m", "\x1B[39m"),
|
|
22833
|
+
bgBlackBright: f("\x1B[100m", "\x1B[49m"),
|
|
22834
|
+
bgRedBright: f("\x1B[101m", "\x1B[49m"),
|
|
22835
|
+
bgGreenBright: f("\x1B[102m", "\x1B[49m"),
|
|
22836
|
+
bgYellowBright: f("\x1B[103m", "\x1B[49m"),
|
|
22837
|
+
bgBlueBright: f("\x1B[104m", "\x1B[49m"),
|
|
22838
|
+
bgMagentaBright: f("\x1B[105m", "\x1B[49m"),
|
|
22839
|
+
bgCyanBright: f("\x1B[106m", "\x1B[49m"),
|
|
22840
|
+
bgWhiteBright: f("\x1B[107m", "\x1B[49m")
|
|
22841
|
+
};
|
|
22842
|
+
};
|
|
22843
|
+
module.exports = createColors();
|
|
22844
|
+
module.exports.createColors = createColors;
|
|
22845
|
+
}
|
|
22846
|
+
});
|
|
22847
|
+
|
|
22776
22848
|
// ../../node_modules/.pnpm/kleur@3.0.3/node_modules/kleur/index.js
|
|
22777
22849
|
var require_kleur = __commonJS({
|
|
22778
22850
|
"../../node_modules/.pnpm/kleur@3.0.3/node_modules/kleur/index.js"(exports, module) {
|
|
@@ -27623,77 +27695,8 @@ var require_prompts3 = __commonJS({
|
|
|
27623
27695
|
}
|
|
27624
27696
|
});
|
|
27625
27697
|
|
|
27626
|
-
//
|
|
27627
|
-
|
|
27628
|
-
"../../node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.js"(exports, module) {
|
|
27629
|
-
var p = process || {};
|
|
27630
|
-
var argv = p.argv || [];
|
|
27631
|
-
var env = p.env || {};
|
|
27632
|
-
var isColorSupported = !(!!env.NO_COLOR || argv.includes("--no-color")) && (!!env.FORCE_COLOR || argv.includes("--color") || p.platform === "win32" || (p.stdout || {}).isTTY && env.TERM !== "dumb" || !!env.CI);
|
|
27633
|
-
var formatter = (open, close, replace = open) => (input) => {
|
|
27634
|
-
let string = "" + input, index = string.indexOf(close, open.length);
|
|
27635
|
-
return ~index ? open + replaceClose(string, close, replace, index) + close : open + string + close;
|
|
27636
|
-
};
|
|
27637
|
-
var replaceClose = (string, close, replace, index) => {
|
|
27638
|
-
let result = "", cursor = 0;
|
|
27639
|
-
do {
|
|
27640
|
-
result += string.substring(cursor, index) + replace;
|
|
27641
|
-
cursor = index + close.length;
|
|
27642
|
-
index = string.indexOf(close, cursor);
|
|
27643
|
-
} while (~index);
|
|
27644
|
-
return result + string.substring(cursor);
|
|
27645
|
-
};
|
|
27646
|
-
var createColors = (enabled = isColorSupported) => {
|
|
27647
|
-
let f = enabled ? formatter : () => String;
|
|
27648
|
-
return {
|
|
27649
|
-
isColorSupported: enabled,
|
|
27650
|
-
reset: f("\x1B[0m", "\x1B[0m"),
|
|
27651
|
-
bold: f("\x1B[1m", "\x1B[22m", "\x1B[22m\x1B[1m"),
|
|
27652
|
-
dim: f("\x1B[2m", "\x1B[22m", "\x1B[22m\x1B[2m"),
|
|
27653
|
-
italic: f("\x1B[3m", "\x1B[23m"),
|
|
27654
|
-
underline: f("\x1B[4m", "\x1B[24m"),
|
|
27655
|
-
inverse: f("\x1B[7m", "\x1B[27m"),
|
|
27656
|
-
hidden: f("\x1B[8m", "\x1B[28m"),
|
|
27657
|
-
strikethrough: f("\x1B[9m", "\x1B[29m"),
|
|
27658
|
-
black: f("\x1B[30m", "\x1B[39m"),
|
|
27659
|
-
red: f("\x1B[31m", "\x1B[39m"),
|
|
27660
|
-
green: f("\x1B[32m", "\x1B[39m"),
|
|
27661
|
-
yellow: f("\x1B[33m", "\x1B[39m"),
|
|
27662
|
-
blue: f("\x1B[34m", "\x1B[39m"),
|
|
27663
|
-
magenta: f("\x1B[35m", "\x1B[39m"),
|
|
27664
|
-
cyan: f("\x1B[36m", "\x1B[39m"),
|
|
27665
|
-
white: f("\x1B[37m", "\x1B[39m"),
|
|
27666
|
-
gray: f("\x1B[90m", "\x1B[39m"),
|
|
27667
|
-
bgBlack: f("\x1B[40m", "\x1B[49m"),
|
|
27668
|
-
bgRed: f("\x1B[41m", "\x1B[49m"),
|
|
27669
|
-
bgGreen: f("\x1B[42m", "\x1B[49m"),
|
|
27670
|
-
bgYellow: f("\x1B[43m", "\x1B[49m"),
|
|
27671
|
-
bgBlue: f("\x1B[44m", "\x1B[49m"),
|
|
27672
|
-
bgMagenta: f("\x1B[45m", "\x1B[49m"),
|
|
27673
|
-
bgCyan: f("\x1B[46m", "\x1B[49m"),
|
|
27674
|
-
bgWhite: f("\x1B[47m", "\x1B[49m"),
|
|
27675
|
-
blackBright: f("\x1B[90m", "\x1B[39m"),
|
|
27676
|
-
redBright: f("\x1B[91m", "\x1B[39m"),
|
|
27677
|
-
greenBright: f("\x1B[92m", "\x1B[39m"),
|
|
27678
|
-
yellowBright: f("\x1B[93m", "\x1B[39m"),
|
|
27679
|
-
blueBright: f("\x1B[94m", "\x1B[39m"),
|
|
27680
|
-
magentaBright: f("\x1B[95m", "\x1B[39m"),
|
|
27681
|
-
cyanBright: f("\x1B[96m", "\x1B[39m"),
|
|
27682
|
-
whiteBright: f("\x1B[97m", "\x1B[39m"),
|
|
27683
|
-
bgBlackBright: f("\x1B[100m", "\x1B[49m"),
|
|
27684
|
-
bgRedBright: f("\x1B[101m", "\x1B[49m"),
|
|
27685
|
-
bgGreenBright: f("\x1B[102m", "\x1B[49m"),
|
|
27686
|
-
bgYellowBright: f("\x1B[103m", "\x1B[49m"),
|
|
27687
|
-
bgBlueBright: f("\x1B[104m", "\x1B[49m"),
|
|
27688
|
-
bgMagentaBright: f("\x1B[105m", "\x1B[49m"),
|
|
27689
|
-
bgCyanBright: f("\x1B[106m", "\x1B[49m"),
|
|
27690
|
-
bgWhiteBright: f("\x1B[107m", "\x1B[49m")
|
|
27691
|
-
};
|
|
27692
|
-
};
|
|
27693
|
-
module.exports = createColors();
|
|
27694
|
-
module.exports.createColors = createColors;
|
|
27695
|
-
}
|
|
27696
|
-
});
|
|
27698
|
+
// src/scripts/check-links.ts
|
|
27699
|
+
import { mkdir, writeFile } from "fs/promises";
|
|
27697
27700
|
|
|
27698
27701
|
// ../../node_modules/.pnpm/linkinator@7.5.1/node_modules/linkinator/build/src/index.js
|
|
27699
27702
|
var import_undici = __toESM(require_undici(), 1);
|
|
@@ -39988,9 +39991,8 @@ function detectRedirect(status, originalUrl, response) {
|
|
|
39988
39991
|
}
|
|
39989
39992
|
|
|
39990
39993
|
// src/scripts/check-links.ts
|
|
39991
|
-
var import_prompts = __toESM(require_prompts3());
|
|
39992
39994
|
var import_picocolors = __toESM(require_picocolors());
|
|
39993
|
-
|
|
39995
|
+
var import_prompts = __toESM(require_prompts3());
|
|
39994
39996
|
import { dirname } from "path";
|
|
39995
39997
|
var DEFAULT_SKIP_PATTERN = [
|
|
39996
39998
|
"github.com",
|