go-duck-cli 1.1.48 → 1.1.49
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/package.json +1 -1
- package/templates/docs/pages/gdl-relationships.hbs +13 -6
- package/templates/docs/pages/gdl.hbs +3 -1
- package/templates/docs/pages/hybrid-store.hbs +1 -1
- package/templates/docs/pages/index.hbs +3 -3
- package/templates/docs/pages/realtime.hbs +6 -6
- package/templates/docs/pages/wizard.hbs +1 -1
package/package.json
CHANGED
|
@@ -23,9 +23,10 @@
|
|
|
23
23
|
<h2 class="text-3xl font-black mb-6 text-white m-0">The Social Network of Data</h2>
|
|
24
24
|
<div class="bg-purple-800/50 backdrop-blur-md rounded-2xl p-8 border border-purple-500/30">
|
|
25
25
|
<pre class="text-indigo-200 font-mono text-base leading-relaxed overflow-x-auto m-0">
|
|
26
|
-
<span class="text-purple-400">// relationship Type Parent to Child</span>
|
|
27
|
-
relationship
|
|
28
|
-
|
|
26
|
+
<span class="text-purple-400">// relationship Type { Parent to Child }</span>
|
|
27
|
+
relationship OneToMany {
|
|
28
|
+
Customer{orders} to Order{customer}
|
|
29
|
+
}
|
|
29
30
|
</pre>
|
|
30
31
|
</div>
|
|
31
32
|
<p class="mt-8 text-purple-200 text-sm italic font-medium leading-relaxed m-0 border-l-2 border-purple-400 pl-6">
|
|
@@ -42,13 +43,17 @@ relationship m:1 Order to Customer
|
|
|
42
43
|
<div class="w-12 h-12 bg-purple-100 rounded-xl flex items-center justify-center mb-6 text-2xl group-hover:scale-110 transition-transform">👨👩👧</div>
|
|
43
44
|
<h3 class="text-xl font-bold text-slate-900 mb-4 m-0 font-mono">1:m (One-to-Many)</h3>
|
|
44
45
|
<p class="text-sm text-slate-600 leading-relaxed mb-6 italic">One parent entity owns multiple children. Perfect for Customers having many Orders.</p>
|
|
45
|
-
<div class="p-4 bg-slate-50 rounded-xl font-mono text-xs text-purple-700 font-bold border border-slate-100">relationship
|
|
46
|
+
<div class="p-4 bg-slate-50 rounded-xl font-mono text-xs text-purple-700 font-bold border border-slate-100"><pre class="m-0">relationship OneToMany {
|
|
47
|
+
Customer{orders} to Order{customer}
|
|
48
|
+
}</pre></div>
|
|
46
49
|
</div>
|
|
47
50
|
<div class="p-8 bg-white border border-slate-200 rounded-[2rem] shadow-sm hover:border-purple-200 transition-all group">
|
|
48
51
|
<div class="w-12 h-12 bg-purple-100 rounded-xl flex items-center justify-center mb-6 text-2xl group-hover:scale-110 transition-transform">🔗</div>
|
|
49
52
|
<h3 class="text-xl font-bold text-slate-900 mb-4 m-0 font-mono">m:1 (Many-to-One)</h3>
|
|
50
53
|
<p class="text-sm text-slate-600 leading-relaxed mb-6 italic">Multiple entities reference a single shared resource. Multiple Car entities belonging to a single Manufacturer.</p>
|
|
51
|
-
<div class="p-4 bg-slate-50 rounded-xl font-mono text-xs text-purple-700 font-bold border border-slate-100">relationship
|
|
54
|
+
<div class="p-4 bg-slate-50 rounded-xl font-mono text-xs text-purple-700 font-bold border border-slate-100"><pre class="m-0">relationship ManyToOne {
|
|
55
|
+
Car{manufacturer} to Manufacturer
|
|
56
|
+
}</pre></div>
|
|
52
57
|
</div>
|
|
53
58
|
</div>
|
|
54
59
|
</section>
|
|
@@ -62,7 +67,9 @@ relationship m:1 Order to Customer
|
|
|
62
67
|
<div>
|
|
63
68
|
<h4 class="text-lg font-bold text-purple-900 mb-2 m-0 font-mono">required</h4>
|
|
64
69
|
<p class="text-sm text-purple-800 leading-relaxed m-0 italic mb-4">By adding the `required` keyword to any relationship, GO-DUCK enforces strict existence checking at the database and API level.</p>
|
|
65
|
-
<
|
|
70
|
+
<div class="p-4 bg-white rounded-lg font-mono text-xs text-purple-700 font-bold border border-purple-200"><pre class="m-0">relationship OneToMany {
|
|
71
|
+
Customer{orders} to Order{customer} required
|
|
72
|
+
}</pre></div>
|
|
66
73
|
</div>
|
|
67
74
|
</div>
|
|
68
75
|
</div>
|
|
@@ -56,7 +56,7 @@ entity Profile { <span class="text-slate-500">// MongoDB (document)</span>
|
|
|
56
56
|
}</code></pre>
|
|
57
57
|
</div>
|
|
58
58
|
<p class="text-slate-400 text-sm italic leading-relaxed m-0 border-l border-emerald-500/30 pl-6">
|
|
59
|
-
GO-DUCK automatically detects that <code>Profile</code> is NoSQL and <code>User</code> is SQL.
|
|
59
|
+
GO-DUCK automatically detects that <code>Profile</code> is NoSQL and <code>User</code> is SQL. To ensure <strong>100% structural parity</strong> between PostgreSQL and MongoDB, the generator now unconditionally injects both <code>gorm:"..."</code> and <code>bson:"..."</code> tags onto every generated Go struct. This allows any model to seamlessly fallback or migrate between engines without any code changes, while still handling dynamic ID typing (<code>string</code> vs <code>uint64</code>) automatically.
|
|
60
60
|
</p>
|
|
61
61
|
</div>
|
|
62
62
|
</div>
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
<span class="animate-ping absolute inline-flex h-full w-full rounded-full bg-emerald-400 opacity-75"></span>
|
|
17
17
|
<span class="relative inline-flex rounded-full h-3 w-3 bg-emerald-500"></span>
|
|
18
18
|
</span>
|
|
19
|
-
<p class="text-[11px] font-black text-indigo-900 uppercase tracking-[0.25em]">The
|
|
19
|
+
<p class="text-[11px] font-black text-indigo-900 uppercase tracking-[0.25em]">The 380% Elite Milestone Surpassed</p>
|
|
20
20
|
</div>
|
|
21
21
|
|
|
22
22
|
<!-- Heroic Logo Anchor (Enhanced) -->
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
<div class="relative z-10 flex flex-col lg:flex-row items-center justify-between gap-12">
|
|
60
60
|
<div class="max-w-xl text-center lg:text-left">
|
|
61
61
|
<h3 class="text-[11px] font-black text-indigo-500 uppercase tracking-[0.4em] mb-4 text-center lg:text-left">Operational Readiness</h3>
|
|
62
|
-
<h2 class="text-5xl font-black text-slate-900 tracking-tighter mb-6 italic">The
|
|
62
|
+
<h2 class="text-5xl font-black text-slate-900 tracking-tighter mb-6 italic">The 380% Paradigm Status.</h2>
|
|
63
63
|
<p class="text-slate-500 leading-relaxed font-medium">GO-DUCK has evolved from a simple generator into a high-performance distributed orchestrator, achieving industrial compliance across all silo ecosystems.</p>
|
|
64
64
|
</div>
|
|
65
65
|
<div class="grid grid-cols-2 gap-8 text-center bg-slate-50 p-8 rounded-[2rem] border border-slate-100 shadow-inner">
|
|
@@ -416,7 +416,7 @@
|
|
|
416
416
|
</div>
|
|
417
417
|
|
|
418
418
|
<div class="mt-24 text-slate-500 font-mono text-[10px] uppercase tracking-[0.6em] font-black relative z-10">
|
|
419
|
-
GO-DUCK • THE
|
|
419
|
+
GO-DUCK • THE 380% ELITE MILESTONE • SOVEREIGN CODE ORCHESTRATION
|
|
420
420
|
</div>
|
|
421
421
|
</div>
|
|
422
422
|
</section>
|
|
@@ -55,15 +55,15 @@ ws.onmessage = (event) => console.log("Received via WS:", event.data);</code></p
|
|
|
55
55
|
<div class="grid grid-cols-1 md:grid-cols-2 gap-6 mb-8">
|
|
56
56
|
<div class="bg-gray-50 p-6 rounded-xl border border-gray-200">
|
|
57
57
|
<h4 class="font-bold text-blue-600 mb-2 font-mono">MQTT (Real-time UI)</h4>
|
|
58
|
-
<p class="text-sm text-gray-600 mb-4">Topic Pattern: <code>
|
|
59
|
-
<pre class="text-xs bg-slate-900 text-white p-3 rounded"><code># Listen to Car Deletions
|
|
60
|
-
mosquitto_sub -t "go-duck/events/
|
|
58
|
+
<p class="text-sm text-gray-600 mb-4">Topic Pattern: <code>{topicPrefix}/{tenantDB}/{entity}/{action}</code></p>
|
|
59
|
+
<pre class="text-xs bg-slate-900 text-white p-3 rounded"><code># Listen to Car Deletions in the tokyo tenant
|
|
60
|
+
mosquitto_sub -t "go-duck/events/tokyo_silo/Car/DELETE"</code></pre>
|
|
61
61
|
</div>
|
|
62
62
|
<div class="bg-gray-50 p-6 rounded-xl border border-gray-200">
|
|
63
63
|
<h4 class="font-bold text-green-600 mb-2 font-mono">NATS (High-Perf CQRS)</h4>
|
|
64
|
-
<p class="text-sm text-gray-600 mb-4">Subject Pattern: <code>
|
|
65
|
-
<pre class="text-xs bg-slate-900 text-white p-3 rounded"><code># Listen to any Car mutations
|
|
66
|
-
nats sub "
|
|
64
|
+
<p class="text-sm text-gray-600 mb-4">Subject Pattern: <code>events.{tenantDB}.{entity}.{action}</code></p>
|
|
65
|
+
<pre class="text-xs bg-slate-900 text-white p-3 rounded"><code># Listen to any Car mutations across all silos
|
|
66
|
+
nats sub "events.*.Car.>"</code></pre>
|
|
67
67
|
</div>
|
|
68
68
|
</div>
|
|
69
69
|
</section>
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
<div class="flex-grow h-1.5 bg-slate-100 rounded-full overflow-hidden">
|
|
63
63
|
<div class="w-[88%] h-full bg-indigo-500 shadow-[0_0_8px_rgba(99,102,241,0.5)]"></div>
|
|
64
64
|
</div>
|
|
65
|
-
<span class="text-[8px] font-black text-indigo-600 uppercase">
|
|
65
|
+
<span class="text-[8px] font-black text-indigo-600 uppercase">380%</span>
|
|
66
66
|
</div>
|
|
67
67
|
</div>
|
|
68
68
|
</div>
|