@tailor-platform/create-sdk 1.6.1 → 1.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 CHANGED
@@ -1,5 +1,7 @@
1
1
  # @tailor-platform/create-sdk
2
2
 
3
+ ## 1.6.2
4
+
3
5
  ## 1.6.1
4
6
 
5
7
  ## 1.6.0
package/README.md CHANGED
@@ -5,13 +5,15 @@
5
5
  ## Usage
6
6
 
7
7
  ```bash
8
- npm create @tailor-platform/sdk [OPTIONS] [NAME]
8
+ npm create @tailor-platform/sdk -- [OPTIONS] [NAME]
9
9
  # OR
10
10
  yarn create @tailor-platform/sdk [OPTIONS] [NAME]
11
11
  # OR
12
12
  pnpm create @tailor-platform/sdk [OPTIONS] [NAME]
13
13
  ```
14
14
 
15
+ Note: npm 7+ requires `--` before create-sdk options (for example, `--template`).
16
+
15
17
  ### Arguments
16
18
 
17
19
  - `NAME`: (Optional) The name of your new project. If not provided, you'll be prompted to enter one.
package/dist/index.js CHANGED
@@ -1,9 +1,10 @@
1
1
  #!/usr/bin/env node
2
2
  import { chdir } from "node:process";
3
3
  import { cancel, intro, isCancel, log, outro, select, spinner, text } from "@clack/prompts";
4
- import { defineCommand, runMain } from "citty";
5
4
  import pc from "picocolors";
6
5
  import { readPackageJSON } from "pkg-types";
6
+ import { arg, defineCommand, runMain } from "politty";
7
+ import { z } from "zod";
7
8
  import { existsSync } from "node:fs";
8
9
  import { cp, readdir, rename } from "node:fs/promises";
9
10
  import { join, resolve } from "node:path";
@@ -141,24 +142,16 @@ const initProject = async () => {
141
142
  const main = async () => {
142
143
  const packageJson = await readPackageJSON(import.meta.url);
143
144
  await runMain(defineCommand({
144
- meta: {
145
- name: packageJson.name,
146
- version: packageJson.version,
147
- description: packageJson.description
148
- },
149
- args: {
150
- name: {
151
- type: "positional",
152
- description: "Project name",
153
- required: false
154
- },
155
- template: {
156
- type: "string",
157
- description: "Template name",
158
- required: false
159
- }
160
- },
161
- async run({ args }) {
145
+ name: packageJson.name ?? "create-sdk",
146
+ description: packageJson.description,
147
+ args: z.object({
148
+ name: arg(z.string().optional(), {
149
+ positional: true,
150
+ description: "Project name"
151
+ }),
152
+ template: arg(z.string().optional(), { description: "Template name" })
153
+ }),
154
+ async run(args) {
162
155
  intro(pc.bold(pc.cyan("✨ Welcome to Tailor Platform SDK")));
163
156
  const ctx = await collectContext({
164
157
  name: args.name,
@@ -173,7 +166,7 @@ const main = async () => {
173
166
 
174
167
  ` + pc.dim("Learn more: https://docs.tailor.tech"));
175
168
  }
176
- }));
169
+ }), { version: packageJson.version });
177
170
  };
178
171
  await main();
179
172
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tailor-platform/create-sdk",
3
- "version": "1.6.1",
3
+ "version": "1.6.2",
4
4
  "description": "A CLI tool to quickly create a new Tailor Platform SDK project",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -19,10 +19,11 @@
19
19
  "type": "module",
20
20
  "dependencies": {
21
21
  "@clack/prompts": "0.11.0",
22
- "citty": "0.1.6",
23
22
  "execa": "9.6.1",
24
23
  "picocolors": "1.1.1",
25
- "pkg-types": "2.3.0"
24
+ "pkg-types": "2.3.0",
25
+ "politty": "^0.1.1",
26
+ "zod": "4.3.5"
26
27
  },
27
28
  "devDependencies": {
28
29
  "@eslint/js": "9.39.2",
@@ -12,7 +12,7 @@
12
12
  },
13
13
  "devDependencies": {
14
14
  "@eslint/js": "9.39.2",
15
- "@tailor-platform/sdk": "1.6.1",
15
+ "@tailor-platform/sdk": "1.6.2",
16
16
  "@types/node": "24.10.9",
17
17
  "eslint": "9.39.2",
18
18
  "eslint-plugin-oxlint": "1.39.0",
@@ -18,7 +18,7 @@
18
18
  "devDependencies": {
19
19
  "@eslint/js": "9.39.2",
20
20
  "@tailor-platform/function-types": "0.8.0",
21
- "@tailor-platform/sdk": "1.6.1",
21
+ "@tailor-platform/sdk": "1.6.2",
22
22
  "@types/node": "24.10.9",
23
23
  "eslint": "9.39.2",
24
24
  "eslint-plugin-oxlint": "1.39.0",
@@ -14,7 +14,7 @@
14
14
  },
15
15
  "devDependencies": {
16
16
  "@eslint/js": "9.39.2",
17
- "@tailor-platform/sdk": "1.6.1",
17
+ "@tailor-platform/sdk": "1.6.2",
18
18
  "@types/node": "24.10.9",
19
19
  "eslint": "9.39.2",
20
20
  "eslint-plugin-oxlint": "1.39.0",
@@ -21,7 +21,7 @@
21
21
  "devDependencies": {
22
22
  "@eslint/js": "9.39.2",
23
23
  "@tailor-platform/function-types": "0.8.0",
24
- "@tailor-platform/sdk": "1.6.1",
24
+ "@tailor-platform/sdk": "1.6.2",
25
25
  "@types/node": "24.10.9",
26
26
  "eslint": "9.39.2",
27
27
  "eslint-plugin-oxlint": "1.39.0",