@capgo/cli 7.122.1 → 7.122.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.js +433 -433
- package/dist/package.json +1 -1
- package/dist/src/bundle/builder-cta.d.ts +17 -7
- package/dist/src/sdk.js +270 -270
- package/dist/src/terminal-table.d.ts +7 -0
- package/package.json +1 -1
package/dist/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export type BuilderCtaSurface = 'skip' | 'ci-ad' | 'prompt-onboarding' | 'prompt-build';
|
|
2
|
-
export type BuilderCtaAction = 'continue' | 'launch-onboarding' | 'launch-build';
|
|
2
|
+
export type BuilderCtaAction = 'continue' | 'abort' | 'launch-onboarding' | 'launch-build';
|
|
3
3
|
export interface BuilderCtaContext {
|
|
4
4
|
incompatible: boolean;
|
|
5
5
|
interactive: boolean;
|
|
@@ -32,11 +32,18 @@ export interface ShouldBlockIncompatibleUploadContext {
|
|
|
32
32
|
*/
|
|
33
33
|
export declare function shouldBlockIncompatibleUpload(ctx: ShouldBlockIncompatibleUploadContext): boolean;
|
|
34
34
|
export declare function printBuilderCiAd(hasCredentials: boolean): void;
|
|
35
|
-
|
|
36
|
-
|
|
35
|
+
export type BuilderCtaChoice = 'yes' | 'no' | 'learn';
|
|
36
|
+
interface BuilderSelectOption {
|
|
37
|
+
value: BuilderCtaChoice;
|
|
38
|
+
label: string;
|
|
39
|
+
}
|
|
40
|
+
interface BuilderSelectOptions {
|
|
37
41
|
message: string;
|
|
38
|
-
|
|
39
|
-
|
|
42
|
+
options: BuilderSelectOption[];
|
|
43
|
+
initialValue?: BuilderCtaChoice;
|
|
44
|
+
}
|
|
45
|
+
/** Select-prompt seam (`@clack/prompts` `select` satisfies it); injectable for tests. */
|
|
46
|
+
export type BuilderSelect = (opts: BuilderSelectOptions) => Promise<BuilderCtaChoice | symbol>;
|
|
40
47
|
export interface MaybePromptBuilderCtaParams {
|
|
41
48
|
incompatible: boolean;
|
|
42
49
|
interactive: boolean;
|
|
@@ -46,8 +53,10 @@ export interface MaybePromptBuilderCtaParams {
|
|
|
46
53
|
orgId: string;
|
|
47
54
|
apikey: string;
|
|
48
55
|
incompatibleCount: number;
|
|
49
|
-
/** Injectable for tests; defaults to the `@clack/prompts`
|
|
50
|
-
|
|
56
|
+
/** Injectable for tests; defaults to the `@clack/prompts` select prompt. */
|
|
57
|
+
select?: BuilderSelect;
|
|
58
|
+
/** Injectable for tests; defaults to opening the learn page in the browser. */
|
|
59
|
+
openUrl?: (url: string) => Promise<unknown>;
|
|
51
60
|
}
|
|
52
61
|
/**
|
|
53
62
|
* Surface the Capgo Builder CTA for an incompatible upload and return the action
|
|
@@ -55,3 +64,4 @@ export interface MaybePromptBuilderCtaParams {
|
|
|
55
64
|
* `continue` so the upload is never blocked by the CTA.
|
|
56
65
|
*/
|
|
57
66
|
export declare function maybePromptBuilderCta(params: MaybePromptBuilderCtaParams): Promise<BuilderCtaAction>;
|
|
67
|
+
export {};
|