@achasoft/dsh-advanced-sidebar 0.1.0 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. package/README.md +279 -128
  2. package/cordis.patch.yml +31 -3
  3. package/lib/client.js +2803 -466
  4. package/lib/client.js.map +1 -1
  5. package/lib/host.js +2071 -418
  6. package/lib/index.js +6 -2
  7. package/lib/preview-content-BVUQ5oOR.js +465 -0
  8. package/lib/remote.js +330 -25
  9. package/lib/typert.host.js +330 -25
  10. package/lib/ui-preview.js +352 -0
  11. package/package.json +8 -2
  12. package/types/client/ActionMenu.d.ts +16 -1
  13. package/types/client/LogDownloadDialog.d.ts +24 -0
  14. package/types/client/contract.d.ts +57 -1
  15. package/types/client/index.d.ts +4 -2
  16. package/types/client/locales.d.ts +100 -0
  17. package/types/client/log-download.d.ts +179 -0
  18. package/types/client/panels/PreviewPanel.d.ts +20 -15
  19. package/types/client/panels/preview-file.d.ts +61 -0
  20. package/types/client/panels/preview-mode.d.ts +67 -0
  21. package/types/client/panels/preview-scratchpad.d.ts +53 -0
  22. package/types/client/panels/preview-url.d.ts +17 -0
  23. package/types/client/panels/shared.d.ts +15 -2
  24. package/types/client/preview-driver.d.ts +121 -0
  25. package/types/client/preview-storage.d.ts +43 -0
  26. package/types/client/preview-types.d.ts +21 -0
  27. package/types/client/preview-values.d.ts +43 -0
  28. package/types/host/deletion.d.ts +32 -23
  29. package/types/host/git.d.ts +94 -8
  30. package/types/host/index.d.ts +97 -5
  31. package/types/host/preview-content.d.ts +179 -0
  32. package/types/host/preview-serve.d.ts +242 -0
  33. package/types/host/settings-section.d.ts +49 -0
  34. package/types/host/types.d.ts +341 -0
  35. package/types/host/ui-bridge.d.ts +197 -0
  36. package/types/host/ui-preview-tool.d.ts +60 -0
  37. package/types/index.d.ts +6 -2
  38. package/types/ui-preview.d.ts +11 -0
@@ -39,7 +39,13 @@ const _achasoft_dsh_advanced_sidebar_advancedSidebar_describe_result$schema = z.
39
39
  "available": z.boolean().readonly(),
40
40
  "reason": z.string().readonly().optional(),
41
41
  "detail": z.string().readonly().optional(),
42
- "running": z.number().readonly()
42
+ "running": z.number().readonly(),
43
+ "surface": z.object({
44
+ "fileRoute": z.string().readonly(),
45
+ "proxyRoute": z.string().readonly(),
46
+ "available": z.boolean().readonly(),
47
+ "reason": z.string().readonly().optional()
48
+ }).readonly().optional()
43
49
  }).readonly(),
44
50
  "tasks": z.object({
45
51
  "available": z.boolean().readonly(),
@@ -110,7 +116,11 @@ const _achasoft_dsh_advanced_sidebar_advancedSidebar_describe_result$schema = z.
110
116
  "maxPreviews": z.number().readonly(),
111
117
  "previewReadyTimeoutMs": z.number().readonly(),
112
118
  "previewScrollback": z.number().readonly(),
113
- "previewGraceMs": z.number().readonly()
119
+ "previewGraceMs": z.number().readonly(),
120
+ "previewMaxFileBytes": z.number().readonly(),
121
+ "previewProxyTimeoutMs": z.number().readonly(),
122
+ "previewCommandTimeoutMs": z.number().readonly(),
123
+ "previewBindTtlMs": z.number().readonly()
114
124
  }).readonly(),
115
125
  "readAt": z.number().readonly()
116
126
  });
@@ -1192,6 +1202,192 @@ const _achasoft_dsh_advanced_sidebar_advancedSidebar_previewStop_result$schema =
1192
1202
  ]).readonly(),
1193
1203
  "message": z.string().readonly()
1194
1204
  })]);
