@metamask-previews/geolocation-controller 0.1.2-preview-b925206ea → 0.1.2-preview-16512b784

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.
@@ -1 +1 @@
1
- {"version":3,"file":"geolocation-api-service-method-action-types.cjs","sourceRoot":"","sources":["../../src/geolocation-api-service/geolocation-api-service-method-action-types.ts"],"names":[],"mappings":";AAAA;;;GAGG","sourcesContent":["/**\n * This file is auto generated.\n * Do not edit manually.\n */\n\nimport type { GeolocationApiService } from './geolocation-api-service';\n\n/**\n * Returns the geolocation code. Serves from cache when the TTL has not\n * expired, otherwise performs a network fetch. Concurrent callers are\n * deduplicated to a single in-flight request.\n *\n * @param options - Optional fetch options.\n * @param options.bypassCache - When true, invalidates the cache and forces a\n * fresh network request.\n * @returns An ISO 3166-2 location code (e.g. `US`, `US-NY`, `CA-ON`), or\n * `UNKNOWN_LOCATION` when the API returns an empty or invalid body.\n */\nexport type GeolocationApiServiceFetchGeolocationAction = {\n type: `GeolocationApiService:fetchGeolocation`;\n handler: GeolocationApiService['fetchGeolocation'];\n};\n\n/**\n * Union of all GeolocationApiService action types.\n */\nexport type GeolocationApiServiceMethodActions =\n GeolocationApiServiceFetchGeolocationAction;\n"]}
1
+ {"version":3,"file":"geolocation-api-service-method-action-types.cjs","sourceRoot":"","sources":["../../src/geolocation-api-service/geolocation-api-service-method-action-types.ts"],"names":[],"mappings":";AAAA;;;GAGG","sourcesContent":["/**\n * This file is auto generated.\n * Do not edit manually.\n */\n\nimport type { GeolocationApiService } from './geolocation-api-service';\n\n/**\n * Returns the geolocation code. Serves from cache when the TTL has not\n * expired, otherwise performs a network fetch. Concurrent callers are\n * deduplicated to a single in-flight request.\n *\n * @param options - Optional fetch options.\n * @param options.bypassCache - When true, invalidates the TTL cache. If a\n * request is already in-flight it will be reused (deduplication always\n * applies).\n * @returns An ISO 3166-2 location code (e.g. `US`, `US-NY`, `CA-ON`), or\n * {@link UNKNOWN_LOCATION} when the API returns an empty or invalid body.\n */\nexport type GeolocationApiServiceFetchGeolocationAction = {\n type: `GeolocationApiService:fetchGeolocation`;\n handler: GeolocationApiService['fetchGeolocation'];\n};\n\n/**\n * Union of all GeolocationApiService action types.\n */\nexport type GeolocationApiServiceMethodActions =\n GeolocationApiServiceFetchGeolocationAction;\n"]}
@@ -9,10 +9,11 @@ import type { GeolocationApiService } from "./geolocation-api-service.cjs";
9
9
  * deduplicated to a single in-flight request.
10
10
  *
11
11
  * @param options - Optional fetch options.
12
- * @param options.bypassCache - When true, invalidates the cache and forces a
13
- * fresh network request.
12
+ * @param options.bypassCache - When true, invalidates the TTL cache. If a
13
+ * request is already in-flight it will be reused (deduplication always
14
+ * applies).
14
15
  * @returns An ISO 3166-2 location code (e.g. `US`, `US-NY`, `CA-ON`), or
15
- * `UNKNOWN_LOCATION` when the API returns an empty or invalid body.
16
+ * {@link UNKNOWN_LOCATION} when the API returns an empty or invalid body.
16
17
  */
