@skrr-ai/cli 0.1.70 → 0.1.71

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.
@@ -4,6 +4,7 @@ const core_1 = require("@oclif/core");
4
4
  const data_provider_1 = require("@skrr-ai/data-provider");
5
5
  const base_command_1 = require("../../base-command");
6
6
  const format_1 = require("../../lib/format");
7
+ const workspaces_1 = require("../../lib/workspaces");
7
8
  /** The buyer's installed copies, including stopped copies and their source releases. */
8
9
  class StoreInstalls extends base_command_1.BaseCommand {
9
10
  static description = 'List your Store installs and the releases they came from';
@@ -17,6 +18,8 @@ class StoreInstalls extends base_command_1.BaseCommand {
17
18
  async run() {
18
19
  this.requireAuth();
19
20
  const { flags } = await this.parse(StoreInstalls);
21
+ const workspaceId = await (0, workspaces_1.ambientWorkspaceId)();
22
+ (0, data_provider_1.setWorkspaceIdHeader)(workspaceId ?? null);
20
23
  let response;
21
24
  try {
22
25
  response = await data_provider_1.dataService.getStoreInstalls();
@@ -27,11 +30,13 @@ class StoreInstalls extends base_command_1.BaseCommand {
27
30
  }
28
31
  const installs = response?.installs ?? [];
29
32
  if (flags.json) {
30
- this.log(JSON.stringify({ object: 'list', data: installs }, null, 2));
33
+ this.log(JSON.stringify({ object: 'list', workspaceId: workspaceId ?? null, data: installs }, null, 2));
31
34
  return;
32
35
  }
33
36
  if (installs.length === 0) {
34
- this.log('No Store installs found.');
37
+ this.log(workspaceId
38
+ ? `No Store installs found in workspace ${workspaceId}.`
39
+ : 'No Store installs found; select a workspace with --workspace to check another scope.');
35
40
  return;
36
41
  }
37
42
  (0, format_1.renderTable)(installs.map((install) => ({
@@ -4,6 +4,7 @@ const core_1 = require("@oclif/core");
4
4
  const data_provider_1 = require("@skrr-ai/data-provider");
5
5
  const base_command_1 = require("../../base-command");
6
6
  const format_1 = require("../../lib/format");
7
+ const workspaces_1 = require("../../lib/workspaces");
7
8
  /**
8
9
  * What is waiting on you across everything you installed.
9
10
  *
@@ -37,6 +38,7 @@ class StoreUpdates extends base_command_1.BaseCommand {
37
38
  async run() {
38
39
  this.requireAuth();
39
40
  const { flags } = await this.parse(StoreUpdates);
41
+ (0, data_provider_1.setWorkspaceIdHeader)((await (0, workspaces_1.ambientWorkspaceId)()) ?? null);
40
42
  let installs;
41
43
  try {
42
44
  installs = await data_provider_1.dataService.getStoreInstalls();
@@ -30,6 +30,7 @@ class WorkspacesList extends base_command_1.BaseCommand {
30
30
  if (flags.json) {
31
31
  this.log(JSON.stringify({
32
32
  selected: current ?? null,
33
+ defaultWorkspaceId: listing.defaultWorkspaceId,
33
34
  workspaces: rows.map((r) => ({ ...r, inUse: r.id === current })),
34
35
  }, null, 2));
35
36
  return;