@crvouga/mockingbird-service-google-maps 1.9.0 → 2.0.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/CHANGELOG.md +23 -1
- package/DISCOVERY.md +55 -0
- package/README.md +3 -3
- package/SUPPORT.md +16 -0
- package/dist/{chunk-6O3ECBQ4.js → chunk-DY4P32X4.js} +44 -24
- package/dist/chunk-DY4P32X4.js.map +7 -0
- package/dist/{chunk-CODFR63R.js → chunk-O2FDQBMY.js} +627 -237
- package/dist/chunk-O2FDQBMY.js.map +7 -0
- package/dist/cli.js +2 -2
- package/dist/index.d.ts +6 -3
- package/dist/index.js +1 -1
- package/dist/server.d.ts +4 -0
- package/dist/server.js +2 -2
- package/openapi.yaml +747 -0
- package/package.json +29 -4
- package/dist/chunk-6O3ECBQ4.js.map +0 -7
- package/dist/chunk-CODFR63R.js.map +0 -7
package/dist/cli.js
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -1005,7 +1005,7 @@ declare const supportedOperationIds: readonly ["PlaceAutocomplete", "PlaceDetail
|
|
|
1005
1005
|
* same namespace), in the callback shapes and status enums the real script uses.
|
|
1006
1006
|
*/
|
|
1007
1007
|
type ShimOptions = {
|
|
1008
|
-
/** Origin (plus any `/ns/<name>` prefix) the shim's `fetch` calls go to. */
|
|
1008
|
+
/** Origin (plus any `/__admin/ns/<name>` prefix) the shim's `fetch` calls go to. */
|
|
1009
1009
|
base: string;
|
|
1010
1010
|
key: string;
|
|
1011
1011
|
/** The key was refused: the shim calls `window.gm_authFailure()` once loaded. */
|
|
@@ -1025,6 +1025,7 @@ type GoogleMapsRuntimeOptions = {
|
|
|
1025
1025
|
sqlite?: SqliteClient;
|
|
1026
1026
|
clock?: Clock;
|
|
1027
1027
|
seed?: number | string;
|
|
1028
|
+
adminPrefix?: string;
|
|
1028
1029
|
adminKey?: string;
|
|
1029
1030
|
onLog?: (entry: RequestLog) => void;
|
|
1030
1031
|
/** Addresses every namespace resolves. Default: the QA corpus. */
|
|
@@ -1033,8 +1034,8 @@ type GoogleMapsRuntimeOptions = {
|
|
|
1033
1034
|
};
|
|
1034
1035
|
type GoogleMapsRuntime = ServiceRuntime<GoogleMapsAPI>;
|
|
1035
1036
|
/**
|
|
1036
|
-
* The Google Maps mock with Mockingbird's full service contract: `/health`, `/__admin/*`,
|
|
1037
|
-
* namespaces by header, by `/ns/<name>` path prefix, or by API key
|
|
1037
|
+
* The Google Maps mock with Mockingbird's full service contract: `/__admin/health`, `/__admin/*`,
|
|
1038
|
+
* namespaces by header, by `/__admin/ns/<name>` path prefix, or by API key
|
|
1038
1039
|
* (`PUT /__admin/credentials {"credentials": {"<PLACES_KEY>": "<namespace>"}}`), clock control,
|
|
1039
1040
|
* fault presets and a request journal. Google Maps sends no webhooks.
|
|
1040
1041
|
*/
|
|
@@ -1058,6 +1059,7 @@ type GoogleMapsAPIOptions = APIOptions & {
|
|
|
1058
1059
|
/** Initial per-namespace settings (accepted keys, public URL for the JS shim). */
|
|
1059
1060
|
settings?: Partial<Settings>;
|
|
1060
1061
|
/** The public namespace name, so the JS shim can call back into the same namespace. */
|
|
1062
|
+
adminPrefix?: string;
|
|
1061
1063
|
publicNamespace?: string;
|
|
1062
1064
|
};
|
|
1063
1065
|
/**
|
|
@@ -1074,6 +1076,7 @@ declare class GoogleMapsAPI implements FetchAPI$1 {
|
|
|
1074
1076
|
readonly sqlite: SqliteClient;
|
|
1075
1077
|
readonly state: GoogleMapsState;
|
|
1076
1078
|
private readonly service;
|
|
1079
|
+
private readonly adminPrefix;
|
|
1077
1080
|
private readonly publicNamespace;
|
|
1078
1081
|
constructor(options?: GoogleMapsAPIOptions);
|
|
1079
1082
|
fetch(request: Request): Promise<Response>;
|
package/dist/index.js
CHANGED
package/dist/server.d.ts
CHANGED
|
@@ -593,6 +593,7 @@ type CliOption = {
|
|
|
593
593
|
};
|
|
594
594
|
type CliValues = Record<string, string | boolean | undefined>;
|
|
595
595
|
type CommonServeOptions = {
|
|
596
|
+
adminPrefix?: string;
|
|
596
597
|
adminKey: string | undefined;
|
|
597
598
|
seed: string | undefined;
|
|
598
599
|
onLog: ((entry: RequestLog$1) => void) | undefined;
|
|
@@ -1371,6 +1372,7 @@ type GoogleMapsAPIOptions = APIOptions & {
|
|
|
1371
1372
|
/** Initial per-namespace settings (accepted keys, public URL for the JS shim). */
|
|
1372
1373
|
settings?: Partial<Settings>;
|
|
1373
1374
|
/** The public namespace name, so the JS shim can call back into the same namespace. */
|
|
1375
|
+
adminPrefix?: string;
|
|
1374
1376
|
publicNamespace?: string;
|
|
1375
1377
|
};
|
|
1376
1378
|
/**
|
|
@@ -1382,6 +1384,7 @@ declare class GoogleMapsAPI implements FetchAPI {
|
|
|
1382
1384
|
readonly sqlite: SqliteClient;
|
|
1383
1385
|
readonly state: GoogleMapsState;
|
|
1384
1386
|
private readonly service;
|
|
1387
|
+
private readonly adminPrefix;
|
|
1385
1388
|
private readonly publicNamespace;
|
|
1386
1389
|
constructor(options?: GoogleMapsAPIOptions);
|
|
1387
1390
|
fetch(request: Request): Promise<Response>;
|
|
@@ -1406,6 +1409,7 @@ type GoogleMapsRuntimeOptions = {
|
|
|
1406
1409
|
sqlite?: SqliteClient;
|
|
1407
1410
|
clock?: Clock;
|
|
1408
1411
|
seed?: number | string;
|
|
1412
|
+
adminPrefix?: string;
|
|
1409
1413
|
adminKey?: string;
|
|
1410
1414
|
onLog?: (entry: RequestLog) => void;
|
|
1411
1415
|
/** Addresses every namespace resolves. Default: the QA corpus. */
|