@tukuyomil032/bricklayer 1.0.41 → 1.0.42

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.
@@ -30,6 +30,8 @@ export async function getLatestVersions() {
30
30
  'eslint-plugin-prettier',
31
31
  '@typescript-eslint/parser',
32
32
  '@typescript-eslint/eslint-plugin',
33
+ 'typescript-eslint',
34
+ '@eslint/json',
33
35
  'prettier',
34
36
  'lint-staged',
35
37
  'commander',
@@ -161,6 +161,16 @@ const hooksTemplates = {
161
161
  'pnpm run lint && pnpm run format:check',
162
162
  ],
163
163
  };
164
+ // Generate scripts object with OS-specific postbuild handling
165
+ function generateScriptsWithPermissions(baseScripts) {
166
+ // Add postbuild script to handle file permissions across platforms
167
+ // Unix-like systems: set executable permission via chmod
168
+ // Windows: chmodSync still applies but has no effect (harmless)
169
+ return {
170
+ ...baseScripts,
171
+ postbuild: "node -e \"require('fs').chmodSync('dist/index.js', 0o755)\"",
172
+ };
173
+ }
164
174
  // license texts are provided from src/create/licenses.ts
165
175
  export function generatePackageJson(answers, versions) {
166
176
  const devDeps = {
@@ -176,6 +186,8 @@ export function generatePackageJson(answers, versions) {
176
186
  devDeps['@typescript-eslint/parser'] = versions?.['@typescript-eslint/parser'] || '^8.52.0';
177
187
  devDeps['@typescript-eslint/eslint-plugin'] =
178
188
  versions?.['@typescript-eslint/eslint-plugin'] || '^8.52.0';
189
+ devDeps['typescript-eslint'] = versions?.['typescript-eslint'] || '^8.52.0';
190
+ devDeps['@eslint/json'] = versions?.['@eslint/json'] || '^0.1.1';
179
191
  devDeps['prettier'] = versions?.['prettier'] || '^3.7.4';
180
192
  // Husky should only be added when requested (useHusky)
181
193
  if (answers.useHusky) {
@@ -222,8 +234,8 @@ export function generatePackageJson(answers, versions) {
222
234
  [answers.name]: './dist/index.js',
223
235
  },
224
236
  files: ['dist', 'README.md'],
225
- scripts: Object.assign({
226
- build: 'tsc -p tsconfig.json && chmod +x dist/index.js',
237
+ scripts: generateScriptsWithPermissions(Object.assign({
238
+ build: 'tsc -p tsconfig.json',
227
239
  prepare: prepareScript,
228
240
  prepublishOnly: buildCmdForManager(mgr),
229
241
  dev: 'ts-node --esm src/index.ts',
@@ -234,7 +246,7 @@ export function generatePackageJson(answers, versions) {
234
246
  'lint-staged': 'lint-staged',
235
247
  format: 'prettier --write "src/**/*.ts"',
236
248
  'format:check': 'prettier --check "src/**/*.ts"',
237
- }, answers.useHusky ? {} : {}),
249
+ }, answers.useHusky ? {} : {})),
238
250
  keywords: ['cli', 'scaffold', 'typescript', 'generator'],
239
251
  author: answers.author,
240
252
  license: answers.license,
package/dist/index.js CHANGED
@@ -5,7 +5,7 @@ const program = new Command();
5
5
  program
6
6
  .name('brick')
7
7
  .description('Interactive CLI to scaffold TypeScript CLI projects')
8
- .version('1.0.41');
8
+ .version('1.0.42');
9
9
  program.addCommand(createCommand());
10
10
  program.addCommand(sampleCommand());
11
11
  program.parseAsync(process.argv).catch((err) => {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tukuyomil032/bricklayer",
3
3
  "private": false,
4
- "version": "1.0.41",
4
+ "version": "1.0.42",
5
5
  "description": "Interactive TypeScript CLI project scaffolder",
6
6
  "type": "module",
7
7
  "main": "./dist/index.js",
@@ -14,7 +14,8 @@
14
14
  "README.md"
15
15
  ],
16
16
  "scripts": {
17
- "build": "tsc -p tsconfig.json && chmod +x dist/index.js",
17
+ "build": "tsc -p tsconfig.json",
18
+ "postbuild": "node -e \"require('fs').chmodSync('dist/index.js', 0o755)\"",
18
19
  "prepare": "husky",
19
20
  "prepublishOnly": "pnpm run build",
20
21
  "dev": "ts-node --esm src/index.ts",