@lukoweb/apitogo 0.1.77 → 0.1.78
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/cli.js +1494 -1647
- package/docs/configuration/make-config.mdx +5 -5
- package/docs/deploy/apitogo.md +32 -126
- package/docs/deployment.md +6 -20
- package/docs/mcp/go-live.md +1 -1
- package/docs/quickstart.md +1 -1
- package/package.json +1 -1
|
@@ -7,7 +7,7 @@ description:
|
|
|
7
7
|
authentication settings.
|
|
8
8
|
---
|
|
9
9
|
|
|
10
|
-
The **`apitogo make-config
|
|
10
|
+
The **`apitogo config`** (alias: `make-config`) command writes **`apitogo.config.json`**. It can scaffold a portal
|
|
11
11
|
project (package.json, tsconfig, landing and user-panel stubs, thin `apitogo.config.tsx`) when those
|
|
12
12
|
files are missing, merge **site / theme / authentication** from flags or an interactive wizard, scan
|
|
13
13
|
`pages/` for navigation, and wire OpenAPI plus an **API Reference** link.
|
|
@@ -39,7 +39,7 @@ Landing and user panel are **always enabled** on new configs. The command does *
|
|
|
39
39
|
Run from your project root (where `apitogo.config.json` and `package.json` live):
|
|
40
40
|
|
|
41
41
|
```bash
|
|
42
|
-
apitogo
|
|
42
|
+
apitogo config
|
|
43
43
|
```
|
|
44
44
|
|
|
45
45
|
### Options
|
|
@@ -58,9 +58,9 @@ apitogo make-config
|
|
|
58
58
|
Examples:
|
|
59
59
|
|
|
60
60
|
```bash
|
|
61
|
-
apitogo
|
|
62
|
-
apitogo
|
|
63
|
-
apitogo
|
|
61
|
+
apitogo config --title "Books API"
|
|
62
|
+
apitogo config --theme '{"light":{"primary":"#111111"}}'
|
|
63
|
+
apitogo config --interactive
|
|
64
64
|
```
|
|
65
65
|
|
|
66
66
|
There is **no `--modules` flag**. Edit `modules` in `apitogo.config.json` if you need to change
|
package/docs/deploy/apitogo.md
CHANGED
|
@@ -1,145 +1,51 @@
|
|
|
1
|
-
|
|
2
|
-
title: Deploy with APIToGo CLI
|
|
3
|
-
---
|
|
1
|
+
# Deploy with APIToGo CLI
|
|
4
2
|
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
Publish your local portal (and optional API hub) to the APItoGo platform with
|
|
4
|
+
`apitogo apply`. This is the same engine as MCP `publish_dev_portal`.
|
|
7
5
|
|
|
8
|
-
|
|
9
|
-
use MCP **`publish_dev_portal`** / `apply_product_intent` mode `goLive` — see
|
|
10
|
-
[MCP go-live](../mcp/go-live.md).
|
|
6
|
+
## Prerequisites
|
|
11
7
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
8
|
+
- `APITOGO_API_KEY_ID` and `APITOGO_API_SECRET` in the environment
|
|
9
|
+
- A site directory with `apitogo.config.json` (use `apitogo init` / `apitogo config`)
|
|
10
|
+
- Secrets such as OIDC (and Stripe when you have paid plans) in `.env` as
|
|
11
|
+
`APITOGO_CONFIG_AUTHENTICATION__*`
|
|
16
12
|
|
|
17
|
-
##
|
|
13
|
+
## Apply everything
|
|
18
14
|
|
|
19
15
|
```bash
|
|
20
|
-
|
|
16
|
+
apitogo apply
|
|
21
17
|
```
|
|
22
18
|
|
|
23
|
-
|
|
19
|
+
Creates or links the platform project, provisions modules, syncs gateway plans,
|
|
20
|
+
deploys the API hub (when configured), updates the portal backend, and builds +
|
|
21
|
+
deploys the portal frontend.
|
|
24
22
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
1. Sign in to [apitogo.com](https://apitogo.com)
|
|
28
|
-
2. Create a new project or open an existing one
|
|
29
|
-
3. Navigate to Project settings and copy the deployment token
|
|
30
|
-
4. Run the following command:
|
|
31
|
-
|
|
32
|
-
```bash
|
|
33
|
-
apitogo deploy --deployment-token=<TOKEN> --env=<environment-name>
|
|
34
|
-
```
|
|
35
|
-
|
|
36
|
-
The `--env` value is the **environment name** your deploy server uses. It must match what is
|
|
37
|
-
configured for your project (see the APIToGo dashboard / deploy API).
|
|
38
|
-
|
|
39
|
-
Common patterns:
|
|
40
|
-
|
|
41
|
-
- **`production`** — main live site (default when `--env` is omitted)
|
|
42
|
-
- **Named non-production environments** — any label your backend accepts, for example `staging`,
|
|
43
|
-
`dev`, or `preview`
|
|
44
|
-
- **Multiple preview slots** — separate previews such as `preview-a` and `preview-b` when your
|
|
45
|
-
`/deploy` endpoint supports them:
|
|
46
|
-
|
|
47
|
-
```bash
|
|
48
|
-
apitogo deploy --deployment-token=<TOKEN> --env=preview-a
|
|
49
|
-
apitogo deploy --deployment-token=<TOKEN> --env=preview-b
|
|
50
|
-
```
|
|
51
|
-
|
|
52
|
-
If you do not provide `--env`, APIToGo deploys to `production` by default:
|
|
23
|
+
## Target specific resources
|
|
53
24
|
|
|
54
25
|
```bash
|
|
55
|
-
apitogo
|
|
26
|
+
apitogo apply --only apihub
|
|
27
|
+
apitogo apply --only portal-backend
|
|
28
|
+
apitogo apply --only portal-frontend
|
|
29
|
+
apitogo apply --only apihub,portal-frontend
|
|
30
|
+
apitogo apply --only portal-frontend --force
|
|
56
31
|
```
|
|
57
32
|
|
|
58
|
-
|
|
33
|
+
| Resource | What it updates |
|
|
34
|
+
| --- | --- |
|
|
35
|
+
| `apihub` | Gateway plans/baseline, API hub package + deploy, public routes |
|
|
36
|
+
| `portal-backend` | Dev-portal module settings and plan catalog |
|
|
37
|
+
| `portal-frontend` | Site build + Static Web App deploy |
|
|
59
38
|
|
|
60
|
-
|
|
61
|
-
piping to `jq` in CI).
|
|
39
|
+
Omit `--only` to apply all three. Use `--force` to redeploy even when hashes match.
|
|
62
40
|
|
|
63
|
-
|
|
64
|
-
same payload the server returns with `?jsonOnly=true`). On failure (including build errors),
|
|
65
|
-
stdout is `{"error":"..."}` and the process exits with a non-zero code.
|
|
66
|
-
- The CLI **suppresses** normal build and progress logs so they do not mix with that JSON.
|
|
67
|
-
- The deploy request still includes `?jsonOnly=true` on the endpoint.
|
|
41
|
+
## Other useful commands
|
|
68
42
|
|
|
69
43
|
```bash
|
|
70
|
-
apitogo
|
|
44
|
+
apitogo status # account + project + live checks
|
|
45
|
+
apitogo teardown --yes # delete the platform project
|
|
46
|
+
apitogo build # local production build
|
|
47
|
+
apitogo build --preview # preview the production build locally
|
|
71
48
|
```
|
|
72
49
|
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
```bash
|
|
76
|
-
apitogo deploy --deployment-token=<TOKEN> --env=preview --json-only
|
|
77
|
-
apitogo deploy --deployment-token=<TOKEN> --env=preview-a --json-only
|
|
78
|
-
```
|
|
79
|
-
|
|
80
|
-
## Deploy with GitHub Actions
|
|
81
|
-
|
|
82
|
-
You can automate deploys from GitHub so every merge to `main` updates production and every pull
|
|
83
|
-
request gets a **preview** URL.
|
|
84
|
-
|
|
85
|
-
### 1. Generate the workflow
|
|
86
|
-
|
|
87
|
-
From your documentation project root (the folder that contains `apitogo.config.json` and `package.json`),
|
|
88
|
-
run:
|
|
89
|
-
|
|
90
|
-
```bash
|
|
91
|
-
apitogo configure-github-workflow
|
|
92
|
-
```
|
|
93
|
-
|
|
94
|
-
This creates `.github/workflows/apitogo-deploy.yml` with two jobs:
|
|
95
|
-
|
|
96
|
-
- **Preview** — runs on pull requests targeting `main`. It deploys to an environment named like
|
|
97
|
-
`preview-pr-<number>` and exposes the preview URL on the GitHub Actions run.
|
|
98
|
-
- **Production** — runs on pushes to `main`. It deploys with the default production environment.
|
|
99
|
-
|
|
100
|
-
If the file already exists, pass `--force` to overwrite it.
|
|
101
|
-
|
|
102
|
-
### 2. Add your deployment token as a GitHub secret
|
|
103
|
-
|
|
104
|
-
1. In [APIToGo](https://apitogo.com), open your project and copy the **deployment token** from
|
|
105
|
-
project settings (the same token you use with `apitogo deploy`).
|
|
106
|
-
2. On GitHub, open your repository → **Settings** → **Secrets and variables** → **Actions**.
|
|
107
|
-
3. Create a new repository secret named **`APITOGO_TOKEN`** and paste the token.
|
|
108
|
-
|
|
109
|
-
The generated workflow reads that secret as `${{ secrets.APITOGO_TOKEN }}`.
|
|
110
|
-
|
|
111
|
-
### 3. Optional: GitHub environments
|
|
112
|
-
|
|
113
|
-
The workflow references **`preview`** and **`production`**
|
|
114
|
-
[environments](https://docs.github.com/en/actions/deployment/targeting-different-environments/using-environments-for-deployment).
|
|
115
|
-
If you use environment protection rules, create matching environments in the repo settings and
|
|
116
|
-
attach reviewers or branch filters as needed. If you do not use environments, the jobs still run;
|
|
117
|
-
you can simplify the workflow later to drop `environment:` blocks.
|
|
118
|
-
|
|
119
|
-
### 4. Commit and ship
|
|
120
|
-
|
|
121
|
-
Add the new workflow to version control, commit, and push:
|
|
122
|
-
|
|
123
|
-
```bash
|
|
124
|
-
git add .github/workflows/apitogo-deploy.yml
|
|
125
|
-
git commit -m "Add APIToGo GitHub Actions deploy workflow"
|
|
126
|
-
git push
|
|
127
|
-
```
|
|
128
|
-
|
|
129
|
-
After that, pushes and pull requests against `main` trigger deploys automatically. You can also run
|
|
130
|
-
the workflow manually from the **Actions** tab (**workflow_dispatch**).
|
|
131
|
-
|
|
132
|
-
## What to verify after deployment
|
|
133
|
-
|
|
134
|
-
After your site is live, check the following:
|
|
135
|
-
|
|
136
|
-
- Navigation load correctly
|
|
137
|
-
- Static assets such as images and logos resolve correctly
|
|
138
|
-
- OpenAPI references and API playground features load as expected
|
|
139
|
-
- Any custom domain or redirects are working properly
|
|
140
|
-
|
|
141
|
-
## Open APIToGo
|
|
142
|
-
|
|
143
|
-
To get started, sign in here:
|
|
144
|
-
|
|
145
|
-
- [APIToGo Dashboard](https://apitogo.com)
|
|
50
|
+
Multi-environment SWA deploy (`apitogo deploy --env …`) and
|
|
51
|
+
`apitogo configure-github-workflow` are removed. Use `apitogo apply` instead.
|
package/docs/deployment.md
CHANGED
|
@@ -1,22 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
title: Deploying APIToGo
|
|
3
|
-
---
|
|
1
|
+
# Deployment
|
|
4
2
|
|
|
5
|
-
|
|
3
|
+
| Path | Docs |
|
|
4
|
+
| --- | --- |
|
|
5
|
+
| **CLI** (`apitogo apply`) | [Deploy with APIToGo CLI](./deploy/apitogo.md) |
|
|
6
|
+
| **MCP / agents** | [Go live](./mcp/go-live.md) |
|
|
6
7
|
|
|
7
|
-
|
|
8
|
-
| ---- | ----- |
|
|
9
|
-
| **MCP go-live** (portal + plans + hosting) | [MCP go-live](./mcp/go-live.md) |
|
|
10
|
-
| **CLI** (`apitogo deploy` + token) | [Deploy with APIToGo CLI](./deploy/apitogo.md) |
|
|
11
|
-
| **Static host** (GitHub Pages, upload `dist`) | Below and sibling deploy guides |
|
|
12
|
-
|
|
13
|
-
## Build locally
|
|
14
|
-
|
|
15
|
-
Produce static HTML, JavaScript, and CSS for any host:
|
|
16
|
-
|
|
17
|
-
```bash
|
|
18
|
-
npm run build
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
Output is in `dist/`. Upload that folder, or use [direct upload](./deploy/direct-upload.md) /
|
|
22
|
-
[GitHub Pages](./deploy/github-pages.md).
|
|
8
|
+
Local-only builds: `apitogo build` (optional `--preview`). Platform publish is always `apitogo apply`.
|
package/docs/mcp/go-live.md
CHANGED
|
@@ -88,7 +88,7 @@ shape → deploy_backend → publish_dev_portal(skipBackendRedeploy: true)
|
|
|
88
88
|
| Path | Use when |
|
|
89
89
|
| ---------------------------- | ----------------------------------------------------- |
|
|
90
90
|
| MCP `publish_dev_portal` | Full product go-live (plans, auth, hosting, verify) |
|
|
91
|
-
| CLI `apitogo
|
|
91
|
+
| CLI `apitogo apply` | Publish config to platform (apihub + portal) |
|
|
92
92
|
|
|
93
93
|
See [Deploy with APIToGo CLI](../deploy/apitogo.md).
|
|
94
94
|
|
package/docs/quickstart.md
CHANGED
|
@@ -76,6 +76,6 @@ cd your-project-name
|
|
|
76
76
|
npm run dev
|
|
77
77
|
```
|
|
78
78
|
|
|
79
|
-
For an existing `pages/` + OpenAPI folder: `apitogo
|
|
79
|
+
For an existing `pages/` + OpenAPI folder: `apitogo config` (see
|
|
80
80
|
[Make config](./configuration/make-config.mdx)). That command writes `apitogo.config.json`. Site-only
|
|
81
81
|
deploy with a token: [Deploy with APIToGo CLI](./deploy/apitogo.md).
|