@expo/fingerprint 0.20.13 → 0.21.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.
Files changed (88) hide show
  1. package/build/Config.js +69 -44
  2. package/build/Config.js.map +1 -1
  3. package/build/Dedup.js +82 -36
  4. package/build/Dedup.js.map +1 -1
  5. package/build/ExpoConfig.d.ts +11 -2
  6. package/build/ExpoConfig.js +118 -34
  7. package/build/ExpoConfig.js.map +1 -1
  8. package/build/ExpoConfigLoader.d.ts +41 -0
  9. package/build/ExpoConfigLoader.js +185 -145
  10. package/build/ExpoConfigLoader.js.map +1 -1
  11. package/build/ExpoResolver.js +77 -43
  12. package/build/ExpoResolver.js.map +1 -1
  13. package/build/Fingerprint.js +67 -76
  14. package/build/Fingerprint.js.map +1 -1
  15. package/build/Fingerprint.types.d.ts +98 -5
  16. package/build/Fingerprint.types.js +6 -3
  17. package/build/Fingerprint.types.js.map +1 -1
  18. package/build/Options.d.ts +1 -2
  19. package/build/Options.js +101 -51
  20. package/build/Options.js.map +1 -1
  21. package/build/Presets.d.ts +26 -0
  22. package/build/Presets.js +50 -0
  23. package/build/Presets.js.map +1 -0
  24. package/build/ProjectWorkflow.js +129 -67
  25. package/build/ProjectWorkflow.js.map +1 -1
  26. package/build/Sort.js +30 -16
  27. package/build/Sort.js.map +1 -1
  28. package/build/hash/FileHookTransform.js +26 -20
  29. package/build/hash/FileHookTransform.js.map +1 -1
  30. package/build/hash/Hash.d.ts +8 -1
  31. package/build/hash/Hash.js +208 -116
  32. package/build/hash/Hash.js.map +1 -1
  33. package/build/hash/ReactImportsPatcher.js +39 -27
  34. package/build/hash/ReactImportsPatcher.js.map +1 -1
  35. package/build/index.js +40 -22
  36. package/build/index.js.map +1 -1
  37. package/build/sourcer/AutolinkingConfig.d.ts +19 -0
  38. package/build/sourcer/AutolinkingConfig.js +159 -0
  39. package/build/sourcer/AutolinkingConfig.js.map +1 -0
  40. package/build/sourcer/Bare.js +192 -94
  41. package/build/sourcer/Bare.js.map +1 -1
  42. package/build/sourcer/Expo.d.ts +3 -2
  43. package/build/sourcer/Expo.js +264 -121
  44. package/build/sourcer/Expo.js.map +1 -1
  45. package/build/sourcer/Packages.d.ts +4 -3
  46. package/build/sourcer/Packages.js +83 -23
  47. package/build/sourcer/Packages.js.map +1 -1
  48. package/build/sourcer/PatchPackage.js +32 -14
  49. package/build/sourcer/PatchPackage.js.map +1 -1
  50. package/build/sourcer/SourceSkips.d.ts +27 -2
  51. package/build/sourcer/SourceSkips.js +65 -48
  52. package/build/sourcer/SourceSkips.js.map +1 -1
  53. package/build/sourcer/Sourcer.js +57 -38
  54. package/build/sourcer/Sourcer.js.map +1 -1
  55. package/build/sourcer/Utils.d.ts +14 -0
  56. package/build/sourcer/Utils.js +113 -41
  57. package/build/sourcer/Utils.js.map +1 -1
  58. package/build/types/module.d.ts +7 -0
  59. package/build/utils/Concurrency.js +29 -22
  60. package/build/utils/Concurrency.js.map +1 -1
  61. package/build/utils/Path.d.ts +5 -0
  62. package/build/utils/Path.js +138 -75
  63. package/build/utils/Path.js.map +1 -1
  64. package/build/utils/Predicates.js +11 -3
  65. package/build/utils/Predicates.js.map +1 -1
  66. package/build/utils/Profile.js +29 -20
  67. package/build/utils/Profile.js.map +1 -1
  68. package/build/utils/SpawnIPC.js +41 -16
  69. package/build/utils/SpawnIPC.js.map +1 -1
  70. package/cli/build/cli.js +94 -60
  71. package/cli/build/cli.js.map +1 -0
  72. package/cli/build/commands/diffFingerprints.js +76 -53
  73. package/cli/build/commands/diffFingerprints.js.map +1 -0
  74. package/cli/build/commands/generateFingerprint.js +129 -72
  75. package/cli/build/commands/generateFingerprint.js.map +1 -0
  76. package/cli/build/runLegacyCLIAsync.js +31 -22
  77. package/cli/build/runLegacyCLIAsync.js.map +1 -0
  78. package/cli/build/utils/args.js +110 -67
  79. package/cli/build/utils/args.js.map +1 -0
  80. package/cli/build/utils/errors.js +49 -20
  81. package/cli/build/utils/errors.js.map +1 -0
  82. package/cli/build/utils/log.js +62 -20
  83. package/cli/build/utils/log.js.map +1 -0
  84. package/cli/build/utils/readFingerprintFileAsync.js +25 -9
  85. package/cli/build/utils/readFingerprintFileAsync.js.map +1 -0
  86. package/cli/build/utils/withConsoleDisabledAsync.js +16 -8
  87. package/cli/build/utils/withConsoleDisabledAsync.js.map +1 -0
  88. package/package.json +37 -31
