boilerforge 1.1.3 → 1.2.0
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/LICENSE +21 -0
- package/README.md +106 -0
- package/dist/cli.js +35856 -21740
- package/{src/templates/create-node-app/resource/gitignore.ts → dist/templates/create-node-app/app/.gitignore.hbs} +1 -14
- package/dist/templates/create-node-app/app/.prettierrc.json.hbs +15 -0
- package/dist/templates/create-node-app/app/README.md.hbs +54 -0
- package/dist/templates/create-node-app/app/package.json.hbs +30 -0
- package/dist/templates/create-node-app/app/src/index.js.hbs +5 -0
- package/dist/templates/create-node-app/app/src/index.ts.hbs +5 -0
- package/dist/templates/create-node-app/app/tsconfig.json.hbs +15 -0
- package/dist/templates/create-node-app/forge.config.json +14 -0
- package/dist/templates/create-node-app/forge.prompt.json +105 -0
- package/dist/templates/create-node-app/schema/prompt.schema.json +240 -0
- package/package.json +17 -2
- package/.commitlintrc.json +0 -3
- package/.github/workflows/release-pipeline.yml +0 -79
- package/.husky/commit-msg +0 -4
- package/.husky/pre-push +0 -4
- package/.release/latest/config.json +0 -16
- package/.release/latest/manifest.json +0 -3
- package/.release/rc/config.json +0 -19
- package/.release/rc/manifest.json +0 -3
- package/CHANGELOG.md +0 -68
- package/bin/cli.ts +0 -21
- package/esbuild.config.ts +0 -17
- package/prettier.config.mjs +0 -20
- package/src/config/cli-config.ts +0 -25
- package/src/lib/file.ts +0 -159
- package/src/lib/project.ts +0 -211
- package/src/lib/prompter.ts +0 -201
- package/src/lib/task.ts +0 -41
- package/src/templates/create-node-app/index.ts +0 -306
- package/src/templates/create-node-app/resource/editor-config.ts +0 -24
- package/src/templates/create-node-app/resource/eslint.ts +0 -62
- package/src/templates/create-node-app/resource/package-json.ts +0 -57
- package/src/templates/create-node-app/resource/prettier.ts +0 -45
- package/src/templates/create-node-app/resource/project-deps.ts +0 -30
- package/src/templates/create-node-app/resource/project-files.ts +0 -17
- package/src/templates/create-node-app/resource/tsconfig.ts +0 -20
- package/src/templates/index.ts +0 -1
- package/src/templates/utils/badges.ts +0 -13
- package/src/templates/utils/git.ts +0 -64
- package/src/templates/utils/package-manager.ts +0 -78
- package/src/templates/utils/readme.ts +0 -115
- package/src/utils/exec-cmd.ts +0 -80
- package/src/utils/index.ts +0 -60
- package/src/utils/logger.ts +0 -24
- package/tsconfig.json +0 -17
- /package/{.editorconfig → dist/templates/create-node-app/app/.editorconfig.hbs} +0 -0
- /package/{.prettierignore → dist/templates/create-node-app/app/.prettierignore.hbs} +0 -0
- /package/{eslint.config.mjs → dist/templates/create-node-app/app/eslint.config.mjs.hbs} +0 -0
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
import { Resource } from '../../../lib/project';
|
|
2
|
-
|
|
3
|
-
const gitignore = `
|
|
4
1
|
# Logs
|
|
5
2
|
logs
|
|
6
3
|
*.log
|
|
@@ -141,15 +138,5 @@ dist
|
|
|
141
138
|
# build or bundles
|
|
142
139
|
build/**/*
|
|
143
140
|
|
|
144
|
-
# Ignore built
|
|
141
|
+
# Ignore built js files
|
|
145
142
|
dist/**/*
|
|
146
|
-
`;
|
|
147
|
-
|
|
148
|
-
export const getGitIgnoreContent = (): Resource => {
|
|
149
|
-
const filename = '.gitignore';
|
|
150
|
-
|
|
151
|
-
return {
|
|
152
|
-
filename,
|
|
153
|
-
content: gitignore,
|
|
154
|
-
};
|
|
155
|
-
};
|
|
@@ -0,0 +1,15 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
# 🚀 {{name}}
|
|
2
|
+
|
|
3
|
+

