@@ -62,6 +62,12 @@ transport formats, please look [here](./protocol-architecture).
62
62
- [ ` LibraryVersion ` ] ( #libraryversion )
63
63
- [ ` Contact ` ] ( #contact )
64
64
- [ ` EditionReference ` ] ( #editionreference )
65
+ - [ ` ComponentGroups ` ] ( #componentgroups )
66
+ - [ ` ComponentGroup ` ] ( #componentgroup )
67
+ - [ ` ExtendedComponentGroup ` ] ( #extendedcomponentgroup )
68
+ - [ ` ModuleReference ` ] ( #modulereference )
69
+ - [ ` Component ` ] ( #component )
70
+ - [ ` LibraryComponentGroup ` ] ( #librarycomponentgroup )
65
71
- [ Connection Management] ( #connection-management )
66
72
- [ ` session/initProtocolConnection ` ] ( #sessioninitprotocolconnection )
67
73
- [ ` session/initBinaryConnection ` ] ( #sessioninitbinaryconnection )
@@ -156,10 +162,12 @@ transport formats, please look [here](./protocol-architecture).
156
162
- [ ` editions/setProjectParentEdition ` ] ( #editionssetprojectparentedition )
157
163
- [ ` editions/setProjectLocalLibrariesPreference ` ] ( #editionssetprojectlocallibrariespreference )
158
164
- [ ` editions/listDefinedLibraries ` ] ( #editionslistdefinedlibraries )
165
+ - [ ` editions/listDefinedComponents ` ] ( #editionslistdefinedcomponents )
159
166
- [ ` library/listLocal ` ] ( #librarylistlocal )
160
167
- [ ` library/create ` ] ( #librarycreate )
161
168
- [ ` library/getMetadata ` ] ( #librarygetmetadata )
162
169
- [ ` library/setMetadata ` ] ( #librarysetmetadata )
170
+ - [ ` library/getPackage ` ] ( #librarygetpackage )
163
171
- [ ` library/publish ` ] ( #librarypublish )
164
172
- [ ` library/preinstall ` ] ( #librarypreinstall )
165
173
- [ Errors] ( #errors-75 )
@@ -204,6 +212,7 @@ transport formats, please look [here](./protocol-architecture).
204
212
- [ ` LibraryNotResolved ` ] ( #librarynotresolved )
205
213
- [ ` InvalidLibraryName ` ] ( #invalidlibraryname )
206
214
- [ ` DependencyDiscoveryError ` ] ( #dependencydiscoveryerror )
215
+ - [ ` InvalidSemverVersion ` ] ( #invalidsemverversion )
207
216
208
217
<!-- /MarkdownTOC -->
209
218
@@ -1418,6 +1427,114 @@ interface NamedEdition {
1418
1427
}
1419
1428
```
1420
1429
1430
+ ### ` ComponentGroups `
1431
+
1432
+ The description of component groups provided by the package. Object fields can
1433
+ be omitted if the corresponding list is empty.
1434
+
1435
+ ``` typescript
1436
+ interface ComponentGroups {
1437
+ /** The list of component groups provided by the package. */
1438
+ newGroups? : ComponentGroup [];
1439
+
1440
+ /** The list of component groups that this package extends.*/
1441
+ extendedGroups? : ExtendedComponentGroup [];
1442
+ }
1443
+ ```
1444
+
1445
+ ### ` ComponentGroup `
1446
+
1447
+ The definition of a single component group.
1448
+
1449
+ ``` typescript
1450
+ interface ComponentGroup {
1451
+ /** The module name containing the declared componennts. */
1452
+ module: string ;
1453
+
1454
+ color? : string ;
1455
+
1456
+ icon? : string ;
1457
+
1458
+ /** The list of components provided by this component group. */
1459
+ exports: Component [];
1460
+ }
1461
+ ```
1462
+
1463
+ ### ` ExtendedComponentGroup `
1464
+
1465
+ The definition of a component group that extends an existing one.
1466
+
1467
+ ``` typescript
1468
+ interface ExtendedComponentGroup {
1469
+ /** The reference to the component group module being extended. */
1470
+ module: ModuleReference ;
1471
+
1472
+ /** The list of components provided by this component group. */
1473
+ exports: Component [];
1474
+ }
1475
+ ```
1476
+
1477
+ ### ` ModuleReference `
1478
+
1479
+ The reference to a module.
1480
+
1481
+ ``` typescript
1482
+ interface ModuleReference {
1483
+ /**
1484
+ * A string consisting of a namespace and a lirary name separated by the dot
1485
+ * <namespace>.<library name>, i.e. `Standard.Base`.
1486
+ */
1487
+ libraryName: string ;
1488
+
1489
+ /** The module name without the library name prefix.
1490
+ * E.g. given the `Standard.Base.Data.Vector` module reference,
1491
+ * the `moduleName` field contains `Data.Vector`.
1492
+ */
1493
+ moduleName: string ;
1494
+ }
1495
+ ```
1496
+
1497
+ ### ` Component `
1498
+
1499
+ A single component of a component group.
1500
+
1501
+ ``` typescript
1502
+ interface Component {
1503
+ /** The component name. */
1504
+ name: string ;
1505
+
1506
+ /** The component shortcut. */
1507
+ shortcut? : string ;
1508
+ }
1509
+ ```
1510
+
1511
+ ### ` LibraryComponentGroup `
1512
+
1513
+ The component group provided by a library.
1514
+
1515
+ ``` typescript
1516
+ interface LibraryComponentGroup {
1517
+ /**
1518
+ * A string consisting of a namespace and a lirary name separated by the dot
1519
+ * <namespace>.<library name>, i.e. `Standard.Base`.
1520
+ */
1521
+ library: string ;
1522
+
1523
+ /** The module name without the library name prefix.
1524
+ * E.g. given the `Standard.Base.Data.Vector` module reference,
1525
+ * the `module` field contains `Data.Vector`.
1526
+ */
1527
+ module: string ;
1528
+
1529
+ color? : string ;
1530
+
1531
+ icon? : string ;
1532
+
1533
+ /** The list of components provided by this component group. */
1534
+ exports: Component [];
1535
+ }
1536
+ ```
1537
+
1421
1538
## Connection Management
1422
1539
1423
1540
In order to properly set-up and tear-down the language server connection, we
@@ -4305,6 +4422,33 @@ To get local libraries that are not directly referenced in the edition, use
4305
4422
4306
4423
#### Errors
4307
4424
4425
+ - [ ` EditionNotFoundError ` ] ( #editionnotfounderror ) indicates that the requested
4426
+ edition, or an edition referenced in one of its parents, could not be found.
4427
+ - [ ` FileSystemError ` ] ( #filesystemerror ) to signal a generic, unrecoverable
4428
+ file-system error.
4429
+
4430
+ ### ` editions/listDefinedComponents `
4431
+
4432
+ Lists all the component groups defined in an edition.
4433
+
4434
+ #### Parameters
4435
+
4436
+ ``` typescript
4437
+ {
4438
+ edition : EditionReference ;
4439
+ }
4440
+ ```
4441
+
4442
+ #### Result
4443
+
4444
+ ``` typescript
4445
+ {
4446
+ availableComponents : LibraryComponentGroup [];
4447
+ }
4448
+ ```
4449
+
4450
+ #### Errors
4451
+
4308
4452
- [ ` EditionNotFoundError ` ] ( #editionnotfounderror ) indicates that the requested
4309
4453
edition, or an edition referenced in one of its parents, could not be found.
4310
4454
- [ ` FileSystemError ` ] ( #filesystemerror ) to signal a generic, unrecoverable
@@ -4412,6 +4556,8 @@ All returned fields are optional, as they may be missing.
4412
4556
4413
4557
- [ ` LocalLibraryNotFound ` ] ( #locallibrarynotfound ) to signal that a local library
4414
4558
with the given name does not exist on the local libraries path.
4559
+ - [ ` InvalidSemverVersion ` ] ( #invalidsemverversion ) to signal that the provided
4560
+ version string is not a valid semver version.
4415
4561
- [ ` FileSystemError ` ] ( #filesystemerror ) to signal a generic, unrecoverable
4416
4562
file-system error.
4417
4563
@@ -4446,6 +4592,47 @@ null;
4446
4592
- [ ` FileSystemError ` ] ( #filesystemerror ) to signal a generic, unrecoverable
4447
4593
file-system error.
4448
4594
4595
+ ### ` library/getPackage `
4596
+
4597
+ Gets the package config associated with a specific library version.
4598
+
4599
+ If the version is ` LocalLibraryVersion ` , it will try to read the package file of
4600
+ the local library and return an empty result if the manifest does not exist.
4601
+
4602
+ If the version is ` PublishedLibraryVersion ` , it will fetch the package config
4603
+ from the library repository. A cached package config may also be used, if it is
4604
+ available.
4605
+
4606
+ All returned fields are optional, as they may be missing.
4607
+
4608
+ #### Parameters
4609
+
4610
+ ``` typescript
4611
+ {
4612
+ namespace : String ;
4613
+ name : String ;
4614
+ version : LibraryVersion ;
4615
+ }
4616
+ ```
4617
+
4618
+ #### Results
4619
+
4620
+ ``` typescript
4621
+ {
4622
+ license ?: String ;
4623
+ componentGroups ?: ComponentGroups ;
4624
+ }
4625
+ ```
4626
+
4627
+ #### Errors
4628
+
4629
+ - [ ` LocalLibraryNotFound ` ] ( #locallibrarynotfound ) to signal that a local library
4630
+ with the given name does not exist on the local libraries path.
4631
+ - [ ` InvalidSemverVersion ` ] ( #invalidsemverversion ) to signal that the provided
4632
+ version string is not a valid semver version.
4633
+ - [ ` FileSystemError ` ] ( #filesystemerror ) to signal a generic, unrecoverable
4634
+ file-system error.
4635
+
4449
4636
### ` library/publish `
4450
4637
4451
4638
Publishes a library located in the local libraries directory to the main Enso
@@ -5083,3 +5270,18 @@ dependencies of the requested library.
5083
5270
" message" : " Error occurred while discovering dependencies: <reason>."
5084
5271
}
5085
5272
```
5273
+
5274
+ ### ` InvalidSemverVersion `
5275
+
5276
+ Signals that the provided version string is not a valid semver version. The
5277
+ message contains the invalid version in the payload.
5278
+
5279
+ ``` typescript
5280
+ " error" : {
5281
+ " code" : 8011 ,
5282
+ " message" : " [<invalid-version>] is not a valid semver version." ,
5283
+ " payload" : {
5284
+ " version" : " <invalid-version>"
5285
+ }
5286
+ }
5287
+ ```
0 commit comments