react-native-platform-override 0.4.7 → 0.80.5
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/bin.js +1 -2
- package/lib-commonjs/Api.d.ts +57 -56
- package/lib-commonjs/Api.js +187 -167
- package/lib-commonjs/Api.js.map +1 -1
- package/lib-commonjs/BatchingQueue.d.ts +15 -15
- package/lib-commonjs/BatchingQueue.js +57 -57
- package/lib-commonjs/BatchingQueue.js.map +1 -1
- package/lib-commonjs/Cli.d.ts +7 -7
- package/lib-commonjs/Cli.js +323 -291
- package/lib-commonjs/Cli.js.map +1 -1
- package/lib-commonjs/CrossProcessLock.d.ts +44 -44
- package/lib-commonjs/CrossProcessLock.js +147 -144
- package/lib-commonjs/CrossProcessLock.js.map +1 -1
- package/lib-commonjs/DiffStrategy.d.ts +24 -24
- package/lib-commonjs/DiffStrategy.js +34 -34
- package/lib-commonjs/DiffStrategy.js.map +1 -1
- package/lib-commonjs/FileRepository.d.ts +63 -62
- package/lib-commonjs/FileRepository.js +21 -21
- package/lib-commonjs/FileRepository.js.map +1 -1
- package/lib-commonjs/FileSearch.d.ts +21 -21
- package/lib-commonjs/FileSearch.js +77 -91
- package/lib-commonjs/FileSearch.js.map +1 -1
- package/lib-commonjs/FileSystemRepository.d.ts +21 -20
- package/lib-commonjs/FileSystemRepository.js +62 -59
- package/lib-commonjs/FileSystemRepository.js.map +1 -1
- package/lib-commonjs/GitReactFileRepository.d.ts +57 -58
- package/lib-commonjs/GitReactFileRepository.js +202 -208
- package/lib-commonjs/GitReactFileRepository.js.map +1 -1
- package/lib-commonjs/Hash.d.ts +34 -33
- package/lib-commonjs/Hash.js +81 -81
- package/lib-commonjs/Hash.js.map +1 -1
- package/lib-commonjs/Manifest.d.ts +80 -80
- package/lib-commonjs/Manifest.js +157 -154
- package/lib-commonjs/Manifest.js.map +1 -1
- package/lib-commonjs/Override.d.ts +182 -182
- package/lib-commonjs/Override.js +248 -245
- package/lib-commonjs/Override.js.map +1 -1
- package/lib-commonjs/OverrideFactory.d.ts +33 -33
- package/lib-commonjs/OverrideFactory.js +85 -70
- package/lib-commonjs/OverrideFactory.js.map +1 -1
- package/lib-commonjs/OverridePrompt.d.ts +30 -30
- package/lib-commonjs/OverridePrompt.js +130 -104
- package/lib-commonjs/OverridePrompt.js.map +1 -1
- package/lib-commonjs/PackageUtils.d.ts +15 -15
- package/lib-commonjs/PackageUtils.js +40 -38
- package/lib-commonjs/PackageUtils.js.map +1 -1
- package/lib-commonjs/PathUtils.d.ts +14 -14
- package/lib-commonjs/PathUtils.js +31 -28
- package/lib-commonjs/PathUtils.js.map +1 -1
- package/lib-commonjs/Serialized.d.ts +158 -158
- package/lib-commonjs/Serialized.js +145 -119
- package/lib-commonjs/Serialized.js.map +1 -1
- package/lib-commonjs/UpgradeStrategy.d.ts +39 -39
- package/lib-commonjs/UpgradeStrategy.js +102 -99
- package/lib-commonjs/UpgradeStrategy.js.map +1 -1
- package/lib-commonjs/ValidationStrategy.d.ts +57 -57
- package/lib-commonjs/ValidationStrategy.js +124 -124
- package/lib-commonjs/ValidationStrategy.js.map +1 -1
- package/lib-commonjs/refFromVersion.d.ts +10 -0
- package/lib-commonjs/refFromVersion.js +99 -0
- package/lib-commonjs/refFromVersion.js.map +1 -0
- package/lib-commonjs/scripts/generateManifest.d.ts +7 -7
- package/lib-commonjs/scripts/generateManifest.js +196 -170
- package/lib-commonjs/scripts/generateManifest.js.map +1 -1
- package/lib-commonjs/scripts/hashFile.d.ts +7 -7
- package/lib-commonjs/scripts/hashFile.js +17 -14
- package/lib-commonjs/scripts/hashFile.js.map +1 -1
- package/lib-commonjs/scripts/testLocks.d.ts +1 -1
- package/lib-commonjs/scripts/testLocks.js +29 -26
- package/lib-commonjs/scripts/testLocks.js.map +1 -1
- package/package.json +53 -43
- package/CHANGELOG.json +0 -554
- package/CHANGELOG.md +0 -238
|
@@ -1,58 +1,58 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* Copyright (c) Microsoft Corporation.
|
|
4
|
-
* Licensed under the MIT License.
|
|
5
|
-
*
|
|
6
|
-
* @format
|
|
7
|
-
*/
|
|
8
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
-
/**
|
|
10
|
-
* Executes actions, attempting to group by a given key
|
|
11
|
-
*/
|
|
12
|
-
class BatchingQueue {
|
|
13
|
-
constructor() {
|
|
14
|
-
this.keyedQueues = new Map();
|
|
15
|
-
}
|
|
16
|
-
enqueue(key, action) {
|
|
17
|
-
return new Promise((resolve, reject) => {
|
|
18
|
-
if (!this.keyedQueues.has(key)) {
|
|
19
|
-
this.keyedQueues.set(key, []);
|
|
20
|
-
}
|
|
21
|
-
this.keyedQueues.get(key).push(async () => {
|
|
22
|
-
try {
|
|
23
|
-
resolve(await action());
|
|
24
|
-
}
|
|
25
|
-
catch (ex) {
|
|
26
|
-
reject(ex);
|
|
27
|
-
}
|
|
28
|
-
});
|
|
29
|
-
if (!this.currentKey) {
|
|
30
|
-
this.currentKey = key;
|
|
31
|
-
void this.pumpQueue();
|
|
32
|
-
}
|
|
33
|
-
});
|
|
34
|
-
}
|
|
35
|
-
async pumpQueue() {
|
|
36
|
-
const currentQueue = this.keyedQueues.get(this.currentKey);
|
|
37
|
-
while (currentQueue.length > 0) {
|
|
38
|
-
await currentQueue.shift()();
|
|
39
|
-
}
|
|
40
|
-
this.keyedQueues.delete(this.currentKey);
|
|
41
|
-
this.currentKey = undefined;
|
|
42
|
-
// If we have more batches, pick the next greedily based on size
|
|
43
|
-
if (this.keyedQueues.size > 0) {
|
|
44
|
-
let nextKey;
|
|
45
|
-
let maxLength = 0;
|
|
46
|
-
this.keyedQueues.forEach((queue, key) => {
|
|
47
|
-
if (queue.length > maxLength) {
|
|
48
|
-
maxLength = queue.length;
|
|
49
|
-
nextKey = key;
|
|
50
|
-
}
|
|
51
|
-
});
|
|
52
|
-
this.currentKey = nextKey;
|
|
53
|
-
return this.pumpQueue();
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
exports.default = BatchingQueue;
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Copyright (c) Microsoft Corporation.
|
|
4
|
+
* Licensed under the MIT License.
|
|
5
|
+
*
|
|
6
|
+
* @format
|
|
7
|
+
*/
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
/**
|
|
10
|
+
* Executes actions, attempting to group by a given key
|
|
11
|
+
*/
|
|
12
|
+
class BatchingQueue {
|
|
13
|
+
constructor() {
|
|
14
|
+
this.keyedQueues = new Map();
|
|
15
|
+
}
|
|
16
|
+
enqueue(key, action) {
|
|
17
|
+
return new Promise((resolve, reject) => {
|
|
18
|
+
if (!this.keyedQueues.has(key)) {
|
|
19
|
+
this.keyedQueues.set(key, []);
|
|
20
|
+
}
|
|
21
|
+
this.keyedQueues.get(key).push(async () => {
|
|
22
|
+
try {
|
|
23
|
+
resolve(await action());
|
|
24
|
+
}
|
|
25
|
+
catch (ex) {
|
|
26
|
+
reject(ex);
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
if (!this.currentKey) {
|
|
30
|
+
this.currentKey = key;
|
|
31
|
+
void this.pumpQueue();
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
async pumpQueue() {
|
|
36
|
+
const currentQueue = this.keyedQueues.get(this.currentKey);
|
|
37
|
+
while (currentQueue.length > 0) {
|
|
38
|
+
await currentQueue.shift()();
|
|
39
|
+
}
|
|
40
|
+
this.keyedQueues.delete(this.currentKey);
|
|
41
|
+
this.currentKey = undefined;
|
|
42
|
+
// If we have more batches, pick the next greedily based on size
|
|
43
|
+
if (this.keyedQueues.size > 0) {
|
|
44
|
+
let nextKey;
|
|
45
|
+
let maxLength = 0;
|
|
46
|
+
this.keyedQueues.forEach((queue, key) => {
|
|
47
|
+
if (queue.length > maxLength) {
|
|
48
|
+
maxLength = queue.length;
|
|
49
|
+
nextKey = key;
|
|
50
|
+
}
|
|
51
|
+
});
|
|
52
|
+
this.currentKey = nextKey;
|
|
53
|
+
return this.pumpQueue();
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
exports.default = BatchingQueue;
|
|
58
58
|
//# sourceMappingURL=BatchingQueue.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BatchingQueue.js","sourceRoot":"","sources":["../src/BatchingQueue.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;AAEH;;GAEG;AACH,MAAqB,aAAa;IAAlC;QACmB,gBAAW,
|
|
1
|
+
{"version":3,"file":"BatchingQueue.js","sourceRoot":"","sources":["../src/BatchingQueue.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;AAEH;;GAEG;AACH,MAAqB,aAAa;IAAlC;QACmB,gBAAW,GAC1B,IAAI,GAAG,EAAE,CAAC;IAiDd,CAAC;IA9CC,OAAO,CAAI,GAAS,EAAE,MAAwB;QAC5C,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;YACrC,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE;gBAC9B,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC;aAC/B;YAED,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,GAAG,CAAE,CAAC,IAAI,CAAC,KAAK,IAAI,EAAE;gBACzC,IAAI;oBACF,OAAO,CAAC,MAAM,MAAM,EAAE,CAAC,CAAC;iBACzB;gBAAC,OAAO,EAAE,EAAE;oBACX,MAAM,CAAC,EAAE,CAAC,CAAC;iBACZ;YACH,CAAC,CAAC,CAAC;YAEH,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE;gBACpB,IAAI,CAAC,UAAU,GAAG,GAAG,CAAC;gBACtB,KAAK,IAAI,CAAC,SAAS,EAAE,CAAC;aACvB;QACH,CAAC,CAAC,CAAC;IACL,CAAC;IAEO,KAAK,CAAC,SAAS;QACrB,MAAM,YAAY,GAAG,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,IAAI,CAAC,UAAW,CAAE,CAAC;QAE7D,OAAO,YAAY,CAAC,MAAM,GAAG,CAAC,EAAE;YAC9B,MAAM,YAAY,CAAC,KAAK,EAAG,EAAE,CAAC;SAC/B;QAED,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,IAAI,CAAC,UAAW,CAAC,CAAC;QAC1C,IAAI,CAAC,UAAU,GAAG,SAAS,CAAC;QAE5B,gEAAgE;QAChE,IAAI,IAAI,CAAC,WAAW,CAAC,IAAI,GAAG,CAAC,EAAE;YAC7B,IAAI,OAAyB,CAAC;YAC9B,IAAI,SAAS,GAAG,CAAC,CAAC;YAClB,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE;gBACtC,IAAI,KAAK,CAAC,MAAM,GAAG,SAAS,EAAE;oBAC5B,SAAS,GAAG,KAAK,CAAC,MAAM,CAAC;oBACzB,OAAO,GAAG,GAAG,CAAC;iBACf;YACH,CAAC,CAAC,CAAC;YAEH,IAAI,CAAC,UAAU,GAAG,OAAO,CAAC;YAC1B,OAAO,IAAI,CAAC,SAAS,EAAE,CAAC;SACzB;IACH,CAAC;CACF;AAnDD,gCAmDC","sourcesContent":["/**\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * @format\n */\n\n/**\n * Executes actions, attempting to group by a given key\n */\nexport default class BatchingQueue<TKey> {\n private readonly keyedQueues: Map<TKey, Array<() => Promise<void>>> =\n new Map();\n private currentKey?: TKey;\n\n enqueue<T>(key: TKey, action: () => Promise<T>): Promise<T> {\n return new Promise((resolve, reject) => {\n if (!this.keyedQueues.has(key)) {\n this.keyedQueues.set(key, []);\n }\n\n this.keyedQueues.get(key)!.push(async () => {\n try {\n resolve(await action());\n } catch (ex) {\n reject(ex);\n }\n });\n\n if (!this.currentKey) {\n this.currentKey = key;\n void this.pumpQueue();\n }\n });\n }\n\n private async pumpQueue(): Promise<void> {\n const currentQueue = this.keyedQueues.get(this.currentKey!)!;\n\n while (currentQueue.length > 0) {\n await currentQueue.shift()!();\n }\n\n this.keyedQueues.delete(this.currentKey!);\n this.currentKey = undefined;\n\n // If we have more batches, pick the next greedily based on size\n if (this.keyedQueues.size > 0) {\n let nextKey: TKey | undefined;\n let maxLength = 0;\n this.keyedQueues.forEach((queue, key) => {\n if (queue.length > maxLength) {\n maxLength = queue.length;\n nextKey = key;\n }\n });\n\n this.currentKey = nextKey;\n return this.pumpQueue();\n }\n }\n}\n"]}
|
package/lib-commonjs/Cli.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) Microsoft Corporation.
|
|
3
|
-
* Licensed under the MIT License.
|
|
4
|
-
*
|
|
5
|
-
* @format
|
|
6
|
-
*/
|
|
7
|
-
export {};
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) Microsoft Corporation.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*
|
|
5
|
+
* @format
|
|
6
|
+
*/
|
|
7
|
+
export {};
|