@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.
Files changed (100) hide show
  1. package/README.md +131 -0
  2. package/dist/commands/build.d.ts +6 -0
  3. package/dist/commands/build.d.ts.map +1 -0
  4. package/dist/commands/build.js +185 -0
  5. package/dist/commands/dev.d.ts +7 -0
  6. package/dist/commands/dev.d.ts.map +1 -0
  7. package/dist/commands/dev.js +365 -0
  8. package/dist/commands/generate-types.d.ts +8 -0
  9. package/dist/commands/generate-types.d.ts.map +1 -0
  10. package/dist/commands/generate-types.js +219 -0
  11. package/dist/commands/generate.d.ts +12 -0
  12. package/dist/commands/generate.d.ts.map +1 -0
  13. package/dist/commands/generate.js +375 -0
  14. package/dist/commands/init.d.ts +7 -0
  15. package/dist/commands/init.d.ts.map +1 -0
  16. package/dist/commands/init.js +324 -0
  17. package/dist/commands/install.d.ts +10 -0
  18. package/dist/commands/install.d.ts.map +1 -0
  19. package/dist/commands/install.js +80 -0
  20. package/dist/commands/start.d.ts +6 -0
  21. package/dist/commands/start.d.ts.map +1 -0
  22. package/dist/commands/start.js +70 -0
  23. package/dist/commands/upgrade.d.ts +10 -0
  24. package/dist/commands/upgrade.d.ts.map +1 -0
  25. package/dist/commands/upgrade.js +214 -0
  26. package/dist/index.d.ts +11 -0
  27. package/dist/index.d.ts.map +1 -0
  28. package/dist/index.js +94 -0
  29. package/dist/mcp-dev-wrapper.d.ts +15 -0
  30. package/dist/mcp-dev-wrapper.d.ts.map +1 -0
  31. package/dist/mcp-dev-wrapper.js +187 -0
  32. package/dist/ui/branding.d.ts +31 -0
  33. package/dist/ui/branding.d.ts.map +1 -0
  34. package/dist/ui/branding.js +136 -0
  35. package/package.json +69 -0
  36. package/templates/typescript-oauth/.env.example +27 -0
  37. package/templates/typescript-oauth/OAUTH_SETUP.md +592 -0
  38. package/templates/typescript-oauth/README.md +263 -0
  39. package/templates/typescript-oauth/package.json +29 -0
  40. package/templates/typescript-oauth/src/app.module.ts +92 -0
  41. package/templates/typescript-oauth/src/guards/oauth.guard.ts +126 -0
  42. package/templates/typescript-oauth/src/health/system.health.ts +55 -0
  43. package/templates/typescript-oauth/src/index.ts +63 -0
  44. package/templates/typescript-oauth/src/modules/flights/booking.tools.ts +323 -0
  45. package/templates/typescript-oauth/src/modules/flights/flights.module.ts +14 -0
  46. package/templates/typescript-oauth/src/modules/flights/flights.prompts.ts +228 -0
  47. package/templates/typescript-oauth/src/modules/flights/flights.resources.ts +215 -0
  48. package/templates/typescript-oauth/src/modules/flights/flights.tools.ts +457 -0
  49. package/templates/typescript-oauth/src/services/duffel.service.ts +285 -0
  50. package/templates/typescript-oauth/src/widgets/app/airport-search/page.tsx +270 -0
  51. package/templates/typescript-oauth/src/widgets/app/flight-details/page.tsx +261 -0
  52. package/templates/typescript-oauth/src/widgets/app/flight-search-results/page.tsx +378 -0
  53. package/templates/typescript-oauth/src/widgets/app/globals.css +167 -0
  54. package/templates/typescript-oauth/src/widgets/app/layout.tsx +18 -0
  55. package/templates/typescript-oauth/src/widgets/app/order-cancellation/page.tsx +207 -0
  56. package/templates/typescript-oauth/src/widgets/app/order-summary/page.tsx +245 -0
  57. package/templates/typescript-oauth/src/widgets/app/payment-confirmation/page.tsx +152 -0
  58. package/templates/typescript-oauth/src/widgets/app/seat-selection/page.tsx +486 -0
  59. package/templates/typescript-oauth/src/widgets/next-env.d.ts +5 -0
  60. package/templates/typescript-oauth/src/widgets/next.config.js +45 -0
  61. package/templates/typescript-oauth/src/widgets/package-lock.json +4493 -0
  62. package/templates/typescript-oauth/src/widgets/package.json +24 -0
  63. package/templates/typescript-oauth/src/widgets/tsconfig.json +28 -0
  64. package/templates/typescript-oauth/src/widgets/widget-manifest.json +395 -0
  65. package/templates/typescript-oauth/tsconfig.json +23 -0
  66. package/templates/typescript-pizzaz/README.md +252 -0
  67. package/templates/typescript-pizzaz/package.json +34 -0
  68. package/templates/typescript-pizzaz/src/app.module.ts +28 -0
  69. package/templates/typescript-pizzaz/src/index.ts +30 -0
  70. package/templates/typescript-pizzaz/src/modules/pizzaz/pizzaz.data.ts +106 -0
  71. package/templates/typescript-pizzaz/src/modules/pizzaz/pizzaz.module.ts +11 -0
  72. package/templates/typescript-pizzaz/src/modules/pizzaz/pizzaz.service.ts +60 -0
  73. package/templates/typescript-pizzaz/src/modules/pizzaz/pizzaz.tools.ts +197 -0
  74. package/templates/typescript-pizzaz/src/widgets/app/layout.tsx +18 -0
  75. package/templates/typescript-pizzaz/src/widgets/app/pizza-list/page.tsx +272 -0
  76. package/templates/typescript-pizzaz/src/widgets/app/pizza-map/page.tsx +216 -0
  77. package/templates/typescript-pizzaz/src/widgets/app/pizza-shop/page.tsx +374 -0
  78. package/templates/typescript-pizzaz/src/widgets/components/CompactShopCard.tsx +144 -0
  79. package/templates/typescript-pizzaz/src/widgets/components/PizzaCard.tsx +191 -0
  80. package/templates/typescript-pizzaz/src/widgets/next.config.js +45 -0
  81. package/templates/typescript-pizzaz/src/widgets/package.json +30 -0
  82. package/templates/typescript-pizzaz/src/widgets/tsconfig.json +28 -0
  83. package/templates/typescript-pizzaz/src/widgets/widget-manifest.json +253 -0
  84. package/templates/typescript-pizzaz/tsconfig.json +30 -0
  85. package/templates/typescript-starter/README.md +320 -0
  86. package/templates/typescript-starter/package.json +25 -0
  87. package/templates/typescript-starter/src/app.module.ts +34 -0
  88. package/templates/typescript-starter/src/health/system.health.ts +55 -0
  89. package/templates/typescript-starter/src/index.ts +29 -0
  90. package/templates/typescript-starter/src/modules/calculator/calculator.module.ts +12 -0
  91. package/templates/typescript-starter/src/modules/calculator/calculator.prompts.ts +73 -0
  92. package/templates/typescript-starter/src/modules/calculator/calculator.resources.ts +59 -0
  93. package/templates/typescript-starter/src/modules/calculator/calculator.tools.ts +166 -0
  94. package/templates/typescript-starter/src/widgets/app/calculator-result/page.tsx +180 -0
  95. package/templates/typescript-starter/src/widgets/app/layout.tsx +18 -0
  96. package/templates/typescript-starter/src/widgets/next.config.js +45 -0
  97. package/templates/typescript-starter/src/widgets/package.json +24 -0
  98. package/templates/typescript-starter/src/widgets/tsconfig.json +28 -0
  99. package/templates/typescript-starter/src/widgets/widget-manifest.json +48 -0
  100. package/templates/typescript-starter/tsconfig.json +23 -0
