kaddidlehopper 0.7.0 → 0.7.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/dist/cli.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { resolve, basename } from 'node:path';
2
- import { existsSync, readdirSync } from 'node:fs';
2
+ import { existsSync } from 'node:fs';
3
3
  import { cp, rm, mkdtemp, readFile, writeFile } from 'node:fs/promises';
4
4
  import { tmpdir } from 'node:os';
5
5
  import { join } from 'node:path';
@@ -51,8 +51,7 @@ export function cli() {
51
51
  .option('--add-ons [id]', 'starter ID to use from the template repo')
52
52
  .option('--list-addons-json', 'list all available starters as JSON', false)
53
53
  .option('--no-git', 'do not create a git repository')
54
- .option('--target-dir <path>', 'the target directory for the application root')
55
- .option('-f, --force', 'force project creation even if the target directory is not empty');
54
+ .option('--target-dir <path>', 'the target directory for the application root');
56
55
  program.action(async (projectName, options) => {
57
56
  // Handle --list-addons-json
58
57
  if (options.listAddonsJson) {
@@ -77,14 +76,6 @@ export function cli() {
77
76
  console.error(chalk.red(error));
78
77
  process.exit(1);
79
78
  }
80
- // Check if target directory exists and is non-empty
81
- if (existsSync(targetDir)) {
82
- const contents = readdirSync(targetDir);
83
- if (contents.length > 0 && !options.force) {
84
- console.error(chalk.red(`Target directory "${targetDir}" is not empty. Use --force to overwrite.`));
85
- process.exit(1);
86
- }
87
- }
88
79
  // Delete index.html if it exists in the target directory
89
80
  const indexHtmlPath = join(targetDir, 'index.html');
90
81
  if (existsSync(indexHtmlPath)) {
@@ -4,6 +4,5 @@ export interface CliOptions {
4
4
  addOns: string | boolean | undefined;
5
5
  listAddonsJson: boolean;
6
6
  git: boolean;
7
- force: boolean | undefined;
8
7
  targetDir: string | undefined;
9
8
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kaddidlehopper",
3
- "version": "0.7.0",
3
+ "version": "0.7.1",
4
4
  "description": "Create TanStack Start applications for Netlify",
5
5
  "bin": "./dist/index.js",
6
6
  "type": "module",
package/src/cli.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { resolve, basename } from 'node:path'
2
- import { existsSync, readdirSync } from 'node:fs'
2
+ import { existsSync } from 'node:fs'
3
3
  import { cp, rm, mkdtemp, readFile, writeFile } from 'node:fs/promises'
4
4
  import { tmpdir } from 'node:os'
5
5
  import { join } from 'node:path'
@@ -72,10 +72,6 @@ export function cli() {
72
72
  '--target-dir <path>',
73
73
  'the target directory for the application root',
74
74
  )
75
- .option(
76
- '-f, --force',
77
- 'force project creation even if the target directory is not empty',
78
- )
79
75
 
80
76
  program.action(async (projectName: string | undefined, options: CliOptions) => {
81
77
  // Handle --list-addons-json
@@ -106,19 +102,6 @@ export function cli() {
106
102
  process.exit(1)
107
103
  }
108
104
 
109
- // Check if target directory exists and is non-empty
110
- if (existsSync(targetDir)) {
111
- const contents = readdirSync(targetDir)
112
- if (contents.length > 0 && !options.force) {
113
- console.error(
114
- chalk.red(
115
- `Target directory "${targetDir}" is not empty. Use --force to overwrite.`,
116
- ),
117
- )
118
- process.exit(1)
119
- }
120
- }
121
-
122
105
  // Delete index.html if it exists in the target directory
123
106
  const indexHtmlPath = join(targetDir, 'index.html')
124
107
  if (existsSync(indexHtmlPath)) {
package/src/types.ts CHANGED
@@ -4,6 +4,5 @@ export interface CliOptions {
4
4
  addOns: string | boolean | undefined
5
5
  listAddonsJson: boolean
6
6
  git: boolean
7
- force: boolean | undefined
8
7
  targetDir: string | undefined
9
8
  }