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