@coloop-ai/create-package 0.1.1 → 0.1.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.
@@ -48,6 +48,20 @@ if (!check('gh auth status')) {
48
48
  process.exit(1)
49
49
  }
50
50
 
51
+ import { existsSync } from 'node:fs'
52
+
53
+ if (existsSync(name)) {
54
+ console.error(`Error: Directory '${name}' already exists.`)
55
+ process.exit(1)
56
+ }
57
+
58
+ if (check(`gh repo view ${GITHUB_ORG}/${name}`)) {
59
+ console.error(
60
+ `Error: Repository ${GITHUB_ORG}/${name} already exists on GitHub.`,
61
+ )
62
+ process.exit(1)
63
+ }
64
+
51
65
  // ── Create repo from template ────────────────────────────────────
52
66
 
53
67
  console.log(`Creating ${GITHUB_ORG}/${name} from template...`)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@coloop-ai/create-package",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "description": "Scaffold a new @coloop-ai TypeScript package from the template.",
5
5
  "license": "MIT",
6
6
  "repository": {