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