project-auto-wizard 0.13.2 → 0.14.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/README.md +1 -1
- package/bin/project-auto-wizard.js +18 -4
- package/package.json +2 -2
- package/payload/config/breaking-changes.json +28 -14
- package/payload/config/wizard-prompts.yml +102 -46
- package/payload/flutter-app/android/fastlane/Fastfile.playstore +44 -32
- package/payload/flutter-app/ios/ExportOptions.plist +8 -8
- package/payload/flutter-app/ios/fastlane/Fastfile +57 -43
- package/payload/scripts/changelog_manager.py +296 -257
- package/payload/scripts/issue_helper.py +54 -50
- package/payload/scripts/messages.py +2279 -0
- package/payload/scripts/truncate_release_notes.py +7 -6
- package/payload/scripts/version_manager.py +64 -61
- package/payload/version.yml.template +2 -1
- package/payload/workflows/common/PROJECT-COMMON-AI-PR-SUMMARY.yaml +17 -12
- package/payload/workflows/common/PROJECT-COMMON-AUTO-CHANGELOG-CONTROL.yaml +59 -34
- package/payload/workflows/common/PROJECT-COMMON-ISSUE-HELPER.yaml +17 -15
- package/payload/workflows/common/PROJECT-COMMON-README-VERSION-UPDATE.yaml +17 -10
- package/payload/workflows/common/PROJECT-COMMON-RELEASE-PUBLISH.yaml +54 -44
- package/payload/workflows/common/PROJECT-COMMON-VERSION-CONTROL.yaml +24 -17
- package/payload/workflows/flutter/PROJECT-FLUTTER-ANDROID-FIREBASE-CICD.yaml +194 -184
- package/payload/workflows/flutter/PROJECT-FLUTTER-ANDROID-PLAYSTORE-CICD.yaml +226 -213
- package/payload/workflows/flutter/PROJECT-FLUTTER-ANDROID-SELFHOSTED-CICD.yaml +46 -42
- package/payload/workflows/flutter/PROJECT-FLUTTER-ANDROID-TEST-APK.yaml +334 -241
- package/payload/workflows/flutter/PROJECT-FLUTTER-APP-BUILD-TRIGGER.yaml +152 -128
- package/payload/workflows/flutter/PROJECT-FLUTTER-CI.yaml +246 -188
- package/payload/workflows/flutter/PROJECT-FLUTTER-IOS-TEST-TESTFLIGHT.yaml +353 -238
- package/payload/workflows/flutter/PROJECT-FLUTTER-IOS-TESTFLIGHT.yaml +96 -85
- package/payload/workflows/go/PROJECT-GO-CI.yaml +47 -36
- package/payload/workflows/go/PROJECT-GO-PR-PREVIEW.yaml +945 -508
- package/payload/workflows/go/PROJECT-GO-SIMPLE-CICD.yaml +155 -133
- package/payload/workflows/next/PROJECT-NEXT-CI.yaml +76 -60
- package/payload/workflows/next/PROJECT-NEXT-CICD.yaml +97 -77
- package/payload/workflows/python/PROJECT-PYTHON-CI.yaml +62 -47
- package/payload/workflows/python/PROJECT-PYTHON-PR-PREVIEW.yaml +942 -505
- package/payload/workflows/python/PROJECT-PYTHON-SIMPLE-CICD.yaml +148 -126
- package/payload/workflows/react/PROJECT-REACT-CI.yaml +86 -70
- package/payload/workflows/react/PROJECT-REACT-CICD.yaml +112 -92
- package/payload/workflows/spring/PROJECT-SPRING-CI.yml +112 -82
- package/payload/workflows/spring/server-deploy/PROJECT-SPRING-NONSTOP-NGINX-CICD.yaml +180 -150
- package/payload/workflows/spring/server-deploy/PROJECT-SPRING-NONSTOP-TRAEFIK-CICD.yaml +161 -131
- package/payload/workflows/spring/server-deploy/PROJECT-SPRING-PR-PREVIEW.yaml +970 -549
- package/payload/workflows/spring/server-deploy/PROJECT-SPRING-SIMPLE-CICD.yaml +193 -162
- package/src/cli/args.js +98 -52
- package/src/cli/help.js +8 -41
- package/src/commands/doctor.js +85 -89
- package/src/commands/dry-run.js +63 -43
- package/src/commands/full.js +79 -77
- package/src/commands/install-settings.js +16 -15
- package/src/commands/interactive-flutter.js +20 -19
- package/src/commands/interactive.js +135 -132
- package/src/commands/purge.js +47 -42
- package/src/commands/status.js +36 -36
- package/src/commands/uninstall.js +43 -41
- package/src/context.js +12 -11
- package/src/core/assets.js +12 -11
- package/src/core/baseline.js +27 -27
- package/src/core/branches.js +29 -27
- package/src/core/branding.js +7 -6
- package/src/core/breaking-check.js +22 -21
- package/src/core/breaking.js +15 -8
- package/src/core/copy/app-files.js +5 -4
- package/src/core/copy/flutter-app.js +8 -8
- package/src/core/copy/gitignore.js +58 -50
- package/src/core/copy/readme.js +45 -35
- package/src/core/copy/simple.js +16 -15
- package/src/core/copy/workflows.js +131 -124
- package/src/core/deploy-style.js +51 -48
- package/src/core/detect-fs.js +57 -57
- package/src/core/detect.js +67 -65
- package/src/core/errors.js +2 -2
- package/src/core/flutter-doctor.js +17 -16
- package/src/core/flutter-hooks.js +33 -32
- package/src/core/flutter-options.js +34 -33
- package/src/core/fsutil.js +12 -12
- package/src/core/installed-stores.js +4 -4
- package/src/core/logger.js +42 -40
- package/src/core/paths-resolve.js +88 -86
- package/src/core/paths.js +10 -10
- package/src/core/release-options.js +8 -8
- package/src/core/removal-exec.js +14 -13
- package/src/core/removal-plan.js +37 -37
- package/src/core/types.js +47 -47
- package/src/core/verify.js +44 -38
- package/src/core/version-yml.js +76 -68
- package/src/core/wizard-env.js +46 -46
- package/src/core/wizard-labels.js +63 -41
- package/src/i18n/catalog/en/cli.js +50 -0
- package/src/i18n/catalog/en/commands.js +187 -0
- package/src/i18n/catalog/en/copy.js +19 -0
- package/src/i18n/catalog/en/core.js +74 -0
- package/src/i18n/catalog/en/core2.js +15 -0
- package/src/i18n/catalog/en/ui.js +221 -0
- package/src/i18n/catalog/en.js +12 -0
- package/src/i18n/catalog/index.js +5 -0
- package/src/i18n/catalog/ko/cli.js +50 -0
- package/src/i18n/catalog/ko/commands.js +187 -0
- package/src/i18n/catalog/ko/copy.js +19 -0
- package/src/i18n/catalog/ko/core.js +74 -0
- package/src/i18n/catalog/ko/core2.js +15 -0
- package/src/i18n/catalog/ko/ui.js +221 -0
- package/src/i18n/catalog/ko.js +10 -0
- package/src/i18n/index.js +44 -0
- package/src/i18n/languages.js +9 -0
- package/src/index.js +128 -94
- package/src/ui/ansi.js +7 -7
- package/src/ui/banner.js +7 -6
- package/src/ui/env-plan.js +82 -81
- package/src/ui/prompts.js +97 -122
- package/src/ui/readline-engine.js +59 -58
- package/src/ui/status-cards.js +37 -31
- package/src/ui/summary.js +89 -88
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
# project-auto-wizard:managed-workflow
|
|
2
|
-
# React CI (
|
|
3
|
-
# {{DEVELOP_BRANCH}}
|
|
2
|
+
# React CI (build verification)
|
|
3
|
+
# On push/PR to the {{DEVELOP_BRANCH}} branch, verifies with npm ci, npm test (when a test script exists) and npm run build. Caches node_modules and the build output.
|
|
4
4
|
#
|
|
5
5
|
# GitHub Secrets
|
|
6
|
-
# ENV_FILE (
|
|
6
|
+
# ENV_FILE (optional): contents of the .env file. CI only verifies the build, so no deploy-related Secrets are needed
|
|
7
7
|
#
|
|
8
|
-
#
|
|
9
|
-
# PROJECT_NAME :
|
|
10
|
-
# NODE_VERSION : Node.js
|
|
11
|
-
# ENV_FILE :
|
|
8
|
+
# Project settings (env section)
|
|
9
|
+
# PROJECT_NAME : project name
|
|
10
|
+
# NODE_VERSION : Node.js version (default: 20.15.0)
|
|
11
|
+
# ENV_FILE : environment file name (default: .env)
|
|
12
12
|
|
|
13
13
|
name: PROJECT-REACT-CI
|
|
14
14
|
|
|
@@ -23,7 +23,7 @@ env:
|
|
|
23
23
|
PROJECT_NAME: "__PROJECT_NAME__" # @wizard ask:@repo
|
|
24
24
|
NODE_VERSION: "20.15.0"
|
|
25
25
|
ENV_FILE: ".env"
|
|
26
|
-
#
|
|
26
|
+
# Subdirectory of this project in a monorepo ('.' means always verify)
|
|
27
27
|
PROJECT_PATH: "." # @wizard auto:project-path
|
|
28
28
|
|
|
29
29
|
permissions:
|
|
@@ -32,9 +32,9 @@ permissions:
|
|
|
32
32
|
issues: write
|
|
33
33
|
|
|
34
34
|
jobs:
|
|
35
|
-
# Job:
|
|
35
|
+
# Job: change detection (in a monorepo, checks whether this project's path changed)
|
|
36
36
|
changes:
|
|
37
|
-
name:
|
|
37
|
+
name: Detect changes
|
|
38
38
|
runs-on: ubuntu-latest
|
|
39
39
|
permissions:
|
|
40
40
|
contents: read
|
|
@@ -45,45 +45,46 @@ jobs:
|
|
|
45
45
|
- name: Checkout repository
|
|
46
46
|
uses: actions/checkout@v7
|
|
47
47
|
|
|
48
|
-
- name:
|
|
48
|
+
- name: Check whether the project path changed
|
|
49
49
|
id: filter
|
|
50
50
|
if: ${{ github.event_name != 'workflow_dispatch' }}
|
|
51
51
|
uses: dorny/paths-filter@v4
|
|
52
52
|
with:
|
|
53
|
-
# push
|
|
54
|
-
#
|
|
53
|
+
# A push only looks at this push's range (against the previous commit, 'before'). Left empty it would be the cumulative diff against the default branch.
|
|
54
|
+
# The first push of a new branch (before is 0) and PRs get an empty value -> default behavior (against the default branch / PR base)
|
|
55
55
|
base: ${{ github.event_name == 'push' && github.event.before != '0000000000000000000000000000000000000000' && github.event.before || '' }}
|
|
56
56
|
filters: |
|
|
57
57
|
project:
|
|
58
58
|
- '${{ env.PROJECT_PATH == '.' && '**' || format('{0}/**', env.PROJECT_PATH) }}'
|
|
59
59
|
|
|
60
60
|
build:
|
|
61
|
-
name: React/Next.js
|
|
61
|
+
name: Build React/Next.js application
|
|
62
62
|
runs-on: ubuntu-latest
|
|
63
63
|
needs: changes
|
|
64
64
|
if: ${{ github.event_name == 'workflow_dispatch' || needs.changes.outputs.project == 'true' }}
|
|
65
|
-
#
|
|
65
|
+
# In a monorepo (--paths), build inside that subfolder
|
|
66
66
|
defaults:
|
|
67
67
|
run:
|
|
68
68
|
working-directory: ${{ env.PROJECT_PATH }}
|
|
69
69
|
|
|
70
70
|
steps:
|
|
71
|
-
- name:
|
|
71
|
+
- name: Checkout repository
|
|
72
72
|
uses: actions/checkout@v7
|
|
73
73
|
|
|
74
|
-
- name:
|
|
74
|
+
- name: Create environment file (${{ env.ENV_FILE }})
|
|
75
75
|
run: |
|
|
76
|
+
m() { (cd "$GITHUB_WORKSPACE" && python3 .github/scripts/messages.py get "$@"); }
|
|
76
77
|
echo -e "${{ secrets.ENV_FILE || secrets.ENV }}" > ${{ env.ENV_FILE }}
|
|
77
|
-
|
|
78
|
+
m cicd.env_file_created file="${{ env.ENV_FILE }}"
|
|
78
79
|
|
|
79
|
-
- name: Node.js
|
|
80
|
+
- name: Set up Node.js
|
|
80
81
|
uses: actions/setup-node@v7
|
|
81
82
|
with:
|
|
82
83
|
node-version: ${{ env.NODE_VERSION }}
|
|
83
84
|
cache: "npm"
|
|
84
85
|
cache-dependency-path: ${{ env.PROJECT_PATH }}/package-lock.json
|
|
85
86
|
|
|
86
|
-
- name: npm
|
|
87
|
+
- name: Cache npm dependencies
|
|
87
88
|
uses: actions/cache@v6
|
|
88
89
|
with:
|
|
89
90
|
path: ~/.npm
|
|
@@ -91,8 +92,8 @@ jobs:
|
|
|
91
92
|
restore-keys: |
|
|
92
93
|
${{ runner.os }}-npm-
|
|
93
94
|
|
|
94
|
-
# package-lock.json
|
|
95
|
-
- name: node_modules
|
|
95
|
+
# Skip npm ci when package-lock.json has not changed
|
|
96
|
+
- name: Cache node_modules
|
|
96
97
|
id: node-modules-cache
|
|
97
98
|
uses: actions/cache@v6
|
|
98
99
|
with:
|
|
@@ -101,17 +102,18 @@ jobs:
|
|
|
101
102
|
restore-keys: |
|
|
102
103
|
${{ runner.os }}-node-modules-
|
|
103
104
|
|
|
104
|
-
#
|
|
105
|
-
- name:
|
|
105
|
+
# Runs only on a cache miss (npm ci installs the exact versions from package-lock.json)
|
|
106
|
+
- name: Install dependencies
|
|
106
107
|
if: steps.node-modules-cache.outputs.cache-hit != 'true'
|
|
107
108
|
run: |
|
|
108
|
-
|
|
109
|
+
m() { (cd "$GITHUB_WORKSPACE" && python3 .github/scripts/messages.py get "$@"); }
|
|
110
|
+
m cibuild.node_deps_installing
|
|
109
111
|
npm ci
|
|
110
|
-
|
|
112
|
+
m cibuild.node_deps_done
|
|
111
113
|
|
|
112
|
-
# Next.js
|
|
113
|
-
# .next/cache
|
|
114
|
-
- name: Next.js
|
|
114
|
+
# Cache the Next.js build (for Next.js projects)
|
|
115
|
+
# Caches the .next/cache folder to speed up incremental builds
|
|
116
|
+
- name: Cache Next.js build
|
|
115
117
|
uses: actions/cache@v6
|
|
116
118
|
with:
|
|
117
119
|
path: ${{ env.PROJECT_PATH }}/.next/cache
|
|
@@ -120,116 +122,130 @@ jobs:
|
|
|
120
122
|
${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json') }}-
|
|
121
123
|
${{ runner.os }}-nextjs-
|
|
122
124
|
|
|
123
|
-
# package.json
|
|
124
|
-
- name:
|
|
125
|
+
# Runs only when package.json has a test script (the npm init default "no test specified" counts as none)
|
|
126
|
+
- name: Run tests
|
|
125
127
|
run: |
|
|
128
|
+
m() { (cd "$GITHUB_WORKSPACE" && python3 .github/scripts/messages.py get "$@"); }
|
|
126
129
|
TEST_SCRIPT=$(node -p "(require('./package.json').scripts || {}).test || ''")
|
|
127
130
|
if [ -z "$TEST_SCRIPT" ] || echo "$TEST_SCRIPT" | grep -q "no test specified"; then
|
|
128
|
-
|
|
131
|
+
m cibuild.node_no_test_script
|
|
129
132
|
exit 0
|
|
130
133
|
fi
|
|
131
|
-
|
|
132
|
-
# CI=true: watch
|
|
134
|
+
m cibuild.node_test_run script="$TEST_SCRIPT"
|
|
135
|
+
# CI=true: run watch-mode test runners (react-scripts, etc.) only once
|
|
133
136
|
CI=true npm test
|
|
134
137
|
|
|
135
|
-
#
|
|
136
|
-
- name:
|
|
138
|
+
# Even when the build fails, keep the workflow going to collect the error log
|
|
139
|
+
- name: Build project
|
|
137
140
|
id: build
|
|
138
141
|
run: |
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
+
m() { (cd "$GITHUB_WORKSPACE" && python3 .github/scripts/messages.py get "$@"); }
|
|
143
|
+
m cibuild.node_build_start
|
|
144
|
+
m cibuild.node_build_project project="${{ env.PROJECT_NAME }}"
|
|
145
|
+
m cibuild.node_build_node node="${{ env.NODE_VERSION }}"
|
|
142
146
|
echo ""
|
|
143
147
|
|
|
144
|
-
#
|
|
145
|
-
#
|
|
148
|
+
# Run the build and save the log
|
|
149
|
+
# On failure, exit 0 so the workflow continues (to collect the error log)
|
|
146
150
|
npm run build > build_log.txt 2>&1 || {
|
|
147
151
|
echo "build_failed=true" >> $GITHUB_OUTPUT
|
|
148
152
|
echo "status=failed" >> $GITHUB_OUTPUT
|
|
149
153
|
echo ""
|
|
150
|
-
|
|
154
|
+
m cibuild.node_build_failed
|
|
151
155
|
exit 0
|
|
152
156
|
}
|
|
153
157
|
|
|
154
158
|
echo "build_failed=false" >> $GITHUB_OUTPUT
|
|
155
159
|
echo "status=success" >> $GITHUB_OUTPUT
|
|
156
|
-
|
|
160
|
+
m cibuild.node_build_ok
|
|
157
161
|
|
|
158
|
-
#
|
|
159
|
-
- name:
|
|
162
|
+
# Runs only when the build failed
|
|
163
|
+
- name: Print build error log
|
|
160
164
|
if: steps.build.outputs.build_failed == 'true'
|
|
161
165
|
run: |
|
|
166
|
+
m() { (cd "$GITHUB_WORKSPACE" && python3 .github/scripts/messages.py get "$@"); }
|
|
162
167
|
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
|
|
163
|
-
|
|
168
|
+
m cibuild.node_errlog_title
|
|
164
169
|
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
|
|
165
170
|
echo ""
|
|
166
171
|
|
|
167
|
-
#
|
|
172
|
+
# Print only the last 50 lines of the log (the full log is available in the artifact)
|
|
168
173
|
if [ -f "build_log.txt" ]; then
|
|
169
174
|
tail -n 50 build_log.txt
|
|
170
175
|
else
|
|
171
|
-
|
|
176
|
+
m cibuild.node_errlog_missing
|
|
172
177
|
fi
|
|
173
178
|
|
|
174
179
|
echo ""
|
|
175
180
|
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
|
|
176
181
|
|
|
177
|
-
#
|
|
182
|
+
# End the workflow because the build failed
|
|
178
183
|
exit 1
|
|
179
184
|
|
|
180
|
-
#
|
|
181
|
-
- name:
|
|
185
|
+
# Save the log regardless of build success or failure
|
|
186
|
+
- name: Upload build log
|
|
182
187
|
if: always()
|
|
183
188
|
uses: actions/upload-artifact@v7
|
|
184
189
|
with:
|
|
185
190
|
name: build-log
|
|
186
191
|
path: ${{ env.PROJECT_PATH }}/build_log.txt
|
|
187
|
-
retention-days: 7 # 7
|
|
192
|
+
retention-days: 7 # keep for 7 days
|
|
188
193
|
|
|
189
|
-
#
|
|
190
|
-
- name:
|
|
194
|
+
# Summarize the workflow result for readability
|
|
195
|
+
- name: Build result summary
|
|
191
196
|
if: always()
|
|
192
197
|
run: |
|
|
198
|
+
m() { (cd "$GITHUB_WORKSPACE" && python3 .github/scripts/messages.py get "$@"); }
|
|
193
199
|
echo ""
|
|
194
200
|
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
|
|
195
201
|
if [ "${{ steps.build.outputs.status }}" = "success" ]; then
|
|
196
|
-
|
|
202
|
+
m cibuild.node_result_ok
|
|
197
203
|
else
|
|
198
|
-
|
|
204
|
+
m cibuild.node_result_fail
|
|
199
205
|
fi
|
|
200
206
|
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
|
|
201
207
|
echo ""
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
208
|
+
m cibuild.node_result_title
|
|
209
|
+
m cibuild.node_result_project project="${{ env.PROJECT_NAME }}"
|
|
210
|
+
m cibuild.node_result_node node="${{ env.NODE_VERSION }}"
|
|
211
|
+
m cibuild.node_result_status status="${{ steps.build.outputs.status }}"
|
|
212
|
+
m cibuild.node_result_branch branch="${{ github.ref_name }}"
|
|
213
|
+
m cibuild.node_result_commit sha="${{ github.sha }}"
|
|
214
|
+
m cibuild.node_result_time time="$(date '+%Y-%m-%d %H:%M:%S UTC')"
|
|
209
215
|
echo ""
|
|
210
216
|
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
|
|
211
217
|
echo ""
|
|
212
218
|
|
|
213
219
|
if [ "${{ steps.build.outputs.status }}" = "success" ]; then
|
|
214
|
-
|
|
220
|
+
m cibuild.node_all_ok
|
|
215
221
|
else
|
|
216
|
-
|
|
217
|
-
|
|
222
|
+
m cibuild.node_error_occurred
|
|
223
|
+
m cibuild.node_log_hint
|
|
218
224
|
fi
|
|
219
225
|
|
|
220
|
-
# Job: CI Gate (
|
|
226
|
+
# Job: CI Gate (the single job to register as a required check)
|
|
221
227
|
ci-gate:
|
|
222
228
|
name: CI Gate
|
|
223
229
|
if: ${{ always() }}
|
|
224
230
|
needs: [changes, build]
|
|
225
231
|
runs-on: ubuntu-latest
|
|
226
232
|
steps:
|
|
227
|
-
|
|
233
|
+
# Only the message catalog is needed here, so check out just that
|
|
234
|
+
- name: Checkout message catalog
|
|
235
|
+
uses: actions/checkout@v7
|
|
236
|
+
with:
|
|
237
|
+
sparse-checkout: |
|
|
238
|
+
.github/scripts/messages.py
|
|
239
|
+
version.yml
|
|
240
|
+
sparse-checkout-cone-mode: false
|
|
241
|
+
|
|
242
|
+
- name: Aggregate results
|
|
228
243
|
env:
|
|
229
244
|
RESULTS: ${{ toJSON(needs.*.result) }}
|
|
230
245
|
run: |
|
|
231
|
-
|
|
246
|
+
m() { (cd "$GITHUB_WORKSPACE" && python3 .github/scripts/messages.py get "$@"); }
|
|
247
|
+
m cibuild.gate_results results="$RESULTS"
|
|
232
248
|
if echo "$RESULTS" | grep -Eq '"(failure|cancelled)"'; then
|
|
233
|
-
|
|
249
|
+
m cibuild.gate_failed
|
|
234
250
|
exit 1
|
|
235
251
|
fi
|