everything-dev 1.12.3 → 1.13.1
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/cli.js +1 -1
- package/dist/app.cjs +24 -101
- package/dist/app.cjs.map +1 -1
- package/dist/app.mjs +25 -102
- package/dist/app.mjs.map +1 -1
- package/dist/cli/init.cjs +143 -66
- package/dist/cli/init.cjs.map +1 -1
- package/dist/cli/init.d.cts +1 -1
- package/dist/cli/init.d.cts.map +1 -1
- package/dist/cli/init.d.mts +1 -1
- package/dist/cli/init.d.mts.map +1 -1
- package/dist/cli/init.mjs +144 -67
- package/dist/cli/init.mjs.map +1 -1
- package/dist/cli/prompts.cjs +3 -3
- package/dist/cli/prompts.cjs.map +1 -1
- package/dist/cli/prompts.mjs +3 -3
- package/dist/cli/prompts.mjs.map +1 -1
- package/dist/cli/sync.cjs +15 -56
- package/dist/cli/sync.cjs.map +1 -1
- package/dist/cli/sync.mjs +15 -56
- package/dist/cli/sync.mjs.map +1 -1
- package/dist/cli/upgrade.cjs +3 -1
- package/dist/cli/upgrade.cjs.map +1 -1
- package/dist/cli/upgrade.mjs +3 -1
- package/dist/cli/upgrade.mjs.map +1 -1
- package/dist/config.cjs +223 -81
- package/dist/config.cjs.map +1 -1
- package/dist/config.d.cts +21 -5
- package/dist/config.d.cts.map +1 -1
- package/dist/config.d.mts +21 -5
- package/dist/config.d.mts.map +1 -1
- package/dist/config.mjs +217 -83
- package/dist/config.mjs.map +1 -1
- package/dist/contract.d.cts +104 -8
- package/dist/contract.d.cts.map +1 -1
- package/dist/contract.d.mts +104 -8
- package/dist/contract.d.mts.map +1 -1
- package/dist/host.cjs +34 -1
- package/dist/host.cjs.map +1 -1
- package/dist/host.d.cts.map +1 -1
- package/dist/host.d.mts.map +1 -1
- package/dist/host.mjs +34 -1
- package/dist/host.mjs.map +1 -1
- package/dist/index.cjs +17 -0
- package/dist/index.d.cts +5 -3
- package/dist/index.d.mts +5 -3
- package/dist/index.mjs +5 -3
- package/dist/merge.cjs +113 -0
- package/dist/merge.cjs.map +1 -0
- package/dist/merge.d.cts +7 -0
- package/dist/merge.d.cts.map +1 -0
- package/dist/merge.d.mts +7 -0
- package/dist/merge.d.mts.map +1 -0
- package/dist/merge.mjs +107 -0
- package/dist/merge.mjs.map +1 -0
- package/dist/plugin.cjs +117 -105
- package/dist/plugin.cjs.map +1 -1
- package/dist/plugin.d.cts +114 -8
- package/dist/plugin.d.cts.map +1 -1
- package/dist/plugin.d.mts +114 -8
- package/dist/plugin.d.mts.map +1 -1
- package/dist/plugin.mjs +117 -105
- package/dist/plugin.mjs.map +1 -1
- package/dist/service-descriptor.cjs +21 -0
- package/dist/service-descriptor.cjs.map +1 -1
- package/dist/service-descriptor.d.cts +23 -1
- package/dist/service-descriptor.d.cts.map +1 -1
- package/dist/service-descriptor.d.mts +23 -1
- package/dist/service-descriptor.d.mts.map +1 -1
- package/dist/service-descriptor.mjs +21 -0
- package/dist/service-descriptor.mjs.map +1 -1
- package/dist/shared.cjs +24 -2
- package/dist/shared.cjs.map +1 -1
- package/dist/shared.d.cts +3 -0
- package/dist/shared.d.cts.map +1 -1
- package/dist/shared.d.mts +3 -0
- package/dist/shared.d.mts.map +1 -1
- package/dist/shared.mjs +25 -3
- package/dist/shared.mjs.map +1 -1
- package/dist/sidebar.cjs +124 -0
- package/dist/sidebar.cjs.map +1 -0
- package/dist/sidebar.d.cts +8 -0
- package/dist/sidebar.d.cts.map +1 -0
- package/dist/sidebar.d.mts +8 -0
- package/dist/sidebar.d.mts.map +1 -0
- package/dist/sidebar.mjs +122 -0
- package/dist/sidebar.mjs.map +1 -0
- package/dist/types.cjs +104 -10
- package/dist/types.cjs.map +1 -1
- package/dist/types.d.cts +256 -29
- package/dist/types.d.cts.map +1 -1
- package/dist/types.d.mts +256 -29
- package/dist/types.d.mts.map +1 -1
- package/dist/types.mjs +100 -11
- package/dist/types.mjs.map +1 -1
- package/dist/utils/path-match.cjs +18 -0
- package/dist/utils/path-match.cjs.map +1 -0
- package/dist/utils/path-match.mjs +17 -0
- package/dist/utils/path-match.mjs.map +1 -0
- package/dist/utils/save-config.cjs +19 -0
- package/dist/utils/save-config.cjs.map +1 -0
- package/dist/utils/save-config.mjs +18 -0
- package/dist/utils/save-config.mjs.map +1 -0
- package/package.json +3 -2
- package/skills/dev-workflow/SKILL.md +8 -0
- package/skills/extends-config/SKILL.md +132 -0
- package/skills/init-upgrade/SKILL.md +128 -0
- package/skills/publish-sync/SKILL.md +30 -0
- package/src/app.ts +23 -118
- package/src/cli/init.ts +199 -100
- package/src/cli/prompts.ts +2 -2
- package/src/cli/sync.ts +27 -96
- package/src/cli/upgrade.ts +2 -0
- package/src/config.ts +356 -132
- package/src/host.ts +45 -0
- package/src/index.ts +1 -0
- package/src/merge.ts +198 -0
- package/src/plugin.ts +340 -318
- package/src/service-descriptor.ts +23 -0
- package/src/shared.ts +48 -5
- package/src/sidebar.ts +162 -0
- package/src/types.ts +134 -28
- package/src/utils/path-match.ts +16 -0
- package/src/utils/save-config.ts +20 -0
package/dist/contract.d.cts
CHANGED
|
@@ -67,7 +67,11 @@ declare const BuildResultSchema: z.ZodObject<{
|
|
|
67
67
|
declare const ConfigResultSchema: z.ZodObject<{
|
|
68
68
|
config: z.ZodNullable<z.ZodObject<{
|
|
69
69
|
account: z.ZodString;
|
|
70
|
-
extends: z.ZodOptional<z.ZodString
|
|
70
|
+
extends: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
71
|
+
development: z.ZodOptional<z.ZodString>;
|
|
72
|
+
production: z.ZodOptional<z.ZodString>;
|
|
73
|
+
staging: z.ZodOptional<z.ZodString>;
|
|
74
|
+
}, z.core.$strip>]>>;
|
|
71
75
|
domain: z.ZodOptional<z.ZodString>;
|
|
72
76
|
testnet: z.ZodOptional<z.ZodString>;
|
|
73
77
|
staging: z.ZodOptional<z.ZodObject<{
|
|
@@ -82,8 +86,12 @@ declare const ConfigResultSchema: z.ZodObject<{
|
|
|
82
86
|
strictVersion: z.ZodOptional<z.ZodBoolean>;
|
|
83
87
|
shareScope: z.ZodOptional<z.ZodString>;
|
|
84
88
|
}, z.core.$strip>>>>;
|
|
85
|
-
plugins: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
86
|
-
extends: z.ZodOptional<z.ZodString
|
|
89
|
+
plugins: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
90
|
+
extends: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
91
|
+
development: z.ZodOptional<z.ZodString>;
|
|
92
|
+
production: z.ZodOptional<z.ZodString>;
|
|
93
|
+
staging: z.ZodOptional<z.ZodString>;
|
|
94
|
+
}, z.core.$strip>]>>;
|
|
87
95
|
development: z.ZodOptional<z.ZodString>;
|
|
88
96
|
production: z.ZodOptional<z.ZodString>;
|
|
89
97
|
integrity: z.ZodOptional<z.ZodString>;
|
|
@@ -93,7 +101,27 @@ declare const ConfigResultSchema: z.ZodObject<{
|
|
|
93
101
|
variables: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
94
102
|
secrets: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
95
103
|
routes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
96
|
-
|
|
104
|
+
sidebar: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
105
|
+
icon: z.ZodString;
|
|
106
|
+
label: z.ZodString;
|
|
107
|
+
to: z.ZodOptional<z.ZodString>;
|
|
108
|
+
roleRequired: z.ZodOptional<z.ZodEnum<{
|
|
109
|
+
anon: "anon";
|
|
110
|
+
member: "member";
|
|
111
|
+
admin: "admin";
|
|
112
|
+
}>>;
|
|
113
|
+
}, z.core.$strip>>>;
|
|
114
|
+
app: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
115
|
+
shared: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
116
|
+
version: z.ZodString;
|
|
117
|
+
requiredVersion: z.ZodOptional<z.ZodString>;
|
|
118
|
+
singleton: z.ZodOptional<z.ZodBoolean>;
|
|
119
|
+
eager: z.ZodOptional<z.ZodBoolean>;
|
|
120
|
+
strictVersion: z.ZodOptional<z.ZodBoolean>;
|
|
121
|
+
shareScope: z.ZodOptional<z.ZodString>;
|
|
122
|
+
}, z.core.$strip>>>>;
|
|
123
|
+
plugins: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
124
|
+
}, z.core.$strip>]>>>;
|
|
97
125
|
app: z.ZodObject<{
|
|
98
126
|
host: z.ZodObject<{
|
|
99
127
|
development: z.ZodString;
|
|
@@ -117,6 +145,16 @@ declare const ConfigResultSchema: z.ZodObject<{
|
|
|
117
145
|
proxy: z.ZodOptional<z.ZodString>;
|
|
118
146
|
variables: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
119
147
|
secrets: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
148
|
+
sidebar: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
149
|
+
icon: z.ZodString;
|
|
150
|
+
label: z.ZodString;
|
|
151
|
+
to: z.ZodOptional<z.ZodString>;
|
|
152
|
+
roleRequired: z.ZodOptional<z.ZodEnum<{
|
|
153
|
+
anon: "anon";
|
|
154
|
+
member: "member";
|
|
155
|
+
admin: "admin";
|
|
156
|
+
}>>;
|
|
157
|
+
}, z.core.$strip>>>;
|
|
120
158
|
}, z.core.$strip>;
|
|
121
159
|
auth: z.ZodOptional<z.ZodObject<{
|
|
122
160
|
name: z.ZodString;
|
|
@@ -126,6 +164,16 @@ declare const ConfigResultSchema: z.ZodObject<{
|
|
|
126
164
|
proxy: z.ZodOptional<z.ZodString>;
|
|
127
165
|
variables: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
128
166
|
secrets: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
167
|
+
sidebar: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
168
|
+
icon: z.ZodString;
|
|
169
|
+
label: z.ZodString;
|
|
170
|
+
to: z.ZodOptional<z.ZodString>;
|
|
171
|
+
roleRequired: z.ZodOptional<z.ZodEnum<{
|
|
172
|
+
anon: "anon";
|
|
173
|
+
member: "member";
|
|
174
|
+
admin: "admin";
|
|
175
|
+
}>>;
|
|
176
|
+
}, z.core.$strip>>>;
|
|
129
177
|
}, z.core.$strip>>;
|
|
130
178
|
}, z.core.$strip>;
|
|
131
179
|
}, z.core.$strip>>;
|
|
@@ -421,7 +469,11 @@ declare const bosContract: {
|
|
|
421
469
|
config: _$_orpc_contract0.ContractProcedure<_$_orpc_contract0.Schema<unknown, unknown>, z.ZodObject<{
|
|
422
470
|
config: z.ZodNullable<z.ZodObject<{
|
|
423
471
|
account: z.ZodString;
|
|
424
|
-
extends: z.ZodOptional<z.ZodString
|
|
472
|
+
extends: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
473
|
+
development: z.ZodOptional<z.ZodString>;
|
|
474
|
+
production: z.ZodOptional<z.ZodString>;
|
|
475
|
+
staging: z.ZodOptional<z.ZodString>;
|
|
476
|
+
}, z.core.$strip>]>>;
|
|
425
477
|
domain: z.ZodOptional<z.ZodString>;
|
|
426
478
|
testnet: z.ZodOptional<z.ZodString>;
|
|
427
479
|
staging: z.ZodOptional<z.ZodObject<{
|
|
@@ -436,8 +488,12 @@ declare const bosContract: {
|
|
|
436
488
|
strictVersion: z.ZodOptional<z.ZodBoolean>;
|
|
437
489
|
shareScope: z.ZodOptional<z.ZodString>;
|
|
438
490
|
}, z.core.$strip>>>>;
|
|
439
|
-
plugins: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
440
|
-
extends: z.ZodOptional<z.ZodString
|
|
491
|
+
plugins: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
492
|
+
extends: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
493
|
+
development: z.ZodOptional<z.ZodString>;
|
|
494
|
+
production: z.ZodOptional<z.ZodString>;
|
|
495
|
+
staging: z.ZodOptional<z.ZodString>;
|
|
496
|
+
}, z.core.$strip>]>>;
|
|
441
497
|
development: z.ZodOptional<z.ZodString>;
|
|
442
498
|
production: z.ZodOptional<z.ZodString>;
|
|
443
499
|
integrity: z.ZodOptional<z.ZodString>;
|
|
@@ -447,7 +503,27 @@ declare const bosContract: {
|
|
|
447
503
|
variables: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
448
504
|
secrets: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
449
505
|
routes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
450
|
-
|
|
506
|
+
sidebar: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
507
|
+
icon: z.ZodString;
|
|
508
|
+
label: z.ZodString;
|
|
509
|
+
to: z.ZodOptional<z.ZodString>;
|
|
510
|
+
roleRequired: z.ZodOptional<z.ZodEnum<{
|
|
511
|
+
anon: "anon";
|
|
512
|
+
member: "member";
|
|
513
|
+
admin: "admin";
|
|
514
|
+
}>>;
|
|
515
|
+
}, z.core.$strip>>>;
|
|
516
|
+
app: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
517
|
+
shared: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
518
|
+
version: z.ZodString;
|
|
519
|
+
requiredVersion: z.ZodOptional<z.ZodString>;
|
|
520
|
+
singleton: z.ZodOptional<z.ZodBoolean>;
|
|
521
|
+
eager: z.ZodOptional<z.ZodBoolean>;
|
|
522
|
+
strictVersion: z.ZodOptional<z.ZodBoolean>;
|
|
523
|
+
shareScope: z.ZodOptional<z.ZodString>;
|
|
524
|
+
}, z.core.$strip>>>>;
|
|
525
|
+
plugins: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
526
|
+
}, z.core.$strip>]>>>;
|
|
451
527
|
app: z.ZodObject<{
|
|
452
528
|
host: z.ZodObject<{
|
|
453
529
|
development: z.ZodString;
|
|
@@ -471,6 +547,16 @@ declare const bosContract: {
|
|
|
471
547
|
proxy: z.ZodOptional<z.ZodString>;
|
|
472
548
|
variables: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
473
549
|
secrets: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
550
|
+
sidebar: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
551
|
+
icon: z.ZodString;
|
|
552
|
+
label: z.ZodString;
|
|
553
|
+
to: z.ZodOptional<z.ZodString>;
|
|
554
|
+
roleRequired: z.ZodOptional<z.ZodEnum<{
|
|
555
|
+
anon: "anon";
|
|
556
|
+
member: "member";
|
|
557
|
+
admin: "admin";
|
|
558
|
+
}>>;
|
|
559
|
+
}, z.core.$strip>>>;
|
|
474
560
|
}, z.core.$strip>;
|
|
475
561
|
auth: z.ZodOptional<z.ZodObject<{
|
|
476
562
|
name: z.ZodString;
|
|
@@ -480,6 +566,16 @@ declare const bosContract: {
|
|
|
480
566
|
proxy: z.ZodOptional<z.ZodString>;
|
|
481
567
|
variables: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
482
568
|
secrets: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
569
|
+
sidebar: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
570
|
+
icon: z.ZodString;
|
|
571
|
+
label: z.ZodString;
|
|
572
|
+
to: z.ZodOptional<z.ZodString>;
|
|
573
|
+
roleRequired: z.ZodOptional<z.ZodEnum<{
|
|
574
|
+
anon: "anon";
|
|
575
|
+
member: "member";
|
|
576
|
+
admin: "admin";
|
|
577
|
+
}>>;
|
|
578
|
+
}, z.core.$strip>>>;
|
|
483
579
|
}, z.core.$strip>>;
|
|
484
580
|
}, z.core.$strip>;
|
|
485
581
|
}, z.core.$strip>>;
|
package/dist/contract.d.cts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contract.d.cts","names":[],"sources":["../src/contract.ts"],"mappings":";;;;cAGa,gBAAA,EAAgB,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;;;cAWhB,eAAA,EAAe,CAAA,CAAA,SAAA;;;;;;;;cAMf,kBAAA,EAAkB,CAAA,CAAA,SAAA;;;;;;;;;;cAQlB,iBAAA,EAAiB,CAAA,CAAA,SAAA;;;;;;;;cAMjB,kBAAA,EAAkB,CAAA,CAAA,SAAA;;;;;cAMlB,iBAAA,EAAiB,CAAA,CAAA,SAAA;;;;;;;;;cAOjB,kBAAA,EAAkB,CAAA,CAAA,SAAA
|
|
1
|
+
{"version":3,"file":"contract.d.cts","names":[],"sources":["../src/contract.ts"],"mappings":";;;;cAGa,gBAAA,EAAgB,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;;;cAWhB,eAAA,EAAe,CAAA,CAAA,SAAA;;;;;;;;cAMf,kBAAA,EAAkB,CAAA,CAAA,SAAA;;;;;;;;;;cAQlB,iBAAA,EAAiB,CAAA,CAAA,SAAA;;;;;;;;cAMjB,kBAAA,EAAkB,CAAA,CAAA,SAAA;;;;;cAMlB,iBAAA,EAAiB,CAAA,CAAA,SAAA;;;;;;;;;cAOjB,kBAAA,EAAkB,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAMlB,sBAAA,EAAsB,CAAA,CAAA,SAAA;;;;;cAMtB,qBAAA,EAAqB,CAAA,CAAA,SAAA;;;;;;;;;;;;cAUrB,yBAAA,EAAyB,CAAA,CAAA,SAAA;;;cAIzB,wBAAA,EAAwB,CAAA,CAAA,SAAA;;;;;;;;cAMxB,sBAAA,EA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KAC/B,YAAA,GAAe,CAAA,CAAE,KAAA,QAAa,kBAAA;AAAA,KAC9B,eAAA,GAAkB,CAAA,CAAE,KAAA,QAAa,qBAAA;AAAA,KACjC,cAAA,GAAiB,CAAA,CAAE,KAAA,QAAa,oBAAA"}
|
package/dist/contract.d.mts
CHANGED
|
@@ -67,7 +67,11 @@ declare const BuildResultSchema: z.ZodObject<{
|
|
|
67
67
|
declare const ConfigResultSchema: z.ZodObject<{
|
|
68
68
|
config: z.ZodNullable<z.ZodObject<{
|
|
69
69
|
account: z.ZodString;
|
|
70
|
-
extends: z.ZodOptional<z.ZodString
|
|
70
|
+
extends: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
71
|
+
development: z.ZodOptional<z.ZodString>;
|
|
72
|
+
production: z.ZodOptional<z.ZodString>;
|
|
73
|
+
staging: z.ZodOptional<z.ZodString>;
|
|
74
|
+
}, z.core.$strip>]>>;
|
|
71
75
|
domain: z.ZodOptional<z.ZodString>;
|
|
72
76
|
testnet: z.ZodOptional<z.ZodString>;
|
|
73
77
|
staging: z.ZodOptional<z.ZodObject<{
|
|
@@ -82,8 +86,12 @@ declare const ConfigResultSchema: z.ZodObject<{
|
|
|
82
86
|
strictVersion: z.ZodOptional<z.ZodBoolean>;
|
|
83
87
|
shareScope: z.ZodOptional<z.ZodString>;
|
|
84
88
|
}, z.core.$strip>>>>;
|
|
85
|
-
plugins: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
86
|
-
extends: z.ZodOptional<z.ZodString
|
|
89
|
+
plugins: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
90
|
+
extends: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
91
|
+
development: z.ZodOptional<z.ZodString>;
|
|
92
|
+
production: z.ZodOptional<z.ZodString>;
|
|
93
|
+
staging: z.ZodOptional<z.ZodString>;
|
|
94
|
+
}, z.core.$strip>]>>;
|
|
87
95
|
development: z.ZodOptional<z.ZodString>;
|
|
88
96
|
production: z.ZodOptional<z.ZodString>;
|
|
89
97
|
integrity: z.ZodOptional<z.ZodString>;
|
|
@@ -93,7 +101,27 @@ declare const ConfigResultSchema: z.ZodObject<{
|
|
|
93
101
|
variables: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
94
102
|
secrets: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
95
103
|
routes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
96
|
-
|
|
104
|
+
sidebar: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
105
|
+
icon: z.ZodString;
|
|
106
|
+
label: z.ZodString;
|
|
107
|
+
to: z.ZodOptional<z.ZodString>;
|
|
108
|
+
roleRequired: z.ZodOptional<z.ZodEnum<{
|
|
109
|
+
anon: "anon";
|
|
110
|
+
member: "member";
|
|
111
|
+
admin: "admin";
|
|
112
|
+
}>>;
|
|
113
|
+
}, z.core.$strip>>>;
|
|
114
|
+
app: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
115
|
+
shared: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
116
|
+
version: z.ZodString;
|
|
117
|
+
requiredVersion: z.ZodOptional<z.ZodString>;
|
|
118
|
+
singleton: z.ZodOptional<z.ZodBoolean>;
|
|
119
|
+
eager: z.ZodOptional<z.ZodBoolean>;
|
|
120
|
+
strictVersion: z.ZodOptional<z.ZodBoolean>;
|
|
121
|
+
shareScope: z.ZodOptional<z.ZodString>;
|
|
122
|
+
}, z.core.$strip>>>>;
|
|
123
|
+
plugins: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
124
|
+
}, z.core.$strip>]>>>;
|
|
97
125
|
app: z.ZodObject<{
|
|
98
126
|
host: z.ZodObject<{
|
|
99
127
|
development: z.ZodString;
|
|
@@ -117,6 +145,16 @@ declare const ConfigResultSchema: z.ZodObject<{
|
|
|
117
145
|
proxy: z.ZodOptional<z.ZodString>;
|
|
118
146
|
variables: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
119
147
|
secrets: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
148
|
+
sidebar: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
149
|
+
icon: z.ZodString;
|
|
150
|
+
label: z.ZodString;
|
|
151
|
+
to: z.ZodOptional<z.ZodString>;
|
|
152
|
+
roleRequired: z.ZodOptional<z.ZodEnum<{
|
|
153
|
+
anon: "anon";
|
|
154
|
+
member: "member";
|
|
155
|
+
admin: "admin";
|
|
156
|
+
}>>;
|
|
157
|
+
}, z.core.$strip>>>;
|
|
120
158
|
}, z.core.$strip>;
|
|
121
159
|
auth: z.ZodOptional<z.ZodObject<{
|
|
122
160
|
name: z.ZodString;
|
|
@@ -126,6 +164,16 @@ declare const ConfigResultSchema: z.ZodObject<{
|
|
|
126
164
|
proxy: z.ZodOptional<z.ZodString>;
|
|
127
165
|
variables: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
128
166
|
secrets: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
167
|
+
sidebar: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
168
|
+
icon: z.ZodString;
|
|
169
|
+
label: z.ZodString;
|
|
170
|
+
to: z.ZodOptional<z.ZodString>;
|
|
171
|
+
roleRequired: z.ZodOptional<z.ZodEnum<{
|
|
172
|
+
anon: "anon";
|
|
173
|
+
member: "member";
|
|
174
|
+
admin: "admin";
|
|
175
|
+
}>>;
|
|
176
|
+
}, z.core.$strip>>>;
|
|
129
177
|
}, z.core.$strip>>;
|
|
130
178
|
}, z.core.$strip>;
|
|
131
179
|
}, z.core.$strip>>;
|
|
@@ -421,7 +469,11 @@ declare const bosContract: {
|
|
|
421
469
|
config: _$_orpc_contract0.ContractProcedure<_$_orpc_contract0.Schema<unknown, unknown>, z.ZodObject<{
|
|
422
470
|
config: z.ZodNullable<z.ZodObject<{
|
|
423
471
|
account: z.ZodString;
|
|
424
|
-
extends: z.ZodOptional<z.ZodString
|
|
472
|
+
extends: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
473
|
+
development: z.ZodOptional<z.ZodString>;
|
|
474
|
+
production: z.ZodOptional<z.ZodString>;
|
|
475
|
+
staging: z.ZodOptional<z.ZodString>;
|
|
476
|
+
}, z.core.$strip>]>>;
|
|
425
477
|
domain: z.ZodOptional<z.ZodString>;
|
|
426
478
|
testnet: z.ZodOptional<z.ZodString>;
|
|
427
479
|
staging: z.ZodOptional<z.ZodObject<{
|
|
@@ -436,8 +488,12 @@ declare const bosContract: {
|
|
|
436
488
|
strictVersion: z.ZodOptional<z.ZodBoolean>;
|
|
437
489
|
shareScope: z.ZodOptional<z.ZodString>;
|
|
438
490
|
}, z.core.$strip>>>>;
|
|
439
|
-
plugins: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
440
|
-
extends: z.ZodOptional<z.ZodString
|
|
491
|
+
plugins: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
492
|
+
extends: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
493
|
+
development: z.ZodOptional<z.ZodString>;
|
|
494
|
+
production: z.ZodOptional<z.ZodString>;
|
|
495
|
+
staging: z.ZodOptional<z.ZodString>;
|
|
496
|
+
}, z.core.$strip>]>>;
|
|
441
497
|
development: z.ZodOptional<z.ZodString>;
|
|
442
498
|
production: z.ZodOptional<z.ZodString>;
|
|
443
499
|
integrity: z.ZodOptional<z.ZodString>;
|
|
@@ -447,7 +503,27 @@ declare const bosContract: {
|
|
|
447
503
|
variables: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
448
504
|
secrets: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
449
505
|
routes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
450
|
-
|
|
506
|
+
sidebar: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
507
|
+
icon: z.ZodString;
|
|
508
|
+
label: z.ZodString;
|
|
509
|
+
to: z.ZodOptional<z.ZodString>;
|
|
510
|
+
roleRequired: z.ZodOptional<z.ZodEnum<{
|
|
511
|
+
anon: "anon";
|
|
512
|
+
member: "member";
|
|
513
|
+
admin: "admin";
|
|
514
|
+
}>>;
|
|
515
|
+
}, z.core.$strip>>>;
|
|
516
|
+
app: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
517
|
+
shared: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
518
|
+
version: z.ZodString;
|
|
519
|
+
requiredVersion: z.ZodOptional<z.ZodString>;
|
|
520
|
+
singleton: z.ZodOptional<z.ZodBoolean>;
|
|
521
|
+
eager: z.ZodOptional<z.ZodBoolean>;
|
|
522
|
+
strictVersion: z.ZodOptional<z.ZodBoolean>;
|
|
523
|
+
shareScope: z.ZodOptional<z.ZodString>;
|
|
524
|
+
}, z.core.$strip>>>>;
|
|
525
|
+
plugins: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
526
|
+
}, z.core.$strip>]>>>;
|
|
451
527
|
app: z.ZodObject<{
|
|
452
528
|
host: z.ZodObject<{
|
|
453
529
|
development: z.ZodString;
|
|
@@ -471,6 +547,16 @@ declare const bosContract: {
|
|
|
471
547
|
proxy: z.ZodOptional<z.ZodString>;
|
|
472
548
|
variables: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
473
549
|
secrets: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
550
|
+
sidebar: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
551
|
+
icon: z.ZodString;
|
|
552
|
+
label: z.ZodString;
|
|
553
|
+
to: z.ZodOptional<z.ZodString>;
|
|
554
|
+
roleRequired: z.ZodOptional<z.ZodEnum<{
|
|
555
|
+
anon: "anon";
|
|
556
|
+
member: "member";
|
|
557
|
+
admin: "admin";
|
|
558
|
+
}>>;
|
|
559
|
+
}, z.core.$strip>>>;
|
|
474
560
|
}, z.core.$strip>;
|
|
475
561
|
auth: z.ZodOptional<z.ZodObject<{
|
|
476
562
|
name: z.ZodString;
|
|
@@ -480,6 +566,16 @@ declare const bosContract: {
|
|
|
480
566
|
proxy: z.ZodOptional<z.ZodString>;
|
|
481
567
|
variables: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
482
568
|
secrets: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
569
|
+
sidebar: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
570
|
+
icon: z.ZodString;
|
|
571
|
+
label: z.ZodString;
|
|
572
|
+
to: z.ZodOptional<z.ZodString>;
|
|
573
|
+
roleRequired: z.ZodOptional<z.ZodEnum<{
|
|
574
|
+
anon: "anon";
|
|
575
|
+
member: "member";
|
|
576
|
+
admin: "admin";
|
|
577
|
+
}>>;
|
|
578
|
+
}, z.core.$strip>>>;
|
|
483
579
|
}, z.core.$strip>>;
|
|
484
580
|
}, z.core.$strip>;
|
|
485
581
|
}, z.core.$strip>>;
|
package/dist/contract.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contract.d.mts","names":[],"sources":["../src/contract.ts"],"mappings":";;;;cAGa,gBAAA,EAAgB,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;;;cAWhB,eAAA,EAAe,CAAA,CAAA,SAAA;;;;;;;;cAMf,kBAAA,EAAkB,CAAA,CAAA,SAAA;;;;;;;;;;cAQlB,iBAAA,EAAiB,CAAA,CAAA,SAAA;;;;;;;;cAMjB,kBAAA,EAAkB,CAAA,CAAA,SAAA;;;;;cAMlB,iBAAA,EAAiB,CAAA,CAAA,SAAA;;;;;;;;;cAOjB,kBAAA,EAAkB,CAAA,CAAA,SAAA
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A;AAAA,KACrC,kBAAA,GAAqB,CAAA,CAAE,KAAA,QAAa,wBAAA;AAAA,KACpC,gBAAA,GAAmB,CAAA,CAAE,KAAA,QAAa,sBAAA;AAAA,KAClC,oBAAA,GAAuB,CAAA,CAAE,KAAA,QAAa,0BAAA;AAAA,KACtC,mBAAA,GAAsB,CAAA,CAAE,KAAA,QAAa,yBAAA;AAAA,KACrC,cAAA,GAAiB,CAAA,CAAE,KAAA,QAAa,oBAAA;AAAA,KAChC,iBAAA,GAAoB,CAAA,CAAE,KAAA,QAAa,uBAAA;AAAA,KACnC,gBAAA,GAAmB,CAAA,CAAE,KAAA,QAAa,sBAAA;AAAA,KAClC,WAAA,GAAc,CAAA,CAAE,KAAA,QAAa,iBAAA;AAAA,KAC7B,UAAA,GAAa,CAAA,CAAE,KAAA,QAAa,gBAAA;AAAA,KAC5B,WAAA,GAAc,CAAA,CAAE,KAAA,QAAa,iBAAA;AAAA,KAC7B,UAAA,GAAa,CAAA,CAAE,KAAA,QAAa,gBAAA;AAAA,KAC5B,cAAA,GAAiB,CAAA,CAAE,KAAA,QAAa,oBAAA;AAAA,KAChC,aAAA,GAAgB,CAAA,CAAE,KAAA,QAAa,mBAAA;AAAA,KAC/B,YAAA,GAAe,CAAA,CAAE,KAAA,QAAa,kBAAA;AAAA,KAC9B,eAAA,GAAkB,CAAA,CAAE,KAAA,QAAa,qBAAA;AAAA,KACjC,cAAA,GAAiB,CAAA,CAAE,KAAA,QAAa,oBAAA"}
|
package/dist/host.cjs
CHANGED
|
@@ -36,11 +36,26 @@ function buildClientRuntimeConfig(runtimeConfig) {
|
|
|
36
36
|
entry: runtimeConfig.api.entry,
|
|
37
37
|
integrity: runtimeConfig.api.integrity
|
|
38
38
|
} : void 0,
|
|
39
|
+
auth: runtimeConfig.auth ? {
|
|
40
|
+
name: runtimeConfig.auth.name,
|
|
41
|
+
url: runtimeConfig.auth.url,
|
|
42
|
+
entry: runtimeConfig.auth.entry,
|
|
43
|
+
integrity: runtimeConfig.auth.integrity,
|
|
44
|
+
sidebar: runtimeConfig.auth.sidebar
|
|
45
|
+
} : void 0,
|
|
39
46
|
plugins: runtimeConfig.plugins ? Object.fromEntries(Object.entries(runtimeConfig.plugins).map(([key, plugin]) => [key, {
|
|
40
47
|
name: plugin.name,
|
|
41
48
|
url: plugin.url,
|
|
42
49
|
entry: plugin.entry,
|
|
43
|
-
integrity: plugin.integrity
|
|
50
|
+
integrity: plugin.integrity,
|
|
51
|
+
...plugin.ui ? { ui: {
|
|
52
|
+
name: plugin.ui.name,
|
|
53
|
+
url: plugin.ui.url,
|
|
54
|
+
entry: plugin.ui.entry,
|
|
55
|
+
source: plugin.ui.source,
|
|
56
|
+
integrity: plugin.ui.integrity
|
|
57
|
+
} } : {},
|
|
58
|
+
...plugin.sidebar ? { sidebar: plugin.sidebar } : {}
|
|
44
59
|
}])) : void 0
|
|
45
60
|
};
|
|
46
61
|
}
|
|
@@ -49,6 +64,11 @@ function renderLoadingShell(runtimeConfig, error) {
|
|
|
49
64
|
const errorMarkup = error ? `<p style="color: #fca5a5;">Error loading UI: ${escapeHtml(error)}</p>` : "<p>Loading UI...</p>";
|
|
50
65
|
const uiIntegrity = runtimeConfig.ui?.integrity;
|
|
51
66
|
const sriAttr = uiIntegrity ? ` integrity="${uiIntegrity}" crossorigin="anonymous"` : "";
|
|
67
|
+
const pluginUiScripts = Object.values(runtimeConfig.plugins ?? {}).filter((plugin) => plugin.ui?.url && plugin.ui.source === "remote").map((plugin) => {
|
|
68
|
+
const uiIntegrity = plugin.ui.integrity;
|
|
69
|
+
const sri = uiIntegrity ? ` integrity="${uiIntegrity}" crossorigin="anonymous"` : "";
|
|
70
|
+
return `<script src="${plugin.ui.url}/remoteEntry.js"${sri}><\/script>`;
|
|
71
|
+
}).join("\n");
|
|
52
72
|
return `
|
|
53
73
|
<!DOCTYPE html>
|
|
54
74
|
<html lang="en">
|
|
@@ -62,6 +82,7 @@ function renderLoadingShell(runtimeConfig, error) {
|
|
|
62
82
|
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
|
|
63
83
|
</style>
|
|
64
84
|
${runtimeConfig.assetsUrl ? `<script src="${runtimeConfig.assetsUrl}/remoteEntry.js"${sriAttr}><\/script>` : ""}
|
|
85
|
+
${pluginUiScripts}
|
|
65
86
|
<script>${bootstrap}<\/script>
|
|
66
87
|
</head>
|
|
67
88
|
<body>
|
|
@@ -311,6 +332,18 @@ async function runHostServer(opts) {
|
|
|
311
332
|
});
|
|
312
333
|
});
|
|
313
334
|
}
|
|
335
|
+
for (const [pluginKey, pluginConfig] of Object.entries(runtimeConfig.plugins ?? {})) {
|
|
336
|
+
if (!pluginConfig.ui?.url) continue;
|
|
337
|
+
const pluginUiUrl = pluginConfig.ui.url;
|
|
338
|
+
const proxyPrefix = `/__mf/plugin-ui/${pluginKey}`;
|
|
339
|
+
app.all(`${proxyPrefix}/*`, async (c) => {
|
|
340
|
+
const targetUrl = `${pluginUiUrl}${c.req.path.replace(proxyPrefix, "")}`;
|
|
341
|
+
return await fetch(targetUrl, {
|
|
342
|
+
method: c.req.method,
|
|
343
|
+
headers: c.req.header()
|
|
344
|
+
});
|
|
345
|
+
});
|
|
346
|
+
}
|
|
314
347
|
app.get("*", async (c) => {
|
|
315
348
|
const routerModule = await ensureRouterModuleLoaded();
|
|
316
349
|
if (!routerModule) return c.html(renderLoadingShell(clientRuntimeConfig, ssrRouterError), 503);
|
package/dist/host.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"host.cjs","names":["createStitchedRouter","RPCHandler","BatchHandlerPlugin","OpenAPIHandler","OpenAPIReferencePlugin","ZodToJsonSchemaConverter","loadApiPluginsFromRuntimeConfig","loadRouterModule","Hono"],"sources":["../src/host.ts"],"sourcesContent":["import { serve } from \"@hono/node-server\";\nimport { OpenAPIHandler } from \"@orpc/openapi/fetch\";\nimport { OpenAPIReferencePlugin } from \"@orpc/openapi/plugins\";\nimport { RPCHandler } from \"@orpc/server/fetch\";\nimport { BatchHandlerPlugin } from \"@orpc/server/plugins\";\nimport { ZodToJsonSchemaConverter } from \"@orpc/zod/zod4\";\nimport { Hono } from \"hono\";\nimport { cors } from \"hono/cors\";\nimport { secureHeaders } from \"hono/secure-headers\";\nimport {\n createStitchedRouter,\n type LoadedPluginResult,\n type LoadedPluginsResult,\n loadApiPluginsFromRuntimeConfig,\n} from \"./api\";\nimport { loadRouterModule, type RouterModule } from \"./federation.server\";\nimport type { ClientRuntimeConfig, RuntimeConfig } from \"./types\";\n\nexport interface HostServerConfig {\n runtimeConfig: RuntimeConfig;\n configDir: string;\n port?: number;\n}\n\nexport interface HostServerHandle {\n ready: Promise<void>;\n shutdown: () => Promise<void>;\n}\n\nfunction buildClientRuntimeConfig(runtimeConfig: RuntimeConfig): ClientRuntimeConfig {\n return {\n env: runtimeConfig.env,\n account: runtimeConfig.account,\n networkId: runtimeConfig.networkId,\n hostUrl: runtimeConfig.host.url,\n assetsUrl: runtimeConfig.ui.url,\n apiBase: \"/api\",\n rpcBase: \"/api/rpc\",\n authAvailable: !!runtimeConfig.auth,\n repository: runtimeConfig.repository,\n ui: runtimeConfig.ui\n ? {\n name: runtimeConfig.ui.name,\n url: runtimeConfig.ui.url,\n entry: runtimeConfig.ui.entry,\n integrity: runtimeConfig.ui.integrity,\n }\n : undefined,\n api: runtimeConfig.api\n ? {\n name: runtimeConfig.api.name,\n url: runtimeConfig.api.url,\n entry: runtimeConfig.api.entry,\n integrity: runtimeConfig.api.integrity,\n }\n : undefined,\n plugins: runtimeConfig.plugins\n ? Object.fromEntries(\n Object.entries(runtimeConfig.plugins).map(([key, plugin]) => [\n key,\n {\n name: plugin.name,\n url: plugin.url,\n entry: plugin.entry,\n integrity: plugin.integrity,\n },\n ]),\n )\n : undefined,\n };\n}\n\nfunction renderLoadingShell(runtimeConfig: ClientRuntimeConfig, error?: string | null) {\n const bootstrap = `window.__RUNTIME_CONFIG__ = ${JSON.stringify(runtimeConfig)};window.addEventListener('load', function handleEverythingDevHydrate() { window.__hydrate?.(); }, { once: true });`;\n const errorMarkup = error\n ? `<p style=\"color: #fca5a5;\">Error loading UI: ${escapeHtml(error)}</p>`\n : \"<p>Loading UI...</p>\";\n\n const uiIntegrity = runtimeConfig.ui?.integrity;\n const sriAttr = uiIntegrity ? ` integrity=\"${uiIntegrity}\" crossorigin=\"anonymous\"` : \"\";\n\n return `\n\t\t<!DOCTYPE html>\n\t\t<html lang=\"en\">\n\t\t\t<head>\n\t\t\t\t<meta charset=\"utf-8\" />\n\t\t\t\t<meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n\t\t\t\t<title>Loading...</title>\n\t\t\t\t<style>\n\t\t\t\t\tbody { background: #171717; color: #fafafa; display: flex; align-items: center; justify-content: center; height: 100vh; font-family: system-ui; }\n\t\t\t\t\t.fade { animation: fadeIn 0.3s ease-in; text-align: center; padding: 2rem; }\n\t\t\t\t\t@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }\n\t\t\t\t</style>\n\t\t\t\t${runtimeConfig.assetsUrl ? `<script src=\"${runtimeConfig.assetsUrl}/remoteEntry.js\"${sriAttr}></script>` : \"\"}\n\t\t\t\t<script>${bootstrap}</script>\n\t\t\t</head>\n\t\t\t<body>\n\t\t\t\t<div id=\"root\" class=\"fade\">${errorMarkup}</div>\n\t\t\t</body>\n\t\t</html>\n\t`;\n}\n\nfunction escapeHtml(value: string) {\n return value\n .replaceAll(\"&\", \"&\")\n .replaceAll(\"<\", \"<\")\n .replaceAll(\">\", \">\")\n .replaceAll('\"', \""\")\n .replaceAll(\"'\", \"'\");\n}\n\nexport function createHostServer(config: HostServerConfig): HostServerHandle {\n const port = config.port ?? 3000;\n const { runtimeConfig } = config;\n\n let shutdownImpl: (() => Promise<void>) | null = null;\n\n const ready = (async () => {\n const started = await runHostServer({ runtimeConfig, port });\n shutdownImpl = started.shutdown;\n })();\n\n const shutdown = async () => {\n console.log(\"[Host] Shutting down...\");\n const timeout = setTimeout(() => {\n console.log(\"[Host] Force exit\");\n process.exit(0);\n }, 5000);\n await ready.catch(() => {});\n if (shutdownImpl) {\n await shutdownImpl().catch(() => {});\n }\n clearTimeout(timeout);\n console.log(\"[Host] Shutdown complete\");\n };\n\n return { ready, shutdown };\n}\n\nasync function runHostServer(opts: {\n runtimeConfig: RuntimeConfig;\n port: number;\n}): Promise<{ shutdown: () => Promise<void> }> {\n const { runtimeConfig, port } = opts;\n\n let apiPlugins: LoadedPluginResult[] = [];\n let baseApiPlugin: LoadedPluginResult | null = null;\n let apiPluginError: string | null = null;\n let apiPluginLoading: Promise<LoadedPluginsResult | null> | null = null;\n let ssrRouterModule: RouterModule | null = null;\n let ssrRouterError: string | null = null;\n let ssrRouterLoading: Promise<RouterModule | null> | null = null;\n let rpcHandler: RPCHandler<any> | null = null;\n let openApiHandler: OpenAPIHandler<any> | null = null;\n\n const clientRuntimeConfig = buildClientRuntimeConfig(runtimeConfig);\n\n const initApiHandlers = () => {\n const baseRouter = baseApiPlugin?.router ?? {};\n const stitchedRouter = createStitchedRouter(\n baseRouter,\n apiPlugins.filter((plugin) => plugin.key !== \"api\"),\n );\n\n if (!baseApiPlugin) {\n rpcHandler = null;\n openApiHandler = null;\n return;\n }\n\n rpcHandler = new RPCHandler(stitchedRouter as any, {\n plugins: [new BatchHandlerPlugin()],\n });\n openApiHandler = new OpenAPIHandler(stitchedRouter as any, {\n plugins: [\n new OpenAPIReferencePlugin({\n schemaConverters: [new ZodToJsonSchemaConverter()],\n }),\n ],\n });\n };\n\n const ensureApiPluginLoaded = async (): Promise<LoadedPluginsResult | null> => {\n if (apiPlugins.length > 0) return { base: baseApiPlugin, plugins: apiPlugins, errors: [] };\n if (!runtimeConfig.api) return null;\n if (apiPluginLoading) return apiPluginLoading;\n\n apiPluginLoading = loadApiPluginsFromRuntimeConfig(runtimeConfig, process.env as any)\n .then((loaded) => {\n if (loaded) {\n apiPlugins = loaded.plugins;\n baseApiPlugin = loaded.base;\n apiPluginError =\n loaded.errors.length > 0 ? loaded.errors.map((item) => item.error).join(\"; \") : null;\n initApiHandlers();\n }\n return loaded;\n })\n .catch((e) => {\n apiPluginError = e instanceof Error ? e.message : String(e);\n return null;\n })\n .finally(() => {\n apiPluginLoading = null;\n });\n\n return apiPluginLoading;\n };\n\n const ensureRouterModuleLoaded = async (): Promise<RouterModule | null> => {\n if (ssrRouterModule) {\n return ssrRouterModule;\n }\n\n if (ssrRouterLoading) {\n return ssrRouterLoading;\n }\n\n ssrRouterLoading = loadRouterModule(runtimeConfig)\n .then((routerModule) => {\n ssrRouterModule = routerModule;\n ssrRouterError = null;\n return routerModule;\n })\n .catch((error) => {\n ssrRouterError = error instanceof Error ? error.message : String(error);\n return null;\n })\n .finally(() => {\n ssrRouterLoading = null;\n });\n\n return ssrRouterLoading;\n };\n\n // Kick off API plugin load in the background; host should still start even if\n // the remote isn't ready yet.\n void ensureApiPluginLoaded();\n void ensureRouterModuleLoaded();\n\n const app = new Hono();\n\n const corsOrigins = process.env.CORS_ORIGIN?.split(\",\").map((o) => o.trim()) ?? [\n runtimeConfig.host.url,\n ...(runtimeConfig.ui?.url ? [runtimeConfig.ui.url] : []),\n ];\n\n if (!process.env.CORS_ORIGIN && runtimeConfig.env === \"production\") {\n console.warn(\n \"[Security] CORS_ORIGIN is not set in production. Using host and UI URLs as allowed origins.\",\n );\n }\n\n app.use(\n \"/*\",\n cors({\n origin: corsOrigins,\n credentials: true,\n }),\n );\n\n app.use(\"*\", secureHeaders({ crossOriginOpenerPolicy: \"same-origin-allow-popups\" }));\n\n app.get(\"/health\", (c) => c.text(\"OK\"));\n app.get(\"/ready\", async (c) => {\n type Check = {\n name: string;\n url: string;\n required: boolean;\n ok: boolean;\n status?: number;\n latencyMs?: number;\n error?: string;\n };\n\n const probe = async (url: string, timeoutMs = 400): Promise<Check> => {\n const started = Date.now();\n const controller = new AbortController();\n const timer = setTimeout(() => controller.abort(), timeoutMs);\n try {\n const res = await fetch(url, { signal: controller.signal });\n return {\n name: \"\",\n url,\n required: true,\n ok: res.ok,\n status: res.status,\n latencyMs: Date.now() - started,\n };\n } catch (e) {\n return {\n name: \"\",\n url,\n required: true,\n ok: false,\n latencyMs: Date.now() - started,\n error: e instanceof Error ? e.message : String(e),\n };\n } finally {\n clearTimeout(timer);\n }\n };\n\n const checks: Check[] = [];\n\n if (runtimeConfig.ui?.url) {\n const base = runtimeConfig.ui.url.replace(/\\/$/, \"\");\n const manifest = await probe(`${base}/mf-manifest.json`);\n manifest.name = \"ui\";\n // mf-manifest.json is preferred but not always present; fall back to\n // remoteEntry.js for readiness.\n manifest.required = false;\n checks.push(manifest);\n if (!manifest.ok) {\n const remoteEntry = await probe(`${base}/remoteEntry.js`);\n remoteEntry.name = \"ui\";\n remoteEntry.required = true;\n checks.push(remoteEntry);\n } else {\n manifest.required = true;\n }\n }\n\n if (runtimeConfig.ui?.ssrUrl) {\n const base = runtimeConfig.ui.ssrUrl.replace(/\\/$/, \"\");\n const ssr = await probe(`${base}/`);\n ssr.name = \"ui-ssr\";\n ssr.required = false;\n checks.push(ssr);\n }\n\n if (runtimeConfig.api?.url) {\n const base = runtimeConfig.api.url.replace(/\\/$/, \"\");\n const api = await probe(`${base}/`);\n api.name = \"api\";\n api.required = true;\n checks.push(api);\n }\n\n if (runtimeConfig.api) {\n checks.push({\n name: \"api-plugin\",\n url: runtimeConfig.api.entry,\n required: true,\n ok: baseApiPlugin !== null,\n status: baseApiPlugin !== null ? 200 : 503,\n error:\n baseApiPlugin !== null\n ? undefined\n : apiPluginLoading\n ? \"loading\"\n : (apiPluginError ?? \"not loaded\"),\n });\n if (!baseApiPlugin && !apiPluginLoading) {\n void ensureApiPluginLoaded();\n }\n }\n\n for (const [key, plugin] of Object.entries(runtimeConfig.plugins ?? {})) {\n const loaded = apiPlugins.find((item) => item.key === key);\n checks.push({\n name: key,\n url: plugin.entry,\n required: true,\n ok: Boolean(loaded),\n status: loaded ? 200 : 503,\n error: loaded ? undefined : (apiPluginError ?? \"not loaded\"),\n });\n }\n\n const allRequiredOk = checks.filter((x) => x.required).every((x) => x.ok);\n\n return c.json(\n {\n status: allRequiredOk ? \"ready\" : \"not_ready\",\n host: {\n url: runtimeConfig.host.url,\n env: runtimeConfig.env,\n },\n checks,\n timestamp: new Date().toISOString(),\n },\n allRequiredOk ? 200 : 503,\n );\n });\n app.get(\"/api/_health\", (c) =>\n c.json({\n status: \"ready\",\n mode: runtimeConfig.env,\n ui: runtimeConfig.ui?.url ?? null,\n uiSsr: runtimeConfig.ui?.ssrUrl ?? null,\n ssrRouterLoaded: ssrRouterModule !== null,\n ssrRouterLoading: ssrRouterLoading !== null,\n ssrRouterError,\n api: runtimeConfig.api?.url ?? null,\n apiPluginLoaded: baseApiPlugin !== null,\n apiPluginLoading: apiPluginLoading !== null,\n apiPluginError,\n }),\n );\n\n app.all(\"/api/rpc/*\", async (c) => {\n if (!rpcHandler) {\n await ensureApiPluginLoaded();\n }\n if (!rpcHandler) {\n return c.json({ error: \"API plugin not loaded\", detail: apiPluginError }, 503);\n }\n const result = await rpcHandler.handle(c.req.raw, {\n prefix: \"/api/rpc\",\n context: {},\n });\n return result.response\n ? c.newResponse(result.response.body, result.response)\n : c.text(\"Not Found\", 404);\n });\n\n app.all(\"/api/*\", async (c) => {\n if (!openApiHandler) {\n await ensureApiPluginLoaded();\n }\n if (!openApiHandler) {\n return c.json({ error: \"API plugin not loaded\", detail: apiPluginError }, 503);\n }\n const result = await openApiHandler.handle(c.req.raw, {\n prefix: \"/api\",\n context: {},\n });\n return result.response\n ? c.newResponse(result.response.body, result.response)\n : c.text(\"Not Found\", 404);\n });\n\n if (runtimeConfig.ui) {\n app.all(\"/__mf/ui/*\", async (c) => {\n const targetUrl = `${runtimeConfig.ui!.url}${c.req.path.replace(\"/__mf/ui\", \"\")}`;\n const response = await fetch(targetUrl, {\n method: c.req.method,\n headers: c.req.header(),\n });\n return response;\n });\n\n if (runtimeConfig.ui.ssrUrl) {\n app.all(\"/__mf/ui/ssr/*\", async (c) => {\n const targetUrl = `${runtimeConfig.ui!.ssrUrl}${c.req.path.replace(\"/__mf/ui/ssr\", \"\")}`;\n const response = await fetch(targetUrl, {\n method: c.req.method,\n headers: c.req.header(),\n });\n return response;\n });\n }\n }\n\n app.get(\"*\", async (c) => {\n const routerModule = await ensureRouterModuleLoaded();\n\n if (!routerModule) {\n return c.html(renderLoadingShell(clientRuntimeConfig, ssrRouterError), 503);\n }\n\n try {\n const apiClient = baseApiPlugin?.createClient();\n\n const result = await routerModule.renderToStream(c.req.raw, {\n assetsUrl: runtimeConfig.ui.url,\n runtimeConfig: clientRuntimeConfig,\n apiClient,\n });\n\n return new Response(result.stream, {\n status: result.statusCode,\n headers: result.headers,\n });\n } catch (error) {\n const message = error instanceof Error ? error.message : String(error);\n return c.html(renderLoadingShell(clientRuntimeConfig, message), 500);\n }\n });\n\n const hostname = process.env.HOST ?? \"0.0.0.0\";\n let resolveReady: (() => void) | null = null;\n const ready = new Promise<void>((resolve) => {\n resolveReady = resolve;\n });\n\n const proxiedFetch = (req: Request): Response | Promise<Response> => {\n const url = new URL(req.url);\n const forwardedProto = req.headers.get(\"x-forwarded-proto\");\n const forwardedHost = req.headers.get(\"x-forwarded-host\");\n\n if (forwardedProto) {\n url.protocol = forwardedProto;\n }\n if (forwardedHost) {\n url.host = forwardedHost;\n }\n\n if (forwardedProto || forwardedHost) {\n req = new Request(url, req);\n }\n\n return app.fetch(req);\n };\n\n const server = serve({ fetch: proxiedFetch, port, hostname }, (info) => {\n console.log(`[Host] Server running at http://${hostname}:${info.port}`);\n console.log(`[Host] API: http://${hostname}:${info.port}/api/rpc`);\n resolveReady?.();\n });\n\n await ready;\n\n return {\n shutdown: () =>\n new Promise<void>((resolve) => {\n try {\n server.close(() => resolve());\n } catch {\n resolve();\n }\n }),\n };\n}\n\nexport { runHostServer };\n"],"mappings":";;;;;;;;;;;;;;;AA6BA,SAAS,yBAAyB,eAAmD;AACnF,QAAO;EACL,KAAK,cAAc;EACnB,SAAS,cAAc;EACvB,WAAW,cAAc;EACzB,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enAPIReferencePlugin","ZodToJsonSchemaConverter","loadApiPluginsFromRuntimeConfig","loadRouterModule","Hono"],"sources":["../src/host.ts"],"sourcesContent":["import { serve } from \"@hono/node-server\";\nimport { OpenAPIHandler } from \"@orpc/openapi/fetch\";\nimport { OpenAPIReferencePlugin } from \"@orpc/openapi/plugins\";\nimport { RPCHandler } from \"@orpc/server/fetch\";\nimport { BatchHandlerPlugin } from \"@orpc/server/plugins\";\nimport { ZodToJsonSchemaConverter } from \"@orpc/zod/zod4\";\nimport { Hono } from \"hono\";\nimport { cors } from \"hono/cors\";\nimport { secureHeaders } from \"hono/secure-headers\";\nimport {\n createStitchedRouter,\n type LoadedPluginResult,\n type LoadedPluginsResult,\n loadApiPluginsFromRuntimeConfig,\n} from \"./api\";\nimport { loadRouterModule, type RouterModule } from \"./federation.server\";\nimport type { ClientRuntimeConfig, RuntimeConfig } from \"./types\";\n\nexport interface HostServerConfig {\n runtimeConfig: RuntimeConfig;\n configDir: string;\n port?: number;\n}\n\nexport interface HostServerHandle {\n ready: Promise<void>;\n shutdown: () => Promise<void>;\n}\n\nfunction buildClientRuntimeConfig(runtimeConfig: RuntimeConfig): ClientRuntimeConfig {\n return {\n env: runtimeConfig.env,\n account: runtimeConfig.account,\n networkId: runtimeConfig.networkId,\n hostUrl: runtimeConfig.host.url,\n assetsUrl: runtimeConfig.ui.url,\n apiBase: \"/api\",\n rpcBase: \"/api/rpc\",\n authAvailable: !!runtimeConfig.auth,\n repository: runtimeConfig.repository,\n ui: runtimeConfig.ui\n ? {\n name: runtimeConfig.ui.name,\n url: runtimeConfig.ui.url,\n entry: runtimeConfig.ui.entry,\n integrity: runtimeConfig.ui.integrity,\n }\n : undefined,\n api: runtimeConfig.api\n ? {\n name: runtimeConfig.api.name,\n url: runtimeConfig.api.url,\n entry: runtimeConfig.api.entry,\n integrity: runtimeConfig.api.integrity,\n }\n : undefined,\n auth: runtimeConfig.auth\n ? {\n name: runtimeConfig.auth.name,\n url: runtimeConfig.auth.url,\n entry: runtimeConfig.auth.entry,\n integrity: runtimeConfig.auth.integrity,\n sidebar: runtimeConfig.auth.sidebar,\n }\n : undefined,\n plugins: runtimeConfig.plugins\n ? Object.fromEntries(\n Object.entries(runtimeConfig.plugins).map(([key, plugin]) => [\n key,\n {\n name: plugin.name,\n url: plugin.url,\n entry: plugin.entry,\n integrity: plugin.integrity,\n ...(plugin.ui\n ? {\n ui: {\n name: plugin.ui.name,\n url: plugin.ui.url,\n entry: plugin.ui.entry,\n source: plugin.ui.source,\n integrity: plugin.ui.integrity,\n },\n }\n : {}),\n ...(plugin.sidebar ? { sidebar: plugin.sidebar } : {}),\n },\n ]),\n )\n : undefined,\n };\n}\n\nfunction renderLoadingShell(runtimeConfig: ClientRuntimeConfig, error?: string | null) {\n const bootstrap = `window.__RUNTIME_CONFIG__ = ${JSON.stringify(runtimeConfig)};window.addEventListener('load', function handleEverythingDevHydrate() { window.__hydrate?.(); }, { once: true });`;\n const errorMarkup = error\n ? `<p style=\"color: #fca5a5;\">Error loading UI: ${escapeHtml(error)}</p>`\n : \"<p>Loading UI...</p>\";\n\n const uiIntegrity = runtimeConfig.ui?.integrity;\n const sriAttr = uiIntegrity ? ` integrity=\"${uiIntegrity}\" crossorigin=\"anonymous\"` : \"\";\n\n const pluginUiScripts = Object.values(runtimeConfig.plugins ?? {})\n .filter((plugin) => plugin.ui?.url && plugin.ui.source === \"remote\")\n .map((plugin) => {\n const uiIntegrity = plugin.ui!.integrity;\n const sri = uiIntegrity ? ` integrity=\"${uiIntegrity}\" crossorigin=\"anonymous\"` : \"\";\n return `<script src=\"${plugin.ui!.url}/remoteEntry.js\"${sri}></script>`;\n })\n .join(\"\\n\");\n\n return `\n\t\t<!DOCTYPE html>\n\t\t<html lang=\"en\">\n\t\t\t<head>\n\t\t\t\t<meta charset=\"utf-8\" />\n\t\t\t\t<meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n\t\t\t\t<title>Loading...</title>\n\t\t\t\t<style>\n\t\t\t\t\tbody { background: #171717; color: #fafafa; display: flex; align-items: center; justify-content: center; height: 100vh; font-family: system-ui; }\n\t\t\t\t\t.fade { animation: fadeIn 0.3s ease-in; text-align: center; padding: 2rem; }\n\t\t\t\t\t@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }\n\t\t\t\t</style>\n\t\t\t\t${runtimeConfig.assetsUrl ? `<script src=\"${runtimeConfig.assetsUrl}/remoteEntry.js\"${sriAttr}></script>` : \"\"}\n\t\t\t\t${pluginUiScripts}\n\t\t\t\t<script>${bootstrap}</script>\n\t\t\t</head>\n\t\t\t<body>\n\t\t\t\t<div id=\"root\" class=\"fade\">${errorMarkup}</div>\n\t\t\t</body>\n\t\t</html>\n\t`;\n}\n\nfunction escapeHtml(value: string) {\n return value\n .replaceAll(\"&\", \"&\")\n .replaceAll(\"<\", \"<\")\n .replaceAll(\">\", \">\")\n .replaceAll('\"', \""\")\n .replaceAll(\"'\", \"'\");\n}\n\nexport function createHostServer(config: HostServerConfig): HostServerHandle {\n const port = config.port ?? 3000;\n const { runtimeConfig } = config;\n\n let shutdownImpl: (() => Promise<void>) | null = null;\n\n const ready = (async () => {\n const started = await runHostServer({ runtimeConfig, port });\n shutdownImpl = started.shutdown;\n })();\n\n const shutdown = async () => {\n console.log(\"[Host] Shutting down...\");\n const timeout = setTimeout(() => {\n console.log(\"[Host] Force exit\");\n process.exit(0);\n }, 5000);\n await ready.catch(() => {});\n if (shutdownImpl) {\n await shutdownImpl().catch(() => {});\n }\n clearTimeout(timeout);\n console.log(\"[Host] Shutdown complete\");\n };\n\n return { ready, shutdown };\n}\n\nasync function runHostServer(opts: {\n runtimeConfig: RuntimeConfig;\n port: number;\n}): Promise<{ shutdown: () => Promise<void> }> {\n const { runtimeConfig, port } = opts;\n\n let apiPlugins: LoadedPluginResult[] = [];\n let baseApiPlugin: LoadedPluginResult | null = null;\n let apiPluginError: string | null = null;\n let apiPluginLoading: Promise<LoadedPluginsResult | null> | null = null;\n let ssrRouterModule: RouterModule | null = null;\n let ssrRouterError: string | null = null;\n let ssrRouterLoading: Promise<RouterModule | null> | null = null;\n let rpcHandler: RPCHandler<any> | null = null;\n let openApiHandler: OpenAPIHandler<any> | null = null;\n\n const clientRuntimeConfig = buildClientRuntimeConfig(runtimeConfig);\n\n const initApiHandlers = () => {\n const baseRouter = baseApiPlugin?.router ?? {};\n const stitchedRouter = createStitchedRouter(\n baseRouter,\n apiPlugins.filter((plugin) => plugin.key !== \"api\"),\n );\n\n if (!baseApiPlugin) {\n rpcHandler = null;\n openApiHandler = null;\n return;\n }\n\n rpcHandler = new RPCHandler(stitchedRouter as any, {\n plugins: [new BatchHandlerPlugin()],\n });\n openApiHandler = new OpenAPIHandler(stitchedRouter as any, {\n plugins: [\n new OpenAPIReferencePlugin({\n schemaConverters: [new ZodToJsonSchemaConverter()],\n }),\n ],\n });\n };\n\n const ensureApiPluginLoaded = async (): Promise<LoadedPluginsResult | null> => {\n if (apiPlugins.length > 0) return { base: baseApiPlugin, plugins: apiPlugins, errors: [] };\n if (!runtimeConfig.api) return null;\n if (apiPluginLoading) return apiPluginLoading;\n\n apiPluginLoading = loadApiPluginsFromRuntimeConfig(runtimeConfig, process.env as any)\n .then((loaded) => {\n if (loaded) {\n apiPlugins = loaded.plugins;\n baseApiPlugin = loaded.base;\n apiPluginError =\n loaded.errors.length > 0 ? loaded.errors.map((item) => item.error).join(\"; \") : null;\n initApiHandlers();\n }\n return loaded;\n })\n .catch((e) => {\n apiPluginError = e instanceof Error ? e.message : String(e);\n return null;\n })\n .finally(() => {\n apiPluginLoading = null;\n });\n\n return apiPluginLoading;\n };\n\n const ensureRouterModuleLoaded = async (): Promise<RouterModule | null> => {\n if (ssrRouterModule) {\n return ssrRouterModule;\n }\n\n if (ssrRouterLoading) {\n return ssrRouterLoading;\n }\n\n ssrRouterLoading = loadRouterModule(runtimeConfig)\n .then((routerModule) => {\n ssrRouterModule = routerModule;\n ssrRouterError = null;\n return routerModule;\n })\n .catch((error) => {\n ssrRouterError = error instanceof Error ? error.message : String(error);\n return null;\n })\n .finally(() => {\n ssrRouterLoading = null;\n });\n\n return ssrRouterLoading;\n };\n\n // Kick off API plugin load in the background; host should still start even if\n // the remote isn't ready yet.\n void ensureApiPluginLoaded();\n void ensureRouterModuleLoaded();\n\n const app = new Hono();\n\n const corsOrigins = process.env.CORS_ORIGIN?.split(\",\").map((o) => o.trim()) ?? [\n runtimeConfig.host.url,\n ...(runtimeConfig.ui?.url ? [runtimeConfig.ui.url] : []),\n ];\n\n if (!process.env.CORS_ORIGIN && runtimeConfig.env === \"production\") {\n console.warn(\n \"[Security] CORS_ORIGIN is not set in production. Using host and UI URLs as allowed origins.\",\n );\n }\n\n app.use(\n \"/*\",\n cors({\n origin: corsOrigins,\n credentials: true,\n }),\n );\n\n app.use(\"*\", secureHeaders({ crossOriginOpenerPolicy: \"same-origin-allow-popups\" }));\n\n app.get(\"/health\", (c) => c.text(\"OK\"));\n app.get(\"/ready\", async (c) => {\n type Check = {\n name: string;\n url: string;\n required: boolean;\n ok: boolean;\n status?: number;\n latencyMs?: number;\n error?: string;\n };\n\n const probe = async (url: string, timeoutMs = 400): Promise<Check> => {\n const started = Date.now();\n const controller = new AbortController();\n const timer = setTimeout(() => controller.abort(), timeoutMs);\n try {\n const res = await fetch(url, { signal: controller.signal });\n return {\n name: \"\",\n url,\n required: true,\n ok: res.ok,\n status: res.status,\n latencyMs: Date.now() - started,\n };\n } catch (e) {\n return {\n name: \"\",\n url,\n required: true,\n ok: false,\n latencyMs: Date.now() - started,\n error: e instanceof Error ? e.message : String(e),\n };\n } finally {\n clearTimeout(timer);\n }\n };\n\n const checks: Check[] = [];\n\n if (runtimeConfig.ui?.url) {\n const base = runtimeConfig.ui.url.replace(/\\/$/, \"\");\n const manifest = await probe(`${base}/mf-manifest.json`);\n manifest.name = \"ui\";\n // mf-manifest.json is preferred but not always present; fall back to\n // remoteEntry.js for readiness.\n manifest.required = false;\n checks.push(manifest);\n if (!manifest.ok) {\n const remoteEntry = await probe(`${base}/remoteEntry.js`);\n remoteEntry.name = \"ui\";\n remoteEntry.required = true;\n checks.push(remoteEntry);\n } else {\n manifest.required = true;\n }\n }\n\n if (runtimeConfig.ui?.ssrUrl) {\n const base = runtimeConfig.ui.ssrUrl.replace(/\\/$/, \"\");\n const ssr = await probe(`${base}/`);\n ssr.name = \"ui-ssr\";\n ssr.required = false;\n checks.push(ssr);\n }\n\n if (runtimeConfig.api?.url) {\n const base = runtimeConfig.api.url.replace(/\\/$/, \"\");\n const api = await probe(`${base}/`);\n api.name = \"api\";\n api.required = true;\n checks.push(api);\n }\n\n if (runtimeConfig.api) {\n checks.push({\n name: \"api-plugin\",\n url: runtimeConfig.api.entry,\n required: true,\n ok: baseApiPlugin !== null,\n status: baseApiPlugin !== null ? 200 : 503,\n error:\n baseApiPlugin !== null\n ? undefined\n : apiPluginLoading\n ? \"loading\"\n : (apiPluginError ?? \"not loaded\"),\n });\n if (!baseApiPlugin && !apiPluginLoading) {\n void ensureApiPluginLoaded();\n }\n }\n\n for (const [key, plugin] of Object.entries(runtimeConfig.plugins ?? {})) {\n const loaded = apiPlugins.find((item) => item.key === key);\n checks.push({\n name: key,\n url: plugin.entry,\n required: true,\n ok: Boolean(loaded),\n status: loaded ? 200 : 503,\n error: loaded ? undefined : (apiPluginError ?? \"not loaded\"),\n });\n }\n\n const allRequiredOk = checks.filter((x) => x.required).every((x) => x.ok);\n\n return c.json(\n {\n status: allRequiredOk ? \"ready\" : \"not_ready\",\n host: {\n url: runtimeConfig.host.url,\n env: runtimeConfig.env,\n },\n checks,\n timestamp: new Date().toISOString(),\n },\n allRequiredOk ? 200 : 503,\n );\n });\n app.get(\"/api/_health\", (c) =>\n c.json({\n status: \"ready\",\n mode: runtimeConfig.env,\n ui: runtimeConfig.ui?.url ?? null,\n uiSsr: runtimeConfig.ui?.ssrUrl ?? null,\n ssrRouterLoaded: ssrRouterModule !== null,\n ssrRouterLoading: ssrRouterLoading !== null,\n ssrRouterError,\n api: runtimeConfig.api?.url ?? null,\n apiPluginLoaded: baseApiPlugin !== null,\n apiPluginLoading: apiPluginLoading !== null,\n apiPluginError,\n }),\n );\n\n app.all(\"/api/rpc/*\", async (c) => {\n if (!rpcHandler) {\n await ensureApiPluginLoaded();\n }\n if (!rpcHandler) {\n return c.json({ error: \"API plugin not loaded\", detail: apiPluginError }, 503);\n }\n const result = await rpcHandler.handle(c.req.raw, {\n prefix: \"/api/rpc\",\n context: {},\n });\n return result.response\n ? c.newResponse(result.response.body, result.response)\n : c.text(\"Not Found\", 404);\n });\n\n app.all(\"/api/*\", async (c) => {\n if (!openApiHandler) {\n await ensureApiPluginLoaded();\n }\n if (!openApiHandler) {\n return c.json({ error: \"API plugin not loaded\", detail: apiPluginError }, 503);\n }\n const result = await openApiHandler.handle(c.req.raw, {\n prefix: \"/api\",\n context: {},\n });\n return result.response\n ? c.newResponse(result.response.body, result.response)\n : c.text(\"Not Found\", 404);\n });\n\n if (runtimeConfig.ui) {\n app.all(\"/__mf/ui/*\", async (c) => {\n const targetUrl = `${runtimeConfig.ui!.url}${c.req.path.replace(\"/__mf/ui\", \"\")}`;\n const response = await fetch(targetUrl, {\n method: c.req.method,\n headers: c.req.header(),\n });\n return response;\n });\n\n if (runtimeConfig.ui.ssrUrl) {\n app.all(\"/__mf/ui/ssr/*\", async (c) => {\n const targetUrl = `${runtimeConfig.ui!.ssrUrl}${c.req.path.replace(\"/__mf/ui/ssr\", \"\")}`;\n const response = await fetch(targetUrl, {\n method: c.req.method,\n headers: c.req.header(),\n });\n return response;\n });\n }\n }\n\n for (const [pluginKey, pluginConfig] of Object.entries(runtimeConfig.plugins ?? {})) {\n if (!pluginConfig.ui?.url) continue;\n const pluginUiUrl = pluginConfig.ui.url;\n const proxyPrefix = `/__mf/plugin-ui/${pluginKey}`;\n app.all(`${proxyPrefix}/*`, async (c) => {\n const targetUrl = `${pluginUiUrl}${c.req.path.replace(proxyPrefix, \"\")}`;\n const response = await fetch(targetUrl, {\n method: c.req.method,\n headers: c.req.header(),\n });\n return response;\n });\n }\n\n app.get(\"*\", async (c) => {\n const routerModule = await ensureRouterModuleLoaded();\n\n if (!routerModule) {\n return c.html(renderLoadingShell(clientRuntimeConfig, ssrRouterError), 503);\n }\n\n try {\n const apiClient = baseApiPlugin?.createClient();\n\n const result = await routerModule.renderToStream(c.req.raw, {\n assetsUrl: runtimeConfig.ui.url,\n runtimeConfig: clientRuntimeConfig,\n apiClient,\n });\n\n return new Response(result.stream, {\n status: result.statusCode,\n headers: result.headers,\n });\n } catch (error) {\n const message = error instanceof Error ? error.message : String(error);\n return c.html(renderLoadingShell(clientRuntimeConfig, message), 500);\n }\n });\n\n const hostname = process.env.HOST ?? \"0.0.0.0\";\n let resolveReady: (() => void) | null = null;\n const ready = new Promise<void>((resolve) => {\n resolveReady = resolve;\n });\n\n const proxiedFetch = (req: Request): Response | Promise<Response> => {\n const url = new URL(req.url);\n const forwardedProto = req.headers.get(\"x-forwarded-proto\");\n const forwardedHost = req.headers.get(\"x-forwarded-host\");\n\n if (forwardedProto) {\n url.protocol = forwardedProto;\n }\n if (forwardedHost) {\n url.host = forwardedHost;\n }\n\n if (forwardedProto || forwardedHost) {\n req = new Request(url, req);\n }\n\n return app.fetch(req);\n };\n\n const server = serve({ fetch: proxiedFetch, port, hostname }, (info) => {\n console.log(`[Host] Server running at http://${hostname}:${info.port}`);\n console.log(`[Host] API: http://${hostname}:${info.port}/api/rpc`);\n resolveReady?.();\n });\n\n await ready;\n\n return {\n shutdown: () =>\n new Promise<void>((resolve) => {\n try {\n server.close(() => resolve());\n } catch {\n resolve();\n }\n }),\n };\n}\n\nexport { runHostServer };\n"],"mappings":";;;;;;;;;;;;;;;AA6BA,SAAS,yBAAyB,eAAmD;AACnF,QAAO;EACL,KAAK,cAAc;EACnB,SAAS,cAAc;EACvB,WAAW,cAAc;EACzB,SAAS,cAAc,KAAK;EAC5B,WAAW,cAAc,GAAG;EAC5B,SAAS;EACT,SAAS;EACT,eAAe,CAAC,CAAC,cAAc;E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,SAAS,OAAO;IACjB,CAAC;WACK,OAAO;GACd,MAAM,UAAU,iBAAiB,QAAQ,MAAM,UAAU,OAAO,MAAM;AACtE,UAAO,EAAE,KAAK,mBAAmB,qBAAqB,QAAQ,EAAE,IAAI;;GAEtE;CAEF,MAAM,WAAW,QAAQ,IAAI,QAAQ;CACrC,IAAI,eAAoC;CACxC,MAAM,QAAQ,IAAI,SAAe,YAAY;AAC3C,iBAAe;GACf;CAEF,MAAM,gBAAgB,QAA+C;EACnE,MAAM,MAAM,IAAI,IAAI,IAAI,IAAI;EAC5B,MAAM,iBAAiB,IAAI,QAAQ,IAAI,oBAAoB;EAC3D,MAAM,gBAAgB,IAAI,QAAQ,IAAI,mBAAmB;AAEzD,MAAI,eACF,KAAI,WAAW;AAEjB,MAAI,cACF,KAAI,OAAO;AAGb,MAAI,kBAAkB,cACpB,OAAM,IAAI,QAAQ,KAAK,IAAI;AAG7B,SAAO,IAAI,MAAM,IAAI;;CAGvB,MAAM,sCAAe;EAAE,OAAO;EAAc;EAAM;EAAU,GAAG,SAAS;AACtE,UAAQ,IAAI,mCAAmC,SAAS,GAAG,KAAK,OAAO;AACvE,UAAQ,IAAI,sBAAsB,SAAS,GAAG,KAAK,KAAK,UAAU;AAClE,kBAAgB;GAChB;AAEF,OAAM;AAEN,QAAO,EACL,gBACE,IAAI,SAAe,YAAY;AAC7B,MAAI;AACF,UAAO,YAAY,SAAS,CAAC;UACvB;AACN,YAAS;;GAEX,EACL"}
|
package/dist/host.d.cts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"host.d.cts","names":[],"sources":["../src/host.ts"],"mappings":";;;UAkBiB,gBAAA;EACf,aAAA,EAAe,aAAA;EACf,SAAA;EACA,IAAA;AAAA;AAAA,UAGe,gBAAA;EACf,KAAA,EAAO,OAAA;EACP,QAAA,QAAgB,OAAA;AAAA;AAAA,
|
|
1
|
+
{"version":3,"file":"host.d.cts","names":[],"sources":["../src/host.ts"],"mappings":";;;UAkBiB,gBAAA;EACf,aAAA,EAAe,aAAA;EACf,SAAA;EACA,IAAA;AAAA;AAAA,UAGe,gBAAA;EACf,KAAA,EAAO,OAAA;EACP,QAAA,QAAgB,OAAA;AAAA;AAAA,iBAqHF,gBAAA,CAAiB,MAAA,EAAQ,gBAAA,GAAmB,gBAAA;AAAA,iBA4B7C,aAAA,CAAc,IAAA;EAC3B,aAAA,EAAe,aAAA;EACf,IAAA;AAAA,IACE,OAAA;EAAU,QAAA,QAAgB,OAAA;AAAA"}
|
package/dist/host.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"host.d.mts","names":[],"sources":["../src/host.ts"],"mappings":";;;UAkBiB,gBAAA;EACf,aAAA,EAAe,aAAA;EACf,SAAA;EACA,IAAA;AAAA;AAAA,UAGe,gBAAA;EACf,KAAA,EAAO,OAAA;EACP,QAAA,QAAgB,OAAA;AAAA;AAAA,
|
|
1
|
+
{"version":3,"file":"host.d.mts","names":[],"sources":["../src/host.ts"],"mappings":";;;UAkBiB,gBAAA;EACf,aAAA,EAAe,aAAA;EACf,SAAA;EACA,IAAA;AAAA;AAAA,UAGe,gBAAA;EACf,KAAA,EAAO,OAAA;EACP,QAAA,QAAgB,OAAA;AAAA;AAAA,iBAqHF,gBAAA,CAAiB,MAAA,EAAQ,gBAAA,GAAmB,gBAAA;AAAA,iBA4B7C,aAAA,CAAc,IAAA;EAC3B,aAAA,EAAe,aAAA;EACf,IAAA;AAAA,IACE,OAAA;EAAU,QAAA,QAAgB,OAAA;AAAA"}
|