17
18
  export type GeolocationApiServiceFetchGeolocationAction = {
18
19
  type: `GeolocationApiService:fetchGeolocation`;
@@ -1 +1 @@
1
- {"version":3,"file":"geolocation-api-service-method-action-types.d.cts","sourceRoot":"","sources":["../../src/geolocation-api-service/geolocation-api-service-method-action-types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,qBAAqB,EAAE,sCAAkC;AAEvE;;;;;;;;;;GAUG;AACH,MAAM,MAAM,2CAA2C,GAAG;IACxD,IAAI,EAAE,wCAAwC,CAAC;IAC/C,OAAO,EAAE,qBAAqB,CAAC,kBAAkB,CAAC,CAAC;CACpD,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,kCAAkC,GAC5C,2CAA2C,CAAC"}
1
+ {"version":3,"file":"geolocation-api-service-method-action-types.d.cts","sourceRoot":"","sources":["../../src/geolocation-api-service/geolocation-api-service-method-action-types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,qBAAqB,EAAE,sCAAkC;AAEvE;;;;;;;;;;;GAWG;AACH,MAAM,MAAM,2CAA2C,GAAG;IACxD,IAAI,EAAE,wCAAwC,CAAC;IAC/C,OAAO,EAAE,qBAAqB,CAAC,kBAAkB,CAAC,CAAC;CACpD,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,kCAAkC,GAC5C,2CAA2C,CAAC"}
@@ -9,10 +9,11 @@ import type { GeolocationApiService } from "./geolocation-api-service.mjs";
9
9
  * deduplicated to a single in-flight request.
10
10
  *
11
11
  * @param options - Optional fetch options.
12
- * @param options.bypassCache - When true, invalidates the cache and forces a
13
- * fresh network request.
12
+ * @param options.bypassCache - When true, invalidates the TTL cache. If a
13
+ * request is already in-flight it will be reused (deduplication always
14
+ * applies).
14
15
  * @returns An ISO 3166-2 location code (e.g. `US`, `US-NY`, `CA-ON`), or
15
- * `UNKNOWN_LOCATION` when the API returns an empty or invalid body.
16
+ * {@link UNKNOWN_LOCATION} when the API returns an empty or invalid body.
16
17
  */
17
18
  export type GeolocationApiServiceFetchGeolocationAction = {
18
19
  type: `GeolocationApiService:fetchGeolocation`;
@@ -1 +1 @@
1
- {"version":3,"file":"geolocation-api-service-method-action-types.d.mts","sourceRoot":"","sources":["../../src/geolocation-api-service/geolocation-api-service-method-action-types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,qBAAqB,EAAE,sCAAkC;AAEvE;;;;;;;;;;GAUG;AACH,MAAM,MAAM,2CAA2C,GAAG;IACxD,IAAI,EAAE,wCAAwC,CAAC;IAC/C,OAAO,EAAE,qBAAqB,CAAC,kBAAkB,CAAC,CAAC;CACpD,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,kCAAkC,GAC5C,2CAA2C,CAAC"}
1
+ {"version":3,"file":"geolocation-api-service-method-action-types.d.mts","sourceRoot":"","sources":["../../src/geolocation-api-service/geolocation-api-service-method-action-types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,qBAAqB,EAAE,sCAAkC;AAEvE;;;;;;;;;;;GAWG;AACH,MAAM,MAAM,2CAA2C,GAAG;IACxD,IAAI,EAAE,wCAAwC,CAAC;IAC/C,OAAO,EAAE,qBAAqB,CAAC,kBAAkB,CAAC,CAAC;CACpD,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,kCAAkC,GAC5C,2CAA2C,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"geolocation-api-service-method-action-types.mjs","sourceRoot":"","sources":["../../src/geolocation-api-service/geolocation-api-service-method-action-types.ts"],"names":[],"mappings":"AAAA;;;GAGG","sourcesContent":["/**\n * This file is auto generated.\n * Do not edit manually.\n */\n\nimport type { GeolocationApiService } from './geolocation-api-service';\n\n/**\n * Returns the geolocation code. Serves from cache when the TTL has not\n * expired, otherwise performs a network fetch. Concurrent callers are\n * deduplicated to a single in-flight request.\n *\n * @param options - Optional fetch options.\n * @param options.bypassCache - When true, invalidates the cache and forces a\n * fresh network request.\n * @returns An ISO 3166-2 location code (e.g. `US`, `US-NY`, `CA-ON`), or\n * `UNKNOWN_LOCATION` when the API returns an empty or invalid body.\n */\nexport type GeolocationApiServiceFetchGeolocationAction = {\n type: `GeolocationApiService:fetchGeolocation`;\n handler: GeolocationApiService['fetchGeolocation'];\n};\n\n/**\n * Union of all GeolocationApiService action types.\n */\nexport type GeolocationApiServiceMethodActions =\n GeolocationApiServiceFetchGeolocationAction;\n"]}
1
+ {"version":3,"file":"geolocation-api-service-method-action-types.mjs","sourceRoot":"","sources":["../../src/geolocation-api-service/geolocation-api-service-method-action-types.ts"],"names":[],"mappings":"AAAA;;;GAGG","sourcesContent":["/**\n * This file is auto generated.\n * Do not edit manually.\n */\n\nimport type { GeolocationApiService } from './geolocation-api-service';\n\n/**\n * Returns the geolocation code. Serves from cache when the TTL has not\n * expired, otherwise performs a network fetch. Concurrent callers are\n * deduplicated to a single in-flight request.\n *\n * @param options - Optional fetch options.\n * @param options.bypassCache - When true, invalidates the TTL cache. If a\n * request is already in-flight it will be reused (deduplication always\n * applies).\n * @returns An ISO 3166-2 location code (e.g. `US`, `US-NY`, `CA-ON`), or\n * {@link UNKNOWN_LOCATION} when the API returns an empty or invalid body.\n */\nexport type GeolocationApiServiceFetchGeolocationAction = {\n type: `GeolocationApiService:fetchGeolocation`;\n handler: GeolocationApiService['fetchGeolocation'];\n};\n\n/**\n * Union of all GeolocationApiService action types.\n */\nexport type GeolocationApiServiceMethodActions =\n GeolocationApiServiceFetchGeolocationAction;\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@metamask-previews/geolocation-controller",
3
- "version": "0.1.2-preview-b925206ea",
3
+ "version": "0.1.2-preview-16512b784",
4
4
  "description": "Centralised geolocation controller with TTL caching and request deduplication",
5
5
  "keywords": [
6
6
  "MetaMask",
@@ -40,7 +40,7 @@
40
40
  "build:docs": "typedoc",
41
41
  "changelog:update": "../../scripts/update-changelog.sh @metamask/geolocation-controller",
42
42
  "changelog:validate": "../../scripts/validate-changelog.sh @metamask/geolocation-controller",
43
- "generate-method-action-types": "tsx ../../scripts/generate-method-action-types.ts",
43
+ "generate-method-action-types": "tsx ../../packages/messenger/src/generate-action-types/cli.ts",
44
44
  "since-latest-release": "../../scripts/since-latest-release.sh",
45
45
  "test": "NODE_OPTIONS=--experimental-vm-modules jest --reporters=jest-silent-reporter",
46
46
  "test:clean": "NODE_OPTIONS=--experimental-vm-modules jest --clearCache",