@@ -1 +1 @@
1
- {"version":3,"file":"ExpoResolver.js","sourceRoot":"","sources":["../src/ExpoResolver.ts"],"names":[],"mappings":";;;;;AASA,gDAOC;AAKD,8EAkBC;AAMD,sEAMC;AAKD,sEAOC;AAKD,kFAEC;AAMD,gDAMC;AAlFD,gDAAwB;AACxB,gEAAuC;AACvC,oDAA4B;AAE5B,IAAI,gCAAgC,GAA4B,IAAI,CAAC;AAErE;;GAEG;AACH,SAAgB,kBAAkB,CAAC,WAAmB;IACpD,MAAM,mBAAmB,GAAG,sBAAW,CAAC,MAAM,CAAC,WAAW,EAAE,mBAAmB,CAAC,CAAC;IACjF,IAAI,mBAAmB,EAAE,CAAC;QACxB,MAAM,eAAe,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAAC;QACrD,OAAO,eAAe,CAAC,OAAO,CAAC;IACjC,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AAED;;GAEG;AACH,SAAgB,iCAAiC,CAAC,WAAmB;IACnE,IAAI,gCAAgC,EAAE,CAAC;QACrC,MAAM,CAAC,iBAAiB,EAAE,iBAAiB,CAAC,GAAG,gCAAgC,CAAC;QAChF,IAAI,iBAAiB,KAAK,WAAW,EAAE,CAAC;YACtC,OAAO,iBAAiB,CAAC;QAC3B,CAAC;IACH,CAAC;IACD,MAAM,eAAe,GAAG,sBAAW,CAAC,MAAM,CAAC,WAAW,EAAE,mBAAmB,CAAC,CAAC;IAC7E,MAAM,0BAA0B,GAAG,sBAAW,CAAC,MAAM,CACnD,eAAe,IAAI,WAAW,EAC9B,uCAAuC,CACxC,CAAC;IACF,IAAI,0BAA0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AAI,CAAC;AACd,CAAC"}
1
+ {"version":3,"sources":["ExpoResolver.ts"],"sourcesContent":[null],"names":["resolveExpoAutolinkingCliPath","resolveExpoAutolinkingPackageRoot","resolveExpoAutolinkingVersion","resolveExpoConfigPluginsPackagePath","resolveExpoVersion","satisfyExpoVersion","cachedExpoAutolinkingPackageRoot","projectRoot","expoPackageJsonPath","resolveFrom","silent","expoPackageJson","require","version","cachedProjectRoot","cachedPackageRoot","expoPackageRoot","autolinkingPackageJsonPath","autolinkingPackageRoot","path","dirname","Error","join","autolinkingPackageJson","range","expoVersion","semver","satisfies"],"mappings":";;;;;;;;;;;;;;;;;;;QA6CgBA;eAAAA;;QAxBAC;eAAAA;;QAmCAC;eAAAA;;QAYAC;eAAAA;;QA3DAC;eAAAA;;QAmEAC;eAAAA;;;;gEA5EC;;;;;;;gEACO;;;;;;;gEACL;;;;;;;;;;;AAEnB,IAAIC,mCAA4D;AAKzD,SAASF,mBAAmBG,WAAmB;IACpD,MAAMC,sBAAsBC,sBAAW,CAACC,MAAM,CAACH,aAAa;IAC5D,IAAIC,qBAAqB;QACvB,MAAMG,kBAAkBC,QAAQJ;QAChC,OAAOG,gBAAgBE,OAAO;IAChC;IACA,OAAO;AACT;AAKO,SAASZ,kCAAkCM,WAAmB;IACnE,IAAID,kCAAkC;QACpC,MAAM,CAACQ,mBAAmBC,kBAAkB,GAAGT;QAC/C,IAAIQ,sBAAsBP,aAAa;YACrC,OAAOQ;QACT;IACF;IACA,MAAMC,kBAAkBP,sBAAW,CAACC,MAAM,CAACH,aAAa;IACxD,MAAMU,6BAA6BR,sBAAW,CAACC,MAAM,CACnDM,mBAAmBT,aACnB;IAEF,IAAIU,4BAA4B;QAC9B,MAAMC,yBAAyBC,eAAI,CAACC,OAAO,CAACH;QAC5CX,mCAAmC;YAACC;YAAaW;SAAuB;QACxE,OAAOA;IACT;IACA,OAAO;AACT;AAMO,SAASlB,8BAA8BO,WAAmB;IAC/D,MAAMW,yBAAyBjB,kCAAkCM;IACjE,IAAIW,0BAA0B,MAAM;QAClC,MAAM,IAAIG,MAAM;IAClB;IACA,OAAOF,eAAI,CAACG,IAAI,CAACJ,wBAAwB,OAAO;AAClD;AAKO,SAAShB,8BAA8BK,WAAmB;IAC/D,MAAMW,yBAAyBjB,kCAAkCM;IACjE,IAAIW,wBAAwB;QAC1B,MAAMK,yBAAyBX,QAAQO,eAAI,CAACG,IAAI,CAACJ,wBAAwB;QACzE,OAAOK,uBAAuBV,OAAO;IACvC;IACA,OAAO;AACT;AAKO,SAASV,oCAAoCI,WAAmB;IACrE,OAAOE,sBAAW,CAACC,MAAM,CAACH,aAAa,0BAA0B;AACnE;AAMO,SAASF,mBAAmBE,WAAmB,EAAEiB,KAAa;IACnE,MAAMC,cAAcrB,mBAAmBG;IACvC,IAAIkB,aAAa;QACf,OAAOC,iBAAM,CAACC,SAAS,CAACF,aAAaD;IACvC;IACA,OAAO;AACT"}
@@ -1,57 +1,49 @@
1
1
  "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.createFingerprintAsync = createFingerprintAsync;
