@mpgd/adapter-capacitor 0.19.3 → 0.19.5

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/README.md CHANGED
@@ -674,11 +674,13 @@ discards a link that rule refuses, such as `mygame://game//evil.example/x` or
674
674
  path as another host. A delivered event carries the checked path as `route`:
675
675
  `/daily` for `mygame://game/daily`, as in the example above, where the host
676
676
  only names the link kind. The host is never part of `route`, so
677
- `mygame://level/3` gives `/3`. A router that routes by path opens
678
- `event.route` rather than parsing `event.url`. A link with no path to check,
679
- such as `mygame://daily`, arrives without `route`. A router that builds its
680
- route from anything else in the URL, such as the host, checks that route with
681
- `normalizeRootRelativeRoute` and opens only what it returns.
677
+ `mygame://level/3` gives `/3`, and a query or fragment alone after the host
678
+ reads as `/` (`mygame://game?entry=daily` gives `/?entry=daily`). A router
679
+ that routes by path opens `event.route` rather than parsing `event.url`. A
680
+ link with no route to check, such as `mygame://daily`, arrives without
681
+ `route`. A router that builds its route from anything else in the URL, such
682
+ as the host, checks that route with `normalizeRootRelativeRoute` and opens only
683
+ what it returns.
682
684
 
683
685
  Save progress at checkpoints and transaction boundaries. A pause callback can
684
686
  request a best-effort save, but neither pause nor back is guaranteed to run
@@ -8,8 +8,9 @@ function defaultVisibility() {
8
8
  }
9
9
  /**
10
10
  * Reads a game link the way `NativeOpenUrlEvent.route` describes: its path,
11
- * query, and fragment as a normalized route (the host is not part of it),
12
- * `undefined` when the URL has no path to check (`mygame:daily`,
11
+ * query, and fragment as a normalized route (the host is not part of it, and a
12
+ * link with only a query or fragment after the host reads as `/`),
13
+ * `undefined` when the URL has no route to check (`mygame:daily`,
13
14
  * `mygame://daily`), or `null` when the link is not delivered: it does not
14
15
  * parse, carries a control character, or has a path `normalizeRootRelativeRoute`
15
16
  * refuses because a client could read it as another host.
package/dist/index.js CHANGED
@@ -1,6 +1,7 @@
1
1
  import { bridgeCommerceEventProtocol, bridgeNotificationsEventProtocol, decodeBridgeCredentialLoadData, decodeBridgeStorageLoadData, } from '@mpgd/bridge';
2
2
  import { CapacitorGameServices } from '@mpgd/capacitor-game-services';
3
3
  import { PlatformOperationError, } from '@mpgd/platform';
4
+ import { createUnsupportedPlatformAnalyticsSink } from '@mpgd/platform/analytics';
4
5
  import { withShareIntentCheck } from '@mpgd/platform/routes';
5
6
  import { createCapacitorAppEvents, } from './app-events.js';
6
7
  import { namesOtherProtocol } from './bridge-events.js';
@@ -399,6 +400,7 @@ export function createCapacitorPlatformGateway(input) {
399
400
  }
400
401
  return {
401
402
  target: input.target,
403
+ analytics: createUnsupportedPlatformAnalyticsSink(),
402
404
  async getCapabilities() {
403
405
  const base = await request('runtime.getCapabilities', {});
404
406
  // A native shell built before the commerce v2 removals may still send the
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mpgd/adapter-capacitor",
3
- "version": "0.19.3",
3
+ "version": "0.19.5",
4
4
  "description": "Capacitor platform adapter for mpgd Android and iOS shells.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -51,11 +51,11 @@
51
51
  ],
52
52
  "dependencies": {
53
53
  "@capacitor/app": "8.1.1",
54
- "@mpgd/bridge": "0.19.1",
55
- "@mpgd/target-config": "0.24.9",
56
- "@mpgd/game-services": "0.35.0",
57
- "@mpgd/capacitor-game-services": "0.9.8",
58
- "@mpgd/platform": "0.36.0"
54
+ "@mpgd/bridge": "0.20.0",
55
+ "@mpgd/capacitor-game-services": "0.9.9",
56
+ "@mpgd/game-services": "0.36.0",
57
+ "@mpgd/platform": "0.37.0",
58
+ "@mpgd/target-config": "0.24.11"
59
59
  },
60
60
  "peerDependencies": {
61
61
  "@capacitor-community/admob": "^8.1.0",
@@ -92,7 +92,7 @@
92
92
  "ttsc": "0.34.2",
93
93
  "typescript": "7.0.2",
94
94
  "vitest": "^4.0.0",
95
- "@mpgd/game-runtime": "0.10.3"
95
+ "@mpgd/game-runtime": "0.10.4"
96
96
  },
97
97
  "main": "./dist/index.js",
98
98
  "types": "./dist/index.d.ts",