@mpgd/cli 0.13.0 → 0.14.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.
Files changed (27) hide show
  1. package/dist/index.d.ts +3 -0
  2. package/dist/index.js +363 -3
  3. package/dist/microsoft-store-package-acceptance.d.ts +54 -0
  4. package/dist/microsoft-store-package-acceptance.js +787 -0
  5. package/dist/microsoft-store-package-generation-contract.d.ts +129 -0
  6. package/dist/microsoft-store-package-generation-contract.js +3 -0
  7. package/dist/microsoft-store-package-generation-download.d.ts +22 -0
  8. package/dist/microsoft-store-package-generation-download.js +453 -0
  9. package/dist/microsoft-store-package-generation-input.d.ts +3 -0
  10. package/dist/microsoft-store-package-generation-input.js +384 -0
  11. package/dist/microsoft-store-package-generation-integrity.d.ts +5 -0
  12. package/dist/microsoft-store-package-generation-integrity.js +100 -0
  13. package/dist/microsoft-store-package-generation-manifest.d.ts +3 -0
  14. package/dist/microsoft-store-package-generation-manifest.js +67 -0
  15. package/dist/microsoft-store-package-generation-zip.d.ts +1 -0
  16. package/dist/microsoft-store-package-generation-zip.js +180 -0
  17. package/dist/microsoft-store-package-generation.d.ts +24 -0
  18. package/dist/microsoft-store-package-generation.js +430 -0
  19. package/dist/microsoft-store-submission.d.ts +79 -0
  20. package/dist/microsoft-store-submission.js +952 -0
  21. package/dist/microsoft-store-supported-locales.d.ts +1 -0
  22. package/dist/microsoft-store-supported-locales.js +33 -0
  23. package/package.json +6 -5
  24. package/templates/phaser-game/README.md +38 -0
  25. package/templates/phaser-game/gitignore +1 -0
  26. package/templates/phaser-game/mpgd.microsoft-store.json +29 -0
  27. package/templates/phaser-game/package.json +2 -0
@@ -0,0 +1 @@
1
+ export declare function isMicrosoftStoreSupportedListingLocale(locale: string): boolean;
@@ -0,0 +1,33 @@
1
+ // Microsoft Store package and listing language codes documented by Microsoft Learn.
2
+ const microsoftStoreSupportedListingLocales = new Set(`
3
+ af af-za am am-et ar ar-ae ar-bh ar-dz ar-eg ar-iq ar-jo ar-kw ar-lb ar-ly ar-ma
4
+ ar-om ar-qa ar-sa ar-sy ar-tn ar-ye as as-in az-arab az-arab-az az-cyrl az-cyrl-az
5
+ az-latn az-latn-az be be-by bg bg-bg bn bn-bd bn-in bs bs-cyrl bs-cyrl-ba bs-latn
6
+ bs-latn-ba ca ca-es ca-es-valencia chr-cher chr-cher-us chr-latn cs cs-cz cy cy-gb
7
+ da da-dk de de-at de-ch de-de de-li de-lu el el-gr en en-011 en-014 en-018 en-021
8
+ en-029 en-053 en-au en-bz en-ca en-gb en-hk en-id en-ie en-in en-jm en-kz en-mt
9
+ en-my en-nz en-ph en-pk en-sg en-tt en-us en-vn en-za en-zw es es-019 es-419 es-ar
10
+ es-bo es-cl es-co es-cr es-do es-ec es-es es-gt es-hn es-mx es-ni es-pa es-pe es-pr
11
+ es-py es-sv es-us es-uy es-ve et et-ee eu eu-es fa fa-ir fi fi-fi fil fil-latn
12
+ fil-ph fr fr-011 fr-015 fr-021 fr-029 fr-155 fr-be fr-ca fr-cd fr-ch fr-ci fr-cm
13
+ fr-fr fr-ht fr-lu fr-ma fr-mc fr-ml fr-re frc-latn frp-latn ga ga-ie gd-gb
14
+ gd-latn gl gl-es gu gu-in ha ha-latn ha-latn-ng he he-il hi hi-in hr hr-ba hr-hr
15
+ hu hu-hu hy hy-am id id-id ig-latn ig-ng is is-is it it-ch it-it iu-cans iu-latn
16
+ iu-latn-ca ja ja-jp ka ka-ge kk kk-kz km km-kh kn kn-in ko ko-kr kok kok-in
17
+ ku-arab ku-arab-iq ky-cyrl ky-kg lb lb-lu lo lo-la lt lt-lt lv lv-lv mi mi-latn
18
+ mi-nz mk mk-mk ml ml-in mn-cyrl mn-mn mn-mong mn-phag mr mr-in ms ms-bn ms-my mt
19
+ mt-mt nb nb-no ne ne-np nl nl-be nl-nl nn nn-no no no-no nso nso-za or or-in pa
20
+ pa-arab pa-arab-pk pa-deva pa-in pl pl-pl prs prs-af prs-arab pt pt-br pt-pt
21
+ quc-latn qut-gt qut-latn quz quz-bo quz-ec quz-pe ro ro-ro ru ru-ru rw rw-rw
22
+ sd-arab sd-arab-pk sd-deva si si-lk sk sk-sk sl sl-si sq sq-al sr sr-cyrl
23
+ sr-cyrl-ba sr-cyrl-cs sr-cyrl-me sr-cyrl-rs sr-latn sr-latn-ba sr-latn-cs
24
+ sr-latn-me sr-latn-rs sv sv-fi sv-se sw sw-ke ta ta-in te te-in tg-arab tg-cyrl
25
+ tg-cyrl-tj tg-latn th th-th ti ti-et tk-cyrl tk-cyrl-tr tk-latn tk-latn-tr tk-tm
26
+ tn tn-bw tn-za tr tr-tr tt-arab tt-cyrl tt-latn tt-ru ug-arab ug-cn ug-cyrl
27
+ ug-latn uk uk-ua ur ur-pk uz uz-cyrl uz-latn uz-latn-uz vi vi-vn wo wo-sn xh
28
+ xh-za yo-latn yo-ng zh-cn zh-hans zh-hans-cn zh-hans-sg zh-hant zh-hant-hk
29
+ zh-hant-mo zh-hant-tw zh-hk zh-mo zh-sg zh-tw zu zu-za
30
+ `.trim().split(/\s+/u));
31
+ export function isMicrosoftStoreSupportedListingLocale(locale) {
32
+ return microsoftStoreSupportedListingLocales.has(locale.toLowerCase());
33
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mpgd/cli",
3
- "version": "0.13.0",
3
+ "version": "0.14.0",
4
4
  "description": "Gunshi CLI for mpgd-kit starter generation and target workflow orchestration.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -43,7 +43,8 @@
43
43
  "@gunshi/plugin-completion": "^0.35.1",
44
44
  "@gunshi/plugin-i18n": "^0.35.1",
45
45
  "@gunshi/resources": "^0.35.1",
46
- "gunshi": "^0.35.1"
46
+ "gunshi": "^0.35.1",
47
+ "undici": "^7.28.0"
47
48
  },
