@baseplate-dev/create-project 0.3.3 → 0.6.2
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/CHANGELOG.md +327 -0
- package/dist/create-baseplate-project.js +4 -4
- package/dist/project-creator.js +23 -55
- package/dist/project-generator.d.ts +35 -0
- package/dist/project-generator.js +78 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +10 -21
- package/package.json +16 -14
- package/dist/exec.d.ts +0 -1
- package/dist/exec.js +0 -16
- package/dist/npm.service.d.ts +0 -1
- package/dist/npm.service.js +0 -20
- package/templates/.gitignore +0 -141
- package/templates/.pnpmfile.cjs +0 -2
- package/templates/.template.npmrc +0 -8
- package/templates/README.md +0 -35
- package/templates/scripts/setup-npmrc.cjs +0 -74
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,327 @@
|
|
|
1
|
+
# @baseplate-dev/create-project
|
|
2
|
+
|
|
3
|
+
## 0.6.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Reset version to 0.6.2 to fix accidental major version bumps caused by missing changeset fixed-group configuration.
|
|
8
|
+
|
|
9
|
+
## 0.6.1
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- Updated dependencies [[`0b973f3`](https://github.com/halfdomelabs/baseplate/commit/0b973f3b9cb03fa1c49ceb49839b210466ecbbc7)]:
|
|
14
|
+
- @baseplate-dev/project-builder-server@0.6.1
|
|
15
|
+
- @baseplate-dev/project-builder-cli@0.6.1
|
|
16
|
+
- @baseplate-dev/project-builder-lib@0.6.1
|
|
17
|
+
- @baseplate-dev/sync@0.6.1
|
|
18
|
+
- @baseplate-dev/utils@0.6.1
|
|
19
|
+
|
|
20
|
+
## 0.6.0
|
|
21
|
+
|
|
22
|
+
### Patch Changes
|
|
23
|
+
|
|
24
|
+
- [#802](https://github.com/halfdomelabs/baseplate/pull/802) [`801c706`](https://github.com/halfdomelabs/baseplate/commit/801c7066f7e943c026f03e71b8d39242036e0cad) Thanks [@kingston](https://github.com/kingston)! - Update prettier to ignore unchanged files in output
|
|
25
|
+
|
|
26
|
+
- [#789](https://github.com/halfdomelabs/baseplate/pull/789) [`2f860c5`](https://github.com/halfdomelabs/baseplate/commit/2f860c513a1caf95fdfd0729cf548990166f9a6f) Thanks [@kingston](https://github.com/kingston)! - Unify test and example project discovery under a single system:
|
|
27
|
+
- Add `type: 'user' | 'example' | 'test'` and `baseplateDirectory` to `ProjectInfo`, replacing `isInternalExample`.
|
|
28
|
+
- Add `baseplate.config.json` for deterministic project discovery — replaces `isExampleProject` heuristic and `EXCLUDE_EXAMPLES`/`PLUGIN_ROOT_DIRECTORIES` env vars.
|
|
29
|
+
- Unify `discoverProjects` to accept structured options by project type — removes `discoverTestProjects` and duplicate `project-resolver.ts`.
|
|
30
|
+
- Test projects live in `tests/<name>/` with output to `.output/` (gitignored).
|
|
31
|
+
- Replace `test-project` subcommands with `baseplate-dev init <name> --type example|test` and `baseplate-dev run-env <test-name>`.
|
|
32
|
+
|
|
33
|
+
- Updated dependencies [[`ee7ee0e`](https://github.com/halfdomelabs/baseplate/commit/ee7ee0e552090612190eb4446a52c30f4eefce6a), [`bd1095e`](https://github.com/halfdomelabs/baseplate/commit/bd1095e52dc3cecdb40bf84a906490a7c92fec40), [`a136dc9`](https://github.com/halfdomelabs/baseplate/commit/a136dc90ba12783e059fd3c8a067d1b5496ed3ce), [`801c706`](https://github.com/halfdomelabs/baseplate/commit/801c7066f7e943c026f03e71b8d39242036e0cad), [`3029d42`](https://github.com/halfdomelabs/baseplate/commit/3029d42f5d5967721f2b0d5892ea07a80c5f3a1f), [`dfa9638`](https://github.com/halfdomelabs/baseplate/commit/dfa963825c4ba847f9d21f4f014c4dd1722403d6), [`3b3be2b`](https://github.com/halfdomelabs/baseplate/commit/3b3be2b8d45b08552dca3d4e2b5ce391a958341b), [`eadad84`](https://github.com/halfdomelabs/baseplate/commit/eadad8494128ded2cbc76dfbe3b97f93769ea41f), [`801c706`](https://github.com/halfdomelabs/baseplate/commit/801c7066f7e943c026f03e71b8d39242036e0cad), [`ee7ee0e`](https://github.com/halfdomelabs/baseplate/commit/ee7ee0e552090612190eb4446a52c30f4eefce6a), [`801c706`](https://github.com/halfdomelabs/baseplate/commit/801c7066f7e943c026f03e71b8d39242036e0cad), [`dc238be`](https://github.com/halfdomelabs/baseplate/commit/dc238be00158a528a60d9e6ef9cec32b2d8297be), [`bd25ff0`](https://github.com/halfdomelabs/baseplate/commit/bd25ff08e71faeb97b560e7b349dba1967155704), [`8258b27`](https://github.com/halfdomelabs/baseplate/commit/8258b278e9a25a6e4bd5039a134238d071a63ecd), [`6e2675d`](https://github.com/halfdomelabs/baseplate/commit/6e2675d2166ac9bf470486efdc6a0e48df9bcc6d), [`2f860c5`](https://github.com/halfdomelabs/baseplate/commit/2f860c513a1caf95fdfd0729cf548990166f9a6f), [`cad5352`](https://github.com/halfdomelabs/baseplate/commit/cad535239b47080e30f894383cc330e37213a76c), [`83c713b`](https://github.com/halfdomelabs/baseplate/commit/83c713b075eca2abc946e74bf3f03e515e601eba), [`78315cc`](https://github.com/halfdomelabs/baseplate/commit/78315ccd9b0b0330cd2d08584c6d5ec516d641e3), [`bd25ff0`](https://github.com/halfdomelabs/baseplate/commit/bd25ff08e71faeb97b560e7b349dba1967155704), [`cad5352`](https://github.com/halfdomelabs/baseplate/commit/cad535239b47080e30f894383cc330e37213a76c)]:
|
|
34
|
+
- @baseplate-dev/utils@0.6.0
|
|
35
|
+
- @baseplate-dev/project-builder-lib@0.6.0
|
|
36
|
+
- @baseplate-dev/project-builder-server@0.6.0
|
|
37
|
+
- @baseplate-dev/project-builder-cli@0.6.0
|
|
38
|
+
- @baseplate-dev/sync@0.6.0
|
|
39
|
+
|
|
40
|
+
## 0.5.3
|
|
41
|
+
|
|
42
|
+
### Patch Changes
|
|
43
|
+
|
|
44
|
+
- Updated dependencies []:
|
|
45
|
+
- @baseplate-dev/project-builder-server@0.5.3
|
|
46
|
+
- @baseplate-dev/project-builder-cli@0.5.3
|
|
47
|
+
- @baseplate-dev/project-builder-lib@0.5.3
|
|
48
|
+
- @baseplate-dev/sync@0.5.3
|
|
49
|
+
- @baseplate-dev/utils@0.5.3
|
|
50
|
+
|
|
51
|
+
## 0.5.2
|
|
52
|
+
|
|
53
|
+
### Patch Changes
|
|
54
|
+
|
|
55
|
+
- Updated dependencies [[`ef1354d`](https://github.com/halfdomelabs/baseplate/commit/ef1354da11e2c48a80af03f44834555ce63a2948), [`b4db947`](https://github.com/halfdomelabs/baseplate/commit/b4db947f256c4b8639d7f18ffb58bb2b1646c497), [`dd40bcd`](https://github.com/halfdomelabs/baseplate/commit/dd40bcd219c79f0cd7b66c0427c77deda0664072)]:
|
|
56
|
+
- @baseplate-dev/project-builder-server@0.5.2
|
|
57
|
+
- @baseplate-dev/project-builder-lib@0.5.2
|
|
58
|
+
- @baseplate-dev/project-builder-cli@0.5.2
|
|
59
|
+
- @baseplate-dev/sync@0.5.2
|
|
60
|
+
- @baseplate-dev/utils@0.5.2
|
|
61
|
+
|
|
62
|
+
## 0.5.1
|
|
63
|
+
|
|
64
|
+
### Patch Changes
|
|
65
|
+
|
|
66
|
+
- [#737](https://github.com/halfdomelabs/baseplate/pull/737) [`55aa484`](https://github.com/halfdomelabs/baseplate/commit/55aa484621f2dc5b1195b6b537e7d6ad215bc499) Thanks [@kingston](https://github.com/kingston)! - Refactor plugin spec system with lazy initialization and clear setup/use phases
|
|
67
|
+
|
|
68
|
+
This refactoring overhauls the plugin spec system to introduce a two-phase architecture with lazy initialization:
|
|
69
|
+
|
|
70
|
+
**New Architecture:**
|
|
71
|
+
- **Setup phase (init)**: Plugins register their implementations during module initialization using mutable field containers
|
|
72
|
+
- **Use phase**: Consumers access registered items through a read-only interface, with lazy initialization on first access
|
|
73
|
+
- **FieldMap-based specs**: New `createFieldMapSpec` helper provides type-safe containers (maps, arrays, named arrays, scalars) with automatic source tracking
|
|
74
|
+
|
|
75
|
+
**Key changes:**
|
|
76
|
+
- Rename `PluginImplementationStore` to `PluginSpecStore` with cached `use()` instances
|
|
77
|
+
- Rename `createPlatformPluginExport` to `createPluginModule`
|
|
78
|
+
- Add required `name` field to all plugin modules for unique identification
|
|
79
|
+
- Convert all specs to use `createFieldMapSpec` with typed containers
|
|
80
|
+
- Update all plugin modules to use new registration methods (`.add()`, `.set()`, `.push()`)
|
|
81
|
+
- Introduce `ModuleContext` with `moduleKey` and `pluginKey` for better source tracking
|
|
82
|
+
- Specs now define both `init` (mutable setup interface) and `use` (read-only consumption interface)
|
|
83
|
+
|
|
84
|
+
- Updated dependencies [[`1debcb8`](https://github.com/halfdomelabs/baseplate/commit/1debcb89807fafdd7415a659f4bebbad0d69f072), [`55aa484`](https://github.com/halfdomelabs/baseplate/commit/55aa484621f2dc5b1195b6b537e7d6ad215bc499), [`2de5d5c`](https://github.com/halfdomelabs/baseplate/commit/2de5d5c43c5354571d50707a99b4028ff8792534)]:
|
|
85
|
+
- @baseplate-dev/project-builder-server@0.5.1
|
|
86
|
+
- @baseplate-dev/project-builder-lib@0.5.1
|
|
87
|
+
- @baseplate-dev/project-builder-cli@0.5.1
|
|
88
|
+
- @baseplate-dev/sync@0.5.1
|
|
89
|
+
- @baseplate-dev/utils@0.5.1
|
|
90
|
+
|
|
91
|
+
## 0.5.0
|
|
92
|
+
|
|
93
|
+
### Patch Changes
|
|
94
|
+
|
|
95
|
+
- [#734](https://github.com/halfdomelabs/baseplate/pull/734) [`8bfc742`](https://github.com/halfdomelabs/baseplate/commit/8bfc742b8a93393a5539babfd11b97a88ee9c39e) Thanks [@kingston](https://github.com/kingston)! - Upgrade vitest to 4.0.16
|
|
96
|
+
- vitest: 3.2.4 → 4.0.16
|
|
97
|
+
- @vitest/eslint-plugin: 1.3.4 → 1.6.5
|
|
98
|
+
|
|
99
|
+
Breaking changes addressed:
|
|
100
|
+
- Updated `UserConfig` type to `ViteUserConfig` in vitest config files
|
|
101
|
+
- Fixed mock type annotations for vitest 4.0 compatibility
|
|
102
|
+
|
|
103
|
+
- Updated dependencies [[`97bd14e`](https://github.com/halfdomelabs/baseplate/commit/97bd14e381206b54e55c22264d1d406e83146146), [`c7d373e`](https://github.com/halfdomelabs/baseplate/commit/c7d373ebaaeda2522515fdaeae0d37d0cd9ce7fe), [`397018b`](https://github.com/halfdomelabs/baseplate/commit/397018b8c30949f75734369b58c67d7afcc424a9), [`8bfc742`](https://github.com/halfdomelabs/baseplate/commit/8bfc742b8a93393a5539babfd11b97a88ee9c39e)]:
|
|
104
|
+
- @baseplate-dev/project-builder-lib@0.5.0
|
|
105
|
+
- @baseplate-dev/project-builder-server@0.5.0
|
|
106
|
+
- @baseplate-dev/sync@0.5.0
|
|
107
|
+
- @baseplate-dev/project-builder-cli@0.5.0
|
|
108
|
+
- @baseplate-dev/utils@0.5.0
|
|
109
|
+
|
|
110
|
+
## 0.4.4
|
|
111
|
+
|
|
112
|
+
### Patch Changes
|
|
113
|
+
|
|
114
|
+
- Updated dependencies []:
|
|
115
|
+
- @baseplate-dev/project-builder-server@0.4.4
|
|
116
|
+
- @baseplate-dev/project-builder-cli@0.4.4
|
|
117
|
+
- @baseplate-dev/project-builder-lib@0.4.4
|
|
118
|
+
- @baseplate-dev/sync@0.4.4
|
|
119
|
+
- @baseplate-dev/utils@0.4.4
|
|
120
|
+
|
|
121
|
+
## 0.4.3
|
|
122
|
+
|
|
123
|
+
### Patch Changes
|
|
124
|
+
|
|
125
|
+
- [#715](https://github.com/halfdomelabs/baseplate/pull/715) [`68ab5bd`](https://github.com/halfdomelabs/baseplate/commit/68ab5bdbc98a0b4bbc46059bfabd84666a2ab18b) Thanks [@kingston](https://github.com/kingston)! - Refactor create-project to use sync engine for generating root directory files
|
|
126
|
+
|
|
127
|
+
- Updated dependencies [[`9638baf`](https://github.com/halfdomelabs/baseplate/commit/9638baf19fa0f68bed961daa0fe889822246c11a), [`68ab5bd`](https://github.com/halfdomelabs/baseplate/commit/68ab5bdbc98a0b4bbc46059bfabd84666a2ab18b), [`83e4e7f`](https://github.com/halfdomelabs/baseplate/commit/83e4e7f60adf67480cebb4ff419c015ff282010d)]:
|
|
128
|
+
- @baseplate-dev/project-builder-server@0.4.3
|
|
129
|
+
- @baseplate-dev/project-builder-cli@0.4.3
|
|
130
|
+
- @baseplate-dev/project-builder-lib@0.4.3
|
|
131
|
+
- @baseplate-dev/sync@0.4.3
|
|
132
|
+
- @baseplate-dev/utils@0.4.3
|
|
133
|
+
|
|
134
|
+
## 0.4.2
|
|
135
|
+
|
|
136
|
+
### Patch Changes
|
|
137
|
+
|
|
138
|
+
- [#697](https://github.com/halfdomelabs/baseplate/pull/697) [`11fa86f`](https://github.com/halfdomelabs/baseplate/commit/11fa86fb8e7a209175f132b1b3d59cd24cf13d54) Thanks [@kingston](https://github.com/kingston)! - Ignore \*.map files from built output in package.json
|
|
139
|
+
|
|
140
|
+
- Updated dependencies [[`11fa86f`](https://github.com/halfdomelabs/baseplate/commit/11fa86fb8e7a209175f132b1b3d59cd24cf13d54), [`4be6c7d`](https://github.com/halfdomelabs/baseplate/commit/4be6c7dc7d900c37585b93cf5bb7198de6a41f1f)]:
|
|
141
|
+
- @baseplate-dev/project-builder-cli@0.4.2
|
|
142
|
+
- @baseplate-dev/utils@0.4.2
|
|
143
|
+
|
|
144
|
+
## 0.4.1
|
|
145
|
+
|
|
146
|
+
### Patch Changes
|
|
147
|
+
|
|
148
|
+
- Updated dependencies []:
|
|
149
|
+
- @baseplate-dev/project-builder-cli@0.4.1
|
|
150
|
+
- @baseplate-dev/utils@0.4.1
|
|
151
|
+
|
|
152
|
+
## 0.4.0
|
|
153
|
+
|
|
154
|
+
### Patch Changes
|
|
155
|
+
|
|
156
|
+
- [#679](https://github.com/halfdomelabs/baseplate/pull/679) [`b1634b0`](https://github.com/halfdomelabs/baseplate/commit/b1634b08904e6d862fe1a3a377bfe21b455ece5c) Thanks [@kingston](https://github.com/kingston)! - Upgrade pnpm to 10.18.3
|
|
157
|
+
|
|
158
|
+
- Updated dependencies [[`d324059`](https://github.com/halfdomelabs/baseplate/commit/d3240594e1c2bc2348eb1a7e8938f97ea5f55d22), [`c3c2a00`](https://github.com/halfdomelabs/baseplate/commit/c3c2a001d57a21f76e064af55941a43bedf26f18), [`57e15c0`](https://github.com/halfdomelabs/baseplate/commit/57e15c085099508898756385661df9cf54108466)]:
|
|
159
|
+
- @baseplate-dev/project-builder-cli@0.4.0
|
|
160
|
+
- @baseplate-dev/utils@0.4.0
|
|
161
|
+
|
|
162
|
+
## 0.3.8
|
|
163
|
+
|
|
164
|
+
### Patch Changes
|
|
165
|
+
|
|
166
|
+
- [#668](https://github.com/halfdomelabs/baseplate/pull/668) [`b208178`](https://github.com/halfdomelabs/baseplate/commit/b20817823d66fde1dfc1e3472ceedc2e6afd14c2) Thanks [@kingston](https://github.com/kingston)! - Upgrade PNPM to 10.16.1 and add minimumReleaseAge security setting
|
|
167
|
+
- Upgraded PNPM from 10.15.0 to 10.16.1 across all package.json files
|
|
168
|
+
- Added minimumReleaseAge=1440 (24 hours) to .npmrc files to delay installation of newly released dependencies
|
|
169
|
+
- This security setting reduces risk of installing compromised packages by ensuring only packages released at least one day ago can be installed
|
|
170
|
+
- Updated project creation template to include the new security setting for all new Baseplate projects
|
|
171
|
+
|
|
172
|
+
- Updated dependencies []:
|
|
173
|
+
- @baseplate-dev/project-builder-cli@0.3.8
|
|
174
|
+
- @baseplate-dev/utils@0.3.8
|
|
175
|
+
|
|
176
|
+
## 0.3.7
|
|
177
|
+
|
|
178
|
+
### Patch Changes
|
|
179
|
+
|
|
180
|
+
- Updated dependencies []:
|
|
181
|
+
- @baseplate-dev/project-builder-cli@0.3.7
|
|
182
|
+
- @baseplate-dev/utils@0.3.7
|
|
183
|
+
|
|
184
|
+
## 0.3.6
|
|
185
|
+
|
|
186
|
+
### Patch Changes
|
|
187
|
+
|
|
188
|
+
- Updated dependencies []:
|
|
189
|
+
- @baseplate-dev/project-builder-cli@0.3.6
|
|
190
|
+
- @baseplate-dev/utils@0.3.6
|
|
191
|
+
|
|
192
|
+
## 0.3.5
|
|
193
|
+
|
|
194
|
+
### Patch Changes
|
|
195
|
+
|
|
196
|
+
- Updated dependencies []:
|
|
197
|
+
- @baseplate-dev/project-builder-cli@0.3.5
|
|
198
|
+
- @baseplate-dev/utils@0.3.5
|
|
199
|
+
|
|
200
|
+
## 0.3.4
|
|
201
|
+
|
|
202
|
+
### Patch Changes
|
|
203
|
+
|
|
204
|
+
- [#644](https://github.com/halfdomelabs/baseplate/pull/644) [`fb35013`](https://github.com/halfdomelabs/baseplate/commit/fb35013bb5e5f990ed4e21a1f54f2192be7d3df6) Thanks [@kingston](https://github.com/kingston)! - Link project-builder-cli directly instead of fetching from npm registry
|
|
205
|
+
- Add @baseplate-dev/project-builder-cli as workspace dependency
|
|
206
|
+
- Ensure version consistency between create-project and CLI
|
|
207
|
+
|
|
208
|
+
- [#643](https://github.com/halfdomelabs/baseplate/pull/643) [`7d9e6d0`](https://github.com/halfdomelabs/baseplate/commit/7d9e6d01e0a9920cee4c4d499beeffc1c663494a) Thanks [@kingston](https://github.com/kingston)! - Upgrade to TypeScript 5.8 with erasable syntax only mode
|
|
209
|
+
|
|
210
|
+
This upgrade modernizes the codebase with TypeScript 5.8, enables erasable syntax only mode for better performance, and updates runtime dependencies.
|
|
211
|
+
|
|
212
|
+
**Key Changes:**
|
|
213
|
+
- Upgraded TypeScript to version 5.8
|
|
214
|
+
- Enabled `erasableSyntaxOnly` compiler option for improved build performance
|
|
215
|
+
- Updated Node.js requirement to 22.18
|
|
216
|
+
- Updated PNPM requirement to 10.15
|
|
217
|
+
- Fixed parameter property syntax to be compatible with erasable syntax only mode
|
|
218
|
+
|
|
219
|
+
- Updated dependencies [[`783a495`](https://github.com/halfdomelabs/baseplate/commit/783a495411e76d28b781bbe0af5f57300a282353), [`f39ce15`](https://github.com/halfdomelabs/baseplate/commit/f39ce158c37d23472db96a42daccdc80f6d48f54), [`7d9e6d0`](https://github.com/halfdomelabs/baseplate/commit/7d9e6d01e0a9920cee4c4d499beeffc1c663494a)]:
|
|
220
|
+
- @baseplate-dev/project-builder-cli@0.3.4
|
|
221
|
+
- @baseplate-dev/utils@0.3.4
|
|
222
|
+
|
|
223
|
+
## 0.3.3
|
|
224
|
+
|
|
225
|
+
### Patch Changes
|
|
226
|
+
|
|
227
|
+
- Updated dependencies []:
|
|
228
|
+
- @baseplate-dev/utils@0.3.3
|
|
229
|
+
|
|
230
|
+
## 0.3.2
|
|
231
|
+
|
|
232
|
+
### Patch Changes
|
|
233
|
+
|
|
234
|
+
- Updated dependencies []:
|
|
235
|
+
- @baseplate-dev/utils@0.3.2
|
|
236
|
+
|
|
237
|
+
## 0.3.1
|
|
238
|
+
|
|
239
|
+
### Patch Changes
|
|
240
|
+
|
|
241
|
+
- Updated dependencies []:
|
|
242
|
+
- @baseplate-dev/utils@0.3.1
|
|
243
|
+
|
|
244
|
+
## 0.3.0
|
|
245
|
+
|
|
246
|
+
### Patch Changes
|
|
247
|
+
|
|
248
|
+
- Updated dependencies []:
|
|
249
|
+
- @baseplate-dev/utils@0.3.0
|
|
250
|
+
|
|
251
|
+
## 0.2.6
|
|
252
|
+
|
|
253
|
+
### Patch Changes
|
|
254
|
+
|
|
255
|
+
- Updated dependencies []:
|
|
256
|
+
- @baseplate-dev/utils@0.2.6
|
|
257
|
+
|
|
258
|
+
## 0.2.5
|
|
259
|
+
|
|
260
|
+
### Patch Changes
|
|
261
|
+
|
|
262
|
+
- Updated dependencies []:
|
|
263
|
+
- @baseplate-dev/utils@0.2.5
|
|
264
|
+
|
|
265
|
+
## 0.2.4
|
|
266
|
+
|
|
267
|
+
### Patch Changes
|
|
268
|
+
|
|
269
|
+
- Updated dependencies [[`ffe791f`](https://github.com/halfdomelabs/baseplate/commit/ffe791f6ab44e82c8481f3a18df9262dec71cff6)]:
|
|
270
|
+
- @baseplate-dev/utils@0.2.4
|
|
271
|
+
|
|
272
|
+
## 0.2.3
|
|
273
|
+
|
|
274
|
+
### Patch Changes
|
|
275
|
+
|
|
276
|
+
- Updated dependencies []:
|
|
277
|
+
- @baseplate-dev/utils@0.2.3
|
|
278
|
+
|
|
279
|
+
## 0.2.2
|
|
280
|
+
|
|
281
|
+
### Patch Changes
|
|
282
|
+
|
|
283
|
+
- Updated dependencies [[`f8c9284`](https://github.com/halfdomelabs/baseplate/commit/f8c9284752c12c6aab70481bf98e6fa402e61075)]:
|
|
284
|
+
- @baseplate-dev/utils@0.2.2
|
|
285
|
+
|
|
286
|
+
## 0.2.1
|
|
287
|
+
|
|
288
|
+
### Patch Changes
|
|
289
|
+
|
|
290
|
+
- Updated dependencies []:
|
|
291
|
+
- @baseplate-dev/utils@0.2.1
|
|
292
|
+
|
|
293
|
+
## 0.2.0
|
|
294
|
+
|
|
295
|
+
### Patch Changes
|
|
296
|
+
|
|
297
|
+
- Updated dependencies [[`06b4faf`](https://github.com/halfdomelabs/baseplate/commit/06b4fafaf3d2ed848d959a9911b9bfa26702d4a3), [`fd63554`](https://github.com/halfdomelabs/baseplate/commit/fd635544eb6df0385501f61f3e51bce554633458), [`56a3a89`](https://github.com/halfdomelabs/baseplate/commit/56a3a8944b9a557cca0484d78851fca10122e5f9)]:
|
|
298
|
+
- @baseplate-dev/utils@0.2.0
|
|
299
|
+
|
|
300
|
+
## 0.1.3
|
|
301
|
+
|
|
302
|
+
### Patch Changes
|
|
303
|
+
|
|
304
|
+
- [#562](https://github.com/halfdomelabs/baseplate/pull/562) [`30fdf49`](https://github.com/halfdomelabs/baseplate/commit/30fdf4988de244c30d13c93b7761587d4c1413ad) Thanks [@kingston](https://github.com/kingston)! - Switch to Typescript project references for building/watching project
|
|
305
|
+
|
|
306
|
+
- Updated dependencies [[`30fdf49`](https://github.com/halfdomelabs/baseplate/commit/30fdf4988de244c30d13c93b7761587d4c1413ad)]:
|
|
307
|
+
- @baseplate-dev/utils@0.1.3
|
|
308
|
+
|
|
309
|
+
## 0.1.2
|
|
310
|
+
|
|
311
|
+
### Patch Changes
|
|
312
|
+
|
|
313
|
+
- [#560](https://github.com/halfdomelabs/baseplate/pull/560) [`7e38ae9`](https://github.com/halfdomelabs/baseplate/commit/7e38ae9102c7c8ea958d2dab94e76be848d1c1a8) Thanks [@kingston](https://github.com/kingston)! - Remove NPM token requirement as Baseplate is now open source. The create-project command no longer prompts for an NPM token and related template files have been simplified.
|
|
314
|
+
|
|
315
|
+
- Updated dependencies [[`7e38ae9`](https://github.com/halfdomelabs/baseplate/commit/7e38ae9102c7c8ea958d2dab94e76be848d1c1a8)]:
|
|
316
|
+
- @baseplate-dev/utils@0.1.2
|
|
317
|
+
|
|
318
|
+
## 0.1.1
|
|
319
|
+
|
|
320
|
+
### Patch Changes
|
|
321
|
+
|
|
322
|
+
- [#559](https://github.com/halfdomelabs/baseplate/pull/559) [`17dd71e`](https://github.com/halfdomelabs/baseplate/commit/17dd71e3b9f83e3359eb007f8eab1c4792bdbb8b) Thanks [@kingston](https://github.com/kingston)! - Rename workspace to @baseplate-dev/\* and reset versions to 0.1.0
|
|
323
|
+
|
|
324
|
+
- [#557](https://github.com/halfdomelabs/baseplate/pull/557) [`9caaa0a`](https://github.com/halfdomelabs/baseplate/commit/9caaa0aed05677a75fed79601dcfd24ec85ab5ad) Thanks [@kingston](https://github.com/kingston)! - Update LICENSE to modified MPL-2.0 license
|
|
325
|
+
|
|
326
|
+
- Updated dependencies [[`17dd71e`](https://github.com/halfdomelabs/baseplate/commit/17dd71e3b9f83e3359eb007f8eab1c4792bdbb8b), [`9caaa0a`](https://github.com/halfdomelabs/baseplate/commit/9caaa0aed05677a75fed79601dcfd24ec85ab5ad)]:
|
|
327
|
+
- @baseplate-dev/utils@0.1.1
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
+
import { getPackageVersion } from '@baseplate-dev/utils/node';
|
|
2
3
|
import chalk from 'chalk';
|
|
3
4
|
import { program } from 'commander';
|
|
4
5
|
import fs from 'node:fs/promises';
|
|
5
6
|
import path from 'node:path';
|
|
6
|
-
import { getLatestCliVersion } from './npm.service.js';
|
|
7
7
|
import { generateBaseplateProject } from './project-creator.js';
|
|
8
|
-
import {
|
|
8
|
+
import { getCliVersion } from './version.js';
|
|
9
9
|
// check if directory contains a package.json file
|
|
10
10
|
async function checkForPackageJson(directory) {
|
|
11
11
|
try {
|
|
@@ -18,7 +18,7 @@ async function checkForPackageJson(directory) {
|
|
|
18
18
|
}
|
|
19
19
|
}
|
|
20
20
|
async function runMain() {
|
|
21
|
-
const version = await getPackageVersion();
|
|
21
|
+
const version = await getPackageVersion(import.meta.dirname);
|
|
22
22
|
if (!version) {
|
|
23
23
|
throw new Error('Could not determine package version');
|
|
24
24
|
}
|
|
@@ -44,7 +44,7 @@ async function runMain() {
|
|
|
44
44
|
if (hasPackageJson) {
|
|
45
45
|
throw new Error(`The directory ${directory} already contains a package.json file.`);
|
|
46
46
|
}
|
|
47
|
-
const cliVersion = await
|
|
47
|
+
const cliVersion = await getCliVersion();
|
|
48
48
|
await generateBaseplateProject({
|
|
49
49
|
packageName,
|
|
50
50
|
directory: resolvedDirectory,
|
package/dist/project-creator.js
CHANGED
|
@@ -1,68 +1,36 @@
|
|
|
1
1
|
import chalk from 'chalk';
|
|
2
|
-
import fs from 'node:fs/promises';
|
|
3
2
|
import path from 'node:path';
|
|
4
3
|
import ora from 'ora';
|
|
5
|
-
import {
|
|
4
|
+
import { generateRootPackage } from './project-generator.js';
|
|
5
|
+
/**
|
|
6
|
+
* Shows a success message with instructions for getting started.
|
|
7
|
+
*/
|
|
8
|
+
function showSuccessMessage(directory) {
|
|
9
|
+
const relativePath = path.relative(process.cwd(), directory);
|
|
10
|
+
console.info('');
|
|
11
|
+
console.info(`
|
|
12
|
+
🎉 Congratulations! Your Baseplate project has been created. To get started, run the following command${relativePath === '' ? '' : 's'}:
|
|
13
|
+
${relativePath === '' ? '' : chalk.bold(`\ncd ${relativePath}`)}
|
|
14
|
+
${chalk.bold('pnpm baseplate serve')}
|
|
15
|
+
|
|
16
|
+
For more information, read the included README.md file.
|
|
17
|
+
`.trim());
|
|
18
|
+
}
|
|
6
19
|
export async function generateBaseplateProject({ packageName, directory, cliVersion, }) {
|
|
7
20
|
const spinner = ora({
|
|
8
21
|
text: 'Creating project files...',
|
|
9
22
|
}).start();
|
|
10
23
|
try {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
const destinationPath = path.join(directory, destination);
|
|
16
|
-
await fs.mkdir(path.dirname(destinationPath), {
|
|
17
|
-
recursive: true,
|
|
18
|
-
});
|
|
19
|
-
await fs.writeFile(destinationPath, content);
|
|
20
|
-
};
|
|
21
|
-
const copyFile = async (templateSrc, destination) => {
|
|
22
|
-
// template files are stored at ../templates
|
|
23
|
-
const source = new URL(`../templates/${templateSrc}`, import.meta.url);
|
|
24
|
-
const sourceFile = await fs.readFile(source);
|
|
25
|
-
await writeFile(destination, sourceFile);
|
|
26
|
-
};
|
|
27
|
-
// write package.json
|
|
28
|
-
await writeFile('package.json', JSON.stringify({
|
|
24
|
+
// Generate root package files using sync engine
|
|
25
|
+
// This includes package.json, turbo.json, pnpm-workspace.yaml, .gitignore, etc.
|
|
26
|
+
// It also runs pnpm install as a post-write command
|
|
27
|
+
await generateRootPackage({
|
|
29
28
|
name: packageName,
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
license: 'UNLICENSED',
|
|
34
|
-
author: '<AUTHOR>',
|
|
35
|
-
scripts: {
|
|
36
|
-
'baseplate:serve': 'baseplate serve',
|
|
37
|
-
'baseplate:generate': 'baseplate generate',
|
|
38
|
-
preinstall: 'npx only-allow pnpm',
|
|
39
|
-
},
|
|
40
|
-
devDependencies: {
|
|
41
|
-
'@baseplate-dev/project-builder-cli': cliVersion,
|
|
42
|
-
},
|
|
43
|
-
packageManager: 'pnpm@10.6.5',
|
|
44
|
-
engines: {
|
|
45
|
-
node: '^22.0.0',
|
|
46
|
-
pnpm: '^10.6.0',
|
|
47
|
-
},
|
|
48
|
-
volta: {
|
|
49
|
-
node: '22.14.0',
|
|
50
|
-
},
|
|
51
|
-
}, null, 2));
|
|
52
|
-
await copyFile('.gitignore', '.gitignore');
|
|
53
|
-
await copyFile('.template.npmrc', '.npmrc');
|
|
54
|
-
await copyFile('README.md', 'README.md');
|
|
29
|
+
cliVersion,
|
|
30
|
+
directory,
|
|
31
|
+
});
|
|
55
32
|
spinner.succeed();
|
|
56
|
-
|
|
57
|
-
const relativePath = path.relative(process.cwd(), directory);
|
|
58
|
-
console.info('');
|
|
59
|
-
console.info(`
|
|
60
|
-
🎉 Congratulations! Your Baseplate project has been created. To get started, run the following command${relativePath === '' ? '' : 's'}:
|
|
61
|
-
${relativePath === '' ? '' : chalk.bold(`\ncd ${relativePath}`)}
|
|
62
|
-
${chalk.bold('pnpm baseplate serve')}
|
|
63
|
-
|
|
64
|
-
For more information, read the included README.md file.
|
|
65
|
-
`.trim());
|
|
33
|
+
showSuccessMessage(directory);
|
|
66
34
|
}
|
|
67
35
|
finally {
|
|
68
36
|
if (spinner.isSpinning) {
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { ProjectDefinition } from '@baseplate-dev/project-builder-lib';
|
|
2
|
+
/**
|
|
3
|
+
* Configuration for generating an initial project.
|
|
4
|
+
*/
|
|
5
|
+
interface InitialProjectConfig {
|
|
6
|
+
/**
|
|
7
|
+
* The name of the project (used in package.json and project definition).
|
|
8
|
+
*/
|
|
9
|
+
name: string;
|
|
10
|
+
/**
|
|
11
|
+
* The CLI version to use for the project.
|
|
12
|
+
*/
|
|
13
|
+
cliVersion: string;
|
|
14
|
+
/**
|
|
15
|
+
* The absolute path to the project directory.
|
|
16
|
+
*/
|
|
17
|
+
directory: string;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Creates a placeholder project definition with isInitialized: false.
|
|
21
|
+
* This definition can be used to bootstrap a new Baseplate project.
|
|
22
|
+
*
|
|
23
|
+
* @param config - Configuration for the initial project
|
|
24
|
+
* @returns A ProjectDefinition with isInitialized: false
|
|
25
|
+
*/
|
|
26
|
+
export declare function createInitialProjectDefinition(config: InitialProjectConfig): ProjectDefinition;
|
|
27
|
+
/**
|
|
28
|
+
* Generates the root package files using the Baseplate sync engine.
|
|
29
|
+
* This creates all standard root-level files (package.json, turbo.json, etc.)
|
|
30
|
+
* and writes the project definition to baseplate/project-definition.json.
|
|
31
|
+
*
|
|
32
|
+
* @param config - Configuration for the initial project
|
|
33
|
+
*/
|
|
34
|
+
export declare function generateRootPackage(config: InitialProjectConfig): Promise<void>;
|
|
35
|
+
export {};
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { getLatestMigrationVersion } from '@baseplate-dev/project-builder-lib';
|
|
2
|
+
import { generateProjectId, SERVER_CORE_MODULES, SyncMetadataController, syncProject, } from '@baseplate-dev/project-builder-server';
|
|
3
|
+
import { createConsoleLogger } from '@baseplate-dev/sync';
|
|
4
|
+
import { stringifyPrettyStable } from '@baseplate-dev/utils';
|
|
5
|
+
import fs from 'node:fs/promises';
|
|
6
|
+
import path from 'node:path';
|
|
7
|
+
/**
|
|
8
|
+
* Creates a placeholder project definition with isInitialized: false.
|
|
9
|
+
* This definition can be used to bootstrap a new Baseplate project.
|
|
10
|
+
*
|
|
11
|
+
* @param config - Configuration for the initial project
|
|
12
|
+
* @returns A ProjectDefinition with isInitialized: false
|
|
13
|
+
*/
|
|
14
|
+
export function createInitialProjectDefinition(config) {
|
|
15
|
+
return {
|
|
16
|
+
settings: {
|
|
17
|
+
general: {
|
|
18
|
+
name: config.name,
|
|
19
|
+
packageScope: '',
|
|
20
|
+
portOffset: 3000,
|
|
21
|
+
},
|
|
22
|
+
},
|
|
23
|
+
features: [],
|
|
24
|
+
cliVersion: config.cliVersion,
|
|
25
|
+
apps: [],
|
|
26
|
+
libraries: [],
|
|
27
|
+
models: [],
|
|
28
|
+
isInitialized: false,
|
|
29
|
+
schemaVersion: getLatestMigrationVersion(),
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Generates the root package files using the Baseplate sync engine.
|
|
34
|
+
* This creates all standard root-level files (package.json, turbo.json, etc.)
|
|
35
|
+
* and writes the project definition to baseplate/project-definition.json.
|
|
36
|
+
*
|
|
37
|
+
* @param config - Configuration for the initial project
|
|
38
|
+
*/
|
|
39
|
+
export async function generateRootPackage(config) {
|
|
40
|
+
const definition = createInitialProjectDefinition(config);
|
|
41
|
+
const logger = createConsoleLogger('error');
|
|
42
|
+
// Create project directory and write project definition first
|
|
43
|
+
// This is needed because syncProject expects the definition to exist on disk
|
|
44
|
+
const baseplateDir = path.join(config.directory, 'baseplate');
|
|
45
|
+
await fs.mkdir(baseplateDir, { recursive: true });
|
|
46
|
+
await fs.writeFile(path.join(baseplateDir, 'project-definition.json'), stringifyPrettyStable(definition));
|
|
47
|
+
// Create minimal plugin store (no plugins for initial project)
|
|
48
|
+
const pluginStore = {
|
|
49
|
+
availablePlugins: [],
|
|
50
|
+
coreModules: SERVER_CORE_MODULES,
|
|
51
|
+
};
|
|
52
|
+
// Create parser context
|
|
53
|
+
const context = {
|
|
54
|
+
pluginStore,
|
|
55
|
+
cliVersion: config.cliVersion,
|
|
56
|
+
project: {
|
|
57
|
+
id: generateProjectId(config.directory),
|
|
58
|
+
name: config.name,
|
|
59
|
+
directory: config.directory,
|
|
60
|
+
type: 'user',
|
|
61
|
+
baseplateDirectory: path.join(config.directory, 'baseplate'),
|
|
62
|
+
},
|
|
63
|
+
};
|
|
64
|
+
// Create sync metadata controller to set up .baseplate directory
|
|
65
|
+
const syncMetadataController = new SyncMetadataController(config.directory, logger);
|
|
66
|
+
// Use syncProject to generate all files and set up metadata
|
|
67
|
+
const result = await syncProject({
|
|
68
|
+
directory: config.directory,
|
|
69
|
+
logger,
|
|
70
|
+
context,
|
|
71
|
+
userConfig: {},
|
|
72
|
+
syncMetadataController,
|
|
73
|
+
overwrite: true,
|
|
74
|
+
});
|
|
75
|
+
if (result.status === 'error') {
|
|
76
|
+
throw new Error('Failed to generate project files');
|
|
77
|
+
}
|
|
78
|
+
}
|
package/dist/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare function
|
|
1
|
+
export declare function getCliVersion(): Promise<string>;
|
package/dist/version.js
CHANGED
|
@@ -1,23 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
});
|
|
11
|
-
if (packageJsonPath) {
|
|
12
|
-
// Read the package.json file.
|
|
13
|
-
const fileContent = await fs.readFile(packageJsonPath, 'utf8');
|
|
14
|
-
const packageJson = JSON.parse(fileContent);
|
|
15
|
-
// Return the version.
|
|
16
|
-
cachedVersion = packageJson.version || null;
|
|
17
|
-
}
|
|
18
|
-
else {
|
|
19
|
-
cachedVersion = null;
|
|
20
|
-
}
|
|
1
|
+
import { getPackageVersion } from '@baseplate-dev/utils/node';
|
|
2
|
+
import { createRequire } from 'node:module';
|
|
3
|
+
import path from 'node:path';
|
|
4
|
+
export async function getCliVersion() {
|
|
5
|
+
const require = createRequire(import.meta.url);
|
|
6
|
+
const cliEntryPath = require.resolve('@baseplate-dev/project-builder-cli');
|
|
7
|
+
const version = await getPackageVersion(path.dirname(cliEntryPath));
|
|
8
|
+
if (!version) {
|
|
9
|
+
throw new Error(`Unable to find version in package.json for @baseplate-dev/project-builder-cli in ${cliEntryPath}`);
|
|
21
10
|
}
|
|
22
|
-
return
|
|
11
|
+
return version;
|
|
23
12
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@baseplate-dev/create-project",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.2",
|
|
4
4
|
"description": "CLI starter kit for creating a new Baseplate project",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cli",
|
|
@@ -27,30 +27,32 @@
|
|
|
27
27
|
"files": [
|
|
28
28
|
"README.md",
|
|
29
29
|
"LICENSE",
|
|
30
|
-
"CHANGELOG",
|
|
30
|
+
"CHANGELOG.md",
|
|
31
31
|
"dist/**/*",
|
|
32
|
-
"!dist/**/*.
|
|
32
|
+
"!dist/**/*.map",
|
|
33
33
|
"!dist/**/*.tsbuildinfo",
|
|
34
34
|
"templates/**/*",
|
|
35
35
|
"bin/**/*"
|
|
36
36
|
],
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"axios": "^1.8.3",
|
|
39
38
|
"chalk": "5.3.0",
|
|
40
39
|
"commander": "^12.1.0",
|
|
41
|
-
"execa": "9.3.0",
|
|
42
40
|
"ora": "^8.0.1",
|
|
43
|
-
"@baseplate-dev/
|
|
41
|
+
"@baseplate-dev/project-builder-cli": "0.6.2",
|
|
42
|
+
"@baseplate-dev/project-builder-lib": "0.6.2",
|
|
43
|
+
"@baseplate-dev/project-builder-server": "0.6.2",
|
|
44
|
+
"@baseplate-dev/sync": "0.6.2",
|
|
45
|
+
"@baseplate-dev/utils": "0.6.2"
|
|
44
46
|
},
|
|
45
47
|
"devDependencies": {
|
|
46
|
-
"@types/node": "^22.
|
|
47
|
-
"eslint": "9.
|
|
48
|
+
"@types/node": "^22.17.2",
|
|
49
|
+
"eslint": "9.39.2",
|
|
48
50
|
"memfs": "4.15.1",
|
|
49
|
-
"prettier": "3.
|
|
50
|
-
"tsx": "4.
|
|
51
|
-
"typescript": "5.
|
|
52
|
-
"vitest": "
|
|
53
|
-
"@baseplate-dev/tools": "0.
|
|
51
|
+
"prettier": "3.8.1",
|
|
52
|
+
"tsx": "4.20.6",
|
|
53
|
+
"typescript": "5.9.3",
|
|
54
|
+
"vitest": "4.0.16",
|
|
55
|
+
"@baseplate-dev/tools": "0.6.2"
|
|
54
56
|
},
|
|
55
57
|
"engines": {
|
|
56
58
|
"node": "^22.0.0"
|
|
@@ -68,7 +70,7 @@
|
|
|
68
70
|
"dev:start": "tsx -C development ./src/create-baseplate-project.ts",
|
|
69
71
|
"lint": "eslint .",
|
|
70
72
|
"prettier:check": "prettier --check .",
|
|
71
|
-
"prettier:write": "prettier -w .",
|
|
73
|
+
"prettier:write": "prettier -w -l .",
|
|
72
74
|
"start": "node ./dist/create-baseplate-project.js",
|
|
73
75
|
"test": "vitest",
|
|
74
76
|
"typecheck": "tsc --noEmit"
|
package/dist/exec.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function exec(command: string, cwd?: string): Promise<void>;
|
package/dist/exec.js
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { execa } from 'execa';
|
|
2
|
-
import ora from 'ora';
|
|
3
|
-
export async function exec(command, cwd) {
|
|
4
|
-
const spinner = ora({
|
|
5
|
-
text: `Running ${command}...`,
|
|
6
|
-
}).start();
|
|
7
|
-
try {
|
|
8
|
-
const [cmd, ...args] = command.split(' ');
|
|
9
|
-
await execa(cmd, args, { cwd });
|
|
10
|
-
spinner.succeed();
|
|
11
|
-
}
|
|
12
|
-
catch (error) {
|
|
13
|
-
spinner.fail();
|
|
14
|
-
throw error;
|
|
15
|
-
}
|
|
16
|
-
}
|
package/dist/npm.service.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function getLatestCliVersion(): Promise<string>;
|
package/dist/npm.service.js
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import axios from 'axios';
|
|
2
|
-
import ora from 'ora';
|
|
3
|
-
export async function getLatestCliVersion() {
|
|
4
|
-
const spinner = ora({
|
|
5
|
-
text: 'Checking for the latest version of Baseplate CLI...',
|
|
6
|
-
}).start();
|
|
7
|
-
try {
|
|
8
|
-
const url = `https://registry.npmjs.org/@baseplate-dev/project-builder-cli`;
|
|
9
|
-
const response = await axios.get(url);
|
|
10
|
-
if (!response.data.name) {
|
|
11
|
-
throw new Error('Invalid response from NPM registry');
|
|
12
|
-
}
|
|
13
|
-
spinner.succeed();
|
|
14
|
-
return response.data['dist-tags'].latest;
|
|
15
|
-
}
|
|
16
|
-
catch {
|
|
17
|
-
spinner.fail('Failed to fetch the latest CLI version');
|
|
18
|
-
throw new Error('Could not determine the latest version of Baseplate CLI');
|
|
19
|
-
}
|
|
20
|
-
}
|
package/templates/.gitignore
DELETED
|
@@ -1,141 +0,0 @@
|
|
|
1
|
-
# Logs
|
|
2
|
-
logs
|
|
3
|
-
*.log
|
|
4
|
-
npm-debug.log*
|
|
5
|
-
yarn-debug.log*
|
|
6
|
-
yarn-error.log*
|
|
7
|
-
lerna-debug.log*
|
|
8
|
-
.pnpm-debug.log*
|
|
9
|
-
|
|
10
|
-
# Diagnostic reports (https://nodejs.org/api/report.html)
|
|
11
|
-
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
|
|
12
|
-
|
|
13
|
-
# Runtime data
|
|
14
|
-
pids
|
|
15
|
-
*.pid
|
|
16
|
-
*.seed
|
|
17
|
-
*.pid.lock
|
|
18
|
-
|
|
19
|
-
# Directory for instrumented libs generated by jscoverage/JSCover
|
|
20
|
-
lib-cov
|
|
21
|
-
|
|
22
|
-
# Coverage directory used by tools like istanbul
|
|
23
|
-
coverage
|
|
24
|
-
*.lcov
|
|
25
|
-
|
|
26
|
-
# nyc test coverage
|
|
27
|
-
.nyc_output
|
|
28
|
-
|
|
29
|
-
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
|
|
30
|
-
.grunt
|
|
31
|
-
|
|
32
|
-
# Bower dependency directory (https://bower.io/)
|
|
33
|
-
bower_components
|
|
34
|
-
|
|
35
|
-
# node-waf configuration
|
|
36
|
-
.lock-wscript
|
|
37
|
-
|
|
38
|
-
# Compiled binary addons (https://nodejs.org/api/addons.html)
|
|
39
|
-
build/Release
|
|
40
|
-
|
|
41
|
-
# Dependency directories
|
|
42
|
-
node_modules/
|
|
43
|
-
jspm_packages/
|
|
44
|
-
|
|
45
|
-
# Snowpack dependency directory (https://snowpack.dev/)
|
|
46
|
-
web_modules/
|
|
47
|
-
|
|
48
|
-
# TypeScript cache
|
|
49
|
-
*.tsbuildinfo
|
|
50
|
-
|
|
51
|
-
# Optional npm cache directory
|
|
52
|
-
.npm
|
|
53
|
-
|
|
54
|
-
# Optional eslint cache
|
|
55
|
-
.eslintcache
|
|
56
|
-
|
|
57
|
-
# Optional stylelint cache
|
|
58
|
-
.stylelintcache
|
|
59
|
-
|
|
60
|
-
# Microbundle cache
|
|
61
|
-
.rpt2_cache/
|
|
62
|
-
.rts2_cache_cjs/
|
|
63
|
-
.rts2_cache_es/
|
|
64
|
-
.rts2_cache_umd/
|
|
65
|
-
|
|
66
|
-
# Optional REPL history
|
|
67
|
-
.node_repl_history
|
|
68
|
-
|
|
69
|
-
# Output of 'npm pack'
|
|
70
|
-
*.tgz
|
|
71
|
-
|
|
72
|
-
# Yarn Integrity file
|
|
73
|
-
.yarn-integrity
|
|
74
|
-
|
|
75
|
-
# environment variable files
|
|
76
|
-
.env
|
|
77
|
-
.env.development.local
|
|
78
|
-
.env.test.local
|
|
79
|
-
.env.production.local
|
|
80
|
-
.env.local
|
|
81
|
-
|
|
82
|
-
# parcel-bundler cache (https://parceljs.org/)
|
|
83
|
-
.cache
|
|
84
|
-
.parcel-cache
|
|
85
|
-
|
|
86
|
-
# Next.js build output
|
|
87
|
-
.next
|
|
88
|
-
out
|
|
89
|
-
|
|
90
|
-
# Nuxt.js build / generate output
|
|
91
|
-
.nuxt
|
|
92
|
-
dist
|
|
93
|
-
|
|
94
|
-
# Gatsby files
|
|
95
|
-
.cache/
|
|
96
|
-
# Comment in the public line in if your project uses Gatsby and not Next.js
|
|
97
|
-
# https://nextjs.org/blog/next-9-1#public-directory-support
|
|
98
|
-
# public
|
|
99
|
-
|
|
100
|
-
# vuepress build output
|
|
101
|
-
.vuepress/dist
|
|
102
|
-
|
|
103
|
-
# vuepress v2.x temp and cache directory
|
|
104
|
-
.temp
|
|
105
|
-
.cache
|
|
106
|
-
|
|
107
|
-
# Docusaurus cache and generated files
|
|
108
|
-
.docusaurus
|
|
109
|
-
|
|
110
|
-
# Serverless directories
|
|
111
|
-
.serverless/
|
|
112
|
-
|
|
113
|
-
# FuseBox cache
|
|
114
|
-
.fusebox/
|
|
115
|
-
|
|
116
|
-
# DynamoDB Local files
|
|
117
|
-
.dynamodb/
|
|
118
|
-
|
|
119
|
-
# TernJS port file
|
|
120
|
-
.tern-port
|
|
121
|
-
|
|
122
|
-
# Stores VSCode versions used for testing VSCode extensions
|
|
123
|
-
.vscode-test
|
|
124
|
-
|
|
125
|
-
# yarn v2
|
|
126
|
-
.yarn/cache
|
|
127
|
-
.yarn/unplugged
|
|
128
|
-
.yarn/build-state.yml
|
|
129
|
-
.yarn/install-state.gz
|
|
130
|
-
.pnp.*
|
|
131
|
-
|
|
132
|
-
playground
|
|
133
|
-
|
|
134
|
-
.DS_Store
|
|
135
|
-
.vercel
|
|
136
|
-
|
|
137
|
-
.npmrc
|
|
138
|
-
.turbo
|
|
139
|
-
|
|
140
|
-
# Baseplate build artifacts
|
|
141
|
-
baseplate/.build
|
package/templates/.pnpmfile.cjs
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
# Prevents publish from any branch other than main
|
|
2
|
-
publish-branch=main
|
|
3
|
-
# Saves exact versions of dependencies by default
|
|
4
|
-
save-prefix=""
|
|
5
|
-
# Ensures we use locally linked packages when available
|
|
6
|
-
link-workspace-packages=true
|
|
7
|
-
# Defaults to saving as workspace:*
|
|
8
|
-
save-workspace-protocol=rolling
|
package/templates/README.md
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
# Baseplate Project
|
|
2
|
-
|
|
3
|
-
Welcome to your new Baseplate project! This README provides essential information on how to get started with your project, including setting up the generator UI and beginning your development process.
|
|
4
|
-
|
|
5
|
-
## Getting Started
|
|
6
|
-
|
|
7
|
-
To begin using the project, you will need to set up your local environment. Follow these instructions to get everything up and running.
|
|
8
|
-
|
|
9
|
-
### Prerequisites
|
|
10
|
-
|
|
11
|
-
Before you start, ensure you have `pnpm` installed on your system. If you do not have `pnpm` installed, you can learn how to install it by visiting [pnpm installation guide](https://pnpm.io/installation).
|
|
12
|
-
|
|
13
|
-
### Installation
|
|
14
|
-
|
|
15
|
-
To install the necessary dependencies for your project, run the following command in the root directory of your project:
|
|
16
|
-
|
|
17
|
-
```bash
|
|
18
|
-
pnpm install
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
### Launching the Generator UI
|
|
22
|
-
|
|
23
|
-
To start the generator UI, which allows you to configure and initiate the code generation process, execute the following command:
|
|
24
|
-
|
|
25
|
-
```bash
|
|
26
|
-
pnpm baseplate serve
|
|
27
|
-
```
|
|
28
|
-
|
|
29
|
-
This command will start the server and open the corresponding web interface where you can customize your project’s specifications and features and generate the code.
|
|
30
|
-
|
|
31
|
-
## Configuration
|
|
32
|
-
|
|
33
|
-
To configure your project settings, use the web interface launched by the above command. Here you can specify data models, authentication mechanisms, and other project-specific settings.
|
|
34
|
-
|
|
35
|
-
Thank you for choosing Baseplate for your project’s foundation!
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Generates .npmrc from a .npmrc.template file using a .env file if present
|
|
3
|
-
*
|
|
4
|
-
* This allows us to use .env files to store secrets and use them in .npmrc
|
|
5
|
-
* since it is not natively supported by pnpm.
|
|
6
|
-
*/
|
|
7
|
-
const fs = require('node:fs');
|
|
8
|
-
const path = require('node:path');
|
|
9
|
-
|
|
10
|
-
module.exports = function generateNpmRc(dirname) {
|
|
11
|
-
const templatePath = path.join(dirname, '.template.npmrc');
|
|
12
|
-
const npmrcPath = path.join(dirname, '.npmrc');
|
|
13
|
-
const envPath = path.join(dirname, '.env');
|
|
14
|
-
|
|
15
|
-
if (!fs.existsSync(templatePath)) {
|
|
16
|
-
return;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
// read .env file if present
|
|
20
|
-
const envVars = { ...process.env };
|
|
21
|
-
if (fs.existsSync(envPath)) {
|
|
22
|
-
const env = fs.readFileSync(envPath, 'utf8');
|
|
23
|
-
const lines = env
|
|
24
|
-
.split('\n')
|
|
25
|
-
.filter((line) => line && !line.startsWith('#'));
|
|
26
|
-
for (const line of lines) {
|
|
27
|
-
const [key, ...values] = line.split('=');
|
|
28
|
-
if (values.length > 0) {
|
|
29
|
-
envVars[key] = values.join('=');
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
const template = fs.readFileSync(templatePath, 'utf8');
|
|
35
|
-
|
|
36
|
-
// replace all ${VARIABLE} with process.env.VARIABLE
|
|
37
|
-
const npmrc = template
|
|
38
|
-
.replaceAll(/\${([A-Z_]+)}/g, (_, key) => {
|
|
39
|
-
if (!envVars[key]) {
|
|
40
|
-
throw new Error(`Missing environment variable ${key}`);
|
|
41
|
-
}
|
|
42
|
-
return envVars[key];
|
|
43
|
-
})
|
|
44
|
-
.replaceAll(/\${([A-Z_:a-z\-]+)}/g, (_, key) =>
|
|
45
|
-
envVars[key] ? envVars[key] : key,
|
|
46
|
-
);
|
|
47
|
-
|
|
48
|
-
const npmrcContents = `
|
|
49
|
-
# This file has been auto-generated from .npmrc.template
|
|
50
|
-
# Do not edit this file directly
|
|
51
|
-
# Edit .npmrc.template instead and run \`pnpm install\` to regenerate this file
|
|
52
|
-
|
|
53
|
-
${npmrc}`.trimStart();
|
|
54
|
-
|
|
55
|
-
if (fs.existsSync(npmrcPath)) {
|
|
56
|
-
const existingNpmrc = fs.readFileSync(npmrcPath, 'utf8');
|
|
57
|
-
|
|
58
|
-
if (existingNpmrc === npmrcContents) {
|
|
59
|
-
return;
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
fs.writeFileSync(npmrcPath, npmrcContents);
|
|
64
|
-
|
|
65
|
-
if (!process.argv.includes('--silent')) {
|
|
66
|
-
console.log(`
|
|
67
|
-
Generated .npmrc file from .template.npmrc!
|
|
68
|
-
|
|
69
|
-
Please run your command again so it can use the latest .npmrc.
|
|
70
|
-
`);
|
|
71
|
-
|
|
72
|
-
process.exit(1);
|
|
73
|
-
}
|
|
74
|
-
};
|