@dougbots/avenor-core 0.10.1 → 0.10.2

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/index.d.ts CHANGED
@@ -420,7 +420,7 @@ declare class Supervisor {
420
420
  declare function socketsRoot(): string;
421
421
  //#endregion
422
422
  //#region src/tools/get-supervisor-client.d.ts
423
- declare function getSupervisorClient(supervisorId: string): Promise<{
423
+ declare function getSupervisorClient(supervisorId: string | undefined): Promise<{
424
424
  client: Client;
425
425
  isSingleton: boolean;
426
426
  sup: Supervisor | null;
package/dist/index.js CHANGED
@@ -1641,6 +1641,15 @@ function validateObservedAt(observedAt) {
1641
1641
  //#endregion
1642
1642
  //#region src/tools/get-supervisor-client.ts
1643
1643
  async function getSupervisorClient(supervisorId) {
1644
+ if (supervisorId === void 0) {
1645
+ const sup = await Supervisor.get();
1646
+ return {
1647
+ client: sup.getClient(),
1648
+ isSingleton: true,
1649
+ sup,
1650
+ supervisorId: sup.supervisorId
1651
+ };
1652
+ }
1644
1653
  const id = validateSupervisorSocketPath(supervisorId);
1645
1654
  const current = Supervisor.currentInstance();
1646
1655
  if (current !== null && validateSupervisorSocketPath(current.supervisorId) === id) return {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dougbots/avenor-core",
3
- "version": "0.10.1",
3
+ "version": "0.10.2",
4
4
  "type": "module",
5
5
  "repository": {
6
6
  "type": "git",