@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/dist/cli.js CHANGED
@@ -3,8 +3,8 @@ import {
3
3
  runCli,
4
4
  serveCommand,
5
5
  serveTarget
6
- } from "./chunk-6O3ECBQ4.js";
7
- import "./chunk-CODFR63R.js";
6
+ } from "./chunk-DY4P32X4.js";
7
+ import "./chunk-O2FDQBMY.js";
8
8
 
9
9
  // src/cli.ts
10
10
  var code = await runCli(
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
@@ -17,7 +17,7 @@ import {
17
17
  normalize,
18
18
  operationIds,
19
19
  supportedOperationIds
20
- } from "./chunk-CODFR63R.js";
20
+ } from "./chunk-O2FDQBMY.js";
21
21
  export {
22
22
  DEFAULT_CORPUS,
23
23
  GOOGLE_MAPS_NAMESPACE,
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. */
package/dist/server.js CHANGED
@@ -2,8 +2,8 @@ import {
2
2
  DEFAULT_PORT,
3
3
  createServer,
4
4
  serveTarget
5
- } from "./chunk-6O3ECBQ4.js";
6
- import "./chunk-CODFR63R.js";
5
+ } from "./chunk-DY4P32X4.js";
6
+ import "./chunk-O2FDQBMY.js";
7
7
  export {
8
8
  DEFAULT_PORT,
9
9
  createServer,