@wix/himalaya-cli 0.1545.0 → 0.1546.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.mjs +912 -749
- package/guides/himi-json-output.md +29 -0
- package/guides/iap-products.md +49 -4
- package/package.json +2 -2
|
@@ -493,3 +493,32 @@ Apple provisioning commands (`draft`, `plan`, `apply`, `status`, `screenshots`)
|
|
|
493
493
|
legacy `--profile` combined with Catalog registration/route selectors as `invalid_usage`,
|
|
494
494
|
before reading inputs or credentials. `connect` retains its intentional legacy profile plus
|
|
495
495
|
Catalog mapping route and registration check.
|
|
496
|
+
|
|
497
|
+
## Apple-key onboarding (`himi store apple-keys`)
|
|
498
|
+
|
|
499
|
+
`setup` and `status` emit JSON with `ok`, `app`, `site`, `bundleId`, `asc`, `iap`,
|
|
500
|
+
`ready`, `purchasesAppId`, and `completed`. `asc` carries `present` and available
|
|
501
|
+
`keyId`/`issuerId`; `iap` carries `present`. A group omitted during setup has
|
|
502
|
+
`present: null`, `state: "not_checked"`. A failed status read has `present: null`,
|
|
503
|
+
`state: "unavailable"`; the other service is still read and reported, and the
|
|
504
|
+
command exits 1 with `apple_keys_failed`. Setup also attempts both selected uploads
|
|
505
|
+
independently and reports the successful writes if either service fails. No private
|
|
506
|
+
key is returned. A successful
|
|
507
|
+
read exits 0 even when `ready` is false. Dry runs add `dryRun: true` and `planned`.
|
|
508
|
+
`completed` names writes confirmed during this invocation (`asc`, `purchases_app`,
|
|
509
|
+
`iap`); it is not a transaction or a guarantee that a timed-out write did not land.
|
|
510
|
+
|
|
511
|
+
| Code | Meaning |
|
|
512
|
+
|---|---|
|
|
513
|
+
| `invalid_usage` | Invalid identity, incomplete key flags, invalid/unreadable key or a key inside the repository, or missing `--yes`. Exit 2; no key writes. |
|
|
514
|
+
| `owner_session_unavailable` | Himi/Wix owner credentials or target configuration could not be resolved. `error` retains the session diagnostic. |
|
|
515
|
+
| `apple_keys_failed` | A service call, authorization check or read-back failed. Exit 1; earlier writes listed in `completed` remain stored. Read status before retrying. |
|
|
516
|
+
|
|
517
|
+
The ASC endpoint (`GET`/`POST /v1/admin/store/asc-key`) also returns stable `code`
|
|
518
|
+
values on failures: `unauthorized`, `token_revoked`, `revocation_check_unavailable`,
|
|
519
|
+
`method_not_allowed`, `invalid_input`, `invalid_app_id`, `invalid_site_id`,
|
|
520
|
+
`forbidden_cross_tenant`, `forbidden_site`, `invalid_asc_key`,
|
|
521
|
+
`apple_keys_unconfigured`, `apple_keys_not_saved`, `build_secrets_busy`, or
|
|
522
|
+
`apple_keys_unavailable`. `build_secrets_busy` is HTTP 409: another ASC upload or
|
|
523
|
+
push setup holds the site; retry after it finishes. Responses have `Cache-Control:
|
|
524
|
+
no-store`; both methods require app authority and current Wix site ownership.
|
package/guides/iap-products.md
CHANGED
|
@@ -33,6 +33,51 @@ catalogs. Subscriptions are refused before anything reaches Apple.
|
|
|
33
33
|
|
|
34
34
|
These key and profile prerequisites apply to direct Apple mode. There is **no ambient fallback**: direct mode requires `--profile`, and exported `ASC_*` variables never select the account. Managed mode below uses no local `.p8`.
|
|
35
35
|
|
|
36
|
+
## Set up the owner's Apple keys
|
|
37
|
+
|
|
38
|
+
Use `himi store apple-keys setup` to upload either key independently of push setup
|
|
39
|
+
and local signing profiles. The **App Store Connect API key** is stored in Branded
|
|
40
|
+
BuildSecrets for Catalog. The separate **In-App Purchase key** is stored on the
|
|
41
|
+
purchases app using the purchases service's `SetAppleCredentials` operation.
|
|
42
|
+
Create the latter under App Store Connect → Users and Access → Integrations →
|
|
43
|
+
In-App Purchase; an ASC API key cannot replace it.
|
|
44
|
+
|
|
45
|
+
Sign into the owner's Wix account (`wix login`) and Himi (`himi login --browser
|
|
46
|
+
--target wix`), and use an app slug that account already owns. Keep both `.p8`
|
|
47
|
+
files outside the repository, including after resolving symlinks.
|
|
48
|
+
|
|
49
|
+
```sh
|
|
50
|
+
himi store apple-keys setup --app <slug> --site <metaSiteId> --bundle-id <bundle> \
|
|
51
|
+
--asc-key-file /private/keys/asc.p8 --asc-key-id <id> --asc-issuer-id <issuer> \
|
|
52
|
+
--iap-key /private/keys/iap.p8 --iap-key-id <id> --iap-issuer-id <issuer> --yes
|
|
53
|
+
himi store apple-keys status --app <slug> --site <metaSiteId> --bundle-id <bundle> --json
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
Each key's three flags must be supplied together; omit the other group to upload
|
|
57
|
+
only one key. Setup contacts only the services for the supplied key groups; an
|
|
58
|
+
unselected group reports `present: null`, `state: "not_checked"`. Each group supplies
|
|
59
|
+
its own issuer ID. `setup --dry-run` validates
|
|
60
|
+
local inputs and reads stored status without registering an app or uploading keys.
|
|
61
|
+
Without `--dry-run`, setup requires `--yes`; supplied keys replace the corresponding
|
|
62
|
+
stored key. An IAP upload registers the bundle's purchases app if it does not exist,
|
|
63
|
+
and reuses an existing registration. It does not connect the payment provider or
|
|
64
|
+
create product mappings: run `himi store iap connect` afterward.
|
|
65
|
+
|
|
66
|
+
Status returns presence for each key, ASC identifiers when available, and the
|
|
67
|
+
`purchasesAppId` to use with Catalog commands. `ready` means both keys are stored;
|
|
68
|
+
it does not prove Apple permissions, product readiness or payment-provider setup.
|
|
69
|
+
Private keys are never returned or saved locally. Both commands emit JSON; a
|
|
70
|
+
successful status read exits 0 even when a key is missing. Status reads both services
|
|
71
|
+
independently; if one fails, it exits 1 but retains the other result and marks the
|
|
72
|
+
failed group `present: null`, `state: "unavailable"`. Setup reports completed
|
|
73
|
+
writes if a later step fails. When both keys are selected, a failure in one service
|
|
74
|
+
does not prevent the other upload; read status before retrying. The ASC upload preserves
|
|
75
|
+
existing signing, Google Play and live Ping credentials, and refuses when it cannot
|
|
76
|
+
read the credentials needed for preservation. Concurrent ASC uploads and push setup
|
|
77
|
+
exclude each other through the same site lease; a busy site returns HTTP 409.
|
|
78
|
+
It never provisions certificates,
|
|
79
|
+
profiles, APNs or Firebase. Containers Builder is not used.
|
|
80
|
+
|
|
36
81
|
## Managed provisioning through Catalog
|
|
37
82
|
|
|
38
83
|
Provisioning commands use managed mode when `--profile` is absent; `--managed`
|
|
@@ -139,10 +184,10 @@ with Catalog's current revision, preserving the SKU, item identity, and metadata
|
|
|
139
184
|
Managed `connect` never opens an Apple key on the Mac. It reuses an In-App Purchase key
|
|
140
185
|
already stored by purchases. If there is none, it reports `apple_key_missing`; an App Store
|
|
141
186
|
Connect API key is a different credential and cannot replace it. The purchases contract
|
|
142
|
-
supports encrypted key writes but not reading a key back
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
187
|
+
supports encrypted key writes but not reading a key back. Upload the missing key with
|
|
188
|
+
`himi store apple-keys setup` and its IAP key flags, then rerun managed connect.
|
|
189
|
+
Explicit legacy `--profile` plus `--iap-key` also remains available. Supplying local
|
|
190
|
+
key flags directly to managed connect is refused.
|
|
146
191
|
|
|
147
192
|
For a managed draft, pass the Catalog registration and route:
|
|
148
193
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wix/himalaya-cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.1546.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "himi — the Himalaya authoring CLI. Build a Tier-5 content package on your own machine, push it to the production serve as a draft, preview it on web + Himi Player, and read worker logs back — the remote dev loop. Wraps @himalaya/serve-cli for transport.",
|
|
6
6
|
"keywords": [
|
|
@@ -71,5 +71,5 @@
|
|
|
71
71
|
"artifactId": "himalaya-cli"
|
|
72
72
|
}
|
|
73
73
|
},
|
|
74
|
-
"falconPackageHash": "
|
|
74
|
+
"falconPackageHash": "6eb46b33ce580fb1c2f054eb3a6290fb7808f9af9be1177cbdd5a10e"
|
|
75
75
|
}
|