@uipath/admin-tool 1.205.0-preview.281 → 1.206.0-preview.279

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.
@@ -1,28 +1,27 @@
1
1
  import {
2
- getLoginStatusAsync
3
- } from "./tool-nwbftwhg.js";
4
- import {
5
- DEFAULT_PAGE_SIZE,
6
- Option,
7
- OutputFormatter,
8
- RESULTS,
9
- addSdkUserAgentHeader,
10
2
  catchError,
11
- createHiddenDeprecatedTenantOption,
12
3
  extractErrorMessage,
13
- getSdkUserAgentToken,
14
- installSdkUserAgentHeader,
4
+ RESULTS,
5
+ Option,
6
+ OutputFormatter,
15
7
  processContext,
8
+ DEFAULT_PAGE_SIZE,
16
9
  resolveDeprecatedOptionAlias,
17
- warnDeprecatedOptionAlias
18
- } from "./tool-2wtwtawb.js";
19
- import"./tool-1yh8g550.js";
10
+ warnDeprecatedOptionAlias,
11
+ createHiddenDeprecatedTenantOption,
12
+ getSdkUserAgentToken,
13
+ addSdkUserAgentHeader,
14
+ installSdkUserAgentHeader
15
+ } from "./tool-zg1at4tw.js";
16
+ import {
17
+ getAuthContext
18
+ } from "./tool-1nnqcf86.js";
20
19
  // ../resourcecatalog-tool/package.json
21
20
  var package_default = {
22
21
  name: "@uipath/resourcecatalog-tool",
23
22
  author: "UiPath",
24
23
  license: "SEE LICENSE IN LICENSE.txt",
25
- version: "1.205.0-preview.281",
24
+ version: "1.206.0-preview.279",
26
25
  description: "CLI plugin for the UiPath Resource Catalog Service.",
27
26
  private: false,
28
27
  repository: {
@@ -319,7 +318,7 @@ var package_default2 = {
319
318
  name: "@uipath/resourcecatalog-sdk",
320
319
  author: "UiPath",
321
320
  license: "SEE LICENSE IN LICENSE.txt",
322
- version: "1.205.0",
321
+ version: "1.206.0",
323
322
  description: "SDK for the UiPath Resource Catalog Service API.",
324
323
  repository: {
325
324
  type: "git",
@@ -1709,28 +1708,22 @@ class TagsApi extends BaseAPI {
1709
1708
  }
1710
1709
  // ../resourcecatalog-sdk/src/client-factory.ts
1711
1710
  async function resolveConfig(options) {
1712
- const status = await getLoginStatusAsync({
1713
- ensureTokenValidityMinutes: options?.loginValidity
1711
+ const auth = await getAuthContext({
1712
+ ensureTokenValidityMinutes: options?.loginValidity,
1713
+ tenant: options?.tenantName,
1714
+ requireOrganizationId: true,
1715
+ requireTenantName: true
1714
1716
  });
1715
- if (status.loginStatus !== "Logged in" || !status.baseUrl || !status.accessToken) {
1716
- throw new Error(status.hint ? `Not logged in. ${status.hint}` : "Not logged in. Run 'uip login' first.");
1717
- }
1718
- if (!status.organizationId) {
1719
- throw new Error("Organization ID not available. Ensure you are logged in with an organization context.");
1720
- }
1721
- const tenant = options?.tenantName ?? status.tenantName;
1722
- if (!tenant) {
1723
- throw new Error("Tenant not available. Run 'uip login' to select a tenant, or use 'uip login tenant set <tenant>' to switch tenants.");
1724
- }
1725
- const basePath = `${status.baseUrl}/${status.organizationId}/${tenant}/resourcecatalog_`;
1726
- const bearerToken = options?.s2sToken ?? status.accessToken;
1717
+ const tenant = auth.tenantName;
1718
+ const basePath = `${auth.baseUrl}/${encodeURIComponent(auth.organizationId)}/${encodeURIComponent(tenant)}/resourcecatalog_`;
1719
+ const bearerToken = options?.s2sToken ?? auth.accessToken;
1727
1720
  return {
1728
1721
  config: new Configuration({
1729
1722
  basePath,
1730
1723
  accessToken: async () => bearerToken,
1731
1724
  headers: addSdkUserAgentHeader(undefined, SDK_USER_AGENT)
1732
1725
  }),
1733
- organizationId: status.organizationId,
1726
+ organizationId: auth.organizationId,
1734
1727
  tenantName: tenant
1735
1728
  };
1736
1729
  }
@@ -1970,8 +1963,7 @@ var registerCommands = async (program) => {
1970
1963
  registerRcsCommand(program);
1971
1964
  };
1972
1965
  export {
1973
- metadata,
1974
1966
  registerCommands
1975
1967
  };
1976
1968
 
1977
- //# debugId=CC11A6FFE7EF5B4D64756E2164756E21
1969
+ //# debugId=83CF608D03EC985364756E2164756E21