48
49
  "devDependencies": {
49
50
  "@types/node": "^24.0.0",
@@ -53,15 +54,15 @@
53
54
  "@mpgd/adapter-browser": "0.5.0",
54
55
  "@mpgd/adapter-capacitor": "0.4.4",
55
56
  "@mpgd/adapter-devvit": "0.8.4",
56
- "@mpgd/adapter-verse8": "0.2.1",
57
57
  "@mpgd/analytics": "0.3.7",
58
+ "@mpgd/adapter-verse8": "0.2.1",
58
59
  "@mpgd/bridge": "0.6.1",
59
60
  "@mpgd/catalog": "0.5.0",
60
61
  "@mpgd/game-services": "0.10.0",
61
62
  "@mpgd/i18n": "0.5.3",
62
- "@mpgd/platform": "0.7.0",
63
63
  "@mpgd/phaser-assets": "0.4.1",
64
- "@mpgd/target-config": "0.8.0"
64
+ "@mpgd/target-config": "0.8.0",
65
+ "@mpgd/platform": "0.7.0"
65
66
  },
66
67
  "main": "./dist/index.js",
67
68
  "types": "./dist/index.d.ts",
@@ -285,6 +285,44 @@ submission.
285
285
  app; do not force activation with `skipWaiting()`. Keep the web manifest `id`
286
286
  game-specific because the cache namespace uses it to isolate apps sharing an
287
287
  origin.
