@better-update/cli 0.39.0 → 0.39.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/dist/index.mjs +9 -7
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
|
@@ -35,7 +35,7 @@ var __require = /* @__PURE__ */ createRequire(import.meta.url);
|
|
|
35
35
|
|
|
36
36
|
//#endregion
|
|
37
37
|
//#region package.json
|
|
38
|
-
var version = "0.39.
|
|
38
|
+
var version = "0.39.2";
|
|
39
39
|
|
|
40
40
|
//#endregion
|
|
41
41
|
//#region src/lib/interactive-mode.ts
|
|
@@ -3024,9 +3024,9 @@ const AuthStoreLive = Layer.effect(AuthStore, Effect.gen(function* () {
|
|
|
3024
3024
|
|
|
3025
3025
|
//#endregion
|
|
3026
3026
|
//#region src/services/config-store.ts
|
|
3027
|
-
const DEFAULT_BASE_URL = "https://
|
|
3028
|
-
const DEFAULT_WEB_URL = "https://
|
|
3029
|
-
const DEFAULT_ASSET_CDN_URL = "https://assets.
|
|
3027
|
+
const DEFAULT_BASE_URL = "https://updates.jmango360.dev";
|
|
3028
|
+
const DEFAULT_WEB_URL = "https://updates.jmango360.dev";
|
|
3029
|
+
const DEFAULT_ASSET_CDN_URL = "https://assets.updates.jmango360.dev";
|
|
3030
3030
|
var ConfigStoreParseError = class extends Data.TaggedError("ConfigStoreParseError") {};
|
|
3031
3031
|
const normalizeUrl = (value) => value.replace(/\/$/u, "");
|
|
3032
3032
|
var ConfigStore = class extends Context.Tag("cli/ConfigStore")() {};
|
|
@@ -3527,10 +3527,11 @@ const PresignedUploadClientLive = Layer.effect(PresignedUploadClient, Effect.gen
|
|
|
3527
3527
|
const now = Date.now();
|
|
3528
3528
|
const expiryMs = new Date(expiresAt).getTime();
|
|
3529
3529
|
if (Number.isNaN(expiryMs) || now > expiryMs - EXPIRY_SAFETY_MARGIN_MS) return yield* new PresignedUrlExpiredError({ message: `Presigned upload URL expired or too close to expiry (expiresAt=${expiresAt}).` });
|
|
3530
|
-
const
|
|
3530
|
+
const bytes = yield* fileSystem.readFile(filePath).pipe(Effect.mapError((cause) => new UploadFailedError({ message: `Failed to read artifact for upload: ${String(cause)}` })));
|
|
3531
|
+
const request = HttpClientRequest.put(url).pipe(HttpClientRequest.bodyUint8Array(bytes), HttpClientRequest.setHeaders({
|
|
3531
3532
|
"content-length": String(byteSize),
|
|
3532
3533
|
...headers
|
|
3533
|
-
}))
|
|
3534
|
+
}));
|
|
3534
3535
|
const response = yield* client.execute(request).pipe(Effect.mapError((cause) => new UploadFailedError({ message: `HTTP request to presigned URL failed: ${String(cause)}` })));
|
|
3535
3536
|
if (response.status < 200 || response.status >= 300) {
|
|
3536
3537
|
const body = yield* response.text.pipe(Effect.orElseSucceed(() => ""));
|
|
@@ -35500,6 +35501,7 @@ const gitCreateFields = (git) => ({
|
|
|
35500
35501
|
...compact({ gitCommit: git.commit })
|
|
35501
35502
|
});
|
|
35502
35503
|
const dedupeAssetsByHash = (assets) => uniqBy(assets, (asset) => asset.hash);
|
|
35504
|
+
const dedupeAssetsByKey = (assets) => uniqBy(assets, (asset) => asset.key);
|
|
35503
35505
|
/**
|
|
35504
35506
|
* Record the per-platform fingerprint (matching EAS) so `fingerprint:compare`
|
|
35505
35507
|
* lines up with the per-platform `fingerprint`-policy RTV. Best-effort: the hash
|
|
@@ -35621,7 +35623,7 @@ const publishPlatform = (params) => Effect.gen(function* () {
|
|
|
35621
35623
|
groupId: params.groupId,
|
|
35622
35624
|
metadata: manifestMetadata,
|
|
35623
35625
|
extra: manifestExtra,
|
|
35624
|
-
assets: preparedAssets.map((asset) => ({
|
|
35626
|
+
assets: dedupeAssetsByKey(preparedAssets).map((asset) => ({
|
|
35625
35627
|
hash: asset.hash,
|
|
35626
35628
|
key: asset.key,
|
|
35627
35629
|
isLaunch: asset.isLaunch,
|