@radhya/mach 2.6.3 → 2.6.4
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 +115 -1
- package/dist/chunk-3JTATPDQ.js +767 -0
- package/dist/chunk-QFXPWC5D.js +4 -1
- package/dist/commands/isolated-upload.js +1 -1
- package/dist/credentials-ZLSHZMEE.js +1 -0
- package/dist/index.js +2485 -1
- package/package.json +1 -1
- package/dist/chunk-SGLXKXUK.js +0 -46
- package/dist/credentials-ZGGJWXVT.js +0 -1
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
**Cloud Build & Delivery for React Native, Expo, and Flutter**
|
|
4
4
|
|
|
5
|
-
Mach is a CLI that builds, signs, audits, versions, and
|
|
5
|
+
Mach is a CLI that builds, signs, audits, versions, submits, and deploys static web releases for Flutter, React Native, and Expo apps locally or in the cloud.
|
|
6
6
|
|
|
7
7
|
## Installation
|
|
8
8
|
|
|
@@ -67,9 +67,121 @@ mach build --platform web # Flutter projects
|
|
|
67
67
|
| `mach audit` | Check project health, delivery impact, and security locally |
|
|
68
68
|
| `mach agent` | Manage the local device discovery agent for Install Hub |
|
|
69
69
|
| `mach host` | Set up S3 static hosting and CloudFront |
|
|
70
|
+
| `mach web` | Deploy and manage static web releases through Mach Web Hosting |
|
|
70
71
|
| `mach sitemap` | Generate sitemap.xml from Expo Router app routes |
|
|
71
72
|
| `mach deeplink` | Configure and verify universal links and Android App Links |
|
|
72
73
|
|
|
74
|
+
## Static Web Hosting
|
|
75
|
+
|
|
76
|
+
`mach web` is Mach's managed static release workflow for Expo web, React Native
|
|
77
|
+
Web, Flutter web, and any finished static site. It is deliberately separate
|
|
78
|
+
from both `mach host` (the existing AWS S3 + CloudFront setup) and OTA updates.
|
|
79
|
+
|
|
80
|
+
Build your app on a developer machine or in CI, then upload only its finished
|
|
81
|
+
static directory. Each deployment receives an immutable preview URL. Mach
|
|
82
|
+
aliases point to immutable releases, so a promotion or rollback never rebuilds
|
|
83
|
+
or overwrites a previously published site.
|
|
84
|
+
|
|
85
|
+
| Address | Example for `shop` |
|
|
86
|
+
| --- | --- |
|
|
87
|
+
| Production | `https://shop.getmach.dev` |
|
|
88
|
+
| Staging | `https://shop--staging.getmach.dev` |
|
|
89
|
+
| Immutable preview | `https://shop--d_<deployment-id>.getmach.dev` |
|
|
90
|
+
|
|
91
|
+
Before the first web deployment, the project owner chooses the Production
|
|
92
|
+
subdomain in **Dashboard → Web Hosting**. The project slug is the default. The
|
|
93
|
+
name is reserved globally and locks after the first deployment so shared URLs
|
|
94
|
+
remain permanent.
|
|
95
|
+
|
|
96
|
+
### Reuse existing mobile profiles
|
|
97
|
+
|
|
98
|
+
Do not rename mobile profiles to match a hostname. Add an explicit `web` block
|
|
99
|
+
to the profiles you already use. It maps release intent to a web alias and tells
|
|
100
|
+
Mach where the finished static output is written:
|
|
101
|
+
|
|
102
|
+
```json
|
|
103
|
+
{
|
|
104
|
+
"build": {
|
|
105
|
+
"qa-mobile": {
|
|
106
|
+
"distribution": "internal",
|
|
107
|
+
"web": { "alias": "staging", "output": "dist" }
|
|
108
|
+
},
|
|
109
|
+
"store-release": {
|
|
110
|
+
"distribution": "store",
|
|
111
|
+
"web": { "alias": "production", "output": "dist" }
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
`web.alias` accepts `production` or `staging`; it defaults to `production`.
|
|
118
|
+
`web.output` is the output folder, such as `dist` for Expo/React Native Web or
|
|
119
|
+
`build/web` for Flutter. Mach does not infer an address from a profile name and
|
|
120
|
+
does not inject mobile profile secrets into static browser files.
|
|
121
|
+
|
|
122
|
+
### Deploy releases
|
|
123
|
+
|
|
124
|
+
The output directory must have `index.html` at its root.
|
|
125
|
+
|
|
126
|
+
```bash
|
|
127
|
+
# Upload a finished Expo or React Native Web export
|
|
128
|
+
mach web deploy --output dist
|
|
129
|
+
|
|
130
|
+
# Run Expo export locally, then upload the result
|
|
131
|
+
mach web deploy --build --profile store-release
|
|
132
|
+
|
|
133
|
+
# Run flutter build web --release locally, then upload build/web
|
|
134
|
+
mach web deploy --build --profile qa-mobile
|
|
135
|
+
|
|
136
|
+
# Create an immutable review link without moving any alias
|
|
137
|
+
mach web deploy --output build/web --alias staging --no-promote
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
Use the deployment ID to control aliases without another build:
|
|
141
|
+
|
|
142
|
+
```bash
|
|
143
|
+
mach web list
|
|
144
|
+
mach web promote d_0123abcd --alias production
|
|
145
|
+
mach web rollback --alias production
|
|
146
|
+
mach web status
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
The dashboard Web Hosting page provides the same controls and shows the
|
|
150
|
+
deployment's file count, size, profile, Git branch, commit, immutable preview,
|
|
151
|
+
and active aliases. Web deployments also appear in Release History alongside
|
|
152
|
+
native builds.
|
|
153
|
+
|
|
154
|
+
### CI
|
|
155
|
+
|
|
156
|
+
Install the CLI with a scoped `MACH_TOKEN`, then use the same committed profile
|
|
157
|
+
mapping that developers use locally:
|
|
158
|
+
|
|
159
|
+
```bash
|
|
160
|
+
npm install -g @radhya/mach@latest
|
|
161
|
+
mach web deploy --build --profile store-release --message "$GIT_COMMIT"
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
For pull requests, use `--no-promote`; promote the reviewed deployment in a
|
|
165
|
+
protected release step. File uploads go directly from the CLI to private R2
|
|
166
|
+
storage using short-lived signed URLs. The Mach API stores release metadata and
|
|
167
|
+
does not proxy your static files.
|
|
168
|
+
|
|
169
|
+
### Scope and customer domains
|
|
170
|
+
|
|
171
|
+
Mach Web Hosting serves static assets and SPA navigation fallback. It does not
|
|
172
|
+
deploy customer serverless functions, SSR, databases, or server code. A web app
|
|
173
|
+
can call your normal API, but browser-visible values are public: keep database
|
|
174
|
+
credentials and privileged secrets in a backend.
|
|
175
|
+
|
|
176
|
+
The included `*.getmach.dev` project addresses are available immediately.
|
|
177
|
+
Customer-owned domains are a Premium capability enabled only after Cloudflare
|
|
178
|
+
SSL for SaaS is configured by the Mach operator. When enabled, customer domains
|
|
179
|
+
always point to Production for now:
|
|
180
|
+
|
|
181
|
+
```bash
|
|
182
|
+
mach web domain add --domain www.customer.com
|
|
183
|
+
```
|
|
184
|
+
|
|
73
185
|
## Managed Maestro Testing
|
|
74
186
|
|
|
75
187
|
Mach's E2E testing layer is being implemented to run Maestro without requiring Maestro Cloud:
|
|
@@ -519,6 +631,8 @@ and continue to use `"."`.
|
|
|
519
631
|
| `flutter.dartDefinesFromEnv` | Environment-key names passed with `--dart-define`. Values are compiled into the app and must not be secrets |
|
|
520
632
|
| `flutter.obfuscate` | Obfuscate Dart code for Android/iOS release builds and retain downloadable split debug symbols |
|
|
521
633
|
| `flutter.splitDebugInfo` | Retain downloadable split debug symbols without otherwise changing app behavior |
|
|
634
|
+
| `web.alias` | Web release alias for this profile: `production` or `staging`; defaults to `production` |
|
|
635
|
+
| `web.output` | Finished static output directory for `mach web deploy`, such as `dist` or `build/web` |
|
|
522
636
|
| `preBuild` / `postBuild` | Shell command or script reference to run around the build |
|
|
523
637
|
| `envGroups` | Array of environment group names to merge into this profile |
|
|
524
638
|
|