@djangocfg/nextjs 2.1.34 → 2.1.36
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/README.md +0 -21
- package/dist/config/index.d.mts +21 -2
- package/dist/config/index.mjs +11 -10
- package/dist/config/index.mjs.map +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.mjs +11 -10
- package/dist/index.mjs.map +1 -1
- package/package.json +5 -7
- package/src/config/index.ts +1 -0
- package/src/config/utils/manifest.ts +26 -7
- package/bin/dev-with-browser.js +0 -105
package/README.md
CHANGED
|
@@ -40,27 +40,6 @@ yarn add @djangocfg/nextjs
|
|
|
40
40
|
|
|
41
41
|
## Quick Start
|
|
42
42
|
|
|
43
|
-
### Next.js Dev Server with Auto Browser Open
|
|
44
|
-
|
|
45
|
-
Start Next.js dev server with automatic browser opening (works with both Turbopack and webpack):
|
|
46
|
-
|
|
47
|
-
```bash
|
|
48
|
-
# In package.json
|
|
49
|
-
{
|
|
50
|
-
"scripts": {
|
|
51
|
-
"dev": "nextjs-dev -p 3000", // Turbopack + auto browser open
|
|
52
|
-
"dev:webpack": "nextjs-dev --webpack" // webpack + auto browser open
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
```
|
|
56
|
-
|
|
57
|
-
**Features:**
|
|
58
|
-
- ✅ Cross-platform (macOS, Windows, Linux)
|
|
59
|
-
- ✅ Works with Turbopack (Next.js 16 default)
|
|
60
|
-
- ✅ Works with webpack mode
|
|
61
|
-
- ✅ Waits for server to be ready before opening
|
|
62
|
-
- ✅ Zero configuration
|
|
63
|
-
|
|
64
43
|
### AI Documentation Search
|
|
65
44
|
|
|
66
45
|
Search DjangoCFG documentation from the terminal:
|
package/dist/config/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { NextConfig, Metadata, MetadataRoute } from 'next';
|
|
1
|
+
import { NextConfig, Metadata, Viewport, MetadataRoute } from 'next';
|
|
2
2
|
import { Configuration, Compiler } from 'webpack';
|
|
3
3
|
export { A as AI_DOCS_HINT, b as MCP_API_URL, M as MCP_BASE_URL, a as MCP_SERVER_URL } from '../constants-HezbftFb.mjs';
|
|
4
4
|
|
|
@@ -706,9 +706,24 @@ interface IconPaths {
|
|
|
706
706
|
logo384?: string;
|
|
707
707
|
logo512?: string;
|
|
708
708
|
}
|
|
709
|
+
/**
|
|
710
|
+
* Create viewport configuration for Next.js app
|
|
711
|
+
*
|
|
712
|
+
* @example
|
|
713
|
+
* ```typescript
|
|
714
|
+
* export const viewport: Viewport = createViewport({
|
|
715
|
+
* themeColor: '#ffffff',
|
|
716
|
+
* });
|
|
717
|
+
* ```
|
|
718
|
+
*/
|
|
719
|
+
declare function createViewport(config: {
|
|
720
|
+
themeColor?: string;
|
|
721
|
+
}): Viewport;
|
|
709
722
|
/**
|
|
710
723
|
* Create manifest metadata for Next.js app
|
|
711
724
|
*
|
|
725
|
+
* Note: themeColor and viewport should be exported separately using createViewport()
|
|
726
|
+
*
|
|
712
727
|
* @example
|
|
713
728
|
* ```typescript
|
|
714
729
|
* export const metadata: Metadata = {
|
|
@@ -718,6 +733,10 @@ interface IconPaths {
|
|
|
718
733
|
* description: 'My awesome app',
|
|
719
734
|
* }),
|
|
720
735
|
* };
|
|
736
|
+
*
|
|
737
|
+
* export const viewport: Viewport = createViewport({
|
|
738
|
+
* themeColor: '#ffffff',
|
|
739
|
+
* });
|
|
721
740
|
* ```
|
|
722
741
|
*/
|
|
723
742
|
declare function createManifestMetadata(config: ManifestConfig): Metadata;
|
|
@@ -764,4 +783,4 @@ declare function createManifest(config: {
|
|
|
764
783
|
*/
|
|
765
784
|
declare function generateManifest(config: ManifestConfig): Record<string, any>;
|
|
766
785
|
|
|
767
|
-
export { type BaseNextConfigOptions, type CacheStrategy, type CompressionPluginOptions, DEFAULT_OPTIMIZE_PACKAGES, DEFAULT_TRANSPILE_PACKAGES, DJANGOCFG_PACKAGES, DJANGO_CFG_BANNER, DevStartupPlugin, type DevStartupPluginOptions, type IconPaths, type InstallOptions, type InstallProgress, type ManifestConfig, type MissingPackage, OPTIONAL_PACKAGES, PACKAGE_NAME, PEER_DEPENDENCIES, type PWAPluginOptions, type PackageDefinition, type PackageVersion, type RuntimeCacheEntry, type UpdateOptions, addCompressionPlugins, buildInstallCommand, buildSingleInstallCommand, checkAndInstallPackages, checkAndUpdatePackages, checkForUpdate, checkForUpdates, checkPackages, createApiCacheRule, createBaseNextConfig, createCdnCacheRule, createManifest, createManifestMetadata, createStaticAssetRule, deepMerge, defaultRuntimeCaching, detectPackageManager, fetchLatestVersion, generateManifest, getApiUrl, getBasePath, getCurrentVersion, getInstalledVersion, getMissingPackages, getOutdatedPackages, getPackagesForContext, getSiteUrl, getUpdateCommand, installPackages, installPackagesWithProgress, isCI, isCompressionAvailable, isDev, isPWAAvailable, isPackageInstalled, isProduction, isStaticBuild, printVersionInfo, resetDevStartupState, resetInstallerPreferences, resetUpdaterPreferences, updatePackagesWithProgress, withPWA };
|
|
786
|
+
export { type BaseNextConfigOptions, type CacheStrategy, type CompressionPluginOptions, DEFAULT_OPTIMIZE_PACKAGES, DEFAULT_TRANSPILE_PACKAGES, DJANGOCFG_PACKAGES, DJANGO_CFG_BANNER, DevStartupPlugin, type DevStartupPluginOptions, type IconPaths, type InstallOptions, type InstallProgress, type ManifestConfig, type MissingPackage, OPTIONAL_PACKAGES, PACKAGE_NAME, PEER_DEPENDENCIES, type PWAPluginOptions, type PackageDefinition, type PackageVersion, type RuntimeCacheEntry, type UpdateOptions, addCompressionPlugins, buildInstallCommand, buildSingleInstallCommand, checkAndInstallPackages, checkAndUpdatePackages, checkForUpdate, checkForUpdates, checkPackages, createApiCacheRule, createBaseNextConfig, createCdnCacheRule, createManifest, createManifestMetadata, createStaticAssetRule, createViewport, deepMerge, defaultRuntimeCaching, detectPackageManager, fetchLatestVersion, generateManifest, getApiUrl, getBasePath, getCurrentVersion, getInstalledVersion, getMissingPackages, getOutdatedPackages, getPackagesForContext, getSiteUrl, getUpdateCommand, installPackages, installPackagesWithProgress, isCI, isCompressionAvailable, isDev, isPWAAvailable, isPackageInstalled, isProduction, isStaticBuild, printVersionInfo, resetDevStartupState, resetInstallerPreferences, resetUpdaterPreferences, updatePackagesWithProgress, withPWA };
|
package/dist/config/index.mjs
CHANGED
|
@@ -14,7 +14,7 @@ var require_package = __commonJS({
|
|
|
14
14
|
"package.json"(exports, module) {
|
|
15
15
|
module.exports = {
|
|
16
16
|
name: "@djangocfg/nextjs",
|
|
17
|
-
version: "2.1.
|
|
17
|
+
version: "2.1.36",
|
|
18
18
|
description: "Next.js server utilities: sitemap, health, OG images, contact forms, navigation, config",
|
|
19
19
|
keywords: [
|
|
20
20
|
"nextjs",
|
|
@@ -97,13 +97,11 @@ var require_package = __commonJS({
|
|
|
97
97
|
files: [
|
|
98
98
|
"dist",
|
|
99
99
|
"src",
|
|
100
|
-
"bin",
|
|
101
100
|
"README.md",
|
|
102
101
|
"LICENSE"
|
|
103
102
|
],
|
|
104
103
|
bin: {
|
|
105
|
-
"djangocfg-docs": "./dist/ai/cli.mjs"
|
|
106
|
-
"nextjs-dev": "./bin/dev-with-browser.js"
|
|
104
|
+
"djangocfg-docs": "./dist/ai/cli.mjs"
|
|
107
105
|
},
|
|
108
106
|
scripts: {
|
|
109
107
|
build: "tsup",
|
|
@@ -1591,10 +1589,17 @@ function createBaseNextConfig(options = {}) {
|
|
|
1591
1589
|
}
|
|
1592
1590
|
|
|
1593
1591
|
// src/config/utils/manifest.ts
|
|
1592
|
+
function createViewport(config) {
|
|
1593
|
+
return {
|
|
1594
|
+
width: "device-width",
|
|
1595
|
+
initialScale: 1,
|
|
1596
|
+
maximumScale: 1,
|
|
1597
|
+
themeColor: config.themeColor || "#000000"
|
|
1598
|
+
};
|
|
1599
|
+
}
|
|
1594
1600
|
function createManifestMetadata(config) {
|
|
1595
1601
|
return {
|
|
1596
1602
|
manifest: "/manifest.json",
|
|
1597
|
-
themeColor: config.themeColor || "#000000",
|
|
1598
1603
|
appleWebApp: {
|
|
1599
1604
|
capable: true,
|
|
1600
1605
|
statusBarStyle: "default",
|
|
@@ -1603,11 +1608,6 @@ function createManifestMetadata(config) {
|
|
|
1603
1608
|
applicationName: config.name,
|
|
1604
1609
|
formatDetection: {
|
|
1605
1610
|
telephone: false
|
|
1606
|
-
},
|
|
1607
|
-
viewport: {
|
|
1608
|
-
width: "device-width",
|
|
1609
|
-
initialScale: 1,
|
|
1610
|
-
maximumScale: 1
|
|
1611
1611
|
}
|
|
1612
1612
|
};
|
|
1613
1613
|
}
|
|
@@ -1708,6 +1708,7 @@ export {
|
|
|
1708
1708
|
createManifest,
|
|
1709
1709
|
createManifestMetadata,
|
|
1710
1710
|
createStaticAssetRule,
|
|
1711
|
+
createViewport,
|
|
1711
1712
|
deepMerge,
|
|
1712
1713
|
defaultRuntimeCaching,
|
|
1713
1714
|
detectPackageManager,
|