@firebase-function-kits/firestore-bigquery-export 0.0.2-rc.8 → 0.1.0

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/lib/region.d.ts CHANGED
@@ -1,7 +1,9 @@
1
1
  /**
2
2
  * Maps a Firestore database location to the Cloud Run region the functions
3
- * should deploy to. Regional locations pass through unchanged; an unset or
4
- * empty location returns `undefined`, meaning the functions declare no region.
3
+ * should deploy to. The lookup is case-insensitive and ignores surrounding
4
+ * whitespace, as the CLI's own region handling is. Regional locations pass
5
+ * through lowercased; an unset or blank location returns `undefined`, meaning
6
+ * the functions declare no region.
5
7
  */
6
8
  export declare function firestoreLocationToFunctionRegion(location: string | undefined): string | undefined;
7
9
  //# sourceMappingURL=region.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"region.d.ts","sourceRoot":"","sources":["../src/region.ts"],"names":[],"mappings":"AAwBA;;;;GAIG;AACH,wBAAgB,iCAAiC,CAC/C,QAAQ,EAAE,MAAM,GAAG,SAAS,GAC3B,MAAM,GAAG,SAAS,CAKpB"}
1
+ {"version":3,"file":"region.d.ts","sourceRoot":"","sources":["../src/region.ts"],"names":[],"mappings":"AAwBA;;;;;;GAMG;AACH,wBAAgB,iCAAiC,CAC/C,QAAQ,EAAE,MAAM,GAAG,SAAS,GAC3B,MAAM,GAAG,SAAS,CAMpB"}
package/lib/region.js CHANGED
@@ -25,13 +25,16 @@ const MULTI_REGION_TO_FUNCTION_REGION = {
25
25
  };
26
26
  /**
27
27
  * Maps a Firestore database location to the Cloud Run region the functions
28
- * should deploy to. Regional locations pass through unchanged; an unset or
29
- * empty location returns `undefined`, meaning the functions declare no region.
28
+ * should deploy to. The lookup is case-insensitive and ignores surrounding
29
+ * whitespace, as the CLI's own region handling is. Regional locations pass
30
+ * through lowercased; an unset or blank location returns `undefined`, meaning
31
+ * the functions declare no region.
30
32
  */
31
33
  function firestoreLocationToFunctionRegion(location) {
32
- if (!location) {
34
+ const normalized = location?.trim().toLowerCase();
35
+ if (!normalized) {
33
36
  return undefined;
34
37
  }
35
- return MULTI_REGION_TO_FUNCTION_REGION[location] ?? location;
38
+ return MULTI_REGION_TO_FUNCTION_REGION[normalized] ?? normalized;
36
39
  }
37
40
  //# sourceMappingURL=region.js.map
package/lib/region.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"region.js","sourceRoot":"","sources":["../src/region.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;AAeH,8EAOC;AApBD,0EAA0E;AAC1E,+EAA+E;AAC/E,MAAM,+BAA+B,GAA2B;IAC9D,IAAI,EAAE,aAAa;IACnB,IAAI,EAAE,aAAa;IACnB,IAAI,EAAE,cAAc;CACrB,CAAC;AAEF;;;;GAIG;AACH,SAAgB,iCAAiC,CAC/C,QAA4B;IAE5B,IAAI,CAAC,QAAQ,EAAE,CAAC;QACd,OAAO,SAAS,CAAC;IACnB,CAAC;IACD,OAAO,+BAA+B,CAAC,QAAQ,CAAC,IAAI,QAAQ,CAAC;AAC/D,CAAC"}
1
+ {"version":3,"file":"region.js","sourceRoot":"","sources":["../src/region.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;AAiBH,8EAQC;AAvBD,0EAA0E;AAC1E,+EAA+E;AAC/E,MAAM,+BAA+B,GAA2B;IAC9D,IAAI,EAAE,aAAa;IACnB,IAAI,EAAE,aAAa;IACnB,IAAI,EAAE,cAAc;CACrB,CAAC;AAEF;;;;;;GAMG;AACH,SAAgB,iCAAiC,CAC/C,QAA4B;IAE5B,MAAM,UAAU,GAAG,QAAQ,EAAE,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;IAClD,IAAI,CAAC,UAAU,EAAE,CAAC;QAChB,OAAO,SAAS,CAAC;IACnB,CAAC;IACD,OAAO,+BAA+B,CAAC,UAAU,CAAC,IAAI,UAAU,CAAC;AACnE,CAAC"}