1 |
|
2 | import { BaseConfig, CommandInstanceInfo as FrameworkCommandInstanceInfo, CommandLineInputs, CommandLineOptions, CommandMetadata as FrameworkCommandMetadata, CommandMetadataInput, CommandMetadataOption as FrameworkCommandMetadataOption, HydratedCommandMetadata as FrameworkHydratedCommandMetadata, ICommand as FrameworkCommand, INamespace as FrameworkNamespace, Logger, NamespaceLocateResult as FrameworkNamespaceLocateResult, PackageJson, PromptModule } from '@ionic/cli-framework';
|
3 | import { NetworkInterface } from '@ionic/utils-network';
|
4 | import { Subprocess, SubprocessOptions, WhichOptions } from '@ionic/utils-subprocess';
|
5 | import { ChildProcess, SpawnOptions } from 'child_process';
|
6 | import * as fs from 'fs';
|
7 | export { CommandLineInputs, CommandLineOptions, CommandMetadataInput, NamespaceMetadata, } from '@ionic/cli-framework';
|
8 | export declare type SuperAgentRequest = import('superagent').SuperAgentRequest;
|
9 | export interface SuperAgentError extends Error {
|
10 | response: import('superagent').Response;
|
11 | }
|
12 | export declare type LogFn = (msg: string) => void;
|
13 | export interface ILogger extends Logger {
|
14 | ok: LogFn;
|
15 | rawmsg: LogFn;
|
16 | }
|
17 | export interface StarterManifest {
|
18 | name: string;
|
19 | baseref: string;
|
20 | welcome?: string;
|
21 | }
|
22 | export interface CordovaPackageJson extends PackageJson {
|
23 | cordova: {
|
24 | platforms: string[];
|
25 | plugins: {
|
26 | [key: string]: unknown;
|
27 | };
|
28 | };
|
29 | }
|
30 | export interface Runner<T extends object, U> {
|
31 | run(options: T): Promise<U>;
|
32 | }
|
33 | export declare type ProjectType = 'angular' | 'ionic-angular' | 'ionic1' | 'custom' | 'bare' | 'react' | 'vue';
|
34 | export declare type HookName = 'build:before' | 'build:after' | 'serve:before' | 'serve:after';
|
35 | export interface BaseHookContext {
|
36 | project: {
|
37 | type: ProjectType;
|
38 | dir: string;
|
39 | srcDir: string;
|
40 | };
|
41 | argv: string[];
|
42 | env: NodeJS.ProcessEnv;
|
43 | }
|
44 | export interface BuildHookInput {
|
45 | readonly name: 'build:before' | 'build:after';
|
46 | readonly build: AngularBuildOptions | IonicAngularBuildOptions | Ionic1BuildOptions;
|
47 | }
|
48 | export interface ServeBeforeHookInput {
|
49 | readonly name: 'serve:before';
|
50 | readonly serve: AngularServeOptions | IonicAngularServeOptions | Ionic1ServeOptions;
|
51 | }
|
52 | export interface ServeAfterHookInput {
|
53 | readonly name: 'serve:after';
|
54 | readonly serve: (AngularServeOptions | IonicAngularServeOptions | Ionic1ServeOptions) & ServeDetails;
|
55 | }
|
56 | export declare type HookInput = BuildHookInput | ServeBeforeHookInput | ServeAfterHookInput;
|
57 | export declare type HookContext = BaseHookContext & HookInput;
|
58 | export declare type HookFn = (ctx: HookContext) => Promise<void>;
|
59 | export declare type IntegrationName = 'capacitor' | 'cordova' | 'enterprise';
|
60 | export interface ProjectIntegration {
|
61 | enabled?: boolean;
|
62 | root?: string;
|
63 | }
|
64 | export interface EnterpriseProjectIntegration extends ProjectIntegration {
|
65 | productKey?: string;
|
66 | registries?: string[];
|
67 | appId?: string;
|
68 | orgId?: string;
|
69 | keyId?: number;
|
70 | }
|
71 | export interface ProjectIntegrations {
|
72 | cordova?: ProjectIntegration;
|
73 | capacitor?: ProjectIntegration;
|
74 | enterprise?: EnterpriseProjectIntegration;
|
75 | }
|
76 | export interface Response<T extends object> extends APIResponseSuccess {
|
77 | data: T;
|
78 | }
|
79 | export interface ResourceClientLoad<T extends object> {
|
80 | load(id: string | number, modifiers: ResourceClientRequestModifiers): Promise<T>;
|
81 | }
|
82 | export interface ResourceClientDelete {
|
83 | delete(id: string | number): Promise<void>;
|
84 | }
|
85 | export interface ResourceClientCreate<T extends object, U extends object> {
|
86 | create(details: U): Promise<T>;
|
87 | }
|
88 | export interface ResourceClientPaginate<T extends object> {
|
89 | paginate(args?: Partial<PaginateArgs<Response<T[]>>>): IPaginator<Response<T[]>, PaginatorState>;
|
90 | }
|
91 | export interface ResourceClientRequestModifiers {
|
92 | fields?: string[];
|
93 | }
|
94 | export interface Org {
|
95 | name: string;
|
96 | }
|
97 | export interface GithubRepo {
|
98 | full_name: string;
|
99 | id: number;
|
100 | }
|
101 | export interface GithubBranch {
|
102 | name: string;
|
103 | }
|
104 | export interface AppAssociation {
|
105 | repository: RepoAssociation;
|
106 | }
|
107 | export interface RepoAssociationBase {
|
108 | html_url: string;
|
109 | clone_url: string;
|
110 | full_name: string;
|
111 | }
|
112 | export interface GithubRepoAssociation extends RepoAssociationBase {
|
113 | type: 'github';
|
114 | id: number;
|
115 | }
|
116 | export interface BitbucketCloudRepoAssociation extends RepoAssociationBase {
|
117 | type: 'bitbucket_cloud';
|
118 | id: string;
|
119 | }
|
120 | export interface BitbucketServerRepoAssociation extends RepoAssociationBase {
|
121 | type: 'bitbucket_server';
|
122 | id: number;
|
123 | }
|
124 | export declare type RepoAssociation = GithubRepoAssociation | BitbucketCloudRepoAssociation | BitbucketServerRepoAssociation;
|
125 | export declare type AssociationType = 'github' | 'bitbucket_cloud' | 'bitbucket_server';
|
126 | export interface App {
|
127 | id: string;
|
128 | name: string;
|
129 | slug: string;
|
130 | org: null | Org;
|
131 | repo_url?: string;
|
132 | association?: null | AppAssociation;
|
133 | }
|
134 | export interface Login {
|
135 | user: User;
|
136 | token: string;
|
137 | }
|
138 | export interface User {
|
139 | id: number;
|
140 | email: string;
|
141 | oauth_identities?: OAuthIdentity;
|
142 | }
|
143 | export declare type OAuthIdentity = {
|
144 | [A in AssociationType]?: OAuthIdentityDetails;
|
145 | };
|
146 | export interface OAuthIdentityDetails {
|
147 | username: string;
|
148 | name: string;
|
149 | html_url: string;
|
150 | }
|
151 | export interface Snapshot {
|
152 | id: string;
|
153 | sha: string;
|
154 | ref: string;
|
155 | state: string;
|
156 | created: string;
|
157 | note: string;
|
158 | }
|
159 | export interface SSHKey {
|
160 | id: string;
|
161 | pubkey: string;
|
162 | fingerprint: string;
|
163 | annotation: string;
|
164 | name: string;
|
165 | created: string;
|
166 | updated: string;
|
167 | }
|
168 | export interface SecurityProfile {
|
169 | name: string;
|
170 | tag: string;
|
171 | type: 'development' | 'production';
|
172 | created: string;
|
173 | credentials: {
|
174 | android?: object;
|
175 | ios?: object;
|
176 | };
|
177 | }
|
178 | export interface IConfig extends BaseConfig<ConfigFile> {
|
179 | getAPIUrl(): string;
|
180 | getDashUrl(): string;
|
181 | getGitHost(): string;
|
182 | getGitPort(): number;
|
183 | getHTTPConfig(): CreateRequestOptions;
|
184 | }
|
185 | export interface ProjectPersonalizationDetails {
|
186 | name: string;
|
187 | projectId: string;
|
188 | packageId?: string;
|
189 | version?: string;
|
190 | description?: string;
|
191 | }
|
192 | export interface IProjectConfig {
|
193 | name: string;
|
194 | type?: ProjectType;
|
195 | id?: string;
|
196 | root?: string;
|
197 | readonly integrations: ProjectIntegrations;
|
198 | readonly hooks?: Record<HookName, string | string[] | undefined>;
|
199 | }
|
200 | export interface IMultiProjectConfig {
|
201 | defaultProject?: string;
|
202 | projects: {
|
203 | [key: string]: IProjectConfig | undefined;
|
204 | };
|
205 | }
|
206 | export declare type ProjectFile = IProjectConfig | IMultiProjectConfig;
|
207 | export interface IProject {
|
208 | readonly rootDirectory: string;
|
209 | readonly directory: string;
|
210 | readonly filePath: string;
|
211 | readonly pathPrefix: readonly string[];
|
212 | readonly type: ProjectType;
|
213 | readonly config: BaseConfig<IProjectConfig>;
|
214 | readonly details: import('./lib/project').ProjectDetailsResult;
|
215 | getDocsUrl(): Promise<string>;
|
216 | getSourceDir(sourceRoot?: string): Promise<string>;
|
217 | getDistDir(): Promise<string>;
|
218 | getInfo(): Promise<InfoItem[]>;
|
219 | detected(): Promise<boolean>;
|
220 | createIntegration(name: IntegrationName): Promise<IIntegration<ProjectIntegration>>;
|
221 | getIntegration(name: IntegrationName): Required<ProjectIntegration> | undefined;
|
222 | requireIntegration(name: IntegrationName): Required<ProjectIntegration>;
|
223 | requireAppflowId(): Promise<string>;
|
224 | getPackageJson(pkgName?: string): Promise<[PackageJson | undefined, string | undefined]>;
|
225 | requirePackageJson(pkgName?: string): Promise<PackageJson>;
|
226 | personalize(details: ProjectPersonalizationDetails): Promise<void>;
|
227 | registerAilments(registry: IAilmentRegistry): Promise<void>;
|
228 | getBuildRunner(): Promise<import('./lib/build').BuildRunner<any> | undefined>;
|
229 | getServeRunner(): Promise<import('./lib/serve').ServeRunner<any> | undefined>;
|
230 | getGenerateRunner(): Promise<import('./lib/generate').GenerateRunner<any> | undefined>;
|
231 | requireBuildRunner(): Promise<import('./lib/build').BuildRunner<any>>;
|
232 | requireServeRunner(): Promise<import('./lib/serve').ServeRunner<any>>;
|
233 | requireGenerateRunner(): Promise<import('./lib/generate').GenerateRunner<any>>;
|
234 | }
|
235 | export interface IntegrationAddDetails {
|
236 | env: IonicEnvironment;
|
237 | quiet?: boolean;
|
238 | root: string;
|
239 | enableArgs?: string[];
|
240 | }
|
241 | export interface IntegrationAddHandlers {
|
242 | conflictHandler?: (f: string, stats: fs.Stats) => Promise<boolean>;
|
243 | onFileCreate?: (f: string) => void;
|
244 | }
|
245 | export interface IIntegration<T extends ProjectIntegration> {
|
246 | readonly name: IntegrationName;
|
247 | readonly summary: string;
|
248 | readonly archiveUrl?: string;
|
249 | readonly config: BaseConfig<T>;
|
250 | add(details: IntegrationAddDetails): Promise<void>;
|
251 | isAdded(): boolean;
|
252 | enable(config?: T): Promise<void>;
|
253 | isEnabled(): boolean;
|
254 | disable(): Promise<void>;
|
255 | getInfo(): Promise<InfoItem[]>;
|
256 | personalize(details: ProjectPersonalizationDetails): Promise<void>;
|
257 | }
|
258 | export interface PackageVersions {
|
259 | [key: string]: string;
|
260 | }
|
261 | export interface CommandMetadataOption extends FrameworkCommandMetadataOption {
|
262 | private?: boolean;
|
263 | hint?: string;
|
264 | }
|
265 | export interface ExitCodeException extends Error {
|
266 | exitCode: number;
|
267 | }
|
268 | export interface CommandMetadata extends FrameworkCommandMetadata<CommandMetadataInput, CommandMetadataOption> {
|
269 | type: 'global' | 'project';
|
270 | }
|
271 | export declare type HydratedCommandMetadata = CommandMetadata & FrameworkHydratedCommandMetadata<ICommand, INamespace, CommandMetadata, CommandMetadataInput, CommandMetadataOption>;
|
272 | export declare type CommandInstanceInfo = FrameworkCommandInstanceInfo<ICommand, INamespace, CommandMetadata, CommandMetadataInput, CommandMetadataOption>;
|
273 | export declare type NamespaceLocateResult = FrameworkNamespaceLocateResult<ICommand, INamespace, CommandMetadata, CommandMetadataInput, CommandMetadataOption>;
|
274 | export interface ISession {
|
275 | login(email: string, password: string): Promise<void>;
|
276 | ssoLogin(email: string): Promise<void>;
|
277 | tokenLogin(token: string): Promise<void>;
|
278 | logout(): Promise<void>;
|
279 | isLoggedIn(): boolean;
|
280 | getUser(): {
|
281 | id: number;
|
282 | };
|
283 | getUserToken(): string;
|
284 | }
|
285 | export interface IShellSpawnOptions extends SpawnOptions {
|
286 | showCommand?: boolean;
|
287 | }
|
288 | export interface IShellOutputOptions extends IShellSpawnOptions {
|
289 | fatalOnError?: boolean;
|
290 | fatalOnNotFound?: boolean;
|
291 | showError?: boolean;
|
292 | }
|
293 | export interface IShellRunOptions extends IShellOutputOptions {
|
294 | stream?: NodeJS.WritableStream;
|
295 | killOnExit?: boolean;
|
296 | truncateErrorOutput?: number;
|
297 | }
|
298 | export interface IShell {
|
299 | alterPath: (path: string) => string;
|
300 | run(command: string, args: readonly string[], options: IShellRunOptions): Promise<void>;
|
301 | output(command: string, args: readonly string[], options: IShellOutputOptions): Promise<string>;
|
302 | spawn(command: string, args: readonly string[], options: IShellSpawnOptions): Promise<ChildProcess>;
|
303 | cmdinfo(cmd: string, args?: readonly string[], options?: SubprocessOptions): Promise<string | undefined>;
|
304 | which(command: string, options?: WhichOptions): Promise<string>;
|
305 | createSubprocess(command: string, args: readonly string[], options?: SubprocessOptions): Promise<Subprocess>;
|
306 | }
|
307 | export interface ITelemetry {
|
308 | sendCommand(command: string, args: string[]): Promise<void>;
|
309 | }
|
310 | export declare type NpmClient = 'yarn' | 'npm';
|
311 | export declare type FeatureId = 'ssl-commands';
|
312 | export interface ConfigFile {
|
313 | 'version': string;
|
314 | 'telemetry': boolean;
|
315 | 'npmClient': NpmClient;
|
316 | 'interactive'?: boolean;
|
317 | 'proxy'?: string;
|
318 | 'ssl.cafile'?: string | string[];
|
319 | 'ssl.certfile'?: string | string[];
|
320 | 'ssl.keyfile'?: string | string[];
|
321 | 'urls.api'?: string;
|
322 | 'urls.dash'?: string;
|
323 | 'git.host'?: string;
|
324 | 'git.port'?: number;
|
325 | 'git.setup'?: boolean;
|
326 | 'org.id'?: string;
|
327 | 'user.id'?: number;
|
328 | 'user.email'?: string;
|
329 | 'tokens.user'?: string;
|
330 | 'tokens.telemetry'?: string;
|
331 | 'features.ssl-commands'?: boolean;
|
332 | }
|
333 | export interface SSLConfig {
|
334 | cafile?: string | string[];
|
335 | certfile?: string | string[];
|
336 | keyfile?: string | string[];
|
337 | }
|
338 | export interface CreateRequestOptions {
|
339 | ssl?: SSLConfig;
|
340 | proxy?: string;
|
341 | }
|
342 | export declare type APIResponse = APIResponseSuccess | APIResponseError;
|
343 | export interface APIResponseMeta {
|
344 | status: number;
|
345 | version: string;
|
346 | request_id: string;
|
347 | }
|
348 | export declare type APIResponseData = object | object[] | string;
|
349 | export interface APIResponseErrorDetails {
|
350 | error_type: string;
|
351 | parameter: string;
|
352 | errors: string[];
|
353 | }
|
354 | export interface APIResponseError {
|
355 | error: APIResponseErrorError;
|
356 | meta: APIResponseMeta;
|
357 | }
|
358 | export interface APIResponseErrorError {
|
359 | message: string;
|
360 | link: string | null;
|
361 | type: string;
|
362 | details?: APIResponseErrorDetails[];
|
363 | }
|
364 | export interface APIResponseSuccess {
|
365 | data: APIResponseData;
|
366 | meta: APIResponseMeta;
|
367 | }
|
368 | export interface APIResponsePageTokenMeta extends APIResponseMeta {
|
369 | prev_page_token?: string;
|
370 | next_page_token?: string;
|
371 | }
|
372 | export declare type HttpMethod = 'GET' | 'POST' | 'PATCH' | 'PUT' | 'DELETE' | 'PURGE' | 'HEAD' | 'OPTIONS';
|
373 | export interface IClient {
|
374 | config: IConfig;
|
375 | make(method: HttpMethod, path: string): Promise<{
|
376 | req: SuperAgentRequest;
|
377 | }>;
|
378 | do(req: SuperAgentRequest): Promise<APIResponseSuccess>;
|
379 | paginate<T extends Response<object[]>>(args: PaginateArgs<T>): IPaginator<T>;
|
380 | }
|
381 | export declare type PaginateArgs<T extends Response<object[]>> = Pick<PaginatorDeps<T>, 'reqgen' | 'guard' | 'state' | 'max'>;
|
382 | export interface IPaginator<T extends Response<object[]>, S = PaginatorState> extends IterableIterator<Promise<T>> {
|
383 | readonly state: S;
|
384 | }
|
385 | export declare type PaginatorRequestGenerator = () => Promise<{
|
386 | req: SuperAgentRequest;
|
387 | }>;
|
388 | export declare type PaginatorGuard<T extends Response<object[]>> = (res: APIResponseSuccess) => res is T;
|
389 | export interface PaginatorState {
|
390 | done: boolean;
|
391 | loaded: number;
|
392 | }
|
393 | export interface PagePaginatorState extends PaginatorState {
|
394 | page: number;
|
395 | page_size?: number;
|
396 | }
|
397 | export interface TokenPaginatorState extends PaginatorState {
|
398 | page_token?: string;
|
399 | }
|
400 | export interface PaginatorDeps<T extends Response<object[]>, S = PaginatorState> {
|
401 | readonly client: IClient;
|
402 | readonly reqgen: PaginatorRequestGenerator;
|
403 | readonly guard: PaginatorGuard<T>;
|
404 | readonly state?: Partial<S>;
|
405 | readonly max?: number;
|
406 | }
|
407 | export declare type InfoItemGroup = 'ionic' | 'capacitor' | 'cordova' | 'utility' | 'system' | 'environment';
|
408 | export interface InfoItem {
|
409 | group: InfoItemGroup;
|
410 | key: string;
|
411 | value: string;
|
412 | flair?: string;
|
413 | path?: string;
|
414 | }
|
415 | export interface BaseBuildOptions {
|
416 | engine: string;
|
417 | platform?: string;
|
418 | project?: string;
|
419 | verbose?: boolean;
|
420 | '--': string[];
|
421 | }
|
422 | export interface BuildOptions<T extends ProjectType> extends BaseBuildOptions {
|
423 | type: T;
|
424 | }
|
425 | export interface AngularBuildOptions extends BuildOptions<'angular'> {
|
426 | |
427 |
|
428 |
|
429 |
|
430 |
|
431 |
|
432 | configuration?: string;
|
433 | sourcemaps?: boolean;
|
434 | cordovaAssets?: boolean;
|
435 | watch?: boolean;
|
436 | }
|
437 | export interface ReactBuildOptions extends BuildOptions<'react'> {
|
438 | publicUrl?: string;
|
439 | ci?: boolean;
|
440 | sourceMap?: boolean;
|
441 | inlineRuntimeChunk?: boolean;
|
442 | }
|
443 | export interface VueBuildOptions extends BuildOptions<'vue'> {
|
444 | configuration?: string;
|
445 | sourcemaps?: boolean;
|
446 | cordovaAssets?: boolean;
|
447 | }
|
448 | export interface IonicAngularBuildOptions extends BuildOptions<'ionic-angular'> {
|
449 | prod: boolean;
|
450 | sourcemaps?: boolean;
|
451 | aot: boolean;
|
452 | minifyjs: boolean;
|
453 | minifycss: boolean;
|
454 | optimizejs: boolean;
|
455 | env?: string;
|
456 | }
|
457 | export interface Ionic1BuildOptions extends BuildOptions<'ionic1'> {
|
458 | }
|
459 | export interface CustomBuildOptions extends BuildOptions<'custom'> {
|
460 | }
|
461 | export interface GenerateOptions {
|
462 | type: string;
|
463 | name: string;
|
464 | }
|
465 | export interface AngularGenerateOptions extends GenerateOptions {
|
466 | [key: string]: any;
|
467 | }
|
468 | export interface IonicAngularGenerateOptions extends GenerateOptions {
|
469 | module: boolean;
|
470 | constants: boolean;
|
471 | }
|
472 | export interface ServeOptions {
|
473 | address: string;
|
474 | port: number;
|
475 | livereload: boolean;
|
476 | proxy: boolean;
|
477 | lab: boolean;
|
478 | labHost: string;
|
479 | labPort: number;
|
480 | open: boolean;
|
481 | browser?: string;
|
482 | browserOption?: string;
|
483 | devapp: boolean;
|
484 | platform?: string;
|
485 | project?: string;
|
486 | verbose?: boolean;
|
487 | '--': string[];
|
488 | externalAddressRequired?: boolean;
|
489 | engine: string;
|
490 | }
|
491 | export interface AngularServeOptions extends ServeOptions {
|
492 | consolelogs?: boolean;
|
493 | consolelogsPort?: number;
|
494 | ssl?: boolean;
|
495 | configuration?: string;
|
496 | sourcemaps?: boolean;
|
497 | }
|
498 | export interface ReactServeOptions extends ServeOptions {
|
499 | https?: boolean;
|
500 | ci?: boolean;
|
501 | reactEditor?: string;
|
502 | }
|
503 | export interface VueServeOptions extends ServeOptions {
|
504 | ssl?: boolean;
|
505 | configuration?: string;
|
506 | sourcemaps?: boolean;
|
507 | }
|
508 | export interface IonicAngularServeOptions extends ServeOptions {
|
509 | sourcemaps?: boolean;
|
510 | consolelogs: boolean;
|
511 | serverlogs: boolean;
|
512 | env?: string;
|
513 | livereloadPort: number;
|
514 | notificationPort: number;
|
515 | }
|
516 | export interface Ionic1ServeOptions extends ServeOptions {
|
517 | consolelogs: boolean;
|
518 | serverlogs: boolean;
|
519 | livereloadPort: number;
|
520 | notificationPort: number;
|
521 | }
|
522 | export interface CustomServeOptions extends ServeOptions {
|
523 | }
|
524 | export interface LabServeDetails {
|
525 | projectType: ProjectType;
|
526 | address: string;
|
527 | port: number;
|
528 | }
|
529 | export interface DevAppDetails {
|
530 | channel?: string;
|
531 | port: number;
|
532 | commPort: number;
|
533 | interfaces: {
|
534 | address: string;
|
535 | broadcast: string;
|
536 | }[];
|
537 | }
|
538 | export interface ServeDetails {
|
539 | custom: boolean;
|
540 | protocol: string;
|
541 | localAddress: string;
|
542 | externalAddress: string;
|
543 | port: number;
|
544 | externalNetworkInterfaces: NetworkInterface[];
|
545 | externallyAccessible: boolean;
|
546 | }
|
547 | export interface IAilment {
|
548 | readonly id: string;
|
549 | implicit: boolean;
|
550 | projects?: ProjectType[];
|
551 | getMessage(): Promise<string>;
|
552 | detected(): Promise<boolean>;
|
553 | getTreatmentSteps(): Promise<PatientTreatmentStep[]>;
|
554 | }
|
555 | export interface TreatableAilment extends IAilment {
|
556 | readonly treatable: boolean;
|
557 | getTreatmentSteps(): Promise<DoctorTreatmentStep[]>;
|
558 | }
|
559 | export interface PatientTreatmentStep {
|
560 | message: string;
|
561 | }
|
562 | export interface DoctorTreatmentStep extends PatientTreatmentStep {
|
563 | treat(): Promise<void>;
|
564 | }
|
565 | export interface IAilmentRegistry {
|
566 | ailments: IAilment[];
|
567 | register(ailment: IAilment): void;
|
568 | get(id: string): IAilment | undefined;
|
569 | }
|
570 | export interface IonicContext {
|
571 | readonly binPath: string;
|
572 | readonly libPath: string;
|
573 | readonly execPath: string;
|
574 | readonly version: string;
|
575 | }
|
576 | export interface IonicEnvironment {
|
577 | readonly flags: IonicEnvironmentFlags;
|
578 | readonly client: IClient;
|
579 | readonly config: IConfig;
|
580 | readonly log: ILogger;
|
581 | readonly prompt: PromptModule;
|
582 | readonly ctx: IonicContext;
|
583 | readonly session: ISession;
|
584 | readonly shell: IShell;
|
585 | getInfo(): Promise<InfoItem[]>;
|
586 | }
|
587 | export interface IonicEnvironmentFlags {
|
588 | readonly interactive: boolean;
|
589 | readonly confirm: boolean;
|
590 | }
|
591 | export declare type DistTag = 'testing' | 'canary' | 'latest';
|
592 | export interface ICommand extends FrameworkCommand<ICommand, INamespace, CommandMetadata, CommandMetadataInput, CommandMetadataOption> {
|
593 | readonly env: IonicEnvironment;
|
594 | readonly project?: IProject;
|
595 | execute(inputs: CommandLineInputs, options: CommandLineOptions, metadata: CommandInstanceInfo): Promise<void>;
|
596 | }
|
597 | export interface CommandPreRun extends ICommand {
|
598 | preRun(inputs: CommandLineInputs, options: CommandLineOptions, metadata: CommandInstanceInfo): Promise<void>;
|
599 | }
|
600 | export interface INamespace extends FrameworkNamespace<ICommand, INamespace, CommandMetadata, CommandMetadataInput, CommandMetadataOption> {
|
601 | env: IonicEnvironment;
|
602 | project?: IProject;
|
603 | }
|
604 | export interface ImageResource {
|
605 | platform: string;
|
606 | imageId?: string;
|
607 | dest: string;
|
608 | resType: string;
|
609 | nodeName: string;
|
610 | nodeAttributes: string[];
|
611 | name: string;
|
612 | width: number;
|
613 | height: number;
|
614 | density?: string;
|
615 | orientation?: 'landscape' | 'portrait';
|
616 | }
|
617 | export interface ImageResourceTransformResult {
|
618 | resource: ImageResource;
|
619 | error?: Error;
|
620 | tmpDest: string;
|
621 | }
|
622 | export interface ResourcesImageConfig {
|
623 | name: string;
|
624 | width: number;
|
625 | height: number;
|
626 | density?: string;
|
627 | orientation?: 'landscape' | 'portrait';
|
628 | }
|
629 | export interface SourceImage {
|
630 | ext: string;
|
631 | imageId?: string;
|
632 | cachedId?: string;
|
633 | platform: string;
|
634 | resType: string;
|
635 | path: string;
|
636 | vector: boolean;
|
637 | width: number;
|
638 | height: number;
|
639 | }
|
640 | export interface ImageUploadResponse {
|
641 | Error: string;
|
642 | Width: number;
|
643 | Height: number;
|
644 | Type: string;
|
645 | Vector: boolean;
|
646 | }
|
647 | export interface ResourcesPlatform {
|
648 | [imgType: string]: {
|
649 | images: ResourcesImageConfig[];
|
650 | nodeName: string;
|
651 | nodeAttributes: string[];
|
652 | };
|
653 | }
|
654 | export interface ResourcesConfig {
|
655 | [propName: string]: ResourcesPlatform;
|
656 | }
|
657 | export declare type KnownPlatform = 'ios' | 'android' | 'wp8' | 'windows' | 'browser';
|
658 | export declare type KnownResourceType = 'icon' | 'splash';
|
659 | export interface StarterList {
|
660 | starters: {
|
661 | name: string;
|
662 | id: string;
|
663 | type: ProjectType;
|
664 | }[];
|
665 | integrations: {
|
666 | name: IntegrationName;
|
667 | id: string;
|
668 | }[];
|
669 | }
|
670 | export interface BaseStarterTemplate {
|
671 | name: string;
|
672 | projectType: ProjectType;
|
673 | description?: string;
|
674 | }
|
675 | export interface RepoStarterTemplate extends BaseStarterTemplate {
|
676 | type: 'repo';
|
677 | repo: string;
|
678 | }
|
679 | export interface ManagedStarterTemplate extends BaseStarterTemplate {
|
680 | type: 'managed';
|
681 | id: string;
|
682 | }
|
683 | export declare type StarterTemplate = RepoStarterTemplate | ManagedStarterTemplate;
|
684 | export interface ResolvedStarterTemplate extends BaseStarterTemplate {
|
685 | archive: string;
|
686 | }
|
687 | export interface TelemetryIPCMessage {
|
688 | type: 'telemetry';
|
689 | data: {
|
690 | command: string;
|
691 | args: string[];
|
692 | };
|
693 | }
|
694 | export interface UpdateCheckIPCMessage {
|
695 | type: 'update-check';
|
696 | }
|
697 | export declare type IPCMessage = TelemetryIPCMessage | UpdateCheckIPCMessage;
|