@lukoweb/create-apitogo 0.1.23 → 0.1.37
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/LICENSE.md +18 -18
- package/dist/index.js +5 -5
- package/dist/templates/default/js/.env.example +2 -2
- package/dist/templates/default/js/apis/openapi.yaml +806 -806
- package/dist/templates/default/js/apitogo.config.jsx +2 -10
- package/dist/templates/default/js/eslintrc.json +4 -4
- package/dist/templates/default/js/gitignore +32 -32
- package/dist/templates/default/js/pages/example.mdx +131 -131
- package/dist/templates/default/js/pages/introduction.mdx +20 -20
- package/dist/templates/default/js/public/logo-dark.svg +1 -1
- package/dist/templates/default/js/public/logo-light.svg +1 -1
- package/dist/templates/default/ts/.env.example +2 -2
- package/dist/templates/default/ts/.env.production +1 -0
- package/dist/templates/default/ts/apis/openapi.yaml +806 -806
- package/dist/templates/default/ts/apitogo.config.tsx +25 -11
- package/dist/templates/default/ts/apitogo.local.json +23 -0
- package/dist/templates/default/ts/eslintrc.json +6 -6
- package/dist/templates/default/ts/gitignore +32 -32
- package/dist/templates/default/ts/pages/example.mdx +132 -132
- package/dist/templates/default/ts/pages/introduction.mdx +20 -20
- package/dist/templates/default/ts/public/banner-dark.svg +100 -100
- package/dist/templates/default/ts/public/banner.svg +100 -100
- package/dist/templates/default/ts/public/logo-dark.svg +1 -1
- package/dist/templates/default/ts/public/logo-light.svg +1 -1
- package/dist/templates/default/ts/tsconfig.json +16 -16
- package/dist/templates/index.ts +88 -6
- package/dist/templates/types.ts +22 -22
- package/dist/templates/zuplo/README-template.md +40 -40
- package/dist/templates/zuplo/gitignore +32 -32
- package/dist/templates/zuplo/pages/introduction.mdx +153 -153
- package/dist/templates/zuplo/pages/markdown.mdx +108 -108
- package/dist/templates/zuplo/public/banner-dark.svg +100 -100
- package/dist/templates/zuplo/public/banner.svg +100 -100
- package/dist/templates/zuplo/tsconfig.json +16 -16
- package/package.json +8 -5
|
@@ -1,6 +1,24 @@
|
|
|
1
1
|
import type { ApitogoConfig } from "@lukoweb/apitogo";
|
|
2
|
+
import { devPortalBillingPlugin } from "@lukoweb/apitogo-plugin-dev-portal-billing";
|
|
2
3
|
|
|
3
4
|
const config: ApitogoConfig = {
|
|
5
|
+
authentication: {
|
|
6
|
+
type: "dev-portal",
|
|
7
|
+
},
|
|
8
|
+
plugins: [devPortalBillingPlugin()],
|
|
9
|
+
modules: {
|
|
10
|
+
landing: {
|
|
11
|
+
enabled: true,
|
|
12
|
+
path: "/",
|
|
13
|
+
layout: "landing",
|
|
14
|
+
},
|
|
15
|
+
userPanel: {
|
|
16
|
+
enabled: true,
|
|
17
|
+
dashboard: { enabled: true },
|
|
18
|
+
userManagement: { enabled: true },
|
|
19
|
+
plans: { enabled: true },
|
|
20
|
+
},
|
|
21
|
+
},
|
|
4
22
|
site: {
|
|
5
23
|
title: "__APP_TITLE__",
|
|
6
24
|
logo: {
|
|
@@ -25,16 +43,8 @@ const config: ApitogoConfig = {
|
|
|
25
43
|
label: "Getting Started",
|
|
26
44
|
icon: "sparkles",
|
|
27
45
|
items: [
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
file: "pages/introduction.mdx",
|
|
31
|
-
label: "Introduction",
|
|
32
|
-
},
|
|
33
|
-
{
|
|
34
|
-
type: "doc",
|
|
35
|
-
file: "pages/example.mdx",
|
|
36
|
-
label: "MDX examples",
|
|
37
|
-
},
|
|
46
|
+
"/introduction",
|
|
47
|
+
"/example",
|
|
38
48
|
{
|
|
39
49
|
type: "link",
|
|
40
50
|
icon: "folder-cog",
|
|
@@ -68,8 +78,12 @@ const config: ApitogoConfig = {
|
|
|
68
78
|
to: "/api",
|
|
69
79
|
label: "API Reference",
|
|
70
80
|
},
|
|
81
|
+
{
|
|
82
|
+
type: "link",
|
|
83
|
+
to: "/pricing",
|
|
84
|
+
label: "Pricing",
|
|
85
|
+
},
|
|
71
86
|
],
|
|
72
|
-
redirects: [{ from: "/", to: "/introduction" }],
|
|
73
87
|
apis: [
|
|
74
88
|
{
|
|
75
89
|
type: "file",
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
{
|
|
2
|
+
"siteName": "__APP_TITLE__",
|
|
3
|
+
"branding": { "title": "__APP_TITLE__" },
|
|
4
|
+
"plans": [
|
|
5
|
+
{
|
|
6
|
+
"sku": "free",
|
|
7
|
+
"displayName": "Free",
|
|
8
|
+
"isFree": true,
|
|
9
|
+
"limitsJson": "{\"rateLimit\":{\"calls\":10,\"renewalPeriodSeconds\":60}}",
|
|
10
|
+
"includedActionKeys": []
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
"sku": "pro",
|
|
14
|
+
"displayName": "Pro",
|
|
15
|
+
"isFree": false,
|
|
16
|
+
"priceAmount": 9.99,
|
|
17
|
+
"priceCurrency": "usd",
|
|
18
|
+
"billingPeriod": "monthly",
|
|
19
|
+
"limitsJson": "{\"rateLimit\":{\"calls\":100,\"renewalPeriodSeconds\":60},\"quota\":{\"calls\":50000,\"renewalPeriodDays\":1}}",
|
|
20
|
+
"includedActionKeys": []
|
|
21
|
+
}
|
|
22
|
+
]
|
|
23
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
{
|
|
2
|
-
"root": true,
|
|
3
|
-
"extends": "eslint:recommended",
|
|
4
|
-
"parser": "@typescript-eslint/parser",
|
|
5
|
-
"plugins": ["@typescript-eslint"]
|
|
6
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"root": true,
|
|
3
|
+
"extends": "eslint:recommended",
|
|
4
|
+
"parser": "@typescript-eslint/parser",
|
|
5
|
+
"plugins": ["@typescript-eslint"]
|
|
6
|
+
}
|
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
|
|
2
|
-
|
|
3
|
-
# dependencies
|
|
4
|
-
/node_modules
|
|
5
|
-
/.pnp
|
|
6
|
-
.pnp.*
|
|
7
|
-
.yarn/*
|
|
8
|
-
!.yarn/patches
|
|
9
|
-
!.yarn/plugins
|
|
10
|
-
!.yarn/releases
|
|
11
|
-
!.yarn/versions
|
|
12
|
-
|
|
13
|
-
# testing
|
|
14
|
-
/coverage
|
|
15
|
-
|
|
16
|
-
# zudoku
|
|
17
|
-
/dist/
|
|
18
|
-
|
|
19
|
-
# misc
|
|
20
|
-
.DS_Store
|
|
21
|
-
*.pem
|
|
22
|
-
|
|
23
|
-
# debug
|
|
24
|
-
npm-debug.log*
|
|
25
|
-
yarn-debug.log*
|
|
26
|
-
yarn-error.log*
|
|
27
|
-
|
|
28
|
-
# env files (can opt-in for commiting if needed)
|
|
29
|
-
.env*
|
|
30
|
-
|
|
31
|
-
# typescript
|
|
32
|
-
*.tsbuildinfo
|
|
1
|
+
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
|
|
2
|
+
|
|
3
|
+
# dependencies
|
|
4
|
+
/node_modules
|
|
5
|
+
/.pnp
|
|
6
|
+
.pnp.*
|
|
7
|
+
.yarn/*
|
|
8
|
+
!.yarn/patches
|
|
9
|
+
!.yarn/plugins
|
|
10
|
+
!.yarn/releases
|
|
11
|
+
!.yarn/versions
|
|
12
|
+
|
|
13
|
+
# testing
|
|
14
|
+
/coverage
|
|
15
|
+
|
|
16
|
+
# zudoku
|
|
17
|
+
/dist/
|
|
18
|
+
|
|
19
|
+
# misc
|
|
20
|
+
.DS_Store
|
|
21
|
+
*.pem
|
|
22
|
+
|
|
23
|
+
# debug
|
|
24
|
+
npm-debug.log*
|
|
25
|
+
yarn-debug.log*
|
|
26
|
+
yarn-error.log*
|
|
27
|
+
|
|
28
|
+
# env files (can opt-in for commiting if needed)
|
|
29
|
+
.env*
|
|
30
|
+
|
|
31
|
+
# typescript
|
|
32
|
+
*.tsbuildinfo
|
|
@@ -1,132 +1,132 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: MDX examples
|
|
3
|
-
description:
|
|
4
|
-
Callouts, fenced code, tabbed code, tables, task lists, links, badges, and buttons available in
|
|
5
|
-
APIToGo MDX pages.
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
This page lists patterns you can copy into any `.mdx` file under `pages/`. Your site title comes
|
|
9
|
-
front matter (`title` above) and appears in the sidebar for this route.
|
|
10
|
-
|
|
11
|
-
<Link to="/introduction">Introduction</Link> · <Link to="/api">API reference</Link> ·
|
|
12
|
-
<Badge variant="secondary">built-in</Badge> <Badge variant="outline">mdx</Badge>
|
|
13
|
-
|
|
14
|
-
## Callouts (directives)
|
|
15
|
-
|
|
16
|
-
:::note{title="Note"}
|
|
17
|
-
|
|
18
|
-
Neutral context readers should notice.
|
|
19
|
-
|
|
20
|
-
:::
|
|
21
|
-
|
|
22
|
-
:::tip{title="Tip"}
|
|
23
|
-
|
|
24
|
-
Suggested workflows or shortcuts.
|
|
25
|
-
|
|
26
|
-
:::
|
|
27
|
-
|
|
28
|
-
:::info{title="Info"}
|
|
29
|
-
|
|
30
|
-
Extra detail that is not urgent.
|
|
31
|
-
|
|
32
|
-
:::
|
|
33
|
-
|
|
34
|
-
:::caution{title="Caution"}
|
|
35
|
-
|
|
36
|
-
Something might break if misconfigured.
|
|
37
|
-
|
|
38
|
-
:::
|
|
39
|
-
|
|
40
|
-
:::danger{title="Danger"}
|
|
41
|
-
|
|
42
|
-
Destructive or security-sensitive actions.
|
|
43
|
-
|
|
44
|
-
:::
|
|
45
|
-
|
|
46
|
-
## Fenced code
|
|
47
|
-
|
|
48
|
-
Inline: `ApitogoConfig`, `apitogo dev`, `pages/example.mdx`.
|
|
49
|
-
|
|
50
|
-
```bash
|
|
51
|
-
apitogo dev
|
|
52
|
-
apitogo build
|
|
53
|
-
apitogo preview
|
|
54
|
-
```
|
|
55
|
-
|
|
56
|
-
```json
|
|
57
|
-
{ "example": true }
|
|
58
|
-
```
|
|
59
|
-
|
|
60
|
-
```ts
|
|
61
|
-
import type { ApitogoConfig } from "@lukoweb/apitogo";
|
|
62
|
-
|
|
63
|
-
const config: ApitogoConfig = {
|
|
64
|
-
site: { title: "My API docs" },
|
|
65
|
-
};
|
|
66
|
-
|
|
67
|
-
export default config;
|
|
68
|
-
```
|
|
69
|
-
|
|
70
|
-
## Tabbed code (`CodeTabs`)
|
|
71
|
-
|
|
72
|
-
<CodeTabs>
|
|
73
|
-
|
|
74
|
-
```bash title="curl"
|
|
75
|
-
curl -sS https://httpbin.org/get
|
|
76
|
-
```
|
|
77
|
-
|
|
78
|
-
```bash title="HTTPie"
|
|
79
|
-
http GET https://httpbin.org/get
|
|
80
|
-
```
|
|
81
|
-
|
|
82
|
-
```ts title="fetch"
|
|
83
|
-
const res = await fetch("https://httpbin.org/get");
|
|
84
|
-
console.log(await res.json());
|
|
85
|
-
```
|
|
86
|
-
|
|
87
|
-
</CodeTabs>
|
|
88
|
-
|
|
89
|
-
<CodeTabs>
|
|
90
|
-
|
|
91
|
-
```json title="JSON"
|
|
92
|
-
{ "status": "ok" }
|
|
93
|
-
```
|
|
94
|
-
|
|
95
|
-
```yaml title="YAML"
|
|
96
|
-
status: ok
|
|
97
|
-
```
|
|
98
|
-
|
|
99
|
-
</CodeTabs>
|
|
100
|
-
|
|
101
|
-
## Table
|
|
102
|
-
|
|
103
|
-
| Topic
|
|
104
|
-
|
|
|
105
|
-
| Config
|
|
106
|
-
| Pages
|
|
107
|
-
| OpenAPI | `apis/openapi.yaml`
|
|
108
|
-
|
|
109
|
-
## Lists
|
|
110
|
-
|
|
111
|
-
1. Edit Markdown or MDX under `pages/`.
|
|
112
|
-
2. Adjust `apitogo.config.tsx`.
|
|
113
|
-
3. Run `apitogo build` before deploy.
|
|
114
|
-
|
|
115
|
-
Task list (GFM):
|
|
116
|
-
|
|
117
|
-
- [x] Scaffold created
|
|
118
|
-
- [ ] Customize for your API
|
|
119
|
-
|
|
120
|
-
## Markdown
|
|
121
|
-
|
|
122
|
-
> Blockquote for quotes or asides.
|
|
123
|
-
|
|
124
|
-
**Bold**, _italic_, ~~strikethrough~~, and [link to API](/api).
|
|
125
|
-
|
|
126
|
-
---
|
|
127
|
-
|
|
128
|
-
## Button
|
|
129
|
-
|
|
130
|
-
<Button variant="outline" type="button">
|
|
131
|
-
Example button
|
|
132
|
-
</Button>
|
|
1
|
+
---
|
|
2
|
+
title: MDX examples
|
|
3
|
+
description:
|
|
4
|
+
Callouts, fenced code, tabbed code, tables, task lists, links, badges, and buttons available in
|
|
5
|
+
APIToGo MDX pages.
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
This page lists patterns you can copy into any `.mdx` file under `pages/`. Your site title comes
|
|
9
|
+
from front matter (`title` above) and appears in the sidebar for this route.
|
|
10
|
+
|
|
11
|
+
<Link to="/introduction">Introduction</Link> · <Link to="/api">API reference</Link> ·
|
|
12
|
+
<Badge variant="secondary">built-in</Badge> <Badge variant="outline">mdx</Badge>
|
|
13
|
+
|
|
14
|
+
## Callouts (directives)
|
|
15
|
+
|
|
16
|
+
:::note{title="Note"}
|
|
17
|
+
|
|
18
|
+
Neutral context readers should notice.
|
|
19
|
+
|
|
20
|
+
:::
|
|
21
|
+
|
|
22
|
+
:::tip{title="Tip"}
|
|
23
|
+
|
|
24
|
+
Suggested workflows or shortcuts.
|
|
25
|
+
|
|
26
|
+
:::
|
|
27
|
+
|
|
28
|
+
:::info{title="Info"}
|
|
29
|
+
|
|
30
|
+
Extra detail that is not urgent.
|
|
31
|
+
|
|
32
|
+
:::
|
|
33
|
+
|
|
34
|
+
:::caution{title="Caution"}
|
|
35
|
+
|
|
36
|
+
Something might break if misconfigured.
|
|
37
|
+
|
|
38
|
+
:::
|
|
39
|
+
|
|
40
|
+
:::danger{title="Danger"}
|
|
41
|
+
|
|
42
|
+
Destructive or security-sensitive actions.
|
|
43
|
+
|
|
44
|
+
:::
|
|
45
|
+
|
|
46
|
+
## Fenced code
|
|
47
|
+
|
|
48
|
+
Inline: `ApitogoConfig`, `apitogo dev`, `pages/example.mdx`.
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
apitogo dev
|
|
52
|
+
apitogo build
|
|
53
|
+
apitogo preview
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
```json
|
|
57
|
+
{ "example": true }
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
```ts
|
|
61
|
+
import type { ApitogoConfig } from "@lukoweb/apitogo";
|
|
62
|
+
|
|
63
|
+
const config: ApitogoConfig = {
|
|
64
|
+
site: { title: "My API docs" },
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
export default config;
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
## Tabbed code (`CodeTabs`)
|
|
71
|
+
|
|
72
|
+
<CodeTabs>
|
|
73
|
+
|
|
74
|
+
```bash title="curl"
|
|
75
|
+
curl -sS https://httpbin.org/get
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
```bash title="HTTPie"
|
|
79
|
+
http GET https://httpbin.org/get
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
```ts title="fetch"
|
|
83
|
+
const res = await fetch("https://httpbin.org/get");
|
|
84
|
+
console.log(await res.json());
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
</CodeTabs>
|
|
88
|
+
|
|
89
|
+
<CodeTabs>
|
|
90
|
+
|
|
91
|
+
```json title="JSON"
|
|
92
|
+
{ "status": "ok" }
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
```yaml title="YAML"
|
|
96
|
+
status: ok
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
</CodeTabs>
|
|
100
|
+
|
|
101
|
+
## Table
|
|
102
|
+
|
|
103
|
+
| Topic | Where to look |
|
|
104
|
+
| ------- | -------------------- |
|
|
105
|
+
| Config | `apitogo.config.tsx` |
|
|
106
|
+
| Pages | `pages/**/*.mdx` |
|
|
107
|
+
| OpenAPI | `apis/openapi.yaml` |
|
|
108
|
+
|
|
109
|
+
## Lists
|
|
110
|
+
|
|
111
|
+
1. Edit Markdown or MDX under `pages/`.
|
|
112
|
+
2. Adjust `apitogo.config.tsx`.
|
|
113
|
+
3. Run `apitogo build` before deploy.
|
|
114
|
+
|
|
115
|
+
Task list (GFM):
|
|
116
|
+
|
|
117
|
+
- [x] Scaffold created
|
|
118
|
+
- [ ] Customize for your API
|
|
119
|
+
|
|
120
|
+
## Markdown
|
|
121
|
+
|
|
122
|
+
> Blockquote for quotes or asides.
|
|
123
|
+
|
|
124
|
+
**Bold**, _italic_, ~~strikethrough~~, and [link to API](/api).
|
|
125
|
+
|
|
126
|
+
---
|
|
127
|
+
|
|
128
|
+
## Button
|
|
129
|
+
|
|
130
|
+
<Button variant="outline" type="button">
|
|
131
|
+
Example button
|
|
132
|
+
</Button>
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: Welcome to APIToGo
|
|
3
|
-
---
|
|
4
|
-
|
|
5
|
-
Thanks for choosing to use APIToGo to power your API documentation!
|
|
6
|
-
|
|
7
|
-
## Edit this page
|
|
8
|
-
|
|
9
|
-
To edit this page, open the `pages/introduction.mdx` file.
|
|
10
|
-
|
|
11
|
-
## Configuration
|
|
12
|
-
|
|
13
|
-
You can find the full configuration for your APIToGo site in the `apitogo.config.tsx` file.
|
|
14
|
-
|
|
15
|
-
For further information on how to customize your site, check out the
|
|
16
|
-
[APIToGo documentation](https://docs.apitogo.com).
|
|
17
|
-
|
|
18
|
-
## MDX building blocks
|
|
19
|
-
|
|
20
|
-
See [MDX examples](/example) for callouts, code blocks, tabs, tables, and common components.
|
|
1
|
+
---
|
|
2
|
+
title: Welcome to APIToGo
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
Thanks for choosing to use APIToGo to power your API documentation!
|
|
6
|
+
|
|
7
|
+
## Edit this page
|
|
8
|
+
|
|
9
|
+
To edit this page, open the `pages/introduction.mdx` file.
|
|
10
|
+
|
|
11
|
+
## Configuration
|
|
12
|
+
|
|
13
|
+
You can find the full configuration for your APIToGo site in the `apitogo.config.tsx` file.
|
|
14
|
+
|
|
15
|
+
For further information on how to customize your site, check out the
|
|
16
|
+
[APIToGo documentation](https://docs.apitogo.com).
|
|
17
|
+
|
|
18
|
+
## MDX building blocks
|
|
19
|
+
|
|
20
|
+
See [MDX examples](/example) for callouts, code blocks, tabs, tables, and common components.
|