@forge/cli-shared 10.0.0-next.13 → 10.0.0-next.14

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 (227) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/out/app-logs/graphql-client.d.ts +2 -2
  3. package/out/app-logs/graphql-client.d.ts.map +1 -1
  4. package/out/app-logs/graphql-client.js +9 -17
  5. package/out/app-logs/index.d.ts +2 -2
  6. package/out/app-logs/index.d.ts.map +1 -1
  7. package/out/app-logs/index.js +2 -5
  8. package/out/app-logs/view-logs.d.ts +4 -4
  9. package/out/app-logs/view-logs.d.ts.map +1 -1
  10. package/out/app-logs/view-logs.js +8 -12
  11. package/out/apps/app-config.d.ts +2 -2
  12. package/out/apps/app-config.d.ts.map +1 -1
  13. package/out/apps/app-config.js +13 -20
  14. package/out/apps/create-an-app.d.ts +4 -4
  15. package/out/apps/create-an-app.d.ts.map +1 -1
  16. package/out/apps/create-an-app.js +6 -11
  17. package/out/apps/create-app-graphql-client.d.ts +2 -2
  18. package/out/apps/create-app-graphql-client.d.ts.map +1 -1
  19. package/out/apps/create-app-graphql-client.js +9 -14
  20. package/out/apps/get-app-owner.d.ts +4 -4
  21. package/out/apps/get-app-owner.d.ts.map +1 -1
  22. package/out/apps/get-app-owner.js +8 -13
  23. package/out/apps/index.d.ts +9 -9
  24. package/out/apps/index.d.ts.map +1 -1
  25. package/out/apps/index.js +9 -12
  26. package/out/apps/package-installer.d.ts +1 -1
  27. package/out/apps/package-installer.d.ts.map +1 -1
  28. package/out/apps/package-installer.js +9 -14
  29. package/out/apps/register-app.d.ts +4 -4
  30. package/out/apps/register-app.d.ts.map +1 -1
  31. package/out/apps/register-app.js +9 -13
  32. package/out/apps/sites.js +1 -4
  33. package/out/apps/template-module.js +27 -33
  34. package/out/apps/template.d.ts +3 -3
  35. package/out/apps/template.d.ts.map +1 -1
  36. package/out/apps/template.js +36 -47
  37. package/out/ari/ari.js +48 -63
  38. package/out/ari/index.d.ts +1 -1
  39. package/out/ari/index.d.ts.map +1 -1
  40. package/out/ari/index.js +1 -4
  41. package/out/auth/authenticator.js +2 -6
  42. package/out/auth/index.d.ts +3 -3
  43. package/out/auth/index.d.ts.map +1 -1
  44. package/out/auth/index.js +3 -6
  45. package/out/auth/instruction.js +3 -6
  46. package/out/auth/personal/credential-store.d.ts +2 -2
  47. package/out/auth/personal/credential-store.d.ts.map +1 -1
  48. package/out/auth/personal/credential-store.js +48 -57
  49. package/out/auth/personal/index.d.ts +6 -6
  50. package/out/auth/personal/index.d.ts.map +1 -1
  51. package/out/auth/personal/index.js +6 -9
  52. package/out/auth/personal/login.d.ts +3 -3
  53. package/out/auth/personal/login.d.ts.map +1 -1
  54. package/out/auth/personal/login.js +1 -5
  55. package/out/auth/personal/logout.d.ts +1 -1
  56. package/out/auth/personal/logout.d.ts.map +1 -1
  57. package/out/auth/personal/logout.js +1 -5
  58. package/out/auth/personal/me-graphql-client.d.ts +3 -3
  59. package/out/auth/personal/me-graphql-client.d.ts.map +1 -1
  60. package/out/auth/personal/me-graphql-client.js +7 -12
  61. package/out/auth/personal/token-authenticator.d.ts +3 -3
  62. package/out/auth/personal/token-authenticator.d.ts.map +1 -1
  63. package/out/auth/personal/token-authenticator.js +10 -14
  64. package/out/auth/personal/user-repository.d.ts +4 -4
  65. package/out/auth/personal/user-repository.d.ts.map +1 -1
  66. package/out/auth/personal/user-repository.js +5 -9
  67. package/out/cache/cached-conf.d.ts.map +1 -1
  68. package/out/cache/cached-conf.js +5 -10
  69. package/out/cache/index.d.ts +1 -1
  70. package/out/cache/index.d.ts.map +1 -1
  71. package/out/cache/index.js +1 -4
  72. package/out/config/config-codec-types.js +1 -2
  73. package/out/config/config-file-section-reader.d.ts +3 -3
  74. package/out/config/config-file-section-reader.d.ts.map +1 -1
  75. package/out/config/config-file-section-reader.js +4 -10
  76. package/out/config/config-file-section-writer.d.ts +3 -3
  77. package/out/config/config-file-section-writer.d.ts.map +1 -1
  78. package/out/config/config-file-section-writer.js +2 -7
  79. package/out/config/config-file.d.ts +3 -3
  80. package/out/config/config-file.d.ts.map +1 -1
  81. package/out/config/config-file.js +40 -49
  82. package/out/config/config-section.js +4 -11
  83. package/out/config/config.d.ts +1 -1
  84. package/out/config/config.d.ts.map +1 -1
  85. package/out/config/config.js +7 -13
  86. package/out/config/index.d.ts +6 -6
  87. package/out/config/index.d.ts.map +1 -1
  88. package/out/config/index.js +6 -9
  89. package/out/file-system/archiver.d.ts +2 -2
  90. package/out/file-system/archiver.d.ts.map +1 -1
  91. package/out/file-system/archiver.js +20 -29
  92. package/out/file-system/file-system-reader.d.ts.map +1 -1
  93. package/out/file-system/file-system-reader.js +21 -26
  94. package/out/file-system/file-system-writer.js +5 -10
  95. package/out/file-system/index.d.ts +5 -5
  96. package/out/file-system/index.d.ts.map +1 -1
  97. package/out/file-system/index.js +5 -8
  98. package/out/file-system/util.js +1 -4
  99. package/out/file-system/zip-accessor.js +3 -8
  100. package/out/graphql/app-environment-graphql-client.d.ts +2 -2
  101. package/out/graphql/app-environment-graphql-client.d.ts.map +1 -1
  102. package/out/graphql/app-environment-graphql-client.js +10 -16
  103. package/out/graphql/app-oauth-client-id-graphql-client.d.ts +1 -1
  104. package/out/graphql/app-oauth-client-id-graphql-client.d.ts.map +1 -1
  105. package/out/graphql/app-oauth-client-id-graphql-client.js +6 -10
  106. package/out/graphql/debugging-graphql-runner.d.ts +2 -2
  107. package/out/graphql/debugging-graphql-runner.d.ts.map +1 -1
  108. package/out/graphql/debugging-graphql-runner.js +5 -10
  109. package/out/graphql/gateway.js +15 -23
  110. package/out/graphql/get-mutation-error.js +4 -8
  111. package/out/graphql/gql/gql.d.ts +82 -82
  112. package/out/graphql/gql/gql.d.ts.map +1 -1
  113. package/out/graphql/gql/gql.js +2 -6
  114. package/out/graphql/gql/graphql.d.ts +4 -0
  115. package/out/graphql/gql/graphql.d.ts.map +1 -1
  116. package/out/graphql/gql/graphql.js +83 -88
  117. package/out/graphql/gql/index.d.ts +1 -1
  118. package/out/graphql/gql/index.d.ts.map +1 -1
  119. package/out/graphql/gql/index.js +1 -4
  120. package/out/graphql/graphql-client.js +1 -2
  121. package/out/graphql/graphql-domain-types.d.ts +1 -1
  122. package/out/graphql/graphql-domain-types.d.ts.map +1 -1
  123. package/out/graphql/graphql-domain-types.js +1 -2
  124. package/out/graphql/graphql-runtime-enums.js +16 -19
  125. package/out/graphql/index.d.ts +12 -12
  126. package/out/graphql/index.d.ts.map +1 -1
  127. package/out/graphql/index.js +12 -17
  128. package/out/graphql/minimal-graphql-runner.d.ts +4 -4
  129. package/out/graphql/minimal-graphql-runner.d.ts.map +1 -1
  130. package/out/graphql/minimal-graphql-runner.js +31 -40
  131. package/out/graphql/mutation-aware-graphql-client.d.ts +2 -2
  132. package/out/graphql/mutation-aware-graphql-client.d.ts.map +1 -1
  133. package/out/graphql/mutation-aware-graphql-client.js +4 -10
  134. package/out/graphql/path-based-graphql-client-resolver.d.ts +1 -1
  135. package/out/graphql/path-based-graphql-client-resolver.d.ts.map +1 -1
  136. package/out/graphql/path-based-graphql-client-resolver.js +3 -7
  137. package/out/http-client/feedback-post-client.js +1 -5
  138. package/out/http-client/file-uploader.d.ts +1 -1
  139. package/out/http-client/file-uploader.d.ts.map +1 -1
  140. package/out/http-client/file-uploader.js +11 -18
  141. package/out/http-client/global-edge-http-client.js +8 -14
  142. package/out/http-client/index.d.ts +5 -5
  143. package/out/http-client/index.d.ts.map +1 -1
  144. package/out/http-client/index.js +5 -8
  145. package/out/http-client/node-request.js +10 -16
  146. package/out/http-client/trace.js +1 -4
  147. package/out/index.d.ts +13 -13
  148. package/out/index.d.ts.map +1 -1
  149. package/out/index.js +13 -16
  150. package/out/service/bridge-script-service.js +5 -9
  151. package/out/service/i18n-resource-bundling-service.js +24 -30
  152. package/out/service/iframe-resizer-script-service.js +5 -9
  153. package/out/service/index.d.ts +5 -5
  154. package/out/service/index.d.ts.map +1 -1
  155. package/out/service/index.js +5 -8
  156. package/out/service/statsig-service.d.ts +1 -1
  157. package/out/service/statsig-service.d.ts.map +1 -1
  158. package/out/service/statsig-service.js +9 -15
  159. package/out/service/supported-products-service.d.ts +2 -2
  160. package/out/service/supported-products-service.d.ts.map +1 -1
  161. package/out/service/supported-products-service.js +13 -18
  162. package/out/shared/assertUnreachable.js +1 -4
  163. package/out/shared/assistant-cli.d.ts +1 -1
  164. package/out/shared/assistant-cli.d.ts.map +1 -1
  165. package/out/shared/assistant-cli.js +15 -24
  166. package/out/shared/cli-details.js +6 -11
  167. package/out/shared/developer-console.js +12 -18
  168. package/out/shared/directories.js +4 -8
  169. package/out/shared/environment.d.ts +1 -1
  170. package/out/shared/environment.d.ts.map +1 -1
  171. package/out/shared/environment.js +19 -25
  172. package/out/shared/error-handling.d.ts +1 -1
  173. package/out/shared/error-handling.d.ts.map +1 -1
  174. package/out/shared/error-handling.js +24 -44
  175. package/out/shared/forge-cli-attribution.js +6 -11
  176. package/out/shared/index.d.ts +13 -13
  177. package/out/shared/index.d.ts.map +1 -1
  178. package/out/shared/index.js +13 -16
  179. package/out/shared/installations.js +1 -4
  180. package/out/shared/pause.js +1 -5
  181. package/out/shared/product.d.ts.map +1 -1
  182. package/out/shared/product.js +5 -10
  183. package/out/shared/read-app-config-files.d.ts +1 -1
  184. package/out/shared/read-app-config-files.d.ts.map +1 -1
  185. package/out/shared/read-app-config-files.js +6 -12
  186. package/out/shared/runner-signals.js +1 -5
  187. package/out/shared/test.d.ts +1 -1
  188. package/out/shared/test.d.ts.map +1 -1
  189. package/out/shared/test.js +24 -29
  190. package/out/tunnel/docker-compose-lifecycle.d.ts +3 -3
  191. package/out/tunnel/docker-compose-lifecycle.d.ts.map +1 -1
  192. package/out/tunnel/docker-compose-lifecycle.js +53 -70
  193. package/out/tunnel/index.d.ts +2 -2
  194. package/out/tunnel/index.d.ts.map +1 -1
  195. package/out/tunnel/index.js +2 -5
  196. package/out/tunnel/tunnel-options.js +13 -18
  197. package/out/ui/command-line-ui.d.ts +2 -2
  198. package/out/ui/command-line-ui.d.ts.map +1 -1
  199. package/out/ui/command-line-ui.js +53 -58
  200. package/out/ui/hint-rotation.d.ts +2 -2
  201. package/out/ui/hint-rotation.d.ts.map +1 -1
  202. package/out/ui/hint-rotation.js +2 -6
  203. package/out/ui/index.d.ts +8 -8
  204. package/out/ui/index.d.ts.map +1 -1
  205. package/out/ui/index.js +8 -11
  206. package/out/ui/log-color.js +16 -20
  207. package/out/ui/log-symbols.js +10 -13
  208. package/out/ui/logger.js +2 -6
  209. package/out/ui/multiple-table-prompt.d.ts +1 -1
  210. package/out/ui/multiple-table-prompt.d.ts.map +1 -1
  211. package/out/ui/multiple-table-prompt.js +13 -20
  212. package/out/ui/runtime-log.js +12 -16
  213. package/out/ui/single-table-prompt.d.ts +1 -1
  214. package/out/ui/single-table-prompt.d.ts.map +1 -1
  215. package/out/ui/single-table-prompt.js +12 -19
  216. package/out/ui/table-prompt.d.ts +1 -1
  217. package/out/ui/table-prompt.d.ts.map +1 -1
  218. package/out/ui/table-prompt.js +11 -16
  219. package/out/ui/table.d.ts.map +1 -1
  220. package/out/ui/table.js +4 -7
  221. package/out/ui/text.d.ts +1 -1
  222. package/out/ui/text.d.ts.map +1 -1
  223. package/out/ui/text.js +208 -214
  224. package/out/ui/ui.d.ts +2 -2
  225. package/out/ui/ui.d.ts.map +1 -1
  226. package/out/ui/ui.js +1 -2
  227. package/package.json +2 -1