1205
+ const _achasoft_dsh_advanced_sidebar_advancedSidebar_previewFileInfo_parameter_0$schema = z.object({
1206
+ "workspacePath": z.string().readonly(),
1207
+ "path": z.string().readonly()
1208
+ });
1209
+ const _achasoft_dsh_advanced_sidebar_advancedSidebar_previewFileInfo_result$schema = z.union([z.object({
1210
+ "ok": z.literal(true).readonly(),
1211
+ "path": z.string().readonly(),
1212
+ "name": z.string().readonly(),
1213
+ "kind": z.union([
1214
+ z.literal("iframe"),
1215
+ z.literal("markdown"),
1216
+ z.literal("image"),
1217
+ z.literal("media"),
1218
+ z.literal("pdf"),
1219
+ z.literal("text"),
1220
+ z.literal("other")
1221
+ ]).readonly(),
1222
+ "contentType": z.string().readonly(),
1223
+ "bytes": z.number().readonly(),
1224
+ "withinLimit": z.boolean().readonly(),
1225
+ "url": z.string().readonly().optional(),
1226
+ "token": z.string().readonly(),
1227
+ "regular": z.boolean().readonly()
1228
+ }), z.object({
1229
+ "ok": z.literal(false).readonly(),
1230
+ "code": z.union([
1231
+ z.literal("no-filesystem"),
1232
+ z.literal("path-denied"),
1233
+ z.literal("not-a-file"),
1234
+ z.literal("read-failed")
1235
+ ]).readonly(),
1236
+ "message": z.string().readonly()
1237
+ })]);
1238
+ const _achasoft_dsh_advanced_sidebar_advancedSidebar_previewPoll_parameter_0$schema = z.object({
1239
+ "clientId": z.string().readonly(),
1240
+ "sessionId": z.string().readonly(),
1241
+ "mounted": z.boolean().readonly(),
1242
+ "bind": z.object({
1243
+ "clientId": z.string().readonly(),
1244
+ "sessionId": z.string().readonly(),
1245
+ "mode": z.union([
1246
+ z.literal("server"),
1247
+ z.literal("file"),
1248
+ z.literal("url"),
1249
+ z.literal("scratchpad")
1250
+ ]).readonly(),
1251
+ "filePath": z.string().readonly().optional(),
1252
+ "workspacePath": z.string().readonly().optional(),
1253
+ "url": z.string().readonly().optional(),
1254
+ "inspectable": z.boolean().readonly(),
1255
+ "width": z.number().readonly(),
1256
+ "height": z.number().readonly()
1257
+ }).readonly()
1258
+ });
1259
+ const _achasoft_dsh_advanced_sidebar_advancedSidebar_previewPoll_result$schema = z.union([z.object({
1260
+ "ok": z.literal(true).readonly(),
1261
+ "message": z.object({
1262
+ "commands": z.array(z.object({
1263
+ "id": z.string().readonly(),
1264
+ "clientId": z.string().readonly(),
1265
+ "kind": z.union([
1266
+ z.literal("open"),
1267
+ z.literal("dom"),
1268
+ z.literal("eval"),
1269
+ z.literal("console"),
1270
+ z.literal("click"),
1271
+ z.literal("input"),
1272
+ z.literal("reload"),
1273
+ z.literal("resize"),
1274
+ z.literal("close")
1275
+ ]).readonly(),
1276
+ "selector": z.string().readonly().optional(),
1277
+ "expression": z.string().readonly().optional(),
1278
+ "cursor": z.number().readonly().optional(),
1279
+ "text": z.string().readonly().optional(),
1280
+ "key": z.string().readonly().optional(),
1281
+ "width": z.number().readonly().optional(),
1282
+ "height": z.number().readonly().optional(),
1283
+ "timeoutMs": z.number().readonly()
1284
+ })).readonly(),
1285
+ "controls": z.array(z.object({
1286
+ "control": z.literal("open").readonly(),
1287
+ "open": z.object({
1288
+ "clientId": z.string().readonly(),
1289
+ "mode": z.union([
1290
+ z.literal("server"),
1291
+ z.literal("file"),
1292
+ z.literal("url"),
1293
+ z.literal("scratchpad")
1294
+ ]).readonly(),
1295
+ "filePath": z.string().readonly().optional(),
1296
+ "url": z.string().readonly().optional(),
1297
+ "workspacePath": z.string().readonly().optional()
1298
+ }).readonly()
1299
+ })).readonly()
1300
+ }).readonly(),
1301
+ "bindTtlMs": z.number().readonly()
1302
+ }), z.object({
1303
+ "ok": z.literal(false).readonly(),
1304
+ "code": z.union([z.literal("no-subprocess"), z.literal("closed")]).readonly(),
1305
+ "message": z.string().readonly()
1306
+ })]);
1307
+ const _achasoft_dsh_advanced_sidebar_advancedSidebar_previewResult_parameter_0$schema = z.object({
1308
+ "clientId": z.string().readonly(),
1309
+ "id": z.string().readonly(),
1310
+ "ok": z.boolean().readonly(),
1311
+ "error": z.string().readonly().optional(),
1312
+ "result": z.union([
1313
+ z.object({
1314
+ "kind": z.literal("dom").readonly(),
1315
+ "selector": z.string().readonly(),
1316
+ "viewport": z.object({
1317
+ "width": z.number().readonly(),
1318
+ "height": z.number().readonly()
1319
+ }).readonly(),
1320
+ "nodes": z.array(z.object({
1321
+ "tag": z.string().readonly(),
1322
+ "selector": z.string().readonly(),
1323
+ "text": z.string().readonly(),
1324
+ "display": z.string().readonly(),
1325
+ "box": z.object({
1326
+ "x": z.number().readonly(),
1327
+ "y": z.number().readonly(),
1328
+ "width": z.number().readonly(),
1329
+ "height": z.number().readonly()
1330
+ }).readonly(),
1331
+ "depth": z.number().readonly()
1332
+ })).readonly(),
1333
+ "text": z.string().readonly(),
1334
+ "truncated": z.boolean().readonly(),
1335
+ "url": z.string().readonly()
1336
+ }),
1337
+ z.object({
1338
+ "kind": z.literal("eval").readonly(),
1339
+ "value": z.string().readonly(),
1340
+ "note": z.string().readonly().optional(),
1341
+ "truncated": z.boolean().readonly()
1342
+ }),
1343
+ z.object({
1344
+ "kind": z.literal("console").readonly(),
1345
+ "entries": z.array(z.object({
1346
+ "level": z.union([
1347
+ z.literal("log"),
1348
+ z.literal("info"),
1349
+ z.literal("warn"),
1350
+ z.literal("error"),
1351
+ z.literal("uncaught"),
1352
+ z.literal("rejection")
1353
+ ]).readonly(),
1354
+ "text": z.string().readonly(),
1355
+ "at": z.number().readonly()
1356
+ })).readonly(),
1357
+ "cursor": z.number().readonly(),
1358
+ "lossy": z.boolean().readonly()
1359
+ }),
1360
+ z.object({
1361
+ "kind": z.literal("ack").readonly(),
1362
+ "detail": z.string().readonly(),
1363
+ "width": z.number().readonly().optional(),
1364
+ "height": z.number().readonly().optional()
1365
+ })
1366
+ ]).readonly().optional(),
1367
+ "console": z.array(z.object({
1368
+ "level": z.union([
1369
+ z.literal("log"),
1370
+ z.literal("info"),
1371
+ z.literal("warn"),
1372
+ z.literal("error"),
1373
+ z.literal("uncaught"),
1374
+ z.literal("rejection")
1375
+ ]).readonly(),
1376
+ "text": z.string().readonly(),
1377
+ "at": z.number().readonly()
1378
+ })).readonly().optional()
1379
+ });
1380
+ const _achasoft_dsh_advanced_sidebar_advancedSidebar_previewResult_result$schema = z.union([z.object({ "ok": z.literal(true).readonly() }), z.object({
1381
+ "ok": z.literal(false).readonly(),
1382
+ "code": z.union([z.literal("no-subprocess"), z.literal("closed")]).readonly(),
1383
+ "message": z.string().readonly()
1384
+ })]);
1385
+ const _achasoft_dsh_advanced_sidebar_advancedSidebar_previewRelease_parameter_0$schema = z.object({ "clientId": z.string().readonly() });
1386
+ const _achasoft_dsh_advanced_sidebar_advancedSidebar_previewRelease_result$schema = z.union([z.object({ "ok": z.literal(true).readonly() }), z.object({
1387
+ "ok": z.literal(false).readonly(),
1388
+ "code": z.union([z.literal("no-subprocess"), z.literal("closed")]).readonly(),
1389
+ "message": z.string().readonly()
1390
+ })]);
1195
1391
  const _achasoft_dsh_advanced_sidebar_advancedSidebar_readFile_parameter_0$schema = z.object({
1196
1392
  "path": z.string().readonly(),
1197
1393
  "workspacePath": z.string().readonly()
@@ -1385,7 +1581,7 @@ const TYPERT = {
1385
1581
  },
1386
1582
  sourceLocation: {
1387
1583
  "file": "src/host/index.ts",
1388
- "line": 464,
1584
+ "line": 590,
1389
1585
  "column": 3
1390
1586
  }
1391
1587
  },
@@ -1404,7 +1600,7 @@ const TYPERT = {
1404
1600
  },
1405
1601
  sourceLocation: {
1406
1602
  "file": "src/host/index.ts",
1407
- "line": 234,
1603
+ "line": 267,
1408
1604
  "column": 3
1409
1605
  }
1410
1606
  },
