@react-native/core-cli-utils 0.87.0-nightly-20260519-58cd1bf58 → 0.87.0-nightly-20260528-eaf770433
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintrc.json +6 -0
- package/README.md +11 -48
- package/package.json +8 -23
- package/src/index.js +21 -0
- package/src/private/android.js +129 -0
- package/src/private/app.js +247 -0
- package/src/private/apple.js +239 -0
- package/src/private/clean.js +227 -0
- package/{dist/private/types.js.flow → src/private/types.js} +2 -0
- package/src/private/utils.js +81 -0
- package/{dist/public/version.js.flow → src/public/version.js} +20 -15
- package/dist/index.d.ts +0 -26
- package/dist/index.js +0 -48
- package/dist/index.js.flow +0 -25
- package/dist/private/android.d.ts +0 -29
- package/dist/private/android.js +0 -74
- package/dist/private/android.js.flow +0 -41
- package/dist/private/app.d.ts +0 -37
- package/dist/private/app.js +0 -172
- package/dist/private/app.js.flow +0 -71
- package/dist/private/apple.d.ts +0 -56
- package/dist/private/apple.js +0 -179
- package/dist/private/apple.js.flow +0 -75
- package/dist/private/clean.d.ts +0 -59
- package/dist/private/clean.js +0 -140
- package/dist/private/clean.js.flow +0 -76
- package/dist/private/types.d.ts +0 -15
- package/dist/private/types.js +0 -1
- package/dist/private/utils.d.ts +0 -30
- package/dist/private/utils.js +0 -51
- package/dist/private/utils.js.flow +0 -37
- package/dist/public/version.d.ts +0 -33
- package/dist/public/version.js +0 -27
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the MIT license found in the
|
|
5
|
-
* LICENSE file in the root directory of this source tree.
|
|
6
|
-
*
|
|
7
|
-
* @flow strict-local
|
|
8
|
-
* @format
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
import type { Task } from "./types";
|
|
12
|
-
import type { ExecaPromise } from "execa";
|
|
13
|
-
|
|
14
|
-
type AppleBuildMode = "Debug" | "Release";
|
|
15
|
-
|
|
16
|
-
type AppleBuildOptions = {
|
|
17
|
-
isWorkspace: boolean,
|
|
18
|
-
name: string,
|
|
19
|
-
mode: AppleBuildMode,
|
|
20
|
-
scheme?: string,
|
|
21
|
-
destination: "device" | "simulator" | string,
|
|
22
|
-
...AppleOptions,
|
|
23
|
-
};
|
|
24
|
-
|
|
25
|
-
type AppleBootstrapOption = {
|
|
26
|
-
// Enabled by default
|
|
27
|
-
hermes: boolean,
|
|
28
|
-
newArchitecture: boolean,
|
|
29
|
-
frameworks?: "static" | "dynamic",
|
|
30
|
-
...AppleOptions,
|
|
31
|
-
};
|
|
32
|
-
|
|
33
|
-
type AppleInstallApp = {
|
|
34
|
-
// Install the app on a simulator or device, typically this is the description from
|
|
35
|
-
// `xcrun simctl list devices`
|
|
36
|
-
device: string,
|
|
37
|
-
appPath: string,
|
|
38
|
-
bundleId: string,
|
|
39
|
-
...AppleOptions,
|
|
40
|
-
};
|
|
41
|
-
|
|
42
|
-
type AppleOptions = {
|
|
43
|
-
// The directory where the Xcode project is located
|
|
44
|
-
cwd: string,
|
|
45
|
-
// The environment variables to pass to the build command
|
|
46
|
-
env?: { [key: string]: string | void, ... },
|
|
47
|
-
};
|
|
48
|
-
|
|
49
|
-
/* eslint sort-keys: "off" */
|
|
50
|
-
declare export const tasks: {
|
|
51
|
-
// 1. Setup your environment for building the iOS apps
|
|
52
|
-
bootstrap: (options: AppleBootstrapOption) => {
|
|
53
|
-
cleanupBuildFolder: Task<void>,
|
|
54
|
-
runCodegen: Task<void>,
|
|
55
|
-
validate: Task<void>,
|
|
56
|
-
installRubyGems: Task<ExecaPromise>,
|
|
57
|
-
installDependencies: Task<ExecaPromise>,
|
|
58
|
-
},
|
|
59
|
-
// 2. Build the iOS app using a setup environment
|
|
60
|
-
build: (
|
|
61
|
-
options: AppleBuildOptions,
|
|
62
|
-
...args: ReadonlyArray<string>
|
|
63
|
-
) => {
|
|
64
|
-
validate: Task<void>,
|
|
65
|
-
hasPodsInstalled: Task<void>,
|
|
66
|
-
build: Task<ExecaPromise>,
|
|
67
|
-
},
|
|
68
|
-
// 3. Install the built app on a simulator or device
|
|
69
|
-
ios: {
|
|
70
|
-
install: (options: AppleInstallApp) => {
|
|
71
|
-
validate: Task<void>,
|
|
72
|
-
install: Task<ExecaPromise>,
|
|
73
|
-
},
|
|
74
|
-
},
|
|
75
|
-
};
|
package/dist/private/clean.d.ts
DELETED
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the MIT license found in the
|
|
5
|
-
* LICENSE file in the root directory of this source tree.
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* @format
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
import type { Task } from "./types";
|
|
12
|
-
import type { ExecaPromise, Options as ExecaOptions } from "execa";
|
|
13
|
-
/**
|
|
14
|
-
* Removes the contents of a directory matching a given pattern, but keeps the directory.
|
|
15
|
-
* @private
|
|
16
|
-
*/
|
|
17
|
-
export declare function deleteDirectoryContents(
|
|
18
|
-
directory: string,
|
|
19
|
-
filePattern: RegExp,
|
|
20
|
-
): () => Promise<void>;
|
|
21
|
-
/**
|
|
22
|
-
* Removes a directory recursively.
|
|
23
|
-
* @private
|
|
24
|
-
*/
|
|
25
|
-
export declare function deleteDirectory(directory: string): () => Promise<void>;
|
|
26
|
-
/**
|
|
27
|
-
* Deletes the contents of the tmp directory matching a given pattern.
|
|
28
|
-
* @private
|
|
29
|
-
*/
|
|
30
|
-
export declare function deleteTmpDirectoryContents(
|
|
31
|
-
filepattern: RegExp,
|
|
32
|
-
): () => Promise<void>;
|
|
33
|
-
type CocoaPodsClean = { clean: Task<ExecaPromise> };
|
|
34
|
-
type AndroidClean = { validate: Task<void>; run: Task<ExecaPromise> };
|
|
35
|
-
type MetroClean = {
|
|
36
|
-
metro: Task<Promise<void>>;
|
|
37
|
-
haste: Task<Promise<void>>;
|
|
38
|
-
react_native: Task<Promise<void>>;
|
|
39
|
-
};
|
|
40
|
-
type NpmClean = {
|
|
41
|
-
node_modules: Task<Promise<void>>;
|
|
42
|
-
verify_cache: Task<ExecaPromise>;
|
|
43
|
-
};
|
|
44
|
-
type WatchmanClean = { stop: Task<ExecaPromise>; cache: Task<ExecaPromise> };
|
|
45
|
-
type YarnClean = { clean: Task<ExecaPromise> };
|
|
46
|
-
type CleanTasks = {
|
|
47
|
-
android: (
|
|
48
|
-
andoirdSrcDir: null | undefined | string,
|
|
49
|
-
opts?: ExecaOptions,
|
|
50
|
-
) => AndroidClean;
|
|
51
|
-
cocoapods: CocoaPodsClean;
|
|
52
|
-
metro: () => MetroClean;
|
|
53
|
-
npm: (projectRootDir: string) => NpmClean;
|
|
54
|
-
watchman: (projectRootDir: string) => WatchmanClean;
|
|
55
|
-
yarn: (projectRootDir: string) => YarnClean;
|
|
56
|
-
cocoapods?: (projectRootDir: string) => CocoaPodsClean;
|
|
57
|
-
};
|
|
58
|
-
export declare const tasks: CleanTasks;
|
|
59
|
-
export declare type tasks = typeof tasks;
|
package/dist/private/clean.js
DELETED
|
@@ -1,140 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true,
|
|
5
|
-
});
|
|
6
|
-
exports.deleteDirectory = deleteDirectory;
|
|
7
|
-
exports.deleteDirectoryContents = deleteDirectoryContents;
|
|
8
|
-
exports.deleteTmpDirectoryContents = deleteTmpDirectoryContents;
|
|
9
|
-
exports.tasks = void 0;
|
|
10
|
-
var _utils = require("./utils");
|
|
11
|
-
var _execa = _interopRequireDefault(require("execa"));
|
|
12
|
-
var _fs = require("fs");
|
|
13
|
-
var _os = _interopRequireDefault(require("os"));
|
|
14
|
-
var _path = _interopRequireDefault(require("path"));
|
|
15
|
-
function _interopRequireDefault(e) {
|
|
16
|
-
return e && e.__esModule ? e : { default: e };
|
|
17
|
-
}
|
|
18
|
-
const FIRST = 1,
|
|
19
|
-
SECOND = 2;
|
|
20
|
-
const rmrf = (pathname) => {
|
|
21
|
-
if (!(0, _fs.existsSync)(pathname)) {
|
|
22
|
-
return;
|
|
23
|
-
}
|
|
24
|
-
(0, _fs.rm)(pathname, {
|
|
25
|
-
force: true,
|
|
26
|
-
maxRetries: 3,
|
|
27
|
-
recursive: true,
|
|
28
|
-
});
|
|
29
|
-
};
|
|
30
|
-
function deleteDirectoryContents(directory, filePattern) {
|
|
31
|
-
return async function deleteDirectoryContentsAction() {
|
|
32
|
-
const base = _path.default.dirname(directory);
|
|
33
|
-
const files = (0, _fs.readdirSync)(base).filter((filename) =>
|
|
34
|
-
filePattern.test(filename),
|
|
35
|
-
);
|
|
36
|
-
for (const filename of files) {
|
|
37
|
-
rmrf(_path.default.join(base, filename));
|
|
38
|
-
}
|
|
39
|
-
};
|
|
40
|
-
}
|
|
41
|
-
function deleteDirectory(directory) {
|
|
42
|
-
return async function cleanDirectoryAction() {
|
|
43
|
-
rmrf(directory);
|
|
44
|
-
};
|
|
45
|
-
}
|
|
46
|
-
function deleteTmpDirectoryContents(filepattern) {
|
|
47
|
-
return deleteDirectoryContents(_os.default.tmpdir(), filepattern);
|
|
48
|
-
}
|
|
49
|
-
const platformGradlew = _utils.isWindows ? "gradlew.bat" : "gradlew";
|
|
50
|
-
const tasks = (exports.tasks = {
|
|
51
|
-
android: (androidSrcDir, opts) => ({
|
|
52
|
-
validate: (0, _utils.task)(FIRST, "Check gradlew is available", () => {
|
|
53
|
-
(0, _utils.assertDependencies)(
|
|
54
|
-
(0, _utils.isOnPath)(platformGradlew, "Gradle wrapper"),
|
|
55
|
-
);
|
|
56
|
-
}),
|
|
57
|
-
run: (0, _utils.task)(SECOND, "🧹 Clean Gradle cache", () => {
|
|
58
|
-
const gradlew = _path.default.join(
|
|
59
|
-
androidSrcDir ?? "android",
|
|
60
|
-
platformGradlew,
|
|
61
|
-
);
|
|
62
|
-
const script = _path.default.basename(gradlew);
|
|
63
|
-
const cwd = _path.default.dirname(gradlew);
|
|
64
|
-
return (0, _execa.default)(
|
|
65
|
-
_utils.isWindows ? script : "./" + script,
|
|
66
|
-
["clean"],
|
|
67
|
-
{
|
|
68
|
-
cwd,
|
|
69
|
-
...opts,
|
|
70
|
-
},
|
|
71
|
-
);
|
|
72
|
-
}),
|
|
73
|
-
}),
|
|
74
|
-
metro: () => ({
|
|
75
|
-
metro: (0, _utils.task)(
|
|
76
|
-
FIRST,
|
|
77
|
-
"🧹 Clean Metro cache",
|
|
78
|
-
deleteTmpDirectoryContents(/^metro-.+/),
|
|
79
|
-
),
|
|
80
|
-
haste: (0, _utils.task)(
|
|
81
|
-
FIRST,
|
|
82
|
-
"🧹 Clean Haste cache",
|
|
83
|
-
deleteTmpDirectoryContents(/^haste-map-.+/),
|
|
84
|
-
),
|
|
85
|
-
react_native: (0, _utils.task)(
|
|
86
|
-
FIRST,
|
|
87
|
-
"🧹 Clean React Native cache",
|
|
88
|
-
deleteTmpDirectoryContents(/^react-.+/),
|
|
89
|
-
),
|
|
90
|
-
}),
|
|
91
|
-
npm: (projectRootDir) => ({
|
|
92
|
-
node_modules: (0, _utils.task)(
|
|
93
|
-
FIRST,
|
|
94
|
-
"🧹 Clean node_modules",
|
|
95
|
-
deleteDirectory(_path.default.join(projectRootDir, "node_modules")),
|
|
96
|
-
),
|
|
97
|
-
verify_cache: (0, _utils.task)(SECOND, "🔬 Verify npm cache", (opts) =>
|
|
98
|
-
(0, _execa.default)("npm", ["cache", "verify"], {
|
|
99
|
-
cwd: projectRootDir,
|
|
100
|
-
...opts,
|
|
101
|
-
}),
|
|
102
|
-
),
|
|
103
|
-
}),
|
|
104
|
-
watchman: (projectRootDir) => ({
|
|
105
|
-
stop: (0, _utils.task)(FIRST, "✋ Stop Watchman", (opts) =>
|
|
106
|
-
(0, _execa.default)(
|
|
107
|
-
_utils.isWindows ? "tskill" : "killall",
|
|
108
|
-
["watchman"],
|
|
109
|
-
{
|
|
110
|
-
cwd: projectRootDir,
|
|
111
|
-
...opts,
|
|
112
|
-
},
|
|
113
|
-
),
|
|
114
|
-
),
|
|
115
|
-
cache: (0, _utils.task)(SECOND, "🧹 Delete Watchman cache", (opts) =>
|
|
116
|
-
(0, _execa.default)("watchman", ["watch-del-all"], {
|
|
117
|
-
cwd: projectRootDir,
|
|
118
|
-
...opts,
|
|
119
|
-
}),
|
|
120
|
-
),
|
|
121
|
-
}),
|
|
122
|
-
yarn: (projectRootDir) => ({
|
|
123
|
-
clean: (0, _utils.task)(FIRST, "🧹 Clean Yarn cache", (opts) =>
|
|
124
|
-
(0, _execa.default)("yarn", ["cache", "clean"], {
|
|
125
|
-
cwd: projectRootDir,
|
|
126
|
-
...opts,
|
|
127
|
-
}),
|
|
128
|
-
),
|
|
129
|
-
}),
|
|
130
|
-
});
|
|
131
|
-
if (_utils.isMacOS) {
|
|
132
|
-
tasks.cocoapods = (projectRootDir) => ({
|
|
133
|
-
clean: (0, _utils.task)(FIRST, "🧹 Clean CocoaPods pod cache", (opts) =>
|
|
134
|
-
(0, _execa.default)("bundle", ["exec", "pod", "deintegrate"], {
|
|
135
|
-
cwd: projectRootDir,
|
|
136
|
-
...opts,
|
|
137
|
-
}),
|
|
138
|
-
),
|
|
139
|
-
});
|
|
140
|
-
}
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the MIT license found in the
|
|
5
|
-
* LICENSE file in the root directory of this source tree.
|
|
6
|
-
*
|
|
7
|
-
* @flow strict-local
|
|
8
|
-
* @format
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
import type { Task } from "./types";
|
|
12
|
-
import type { ExecaPromise, Options as ExecaOptions } from "execa";
|
|
13
|
-
|
|
14
|
-
/**
|
|
15
|
-
* Removes the contents of a directory matching a given pattern, but keeps the directory.
|
|
16
|
-
* @private
|
|
17
|
-
*/
|
|
18
|
-
declare export function deleteDirectoryContents(
|
|
19
|
-
directory: string,
|
|
20
|
-
filePattern: RegExp,
|
|
21
|
-
): () => Promise<void>;
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
* Removes a directory recursively.
|
|
25
|
-
* @private
|
|
26
|
-
*/
|
|
27
|
-
declare export function deleteDirectory(directory: string): () => Promise<void>;
|
|
28
|
-
|
|
29
|
-
/**
|
|
30
|
-
* Deletes the contents of the tmp directory matching a given pattern.
|
|
31
|
-
* @private
|
|
32
|
-
*/
|
|
33
|
-
declare export function deleteTmpDirectoryContents(
|
|
34
|
-
filepattern: RegExp,
|
|
35
|
-
): () => Promise<void>;
|
|
36
|
-
|
|
37
|
-
type CocoaPodsClean = {
|
|
38
|
-
clean: Task<ExecaPromise>,
|
|
39
|
-
};
|
|
40
|
-
type AndroidClean = {
|
|
41
|
-
validate: Task<void>,
|
|
42
|
-
run: Task<ExecaPromise>,
|
|
43
|
-
};
|
|
44
|
-
type MetroClean = {
|
|
45
|
-
metro: Task<Promise<void>>,
|
|
46
|
-
haste: Task<Promise<void>>,
|
|
47
|
-
react_native: Task<Promise<void>>,
|
|
48
|
-
};
|
|
49
|
-
|
|
50
|
-
type NpmClean = {
|
|
51
|
-
node_modules: Task<Promise<void>>,
|
|
52
|
-
verify_cache: Task<ExecaPromise>,
|
|
53
|
-
};
|
|
54
|
-
|
|
55
|
-
type WatchmanClean = {
|
|
56
|
-
stop: Task<ExecaPromise>,
|
|
57
|
-
cache: Task<ExecaPromise>,
|
|
58
|
-
};
|
|
59
|
-
|
|
60
|
-
type YarnClean = {
|
|
61
|
-
clean: Task<ExecaPromise>,
|
|
62
|
-
};
|
|
63
|
-
|
|
64
|
-
type CleanTasks = {
|
|
65
|
-
android: (andoirdSrcDir: ?string, opts?: ExecaOptions) => AndroidClean,
|
|
66
|
-
cocoapods: CocoaPodsClean,
|
|
67
|
-
metro: () => MetroClean,
|
|
68
|
-
npm: (projectRootDir: string) => NpmClean,
|
|
69
|
-
watchman: (projectRootDir: string) => WatchmanClean,
|
|
70
|
-
yarn: (projectRootDir: string) => YarnClean,
|
|
71
|
-
cocoapods?: (projectRootDir: string) => CocoaPodsClean,
|
|
72
|
-
};
|
|
73
|
-
|
|
74
|
-
// The tasks that cleanup various build artefacts.
|
|
75
|
-
/* eslint sort-keys: "off" */
|
|
76
|
-
declare export const tasks: CleanTasks;
|
package/dist/private/types.d.ts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the MIT license found in the
|
|
5
|
-
* LICENSE file in the root directory of this source tree.
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* @format
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
export type Task<R = unknown> = {
|
|
12
|
-
order: number;
|
|
13
|
-
label: string;
|
|
14
|
-
action: () => R;
|
|
15
|
-
};
|
package/dist/private/types.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";
|
package/dist/private/utils.d.ts
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the MIT license found in the
|
|
5
|
-
* LICENSE file in the root directory of this source tree.
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* @format
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
import type { Task } from "./types";
|
|
12
|
-
export declare function task<R>(
|
|
13
|
-
order: number,
|
|
14
|
-
label: string,
|
|
15
|
-
action: Task<R>["action"],
|
|
16
|
-
): Task<R>;
|
|
17
|
-
export declare const isWindows: any;
|
|
18
|
-
export declare type isWindows = typeof isWindows;
|
|
19
|
-
export declare const isMacOS: any;
|
|
20
|
-
export declare type isMacOS = typeof isMacOS;
|
|
21
|
-
export declare const toPascalCase: (label: string) => string;
|
|
22
|
-
export declare type toPascalCase = typeof toPascalCase;
|
|
23
|
-
type PathCheckResult = { found: boolean; dep: string; description: string };
|
|
24
|
-
export declare function isOnPath(
|
|
25
|
-
dep: string,
|
|
26
|
-
description: string,
|
|
27
|
-
): PathCheckResult;
|
|
28
|
-
export declare function assertDependencies(
|
|
29
|
-
...deps: ReadonlyArray<ReturnType<typeof isOnPath>>
|
|
30
|
-
): void;
|
package/dist/private/utils.js
DELETED
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true,
|
|
5
|
-
});
|
|
6
|
-
exports.assertDependencies = assertDependencies;
|
|
7
|
-
exports.isMacOS = void 0;
|
|
8
|
-
exports.isOnPath = isOnPath;
|
|
9
|
-
exports.isWindows = void 0;
|
|
10
|
-
exports.task = task;
|
|
11
|
-
exports.toPascalCase = void 0;
|
|
12
|
-
var _execa = _interopRequireDefault(require("execa"));
|
|
13
|
-
var _os = _interopRequireDefault(require("os"));
|
|
14
|
-
function _interopRequireDefault(e) {
|
|
15
|
-
return e && e.__esModule ? e : { default: e };
|
|
16
|
-
}
|
|
17
|
-
function task(order, label, action) {
|
|
18
|
-
return {
|
|
19
|
-
action,
|
|
20
|
-
label,
|
|
21
|
-
order,
|
|
22
|
-
};
|
|
23
|
-
}
|
|
24
|
-
const isWindows = (exports.isWindows = _os.default.platform() === "win32");
|
|
25
|
-
const isMacOS = (exports.isMacOS = _os.default.platform() === "darwin");
|
|
26
|
-
const toPascalCase = (label) =>
|
|
27
|
-
label.length === 0 ? "" : label[0].toUpperCase() + label.slice(1);
|
|
28
|
-
exports.toPascalCase = toPascalCase;
|
|
29
|
-
function isOnPath(dep, description) {
|
|
30
|
-
const cmd = isWindows ? ["where", [dep]] : ["command", ["-v", dep]];
|
|
31
|
-
try {
|
|
32
|
-
return {
|
|
33
|
-
dep,
|
|
34
|
-
description,
|
|
35
|
-
found: _execa.default.sync(...cmd).exitCode === 0,
|
|
36
|
-
};
|
|
37
|
-
} catch {
|
|
38
|
-
return {
|
|
39
|
-
dep,
|
|
40
|
-
description,
|
|
41
|
-
found: false,
|
|
42
|
-
};
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
function assertDependencies(...deps) {
|
|
46
|
-
for (const { found, dep, description } of deps) {
|
|
47
|
-
if (!found) {
|
|
48
|
-
throw new Error(`"${dep}" not found, ${description}`);
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the MIT license found in the
|
|
5
|
-
* LICENSE file in the root directory of this source tree.
|
|
6
|
-
*
|
|
7
|
-
* @flow strict-local
|
|
8
|
-
* @format
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
import type { Task } from "./types";
|
|
12
|
-
|
|
13
|
-
declare export function task<R>(
|
|
14
|
-
order: number,
|
|
15
|
-
label: string,
|
|
16
|
-
action: Task<R>["action"],
|
|
17
|
-
): Task<R>;
|
|
18
|
-
|
|
19
|
-
declare export const isWindows: $FlowFixMe;
|
|
20
|
-
declare export const isMacOS: $FlowFixMe;
|
|
21
|
-
|
|
22
|
-
declare export const toPascalCase: (label: string) => string;
|
|
23
|
-
|
|
24
|
-
type PathCheckResult = {
|
|
25
|
-
found: boolean,
|
|
26
|
-
dep: string,
|
|
27
|
-
description: string,
|
|
28
|
-
};
|
|
29
|
-
|
|
30
|
-
declare export function isOnPath(
|
|
31
|
-
dep: string,
|
|
32
|
-
description: string,
|
|
33
|
-
): PathCheckResult;
|
|
34
|
-
|
|
35
|
-
declare export function assertDependencies(
|
|
36
|
-
...deps: ReadonlyArray<ReturnType<typeof isOnPath>>
|
|
37
|
-
): void;
|
package/dist/public/version.d.ts
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the MIT license found in the
|
|
5
|
-
* LICENSE file in the root directory of this source tree.
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* @format
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
export declare const android: {
|
|
12
|
-
ANDROID_NDK: ">= 23.x";
|
|
13
|
-
ANDROID_SDK: ">= 33.x";
|
|
14
|
-
};
|
|
15
|
-
export declare type android = typeof android;
|
|
16
|
-
export declare const apple: { COCOAPODS: ">= 1.10.0"; XCODE: ">= 12.x" };
|
|
17
|
-
export declare type apple = typeof apple;
|
|
18
|
-
export declare const common: {
|
|
19
|
-
BUN: ">= 1.0.0";
|
|
20
|
-
JAVA: ">= 17 <= 20";
|
|
21
|
-
NODE_JS: ">= 18";
|
|
22
|
-
NPM: ">= 4.x";
|
|
23
|
-
RUBY: ">= 2.6.10";
|
|
24
|
-
YARN: ">= 1.10.x";
|
|
25
|
-
};
|
|
26
|
-
export declare type common = typeof common;
|
|
27
|
-
export declare const all: Omit<
|
|
28
|
-
typeof apple,
|
|
29
|
-
keyof typeof android | keyof typeof common | keyof {}
|
|
30
|
-
> &
|
|
31
|
-
Omit<typeof android, keyof typeof common | keyof {}> &
|
|
32
|
-
Omit<typeof common, keyof {}> & {};
|
|
33
|
-
export declare type all = typeof all;
|
package/dist/public/version.js
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true,
|
|
5
|
-
});
|
|
6
|
-
exports.common = exports.apple = exports.android = exports.all = void 0;
|
|
7
|
-
const android = (exports.android = {
|
|
8
|
-
ANDROID_NDK: ">= 23.x",
|
|
9
|
-
ANDROID_SDK: ">= 33.x",
|
|
10
|
-
});
|
|
11
|
-
const apple = (exports.apple = {
|
|
12
|
-
COCOAPODS: ">= 1.10.0",
|
|
13
|
-
XCODE: ">= 12.x",
|
|
14
|
-
});
|
|
15
|
-
const common = (exports.common = {
|
|
16
|
-
BUN: ">= 1.0.0",
|
|
17
|
-
JAVA: ">= 17 <= 20",
|
|
18
|
-
NODE_JS: ">= 18",
|
|
19
|
-
NPM: ">= 4.x",
|
|
20
|
-
RUBY: ">= 2.6.10",
|
|
21
|
-
YARN: ">= 1.10.x",
|
|
22
|
-
});
|
|
23
|
-
const all = (exports.all = {
|
|
24
|
-
...apple,
|
|
25
|
-
...android,
|
|
26
|
-
...common,
|
|
27
|
-
});
|