@@ -0,0 +1,24 @@
1
+ {
2
+ "name": "flight-booking-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
+ },
17
+ "devDependencies": {
18
+ "@types/node": "^20",
19
+ "@types/react": "^18",
20
+ "@types/react-dom": "^18",
21
+ "typescript": "^5"
22
+ }
23
+ }
24
+
@@ -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
+
@@ -0,0 +1,395 @@
1
+ {
2
+ "version": "1.0.0",
3
+ "widgets": [
4
+ {
5
+ "uri": "/flight-search-results",
6
+ "name": "Flight Search Results",
7
+ "description": "Displays flight search results with pricing, airlines, and flight details",
8
+ "examples": [
9
+ {
10
+ "name": "Round Trip Search",
11
+ "description": "Shows results for a round trip flight search",
12
+ "data": {
13
+ "requestId": "orq_example123",
14
+ "searchParams": {
15
+ "origin": "JFK",
16
+ "destination": "LAX",
17
+ "departureDate": "2024-03-15",
18
+ "returnDate": "2024-03-22",
19
+ "passengers": {
20
+ "adults": 2,
21
+ "children": 0,
22
+ "infants": 0
23
+ },
24
+ "cabinClass": "economy"
25
+ },
26
+ "totalOffers": 15,
27
+ "offers": [
28
+ {
29
+ "id": "off_example123",
30
+ "totalAmount": "450.00",
31
+ "totalCurrency": "USD",
32
+ "expiresAt": "2024-03-01T12:00:00Z",
33
+ "outbound": {
34
+ "origin": "JFK",
35
+ "destination": "LAX",
36
+ "departureTime": "2024-03-15T08:00:00Z",
37
+ "arrivalTime": "2024-03-15T14:30:00Z",
38
+ "duration": "PT6H30M",
39
+ "stops": 0,
40
+ "airline": "American Airlines",
41
+ "flightNumber": "AA123",
42
+ "segments": []
43
+ },
44
+ "return": {
45
+ "origin": "LAX",
46
+ "destination": "JFK",
47
+ "departureTime": "2024-03-22T16:00:00Z",
48
+ "arrivalTime": "2024-03-23T00:30:00Z",
49
+ "duration": "PT5H30M",
50
+ "stops": 0,
51
+ "airline": "American Airlines",
52
+ "flightNumber": "AA456",
53
+ "segments": []
54
+ },
55
+ "fareType": "Domestic",
56
+ "refundable": false,
57
+ "changeable": true
58
+ }
59
+ ],
60
+ "message": "Found 15 flight options"
61
+ }
62
+ }
63
+ ],
64
+ "tags": [
65
+ "flights",
66
+ "search",
67
+ "travel",
68
+ "booking"
69
+ ]
70
+ },
71
+ {
72
+ "uri": "/flight-details",
73
+ "name": "Flight Details",
74
+ "description": "Displays comprehensive flight details including segments, baggage, and fare conditions",
75
+ "examples": [
76
+ {
77
+ "name": "Flight Details Example",
78
+ "description": "Shows detailed information for a specific flight offer",
79
+ "data": {
80
+ "id": "off_example123",
81
+ "totalAmount": "450.00",
82
+ "totalCurrency": "USD",
83
+ "expiresAt": "2024-03-01T12:00:00Z",
84
+ "slices": [
85
+ {
86
+ "origin": {
87
+ "code": "JFK",
88
+ "name": "John F. Kennedy International Airport",
89
+ "city": "New York"
90
+ },
91
+ "destination": {
92
+ "code": "LAX",
93
+ "name": "Los Angeles International Airport",
94
+ "city": "Los Angeles"
95
+ },
96
+ "duration": "PT6H30M",
97
+ "segments": [
98
+ {
99
+ "id": "seg_123",
100
+ "origin": "JFK",
101
+ "destination": "LAX",
102
+ "departingAt": "2024-03-15T08:00:00Z",
103
+ "arrivingAt": "2024-03-15T14:30:00Z",
104
+ "duration": "PT6H30M",
105
+ "airline": {
106
+ "name": "American Airlines",
107
+ "code": "AA",
108
+ "flightNumber": "123"
109
+ },
110
+ "aircraft": "Boeing 777-300ER"
111
+ }
112
+ ]
113
+ }
114
+ ],
115
+ "passengers": [
116
+ {
117
+ "id": "pas_123",
118
+ "type": "adult",
119
+ "fareType": "economy",
120
+ "baggageAllowance": [
121
+ {
122
+ "type": "checked",
123
+ "quantity": 1
124
+ },
125
+ {
126
+ "type": "carry_on",
127
+ "quantity": 1
128
+ }
129
+ ]
130
+ }
131
+ ],
132
+ "conditions": {
133
+ "refundBeforeDeparture": {
134
+ "allowed": false
135
+ },
136
+ "changeBeforeDeparture": {
137
+ "allowed": true,
138
+ "penaltyAmount": "75.00",
139
+ "penaltyCurrency": "USD"
140
+ }
141
+ },
142
+ "paymentRequirements": {
143
+ "requiresInstantPayment": true,
144
+ "priceGuaranteeExpiresAt": "2024-03-01T12:00:00Z"
145
+ }
146
+ }
147
+ }
148
+ ],
149
+ "tags": [
150
+ "flights",
151
+ "details",
152
+ "travel",
153
+ "booking"
154
+ ]
155
+ },
156
+ {
157
+ "uri": "/airport-search",
158
+ "name": "Airport Search",
159
+ "description": "Displays airport search results with IATA codes and location details",
160
+ "examples": [
161
+ {
162
+ "name": "London Airports",
163
+ "description": "Shows search results for London airports",
164
+ "data": {
165
+ "query": "London",
166
+ "results": [
167
+ {
168
+ "id": "arp_lhr_gb",
169
+ "name": "Heathrow Airport",
170
+ "iataCode": "LHR",
171
+ "icaoCode": "EGLL",
172
+ "cityName": "London",
173
+ "type": "airport",
174
+ "latitude": 51.4700,
175
+ "longitude": -0.4543,
176
+ "timeZone": "Europe/London"
177
+ },
178
+ {
179
+ "id": "arp_lgw_gb",
180
+ "name": "Gatwick Airport",
181
+ "iataCode": "LGW",
182
+ "icaoCode": "EGKK",
183
+ "cityName": "London",
184
+ "type": "airport",
185
+ "latitude": 51.1537,
186
+ "longitude": -0.1821,
187
+ "timeZone": "Europe/London"
188
+ },
189
+ {
190
+ "id": "arp_stn_gb",
191
+ "name": "Stansted Airport",
192
+ "iataCode": "STN",
193
+ "icaoCode": "EGSS",
194
+ "cityName": "London",
195
+ "type": "airport",
196
+ "latitude": 51.8860,
197
+ "longitude": 0.2389,
198
+ "timeZone": "Europe/London"
199
+ }
200
+ ]
201
+ }
202
+ }
203
+ ],
204
+ "tags": [
205
+ "airports",
206
+ "search",
207
+ "travel",
208
+ "iata"
209
+ ]
210
+ },
211
+ {
212
+ "uri": "/order-summary",
213
+ "name": "Order Summary",
214
+ "description": "Displays booking confirmation with order details, passenger information, and flight itinerary",
215
+ "examples": [
216
+ {
217
+ "name": "Confirmed Booking",
218
+ "description": "Shows a confirmed flight booking with all details",
219
+ "data": {
220
+ "orderId": "ord_example123",
221
+ "status": "confirmed",
222
+ "bookingReference": "ABC123",
223
+ "totalAmount": "450.00",
224
+ "totalCurrency": "USD",
225
+ "createdAt": "2024-03-01T10:00:00Z",
226
+ "passengers": [
227
+ {
228
+ "id": "pax_1",
229
+ "name": "John Doe",
230
+ "type": "adult",
231
+ "email": "john@example.com"
232
+ }
233
+ ],
234
+ "slices": [
235
+ {
236
+ "origin": {
237
+ "code": "JFK",
238
+ "name": "John F. Kennedy International",
239
+ "city": "New York"
240
+ },
241
+ "destination": {
242
+ "code": "LAX",
243
+ "name": "Los Angeles International",
244
+ "city": "Los Angeles"
245
+ },
246
+ "departureTime": "2024-03-15T08:00:00Z",
247
+ "arrivalTime": "2024-03-15T14:30:00Z",
248
+ "segments": []
249
+ }
250
+ ],
251
+ "message": "Your booking has been confirmed!"
252
+ }
253
+ }
254
+ ],
255
+ "tags": [
256
+ "booking",
257
+ "order",
258
+ "confirmation",
259
+ "travel"
260
+ ]
261
+ },
262
+ {
263
+ "uri": "/seat-selection",
264
+ "name": "Seat Selection",
265
+ "description": "Interactive seat map for selecting seats with real-time pricing and availability",
266
+ "examples": [
267
+ {
268
+ "name": "Economy Cabin Seats",
269
+ "description": "Shows available seats in economy cabin",
270
+ "data": {
271
+ "offerId": "off_example123",
272
+ "cabins": [
273
+ {
274
+ "cabinClass": "economy",
275
+ "rows": [
276
+ {
277
+ "rowNumber": 10,
278
+ "seats": [
279
+ {
280
+ "id": "seat_10a",
281
+ "column": "A",
282
+ "available": true,
283
+ "price": "0",
284
+ "currency": "USD",
285
+ "type": "window"
286
+ },
287
+ {
288
+ "id": "seat_10b",
289
+ "column": "B",
290
+ "available": true,
291
+ "price": "0",
292
+ "currency": "USD",
293
+ "type": "middle"
294
+ },
295
+ {
296
+ "id": "seat_10c",
297
+ "column": "C",
298
+ "available": true,
299
+ "price": "0",
300
+ "currency": "USD",
301
+ "type": "aisle"
302
+ }
303
+ ]
304
+ }
305
+ ]
306
+ }
307
+ ],
308
+ "message": "Select your preferred seats"
309
+ }
310
+ }
311
+ ],
312
+ "tags": [
313
+ "seats",
314
+ "selection",
315
+ "booking",
316
+ "travel"
317
+ ]
318
+ },
319
+ {
320
+ "uri": "/payment-confirmation",
321
+ "name": "Payment Confirmation",
322
+ "description": "Payment processing and confirmation interface with order summary",
323
+ "examples": [
324
+ {
325
+ "name": "Payment Success",
326
+ "description": "Shows successful payment confirmation",
327
+ "data": {
328
+ "orderId": "ord_example123",
329
+ "status": "confirmed",
330
+ "totalAmount": "450.00",
331
+ "totalCurrency": "USD",
332
+ "bookingReference": "ABC123",
333
+ "message": "Payment confirmed successfully!"
334
+ }
335
+ },
336
+ {
337
+ "name": "Payment Pending",
338
+ "description": "Shows payment pending state",
339
+ "data": {
340
+ "orderId": "ord_example456",
341
+ "status": "pending",
342
+ "totalAmount": "650.00",
343
+ "totalCurrency": "USD"
344
+ }
345
+ }
346
+ ],
347
+ "tags": [
348
+ "payment",
349
+ "confirmation",
350
+ "booking",
351
+ "checkout"
352
+ ]
353
+ },
354
+ {
355
+ "uri": "/order-cancellation",
356
+ "name": "Order Cancellation",
357
+ "description": "Order cancellation confirmation with refund information and status",
358
+ "examples": [
359
+ {
360
+ "name": "Cancellation with Refund",
361
+ "description": "Shows successful cancellation with refund",
362
+ "data": {
363
+ "orderId": "ord_example123",
364
+ "cancellationId": "ocr_example123",
365
+ "status": "cancelled",
366
+ "refundAmount": "450.00",
367
+ "refundCurrency": "USD",
368
+ "confirmedAt": "2024-03-01T12:00:00Z",
369
+ "message": "Order cancelled. Refund of USD 450.00 will be processed."
370
+ }
371
+ },
372
+ {
373
+ "name": "Cancellation without Refund",
374
+ "description": "Shows cancellation with no refund",
375
+ "data": {
376
+ "orderId": "ord_example456",
377
+ "cancellationId": "ocr_example456",
378
+ "status": "cancelled",
379
+ "refundAmount": "0",
380
+ "refundCurrency": "USD",
381
+ "confirmedAt": "2024-03-01T12:00:00Z",
382
+ "message": "Order cancelled. No refund available for this booking."
383
+ }
384
+ }
385
+ ],
386
+ "tags": [
387
+ "cancellation",
388
+ "refund",
389
+ "booking",
390
+ "order"
391
+ ]
392
+ }
393
+ ],
394
+ "generatedAt": "2025-01-01T00:00:00.000Z"
395
+ }
@@ -0,0 +1,23 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "ES2022",
4
+ "module": "ES2022",
5
+ "lib": ["ES2022"],
6
+ "moduleResolution": "node",
7
+ "rootDir": "./src",
8
+ "outDir": "./dist",
9
+ "esModuleInterop": true,
10
+ "forceConsistentCasingInFileNames": true,
11
+ "strict": true,
12
+ "skipLibCheck": true,
13
+ "resolveJsonModule": true,
14
+ "declaration": true,
15
+ "declarationMap": true,
16
+ "sourceMap": true,
17
+ "experimentalDecorators": true,
18
+ "emitDecoratorMetadata": true
19
+ },
20
+ "include": ["src/**/*"],
21
+ "exclude": ["node_modules", "dist", "src/widgets"]
22
+ }
23
+