@@ -1432,7 +1628,7 @@ const TYPERT = {
1432
1628
  },
1433
1629
  sourceLocation: {
1434
1630
  "file": "src/host/index.ts",
1435
- "line": 274,
1631
+ "line": 307,
1436
1632
  "column": 3
1437
1633
  }
1438
1634
  },
@@ -1460,7 +1656,7 @@ const TYPERT = {
1460
1656
  },
1461
1657
  sourceLocation: {
1462
1658
  "file": "src/host/index.ts",
1463
- "line": 263,
1659
+ "line": 296,
1464
1660
  "column": 3
1465
1661
  }
1466
1662
  },
@@ -1488,7 +1684,7 @@ const TYPERT = {
1488
1684
  },
1489
1685
  sourceLocation: {
1490
1686
  "file": "src/host/index.ts",
1491
- "line": 285,
1687
+ "line": 318,
1492
1688
  "column": 3
1493
1689
  }
1494
1690
  },
@@ -1516,7 +1712,7 @@ const TYPERT = {
1516
1712
  },
1517
1713
  sourceLocation: {
1518
1714
  "file": "src/host/index.ts",
1519
- "line": 296,
1715
+ "line": 329,
1520
1716
  "column": 3
1521
1717
  }
1522
1718
  },
@@ -1544,7 +1740,7 @@ const TYPERT = {
1544
1740
  },