@@ -1,21 +1,16 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.GlobalEdgeHttpClient = exports.InvalidResponseError = exports.InvalidSiteError = void 0;
4
- const url_1 = require("url");
5
- const ui_1 = require("../ui");
6
- class InvalidSiteError extends Error {
1
+ import { URL } from 'url';
2
+ import { Text } from '../ui/index.js';
3
+ export class InvalidSiteError extends Error {
7
4
  constructor(url) {
8
- super(ui_1.Text.install.error.url(url.toString()));
5
+ super(Text.install.error.url(url.toString()));
9
6
  }
10
7
  }
11
- exports.InvalidSiteError = InvalidSiteError;
12
- class InvalidResponseError extends Error {
8
+ export class InvalidResponseError extends Error {
13
9
  constructor(url) {
14
- super(ui_1.Text.install.error.site(url.toString()));
10
+ super(Text.install.error.site(url.toString()));
15
11
  }
16
12
  }
17
- exports.InvalidResponseError = InvalidResponseError;
18
- class GlobalEdgeHttpClient {
13
+ export class GlobalEdgeHttpClient {
19
14
  fetchClient;
20
15
  constructor(fetchClient) {
21
16
  this.fetchClient = fetchClient;
@@ -39,8 +34,7 @@ class GlobalEdgeHttpClient {
39
34
  throw new InvalidResponseError(site);
40
35
  }
41
36
  buildUrl(site) {
42
- const urlObj = new url_1.URL('/_edge/tenant_info', site.toString());
37
+ const urlObj = new URL('/_edge/tenant_info', site.toString());
43
38
  return urlObj.toString();
44
39
  }
45
40
  }
46
- exports.GlobalEdgeHttpClient = GlobalEdgeHttpClient;
@@ -1,6 +1,6 @@
1
- export * from './file-uploader';
2
- export * from './global-edge-http-client';
3
- export * from './feedback-post-client';
4
- export * from './node-request';
5
- export * from './trace';
1
+ export * from './file-uploader.js';
2
+ export * from './global-edge-http-client.js';
3
+ export * from './feedback-post-client.js';
4
+ export * from './node-request.js';
5
+ export * from './trace.js';
6
6
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/http-client/index.ts"],"names":[],"mappings":"AAEA,cAAc,iBAAiB,CAAC;AAChC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,wBAAwB,CAAC;AACvC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,SAAS,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/http-client/index.ts"],"names":[],"mappings":"AAEA,cAAc,oBAAoB,CAAC;AACnC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,mBAAmB,CAAC;AAClC,cAAc,YAAY,CAAC"}
@@ -1,8 +1,5 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const tslib_1 = require("tslib");
4
- tslib_1.__exportStar(require("./file-uploader"), exports);
5
- tslib_1.__exportStar(require("./global-edge-http-client"), exports);
6
- tslib_1.__exportStar(require("./feedback-post-client"), exports);
7
- tslib_1.__exportStar(require("./node-request"), exports);
8
- tslib_1.__exportStar(require("./trace"), exports);
1
+ export * from './file-uploader.js';
2
+ export * from './global-edge-http-client.js';
3
+ export * from './feedback-post-client.js';
4
+ export * from './node-request.js';
5
+ export * from './trace.js';
@@ -1,15 +1,11 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.sendWithNodeRequest = exports.toHeaders = exports.DEFAULT_NODE_UPLOAD_TIMEOUT_MS = exports.DEFAULT_NODE_REQUEST_TIMEOUT_MS = void 0;
4
- const tslib_1 = require("tslib");
5
- const http_1 = tslib_1.__importDefault(require("http"));
6
- const https_1 = tslib_1.__importDefault(require("https"));
7
- const url_1 = require("url");
1
+ import http from 'http';
2
+ import https from 'https';
3
+ import { URL } from 'url';
8
4
  const DEFAULT_HTTP_ERROR_STATUS = 500;
9
- exports.DEFAULT_NODE_REQUEST_TIMEOUT_MS = 30_000;
10
- exports.DEFAULT_NODE_UPLOAD_TIMEOUT_MS = 300_000;
5
+ export const DEFAULT_NODE_REQUEST_TIMEOUT_MS = 30_000;
6
+ export const DEFAULT_NODE_UPLOAD_TIMEOUT_MS = 300_000;
11
7
  const NO_BODY_STATUS_CODES = new Set([204, 205, 304]);
12
- const toHeaders = (rawHeaders) => {
8
+ export const toHeaders = (rawHeaders) => {
13
9
  const headers = new Headers();
14
10
  Object.entries(rawHeaders).forEach(([key, value]) => {
15
11
  if (Array.isArray(value)) {
@@ -22,11 +18,10 @@ const toHeaders = (rawHeaders) => {
22
18
  });
23
19
  return headers;
24
20
  };
25
- exports.toHeaders = toHeaders;
26
- const sendWithNodeRequest = ({ method, url, headers, body, timeoutMs = exports.DEFAULT_NODE_REQUEST_TIMEOUT_MS }) => {
21
+ export const sendWithNodeRequest = ({ method, url, headers, body, timeoutMs = DEFAULT_NODE_REQUEST_TIMEOUT_MS }) => {
27
22
  return new Promise((resolve, reject) => {
28
- const parsedUrl = new url_1.URL(url);
29
- const transport = parsedUrl.protocol === 'https:' ? https_1.default : http_1.default;
23
+ const parsedUrl = new URL(url);
24
+ const transport = parsedUrl.protocol === 'https:' ? https : http;
30
25
  const request = transport.request(parsedUrl, {
31
26
  method,
32
27
  headers
@@ -41,7 +36,7 @@ const sendWithNodeRequest = ({ method, url, headers, body, timeoutMs = exports.D
41
36
  resolve(new Response(body, {
42
37
  status,
43
38
  statusText: response.statusMessage,
44
- headers: (0, exports.toHeaders)(response.headers)
39
+ headers: toHeaders(response.headers)
45
40
  }));
46
41
  });
47
42
  });
@@ -55,4 +50,3 @@ const sendWithNodeRequest = ({ method, url, headers, body, timeoutMs = exports.D
55
50
  request.end();
56
51
  });
57
52
  };
58
- exports.sendWithNodeRequest = sendWithNodeRequest;
@@ -1,6 +1,3 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getAtlassianTraceId = getAtlassianTraceId;
4
- function getAtlassianTraceId(headers) {
1
+ export function getAtlassianTraceId(headers) {
5
2
  return headers.get('atl-traceid') ?? undefined;
6
3
  }
package/out/index.d.ts CHANGED
@@ -1,14 +1,14 @@
1
- export * from './app-logs';
2
- export * from './apps';
3
- export * from './ari';
4
- export * from './auth';
5
- export * from './cache';
6
- export * from './config';
7
- export * from './file-system';
8
- export * from './graphql';
9
- export * from './http-client';
10
- export * from './service';
11
- export * from './shared';
12
- export * from './tunnel';
13
- export * from './ui';
1
+ export * from './app-logs/index.js';
2
+ export * from './apps/index.js';
3
+ export * from './ari/index.js';
4
+ export * from './auth/index.js';
5
+ export * from './cache/index.js';
6
+ export * from './config/index.js';
7
+ export * from './file-system/index.js';
8
+ export * from './graphql/index.js';
9
+ export * from './http-client/index.js';
10
+ export * from './service/index.js';
11
+ export * from './shared/index.js';
12
+ export * from './tunnel/index.js';
13
+ export * from './ui/index.js';
14
14
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,cAAc,YAAY,CAAC;AAC3B,cAAc,QAAQ,CAAC;AACvB,cAAc,OAAO,CAAC;AACtB,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,eAAe,CAAC;AAC9B,cAAc,WAAW,CAAC;AAC1B,cAAc,eAAe,CAAC;AAC9B,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,MAAM,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,cAAc,qBAAqB,CAAC;AACpC,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,wBAAwB,CAAC;AACvC,cAAc,oBAAoB,CAAC;AACnC,cAAc,wBAAwB,CAAC;AACvC,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC"}
package/out/index.js CHANGED
@@ -1,16 +1,13 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const tslib_1 = require("tslib");
4
- tslib_1.__exportStar(require("./app-logs"), exports);
5
- tslib_1.__exportStar(require("./apps"), exports);
6
- tslib_1.__exportStar(require("./ari"), exports);
7
- tslib_1.__exportStar(require("./auth"), exports);
8
- tslib_1.__exportStar(require("./cache"), exports);
9
- tslib_1.__exportStar(require("./config"), exports);
10
- tslib_1.__exportStar(require("./file-system"), exports);
11
- tslib_1.__exportStar(require("./graphql"), exports);
12
- tslib_1.__exportStar(require("./http-client"), exports);
13
- tslib_1.__exportStar(require("./service"), exports);
14
- tslib_1.__exportStar(require("./shared"), exports);
15
- tslib_1.__exportStar(require("./tunnel"), exports);
16
- tslib_1.__exportStar(require("./ui"), exports);
1
+ export * from './app-logs/index.js';
2
+ export * from './apps/index.js';
3
+ export * from './ari/index.js';
4
+ export * from './auth/index.js';
5
+ export * from './cache/index.js';
6
+ export * from './config/index.js';
7
+ export * from './file-system/index.js';
8
+ export * from './graphql/index.js';
9
+ export * from './http-client/index.js';
10
+ export * from './service/index.js';
11
+ export * from './shared/index.js';
12
+ export * from './tunnel/index.js';
13
+ export * from './ui/index.js';
@@ -1,20 +1,17 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.BridgeScriptService = void 0;
4
- const cheerio_1 = require("cheerio");
5
- const gateway_1 = require("../graphql/gateway");
1
+ import { load } from 'cheerio';
2
+ import { CDNEnvironments, getEnvironmentConfig } from '../graphql/gateway.js';
6
3
  const BRIDGE_CORE_CDN_PATH = 'global-bridge.js';
7
4
  const GLOBAL_FORGE_INSTALL_ID = 'forge';
8
- class BridgeScriptService {
5
+ export class BridgeScriptService {
9
6
  env;
10
- constructor(env = (0, gateway_1.getEnvironmentConfig)(gateway_1.CDNEnvironments)) {
7
+ constructor(env = getEnvironmentConfig(CDNEnvironments)) {
11
8
  this.env = env;
12
9
  }
13
10
  createBridgeCoreScriptTag() {
14
11
  return `<script src="https://${GLOBAL_FORGE_INSTALL_ID}.cdn.${this.env}.atlassian-dev.net/${BRIDGE_CORE_CDN_PATH}"></script>`;
15
12
  }
16
13
  injectBridgeCore(content, onError) {
17
- const $ = (0, cheerio_1.load)(content, { xml: { xmlMode: false } });
14
+ const $ = load(content, { xml: { xmlMode: false } });
18
15
  if ($('html').length === 0)
19
16
  onError();
20
17
  let head = $('head');
@@ -26,4 +23,3 @@ class BridgeScriptService {
26
23
  return Buffer.from($.html());
27
24
  }
28
25
  }
29
- exports.BridgeScriptService = BridgeScriptService;
@@ -1,41 +1,36 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.I18nResourceBundlingService = exports.listFilesInI18nResourceBundle = exports.EMPTY_I18N_RESOURCE_BUNDLE = void 0;
4
- const tslib_1 = require("tslib");
5
- const tmp_1 = tslib_1.__importDefault(require("tmp"));
6
- const fs_1 = require("fs");
7
- const path_1 = require("path");
8
- const i18n_1 = require("@forge/i18n");
9
- const __1 = require("..");
10
- exports.EMPTY_I18N_RESOURCE_BUNDLE = { exists: false };
11
- const listFilesInI18nResourceBundle = (i18nResourceBundle) => {
1
+ import tmp from 'tmp';
2
+ import { promises, readdirSync } from 'fs';
3
+ import { resolve, join } from 'path';
4
+ import { extractI18nKeysFromModules, getTranslationValue, I18N_INFO_FILE_NAME } from '@forge/i18n';
5
+ import { UserError } from '../index.js';
6
+ export const EMPTY_I18N_RESOURCE_BUNDLE = { exists: false };
7
+ export const listFilesInI18nResourceBundle = (i18nResourceBundle) => {
12
8
  if (!i18nResourceBundle.exists) {
13
9
  return [];
14
10
  }
15
- return (0, fs_1.readdirSync)(i18nResourceBundle.path).map((fileName) => [fileName, (0, path_1.join)(i18nResourceBundle.path, fileName)]);
11
+ return readdirSync(i18nResourceBundle.path).map((fileName) => [fileName, join(i18nResourceBundle.path, fileName)]);
16
12
  };
17
- exports.listFilesInI18nResourceBundle = listFilesInI18nResourceBundle;
18
- class I18nResourceBundlingService {
13
+ export class I18nResourceBundlingService {
19
14
  async copyLocaleFilesToBundleDir(bundleDirPath, i18nConfig) {
20
- const providedLocaleFilePaths = i18nConfig.resources.map((resource) => [resource.key, (0, path_1.resolve)(resource.path)]);
15
+ const providedLocaleFilePaths = i18nConfig.resources.map((resource) => [resource.key, resolve(resource.path)]);
21
16
  await Promise.all(providedLocaleFilePaths.map(async ([key, providedPath]) => {
22
- const dest = (0, path_1.join)(bundleDirPath, `${key}.json`);
23
- await fs_1.promises.copyFile(providedPath, dest);
17
+ const dest = join(bundleDirPath, `${key}.json`);
18
+ await promises.copyFile(providedPath, dest);
24
19
  }));
25
20
  }
26
21
  async createI18nInfoFile(bundleDirPath, i18nConfig, modules) {
27
- const i18nKeys = (0, i18n_1.extractI18nKeysFromModules)(modules);
22
+ const i18nKeys = extractI18nKeysFromModules(modules);
28
23
  const translationLookup = await this.loadTranslationLookup(i18nConfig);
29
24
  const i18nInfo = this.createI18nInfo(i18nConfig, i18nKeys, translationLookup);
30
- const i18nInfoFilePath = (0, path_1.join)(bundleDirPath, i18n_1.I18N_INFO_FILE_NAME);
31
- await fs_1.promises.writeFile(i18nInfoFilePath, JSON.stringify(i18nInfo));
25
+ const i18nInfoFilePath = join(bundleDirPath, I18N_INFO_FILE_NAME);
26
+ await promises.writeFile(i18nInfoFilePath, JSON.stringify(i18nInfo));
32
27
  }
33
28
  createI18nInfo(i18nConfig, i18nKeys, translationLookup) {
34
29
  const translations = {};
35
30
  const localeKeys = Object.keys(translationLookup).sort();
36
31
  i18nKeys.forEach((i18nKey) => {
37
32
  const i18nInfoEntry = localeKeys.reduce((entry, locale) => {
38
- const translationValue = (0, i18n_1.getTranslationValue)(translationLookup, i18nKey, locale);
33
+ const translationValue = getTranslationValue(translationLookup, i18nKey, locale);
39
34
  if (translationValue) {
40
35
  entry[locale] = translationValue;
41
36
  }
@@ -45,7 +40,7 @@ class I18nResourceBundlingService {
45
40
  });
46
41
  const defaultLocale = i18nConfig.fallback.default;
47
42
  if (i18nKeys.some((key) => !translations[key][defaultLocale])) {
48
- throw new __1.UserError(`Default locale '${defaultLocale}' is missing translations for some keys`);
43
+ throw new UserError(`Default locale '${defaultLocale}' is missing translations for some keys`);
49
44
  }
50
45
  return {
51
46
  translations,
@@ -58,25 +53,25 @@ class I18nResourceBundlingService {
58
53
  async loadTranslationLookup(i18nConfig) {
59
54
  const providedLocaleFilePaths = i18nConfig.resources.map((resource) => [
60
55
  resource.key,
61
- (0, path_1.resolve)(resource.path)
56
+ resolve(resource.path)
62
57
  ]);
63
58
  const results = await Promise.all(providedLocaleFilePaths.map(async ([key, providedPath]) => {
64
- const file = await fs_1.promises.readFile(providedPath);
59
+ const file = await promises.readFile(providedPath);
65
60
  return [key, JSON.parse(file.toString())];
66
61
  }));
67
62
  return Object.fromEntries(results);
68
63
  }
69
64
  async bundle(modules, i18nConfig) {
70
65
  if (!modules || !i18nConfig) {
71
- return exports.EMPTY_I18N_RESOURCE_BUNDLE;
66
+ return EMPTY_I18N_RESOURCE_BUNDLE;
72
67
  }
73
- const bundleDirPath = tmp_1.default.dirSync().name;
68
+ const bundleDirPath = tmp.dirSync().name;
74
69
  await this.copyLocaleFilesToBundleDir(bundleDirPath, i18nConfig);
75
70
  await this.createI18nInfoFile(bundleDirPath, i18nConfig, modules);
76
71
  return { exists: true, path: bundleDirPath };
77
72
  }
78
73
  createFileAccessor(i18nConfig) {
79
- const i18nInfoFileKey = i18n_1.I18N_INFO_FILE_NAME.split('.')[0];
74
+ const i18nInfoFileKey = I18N_INFO_FILE_NAME.split('.')[0];
80
75
  return async (resourceKey) => {
81
76
  if (resourceKey === i18nInfoFileKey) {
82
77
  return Buffer.from(JSON.stringify({
@@ -88,11 +83,10 @@ class I18nResourceBundlingService {
88
83
  }));
89
84
  }
90
85
  const i18nResource = i18nConfig.resources.find((resource) => resource.key === resourceKey);
91
- if (!i18nResource || !(await fs_1.promises.stat((0, path_1.resolve)(i18nResource.path))).isFile()) {
86
+ if (!i18nResource || !(await promises.stat(resolve(i18nResource.path))).isFile()) {
92
87
  return null;
93
88
  }
94
- return fs_1.promises.readFile((0, path_1.resolve)(i18nResource.path));
89
+ return promises.readFile(resolve(i18nResource.path));
95
90
  };
96
91
  }
97
92
  }
98
- exports.I18nResourceBundlingService = I18nResourceBundlingService;
@@ -1,20 +1,17 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.IframeResizerScriptService = void 0;
4
- const cheerio_1 = require("cheerio");
5
- const gateway_1 = require("../graphql/gateway");
1
+ import { load } from 'cheerio';
2
+ import { CDNEnvironments, getEnvironmentConfig } from '../graphql/gateway.js';
6
3
  const IFRAME_RESIZER_CDN_PATH = 'iframeResizer.contentWindow.min.js';
7
4
  const GLOBAL_FORGE_INSTALL_ID = 'forge';
8
- class IframeResizerScriptService {
5
+ export class IframeResizerScriptService {
9
6
  env;
10
- constructor(env = (0, gateway_1.getEnvironmentConfig)(gateway_1.CDNEnvironments)) {
7
+ constructor(env = getEnvironmentConfig(CDNEnvironments)) {
11
8
  this.env = env;
12
9
  }
13
10
  createIframeResizerScriptTag() {
14
11
  return `<script async src="https://${GLOBAL_FORGE_INSTALL_ID}.cdn.${this.env}.atlassian-dev.net/${IFRAME_RESIZER_CDN_PATH}"></script>`;
15
12
  }
16
13
  injectIframeResizer(content, onError) {
17
- const $ = (0, cheerio_1.load)(content, { xml: { xmlMode: false } });
14
+ const $ = load(content, { xml: { xmlMode: false } });
18
15
  if ($('html').length === 0)
19
16
  onError();
20
17
  let head = $('head');
@@ -26,4 +23,3 @@ class IframeResizerScriptService {
26
23
  return Buffer.from($.html());
27
24
  }
28
25
  }
29
- exports.IframeResizerScriptService = IframeResizerScriptService;
@@ -1,6 +1,6 @@
1
- export * from './bridge-script-service';
2
- export * from './iframe-resizer-script-service';
3
- export * from './i18n-resource-bundling-service';
4
- export * from './statsig-service';
5
- export * from './supported-products-service';
1
+ export * from './bridge-script-service.js';
2
+ export * from './iframe-resizer-script-service.js';
3
+ export * from './i18n-resource-bundling-service.js';
4
+ export * from './statsig-service.js';
5
+ export * from './supported-products-service.js';
6
6
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/service/index.ts"],"names":[],"mappings":"AAEA,cAAc,yBAAyB,CAAC;AACxC,cAAc,iCAAiC,CAAC;AAChD,cAAc,kCAAkC,CAAC;AACjD,cAAc,mBAAmB,CAAC;AAClC,cAAc,8BAA8B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/service/index.ts"],"names":[],"mappings":"AAEA,cAAc,4BAA4B,CAAC;AAC3C,cAAc,oCAAoC,CAAC;AACnD,cAAc,qCAAqC,CAAC;AACpD,cAAc,sBAAsB,CAAC;AACrC,cAAc,iCAAiC,CAAC"}
@@ -1,8 +1,5 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const tslib_1 = require("tslib");
4
- tslib_1.__exportStar(require("./bridge-script-service"), exports);
5
- tslib_1.__exportStar(require("./iframe-resizer-script-service"), exports);
6
- tslib_1.__exportStar(require("./i18n-resource-bundling-service"), exports);
7
- tslib_1.__exportStar(require("./statsig-service"), exports);
8
- tslib_1.__exportStar(require("./supported-products-service"), exports);
1
+ export * from './bridge-script-service.js';
2
+ export * from './iframe-resizer-script-service.js';
3
+ export * from './i18n-resource-bundling-service.js';
4
+ export * from './statsig-service.js';
5
+ export * from './supported-products-service.js';
@@ -1,4 +1,4 @@
1
- import { CLIDetails, ConfigSectionReader, CredentialGetter, getEnvironmentConfig, Logger } from '../index';
1
+ import { CLIDetails, ConfigSectionReader, CredentialGetter, getEnvironmentConfig, Logger } from '../index.js';
2
2
  export type FeatureGate = 'forge-cli-test-gate' | 'is-logs-v-2-api-enabled' | 'forge-cli-enable-teamwork-graph-product-support' | 'forge-cli-enable-developer-space-enforcement-flow' | 'forge-cli-enable-self-managed-tunnel' | 'fg-forge-cli-enable-combined-artifact-upload';
3
3
  export interface CliHint {
4
4
  weight: number;
@@ -1 +1 @@
1
- {"version":3,"file":"statsig-service.d.ts","sourceRoot":"","sources":["../../src/service/statsig-service.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EACV,mBAAmB,EACnB,gBAAgB,EAChB,oBAAoB,EAEpB,MAAM,EAEP,MAAM,UAAU,CAAC;AAElB,MAAM,MAAM,WAAW,GACnB,qBAAqB,GACrB,yBAAyB,GACzB,iDAAiD,GACjD,mDAAmD,GACnD,sCAAsC,GACtC,8CAA8C,CAAC;AAEnD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,OAAO,CAAC,KAAK,CAOV;IAEH,OAAO,CAAC,OAAO,CAkBb;IAEF,OAAO,CAAC,UAAU,CAgChB;IAEF,OAAO,CAAC,mBAAmB,CAgCzB;IAEF,OAAO,CAAC,WAAW,CAGhB;IAEH,OAAO,CAAC,mBAAmB,CAGxB;IAEG,SAAS,CAAC,CAAC,SAAS,WAAW,EACnC,IAAI,EAAE,CAAC,EACP,gBAAgB,GAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAM,GAC5C,OAAO,CAAC,OAAO,GAAG,IAAI,CAAC;IAYpB,gBAAgB,CAAC,CAAC,SAAS,gBAAgB,EAC/C,aAAa,EAAE,CAAC,EAChB,QAAQ,GAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAM,GACpC,OAAO,CAAC,aAAa,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC;CAWpC"}
@@ -1,8 +1,4 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.StatsigService = exports.StatsigReader = void 0;
4
- exports.cacheStatsigResult = cacheStatsigResult;
5
- const index_1 = require("../index");
1
+ import { getEnvironmentConfig, isFedrampEnv, Text } from '../index.js';
6
2
  const HINT_SEPARATOR = '::';
7
3
  const HINT_CATEGORY_SEPARATOR = ',';
8
4
  function parseHint(configured) {
@@ -25,7 +21,7 @@ function parseHint(configured) {
25
21
  ? { weight, categories, text }
26
22
  : undefined;
27
23
  }
28
- class StatsigReader {
24
+ export class StatsigReader {
29
25
  async testForgeCliTestGate() {
30
26
  return (await this.checkGate('forge-cli-test-gate')) ?? false;
31
27
  }
@@ -42,10 +38,10 @@ class StatsigReader {
42
38
  return (await this.getDynamicConfig('xls-forge-cli-deprecated-runtimes')) ?? [];
43
39
  }
44
40
  async isDevSpaceSelectionEnabled() {
45
- return !(0, index_1.isFedrampEnv)();
41
+ return !isFedrampEnv();
46
42
  }
47
43
  async isDeveloperSpaceEnforcementFlowEnabled() {
48
- if ((0, index_1.isFedrampEnv)() || process.env.FORGE_CLI_DISABLE_DEV_SPACE === 'true') {
44
+ if (isFedrampEnv() || process.env.FORGE_CLI_DISABLE_DEV_SPACE === 'true') {
49
45
  return false;
50
46
  }
51
47
  else if (process.env.FORGE_CLI_DISABLE_DEV_SPACE === 'false') {
@@ -73,7 +69,6 @@ class StatsigReader {
73
69
  return configured?.map(parseHint).filter((hint) => hint !== undefined) ?? null;
74
70
  }
75
71
  }
76
- exports.StatsigReader = StatsigReader;
77
72
  var STATSIG_API_KEYS;
78
73
  (function (STATSIG_API_KEYS) {
79
74
  STATSIG_API_KEYS["DEV"] = "8821cc19-368d-43d4-a20d-c6b8dca6b7ee";
@@ -90,7 +85,7 @@ var BASE_FEATURE_FLAG_SERVICE_URL;
90
85
  BASE_FEATURE_FLAG_SERVICE_URL["FEDRAMP_MODERATE_STAGING"] = "https://api.stg.atlassian.com/flags/api/v2/";
91
86
  BASE_FEATURE_FLAG_SERVICE_URL["FEDRAMP_MODERATE_PROD"] = "https://api.atlassian.com/flags/api/v2/";
92
87
  })(BASE_FEATURE_FLAG_SERVICE_URL || (BASE_FEATURE_FLAG_SERVICE_URL = {}));
93
- function cacheStatsigResult(getter) {
88
+ export function cacheStatsigResult(getter) {
94
89
  const cacheDict = new Map();
95
90
  return async function (...args) {
96
91
  const relevantArgs = args.filter((arg) => arg !== undefined);
@@ -103,13 +98,13 @@ function cacheStatsigResult(getter) {
103
98
  return value;
104
99
  };
105
100
  }
106
- class StatsigService extends StatsigReader {
101
+ export class StatsigService extends StatsigReader {
107
102
  logger;
108
103
  cliDetails;
109
104
  credentialStore;
110
105
  appConfigReader;
111
106
  getEnvironmentFn;
112
- constructor(logger, cliDetails, credentialStore, appConfigReader, getEnvironmentFn = index_1.getEnvironmentConfig) {
107
+ constructor(logger, cliDetails, credentialStore, appConfigReader, getEnvironmentFn = getEnvironmentConfig) {
113
108
  super();
114
109
  this.logger = logger;
115
110
  this.cliDetails = cliDetails;
@@ -223,7 +218,7 @@ class StatsigService extends StatsigReader {
223
218
  }
224
219
  catch (error) {
225
220
  if (this.logger.traceEnabled) {
226
- this.logger.warn(index_1.Text.warning.statsigFetchFailed('feature gates'));
221
+ this.logger.warn(Text.warning.statsigFetchFailed('feature gates'));
227
222
  }
228
223
  return null;
229
224
  }
@@ -235,10 +230,9 @@ class StatsigService extends StatsigReader {
235
230
  }
236
231
  catch (error) {
237
232
  if (this.logger.traceEnabled) {
238
- this.logger.warn(index_1.Text.warning.statsigFetchFailed('dynamic configurations'));
233
+ this.logger.warn(Text.warning.statsigFetchFailed('dynamic configurations'));
239
234
  }
240
235
  return null;
241
236
  }
242
237
  }
243
238
  }
244
- exports.StatsigService = StatsigService;
@@ -1,6 +1,6 @@
1
- import { StatsigService } from './statsig-service';
1
+ import { StatsigService } from './statsig-service.js';
2
2
  import { URL } from 'url';
3
- import { ProductDisplayName } from '../shared';
3
+ import { ProductDisplayName } from '../shared/index.js';
4
4
  export type SupportedProduct = 'Jira' | 'Confluence' | 'Compass' | 'Teamwork Graph' | 'Atlas' | 'Bitbucket';
5
5
  type ProductType = 'sited' | 'workspace';
6
6
  export type ProductDefinition = {
@@ -1 +1 @@
1
- {"version":3,"file":"supported-products-service.d.ts","sourceRoot":"","sources":["../../src/service/supported-products-service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC1B,OAAO,EAAE,kBAAkB,EAAuC,MAAM,WAAW,CAAC;AAKpF,MAAM,MAAM,gBAAgB,GAAG,MAAM,GAAG,YAAY,GAAG,SAAS,GAAG,gBAAgB,GAAG,OAAO,GAAG,WAAW,CAAC;AAuC5G,KAAK,WAAW,GAAG,OAAO,GAAG,WAAW,CAAC;AAEzC,MAAM,MAAM,iBAAiB,GAAG;IAC9B,IAAI,EAAE,gBAAgB,CAAC;IACvB,WAAW,EAAE,WAAW,CAAC;IACzB,OAAO,CAAC,EAAE;QACR,2BAA2B,CA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EpD,CAAC;AAGF,eAAO,MAAM,iBAAiB;;CAE7B,CAAC"}
@@ -1,9 +1,6 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.TEST_ONLY_EXPORTS = exports.isBitbucketProduct = exports.SupportedProductsService = void 0;
4
- const url_1 = require("url");
5
- const shared_1 = require("../shared");
6
- const ui_1 = require("../ui");
1
+ import { URL } from 'url';
2
+ import { productDisplayName, ValidationError } from '../shared/index.js';
3
+ import { Text } from '../ui/index.js';
7
4
  const SUPPORTED_PRODUCTS_DEFINITIONS = [
8
5
  {
9
6
  name: 'Jira',
@@ -79,7 +76,7 @@ class SupportedProductEntriesHolder {
79
76
  return this.value;
80
77
  }
81
78
  }
82
- class SupportedProductsService {
79
+ export class SupportedProductsService {
83
80
  supportedProductEntriesHolder;
84
81
  constructor(supportedProductEntries) {
85
82
  this.supportedProductEntriesHolder = new SupportedProductEntriesHolder(supportedProductEntries);
@@ -97,27 +94,27 @@ class SupportedProductsService {
97
94
  return this.supportedProductEntriesHolder.get().map((p) => p.productName);
98
95
  }
99
96
  getSupportedSecondaryProductsForXPA(requiredProducts) {
100
- const requiredProductsNames = requiredProducts.map((p) => (0, shared_1.productDisplayName)(p));
97
+ const requiredProductsNames = requiredProducts.map((p) => productDisplayName(p));
101
98
  return this.getFilteredSupportedProducts((p) => p.supportedByCrossProductApps && !requiredProductsNames.includes(p.productName));
102
99
  }
103
100
  validateSupportedProduct(productNameInput) {
104
- const productName = (0, shared_1.productDisplayName)(productNameInput);
101
+ const productName = productDisplayName(productNameInput);
105
102
  const supportedProducts = this.getSupportedProducts();
106
103
  if (supportedProducts.includes(productName)) {
107
104
  return productName;
108
105
  }
109
106
  else {
110
- throw new shared_1.ValidationError(ui_1.Text.error.invalidContext([]));
107
+ throw new ValidationError(Text.error.invalidContext([]));
111
108
  }
112
109
  }
113
110
  isWorkspaceProduct(product) {
114
- return this.getFilteredSupportedProducts((p) => p.productType === 'workspace').includes((0, shared_1.productDisplayName)(product));
111
+ return this.getFilteredSupportedProducts((p) => p.productType === 'workspace').includes(productDisplayName(product));
115
112
  }
116
113
  validateSite(site, product) {
117
114
  const trySites = [site, `https://${site}`];
118
115
  for (const trySite of trySites) {
119
116
  try {
120
- const urlObj = new url_1.URL(trySite);
117
+ const urlObj = new URL(trySite);
121
118
  if (product && this.isWorkspaceProduct(product)) {
122
119
  return urlObj;
123
120
  }
@@ -127,14 +124,12 @@ class SupportedProductsService {
127
124
  catch {
128
125
  }
129
126
  }
130
- throw new shared_1.ValidationError(ui_1.Text.error.invalidSite);
127
+ throw new ValidationError(Text.error.invalidSite);
131
128
  }
132
129
  }
133
- exports.SupportedProductsService = SupportedProductsService;
134
- const isBitbucketProduct = (product) => {
135
- return (0, shared_1.productDisplayName)(product) === 'Bitbucket';
130
+ export const isBitbucketProduct = (product) => {
131
+ return productDisplayName(product) === 'Bitbucket';
136
132
  };
137
- exports.isBitbucketProduct = isBitbucketProduct;
138
- exports.TEST_ONLY_EXPORTS = {
133
+ export const TEST_ONLY_EXPORTS = {
139
134
  resolveEnabledProducts
140
135
  };
@@ -1,6 +1,3 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.assertUnreachable = assertUnreachable;
4
- function assertUnreachable(x) {
1
+ export function assertUnreachable(x) {
5
2
  throw new Error("Didn't expect to get here");
6
3
  }
@@ -1,4 +1,4 @@
1
- import { Logger } from '../ui';
1
+ import { Logger } from '../ui/index.js';
2
2
  export declare const ASSISTANT_ANALYZE_TIMEOUT = 300000;
3
3
  export declare const ASSISTANT_CHECK_TIMEOUT = 30000;
4
4
  export declare enum AssistantName {