@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.
- package/CHANGELOG.md +6 -0
- package/out/app-logs/graphql-client.d.ts +2 -2
- package/out/app-logs/graphql-client.d.ts.map +1 -1
- package/out/app-logs/graphql-client.js +9 -17
- package/out/app-logs/index.d.ts +2 -2
- package/out/app-logs/index.d.ts.map +1 -1
- package/out/app-logs/index.js +2 -5
- package/out/app-logs/view-logs.d.ts +4 -4
- package/out/app-logs/view-logs.d.ts.map +1 -1
- package/out/app-logs/view-logs.js +8 -12
- package/out/apps/app-config.d.ts +2 -2
- package/out/apps/app-config.d.ts.map +1 -1
- package/out/apps/app-config.js +13 -20
- package/out/apps/create-an-app.d.ts +4 -4
- package/out/apps/create-an-app.d.ts.map +1 -1
- package/out/apps/create-an-app.js +6 -11
- package/out/apps/create-app-graphql-client.d.ts +2 -2
- package/out/apps/create-app-graphql-client.d.ts.map +1 -1
- package/out/apps/create-app-graphql-client.js +9 -14
- package/out/apps/get-app-owner.d.ts +4 -4
- package/out/apps/get-app-owner.d.ts.map +1 -1
- package/out/apps/get-app-owner.js +8 -13
- package/out/apps/index.d.ts +9 -9
- package/out/apps/index.d.ts.map +1 -1
- package/out/apps/index.js +9 -12
- package/out/apps/package-installer.d.ts +1 -1
- package/out/apps/package-installer.d.ts.map +1 -1
- package/out/apps/package-installer.js +9 -14
- package/out/apps/register-app.d.ts +4 -4
- package/out/apps/register-app.d.ts.map +1 -1
- package/out/apps/register-app.js +9 -13
- package/out/apps/sites.js +1 -4
- package/out/apps/template-module.js +27 -33
- package/out/apps/template.d.ts +3 -3
- package/out/apps/template.d.ts.map +1 -1
- package/out/apps/template.js +36 -47
- package/out/ari/ari.js +48 -63
- package/out/ari/index.d.ts +1 -1
- package/out/ari/index.d.ts.map +1 -1
- package/out/ari/index.js +1 -4
- package/out/auth/authenticator.js +2 -6
- package/out/auth/index.d.ts +3 -3
- package/out/auth/index.d.ts.map +1 -1
- package/out/auth/index.js +3 -6
- package/out/auth/instruction.js +3 -6
- package/out/auth/personal/credential-store.d.ts +2 -2
- package/out/auth/personal/credential-store.d.ts.map +1 -1
- package/out/auth/personal/credential-store.js +48 -57
- package/out/auth/personal/index.d.ts +6 -6
- package/out/auth/personal/index.d.ts.map +1 -1
- package/out/auth/personal/index.js +6 -9
- package/out/auth/personal/login.d.ts +3 -3
- package/out/auth/personal/login.d.ts.map +1 -1
- package/out/auth/personal/login.js +1 -5
- package/out/auth/personal/logout.d.ts +1 -1
- package/out/auth/personal/logout.d.ts.map +1 -1
- package/out/auth/personal/logout.js +1 -5
- package/out/auth/personal/me-graphql-client.d.ts +3 -3
- package/out/auth/personal/me-graphql-client.d.ts.map +1 -1
- package/out/auth/personal/me-graphql-client.js +7 -12
- package/out/auth/personal/token-authenticator.d.ts +3 -3
- package/out/auth/personal/token-authenticator.d.ts.map +1 -1
- package/out/auth/personal/token-authenticator.js +10 -14
- package/out/auth/personal/user-repository.d.ts +4 -4
- package/out/auth/personal/user-repository.d.ts.map +1 -1
- package/out/auth/personal/user-repository.js +5 -9
- package/out/cache/cached-conf.d.ts.map +1 -1
- package/out/cache/cached-conf.js +5 -10
- package/out/cache/index.d.ts +1 -1
- package/out/cache/index.d.ts.map +1 -1
- package/out/cache/index.js +1 -4
- package/out/config/config-codec-types.js +1 -2
- package/out/config/config-file-section-reader.d.ts +3 -3
- package/out/config/config-file-section-reader.d.ts.map +1 -1
- package/out/config/config-file-section-reader.js +4 -10
- package/out/config/config-file-section-writer.d.ts +3 -3
- package/out/config/config-file-section-writer.d.ts.map +1 -1
- package/out/config/config-file-section-writer.js +2 -7
- package/out/config/config-file.d.ts +3 -3
- package/out/config/config-file.d.ts.map +1 -1
- package/out/config/config-file.js +40 -49
- package/out/config/config-section.js +4 -11
- package/out/config/config.d.ts +1 -1
- package/out/config/config.d.ts.map +1 -1
- package/out/config/config.js +7 -13
- package/out/config/index.d.ts +6 -6
- package/out/config/index.d.ts.map +1 -1
- package/out/config/index.js +6 -9
- package/out/file-system/archiver.d.ts +2 -2
- package/out/file-system/archiver.d.ts.map +1 -1
- package/out/file-system/archiver.js +20 -29
- package/out/file-system/file-system-reader.d.ts.map +1 -1
- package/out/file-system/file-system-reader.js +21 -26
- package/out/file-system/file-system-writer.js +5 -10
- package/out/file-system/index.d.ts +5 -5
- package/out/file-system/index.d.ts.map +1 -1
- package/out/file-system/index.js +5 -8
- package/out/file-system/util.js +1 -4
- package/out/file-system/zip-accessor.js +3 -8
- package/out/graphql/app-environment-graphql-client.d.ts +2 -2
- package/out/graphql/app-environment-graphql-client.d.ts.map +1 -1
- package/out/graphql/app-environment-graphql-client.js +10 -16
- package/out/graphql/app-oauth-client-id-graphql-client.d.ts +1 -1
- package/out/graphql/app-oauth-client-id-graphql-client.d.ts.map +1 -1
- package/out/graphql/app-oauth-client-id-graphql-client.js +6 -10
- package/out/graphql/debugging-graphql-runner.d.ts +2 -2
- package/out/graphql/debugging-graphql-runner.d.ts.map +1 -1
- package/out/graphql/debugging-graphql-runner.js +5 -10
- package/out/graphql/gateway.js +15 -23
- package/out/graphql/get-mutation-error.js +4 -8
- package/out/graphql/gql/gql.d.ts +82 -82
- package/out/graphql/gql/gql.d.ts.map +1 -1
- package/out/graphql/gql/gql.js +2 -6
- package/out/graphql/gql/graphql.d.ts +4 -0
- package/out/graphql/gql/graphql.d.ts.map +1 -1
- package/out/graphql/gql/graphql.js +83 -88
- package/out/graphql/gql/index.d.ts +1 -1
- package/out/graphql/gql/index.d.ts.map +1 -1
- package/out/graphql/gql/index.js +1 -4
- package/out/graphql/graphql-client.js +1 -2
- package/out/graphql/graphql-domain-types.d.ts +1 -1
- package/out/graphql/graphql-domain-types.d.ts.map +1 -1
- package/out/graphql/graphql-domain-types.js +1 -2
- package/out/graphql/graphql-runtime-enums.js +16 -19
- package/out/graphql/index.d.ts +12 -12
- package/out/graphql/index.d.ts.map +1 -1
- package/out/graphql/index.js +12 -17
- package/out/graphql/minimal-graphql-runner.d.ts +4 -4
- package/out/graphql/minimal-graphql-runner.d.ts.map +1 -1
- package/out/graphql/minimal-graphql-runner.js +31 -40
- package/out/graphql/mutation-aware-graphql-client.d.ts +2 -2
- package/out/graphql/mutation-aware-graphql-client.d.ts.map +1 -1
- package/out/graphql/mutation-aware-graphql-client.js +4 -10
- package/out/graphql/path-based-graphql-client-resolver.d.ts +1 -1
- package/out/graphql/path-based-graphql-client-resolver.d.ts.map +1 -1
- package/out/graphql/path-based-graphql-client-resolver.js +3 -7
- package/out/http-client/feedback-post-client.js +1 -5
- package/out/http-client/file-uploader.d.ts +1 -1
- package/out/http-client/file-uploader.d.ts.map +1 -1
- package/out/http-client/file-uploader.js +11 -18
- package/out/http-client/global-edge-http-client.js +8 -14
- package/out/http-client/index.d.ts +5 -5
- package/out/http-client/index.d.ts.map +1 -1
- package/out/http-client/index.js +5 -8
- package/out/http-client/node-request.js +10 -16
- package/out/http-client/trace.js +1 -4
- package/out/index.d.ts +13 -13
- package/out/index.d.ts.map +1 -1
- package/out/index.js +13 -16
- package/out/service/bridge-script-service.js +5 -9
- package/out/service/i18n-resource-bundling-service.js +24 -30
- package/out/service/iframe-resizer-script-service.js +5 -9
- package/out/service/index.d.ts +5 -5
- package/out/service/index.d.ts.map +1 -1
- package/out/service/index.js +5 -8
- package/out/service/statsig-service.d.ts +1 -1
- package/out/service/statsig-service.d.ts.map +1 -1
- package/out/service/statsig-service.js +9 -15
- package/out/service/supported-products-service.d.ts +2 -2
- package/out/service/supported-products-service.d.ts.map +1 -1
- package/out/service/supported-products-service.js +13 -18
- package/out/shared/assertUnreachable.js +1 -4
- package/out/shared/assistant-cli.d.ts +1 -1
- package/out/shared/assistant-cli.d.ts.map +1 -1
- package/out/shared/assistant-cli.js +15 -24
- package/out/shared/cli-details.js +6 -11
- package/out/shared/developer-console.js +12 -18
- package/out/shared/directories.js +4 -8
- package/out/shared/environment.d.ts +1 -1
- package/out/shared/environment.d.ts.map +1 -1
- package/out/shared/environment.js +19 -25
- package/out/shared/error-handling.d.ts +1 -1
- package/out/shared/error-handling.d.ts.map +1 -1
- package/out/shared/error-handling.js +24 -44
- package/out/shared/forge-cli-attribution.js +6 -11
- package/out/shared/index.d.ts +13 -13
- package/out/shared/index.d.ts.map +1 -1
- package/out/shared/index.js +13 -16
- package/out/shared/installations.js +1 -4
- package/out/shared/pause.js +1 -5
- package/out/shared/product.d.ts.map +1 -1
- package/out/shared/product.js +5 -10
- package/out/shared/read-app-config-files.d.ts +1 -1
- package/out/shared/read-app-config-files.d.ts.map +1 -1
- package/out/shared/read-app-config-files.js +6 -12
- package/out/shared/runner-signals.js +1 -5
- package/out/shared/test.d.ts +1 -1
- package/out/shared/test.d.ts.map +1 -1
- package/out/shared/test.js +24 -29
- package/out/tunnel/docker-compose-lifecycle.d.ts +3 -3
- package/out/tunnel/docker-compose-lifecycle.d.ts.map +1 -1
- package/out/tunnel/docker-compose-lifecycle.js +53 -70
- package/out/tunnel/index.d.ts +2 -2
- package/out/tunnel/index.d.ts.map +1 -1
- package/out/tunnel/index.js +2 -5
- package/out/tunnel/tunnel-options.js +13 -18
- package/out/ui/command-line-ui.d.ts +2 -2
- package/out/ui/command-line-ui.d.ts.map +1 -1
- package/out/ui/command-line-ui.js +53 -58
- package/out/ui/hint-rotation.d.ts +2 -2
- package/out/ui/hint-rotation.d.ts.map +1 -1
- package/out/ui/hint-rotation.js +2 -6
- package/out/ui/index.d.ts +8 -8
- package/out/ui/index.d.ts.map +1 -1
- package/out/ui/index.js +8 -11
- package/out/ui/log-color.js +16 -20
- package/out/ui/log-symbols.js +10 -13
- package/out/ui/logger.js +2 -6
- package/out/ui/multiple-table-prompt.d.ts +1 -1
- package/out/ui/multiple-table-prompt.d.ts.map +1 -1
- package/out/ui/multiple-table-prompt.js +13 -20
- package/out/ui/runtime-log.js +12 -16
- package/out/ui/single-table-prompt.d.ts +1 -1
- package/out/ui/single-table-prompt.d.ts.map +1 -1
- package/out/ui/single-table-prompt.js +12 -19
- package/out/ui/table-prompt.d.ts +1 -1
- package/out/ui/table-prompt.d.ts.map +1 -1
- package/out/ui/table-prompt.js +11 -16
- package/out/ui/table.d.ts.map +1 -1
- package/out/ui/table.js +4 -7
- package/out/ui/text.d.ts +1 -1
- package/out/ui/text.d.ts.map +1 -1
- package/out/ui/text.js +208 -214
- package/out/ui/ui.d.ts +2 -2
- package/out/ui/ui.d.ts.map +1 -1
- package/out/ui/ui.js +1 -2
- package/package.json +2 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"assistant-cli.d.ts","sourceRoot":"","sources":["../../src/shared/assistant-cli.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"assistant-cli.d.ts","sourceRoot":"","sources":["../../src/shared/assistant-cli.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAGxC,eAAO,MAAM,yBAAyB,SAAS,CAAC;AAChD,eAAO,MAAM,uBAAuB,QAAQ,CAAC;AAG7C,oBAAY,aAAa;IACvB,IAAI,SAAS;IACb,MAAM,WAAW;CAClB;AAED,wBAAgB,4BAA4B,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAElE;AAED,wBAAgB,+BAA+B,CAAC,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,CAE1F;AAQD,wBAAgB,6BAA6B,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,GAAG,MAAM,CAErF;AA6BD,wBAAgB,mBAAmB,IAAI,OAAO,CAAC,OAAO,CAAC,CAEtD;AAED,wBAAgB,gBAAgB,IAAI,OAAO,CAAC,OAAO,CAAC,CAEnD;AAqCD,wBAAgB,YAAY,CAAC,MAAM,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAUjG"}
|
|
@@ -1,34 +1,25 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
exports.createUnknownForgeCommandPrompt = createUnknownForgeCommandPrompt;
|
|
6
|
-
exports.createForgeCommandErrorPrompt = createForgeCommandErrorPrompt;
|
|
7
|
-
exports.checkRovoAuthStatus = checkRovoAuthStatus;
|
|
8
|
-
exports.checkGeminiSetup = checkGeminiSetup;
|
|
9
|
-
exports.runAssistant = runAssistant;
|
|
10
|
-
const child_process_1 = require("child_process");
|
|
11
|
-
exports.ASSISTANT_ANALYZE_TIMEOUT = 300000;
|
|
12
|
-
exports.ASSISTANT_CHECK_TIMEOUT = 30000;
|
|
13
|
-
var AssistantName;
|
|
1
|
+
import { spawn } from 'child_process';
|
|
2
|
+
export const ASSISTANT_ANALYZE_TIMEOUT = 300000;
|
|
3
|
+
export const ASSISTANT_CHECK_TIMEOUT = 30000;
|
|
4
|
+
export var AssistantName;
|
|
14
5
|
(function (AssistantName) {
|
|
15
6
|
AssistantName["ROVO"] = "rovo";
|
|
16
7
|
AssistantName["GEMINI"] = "gemini";
|
|
17
|
-
})(AssistantName || (
|
|
18
|
-
function createForgeTunnelErrorPrompt(error) {
|
|
8
|
+
})(AssistantName || (AssistantName = {}));
|
|
9
|
+
export function createForgeTunnelErrorPrompt(error) {
|
|
19
10
|
return `Do not try to change the code, just analyze the issue and make a suggestion to fix the error. Analyze why when the Forge function resolver code is executed, there is error ${error}. This is likely because of some bug in the app code`;
|
|
20
11
|
}
|
|
21
|
-
function createUnknownForgeCommandPrompt(command, errorText) {
|
|
12
|
+
export function createUnknownForgeCommandPrompt(command, errorText) {
|
|
22
13
|
return `Do not try to change the code, just analyze the issue and make a suggestion to fix the error. Analyze why when I run the Forge command${command} and has the unknown command error ${errorText}. This is likely because of syntax error in the command. You can refer to https://developer.atlassian.com/platform/forge/cli-reference/ for the CLI reference. Try to suggest a valid command based on the intention.`;
|
|
23
14
|
}
|
|
24
|
-
function createForgeCommandErrorPrompt(command, error) {
|
|
15
|
+
export function createForgeCommandErrorPrompt(command, error) {
|
|
25
16
|
return `Do not try to change the code, just analyze the issue and make a suggestion to fix the error. Analyze why when I run the command ${command} and I have the error ${error}`;
|
|
26
17
|
}
|
|
27
18
|
function checkCommandAvailability(command, args) {
|
|
28
19
|
return new Promise((resolve) => {
|
|
29
|
-
const childProcess =
|
|
20
|
+
const childProcess = spawn(command, args, {
|
|
30
21
|
stdio: 'pipe',
|
|
31
|
-
timeout:
|
|
22
|
+
timeout: ASSISTANT_CHECK_TIMEOUT
|
|
32
23
|
});
|
|
33
24
|
childProcess.on('close', (code) => {
|
|
34
25
|
resolve(code === 0);
|
|
@@ -38,18 +29,18 @@ function checkCommandAvailability(command, args) {
|
|
|
38
29
|
});
|
|
39
30
|
});
|
|
40
31
|
}
|
|
41
|
-
function checkRovoAuthStatus() {
|
|
32
|
+
export function checkRovoAuthStatus() {
|
|
42
33
|
return checkCommandAvailability('acli', ['rovodev', 'auth', 'status']);
|
|
43
34
|
}
|
|
44
|
-
function checkGeminiSetup() {
|
|
35
|
+
export function checkGeminiSetup() {
|
|
45
36
|
return checkCommandAvailability('gemini', ['--help']);
|
|
46
37
|
}
|
|
47
38
|
function runAssistantCommand(assistantName, command, args, logger) {
|
|
48
39
|
return new Promise((resolve) => {
|
|
49
40
|
logger.info(`Sending error to ${assistantName} for analysis...`);
|
|
50
|
-
const childProcess =
|
|
41
|
+
const childProcess = spawn(command, args, {
|
|
51
42
|
stdio: 'inherit',
|
|
52
|
-
timeout:
|
|
43
|
+
timeout: ASSISTANT_ANALYZE_TIMEOUT
|
|
53
44
|
});
|
|
54
45
|
childProcess.on('close', () => {
|
|
55
46
|
resolve();
|
|
@@ -60,7 +51,7 @@ function runAssistantCommand(assistantName, command, args, logger) {
|
|
|
60
51
|
});
|
|
61
52
|
});
|
|
62
53
|
}
|
|
63
|
-
function runAssistant(prompt, assistantName, logger) {
|
|
54
|
+
export function runAssistant(prompt, assistantName, logger) {
|
|
64
55
|
switch (assistantName) {
|
|
65
56
|
case AssistantName.ROVO:
|
|
66
57
|
return runAssistantCommand(AssistantName.ROVO, 'acli', ['rovodev', prompt], logger);
|
|
@@ -1,15 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const
|
|
5
|
-
const
|
|
6
|
-
exports.FORGE_CLI_PACKAGE = '@forge/cli';
|
|
7
|
-
const isLatestCLIVersion = (cliDetails) => {
|
|
8
|
-
const version = semver_1.default.valid(cliDetails?.version);
|
|
9
|
-
const latest = semver_1.default.valid(cliDetails?.latest);
|
|
1
|
+
import semver from 'semver';
|
|
2
|
+
export const FORGE_CLI_PACKAGE = '@forge/cli';
|
|
3
|
+
export const isLatestCLIVersion = (cliDetails) => {
|
|
4
|
+
const version = semver.valid(cliDetails?.version);
|
|
5
|
+
const latest = semver.valid(cliDetails?.latest);
|
|
10
6
|
if (!version || !latest) {
|
|
11
7
|
return false;
|
|
12
8
|
}
|
|
13
|
-
return
|
|
9
|
+
return semver.eq(version, latest);
|
|
14
10
|
};
|
|
15
|
-
exports.isLatestCLIVersion = isLatestCLIVersion;
|
|
@@ -1,28 +1,24 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const gateway_1 = require("../graphql/gateway");
|
|
5
|
-
const ari_1 = require("@forge/util/packages/ari");
|
|
6
|
-
const getDevConsoleBaseUrl = () => {
|
|
1
|
+
import { Environments, getEnvironmentConfig } from '../graphql/gateway.js';
|
|
2
|
+
import { EcosystemAppAri } from '@forge/util/packages/ari';
|
|
3
|
+
export const getDevConsoleBaseUrl = () => {
|
|
7
4
|
if (process.env.FORGE_DEV_CONSOLE_URL) {
|
|
8
5
|
return process.env.FORGE_DEV_CONSOLE_URL;
|
|
9
6
|
}
|
|
10
|
-
const environment =
|
|
7
|
+
const environment = getEnvironmentConfig();
|
|
11
8
|
switch (environment) {
|
|
12
|
-
case
|
|
9
|
+
case Environments.STG:
|
|
13
10
|
return 'https://developer.stg.internal.atlassian.com';
|
|
14
|
-
case
|
|
11
|
+
case Environments.FEDRAMP_MODERATE_STAGING:
|
|
15
12
|
return 'https://developer.stg.atlassian-us-gov-mod.com';
|
|
16
|
-
case
|
|
13
|
+
case Environments.FEDRAMP_MODERATE_PROD:
|
|
17
14
|
return 'https://developer.atlassian-us-gov-mod.com';
|
|
18
15
|
default:
|
|
19
16
|
return 'https://developer.atlassian.com';
|
|
20
17
|
}
|
|
21
18
|
};
|
|
22
|
-
exports.getDevConsoleBaseUrl = getDevConsoleBaseUrl;
|
|
23
19
|
const toAppUuid = (appId) => {
|
|
24
20
|
try {
|
|
25
|
-
const parsed =
|
|
21
|
+
const parsed = EcosystemAppAri.parse(appId);
|
|
26
22
|
return parsed.appId;
|
|
27
23
|
}
|
|
28
24
|
catch {
|
|
@@ -37,17 +33,16 @@ const DEV_CONSOLE_PATHS = {
|
|
|
37
33
|
rolloutLink: (appId, environmentId, rolloutId) => `myapps/${appId}/build/rollouts/${environmentId}/${rolloutId}`,
|
|
38
34
|
developerSpace: (spaceId) => `developer-space/${spaceId}`
|
|
39
35
|
};
|
|
40
|
-
const getDevConsoleUrl = (page, ...args) => {
|
|
36
|
+
export const getDevConsoleUrl = (page, ...args) => {
|
|
41
37
|
const lastArg = args[args.length - 1];
|
|
42
38
|
const attribution = typeof lastArg === 'object' ? lastArg : undefined;
|
|
43
39
|
const pathArgs = typeof lastArg === 'string' ? args : args.slice(0, -1);
|
|
44
40
|
const buildPath = DEV_CONSOLE_PATHS[page];
|
|
45
|
-
const url = `${
|
|
46
|
-
return attribution ?
|
|
41
|
+
const url = `${getDevConsoleBaseUrl()}/console/${buildPath(...pathArgs)}`;
|
|
42
|
+
return attribution ? withDevConsoleAttribution(url, attribution) : url;
|
|
47
43
|
};
|
|
48
|
-
exports.getDevConsoleUrl = getDevConsoleUrl;
|
|
49
44
|
const FORGE_CLI_UTM_SOURCE = 'forge-cli';
|
|
50
|
-
const withDevConsoleAttribution = (url, attribution = {}) => {
|
|
45
|
+
export const withDevConsoleAttribution = (url, attribution = {}) => {
|
|
51
46
|
if (attribution.utmSource === undefined && attribution.utmCampaign === undefined) {
|
|
52
47
|
return url;
|
|
53
48
|
}
|
|
@@ -58,4 +53,3 @@ const withDevConsoleAttribution = (url, attribution = {}) => {
|
|
|
58
53
|
}
|
|
59
54
|
return attributedUrl.toString();
|
|
60
55
|
};
|
|
61
|
-
exports.withDevConsoleAttribution = withDevConsoleAttribution;
|
|
@@ -1,10 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
exports.tmpDir = tmpDir;
|
|
5
|
-
const tmp_1 = require("tmp");
|
|
6
|
-
exports.FORGE_DIRECTORY = '.forge';
|
|
7
|
-
function tmpDir(prefix) {
|
|
1
|
+
import { dirSync } from 'tmp';
|
|
2
|
+
export const FORGE_DIRECTORY = '.forge';
|
|
3
|
+
export function tmpDir(prefix) {
|
|
8
4
|
prefix = prefix ? `forge-${prefix}` : 'forge';
|
|
9
|
-
return
|
|
5
|
+
return dirSync({ prefix, unsafeCleanup: true }).name;
|
|
10
6
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AppEnvironmentType } from '../graphql/graphql-runtime-enums';
|
|
1
|
+
import { AppEnvironmentType } from '../graphql/graphql-runtime-enums.js';
|
|
2
2
|
export declare const VALID_ENVIRONMENT_OPTIONS: string[];
|
|
3
3
|
export declare const DEFAULT_ENVIRONMENT_OPTION: string;
|
|
4
4
|
export declare const XLS_ENVIRONMENT_NAMES: string[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"environment.d.ts","sourceRoot":"","sources":["../../src/shared/environment.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"environment.d.ts","sourceRoot":"","sources":["../../src/shared/environment.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,qCAAqC,CAAC;AAEzE,eAAO,MAAM,yBAAyB,UAA2C,CAAC;AAClF,eAAO,MAAM,0BAA0B,QAA+B,CAAC;AAGvE,eAAO,MAAM,qBAAqB,UAAuC,CAAC;AAC1E,eAAO,MAAM,uBAAuB,QAA2B,CAAC;AAChE,eAAO,MAAM,uBAAuB,QAA2B,CAAC;AAChE,eAAO,MAAM,0BAA0B,QAA2B,CAAC;AAGnE,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAG1D;AAGD,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAG1D;AAKD,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,MAAM,GAAG,kBAAkB,CAOvE;AAUD,MAAM,MAAM,iBAAiB,GACzB,KAAK,GACL,KAAK,GACL,MAAM,GACN,aAAa,GACb,cAAc,GACd,QAAQ,GACR,SAAS,GACT,cAAc,CAAC"}
|
|
@@ -1,30 +1,24 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
exports.DEFAULT_ENVIRONMENT_KEY = exports.XLS_ENVIRONMENT_NAMES[0];
|
|
12
|
-
exports.STAGING_ENVIRONMENT_KEY = exports.XLS_ENVIRONMENT_NAMES[1];
|
|
13
|
-
exports.PRODUCTION_ENVIRONMENT_KEY = exports.XLS_ENVIRONMENT_NAMES[2];
|
|
14
|
-
function optionToEnvironment(option) {
|
|
15
|
-
const envIndex = exports.VALID_ENVIRONMENT_OPTIONS.indexOf(option);
|
|
16
|
-
return envIndex >= 0 ? exports.XLS_ENVIRONMENT_NAMES[envIndex] : option;
|
|
1
|
+
import { AppEnvironmentType } from '../graphql/graphql-runtime-enums.js';
|
|
2
|
+
export const VALID_ENVIRONMENT_OPTIONS = ['development', 'staging', 'production'];
|
|
3
|
+
export const DEFAULT_ENVIRONMENT_OPTION = VALID_ENVIRONMENT_OPTIONS[0];
|
|
4
|
+
export const XLS_ENVIRONMENT_NAMES = ['default', 'staging', 'production'];
|
|
5
|
+
export const DEFAULT_ENVIRONMENT_KEY = XLS_ENVIRONMENT_NAMES[0];
|
|
6
|
+
export const STAGING_ENVIRONMENT_KEY = XLS_ENVIRONMENT_NAMES[1];
|
|
7
|
+
export const PRODUCTION_ENVIRONMENT_KEY = XLS_ENVIRONMENT_NAMES[2];
|
|
8
|
+
export function optionToEnvironment(option) {
|
|
9
|
+
const envIndex = VALID_ENVIRONMENT_OPTIONS.indexOf(option);
|
|
10
|
+
return envIndex >= 0 ? XLS_ENVIRONMENT_NAMES[envIndex] : option;
|
|
17
11
|
}
|
|
18
|
-
function environmentToOption(envKey) {
|
|
19
|
-
const envIndex =
|
|
20
|
-
return envIndex >= 0 ?
|
|
12
|
+
export function environmentToOption(envKey) {
|
|
13
|
+
const envIndex = XLS_ENVIRONMENT_NAMES.indexOf(envKey);
|
|
14
|
+
return envIndex >= 0 ? VALID_ENVIRONMENT_OPTIONS[envIndex] : envKey;
|
|
21
15
|
}
|
|
22
|
-
function guessEnvironmentType(envKey) {
|
|
23
|
-
if (envKey ===
|
|
24
|
-
return
|
|
16
|
+
export function guessEnvironmentType(envKey) {
|
|
17
|
+
if (envKey === STAGING_ENVIRONMENT_KEY) {
|
|
18
|
+
return AppEnvironmentType.Staging;
|
|
25
19
|
}
|
|
26
|
-
else if (envKey ===
|
|
27
|
-
return
|
|
20
|
+
else if (envKey === PRODUCTION_ENVIRONMENT_KEY) {
|
|
21
|
+
return AppEnvironmentType.Production;
|
|
28
22
|
}
|
|
29
|
-
return
|
|
23
|
+
return AppEnvironmentType.Development;
|
|
30
24
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"error-handling.d.ts","sourceRoot":"","sources":["../../src/shared/error-handling.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"error-handling.d.ts","sourceRoot":"","sources":["../../src/shared/error-handling.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAKxC,MAAM,MAAM,cAAc,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,OAAO,GAAG,SAAS,CAAC,GAAG;IACrF,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAKF,MAAM,WAAW,kBAAkB;IACjC,aAAa,IAAI,cAAc,CAAC;CACjC;AA8CD,wBAAgB,WAAW,CAAC,CAAC,EAAE,GAAG,GAAG,OAAO,CAW3C;AAED,wBAAgB,kBAAkB,CAAC,CAAC,EAAE,GAAG,GAAG,cAAc,CAOzD;AAED,qBAAa,SAAU,SAAQ,KAAM,YAAW,kBAAkB;IAE9D,SAAS,CAAC,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS;gBAA9B,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,EACjD,OAAO,CAAC,EAAE,MAAM;IAKX,aAAa,IAAI,cAAc;IAM/B,WAAW,IAAI,OAAO;CAG9B;AAED,qBAAa,SAAU,SAAQ,SAAS;gBAC1B,OAAO,CAAC,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS;IAIrD,WAAW,IAAI,OAAO;CAG9B;AAED,qBAAa,WAAY,SAAQ,SAAS;gBAC5B,OAAO,CAAC,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS;CAG7D;AAUD,MAAM,WAAW,qBAAqB;IACpC,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AASD,eAAO,MAAM,WAAW,GACtB,QAAQ,MAAM,EACd,OAAO,KAAK,EACZ,OAAO,MAAM,GAAG,IAAI,EACpB,wBAAwB,qBAAqB,KAC5C,OAAO,CAAC,KAAK,CAmCf,CAAC;AAOF,eAAO,MAAM,SAAS,GAAI,OAAO,OAAO,KAAG,KAK1C,CAAC;AASF,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,OAAO,EAAE,WAAW,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,MAAM,GAAG,KAAK,CAIrG;AAMD,eAAO,MAAM,aAAa,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,OAAO,CAAC,KAAK,IAAI,KAIhE,CAAC;AAEF,qBAAa,eAAgB,SAAQ,SAAS;CAAG;AAGjD,eAAO,MAAM,kBAAkB,kBAAkB,CAAC;AAOlD,qBAAa,iBAAkB,SAAQ,eAAe;IACpD,SAAgB,IAAI,mBAAsB;gBAE9B,OAAO,CAAC,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,MAAM;IAMzC,aAAa,IAAI,cAAc;CAGvC;AAED,qBAAa,cAAe,SAAQ,SAAS;CAAG;AAEhD,MAAM,WAAW,kBAAkB;IACjC,gBAAgB,EAAE,IAAI,CAAC;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,cAAc,CAAC;CAC5B;AAED,qBAAa,uBAAwB,SAAQ,SAAS;CAAG;AAEzD,qBAAa,aAAc,SAAQ,SAAS;IAGxC,OAAO,CAAC,QAAQ,CAAC,UAAU;gBAD3B,OAAO,CAAC,EAAE,MAAM,EACC,UAAU,GAAE,OAAe;IAKvC,WAAW;CAGnB;AAUD,qBAAa,wBAAyB,SAAQ,SAAS;gBAMzC,OAAO,CAAC,EAAE,MAAM;CAG7B;AAUD,qBAAa,mBAAoB,SAAQ,SAAS;gBAMpC,OAAO,CAAC,EAAE,MAAM;CAG7B"}
|
|
@@ -1,13 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
exports.isUserError = isUserError;
|
|
5
|
-
exports.getErrorAttributes = getErrorAttributes;
|
|
6
|
-
exports.transformErrorMessage = transformErrorMessage;
|
|
7
|
-
const tslib_1 = require("tslib");
|
|
8
|
-
const ui_1 = require("../ui");
|
|
9
|
-
const Sentry = tslib_1.__importStar(require("@sentry/node"));
|
|
10
|
-
const assistant_cli_1 = require("./assistant-cli");
|
|
1
|
+
import { Text } from '../ui/index.js';
|
|
2
|
+
import * as Sentry from '@sentry/node';
|
|
3
|
+
import { runAssistant } from './assistant-cli.js';
|
|
11
4
|
function isErrorWithAnalytics(e) {
|
|
12
5
|
return e.getAttributes !== undefined;
|
|
13
6
|
}
|
|
@@ -39,7 +32,7 @@ function isLikelyNetworkError(e) {
|
|
|
39
32
|
}
|
|
40
33
|
return false;
|
|
41
34
|
}
|
|
42
|
-
function isUserError(e) {
|
|
35
|
+
export function isUserError(e) {
|
|
43
36
|
if (isErrorWithAnalytics(e)) {
|
|
44
37
|
return e.getAttributes().isUserError ?? false;
|
|
45
38
|
}
|
|
@@ -48,7 +41,7 @@ function isUserError(e) {
|
|
|
48
41
|
}
|
|
49
42
|
return false;
|
|
50
43
|
}
|
|
51
|
-
function getErrorAttributes(e) {
|
|
44
|
+
export function getErrorAttributes(e) {
|
|
52
45
|
const result = {};
|
|
53
46
|
if (isErrorWithAnalytics(e)) {
|
|
54
47
|
Object.assign(result, e.getAttributes());
|
|
@@ -56,7 +49,7 @@ function getErrorAttributes(e) {
|
|
|
56
49
|
result.isUserError = isUserError(e);
|
|
57
50
|
return result;
|
|
58
51
|
}
|
|
59
|
-
class BaseError extends Error {
|
|
52
|
+
export class BaseError extends Error {
|
|
60
53
|
requestId;
|
|
61
54
|
constructor(requestId, message) {
|
|
62
55
|
super(message);
|
|
@@ -72,8 +65,7 @@ class BaseError extends Error {
|
|
|
72
65
|
return false;
|
|
73
66
|
}
|
|
74
67
|
}
|
|
75
|
-
|
|
76
|
-
class UserError extends BaseError {
|
|
68
|
+
export class UserError extends BaseError {
|
|
77
69
|
constructor(message, requestId) {
|
|
78
70
|
super(requestId, message);
|
|
79
71
|
}
|
|
@@ -81,20 +73,18 @@ class UserError extends BaseError {
|
|
|
81
73
|
return true;
|
|
82
74
|
}
|
|
83
75
|
}
|
|
84
|
-
|
|
85
|
-
class HiddenError extends BaseError {
|
|
76
|
+
export class HiddenError extends BaseError {
|
|
86
77
|
constructor(message, requestId) {
|
|
87
78
|
super(requestId, message);
|
|
88
79
|
}
|
|
89
80
|
}
|
|
90
|
-
exports.HiddenError = HiddenError;
|
|
91
81
|
function removePrefixFromErrorMessage(message) {
|
|
92
82
|
if (message.startsWith('error: ')) {
|
|
93
83
|
return message.replace('error: ', '');
|
|
94
84
|
}
|
|
95
85
|
return message;
|
|
96
86
|
}
|
|
97
|
-
const exitOnError = async (logger, error, hint, autoAnalyzeErrorInput) => {
|
|
87
|
+
export const exitOnError = async (logger, error, hint, autoAnalyzeErrorInput) => {
|
|
98
88
|
let exitCode = 0;
|
|
99
89
|
Sentry.withScope((scope) => {
|
|
100
90
|
scope.setTag('userError', isUserError(error));
|
|
@@ -106,7 +96,7 @@ const exitOnError = async (logger, error, hint, autoAnalyzeErrorInput) => {
|
|
|
106
96
|
logger.error(error);
|
|
107
97
|
}
|
|
108
98
|
if (hint === undefined && !logger.debugEnabled) {
|
|
109
|
-
hint =
|
|
99
|
+
hint = Text.rerunningWithVerbose;
|
|
110
100
|
}
|
|
111
101
|
if (hint) {
|
|
112
102
|
logger.info(hint);
|
|
@@ -114,50 +104,43 @@ const exitOnError = async (logger, error, hint, autoAnalyzeErrorInput) => {
|
|
|
114
104
|
exitCode = 1;
|
|
115
105
|
await Sentry.close();
|
|
116
106
|
if (autoAnalyzeErrorInput?.prompt && autoAnalyzeErrorInput?.assistantName) {
|
|
117
|
-
await
|
|
107
|
+
await runAssistant(autoAnalyzeErrorInput.prompt, autoAnalyzeErrorInput.assistantName, logger);
|
|
118
108
|
}
|
|
119
109
|
process.exit(exitCode);
|
|
120
110
|
};
|
|
121
|
-
|
|
122
|
-
const wrapError = (error) => {
|
|
111
|
+
export const wrapError = (error) => {
|
|
123
112
|
if (error instanceof Error) {
|
|
124
113
|
return error;
|
|
125
114
|
}
|
|
126
115
|
return new Error(JSON.stringify(error));
|
|
127
116
|
};
|
|
128
|
-
|
|
129
|
-
function transformErrorMessage(error, transformFn) {
|
|
117
|
+
export function transformErrorMessage(error, transformFn) {
|
|
130
118
|
const originalMessage = error instanceof Error ? error.message : String(error);
|
|
131
119
|
const message = transformFn(originalMessage);
|
|
132
120
|
return isUserError(error) ? new UserError(message) : new Error(message);
|
|
133
121
|
}
|
|
134
|
-
const assertIsError = (error) => {
|
|
122
|
+
export const assertIsError = (error) => {
|
|
135
123
|
if (!(error instanceof Error)) {
|
|
136
124
|
throw new Error(`A non Error type object ${JSON.stringify(error)} of type '${typeof error}' was thrown.`);
|
|
137
125
|
}
|
|
138
126
|
};
|
|
139
|
-
|
|
140
|
-
class ValidationError extends UserError {
|
|
127
|
+
export class ValidationError extends UserError {
|
|
141
128
|
}
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
code = exports.MISSING_INPUT_CODE;
|
|
129
|
+
export const MISSING_INPUT_CODE = 'MISSING_INPUT';
|
|
130
|
+
export class MissingInputError extends ValidationError {
|
|
131
|
+
code = MISSING_INPUT_CODE;
|
|
146
132
|
constructor(message, requestId) {
|
|
147
|
-
super(`[${
|
|
133
|
+
super(`[${MISSING_INPUT_CODE}] ${message ?? ''}`.trim(), requestId);
|
|
148
134
|
}
|
|
149
135
|
getAttributes() {
|
|
150
136
|
return { ...super.getAttributes(), code: this.code };
|
|
151
137
|
}
|
|
152
138
|
}
|
|
153
|
-
|
|
154
|
-
class BundlerTSError extends UserError {
|
|
139
|
+
export class BundlerTSError extends UserError {
|
|
155
140
|
}
|
|
156
|
-
|
|
157
|
-
class ApplicationCompileError extends UserError {
|
|
141
|
+
export class ApplicationCompileError extends UserError {
|
|
158
142
|
}
|
|
159
|
-
|
|
160
|
-
class UIPromptError extends BaseError {
|
|
143
|
+
export class UIPromptError extends BaseError {
|
|
161
144
|
isTtyError;
|
|
162
145
|
constructor(message, isTtyError = false) {
|
|
163
146
|
super(undefined, message);
|
|
@@ -167,16 +150,13 @@ class UIPromptError extends BaseError {
|
|
|
167
150
|
return this.isTtyError;
|
|
168
151
|
}
|
|
169
152
|
}
|
|
170
|
-
|
|
171
|
-
class PartialInstallationError extends UserError {
|
|
153
|
+
export class PartialInstallationError extends UserError {
|
|
172
154
|
constructor(message) {
|
|
173
155
|
super(message);
|
|
174
156
|
}
|
|
175
157
|
}
|
|
176
|
-
|
|
177
|
-
class MissingCreatorError extends BaseError {
|
|
158
|
+
export class MissingCreatorError extends BaseError {
|
|
178
159
|
constructor(message) {
|
|
179
160
|
super(message);
|
|
180
161
|
}
|
|
181
162
|
}
|
|
182
|
-
exports.MissingCreatorError = MissingCreatorError;
|
|
@@ -1,10 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const detect_agent_1 = require("@vercel/detect-agent");
|
|
6
|
-
const ci = tslib_1.__importStar(require("ci-info"));
|
|
7
|
-
const runner_signals_1 = require("./runner-signals");
|
|
1
|
+
import { determineAgent } from '@vercel/detect-agent';
|
|
2
|
+
import * as ci from 'ci-info';
|
|
3
|
+
import { readRunnerSignals } from './runner-signals.js';
|
|
8
4
|
const ATL_FORGE_ATTRIBUTION_ENV_PREFIX = 'ATL_FORGE_ATTRIBUTION_';
|
|
9
5
|
const UNKNOWN = 'unknown';
|
|
10
6
|
const MAX_ATTRIBUTION_VALUE_LENGTH = 512;
|
|
@@ -27,7 +23,7 @@ const RESERVED_ATTRIBUTION_FIELDS = new Set([
|
|
|
27
23
|
'isTerminal',
|
|
28
24
|
'isUnrecognizedNonTTY'
|
|
29
25
|
].map((field) => field.toLowerCase()));
|
|
30
|
-
class ForgeCliAttribution {
|
|
26
|
+
export class ForgeCliAttribution {
|
|
31
27
|
static isAgent() {
|
|
32
28
|
return !process.stdin.isTTY && !process.stdout.isTTY && !this.isCI();
|
|
33
29
|
}
|
|
@@ -58,7 +54,7 @@ class ForgeCliAttribution {
|
|
|
58
54
|
return 'windsurf';
|
|
59
55
|
}
|
|
60
56
|
try {
|
|
61
|
-
const result = await
|
|
57
|
+
const result = await determineAgent();
|
|
62
58
|
if (result?.isAgent && typeof result.agent?.name === 'string' && result.agent.name) {
|
|
63
59
|
return result.agent.name;
|
|
64
60
|
}
|
|
@@ -75,7 +71,7 @@ class ForgeCliAttribution {
|
|
|
75
71
|
const ciHint = this.ciHint();
|
|
76
72
|
const isAgentV2 = agentHint !== UNKNOWN;
|
|
77
73
|
const isCIV2 = ciHint !== UNKNOWN;
|
|
78
|
-
const signals =
|
|
74
|
+
const signals = readRunnerSignals(isAgentV2, isCIV2);
|
|
79
75
|
return {
|
|
80
76
|
isAgent: this.isAgent(),
|
|
81
77
|
isCI: this.isCI(),
|
|
@@ -153,4 +149,3 @@ class ForgeCliAttribution {
|
|
|
153
149
|
return `${value.charAt(0).toUpperCase()}${value.slice(1)}`;
|
|
154
150
|
}
|
|
155
151
|
}
|
|
156
|
-
exports.ForgeCliAttribution = ForgeCliAttribution;
|
package/out/shared/index.d.ts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
export * from './assertUnreachable';
|
|
2
|
-
export * from './assistant-cli';
|
|
3
|
-
export * from './cli-details';
|
|
4
|
-
export * from './developer-console';
|
|
5
|
-
export * from './directories';
|
|
6
|
-
export * from './environment';
|
|
7
|
-
export * from './forge-cli-attribution';
|
|
8
|
-
export * from './error-handling';
|
|
9
|
-
export * from './pause';
|
|
10
|
-
export * from './product';
|
|
11
|
-
export * from './read-app-config-files';
|
|
12
|
-
export * from './test';
|
|
13
|
-
export * from './installations';
|
|
1
|
+
export * from './assertUnreachable.js';
|
|
2
|
+
export * from './assistant-cli.js';
|
|
3
|
+
export * from './cli-details.js';
|
|
4
|
+
export * from './developer-console.js';
|
|
5
|
+
export * from './directories.js';
|
|
6
|
+
export * from './environment.js';
|
|
7
|
+
export * from './forge-cli-attribution.js';
|
|
8
|
+
export * from './error-handling.js';
|
|
9
|
+
export * from './pause.js';
|
|
10
|
+
export * from './product.js';
|
|
11
|
+
export * from './read-app-config-files.js';
|
|
12
|
+
export * from './test.js';
|
|
13
|
+
export * from './installations.js';
|
|
14
14
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/shared/index.ts"],"names":[],"mappings":"AAEA,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/shared/index.ts"],"names":[],"mappings":"AAEA,cAAc,wBAAwB,CAAC;AACvC,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,wBAAwB,CAAC;AACvC,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,qBAAqB,CAAC;AACpC,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,4BAA4B,CAAC;AAC3C,cAAc,WAAW,CAAC;AAC1B,cAAc,oBAAoB,CAAC"}
|
package/out/shared/index.js
CHANGED
|
@@ -1,16 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
tslib_1.__exportStar(require("./read-app-config-files"), exports);
|
|
15
|
-
tslib_1.__exportStar(require("./test"), exports);
|
|
16
|
-
tslib_1.__exportStar(require("./installations"), exports);
|
|
1
|
+
export * from './assertUnreachable.js';
|
|
2
|
+
export * from './assistant-cli.js';
|
|
3
|
+
export * from './cli-details.js';
|
|
4
|
+
export * from './developer-console.js';
|
|
5
|
+
export * from './directories.js';
|
|
6
|
+
export * from './environment.js';
|
|
7
|
+
export * from './forge-cli-attribution.js';
|
|
8
|
+
export * from './error-handling.js';
|
|
9
|
+
export * from './pause.js';
|
|
10
|
+
export * from './product.js';
|
|
11
|
+
export * from './read-app-config-files.js';
|
|
12
|
+
export * from './test.js';
|
|
13
|
+
export * from './installations.js';
|
package/out/shared/pause.js
CHANGED
|
@@ -1,5 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.pause = void 0;
|
|
4
|
-
const pause = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
|
|
5
|
-
exports.pause = pause;
|
|
1
|
+
export const pause = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"product.d.ts","sourceRoot":"","sources":["../../src/shared/product.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"product.d.ts","sourceRoot":"","sources":["../../src/shared/product.ts"],"names":[],"mappings":"AAiBA,MAAM,MAAM,kBAAkB,GAAG,MAAM,CAAC;AAiBxC,wBAAgB,mBAAmB,CAAC,qBAAqB,EAAE,MAAM,EAAE,sBAAsB,GAAE,MAAM,EAAO,GAAG,MAAM,CAOhH;AAED,wBAAgB,kBAAkB,CAAC,yCAAyC,EAAE,MAAM,GAAG,kBAAkB,CAKxG;AAED,wBAAgB,gBAAgB,CAAC,kBAAkB,EAAE,MAAM,GAAG,MAAM,CAEnE"}
|
package/out/shared/product.js
CHANGED
|
@@ -1,9 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.productsDisplayName = productsDisplayName;
|
|
4
|
-
exports.productDisplayName = productDisplayName;
|
|
5
|
-
exports.ariResourceOwner = ariResourceOwner;
|
|
6
|
-
const case_1 = require("case");
|
|
1
|
+
import Case from 'case';
|
|
7
2
|
const RESOURCE_OWNER_TO_PRODUCT_DISPLAY_NAME = {
|
|
8
3
|
townsquare: 'Atlas',
|
|
9
4
|
graph: 'Teamwork Graph'
|
|
@@ -12,17 +7,17 @@ const PRODUCT_DISPLAY_NAME_TO_RESOURCE_OWNER = Object.entries(RESOURCE_OWNER_TO_
|
|
|
12
7
|
acc[value] = key;
|
|
13
8
|
return acc;
|
|
14
9
|
}, {});
|
|
15
|
-
function productsDisplayName(requiredResourceOwner, optionalResourceOwners = []) {
|
|
10
|
+
export function productsDisplayName(requiredResourceOwner, optionalResourceOwners = []) {
|
|
16
11
|
if (optionalResourceOwners.length === 0) {
|
|
17
12
|
return productDisplayName(requiredResourceOwner);
|
|
18
13
|
}
|
|
19
14
|
const requiredProduct = `${productDisplayName(requiredResourceOwner)} (Required)`;
|
|
20
15
|
return [requiredProduct, ...optionalResourceOwners.map(productDisplayName)].join(', ');
|
|
21
16
|
}
|
|
22
|
-
function productDisplayName(ariResourceOwnerOrUserProvidedProductName) {
|
|
17
|
+
export function productDisplayName(ariResourceOwnerOrUserProvidedProductName) {
|
|
23
18
|
const resourceOwner = ariResourceOwnerOrUserProvidedProductName.toLowerCase();
|
|
24
|
-
return RESOURCE_OWNER_TO_PRODUCT_DISPLAY_NAME[resourceOwner] ??
|
|
19
|
+
return (RESOURCE_OWNER_TO_PRODUCT_DISPLAY_NAME[resourceOwner] ?? Case.capital(ariResourceOwnerOrUserProvidedProductName));
|
|
25
20
|
}
|
|
26
|
-
function ariResourceOwner(productDisplayName) {
|
|
21
|
+
export function ariResourceOwner(productDisplayName) {
|
|
27
22
|
return PRODUCT_DISPLAY_NAME_TO_RESOURCE_OWNER[productDisplayName] ?? productDisplayName.toLowerCase();
|
|
28
23
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { FileSystemReader } from '../file-system';
|
|
1
|
+
import { FileSystemReader } from '../file-system/index.js';
|
|
2
2
|
export declare const listGitIgnoreFiles: (fileSystemReader: Pick<FileSystemReader, "readFile" | "readGlob" | "hasGlobSpecialChars">, gitIgnorePath?: string) => Promise<string[]>;
|
|
3
3
|
export declare const listTSConfigIncludeExclude: (fileSystemReader: Pick<FileSystemReader, "readFile" | "readGlob">, tsConfigPath?: string) => Promise<{
|
|
4
4
|
include: string[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"read-app-config-files.d.ts","sourceRoot":"","sources":["../../src/shared/read-app-config-files.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,gBAAgB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"read-app-config-files.d.ts","sourceRoot":"","sources":["../../src/shared/read-app-config-files.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAK3D,eAAO,MAAM,kBAAkB,GAC7B,kBAAkB,IAAI,CAAC,gBAAgB,EAAE,UAAU,GAAG,UAAU,GAAG,qBAAqB,CAAC,EACzF,sBAA4B,KAC3B,OAAO,CAAC,MAAM,EAAE,CAkBlB,CAAC;AAgBF,eAAO,MAAM,0BAA0B,GACrC,kBAAkB,IAAI,CAAC,gBAAgB,EAAE,UAAU,GAAG,UAAU,CAAC,EACjE,qBAA8B,KAC7B,OAAO,CAAC;IAAE,OAAO,EAAE,MAAM,EAAE,CAAC;IAAC,OAAO,EAAE,MAAM,EAAE,CAAA;CAAE,CAUlD,CAAC"}
|