1545
1741
  sourceLocation: {
1546
1742
  "file": "src/host/index.ts",
1547
- "line": 307,
1743
+ "line": 340,
1548
1744
  "column": 3
1549
1745
  }
1550
1746
  },
@@ -1572,7 +1768,7 @@ const TYPERT = {
1572
1768
  },
1573
1769
  sourceLocation: {
1574
1770
  "file": "src/host/index.ts",
1575
- "line": 320,
1771
+ "line": 351,
1576
1772
  "column": 3
1577
1773
  }
1578
1774
  },
@@ -1600,7 +1796,7 @@ const TYPERT = {
1600
1796
  },
1601
1797
  sourceLocation: {
1602
1798
  "file": "src/host/index.ts",
1603
- "line": 333,
1799
+ "line": 362,
1604
1800
  "column": 3
1605
1801
  }
1606
1802
  },
@@ -1628,7 +1824,7 @@ const TYPERT = {
1628
1824
  },
1629
1825
  sourceLocation: {
1630
1826
  "file": "src/host/index.ts",
1631
- "line": 369,
1827
+ "line": 426,
1632
1828
  "column": 3
1633
1829
  }
1634
1830
  },
@@ -1656,7 +1852,7 @@ const TYPERT = {
1656
1852
  },
1657
1853
  sourceLocation: {
1658
1854
  "file": "src/host/index.ts",
1659
- "line": 433,
1855
+ "line": 560,
1660
1856
  "column": 3
1661
1857
  }
1662
1858
  },
@@ -1684,7 +1880,7 @@ const TYPERT = {
1684
1880
  },
