@tailor-platform/create-sdk 0.0.1 → 0.8.0

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.
Files changed (53) hide show
  1. package/CHANGELOG.md +446 -0
  2. package/LICENSE +21 -0
  3. package/README.md +23 -33
  4. package/dist/index.js +180 -0
  5. package/package.json +41 -8
  6. package/templates/hello-world/.gitignore +3 -0
  7. package/templates/hello-world/.prettierignore +1 -0
  8. package/templates/hello-world/.prettierrc +1 -0
  9. package/templates/hello-world/README.md +59 -0
  10. package/templates/hello-world/eslint.config.js +27 -0
  11. package/templates/hello-world/package.json +22 -0
  12. package/templates/hello-world/src/resolvers/hello.ts +19 -0
  13. package/templates/hello-world/tailor.config.ts +6 -0
  14. package/templates/hello-world/tsconfig.json +15 -0
  15. package/templates/inventory-management/.gitignore +3 -0
  16. package/templates/inventory-management/.prettierignore +2 -0
  17. package/templates/inventory-management/.prettierrc +1 -0
  18. package/templates/inventory-management/README.md +246 -0
  19. package/templates/inventory-management/eslint.config.js +33 -0
  20. package/templates/inventory-management/package.json +28 -0
  21. package/templates/inventory-management/src/db/category.ts +13 -0
  22. package/templates/inventory-management/src/db/common/permission.ts +59 -0
  23. package/templates/inventory-management/src/db/contact.ts +17 -0
  24. package/templates/inventory-management/src/db/inventory.ts +18 -0
  25. package/templates/inventory-management/src/db/notification.ts +21 -0
  26. package/templates/inventory-management/src/db/order.ts +20 -0
  27. package/templates/inventory-management/src/db/orderItem.ts +36 -0
  28. package/templates/inventory-management/src/db/product.ts +18 -0
  29. package/templates/inventory-management/src/db/user.ts +12 -0
  30. package/templates/inventory-management/src/executor/checkInventory.ts +28 -0
  31. package/templates/inventory-management/src/generated/kysely-tailordb.ts +92 -0
  32. package/templates/inventory-management/src/pipeline/registerOrder.ts +100 -0
  33. package/templates/inventory-management/tailor.config.ts +35 -0
  34. package/templates/inventory-management/tsconfig.json +16 -0
  35. package/templates/testing/.gitignore +3 -0
  36. package/templates/testing/.prettierignore +2 -0
  37. package/templates/testing/.prettierrc +1 -0
  38. package/templates/testing/README.md +130 -0
  39. package/templates/testing/e2e/globalSetup.ts +65 -0
  40. package/templates/testing/e2e/resolver.test.ts +57 -0
  41. package/templates/testing/eslint.config.js +27 -0
  42. package/templates/testing/package.json +33 -0
  43. package/templates/testing/src/db/user.ts +22 -0
  44. package/templates/testing/src/generated/db.ts +28 -0
  45. package/templates/testing/src/resolver/mockTailordb.test.ts +71 -0
  46. package/templates/testing/src/resolver/mockTailordb.ts +44 -0
  47. package/templates/testing/src/resolver/simple.test.ts +13 -0
  48. package/templates/testing/src/resolver/simple.ts +16 -0
  49. package/templates/testing/src/resolver/wrapTailordb.test.ts +53 -0
  50. package/templates/testing/src/resolver/wrapTailordb.ts +80 -0
  51. package/templates/testing/tailor.config.ts +23 -0
  52. package/templates/testing/tsconfig.json +16 -0
  53. package/templates/testing/vitest.config.ts +22 -0
