@magmonium/one 0.4.19 → 0.4.20
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/assets/docs/en/app-repo.md +294 -0
- package/assets/i18n/en.json +1 -0
- package/assets/index.json +1 -1
- package/fesm2022/{magmonium-one-image-editor-Da8b-YIx.mjs → magmonium-one-image-editor-B2079TFM.mjs} +2 -2
- package/fesm2022/{magmonium-one-image-editor-Da8b-YIx.mjs.map → magmonium-one-image-editor-B2079TFM.mjs.map} +1 -1
- package/fesm2022/{magmonium-one-magmonium-one-DMTrzk7A.mjs → magmonium-one-magmonium-one-BLuMt3bj.mjs} +534 -55
- package/fesm2022/magmonium-one-magmonium-one-BLuMt3bj.mjs.map +1 -0
- package/fesm2022/{magmonium-one-otp-DN60WCy0.mjs → magmonium-one-otp-Kcns6JtV.mjs} +2 -2
- package/fesm2022/{magmonium-one-otp-DN60WCy0.mjs.map → magmonium-one-otp-Kcns6JtV.mjs.map} +1 -1
- package/fesm2022/{magmonium-one-password-ClxmbaAV.mjs → magmonium-one-password-C1VDuH8J.mjs} +2 -2
- package/fesm2022/{magmonium-one-password-ClxmbaAV.mjs.map → magmonium-one-password-C1VDuH8J.mjs.map} +1 -1
- package/fesm2022/{magmonium-one-toggle-CxTCwFOo.mjs → magmonium-one-toggle-BeNbv_Ox.mjs} +2 -2
- package/fesm2022/{magmonium-one-toggle-CxTCwFOo.mjs.map → magmonium-one-toggle-BeNbv_Ox.mjs.map} +1 -1
- package/fesm2022/magmonium-one.mjs +1 -1
- package/package.json +1 -1
- package/types/magmonium-one.d.ts +192 -7
- package/fesm2022/magmonium-one-magmonium-one-DMTrzk7A.mjs.map +0 -1
|
@@ -0,0 +1,294 @@
|
|
|
1
|
+
# Linking an mm App to GitHub
|
|
2
|
+
|
|
3
|
+
How an App's source gets into a GitHub repository, and how you and your
|
|
4
|
+
collaborators keep working on it from the editor. Releasing what is in that
|
|
5
|
+
repository is a separate step, covered in the release guide.
|
|
6
|
+
|
|
7
|
+
## What the repository holds
|
|
8
|
+
|
|
9
|
+
Each App has one repository: its **AppRepo**. It holds two things:
|
|
10
|
+
|
|
11
|
+
| Path | What it is |
|
|
12
|
+
| --- | --- |
|
|
13
|
+
| `.magmonium/` | The design: Screens, Features, state, rules, nav and assets as you composed them. This is what the editor reads back. |
|
|
14
|
+
| everything else | The emitted Angular app, complete. It builds and runs from a plain clone, without the editor. |
|
|
15
|
+
|
|
16
|
+
The Store records which repository belongs to which App. The repository's own
|
|
17
|
+
files only carry the App's id, so moving the App to another repository leaves
|
|
18
|
+
nothing stale behind.
|
|
19
|
+
|
|
20
|
+
One repository serves one App. A repository already linked to another App is
|
|
21
|
+
refused.
|
|
22
|
+
|
|
23
|
+
## Linking, step by step
|
|
24
|
+
|
|
25
|
+
Linking takes three steps. Steps 1 and 2 happen on GitHub, step 3 in
|
|
26
|
+
Magmonium. Do them in this order: Magmonium checks the repository at the
|
|
27
|
+
moment you link, so the GitHub side has to be ready first.
|
|
28
|
+
|
|
29
|
+
| Step | Where | Who |
|
|
30
|
+
| --- | --- | --- |
|
|
31
|
+
| 1. Create the repository | GitHub | anyone who can create repositories there |
|
|
32
|
+
| 2. Install the Magmonium GitHub App on it | GitHub | an admin of that repository |
|
|
33
|
+
| 3. Link it to the App | Store or editor | the App's Owner |
|
|
34
|
+
|
|
35
|
+
The person doing step 2 and the App's Owner are usually the same person, but
|
|
36
|
+
they do not have to be. Magmonium never asks for your GitHub password or a
|
|
37
|
+
GitHub token. The installation in step 2 is the only permission it uses.
|
|
38
|
+
|
|
39
|
+
### Step 1 — Create the repository
|
|
40
|
+
|
|
41
|
+
On GitHub, choose **New repository** under your account or an organization.
|
|
42
|
+
|
|
43
|
+
- **Name it after the App.** Using the App link (for example `m-orders`)
|
|
44
|
+
keeps things easy to find, but any name works.
|
|
45
|
+
- **Private or public.** Either works.
|
|
46
|
+
- **Contents.** Leave it empty. Adding a `README.md`, `LICENSE` or
|
|
47
|
+
`.gitignore` is fine. Do not add a `package.json` or any app code: the first
|
|
48
|
+
Push writes the whole app for you.
|
|
49
|
+
|
|
50
|
+
You can also reuse a repository that already holds a Magmonium design, that
|
|
51
|
+
is, one with a `.magmonium/` folder on its default branch. Do this, for
|
|
52
|
+
example, when you move an App to a new repository or restore one.
|
|
53
|
+
|
|
54
|
+
A repository that holds anything else, such as a hand-written Angular app, is
|
|
55
|
+
refused. It has no design for the editor to read, and the first Push would
|
|
56
|
+
overwrite its files.
|
|
57
|
+
|
|
58
|
+
### Step 2 — Install the Magmonium GitHub App
|
|
59
|
+
|
|
60
|
+
This step is what proves to Magmonium that the repository is yours to hand
|
|
61
|
+
over. GitHub only lets an admin of the repository install an app on it.
|
|
62
|
+
|
|
63
|
+
1. Open the install page:
|
|
64
|
+
**[github.com/apps/magmonium/installations/new](https://github.com/apps/magmonium/installations/new)**.
|
|
65
|
+
The same link appears as **Install the Magmonium GitHub App** next to the
|
|
66
|
+
repository field when you link, and again if a link is refused.
|
|
67
|
+
2. On GitHub, pick the **account or organization** that owns the repository.
|
|
68
|
+
3. Choose **Only select repositories** and select the repository from step 1.
|
|
69
|
+
*All repositories* also works, but gives Magmonium access to more than it
|
|
70
|
+
needs.
|
|
71
|
+
4. Press **Install**.
|
|
72
|
+
|
|
73
|
+
**If the GitHub App is already installed on that account**, GitHub shows
|
|
74
|
+
**Configure** instead of **Install**. Open it and add the new repository
|
|
75
|
+
under *Repository access*. Then press **Save**.
|
|
76
|
+
|
|
77
|
+
**For an organization repository**, an organization owner may need to install
|
|
78
|
+
the app or approve your request. If GitHub says *request sent*, the link only
|
|
79
|
+
works after an owner approves it.
|
|
80
|
+
|
|
81
|
+
Magmonium uses the installation only to read and write the files of the
|
|
82
|
+
repositories you selected, which is what Pull and Push need. Remove a
|
|
83
|
+
repository from the installation, or uninstall the app, and Magmonium can no
|
|
84
|
+
longer reach it.
|
|
85
|
+
|
|
86
|
+
### Step 3 — Link it to the App
|
|
87
|
+
|
|
88
|
+
Only the App's **Owner** can link. Collaborators see *Only the App's Owner can
|
|
89
|
+
link its repository.*
|
|
90
|
+
|
|
91
|
+
Enter the repository in any of these forms:
|
|
92
|
+
|
|
93
|
+
```text
|
|
94
|
+
https://github.com/acme/orders
|
|
95
|
+
https://github.com/acme/orders.git
|
|
96
|
+
git@github.com:acme/orders
|
|
97
|
+
acme/orders
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
You can link from three places.
|
|
101
|
+
|
|
102
|
+
#### When you create an App in the Store
|
|
103
|
+
|
|
104
|
+
1. In the Store, start **Create App**.
|
|
105
|
+
2. In the **Info** step, fill in **App Link**, **App Type** and
|
|
106
|
+
**Repository URL**. All three are required.
|
|
107
|
+
3. Continue. Magmonium creates the App and links the repository in one go.
|
|
108
|
+
- **Link accepted:** the wizard moves on to **Deploy Setup** and then
|
|
109
|
+
**How to Publish**.
|
|
110
|
+
- **Link refused:** the App is **not** created. The wizard stays on
|
|
111
|
+
**Info**, shows the reason, and offers **Install the Magmonium GitHub
|
|
112
|
+
App**. Fix the problem, then continue again.
|
|
113
|
+
|
|
114
|
+
While the App is still a draft, you can go back to **Info** and change the
|
|
115
|
+
**Repository URL**. A changed URL is checked again, exactly like the first
|
|
116
|
+
link.
|
|
117
|
+
|
|
118
|
+
#### From the editor, for an App you already have
|
|
119
|
+
|
|
120
|
+
1. In the editor's page menu, choose **Open App**.
|
|
121
|
+
2. Pick the App. If it has no repository yet, the editor shows **Link
|
|
122
|
+
repository** with the install link and a **GitHub repository** field.
|
|
123
|
+
3. Enter the repository and press **Link repository**.
|
|
124
|
+
4. **Link accepted:** the editor moves on to choosing a **Branch** to Pull
|
|
125
|
+
(`dev` by default). Pulling a fresh repository gives you an **empty**
|
|
126
|
+
workspace named after the App, ready to compose in. It replaces whatever
|
|
127
|
+
the workspace held before, so if you already composed something you want
|
|
128
|
+
to keep, use the next path instead.
|
|
129
|
+
|
|
130
|
+
#### From the editor, for a workspace with no App yet
|
|
131
|
+
|
|
132
|
+
If you composed first and have no App yet:
|
|
133
|
+
|
|
134
|
+
1. Choose **Open App**, then **Create App**. The editor offers this when the
|
|
135
|
+
workspace has Screens but no App.
|
|
136
|
+
2. Fill in the name, **App link**, type, description and **GitHub
|
|
137
|
+
repository**. The link is prefilled from the app's name.
|
|
138
|
+
3. Press **Create App**.
|
|
139
|
+
- **Link accepted:** the editor keeps your workspace, links it to the new
|
|
140
|
+
App, and goes straight to **Push**.
|
|
141
|
+
- **Link refused:** unlike the Store wizard, the App **is** created. The
|
|
142
|
+
editor shows the reason on the **Link repository** step, so you can fix
|
|
143
|
+
it and link again without creating a second App.
|
|
144
|
+
|
|
145
|
+
### Check that it worked
|
|
146
|
+
|
|
147
|
+
- In the Store, the App's deployment page shows the repository URL.
|
|
148
|
+
- In the editor, **Open App** for that App now goes straight to choosing a
|
|
149
|
+
**Branch** instead of asking for a repository.
|
|
150
|
+
- After your first Push, the repository on GitHub has a `dev` branch holding
|
|
151
|
+
`.magmonium/` and the full app, in a commit by `magmonium[bot]` that credits
|
|
152
|
+
you.
|
|
153
|
+
|
|
154
|
+
### When linking is refused
|
|
155
|
+
|
|
156
|
+
| Message | What it means | Fix |
|
|
157
|
+
| --- | --- | --- |
|
|
158
|
+
| That is not a GitHub repository URL | The text is not one of the forms above. | Paste the URL from the repository's GitHub page. |
|
|
159
|
+
| The Magmonium GitHub App is not installed on that repository | Step 2 is missing, was installed on a different repository, or is still waiting for an organization owner's approval. | [Install it](https://github.com/apps/magmonium/installations/new) on this exact repository (or add the repository under **Configure**), then link again. |
|
|
160
|
+
| That repository is already linked to another App | Each repository serves one App, even after it is renamed or moved on GitHub. | Create a new repository for this App. |
|
|
161
|
+
| That repository holds an app without a design. Use an empty one. | The default branch has files other than `README.md`, `LICENSE`, `.gitignore`, and no `.magmonium/` folder. | Use an empty repository. |
|
|
162
|
+
| GitHub refused — the app may have been uninstalled or the repository deleted | GitHub would not answer for that repository. | Check that the repository exists and the GitHub App is still installed on it. |
|
|
163
|
+
| This server has no GitHub App configured | This Magmonium server is not set up for GitHub. | Contact the platform admin. |
|
|
164
|
+
| Only the App's Owner can link its repository. | You are a Collaborator. | Ask the Owner to link it. |
|
|
165
|
+
|
|
166
|
+
### Moving to another repository
|
|
167
|
+
|
|
168
|
+
The Owner can link the App to a different repository at any time, under the
|
|
169
|
+
same three steps and the same rules. Nothing is copied: the old repository
|
|
170
|
+
keeps what it has, and the next Push writes the whole app into the new one
|
|
171
|
+
from scratch. Deploys are not affected. They use your deploy token, not the
|
|
172
|
+
repository.
|
|
173
|
+
|
|
174
|
+
Remember to set the release secrets again in the new repository (see the
|
|
175
|
+
release guide).
|
|
176
|
+
|
|
177
|
+
### Reinstalled the GitHub App?
|
|
178
|
+
|
|
179
|
+
If you uninstalled and reinstalled the Magmonium GitHub App, Pull and Push
|
|
180
|
+
fail with *GitHub refused*. The Owner fixes this by linking the **same**
|
|
181
|
+
repository again. Linking an App to its own repository is always allowed.
|
|
182
|
+
|
|
183
|
+
## Who can write
|
|
184
|
+
|
|
185
|
+
| Role | Link a repository | Pull | Push | Create a branch |
|
|
186
|
+
| --- | --- | --- | --- | --- |
|
|
187
|
+
| Owner | yes | yes | yes | yes |
|
|
188
|
+
| Collaborator | no | yes | yes | yes |
|
|
189
|
+
| Anyone else | no | no | no | no |
|
|
190
|
+
|
|
191
|
+
Collaborators do **not** need to be added on GitHub. Every write goes through
|
|
192
|
+
the Magmonium GitHub App and is allowed by the Store role alone, so removing
|
|
193
|
+
someone from the App also ends their access to the repository.
|
|
194
|
+
|
|
195
|
+
Commits are made by `magmonium[bot]` and credit the person who pushed with a
|
|
196
|
+
`Co-authored-by:` line.
|
|
197
|
+
|
|
198
|
+
## Working from the editor
|
|
199
|
+
|
|
200
|
+
Open the editor and pick the App. You can also compose without one, using
|
|
201
|
+
**Continue unlinked**: Save, Download and Run all still work. Push appears once
|
|
202
|
+
you create an App for the workspace. Its link is prefilled from the app's name.
|
|
203
|
+
|
|
204
|
+
### The everyday loop
|
|
205
|
+
|
|
206
|
+
| Gesture | Where it writes | When |
|
|
207
|
+
| --- | --- | --- |
|
|
208
|
+
| **Save** | your linked local folder | as often as you like |
|
|
209
|
+
| **Run** / **Sync** | the Run window | to see the app running |
|
|
210
|
+
| **Push** | a branch of the AppRepo | when a piece of work is done |
|
|
211
|
+
|
|
212
|
+
Push is the last step after local work, not something to press every few
|
|
213
|
+
minutes.
|
|
214
|
+
|
|
215
|
+
### Pull
|
|
216
|
+
|
|
217
|
+
**Pull** replaces the workspace with the design from one branch (`dev` unless
|
|
218
|
+
you pick another). The editor rebuilds the code from the design. It never
|
|
219
|
+
reads the emitted code back.
|
|
220
|
+
|
|
221
|
+
If the workspace has edits you have not Pushed, Pull asks first and tells you
|
|
222
|
+
what it will drop. There is only one workspace.
|
|
223
|
+
|
|
224
|
+
A branch that does not exist yet is read from the repository's default branch.
|
|
225
|
+
|
|
226
|
+
### Push
|
|
227
|
+
|
|
228
|
+
**Push** makes one commit holding the emitted app and the design.
|
|
229
|
+
|
|
230
|
+
- **Branch.** Pushes go to `dev` by default. `dev` is created from the default
|
|
231
|
+
branch on the first Push.
|
|
232
|
+
- **Never `main`.** `main` takes changes by pull request on GitHub.
|
|
233
|
+
- **Commit message.** The editor drafts it in the form
|
|
234
|
+
`type(feature): few words`, from what changed in the design since your last
|
|
235
|
+
Pull or Push. Your AI provider writes the draft if you have set one up. You
|
|
236
|
+
always see the message and can edit it before it goes.
|
|
237
|
+
- **What it deletes.** A Push removes files only inside the folders the editor
|
|
238
|
+
owns: `mag_assets/`, `src/app/features/`, `src/app/pages/`,
|
|
239
|
+
`src/app/widgets/` and `.magmonium/`. Hand-written code in
|
|
240
|
+
`src/app/custom/`, the shell, and anything else you added are never deleted.
|
|
241
|
+
- **Blocked.** Push refuses while the design has violations or a function body
|
|
242
|
+
that does not compile. The editor lists the reasons.
|
|
243
|
+
|
|
244
|
+
### When the branch has moved
|
|
245
|
+
|
|
246
|
+
Push only goes through if the branch is still where you last Pulled or Pushed
|
|
247
|
+
it. If someone else pushed in the meantime, you see
|
|
248
|
+
*The branch has moved since you pulled*. Push is never forced. You have two
|
|
249
|
+
options:
|
|
250
|
+
|
|
251
|
+
- **Pull again.** You get their changes, but you lose your unpushed edits.
|
|
252
|
+
- **Push to a new branch.** Your work lands on its own branch, for example
|
|
253
|
+
`feature/my-change`. Merge it on GitHub with a pull request.
|
|
254
|
+
|
|
255
|
+
To avoid this when several people work on one App, give each person their own
|
|
256
|
+
branch: use **+ New branch** in the branch picker.
|
|
257
|
+
|
|
258
|
+
## Branches
|
|
259
|
+
|
|
260
|
+
| Branch | Role |
|
|
261
|
+
| --- | --- |
|
|
262
|
+
| `main` | Releases. Changes arrive only by pull request on GitHub. CD runs here. |
|
|
263
|
+
| `dev` | The default Push target. Open pull requests from here into `main`. |
|
|
264
|
+
| `feature/...` | Optional. One per person or per piece of work. |
|
|
265
|
+
|
|
266
|
+
**Create Branch** makes a branch at the commit your workspace stands on, or at
|
|
267
|
+
the head of the default branch. Branch names may use letters, digits, `.`, `_`,
|
|
268
|
+
`-` and `/`. A branch can only be created once the repository has at least one
|
|
269
|
+
commit. Push first to start it.
|
|
270
|
+
|
|
271
|
+
## From repository to Store
|
|
272
|
+
|
|
273
|
+
Linking and pushing never deploy anything. The path to users is:
|
|
274
|
+
|
|
275
|
+
1. **Push** to `dev` from the editor.
|
|
276
|
+
2. Open a **pull request** `dev → main` on GitHub. CI checks it.
|
|
277
|
+
3. Bump `version:` in `mag_assets/remote/<app>.yml` and **merge**. CD builds
|
|
278
|
+
the bundle and deploys it to the App's beta tier.
|
|
279
|
+
4. **Preview** beta from the Store. The Owner then **Publishes** it to users.
|
|
280
|
+
|
|
281
|
+
The release guide covers the repository secrets, the deploy token, and the
|
|
282
|
+
version gate that decides when CD deploys.
|
|
283
|
+
|
|
284
|
+
## Troubleshooting
|
|
285
|
+
|
|
286
|
+
| Message | What happened | Fix |
|
|
287
|
+
| --- | --- | --- |
|
|
288
|
+
| This App has no linked repository | The App has no AppRepo yet. | The Owner links one. |
|
|
289
|
+
| The repository has no commits yet. Push first to start it | You tried to create a branch in an empty repository. | Push once, then create the branch. |
|
|
290
|
+
| main takes changes by pull request on GitHub | You tried to Push to, or create, `main`. | Push to `dev` or a feature branch. |
|
|
291
|
+
| This branch exists, pick it from the list | The new branch name is taken. | Pick that branch, or choose another name. |
|
|
292
|
+
| Nothing to Push. The workspace matches its last Pull or Push. | There are no design changes. | None needed. |
|
|
293
|
+
| The design in this branch could not be read | The `.magmonium/` folder on that branch is damaged or was edited by hand. | Restore it from history on GitHub, or Pull another branch. |
|
|
294
|
+
| GitHub refused — the app may have been uninstalled or the repository deleted | GitHub refused the request. | [Reinstall the GitHub App](https://github.com/apps/magmonium/installations/new), then have the Owner link the same repository again. |
|
package/assets/i18n/en.json
CHANGED
|
@@ -593,6 +593,7 @@
|
|
|
593
593
|
"pinned": "Pinned",
|
|
594
594
|
"pitcairn-islands": "Pitcairn Islands",
|
|
595
595
|
"please-select": "Please select",
|
|
596
|
+
"plugin-screen-not-found": "This app offers no plugin by that name",
|
|
596
597
|
"poland": "Poland",
|
|
597
598
|
"portfolio": "Portfolio",
|
|
598
599
|
"portfolio-analysis": "Portfolio Analysis",
|