1685
1881
  sourceLocation: {
1686
1882
  "file": "src/host/index.ts",
1687
- "line": 380,
1883
+ "line": 437,
1688
1884
  "column": 3
1689
1885
  }
1690
1886
  },
@@ -1711,7 +1907,7 @@ const TYPERT = {
1711
1907
  },
1712
1908
  sourceLocation: {
1713
1909
  "file": "src/host/index.ts",
1714
- "line": 411,
1910
+ "line": 468,
1715
1911
  "column": 3
1716
1912
  }
1717
1913
  },
@@ -1739,7 +1935,7 @@ const TYPERT = {
1739
1935
  },
1740
1936
  sourceLocation: {
1741
1937
  "file": "src/host/index.ts",
1742
- "line": 391,
1938
+ "line": 448,
1743
1939
  "column": 3
1744
1940
  }
1745
1941
  },
@@ -1766,7 +1962,116 @@ const TYPERT = {
1766
1962
  },
1767
1963
  sourceLocation: {
1768
1964
  "file": "src/host/index.ts",
1769
- "line": 401,
1965
+ "line": 458,
1966
+ "column": 3
1967
+ }
1968
+ },
1969
+ {
1970
+ id: "@achasoft/dsh-advanced-sidebar#advancedSidebar/previewFileInfo",
1971
+ service: "advancedSidebar",
1972
+ namespace: "advancedSidebar",
1973
+ method: "previewFileInfo",
1974
+ invocation: { kind: "direct" },
1975
+ parameters: [{
1976
+ name: "request",
1977
+ wire: "request",
1978
+ source: "json",
1979
+ codec: {
1980
+ mode: "strict",
1981
+ typeSymbol: "../src/host/types.ts#PreviewFileInfoRequest",
1982
+ schema: _achasoft_dsh_advanced_sidebar_advancedSidebar_previewFileInfo_parameter_0$schema
1983
+ }
1984
+ }],
1985
+ cancellation: { parameter: "signal" },
1986
+ result: {
1987
+ mode: "strict",
1988
+ typeSymbol: "../src/host/types.ts#PreviewFileInfoResult",
1989
+ schema: _achasoft_dsh_advanced_sidebar_advancedSidebar_previewFileInfo_result$schema
1990
+ },
1991
+ sourceLocation: {
1992
+ "file": "src/host/index.ts",
1993
+ "line": 483,
1994
+ "column": 3
1995
+ }
1996
+ },
1997
+ {
1998
+ id: "@achasoft/dsh-advanced-sidebar#advancedSidebar/previewPoll",
1999
+ service: "advancedSidebar",
2000
+ namespace: "advancedSidebar",
2001
+ method: "previewPoll",
2002
+ invocation: { kind: "direct" },
2003
+ parameters: [{
2004
+ name: "request",
2005
+ wire: "request",
2006
+ source: "json",
2007
+ codec: {
2008
+ mode: "strict",
2009
+ typeSymbol: "../src/host/types.ts#PreviewPollRequest",
2010
+ schema: _achasoft_dsh_advanced_sidebar_advancedSidebar_previewPoll_parameter_0$schema
2011
+ }
2012
+ }],
2013
+ result: {
2014
+ mode: "strict",
2015
+ typeSymbol: "../src/host/types.ts#PreviewPollResult",
2016
+ schema: _achasoft_dsh_advanced_sidebar_advancedSidebar_previewPoll_result$schema
2017
+ },
2018
+ sourceLocation: {
2019
+ "file": "src/host/index.ts",
2020
+ "line": 498,
2021
+ "column": 3
2022
+ }
2023
+ },
2024
+ {
2025
+ id: "@achasoft/dsh-advanced-sidebar#advancedSidebar/previewResult",
2026
+ service: "advancedSidebar",
2027
+ namespace: "advancedSidebar",
2028
+ method: "previewResult",
2029
+ invocation: { kind: "direct" },
2030
+ parameters: [{
2031
+ name: "request",
2032
+ wire: "request",
2033
+ source: "json",
2034
+ codec: {
2035
+ mode: "strict",
2036
+ typeSymbol: "../src/host/types.ts#PreviewResultRequest",
2037
+ schema: _achasoft_dsh_advanced_sidebar_advancedSidebar_previewResult_parameter_0$schema
2038
+ }
2039
+ }],
2040
+ result: {
2041
+ mode: "strict",
2042
+ typeSymbol: "../src/host/types.ts#PreviewResultAck",
2043
+ schema: _achasoft_dsh_advanced_sidebar_advancedSidebar_previewResult_result$schema
2044
+ },
2045
+ sourceLocation: {
2046
+ "file": "src/host/index.ts",
2047
+ "line": 516,
2048
+ "column": 3
2049
+ }
2050
+ },
2051
+ {
2052
+ id: "@achasoft/dsh-advanced-sidebar#advancedSidebar/previewRelease",
2053
+ service: "advancedSidebar",
2054
+ namespace: "advancedSidebar",
2055
+ method: "previewRelease",
2056
+ invocation: { kind: "direct" },
2057
+ parameters: [{
2058
+ name: "request",
2059
+ wire: "request",
2060
+ source: "json",
2061
+ codec: {
2062
+ mode: "strict",
2063
+ typeSymbol: "../src/host/types.ts#PreviewReleaseRequest",
2064
+ schema: _achasoft_dsh_advanced_sidebar_advancedSidebar_previewRelease_parameter_0$schema
2065
+ }
2066
+ }],
2067
+ result: {
2068
+ mode: "strict",
2069
+ typeSymbol: "../src/host/types.ts#PreviewReleaseResult",
2070
+ schema: _achasoft_dsh_advanced_sidebar_advancedSidebar_previewRelease_result$schema
2071
+ },
2072
+ sourceLocation: {
2073
+ "file": "src/host/index.ts",
2074
+ "line": 536,
1770
2075
  "column": 3
1771
2076
  }
1772
2077
  },