4
- exports.createProjectHashAsync = createProjectHashAsync;
5
- exports.diffFingerprintChangesAsync = diffFingerprintChangesAsync;
6
- exports.diffFingerprints = diffFingerprints;
7
- const Dedup_1 = require("./Dedup");
8
- const Options_1 = require("./Options");
9
- const Sort_1 = require("./Sort");
10
- const Hash_1 = require("./hash/Hash");
11
- const Sourcer_1 = require("./sourcer/Sourcer");
12
- /**
13
- * Create a fingerprint for a project.
14
- * @example
15
- * ```js
16
- * const fingerprint = await createFingerprintAsync('/app');
17
- * console.log(fingerprint);
18
- * ```
19
- */
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ 0 && (module.exports = {
6
+ createFingerprintAsync: null,
7
+ createProjectHashAsync: null,
8
+ diffFingerprintChangesAsync: null,
9
+ diffFingerprints: null
10
+ });
11
+ function _export(target, all) {
12
+ for(var name in all)Object.defineProperty(target, name, {
13
+ enumerable: true,
14
+ get: Object.getOwnPropertyDescriptor(all, name).get
15
+ });
16
+ }
17
+ _export(exports, {
18
+ get createFingerprintAsync () {
19
+ return createFingerprintAsync;
20
+ },
21
+ get createProjectHashAsync () {
22
+ return createProjectHashAsync;
23
+ },
24
+ get diffFingerprintChangesAsync () {
25
+ return diffFingerprintChangesAsync;
26
+ },
27
+ get diffFingerprints () {
28
+ return diffFingerprints;
29
+ }
30
+ });
31
+ const _Dedup = require("./Dedup");
32
+ const _Options = require("./Options");
33
+ const _Sort = require("./Sort");
34
+ const _Hash = require("./hash/Hash");
35
+ const _Sourcer = require("./sourcer/Sourcer");
20
36
  async function createFingerprintAsync(projectRoot, options) {
21
- const opts = await (0, Options_1.normalizeOptionsAsync)(projectRoot, options);
22
- const sources = await (0, Sourcer_1.getHashSourcesAsync)(projectRoot, opts);
23
- const normalizedSources = (0, Sort_1.sortSources)((0, Dedup_1.dedupSources)(sources, projectRoot));
24
- const fingerprint = await (0, Hash_1.createFingerprintFromSourcesAsync)(normalizedSources, projectRoot, opts);
37
+ const opts = await (0, _Options.normalizeOptionsAsync)(projectRoot, options);
38
+ const sources = await (0, _Sourcer.getHashSourcesAsync)(projectRoot, opts);
39
+ const normalizedSources = (0, _Sort.sortSources)((0, _Dedup.dedupSources)(sources, projectRoot));
40
+ const fingerprint = await (0, _Hash.createFingerprintFromSourcesAsync)(normalizedSources, projectRoot, opts);
25
41
  return fingerprint;
26
42
  }
27
- /**
28
- * Create a native hash value for a project.
29
- *
30
- * @example
31
- * ```ts
32
- * const hash = await createProjectHashAsync('/app');
33
- * console.log(hash);
34
- * ```
35
- */
36
43
  async function createProjectHashAsync(projectRoot, options) {
37
44
  const fingerprint = await createFingerprintAsync(projectRoot, options);
38
45
  return fingerprint.hash;
39
46
  }
