Skip to content

Commit 14d701e

Browse files
artus9033thymikee
authored andcommitted
feat: expose RockCLIOptions type
1 parent 03c6960 commit 14d701e

6 files changed

Lines changed: 17 additions & 6 deletions

File tree

packages/platform-android/src/lib/commands/aar/packageAar.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import type { RockCLIOptions } from '@rock-js/tools';
12
import { outro } from '@rock-js/tools';
23
import { runGradleAar } from '../runGradle.js';
34
import { toPascalCase } from '../toPascalCase.js';
@@ -54,4 +55,4 @@ export const options = [
5455
name: '--module-name <string>',
5556
description: 'AAR module name',
5657
},
57-
];
58+
] satisfies RockCLIOptions;

packages/platform-android/src/lib/commands/aar/publishLocalAar.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import type { RockCLIOptions } from '@rock-js/tools';
12
import { outro } from '@rock-js/tools';
23
import { runGradleAar } from '../runGradle.js';
34
import type { AarProject } from './packageAar.js';
@@ -17,4 +18,4 @@ export const options = [
1718
name: '--module-name <string>',
1819
description: 'AAR module name',
1920
},
20-
];
21+
] satisfies RockCLIOptions;

packages/platform-android/src/lib/commands/buildAndroid/buildAndroid.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import type { AndroidProjectConfig } from '@react-native-community/cli-types';
2-
import type { RemoteBuildCache } from '@rock-js/tools';
2+
import type { RemoteBuildCache, RockCLIOptions } from '@rock-js/tools';
33
import {
44
colorLink,
55
type FingerprintSources,
@@ -104,4 +104,4 @@ export const options = [
104104
name: '--local',
105105
description: 'Force local build with Gradle wrapper.',
106106
},
107-
];
107+
] satisfies RockCLIOptions;

packages/platform-harmony/src/lib/commands/build/buildHarmony.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { RemoteBuildCache } from '@rock-js/tools';
1+
import type { RemoteBuildCache, RockCLIOptions } from '@rock-js/tools';
22
import {
33
colorLink,
44
type FingerprintSources,
@@ -96,4 +96,4 @@ export const options = [
9696
description: 'OpenHarmony product defined in build-profile.json5.',
9797
default: 'default',
9898
},
99-
];
99+
] satisfies RockCLIOptions;

packages/tools/src/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ export { default as cacheManager } from './lib/cacheManager.js';
77
export * from './lib/parse-args.js';
88
export * from './lib/path.js';
99
export * from './lib/project.js';
10+
export * from './lib/types.js';
1011
export * from './lib/build-cache/common.js';
1112
export * from './lib/build-cache/localBuildCache.js';
1213
export { getBinaryPath } from './lib/build-cache/getBinaryPath.js';

packages/tools/src/lib/types.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
export type RockCLIOption = {
2+
name: string;
3+
description: string;
4+
default?: string;
5+
parse?: (args: string) => string | string[];
6+
};
7+
8+
export type RockCLIOptions = RockCLIOption[];

0 commit comments

Comments
 (0)