deeplink-parity 0.2.0 → 0.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/dist/discover/android.js +17 -3
- package/package.json +1 -1
package/dist/discover/android.js
CHANGED
|
@@ -29,12 +29,26 @@ function collectIntentFilters(node, out) {
|
|
|
29
29
|
collectIntentFilters(child, out);
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
|
+
/**
|
|
33
|
+
* A build type or flavor can append to the base id with `applicationIdSuffix`, and the
|
|
34
|
+
* dev variant is usually what a dev domain's assetlinks file names. Suffixes are applied
|
|
35
|
+
* to every base id so that both `com.example` and `com.example.dev` count as ours.
|
|
36
|
+
*/
|
|
32
37
|
function applicationIds(gradleSources) {
|
|
33
|
-
const
|
|
38
|
+
const bases = new Set();
|
|
39
|
+
const suffixes = new Set();
|
|
34
40
|
for (const src of gradleSources) {
|
|
35
|
-
for (const m of src.matchAll(
|
|
36
|
-
|
|
41
|
+
for (const m of src.matchAll(/\bapplicationId\s*(?:=|\s)\s*["']([^"']+)["']/g)) {
|
|
42
|
+
bases.add(m[1]);
|
|
37
43
|
}
|
|
44
|
+
for (const m of src.matchAll(/\bapplicationIdSuffix\s*(?:=|\s)\s*["']([^"']+)["']/g)) {
|
|
45
|
+
suffixes.add(m[1]);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
const ids = new Set(bases);
|
|
49
|
+
for (const base of bases) {
|
|
50
|
+
for (const suffix of suffixes)
|
|
51
|
+
ids.add(`${base}${suffix}`);
|
|
38
52
|
}
|
|
39
53
|
return [...ids];
|
|
40
54
|
}
|
package/package.json
CHANGED