@@ -1794,7 +2099,7 @@ const TYPERT = {
1794
2099
  },
1795
2100
  sourceLocation: {
1796
2101
  "file": "src/host/index.ts",
1797
- "line": 422,
2102
+ "line": 549,
1798
2103
  "column": 3
1799
2104
  }
1800
2105
  },
@@ -1821,7 +2126,7 @@ const TYPERT = {
1821
2126
  },
1822
2127
  sourceLocation: {
1823
2128
  "file": "src/host/index.ts",
1824
- "line": 443,
2129
+ "line": 570,
1825
2130
  "column": 3
1826
2131
  }
1827
2132
  },
@@ -1848,7 +2153,7 @@ const TYPERT = {
1848
2153
  },
1849
2154
  sourceLocation: {
1850
2155
  "file": "src/host/index.ts",
1851
- "line": 453,
2156
+ "line": 580,
1852
2157
  "column": 3
1853
2158
  }
1854
2159
  },
@@ -1875,7 +2180,7 @@ const TYPERT = {
1875
2180
  },
1876
2181
  sourceLocation: {
1877
2182
  "file": "src/host/index.ts",
1878
- "line": 358,
2183
+ "line": 415,
1879
2184
  "column": 3
1880
2185
  }
1881
2186
  },
@@ -1903,7 +2208,7 @@ const TYPERT = {
1903
2208
  },
1904
2209
  sourceLocation: {
1905
2210
  "file": "src/host/index.ts",
1906
- "line": 318,
2211
+ "line": 375,
1907
2212
  "column": 3
1908
2213
  }
1909
2214
  },
@@ -1930,7 +2235,7 @@ const TYPERT = {
1930
2235
  },
1931
2236
  sourceLocation: {
1932
2237
  "file": "src/host/index.ts",
1933
- "line": 328,
2238
+ "line": 385,
1934
2239
  "column": 3
1935
2240
  }
1936
2241
  },
@@ -1957,7 +2262,7 @@ const TYPERT = {
1957
2262
  },
1958
2263
  sourceLocation: {
1959
2264
  "file": "src/host/index.ts",
1960
- "line": 348,
2265
+ "line": 405,
1961
2266
  "column": 3
1962
2267
  }
1963
2268
  },
@@ -1984,7 +2289,7 @@ const TYPERT = {
1984
2289
  },
1985
2290
  sourceLocation: {
1986
2291
  "file": "src/host/index.ts",
1987
- "line": 338,
2292
+ "line": 395,
1988
2293
  "column": 3
1989
2294
  }
1990
2295
  }