@tukuyomil032/bricklayer 1.0.0 → 1.0.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.
@@ -86,7 +86,7 @@ function runCommandWithProgress(command, cwd) {
86
86
  const target = maxHold * (1 - Math.exp(-elapsed / 6000));
87
87
  // Advance progress a bit toward target, ensuring monotonic increase
88
88
  // If we've recently seen installer output, move faster
89
- const sinceOutput = lastOutputAt ? (Date.now() - lastOutputAt) : Infinity;
89
+ const sinceOutput = lastOutputAt ? Date.now() - lastOutputAt : Infinity;
90
90
  const speedMultiplier = sinceOutput < 1000 ? 2.0 : 1.0;
91
91
  progress = Math.min(target, progress + 0.6 * speedMultiplier);
92
92
  const floor = Math.floor(progress);
@@ -120,9 +120,15 @@ function runCommandWithProgress(command, cwd) {
120
120
  }
121
121
  };
122
122
  if (child.stdout)
123
- child.stdout.on('data', (c) => { stdoutChunks.push(Buffer.from(c)); onOutput(); });
123
+ child.stdout.on('data', (c) => {
124
+ stdoutChunks.push(Buffer.from(c));
125
+ onOutput();
126
+ });
124
127
  if (child.stderr)
125
- child.stderr.on('data', (c) => { stderrChunks.push(Buffer.from(c)); onOutput(); });
128
+ child.stderr.on('data', (c) => {
129
+ stderrChunks.push(Buffer.from(c));
130
+ onOutput();
131
+ });
126
132
  child.on('error', (err) => {
127
133
  clearInterval(timer);
128
134
  try {
@@ -1,5 +1,5 @@
1
1
  const LICENSE_TEXTS = {
2
- 'MIT': `MIT License
2
+ MIT: `MIT License
3
3
 
4
4
  Copyright (c) [year], [fullname] All Rights Reserved.
5
5
 
@@ -90,7 +90,9 @@ export async function promptProjectDetails(opts = {}) {
90
90
  const answers = {};
91
91
  console.log(''); // Blank line before prompts
92
92
  const uiWith = inquirer;
93
- const bottomBar = uiWith.ui && uiWith.ui.BottomBar ? new uiWith.ui.BottomBar() : { updateBottomBar: () => { }, close: () => { } };
93
+ const bottomBar = uiWith.ui && uiWith.ui.BottomBar
94
+ ? new uiWith.ui.BottomBar()
95
+ : { updateBottomBar: () => { }, close: () => { } };
94
96
  const updateProgress = (n) => {
95
97
  const progressLine = `Project Scaffolding Progress: [${n}/${totalQuestions}]`;
96
98
  try {
@@ -2,169 +2,164 @@ import LICENSE_TEXTS from './licenses.js';
2
2
  // Embedded templates (inlined so builds include templates without copying files)
3
3
  const staticTemplates = {
4
4
  gitignore: [
5
- "# Dependencies",
6
- "node_modules/",
7
- "bun.lockb",
8
- "",
9
- "# Build output",
10
- "dist/",
11
- "",
12
- "# Environment files",
13
- ".env",
14
- ".env.local",
15
- ".env.*.local",
16
- "",
17
- "# macOS",
18
- ".DS_Store",
19
- ".AppleDouble",
20
- ".LSOverride",
21
- "",
22
- "# IDE",
23
- ".vscode/",
24
- ".idea/",
25
- "*.swp",
26
- "*.swo",
27
- "*~",
28
- "",
29
- "# Logs",
30
- "logs/",
31
- "*.log",
32
- "npm-debug.log*",
33
- "yarn-debug.log*",
34
- "yarn-error.log*",
35
- "",
36
- "# Temporary files",
37
- "*.tmp",
38
- ".temp/",
39
- "temp/",
40
- "",
41
- "# Linter and formatter cache",
42
- ".eslintcache",
43
- ".prettier-cache",
44
- "",
45
- "# Husky",
46
- ".husky/_"
5
+ '# Dependencies',
6
+ 'node_modules/',
7
+ 'bun.lockb',
8
+ '',
9
+ '# Build output',
10
+ 'dist/',
11
+ '',
12
+ '# Environment files',
13
+ '.env',
14
+ '.env.local',
15
+ '.env.*.local',
16
+ '',
17
+ '# macOS',
18
+ '.DS_Store',
19
+ '.AppleDouble',
20
+ '.LSOverride',
21
+ '',
22
+ '# IDE',
23
+ '.vscode/',
24
+ '.idea/',
25
+ '*.swp',
26
+ '*.swo',
27
+ '*~',
28
+ '',
29
+ '# Logs',
30
+ 'logs/',
31
+ '*.log',
32
+ 'npm-debug.log*',
33
+ 'yarn-debug.log*',
34
+ 'yarn-error.log*',
35
+ '',
36
+ '# Temporary files',
37
+ '*.tmp',
38
+ '.temp/',
39
+ 'temp/',
40
+ '',
41
+ '# Linter and formatter cache',
42
+ '.eslintcache',
43
+ '.prettier-cache',
44
+ '',
45
+ '# Husky',
46
+ '.husky/_',
47
47
  ],
48
48
  prettierignore: [
49
- "# Dependencies",
50
- "node_modules",
51
- "",
52
- "# Build output",
53
- "dist",
54
- "",
55
- "# Lock files",
56
- "bun.lockb",
57
- "package-lock.json",
58
- "yarn.lock",
59
- "pnpm-lock.yaml",
60
- "",
61
- "# Logs",
62
- "*.log",
63
- "",
64
- "# Coverage",
65
- "coverage"
49
+ '# Dependencies',
50
+ 'node_modules',
51
+ '',
52
+ '# Build output',
53
+ 'dist',
54
+ '',
55
+ '# Lock files',
56
+ 'bun.lockb',
57
+ 'package-lock.json',
58
+ 'yarn.lock',
59
+ 'pnpm-lock.yaml',
60
+ '',
61
+ '# Logs',
62
+ '*.log',
63
+ '',
64
+ '# Coverage',
65
+ 'coverage',
66
66
  ],
67
67
  npmignore: [
68
- "# Source files",
69
- "src/",
70
- "tsconfig.json",
71
- "eslint.config.js",
72
- ".prettierrc",
73
- ".prettierignore",
74
- ".editorconfig",
75
- "",
76
- "# Tests and development",
77
- "*.test.ts",
78
- "*.spec.ts",
79
- "coverage/",
80
- ".nyc_output/",
81
- "",
82
- "# Git and CI",
83
- ".git/",
84
- ".github/",
85
- ".gitignore",
86
- ".husky/",
87
- "",
88
- "# IDE",
89
- ".vscode/",
90
- ".idea/",
91
- "*.swp",
92
- "*.swo",
93
- "*~",
94
- "",
95
- "# Logs",
96
- "logs/",
97
- "*.log",
98
- "npm-debug.log*",
99
- "yarn-debug.log*",
100
- "yarn-error.log*",
101
- "",
102
- "# Lock files",
103
- "bun.lock",
104
- "package-lock.json",
105
- "yarn.lock",
106
- "pnpm-lock.yaml",
107
- "",
108
- "# macOS",
109
- ".DS_Store",
110
- ".AppleDouble",
111
- ".LSOverride",
112
- "",
113
- "# Temporary files",
114
- "*.tmp",
115
- ".temp/",
116
- "temp/",
117
- "",
118
- "# Development",
119
- "README.dev.md",
120
- "CONTRIBUTING.md",
121
- "",
122
- "# Documentation",
123
- "docs/",
124
- "",
125
- "# Zip files",
126
- "*.zip"
68
+ '# Source files',
69
+ 'src/',
70
+ 'tsconfig.json',
71
+ 'eslint.config.js',
72
+ '.prettierrc',
73
+ '.prettierignore',
74
+ '.editorconfig',
75
+ '',
76
+ '# Tests and development',
77
+ '*.test.ts',
78
+ '*.spec.ts',
79
+ 'coverage/',
80
+ '.nyc_output/',
81
+ '',
82
+ '# Git and CI',
83
+ '.git/',
84
+ '.github/',
85
+ '.gitignore',
86
+ '.husky/',
87
+ '',
88
+ '# IDE',
89
+ '.vscode/',
90
+ '.idea/',
91
+ '*.swp',
92
+ '*.swo',
93
+ '*~',
94
+ '',
95
+ '# Logs',
96
+ 'logs/',
97
+ '*.log',
98
+ 'npm-debug.log*',
99
+ 'yarn-debug.log*',
100
+ 'yarn-error.log*',
101
+ '',
102
+ '# Lock files',
103
+ 'bun.lock',
104
+ 'package-lock.json',
105
+ 'yarn.lock',
106
+ 'pnpm-lock.yaml',
107
+ '',
108
+ '# macOS',
109
+ '.DS_Store',
110
+ '.AppleDouble',
111
+ '.LSOverride',
112
+ '',
113
+ '# Temporary files',
114
+ '*.tmp',
115
+ '.temp/',
116
+ 'temp/',
117
+ '',
118
+ '# Development',
119
+ 'README.dev.md',
120
+ 'CONTRIBUTING.md',
121
+ '',
122
+ '# Documentation',
123
+ 'docs/',
124
+ '',
125
+ '# Zip files',
126
+ '*.zip',
127
127
  ],
128
128
  editorconfig: [
129
- "# EditorConfig is awesome: https://EditorConfig.org",
130
- "",
131
- "root = true",
132
- "",
133
- "[*]",
134
- "charset = utf-8",
135
- "end_of_line = lf",
136
- "insert_final_newline = true",
137
- "trim_trailing_whitespace = true",
138
- "indent_style = space",
139
- "indent_size = 2",
140
- "",
141
- "[*.{js,ts}]",
142
- "indent_style = space",
143
- "indent_size = 2",
144
- "",
145
- "[*.{json,yml,yaml}]",
146
- "indent_style = space",
147
- "indent_size = 2",
148
- "",
149
- "[*.md]",
150
- "trim_trailing_whitespace = false",
151
- "max_line_length = off",
152
- ""
153
- ]
129
+ '# EditorConfig is awesome: https://EditorConfig.org',
130
+ '',
131
+ 'root = true',
132
+ '',
133
+ '[*]',
134
+ 'charset = utf-8',
135
+ 'end_of_line = lf',
136
+ 'insert_final_newline = true',
137
+ 'trim_trailing_whitespace = true',
138
+ 'indent_style = space',
139
+ 'indent_size = 2',
140
+ '',
141
+ '[*.{js,ts}]',
142
+ 'indent_style = space',
143
+ 'indent_size = 2',
144
+ '',
145
+ '[*.{json,yml,yaml}]',
146
+ 'indent_style = space',
147
+ 'indent_size = 2',
148
+ '',
149
+ '[*.md]',
150
+ 'trim_trailing_whitespace = false',
151
+ 'max_line_length = off',
152
+ '',
153
+ ],
154
154
  };
155
155
  const hooksTemplates = {
156
- 'pre-commit': [
157
- "#!/bin/sh",
158
- ". \"$(dirname \"$0\")/_/husky.sh\"",
159
- "",
160
- "pnpm run lint-staged"
161
- ],
156
+ 'pre-commit': ['#!/bin/sh', '. "$(dirname "$0")/_/husky.sh"', '', 'pnpm run lint-staged'],
162
157
  'pre-push': [
163
- "#!/bin/sh",
164
- ". \"$(dirname \"$0\")/_/husky.sh\"",
165
- "",
166
- "pnpm run lint && pnpm run format:check"
167
- ]
158
+ '#!/bin/sh',
159
+ '. "$(dirname "$0")/_/husky.sh"',
160
+ '',
161
+ 'pnpm run lint && pnpm run format:check',
162
+ ],
168
163
  };
169
164
  // license texts are provided from src/create/licenses.ts
170
165
  export function generatePackageJson(answers, versions) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tukuyomil032/bricklayer",
3
3
  "private": false,
4
- "version": "1.0.0",
4
+ "version": "1.0.1",
5
5
  "description": "Interactive TypeScript CLI project scaffolder",
6
6
  "type": "module",
7
7
  "main": "./dist/index.js",
@@ -15,13 +15,14 @@
15
15
  ],
16
16
  "scripts": {
17
17
  "build": "tsc -p tsconfig.json && chmod +x dist/index.js",
18
- "prepare": "husky install && pnpm run build",
18
+ "prepare": "husky",
19
19
  "prepublishOnly": "pnpm run build",
20
20
  "dev": "ts-node --esm src/index.ts",
21
21
  "start": "node dist/index.js",
22
22
  "typecheck": "tsc --noEmit",
23
23
  "lint": "eslint \"src/**/*.ts\"",
24
24
  "lint:fix": "eslint \"src/**/*.ts\" --fix",
25
+ "lint-staged": "lint-staged",
25
26
  "format": "prettier --write \"src/**/*.ts\"",
26
27
  "format:check": "prettier --check \"src/**/*.ts\""
27
28
  },