@malloy-publisher/server 0.0.162 → 0.0.167
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/dist/app/api-doc.yaml +185 -0
- package/dist/app/assets/HomePage-D76UaGFV.js +1 -0
- package/dist/app/assets/{MainPage-CzAy2LSX.js → MainPage-C9Fr5IN8.js} +1 -1
- package/dist/app/assets/{ModelPage-uZf0eDBu.js → ModelPage-BkU6HAHA.js} +1 -1
- package/dist/app/assets/PackagePage-BhE9Wi7b.js +1 -0
- package/dist/app/assets/ProjectPage-BatZLVap.js +1 -0
- package/dist/app/assets/RouteError-Bo5zJ8Xa.js +1 -0
- package/dist/app/assets/{WorkbookPage-CBJ0x84n.js → WorkbookPage-D3rUQZj6.js} +1 -1
- package/dist/app/assets/{index-BoduKqUa.js → index-BLxl0XLH.js} +104 -104
- package/dist/app/assets/{index-Bl1fe3A7.js → index-hkABoiMV.js} +1 -1
- package/dist/app/assets/{index-D_8e14NE.js → index-lhDwptrQ.js} +1 -1
- package/dist/app/assets/{index.umd-DRsjT6d4.js → index.umd-BkXQ-YAe.js} +1 -1
- package/dist/app/index.html +1 -1
- package/dist/instrumentation.js +90007 -92610
- package/dist/server.js +197328 -106265
- package/k6-tests/load-test/load-test.ts +30 -0
- package/package.json +2 -1
- package/src/controller/compile.controller.ts +35 -0
- package/src/controller/model.controller.ts +20 -9
- package/src/health.ts +189 -0
- package/src/instrumentation.ts +123 -34
- package/src/logger.ts +9 -1
- package/src/server.ts +86 -3
- package/src/service/connection.spec.ts +1226 -0
- package/src/service/connection.ts +114 -12
- package/src/service/db_utils.ts +19 -41
- package/src/service/gcs_s3_utils.ts +115 -40
- package/src/service/model.spec.ts +5 -5
- package/src/service/model.ts +61 -24
- package/src/service/project.ts +120 -1
- package/src/service/project_compile.spec.ts +197 -0
- package/src/service/project_store.ts +54 -21
- package/src/storage/StorageManager.ts +4 -3
- package/src/storage/duckdb/schema.ts +6 -5
- package/tests/harness/e2e.ts +4 -0
- package/tests/harness/mcp_test_setup.ts +6 -2
- package/dist/app/assets/HomePage-CgSTNEQW.js +0 -1
- package/dist/app/assets/PackagePage-BHvPFsmZ.js +0 -1
- package/dist/app/assets/ProjectPage-ndnv5nGp.js +0 -1
- package/dist/app/assets/RouteError-CZC9OOKh.js +0 -1
package/dist/app/api-doc.yaml
CHANGED
|
@@ -70,6 +70,8 @@ paths:
|
|
|
70
70
|
application/json:
|
|
71
71
|
schema:
|
|
72
72
|
$ref: "#/components/schemas/ServerStatus"
|
|
73
|
+
"503":
|
|
74
|
+
$ref: "#/components/responses/ServiceUnavailable"
|
|
73
75
|
|
|
74
76
|
/projects:
|
|
75
77
|
get:
|
|
@@ -94,6 +96,8 @@ paths:
|
|
|
94
96
|
$ref: "#/components/responses/Unauthorized"
|
|
95
97
|
"500":
|
|
96
98
|
$ref: "#/components/responses/InternalServerError"
|
|
99
|
+
"503":
|
|
100
|
+
$ref: "#/components/responses/ServiceUnavailable"
|
|
97
101
|
post:
|
|
98
102
|
tags:
|
|
99
103
|
- projects
|
|
@@ -120,6 +124,8 @@ paths:
|
|
|
120
124
|
$ref: "#/components/responses/Unauthorized"
|
|
121
125
|
"500":
|
|
122
126
|
$ref: "#/components/responses/InternalServerError"
|
|
127
|
+
"503":
|
|
128
|
+
$ref: "#/components/responses/ServiceUnavailable"
|
|
123
129
|
|
|
124
130
|
/projects/{projectName}:
|
|
125
131
|
get:
|
|
@@ -157,6 +163,8 @@ paths:
|
|
|
157
163
|
$ref: "#/components/responses/NotFound"
|
|
158
164
|
"500":
|
|
159
165
|
$ref: "#/components/responses/InternalServerError"
|
|
166
|
+
"503":
|
|
167
|
+
$ref: "#/components/responses/ServiceUnavailable"
|
|
160
168
|
patch:
|
|
161
169
|
tags:
|
|
162
170
|
- projects
|
|
@@ -190,6 +198,8 @@ paths:
|
|
|
190
198
|
$ref: "#/components/responses/Unauthorized"
|
|
191
199
|
"500":
|
|
192
200
|
$ref: "#/components/responses/InternalServerError"
|
|
201
|
+
"503":
|
|
202
|
+
$ref: "#/components/responses/ServiceUnavailable"
|
|
193
203
|
delete:
|
|
194
204
|
tags:
|
|
195
205
|
- projects
|
|
@@ -219,6 +229,8 @@ paths:
|
|
|
219
229
|
$ref: "#/components/responses/NotFound"
|
|
220
230
|
"500":
|
|
221
231
|
$ref: "#/components/responses/InternalServerError"
|
|
232
|
+
"503":
|
|
233
|
+
$ref: "#/components/responses/ServiceUnavailable"
|
|
222
234
|
|
|
223
235
|
/projects/{projectName}/connections:
|
|
224
236
|
get:
|
|
@@ -250,6 +262,8 @@ paths:
|
|
|
250
262
|
$ref: "#/components/responses/Unauthorized"
|
|
251
263
|
"500":
|
|
252
264
|
$ref: "#/components/responses/InternalServerError"
|
|
265
|
+
"503":
|
|
266
|
+
$ref: "#/components/responses/ServiceUnavailable"
|
|
253
267
|
|
|
254
268
|
/projects/{projectName}/connections/{connectionName}:
|
|
255
269
|
get:
|
|
@@ -287,6 +301,8 @@ paths:
|
|
|
287
301
|
$ref: "#/components/responses/NotFound"
|
|
288
302
|
"500":
|
|
289
303
|
$ref: "#/components/responses/InternalServerError"
|
|
304
|
+
"503":
|
|
305
|
+
$ref: "#/components/responses/ServiceUnavailable"
|
|
290
306
|
post:
|
|
291
307
|
tags:
|
|
292
308
|
- connections
|
|
@@ -340,6 +356,8 @@ paths:
|
|
|
340
356
|
$ref: "#/components/responses/Unauthorized"
|
|
341
357
|
"500":
|
|
342
358
|
$ref: "#/components/responses/InternalServerError"
|
|
359
|
+
"503":
|
|
360
|
+
$ref: "#/components/responses/ServiceUnavailable"
|
|
343
361
|
patch:
|
|
344
362
|
tags:
|
|
345
363
|
- connections
|
|
@@ -399,6 +417,8 @@ paths:
|
|
|
399
417
|
$ref: "#/components/responses/Unauthorized"
|
|
400
418
|
"500":
|
|
401
419
|
$ref: "#/components/responses/InternalServerError"
|
|
420
|
+
"503":
|
|
421
|
+
$ref: "#/components/responses/ServiceUnavailable"
|
|
402
422
|
delete:
|
|
403
423
|
tags:
|
|
404
424
|
- connections
|
|
@@ -435,6 +455,8 @@ paths:
|
|
|
435
455
|
$ref: "#/components/responses/Unauthorized"
|
|
436
456
|
"500":
|
|
437
457
|
$ref: "#/components/responses/InternalServerError"
|
|
458
|
+
"503":
|
|
459
|
+
$ref: "#/components/responses/ServiceUnavailable"
|
|
438
460
|
|
|
439
461
|
/projects/{projectName}/connections/{connectionName}/schemas:
|
|
440
462
|
get:
|
|
@@ -474,6 +496,8 @@ paths:
|
|
|
474
496
|
$ref: "#/components/responses/NotFound"
|
|
475
497
|
"500":
|
|
476
498
|
$ref: "#/components/responses/InternalServerError"
|
|
499
|
+
"503":
|
|
500
|
+
$ref: "#/components/responses/ServiceUnavailable"
|
|
477
501
|
|
|
478
502
|
/projects/{projectName}/connections/{connectionName}/schemas/{schemaName}/tables:
|
|
479
503
|
get:
|
|
@@ -519,6 +543,8 @@ paths:
|
|
|
519
543
|
$ref: "#/components/responses/NotFound"
|
|
520
544
|
"500":
|
|
521
545
|
$ref: "#/components/responses/InternalServerError"
|
|
546
|
+
"503":
|
|
547
|
+
$ref: "#/components/responses/ServiceUnavailable"
|
|
522
548
|
|
|
523
549
|
/projects/{projectName}/connections/{connectionName}/schemas/{schemaName}/tables/{tablePath}:
|
|
524
550
|
get:
|
|
@@ -569,6 +595,8 @@ paths:
|
|
|
569
595
|
$ref: "#/components/responses/NotFound"
|
|
570
596
|
"500":
|
|
571
597
|
$ref: "#/components/responses/InternalServerError"
|
|
598
|
+
"503":
|
|
599
|
+
$ref: "#/components/responses/ServiceUnavailable"
|
|
572
600
|
|
|
573
601
|
# TODO: Remove this endpoint.
|
|
574
602
|
/projects/{projectName}/connections/{connectionName}/sqlSource:
|
|
@@ -616,6 +644,8 @@ paths:
|
|
|
616
644
|
$ref: "#/components/responses/NotFound"
|
|
617
645
|
"500":
|
|
618
646
|
$ref: "#/components/responses/InternalServerError"
|
|
647
|
+
"503":
|
|
648
|
+
$ref: "#/components/responses/ServiceUnavailable"
|
|
619
649
|
|
|
620
650
|
post:
|
|
621
651
|
tags:
|
|
@@ -661,6 +691,8 @@ paths:
|
|
|
661
691
|
$ref: "#/components/responses/NotFound"
|
|
662
692
|
"500":
|
|
663
693
|
$ref: "#/components/responses/InternalServerError"
|
|
694
|
+
"503":
|
|
695
|
+
$ref: "#/components/responses/ServiceUnavailable"
|
|
664
696
|
|
|
665
697
|
/projects/{projectName}/connections/{connectionName}/sqlQuery:
|
|
666
698
|
post:
|
|
@@ -713,6 +745,8 @@ paths:
|
|
|
713
745
|
$ref: "#/components/responses/NotFound"
|
|
714
746
|
"500":
|
|
715
747
|
$ref: "#/components/responses/InternalServerError"
|
|
748
|
+
"503":
|
|
749
|
+
$ref: "#/components/responses/ServiceUnavailable"
|
|
716
750
|
/projects/{projectName}/connections/{connectionName}/sqlTemporaryTable:
|
|
717
751
|
post:
|
|
718
752
|
tags:
|
|
@@ -758,6 +792,8 @@ paths:
|
|
|
758
792
|
$ref: "#/components/responses/NotFound"
|
|
759
793
|
"500":
|
|
760
794
|
$ref: "#/components/responses/InternalServerError"
|
|
795
|
+
"503":
|
|
796
|
+
$ref: "#/components/responses/ServiceUnavailable"
|
|
761
797
|
|
|
762
798
|
# TODO: Remove this endpoint.
|
|
763
799
|
/projects/{projectName}/connections/{connectionName}/temporaryTable:
|
|
@@ -805,6 +841,8 @@ paths:
|
|
|
805
841
|
$ref: "#/components/responses/NotFound"
|
|
806
842
|
"500":
|
|
807
843
|
$ref: "#/components/responses/InternalServerError"
|
|
844
|
+
"503":
|
|
845
|
+
$ref: "#/components/responses/ServiceUnavailable"
|
|
808
846
|
|
|
809
847
|
# TODO: Remove this endpoint. This is deprecated and replaced by /projects/{projectName}/connections/{connectionName}/table resource.
|
|
810
848
|
/projects/{projectName}/connections/{connectionName}/tableSource:
|
|
@@ -856,6 +894,8 @@ paths:
|
|
|
856
894
|
$ref: "#/components/responses/NotFound"
|
|
857
895
|
"500":
|
|
858
896
|
$ref: "#/components/responses/InternalServerError"
|
|
897
|
+
"503":
|
|
898
|
+
$ref: "#/components/responses/ServiceUnavailable"
|
|
859
899
|
|
|
860
900
|
# TODO: Remove this endpoint.
|
|
861
901
|
/projects/{projectName}/connections/{connectionName}/queryData:
|
|
@@ -942,6 +982,8 @@ paths:
|
|
|
942
982
|
$ref: "#/components/responses/InternalServerError"
|
|
943
983
|
"501":
|
|
944
984
|
$ref: "#/components/responses/NotImplemented"
|
|
985
|
+
"503":
|
|
986
|
+
$ref: "#/components/responses/ServiceUnavailable"
|
|
945
987
|
post:
|
|
946
988
|
tags:
|
|
947
989
|
- packages
|
|
@@ -977,6 +1019,8 @@ paths:
|
|
|
977
1019
|
$ref: "#/components/responses/InternalServerError"
|
|
978
1020
|
"501":
|
|
979
1021
|
$ref: "#/components/responses/NotImplemented"
|
|
1022
|
+
"503":
|
|
1023
|
+
$ref: "#/components/responses/ServiceUnavailable"
|
|
980
1024
|
|
|
981
1025
|
/projects/{projectName}/packages/{packageName}:
|
|
982
1026
|
get:
|
|
@@ -1029,6 +1073,8 @@ paths:
|
|
|
1029
1073
|
$ref: "#/components/responses/InternalServerError"
|
|
1030
1074
|
"501":
|
|
1031
1075
|
$ref: "#/components/responses/NotImplemented"
|
|
1076
|
+
"503":
|
|
1077
|
+
$ref: "#/components/responses/ServiceUnavailable"
|
|
1032
1078
|
patch:
|
|
1033
1079
|
tags:
|
|
1034
1080
|
- packages
|
|
@@ -1072,6 +1118,8 @@ paths:
|
|
|
1072
1118
|
$ref: "#/components/responses/InternalServerError"
|
|
1073
1119
|
"501":
|
|
1074
1120
|
$ref: "#/components/responses/NotImplemented"
|
|
1121
|
+
"503":
|
|
1122
|
+
$ref: "#/components/responses/ServiceUnavailable"
|
|
1075
1123
|
delete:
|
|
1076
1124
|
tags:
|
|
1077
1125
|
- packages
|
|
@@ -1109,6 +1157,8 @@ paths:
|
|
|
1109
1157
|
$ref: "#/components/responses/InternalServerError"
|
|
1110
1158
|
"501":
|
|
1111
1159
|
$ref: "#/components/responses/NotImplemented"
|
|
1160
|
+
"503":
|
|
1161
|
+
$ref: "#/components/responses/ServiceUnavailable"
|
|
1112
1162
|
|
|
1113
1163
|
/projects/{projectName}/packages/{packageName}/models:
|
|
1114
1164
|
get:
|
|
@@ -1156,6 +1206,8 @@ paths:
|
|
|
1156
1206
|
$ref: "#/components/responses/InternalServerError"
|
|
1157
1207
|
"501":
|
|
1158
1208
|
$ref: "#/components/responses/NotImplemented"
|
|
1209
|
+
"503":
|
|
1210
|
+
$ref: "#/components/responses/ServiceUnavailable"
|
|
1159
1211
|
|
|
1160
1212
|
/projects/{projectName}/packages/{packageName}/models/{path}:
|
|
1161
1213
|
get:
|
|
@@ -1263,6 +1315,59 @@ paths:
|
|
|
1263
1315
|
$ref: "#/components/responses/InternalServerError"
|
|
1264
1316
|
"501":
|
|
1265
1317
|
$ref: "#/components/responses/NotImplemented"
|
|
1318
|
+
"503":
|
|
1319
|
+
$ref: "#/components/responses/ServiceUnavailable"
|
|
1320
|
+
|
|
1321
|
+
/projects/{projectName}/packages/{packageName}/models/{path}/compile:
|
|
1322
|
+
post:
|
|
1323
|
+
tags:
|
|
1324
|
+
- models
|
|
1325
|
+
operationId: compile-model-source
|
|
1326
|
+
summary: Compile Malloy source code
|
|
1327
|
+
description: |
|
|
1328
|
+
Compiles Malloy source code in the context of a specific model's directory,
|
|
1329
|
+
allowing relative imports to resolve correctly against sibling model files.
|
|
1330
|
+
Returns compilation status and any problems (errors or warnings) found.
|
|
1331
|
+
parameters:
|
|
1332
|
+
- name: projectName
|
|
1333
|
+
in: path
|
|
1334
|
+
description: Name of the project
|
|
1335
|
+
required: true
|
|
1336
|
+
schema:
|
|
1337
|
+
$ref: "#/components/schemas/IdentifierPattern"
|
|
1338
|
+
- name: packageName
|
|
1339
|
+
in: path
|
|
1340
|
+
description: Name of the package
|
|
1341
|
+
required: true
|
|
1342
|
+
schema:
|
|
1343
|
+
type: string
|
|
1344
|
+
- name: path
|
|
1345
|
+
in: path
|
|
1346
|
+
description: Path to the model within the package (used to resolve relative imports)
|
|
1347
|
+
required: true
|
|
1348
|
+
schema:
|
|
1349
|
+
$ref: "#/components/schemas/PathPattern"
|
|
1350
|
+
requestBody:
|
|
1351
|
+
required: true
|
|
1352
|
+
content:
|
|
1353
|
+
application/json:
|
|
1354
|
+
schema:
|
|
1355
|
+
$ref: "#/components/schemas/CompileRequest"
|
|
1356
|
+
responses:
|
|
1357
|
+
"200":
|
|
1358
|
+
description: Compilation result with status and any problems
|
|
1359
|
+
content:
|
|
1360
|
+
application/json:
|
|
1361
|
+
schema:
|
|
1362
|
+
$ref: "#/components/schemas/CompileResult"
|
|
1363
|
+
"400":
|
|
1364
|
+
$ref: "#/components/responses/BadRequest"
|
|
1365
|
+
"404":
|
|
1366
|
+
$ref: "#/components/responses/NotFound"
|
|
1367
|
+
"500":
|
|
1368
|
+
$ref: "#/components/responses/InternalServerError"
|
|
1369
|
+
"503":
|
|
1370
|
+
$ref: "#/components/responses/ServiceUnavailable"
|
|
1266
1371
|
|
|
1267
1372
|
/projects/{projectName}/packages/{packageName}/notebooks:
|
|
1268
1373
|
get:
|
|
@@ -1310,6 +1415,8 @@ paths:
|
|
|
1310
1415
|
$ref: "#/components/responses/InternalServerError"
|
|
1311
1416
|
"501":
|
|
1312
1417
|
$ref: "#/components/responses/NotImplemented"
|
|
1418
|
+
"503":
|
|
1419
|
+
$ref: "#/components/responses/ServiceUnavailable"
|
|
1313
1420
|
|
|
1314
1421
|
/projects/{projectName}/packages/{packageName}/notebooks/{path}:
|
|
1315
1422
|
get:
|
|
@@ -1419,6 +1526,8 @@ paths:
|
|
|
1419
1526
|
$ref: "#/components/responses/InternalServerError"
|
|
1420
1527
|
"501":
|
|
1421
1528
|
$ref: "#/components/responses/NotImplemented"
|
|
1529
|
+
"503":
|
|
1530
|
+
$ref: "#/components/responses/ServiceUnavailable"
|
|
1422
1531
|
|
|
1423
1532
|
/projects/{projectName}/packages/{packageName}/databases:
|
|
1424
1533
|
get:
|
|
@@ -1466,6 +1575,8 @@ paths:
|
|
|
1466
1575
|
$ref: "#/components/responses/InternalServerError"
|
|
1467
1576
|
"501":
|
|
1468
1577
|
$ref: "#/components/responses/NotImplemented"
|
|
1578
|
+
"503":
|
|
1579
|
+
$ref: "#/components/responses/ServiceUnavailable"
|
|
1469
1580
|
|
|
1470
1581
|
/connections/test:
|
|
1471
1582
|
post:
|
|
@@ -1499,6 +1610,8 @@ paths:
|
|
|
1499
1610
|
$ref: "#/components/responses/NotFound"
|
|
1500
1611
|
"500":
|
|
1501
1612
|
$ref: "#/components/responses/InternalServerError"
|
|
1613
|
+
"503":
|
|
1614
|
+
$ref: "#/components/responses/ServiceUnavailable"
|
|
1502
1615
|
|
|
1503
1616
|
/watch-mode/status:
|
|
1504
1617
|
get:
|
|
@@ -1521,6 +1634,8 @@ paths:
|
|
|
1521
1634
|
$ref: "#/components/responses/Unauthorized"
|
|
1522
1635
|
"500":
|
|
1523
1636
|
$ref: "#/components/responses/InternalServerError"
|
|
1637
|
+
"503":
|
|
1638
|
+
$ref: "#/components/responses/ServiceUnavailable"
|
|
1524
1639
|
|
|
1525
1640
|
/watch-mode/start:
|
|
1526
1641
|
post:
|
|
@@ -1545,6 +1660,8 @@ paths:
|
|
|
1545
1660
|
$ref: "#/components/responses/Unauthorized"
|
|
1546
1661
|
"500":
|
|
1547
1662
|
$ref: "#/components/responses/InternalServerError"
|
|
1663
|
+
"503":
|
|
1664
|
+
$ref: "#/components/responses/ServiceUnavailable"
|
|
1548
1665
|
|
|
1549
1666
|
/watch-mode/stop:
|
|
1550
1667
|
post:
|
|
@@ -1563,6 +1680,8 @@ paths:
|
|
|
1563
1680
|
$ref: "#/components/responses/Unauthorized"
|
|
1564
1681
|
"500":
|
|
1565
1682
|
$ref: "#/components/responses/InternalServerError"
|
|
1683
|
+
"503":
|
|
1684
|
+
$ref: "#/components/responses/ServiceUnavailable"
|
|
1566
1685
|
|
|
1567
1686
|
components:
|
|
1568
1687
|
responses:
|
|
@@ -1608,6 +1727,12 @@ components:
|
|
|
1608
1727
|
application/json:
|
|
1609
1728
|
schema:
|
|
1610
1729
|
$ref: "#/components/schemas/Error"
|
|
1730
|
+
ServiceUnavailable:
|
|
1731
|
+
description: The service is temporarily unavailable, typically due to initialization, or draining state (Rolling updates, etc.)
|
|
1732
|
+
content:
|
|
1733
|
+
application/json:
|
|
1734
|
+
schema:
|
|
1735
|
+
$ref: "#/components/schemas/Error"
|
|
1611
1736
|
|
|
1612
1737
|
schemas:
|
|
1613
1738
|
IdentifierPattern:
|
|
@@ -1640,6 +1765,10 @@ components:
|
|
|
1640
1765
|
initialized:
|
|
1641
1766
|
type: boolean
|
|
1642
1767
|
description: Whether the server is fully initialized and ready to serve requests
|
|
1768
|
+
operationalState:
|
|
1769
|
+
type: string
|
|
1770
|
+
enum: ["initializing", "serving", "draining"]
|
|
1771
|
+
description: Status of the server; initializing when the server is loading projects, packages and connections, serving when the server is initialized and ready to serve requests, and draining when the server is going to shut down
|
|
1643
1772
|
frozenConfig:
|
|
1644
1773
|
type: boolean
|
|
1645
1774
|
description: Whether the server configuration is frozen (read-only mode). When true, all mutation operations are disabled.
|
|
@@ -2312,3 +2441,59 @@ components:
|
|
|
2312
2441
|
errorMessage:
|
|
2313
2442
|
type: string
|
|
2314
2443
|
description: Error message if the connection test failed, null if successful
|
|
2444
|
+
|
|
2445
|
+
CompileRequest:
|
|
2446
|
+
type: object
|
|
2447
|
+
description: Request body for compiling Malloy source code
|
|
2448
|
+
properties:
|
|
2449
|
+
source:
|
|
2450
|
+
type: string
|
|
2451
|
+
description: Malloy source code to compile
|
|
2452
|
+
includeSql:
|
|
2453
|
+
type: boolean
|
|
2454
|
+
default: false
|
|
2455
|
+
description: If true, returns the generated SQL alongside compilation results (only available when compilation succeeds and the source contains a runnable query).
|
|
2456
|
+
required:
|
|
2457
|
+
- source
|
|
2458
|
+
|
|
2459
|
+
CompileResult:
|
|
2460
|
+
type: object
|
|
2461
|
+
description: Result of a Malloy source compilation check
|
|
2462
|
+
properties:
|
|
2463
|
+
status:
|
|
2464
|
+
type: string
|
|
2465
|
+
description: Overall compilation status — "error" if any problems have error severity
|
|
2466
|
+
enum: ["success", "error"]
|
|
2467
|
+
problems:
|
|
2468
|
+
type: array
|
|
2469
|
+
description: List of compilation problems (errors and warnings)
|
|
2470
|
+
items:
|
|
2471
|
+
$ref: "#/components/schemas/CompileProblem"
|
|
2472
|
+
sql:
|
|
2473
|
+
type: string
|
|
2474
|
+
description: Generated SQL for the compiled query. Only present when includeSql is true and compilation succeeds with a runnable query.
|
|
2475
|
+
|
|
2476
|
+
CompileProblem:
|
|
2477
|
+
type: object
|
|
2478
|
+
description: A compilation problem reported by the Malloy compiler
|
|
2479
|
+
properties:
|
|
2480
|
+
message:
|
|
2481
|
+
type: string
|
|
2482
|
+
description: Human-readable problem description
|
|
2483
|
+
severity:
|
|
2484
|
+
type: string
|
|
2485
|
+
description: Severity level of the problem
|
|
2486
|
+
enum: ["error", "warn", "debug"]
|
|
2487
|
+
code:
|
|
2488
|
+
type: string
|
|
2489
|
+
description: Machine-readable error code
|
|
2490
|
+
at:
|
|
2491
|
+
type: object
|
|
2492
|
+
description: Source location of the problem
|
|
2493
|
+
properties:
|
|
2494
|
+
url:
|
|
2495
|
+
type: string
|
|
2496
|
+
description: URL of the source file
|
|
2497
|
+
range:
|
|
2498
|
+
type: object
|
|
2499
|
+
description: Character range within the source file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{e as t,j as o,K as a}from"./index-BLxl0XLH.js";function n(){const e=t();return o.jsx(a,{onClickProject:e})}export{n as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{u as V,g as F,r as g,R as _,a as X,b as S,c as M,d as A,j as t,s as m,
|
|
1
|
+
import{u as V,g as F,r as g,R as _,a as X,b as S,c as M,d as A,j as t,s as m,f as w,h as v,i as I,P as Y,m as R,k as J,l as z,B as K,n as E,o as Z,T as U,p as q,q as oo,e as eo,t as b,C as j,v as ro,w as to,I as so,M as ao,x as $,S as no,y as lo,z as io,O as co}from"./index-BLxl0XLH.js";function po(o,e,r,s,n){const[a,i]=g.useState(()=>n&&r?r(o).matches:s?s(o).matches:e);return X(()=>{if(!r)return;const p=r(o),u=()=>{i(p.matches)};return u(),p.addEventListener("change",u),()=>{p.removeEventListener("change",u)}},[o,r]),a}const uo={..._},L=uo.useSyncExternalStore;function go(o,e,r,s,n){const a=g.useCallback(()=>e,[e]),i=g.useMemo(()=>{if(n&&r)return()=>r(o).matches;if(s!==null){const{matches:c}=s(o);return()=>c}return a},[a,o,s,n,r]),[p,u]=g.useMemo(()=>{if(r===null)return[a,()=>()=>{}];const c=r(o);return[()=>c.matches,l=>(c.addEventListener("change",l),()=>{c.removeEventListener("change",l)})]},[a,r,o]);return L(u,p,i)}function O(o={}){const{themeId:e}=o;return function(s,n={}){let a=V();a&&e&&(a=a[e]||a);const i=typeof window<"u"&&typeof window.matchMedia<"u",{defaultMatches:p=!1,matchMedia:u=i?window.matchMedia:null,ssrMatchMedia:d=null,noSsr:c=!1}=F({name:"MuiUseMediaQuery",props:n,theme:a});let l=typeof s=="function"?s(a):s;return l=l.replace(/^@media( ?)/m,""),l.includes("print")&&console.warn(["MUI: You have provided a `print` query to the `useMediaQuery` hook.","Using the print media query to modify print styles can lead to unexpected results.","Consider using the `displayPrint` field in the `sx` prop instead.","More information about `displayPrint` on our docs: https://mui.com/system/display/#display-in-print."].join(`
|
|
2
2
|
`)),(L!==void 0?go:po)(l,p,u,d,c)}}O();function xo(o){return S("MuiAppBar",o)}M("MuiAppBar",["root","positionFixed","positionAbsolute","positionSticky","positionStatic","positionRelative","colorDefault","colorPrimary","colorSecondary","colorInherit","colorTransparent","colorError","colorInfo","colorSuccess","colorWarning"]);const mo=o=>{const{color:e,position:r,classes:s}=o,n={root:["root",`color${v(e)}`,`position${v(r)}`]};return I(n,xo,s)},D=(o,e)=>o?`${o?.replace(")","")}, ${e})`:e,bo=m(Y,{name:"MuiAppBar",slot:"Root",overridesResolver:(o,e)=>{const{ownerState:r}=o;return[e.root,e[`position${v(r.position)}`],e[`color${v(r.color)}`]]}})(R(({theme:o})=>({display:"flex",flexDirection:"column",width:"100%",boxSizing:"border-box",flexShrink:0,variants:[{props:{position:"fixed"},style:{position:"fixed",zIndex:(o.vars||o).zIndex.appBar,top:0,left:"auto",right:0,"@media print":{position:"absolute"}}},{props:{position:"absolute"},style:{position:"absolute",zIndex:(o.vars||o).zIndex.appBar,top:0,left:"auto",right:0}},{props:{position:"sticky"},style:{position:"sticky",zIndex:(o.vars||o).zIndex.appBar,top:0,left:"auto",right:0}},{props:{position:"static"},style:{position:"static"}},{props:{position:"relative"},style:{position:"relative"}},{props:{color:"inherit"},style:{"--AppBar-color":"inherit"}},{props:{color:"default"},style:{"--AppBar-background":o.vars?o.vars.palette.AppBar.defaultBg:o.palette.grey[100],"--AppBar-color":o.vars?o.vars.palette.text.primary:o.palette.getContrastText(o.palette.grey[100]),...o.applyStyles("dark",{"--AppBar-background":o.vars?o.vars.palette.AppBar.defaultBg:o.palette.grey[900],"--AppBar-color":o.vars?o.vars.palette.text.primary:o.palette.getContrastText(o.palette.grey[900])})}},...Object.entries(o.palette).filter(J(["contrastText"])).map(([e])=>({props:{color:e},style:{"--AppBar-background":(o.vars??o).palette[e].main,"--AppBar-color":(o.vars??o).palette[e].contrastText}})),{props:e=>e.enableColorOnDark===!0&&!["inherit","transparent"].includes(e.color),style:{backgroundColor:"var(--AppBar-background)",color:"var(--AppBar-color)"}},{props:e=>e.enableColorOnDark===!1&&!["inherit","transparent"].includes(e.color),style:{backgroundColor:"var(--AppBar-background)",color:"var(--AppBar-color)",...o.applyStyles("dark",{backgroundColor:o.vars?D(o.vars.palette.AppBar.darkBg,"var(--AppBar-background)"):null,color:o.vars?D(o.vars.palette.AppBar.darkColor,"var(--AppBar-color)"):null})}},{props:{color:"transparent"},style:{"--AppBar-background":"transparent","--AppBar-color":"inherit",backgroundColor:"var(--AppBar-background)",color:"var(--AppBar-color)",...o.applyStyles("dark",{backgroundImage:"none"})}}]}))),fo=g.forwardRef(function(e,r){const s=A({props:e,name:"MuiAppBar"}),{className:n,color:a="primary",enableColorOnDark:i=!1,position:p="fixed",...u}=s,d={...s,color:a,position:p,enableColorOnDark:i},c=mo(d);return t.jsx(bo,{square:!0,component:"header",ownerState:d,elevation:4,className:w(c.root,n,p==="fixed"&&"mui-fixed"),ref:r,...u})}),ho=z(t.jsx("path",{d:"M6 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm12 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm-6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"})),yo=m(K,{name:"MuiBreadcrumbCollapsed"})(R(({theme:o})=>({display:"flex",marginLeft:`calc(${o.spacing(1)} * 0.5)`,marginRight:`calc(${o.spacing(1)} * 0.5)`,...o.palette.mode==="light"?{backgroundColor:o.palette.grey[100],color:o.palette.grey[700]}:{backgroundColor:o.palette.grey[700],color:o.palette.grey[100]},borderRadius:2,"&:hover, &:focus":{...o.palette.mode==="light"?{backgroundColor:o.palette.grey[200]}:{backgroundColor:o.palette.grey[600]}},"&:active":{boxShadow:o.shadows[0],...o.palette.mode==="light"?{backgroundColor:E(o.palette.grey[200],.12)}:{backgroundColor:E(o.palette.grey[600],.12)}}}))),vo=m(ho)({width:24,height:16});function Bo(o){const{slots:e={},slotProps:r={},...s}=o,n=o;return t.jsx("li",{children:t.jsx(yo,{focusRipple:!0,...s,ownerState:n,children:t.jsx(vo,{as:e.CollapsedIcon,ownerState:n,...r.collapsedIcon})})})}function ko(o){return S("MuiBreadcrumbs",o)}const Co=M("MuiBreadcrumbs",["root","ol","li","separator"]),jo=o=>{const{classes:e}=o;return I({root:["root"],li:["li"],ol:["ol"],separator:["separator"]},ko,e)},So=m(U,{name:"MuiBreadcrumbs",slot:"Root",overridesResolver:(o,e)=>[{[`& .${Co.li}`]:e.li},e.root]})({}),Mo=m("ol",{name:"MuiBreadcrumbs",slot:"Ol"})({display:"flex",flexWrap:"wrap",alignItems:"center",padding:0,margin:0,listStyle:"none"}),Ao=m("li",{name:"MuiBreadcrumbs",slot:"Separator"})({display:"flex",userSelect:"none",marginLeft:8,marginRight:8});function wo(o,e,r,s){return o.reduce((n,a,i)=>(i<o.length-1?n=n.concat(a,t.jsx(Ao,{"aria-hidden":!0,className:e,ownerState:s,children:r},`separator-${i}`)):n.push(a),n),[])}const Io=g.forwardRef(function(e,r){const s=A({props:e,name:"MuiBreadcrumbs"}),{children:n,className:a,component:i="nav",slots:p={},slotProps:u={},expandText:d="Show path",itemsAfterCollapse:c=1,itemsBeforeCollapse:l=1,maxItems:h=8,separator:B="/",...Q}=s,[T,W]=g.useState(!1),f={...s,component:i,expanded:T,expandText:d,itemsAfterCollapse:c,itemsBeforeCollapse:l,maxItems:h,separator:B},y=jo(f),H=Z({elementType:p.CollapsedIcon,externalSlotProps:u.collapsedIcon,ownerState:f}),P=g.useRef(null),G=x=>{const C=()=>{W(!0);const N=P.current.querySelector("a[href],button,[tabindex]");N&&N.focus()};return l+c>=x.length?x:[...x.slice(0,l),t.jsx(Bo,{"aria-label":d,slots:{CollapsedIcon:p.CollapsedIcon},slotProps:{collapsedIcon:H},onClick:C},"ellipsis"),...x.slice(x.length-c,x.length)]},k=g.Children.toArray(n).filter(x=>g.isValidElement(x)).map((x,C)=>t.jsx("li",{className:y.li,children:x},`child-${C}`));return t.jsx(So,{ref:r,component:i,color:"textSecondary",className:w(y.root,a),ownerState:f,...Q,children:t.jsx(Mo,{className:y.ol,ref:P,ownerState:f,children:wo(T||h&&k.length<=h?k:G(k),y.separator,B,f)})})});function Ro(o){return S("MuiToolbar",o)}M("MuiToolbar",["root","gutters","regular","dense"]);const zo=o=>{const{classes:e,disableGutters:r,variant:s}=o;return I({root:["root",!r&&"gutters",s]},Ro,e)},To=m("div",{name:"MuiToolbar",slot:"Root",overridesResolver:(o,e)=>{const{ownerState:r}=o;return[e.root,!r.disableGutters&&e.gutters,e[r.variant]]}})(R(({theme:o})=>({position:"relative",display:"flex",alignItems:"center",variants:[{props:({ownerState:e})=>!e.disableGutters,style:{paddingLeft:o.spacing(2),paddingRight:o.spacing(2),[o.breakpoints.up("sm")]:{paddingLeft:o.spacing(3),paddingRight:o.spacing(3)}}},{props:{variant:"dense"},style:{minHeight:48}},{props:{variant:"regular"},style:o.mixins.toolbar}]}))),Po=g.forwardRef(function(e,r){const s=A({props:e,name:"MuiToolbar"}),{className:n,component:a="div",disableGutters:i=!1,variant:p="regular",...u}=s,d={...s,component:a,disableGutters:i,variant:p},c=zo(d);return t.jsx(To,{as:a,className:w(c.root,n),ref:r,ownerState:d,...u})}),No=O({themeId:q}),Eo=z(t.jsx("path",{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"})),$o=z(t.jsx("path",{d:"M3 18h18v-2H3zm0-5h18v-2H3zm0-7v2h18V6z"}));function Do(){const o=oo(),e=o["*"],r=eo();return t.jsx(b,{sx:{display:"flex",alignItems:"center"},children:t.jsxs(Io,{"aria-label":"breadcrumb",separator:t.jsx(Eo,{sx:{fontSize:14,color:"text.secondary"}}),sx:{"& .MuiBreadcrumbs-separator":{margin:"0 6px"}},children:[o.projectName&&t.jsx(j,{onClick:s=>r(`/${o.projectName}/`,s),label:o.projectName,size:"medium",sx:{backgroundColor:"white",color:"primary.main",fontWeight:500,height:"32px",fontSize:"1rem",cursor:"pointer","&:hover":{backgroundColor:"primary.100"}}}),o.packageName&&t.jsx(j,{onClick:s=>r(`/${o.projectName}/${o.packageName}/`,s),label:o.packageName,size:"medium",sx:{backgroundColor:"white",color:"primary.main",fontWeight:500,height:"32px",fontSize:"1rem",cursor:"pointer","&:hover":{backgroundColor:"secondary.100"}}}),e&&t.jsx(j,{onClick:s=>r(`/${o.projectName}/${o.packageName}/${e}`,s),label:e,size:"medium",sx:{backgroundColor:"white",color:"primary.main",fontWeight:500,height:"32px",fontSize:"1rem",cursor:"pointer","&:hover":{backgroundColor:"grey.200"}}})]})})}function Uo({logoHeader:o,endCap:e}){const r=ro(),s=to(),n=No(s.breakpoints.down("sm")),[a,i]=g.useState(null),p=!!a,u=l=>{i(l.currentTarget)},d=()=>i(null),c=[{label:"Malloy Docs",link:"https://docs.malloydata.dev/documentation/",sx:{color:"#14b3cb"}},{label:"Publisher Docs",link:"https://github.com/malloydata/publisher/blob/main/README.md",sx:{color:"#14b3cb"}},{label:"Publisher API",link:"/api-doc.html",sx:{color:"#14b3cb"}}];return t.jsxs(fo,{position:"sticky",elevation:0,sx:{backgroundColor:"background.paper",borderBottom:"1px solid",borderColor:"divider"},children:[t.jsxs(Po,{sx:{justifyContent:"space-between",flexWrap:"nowrap",minHeight:44},children:[o||t.jsxs(b,{sx:{display:"flex",alignItems:"center",gap:1,cursor:"pointer"},onClick:()=>r("/"),children:[t.jsx(b,{component:"img",src:"/logo.svg",alt:"Malloy",sx:{width:28,height:28}}),t.jsx(U,{variant:"h6",sx:{color:"text.primary",fontWeight:700,letterSpacing:"-0.025em",fontSize:{xs:"1.1rem",sm:"1.25rem"}},children:"Malloy Publisher"})]}),n?t.jsxs(t.Fragment,{children:[t.jsx(so,{color:"inherit",onClick:u,children:t.jsx($o,{})}),t.jsxs(ao,{anchorEl:a,open:p,onClose:d,anchorOrigin:{vertical:"bottom",horizontal:"right"},children:[c.map(l=>t.jsx($,{onClick:()=>{d(),window.location.href=l.link},sx:l.sx,children:l.label},l.label)),e&&t.jsx($,{children:e})]})]}):t.jsxs(no,{direction:"row",spacing:2,alignItems:"center",children:[c.map(l=>t.jsx(lo,{href:l.link,sx:l.sx,children:l.label},l.label)),e]})]}),t.jsx(b,{sx:{borderTop:"1px solid white",paddingLeft:"16px",paddingRight:"16px",marginBottom:"1px",overflowX:"auto"},children:t.jsx(Do,{})})]})}function Oo({headerProps:o}){return t.jsxs(b,{sx:{display:"flex",flexDirection:"column",minHeight:"100vh"},children:[t.jsx(Uo,{...o}),t.jsx(io,{maxWidth:"xl",component:"main",sx:{flex:1,display:"flex",flexDirection:"column",py:2,gap:2},children:t.jsx(b,{sx:{flex:1},children:t.jsx(co,{})})})]})}export{Oo as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{q as n,j as e,A as i,Q as t,D as c}from"./index-BLxl0XLH.js";function o(){const a=n(),r=a["*"];if(!a.projectName)return e.jsx("div",{children:e.jsx("h2",{children:"Missing project name"})});if(!a.packageName)return e.jsx("div",{children:e.jsx("h2",{children:"Missing package name"})});const s=i({projectName:a.projectName,packageName:a.packageName,modelPath:r});return r?.endsWith(".malloy")?e.jsx(t,{resourceUri:s,runOnDemand:!0,maxResultSize:512*1024}):r?.endsWith(".malloynb")?e.jsx(c,{resourceUri:s,maxResultSize:1024*1024}):e.jsx("div",{children:e.jsxs("h2",{children:["Unrecognized file type: ",r]})})}export{o as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{q as i,e as c,j as e,A as t,Z as o}from"./index-BLxl0XLH.js";function l(){const{projectName:s,packageName:a}=i(),n=c();if(s)if(a){const r=t({projectName:s,packageName:a});return e.jsx(o,{onClickPackageFile:n,resourceUri:r})}else return e.jsx("div",{children:e.jsx("h2",{children:"Missing package name"})});else return e.jsx("div",{children:e.jsx("h2",{children:"Missing project name"})})}export{l as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{e as t,q as n,j as e,A as c,J as o}from"./index-BLxl0XLH.js";function j(){const r=t(),{projectName:s}=n();if(s){const a=c({projectName:s});return e.jsx(o,{onSelectPackage:r,resourceUri:a})}else return e.jsx("div",{children:e.jsx("h2",{children:"Missing project name"})})}export{j as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{E as o,j as r,z as s,S as t,t as n,T as a}from"./index-BLxl0XLH.js";function x(){const e=o();return console.error(e),r.jsx(s,{maxWidth:"lg",component:"main",sx:{display:"flex",flexDirection:"column",my:2,gap:0},children:r.jsxs(t,{sx:{m:"auto",flexDirection:"column"},children:[r.jsx(n,{sx:{height:"300px"}}),r.jsx("img",{src:"/error.png"}),r.jsx(a,{variant:"subtitle1",children:"An unexpected error occurred"})]})})}export{x as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{q as a,j as e,A as c,F as t}from"./index-BLxl0XLH.js";function d(){const{workspace:r,workbookPath:s,projectName:i,packageName:n}=a();if(r)if(s)if(i)if(n){const o=c({projectName:i,packageName:n});return e.jsx(t,{workbookPath:{path:s,workspace:r},resourceUri:o},`${s}`)}else return e.jsx("div",{children:e.jsx("h2",{children:"Missing package name"})});else return e.jsx("div",{children:e.jsx("h2",{children:"Missing project name"})});else return e.jsx("div",{children:e.jsx("h2",{children:"Missing workbook path"})});else return e.jsx("div",{children:e.jsx("h2",{children:"Missing workspace"})})}export{d as default};
|