@better-update/cli 0.18.3 → 0.19.0
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/dist/index.mjs +16 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
|
@@ -32,7 +32,7 @@ var __require = /* @__PURE__ */ createRequire(import.meta.url);
|
|
|
32
32
|
|
|
33
33
|
//#endregion
|
|
34
34
|
//#region package.json
|
|
35
|
-
var version = "0.
|
|
35
|
+
var version = "0.19.0";
|
|
36
36
|
|
|
37
37
|
//#endregion
|
|
38
38
|
//#region src/lib/interactive-mode.ts
|
|
@@ -803,6 +803,7 @@ const CreateBuildCommonFields = {
|
|
|
803
803
|
bundleId: Schema.optional(Schema.String),
|
|
804
804
|
gitRef: Schema.optional(Schema.String),
|
|
805
805
|
gitCommit: Schema.optional(Schema.String),
|
|
806
|
+
gitDirty: Schema.optional(Schema.Boolean),
|
|
806
807
|
message: Schema.optional(Schema.String),
|
|
807
808
|
metadata: Schema.optional(Schema.Record({
|
|
808
809
|
key: Schema.String,
|
|
@@ -824,6 +825,7 @@ var Build = class extends Schema.Class("Build")({
|
|
|
824
825
|
bundleId: Schema.NullOr(Schema.String),
|
|
825
826
|
gitRef: Schema.NullOr(Schema.String),
|
|
826
827
|
gitCommit: Schema.NullOr(Schema.String),
|
|
828
|
+
gitDirty: Schema.Boolean,
|
|
827
829
|
message: Schema.NullOr(Schema.String),
|
|
828
830
|
metadataJson: Schema.String,
|
|
829
831
|
fingerprintHash: Schema.NullOr(Schema.String),
|
|
@@ -5126,6 +5128,17 @@ const setupIosViaAscKey = (api, input) => Effect.gen(function* () {
|
|
|
5126
5128
|
//#region src/application/credentials-interactive.ts
|
|
5127
5129
|
const hasTag = (cause) => typeof cause === "object" && cause !== null && "_tag" in cause;
|
|
5128
5130
|
const isMissingResolveError = (cause) => hasTag(cause) && (cause._tag === "NotFound" || cause._tag === "BadRequest");
|
|
5131
|
+
const randomKeystoreSecret = () => randomBytes(24).toString("base64url");
|
|
5132
|
+
const generateKeystoreAuto = (api, applicationIdentifier) => Effect.gen(function* () {
|
|
5133
|
+
yield* Console.log("Generating a new Android Keystore...");
|
|
5134
|
+
return (yield* generateAndUploadKeystore(api, {
|
|
5135
|
+
keyAlias: "upload",
|
|
5136
|
+
storePassword: randomKeystoreSecret(),
|
|
5137
|
+
keyPassword: randomKeystoreSecret(),
|
|
5138
|
+
commonName: applicationIdentifier,
|
|
5139
|
+
organization: "better-update"
|
|
5140
|
+
})).id;
|
|
5141
|
+
});
|
|
5129
5142
|
const generateKeystoreInteractive = (api) => Effect.gen(function* () {
|
|
5130
5143
|
const alias = yield* promptText("Key alias", { placeholder: "upload-key" });
|
|
5131
5144
|
const storePassword = yield* promptPassword("Keystore password");
|
|
@@ -5183,7 +5196,7 @@ const setupAndroidInteractive = (api, input) => Effect.gen(function* () {
|
|
|
5183
5196
|
message: `Build aborted — no keystore bound to ${input.applicationIdentifier}.`,
|
|
5184
5197
|
hint: "Run `better-update credentials generate keystore` or upload via the dashboard."
|
|
5185
5198
|
}));
|
|
5186
|
-
const keystoreId = yield*
|
|
5199
|
+
const keystoreId = yield* choice === "generate" ? generateKeystoreAuto(api, input.applicationIdentifier) : pickExistingKeystore(api);
|
|
5187
5200
|
yield* api.androidBuildCredentials.create({
|
|
5188
5201
|
path: { applicationIdentifierId: appId },
|
|
5189
5202
|
payload: {
|
|
@@ -5974,6 +5987,7 @@ const buildReserveCommon = (input) => ({
|
|
|
5974
5987
|
...input.buildNumber === void 0 ? {} : { buildNumber: input.buildNumber },
|
|
5975
5988
|
...input.gitContext.ref === void 0 ? {} : { gitRef: input.gitContext.ref },
|
|
5976
5989
|
...input.gitContext.commit === void 0 ? {} : { gitCommit: input.gitContext.commit },
|
|
5990
|
+
gitDirty: input.gitContext.dirty,
|
|
5977
5991
|
...input.message === void 0 ? {} : { message: input.message },
|
|
5978
5992
|
...input.fingerprintHash === void 0 ? {} : { fingerprintHash: input.fingerprintHash }
|
|
5979
5993
|
});
|