boilerforge 1.0.0 → 1.0.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.
@@ -0,0 +1,3 @@
1
+ {
2
+ "extends": ["@commitlint/config-conventional"]
3
+ }
@@ -0,0 +1,25 @@
1
+ name: Generate Auto PR
2
+
3
+ on:
4
+ workflow_dispatch:
5
+ push:
6
+ branches:
7
+ - development
8
+
9
+ jobs:
10
+ automatic-pr-generate:
11
+ name: Use Generate Auto PR Workflow
12
+ permissions:
13
+ contents: write
14
+ pull-requests: write
15
+
16
+ uses: tspyder7/github-actions-lib/.github/workflows/auto-pr.yml@main
17
+ with:
18
+ pr-branch-hierarchy-json: |
19
+ {
20
+ "main": [
21
+ "development"
22
+ ]
23
+ }
24
+ secrets:
25
+ GH_TOKEN: ${{ secrets.GH_REPO_TOKEN }}
@@ -0,0 +1,28 @@
1
+ name: Enforce PR Rules
2
+
3
+ on:
4
+ pull_request:
5
+ types:
6
+ - opened
7
+ - reopened
8
+ - synchronize
9
+ - edited
10
+
11
+ jobs:
12
+ enforce-pr-hierarchy:
13
+ name: Use Enforce PR Hierarchy Workflow
14
+ permissions:
15
+ contents: write
16
+ pull-requests: write
17
+ uses: tspyder7/github-actions-lib/.github/workflows/enforce-pr-hierarchy.yml@main
18
+ with:
19
+ allowed-branches-hierarchy-json: |
20
+ {
21
+ "main": [
22
+ "development",
23
+ "release-please-.*",
24
+ "hotfix/.*"
25
+ ]
26
+ }
27
+ secrets:
28
+ GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -1,34 +1,17 @@
1
- name: Publish to NPM
1
+ name: Release NPM Package
2
2
 
3
3
  on:
4
4
  push:
5
- branches:
6
- - main # Trigger publish on push to main
5
+ tags:
6
+ - '*'
7
7
 
8
8
  jobs:
