@rip-lang/server 0.5.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/dashboard.html ADDED
@@ -0,0 +1,410 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>Rip Server</title>
7
+ <script src="https://cdn.tailwindcss.com"></script>
8
+ <script defer src="https://cdn.jsdelivr.net/npm/alpinejs@3.x.x/dist/cdn.min.js"></script>
9
+ <script>
10
+ tailwind.config = {
11
+ theme: {
12
+ extend: {
13
+ animation: {
14
+ 'pulse-slow': 'pulse 3s cubic-bezier(0.4, 0, 0.6, 1) infinite',
15
+ }
16
+ }
17
+ }
18
+ }
19
+ </script>
20
+ </head>
21
+ <body class="min-h-screen bg-gradient-to-br from-blue-50 via-indigo-50 to-purple-50" x-data="dashboard()">
22
+ <!-- Header -->
23
+ <div class="border-b border-white/20 bg-white/30 backdrop-blur-sm">
24
+ <div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-4">
25
+ <div class="flex items-center justify-between">
26
+ <div class="flex items-center space-x-4">
27
+ <div class="w-12 h-12 bg-white rounded-full flex items-center justify-center shadow-[0_15px_30px_-8px_rgba(0,0,0,0.2)] border border-gray-100 transition-all duration-300 ease-in-out hover:scale-110 hover:shadow-[0_25px_50px_-12px_rgba(0,0,0,0.45)] cursor-pointer">
28
+ <svg width="220" height="220" viewBox="0 0 220 220" fill="none" xmlns="http://www.w3.org/2000/svg" class="w-9 h-9">
29
+ <path d="M55.6822 169.86L41.8222 175.88L1.64219 109.8L41.8222 43.72L55.6822 49.74L19.1422 109.8L55.6822 169.86ZM164.318 169.86L200.858 109.8L164.318 49.74L178.178 43.72L218.358 109.8L178.178 175.88L164.318 169.86Z" fill="black"/>
30
+ <path d="M69.8047 163V61.1818H113.754C121.31 61.1818 127.923 62.5573 133.59 65.3082C139.258 68.0592 143.666 72.0199 146.815 77.1903C149.963 82.3608 151.538 88.5587 151.538 95.7841C151.538 103.076 149.914 109.224 146.665 114.229C143.451 119.233 138.926 123.012 133.093 125.564C127.293 128.116 120.515 129.392 112.759 129.392H86.5092V107.915H107.191C110.439 107.915 113.207 107.517 115.494 106.722C117.814 105.893 119.587 104.584 120.813 102.794C122.073 101.004 122.702 98.6676 122.702 95.7841C122.702 92.8674 122.073 90.4976 120.813 88.6747C119.587 86.8187 117.814 85.4598 115.494 84.598C113.207 83.7031 110.439 83.2557 107.191 83.2557H97.4467V163H69.8047ZM129.464 116.267L154.918 163H124.89L100.032 116.267H129.464Z" fill="#BB0000"/>
31
+ </svg>
32
+ </div>
33
+ <div>
34
+ <h1 class="text-2xl font-bold text-gray-900">Rip Server</h1>
35
+ <p class="text-sm text-gray-600">Multi-worker runtime</p>
36
+ </div>
37
+ </div>
38
+ <div class="flex items-center space-x-2">
39
+ <div class="flex items-center space-x-2">
40
+ <div class="w-2 h-2 bg-green-500 rounded-full animate-pulse-slow"></div>
41
+ <span class="text-sm font-medium text-gray-700" x-text="status.status || 'connecting...'">Loading...</span>
42
+ </div>
43
+ <button @click="refreshData()" class="p-2 text-gray-500 hover:text-gray-700 transition-colors">
44
+ <svg class="w-5 h-5" :class="{'animate-spin': loading}" fill="none" stroke="currentColor" viewBox="0 0 24 24">
45
+ <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"></path>
46
+ </svg>
47
+ </button>
48
+ </div>
49
+ </div>
50
+ </div>
51
+ </div>
52
+
53
+ <!-- Main Content -->
54
+ <div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-8">
55
+ <!-- Server Overview -->
56
+ <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6 mb-8">
57
+ <!-- Status Card -->
58
+ <div class="bg-white/70 backdrop-blur-sm rounded-xl shadow-lg p-6 border border-white/20">
59
+ <div class="flex items-center justify-between">
60
+ <div>
61
+ <p class="text-sm font-medium text-gray-600">Server Status</p>
62
+ <p class="text-2xl font-bold" x-text="!connected ? 'OFFLINE' : (status.status || 'loading...')"
63
+ :class="!connected ? 'text-red-600' : (status.status === 'healthy' ? 'text-green-600' : 'text-yellow-600')">-</p>
64
+ </div>
65
+ <div class="p-3 rounded-full" :class="!connected ? 'bg-red-100' : (status.status === 'healthy' ? 'bg-green-100' : 'bg-yellow-100')">
66
+ <svg class="w-6 h-6" :class="!connected ? 'text-red-600' : (status.status === 'healthy' ? 'text-green-600' : 'text-yellow-600')" fill="none" stroke="currentColor" viewBox="0 0 24 24">
67
+ <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
68
+ :d="!connected ? 'M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-2.5L13.732 4c-.77-.833-1.964-.833-2.732 0L4.732 15.5c-.77.833.192 2.5 1.732 2.5z' : 'M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z'"></path>
69
+ </svg>
70
+ </div>
71
+ </div>
72
+ </div>
73
+
74
+ <!-- Workers Card -->
75
+ <div class="bg-white/70 backdrop-blur-sm rounded-xl shadow-lg p-6 border border-white/20">
76
+ <div class="flex items-center justify-between">
77
+ <div>
78
+ <p class="text-sm font-medium text-gray-600">Active Workers</p>
79
+ <p class="text-2xl font-bold text-blue-600" x-text="status.workers || '0'">-</p>
80
+ </div>
81
+ <div class="p-3 bg-blue-100 rounded-full">
82
+ <svg class="w-6 h-6 text-blue-600" fill="none" stroke="currentColor" viewBox="0 0 24 24">
83
+ <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 11H5m14 0a2 2 0 012 2v6a2 2 0 01-2 2H5a2 2 0 01-2-2v-6a2 2 0 012-2m14 0V9a2 2 0 00-2-2M5 11V9a2 2 0 012-2m0 0V5a2 2 0 012-2h6a2 2 0 012 2v2M7 7h10"></path>
84
+ </svg>
85
+ </div>
86
+ </div>
87
+ </div>
88
+
89
+ <!-- Uptime Card with Countdown Arc -->
90
+ <div class="bg-white/70 backdrop-blur-sm rounded-xl shadow-lg p-6 border border-white/20">
91
+ <div class="flex items-center justify-between">
92
+ <div>
93
+ <p class="text-sm font-medium text-gray-600">Uptime</p>
94
+ <p class="text-2xl font-bold text-purple-600" x-text="formatUptime(serverUptime)">-</p>
95
+ </div>
96
+ <div class="p-3 bg-purple-100 rounded-full relative">
97
+ <svg class="w-6 h-6 text-purple-600" fill="none" stroke="currentColor" viewBox="0 0 24 24">
98
+ <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"></path>
99
+ </svg>
100
+ <!-- Pure CSS Animated Countdown Arc -->
101
+ <svg class="absolute inset-0 w-full h-full -rotate-90" viewBox="0 0 32 32">
102
+ <!-- Background circle (light) -->
103
+ <circle
104
+ cx="16" cy="16" r="14"
105
+ fill="none"
106
+ stroke="rgb(196 181 253)"
107
+ stroke-width="4"
108
+ opacity="0.3"
109
+ />
110
+ <!-- Animated growing arc -->
111
+ <circle
112
+ cx="16" cy="16" r="14"
113
+ fill="none"
114
+ stroke-width="4"
115
+ stroke-linecap="round"
116
+ stroke-dasharray="87.96"
117
+ stroke-dashoffset="87.96"
118
+ :class="connected ? 'countdown-arc' : 'countdown-arc countdown-arc-paused'"
119
+ />
120
+ </svg>
121
+ <style>
122
+ .countdown-arc {
123
+ animation: countdown-progress 10s linear infinite;
124
+ }
125
+ .countdown-arc-paused {
126
+ animation-play-state: paused;
127
+ opacity: 0.3;
128
+ }
129
+
130
+ @keyframes countdown-progress {
131
+ 0% {
132
+ stroke-dashoffset: 87.96;
133
+ stroke: rgb(139 92 246); /* Dark purple at start */
134
+ }
135
+ 50% {
136
+ stroke-dashoffset: 44;
137
+ stroke: rgb(167 139 250); /* Medium purple halfway */
138
+ }
139
+ 100% {
140
+ stroke-dashoffset: 0;
141
+ stroke: rgb(196 181 253); /* Same as face - invisible blend */
142
+ opacity: 0.3; /* Same opacity as background face */
143
+ }
144
+ }
145
+ </style>
146
+ </div>
147
+ </div>
148
+ </div>
149
+
150
+ <!-- App Card -->
151
+ <div class="bg-white/70 backdrop-blur-sm rounded-xl shadow-lg p-6 border border-white/20">
152
+ <div class="flex items-center justify-between">
153
+ <div>
154
+ <p class="text-sm font-medium text-gray-600">Current App</p>
155
+ <p class="text-2xl font-bold text-indigo-600" x-text="status.app || 'none'">-</p>
156
+ </div>
157
+ <div class="p-3 bg-indigo-100 rounded-full">
158
+ <svg class="w-6 h-6 text-indigo-600" fill="none" stroke="currentColor" viewBox="0 0 24 24">
159
+ <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 21V5a2 2 0 00-2-2H7a2 2 0 00-2 2v16m14 0h2m-2 0h-5m-9 0H3m2 0h5M9 7h1m-1 4h1m4-4h1m-1 4h1m-5 10v-5a1 1 0 011-1h2a1 1 0 011 1v5m-4 0h4"></path>
160
+ </svg>
161
+ </div>
162
+ </div>
163
+ </div>
164
+ </div>
165
+
166
+ <!-- Apps and Hosts Section -->
167
+ <div class="grid grid-cols-1 lg:grid-cols-2 gap-8 mb-8">
168
+ <!-- Active Hosts -->
169
+ <div class="bg-white/70 backdrop-blur-sm rounded-xl shadow-lg border border-white/20">
170
+ <div class="p-6 border-b border-gray-200/50">
171
+ <h2 class="text-lg font-semibold text-gray-900 flex items-center">
172
+ <svg class="w-5 h-5 mr-2 text-blue-600" fill="none" stroke="currentColor" viewBox="0 0 24 24">
173
+ <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M21 12a9 9 0 01-9 9m9-9a9 9 0 00-9-9m9 9H3m9 9v-9m0-9v9"></path>
174
+ </svg>
175
+ Active Hosts
176
+ </h2>
177
+ </div>
178
+ <div class="p-6">
179
+ <div class="space-y-3" x-show="status.hosts && status.hosts.length > 0">
180
+ <template x-for="host in status.hosts" :key="host">
181
+ <div class="flex items-center justify-between p-3 bg-gray-50/50 rounded-lg">
182
+ <div class="flex items-center space-x-3">
183
+ <div class="w-2 h-2 bg-green-500 rounded-full"></div>
184
+ <span class="font-medium text-gray-900" x-text="host"></span>
185
+ </div>
186
+ <div class="flex items-center space-x-2">
187
+ <template x-if="host.endsWith('.local')">
188
+ <span class="px-2 py-1 text-xs font-medium bg-blue-100 text-blue-800 rounded-full">mDNS</span>
189
+ </template>
190
+ <template x-if="host === 'localhost' || host === '127.0.0.1'">
191
+ <span class="px-2 py-1 text-xs font-medium bg-gray-100 text-gray-800 rounded-full">Local</span>
192
+ </template>
193
+ <a :href="getHostUrl(host)" target="_blank" class="p-1 text-blue-600 hover:text-blue-800 transition-colors">
194
+ <svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">
195
+ <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path>
196
+ </svg>
197
+ </a>
198
+ </div>
199
+ </div>
200
+ </template>
201
+ </div>
202
+ <div x-show="!status.hosts || status.hosts.length === 0" class="text-center py-8 text-gray-500">
203
+ <svg class="w-12 h-12 mx-auto mb-4 text-gray-300" fill="none" stroke="currentColor" viewBox="0 0 24 24">
204
+ <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M21 12a9 9 0 01-9 9m9-9a9 9 0 00-9-9m9 9H3m9 9v-9m0-9v9"></path>
205
+ </svg>
206
+ <p>No hosts registered</p>
207
+ </div>
208
+ </div>
209
+ </div>
210
+
211
+ <!-- Server Ports -->
212
+ <div class="bg-white/70 backdrop-blur-sm rounded-xl shadow-lg border border-white/20">
213
+ <div class="p-6 border-b border-gray-200/50">
214
+ <h2 class="text-lg font-semibold text-gray-900 flex items-center">
215
+ <svg class="w-5 h-5 mr-2 text-green-600" fill="none" stroke="currentColor" viewBox="0 0 24 24">
216
+ <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8.111 16.404a5.5 5.5 0 017.778 0M12 20h.01m-7.08-7.071c3.904-3.905 10.236-3.905 14.141 0M1.394 9.393c5.857-5.857 15.355-5.857 21.213 0"></path>
217
+ </svg>
218
+ Server Ports
219
+ </h2>
220
+ </div>
221
+ <div class="p-6">
222
+ <div class="space-y-4">
223
+ <template x-if="status.ports?.https">
224
+ <div class="flex items-center justify-between p-3 bg-green-50/50 rounded-lg">
225
+ <div class="flex items-center space-x-3">
226
+ <div class="w-8 h-8 bg-green-100 rounded-lg flex items-center justify-center">
227
+ <svg class="w-5 h-5 text-green-600" fill="none" stroke="currentColor" viewBox="0 0 24 24">
228
+ <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 00-8 0v4h8z"></path>
229
+ </svg>
230
+ </div>
231
+ <div>
232
+ <p class="font-medium text-gray-900">HTTPS</p>
233
+ <p class="text-sm text-gray-600" x-text="`Port ${status.ports.https}`">-</p>
234
+ </div>
235
+ </div>
236
+ <span class="px-2 py-1 text-xs font-medium bg-green-100 text-green-800 rounded-full">Secure</span>
237
+ </div>
238
+ </template>
239
+ <template x-if="status.ports?.http">
240
+ <div class="flex items-center justify-between p-3 bg-blue-50/50 rounded-lg">
241
+ <div class="flex items-center space-x-3">
242
+ <div class="w-8 h-8 bg-blue-100 rounded-lg flex items-center justify-center">
243
+ <svg class="w-5 h-5 text-blue-600" fill="none" stroke="currentColor" viewBox="0 0 24 24">
244
+ <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M21 12a9 9 0 01-9 9m9-9a9 9 0 00-9-9m9 9H3m9 9v-9m0-9v9"></path>
245
+ </svg>
246
+ </div>
247
+ <div>
248
+ <p class="font-medium text-gray-900">HTTP</p>
249
+ <p class="text-sm text-gray-600" x-text="`Port ${status.ports.http} (→ HTTPS)`">-</p>
250
+ </div>
251
+ </div>
252
+ <span class="px-2 py-1 text-xs font-medium bg-blue-100 text-blue-800 rounded-full">Redirect</span>
253
+ </div>
254
+ </template>
255
+ </div>
256
+ </div>
257
+ </div>
258
+ </div>
259
+
260
+ <!-- Quick Actions -->
261
+ <div class="bg-white/70 backdrop-blur-sm rounded-xl shadow-lg border border-white/20">
262
+ <div class="p-6 border-b border-gray-200/50">
263
+ <h2 class="text-lg font-semibold text-gray-900 flex items-center">
264
+ <svg class="w-5 h-5 mr-2 text-indigo-600" fill="none" stroke="currentColor" viewBox="0 0 24 24">
265
+ <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 10V3L4 14h7v7l9-11h-7z"></path>
266
+ </svg>
267
+ Quick Actions
268
+ </h2>
269
+ </div>
270
+ <div class="p-6">
271
+ <div class="grid grid-cols-1 md:grid-cols-3 gap-4">
272
+ <button @click="refreshData()" :disabled="loading" class="flex items-center justify-center px-4 py-3 bg-blue-600 text-white rounded-lg hover:bg-blue-700 disabled:opacity-50" style="transition: opacity 0.3s ease;">
273
+ <svg class="w-5 h-5 mr-2" :class="{'animate-spin': loading}" fill="none" stroke="currentColor" viewBox="0 0 24 24">
274
+ <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"></path>
275
+ </svg>
276
+ <span x-text="loading ? 'Refreshing...' : 'Refresh Data'"></span>
277
+ </button>
278
+ <a href="/server" target="_blank" class="flex items-center justify-center px-4 py-3 bg-green-600 text-white rounded-lg hover:bg-green-700 transition-colors">
279
+ <svg class="w-5 h-5 mr-2" fill="none" stroke="currentColor" viewBox="0 0 24 24">
280
+ <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"></path>
281
+ </svg>
282
+ Health Check
283
+ </a>
284
+ <a href="https://github.com/shreeve/rip-lang" target="_blank" class="flex items-center justify-center px-4 py-3 bg-gray-600 text-white rounded-lg hover:bg-gray-700 transition-colors">
285
+ <svg class="w-5 h-5 mr-2" fill="none" stroke="currentColor" viewBox="0 0 24 24">
286
+ <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path>
287
+ </svg>
288
+ Documentation
289
+ </a>
290
+ </div>
291
+ </div>
292
+ </div>
293
+ </div>
294
+
295
+ <!-- Footer -->
296
+ <div class="border-t border-white/20 bg-white/30 backdrop-blur-sm mt-12">
297
+ <div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-6">
298
+ <div class="flex items-center justify-between">
299
+ <div class="flex items-center space-x-4">
300
+ <p class="text-sm text-gray-600">
301
+ Built with ❤️ for the <strong>Rip</strong> community
302
+ </p>
303
+ </div>
304
+ <div class="flex items-center space-x-4">
305
+ <span class="text-xs text-gray-500" x-text="'Updated ' + lastUpdated.toLocaleTimeString()">-</span>
306
+ </div>
307
+ </div>
308
+ </div>
309
+ </div>
310
+
311
+ <script>
312
+ function dashboard() {
313
+ return {
314
+ status: {},
315
+ loading: false,
316
+ connected: true,
317
+ serverUptime: 0,
318
+ uptimeStartTime: Date.now(),
319
+ lastUpdated: new Date(),
320
+
321
+ async init() {
322
+ await this.refreshData()
323
+ // Auto-refresh every 10 seconds (silent - no loading indicator)
324
+ setInterval(() => this.silentRefresh(), 10000)
325
+ // Update uptime every second
326
+ setInterval(() => this.updateLiveUptime(), 1000)
327
+ },
328
+
329
+ // Manual refresh with loading indicator (for button clicks)
330
+ async refreshData() {
331
+ this.loading = true
332
+ try {
333
+ await this.fetchStatus()
334
+ } finally {
335
+ this.loading = false
336
+ }
337
+ },
338
+
339
+ // Silent background refresh (no loading indicator)
340
+ async silentRefresh() {
341
+ try {
342
+ await this.fetchStatus()
343
+ // this.connected is already set in fetchStatus() on success
344
+ } catch (error) {
345
+ // Mark as disconnected and update status
346
+ this.connected = false
347
+ this.status = {
348
+ status: 'offline',
349
+ app: this.status.app || 'unknown',
350
+ workers: 0,
351
+ uptime: 0,
352
+ hosts: this.status.hosts || []
353
+ }
354
+ console.debug('Background refresh failed:', error)
355
+ }
356
+ },
357
+
358
+ // Update live uptime counter
359
+ updateLiveUptime() {
360
+ // Only update uptime if connected
361
+ if (this.connected) {
362
+ const elapsedSeconds = Math.floor((Date.now() - this.uptimeStartTime) / 1000)
363
+ this.serverUptime = (this.status.uptime || 0) + elapsedSeconds
364
+ }
365
+ },
366
+
367
+ // Shared fetch logic
368
+ async fetchStatus() {
369
+ const response = await fetch('/status')
370
+ if (response.ok) {
371
+ this.status = await response.json()
372
+ this.connected = true
373
+ // Sync our local uptime tracking with server uptime
374
+ this.serverUptime = this.status.uptime || 0
375
+ this.uptimeStartTime = Date.now()
376
+ // Update timestamp when data is successfully refreshed
377
+ this.lastUpdated = new Date()
378
+ } else {
379
+ console.error('Failed to fetch status:', response.status)
380
+ throw new Error(`HTTP ${response.status}`)
381
+ }
382
+ },
383
+
384
+ formatUptime(seconds) {
385
+ if (!seconds) return '0s'
386
+ const hours = Math.floor(seconds / 3600)
387
+ const minutes = Math.floor((seconds % 3600) / 60)
388
+ const secs = seconds % 60
389
+
390
+ if (hours > 0) return `${hours}h ${minutes}m`
391
+ if (minutes > 0) return `${minutes}m ${secs}s`
392
+ return `${secs}s`
393
+ },
394
+
395
+ getHostUrl(host) {
396
+ // Determine protocol - prefer HTTPS if available
397
+ const protocol = this.status.ports?.https ? 'https' : 'http'
398
+ const port = this.status.ports?.https || this.status.ports?.http || 80
399
+
400
+ // For standard ports, don't show port number
401
+ if ((protocol === 'https' && port === 443) || (protocol === 'http' && port === 80)) {
402
+ return `${protocol}://${host}`
403
+ }
404
+ return `${protocol}://${host}:${port}`
405
+ }
406
+ }
407
+ }
408
+ </script>
409
+ </body>
410
+ </html>
package/docs/logo.png ADDED
Binary file
package/docs/logo.svg ADDED
@@ -0,0 +1,13 @@
1
+ <svg width="693" height="162" viewBox="0 0 693 162" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M640.523 109.375V33.0114H667.17V47.5284H667.966C669.358 42.1591 671.562 38.2315 674.578 35.7457C677.627 33.26 681.19 32.0171 685.267 32.0171C686.46 32.0171 687.637 32.1165 688.797 32.3154C689.99 32.4811 691.133 32.7297 692.227 33.0611V56.4773C690.868 56.0133 689.195 55.6653 687.206 55.4332C685.217 55.2012 683.51 55.0852 682.085 55.0852C679.401 55.0852 676.981 55.6984 674.827 56.9247C672.705 58.1179 671.032 59.8082 669.805 61.9957C668.579 64.1501 667.966 66.6856 667.966 69.6023V109.375H640.523Z" fill="#0088FF"/>
3
+ <path d="M591.938 110.767C583.784 110.767 576.758 109.209 570.858 106.094C564.992 102.945 560.468 98.4375 557.286 92.571C554.137 86.6714 552.563 79.6118 552.563 71.3921C552.563 63.5038 554.154 56.6099 557.336 50.7102C560.517 44.8106 565.008 40.2202 570.809 36.9389C576.609 33.6577 583.453 32.0171 591.341 32.0171C597.108 32.0171 602.328 32.9119 607.002 34.7017C611.675 36.4915 615.669 39.0933 618.983 42.5071C622.298 45.8878 624.85 49.9976 626.64 54.8367C628.429 59.6757 629.324 65.1279 629.324 71.1932V77.5568H561.114V62.4432H604.069C604.035 60.2557 603.472 58.3333 602.378 56.6761C601.318 54.9858 599.876 53.6766 598.053 52.7486C596.263 51.7874 594.225 51.3068 591.938 51.3068C589.717 51.3068 587.679 51.7874 585.823 52.7486C583.967 53.6766 582.475 54.9692 581.348 56.6264C580.255 58.2836 579.675 60.2225 579.608 62.4432V78.75C579.608 81.2027 580.122 83.3902 581.15 85.3125C582.177 87.2349 583.652 88.7429 585.574 89.8367C587.497 90.9304 589.817 91.4773 592.534 91.4773C594.424 91.4773 596.147 91.2121 597.705 90.6818C599.296 90.1515 600.655 89.3892 601.782 88.3949C602.909 87.3674 603.737 86.1411 604.267 84.7159H629.324C628.462 90.0189 626.424 94.626 623.209 98.5369C619.994 102.415 615.735 105.431 610.432 107.585C605.162 109.706 598.998 110.767 591.938 110.767Z" fill="#0088FF"/>
4
+ <path d="M549.866 33.0114L524.212 109.375H492.394L466.741 33.0114H495.576L507.906 83.5227H508.701L521.031 33.0114H549.866Z" fill="#0088FF"/>
5
+ <path d="M409.878 109.375V33.0114H436.526V47.5284H437.321C438.713 42.1591 440.917 38.2315 443.934 35.7457C446.983 33.26 450.546 32.0171 454.622 32.0171C455.816 32.0171 456.992 32.1165 458.152 32.3154C459.346 32.4811 460.489 32.7297 461.583 33.0611V56.4773C460.224 56.0133 458.55 55.6653 456.561 55.4332C454.573 55.2012 452.866 55.0852 451.441 55.0852C448.756 55.0852 446.337 55.6984 444.182 56.9247C442.061 58.1179 440.387 59.8082 439.161 61.9957C437.935 64.1501 437.321 66.6856 437.321 69.6023V109.375H409.878Z" fill="#0088FF"/>
6
+ <path d="M361.293 110.767C353.14 110.767 346.113 109.209 340.214 106.094C334.347 102.945 329.823 98.4375 326.641 92.571C323.493 86.6714 321.918 79.6118 321.918 71.3921C321.918 63.5038 323.509 56.6099 326.691 50.7102C329.873 44.8106 334.364 40.2202 340.164 36.9389C345.964 33.6577 352.808 32.0171 360.697 32.0171C366.464 32.0171 371.684 32.9119 376.357 34.7017C381.031 36.4915 385.024 39.0933 388.339 42.5071C391.653 45.8878 394.205 49.9976 395.995 54.8367C397.785 59.6757 398.68 65.1279 398.68 71.1932V77.5568H330.469V62.4432H373.424C373.391 60.2557 372.827 58.3333 371.734 56.6761C370.673 54.9858 369.231 53.6766 367.408 52.7486C365.619 51.7874 363.58 51.3068 361.293 51.3068C359.073 51.3068 357.034 51.7874 355.178 52.7486C353.322 53.6766 351.831 54.9692 350.704 56.6264C349.61 58.2836 349.03 60.2225 348.964 62.4432V78.75C348.964 81.2027 349.478 83.3902 350.505 85.3125C351.532 87.2349 353.007 88.7429 354.93 89.8367C356.852 90.9304 359.172 91.4773 361.89 91.4773C363.779 91.4773 365.503 91.2121 367.06 90.6818C368.651 90.1515 370.01 89.3892 371.137 88.3949C372.264 87.3674 373.093 86.1411 373.623 84.7159H398.68C397.818 90.0189 395.78 94.626 392.565 98.5369C389.35 102.415 385.091 105.431 379.788 107.585C374.518 109.706 368.353 110.767 361.293 110.767Z" fill="#0088FF"/>
7
+ <path d="M285.949 39.375C285.684 36.0606 284.441 33.4754 282.22 31.6193C280.033 29.7633 276.702 28.8352 272.227 28.8352C269.377 28.8352 267.04 29.1832 265.217 29.8793C263.428 30.5421 262.102 31.4536 261.24 32.6136C260.378 33.7737 259.931 35.0994 259.898 36.5909C259.831 37.8172 260.047 38.9276 260.544 39.9219C261.074 40.883 261.903 41.7614 263.03 42.5568C264.157 43.3191 265.599 44.0151 267.355 44.6449C269.112 45.2746 271.2 45.8381 273.619 46.3352L281.972 48.125C287.606 49.3182 292.429 50.8925 296.439 52.848C300.449 54.8035 303.731 57.107 306.283 59.7585C308.835 62.3769 310.707 65.3267 311.901 68.608C313.127 71.8892 313.757 75.4688 313.79 79.3466C313.757 86.0417 312.083 91.7093 308.768 96.3494C305.454 100.99 300.715 104.519 294.55 106.939C288.418 109.358 281.044 110.568 272.426 110.568C263.577 110.568 255.854 109.259 249.259 106.641C242.696 104.022 237.592 99.9953 233.946 94.5597C230.333 89.0909 228.51 82.0975 228.477 73.5795H254.727C254.893 76.6951 255.672 79.3134 257.064 81.4346C258.456 83.5559 260.411 85.1633 262.93 86.2571C265.483 87.3508 268.515 87.8977 272.028 87.8977C274.978 87.8977 277.447 87.5331 279.436 86.804C281.425 86.0748 282.933 85.0639 283.96 83.7713C284.988 82.4787 285.518 81.0038 285.551 79.3466C285.518 77.7888 285.004 76.4299 284.01 75.2699C283.049 74.0767 281.458 73.0161 279.237 72.0881C277.017 71.1269 274.017 70.232 270.239 69.4034L260.097 67.2159C251.081 65.2604 243.972 61.9957 238.768 57.4219C233.598 52.8149 231.029 46.5341 231.063 38.5795C231.029 32.1165 232.753 26.4654 236.233 21.6264C239.746 16.7543 244.602 12.9593 250.8 10.2415C257.031 7.52367 264.173 6.16476 272.227 6.16476C280.447 6.16476 287.556 7.54024 293.555 10.2912C299.554 13.0421 304.178 16.92 307.426 21.9247C310.707 26.8963 312.365 32.7131 312.398 39.375H285.949Z" fill="#0088FF"/>
8
+ <path d="M140.339 138.011V33.0114H167.583V46.3352H168.18C169.174 43.75 170.633 41.3802 172.555 39.2259C174.477 37.0384 176.864 35.2983 179.714 34.0057C182.564 32.6799 185.879 32.0171 189.657 32.0171C194.695 32.0171 199.484 33.3594 204.025 36.044C208.599 38.7287 212.311 42.9546 215.162 48.7216C218.045 54.4886 219.487 61.9792 219.487 71.1932C219.487 80.0095 218.111 87.3177 215.36 93.1179C212.643 98.9181 208.997 103.243 204.423 106.094C199.882 108.944 194.894 110.369 189.458 110.369C185.879 110.369 182.681 109.789 179.863 108.629C177.079 107.436 174.693 105.829 172.704 103.807C170.749 101.752 169.241 99.4318 168.18 96.8466H167.782V138.011H140.339ZM167.186 71.1932C167.186 74.9053 167.666 78.1203 168.627 80.8381C169.622 83.5227 171.014 85.6108 172.804 87.1023C174.627 88.5606 176.797 89.2898 179.316 89.2898C181.835 89.2898 183.973 88.5772 185.73 87.152C187.52 85.6937 188.878 83.6222 189.806 80.9375C190.768 78.2197 191.248 74.9716 191.248 71.1932C191.248 67.4148 190.768 64.1833 189.806 61.4986C188.878 58.7808 187.52 56.7093 185.73 55.2841C183.973 53.8258 181.835 53.0966 179.316 53.0966C176.797 53.0966 174.627 53.8258 172.804 55.2841C171.014 56.7093 169.622 58.7808 168.627 61.4986C167.666 64.1833 167.186 67.4148 167.186 71.1932Z" fill="#BB0000"/>
9
+ <path d="M98.9133 109.375V33.0114H126.357V109.375H98.9133ZM112.635 25.0568C108.923 25.0568 105.741 23.8305 103.089 21.3778C100.438 18.9252 99.1122 15.9754 99.1122 12.5284C99.1122 9.08144 100.438 6.13163 103.089 3.67897C105.741 1.22632 108.923 0 112.635 0C116.38 0 119.562 1.22632 122.18 3.67897C124.832 6.13163 126.158 9.08144 126.158 12.5284C126.158 15.9754 124.832 18.9252 122.18 21.3778C119.562 23.8305 116.38 25.0568 112.635 25.0568Z" fill="#BB0000"/>
10
+ <path d="M5 109.375V7.55682H48.9489C56.5057 7.55682 63.1179 8.9323 68.7855 11.6832C74.4531 14.4342 78.8613 18.3949 82.0099 23.5653C85.1586 28.7358 86.733 34.9337 86.733 42.1591C86.733 49.4508 85.1089 55.599 81.8608 60.6037C78.6458 65.6084 74.1217 69.3868 68.2884 71.9389C62.4882 74.491 55.7102 75.7671 47.9545 75.7671H21.7045V54.2898H42.3864C45.6345 54.2898 48.402 53.8921 50.6889 53.0966C53.009 52.268 54.7822 50.9588 56.0085 49.169C57.268 47.3793 57.8977 45.0426 57.8977 42.1591C57.8977 39.2424 57.268 36.8726 56.0085 35.0497C54.7822 33.1937 53.009 31.8348 50.6889 30.973C48.402 30.0781 45.6345 29.6307 42.3864 29.6307H32.642V109.375H5ZM64.6591 62.6421L90.1136 109.375H60.0852L35.2273 62.6421H64.6591Z" fill="#BB0000"/>
11
+ <rect x="98.915" y="108.475" width="27.45" height="11.5" fill="#BB0000"/>
12
+ <path d="M48.1719 103.775C72.4009 103.775 95.8737 111.586 117.116 119.158C127.797 122.965 137.871 126.699 147.345 129.455C156.817 132.211 165.493 133.927 173.325 133.775C187.883 133.494 197.211 132.109 203.539 130.467C209.816 128.837 213.215 126.94 216.018 125.446L216.275 125.321C217.585 124.751 219.143 124.999 220.136 126.141C221.207 127.373 221.151 129.11 220.203 130.352C211.435 141.831 189.111 158.775 150.06 158.775C120.199 158.775 100.372 150.691 79.9199 143.314C59.5497 135.968 38.3359 129.218 5.1543 131.271L2.5 131.435V113.079L3.8623 112.383C9.0879 109.713 23.5784 103.775 48.1719 103.775Z" fill="#0389FF" stroke="white" stroke-width="5"/>
13
+ </svg>
Binary file
package/package.json ADDED
@@ -0,0 +1,51 @@
1
+ {
2
+ "name": "@rip-lang/server",
3
+ "version": "0.5.0",
4
+ "description": "Pure Rip application server — multi-worker, hot reload, HTTPS, mDNS",
5
+ "type": "module",
6
+ "main": "server.rip",
7
+ "exports": {
8
+ ".": "./server.rip"
9
+ },
10
+ "bin": {
11
+ "rip-server": "./bin/rip-server"
12
+ },
13
+ "scripts": {
14
+ "build": "rip -c server.rip",
15
+ "test": "echo \"Tests coming soon\" && exit 0"
16
+ },
17
+ "keywords": [
18
+ "server",
19
+ "app-server",
20
+ "hot-reload",
21
+ "multi-worker",
22
+ "https",
23
+ "tls",
24
+ "mdns",
25
+ "bun",
26
+ "rip",
27
+ "rip-lang"
28
+ ],
29
+ "repository": {
30
+ "type": "git",
31
+ "url": "git+https://github.com/shreeve/rip-lang.git",
32
+ "directory": "packages/server"
33
+ },
34
+ "homepage": "https://github.com/shreeve/rip-lang/tree/main/packages/server#readme",
35
+ "bugs": {
36
+ "url": "https://github.com/shreeve/rip-lang/issues"
37
+ },
38
+ "author": "Steve Shreeve <steve.shreeve@gmail.com>",
39
+ "license": "MIT",
40
+ "peerDependencies": {
41
+ "rip-lang": "^2.0.0",
42
+ "@rip-lang/api": "^0.5.0"
43
+ },
44
+ "files": [
45
+ "bin/",
46
+ "server.rip",
47
+ "dashboard.html",
48
+ "docs/",
49
+ "README.md"
50
+ ]
51
+ }