expo-release-it 0.6.0 → 0.6.2
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/build/EnvUtil-DWWwkHaf.js +8 -0
- package/build/EnvUtil-DWWwkHaf.js.map +1 -0
- package/build/FastlaneOption-B9A0ECDL.js +35 -0
- package/build/FastlaneOption-B9A0ECDL.js.map +1 -0
- package/build/FileUtil-B9JnWobK.js +57 -0
- package/build/FileUtil-B9JnWobK.js.map +1 -0
- package/build/InqueryInputs-BGj-DlRa.js +112 -0
- package/build/InqueryInputs-BGj-DlRa.js.map +1 -0
- package/build/MetadataSyncUtil-j79hX3QT.js +42 -0
- package/build/MetadataSyncUtil-j79hX3QT.js.map +1 -0
- package/build/OptionHolder-H3HG0A95.js +99 -0
- package/build/OptionHolder-H3HG0A95.js.map +1 -0
- package/build/VersionUtil-BDB10Hpb.js +101 -0
- package/build/VersionUtil-BDB10Hpb.js.map +1 -0
- package/build/build-DLOdnj2j.js +88 -0
- package/build/build-DLOdnj2j.js.map +1 -0
- package/build/bump-0hlTovjE.js +122 -0
- package/build/bump-0hlTovjE.js.map +1 -0
- package/build/calculateElapsed-CynU9UU_.js +13 -0
- package/build/calculateElapsed-CynU9UU_.js.map +1 -0
- package/build/command/build.d.ts +7 -3
- package/build/command/build.js +23 -711
- package/build/command/bump.d.ts +7 -3
- package/build/command/bump.js +14 -486
- package/build/command/init.d.ts +7 -3
- package/build/command/init.js +13 -462
- package/build/command/pull.d.ts +7 -3
- package/build/command/pull.js +22 -696
- package/build/command/submit.d.ts +7 -3
- package/build/command/submit.js +23 -700
- package/build/command/upload.d.ts +7 -3
- package/build/command/upload.js +23 -705
- package/build/execShellScript-Bd5xbFX5.js +22 -0
- package/build/execShellScript-Bd5xbFX5.js.map +1 -0
- package/build/generateAppStoreConnectApiKeyFile-DjxlrcZn.js +18 -0
- package/build/generateAppStoreConnectApiKeyFile-DjxlrcZn.js.map +1 -0
- package/build/hydrateKeyholderFileValues-BoaRs3SC.js +11 -0
- package/build/hydrateKeyholderFileValues-BoaRs3SC.js.map +1 -0
- package/build/index.d.ts +3 -1
- package/build/index.js +62 -1247
- package/build/index.js.map +1 -1
- package/build/init-cjD4jZiy.js +148 -0
- package/build/init-cjD4jZiy.js.map +1 -0
- package/build/injectTemplatePlaceHolders-CpIvd0dG.js +16 -0
- package/build/injectTemplatePlaceHolders-CpIvd0dG.js.map +1 -0
- package/build/iterateAllFiles-CbEPek2B.js +15 -0
- package/build/iterateAllFiles-CbEPek2B.js.map +1 -0
- package/build/logger-DvQ7ScMQ.js +16 -0
- package/build/logger-DvQ7ScMQ.js.map +1 -0
- package/build/parseConfigFile-hMLUnLZR.js +29 -0
- package/build/parseConfigFile-hMLUnLZR.js.map +1 -0
- package/build/prepareAndroid-Cjz6r6o0.js +53 -0
- package/build/prepareAndroid-Cjz6r6o0.js.map +1 -0
- package/build/prepareIos-ByPLFHC8.js +33 -0
- package/build/prepareIos-ByPLFHC8.js.map +1 -0
- package/build/pull-BHSlClDy.js +70 -0
- package/build/pull-BHSlClDy.js.map +1 -0
- package/build/replaceStringIfNotContain-CgZ460_D.js +9 -0
- package/build/replaceStringIfNotContain-CgZ460_D.js.map +1 -0
- package/build/setup-CRNjdK5q.js +25 -0
- package/build/setup-CRNjdK5q.js.map +1 -0
- package/build/spinner-BVmbE9I_.js +15 -0
- package/build/spinner-BVmbE9I_.js.map +1 -0
- package/build/submit-5gTyWBU2.js +65 -0
- package/build/submit-5gTyWBU2.js.map +1 -0
- package/build/throwError-DMF6E5pu.js +14 -0
- package/build/throwError-DMF6E5pu.js.map +1 -0
- package/build/type/{ExpoReleaseItConfiguration.d.d.ts → ExpoReleaseItConfiguration.d.ts} +7 -5
- package/build/upload-S09j3abh.js +68 -0
- package/build/upload-S09j3abh.js.map +1 -0
- package/build/util/EnvUtil.d.ts +3 -1
- package/build/util/EnvUtil.js +3 -10
- package/build/util/FastlaneOption.d.ts +3 -1
- package/build/util/FastlaneOption.js +4 -118
- package/build/util/FileUtil.d.ts +4 -2
- package/build/util/FileUtil.js +3 -78
- package/build/util/MetadataSyncUtil.d.ts +3 -1
- package/build/util/MetadataSyncUtil.js +5 -177
- package/build/util/OptionHolder.d.ts +45 -43
- package/build/util/OptionHolder.js +3 -88
- package/build/util/calculateElapsed.d.ts +3 -1
- package/build/util/calculateElapsed.js +3 -12
- package/build/util/generateAppStoreConnectApiKeyFile.d.ts +3 -1
- package/build/util/generateAppStoreConnectApiKeyFile.js +4 -117
- package/build/util/injectTemplatePlaceHolders.d.ts +3 -1
- package/build/util/injectTemplatePlaceHolders.js +5 -137
- package/build/util/input/InqueryInputs.d.ts +19 -12
- package/build/util/input/InqueryInputs.js +4 -205
- package/build/util/iterateAllFiles.d.ts +3 -1
- package/build/util/iterateAllFiles.js +3 -34
- package/build/util/logger.d.ts +10 -8
- package/build/util/logger.js +3 -16
- package/build/util/parseConfigFile.d.ts +3 -1
- package/build/util/parseConfigFile.js +4 -151
- package/build/util/replaceStringIfNotContain.d.ts +5 -0
- package/build/util/replaceStringIfNotContain.js +3 -0
- package/build/util/setup/VersionUtil.d.ts +9 -4
- package/build/util/setup/VersionUtil.js +8 -253
- package/build/util/setup/execShellScript.d.ts +16 -14
- package/build/util/setup/execShellScript.js +3 -19
- package/build/util/setup/hydrateKeyholderFileValues.d.ts +3 -1
- package/build/util/setup/hydrateKeyholderFileValues.js +4 -101
- package/build/util/setup/prepareAndroid.d.ts +3 -1
- package/build/util/setup/prepareAndroid.js +12 -281
- package/build/util/setup/prepareIos.d.ts +3 -1
- package/build/util/setup/prepareIos.js +11 -263
- package/build/util/setup/setup.d.ts +3 -1
- package/build/util/setup/setup.js +11 -272
- package/build/util/spinner.d.ts +3 -1
- package/build/util/spinner.js +3 -14
- package/build/util/throwError.d.ts +3 -1
- package/build/util/throwError.js +4 -33
- package/package.json +5 -5
- package/build/command/build.js.map +0 -1
- package/build/command/bump.js.map +0 -1
- package/build/command/init.js.map +0 -1
- package/build/command/pull.js.map +0 -1
- package/build/command/submit.js.map +0 -1
- package/build/command/upload.js.map +0 -1
- package/build/type/ExpoReleaseItConfiguration.d.js +0 -1
- package/build/type/ExpoReleaseItConfiguration.d.js.map +0 -1
- package/build/util/EnvUtil.js.map +0 -1
- package/build/util/FastlaneOption.js.map +0 -1
- package/build/util/FileUtil.js.map +0 -1
- package/build/util/MetadataSyncUtil.js.map +0 -1
- package/build/util/OptionHolder.js.map +0 -1
- package/build/util/calculateElapsed.js.map +0 -1
- package/build/util/generateAppStoreConnectApiKeyFile.js.map +0 -1
- package/build/util/injectTemplatePlaceHolders.js.map +0 -1
- package/build/util/input/InqueryInputs.js.map +0 -1
- package/build/util/iterateAllFiles.js.map +0 -1
- package/build/util/logger.js.map +0 -1
- package/build/util/parseConfigFile.js.map +0 -1
- package/build/util/setup/VersionUtil.js.map +0 -1
- package/build/util/setup/execShellScript.js.map +0 -1
- package/build/util/setup/hydrateKeyholderFileValues.js.map +0 -1
- package/build/util/setup/prepareAndroid.js.map +0 -1
- package/build/util/setup/prepareIos.js.map +0 -1
- package/build/util/setup/setup.js.map +0 -1
- package/build/util/spinner.js.map +0 -1
- package/build/util/throwError.js.map +0 -1
package/build/command/init.js
CHANGED
|
@@ -1,462 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
release: "pnpm build && pnpm run t && release-it && pnpm publish",
|
|
15
|
-
t: "lefthook run check"
|
|
16
|
-
},
|
|
17
|
-
dependencies: {
|
|
18
|
-
"@inquirer/prompts": "^7.4.1",
|
|
19
|
-
"@mj-studio/js-util": "^1.1.20",
|
|
20
|
-
chalk: "^5.4.1",
|
|
21
|
-
commander: "^13.1.0",
|
|
22
|
-
execa: "^9.5.2",
|
|
23
|
-
"fs-extra": "^11.3.0",
|
|
24
|
-
ora: "^8.2.0",
|
|
25
|
-
react: "catalog:native",
|
|
26
|
-
"react-native": "catalog:native",
|
|
27
|
-
semver: "^7.7.1",
|
|
28
|
-
url: "^0.11.4"
|
|
29
|
-
},
|
|
30
|
-
devDependencies: {
|
|
31
|
-
"@commitlint/config-conventional": "^19.8.0",
|
|
32
|
-
"@release-it/conventional-changelog": "^10.0.1",
|
|
33
|
-
"@types/fs-extra": "^11.0.4",
|
|
34
|
-
"@types/semver": "^7.7.0",
|
|
35
|
-
"json-schema-to-typescript": "^15.0.4",
|
|
36
|
-
lefthook: "^1.11.11",
|
|
37
|
-
prettier: "catalog:",
|
|
38
|
-
"release-it": "^19.0.1",
|
|
39
|
-
"tiny-glob": "^0.2.9",
|
|
40
|
-
tsup: "^8.4.0",
|
|
41
|
-
typescript: "catalog:",
|
|
42
|
-
vitest: "^3.1.2"
|
|
43
|
-
},
|
|
44
|
-
bin: "./bin/expo-release-it.mjs",
|
|
45
|
-
files: [
|
|
46
|
-
"build",
|
|
47
|
-
"package.json",
|
|
48
|
-
"bin",
|
|
49
|
-
"template",
|
|
50
|
-
"expo-release-it.schema.json"
|
|
51
|
-
],
|
|
52
|
-
commitlint: {
|
|
53
|
-
extends: [
|
|
54
|
-
"@commitlint/config-conventional"
|
|
55
|
-
]
|
|
56
|
-
},
|
|
57
|
-
packageManager: "pnpm@10.10.0+sha512.d615db246fe70f25dcfea6d8d73dee782ce23e2245e3c4f6f888249fb568149318637dca73c2c5c8ef2a4ca0d5657fb9567188bfab47f566d1ee6ce987815c39"
|
|
58
|
-
};
|
|
59
|
-
|
|
60
|
-
// src/util/FileUtil.ts
|
|
61
|
-
import fs from "fs-extra";
|
|
62
|
-
import * as path from "path";
|
|
63
|
-
var join2 = path.join;
|
|
64
|
-
var resolve2 = path.resolve;
|
|
65
|
-
function exist(path2) {
|
|
66
|
-
return fs.existsSync(path2);
|
|
67
|
-
}
|
|
68
|
-
function read(path2) {
|
|
69
|
-
return fs.readFileSync(path2, { encoding: "utf8" });
|
|
70
|
-
}
|
|
71
|
-
function readdir(path2) {
|
|
72
|
-
return fs.readdirSync(path2);
|
|
73
|
-
}
|
|
74
|
-
function readJsonSlow(path2) {
|
|
75
|
-
return fs.readJSONSync(path2);
|
|
76
|
-
}
|
|
77
|
-
function write(p, content) {
|
|
78
|
-
const dir = path.dirname(p);
|
|
79
|
-
if (!exist(dir)) {
|
|
80
|
-
fs.mkdirSync(dir, { recursive: true });
|
|
81
|
-
}
|
|
82
|
-
return fs.writeFileSync(p, content);
|
|
83
|
-
}
|
|
84
|
-
function copy(src, dest, options) {
|
|
85
|
-
fs.copySync(src, dest, options);
|
|
86
|
-
}
|
|
87
|
-
function writeJson(path2, json) {
|
|
88
|
-
return write(path2, JSON.stringify(json, null, 2));
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
// src/util/OptionHolder.ts
|
|
92
|
-
import { fileURLToPath } from "url";
|
|
93
|
-
var OptionHolder = {
|
|
94
|
-
cli: {
|
|
95
|
-
version: package_default.version,
|
|
96
|
-
rootDir: resolve2(fileURLToPath(import.meta.url), "../.."),
|
|
97
|
-
templateDir: resolve2(fileURLToPath(import.meta.url), "../../template")
|
|
98
|
-
},
|
|
99
|
-
input: {
|
|
100
|
-
git: {}
|
|
101
|
-
},
|
|
102
|
-
keyholderMap: {},
|
|
103
|
-
templateDirNames: ["key"],
|
|
104
|
-
projectDir: "",
|
|
105
|
-
resourcesDir: "",
|
|
106
|
-
keyDir: "",
|
|
107
|
-
keyholderFilePath: "",
|
|
108
|
-
versionName: "",
|
|
109
|
-
versionCode: "",
|
|
110
|
-
tempDir: ""
|
|
111
|
-
};
|
|
112
|
-
|
|
113
|
-
// src/util/logger.ts
|
|
114
|
-
import chalk from "chalk";
|
|
115
|
-
var logger = {
|
|
116
|
-
success: (...msg) => console.log(chalk.green(`\u2714 ${msg.join(", ")}`)),
|
|
117
|
-
done: (...msg) => console.log(chalk.green(`\u2714 ${msg.join(", ")} - Done`)),
|
|
118
|
-
error: (...msg) => console.log(chalk.red(`\u2716 ${msg.join(", ")}`)),
|
|
119
|
-
warn: (...msg) => console.log(chalk.yellow(`\u26A0 ${msg.join(", ")}`)),
|
|
120
|
-
info: (...msg) => console.log(chalk.cyan(`\u2139 ${msg.join(", ")}`)),
|
|
121
|
-
title: (...msg) => console.log(chalk.bold.blue(`
|
|
122
|
-
${msg.join(", ")}`)),
|
|
123
|
-
dim: (...msg) => console.log(chalk.dim(msg.join(", ")))
|
|
124
|
-
};
|
|
125
|
-
|
|
126
|
-
// src/command/init.ts
|
|
127
|
-
import chalk3 from "chalk";
|
|
128
|
-
import { input } from "@inquirer/prompts";
|
|
129
|
-
|
|
130
|
-
// src/util/input/InqueryInputs.ts
|
|
131
|
-
import { select } from "@inquirer/prompts";
|
|
132
|
-
import { is } from "@mj-studio/js-util";
|
|
133
|
-
import chalk2 from "chalk";
|
|
134
|
-
function constructInquirerFormattedMessage({
|
|
135
|
-
example,
|
|
136
|
-
explanation,
|
|
137
|
-
referUrl,
|
|
138
|
-
name
|
|
139
|
-
}) {
|
|
140
|
-
let ret = `${chalk2.bold(name)}`;
|
|
141
|
-
if (explanation) {
|
|
142
|
-
ret += `
|
|
143
|
-
|
|
144
|
-
${chalk2.italic.blue(explanation)}`;
|
|
145
|
-
}
|
|
146
|
-
if (example) {
|
|
147
|
-
ret += `
|
|
148
|
-
${chalk2.italic(`${chalk2.greenBright("example :")} ${example}`)}`;
|
|
149
|
-
}
|
|
150
|
-
if (referUrl) {
|
|
151
|
-
ret += `
|
|
152
|
-
${chalk2.italic(`${chalk2.greenBright("references :")} ${chalk2.underline.blue(referUrl)}`)}`;
|
|
153
|
-
}
|
|
154
|
-
if (explanation) {
|
|
155
|
-
ret += "\n";
|
|
156
|
-
if (example || referUrl) {
|
|
157
|
-
ret += "\n";
|
|
158
|
-
}
|
|
159
|
-
}
|
|
160
|
-
return ret;
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
// src/util/setup/hydrateKeyholderFileValues.ts
|
|
164
|
-
async function hydrateKeyholderFileValues() {
|
|
165
|
-
if (exist(OptionHolder.keyholderFilePath)) {
|
|
166
|
-
Object.assign(OptionHolder.keyholderMap, readJsonSlow(OptionHolder.keyholderFilePath));
|
|
167
|
-
}
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
// src/util/EnvUtil.ts
|
|
171
|
-
var isDev = process.env.NODE_ENV === "development";
|
|
172
|
-
var isWin = process.platform.startsWith("win");
|
|
173
|
-
var isTest = process.env.NODE_ENV === "test";
|
|
174
|
-
|
|
175
|
-
// src/util/throwError.ts
|
|
176
|
-
function throwError(message, e) {
|
|
177
|
-
if (e) {
|
|
178
|
-
logger.error(message, e);
|
|
179
|
-
} else {
|
|
180
|
-
logger.error(message);
|
|
181
|
-
}
|
|
182
|
-
if (isTest) {
|
|
183
|
-
throw new Error("throwError");
|
|
184
|
-
}
|
|
185
|
-
process.exit(1);
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
// src/util/setup/VersionUtil.ts
|
|
189
|
-
import semver from "semver";
|
|
190
|
-
import { padZero } from "@mj-studio/js-util";
|
|
191
|
-
var versionNameRegex = () => /const\s+VERSION_NAME\s*?=\s*?['"]([\d\.]*?)['"]\s*?;?/;
|
|
192
|
-
var versionCodeRegex = () => /const\s+VERSION_CODE\s*?=\s*?(\d+)\s*?;?/;
|
|
193
|
-
async function parseBinaryVersions() {
|
|
194
|
-
const files = readdir(OptionHolder.projectDir);
|
|
195
|
-
const jsConfigFiles = ["app.config.ts", "app.config.js", "app.config.cjs", "app.config.mjs"];
|
|
196
|
-
const jsonConfigFile = "app.json";
|
|
197
|
-
for (const jsConfigFile of jsConfigFiles) {
|
|
198
|
-
if (files.includes(jsConfigFile)) {
|
|
199
|
-
await parseFromJsConfigFile(jsConfigFile);
|
|
200
|
-
return;
|
|
201
|
-
}
|
|
202
|
-
}
|
|
203
|
-
if (files.includes(jsonConfigFile)) {
|
|
204
|
-
await parseFromJsonConfigFile(jsonConfigFile);
|
|
205
|
-
return;
|
|
206
|
-
}
|
|
207
|
-
throwError("expo config file not found");
|
|
208
|
-
async function parseFromJsConfigFile(filename) {
|
|
209
|
-
const filePath = resolve2(OptionHolder.projectDir, filename);
|
|
210
|
-
const content = read(filePath);
|
|
211
|
-
const VERSION_NAME = versionNameRegex().exec(content)?.[1];
|
|
212
|
-
const VERSION_CODE = versionCodeRegex().exec(content)?.[1];
|
|
213
|
-
if (!VERSION_NAME) {
|
|
214
|
-
throwError("cannot parse version name");
|
|
215
|
-
}
|
|
216
|
-
if (!VERSION_CODE) {
|
|
217
|
-
throwError("cannot parse version code");
|
|
218
|
-
}
|
|
219
|
-
if (!semver.valid(VERSION_NAME)) {
|
|
220
|
-
throwError("VERSION_NAME is not a valid semver format");
|
|
221
|
-
}
|
|
222
|
-
OptionHolder.versionName = VERSION_NAME;
|
|
223
|
-
OptionHolder.versionCode = VERSION_CODE;
|
|
224
|
-
}
|
|
225
|
-
async function parseFromJsonConfigFile(filename) {
|
|
226
|
-
const filePath = resolve2(OptionHolder.projectDir, filename);
|
|
227
|
-
const json = readJsonSlow(filePath);
|
|
228
|
-
const versionName = json.expo?.version + "";
|
|
229
|
-
const iosVersionCode = json.expo?.ios?.buildNumber + "";
|
|
230
|
-
const androidVersionCode = json.expo?.android?.versionCode + "";
|
|
231
|
-
if (!/\d+/.test(iosVersionCode)) {
|
|
232
|
-
throwError("app.json expo.ios.buildNumber is not an integer");
|
|
233
|
-
}
|
|
234
|
-
if (!/\d+/.test(androidVersionCode)) {
|
|
235
|
-
throwError("app.json expo.android.versionCode is not an integer");
|
|
236
|
-
}
|
|
237
|
-
if (iosVersionCode !== androidVersionCode) {
|
|
238
|
-
throwError("app.json expo.ios.buildNumber is not equal with expo.android.versionCode");
|
|
239
|
-
}
|
|
240
|
-
if (!semver.valid(versionName)) {
|
|
241
|
-
throwError("VERSION_NAME is not a valid semver format");
|
|
242
|
-
}
|
|
243
|
-
OptionHolder.versionName = versionName;
|
|
244
|
-
OptionHolder.versionCode = iosVersionCode;
|
|
245
|
-
}
|
|
246
|
-
}
|
|
247
|
-
|
|
248
|
-
// src/util/parseConfigFile.ts
|
|
249
|
-
import { is as is2 } from "@mj-studio/js-util";
|
|
250
|
-
async function parseConfigFile() {
|
|
251
|
-
const candidates = [
|
|
252
|
-
join2(OptionHolder.resourcesDir, "expo-release-it.config.json"),
|
|
253
|
-
join2(OptionHolder.projectDir, "expo-release-it.config.json")
|
|
254
|
-
];
|
|
255
|
-
if (OptionHolder.input.config) {
|
|
256
|
-
candidates.unshift(OptionHolder.input.config);
|
|
257
|
-
}
|
|
258
|
-
const validConfigFilePath = candidates.find(
|
|
259
|
-
(candidate) => exist(candidate) && is2.object(readJsonSlow(candidate))
|
|
260
|
-
);
|
|
261
|
-
if (!validConfigFilePath) return;
|
|
262
|
-
const config = readJsonSlow(validConfigFilePath);
|
|
263
|
-
assignIfValueIsValidAndNotSetAlready(
|
|
264
|
-
OptionHolder.input,
|
|
265
|
-
"semverIncrement",
|
|
266
|
-
config.bump?.increment
|
|
267
|
-
);
|
|
268
|
-
assignIfValueIsValidAndNotSetAlready(
|
|
269
|
-
OptionHolder.input,
|
|
270
|
-
"androidOutput",
|
|
271
|
-
config.build?.androidBuildOutput ?? config.upload?.androidBuildOutput
|
|
272
|
-
);
|
|
273
|
-
assignIfValueIsValidAndNotSetAlready(OptionHolder.input, "pod", config.build?.iosPodInstall);
|
|
274
|
-
assignIfValueIsValidAndNotSetAlready(
|
|
275
|
-
OptionHolder.input,
|
|
276
|
-
"uploadMetadata",
|
|
277
|
-
config.upload?.uploadMetadata ?? config.submit?.uploadMetadata
|
|
278
|
-
);
|
|
279
|
-
assignIfValueIsValidAndNotSetAlready(
|
|
280
|
-
OptionHolder.input,
|
|
281
|
-
"uploadScreenshot",
|
|
282
|
-
config.upload?.uploadScreenshot ?? config.submit?.uploadScreenshot
|
|
283
|
-
);
|
|
284
|
-
assignIfValueIsValidAndNotSetAlready(OptionHolder.input.git, "commit", config.bump?.git?.commit);
|
|
285
|
-
assignIfValueIsValidAndNotSetAlready(
|
|
286
|
-
OptionHolder.input.git,
|
|
287
|
-
"commitMessage",
|
|
288
|
-
config.bump?.git?.commitMessage
|
|
289
|
-
);
|
|
290
|
-
assignIfValueIsValidAndNotSetAlready(OptionHolder.input.git, "tag", config.bump?.git?.tag);
|
|
291
|
-
assignIfValueIsValidAndNotSetAlready(
|
|
292
|
-
OptionHolder.input.git,
|
|
293
|
-
"tagName",
|
|
294
|
-
config.bump?.git?.tagName
|
|
295
|
-
);
|
|
296
|
-
assignIfValueIsValidAndNotSetAlready(OptionHolder.input.git, "push", config.bump?.git?.push);
|
|
297
|
-
}
|
|
298
|
-
function assignIfValueIsValidAndNotSetAlready(object, key, value) {
|
|
299
|
-
if (!object[key] && !(value === null || value === void 0)) {
|
|
300
|
-
object[key] = value;
|
|
301
|
-
}
|
|
302
|
-
}
|
|
303
|
-
|
|
304
|
-
// src/util/setup/setup.ts
|
|
305
|
-
async function setup() {
|
|
306
|
-
await setupBasicOptions();
|
|
307
|
-
await parseConfigFile();
|
|
308
|
-
await hydrateKeyholderFileValues();
|
|
309
|
-
await parseBinaryVersions();
|
|
310
|
-
}
|
|
311
|
-
async function setupBasicOptions() {
|
|
312
|
-
OptionHolder.projectDir = isDev ? resolve2("example") : resolve2(".");
|
|
313
|
-
OptionHolder.resourcesDir = resolve2(OptionHolder.projectDir, "expo-release-it");
|
|
314
|
-
OptionHolder.keyDir = resolve2(OptionHolder.resourcesDir, "key");
|
|
315
|
-
OptionHolder.keyholderFilePath = resolve2(OptionHolder.resourcesDir, "keyholder.json");
|
|
316
|
-
OptionHolder.tempDir = resolve2(OptionHolder.resourcesDir, ".temp");
|
|
317
|
-
}
|
|
318
|
-
|
|
319
|
-
// src/command/init.ts
|
|
320
|
-
async function init({ options }) {
|
|
321
|
-
Object.assign(OptionHolder.input, options);
|
|
322
|
-
logger.info(`${chalk3.inverse("expo-release-it")} Initialization Get Started`);
|
|
323
|
-
await setup();
|
|
324
|
-
await promptInputs();
|
|
325
|
-
await copyTemplates();
|
|
326
|
-
logger.success(
|
|
327
|
-
`${chalk3.inverse("expo-release-it")} Initialization Done. Check out generated 'expo-release-it' directory.`
|
|
328
|
-
);
|
|
329
|
-
}
|
|
330
|
-
async function promptInputs() {
|
|
331
|
-
OptionHolder.keyholderMap.ios_app_identifier = await input({
|
|
332
|
-
message: constructInquirerFormattedMessage({
|
|
333
|
-
name: "iOS Bundle Identifier",
|
|
334
|
-
explanation: `The bundle identifier for your iOS standalone app. You make it up, but it needs to be unique on the App Store.
|
|
335
|
-
This means 'CFBundleIdentifier' in info.plist and 'ios.bundleIdentifier' in expo app config`,
|
|
336
|
-
example: "com.companyname.appname",
|
|
337
|
-
referUrl: "https://docs.expo.dev/versions/latest/config/app/#bundleidentifier"
|
|
338
|
-
}),
|
|
339
|
-
required: true,
|
|
340
|
-
default: OptionHolder.keyholderMap.ios_app_identifier
|
|
341
|
-
});
|
|
342
|
-
OptionHolder.keyholderMap.ios_developer_team_id = await input({
|
|
343
|
-
message: constructInquirerFormattedMessage({
|
|
344
|
-
name: "IOS Developer Team Id",
|
|
345
|
-
explanation: `A unique alphanumeric string that identifies your Apple Developer Team`,
|
|
346
|
-
example: "8A51ABC4H7",
|
|
347
|
-
referUrl: "https://developer.apple.com/account"
|
|
348
|
-
}),
|
|
349
|
-
required: true,
|
|
350
|
-
default: OptionHolder.keyholderMap.ios_developer_team_id
|
|
351
|
-
});
|
|
352
|
-
OptionHolder.keyholderMap.ios_match_git_url = await input({
|
|
353
|
-
message: constructInquirerFormattedMessage({
|
|
354
|
-
name: "iOS Fastlane Match Github URL",
|
|
355
|
-
explanation: `The URL of the private Git repository where code signing certificates and profiles are stored for Fastlane Match.`,
|
|
356
|
-
example: "https://github.com/yourname/your-certificates-repo.git",
|
|
357
|
-
referUrl: "https://docs.fastlane.tools/actions/match/"
|
|
358
|
-
}),
|
|
359
|
-
required: true,
|
|
360
|
-
default: OptionHolder.keyholderMap.ios_match_git_url
|
|
361
|
-
});
|
|
362
|
-
OptionHolder.keyholderMap.ios_match_password = await input({
|
|
363
|
-
message: constructInquirerFormattedMessage({
|
|
364
|
-
name: "iOS Fastlane Match Passphrase",
|
|
365
|
-
explanation: `When running match for the first time on a new machine, it will ask you for the passphrase for the Git repository. This is an additional layer of security: each of the files will be encrypted using openssl. Make sure to remember the password, as you'll need it when you run match on a different machine.`,
|
|
366
|
-
example: "yourpassphrase",
|
|
367
|
-
referUrl: "https://docs.fastlane.tools/actions/match/"
|
|
368
|
-
}),
|
|
369
|
-
required: true,
|
|
370
|
-
default: OptionHolder.keyholderMap.ios_match_password
|
|
371
|
-
});
|
|
372
|
-
OptionHolder.keyholderMap.ios_app_store_connect_api_key_id = await input({
|
|
373
|
-
message: constructInquirerFormattedMessage({
|
|
374
|
-
name: "iOS App Store Connect API Key ID",
|
|
375
|
-
explanation: `ID of App Store Connect API key, used for authentication with Apple\u2019s API.
|
|
376
|
-
App Store Connect API Key can be issued in ${chalk3.underline.blue("https://appstoreconnect.apple.com/access/integrations/api")}`,
|
|
377
|
-
example: "1A2BC3DE4F",
|
|
378
|
-
referUrl: "https://appstoreconnect.apple.com/access/integrations/api"
|
|
379
|
-
}),
|
|
380
|
-
required: true,
|
|
381
|
-
default: OptionHolder.keyholderMap.ios_app_store_connect_api_key_id
|
|
382
|
-
});
|
|
383
|
-
OptionHolder.keyholderMap.ios_app_store_connect_api_key_issuer_id = await input({
|
|
384
|
-
message: constructInquirerFormattedMessage({
|
|
385
|
-
name: "iOS App Store Connect API Key Issuer ID",
|
|
386
|
-
explanation: `Identifies the issuer who created the authentication token.
|
|
387
|
-
App Store Connect API Key can be issued in ${chalk3.underline.blue("https://appstoreconnect.apple.com/access/integrations/api")}`,
|
|
388
|
-
example: "abcd1234-5678-90ef-ghij-1234567890kl",
|
|
389
|
-
referUrl: "https://appstoreconnect.apple.com/access/integrations/api"
|
|
390
|
-
}),
|
|
391
|
-
required: true,
|
|
392
|
-
default: OptionHolder.keyholderMap.ios_app_store_connect_api_key_issuer_id
|
|
393
|
-
});
|
|
394
|
-
OptionHolder.keyholderMap.ios_xcode_project_target = await input({
|
|
395
|
-
message: constructInquirerFormattedMessage({
|
|
396
|
-
name: "iOS App Target Name",
|
|
397
|
-
explanation: `A target in Xcode defines a product to build, including app, extension, or framework, with its own settings and build instructions.
|
|
398
|
-
Usually, this is equivalent to {{name}}.xcodeproj in your ios directory`,
|
|
399
|
-
example: "app"
|
|
400
|
-
}),
|
|
401
|
-
required: true,
|
|
402
|
-
default: OptionHolder.keyholderMap.ios_xcode_project_target || "app"
|
|
403
|
-
});
|
|
404
|
-
OptionHolder.keyholderMap.android_package_name = await input({
|
|
405
|
-
message: constructInquirerFormattedMessage({
|
|
406
|
-
name: "Android Package Name",
|
|
407
|
-
explanation: `The package name for your Android standalone app. You make it up, but it needs to be unique on the Play Store.`,
|
|
408
|
-
example: "com.companyname.appname",
|
|
409
|
-
referUrl: "https://docs.expo.dev/versions/latest/config/app/#package"
|
|
410
|
-
}),
|
|
411
|
-
required: true,
|
|
412
|
-
default: OptionHolder.keyholderMap.android_package_name
|
|
413
|
-
});
|
|
414
|
-
OptionHolder.keyholderMap.android_keystore_store_password = await input({
|
|
415
|
-
message: constructInquirerFormattedMessage({
|
|
416
|
-
name: "Android Keystore Store Password",
|
|
417
|
-
explanation: `Storage password used in android release keystore
|
|
418
|
-
You can issue your android release keystore following this guide: ${chalk3.underline.blue("https://developer.android.com/studio/publish/app-signing.html#generate-key")}
|
|
419
|
-
Or, you can do same thing with CLI: ${chalk3.underline.blue("https://gist.github.com/henriquemenezes/70feb8fff20a19a65346e48786bedb8f")}`,
|
|
420
|
-
referUrl: "https://developer.android.com/studio/publish/app-signing.html#generate-key"
|
|
421
|
-
}),
|
|
422
|
-
required: true,
|
|
423
|
-
default: OptionHolder.keyholderMap.android_keystore_store_password
|
|
424
|
-
});
|
|
425
|
-
OptionHolder.keyholderMap.android_keystore_key_alias = await input({
|
|
426
|
-
message: constructInquirerFormattedMessage({
|
|
427
|
-
name: "Android Keystore Key Alias",
|
|
428
|
-
explanation: `Key alias used in android release keystore
|
|
429
|
-
You can issue your android release keystore following this guide: ${chalk3.underline.blue("https://developer.android.com/studio/publish/app-signing.html#generate-key")}
|
|
430
|
-
Or, you can do same thing with CLI: ${chalk3.underline.blue("https://gist.github.com/henriquemenezes/70feb8fff20a19a65346e48786bedb8f")}`,
|
|
431
|
-
referUrl: "https://developer.android.com/studio/publish/app-signing.html#generate-key"
|
|
432
|
-
}),
|
|
433
|
-
required: true,
|
|
434
|
-
default: OptionHolder.keyholderMap.android_keystore_key_alias
|
|
435
|
-
});
|
|
436
|
-
OptionHolder.keyholderMap.android_keystore_key_password = await input({
|
|
437
|
-
message: constructInquirerFormattedMessage({
|
|
438
|
-
name: "Android Keystore Key Password",
|
|
439
|
-
explanation: `Key password used in android release keystore
|
|
440
|
-
You can issue your android release keystore following this guide: ${chalk3.underline.blue("https://developer.android.com/studio/publish/app-signing.html#generate-key")}
|
|
441
|
-
Or, you can do same thing with CLI: ${chalk3.underline.blue("https://gist.github.com/henriquemenezes/70feb8fff20a19a65346e48786bedb8f")}`,
|
|
442
|
-
referUrl: "https://developer.android.com/studio/publish/app-signing.html#generate-key"
|
|
443
|
-
}),
|
|
444
|
-
required: true,
|
|
445
|
-
default: OptionHolder.keyholderMap.android_keystore_key_password
|
|
446
|
-
});
|
|
447
|
-
writeJson(OptionHolder.keyholderFilePath, OptionHolder.keyholderMap);
|
|
448
|
-
}
|
|
449
|
-
async function copyTemplates() {
|
|
450
|
-
for (const dir of OptionHolder.templateDirNames) {
|
|
451
|
-
await copyDirRecursively(dir);
|
|
452
|
-
}
|
|
453
|
-
async function copyDirRecursively(dir) {
|
|
454
|
-
const sourceDirPath = join2(OptionHolder.cli.templateDir, dir);
|
|
455
|
-
const destDirPath = join2(OptionHolder.resourcesDir, dir);
|
|
456
|
-
copy(sourceDirPath, destDirPath, { overwrite: dir !== "key" });
|
|
457
|
-
}
|
|
458
|
-
}
|
|
459
|
-
export {
|
|
460
|
-
init
|
|
461
|
-
};
|
|
462
|
-
//# sourceMappingURL=init.js.map
|
|
1
|
+
import "../EnvUtil-DWWwkHaf.js";
|
|
2
|
+
import "../FileUtil-B9JnWobK.js";
|
|
3
|
+
import "../OptionHolder-H3HG0A95.js";
|
|
4
|
+
import "../InqueryInputs-BGj-DlRa.js";
|
|
5
|
+
import "../logger-DvQ7ScMQ.js";
|
|
6
|
+
import "../parseConfigFile-hMLUnLZR.js";
|
|
7
|
+
import "../throwError-DMF6E5pu.js";
|
|
8
|
+
import "../VersionUtil-BDB10Hpb.js";
|
|
9
|
+
import "../hydrateKeyholderFileValues-BoaRs3SC.js";
|
|
10
|
+
import "../setup-CRNjdK5q.js";
|
|
11
|
+
import { init } from "../init-cjD4jZiy.js";
|
|
12
|
+
|
|
13
|
+
export { init };
|
package/build/command/pull.d.ts
CHANGED