9
- publish:
10
- runs-on: ubuntu-latest
11
-
12
- steps:
13
- - name: Checkout code
14
- uses: actions/checkout@v4
15
-
16
- - name: Setup Node.js
17
- uses: actions/setup-node@v4
18
- with:
19
- node-version: "22"
20
- registry-url: "https://registry.npmjs.org/"
21
-
22
- - name: Install pnpm
23
- run: npm install -g pnpm
24
-
25
- - name: Install dependencies
26
- run: pnpm install
27
-
28
- - name: Build
29
- run: pnpm run build
30
-
31
- - name: Publish to NPM
32
- run: npm publish --access public
33
- env:
34
- NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
9
+ publish-package:
10
+ name: Use NPM Publish Workflow
11
+ uses: tspyder7/github-actions-lib/.github/workflows/npm-publish.yml@main
12
+ with:
13
+ node-version: "22"
14
+ registry-url: "https://registry.npmjs.org/"
15
+ package-manager: "pnpm"
16
+ secrets:
17
+ NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
@@ -0,0 +1,28 @@
1
+ name: Release Changelog
2
+
3
+ on:
4
+ workflow_dispatch:
5
+ push:
6
+ branches:
7
+ - main
8
+
9
+ jobs:
10
+ release-changelog:
11
+ name: Use Release Please Workflow
12
+ permissions:
13
+ contents: write
14
+ pull-requests: write
15
+
16
+ runs-on: ubuntu-latest
17
+ timeout-minutes: 10
18
+ steps:
19
+ - name: Checkout Code
20
+ uses: actions/checkout@v4
21
+
22
+ - name: Generate ChangeLog
23
+ id: release-changelog
24
+ uses: googleapis/release-please-action@v4
25
+ with:
26
+ token: ${{ secrets.GH_REPO_TOKEN }}
27
+ config-file: release-please-config.json
28
+ manifest-file: .release-please-manifest.json
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env sh
2
+
3
+ # perform commit linting
4
+ pnpm exec commitlint --edit $1
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env sh
2
+
3
+ # check formatting and linting
4
+ pnpm run lint && pnpm run format
@@ -0,0 +1,3 @@
1
+ {
2
+ ".": "1.0.2"
3
+ }
package/CHANGELOG.md ADDED
@@ -0,0 +1,37 @@
1
+ # Changelog
2
+
3
+ ## [1.0.2](https://github.com/tspyder7/boilerforge/compare/boilerforge-v1.0.1...boilerforge-v1.0.2) (2025-08-19)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * changed npm publish version and added mjs for prettier file ([#68](https://github.com/tspyder7/boilerforge/issues/68)) ([b977c77](https://github.com/tspyder7/boilerforge/commit/b977c77da6b092bad04cfb45eb27d46571bf88b0))
9
+
10
+ ## [1.0.1](https://github.com/tspyder7/boilerforge/compare/boilerforge-v1.0.0...boilerforge-v1.0.1) (2025-08-19)
11
+
12
+
13
+ ### Bug Fixes
14
+
15
+ * fixed release please pull request header ([770c831](https://github.com/tspyder7/boilerforge/commit/770c831063090bb740c5c5112bf88a86a4378bdc))
16
+
17
+ ## 1.0.0 (2025-08-19)
18
+
19
+
20
+ ### Features
21
+
22
+ * added cli configuration for boilerforge ([21ad40d](https://github.com/tspyder7/boilerforge/commit/21ad40d15e1a5d469ee518d8b206d64b02e7b732))
23
+ * added esbuild config file and injected pkg version ([7a57867](https://github.com/tspyder7/boilerforge/commit/7a57867f4fbadf9ff681bfce558137c1fd0d0214))
24
+ * added github workflow for npm publish ([e913309](https://github.com/tspyder7/boilerforge/commit/e91330943bdfb40dfc7e891bbbed75017073d00a))
25
+ * added restrict pr source branch workflow to restrict any pr to main except development ([25005ad](https://github.com/tspyder7/boilerforge/commit/25005adbc075054b3b2904028f7dda46ec5bfff1))
26
+ * added utils and helper classes ([3389187](https://github.com/tspyder7/boilerforge/commit/338918734dec2e2b33c036e66e6d328d5a45e00e))
27
+ * create node app template ([739c233](https://github.com/tspyder7/boilerforge/commit/739c233e73825d7f9189a2887e62fc98a8d50dc9))
28
+ * created cli for bolierforge ([2839e40](https://github.com/tspyder7/boilerforge/commit/2839e40b79787837a1caf6604fe30140134378d7))
29
+ * pnpm, eslint & prettier ([62d211e](https://github.com/tspyder7/boilerforge/commit/62d211e1ddf09bdbe0e763c20b9305d2d96fed71))
30
+ * template utilities ([4a72ba5](https://github.com/tspyder7/boilerforge/commit/4a72ba534a0e87c07e5bd540c80bafe6f4390a25))
31
+
32
+
33
+ ### Bug Fixes
34
+
35
+ * added missing release please manifest file ([6b8e0e5](https://github.com/tspyder7/boilerforge/commit/6b8e0e5e5ba5e53e38c9a87f5791716a3786fbfe))
36
+ * disable release pull request ([a66ffac](https://github.com/tspyder7/boilerforge/commit/a66ffac5610e1f0d5838c65277b453f8de0eaee1))
37
+ * fixed project name generation in lib ([430e982](https://github.com/tspyder7/boilerforge/commit/430e982743a62fbb44a98e80fe3bc67c80212daf))
package/dist/cli.js CHANGED
@@ -7459,8 +7459,8 @@ var require_select = __commonJS({
7459
7459
  }
7460
7460
  separator() {
7461
7461
  if (this.options.separator) return super.separator();
7462
- let sep3 = this.styles.muted(this.symbols.ellipsis);
7463
- return this.state.submitted ? super.separator() : sep3;
7462
+ let sep4 = this.styles.muted(this.symbols.ellipsis);
7463
+ return this.state.submitted ? super.separator() : sep4;
7464
7464
  }
7465
7465
  pointer(choice, i2) {
7466
7466
  return !this.multiple || this.options.pointer ? super.pointer(choice, i2) : "";
@@ -7805,8 +7805,8 @@ var require_form = __commonJS({
7805
7805
  return choice.input ? "\u29BF" : "\u2299";
7806
7806
  }
7807
7807
  async choiceSeparator(choice, i2) {
7808
- let sep3 = await this.resolve(choice.separator, this.state, choice, i2) || ":";
7809
- return sep3 ? " " + this.styles.disabled(sep3) : "";
7808
+ let sep4 = await this.resolve(choice.separator, this.state, choice, i2) || ":";
7809
+ return sep4 ? " " + this.styles.disabled(sep4) : "";
7810
7810
  }
7811
7811
  async renderChoice(choice, i2) {
7812
7812
  await this.onChoice(choice, i2);
@@ -7815,7 +7815,7 @@ var require_form = __commonJS({
7815
7815
  let { muted, submitted, primary, danger } = styles4;
7816
7816
  let focused = this.index === i2;
7817
7817
  let validate2 = choice.validate || (() => true);
7818
- let sep3 = await this.choiceSeparator(choice, i2);
7818
+ let sep4 = await this.choiceSeparator(choice, i2);
7819
7819
  let msg = choice.message;
7820
7820
  if (this.align === "right") msg = msg.padStart(this.longest + 1, " ");
7821
7821
  if (this.align === "left") msg = msg.padEnd(this.longest + 1, " ");
@@ -7827,7 +7827,7 @@ var require_form = __commonJS({
7827
7827
  let style = styles4[color3];
7828
7828
  let indicator = style(await this.indicator(choice, i2)) + (choice.pad || "");
7829
7829
  let indent2 = this.indent(choice);
7830
- let line = () => [indent2, indicator, msg + sep3, input].filter(Boolean).join(" ");
7830
+ let line = () => [indent2, indicator, msg + sep4, input].filter(Boolean).join(" ");
7831
7831
  if (state.submitted) {
7832
7832
  msg = stripAnsi2(msg);
7833
7833
  input = submitted(input);
@@ -7981,10 +7981,10 @@ var require_boolean = __commonJS({
7981
7981
  async render() {
7982
7982
  let { input, size } = this.state;
7983
7983
  let prefix = await this.prefix();
7984
- let sep3 = await this.separator();
7984
+ let sep4 = await this.separator();
7985
7985
  let msg = await this.message();
7986
7986
  let hint = this.styles.muted(this.default);
7987
- let promptLine = [prefix, msg, hint, sep3].filter(Boolean).join(" ");
7987
+ let promptLine = [prefix, msg, hint, sep4].filter(Boolean).join(" ");
7988
7988
  this.state.prompt = promptLine;
7989
7989
  let header = await this.header();
7990
7990
  let value = this.value = this.cast(input);
@@ -10332,10 +10332,11 @@ var {
10332
10332
  } = import_index.default;
10333
10333
 
10334
10334
  // src/config/cli-config.ts
10335
+ var runtimeVersion = true ? "1.0.2" : "0.0.0-dev";
10335
10336
  var cliConfig = {
10336
10337
  name: "boilerforge",
10337
10338
  description: "boilerforge is a blazing-fast CLI utility that scaffolds clean, ready-to-use project structures so you can skip the setup and start building instantly.",
10338
- version: "0.0.1"
10339
+ version: runtimeVersion
10339
10340
  };
10340
10341
  var cli_config_default = cliConfig;
10341
10342
 
@@ -12983,8 +12984,8 @@ var Project = class {
12983
12984
  packageManager = ""
12984
12985
  } = projectProps;
12985
12986
  const cwd = process.cwd();
12986
- this.name = !name.length ? cwd[cwd.length - 1] : name;
12987
- this.description = description ?? `Node.js application for ${this.name}`;
12987
+ this.name = !name.length ? cwd.split(import_path2.sep).slice(-1)[0] : name;
12988
+ this.description = description?.length ? description : `Node.js application for ${this.name}`;
12988
12989
  this.version = version;
12989
12990
  this.author = author ?? "";
12990
12991
  this.packageManager = packageManager;
@@ -0,0 +1,17 @@
1
+ // esbuild.config.ts
2
+ import { build } from 'esbuild';
3
+ import { readFileSync } from 'fs';
4
+
5
+ const { version } = JSON.parse(readFileSync('package.json', 'utf-8'));
6
+
7
+ build({
8
+ entryPoints: ['bin/cli.ts'],
9
+ outfile: 'dist/cli.js',
10
+ bundle: true,
11
+ platform: 'node',
12
+ format: 'cjs',
13
+ logLevel: 'info',
14
+ define: {
15
+ VERSION: JSON.stringify(version), // injects into runtime
16
+ },
17
+ }).catch(() => process.exit(1));
package/package.json CHANGED
@@ -1,27 +1,20 @@
1
1
  {
2
2
  "name": "boilerforge",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "description": "✨ boilerforge is a blazing-fast CLI utility that scaffolds clean, ready-to-use project structures so you can skip the setup and start building instantly.",
5
5
  "main": "dist/",
6
6
  "bin": {
7
7
  "boilerforge": "dist/cli.js"
8
8
  },
9
- "scripts": {
10
- "clean": "rimraf dist",
11
- "ci": "pnpm install --frozen-lockfile",
12
- "build": "esbuild bin/cli.ts --bundle --platform=node --outfile=dist/cli.js --format=cjs",
13
- "prebuild": "pnpm run clean && pnpm run lint && pnpm run format",
14
- "start": "node dist/",
15
- "lint": "eslint --ext .js,.ts .",
16
- "format": "prettier --write \"**/*.+(js|ts)\"",
17
- "test": "echo \"Error: no test specified\" && exit 1",
18
- "dev": "ts-node bin/cli.ts"
9
+ "engines": {
10
+ "node": ">= 20.11.1"
19
11
  },
20
12
  "keywords": [],
21
13
  "author": "tspyder7",
22
14
  "license": "MIT",
23
- "packageManager": "pnpm@10.9.0",
24
15
  "devDependencies": {
16
+ "@commitlint/cli": "^19.8.1",
17
+ "@commitlint/config-conventional": "^19.8.1",
25
18
  "@eslint/js": "^9.25.1",
26
19
  "@types/node": "^22.15.2",
27
20
  "@typescript-eslint/eslint-plugin": "^8.31.0",
@@ -29,6 +22,7 @@
29
22
  "esbuild": "^0.25.3",
30
23
  "eslint": "^9.25.1",
31
24
  "globals": "^16.0.0",
25
+ "husky": "^9.1.7",
32
26
  "prettier": "^3.5.3",
33
27
  "rimraf": "^6.0.1",
34
28
  "ts-node": "^10.9.2",
@@ -46,5 +40,16 @@
46
40
  "remark-stringify": "^11.0.0",
47
41
  "unified": "^11.0.5",
48
42
  "unist-builder": "^4.0.0"
43
+ },
44
+ "scripts": {
45
+ "clean": "rimraf dist",
46
+ "ci": "pnpm install --frozen-lockfile",
47
+ "build": "ts-node esbuild.config.ts",
48
+ "prebuild": "pnpm run clean && pnpm run lint && pnpm run format",
49
+ "start": "node dist/cli.js",
50
+ "lint": "eslint --ext .js,.ts .",
51
+ "format": "prettier --write \"**/*.+(js|ts)\"",
52
+ "test": "echo \"Error: no test specified\" && exit 1",
53
+ "dev": "ts-node bin/cli.ts"
49
54
  }
50
- }
55
+ }
@@ -0,0 +1,20 @@
1
+ /**
2
+ * @type {import('prettier').Config}
3
+ */
4
+ const config = {
5
+ printWidth: 80,
6
+ tabWidth: 4,
7
+ useTabs: false,
8
+ semi: true,
9
+ singleQuote: true,
10
+ quoteProps: 'as-needed',
11
+ trailingComma: 'all',
12
+ arrowParens: 'always',
13
+ parser: 'typescript',
14
+ proseWrap: 'always',
15
+ endOfLine: 'auto',
16
+ embeddedLanguageFormatting: 'auto',
17
+ singleAttributePerLine: true,
18
+ };
19
+
20
+ export default config;
@@ -0,0 +1,15 @@
1
+ {
2
+ "$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json",
3
+ "release-type": "node",
4
+ "packages": {
5
+ ".": {
6
+ "package-name": "boilerforge",
7
+ "changelog-path": "CHANGELOG.md"
8
+ }
9
+ },
10
+ "bump-minor-pre-major": true,
11
+ "include-v-in-tag": true,
12
+ "pull-request-title-pattern": "chore: release v${version}",
13
+ "pull-request-header": "Release Notes",
14
+ "separate-pull-requests": true
15
+ }
@@ -1,3 +1,8 @@
1
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
2
+ declare const VERSION: string;
3
+
4
+ const runtimeVersion = typeof VERSION !== 'undefined' ? VERSION : '0.0.0-dev';
5
+
1
6
  type SemVersion =
2
7
  | `${number}.${number}.${number}`
3
8
  | `${number}.${number}.${number}-${string}`
@@ -14,7 +19,7 @@ const cliConfig: CLIConfiguration = {
14
19
  name: 'boilerforge',
15
20
  description:
16
21
  'boilerforge is a blazing-fast CLI utility that scaffolds clean, ready-to-use project structures so you can skip the setup and start building instantly.',
17
- version: '0.0.1',
22
+ version: runtimeVersion as SemVersion,
18
23
  };
19
24
 
20
25
  export default cliConfig;
@@ -1,6 +1,6 @@
1
1
  import { Command } from 'commander';
2
2
  import { Listr, ListrTaskWrapper } from 'listr2';
3
- import { dirname, join } from 'path';
3
+ import { dirname, join, sep } from 'path';
4
4
  import { logger } from '../utils/logger';
5
5
  import { File } from './file';
6
6
  import { Task } from './task';
@@ -65,9 +65,10 @@ export abstract class Project {
65
65
 
66
66
  const cwd = process.cwd();
67
67
 
68
- this.name = !name.length ? cwd[cwd.length - 1] : name;
69
- this.description =
70
- description ?? `Node.js application for ${this.name}`;
68
+ this.name = !name.length ? cwd.split(sep).slice(-1)[0] : name;
69
+ this.description = description?.length
70
+ ? description
71
+ : `Node.js application for ${this.name}`;
71
72
  this.version = version;
72
73
  this.author = author ?? '';
73
74
  this.packageManager = packageManager;
package/.prettierrc.json DELETED
@@ -1,15 +0,0 @@
1
- {
2
- "printWidth": 80,
3
- "tabWidth": 4,
4
- "useTabs": false,
5
- "semi": true,
6
- "singleQuote": true,
7
- "quoteProps": "as-needed",
8
- "trailingComma": "all",
9
- "arrowParens": "always",
10
- "parser": "typescript",
11
- "proseWrap": "always",
12
- "endOfLine": "auto",
13
- "embeddedLanguageFormatting": "auto",
14
- "singleAttributePerLine": true
15
- }