|
|
4
|
+
|
|
5
|
+
{{#if description}}
|
|
6
|
+
## 📖 About Project
|
|
7
|
+
|
|
8
|
+
{{description}}
|
|
9
|
+
|
|
10
|
+
{{/if}}
|
|
11
|
+
### Built With
|
|
12
|
+
|
|
13
|
+
####   {{#if enabledEslintPrettier}}  {{/if}}
|
|
14
|
+
|
|
15
|
+
### 🛠️ Installation
|
|
16
|
+
|
|
17
|
+
#### Navigate into the project directory
|
|
18
|
+
|
|
19
|
+
```
|
|
20
|
+
cd {{name}}
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
#### Install dependencies
|
|
24
|
+
|
|
25
|
+
```
|
|
26
|
+
{{installDepsCommand}}
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
### ▶️ Running the App
|
|
30
|
+
|
|
31
|
+
{{#if enabledTypescript}}
|
|
32
|
+
#### To start the app in development mode:
|
|
33
|
+
|
|
34
|
+
```
|
|
35
|
+
{{packageManager}} run dev
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
{{/if}}
|
|
39
|
+
To start the app in production mode:
|
|
40
|
+
|
|
41
|
+
{{#if enabledTypescript}}
|
|
42
|
+
- Build the project
|
|
43
|
+
```
|
|
44
|
+
{{packageManager}} run build
|
|
45
|
+
```
|
|
46
|
+
- Run app in production
|
|
47
|
+
```
|
|
48
|
+
{{packageManager}} run start
|
|
49
|
+
```
|
|
50
|
+
{{else}}
|
|
51
|
+
```
|
|
52
|
+
{{packageManager}} run start
|
|
53
|
+
```
|
|
54
|
+
{{/if}}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "{{name}}",
|
|
3
|
+
"version": "{{version}}",
|
|
4
|
+
"description": "{{description}}",
|
|
5
|
+
"author": "{{author}}",
|
|
6
|
+
"license": "ISC",
|
|
7
|
+
"main": "{{main}}",
|
|
8
|
+
{{#if scripts}}
|
|
9
|
+
"scripts": {
|
|
10
|
+
{{#each scripts}}
|
|
11
|
+
"{{@key}}": "{{this}}"{{#unless @last}},{{/unless}}
|
|
12
|
+
{{/each}}
|
|
13
|
+
},
|
|
14
|
+
{{/if}}
|
|
15
|
+
{{#if devDependencies}}
|
|
16
|
+
"devDependencies": {
|
|
17
|
+
{{#each devDependencies}}
|
|
18
|
+
"{{@key}}": "{{this}}"{{#unless @last}},{{/unless}}
|
|
19
|
+
{{/each}}
|
|
20
|
+
},
|
|
21
|
+
{{/if}}
|
|
22
|
+
{{#if dependencies}}
|
|
23
|
+
"dependencies": {
|
|
24
|
+
{{#each dependencies}}
|
|
25
|
+
"{{@key}}": "{{this}}"{{#unless @last}},{{/unless}}
|
|
26
|
+
{{/each}}
|
|
27
|
+
},
|
|
28
|
+
{{/if}}
|
|
29
|
+
"packageManager": "{{packageManager}}"
|
|
30
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ES2024",
|
|
4
|
+
"module": "NodeNext",
|
|
5
|
+
"moduleResolution": "nodenext",
|
|
6
|
+
"outDir": "./dist",
|
|
7
|
+
"esModuleInterop": true,
|
|
8
|
+
"forceConsistentCasingInFileNames": true,
|
|
9
|
+
"strict": true,
|
|
10
|
+
"skipLibCheck": true
|
|
11
|
+
},
|
|
12
|
+
"include": [
|
|
13
|
+
"src"
|
|
14
|
+
]
|
|
15
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"metadata": {
|
|
3
|
+
"name": "create-simple-app",
|
|
4
|
+
"version": "1.0.0"
|
|
5
|
+
},
|
|
6
|
+
"fileConfig": {
|
|
7
|
+
"src/index.ts": "isTypescript == true",
|
|
8
|
+
"src/index.js": "isTypescript == false",
|
|
9
|
+
".prettierignore": "isEslintPrettier == true",
|
|
10
|
+
".prettierrc.json": "isEslintPrettier == true",
|
|
11
|
+
"eslint.config.mjs": "isEslintPrettier == true",
|
|
12
|
+
"tsconfig.json": "isTypescript == true"
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
{
|
|
2
|
+
"prompts": [
|
|
3
|
+
{
|
|
4
|
+
"type": "text",
|
|
5
|
+
"name": "name",
|
|
6
|
+
"description": "Name of application",
|
|
7
|
+
"prompt": {
|
|
8
|
+
"message": "Project name",
|
|
9
|
+
"defaultValue": "getCwdDirName()"
|
|
10
|
+
}
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
"type": "text",
|
|
14
|
+
"name": "description",
|
|
15
|
+
"description": "A description for application",
|
|
16
|
+
"prompt": {
|
|
17
|
+
"message": "Description",
|
|
18
|
+
"defaultValue": "''"
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"type": "text",
|
|
23
|
+
"name": "version",
|
|
24
|
+
"description": "Application version",
|
|
25
|
+
"prompt": {
|
|
26
|
+
"message": "Version",
|
|
27
|
+
"defaultValue": "'0.0.1'"
|
|
28
|
+
},
|
|
29
|
+
"validate": {
|
|
30
|
+
"expression": "matches(input, Regex.VERSION)",
|
|
31
|
+
"error": "Invalid version format"
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"type": "text",
|
|
36
|
+
"name": "author",
|
|
37
|
+
"description": "Name of author",
|
|
38
|
+
"prompt": {
|
|
39
|
+
"message": "Author",
|
|
40
|
+
"defaultValue": "''"
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"type": "select",
|
|
45
|
+
"name": "packageManager",
|
|
46
|
+
"description": "Package manager",
|
|
47
|
+
"prompt": {
|
|
48
|
+
"message": "Package manager",
|
|
49
|
+
"defaultValue": "0"
|
|
50
|
+
},
|
|
51
|
+
"choices": [
|
|
52
|
+
{
|
|
53
|
+
"name": "npm",
|
|
54
|
+
"value": "npm"
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"name": "yarn",
|
|
58
|
+
"value": "yarn"
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
"name": "pnpm",
|
|
62
|
+
"value": "pnpm"
|
|
63
|
+
}
|
|
64
|
+
],
|
|
65
|
+
"validate": {
|
|
66
|
+
"expression": "input in ['npm', 'yarn', 'pnpm']",
|
|
67
|
+
"error": "Please select a valid package manager (npm, yarn, or pnpm)."
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
"type": "toggle",
|
|
72
|
+
"name": "isTypescript",
|
|
73
|
+
"description": "Typescript enabled",
|
|
74
|
+
"prompt": {
|
|
75
|
+
"message": "Use TypeScript",
|
|
76
|
+
"defaultValue": "true"
|
|
77
|
+
},
|
|
78
|
+
"options": {
|
|
79
|
+
"enabled": "Yes",
|
|
80
|
+
"disabled": "No"
|
|
81
|
+
},
|
|
82
|
+
"validate": {
|
|
83
|
+
"expression": "isBoolean(input)",
|
|
84
|
+
"error": "isTypescript must be true or false"
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
"type": "toggle",
|
|
89
|
+
"name": "isEslintPrettier",
|
|
90
|
+
"description": "Eslint & prettier enabled",
|
|
91
|
+
"prompt": {
|
|
92
|
+
"message": "Use ESLint & Prettier formatting",
|
|
93
|
+
"defaultValue": "true"
|
|
94
|
+
},
|
|
95
|
+
"options": {
|
|
96
|
+
"enabled": "Yes",
|
|
97
|
+
"disabled": "No"
|
|
98
|
+
},
|
|
99
|
+
"validate": {
|
|
100
|
+
"expression": "isBoolean(input)",
|
|
101
|
+
"error": "isEslintPrettier must be true or false"
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
]
|
|
105
|
+
}
|
|
@@ -0,0 +1,240 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"title": "CLI Prompt Generator Schema",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"required": [
|
|
6
|
+
"prompts"
|
|
7
|
+
],
|
|
8
|
+
"properties": {
|
|
9
|
+
"prompts": {
|
|
10
|
+
"type": "array",
|
|
11
|
+
"minItems": 1,
|
|
12
|
+
"uniqueItemProperties": [
|
|
13
|
+
"name"
|
|
14
|
+
],
|
|
15
|
+
"items": {
|
|
16
|
+
"$ref": "#/$defs/promptItem"
|
|
17
|
+
},
|
|
18
|
+
"contains": {
|
|
19
|
+
"type": "object",
|
|
20
|
+
"properties": {
|
|
21
|
+
"type": {
|
|
22
|
+
"const": "text"
|
|
23
|
+
},
|
|
24
|
+
"name": {
|
|
25
|
+
"const": "name"
|
|
26
|
+
},
|
|
27
|
+
"description": {
|
|
28
|
+
"type": "string"
|
|
29
|
+
},
|
|
30
|
+
"prompt": {
|
|
31
|
+
"type": "object",
|
|
32
|
+
"required": [
|
|
33
|
+
"message"
|
|
34
|
+
],
|
|
35
|
+
"properties": {
|
|
36
|
+
"message": {
|
|
37
|
+
"type": "string"
|
|
38
|
+
},
|
|
39
|
+
"defaultValue": {
|
|
40
|
+
"type": "string"
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
"validate": {
|
|
45
|
+
"$ref": "#/$defs/validationConfig"
|
|
46
|
+
},
|
|
47
|
+
"skip": {
|
|
48
|
+
"type": "string"
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
"required": [
|
|
52
|
+
"type",
|
|
53
|
+
"name",
|
|
54
|
+
"description",
|
|
55
|
+
"prompt"
|
|
56
|
+
]
|
|
57
|
+
},
|
|
58
|
+
"errorMessage": {
|
|
59
|
+
"uniqueItemProperties": "Each prompt must have a unique 'name'.",
|
|
60
|
+
"contains": "A prompt with name 'name' and type 'text' must exist."
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
"$defs": {
|
|
65
|
+
"promptItem": {
|
|
66
|
+
"type": "object",
|
|
67
|
+
"required": [
|
|
68
|
+
"type",
|
|
69
|
+
"description",
|
|
70
|
+
"name",
|
|
71
|
+
"prompt"
|
|
72
|
+
],
|
|
73
|
+
"additionalProperties": false,
|
|
74
|
+
"properties": {
|
|
75
|
+
"type": {
|
|
76
|
+
"$ref": "#/$defs/inputType"
|
|
77
|
+
},
|
|
78
|
+
"name": {
|
|
79
|
+
"type": "string"
|
|
80
|
+
},
|
|
81
|
+
"description": {
|
|
82
|
+
"type": "string"
|
|
83
|
+
},
|
|
84
|
+
"prompt": {
|
|
85
|
+
"$ref": "#/$defs/promptConfig"
|
|
86
|
+
},
|
|
87
|
+
"skip": {
|
|
88
|
+
"$ref": "#/$defs/jexlExpression"
|
|
89
|
+
},
|
|
90
|
+
"validate": {
|
|
91
|
+
"$ref": "#/$defs/validationConfig"
|
|
92
|
+
},
|
|
93
|
+
"choices": {
|
|
94
|
+
"$ref": "#/$defs/choicesConfig"
|
|
95
|
+
},
|
|
96
|
+
"options": {
|
|
97
|
+
"$ref": "#/$defs/toggleOptions"
|
|
98
|
+
}
|
|
99
|
+
},
|
|
100
|
+
"allOf": [
|
|
101
|
+
{
|
|
102
|
+
"if": {
|
|
103
|
+
"properties": {
|
|
104
|
+
"type": {
|
|
105
|
+
"enum": [
|
|
106
|
+
"select",
|
|
107
|
+
"multiselect"
|
|
108
|
+
]
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
},
|
|
112
|
+
"then": {
|
|
113
|
+
"required": [
|
|
114
|
+
"choices"
|
|
115
|
+
],
|
|
116
|
+
"errorMessage": {
|
|
117
|
+
"required": "Type 'select' or 'multiselect' requires a 'choices' array."
|
|
118
|
+
}
|
|
119
|
+
},
|
|
120
|
+
"else": {
|
|
121
|
+
"not": {
|
|
122
|
+
"required": [
|
|
123
|
+
"choices"
|
|
124
|
+
]
|
|
125
|
+
},
|
|
126
|
+
"errorMessage": "The 'choices' property is only allowed for 'select' or 'multiselect' types."
|
|
127
|
+
}
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
"if": {
|
|
131
|
+
"properties": {
|
|
132
|
+
"type": {
|
|
133
|
+
"const": "toggle"
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
},
|
|
137
|
+
"then": {
|
|
138
|
+
"required": [
|
|
139
|
+
"options"
|
|
140
|
+
],
|
|
141
|
+
"errorMessage": {
|
|
142
|
+
"required": "Type 'toggle' requires 'options' (enabled/disabled labels)."
|
|
143
|
+
}
|
|
144
|
+
},
|
|
145
|
+
"else": {
|
|
146
|
+
"not": {
|
|
147
|
+
"required": [
|
|
148
|
+
"options"
|
|
149
|
+
]
|
|
150
|
+
},
|
|
151
|
+
"errorMessage": "The 'options' property is only allowed for 'toggle' types."
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
]
|
|
155
|
+
},
|
|
156
|
+
"inputType": {
|
|
157
|
+
"type": "string",
|
|
158
|
+
"enum": [
|
|
159
|
+
"text",
|
|
160
|
+
"select",
|
|
161
|
+
"toggle",
|
|
162
|
+
"multiselect"
|
|
163
|
+
]
|
|
164
|
+
},
|
|
165
|
+
"promptConfig": {
|
|
166
|
+
"type": "object",
|
|
167
|
+
"required": [
|
|
168
|
+
"message"
|
|
169
|
+
],
|
|
170
|
+
"properties": {
|
|
171
|
+
"message": {
|
|
172
|
+
"type": "string"
|
|
173
|
+
},
|
|
174
|
+
"defaultValue": {
|
|
175
|
+
"$ref": "#/$defs/jexlExpression"
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
},
|
|
179
|
+
"validationConfig": {
|
|
180
|
+
"type": "object",
|
|
181
|
+
"required": [
|
|
182
|
+
"expression",
|
|
183
|
+
"error"
|
|
184
|
+
],
|
|
185
|
+
"properties": {
|
|
186
|
+
"expression": {
|
|
187
|
+
"$ref": "#/$defs/jexlExpression"
|
|
188
|
+
},
|
|
189
|
+
"error": {
|
|
190
|
+
"type": "string"
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
},
|
|
194
|
+
"jexlExpression": {
|
|
195
|
+
"type": "string"
|
|
196
|
+
},
|
|
197
|
+
"choicesConfig": {
|
|
198
|
+
"type": "array",
|
|
199
|
+
"minItems": 1,
|
|
200
|
+
"items": {
|
|
201
|
+
"type": "object",
|
|
202
|
+
"properties": {
|
|
203
|
+
"name": {
|
|
204
|
+
"type": "string"
|
|
205
|
+
},
|
|
206
|
+
"value": {
|
|
207
|
+
"type": "string"
|
|
208
|
+
}
|
|
209
|
+
},
|
|
210
|
+
"required": [
|
|
211
|
+
"name",
|
|
212
|
+
"value"
|
|
213
|
+
],
|
|
214
|
+
"additionalProperties": false
|
|
215
|
+
}
|
|
216
|
+
},
|
|
217
|
+
"choicesConfig2": {
|
|
218
|
+
"type": "array",
|
|
219
|
+
"minItems": 1,
|
|
220
|
+
"items": {
|
|
221
|
+
"type": "string"
|
|
222
|
+
}
|
|
223
|
+
},
|
|
224
|
+
"toggleOptions": {
|
|
225
|
+
"type": "object",
|
|
226
|
+
"required": [
|
|
227
|
+
"enabled",
|
|
228
|
+
"disabled"
|
|
229
|
+
],
|
|
230
|
+
"properties": {
|
|
231
|
+
"enabled": {
|
|
232
|
+
"type": "string"
|
|
233
|
+
},
|
|
234
|
+
"disabled": {
|
|
235
|
+
"type": "string"
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
}
|
package/package.json
CHANGED
|
@@ -1,11 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "boilerforge",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"description": "A blazing-fast CLI utility that scaffolds clean, ready-to-use project structures so you can skip the setup and start building instantly.",
|
|
5
|
-
"main": "dist/",
|
|
5
|
+
"main": "dist/cli.js",
|
|
6
6
|
"bin": {
|
|
7
7
|
"boilerforge": "dist/cli.js"
|
|
8
8
|
},
|
|
9
|
+
"files": [
|
|
10
|
+
"dist",
|
|
11
|
+
"LICENSE",
|
|
12
|
+
"README.md"
|
|
13
|
+
],
|
|
9
14
|
"engines": {
|
|
10
15
|
"node": ">= 24"
|
|
11
16
|
},
|
|
@@ -38,10 +43,13 @@
|
|
|
38
43
|
"@commitlint/cli": "^19.8.1",
|
|
39
44
|
"@commitlint/config-conventional": "^19.8.1",
|
|
40
45
|
"@eslint/js": "^9.25.1",
|
|
46
|
+
"@types/jexl": "^2.3.4",
|
|
47
|
+
"@types/lodash": "^4.17.20",
|
|
41
48
|
"@types/node": "^22.15.2",
|
|
42
49
|
"@typescript-eslint/eslint-plugin": "^8.31.0",
|
|
43
50
|
"@typescript-eslint/parser": "^8.31.0",
|
|
44
51
|
"esbuild": "^0.25.3",
|
|
52
|
+
"esbuild-plugin-copy": "^2.1.1",
|
|
45
53
|
"eslint": "^9.25.1",
|
|
46
54
|
"globals": "^16.0.0",
|
|
47
55
|
"husky": "^9.1.7",
|
|
@@ -53,12 +61,19 @@
|
|
|
53
61
|
"typescript-eslint": "^8.31.0"
|
|
54
62
|
},
|
|
55
63
|
"dependencies": {
|
|
64
|
+
"ajv": "^8.17.1",
|
|
65
|
+
"ajv-errors": "^3.0.0",
|
|
66
|
+
"ajv-keywords": "^5.1.0",
|
|
56
67
|
"chalk": "^5.4.1",
|
|
57
68
|
"commander": "^13.1.0",
|
|
58
69
|
"enquirer": "^2.4.1",
|
|
59
70
|
"execa": "^9.5.2",
|
|
71
|
+
"globby": "^14.1.0",
|
|
72
|
+
"handlebars": "^4.7.8",
|
|
60
73
|
"inquirer": "^12.6.1",
|
|
74
|
+
"jexl": "^2.3.0",
|
|
61
75
|
"listr2": "^8.3.2",
|
|
76
|
+
"lodash": "^4.17.21",
|
|
62
77
|
"remark-stringify": "^11.0.0",
|
|
63
78
|
"unified": "^11.0.5",
|
|
64
79
|
"unist-builder": "^4.0.0"
|
package/.commitlintrc.json
DELETED
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
name: release-pipeline
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
workflow_dispatch:
|
|
5
|
-
inputs:
|
|
6
|
-
release-type:
|
|
7
|
-
description: "Release type"
|
|
8
|
-
type: choice
|
|
9
|
-
options:
|
|
10
|
-
- rc
|
|
11
|
-
- latest
|
|
12
|
-
default: latest
|
|
13
|
-
push:
|
|
14
|
-
branches:
|
|
15
|
-
- main
|
|
16
|
-
|
|
17
|
-
concurrency:
|
|
18
|
-
group: ${{ github.workflow }}-${{ github.ref }}
|
|
19
|
-
cancel-in-progress: true
|
|
20
|
-
|
|
21
|
-
jobs:
|
|
22
|
-
setup-release:
|
|
23
|
-
runs-on: ubuntu-latest
|
|
24
|
-
outputs:
|
|
25
|
-
release-type: ${{ steps.determine.outputs.release-type }}
|
|
26
|
-
steps:
|
|
27
|
-
- name: Checkout Code
|
|
28
|
-
uses: actions/checkout@v5
|
|
29
|
-
with:
|
|
30
|
-
fetch-depth: 0 # Ensures history is available for git log
|
|
31
|
-
|
|
32
|
-
- id: determine
|
|
33
|
-
run: |
|
|
34
|
-
release_type_input="${{ github.event.inputs.release-type }}"
|
|
35
|
-
|
|
36
|
-
if [ -n "$release_type_input" ]; then
|
|
37
|
-
type="$release_type_input"
|
|
38
|
-
else
|
|
39
|
-
echo "No manual input found. Proceeding to parse commit message..."
|
|
40
|
-
|
|
41
|
-
COMMIT_MSG=$(git log --format=%s -n 1)
|
|
42
|
-
echo "Last Commit Message: $COMMIT_MSG"
|
|
43
|
-
|
|
44
|
-
parsed_release_type=$(echo "$COMMIT_MSG" | sed -n 's/^release(\(.*\)):.*$/\1/p')
|
|
45
|
-
|
|
46
|
-
if [ -n "$parsed_release_type" ]; then
|
|
47
|
-
echo "Pattern matched! Parsed type: $parsed_release_type"
|
|
48
|
-
type=$([ "$parsed_release_type" = "prod" ] && echo "latest" || echo "$release_type")
|
|
49
|
-
else
|
|
50
|
-
echo "WARN: No release type provided via input AND commit message does not match 'release(type):'"
|
|
51
|
-
fi
|
|
52
|
-
fi
|
|
53
|
-
|
|
54
|
-
echo "release-type=$type" >> $GITHUB_OUTPUT
|
|
55
|
-
echo "Successfully resolved release-type to: $type"
|
|
56
|
-
|
|
57
|
-
release:
|
|
58
|
-
needs: setup-release
|
|
59
|
-
permissions:
|
|
60
|
-
id-token: write
|
|
61
|
-
contents: write
|
|
62
|
-
pull-requests: write
|
|
63
|
-
actions: write
|
|
64
|
-
uses: tspyder7/github-actions-lib/.github/workflows/release-pipeline.yml@main
|
|
65
|
-
with:
|
|
66
|
-
environment: production
|
|
67
|
-
release-type: ${{ needs.setup-release.outputs.release-type }}
|
|
68
|
-
publish: |
|
|
69
|
-
{
|
|
70
|
-
"uses": "tspyder7/github-actions-lib/actions/npm-publish@main",
|
|
71
|
-
"with": {
|
|
72
|
-
"package-manager": "pnpm",
|
|
73
|
-
"node-version": "24",
|
|
74
|
-
"registry-url": "https://registry.npmjs.org/",
|
|
75
|
-
"publish-tag": "${{ needs.setup-release.outputs.release-type }}"
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
secrets:
|
|
79
|
-
GH_TOKEN: ${{ secrets.GH_REPO_TOKEN }}
|
package/.husky/commit-msg
DELETED
package/.husky/pre-push
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json",
|
|
3
|
-
"packages": {
|
|
4
|
-
".": {
|
|
5
|
-
"package-name": "boilerforge",
|
|
6
|
-
"release-type": "node",
|
|
7
|
-
"changelog-path": "CHANGELOG.md"
|
|
8
|
-
}
|
|
9
|
-
},
|
|
10
|
-
"include-v-in-tag": true,
|
|
11
|
-
"bump-minor-pre-major": false,
|
|
12
|
-
"pull-request-title-pattern": "release(prod): v${version}",
|
|
13
|
-
"pull-request-header": "Release Notes",
|
|
14
|
-
"separate-pull-requests": true,
|
|
15
|
-
"bump-patch-for-minor-pre-major": true
|
|
16
|
-
}
|