@absolutejs/absolute 0.20.0-beta.103 → 0.20.0-beta.104
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/CHANGELOG.md +7 -0
- package/changelog.json +11 -0
- package/dist/angular/components/core/streamingSlotRegistrar.js +1 -1
- package/dist/angular/components/core/streamingSlotRegistry.js +2 -2
- package/dist/cli/{compile-4xbpm6hf.js → compile-g8vmvr0w.js} +1 -1
- package/dist/cli/{index-rvpd4w9t.js → index-27hhdgtg.js} +1 -1
- package/dist/cli/{index-6ff78meg.js → index-67kedtn7.js} +9 -1
- package/dist/cli/index.js +4 -4
- package/dist/cli/{mobile-6xe6zysv.js → mobile-njmnd7vc.js} +423 -277
- package/dist/cli/{start-nmyy64tr.js → start-39aqmr5n.js} +2 -2
- package/dist/mobile/index.js +188 -37
- package/dist/mobile/index.js.map +7 -6
- package/dist/mobile/remoteMacAgentEntry.js +148 -148
- package/dist/src/mobile/index.d.ts +1 -0
- package/dist/src/mobile/nativeReleaseReadiness.d.ts +5 -0
- package/dist/src/mobile/releaseDoctor.d.ts +2 -0
- package/dist/src/mobile/shellReleaseReadiness.d.ts +2 -0
- package/package.json +2 -1
package/dist/mobile/index.js
CHANGED
|
@@ -20042,7 +20042,7 @@ import {
|
|
|
20042
20042
|
verify as verify2,
|
|
20043
20043
|
X509Certificate as X509Certificate3
|
|
20044
20044
|
} from "crypto";
|
|
20045
|
-
import { readFile as
|
|
20045
|
+
import { readFile as readFile26, stat as stat6 } from "fs/promises";
|
|
20046
20046
|
import path from "path";
|
|
20047
20047
|
var MOBILE_UPDATE_REGISTRY_FORMAT = 1, DEFAULT_PREFIX = "absolutejs/mobile-updates", MAX_FILE_BYTES, MAX_TOTAL_BYTES, DAY_MS, DEFAULT_MIN_AGE_MS, DEFAULT_GRACE_PERIOD_MS, DEFAULT_RETAIN_RECENT = 5, HASH, RELEASE, APP_ID, NAME, EXPO_DESCRIPTOR = "_absolute/expo-update.json", EXPO_CODE_SIGNING_ALGORITHM = "rsa-v1_5-sha256", HEALTH_TOKEN_VERSION = 1, HEALTH_KINDS, FAILURE_HEALTH_KINDS, MobileUpdateRegistryError, object6 = (value) => typeof value === "object" && value !== null && !Array.isArray(value), text2 = (value, field2) => {
|
|
20048
20048
|
if (typeof value !== "string" || value.length === 0)
|
|
@@ -21075,7 +21075,7 @@ var MOBILE_UPDATE_REGISTRY_FORMAT = 1, DEFAULT_PREFIX = "absolutejs/mobile-updat
|
|
|
21075
21075
|
verifyManifestSignature(manifest, options.publicKeys);
|
|
21076
21076
|
await assertNotMarked(manifest.appId, manifest.releaseId);
|
|
21077
21077
|
const localRoot = path.resolve(input.releaseDirectory);
|
|
21078
|
-
const localManifest = parseMobileUpdateManifest(JSON.parse(await
|
|
21078
|
+
const localManifest = parseMobileUpdateManifest(JSON.parse(await readFile26(path.join(localRoot, "update.json"), "utf8")));
|
|
21079
21079
|
if (JSON.stringify(localManifest) !== JSON.stringify(manifest))
|
|
21080
21080
|
throw new MobileUpdateRegistryError("Local mobile update manifest changed");
|
|
21081
21081
|
const existing = await readManifest(manifest.appId, manifest.releaseId);
|
|
@@ -21616,8 +21616,8 @@ import {
|
|
|
21616
21616
|
createPublicKey as createPublicKey3,
|
|
21617
21617
|
X509Certificate as X509Certificate4
|
|
21618
21618
|
} from "crypto";
|
|
21619
|
-
import { access as access18, mkdir as
|
|
21620
|
-
import { dirname as
|
|
21619
|
+
import { access as access18, mkdir as mkdir20 } from "fs/promises";
|
|
21620
|
+
import { dirname as dirname21, isAbsolute as isAbsolute10, relative as relative19, resolve as resolve21, sep as sep12 } from "path";
|
|
21621
21621
|
import { pathToFileURL as pathToFileURL5 } from "url";
|
|
21622
21622
|
import { Elysia as Elysia4 } from "elysia";
|
|
21623
21623
|
var ABSOLUTE_MOBILE_UPDATE_SERVER_FORMAT = 1, DEFAULT_MOBILE_UPDATE_REGISTRY_MODULE = "mobile.update.ts", object7 = (value) => typeof value === "object" && value !== null && !Array.isArray(value), projectPath3 = (projectRoot, requested) => {
|
|
@@ -21842,7 +21842,7 @@ ${generated}`);
|
|
|
21842
21842
|
return;
|
|
21843
21843
|
});
|
|
21844
21844
|
}
|
|
21845
|
-
await
|
|
21845
|
+
await mkdir20(dirname21(path2), { recursive: true });
|
|
21846
21846
|
await Bun.write(path2, renderAbsoluteMobileUpdateRegistry({
|
|
21847
21847
|
...options.health ? { health: options.health } : {},
|
|
21848
21848
|
...options.rollout ? { rollout: options.rollout } : {},
|
|
@@ -25010,7 +25010,10 @@ var runAbsoluteAndroidUpgradeConformance = async (options) => {
|
|
|
25010
25010
|
var ABSOLUTE_BUNDLETOOL_VERSION = "1.18.3";
|
|
25011
25011
|
var ABSOLUTE_BUNDLETOOL_SHA256 = "a099cfa1543f55593bc2ed16a70a7c67fe54b1747bb7301f37fdfd6d91028e29";
|
|
25012
25012
|
var ABSOLUTE_BUNDLETOOL_URL = `https://github.com/google/bundletool/releases/download/${ABSOLUTE_BUNDLETOOL_VERSION}/bundletool-all-${ABSOLUTE_BUNDLETOOL_VERSION}.jar`;
|
|
25013
|
-
var
|
|
25013
|
+
var EMBEDDED_READY_MARKERS = {
|
|
25014
|
+
capacitor: "Capacitor embedded web content ready",
|
|
25015
|
+
expo: "Expo embedded web content ready"
|
|
25016
|
+
};
|
|
25014
25017
|
var RELEASE_READY_POLL_MS = 250;
|
|
25015
25018
|
var RELEASE_READY_TIMEOUT_MS = 30000;
|
|
25016
25019
|
var RELEASE_STABILITY_MS = 2000;
|
|
@@ -25151,7 +25154,7 @@ var adb = (path, serial, ...args) => [
|
|
|
25151
25154
|
serial,
|
|
25152
25155
|
...args
|
|
25153
25156
|
];
|
|
25154
|
-
var waitForMarker = async (run, adbPath, serial, appId, timeoutMs) => {
|
|
25157
|
+
var waitForMarker = async (run, adbPath, serial, appId, engine, timeoutMs) => {
|
|
25155
25158
|
const startedAt = performance.now();
|
|
25156
25159
|
const inspect = async () => {
|
|
25157
25160
|
if (performance.now() - startedAt >= timeoutMs)
|
|
@@ -25162,9 +25165,9 @@ var waitForMarker = async (run, adbPath, serial, appId, timeoutMs) => {
|
|
|
25162
25165
|
]);
|
|
25163
25166
|
if (process2.exitCode !== 0 || !process2.stdout.trim())
|
|
25164
25167
|
throw new Error("The installed Android release exited before becoming ready.");
|
|
25165
|
-
if (logs.stdout.includes(
|
|
25168
|
+
if (logs.stdout.includes(EMBEDDED_READY_MARKERS[engine]))
|
|
25166
25169
|
return;
|
|
25167
|
-
const failedPhase = /Expo embedded web phase: (assets-(?:root|directory|destination|module|source|download|copy|read|write|finalize|unexpected)|devices)-failed/u.exec(logs.stdout)?.[1];
|
|
25170
|
+
const failedPhase = engine === "expo" ? /Expo embedded web phase: (assets-(?:root|directory|destination|module|source|download|copy|read|write|finalize|unexpected)|devices)-failed/u.exec(logs.stdout)?.[1] : undefined;
|
|
25168
25171
|
if (failedPhase)
|
|
25169
25172
|
throw new Error(`The installed release could not initialize its embedded ${failedPhase} runtime offline.`);
|
|
25170
25173
|
await Bun.sleep(RELEASE_READY_POLL_MS);
|
|
@@ -25182,8 +25185,6 @@ var launch = async (run, adbPath, serial, appId, launchUrl) => {
|
|
|
25182
25185
|
return Math.round(performance.now() - startedAt);
|
|
25183
25186
|
};
|
|
25184
25187
|
var runAbsoluteAndroidReleaseAcceptance = async (options) => {
|
|
25185
|
-
if (options.release.metadata.engine !== "expo")
|
|
25186
|
-
throw new TypeError("Installed AAB release acceptance currently requires the Expo engine.");
|
|
25187
25188
|
if (!options.serial.startsWith("emulator-"))
|
|
25188
25189
|
throw new TypeError("Installed release acceptance changes network state and therefore requires an Android emulator.");
|
|
25189
25190
|
const run = options.run ?? defaultRun;
|
|
@@ -25244,12 +25245,12 @@ var runAbsoluteAndroidReleaseAcceptance = async (options) => {
|
|
|
25244
25245
|
]);
|
|
25245
25246
|
await requireSuccess2(run, adb(options.adb, options.serial, "shell", "am", "force-stop", options.release.metadata.appId), "Android release stop");
|
|
25246
25247
|
launchMs = await launch(run, options.adb, options.serial, options.release.metadata.appId, options.launchUrl);
|
|
25247
|
-
await waitForMarker(run, options.adb, options.serial, options.release.metadata.appId, RELEASE_READY_TIMEOUT_MS);
|
|
25248
|
+
await waitForMarker(run, options.adb, options.serial, options.release.metadata.appId, options.release.metadata.engine, RELEASE_READY_TIMEOUT_MS);
|
|
25248
25249
|
await Bun.sleep(options.stabilityMs ?? RELEASE_STABILITY_MS);
|
|
25249
25250
|
await requireSuccess2(run, adb(options.adb, options.serial, "shell", "am", "force-stop", options.release.metadata.appId), "Android release relaunch stop");
|
|
25250
25251
|
await requireSuccess2(run, adb(options.adb, options.serial, "logcat", "-c"), "Android release relaunch log isolation");
|
|
25251
25252
|
relaunchMs = await launch(run, options.adb, options.serial, options.release.metadata.appId, options.launchUrl);
|
|
25252
|
-
await waitForMarker(run, options.adb, options.serial, options.release.metadata.appId, RELEASE_READY_TIMEOUT_MS);
|
|
25253
|
+
await waitForMarker(run, options.adb, options.serial, options.release.metadata.appId, options.release.metadata.engine, RELEASE_READY_TIMEOUT_MS);
|
|
25253
25254
|
} finally {
|
|
25254
25255
|
await Promise.all([
|
|
25255
25256
|
requireSuccess2(run, adb(options.adb, options.serial, "shell", "svc", "wifi", wifi.stdout.trim() === "1" ? "enable" : "disable"), "Android Wi-Fi restore"),
|
|
@@ -28449,6 +28450,12 @@ var shellUpdateModule = () => {
|
|
|
28449
28450
|
return candidate;
|
|
28450
28451
|
throw new TypeError("AbsoluteJS mobile update shell module is missing.");
|
|
28451
28452
|
};
|
|
28453
|
+
var shellReleaseReadinessModule = () => {
|
|
28454
|
+
const candidate = ["js", "ts"].map((extension) => join11(import.meta.dir, `shellReleaseReadiness.${extension}`)).find(existsSync2);
|
|
28455
|
+
if (candidate)
|
|
28456
|
+
return candidate;
|
|
28457
|
+
throw new TypeError("AbsoluteJS mobile release-readiness module is missing.");
|
|
28458
|
+
};
|
|
28452
28459
|
var escapeHtml = (value) => value.replaceAll("&", "&").replaceAll("<", "<").replaceAll(">", ">").replaceAll('"', """);
|
|
28453
28460
|
var contentSecurityPolicy = (productionOrigin) => {
|
|
28454
28461
|
const backend = new URL(productionOrigin);
|
|
@@ -28539,6 +28546,7 @@ const absoluteMobilePushCapability = absoluteDeviceCapability${pushIndex}(absolu
|
|
|
28539
28546
|
const entryPath = join11(staging, ".absolute-mobile-entry.ts");
|
|
28540
28547
|
const baseAdapterModule = capacitor ? await resolveProjectImport(projectRoot, "@absolutejs/devices-capacitor") : shellExpoDevicesModule();
|
|
28541
28548
|
const adapterImport = capacitor ? `import { installCapacitorDeviceAdapterIfNative } from ${JSON.stringify(baseAdapterModule)};` : `import { createAbsoluteExpoBridgeFetch, installAbsoluteExpoWebDeviceAdapter } from ${JSON.stringify(baseAdapterModule)};`;
|
|
28549
|
+
const readinessImport = capacitor ? `import { markAbsoluteMobileShellReady } from ${JSON.stringify(shellReleaseReadinessModule())};` : "";
|
|
28542
28550
|
const adapterInstall = capacitor ? `installCapacitorDeviceAdapterIfNative({ storagePrefix: ${JSON.stringify(storagePrefix)}${capabilityOptions ? `, ${capabilityOptions}` : ""} });` : `installAbsoluteExpoWebDeviceAdapter(${JSON.stringify(deviceCapabilities.capabilities)});`;
|
|
28543
28551
|
const shellOptionProperties = [
|
|
28544
28552
|
`engine: ${JSON.stringify(engine)}`
|
|
@@ -28556,9 +28564,10 @@ const absoluteMobilePushCapability = absoluteDeviceCapability${pushIndex}(absolu
|
|
|
28556
28564
|
const shellOptions = `{ ${shellOptionProperties.join(", ")} }`;
|
|
28557
28565
|
await writeFile11(entryPath, `import { startAbsoluteMobileShell } from ${JSON.stringify(modulePath)};
|
|
28558
28566
|
${adapterImport}
|
|
28567
|
+
${readinessImport}
|
|
28559
28568
|
${authImport}${syncImport}${pushImport}${updateImport}${capabilityImports}
|
|
28560
28569
|
${pushSetup}${adapterInstall}
|
|
28561
|
-
void startAbsoluteMobileShell(${shellOptions});
|
|
28570
|
+
void startAbsoluteMobileShell(${shellOptions})${capacitor ? ".then(markAbsoluteMobileShellReady)" : ""};
|
|
28562
28571
|
`);
|
|
28563
28572
|
const build = await Bun.build({
|
|
28564
28573
|
entrypoints: [entryPath],
|
|
@@ -34226,6 +34235,147 @@ var applyAbsoluteNativeObservability = async (config, platforms = config.platfor
|
|
|
34226
34235
|
changed.push(await configureAndroid4(config, enabled));
|
|
34227
34236
|
return { changed: changed.some(Boolean) };
|
|
34228
34237
|
};
|
|
34238
|
+
// src/mobile/nativeReleaseReadiness.ts
|
|
34239
|
+
import { mkdir as mkdir18, readFile as readFile24, readdir as readdir8, rename as rename17, writeFile as writeFile21 } from "fs/promises";
|
|
34240
|
+
import { dirname as dirname18, join as join28 } from "path";
|
|
34241
|
+
var START3 = "// absolutejs:release-readiness:start";
|
|
34242
|
+
var END3 = "// absolutejs:release-readiness:end";
|
|
34243
|
+
var ANDROID_PLUGIN3 = "AbsoluteReleaseReadinessPlugin.java";
|
|
34244
|
+
var optionalSource4 = async (path) => {
|
|
34245
|
+
try {
|
|
34246
|
+
return await readFile24(path, "utf8");
|
|
34247
|
+
} catch (error) {
|
|
34248
|
+
if (typeof error === "object" && error !== null && Reflect.get(error, "code") === "ENOENT")
|
|
34249
|
+
return null;
|
|
34250
|
+
throw error;
|
|
34251
|
+
}
|
|
34252
|
+
};
|
|
34253
|
+
var writeChanged3 = async (path, source) => {
|
|
34254
|
+
const current = await optionalSource4(path);
|
|
34255
|
+
if (current === source)
|
|
34256
|
+
return false;
|
|
34257
|
+
await mkdir18(dirname18(path), { recursive: true });
|
|
34258
|
+
if (current === null) {
|
|
34259
|
+
await writeFile21(path, source, { flag: "wx" });
|
|
34260
|
+
return true;
|
|
34261
|
+
}
|
|
34262
|
+
const temporary = `${path}.${crypto.randomUUID()}.tmp`;
|
|
34263
|
+
await writeFile21(temporary, source, { flag: "wx" });
|
|
34264
|
+
await rename17(temporary, path);
|
|
34265
|
+
return true;
|
|
34266
|
+
};
|
|
34267
|
+
var activityInRoot = async (root) => {
|
|
34268
|
+
let entries;
|
|
34269
|
+
try {
|
|
34270
|
+
entries = await readdir8(root, { recursive: true });
|
|
34271
|
+
} catch (error) {
|
|
34272
|
+
if (typeof error === "object" && error !== null && Reflect.get(error, "code") === "ENOENT")
|
|
34273
|
+
return;
|
|
34274
|
+
throw error;
|
|
34275
|
+
}
|
|
34276
|
+
const candidate = entries.find((entry) => entry.endsWith("/MainActivity.java") || entry.endsWith("/MainActivity.kt") || entry === "MainActivity.java" || entry === "MainActivity.kt");
|
|
34277
|
+
return candidate ? join28(root, candidate) : undefined;
|
|
34278
|
+
};
|
|
34279
|
+
var activityPath = async (config) => {
|
|
34280
|
+
const roots = [
|
|
34281
|
+
join28(config.nativeProjectDirectory, "android/app/src/main/java"),
|
|
34282
|
+
join28(config.nativeProjectDirectory, "android/app/src/main/kotlin")
|
|
34283
|
+
];
|
|
34284
|
+
const candidates = await Promise.all(roots.map(activityInRoot));
|
|
34285
|
+
const candidate = candidates.find((value) => value !== undefined);
|
|
34286
|
+
if (candidate)
|
|
34287
|
+
return candidate;
|
|
34288
|
+
throw new TypeError("Android MainActivity.java or MainActivity.kt was not found.");
|
|
34289
|
+
};
|
|
34290
|
+
var registrationRegion = (kotlin, generatedMethod) => {
|
|
34291
|
+
if (generatedMethod)
|
|
34292
|
+
return kotlin ? ` ${START3}
|
|
34293
|
+
override fun onCreate(savedInstanceState: android.os.Bundle?) {
|
|
34294
|
+
registerPlugin(AbsoluteReleaseReadinessPlugin::class.java)
|
|
34295
|
+
super.onCreate(savedInstanceState)
|
|
34296
|
+
}
|
|
34297
|
+
${END3}
|
|
34298
|
+
` : ` ${START3}
|
|
34299
|
+
@Override
|
|
34300
|
+
public void onCreate(android.os.Bundle savedInstanceState) {
|
|
34301
|
+
registerPlugin(AbsoluteReleaseReadinessPlugin.class);
|
|
34302
|
+
super.onCreate(savedInstanceState);
|
|
34303
|
+
}
|
|
34304
|
+
${END3}
|
|
34305
|
+
`;
|
|
34306
|
+
return kotlin ? ` ${START3}
|
|
34307
|
+
registerPlugin(AbsoluteReleaseReadinessPlugin::class.java)
|
|
34308
|
+
${END3}
|
|
34309
|
+
` : ` ${START3}
|
|
34310
|
+
registerPlugin(AbsoluteReleaseReadinessPlugin.class);
|
|
34311
|
+
${END3}
|
|
34312
|
+
`;
|
|
34313
|
+
};
|
|
34314
|
+
var injectRegistration = (source) => {
|
|
34315
|
+
const kotlin = /\bfun\s+onCreate\s*\(/u.test(source) || source.includes("BridgeActivity()");
|
|
34316
|
+
const existingStart = source.indexOf(START3);
|
|
34317
|
+
const existingEnd = source.indexOf(END3);
|
|
34318
|
+
if (existingStart < 0 !== existingEnd < 0 || existingStart >= 0 && existingEnd < existingStart)
|
|
34319
|
+
throw new TypeError("AbsoluteJS release-readiness markers are malformed.");
|
|
34320
|
+
if (existingStart >= 0) {
|
|
34321
|
+
const from = source.lastIndexOf(`
|
|
34322
|
+
`, existingStart) + 1;
|
|
34323
|
+
const newline = source.indexOf(`
|
|
34324
|
+
`, existingEnd + END3.length);
|
|
34325
|
+
const through = newline < 0 ? source.length : newline + 1;
|
|
34326
|
+
const generatedMethod = source.slice(from, through).includes("onCreate(");
|
|
34327
|
+
return `${source.slice(0, from)}${registrationRegion(kotlin, generatedMethod)}${source.slice(through)}`;
|
|
34328
|
+
}
|
|
34329
|
+
const onCreate = kotlin ? source.search(/\boverride\s+fun\s+onCreate\s*\([^)]*\)\s*\{/u) : source.search(/\b(?:public|protected)\s+void\s+onCreate\s*\([^)]*\)\s*\{/u);
|
|
34330
|
+
if (onCreate >= 0) {
|
|
34331
|
+
const brace = source.indexOf("{", onCreate);
|
|
34332
|
+
const insert = source.indexOf(`
|
|
34333
|
+
`, brace) + 1;
|
|
34334
|
+
if (insert <= 0)
|
|
34335
|
+
throw new TypeError("Could not inject Android release readiness into MainActivity.");
|
|
34336
|
+
return `${source.slice(0, insert)}${registrationRegion(kotlin, false)}${source.slice(insert)}`;
|
|
34337
|
+
}
|
|
34338
|
+
const close = source.lastIndexOf("}");
|
|
34339
|
+
if (close < 0)
|
|
34340
|
+
throw new TypeError("Could not find the Android MainActivity class body.");
|
|
34341
|
+
const separator = source[close - 1] === `
|
|
34342
|
+
` ? "" : `
|
|
34343
|
+
`;
|
|
34344
|
+
return `${source.slice(0, close)}${separator}${registrationRegion(kotlin, true)}${source.slice(close)}`;
|
|
34345
|
+
};
|
|
34346
|
+
var pluginSource = (packageName) => `package ${packageName};
|
|
34347
|
+
|
|
34348
|
+
import android.util.Log;
|
|
34349
|
+
import com.getcapacitor.JSObject;
|
|
34350
|
+
import com.getcapacitor.Plugin;
|
|
34351
|
+
import com.getcapacitor.PluginCall;
|
|
34352
|
+
import com.getcapacitor.PluginMethod;
|
|
34353
|
+
import com.getcapacitor.annotation.CapacitorPlugin;
|
|
34354
|
+
|
|
34355
|
+
@CapacitorPlugin(name = "AbsoluteReleaseReadiness")
|
|
34356
|
+
public final class AbsoluteReleaseReadinessPlugin extends Plugin {
|
|
34357
|
+
@PluginMethod
|
|
34358
|
+
public void ready(PluginCall call) {
|
|
34359
|
+
Log.i("AbsoluteJS", "Capacitor embedded web content ready");
|
|
34360
|
+
call.resolve(new JSObject().put("ready", true));
|
|
34361
|
+
}
|
|
34362
|
+
}
|
|
34363
|
+
`;
|
|
34364
|
+
var applyAbsoluteNativeReleaseReadiness = async (config, platforms = config.platforms) => {
|
|
34365
|
+
if (config.engine !== "capacitor" || !platforms.includes("android"))
|
|
34366
|
+
return { changed: false };
|
|
34367
|
+
const mainActivityPath = await activityPath(config);
|
|
34368
|
+
const activity = await readFile24(mainActivityPath, "utf8");
|
|
34369
|
+
const packageName = activity.match(/^\s*package\s+([A-Za-z0-9_.]+)\s*[;\n]/mu)?.[1];
|
|
34370
|
+
if (!packageName)
|
|
34371
|
+
throw new TypeError("Android MainActivity package declaration was not found.");
|
|
34372
|
+
const pluginPath = join28(config.nativeProjectDirectory, "android/app/src/main/java", packageName.replaceAll(".", "/"), ANDROID_PLUGIN3);
|
|
34373
|
+
const changed = await Promise.all([
|
|
34374
|
+
writeChanged3(mainActivityPath, injectRegistration(activity)),
|
|
34375
|
+
writeChanged3(pluginPath, pluginSource(packageName))
|
|
34376
|
+
]);
|
|
34377
|
+
return { changed: changed.some(Boolean) };
|
|
34378
|
+
};
|
|
34229
34379
|
|
|
34230
34380
|
// src/mobile/index.ts
|
|
34231
34381
|
init_pageProtocol();
|
|
@@ -34334,7 +34484,7 @@ var publishAbsoluteIosRelease = async (options) => {
|
|
|
34334
34484
|
init_pageProtocol();
|
|
34335
34485
|
init_releaseArtifact();
|
|
34336
34486
|
import { existsSync as existsSync7, readFileSync as readFileSync8 } from "fs";
|
|
34337
|
-
import { dirname as
|
|
34487
|
+
import { dirname as dirname19, extname as extname6, relative as relative16, resolve as resolve18 } from "path";
|
|
34338
34488
|
import ts2 from "typescript";
|
|
34339
34489
|
var ROUTE_METHODS = new Set(["get", "head"]);
|
|
34340
34490
|
var SOURCE_FILTER = /\.[cm]?[jt]sx?$/;
|
|
@@ -34385,7 +34535,7 @@ var PAGE_HANDLERS = new Map([
|
|
|
34385
34535
|
]
|
|
34386
34536
|
]);
|
|
34387
34537
|
var posixPath = (value) => value.replace(/\\/g, "/");
|
|
34388
|
-
var findTsconfig = (entry, projectRoot) => ts2.findConfigFile(
|
|
34538
|
+
var findTsconfig = (entry, projectRoot) => ts2.findConfigFile(dirname19(entry), existsSync7, "tsconfig.json") ?? ts2.findConfigFile(projectRoot, existsSync7, "tsconfig.json");
|
|
34389
34539
|
var createProgram = (entry, projectRoot) => {
|
|
34390
34540
|
const configPath2 = findTsconfig(entry, projectRoot);
|
|
34391
34541
|
if (!configPath2) {
|
|
@@ -34397,7 +34547,7 @@ var createProgram = (entry, projectRoot) => {
|
|
|
34397
34547
|
target: ts2.ScriptTarget.ESNext
|
|
34398
34548
|
});
|
|
34399
34549
|
}
|
|
34400
|
-
const parsed = ts2.parseJsonConfigFileContent(ts2.readConfigFile(configPath2, (path) => readFileSync8(path, "utf8")).config, ts2.sys,
|
|
34550
|
+
const parsed = ts2.parseJsonConfigFileContent(ts2.readConfigFile(configPath2, (path) => readFileSync8(path, "utf8")).config, ts2.sys, dirname19(configPath2));
|
|
34401
34551
|
if (!parsed.fileNames.includes(entry))
|
|
34402
34552
|
parsed.fileNames.push(entry);
|
|
34403
34553
|
return ts2.createProgram(parsed.fileNames, parsed.options);
|
|
@@ -41059,23 +41209,23 @@ import { pathToFileURL as pathToFileURL4 } from "url";
|
|
|
41059
41209
|
import { createHash as createHash15, sign, verify } from "crypto";
|
|
41060
41210
|
import {
|
|
41061
41211
|
cp as cp2,
|
|
41062
|
-
mkdir as
|
|
41212
|
+
mkdir as mkdir19,
|
|
41063
41213
|
mkdtemp as mkdtemp9,
|
|
41064
|
-
readdir as
|
|
41065
|
-
readFile as
|
|
41066
|
-
rename as
|
|
41214
|
+
readdir as readdir9,
|
|
41215
|
+
readFile as readFile25,
|
|
41216
|
+
rename as rename18,
|
|
41067
41217
|
rm as rm14,
|
|
41068
41218
|
stat as stat5,
|
|
41069
|
-
writeFile as
|
|
41219
|
+
writeFile as writeFile22
|
|
41070
41220
|
} from "fs/promises";
|
|
41071
|
-
import { dirname as
|
|
41221
|
+
import { dirname as dirname20, join as join29, relative as relative17, resolve as resolve19 } from "path";
|
|
41072
41222
|
var UPDATE_MANIFEST_FILE = "update.json";
|
|
41073
41223
|
var UPDATE_FILES_DIRECTORY = "files";
|
|
41074
41224
|
var sha2563 = (value) => createHash15("sha256").update(value).digest("hex");
|
|
41075
41225
|
var listFiles = async (root, directory = root) => {
|
|
41076
|
-
const entries = await
|
|
41226
|
+
const entries = await readdir9(directory, { withFileTypes: true });
|
|
41077
41227
|
const paths = await Promise.all(entries.map(async (entry) => {
|
|
41078
|
-
const path =
|
|
41228
|
+
const path = join29(directory, entry.name);
|
|
41079
41229
|
if (entry.isDirectory())
|
|
41080
41230
|
return listFiles(root, path);
|
|
41081
41231
|
if (!entry.isFile())
|
|
@@ -41085,10 +41235,10 @@ var listFiles = async (root, directory = root) => {
|
|
|
41085
41235
|
return paths.flat().sort((left, right) => left.localeCompare(right));
|
|
41086
41236
|
};
|
|
41087
41237
|
var inspectFiles = async (root, paths) => Promise.all(paths.map(async (path) => {
|
|
41088
|
-
const source =
|
|
41238
|
+
const source = join29(root, path);
|
|
41089
41239
|
const [metadata, contents] = await Promise.all([
|
|
41090
41240
|
stat5(source),
|
|
41091
|
-
|
|
41241
|
+
readFile25(source)
|
|
41092
41242
|
]);
|
|
41093
41243
|
return { bytes: metadata.size, path, sha256: sha2563(contents) };
|
|
41094
41244
|
}));
|
|
@@ -41123,17 +41273,17 @@ var buildAbsoluteMobileUpdate = async (options) => {
|
|
|
41123
41273
|
value: signature.toString("base64")
|
|
41124
41274
|
}
|
|
41125
41275
|
});
|
|
41126
|
-
await
|
|
41127
|
-
const outputDirectory =
|
|
41128
|
-
const staging = await mkdtemp9(
|
|
41276
|
+
await mkdir19(outputRoot, { recursive: true });
|
|
41277
|
+
const outputDirectory = join29(outputRoot, manifest.releaseId);
|
|
41278
|
+
const staging = await mkdtemp9(join29(outputRoot, ".stage-"));
|
|
41129
41279
|
try {
|
|
41130
|
-
await cp2(bundleDirectory,
|
|
41280
|
+
await cp2(bundleDirectory, join29(staging, UPDATE_FILES_DIRECTORY), {
|
|
41131
41281
|
force: true,
|
|
41132
41282
|
recursive: true
|
|
41133
41283
|
});
|
|
41134
|
-
await
|
|
41284
|
+
await writeFile22(join29(staging, UPDATE_MANIFEST_FILE), `${JSON.stringify(manifest, null, "\t")}
|
|
41135
41285
|
`);
|
|
41136
|
-
await
|
|
41286
|
+
await rename18(staging, outputDirectory);
|
|
41137
41287
|
} catch (error) {
|
|
41138
41288
|
await rm14(staging, { force: true, recursive: true });
|
|
41139
41289
|
if (typeof error === "object" && error !== null && Reflect.get(error, "code") === "EEXIST")
|
|
@@ -41142,7 +41292,7 @@ var buildAbsoluteMobileUpdate = async (options) => {
|
|
|
41142
41292
|
}
|
|
41143
41293
|
return {
|
|
41144
41294
|
manifest,
|
|
41145
|
-
manifestPath:
|
|
41295
|
+
manifestPath: join29(outputDirectory, UPDATE_MANIFEST_FILE),
|
|
41146
41296
|
outputDirectory
|
|
41147
41297
|
};
|
|
41148
41298
|
};
|
|
@@ -41151,10 +41301,10 @@ var copyAbsoluteMobileUpdateFile = async (updateDirectory, path, destination) =>
|
|
|
41151
41301
|
const root = resolve19(updateDirectory, UPDATE_FILES_DIRECTORY);
|
|
41152
41302
|
if (!source.startsWith(`${root}/`))
|
|
41153
41303
|
throw new TypeError("Update file escaped its release.");
|
|
41154
|
-
await
|
|
41304
|
+
await mkdir19(dirname20(destination), { recursive: true });
|
|
41155
41305
|
await cp2(source, destination, { force: true });
|
|
41156
41306
|
};
|
|
41157
|
-
var readAbsoluteMobileUpdate = async (directory) => parseAbsoluteMobileUpdateManifest(JSON.parse(await
|
|
41307
|
+
var readAbsoluteMobileUpdate = async (directory) => parseAbsoluteMobileUpdateManifest(JSON.parse(await readFile25(join29(resolve19(directory), UPDATE_MANIFEST_FILE), "utf8")));
|
|
41158
41308
|
var verifyAbsoluteMobileUpdateSignature = (manifestValue, publicKey) => {
|
|
41159
41309
|
const manifest = parseAbsoluteMobileUpdateManifest(manifestValue);
|
|
41160
41310
|
const valid = verify("sha256", absoluteMobileUpdateSigningPayload(unsignedAbsoluteMobileUpdate(manifest)), { dsaEncoding: "ieee-p1363", key: publicKey }, Buffer.from(manifest.signature.value, "base64"));
|
|
@@ -41443,6 +41593,7 @@ export {
|
|
|
41443
41593
|
applyAbsoluteNativeDeepLinks,
|
|
41444
41594
|
applyAbsoluteNativeDeviceCapabilities,
|
|
41445
41595
|
applyAbsoluteNativeObservability,
|
|
41596
|
+
applyAbsoluteNativeReleaseReadiness,
|
|
41446
41597
|
applyAbsoluteNativeUpdates,
|
|
41447
41598
|
assertAbsoluteAndroidInstalledAppUpgrade,
|
|
41448
41599
|
assertAbsoluteDeviceCapabilityPackages,
|
|
@@ -41632,5 +41783,5 @@ export {
|
|
|
41632
41783
|
writeAbsoluteMobileUpdateRegistry
|
|
41633
41784
|
};
|
|
41634
41785
|
|
|
41635
|
-
//# debugId=
|
|
41786
|
+
//# debugId=6C1E943E101A0E8A64756E2164756E21
|
|
41636
41787
|
//# sourceMappingURL=index.js.map
|