appium-xcode 6.2.0 → 6.2.1
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 +6 -0
- package/build/lib/helpers.d.ts +4 -2
- package/build/lib/helpers.d.ts.map +1 -1
- package/build/lib/helpers.js +18 -8
- package/build/lib/helpers.js.map +1 -1
- package/build/lib/index.d.ts +3 -3
- package/build/lib/xcode.d.ts +3 -3
- package/build/lib/xcode.d.ts.map +1 -1
- package/lib/helpers.ts +27 -11
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
## [6.2.1](https://github.com/appium/appium-xcode/compare/v6.2.0...v6.2.1) (2026-04-29)
|
|
2
|
+
|
|
3
|
+
### Bug Fixes
|
|
4
|
+
|
|
5
|
+
* Memoize implementation ([#174](https://github.com/appium/appium-xcode/issues/174)) ([e5e09a5](https://github.com/appium/appium-xcode/commit/e5e09a5a6570f213c47a9318446a5ff7fcea2af9))
|
|
6
|
+
|
|
1
7
|
## [6.2.0](https://github.com/appium/appium-xcode/compare/v6.1.10...v6.2.0) (2026-04-27)
|
|
2
8
|
|
|
3
9
|
### Features
|
package/build/lib/helpers.d.ts
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import type { TeenProcessExecResult } from 'teen_process';
|
|
2
2
|
export declare const XCRUN_TIMEOUT = 15000;
|
|
3
|
+
type AnyFunction = (this: any, ...args: any[]) => any;
|
|
3
4
|
/**
|
|
4
|
-
* Memoizes function calls by
|
|
5
|
+
* Memoizes function calls by traversing a nested argument-keyed map.
|
|
5
6
|
*
|
|
6
7
|
* @param fn The function to memoize
|
|
7
8
|
* @returns A memoized wrapper around the input function
|
|
8
9
|
*/
|
|
9
|
-
export declare function memoize<
|
|
10
|
+
export declare function memoize<F extends AnyFunction>(fn: F): F;
|
|
10
11
|
/**
|
|
11
12
|
* Executes 'xcrun' command line utility
|
|
12
13
|
*
|
|
@@ -30,4 +31,5 @@ export declare function findAppPaths(bundleId: string): Promise<string[]>;
|
|
|
30
31
|
* @returns All plist entries as an object or an empty object if no plist was found
|
|
31
32
|
*/
|
|
32
33
|
export declare function readXcodePlist(developerRoot: string): Promise<Record<string, any>>;
|
|
34
|
+
export {};
|
|
33
35
|
//# sourceMappingURL=helpers.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../lib/helpers.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAC,qBAAqB,EAAC,MAAM,cAAc,CAAC;AAIxD,eAAO,MAAM,aAAa,QAAQ,CAAC;AAEnC
|
|
1
|
+
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../lib/helpers.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAC,qBAAqB,EAAC,MAAM,cAAc,CAAC;AAIxD,eAAO,MAAM,aAAa,QAAQ,CAAC;AAEnC,KAAK,WAAW,GAAG,CAAC,IAAI,EAAE,GAAG,EAAE,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAAC;AAEtD;;;;;GAKG;AACH,wBAAgB,OAAO,CAAC,CAAC,SAAS,WAAW,EAAE,EAAE,EAAE,CAAC,GAAG,CAAC,CAyBvD;AAED;;;;;;;GAOG;AACH,wBAAsB,eAAe,CACnC,IAAI,EAAE,MAAM,EAAE,EACd,OAAO,GAAE,MAAsB,GAC9B,OAAO,CAAC,qBAAqB,CAAC,MAAM,CAAC,CAAC,CAWxC;AAED;;;;;GAKG;AACH,wBAAsB,YAAY,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAwBtE;AAED;;;;;GAKG;AACH,wBAAsB,cAAc,CAAC,aAAa,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,CAGxF"}
|
package/build/lib/helpers.js
CHANGED
|
@@ -13,20 +13,30 @@ const support_1 = require("@appium/support");
|
|
|
13
13
|
const node_path_1 = __importDefault(require("node:path"));
|
|
14
14
|
exports.XCRUN_TIMEOUT = 15000;
|
|
15
15
|
/**
|
|
16
|
-
* Memoizes function calls by
|
|
16
|
+
* Memoizes function calls by traversing a nested argument-keyed map.
|
|
17
17
|
*
|
|
18
18
|
* @param fn The function to memoize
|
|
19
19
|
* @returns A memoized wrapper around the input function
|
|
20
20
|
*/
|
|
21
21
|
function memoize(fn) {
|
|
22
|
-
const
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
22
|
+
const rootCache = new Map();
|
|
23
|
+
const RESULT = Symbol('memoize.result');
|
|
24
|
+
function memoized(...args) {
|
|
25
|
+
let currentCache = rootCache;
|
|
26
|
+
for (const arg of args) {
|
|
27
|
+
if (!currentCache.has(arg)) {
|
|
28
|
+
currentCache.set(arg, new Map());
|
|
29
|
+
}
|
|
30
|
+
currentCache = currentCache.get(arg);
|
|
27
31
|
}
|
|
28
|
-
|
|
29
|
-
|
|
32
|
+
if (currentCache.has(RESULT)) {
|
|
33
|
+
return currentCache.get(RESULT);
|
|
34
|
+
}
|
|
35
|
+
const result = fn.apply(this, args);
|
|
36
|
+
currentCache.set(RESULT, result);
|
|
37
|
+
return result;
|
|
38
|
+
}
|
|
39
|
+
return memoized;
|
|
30
40
|
}
|
|
31
41
|
/**
|
|
32
42
|
* Executes 'xcrun' command line utility
|
package/build/lib/helpers.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../lib/helpers.ts"],"names":[],"mappings":";;;;;;
|
|
1
|
+
{"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../lib/helpers.ts"],"names":[],"mappings":";;;;;;AAeA,0BAyBC;AAUD,0CAcC;AAQD,oCAwBC;AAQD,wCAGC;AA3GD,+CAAkC;AAElC,6CAA0C;AAC1C,0DAA6B;AAEhB,QAAA,aAAa,GAAG,KAAK,CAA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E,CAAC;AACnF,CAAC"}
|
package/build/lib/index.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { getPath, getVersion, getMaxIOSSDK, getMaxTVOSSDK, getClangVersion } from './xcode';
|
|
2
2
|
declare const xcode: {
|
|
3
|
-
getPath: (timeout?: number
|
|
3
|
+
getPath: (timeout?: number) => Promise<string>;
|
|
4
4
|
getVersion: typeof getVersion;
|
|
5
|
-
getMaxIOSSDK: (retries?: number
|
|
6
|
-
getMaxTVOSSDK: (retries?: number
|
|
5
|
+
getMaxIOSSDK: (retries?: number, timeout?: number) => Promise<string | null>;
|
|
6
|
+
getMaxTVOSSDK: (retries?: number, timeout?: number) => Promise<string>;
|
|
7
7
|
getClangVersion: typeof getClangVersion;
|
|
8
8
|
};
|
|
9
9
|
export { getPath, getVersion, getMaxIOSSDK, getMaxTVOSSDK, getClangVersion };
|
package/build/lib/xcode.d.ts
CHANGED
|
@@ -22,7 +22,7 @@ export declare function getPathFromDeveloperDir(): Promise<string>;
|
|
|
22
22
|
* @returns Full path to Xcode Developer subfolder timeout
|
|
23
23
|
* @throws {Error} If there was an error while retrieving the path.
|
|
24
24
|
*/
|
|
25
|
-
export declare const getPath: (timeout?: number
|
|
25
|
+
export declare const getPath: (timeout?: number) => Promise<string>;
|
|
26
26
|
/**
|
|
27
27
|
* Retrieves Xcode version
|
|
28
28
|
*
|
|
@@ -59,7 +59,7 @@ export declare function getMaxIOSSDKWithoutRetry(timeout?: number): Promise<stri
|
|
|
59
59
|
* @returns The SDK version
|
|
60
60
|
* @throws {Error} If the SDK version number cannot be determined
|
|
61
61
|
*/
|
|
62
|
-
export declare const getMaxIOSSDK: (retries?: number
|
|
62
|
+
export declare const getMaxIOSSDK: (retries?: number, timeout?: number) => Promise<string | null>;
|
|
63
63
|
/**
|
|
64
64
|
* Retrieves the maximum version of tvOS SDK supported by the installed Xcode
|
|
65
65
|
*
|
|
@@ -76,5 +76,5 @@ export declare function getMaxTVOSSDKWithoutRetry(timeout?: number): Promise<str
|
|
|
76
76
|
* @returns The SDK version
|
|
77
77
|
* @throws {Error} If the SDK version number cannot be determined
|
|
78
78
|
*/
|
|
79
|
-
export declare const getMaxTVOSSDK: (retries?: number
|
|
79
|
+
export declare const getMaxTVOSSDK: (retries?: number, timeout?: number) => Promise<string>;
|
|
80
80
|
//# sourceMappingURL=xcode.d.ts.map
|
package/build/lib/xcode.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"xcode.d.ts","sourceRoot":"","sources":["../../lib/xcode.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAC,YAAY,EAAC,MAAM,SAAS,CAAC;AAO1C;;;;;;GAMG;AACH,wBAAsB,sBAAsB,CAAC,OAAO,GAAE,MAAsB,GAAG,OAAO,CAAC,MAAM,CAAC,CAuC7F;AAED;;;;;;GAMG;AACH,wBAAsB,uBAAuB,IAAI,OAAO,CAAC,MAAM,CAAC,CAe/D;AAED;;;;;;GAMG;AACH,eAAO,MAAM,OAAO,
|
|
1
|
+
{"version":3,"file":"xcode.d.ts","sourceRoot":"","sources":["../../lib/xcode.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAC,YAAY,EAAC,MAAM,SAAS,CAAC;AAO1C;;;;;;GAMG;AACH,wBAAsB,sBAAsB,CAAC,OAAO,GAAE,MAAsB,GAAG,OAAO,CAAC,MAAM,CAAC,CAuC7F;AAED;;;;;;GAMG;AACH,wBAAsB,uBAAuB,IAAI,OAAO,CAAC,MAAM,CAAC,CAe/D;AAED;;;;;;GAMG;AACH,eAAO,MAAM,OAAO,aACR,MAAM,KAAmB,OAAO,CAAC,MAAM,CAElD,CAAC;AAEF;;;;;;;;GAQG;AACH,wBAAsB,UAAU,CAAC,KAAK,EAAE,KAAK,EAAE,OAAO,CAAC,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;AACpG,wBAAsB,UAAU,CAC9B,KAAK,EAAE,IAAI,EACX,OAAO,CAAC,EAAE,MAAM,EAChB,OAAO,CAAC,EAAE,MAAM,GACf,OAAO,CAAC,YAAY,CAAC,CAAC;AA0BzB;;;;;;;GAOG;AACH,wBAAsB,eAAe,IAAI,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAiB9D;AAED;;;;;;GAMG;AACH,wBAAsB,wBAAwB,CAAC,OAAO,GAAE,MAAsB,GAAG,OAAO,CAAC,MAAM,CAAC,CAS/F;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,YAAY,aACd,MAAM,YACN,MAAM,2BAGf,CAAC;AAEH;;;;;;GAMG;AACH,wBAAsB,yBAAyB,CAAC,OAAO,GAAE,MAAsB,GAAG,OAAO,CAAC,MAAM,CAAC,CAQhG;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,aAAa,aACf,MAAM,YACN,MAAM,KACd,OAAO,CAAC,MAAM,CAEf,CAAC"}
|
package/lib/helpers.ts
CHANGED
|
@@ -5,23 +5,39 @@ import path from 'node:path';
|
|
|
5
5
|
|
|
6
6
|
export const XCRUN_TIMEOUT = 15000;
|
|
7
7
|
|
|
8
|
+
type AnyFunction = (this: any, ...args: any[]) => any;
|
|
9
|
+
|
|
8
10
|
/**
|
|
9
|
-
* Memoizes function calls by
|
|
11
|
+
* Memoizes function calls by traversing a nested argument-keyed map.
|
|
10
12
|
*
|
|
11
13
|
* @param fn The function to memoize
|
|
12
14
|
* @returns A memoized wrapper around the input function
|
|
13
15
|
*/
|
|
14
|
-
export function memoize<
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
16
|
+
export function memoize<F extends AnyFunction>(fn: F): F {
|
|
17
|
+
const rootCache = new Map<any, any>();
|
|
18
|
+
const RESULT = Symbol('memoize.result');
|
|
19
|
+
|
|
20
|
+
function memoized(this: ThisParameterType<F>, ...args: Parameters<F>): ReturnType<F> {
|
|
21
|
+
let currentCache = rootCache;
|
|
22
|
+
|
|
23
|
+
for (const arg of args) {
|
|
24
|
+
if (!currentCache.has(arg)) {
|
|
25
|
+
currentCache.set(arg, new Map());
|
|
26
|
+
}
|
|
27
|
+
currentCache = currentCache.get(arg);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
if (currentCache.has(RESULT)) {
|
|
31
|
+
return currentCache.get(RESULT);
|
|
22
32
|
}
|
|
23
|
-
|
|
24
|
-
|
|
33
|
+
|
|
34
|
+
const result = fn.apply(this, args);
|
|
35
|
+
currentCache.set(RESULT, result);
|
|
36
|
+
|
|
37
|
+
return result;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
return memoized as F;
|
|
25
41
|
}
|
|
26
42
|
|
|
27
43
|
/**
|