40
- /**
41
- * Diff the fingerprint with the fingerprint of the provided project.
42
- *
43
- * @example
44
- * ```ts
45
- * // Create a fingerprint for the project
46
- * const fingerprint = await createFingerprintAsync('/app');
47
- *
48
- * // Make some changes to the project
49
- *
50
- * // Calculate the diff
51
- * const diff = await diffFingerprintChangesAsync(fingerprint, '/app');
52
- * console.log(diff);
53
- * ```
54
- */
55
47
  async function diffFingerprintChangesAsync(fingerprint, projectRoot, options) {
56
48
  const newFingerprint = await createFingerprintAsync(projectRoot, options);
57
49
  if (fingerprint.hash === newFingerprint.hash) {
@@ -59,54 +51,53 @@ async function diffFingerprintChangesAsync(fingerprint, projectRoot, options) {
59
51
  }
60
52
  return diffFingerprints(fingerprint, newFingerprint);
61
53
  }
62
- /**
63
- * Diff two fingerprints. The implementation assumes that the sources are sorted.
64
- *
65
- * @example
66
- * ```ts
67
- * // Create a fingerprint for the project
68
- * const fingerprint = await createFingerprintAsync('/app');
69
- *
70
- * // Make some changes to the project
71
- *
72
- * // Create a fingerprint again
73
- * const fingerprint2 = await createFingerprintAsync('/app');
74
- * const diff = await diffFingerprints(fingerprint, fingerprint2);
75
- * console.log(diff);
76
- * ```
77
- */
78
54
  function diffFingerprints(fingerprint1, fingerprint2) {
79
55
  let index1 = 0;
80
56
  let index2 = 0;
81
57
  let source1 = fingerprint1.sources[index1];
82
58
  let source2 = fingerprint2.sources[index2];
83
59
  const diff = [];
84
- while (source1 != null && source2 != null) {
85
- const compareResult = (0, Sort_1.compareSource)(source1, source2);
60
+ while(source1 != null && source2 != null){
61
+ const compareResult = (0, _Sort.compareSource)(source1, source2);
86
62
  if (compareResult === 0) {
87
63
  if (source1.hash !== source2.hash) {
88
- diff.push({ op: 'changed', beforeSource: source1, afterSource: source2 });
64
+ diff.push({
65
+ op: 'changed',
66
+ beforeSource: source1,
67
+ afterSource: source2
68
+ });
89
69
  }
90
70
  source1 = fingerprint1.sources[++index1];
91
71
  source2 = fingerprint2.sources[++index2];
92
- }
93
- else if (compareResult < 0) {
94
- diff.push({ op: 'removed', removedSource: source1 });
72
+ } else if (compareResult < 0) {
73
+ diff.push({
74
+ op: 'removed',
75
+ removedSource: source1
76
+ });
95
77
  source1 = fingerprint1.sources[++index1];
96
- }
97
- else {
98
- diff.push({ op: 'added', addedSource: source2 });
78
+ } else {
79
+ diff.push({
80
+ op: 'added',
81
+ addedSource: source2
82
+ });
99
83
  source2 = fingerprint2.sources[++index2];
100
84
  }
101
85
  }
102
- while (source1 != null) {
103
- diff.push({ op: 'removed', removedSource: source1 });
86
+ while(source1 != null){
87
+ diff.push({
88
+ op: 'removed',
89
+ removedSource: source1
90
+ });
104
91
  source1 = fingerprint1.sources[++index1];
105
92
  }
106
- while (source2 != null) {
107
- diff.push({ op: 'added', addedSource: source2 });
93
+ while(source2 != null){
94
+ diff.push({
95
+ op: 'added',
96
+ addedSource: source2
97
+ });
108
98
  source2 = fingerprint2.sources[++index2];
109
99
  }
110
100
  return diff;
111
101
  }
112
- //# sourceMappingURL=Fingerprint.js.map
102
+
103
+ //# sourceMappingURL=Fingerprint.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Fingerprint.js","sourceRoot":"","sources":["../src/Fingerprint.ts"],"names":[],"mappings":";;AAeA,wDASC;AAWD,wDAMC;AAiBD,kEAUC;AAkBD,4CAqCC;AA3HD,mCAAuC;AAEvC,uCAAkD;AAClD,iCAAoD;AACpD,sCAAgE;AAChE,+CAAwD;AAExD;;;;;;;GAOG;AACI,KAAK,UAAU,sBAAsB,CAC1C,WAAmB,EACnB,OAAiB;IAEjB,MAAM,IAAI,GAAG,MAAM,IAAA,+BAAqB,EAAC,WAAW,EAAE,OAAO,CAAC,CAAC;IAC/D,MAAM,OAAO,GAAG,MAAM,IAAA,6BAAmB,EAAC,WAAW,EAAE,IAAI,CAAC,CAAC;IAC7D,MAAM,iBAAiB,GAAG,IAAA,kBAAW,EAAC,IAAA,oBAAY,EAAC,OAAO,EAAE,WAAW,CAAC,CAAC,CAAC;IAC1E,MAAM,WAAW,GAAG,MAAM,IAAA,wCAAiC,EAAC,iBAAiB,EAAE,WAAW,EAAE,IAAI,CAAC,CAAC;IAClG,OAAO,WAAW,CAAC;AACrB,CAAC;AAED;;;;;;;;GAQG;AACI,KAAK,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Y,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC,CAAC;YACzC,OAAO,GAAG,YAAY,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC,CAAC;QAC3C,CAAC;aAAM,IAAI,aAAa,GAAG,CAAC,EAAE,CAAC;YAC7B,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE,EAAE,SAAS,EAAE,aAAa,EAAE,OAAO,EAAE,CAAC,CAAC;YACrD,OAAO,GAAG,YAAY,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC,CAAC;QAC3C,CAAC;aAAM,CAAC;YACN,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE,EAAE,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,CAAC,CAAC;YACjD,OAAO,GAAG,YAAY,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC,CAAC;QAC3C,CAAC;IACH,CAAC;IAED,OAAO,OAAO,IAAI,IAAI,EAAE,CAAC;QACvB,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE,EAAE,SAAS,EAAE,aAAa,EAAE,OAAO,EAAE,CAAC,CAAC;QACrD,OAAO,GAAG,YAAY,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC,CAAC;IAC3C,CAAC;IACD,OAAO,OAAO,IAAI,IAAI,EAAE,CAAC;QACvB,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE,EAAE,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,CAAC,CAAC;QACjD,OAAO,GAAG,YAAY,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC,CAAC;IAC3C,CAAC;IAED,OAAO,IAAI,CAAC;AACd,CAAC"}
1
+ {"version":3,"sources":["Fingerprint.ts"],"sourcesContent":[null],"names":["createFingerprintAsync","createProjectHashAsync","diffFingerprintChangesAsync","diffFingerprints","projectRoot","options","opts","normalizeOptionsAsync","sources","getHashSourcesAsync","normalizedSources","sortSources","dedupSources","fingerprint","createFingerprintFromSourcesAsync","hash","newFingerprint","fingerprint1","fingerprint2","index1","index2","source1","source2","diff","compareResult","compareSource","push","op","beforeSource","afterSource","removedSource","addedSource"],"mappings":";;;;;;;;;;;;;;;;;QAesBA;eAAAA;;QAoBAC;eAAAA;;QAuBAC;eAAAA;;QA4BNC;eAAAA;;;uBAtFa;yBAES;sBACK;sBACO;yBACd;AAU7B,eAAeH,uBACpBI,WAAmB,EACnBC,OAAiB;IAEjB,MAAMC,OAAO,MAAMC,IAAAA,8BAAqB,EAACH,aAAaC;IACtD,MAAMG,UAAU,MAAMC,IAAAA,4BAAmB,EAACL,aAAaE;IACvD,MAAMI,oBAAoBC,IAAAA,iBAAW,EAACC,IAAAA,mBAAY,EAACJ,SAASJ;IAC5D,MAAMS,cAAc,MAAMC,IAAAA,uCAAiC,EAACJ,mBAAmBN,aAAaE;IAC5F,OAAOO;AACT;AAWO,eAAeZ,uBACpBG,WAAmB,EACnBC,OAAiB;IAEjB,MAAMQ,cAAc,MAAMb,uBAAuBI,aAAaC;IAC9D,OAAOQ,YAAYE,IAAI;AACzB;AAiBO,eAAeb,4BACpBW,WAAwB,EACxBT,WAAmB,EACnBC,OAAiB;IAEjB,MAAMW,iBAAiB,MAAMhB,uBAAuBI,aAAaC;IACjE,IAAIQ,YAAYE,IAAI,KAAKC,eAAeD,IAAI,EAAE;QAC5C,OAAO,EAAE;IACX;IACA,OAAOZ,iBAAiBU,aAAaG;AACvC;AAkBO,SAASb,iBACdc,YAAyB,EACzBC,YAAyB;IAEzB,IAAIC,SAAS;IACb,IAAIC,SAAS;IACb,IAAIC,UAAUJ,aAAaT,OAAO,CAACW,OAAO;IAC1C,IAAIG,UAAUJ,aAAaV,OAAO,CAACY,OAAO;IAC1C,MAAMG,OAA8B,EAAE;IAEtC,MAAOF,WAAW,QAAQC,WAAW,KAAM;QACzC,MAAME,gBAAgBC,IAAAA,mBAAa,EAACJ,SAASC;QAC7C,IAAIE,kBAAkB,GAAG;YACvB,IAAIH,QAAQN,IAAI,KAAKO,QAAQP,IAAI,EAAE;gBACjCQ,KAAKG,IAAI,CAAC;oBAAEC,IAAI;oBAAWC,cAAcP;oBAASQ,aAAaP;gBAAQ;YACzE;YACAD,UAAUJ,aAAaT,OAAO,CAAC,EAAEW,OAAO;YACxCG,UAAUJ,aAAaV,OAAO,CAAC,EAAEY,OAAO;QAC1C,OAAO,IAAII,gBAAgB,GAAG;YAC5BD,KAAKG,IAAI,CAAC;gBAAEC,IAAI;gBAAWG,eAAeT;YAAQ;YAClDA,UAAUJ,aAAaT,OAAO,CAAC,EAAEW,OAAO;QAC1C,OAAO;YACLI,KAAKG,IAAI,CAAC;gBAAEC,IAAI;gBAASI,aAAaT;YAAQ;YAC9CA,UAAUJ,aAAaV,OAAO,CAAC,EAAEY,OAAO;QAC1C;IACF;IAEA,MAAOC,WAAW,KAAM;QACtBE,KAAKG,IAAI,CAAC;YAAEC,IAAI;YAAWG,eAAeT;QAAQ;QAClDA,UAAUJ,aAAaT,OAAO,CAAC,EAAEW,OAAO;IAC1C;IACA,MAAOG,WAAW,KAAM;QACtBC,KAAKG,IAAI,CAAC;YAAEC,IAAI;YAASI,aAAaT;QAAQ;QAC9CA,UAAUJ,aAAaV,OAAO,CAAC,EAAEY,OAAO;IAC1C;IAEA,OAAOG;AACT"}
@@ -56,7 +56,40 @@ export type FingerprintDiffItem = {
56
56
  };
57
57
  export type Platform = 'android' | 'ios';
58
58
  export type ProjectWorkflow = 'generic' | 'managed' | 'unknown';
59
+ /**
60
+ * A named preset of fingerprint settings, from strict (react to any potential native change) to
61
+ * relaxed (ignore changes that usually don't affect the native build).
62
+ * - `strict`: highest fidelity - even a version bump changes the fingerprint.
63
+ * The historical default.
64
+ * - `balanced`: the default, tuned for a good first-time experience.
65
+ * - `relaxed`: for building multiple variants from one native project.
66
+ * On top of `balanced`, it also ignores app identity like app icons and the Android `package` /
67
+ * iOS `bundleIdentifier`.
68
+ */
69
+ export type FingerprintPreset = 'strict' | 'balanced' | 'relaxed';
70
+ /**
71
+ * How an autolinked native module is hashed.
72
+ * - `files`: hash the module's native directory.
73
+ * - `package`: hash its `package.json` `name@version`, so patch-level or cross-machine churn inside
74
+ * the module is ignored.
75
+ */
76
+ export type NativeModuleSourceType = 'files' | 'package';
77
+ /**
78
+ * How config-plugin modules loaded while evaluating the Expo config are hashed.
79
+ * - `files`: hash every loaded module from its files (in-repo and node_modules).
80
+ * - `package`: collapse node_modules modules to their package `name@version` while still hashing
81
+ * in-repo modules from their files, trading exact node_modules plugin fidelity for far fewer false
82
+ * positives.
83
+ */
84
+ export type ConfigPluginSourceType = 'files' | 'package';
59
85
  export interface Options {
86
+ /**
87
+ * The preset to derive default settings from.
88
+ * A preset sets `sourceSkips` and related defaults;
89
+ * any explicitly provided option (e.g. `sourceSkips`) takes precedence over the preset.
90
+ * @default 'balanced'
91
+ */
92
+ preset?: FingerprintPreset;
60
93
  /**
61
94
  * Limit native files to those for specified platforms.
62
95
  * @default ['android', 'ios']
@@ -97,6 +130,16 @@ export interface Options {
97
130
  * @default DEFAULT_SOURCE_SKIPS
98
131
  */
99
132
  sourceSkips?: SourceSkips;
133
+ /**
134
+ * How autolinked native modules are hashed.
135
+ * Defaults to the value from the resolved `preset`; set this to override it.
136
+ */
137
+ nativeModuleSourceType?: NativeModuleSourceType;
138
+ /**
139
+ * How config-plugin modules loaded while evaluating the Expo config are hashed.
140
+ * Defaults to the value from the resolved `preset`; set this to override it.
141
+ */
142
+ configPluginSourceType?: ConfigPluginSourceType;
100
143
  /**
101
144
  * Enable ReactImportsPatcher to transform imports from React of the form `#import "RCTBridge.h"` to `#import <React/RCTBridge.h>`.
102
145
  * This is useful when you want to have a stable fingerprint for Expo projects,
@@ -127,7 +170,7 @@ type SourceSkipsKeys = keyof typeof SourceSkips;
127
170
  /**
128
171
  * Supported options for use in fingerprint.config.js
129
172
  */
130
- export type Config = Pick<Options, 'concurrentIoLimit' | 'hashAlgorithm' | 'ignorePaths' | 'extraSources' | 'enableReactImportsPatcher' | 'useRNCoreAutolinkingFromExpo' | 'debug' | 'fileHookTransform'> & {
173
+ export type Config = Pick<Options, 'preset' | 'concurrentIoLimit' | 'hashAlgorithm' | 'ignorePaths' | 'extraSources' | 'enableReactImportsPatcher' | 'useRNCoreAutolinkingFromExpo' | 'nativeModuleSourceType' | 'configPluginSourceType' | 'debug' | 'fileHookTransform'> & {
131
174
  sourceSkips?: SourceSkips | SourceSkipsKeys[];
132
175
  };
133
176
  /**
@@ -196,7 +239,36 @@ export interface HashSourceContents {
196
239
  */
197
240
  reasons: string[];
198
241
  }
199
- export type HashSource = HashSourceFile | HashSourceDir | HashSourceContents;
242
+ export interface HashSourcePackage {
243
+ type: 'package';
244
+ /**
245
+ * Package name from its `package.json`.
246
+ * Together with `version`, this is the only thing hashed, so unrelated churn inside the package
247
+ * (or across machines) is ignored.
248
+ */
249
+ name: string;
250
+ /**
251
+ * Package version from its `package.json`.
252
+ */
253
+ version: string;
254
+ /**
255
+ * Path to the package's `package.json`.
256
+ * Kept for ignore-path matching and debugging only — it is deliberately not part of the hash, so
257
+ * the fingerprint doesn't depend on where the package resolves on disk (e.g. hoisted vs. isolated
258
+ * installs).
259
+ */
260
+ filePath: string;
261
+ /**
262
+ * Reasons of this source coming from.
263
+ */
264
+ reasons: string[];
265
+ /**
266
+ * Override key for hashing.
267
+ * Without this key, the package `name@version` is used as the hash key.
268
+ */
269
+ overrideHashKey?: string;
270
+ }
271
+ export type HashSource = HashSourceFile | HashSourceDir | HashSourceContents | HashSourcePackage;
200
272
  export interface DebugInfoFile {
201
273
  path: string;
202
274
  hash: string;
@@ -213,7 +285,13 @@ export interface DebugInfoContents {
213
285
  /** Indicates whether the source is transformed by `fileHookTransform`. */
214
286
  isTransformed?: boolean;
215
287
  }
216
- export type DebugInfo = DebugInfoFile | DebugInfoDir | DebugInfoContents;
288
+ export interface DebugInfoPackage {
289
+ path: string;
290
+ name: string;
291
+ version: string;
292
+ hash: string;
293
+ }
294
+ export type DebugInfo = DebugInfoFile | DebugInfoDir | DebugInfoContents | DebugInfoPackage;
217
295
  export interface HashResultFile {
218
296
  type: 'file';
219
297
  id: string;
@@ -232,7 +310,13 @@ export interface HashResultContents {
232
310
  hex: string;
233
311
  debugInfo?: DebugInfoContents;
234
312
  }
235
- export type HashResult = HashResultFile | HashResultDir | HashResultContents;
313
+ export interface HashResultPackage {
314
+ type: 'package';
315
+ id: string;
316
+ hex: string;
317
+ debugInfo?: DebugInfoPackage;
318
+ }
319
+ export type HashResult = HashResultFile | HashResultDir | HashResultContents | HashResultPackage;
236
320
  /**
237
321
  * @hidden
238
322
  */
@@ -244,12 +328,21 @@ export type NormalizedOptions = Omit<Options, 'ignorePaths'> & {
244
328
  enableReactImportsPatcher: NonNullable<Options['enableReactImportsPatcher']>;
245
329
  ignorePathMatchObjects: Minimatch[];
246
330
  /**
247
- * A ignore pattern list specific for dir matching. It is built by `ignorePathMatchObjects` in runtime.
331
+ * An ignore pattern list specific for dir matching. It is built by `ignorePathMatchObjects` in runtime.
248
332
  */
249
333
  ignoreDirMatchObjects: Minimatch[];
250
334
  /**
251
335
  * Indicate whether the project is using CNG for each platform.
252
336
  */
253
337
  useCNGForPlatforms: Record<Platform, boolean>;
338
+ /**
339
+ * How autolinked native modules are hashed. From the resolved preset unless explicitly overridden.
340
+ */
341
+ nativeModuleSourceType: NativeModuleSourceType;
342
+ /**
343
+ * How config-plugin modules loaded during config evaluation are hashed. From the resolved preset
344
+ * unless explicitly overridden.
345
+ */
346
+ configPluginSourceType: ConfigPluginSourceType;
254
347
  };
255
348
  export {};
@@ -1,4 +1,7 @@
1
1
  "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //#endregion
4
- //# sourceMappingURL=Fingerprint.types.js.map
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ //#endregion
6
+
7
+ //# sourceMappingURL=Fingerprint.types.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Fingerprint.types.js","sourceRoot":"","sources":["../src/Fingerprint.types.ts"],"names":[],"mappings":";;AA+TA,YAAY"}
1
+ {"version":3,"sources":["Fingerprint.types.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;CA+aA,YAAY"}
@@ -1,6 +1,5 @@
1
1
  import type { NormalizedOptions, Options } from './Fingerprint.types';
2
- import { SourceSkips } from './sourcer/SourceSkips';
3
2
  export declare const FINGERPRINT_IGNORE_FILENAME = ".fingerprintignore";
4
3
  export declare const DEFAULT_IGNORE_PATHS: string[];
5
- export declare const DEFAULT_SOURCE_SKIPS = SourceSkips.PackageJsonAndroidAndIosScriptsIfNotContainRun;
4
+ export declare const DEFAULT_SOURCE_SKIPS: import(".").SourceSkips;
6
5
  export declare function normalizeOptionsAsync(projectRoot: string, options?: Options): Promise<NormalizedOptions>;
package/build/Options.js CHANGED
@@ -1,21 +1,67 @@
1
1
  "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.DEFAULT_SOURCE_SKIPS = exports.DEFAULT_IGNORE_PATHS = exports.FINGERPRINT_IGNORE_FILENAME = void 0;
7
- exports.normalizeOptionsAsync = normalizeOptionsAsync;
8
- const promises_1 = __importDefault(require("fs/promises"));
9
- const os_1 = __importDefault(require("os"));
10
- const path_1 = __importDefault(require("path"));
11
- const Config_1 = require("./Config");
12
- const ExpoResolver_1 = require("./ExpoResolver");
13
- const ProjectWorkflow_1 = require("./ProjectWorkflow");
14
- const SourceSkips_1 = require("./sourcer/SourceSkips");
15
- const Path_1 = require("./utils/Path");
16
- exports.FINGERPRINT_IGNORE_FILENAME = '.fingerprintignore';
17
- exports.DEFAULT_IGNORE_PATHS = [
18
- exports.FINGERPRINT_IGNORE_FILENAME,
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ 0 && (module.exports = {
6
+ DEFAULT_IGNORE_PATHS: null,
7
+ DEFAULT_SOURCE_SKIPS: null,
8
+ FINGERPRINT_IGNORE_FILENAME: null,
9
+ normalizeOptionsAsync: null
10
+ });
11
+ function _export(target, all) {
12
+ for(var name in all)Object.defineProperty(target, name, {
13
+ enumerable: true,
14
+ get: Object.getOwnPropertyDescriptor(all, name).get
15
+ });
16
+ }
17
+ _export(exports, {
18
+ get DEFAULT_IGNORE_PATHS () {
19
+ return DEFAULT_IGNORE_PATHS;
20
+ },
21
+ get DEFAULT_SOURCE_SKIPS () {
22
+ return DEFAULT_SOURCE_SKIPS;
23
+ },
24
+ get FINGERPRINT_IGNORE_FILENAME () {
25
+ return FINGERPRINT_IGNORE_FILENAME;
26
+ },
27
+ get normalizeOptionsAsync () {
28
+ return normalizeOptionsAsync;
29
+ }
30
+ });
31
+ function _promises() {
32
+ const data = /*#__PURE__*/ _interop_require_default(require("fs/promises"));
33
+ _promises = function() {
34
+ return data;
35
+ };
36
+ return data;
37
+ }
38
+ function _os() {
39
+ const data = /*#__PURE__*/ _interop_require_default(require("os"));
40
+ _os = function() {
41
+ return data;
42
+ };
43
+ return data;
44
+ }
45
+ function _path() {
46
+ const data = /*#__PURE__*/ _interop_require_default(require("path"));
47
+ _path = function() {
48
+ return data;
49
+ };
50
+ return data;
51
+ }
52
+ const _Config = require("./Config");
53
+ const _ExpoResolver = require("./ExpoResolver");
54
+ const _Presets = require("./Presets");
55
+ const _ProjectWorkflow = require("./ProjectWorkflow");
56
+ const _Path = require("./utils/Path");
57
+ function _interop_require_default(obj) {
58
+ return obj && obj.__esModule ? obj : {
59
+ default: obj
60
+ };
61
+ }
62
+ const FINGERPRINT_IGNORE_FILENAME = '.fingerprintignore';
63
+ const DEFAULT_IGNORE_PATHS = [
64
+ FINGERPRINT_IGNORE_FILENAME,
19
65
  // Android
20
66
  '**/android/build/**/*',
21
67
  '**/android/.cxx/**/*',
@@ -56,8 +102,6 @@ exports.DEFAULT_IGNORE_PATHS = [
56
102
  '**/node_modules/expo-updates/ios/EXUpdates/BSPatch/bspatch.c',
57
103
  // expo-modules-jsi has build artifacts
58
104
  '**/node_modules/expo-modules-jsi/apple/{Products,.build,.DerivedData,.generated}/**/*',
59
- // Ignore nested node_modules
60
- '**/node_modules/**/node_modules/**',
61
105
  // Ignore node binaries that might be platform dependent
62
106
  '**/node_modules/**/*.node',
63
107
  '**/node_modules/@img/sharp-*/**/*',
@@ -66,70 +110,76 @@ exports.DEFAULT_IGNORE_PATHS = [
66
110
  '**/node_modules/**/*.podspec.json',
67
111
  // Ignore known 3rd party binaries artifacts
68
112
  // It happens mostly on iOS because the autolinking root is the whole package root as its podspec
69
- '**/node_modules/@shopify/react-native-skia/libs/**/*',
113
+ '**/node_modules/@shopify/react-native-skia/libs/**/*'
70
114
  ];
71
- exports.DEFAULT_SOURCE_SKIPS = SourceSkips_1.SourceSkips.PackageJsonAndroidAndIosScriptsIfNotContainRun;
115
+ const DEFAULT_SOURCE_SKIPS = (0, _Presets.resolvePreset)(_Presets.DEFAULT_PRESET).sourceSkips;
72
116
  async function normalizeOptionsAsync(projectRoot, options) {
73
- const config = await (0, Config_1.loadConfigAsync)(projectRoot, options?.silent ?? false);
117
+ const config = await (0, _Config.loadConfigAsync)(projectRoot, options?.silent ?? false);
118
+ const preset = (0, _Presets.resolvePreset)(options?.preset ?? config?.preset ?? _Presets.DEFAULT_PRESET);
74
119
  const ignorePathMatchObjects = await collectIgnorePathsAsync(projectRoot, config?.ignorePaths, options);
75
120
  const useCNGForPlatforms = await resolveUseCNGAsync(projectRoot, options, ignorePathMatchObjects);
76
121
  if (useCNGForPlatforms.android) {
77
- (0, Path_1.appendIgnorePath)(ignorePathMatchObjects, 'android/**/*');
122
+ (0, _Path.appendIgnorePath)(ignorePathMatchObjects, 'android/**/*');
78
123
  }
79
124
  if (useCNGForPlatforms.ios) {
80
- (0, Path_1.appendIgnorePath)(ignorePathMatchObjects, 'ios/**/*');
125
+ (0, _Path.appendIgnorePath)(ignorePathMatchObjects, 'ios/**/*');
81
126
  }
82
127
  return {
83
- // Defaults
84
- platforms: ['android', 'ios'],
85
- concurrentIoLimit: os_1.default.cpus().length,
128
+ // Defaults, derived from the resolved preset
129
+ platforms: [
130
+ 'android',
131
+ 'ios'
132
+ ],
133
+ concurrentIoLimit: _os().default.cpus().length,
86
134
  hashAlgorithm: 'sha1',
87
- sourceSkips: exports.DEFAULT_SOURCE_SKIPS,
135
+ sourceSkips: preset.sourceSkips,
136
+ nativeModuleSourceType: preset.nativeModuleSourceType,
137
+ configPluginSourceType: preset.configPluginSourceType,
88
138
  // Options from config
89
139
  ...config,
90
- // Explicit options
91
- ...Object.fromEntries(Object.entries(options ?? {}).filter(([_, v]) => v != null)),
140
+ // Explicit options (any explicitly provided value replaces the preset default)
141
+ ...Object.fromEntries(Object.entries(options ?? {}).filter(([_, v])=>v != null)),
92
142
  // These options are computed by both default and explicit options, so we put them last.
93
- enableReactImportsPatcher: options?.enableReactImportsPatcher ??
94
- config?.enableReactImportsPatcher ??
95
- (0, ExpoResolver_1.satisfyExpoVersion)(projectRoot, '<52.0.0') ??
96
- false,
143
+ enableReactImportsPatcher: options?.enableReactImportsPatcher ?? config?.enableReactImportsPatcher ?? (0, _ExpoResolver.satisfyExpoVersion)(projectRoot, '<52.0.0') ?? false,
97
144
  ignorePathMatchObjects,
98
- ignoreDirMatchObjects: (0, Path_1.buildDirMatchObjects)(ignorePathMatchObjects),
99
- useCNGForPlatforms,
145
+ ignoreDirMatchObjects: (0, _Path.buildDirMatchObjects)(ignorePathMatchObjects),
146
+ useCNGForPlatforms
100
147
  };
101
148
  }
102
149
  async function collectIgnorePathsAsync(projectRoot, pathsFromConfig, options) {
103
150
  const ignorePaths = [
104
- ...exports.DEFAULT_IGNORE_PATHS,
105
- ...(pathsFromConfig ?? []),
106
- ...(options?.ignorePaths ?? []),
107
- ...(options?.dirExcludes?.map((dirExclude) => `${dirExclude}/**/*`) ?? []),
151
+ ...DEFAULT_IGNORE_PATHS,
152
+ ...pathsFromConfig ?? [],
153
+ ...options?.ignorePaths ?? [],
154
+ ...options?.dirExcludes?.map((dirExclude)=>`${dirExclude}/**/*`) ?? []
108
155
  ];
109
- const fingerprintIgnorePath = path_1.default.join(projectRoot, exports.FINGERPRINT_IGNORE_FILENAME);
156
+ const fingerprintIgnorePath = _path().default.join(projectRoot, FINGERPRINT_IGNORE_FILENAME);
110
157
  try {
111
- const fingerprintIgnore = await promises_1.default.readFile(fingerprintIgnorePath, 'utf8');
158
+ const fingerprintIgnore = await _promises().default.readFile(fingerprintIgnorePath, 'utf8');
112
159
  const fingerprintIgnoreLines = fingerprintIgnore.split('\n');
113
- for (const line of fingerprintIgnoreLines) {
160
+ for (const line of fingerprintIgnoreLines){
114
161
  const trimmedLine = line.trim();
115
162
  if (trimmedLine) {
116
163
  ignorePaths.push(trimmedLine);
117
164
  }
118
165
  }
119
- }
120
- catch { }
121
- return (0, Path_1.buildPathMatchObjects)(ignorePaths);
166
+ } catch {}
167
+ return (0, _Path.buildPathMatchObjects)(ignorePaths);
122
168
  }
123
169
  async function resolveUseCNGAsync(projectRoot, options, ignorePathMatchObjects) {
124
170
  const results = {
125
171
  android: false,
126
- ios: false,
172
+ ios: false
127
173
  };
128
- const platforms = options?.platforms ?? ['android', 'ios'];
129
- for (const platform of platforms) {
130
- const projectWorkflow = await (0, ProjectWorkflow_1.resolveProjectWorkflowAsync)(projectRoot, platform, ignorePathMatchObjects);
174
+ const platforms = options?.platforms ?? [
175
+ 'android',
176
+ 'ios'
177
+ ];
178
+ for (const platform of platforms){
179
+ const projectWorkflow = await (0, _ProjectWorkflow.resolveProjectWorkflowAsync)(projectRoot, platform, ignorePathMatchObjects);
131
180
  results[platform] = projectWorkflow === 'managed';
132
181
  }
133
182
  return results;
134
183
  }
135
- //# sourceMappingURL=Options.js.map
184
+
185
+ //# sourceMappingURL=Options.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Options.js","sourceRoot":"","sources":["../src/Options.ts"],"names":[],"mappings":";;;;;;AAiFA,sDAqCC;AAtHD,2DAA6B;AAE7B,4CAAoB;AACpB,gDAAwB;AAExB,qCAA2C;AAC3C,iDAAoD;AAEpD,u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FILENAME","normalizeOptionsAsync","resolvePreset","DEFAULT_PRESET","sourceSkips","projectRoot","options","config","loadConfigAsync","silent","preset","ignorePathMatchObjects","collectIgnorePathsAsync","ignorePaths","useCNGForPlatforms","resolveUseCNGAsync","android","appendIgnorePath","ios","platforms","concurrentIoLimit","os","cpus","length","hashAlgorithm","nativeModuleSourceType","configPluginSourceType","Object","fromEntries","entries","filter","_","v","enableReactImportsPatcher","satisfyExpoVersion","ignoreDirMatchObjects","buildDirMatchObjects","pathsFromConfig","dirExcludes","map","dirExclude","fingerprintIgnorePath","path","join","fingerprintIgnore","fs","readFile","fingerprintIgnoreLines","split","line","trimmedLine","trim","push","buildPathMatchObjects","results","platform","projectWorkflow","resolveProjectWorkflowAsync"],"mappings":";;;;;;;;;;;;;;;;;QAcaA;eAAAA;;QA8DAC;eAAAA;;QAhEAC;eAAAA;;QAkESC;eAAAA;;;;gEA9EP;;;;;;;gEAEA;;;;;;;gEACE;;;;;;wBAEe;8BACG;yBAEW;iCACF;sBACkC;;;;;;AAEvE,MAAMD,8BAA8B;AAEpC,MAAMF,uBAAuB;IAClCE;IACA,UAAU;IACV;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IAEA,8DAA8D;IAC9D;IAEA,yBAAyB;IACzB;IACA;IACA;IAEA,MAAM;IACN;IACA;IACA;IACA;IACA;IACA;IAEA,mDAAmD;IACnD;IAEA,2FAA2F;IAC3F;IACA;IACA;IACA;IAEA,mCAAmC;IACnC,iIAAiI;IACjI,iIAAiI;IACjI;IACA;IAEA,uCAAuC;IACvC;IAEA,wDAAwD;IACxD;IACA;IACA;IAEA,wDAAwD;IACxD;IACA,4CAA4C;IAC5C,iGAAiG;IACjG;CACD;AAEM,MAAMD,uBAAuBG,IAAAA,sBAAa,EAACC,uBAAc,EAAEC,WAAW;AAEtE,eAAeH,sBACpBI,WAAmB,EACnBC,OAAiB;IAEjB,MAAMC,SAAS,MAAMC,IAAAA,uBAAe,EAACH,aAAaC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