@morda-dev/create-sdk 1.1.4 → 1.2.1
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 +32 -27
- package/package.json +9 -12
- package/template/api-extractor.json +10 -5
- package/template/package.json +14 -0
package/README.md
CHANGED
|
@@ -5,9 +5,12 @@
|
|
|
5
5
|
|
|
6
6
|
> Scaffold a **production-ready TypeScript SDK** with a **strict public API**.
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
> ⚠️ Early-stage project (v0.x).
|
|
9
|
+
> Public API is intentionally strict, but may evolve before v1.0.0.
|
|
10
|
+
|
|
11
|
+
`create-sdk` is a CLI tool that bootstraps a modern TypeScript SDK with an
|
|
12
|
+
**ESM-first setup**, **API Extractor**, and a **CI-ready structure** —
|
|
13
|
+
so you can focus on features, not boilerplate.
|
|
11
14
|
|
|
12
15
|
---
|
|
13
16
|
|
|
@@ -15,7 +18,7 @@ can focus on features, not boilerplate.
|
|
|
15
18
|
|
|
16
19
|
- ⚡ **Interactive CLI** (or fully automated with flags)
|
|
17
20
|
- 📦 **ESM-first TypeScript setup**
|
|
18
|
-
- 🔒 **Strict public API**
|
|
21
|
+
- 🔒 **Strict public API** enforced by API Extractor
|
|
19
22
|
- 🧪 **CI-verified & smoke-tested**
|
|
20
23
|
- 🧱 Clean, scalable project structure
|
|
21
24
|
- 🚫 No hidden magic, no vendor lock-in
|
|
@@ -33,16 +36,17 @@ npm install
|
|
|
33
36
|
npm run build
|
|
34
37
|
```
|
|
35
38
|
|
|
36
|
-
That’s it. You now have a production-
|
|
39
|
+
That’s it. You now have a solid, production-oriented SDK foundation.
|
|
37
40
|
|
|
38
|
-
## 📘 Example SDK
|
|
39
41
|
|
|
40
|
-
|
|
42
|
+
## 📘 Example SDK
|
|
41
43
|
|
|
44
|
+
See a minimal, production-style SDK generated with create-sdk:
|
|
42
45
|
👉 https://github.com/mordaHQ/example-sdk
|
|
43
46
|
|
|
44
47
|
This example demonstrates:
|
|
45
|
-
|
|
48
|
+
|
|
49
|
+
- a single, explicit public API entrypoint (src/index.ts)
|
|
46
50
|
- API Extractor–controlled surface
|
|
47
51
|
- ESM-first configuration
|
|
48
52
|
- CI-ready setup
|
|
@@ -54,65 +58,66 @@ Use it as a reference for structuring real-world SDKs.
|
|
|
54
58
|
|
|
55
59
|
Most SDK starters fall into one of two traps:
|
|
56
60
|
|
|
57
|
-
|
|
58
|
-
|
|
61
|
+
❌ too minimal — no real production setup
|
|
62
|
+
|
|
63
|
+
❌ too complex — opinionated, hard to extend
|
|
59
64
|
|
|
60
65
|
**create-sdk** sits in the middle:
|
|
61
66
|
|
|
62
|
-
|
|
67
|
+
Strict where it matters. Flexible where it should be.
|
|
63
68
|
|
|
64
69
|
You get:
|
|
65
|
-
|
|
66
70
|
- a clearly defined public API
|
|
67
71
|
- predictable build & release flow
|
|
68
72
|
- freedom to grow the SDK your way
|
|
69
73
|
|
|
70
|
-
|
|
74
|
+
### 🧩 What’s included
|
|
71
75
|
|
|
72
|
-
- TypeScript project with strict
|
|
76
|
+
- TypeScript project with strict configuration
|
|
73
77
|
- API Extractor setup
|
|
74
78
|
- Ready-to-use CI workflow
|
|
75
79
|
- Clean module-based structure
|
|
76
80
|
- Example public API and types
|
|
77
81
|
|
|
78
82
|
## 🛠 CLI options
|
|
79
|
-
|
|
80
83
|
```bash
|
|
81
|
-
npx @morda-dev/create-sdk
|
|
84
|
+
npx @morda-dev/create-sdk my-sdk --yes
|
|
82
85
|
```
|
|
83
86
|
|
|
84
87
|
### Options
|
|
85
88
|
|
|
86
|
-
- `--yes` — skip all prompts
|
|
87
|
-
- `--
|
|
89
|
+
- `--yes` — skip all prompts
|
|
90
|
+
- `--dry-run` — preview what would be generated without creating files
|
|
91
|
+
- `--force` — overwrite existing directory if it exists
|
|
92
|
+
- `--no-install` — skip dependency installation
|
|
88
93
|
- `--no-git` — skip git initialization
|
|
89
94
|
|
|
90
|
-
###
|
|
95
|
+
### Examples
|
|
91
96
|
|
|
92
97
|
```bash
|
|
93
|
-
npx @morda-dev/create-sdk my-sdk --yes
|
|
98
|
+
npx @morda-dev/create-sdk my-sdk --yes
|
|
99
|
+
npx @morda-dev/create-sdk my-sdk --dry-run
|
|
100
|
+
npx @morda-dev/create-sdk my-sdk --force --no-install
|
|
94
101
|
```
|
|
95
102
|
|
|
96
|
-
|
|
97
|
-
|
|
103
|
+
### 📦 Requirements
|
|
98
104
|
- Node.js >= 18
|
|
99
105
|
- npm / pnpm / yarn
|
|
100
106
|
|
|
101
|
-
## ✅ Used in production
|
|
102
|
-
|
|
103
|
-
This template is used to scaffold and maintain real-world TypeScript SDKs.
|
|
104
|
-
|
|
105
107
|
|
|
106
|
-
|
|
108
|
+
### 🧭 Roadmap
|
|
107
109
|
|
|
108
110
|
- Custom templates
|
|
109
111
|
- Optional monorepo mode
|
|
110
112
|
- Plugin system
|
|
111
113
|
- SDK release automation helpers
|
|
112
114
|
|
|
115
|
+
|
|
116
|
+
|
|
113
117
|
## 🤝 Contributing
|
|
114
118
|
|
|
115
119
|
Issues and PRs are welcome.
|
|
120
|
+
|
|
116
121
|
This project is intentionally kept small, clean, and well-documented.
|
|
117
122
|
|
|
118
123
|
## 📄 License
|
package/package.json
CHANGED
|
@@ -1,14 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@morda-dev/create-sdk",
|
|
3
|
-
"version": "1.1
|
|
3
|
+
"version": "1.2.1",
|
|
4
4
|
"description": "CLI to scaffold a production-ready TypeScript SDK with a strict public API",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"type": "module",
|
|
7
|
-
|
|
8
7
|
"bin": {
|
|
9
|
-
"create-sdk": "
|
|
8
|
+
"create-sdk": "bin/create-sdk.js"
|
|
10
9
|
},
|
|
11
|
-
|
|
12
10
|
"files": [
|
|
13
11
|
"bin",
|
|
14
12
|
"src",
|
|
@@ -16,21 +14,17 @@
|
|
|
16
14
|
"README.md",
|
|
17
15
|
"LICENSE"
|
|
18
16
|
],
|
|
19
|
-
|
|
20
17
|
"engines": {
|
|
21
18
|
"node": ">=18"
|
|
22
19
|
},
|
|
23
|
-
|
|
24
20
|
"repository": {
|
|
25
21
|
"type": "git",
|
|
26
|
-
"url": "https://github.com/mordaHQ/create-sdk.git"
|
|
22
|
+
"url": "git+https://github.com/mordaHQ/create-sdk.git"
|
|
27
23
|
},
|
|
28
|
-
|
|
29
24
|
"homepage": "https://github.com/mordaHQ/create-sdk",
|
|
30
25
|
"bugs": {
|
|
31
26
|
"url": "https://github.com/mordaHQ/create-sdk/issues"
|
|
32
27
|
},
|
|
33
|
-
|
|
34
28
|
"keywords": [
|
|
35
29
|
"create-sdk",
|
|
36
30
|
"typescript",
|
|
@@ -42,17 +36,20 @@
|
|
|
42
36
|
"esm",
|
|
43
37
|
"developer-tools"
|
|
44
38
|
],
|
|
45
|
-
|
|
46
39
|
"scripts": {
|
|
40
|
+
"test": "vitest run",
|
|
41
|
+
"test:watch": "vitest",
|
|
47
42
|
"test:smoke": "node ./bin/create-sdk.js __tmp-smoke-sdk --yes --no-install --no-git && node -e \"import('fs').then(fs => fs.rmSync('__tmp-smoke-sdk', { recursive: true, force: true }))\""
|
|
48
43
|
},
|
|
49
|
-
|
|
50
44
|
"dependencies": {
|
|
51
45
|
"prompts": "^2.4.2"
|
|
52
46
|
},
|
|
53
|
-
|
|
54
47
|
"devDependencies": {
|
|
55
48
|
"@types/node": "^18.19.0",
|
|
49
|
+
"vitest": "^1.6.0",
|
|
50
|
+
"execa": "^9.6.1",
|
|
51
|
+
"fs-extra": "^11.3.3",
|
|
52
|
+
"tmp": "^0.2.5",
|
|
56
53
|
"undici-types": "^7.16.0"
|
|
57
54
|
}
|
|
58
55
|
}
|
|
@@ -1,19 +1,25 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
|
|
3
3
|
|
|
4
|
-
"
|
|
4
|
+
"projectFolder": ".",
|
|
5
|
+
|
|
6
|
+
"mainEntryPointFilePath": "<projectFolder>/dist/index.d.ts",
|
|
7
|
+
|
|
8
|
+
"dtsRollup": {
|
|
9
|
+
"enabled": false
|
|
10
|
+
},
|
|
5
11
|
|
|
6
12
|
"apiReport": {
|
|
7
13
|
"enabled": true,
|
|
8
|
-
"
|
|
9
|
-
"
|
|
14
|
+
"reportFolder": "<projectFolder>/api",
|
|
15
|
+
"reportFileName": "api-report.md"
|
|
10
16
|
},
|
|
11
17
|
|
|
12
18
|
"docModel": {
|
|
13
19
|
"enabled": false
|
|
14
20
|
},
|
|
15
21
|
|
|
16
|
-
"
|
|
22
|
+
"tsdocMetadata": {
|
|
17
23
|
"enabled": false
|
|
18
24
|
},
|
|
19
25
|
|
|
@@ -23,7 +29,6 @@
|
|
|
23
29
|
"logLevel": "warning"
|
|
24
30
|
}
|
|
25
31
|
},
|
|
26
|
-
|
|
27
32
|
"extractorMessageReporting": {
|
|
28
33
|
"default": {
|
|
29
34
|
"logLevel": "warning"
|
package/template/package.json
CHANGED
|
@@ -11,6 +11,20 @@
|
|
|
11
11
|
"node": ">=18"
|
|
12
12
|
},
|
|
13
13
|
|
|
14
|
+
"main": "./dist/index.js",
|
|
15
|
+
"types": "./dist/index.d.ts",
|
|
16
|
+
|
|
17
|
+
"exports": {
|
|
18
|
+
".": {
|
|
19
|
+
"types": "./dist/index.d.ts",
|
|
20
|
+
"import": "./dist/index.js"
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
|
|
24
|
+
"files": [
|
|
25
|
+
"dist"
|
|
26
|
+
],
|
|
27
|
+
|
|
14
28
|
"repository": {
|
|
15
29
|
"type": "git",
|
|
16
30
|
"url": "https://github.com/mordaHQ/project-template.git"
|