@absolutejs/absolute 0.20.0-beta.34 → 0.20.0-beta.36
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/angular/components/core/streamingSlotRegistrar.js +1 -1
- package/dist/angular/components/core/streamingSlotRegistry.js +2 -2
- package/dist/angular/index.js +17 -9
- package/dist/angular/index.js.map +3 -3
- package/dist/angular/server.js +17 -9
- package/dist/angular/server.js.map +3 -3
- package/dist/build.js +30 -10
- package/dist/build.js.map +6 -6
- package/dist/cli/index.js +293 -23
- package/dist/index.js +33 -10
- package/dist/index.js.map +8 -8
- package/dist/mobile/index.js +67 -10
- package/dist/mobile/index.js.map +8 -7
- package/dist/mobile/remoteMacAgentEntry.js +11 -11
- package/dist/src/cli/instanceStatus.d.ts +1 -0
- package/dist/src/core/prepare.d.ts +12 -0
- package/dist/src/dev/clientManager.d.ts +1 -0
- package/dist/src/mobile/index.d.ts +1 -0
- package/dist/src/mobile/iosDeviceAcceptance.d.ts +32 -0
- package/dist/src/mobile/iosRelease.d.ts +3 -1
- package/dist/src/mobile/iosSimulatorController.d.ts +6 -1
- package/dist/src/mobile/iosTestReport.d.ts +2 -1
- package/dist/src/mobile/nativeTestReport.d.ts +6 -0
- package/dist/src/mobile/remoteMacProtocol.d.ts +7 -0
- package/dist/src/plugins/hmr.d.ts +3 -0
- package/dist/types/cli.d.ts +1 -0
- package/package.json +4 -2
package/dist/mobile/index.js
CHANGED
|
@@ -2313,23 +2313,23 @@ var ignoredFingerprintDirectories = new Set([
|
|
|
2313
2313
|
"build",
|
|
2314
2314
|
"xcuserdata"
|
|
2315
2315
|
]);
|
|
2316
|
-
var fingerprintFiles = async (root, current = root) => {
|
|
2316
|
+
var fingerprintFiles = async (root, current = root, options = {}) => {
|
|
2317
2317
|
const entries = await readdir3(current, { withFileTypes: true });
|
|
2318
2318
|
const nested = await Promise.all(entries.sort((left, right) => left.name.localeCompare(right.name)).map(async (entry) => {
|
|
2319
2319
|
const path = join5(current, entry.name);
|
|
2320
2320
|
const projectRelative = relative4(root, path).replaceAll("\\", "/");
|
|
2321
|
-
const ignored = entry.isDirectory() && (ignoredFingerprintDirectories.has(entry.name) || projectRelative === "App/App/public");
|
|
2321
|
+
const ignored = entry.isDirectory() && (ignoredFingerprintDirectories.has(entry.name) || projectRelative === "App/App/public" && options.includePublicBundle !== true);
|
|
2322
2322
|
if (ignored)
|
|
2323
2323
|
return [];
|
|
2324
2324
|
if (entry.isDirectory())
|
|
2325
|
-
return fingerprintFiles(root, path);
|
|
2325
|
+
return fingerprintFiles(root, path, options);
|
|
2326
2326
|
return entry.isFile() ? [path] : [];
|
|
2327
2327
|
}));
|
|
2328
2328
|
return nested.flat();
|
|
2329
2329
|
};
|
|
2330
|
-
var fingerprintAbsoluteIosNativeProject = async (nativeDirectory) => {
|
|
2330
|
+
var fingerprintAbsoluteIosNativeProject = async (nativeDirectory, options = {}) => {
|
|
2331
2331
|
const hasher = createHash5("sha256");
|
|
2332
|
-
const files = await fingerprintFiles(nativeDirectory);
|
|
2332
|
+
const files = await fingerprintFiles(nativeDirectory, nativeDirectory, options);
|
|
2333
2333
|
const contents = await Promise.all(files.map((file) => readFile5(file)));
|
|
2334
2334
|
files.forEach((file, index) => {
|
|
2335
2335
|
hasher.update(relative4(nativeDirectory, file).replaceAll("\\", "/"));
|
|
@@ -3095,7 +3095,7 @@ var writeNativeCache = async (projectRoot, cache) => {
|
|
|
3095
3095
|
});
|
|
3096
3096
|
}
|
|
3097
3097
|
};
|
|
3098
|
-
var fingerprintAbsoluteIosDevProject = async (project) => fingerprintAbsoluteIosNativeProject(project.nativeDirectory);
|
|
3098
|
+
var fingerprintAbsoluteIosDevProject = async (project, options = {}) => fingerprintAbsoluteIosNativeProject(project.nativeDirectory, options);
|
|
3099
3099
|
var simulatorInventory = (xcrun, capture) => {
|
|
3100
3100
|
const result = capture([
|
|
3101
3101
|
xcrun,
|
|
@@ -3503,10 +3503,13 @@ var startAbsoluteIosDevSession = async (options) => {
|
|
|
3503
3503
|
transition("syncing");
|
|
3504
3504
|
await requireSuccess2([project.cap, "sync", "ios"], "Capacitor iOS synchronization", run, { cwd: project.projectRoot, signal: options.signal });
|
|
3505
3505
|
transition("configuring");
|
|
3506
|
-
|
|
3506
|
+
if (options.embeddedBundle !== true)
|
|
3507
|
+
await writeDevProjection(project, options.port, options.https === true, serverHost);
|
|
3507
3508
|
throwIfAborted2(options.signal);
|
|
3508
3509
|
const fingerprintStartedAt = performance.now();
|
|
3509
|
-
const fingerprintPromise = fingerprintAbsoluteIosDevProject(project
|
|
3510
|
+
const fingerprintPromise = fingerprintAbsoluteIosDevProject(project, {
|
|
3511
|
+
includePublicBundle: options.embeddedBundle === true
|
|
3512
|
+
}).then((fingerprint2) => {
|
|
3510
3513
|
timings.fingerprinting = performance.now() - fingerprintStartedAt;
|
|
3511
3514
|
return fingerprint2;
|
|
3512
3515
|
});
|
|
@@ -3567,7 +3570,7 @@ var startAbsoluteIosDevSession = async (options) => {
|
|
|
3567
3570
|
await requireSuccess2(iosLaunchCommand(project, udid, deviceIdentifier !== undefined), "iOS app launch", run, { signal: options.signal });
|
|
3568
3571
|
transition("ready");
|
|
3569
3572
|
timings.total = performance.now() - startedAt;
|
|
3570
|
-
log(`iOS ${targetKind} connected with HMR on port ${options.port} in ${getDurationString(timings.total)} (${nativeCacheHit ? "native cache hit" : "native build installed"}).`);
|
|
3573
|
+
log(options.embeddedBundle === true ? `iOS ${targetKind} connected with the embedded bundle and backend on port ${options.port} in ${getDurationString(timings.total)} (${nativeCacheHit ? "native cache hit" : "native build installed"}).` : `iOS ${targetKind} connected with HMR on port ${options.port} in ${getDurationString(timings.total)} (${nativeCacheHit ? "native cache hit" : "native build installed"}).`);
|
|
3571
3574
|
log(`iOS startup: ${timingSummary(timings)}.`);
|
|
3572
3575
|
let closed = false;
|
|
3573
3576
|
const close = async () => {
|
|
@@ -3851,6 +3854,18 @@ var requireRemoteSuccess = (result, label) => {
|
|
|
3851
3854
|
throw new Error(`${label} failed: ${(result.stderr || result.stdout).trim() || `status ${result.exitCode}`}`);
|
|
3852
3855
|
return result.stdout.trim();
|
|
3853
3856
|
};
|
|
3857
|
+
var captureAbsoluteRemoteMacCommand = async (profile, command, transport) => {
|
|
3858
|
+
if (command.length === 0)
|
|
3859
|
+
throw new TypeError("A Remote Mac command cannot be empty.");
|
|
3860
|
+
if (command.some((argument) => /[\r\n\0]/u.test(argument)))
|
|
3861
|
+
throw new TypeError("Remote Mac command arguments cannot contain controls.");
|
|
3862
|
+
const capture = transport?.capture ?? defaultTransport.capture;
|
|
3863
|
+
return capture([
|
|
3864
|
+
...absoluteRemoteMacSshBase(profile),
|
|
3865
|
+
"/bin/sh -lc",
|
|
3866
|
+
shellQuote(command.map((argument) => shellQuote(argument)).join(" "))
|
|
3867
|
+
]);
|
|
3868
|
+
};
|
|
3854
3869
|
var getAbsoluteRemoteMacProfile = async (name, profilePath) => {
|
|
3855
3870
|
const store = await loadStore(profilePath);
|
|
3856
3871
|
const selected = name ?? process.env.ABSOLUTE_IOS_REMOTE ?? store.defaultProfile;
|
|
@@ -4346,6 +4361,45 @@ var startAbsoluteRemoteIosDevSession = async (options) => {
|
|
|
4346
4361
|
});
|
|
4347
4362
|
return makeSession();
|
|
4348
4363
|
};
|
|
4364
|
+
// src/mobile/iosDeviceAcceptance.ts
|
|
4365
|
+
var absoluteIosDeviceAcceptanceCommands = (options) => {
|
|
4366
|
+
const xcrun = options.xcrun ?? "/usr/bin/xcrun";
|
|
4367
|
+
const prefix = [xcrun, "devicectl", "device"];
|
|
4368
|
+
return {
|
|
4369
|
+
apps: [...prefix, "info", "apps", "--device", options.device],
|
|
4370
|
+
details: [...prefix, "info", "details", "--device", options.device],
|
|
4371
|
+
launch: [
|
|
4372
|
+
...prefix,
|
|
4373
|
+
"process",
|
|
4374
|
+
"launch",
|
|
4375
|
+
"--terminate-existing",
|
|
4376
|
+
"--device",
|
|
4377
|
+
options.device,
|
|
4378
|
+
options.appId
|
|
4379
|
+
]
|
|
4380
|
+
};
|
|
4381
|
+
};
|
|
4382
|
+
var requireSuccess3 = (result, message) => {
|
|
4383
|
+
if (result.exitCode !== 0)
|
|
4384
|
+
throw new Error(message);
|
|
4385
|
+
return result;
|
|
4386
|
+
};
|
|
4387
|
+
var testAbsoluteIosPhysicalDevice = async (options) => {
|
|
4388
|
+
const commands = absoluteIosDeviceAcceptanceCommands(options);
|
|
4389
|
+
requireSuccess3(await options.capture(commands.details), "The selected physical iOS device is unavailable. Pair it in Xcode Device Hub, trust this Mac, unlock it, and enable Developer Mode.");
|
|
4390
|
+
const apps = requireSuccess3(await options.capture(commands.apps), "AbsoluteJS could not inspect installed apps on the physical iOS device.");
|
|
4391
|
+
if (!apps.stdout.includes(options.appId))
|
|
4392
|
+
throw new Error("The AbsoluteJS app is not installed on the selected physical iOS device. Start bun dev with the same --ios-device value first.");
|
|
4393
|
+
const now = options.now ?? performance.now.bind(performance);
|
|
4394
|
+
const startedAt = now();
|
|
4395
|
+
requireSuccess3(await options.capture(commands.launch), "AbsoluteJS could not relaunch the app on the physical iOS device.");
|
|
4396
|
+
await options.waitForHmr();
|
|
4397
|
+
return {
|
|
4398
|
+
hmrConnected: true,
|
|
4399
|
+
installed: true,
|
|
4400
|
+
relaunchMs: Math.round(now() - startedAt)
|
|
4401
|
+
};
|
|
4402
|
+
};
|
|
4349
4403
|
// src/mobile/associationFiles.ts
|
|
4350
4404
|
import {
|
|
4351
4405
|
access as access7,
|
|
@@ -7639,6 +7693,7 @@ export {
|
|
|
7639
7693
|
verifyAbsoluteMobileAssociationFiles,
|
|
7640
7694
|
validateAbsoluteSshDestination,
|
|
7641
7695
|
validateAbsoluteRemoteMacProfileName,
|
|
7696
|
+
testAbsoluteIosPhysicalDevice,
|
|
7642
7697
|
syncAbsoluteRemoteMacProject,
|
|
7643
7698
|
startAbsoluteRemoteIosDevSession,
|
|
7644
7699
|
startAbsoluteIosTcpRelay,
|
|
@@ -7729,6 +7784,7 @@ export {
|
|
|
7729
7784
|
createAbsoluteMobileAssociationDocuments,
|
|
7730
7785
|
createAbsoluteIosNativeWatcher,
|
|
7731
7786
|
carryForwardAbsoluteMobileCompatibilityReleases,
|
|
7787
|
+
captureAbsoluteRemoteMacCommand,
|
|
7732
7788
|
captureAbsoluteMobileRouteGraph,
|
|
7733
7789
|
buildAbsoluteMobileCompatibilityRelease,
|
|
7734
7790
|
buildAbsoluteIosRelease,
|
|
@@ -7741,6 +7797,7 @@ export {
|
|
|
7741
7797
|
absoluteRemoteProjectSyncCommands,
|
|
7742
7798
|
absoluteRemoteMacSshBase,
|
|
7743
7799
|
absoluteMobilePreviewDocument,
|
|
7800
|
+
absoluteIosDeviceAcceptanceCommands,
|
|
7744
7801
|
absoluteDeviceNativeRequirements,
|
|
7745
7802
|
MOBILE_PAGE_REQUEST_HEADERS,
|
|
7746
7803
|
AbsoluteMobilePageProtocolError,
|
|
@@ -7766,5 +7823,5 @@ export {
|
|
|
7766
7823
|
ABSOLUTE_ANDROID_RELEASE_FORMAT
|
|
7767
7824
|
};
|
|
7768
7825
|
|
|
7769
|
-
//# debugId=
|
|
7826
|
+
//# debugId=4CA02552B071DAEC64756E2164756E21
|
|
7770
7827
|
//# sourceMappingURL=index.js.map
|