package/CHANGELOG.md ADDED
@@ -0,0 +1,446 @@
1
+ # @tailor-platform/create-sdk
2
+
3
+ ## 0.8.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#3](https://github.com/tailor-platform/sdk/pull/3) [`b9c3dba`](https://github.com/tailor-platform/sdk/commit/b9c3dbaa4b1df4beb27f5b1da7fe23a83a278637) Thanks [@toiroakr](https://github.com/toiroakr)! - chore!: rename tailor-sdk to sdk
8
+
9
+ ## 0.7.6
10
+
11
+ ## 0.7.5
12
+
13
+ ## 0.7.4
14
+
15
+ ## 0.7.3
16
+
17
+ ## 0.7.2
18
+
19
+ ## 0.7.1
20
+
21
+ ## 0.7.0
22
+
23
+ ## 0.6.2
24
+
25
+ ### Patch Changes
26
+
27
+ - [#701](https://github.com/tailor-platform/sdk/pull/701) [`1d9e798`](https://github.com/tailor-platform/sdk/commit/1d9e798c667e75734da9b9119770442ce62a48ac) Thanks [@toiroakr](https://github.com/toiroakr)! - fix: seed generator
28
+
29
+ ## 0.6.1
30
+
31
+ ## 0.6.0
32
+
33
+ ## 0.5.6
34
+
35
+ ### Patch Changes
36
+
37
+ - [#691](https://github.com/tailor-platform/sdk/pull/691) [`4e949b6`](https://github.com/tailor-platform/sdk/commit/4e949b67291ce8775c189a793a99f768ab8904db) Thanks [@toiroakr](https://github.com/toiroakr)! - feat: add seed generator
38
+
39
+ Added `@tailor-platform/seed` generator that automatically generates seed data files from TailorDB type definitions. This generator creates:
40
+ - GraphQL Ingest mapping files (`mappings/*.json`) and GraphQL files for bulk data loading via [gql-ingest](https://github.com/jackchuka/gql-ingest)
41
+ - lines-db schema files (`data/*.schema.ts`) for validation via [lines-db](https://github.com/toiroakr/lines-db)
42
+ - Configuration file (`config.yaml`) defining entity dependencies
43
+
44
+ **Usage:**
45
+
46
+ ```typescript
47
+ import { defineGenerators } from "@tailor-platform/sdk";
48
+
49
+ export const generators = defineGenerators([
50
+ ["@tailor-platform/seed", { distPath: "./seed" }],
51
+ ]);
52
+ ```
53
+
54
+ This will generate seed data infrastructure based on your TailorDB types, enabling validation with [`lines-db`](https://github.com/toiroakr/lines-db) and data ingestion with [`gql-ingest`](https://github.com/jackchuka/gql-ingest).
55
+
56
+ ## 0.5.5
57
+
58
+ ## 0.5.4
59
+
60
+ ### Patch Changes
61
+
62
+ - [#682](https://github.com/tailor-platform/sdk/pull/682) [`7678f09`](https://github.com/tailor-platform/sdk/commit/7678f09909e4d604604e8845d39e86be3e7fa47a) Thanks [@remiposo](https://github.com/remiposo)! - Renamed from Tailor SDK to Tailor Platform SDK
63
+
64
+ ## 0.5.3
65
+
66
+ ### Patch Changes
67
+
68
+ - [#680](https://github.com/tailor-platform/sdk/pull/680) [`4550297`](https://github.com/tailor-platform/sdk/commit/455029768e43a9d9bffbae0b93fdabd75e905a53) Thanks [@remiposo](https://github.com/remiposo)! - Added @tailor-platform/function-types to testing
69
+
70
+ ## 0.5.2
71
+
72
+ ### Patch Changes
73
+
74
+ - [#675](https://github.com/tailor-platform/sdk/pull/675) [`8cb1c77`](https://github.com/tailor-platform/sdk/commit/8cb1c77582da17f7fa4171ea15fe4d5aa465a9bd) Thanks [@remiposo](https://github.com/remiposo)! - Added testing guides
75
+
76
+ ## 0.5.1
77
+
78
+ ## 0.5.0
79
+
80
+ ## 0.4.0
81
+
82
+ ### Minor Changes
83
+
84
+ - [#665](https://github.com/tailor-platform/sdk/pull/665) [`16e7cf2`](https://github.com/tailor-platform/sdk/commit/16e7cf2045cfa7dff717ce9001a2925cd5588d5f) Thanks [@toiroakr](https://github.com/toiroakr)! - chore!: rename pipeline -> resolver
85
+
86
+ ## 0.3.0
87
+
88
+ ### Minor Changes
89
+
90
+ - [#661](https://github.com/tailor-platform/sdk/pull/661) [`bf4583c`](https://github.com/tailor-platform/sdk/commit/bf4583cef16bcc7b88118d2814b2beec28b825dd) Thanks [@t](https://github.com/t)! - feat!: remove TailorType and set typename for resolver
91
+
92
+ ## Breaking Changes
93
+
94
+ ### Removed `t.type()` - use plain objects for input and `t.object()` for output
95
+
96
+ The `t.type()` wrapper has been removed from resolver definitions. Input fields are now passed directly as an object, and output uses `t.object()` instead.
97
+
98
+ **Before:**
99
+
100
+ ```typescript
101
+ createResolver({
102
+ name: "add",
103
+ operation: "query",
104
+ input: t.type({
105
+ a: t.int(),
106
+ b: t.int(),
107
+ }),
108
+ output: t.type({
109
+ result: t.int(),
110
+ }),
111
+ body: (context) => {
112
+ return { result: context.input.a + context.input.b };
113
+ },
114
+ });
115
+ ```
116
+
117
+ **After:**
118
+
119
+ ```typescript
120
+ createResolver({
121
+ name: "add",
122
+ operation: "query",
123
+ input: {
124
+ a: t.int(),
125
+ b: t.int(),
126
+ },
127
+ output: t.object({
128
+ result: t.int(),
129
+ }),
130
+ body: (context) => {
131
+ return { result: context.input.a + context.input.b };
132
+ },
133
+ });
134
+ ```
135
+
136
+ ## New Feature
137
+
138
+ ### Added `typeName()` method for custom GraphQL type names
139
+
140
+ You can now set custom GraphQL type names for enum and nested object fields using the `.typeName()` method. This is useful when you want to control the generated GraphQL type names.
141
+
142
+ ```typescript
143
+ createResolver({
144
+ name: "stepChain",
145
+ operation: "query",
146
+ input: {
147
+
148
+ .object({
149
+ name: t.object({
150
+ first: t.string(),
151
+ last: t.string(),
152
+ }),
153
+ activatedAt: t.datetime({ optional: true }),
154
+ })
155
+ .typeName("StepChainUser"),
156
+ },
157
+ output: t.object({
158
+ result: t.string(),
159
+ }),
160
+ body: (context) => {
161
+ return {
162
+ result: `${context.input.user.name.first} ${context.input.user.name.last}`,
163
+ };
164
+ },
165
+ });
166
+ ```
167
+
168
+ ## 0.2.1
169
+
170
+ ## 0.2.0
171
+
172
+ ## 0.1.1
173
+
174
+ ## 0.1.0
175
+
176
+ ### Minor Changes
177
+
178
+ - [#643](https://github.com/tailor-platform/sdk/pull/643) [`793a792`](https://github.com/tailor-platform/sdk/commit/793a7924bd6df4b5c23c5747e1935772ada0c152) Thanks [@toiroakr](https://github.com/toiroakr)! - feat!: remove assertNonNull option
179
+
180
+ ## Breaking Changes
181
+
182
+ ### Removed `assertNonNull` option from field definitions
183
+
184
+ The `assertNonNull` option has been removed from field configurations. This option was previously used with `.hooks()` to ensure fields always return non-null values in resolver outputs, even when marked as `optional: true`.
185
+
186
+ **Before:**
187
+
188
+ ```typescript
189
+ const model = db.type("Model", {
190
+ field: db.string({ optional: true, assertNonNull: true }).hooks({
191
+ create: () => "default-value",
192
+ }),
193
+ });
194
+ ```
195
+
196
+ **After:**
197
+
198
+ ```typescript
199
+ const model = db.type("Model", {
200
+ field: db.string().hooks({
201
+ create: () => "default-value",
202
+ }),
203
+ });
204
+ ```
205
+
206
+ When you use `.hooks()` with a `create` hook that always provides a value, the field should be defined as non-nullable (without `optional: true`).
207
+
208
+ ### Serial fields must be non-nullable
209
+
210
+ The `.serial()` method can now only be used on non-nullable fields. If you were using `serial()` with `optional: true`, you must remove the `optional: true` option.
211
+
212
+ **Before:**
213
+
214
+ ```typescript
215
+ const invoice = db.type("Invoice", {
216
+ invoiceNumber: db.string({ optional: true }).serial({
217
+ start: 1000,
218
+ format: "INV-%05d",
219
+ }),
220
+ });
221
+ ```
222
+
223
+ **After:**
224
+
225
+ ```typescript
226
+ const invoice = db.type("Invoice", {
227
+ invoiceNumber: db.string().serial({
228
+ start: 1000,
229
+ format: "INV-%05d",
230
+ }),
231
+ });
232
+ ```
233
+
234
+ ### Hook function argument types
235
+
236
+ The `data` parameter in hook functions now treats all fields as optional (`T | null | undefined`), regardless of whether they are required in the schema.
237
+
238
+ **Before:**
239
+
240
+ ```typescript
241
+ fullAddress: db.string({ optional: true }).hooks({
242
+ create: ({ data }) => `${data.postalCode} ${data.address} ${data.city}`,
243
+ // data.postalCode was guaranteed to be present
244
+ });
245
+ ```
246
+
247
+ **After:**
248
+
249
+ ```typescript
250
+ fullAddress: db.string({ optional: true }).hooks({
251
+ create: ({ data }) =>
252
+ `${data.postalCode ?? ""} ${data.address ?? ""} ${data.city ?? ""}`,
253
+ // All fields may be undefined - use ?? or add null checks
254
+ });
255
+ ```
256
+
257
+ ## 0.0.99
258
+
259
+ ## 0.0.98
260
+
261
+ ## 0.0.97
262
+
263
+ ## 0.0.96
264
+
265
+ ## 0.0.95
266
+
267
+ ### Patch Changes
268
+
269
+ - [#627](https://github.com/tailor-platform/sdk/pull/627) [`6582379`](https://github.com/tailor-platform/sdk/commit/6582379d81c7d5469e27d672c9313a1cb9b81c50) Thanks [@toiroakr](https://github.com/toiroakr)! - feat!: unnest resolver input type
270
+
271
+ ## Breaking Changes
272
+
273
+ The structure of resolver input arguments in GraphQL queries/mutations has changed. Previously, all input fields were nested under a single `input` argument, but now they are passed as flat, top-level arguments.
274
+
275
+ ### Migration Guide
276
+
277
+ You have two migration options:
278
+
279
+ #### Option 1: Update GraphQL queries
280
+
281
+ Update your GraphQL queries to pass arguments as flat parameters.
282
+
283
+ **Before:**
284
+
285
+ ```gql
286
+ query {
287
+ add(input: { a: 1, b: 2 }) {
288
+ result
289
+ }
290
+ }
291
+ ```
292
+
293
+ **After:**
294
+
295
+ ```gql
296
+ query {
297
+ add(a: 1, b: 2) {
298
+ result
299
+ }
300
+ }
301
+ ```
302
+
303
+ #### Option 2: Wrap input type to maintain existing GraphQL API
304
+
305
+ If you need to maintain backward compatibility with existing GraphQL queries, wrap your input type in a single `input` field:
306
+
307
+ ```typescript
308
+ createResolver({
309
+ name: "add",
310
+ operation: "query",
311
+ input: t.type({
312
+ input: t.object({
313
+ a: t.int(),
314
+ b: t.int(),
315
+ }),
316
+ }),
317
+ body: (context) => {
318
+ return { result: context.input.input.a + context.input.input.b };
319
+ },
320
+ output: t.type({ result: t.int() }),
321
+ });
322
+ ```
323
+
324
+ This way, your existing GraphQL queries with `add(input: { a: 1, b: 2 })` will continue to work.
325
+
326
+ ## 0.0.94
327
+
328
+ ## 0.0.93
329
+
330
+ ### Patch Changes
331
+
332
+ - [#617](https://github.com/tailor-platform/sdk/pull/617) [`d45fe83`](https://github.com/tailor-platform/sdk/commit/d45fe834398426c94e5239e9bc94a5736df87016) Thanks [@toiroakr](https://github.com/toiroakr)! - feat: add tailordb.Client mock for apply
333
+
334
+ ## 0.0.92
335
+
336
+ ### Patch Changes
337
+
338
+ - [#607](https://github.com/tailor-platform/sdk/pull/607) [`ab2cadd`](https://github.com/tailor-platform/sdk/commit/ab2cadd9f92ac488ae1963d0768e2ca96ec66e0f) Thanks [@toiroakr](https://github.com/toiroakr)! - refactor: move inflection to out of configuration
339
+
340
+ ## 0.0.91
341
+
342
+ ### Patch Changes
343
+
344
+ - [#606](https://github.com/tailor-platform/sdk/pull/606) [`f1be4bf`](https://github.com/tailor-platform/sdk/commit/f1be4bf0f324e5ea1896fa4c1a9415b48eb0b134) Thanks [@toiroakr](https://github.com/toiroakr)! - feat!: kysely-db generator renewal
345
+
346
+ ## 0.0.90
347
+
348
+ ### Patch Changes
349
+
350
+ - [#598](https://github.com/tailor-platform/sdk/pull/598) [`7b2ffaf`](https://github.com/tailor-platform/sdk/commit/7b2ffaf47b8f324bf489c7734f566be320dd69cc) Thanks [@toiroakr](https://github.com/toiroakr)! - chore: improve url schema
351
+
352
+ - [#600](https://github.com/tailor-platform/sdk/pull/600) [`ec16341`](https://github.com/tailor-platform/sdk/commit/ec16341c0d5aaf5c786f03216ab5642ff4fe7683) Thanks [@toiroakr](https://github.com/toiroakr)! - fix: remove callbackUrl from defineStaticWebsite
353
+
354
+ ## 0.0.89
355
+
356
+ ### Patch Changes
357
+
358
+ - [#597](https://github.com/tailor-platform/sdk/pull/597) [`36ea41c`](https://github.com/tailor-platform/sdk/commit/36ea41c4fea9c4d6ff4b5b1d7fd8582ceae09c89) Thanks [@toiroakr](https://github.com/toiroakr)! - fix: stricter define function types
359
+
360
+ - [#595](https://github.com/tailor-platform/sdk/pull/595) [`2d3f019`](https://github.com/tailor-platform/sdk/commit/2d3f01977bcf271a8874fc5f6d273d6c1c1561f8) Thanks [@toiroakr](https://github.com/toiroakr)! - feat: add defineIdp
361
+
362
+ ## 0.0.88
363
+
364
+ ### Patch Changes
365
+
366
+ - [#594](https://github.com/tailor-platform/sdk/pull/594) [`ac244cd`](https://github.com/tailor-platform/sdk/commit/ac244cd7769cfe92a962ea48918559dd403991df) Thanks [@toiroakr](https://github.com/toiroakr)! - feat: add defineStaticWebsite
367
+
368
+ - [#589](https://github.com/tailor-platform/sdk/pull/589) [`5195548`](https://github.com/tailor-platform/sdk/commit/5195548158aa61fe7b33a75a4812d5345adde3da) Thanks [@toiroakr](https://github.com/toiroakr)! - fix: type guard for workspaceId
369
+
370
+ ## 0.0.87
371
+
372
+ ### Patch Changes
373
+
374
+ - [#585](https://github.com/tailor-platform/sdk/pull/585) [`3f13d44`](https://github.com/tailor-platform/sdk/commit/3f13d4463047862cfe438f71d87629e49320c6eb) Thanks [@toiroakr](https://github.com/toiroakr)! - chore: update resolver schema
375
+
376
+ ## 0.0.86
377
+
378
+ ### Patch Changes
379
+
380
+ - [#575](https://github.com/tailor-platform/sdk/pull/575) [`0d64a86`](https://github.com/tailor-platform/sdk/commit/0d64a869766049ffb8462dace6222db53e23dbce) Thanks [@toiroakr](https://github.com/toiroakr)! - fix: strict resolver output type
381
+
382
+ ## 0.0.85
383
+
384
+ ### Patch Changes
385
+
386
+ - [#573](https://github.com/tailor-platform/sdk/pull/573) [`11cae3e`](https://github.com/tailor-platform/sdk/commit/11cae3e8aa89fc8d71993a0bb9e28c02123f185f) Thanks [@toiroakr](https://github.com/toiroakr)! - fix: generated type reference
387
+
388
+ ## 0.0.84
389
+
390
+ ## 0.0.83
391
+
392
+ ### Patch Changes
393
+
394
+ - [#559](https://github.com/tailor-platform/sdk/pull/559) [`ebcb667`](https://github.com/tailor-platform/sdk/commit/ebcb6674bbc1fc3ac819bb0e2930255a660ade1b) Thanks [@toiroakr](https://github.com/toiroakr)! - Remove steps from resolver
395
+
396
+ ## 0.0.82
397
+
398
+ ## 0.0.81
399
+
400
+ ### Patch Changes
401
+
402
+ - [#552](https://github.com/tailor-platform/sdk/pull/552) [`c9f10c5`](https://github.com/tailor-platform/sdk/commit/c9f10c5ca80ebb1e282b3639e2b7a24b4aefba7d) Thanks [@toiroakr](https://github.com/toiroakr)! - Simplified permission definitions with automatic type generation
403
+
404
+ ## 0.0.80
405
+
406
+ ### Patch Changes
407
+
408
+ - [#548](https://github.com/tailor-platform/sdk/pull/548) [`ce834be`](https://github.com/tailor-platform/sdk/commit/ce834bec7c7d80a3f56a520339a569fef9225888) Thanks [@toiroakr](https://github.com/toiroakr)! - kysely-type generator: support assertNonNull
409
+
410
+ ## 0.0.79
411
+
412
+ ### Patch Changes
413
+
414
+ - [#545](https://github.com/tailor-platform/sdk/pull/545) [`e82a038`](https://github.com/tailor-platform/sdk/commit/e82a038b022ebf58dd377a247b7bdf1fa608701c) Thanks [@remiposo](https://github.com/remiposo)! - chore: Add LICENSE
415
+
416
+ ## 0.0.78
417
+
418
+ ## 0.0.77
419
+
420
+ ## 0.0.76
421
+
422
+ ### Patch Changes
423
+
424
+ - [#521](https://github.com/tailor-platform/sdk/pull/521) [`f380645`](https://github.com/tailor-platform/sdk/commit/f3806455815ed4efd80cfe11428bd7862c77b401) Thanks [@remiposo](https://github.com/remiposo)! - chore: Update CHANGELOG.md format
425
+
426
+ ## 0.0.75
427
+
428
+ ### Patch Changes
429
+
430
+ - dca9f5b: Separate generator config from defineConfig
431
+
432
+ ## 0.0.74
433
+
434
+ ## 0.0.73
435
+
436
+ ### Patch Changes
437
+
438
+ - 9be7344: Change defineConfig to be tailored specifically for a single app
439
+
440
+ ## 0.0.72
441
+
442
+ ## 0.0.71
443
+
444
+ ### Patch Changes
445
+
446
+ - 9f7a52c: Add CHANGELOG.md
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright © 2025 Tailor Inc.
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
package/README.md CHANGED
@@ -1,45 +1,35 @@
1
- # @tailor-platform/create-sdk
1
+ # Create Tailor Platform SDK
2
2
 
3
- ## ⚠️ IMPORTANT NOTICE ⚠️
3
+ `@tailor-platform/create-sdk` is a CLI tool to quickly scaffold a new [Tailor Platform SDK](https://www.npmjs.com/package/@tailor-platform/sdk) project.
4
4
 
5
- **This package is created solely for the purpose of setting up OIDC (OpenID Connect) trusted publishing with npm.**
5
+ ## Usage
6
6
 
7
- This is **NOT** a functional package and contains **NO** code or functionality beyond the OIDC setup configuration.
7
+ ```bash
8
+ npm create @tailor-platform/sdk [OPTIONS] [NAME]
9
+ # OR
10
+ yarn create @tailor-platform/sdk [OPTIONS] [NAME]
11
+ # OR
12
+ pnpm create @tailor-platform/sdk [OPTIONS] [NAME]
13
+ ```
8
14
 
9
- ## Purpose
15
+ ### Arguments
10
16
 
11
- This package exists to:
12
- 1. Configure OIDC trusted publishing for the package name `@tailor-platform/create-sdk`
13
- 2. Enable secure, token-less publishing from CI/CD workflows
14
- 3. Establish provenance for packages published under this name
17
+ - `NAME`: (Optional) The name of your new project. If not provided, you'll be prompted to enter one.
15
18
 
16
- ## What is OIDC Trusted Publishing?
19
+ ### Options
17
20
 
18
- OIDC trusted publishing allows package maintainers to publish packages directly from their CI/CD workflows without needing to manage npm access tokens. Instead, it uses OpenID Connect to establish trust between the CI/CD provider (like GitHub Actions) and npm.
21
+ - `--template <template-name>`: (Optional) Specify a template to use for your project. If not provided, you'll be prompted to select one from a list of available templates.
19
22
 
20
- ## Setup Instructions
23
+ ## What it does
21
24
 
22
- To properly configure OIDC trusted publishing for this package:
25
+ This tool will:
23
26
 
24
- 1. Go to [npmjs.com](https://www.npmjs.com/) and navigate to your package settings
25
- 2. Configure the trusted publisher (e.g., GitHub Actions)
26
- 3. Specify the repository and workflow that should be allowed to publish
27
- 4. Use the configured workflow to publish your actual package
27
+ 1. Create a new directory with the specified project name.
28
+ 2. Scaffold a new Tailor Platform SDK project in that directory using the selected template.
29
+ 3. Install the necessary dependencies with the package manager being used.
30
+ 4. Initialize a new Git repository in the project directory.
28
31
 
29
- ## DO NOT USE THIS PACKAGE
32
+ ### Note
30
33
 
31
- This package is a placeholder for OIDC configuration only. It:
32
- - Contains no executable code
33
- - Provides no functionality
34
- - Should not be installed as a dependency
35
- - Exists only for administrative purposes
36
-
37
- ## More Information
38
-
39
- For more details about npm's trusted publishing feature, see:
40
- - [npm Trusted Publishing Documentation](https://docs.npmjs.com/generating-provenance-statements)
41
- - [GitHub Actions OIDC Documentation](https://docs.github.com/en/actions/deployment/security-hardening-your-deployments/about-security-hardening-with-openid-connect)
42
-
43
- ---
44
-
45
- **Maintained for OIDC setup purposes only**
34
+ - If none of the supported package managers (npm, yarn, pnpm) are found, dependency installation will be skipped.
35
+ - If the project already exists within a git repository, git initialization will be skipped.