-
Notifications
You must be signed in to change notification settings - Fork 682
Expand file tree
/
Copy pathdefinitions.ts
More file actions
839 lines (692 loc) · 21.8 KB
/
definitions.ts
File metadata and controls
839 lines (692 loc) · 21.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
import {
BaseConfig,
CommandInstanceInfo as FrameworkCommandInstanceInfo,
CommandLineInputs,
CommandLineOptions,
CommandMetadata as FrameworkCommandMetadata,
CommandMetadataInput as FrameworkCommandMetadataInput,
CommandMetadataOption as FrameworkCommandMetadataOption,
HydratedCommandMetadata as FrameworkHydratedCommandMetadata,
ICommand as FrameworkCommand,
INamespace as FrameworkNamespace,
NamespaceLocateResult as FrameworkNamespaceLocateResult,
PackageJson,
} from '@ionic/cli-framework';
import { Logger } from '@ionic/cli-framework-output';
import { PromptModule } from '@ionic/cli-framework-prompts';
import { NetworkInterface } from '@ionic/utils-network';
import { Subprocess, SubprocessOptions, WhichOptions } from '@ionic/utils-subprocess';
import { ChildProcess, SpawnOptions } from 'child_process';
import * as fs from 'fs';
import type { Integration as CapacitorIntegration } from './lib/integrations/capacitor';
import type { CapacitorConfig } from './lib/integrations/capacitor/config';
import type { Integration as CordovaIntegration } from './lib/integrations/cordova';
import type { Integration as EnterpriseIntegration } from './lib/integrations/enterprise';
export {
CommandLineInputs,
CommandLineOptions,
NamespaceMetadata,
} from '@ionic/cli-framework';
export type SuperAgentRequest = import('superagent').SuperAgentRequest;
export interface SuperAgentError extends Error {
response: import('superagent').Response;
}
export type LogFn = (msg: string) => void;
export interface ILogger extends Logger {
ok: LogFn;
rawmsg: LogFn;
}
export interface StarterManifest {
name: string;
baseref: string;
welcome?: string;
}
export interface CordovaPackageJson extends PackageJson {
cordova: {
platforms: string[];
plugins: {
[key: string]: unknown;
};
};
}
export interface LegacyAndroidBuildOutputEntry {
outputType: {
type: string;
};
path: string;
}
export interface AndroidBuildOutput {
artifactType: {
type: string;
};
elements: {
outputFile: string;
}[];
}
export interface Runner<T extends object, U> {
run(options: T): Promise<U>;
}
export type ProjectType = 'angular' | 'angular-standalone' | 'custom' | 'bare' | 'react' | 'vue' | 'react-vite' | 'vue-vite';
export type HookName = 'build:before' | 'build:after' | 'serve:before' | 'serve:after' | 'capacitor:run:before' | 'capacitor:build:before' | 'capacitor:sync:after';
export type CapacitorRunHookName = 'capacitor:run:before';
export type CapacitorBuildHookName = 'capacitor:build:before';
export type CapacitorSyncHookName = 'capacitor:sync:after';
export interface BaseHookContext {
project: {
type: ProjectType;
dir: string;
srcDir: string;
};
argv: string[];
env: NodeJS.ProcessEnv;
}
export type AnyServeOptions = ReactServeOptions | AngularServeOptions;
export type AnyBuildOptions = ReactBuildOptions | AngularBuildOptions;
export interface CapacitorSyncHookInput {
readonly name: CapacitorSyncHookName;
readonly build?: AnyBuildOptions;
readonly capacitor: IonicCapacitorOptions;
}
export interface CapacitorRunHookInput {
readonly name: CapacitorRunHookName;
readonly serve?: AnyServeOptions;
readonly build?: AnyBuildOptions;
readonly capacitor: IonicCapacitorOptions;
}
export interface CapacitorBuildHookInput {
readonly name: CapacitorBuildHookName;
readonly build: AnyBuildOptions;
readonly capacitor: IonicCapacitorOptions;
}
export interface BuildHookInput {
readonly name: 'build:before' | 'build:after';
readonly build: AngularBuildOptions;
}
export interface ServeBeforeHookInput {
readonly name: 'serve:before';
readonly serve: AngularServeOptions;
}
export interface ServeAfterHookInput {
readonly name: 'serve:after';
readonly serve: (AngularServeOptions) & ServeDetails;
}
export type HookInput = BuildHookInput | ServeBeforeHookInput | ServeAfterHookInput | CapacitorRunHookInput | CapacitorBuildHookInput | CapacitorSyncHookInput;
export type HookContext = BaseHookContext & HookInput;
export type HookFn = (ctx: HookContext) => Promise<void>;
export type IntegrationName = 'capacitor' | 'cordova' | 'enterprise';
export interface ProjectIntegration {
enabled?: boolean;
root?: string;
}
export interface EnterpriseProjectIntegration extends ProjectIntegration {
productKey?: string;
registries?: string[];
appId?: string;
orgId?: string;
keyId?: number;
}
export interface ProjectIntegrations {
cordova?: ProjectIntegration;
capacitor?: ProjectIntegration;
enterprise?: EnterpriseProjectIntegration;
}
export interface Response<T extends object> extends APIResponseSuccess {
data: T;
}
export interface ResourceClientLoad<T extends object> {
load(id: string | number, modifiers: ResourceClientRequestModifiers): Promise<T>;
}
export interface ResourceClientDelete {
delete(id: string | number): Promise<void>;
}
export interface ResourceClientCreate<T extends object, U extends object> {
create(details: U): Promise<T>;
}
export interface ResourceClientPaginate<T extends object> {
paginate(args?: Partial<PaginateArgs<Response<T[]>>>): IPaginator<Response<T[]>, PaginatorState>;
}
export interface ResourceClientRequestModifiers {
fields?: string[];
}
export interface Org {
name: string;
}
export interface GithubRepo {
full_name: string;
id: number;
}
export interface GithubBranch {
name: string;
}
export interface AppAssociation {
repository: RepoAssociation;
}
export interface RepoAssociationBase {
html_url: string;
clone_url: string;
full_name: string;
}
export interface GithubRepoAssociation extends RepoAssociationBase {
type: 'github';
id: number;
}
export interface GitlabRepoAssociation extends RepoAssociationBase {
type: 'gitlab';
id: number;
}
export interface GitlabEnterpriseRepoAssociation extends RepoAssociationBase {
type: 'gitlab_enterprise';
id: number;
}
export interface BitbucketCloudRepoAssociation extends RepoAssociationBase {
type: 'bitbucket_cloud';
id: string;
}
export interface BitbucketServerRepoAssociation extends RepoAssociationBase {
type: 'bitbucket_server';
id: number;
}
export interface AzureDevopsRepoAssociation extends RepoAssociationBase {
type: 'azure_devops';
id: string;
}
export type RepoAssociation = GithubRepoAssociation | BitbucketCloudRepoAssociation | BitbucketServerRepoAssociation;
export type AssociationType = 'github' | 'bitbucket_cloud' | 'bitbucket_server';
export interface App {
id: string;
name: string;
slug: string;
org: null | Org;
repo_url?: string;
association?: null | AppAssociation;
}
export interface Login {
user: User;
token: string;
}
export interface User {
id: number;
email: string;
oauth_identities?: OAuthIdentity;
}
export type OAuthIdentity = {
[A in AssociationType]?: OAuthIdentityDetails;
};
export interface OAuthIdentityDetails {
username: string;
name: string;
html_url: string;
}
export interface OAuthServerConfig {
authorizationUrl: string;
tokenUrl: string;
clientId: string;
apiAudience: string;
}
export interface OpenIdToken {
access_token: string;
expires_in: number;
id_token?: string;
refresh_token?: string;
scope: 'openid profile email offline_access';
token_type: 'Bearer';
state?: string;
}
export interface Snapshot {
id: string;
sha: string;
ref: string;
state: string;
created: string;
note: string;
}
export interface SSHKey {
id: string;
pubkey: string;
fingerprint: string;
annotation: string;
name: string;
created: string;
updated: string;
}
export interface SecurityProfile {
name: string;
tag: string;
type: 'development' | 'production';
created: string;
credentials: {
android?: object;
ios?: object;
};
}
export interface IConfig extends BaseConfig<ConfigFile> {
getAPIUrl(): string;
getDashUrl(): string;
getGitHost(): string;
getGitPort(): number;
getHTTPConfig(): CreateRequestOptions;
getOpenIDOAuthConfig(): OAuthServerConfig;
}
export interface ProjectPersonalizationDetails {
name: string;
projectId: string;
packageId?: string;
version?: string;
description?: string;
themeColor?: string;
appIcon?: Buffer;
splash?: Buffer;
}
export interface IProjectConfig {
name: string;
type?: ProjectType;
id?: string;
root?: string;
readonly integrations: ProjectIntegrations;
readonly hooks?: Record<HookName, string | string[] | undefined>;
}
export interface IMultiProjectConfig {
defaultProject?: string;
projects: {
[key: string]: IProjectConfig | undefined;
};
}
export type ProjectFile = IProjectConfig | IMultiProjectConfig;
export interface IProject {
readonly rootDirectory: string;
readonly directory: string;
readonly filePath: string;
readonly pathPrefix: readonly string[];
readonly type: ProjectType;
readonly config: BaseConfig<IProjectConfig>;
readonly details: import('./lib/project').ProjectDetailsResult;
getSourceDir(sourceRoot?: string): Promise<string>;
getDefaultDistDir(): Promise<string>;
getDistDir(): Promise<string>;
getInfo(): Promise<InfoItem[]>;
detected(): Promise<boolean>;
createIntegration(name: 'capacitor'): Promise<CapacitorIntegration>;
createIntegration(name: 'cordova'): Promise<CordovaIntegration>;
createIntegration(name: 'enterprise'): Promise<EnterpriseIntegration>;
createIntegration(name: IntegrationName): Promise<IIntegration<ProjectIntegration>>;
getIntegration(name: IntegrationName): Required<ProjectIntegration> | undefined;
requireIntegration(name: IntegrationName): Required<ProjectIntegration>;
requireAppflowId(): Promise<string>;
getPackageJson(pkgName?: string, options?: { logErrors?: boolean }): Promise<[PackageJson | undefined, string | undefined]>;
requirePackageJson(pkgName?: string): Promise<PackageJson>;
personalize(details: ProjectPersonalizationDetails): Promise<void>;
getBuildRunner(): Promise<import('./lib/build').BuildRunner<any> | undefined>;
getServeRunner(): Promise<import('./lib/serve').ServeRunner<any> | undefined>;
getGenerateRunner(): Promise<import('./lib/generate').GenerateRunner<any> | undefined>;
requireBuildRunner(): Promise<import('./lib/build').BuildRunner<any>>;
requireServeRunner(): Promise<import('./lib/serve').ServeRunner<any>>;
requireGenerateRunner(): Promise<import('./lib/generate').GenerateRunner<any>>;
}
export interface IntegrationAddDetails {
quiet?: boolean;
root: string;
enableArgs?: string[];
}
export interface IntegrationAddHandlers {
conflictHandler?: (f: string, stats: fs.Stats) => Promise<boolean>;
onFileCreate?: (f: string) => void;
}
export interface IIntegration<T extends ProjectIntegration> {
readonly name: IntegrationName;
readonly summary: string;
readonly archiveUrl?: string;
readonly config: BaseConfig<T>;
add(details: IntegrationAddDetails): Promise<void>;
isAdded(): boolean;
enable(config?: T): Promise<void>;
isEnabled(): boolean;
disable(): Promise<void>;
getInfo(): Promise<InfoItem[]>;
personalize(details: ProjectPersonalizationDetails): Promise<void>;
}
export interface PackageVersions {
[key: string]: string;
}
export interface CommandMetadataInput extends FrameworkCommandMetadataInput {
private?: boolean;
}
export interface CommandMetadataOption extends FrameworkCommandMetadataOption {
private?: boolean;
hint?: string;
}
export interface ExitCodeException extends Error {
exitCode: number;
}
export interface CommandMetadata extends FrameworkCommandMetadata<CommandMetadataInput, CommandMetadataOption> {
type: 'global' | 'project';
}
export type HydratedCommandMetadata = CommandMetadata & FrameworkHydratedCommandMetadata<ICommand, INamespace, CommandMetadata, CommandMetadataInput, CommandMetadataOption>;
export type CommandInstanceInfo = FrameworkCommandInstanceInfo<ICommand, INamespace, CommandMetadata, CommandMetadataInput, CommandMetadataOption>;
export type NamespaceLocateResult = FrameworkNamespaceLocateResult<ICommand, INamespace, CommandMetadata, CommandMetadataInput, CommandMetadataOption>;
export interface ISession {
login(email: string, password: string): Promise<void>;
ssoLogin(email: string): Promise<void>;
tokenLogin(token: string): Promise<void>;
webLogin(): Promise<void>;
wizardLogin(): Promise<string|undefined>;
logout(): Promise<void>;
isLoggedIn(): boolean;
getUser(): { id: number; };
getUserToken(): Promise<string>;
}
export interface IShellSpawnOptions extends SpawnOptions {
showCommand?: boolean;
}
export interface IShellOutputOptions extends IShellSpawnOptions {
fatalOnError?: boolean;
fatalOnNotFound?: boolean;
showError?: boolean;
}
export interface IShellRunOptions extends IShellOutputOptions {
stream?: NodeJS.WritableStream;
killOnExit?: boolean;
truncateErrorOutput?: number;
}
export interface IShell {
alterPath: (path: string) => string;
run(command: string, args: readonly string[], options: IShellRunOptions): Promise<void>;
output(command: string, args: readonly string[], options: IShellOutputOptions): Promise<string>;
spawn(command: string, args: readonly string[], options: IShellSpawnOptions): Promise<ChildProcess>;
cmdinfo(cmd: string, args?: readonly string[], options?: SubprocessOptions): Promise<string | undefined>;
which(command: string, options?: WhichOptions): Promise<string>;
createSubprocess(command: string, args: readonly string[], options?: SubprocessOptions): Promise<Subprocess>;
}
export interface ITelemetry {
sendCommand(command: string, args: string[]): Promise<void>;
}
export type NpmClient = 'yarn' | 'npm' | 'pnpm' | 'bun';
export type FeatureId = 'ssl-commands';
export interface ConfigFile {
'version': string;
'telemetry': boolean;
'npmClient': NpmClient;
'interactive'?: boolean;
// HTTP configuration
'proxy'?: string;
'ssl.cafile'?: string | string[];
'ssl.certfile'?: string | string[];
'ssl.keyfile'?: string | string[];
// Ionic API
'urls.api'?: string;
'urls.dash'?: string;
'git.host'?: string;
'git.port'?: number;
'git.setup'?: boolean;
'org.id'?: string;
'user.id'?: number;
'user.email'?: string;
'tokens.user'?: string;
'tokens.telemetry'?: string;
'tokens.refresh'?: string;
'tokens.issuedOn'?: string;
'tokens.expiresInSeconds'?: number;
'tokens.flowName'?: string;
// oauth configs
'oauth.openid.authorization_url'?: string;
'oauth.openid.token_url'?: string;
'oauth.openid.client_id'?: string;
'oauth.openid.api_audience'?: string;
// Features
'features.ssl-commands'?: boolean;
}
export interface SSLConfig {
cafile?: string | string[];
certfile?: string | string[];
keyfile?: string | string[];
}
export interface CreateRequestOptions {
userAgent: string;
ssl?: SSLConfig;
proxy?: string;
}
export type APIResponse = APIResponseSuccess | APIResponseError;
export interface APIResponseMeta {
status: number;
version: string;
request_id: string;
}
export type APIResponseData = object | object[] | string;
export interface APIResponseErrorDetails {
error_type: string;
parameter: string;
errors: string[];
}
export interface APIResponseError {
error: APIResponseErrorError;
meta: APIResponseMeta;
}
export interface APIResponseErrorError {
message: string;
link: string | null;
type: string;
details?: APIResponseErrorDetails[];
}
export interface APIResponseSuccess {
data: APIResponseData;
meta: APIResponseMeta;
}
export interface APIResponsePageTokenMeta extends APIResponseMeta {
prev_page_token?: string;
next_page_token?: string;
}
export type HttpMethod = 'GET' | 'POST' | 'PATCH' | 'PUT' | 'DELETE' | 'PURGE' | 'HEAD' | 'OPTIONS';
export const enum ContentType {
JSON = 'application/json',
FORM_URLENCODED = 'application/x-www-form-urlencoded',
HTML = 'text/html',
}
export interface IClient {
config: IConfig;
make(method: HttpMethod, path: string, contentType?: ContentType): Promise<{ req: SuperAgentRequest; }>;
do(req: SuperAgentRequest): Promise<APIResponseSuccess>;
paginate<T extends Response<object[]>>(args: PaginateArgs<T>): IPaginator<T>;
}
export type PaginateArgs<T extends Response<object[]>> = Pick<PaginatorDeps<T>, 'reqgen' | 'guard' | 'state' | 'max'>;
export interface IPaginator<T extends Response<object[]>, S = PaginatorState> extends IterableIterator<Promise<T>> {
readonly state: S;
}
export type PaginatorRequestGenerator = () => Promise<{ req: SuperAgentRequest; }>;
export type PaginatorGuard<T extends Response<object[]>> = (res: APIResponseSuccess) => res is T;
export interface PaginatorState {
done: boolean;
loaded: number;
}
export interface PagePaginatorState extends PaginatorState {
page: number;
page_size?: number;
}
export interface TokenPaginatorState extends PaginatorState {
page_token?: string;
}
export interface PaginatorDeps<T extends Response<object[]>, S = PaginatorState> {
readonly client: IClient;
readonly reqgen: PaginatorRequestGenerator;
readonly guard: PaginatorGuard<T>;
readonly state?: Partial<S>;
readonly max?: number;
}
export type InfoItemGroup = 'ionic' | 'capacitor' | 'cordova' | 'utility' | 'system' | 'environment';
export interface InfoItem {
group: InfoItemGroup;
name: string;
value: string;
key?: string;
flair?: string;
path?: string;
hidden?: boolean;
}
export interface BaseBuildOptions {
engine: string; // browser, cordova, etc.
platform?: string; // android, ios, etc.
project?: string;
verbose?: boolean;
'--': string[];
}
export interface BuildOptions<T extends ProjectType> extends BaseBuildOptions {
type: T;
}
export interface AngularBuildOptions extends BuildOptions<'angular'> {
/**
* The Angular architect configuration to use for builds.
*
* The `--prod` command line flag is a shortcut which translates to the
* 'production' configuration.
*/
configuration?: string;
sourcemaps?: boolean;
cordovaAssets?: boolean;
watch?: boolean;
}
export interface ReactBuildOptions extends BuildOptions<'react'> {
publicUrl?: string;
ci?: boolean;
sourceMap?: boolean;
inlineRuntimeChunk?: boolean;
}
export interface VueBuildOptions extends BuildOptions<'vue'> {
configuration?: string;
sourcemaps?: boolean;
}
export interface IonicCapacitorOptions extends CapacitorConfig {
'--': string[];
verbose?: boolean;
}
export interface CustomBuildOptions extends BuildOptions<'custom'> {}
export interface GenerateOptions {
name: string;
}
export interface AngularGenerateOptions extends GenerateOptions {
[key: string]: any; // TODO
schematic: string;
}
export interface IonicAngularGenerateOptions extends GenerateOptions {
type: string;
module: boolean;
constants: boolean;
}
export interface ServeOptions {
// Command Options
host: string;
port: number;
publicHost?: string;
livereload: boolean;
proxy: boolean;
open: boolean;
browser?: string;
browserOption?: string;
platform?: string; // android, ios, etc.
project?: string;
verbose?: boolean;
'--': string[];
// Additional Options
externalAddressRequired?: boolean;
engine: string; // browser, cordova, etc.
}
export interface AngularServeOptions extends ServeOptions {
consolelogs?: boolean;
consolelogsPort?: number;
ssl?: boolean;
configuration?: string;
sourcemaps?: boolean;
}
export interface ReactServeOptions extends ServeOptions {
https?: boolean;
ci?: boolean;
reactEditor?: string;
}
export interface VueServeOptions extends ServeOptions {
https: boolean;
mode: string;
configuration?: string;
sourcemaps?: boolean;
}
export interface CustomServeOptions extends ServeOptions {}
export interface LabServeDetails {
projectType: ProjectType;
host: string;
port: number;
}
export interface ServeDetails {
custom: boolean;
protocol: string;
localAddress: string;
externalAddress: string;
port: number;
externalNetworkInterfaces: NetworkInterface[];
externallyAccessible: boolean;
}
export interface IonicContext {
readonly binPath: string;
readonly libPath: string;
readonly execPath: string;
readonly version: string;
}
export interface IonicEnvironment {
readonly flags: IonicEnvironmentFlags;
readonly client: IClient;
readonly config: IConfig; // CLI global config (~/.ionic/config.json)
readonly log: ILogger;
readonly prompt: PromptModule;
readonly ctx: IonicContext;
readonly session: ISession;
readonly shell: IShell;
getInfo(): Promise<InfoItem[]>;
}
export interface IonicEnvironmentFlags {
readonly interactive: boolean;
readonly confirm: boolean;
}
export type DistTag = 'testing' | 'canary' | 'latest';
export interface ICommand extends FrameworkCommand<ICommand, INamespace, CommandMetadata, CommandMetadataInput, CommandMetadataOption> {
readonly env: IonicEnvironment;
readonly project?: IProject;
execute(inputs: CommandLineInputs, options: CommandLineOptions, metadata: CommandInstanceInfo): Promise<void>;
}
export interface CommandPreRun extends ICommand {
preRun(inputs: CommandLineInputs, options: CommandLineOptions, metadata: CommandInstanceInfo): Promise<void>;
}
export interface INamespace extends FrameworkNamespace<ICommand, INamespace, CommandMetadata, CommandMetadataInput, CommandMetadataOption> {
env: IonicEnvironment;
project?: IProject;
}
export interface StarterList {
starters: {
name: string;
id: string;
type: ProjectType;
}[];
integrations: {
name: IntegrationName;
id: string;
}[];
}
export interface BaseStarterTemplate {
name: string;
projectType: ProjectType;
description?: string;
}
export interface RepoStarterTemplate extends BaseStarterTemplate {
type: 'repo';
repo: string;
}
export interface ManagedStarterTemplate extends BaseStarterTemplate {
type: 'managed';
id: string;
}
export type StarterTemplate = RepoStarterTemplate | ManagedStarterTemplate;
export interface ResolvedStarterTemplate extends BaseStarterTemplate {
archive: string;
}
export interface TelemetryIPCMessage {
type: 'telemetry';
data: { command: string; args: string[]; };
}
export interface UpdateCheckIPCMessage {
type: 'update-check';
}
export type IPCMessage = TelemetryIPCMessage | UpdateCheckIPCMessage;