@nitrostack/cli 1.0.0
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 +131 -0
- package/dist/commands/build.d.ts +6 -0
- package/dist/commands/build.d.ts.map +1 -0
- package/dist/commands/build.js +185 -0
- package/dist/commands/dev.d.ts +7 -0
- package/dist/commands/dev.d.ts.map +1 -0
- package/dist/commands/dev.js +365 -0
- package/dist/commands/generate-types.d.ts +8 -0
- package/dist/commands/generate-types.d.ts.map +1 -0
- package/dist/commands/generate-types.js +219 -0
- package/dist/commands/generate.d.ts +12 -0
- package/dist/commands/generate.d.ts.map +1 -0
- package/dist/commands/generate.js +375 -0
- package/dist/commands/init.d.ts +7 -0
- package/dist/commands/init.d.ts.map +1 -0
- package/dist/commands/init.js +324 -0
- package/dist/commands/install.d.ts +10 -0
- package/dist/commands/install.d.ts.map +1 -0
- package/dist/commands/install.js +80 -0
- package/dist/commands/start.d.ts +6 -0
- package/dist/commands/start.d.ts.map +1 -0
- package/dist/commands/start.js +70 -0
- package/dist/commands/upgrade.d.ts +10 -0
- package/dist/commands/upgrade.d.ts.map +1 -0
- package/dist/commands/upgrade.js +214 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +94 -0
- package/dist/mcp-dev-wrapper.d.ts +15 -0
- package/dist/mcp-dev-wrapper.d.ts.map +1 -0
- package/dist/mcp-dev-wrapper.js +187 -0
- package/dist/ui/branding.d.ts +31 -0
- package/dist/ui/branding.d.ts.map +1 -0
- package/dist/ui/branding.js +136 -0
- package/package.json +69 -0
- package/templates/typescript-oauth/.env.example +27 -0
- package/templates/typescript-oauth/OAUTH_SETUP.md +592 -0
- package/templates/typescript-oauth/README.md +263 -0
- package/templates/typescript-oauth/package.json +29 -0
- package/templates/typescript-oauth/src/app.module.ts +92 -0
- package/templates/typescript-oauth/src/guards/oauth.guard.ts +126 -0
- package/templates/typescript-oauth/src/health/system.health.ts +55 -0
- package/templates/typescript-oauth/src/index.ts +63 -0
- package/templates/typescript-oauth/src/modules/flights/booking.tools.ts +323 -0
- package/templates/typescript-oauth/src/modules/flights/flights.module.ts +14 -0
- package/templates/typescript-oauth/src/modules/flights/flights.prompts.ts +228 -0
- package/templates/typescript-oauth/src/modules/flights/flights.resources.ts +215 -0
- package/templates/typescript-oauth/src/modules/flights/flights.tools.ts +457 -0
- package/templates/typescript-oauth/src/services/duffel.service.ts +285 -0
- package/templates/typescript-oauth/src/widgets/app/airport-search/page.tsx +270 -0
- package/templates/typescript-oauth/src/widgets/app/flight-details/page.tsx +261 -0
- package/templates/typescript-oauth/src/widgets/app/flight-search-results/page.tsx +378 -0
- package/templates/typescript-oauth/src/widgets/app/globals.css +167 -0
- package/templates/typescript-oauth/src/widgets/app/layout.tsx +18 -0
- package/templates/typescript-oauth/src/widgets/app/order-cancellation/page.tsx +207 -0
- package/templates/typescript-oauth/src/widgets/app/order-summary/page.tsx +245 -0
- package/templates/typescript-oauth/src/widgets/app/payment-confirmation/page.tsx +152 -0
- package/templates/typescript-oauth/src/widgets/app/seat-selection/page.tsx +486 -0
- package/templates/typescript-oauth/src/widgets/next-env.d.ts +5 -0
- package/templates/typescript-oauth/src/widgets/next.config.js +45 -0
- package/templates/typescript-oauth/src/widgets/package-lock.json +4493 -0
- package/templates/typescript-oauth/src/widgets/package.json +24 -0
- package/templates/typescript-oauth/src/widgets/tsconfig.json +28 -0
- package/templates/typescript-oauth/src/widgets/widget-manifest.json +395 -0
- package/templates/typescript-oauth/tsconfig.json +23 -0
- package/templates/typescript-pizzaz/README.md +252 -0
- package/templates/typescript-pizzaz/package.json +34 -0
- package/templates/typescript-pizzaz/src/app.module.ts +28 -0
- package/templates/typescript-pizzaz/src/index.ts +30 -0
- package/templates/typescript-pizzaz/src/modules/pizzaz/pizzaz.data.ts +106 -0
- package/templates/typescript-pizzaz/src/modules/pizzaz/pizzaz.module.ts +11 -0
- package/templates/typescript-pizzaz/src/modules/pizzaz/pizzaz.service.ts +60 -0
- package/templates/typescript-pizzaz/src/modules/pizzaz/pizzaz.tools.ts +197 -0
- package/templates/typescript-pizzaz/src/widgets/app/layout.tsx +18 -0
- package/templates/typescript-pizzaz/src/widgets/app/pizza-list/page.tsx +272 -0
- package/templates/typescript-pizzaz/src/widgets/app/pizza-map/page.tsx +216 -0
- package/templates/typescript-pizzaz/src/widgets/app/pizza-shop/page.tsx +374 -0
- package/templates/typescript-pizzaz/src/widgets/components/CompactShopCard.tsx +144 -0
- package/templates/typescript-pizzaz/src/widgets/components/PizzaCard.tsx +191 -0
- package/templates/typescript-pizzaz/src/widgets/next.config.js +45 -0
- package/templates/typescript-pizzaz/src/widgets/package.json +30 -0
- package/templates/typescript-pizzaz/src/widgets/tsconfig.json +28 -0
- package/templates/typescript-pizzaz/src/widgets/widget-manifest.json +253 -0
- package/templates/typescript-pizzaz/tsconfig.json +30 -0
- package/templates/typescript-starter/README.md +320 -0
- package/templates/typescript-starter/package.json +25 -0
- package/templates/typescript-starter/src/app.module.ts +34 -0
- package/templates/typescript-starter/src/health/system.health.ts +55 -0
- package/templates/typescript-starter/src/index.ts +29 -0
- package/templates/typescript-starter/src/modules/calculator/calculator.module.ts +12 -0
- package/templates/typescript-starter/src/modules/calculator/calculator.prompts.ts +73 -0
- package/templates/typescript-starter/src/modules/calculator/calculator.resources.ts +59 -0
- package/templates/typescript-starter/src/modules/calculator/calculator.tools.ts +166 -0
- package/templates/typescript-starter/src/widgets/app/calculator-result/page.tsx +180 -0
- package/templates/typescript-starter/src/widgets/app/layout.tsx +18 -0
- package/templates/typescript-starter/src/widgets/next.config.js +45 -0
- package/templates/typescript-starter/src/widgets/package.json +24 -0
- package/templates/typescript-starter/src/widgets/tsconfig.json +28 -0
- package/templates/typescript-starter/src/widgets/widget-manifest.json +48 -0
- package/templates/typescript-starter/tsconfig.json +23 -0
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
interface PizzaShop {
|
|
4
|
+
id: string;
|
|
5
|
+
name: string;
|
|
6
|
+
description: string;
|
|
7
|
+
address: string;
|
|
8
|
+
coords: [number, number];
|
|
9
|
+
rating: number;
|
|
10
|
+
reviews: number;
|
|
11
|
+
priceLevel: 1 | 2 | 3;
|
|
12
|
+
cuisine: string[];
|
|
13
|
+
hours: { open: string; close: string };
|
|
14
|
+
phone: string;
|
|
15
|
+
website?: string;
|
|
16
|
+
image: string;
|
|
17
|
+
specialties: string[];
|
|
18
|
+
openNow: boolean;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
interface CompactShopCardProps {
|
|
22
|
+
shop: PizzaShop;
|
|
23
|
+
isSelected: boolean;
|
|
24
|
+
onClick: () => void;
|
|
25
|
+
isDark?: boolean;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export function CompactShopCard({ shop, isSelected, onClick, isDark = true }: CompactShopCardProps) {
|
|
29
|
+
const priceSymbol = '$'.repeat(shop.priceLevel);
|
|
30
|
+
|
|
31
|
+
return (
|
|
32
|
+
<div
|
|
33
|
+
onClick={onClick}
|
|
34
|
+
style={{
|
|
35
|
+
display: 'flex',
|
|
36
|
+
gap: '12px',
|
|
37
|
+
padding: '12px',
|
|
38
|
+
background: isSelected
|
|
39
|
+
? 'rgba(255, 255, 255, 0.95)'
|
|
40
|
+
: 'rgba(255, 255, 255, 0.9)',
|
|
41
|
+
backdropFilter: 'blur(10px)',
|
|
42
|
+
borderRadius: '12px',
|
|
43
|
+
cursor: 'pointer',
|
|
44
|
+
transition: 'all 0.2s',
|
|
45
|
+
border: isSelected ? '2px solid #3b82f6' : '2px solid transparent',
|
|
46
|
+
boxShadow: isSelected
|
|
47
|
+
? '0 4px 12px rgba(59, 130, 246, 0.3)'
|
|
48
|
+
: '0 2px 8px rgba(0, 0, 0, 0.1)',
|
|
49
|
+
minWidth: '280px',
|
|
50
|
+
maxWidth: '280px',
|
|
51
|
+
}}
|
|
52
|
+
onMouseEnter={(e) => {
|
|
53
|
+
if (!isSelected) {
|
|
54
|
+
e.currentTarget.style.transform = 'translateY(-2px)';
|
|
55
|
+
e.currentTarget.style.boxShadow = '0 4px 12px rgba(0, 0, 0, 0.15)';
|
|
56
|
+
}
|
|
57
|
+
}}
|
|
58
|
+
onMouseLeave={(e) => {
|
|
59
|
+
if (!isSelected) {
|
|
60
|
+
e.currentTarget.style.transform = 'translateY(0)';
|
|
61
|
+
e.currentTarget.style.boxShadow = '0 2px 8px rgba(0, 0, 0, 0.1)';
|
|
62
|
+
}
|
|
63
|
+
}}
|
|
64
|
+
>
|
|
65
|
+
{/* Image */}
|
|
66
|
+
<img
|
|
67
|
+
src={shop.image}
|
|
68
|
+
alt={shop.name}
|
|
69
|
+
style={{
|
|
70
|
+
width: '80px',
|
|
71
|
+
height: '80px',
|
|
72
|
+
borderRadius: '8px',
|
|
73
|
+
objectFit: 'cover',
|
|
74
|
+
flexShrink: 0,
|
|
75
|
+
}}
|
|
76
|
+
/>
|
|
77
|
+
|
|
78
|
+
{/* Info */}
|
|
79
|
+
<div style={{
|
|
80
|
+
flex: 1,
|
|
81
|
+
display: 'flex',
|
|
82
|
+
flexDirection: 'column',
|
|
83
|
+
justifyContent: 'space-between',
|
|
84
|
+
minWidth: 0,
|
|
85
|
+
}}>
|
|
86
|
+
{/* Name */}
|
|
87
|
+
<h4 style={{
|
|
88
|
+
margin: 0,
|
|
89
|
+
fontSize: '14px',
|
|
90
|
+
fontWeight: '600',
|
|
91
|
+
color: '#111',
|
|
92
|
+
overflow: 'hidden',
|
|
93
|
+
textOverflow: 'ellipsis',
|
|
94
|
+
whiteSpace: 'nowrap',
|
|
95
|
+
}}>
|
|
96
|
+
{shop.name}
|
|
97
|
+
</h4>
|
|
98
|
+
|
|
99
|
+
{/* Description */}
|
|
100
|
+
<p style={{
|
|
101
|
+
margin: '4px 0',
|
|
102
|
+
fontSize: '12px',
|
|
103
|
+
color: '#666',
|
|
104
|
+
overflow: 'hidden',
|
|
105
|
+
textOverflow: 'ellipsis',
|
|
106
|
+
whiteSpace: 'nowrap',
|
|
107
|
+
}}>
|
|
108
|
+
{shop.description}
|
|
109
|
+
</p>
|
|
110
|
+
|
|
111
|
+
{/* Rating & Price */}
|
|
112
|
+
<div style={{
|
|
113
|
+
display: 'flex',
|
|
114
|
+
alignItems: 'center',
|
|
115
|
+
gap: '8px',
|
|
116
|
+
fontSize: '12px',
|
|
117
|
+
}}>
|
|
118
|
+
<div style={{
|
|
119
|
+
display: 'flex',
|
|
120
|
+
alignItems: 'center',
|
|
121
|
+
gap: '4px',
|
|
122
|
+
}}>
|
|
123
|
+
<span style={{ color: '#fbbf24' }}>⭐</span>
|
|
124
|
+
<span style={{ fontWeight: '600', color: '#111' }}>{shop.rating}</span>
|
|
125
|
+
</div>
|
|
126
|
+
<span style={{ color: '#999' }}>•</span>
|
|
127
|
+
<span style={{ color: '#666' }}>{priceSymbol}</span>
|
|
128
|
+
{shop.openNow && (
|
|
129
|
+
<>
|
|
130
|
+
<span style={{ color: '#999' }}>•</span>
|
|
131
|
+
<span style={{
|
|
132
|
+
color: '#10b981',
|
|
133
|
+
fontWeight: '600',
|
|
134
|
+
fontSize: '11px',
|
|
135
|
+
}}>
|
|
136
|
+
Open Now
|
|
137
|
+
</span>
|
|
138
|
+
</>
|
|
139
|
+
)}
|
|
140
|
+
</div>
|
|
141
|
+
</div>
|
|
142
|
+
</div>
|
|
143
|
+
);
|
|
144
|
+
}
|
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { useTheme, useWidgetState, useMaxHeight, useDisplayMode } from '@nitrostack/widgets';
|
|
4
|
+
import { Star, MapPin, Phone, Globe, Clock } from 'lucide-react';
|
|
5
|
+
|
|
6
|
+
interface PizzaShop {
|
|
7
|
+
id: string;
|
|
8
|
+
name: string;
|
|
9
|
+
description: string;
|
|
10
|
+
address: string;
|
|
11
|
+
coords: [number, number];
|
|
12
|
+
rating: number;
|
|
13
|
+
reviews: number;
|
|
14
|
+
priceLevel: 1 | 2 | 3;
|
|
15
|
+
cuisine: string[];
|
|
16
|
+
hours: { open: string; close: string };
|
|
17
|
+
phone: string;
|
|
18
|
+
website?: string;
|
|
19
|
+
image: string;
|
|
20
|
+
specialties: string[];
|
|
21
|
+
openNow: boolean;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
interface PizzaCardProps {
|
|
25
|
+
shop: PizzaShop;
|
|
26
|
+
onSelect?: (shop: PizzaShop) => void;
|
|
27
|
+
isFavorite?: boolean;
|
|
28
|
+
onToggleFavorite?: (shopId: string) => void;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export function PizzaCard({ shop, onSelect, isFavorite, onToggleFavorite }: PizzaCardProps) {
|
|
32
|
+
const theme = useTheme();
|
|
33
|
+
const isDark = theme === 'dark';
|
|
34
|
+
|
|
35
|
+
const priceSymbol = '$'.repeat(shop.priceLevel);
|
|
36
|
+
|
|
37
|
+
return (
|
|
38
|
+
<div
|
|
39
|
+
onClick={() => onSelect?.(shop)}
|
|
40
|
+
style={{
|
|
41
|
+
background: isDark ? '#1a1a1a' : '#ffffff',
|
|
42
|
+
border: `1px solid ${isDark ? '#333' : '#e5e7eb'}`,
|
|
43
|
+
borderRadius: '12px',
|
|
44
|
+
overflow: 'hidden',
|
|
45
|
+
cursor: onSelect ? 'pointer' : 'default',
|
|
46
|
+
transition: 'all 0.2s',
|
|
47
|
+
boxShadow: isDark ? '0 2px 8px rgba(0,0,0,0.3)' : '0 2px 8px rgba(0,0,0,0.1)',
|
|
48
|
+
}}
|
|
49
|
+
onMouseEnter={(e) => {
|
|
50
|
+
if (onSelect) {
|
|
51
|
+
e.currentTarget.style.transform = 'translateY(-2px)';
|
|
52
|
+
e.currentTarget.style.boxShadow = isDark
|
|
53
|
+
? '0 4px 12px rgba(0,0,0,0.4)'
|
|
54
|
+
: '0 4px 12px rgba(0,0,0,0.15)';
|
|
55
|
+
}
|
|
56
|
+
}}
|
|
57
|
+
onMouseLeave={(e) => {
|
|
58
|
+
if (onSelect) {
|
|
59
|
+
e.currentTarget.style.transform = 'translateY(0)';
|
|
60
|
+
e.currentTarget.style.boxShadow = isDark
|
|
61
|
+
? '0 2px 8px rgba(0,0,0,0.3)'
|
|
62
|
+
: '0 2px 8px rgba(0,0,0,0.1)';
|
|
63
|
+
}
|
|
64
|
+
}}
|
|
65
|
+
>
|
|
66
|
+
{/* Image */}
|
|
67
|
+
<div style={{ position: 'relative', height: '160px', overflow: 'hidden' }}>
|
|
68
|
+
<img
|
|
69
|
+
src={shop.image}
|
|
70
|
+
alt={shop.name}
|
|
71
|
+
style={{
|
|
72
|
+
width: '100%',
|
|
73
|
+
height: '100%',
|
|
74
|
+
objectFit: 'cover',
|
|
75
|
+
}}
|
|
76
|
+
/>
|
|
77
|
+
{shop.openNow && (
|
|
78
|
+
<div style={{
|
|
79
|
+
position: 'absolute',
|
|
80
|
+
top: '12px',
|
|
81
|
+
left: '12px',
|
|
82
|
+
background: '#10b981',
|
|
83
|
+
color: 'white',
|
|
84
|
+
padding: '4px 12px',
|
|
85
|
+
borderRadius: '12px',
|
|
86
|
+
fontSize: '12px',
|
|
87
|
+
fontWeight: '600',
|
|
88
|
+
}}>
|
|
89
|
+
Open Now
|
|
90
|
+
</div>
|
|
91
|
+
)}
|
|
92
|
+
{onToggleFavorite && (
|
|
93
|
+
<button
|
|
94
|
+
onClick={(e) => {
|
|
95
|
+
e.stopPropagation();
|
|
96
|
+
onToggleFavorite(shop.id);
|
|
97
|
+
}}
|
|
98
|
+
style={{
|
|
99
|
+
position: 'absolute',
|
|
100
|
+
top: '12px',
|
|
101
|
+
right: '12px',
|
|
102
|
+
background: 'rgba(255,255,255,0.9)',
|
|
103
|
+
border: 'none',
|
|
104
|
+
borderRadius: '50%',
|
|
105
|
+
width: '32px',
|
|
106
|
+
height: '32px',
|
|
107
|
+
display: 'flex',
|
|
108
|
+
alignItems: 'center',
|
|
109
|
+
justifyContent: 'center',
|
|
110
|
+
cursor: 'pointer',
|
|
111
|
+
}}
|
|
112
|
+
>
|
|
113
|
+
<span style={{ fontSize: '18px' }}>{isFavorite ? '❤️' : '🤍'}</span>
|
|
114
|
+
</button>
|
|
115
|
+
)}
|
|
116
|
+
</div>
|
|
117
|
+
|
|
118
|
+
{/* Content */}
|
|
119
|
+
<div style={{ padding: '16px' }}>
|
|
120
|
+
<h3 style={{
|
|
121
|
+
margin: '0 0 8px 0',
|
|
122
|
+
fontSize: '18px',
|
|
123
|
+
fontWeight: '600',
|
|
124
|
+
color: isDark ? '#fff' : '#111',
|
|
125
|
+
}}>
|
|
126
|
+
{shop.name}
|
|
127
|
+
</h3>
|
|
128
|
+
|
|
129
|
+
{/* Rating & Price */}
|
|
130
|
+
<div style={{ display: 'flex', alignItems: 'center', gap: '12px', marginBottom: '8px' }}>
|
|
131
|
+
<div style={{ display: 'flex', alignItems: 'center', gap: '4px' }}>
|
|
132
|
+
<Star size={16} fill="#fbbf24" stroke="#fbbf24" />
|
|
133
|
+
<span style={{ fontSize: '14px', fontWeight: '600', color: isDark ? '#fff' : '#111' }}>
|
|
134
|
+
{shop.rating}
|
|
135
|
+
</span>
|
|
136
|
+
<span style={{ fontSize: '14px', color: isDark ? '#999' : '#666' }}>
|
|
137
|
+
({shop.reviews})
|
|
138
|
+
</span>
|
|
139
|
+
</div>
|
|
140
|
+
<span style={{ fontSize: '14px', color: isDark ? '#999' : '#666' }}>
|
|
141
|
+
{priceSymbol}
|
|
142
|
+
</span>
|
|
143
|
+
</div>
|
|
144
|
+
|
|
145
|
+
{/* Description */}
|
|
146
|
+
<p style={{
|
|
147
|
+
margin: '0 0 12px 0',
|
|
148
|
+
fontSize: '14px',
|
|
149
|
+
color: isDark ? '#ccc' : '#666',
|
|
150
|
+
lineHeight: '1.4',
|
|
151
|
+
}}>
|
|
152
|
+
{shop.description}
|
|
153
|
+
</p>
|
|
154
|
+
|
|
155
|
+
{/* Cuisine Tags */}
|
|
156
|
+
<div style={{ display: 'flex', flexWrap: 'wrap', gap: '6px', marginBottom: '12px' }}>
|
|
157
|
+
{shop.cuisine.slice(0, 3).map(c => (
|
|
158
|
+
<span
|
|
159
|
+
key={c}
|
|
160
|
+
style={{
|
|
161
|
+
background: isDark ? '#333' : '#f3f4f6',
|
|
162
|
+
color: isDark ? '#ccc' : '#666',
|
|
163
|
+
padding: '4px 8px',
|
|
164
|
+
borderRadius: '6px',
|
|
165
|
+
fontSize: '12px',
|
|
166
|
+
}}
|
|
167
|
+
>
|
|
168
|
+
{c}
|
|
169
|
+
</span>
|
|
170
|
+
))}
|
|
171
|
+
</div>
|
|
172
|
+
|
|
173
|
+
{/* Address */}
|
|
174
|
+
<div style={{ display: 'flex', alignItems: 'start', gap: '8px', marginBottom: '8px' }}>
|
|
175
|
+
<MapPin size={16} style={{ color: isDark ? '#999' : '#666', marginTop: '2px', flexShrink: 0 }} />
|
|
176
|
+
<span style={{ fontSize: '13px', color: isDark ? '#ccc' : '#666' }}>
|
|
177
|
+
{shop.address}
|
|
178
|
+
</span>
|
|
179
|
+
</div>
|
|
180
|
+
|
|
181
|
+
{/* Hours */}
|
|
182
|
+
<div style={{ display: 'flex', alignItems: 'center', gap: '8px' }}>
|
|
183
|
+
<Clock size={16} style={{ color: isDark ? '#999' : '#666' }} />
|
|
184
|
+
<span style={{ fontSize: '13px', color: isDark ? '#ccc' : '#666' }}>
|
|
185
|
+
{shop.hours.open} - {shop.hours.close}
|
|
186
|
+
</span>
|
|
187
|
+
</div>
|
|
188
|
+
</div>
|
|
189
|
+
</div>
|
|
190
|
+
);
|
|
191
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/** @type {import('next').NextConfig} */
|
|
2
|
+
const nextConfig = {
|
|
3
|
+
reactStrictMode: true,
|
|
4
|
+
transpilePackages: ['nitrostack'],
|
|
5
|
+
|
|
6
|
+
// Static export for production builds
|
|
7
|
+
...(process.env.NODE_ENV === 'production' && {
|
|
8
|
+
output: 'export',
|
|
9
|
+
distDir: 'out',
|
|
10
|
+
images: {
|
|
11
|
+
unoptimized: true,
|
|
12
|
+
},
|
|
13
|
+
}),
|
|
14
|
+
|
|
15
|
+
// Development optimizations to prevent cache corruption
|
|
16
|
+
...(process.env.NODE_ENV === 'development' && {
|
|
17
|
+
// Use memory cache instead of filesystem cache in dev to avoid stale chunks
|
|
18
|
+
webpack: (config, { isServer }) => {
|
|
19
|
+
// Disable persistent caching in development to prevent chunk reference errors
|
|
20
|
+
if (config.cache && config.cache.type === 'filesystem') {
|
|
21
|
+
config.cache = {
|
|
22
|
+
type: 'memory',
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
// Improve cache busting for new files
|
|
27
|
+
if (!isServer) {
|
|
28
|
+
config.cache = false; // Disable cache completely on client in dev
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
return config;
|
|
32
|
+
},
|
|
33
|
+
|
|
34
|
+
// Disable build activity indicator which can cause issues
|
|
35
|
+
devIndicators: {
|
|
36
|
+
buildActivity: false,
|
|
37
|
+
buildActivityPosition: 'bottom-right',
|
|
38
|
+
},
|
|
39
|
+
|
|
40
|
+
// Faster dev server
|
|
41
|
+
compress: false,
|
|
42
|
+
}),
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
export default nextConfig;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "pizzaz-widgets",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"private": true,
|
|
6
|
+
"scripts": {
|
|
7
|
+
"dev": "next dev -p 3001 --port 3001",
|
|
8
|
+
"build": "next build",
|
|
9
|
+
"start": "next start -p 3001"
|
|
10
|
+
},
|
|
11
|
+
"dependencies": {
|
|
12
|
+
"next": "^14.2.5",
|
|
13
|
+
"react": "^18.3.1",
|
|
14
|
+
"react-dom": "^18.3.1",
|
|
15
|
+
"@nitrostack/widgets": "^1",
|
|
16
|
+
"mapbox-gl": "^3.0.1",
|
|
17
|
+
"framer-motion": "^10.16.16",
|
|
18
|
+
"lucide-react": "^0.294.0"
|
|
19
|
+
},
|
|
20
|
+
"devDependencies": {
|
|
21
|
+
"@types/node": "^20",
|
|
22
|
+
"@types/react": "^18",
|
|
23
|
+
"@types/react-dom": "^18",
|
|
24
|
+
"@types/mapbox-gl": "^3.0.0",
|
|
25
|
+
"typescript": "^5",
|
|
26
|
+
"tailwindcss": "^3.4.0",
|
|
27
|
+
"postcss": "^8.4.32",
|
|
28
|
+
"autoprefixer": "^10.4.16"
|
|
29
|
+
}
|
|
30
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ES2022",
|
|
4
|
+
"lib": ["dom", "dom.iterable", "esnext"],
|
|
5
|
+
"allowJs": true,
|
|
6
|
+
"skipLibCheck": true,
|
|
7
|
+
"strict": true,
|
|
8
|
+
"noEmit": true,
|
|
9
|
+
"esModuleInterop": true,
|
|
10
|
+
"module": "esnext",
|
|
11
|
+
"moduleResolution": "bundler",
|
|
12
|
+
"resolveJsonModule": true,
|
|
13
|
+
"isolatedModules": true,
|
|
14
|
+
"jsx": "preserve",
|
|
15
|
+
"incremental": true,
|
|
16
|
+
"plugins": [
|
|
17
|
+
{
|
|
18
|
+
"name": "next"
|
|
19
|
+
}
|
|
20
|
+
],
|
|
21
|
+
"paths": {
|
|
22
|
+
"@/*": ["./*"]
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
|
|
26
|
+
"exclude": ["node_modules"]
|
|
27
|
+
}
|
|
28
|
+
|