craft-native 0.0.390 → 0.0.393
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/cli.js +1 -1
- package/dist/index.cjs +12 -2
- package/dist/index.js +12 -2
- package/dist/ios/templates/CraftHybrid.swift +16 -3
- package/dist/updater/index.d.ts +2 -0
- package/dist/updater/macos-bundle.d.ts +3 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -3047,7 +3047,7 @@ function pinCraftNativeDependency(packagePath, craftVersion) {
|
|
|
3047
3047
|
`);
|
|
3048
3048
|
}
|
|
3049
3049
|
// package.json
|
|
3050
|
-
var version = "0.0.
|
|
3050
|
+
var version = "0.0.393";
|
|
3051
3051
|
|
|
3052
3052
|
// bin/cli.ts
|
|
3053
3053
|
var spawnedFrom = process6.env[CRAFT_CLI_SPAWN_MARKER];
|
package/dist/index.cjs
CHANGED
|
@@ -375,7 +375,7 @@ function craftBinaryNotFoundMessage(triedPath) {
|
|
|
375
375
|
`);
|
|
376
376
|
}
|
|
377
377
|
// package.json
|
|
378
|
-
var version = "0.0.
|
|
378
|
+
var version = "0.0.393";
|
|
379
379
|
|
|
380
380
|
// src/sdk-version.ts
|
|
381
381
|
var SDK_VERSION = version;
|
|
@@ -10783,6 +10783,15 @@ ${stdout}`;
|
|
|
10783
10783
|
detail: `Expected Team ID ${policy.teamId}, bundle is signed by ${identity.teamId ?? "nobody"}`
|
|
10784
10784
|
};
|
|
10785
10785
|
}
|
|
10786
|
+
if (policy.bundleIdentifier && identity.identifier !== policy.bundleIdentifier) {
|
|
10787
|
+
return {
|
|
10788
|
+
ok: false,
|
|
10789
|
+
identity,
|
|
10790
|
+
gatekeeperSource,
|
|
10791
|
+
reason: "identifier-mismatch",
|
|
10792
|
+
detail: `Expected bundle identifier ${policy.bundleIdentifier}, received ${identity.identifier ?? "none"}`
|
|
10793
|
+
};
|
|
10794
|
+
}
|
|
10786
10795
|
return { ok: true, identity, gatekeeperSource };
|
|
10787
10796
|
}
|
|
10788
10797
|
async function clearQuarantine(appPath) {
|
|
@@ -10998,7 +11007,8 @@ class AutoUpdater extends import_events3.EventEmitter {
|
|
|
10998
11007
|
if (!response.ok) {
|
|
10999
11008
|
throw new Error(`HTTP ${response.status}`);
|
|
11000
11009
|
}
|
|
11001
|
-
const
|
|
11010
|
+
const input = await response.json();
|
|
11011
|
+
const updateInfo = this.config.parseManifest ? this.config.parseManifest(input) : input;
|
|
11002
11012
|
this.cachedEtag = response.headers.get("etag") || null;
|
|
11003
11013
|
this.cachedLastModified = response.headers.get("last-modified") || null;
|
|
11004
11014
|
this.cachedManifest = updateInfo;
|
package/dist/index.js
CHANGED
|
@@ -117,7 +117,7 @@ function craftBinaryNotFoundMessage(triedPath) {
|
|
|
117
117
|
`);
|
|
118
118
|
}
|
|
119
119
|
// package.json
|
|
120
|
-
var version = "0.0.
|
|
120
|
+
var version = "0.0.393";
|
|
121
121
|
|
|
122
122
|
// src/sdk-version.ts
|
|
123
123
|
var SDK_VERSION = version;
|
|
@@ -10539,6 +10539,15 @@ ${stdout}`;
|
|
|
10539
10539
|
detail: `Expected Team ID ${policy.teamId}, bundle is signed by ${identity.teamId ?? "nobody"}`
|
|
10540
10540
|
};
|
|
10541
10541
|
}
|
|
10542
|
+
if (policy.bundleIdentifier && identity.identifier !== policy.bundleIdentifier) {
|
|
10543
|
+
return {
|
|
10544
|
+
ok: false,
|
|
10545
|
+
identity,
|
|
10546
|
+
gatekeeperSource,
|
|
10547
|
+
reason: "identifier-mismatch",
|
|
10548
|
+
detail: `Expected bundle identifier ${policy.bundleIdentifier}, received ${identity.identifier ?? "none"}`
|
|
10549
|
+
};
|
|
10550
|
+
}
|
|
10542
10551
|
return { ok: true, identity, gatekeeperSource };
|
|
10543
10552
|
}
|
|
10544
10553
|
async function clearQuarantine(appPath) {
|
|
@@ -10754,7 +10763,8 @@ class AutoUpdater extends EventEmitter3 {
|
|
|
10754
10763
|
if (!response.ok) {
|
|
10755
10764
|
throw new Error(`HTTP ${response.status}`);
|
|
10756
10765
|
}
|
|
10757
|
-
const
|
|
10766
|
+
const input = await response.json();
|
|
10767
|
+
const updateInfo = this.config.parseManifest ? this.config.parseManifest(input) : input;
|
|
10758
10768
|
this.cachedEtag = response.headers.get("etag") || null;
|
|
10759
10769
|
this.cachedLastModified = response.headers.get("last-modified") || null;
|
|
10760
10770
|
this.cachedManifest = updateInfo;
|
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
import Foundation
|
|
2
2
|
import SwiftUI
|
|
3
3
|
import UIKit
|
|
4
|
+
|
|
5
|
+
/// Includes deceleration, which runs in default mode after tracking ends.
|
|
6
|
+
func craftHybridHasActiveScroll(in view: UIView) -> Bool {
|
|
7
|
+
if let scroll = view as? UIScrollView,
|
|
8
|
+
scroll.isTracking || scroll.isDragging || scroll.isDecelerating { return true }
|
|
9
|
+
return view.subviews.contains { craftHybridHasActiveScroll(in: $0) }
|
|
10
|
+
}
|
|
4
11
|
import WebKit
|
|
5
12
|
import Combine
|
|
6
13
|
|
|
@@ -1261,9 +1268,14 @@ final class CraftHybridController: UITabBarController, UITabBarControllerDelegat
|
|
|
1261
1268
|
item.accessibilityLabel = tab.accessibilityLabel ?? tab.displayTitle
|
|
1262
1269
|
}
|
|
1263
1270
|
if let committed = stacks[currentTab], controllers.contains(where: { $0 === committed }), selectedViewController !== committed {
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1271
|
+
// UIKit owns the Liquid Glass selection pill. Suppressing this
|
|
1272
|
+
// transaction made a completed page swipe snap its indicator.
|
|
1273
|
+
// Keep native selection animation and honour Reduce Motion.
|
|
1274
|
+
let duration = UIAccessibility.isReduceMotionEnabled ? 0 : 0.22
|
|
1275
|
+
UIView.animate(withDuration: duration, delay: 0,
|
|
1276
|
+
options: [.beginFromCurrentState, .allowUserInteraction]) {
|
|
1277
|
+
self.selectedViewController = committed
|
|
1278
|
+
self.tabBar.layoutIfNeeded()
|
|
1267
1279
|
}
|
|
1268
1280
|
}
|
|
1269
1281
|
tabBar.tintColor = chrome.tint ?? config.tintColor.flatMap { UIColor(hex: $0) } ?? view.tintColor
|
|
@@ -1950,6 +1962,7 @@ final class CraftHybridController: UITabBarController, UITabBarControllerDelegat
|
|
|
1950
1962
|
guard self.currentTab == owner, self.view.window != nil else { return }
|
|
1951
1963
|
let quietFor = neighbour ? 0.3 : 1.0
|
|
1952
1964
|
guard self.activeTabSwipeTarget == nil, !self.tabSwipeSettling,
|
|
1965
|
+
!craftHybridHasActiveScroll(in: self.view),
|
|
1953
1966
|
!self.stacks.values.contains(where: { $0.transitionCoordinator != nil }),
|
|
1954
1967
|
CACurrentMediaTime() - self.lastNavigation >= quietFor else {
|
|
1955
1968
|
self.prepareAdjacentNativeTabs()
|
package/dist/updater/index.d.ts
CHANGED
|
@@ -33,6 +33,8 @@ export interface UpdaterConfig {
|
|
|
33
33
|
* The constructor will throw on a plain `http://` URL.
|
|
34
34
|
*/
|
|
35
35
|
updateUrl: string;
|
|
36
|
+
/** Normalize an alternate release feed before version checks and caching. */
|
|
37
|
+
parseManifest?: (input: unknown) => UpdateInfo;
|
|
36
38
|
currentVersion: string;
|
|
37
39
|
appPath: string;
|
|
38
40
|
autoDownload?: boolean;
|
|
@@ -32,6 +32,8 @@ export interface BundleIdentity {
|
|
|
32
32
|
authority: string | null;
|
|
33
33
|
}
|
|
34
34
|
export interface BundleTrustPolicy {
|
|
35
|
+
/** Require the same application, in addition to the signing team. */
|
|
36
|
+
bundleIdentifier?: string;
|
|
35
37
|
/**
|
|
36
38
|
* Team ID the bundle must be signed by.
|
|
37
39
|
*
|
|
@@ -49,7 +51,7 @@ export interface BundleTrustPolicy {
|
|
|
49
51
|
*/
|
|
50
52
|
requireNotarized?: boolean;
|
|
51
53
|
}
|
|
52
|
-
export type BundleTrustFailure = 'unreadable' | 'codesign-invalid' | 'gatekeeper-rejected' | 'team-mismatch';
|
|
54
|
+
export type BundleTrustFailure = 'unreadable' | 'codesign-invalid' | 'gatekeeper-rejected' | 'team-mismatch' | 'identifier-mismatch';
|
|
53
55
|
export interface BundleTrustResult {
|
|
54
56
|
ok: boolean;
|
|
55
57
|
identity: BundleIdentity;
|