288
+ Before Partner Center submission, replace every placeholder in
289
+ `mpgd.microsoft-store.json`, add at least one real PNG screenshot per listing
290
+ locale (maximum 50 MB and at least 1366 x 768 in either orientation), and run
291
+ `pnpm preflight:microsoft-store`. The generated script supplies the game
292
+ target config and the configured kit path. The command
293
+ validates the game-owned Store identity and listing against the built PWA and
294
+ writes deterministic JSON and Markdown evidence under
295
+ `release-output/microsoft-store`. After deploying those exact PWA bytes, set
296
+ `PWA_URL` and `MANIFEST_URL` to their public production endpoints, then run:
297
+
298
+ ```sh
299
+ pnpm package:microsoft-store -- \
300
+ --pwa-url "$PWA_URL" \
301
+ --manifest-url "$MANIFEST_URL" \
302
+ --package-version 1.2.3.0 \
303
+ --classic-version 1.2.2.0
304
+ ```
305
+
306
+ Package generation uses PWABuilder's fixed, unversioned production endpoint.
307
+ It downloads one bounded ZIP without extracting it, verifies the deployed
308
+ manifest and each deployed manifest icon against preflight evidence before
309
+ and after the request, and rejects PWA URLs outside that manifest's deployed
310
+ scope. It also rechecks local icon inputs for mutation. It pins the
311
+ hash-verified local manifest directly in PWABuilder's custom-manifest request
312
+ while keeping the manifest URL as the relative-resource base. The command
313
+ bounds every response, rejects redirects and unsafe ZIP structure, and
314
+ records request, source-revision, archive, manifest, and icon hashes. Treat
315
+ the mutable generator and icon URLs as best-effort external boundaries, then
316
+ inspect the packages in that ZIP with the Microsoft Store acceptance flow
317
+ before Partner Center submission.
318
+ After PWABuilder creates the Store packages, run the Windows-only package
319
+ gate with the current Windows SDK:
320
+ `pnpm exec mpgd target accept-package microsoft-store --packages <game-relative.msixbundle,game-relative.appxbundle>`.
321
+ The gate compares every bundle and payload identity with the submission
322
+ evidence and binds package hashes in `package-acceptance.json`. WACK is a
323
+ recommended optional local check; from an active administrator user session,
324
+ pass `--appcert <path-to-appcert.exe>` to require `OVERALL_RESULT="PASS"`
325
+ and bind its report hash.
288
326
  - Verse8 is a game-owned iframe web target that writes to `artifacts/verse8`.
289
327
  The adapter verifies the host-provided auth credential and distinguishes
290
328
  Verse8-signed accounts from self-signed guest accounts. Ads are available
@@ -3,6 +3,7 @@ dist/
3
3
  apps/*/dist/
4
4
  apps/target-devvit/generated/
5
5
  artifacts/
6
+ release-input/
6
7
  release-output/
7
8
  .mpgd.targets.generated.json
8
9
  .mpgd/
@@ -0,0 +1,29 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "productIdentity": {
4
+ "packageId": "REPLACE_ME",
5
+ "publisherId": "CN=REPLACE_ME",
6
+ "publisherDisplayName": "REPLACE_ME",
7
+ "reservedName": "REPLACE_ME"
8
+ },
9
+ "listing": {
10
+ "category": "Games",
11
+ "supportUrl": "https://example.com/support",
12
+ "personalData": {
13
+ "accessedOrTransmitted": true,
14
+ "privacyPolicyUrl": "https://example.com/privacy"
15
+ },
16
+ "locales": {
17
+ "en-US": {
18
+ "description": "REPLACE_ME",
19
+ "screenshots": ["store-assets/en-US/01.png"]
20
+ }
21
+ }
22
+ },
23
+ "ageRating": {
24
+ "questionnaireCompleted": false
25
+ },
26
+ "commerce": {
27
+ "mode": "disabled"
28
+ }
29
+ }
@@ -30,6 +30,8 @@
30
30
  "ait:console:deploy": "aitcc app deploy",
31
31
  "build:microsoft-store": "pnpm exec mpgd target build microsoft-store production --targets-file ./mpgd.targets.json --kit-path ${MPGD_KIT_PATH:-__DEFAULT_KIT_PATH__}",
32
32
  "smoke:microsoft-store": "pnpm exec mpgd target smoke microsoft-store --targets-file ./mpgd.targets.json --kit-path ${MPGD_KIT_PATH:-__DEFAULT_KIT_PATH__}",
33
+ "preflight:microsoft-store": "pnpm exec mpgd target preflight microsoft-store --targets-file ./mpgd.targets.json --kit-path ${MPGD_KIT_PATH:-__DEFAULT_KIT_PATH__}",
34
+ "package:microsoft-store": "pnpm exec mpgd target generate-package microsoft-store --targets-file ./mpgd.targets.json",
33
35
  "build:verse8": "pnpm exec mpgd target build verse8 production --targets-file ./mpgd.targets.json --kit-path ${MPGD_KIT_PATH:-__DEFAULT_KIT_PATH__}",
34
36
  "smoke:verse8": "pnpm exec mpgd target smoke verse8 --targets-file ./mpgd.targets.json --kit-path ${MPGD_KIT_PATH:-__DEFAULT_KIT_PATH__}",
35
37
  "build:devvit": "pnpm exec mpgd target build reddit production --targets-file ./mpgd.targets.json --kit-path ${MPGD_KIT_PATH:-__DEFAULT_KIT_PATH__}",