dash-devtools 1.0.0__tar.gz → 2.0.1__tar.gz
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.
- dash_devtools-2.0.1/LICENSE +21 -0
- {dash_devtools-1.0.0/dash_devtools.egg-info → dash_devtools-2.0.1}/PKG-INFO +93 -41
- dash_devtools-1.0.0/PKG-INFO → dash_devtools-2.0.1/README.md +76 -78
- {dash_devtools-1.0.0 → dash_devtools-2.0.1}/dash_devtools/__init__.py +1 -1
- {dash_devtools-1.0.0 → dash_devtools-2.0.1}/dash_devtools/browser.py +3 -190
- dash_devtools-2.0.1/dash_devtools/browser_helpers.py +198 -0
- dash_devtools-2.0.1/dash_devtools/cli.py +62 -0
- dash_devtools-2.0.1/dash_devtools/commands/__init__.py +26 -0
- dash_devtools-2.0.1/dash_devtools/commands/ai.py +205 -0
- dash_devtools-2.0.1/dash_devtools/commands/analyze.py +590 -0
- dash_devtools-2.0.1/dash_devtools/commands/api_test.py +102 -0
- dash_devtools-2.0.1/dash_devtools/commands/architecture.py +232 -0
- dash_devtools-2.0.1/dash_devtools/commands/db.py +226 -0
- dash_devtools-2.0.1/dash_devtools/commands/deploy.py +191 -0
- dash_devtools-2.0.1/dash_devtools/commands/generate.py +346 -0
- dash_devtools-2.0.1/dash_devtools/commands/health.py +82 -0
- dash_devtools-2.0.1/dash_devtools/commands/hooks.py +68 -0
- dash_devtools-2.0.1/dash_devtools/commands/misc.py +319 -0
- dash_devtools-2.0.1/dash_devtools/commands/spec.py +211 -0
- dash_devtools-2.0.1/dash_devtools/commands/test.py +158 -0
- dash_devtools-2.0.1/dash_devtools/commands/validate.py +90 -0
- dash_devtools-2.0.1/dash_devtools/commands/verify.py +152 -0
- {dash_devtools-1.0.0 → dash_devtools-2.0.1}/dash_devtools/fixers/__init__.py +1 -1
- {dash_devtools-1.0.0 → dash_devtools-2.0.1}/dash_devtools/fixers/migration_fixer.py +1 -1
- dash_devtools-2.0.1/dash_devtools/fixers/ux_fixer.py +21 -0
- {dash_devtools-1.0.0 → dash_devtools-2.0.1}/dash_devtools/generators/__init__.py +1 -1
- {dash_devtools-1.0.0 → dash_devtools-2.0.1}/dash_devtools/health.py +26 -6
- {dash_devtools-1.0.0 → dash_devtools-2.0.1}/dash_devtools/hooks/__init__.py +18 -0
- {dash_devtools-1.0.0 → dash_devtools-2.0.1}/dash_devtools/hooks/pre_push.py +6 -3
- {dash_devtools-1.0.0 → dash_devtools-2.0.1}/dash_devtools/markdown_report.py +1 -1
- dash_devtools-2.0.1/dash_devtools/migrators/__init__.py +21 -0
- dash_devtools-2.0.1/dash_devtools/monitor.py +118 -0
- {dash_devtools-1.0.0 → dash_devtools-2.0.1}/dash_devtools/perf.py +3 -3
- dash_devtools-2.0.1/dash_devtools/report.py +453 -0
- dash_devtools-2.0.1/dash_devtools/reporters/__init__.py +96 -0
- dash_devtools-2.0.1/dash_devtools/reporters/charts.py +129 -0
- dash_devtools-2.0.1/dash_devtools/reporters/report_data.py +196 -0
- dash_devtools-2.0.1/dash_devtools/reporters/screenshot.py +168 -0
- dash_devtools-2.0.1/dash_devtools/reporters/templates.py +242 -0
- dash_devtools-2.0.1/dash_devtools/test_runners/__init__.py +25 -0
- dash_devtools-2.0.1/dash_devtools/test_runners/jest.py +58 -0
- dash_devtools-2.0.1/dash_devtools/test_runners/karma.py +196 -0
- dash_devtools-2.0.1/dash_devtools/test_runners/pytest_runner.py +66 -0
- dash_devtools-2.0.1/dash_devtools/test_runners/vitest.py +132 -0
- dash_devtools-2.0.1/dash_devtools/test_suite.py +393 -0
- {dash_devtools-1.0.0 → dash_devtools-2.0.1}/dash_devtools/validators/__init__.py +19 -4
- {dash_devtools-1.0.0 → dash_devtools-2.0.1}/dash_devtools/validators/backend/nodejs.py +21 -8
- {dash_devtools-1.0.0 → dash_devtools-2.0.1}/dash_devtools/validators/backend/python.py +41 -1
- {dash_devtools-1.0.0 → dash_devtools-2.0.1}/dash_devtools/validators/code_quality.py +47 -10
- {dash_devtools-1.0.0 → dash_devtools-2.0.1}/dash_devtools/validators/common/__init__.py +3 -1
- dash_devtools-2.0.1/dash_devtools/validators/common/a11y.py +131 -0
- dash_devtools-2.0.1/dash_devtools/validators/common/constants.py +129 -0
- dash_devtools-2.0.1/dash_devtools/validators/common/i18n_sync.py +205 -0
- {dash_devtools-1.0.0 → dash_devtools-2.0.1}/dash_devtools/validators/common/quality.py +120 -10
- {dash_devtools-1.0.0 → dash_devtools-2.0.1}/dash_devtools/validators/common/security.py +8 -6
- {dash_devtools-1.0.0 → dash_devtools-2.0.1}/dash_devtools/validators/common/spec.py +13 -3
- {dash_devtools-1.0.0 → dash_devtools-2.0.1}/dash_devtools/validators/detector.py +11 -8
- dash_devtools-2.0.1/dash_devtools/validators/frontend/__init__.py +16 -0
- {dash_devtools-1.0.0 → dash_devtools-2.0.1}/dash_devtools/validators/frontend/angular.py +1 -1
- {dash_devtools-1.0.0 → dash_devtools-2.0.1}/dash_devtools/validators/frontend/gas.py +3 -94
- dash_devtools-2.0.1/dash_devtools/validators/frontend/nextjs.py +172 -0
- {dash_devtools-1.0.0 → dash_devtools-2.0.1}/dash_devtools/validators/frontend/vite.py +115 -95
- {dash_devtools-1.0.0 → dash_devtools-2.0.1}/dash_devtools/validators/migration.py +50 -66
- {dash_devtools-1.0.0 → dash_devtools-2.0.1}/dash_devtools/validators/performance.py +18 -3
- {dash_devtools-1.0.0 → dash_devtools-2.0.1}/dash_devtools/validators/security.py +8 -6
- {dash_devtools-1.0.0 → dash_devtools-2.0.1}/dash_devtools/vision/__init__.py +3 -3
- {dash_devtools-1.0.0 → dash_devtools-2.0.1}/dash_devtools/watch.py +1 -1
- dash_devtools-2.0.1/dash_devtools/word_report.py +485 -0
- dash_devtools-1.0.0/README.md → dash_devtools-2.0.1/dash_devtools.egg-info/PKG-INFO +130 -38
- {dash_devtools-1.0.0 → dash_devtools-2.0.1}/dash_devtools.egg-info/SOURCES.txt +31 -1
- {dash_devtools-1.0.0 → dash_devtools-2.0.1}/dash_devtools.egg-info/requires.txt +16 -1
- {dash_devtools-1.0.0 → dash_devtools-2.0.1}/pyproject.toml +18 -3
- dash_devtools-1.0.0/dash_devtools/cli.py +0 -1452
- dash_devtools-1.0.0/dash_devtools/fixers/ux_fixer.py +0 -106
- dash_devtools-1.0.0/dash_devtools/gas_mes_test.py +0 -1241
- dash_devtools-1.0.0/dash_devtools/migrators/__init__.py +0 -21
- dash_devtools-1.0.0/dash_devtools/report.py +0 -667
- dash_devtools-1.0.0/dash_devtools/reporters/__init__.py +0 -11
- dash_devtools-1.0.0/dash_devtools/test_suite.py +0 -690
- dash_devtools-1.0.0/dash_devtools/validators/frontend/__init__.py +0 -14
- dash_devtools-1.0.0/dash_devtools/word_report.py +0 -690
- {dash_devtools-1.0.0 → dash_devtools-2.0.1}/dash_devtools/__main__.py +0 -0
- {dash_devtools-1.0.0 → dash_devtools-2.0.1}/dash_devtools/ai_engine.py +0 -0
- {dash_devtools-1.0.0 → dash_devtools-2.0.1}/dash_devtools/database.py +0 -0
- {dash_devtools-1.0.0 → dash_devtools-2.0.1}/dash_devtools/dbdiagram.py +0 -0
- {dash_devtools-1.0.0 → dash_devtools-2.0.1}/dash_devtools/e2e.py +0 -0
- {dash_devtools-1.0.0 → dash_devtools-2.0.1}/dash_devtools/fixers/version_bumper.py +0 -0
- {dash_devtools-1.0.0 → dash_devtools-2.0.1}/dash_devtools/hooks/pre_commit.py +0 -0
- {dash_devtools-1.0.0 → dash_devtools-2.0.1}/dash_devtools/init_test.py +0 -0
- {dash_devtools-1.0.0 → dash_devtools-2.0.1}/dash_devtools/spec.py +0 -0
- {dash_devtools-1.0.0 → dash_devtools-2.0.1}/dash_devtools/stats.py +0 -0
- {dash_devtools-1.0.0 → dash_devtools-2.0.1}/dash_devtools/testing.py +0 -0
- {dash_devtools-1.0.0 → dash_devtools-2.0.1}/dash_devtools/validators/backend/__init__.py +0 -0
- {dash_devtools-1.0.0 → dash_devtools-2.0.1}/dash_devtools.egg-info/dependency_links.txt +0 -0
- {dash_devtools-1.0.0 → dash_devtools-2.0.1}/dash_devtools.egg-info/entry_points.txt +0 -0
- {dash_devtools-1.0.0 → dash_devtools-2.0.1}/dash_devtools.egg-info/top_level.txt +0 -0
- {dash_devtools-1.0.0 → dash_devtools-2.0.1}/setup.cfg +0 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025-2026 SeiKai Kyo
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: dash-devtools
|
|
3
|
-
Version:
|
|
3
|
+
Version: 2.0.1
|
|
4
4
|
Summary: 大許開發工具集 DashAI DevTools - 驗證、遷移、文件產生工具
|
|
5
|
-
Author
|
|
5
|
+
Author: DashAI
|
|
6
6
|
License: MIT
|
|
7
7
|
Project-URL: Homepage, https://github.com/seikaikyo/dash-devtools
|
|
8
8
|
Project-URL: Repository, https://github.com/seikaikyo/dash-devtools
|
|
@@ -16,6 +16,7 @@ Classifier: Programming Language :: Python :: 3.11
|
|
|
16
16
|
Classifier: Programming Language :: Python :: 3.12
|
|
17
17
|
Requires-Python: >=3.9
|
|
18
18
|
Description-Content-Type: text/markdown
|
|
19
|
+
License-File: LICENSE
|
|
19
20
|
Requires-Dist: click>=8.0
|
|
20
21
|
Requires-Dist: rich>=13.0
|
|
21
22
|
Requires-Dist: pyyaml>=6.0
|
|
@@ -35,10 +36,23 @@ Provides-Extra: report
|
|
|
35
36
|
Requires-Dist: python-docx>=1.1.0; extra == "report"
|
|
36
37
|
Requires-Dist: matplotlib>=3.8.0; extra == "report"
|
|
37
38
|
Requires-Dist: pillow>=10.0; extra == "report"
|
|
39
|
+
Provides-Extra: analyze
|
|
40
|
+
Requires-Dist: deptry>=0.22; extra == "analyze"
|
|
41
|
+
Requires-Dist: pip-audit>=2.7; extra == "analyze"
|
|
42
|
+
Requires-Dist: vulture>=2.11; extra == "analyze"
|
|
43
|
+
Requires-Dist: radon>=6.0; extra == "analyze"
|
|
44
|
+
Requires-Dist: pip-licenses>=5.0; extra == "analyze"
|
|
45
|
+
Requires-Dist: liccheck>=0.9; extra == "analyze"
|
|
46
|
+
Requires-Dist: dotenv-linter>=0.7; extra == "analyze"
|
|
47
|
+
Provides-Extra: api-test
|
|
48
|
+
Requires-Dist: schemathesis>=3.36; extra == "api-test"
|
|
49
|
+
Provides-Extra: git-analytics
|
|
50
|
+
Requires-Dist: gitchangelog>=3.0; extra == "git-analytics"
|
|
38
51
|
Provides-Extra: all
|
|
39
|
-
Requires-Dist: dash-devtools[ai,dev,report,vision]; extra == "all"
|
|
52
|
+
Requires-Dist: dash-devtools[ai,analyze,api-test,dev,git-analytics,report,vision]; extra == "all"
|
|
53
|
+
Dynamic: license-file
|
|
40
54
|
|
|
41
|
-
# DashAI DevTools v2.
|
|
55
|
+
# DashAI DevTools v2.1
|
|
42
56
|
|
|
43
57
|
[](https://opensource.org/licenses/MIT)
|
|
44
58
|
[](https://www.python.org/downloads/)
|
|
@@ -235,8 +249,10 @@ npm install -D prisma-dbml-generator
|
|
|
235
249
|
|
|
236
250
|
- 檔案行數限制 (500 行)
|
|
237
251
|
- 命名規範 (kebab-case)
|
|
238
|
-
- 禁止 Emoji (
|
|
252
|
+
- 禁止 Emoji (程式碼和 commit message)
|
|
239
253
|
- 禁止簡體字
|
|
254
|
+
- 禁止中國用語 (56 組詞彙,如「視頻→影片」「內存→記憶體」)
|
|
255
|
+
- AI 寫作痕跡偵測 (「值得注意的是」「至關重要」等)
|
|
240
256
|
|
|
241
257
|
## v2.0 新功能
|
|
242
258
|
|
|
@@ -544,30 +560,29 @@ dash doctor
|
|
|
544
560
|
|
|
545
561
|
顯示:系統資訊、Python 路徑、套件版本、環境變數
|
|
546
562
|
|
|
547
|
-
## Git Hooks
|
|
563
|
+
## Git Hooks (Pre-push v3)
|
|
548
564
|
|
|
549
|
-
|
|
565
|
+
全域 pre-push hook,所有專案推送前自動檢查:
|
|
550
566
|
|
|
551
567
|
```bash
|
|
552
|
-
#
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
568
|
+
# 安裝全域 hook
|
|
569
|
+
git config --global core.hooksPath ~/.config/git/hooks
|
|
570
|
+
cp scripts/pre-push ~/.config/git/hooks/pre-push
|
|
571
|
+
chmod +x ~/.config/git/hooks/pre-push
|
|
572
|
+
```
|
|
557
573
|
|
|
558
|
-
|
|
559
|
-
dash hooks install . --e2e https://your-app.vercel.app
|
|
574
|
+
Push 前自動執行(依專案類型動態調整步驟數):
|
|
560
575
|
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
576
|
+
| 步驟 | 前端 | 後端 | 說明 |
|
|
577
|
+
|------|:----:|:----:|------|
|
|
578
|
+
| Emoji 掃描 | v | v | 只掃 git diff 變更檔 + commit message |
|
|
579
|
+
| commit message 格式 | v | v | 禁止 Emoji,建議 `類型: 描述` 格式 |
|
|
580
|
+
| 機敏資料掃描 | v | v | GitGuardian 或本地規則 |
|
|
581
|
+
| TypeScript 建構 | v | - | vue-tsc / ng build / tsc(自動偵測) |
|
|
582
|
+
| Python Ruff lint | - | v | check + format 檢查 |
|
|
583
|
+
| 專案驗證 | v | v | dash validate(簡體字、AI 痕跡、品質) |
|
|
564
584
|
|
|
565
|
-
|
|
566
|
-
1. 檢查 Emoji
|
|
567
|
-
2. 掃描機敏資料 (GitGuardian 或本地規則)
|
|
568
|
-
3. 驗證專案規範
|
|
569
|
-
4. 執行測試 (vitest/jest/pytest)
|
|
570
|
-
5. E2E 煙霧測試 (如有設定)
|
|
585
|
+
錯誤阻擋推送,警告放行但顯示提示。每步驟附計時。
|
|
571
586
|
|
|
572
587
|
## 模板
|
|
573
588
|
|
|
@@ -789,24 +804,6 @@ cat file | claude -p "問題" # 管道輸入
|
|
|
789
804
|
|
|
790
805
|
---
|
|
791
806
|
|
|
792
|
-
## 專案清單
|
|
793
|
-
|
|
794
|
-
| 專案 | 類型 | 說明 |
|
|
795
|
-
|------|------|------|
|
|
796
|
-
| MES 製造執行 | Angular + PrimeNG | 再生廠製造執行系統 |
|
|
797
|
-
| SSO 管理後台 | Vite + Shoelace | 用戶與權限管理 |
|
|
798
|
-
| EAP 設備自動化 | Vite + Shoelace | 設備自動化平台 |
|
|
799
|
-
| VAC 承攬商門禁 | Vite + Shoelace | 承攬商門禁管理系統 |
|
|
800
|
-
| RFID 追蹤 | Vite + Shoelace | RFID 標籤追蹤系統 |
|
|
801
|
-
| MCS 物料控制 | Vite + Shoelace | 物料控制系統 |
|
|
802
|
-
| MIDS 材料追蹤 | Vite + Shoelace | 材料識別與追蹤系統 |
|
|
803
|
-
| GHG 碳排管理 | Vite + Shoelace | 溫室氣體排放管理系統 |
|
|
804
|
-
| BPM 簽核流程 | Vite + Shoelace | 簽核流程管理系統 |
|
|
805
|
-
| RMS 配方管理 | Vite + Shoelace | 配方管理系統 |
|
|
806
|
-
| 8D 問題管理 | Vite + Shoelace | 8D 問題解決流程管理 |
|
|
807
|
-
| Vision AI | Python | AI 影像辨識系統 |
|
|
808
|
-
| API Center | Vite + Shoelace | API 管理中心與開發文件 |
|
|
809
|
-
|
|
810
807
|
## 開發
|
|
811
808
|
|
|
812
809
|
```bash
|
|
@@ -829,6 +826,61 @@ black .
|
|
|
829
826
|
- **[Google Gemini](https://ai.google.dev/)** - AI 視覺分析引擎
|
|
830
827
|
- **[Rich](https://github.com/Textualize/rich)** - 終端 UI 美化
|
|
831
828
|
|
|
829
|
+
## 更新歷程
|
|
830
|
+
|
|
831
|
+
### v2.0.0 (2026-05-20)
|
|
832
|
+
|
|
833
|
+
發布至 PyPI,自此 README 歷程與套件版本號統一。彙整 v2.2 (2026-03-15) 之後至 2026-05-17 的改動。
|
|
834
|
+
|
|
835
|
+
- **語意層驗證器**: 新增 4 個語意層驗證器 (Next.js SEO 與安全標頭、i18n key 一致性、a11y),警告顯示細節
|
|
836
|
+
- **Logto 認證 pattern 驗證**: 認 Logto / Clerk 與通用共 6 種 pattern,public proxy 以 @public-proxy 註解標示
|
|
837
|
+
- **Flat OpenSpec adapter**: 扁平 OpenSpec 自動跳過 orphan check (specs 以 [[ref]] opt-in)
|
|
838
|
+
- **禁用概念掃描**: 自動攔截已移除概念 (傍通曆、五行、暦注、六害宿等)
|
|
839
|
+
- **架構文件完整性**: 新增 dash architecture check/diff 指令,pre-push 步驟 5 架構檢查
|
|
840
|
+
- **開源工具整合**: 整合 9 個開源工具,health 評分精準化
|
|
841
|
+
- **品質與安全修復**: a11y 精準度提升 (排除有文字或 sr-only 的按鈕)、regex 收斂並跳過 test 目錄降低假陽性、knowledge_ JSON 檔加入 allowlist、ggshield stdin pipe 修正、新增 verify 指令
|
|
842
|
+
|
|
843
|
+
### v2.2 (2026-03-15)
|
|
844
|
+
|
|
845
|
+
- **大型檔案拆分**: 消除所有超過 500 行的檔案警告
|
|
846
|
+
- cli.py 1528 → 62 行,拆為 `commands/` 目錄 (10 個模組)
|
|
847
|
+
- test_suite.py 690 → 393 行,抽出 `test_runners/` (4 個 runner)
|
|
848
|
+
- word_report.py 689 → 485 行,抽出 `reporters/templates` + `charts`
|
|
849
|
+
- report.py 667 → 453 行,抽出 `reporters/report_data` + `screenshot`
|
|
850
|
+
- quality.py 510 → 429 行,詞庫常數抽為 `constants.py`
|
|
851
|
+
- browser.py 541 → 354 行,便捷函數抽至 `browser_helpers.py`
|
|
852
|
+
- **品質修復**: 中國用語修正、.gitignore 補齊 node_modules
|
|
853
|
+
- **dash validate 達成 0 錯誤 0 警告**
|
|
854
|
+
|
|
855
|
+
### v2.1 (2026-03-14)
|
|
856
|
+
|
|
857
|
+
- **Pre-push Hook v3**: 合併全域版與專案版,動態步驟數
|
|
858
|
+
- 新增 TypeScript 建構檢查 (vue-tsc / ng build / tsc)
|
|
859
|
+
- 新增 commit message 格式檢查(禁止 Emoji)
|
|
860
|
+
- Emoji 掃描改用 git diff(只查變更檔,速度提升)
|
|
861
|
+
- 新增 Python Ruff lint (check + format)
|
|
862
|
+
- 錯誤/警告分級,每步驟計時
|
|
863
|
+
- **品質檢查擴充**
|
|
864
|
+
- 新增中國用語禁用詞 (56 組,來源: pjchender/cn2tw4programmer)
|
|
865
|
+
- 新增 AI 寫作痕跡偵測 (check_ai_slop)
|
|
866
|
+
|
|
867
|
+
### v2.0 (2026-02)
|
|
868
|
+
|
|
869
|
+
- OpenSpec 規格驅動開發 (SDD)
|
|
870
|
+
- 專案健康評分
|
|
871
|
+
- 程式碼統計儀表板
|
|
872
|
+
- 四大測試套件 (UIT/Smoke/E2E/UAT)
|
|
873
|
+
- AI 視覺分析 (Gemini)
|
|
874
|
+
- UptimeRobot 監控管理
|
|
875
|
+
|
|
876
|
+
### v1.0 (2026-01)
|
|
877
|
+
|
|
878
|
+
- 專案驗證 (dash validate)
|
|
879
|
+
- 機敏資料掃描 (dash scan)
|
|
880
|
+
- E2E 煙霧測試 (agent-browser)
|
|
881
|
+
- 資料庫遷移管理 (Alembic)
|
|
882
|
+
- dbdiagram.io 圖表產生
|
|
883
|
+
|
|
832
884
|
## 授權
|
|
833
885
|
|
|
834
886
|
MIT License - DashAI
|
|
@@ -1,44 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
Name: dash-devtools
|
|
3
|
-
Version: 1.0.0
|
|
4
|
-
Summary: 大許開發工具集 DashAI DevTools - 驗證、遷移、文件產生工具
|
|
5
|
-
Author-email: DashAI <dev@dashai.dev>
|
|
6
|
-
License: MIT
|
|
7
|
-
Project-URL: Homepage, https://github.com/seikaikyo/dash-devtools
|
|
8
|
-
Project-URL: Repository, https://github.com/seikaikyo/dash-devtools
|
|
9
|
-
Classifier: Development Status :: 4 - Beta
|
|
10
|
-
Classifier: Intended Audience :: Developers
|
|
11
|
-
Classifier: License :: OSI Approved :: MIT License
|
|
12
|
-
Classifier: Programming Language :: Python :: 3
|
|
13
|
-
Classifier: Programming Language :: Python :: 3.9
|
|
14
|
-
Classifier: Programming Language :: Python :: 3.10
|
|
15
|
-
Classifier: Programming Language :: Python :: 3.11
|
|
16
|
-
Classifier: Programming Language :: Python :: 3.12
|
|
17
|
-
Requires-Python: >=3.9
|
|
18
|
-
Description-Content-Type: text/markdown
|
|
19
|
-
Requires-Dist: click>=8.0
|
|
20
|
-
Requires-Dist: rich>=13.0
|
|
21
|
-
Requires-Dist: pyyaml>=6.0
|
|
22
|
-
Requires-Dist: jinja2>=3.0
|
|
23
|
-
Provides-Extra: dev
|
|
24
|
-
Requires-Dist: pytest>=7.0; extra == "dev"
|
|
25
|
-
Requires-Dist: black>=23.0; extra == "dev"
|
|
26
|
-
Requires-Dist: ruff>=0.1; extra == "dev"
|
|
27
|
-
Provides-Extra: vision
|
|
28
|
-
Requires-Dist: opencv-python>=4.8; extra == "vision"
|
|
29
|
-
Requires-Dist: pillow>=10.0; extra == "vision"
|
|
30
|
-
Requires-Dist: numpy>=1.24; extra == "vision"
|
|
31
|
-
Provides-Extra: ai
|
|
32
|
-
Requires-Dist: google-genai>=1.0.0; extra == "ai"
|
|
33
|
-
Requires-Dist: python-dotenv>=1.0.0; extra == "ai"
|
|
34
|
-
Provides-Extra: report
|
|
35
|
-
Requires-Dist: python-docx>=1.1.0; extra == "report"
|
|
36
|
-
Requires-Dist: matplotlib>=3.8.0; extra == "report"
|
|
37
|
-
Requires-Dist: pillow>=10.0; extra == "report"
|
|
38
|
-
Provides-Extra: all
|
|
39
|
-
Requires-Dist: dash-devtools[ai,dev,report,vision]; extra == "all"
|
|
40
|
-
|
|
41
|
-
# DashAI DevTools v2.0
|
|
1
|
+
# DashAI DevTools v2.1
|
|
42
2
|
|
|
43
3
|
[](https://opensource.org/licenses/MIT)
|
|
44
4
|
[](https://www.python.org/downloads/)
|
|
@@ -235,8 +195,10 @@ npm install -D prisma-dbml-generator
|
|
|
235
195
|
|
|
236
196
|
- 檔案行數限制 (500 行)
|
|
237
197
|
- 命名規範 (kebab-case)
|
|
238
|
-
- 禁止 Emoji (
|
|
198
|
+
- 禁止 Emoji (程式碼和 commit message)
|
|
239
199
|
- 禁止簡體字
|
|
200
|
+
- 禁止中國用語 (56 組詞彙,如「視頻→影片」「內存→記憶體」)
|
|
201
|
+
- AI 寫作痕跡偵測 (「值得注意的是」「至關重要」等)
|
|
240
202
|
|
|
241
203
|
## v2.0 新功能
|
|
242
204
|
|
|
@@ -544,30 +506,29 @@ dash doctor
|
|
|
544
506
|
|
|
545
507
|
顯示:系統資訊、Python 路徑、套件版本、環境變數
|
|
546
508
|
|
|
547
|
-
## Git Hooks
|
|
509
|
+
## Git Hooks (Pre-push v3)
|
|
548
510
|
|
|
549
|
-
|
|
511
|
+
全域 pre-push hook,所有專案推送前自動檢查:
|
|
550
512
|
|
|
551
513
|
```bash
|
|
552
|
-
#
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
514
|
+
# 安裝全域 hook
|
|
515
|
+
git config --global core.hooksPath ~/.config/git/hooks
|
|
516
|
+
cp scripts/pre-push ~/.config/git/hooks/pre-push
|
|
517
|
+
chmod +x ~/.config/git/hooks/pre-push
|
|
518
|
+
```
|
|
557
519
|
|
|
558
|
-
|
|
559
|
-
dash hooks install . --e2e https://your-app.vercel.app
|
|
520
|
+
Push 前自動執行(依專案類型動態調整步驟數):
|
|
560
521
|
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
522
|
+
| 步驟 | 前端 | 後端 | 說明 |
|
|
523
|
+
|------|:----:|:----:|------|
|
|
524
|
+
| Emoji 掃描 | v | v | 只掃 git diff 變更檔 + commit message |
|
|
525
|
+
| commit message 格式 | v | v | 禁止 Emoji,建議 `類型: 描述` 格式 |
|
|
526
|
+
| 機敏資料掃描 | v | v | GitGuardian 或本地規則 |
|
|
527
|
+
| TypeScript 建構 | v | - | vue-tsc / ng build / tsc(自動偵測) |
|
|
528
|
+
| Python Ruff lint | - | v | check + format 檢查 |
|
|
529
|
+
| 專案驗證 | v | v | dash validate(簡體字、AI 痕跡、品質) |
|
|
564
530
|
|
|
565
|
-
|
|
566
|
-
1. 檢查 Emoji
|
|
567
|
-
2. 掃描機敏資料 (GitGuardian 或本地規則)
|
|
568
|
-
3. 驗證專案規範
|
|
569
|
-
4. 執行測試 (vitest/jest/pytest)
|
|
570
|
-
5. E2E 煙霧測試 (如有設定)
|
|
531
|
+
錯誤阻擋推送,警告放行但顯示提示。每步驟附計時。
|
|
571
532
|
|
|
572
533
|
## 模板
|
|
573
534
|
|
|
@@ -789,24 +750,6 @@ cat file | claude -p "問題" # 管道輸入
|
|
|
789
750
|
|
|
790
751
|
---
|
|
791
752
|
|
|
792
|
-
## 專案清單
|
|
793
|
-
|
|
794
|
-
| 專案 | 類型 | 說明 |
|
|
795
|
-
|------|------|------|
|
|
796
|
-
| MES 製造執行 | Angular + PrimeNG | 再生廠製造執行系統 |
|
|
797
|
-
| SSO 管理後台 | Vite + Shoelace | 用戶與權限管理 |
|
|
798
|
-
| EAP 設備自動化 | Vite + Shoelace | 設備自動化平台 |
|
|
799
|
-
| VAC 承攬商門禁 | Vite + Shoelace | 承攬商門禁管理系統 |
|
|
800
|
-
| RFID 追蹤 | Vite + Shoelace | RFID 標籤追蹤系統 |
|
|
801
|
-
| MCS 物料控制 | Vite + Shoelace | 物料控制系統 |
|
|
802
|
-
| MIDS 材料追蹤 | Vite + Shoelace | 材料識別與追蹤系統 |
|
|
803
|
-
| GHG 碳排管理 | Vite + Shoelace | 溫室氣體排放管理系統 |
|
|
804
|
-
| BPM 簽核流程 | Vite + Shoelace | 簽核流程管理系統 |
|
|
805
|
-
| RMS 配方管理 | Vite + Shoelace | 配方管理系統 |
|
|
806
|
-
| 8D 問題管理 | Vite + Shoelace | 8D 問題解決流程管理 |
|
|
807
|
-
| Vision AI | Python | AI 影像辨識系統 |
|
|
808
|
-
| API Center | Vite + Shoelace | API 管理中心與開發文件 |
|
|
809
|
-
|
|
810
753
|
## 開發
|
|
811
754
|
|
|
812
755
|
```bash
|
|
@@ -829,6 +772,61 @@ black .
|
|
|
829
772
|
- **[Google Gemini](https://ai.google.dev/)** - AI 視覺分析引擎
|
|
830
773
|
- **[Rich](https://github.com/Textualize/rich)** - 終端 UI 美化
|
|
831
774
|
|
|
775
|
+
## 更新歷程
|
|
776
|
+
|
|
777
|
+
### v2.0.0 (2026-05-20)
|
|
778
|
+
|
|
779
|
+
發布至 PyPI,自此 README 歷程與套件版本號統一。彙整 v2.2 (2026-03-15) 之後至 2026-05-17 的改動。
|
|
780
|
+
|
|
781
|
+
- **語意層驗證器**: 新增 4 個語意層驗證器 (Next.js SEO 與安全標頭、i18n key 一致性、a11y),警告顯示細節
|
|
782
|
+
- **Logto 認證 pattern 驗證**: 認 Logto / Clerk 與通用共 6 種 pattern,public proxy 以 @public-proxy 註解標示
|
|
783
|
+
- **Flat OpenSpec adapter**: 扁平 OpenSpec 自動跳過 orphan check (specs 以 [[ref]] opt-in)
|
|
784
|
+
- **禁用概念掃描**: 自動攔截已移除概念 (傍通曆、五行、暦注、六害宿等)
|
|
785
|
+
- **架構文件完整性**: 新增 dash architecture check/diff 指令,pre-push 步驟 5 架構檢查
|
|
786
|
+
- **開源工具整合**: 整合 9 個開源工具,health 評分精準化
|
|
787
|
+
- **品質與安全修復**: a11y 精準度提升 (排除有文字或 sr-only 的按鈕)、regex 收斂並跳過 test 目錄降低假陽性、knowledge_ JSON 檔加入 allowlist、ggshield stdin pipe 修正、新增 verify 指令
|
|
788
|
+
|
|
789
|
+
### v2.2 (2026-03-15)
|
|
790
|
+
|
|
791
|
+
- **大型檔案拆分**: 消除所有超過 500 行的檔案警告
|
|
792
|
+
- cli.py 1528 → 62 行,拆為 `commands/` 目錄 (10 個模組)
|
|
793
|
+
- test_suite.py 690 → 393 行,抽出 `test_runners/` (4 個 runner)
|
|
794
|
+
- word_report.py 689 → 485 行,抽出 `reporters/templates` + `charts`
|
|
795
|
+
- report.py 667 → 453 行,抽出 `reporters/report_data` + `screenshot`
|
|
796
|
+
- quality.py 510 → 429 行,詞庫常數抽為 `constants.py`
|
|
797
|
+
- browser.py 541 → 354 行,便捷函數抽至 `browser_helpers.py`
|
|
798
|
+
- **品質修復**: 中國用語修正、.gitignore 補齊 node_modules
|
|
799
|
+
- **dash validate 達成 0 錯誤 0 警告**
|
|
800
|
+
|
|
801
|
+
### v2.1 (2026-03-14)
|
|
802
|
+
|
|
803
|
+
- **Pre-push Hook v3**: 合併全域版與專案版,動態步驟數
|
|
804
|
+
- 新增 TypeScript 建構檢查 (vue-tsc / ng build / tsc)
|
|
805
|
+
- 新增 commit message 格式檢查(禁止 Emoji)
|
|
806
|
+
- Emoji 掃描改用 git diff(只查變更檔,速度提升)
|
|
807
|
+
- 新增 Python Ruff lint (check + format)
|
|
808
|
+
- 錯誤/警告分級,每步驟計時
|
|
809
|
+
- **品質檢查擴充**
|
|
810
|
+
- 新增中國用語禁用詞 (56 組,來源: pjchender/cn2tw4programmer)
|
|
811
|
+
- 新增 AI 寫作痕跡偵測 (check_ai_slop)
|
|
812
|
+
|
|
813
|
+
### v2.0 (2026-02)
|
|
814
|
+
|
|
815
|
+
- OpenSpec 規格驅動開發 (SDD)
|
|
816
|
+
- 專案健康評分
|
|
817
|
+
- 程式碼統計儀表板
|
|
818
|
+
- 四大測試套件 (UIT/Smoke/E2E/UAT)
|
|
819
|
+
- AI 視覺分析 (Gemini)
|
|
820
|
+
- UptimeRobot 監控管理
|
|
821
|
+
|
|
822
|
+
### v1.0 (2026-01)
|
|
823
|
+
|
|
824
|
+
- 專案驗證 (dash validate)
|
|
825
|
+
- 機敏資料掃描 (dash scan)
|
|
826
|
+
- E2E 煙霧測試 (agent-browser)
|
|
827
|
+
- 資料庫遷移管理 (Alembic)
|
|
828
|
+
- dbdiagram.io 圖表產生
|
|
829
|
+
|
|
832
830
|
## 授權
|
|
833
831
|
|
|
834
832
|
MIT License - DashAI
|
|
@@ -109,7 +109,7 @@ class AgentBrowser:
|
|
|
109
109
|
return self._run(*args, timeout=timeout)
|
|
110
110
|
|
|
111
111
|
def back(self) -> BrowserResult:
|
|
112
|
-
"""
|
|
112
|
+
"""回到上一頁"""
|
|
113
113
|
return self._run('back')
|
|
114
114
|
|
|
115
115
|
def forward(self) -> BrowserResult:
|
|
@@ -350,192 +350,5 @@ class AgentBrowser:
|
|
|
350
350
|
return self._run('errors')
|
|
351
351
|
|
|
352
352
|
|
|
353
|
-
#
|
|
354
|
-
|
|
355
|
-
def quick_screenshot(url: str, output_path: str, wait_ms: int = 3000, mobile: bool = False) -> bool:
|
|
356
|
-
"""
|
|
357
|
-
快速截圖
|
|
358
|
-
|
|
359
|
-
Args:
|
|
360
|
-
url: 網址
|
|
361
|
-
output_path: 輸出路徑
|
|
362
|
-
wait_ms: 等待時間 (毫秒)
|
|
363
|
-
mobile: 是否使用手機版視窗
|
|
364
|
-
|
|
365
|
-
Returns:
|
|
366
|
-
是否成功
|
|
367
|
-
"""
|
|
368
|
-
browser = AgentBrowser()
|
|
369
|
-
try:
|
|
370
|
-
result = browser.open(url)
|
|
371
|
-
if not result.success:
|
|
372
|
-
return False
|
|
373
|
-
|
|
374
|
-
# 等待頁面載入
|
|
375
|
-
browser.wait(str(wait_ms))
|
|
376
|
-
|
|
377
|
-
# 截圖
|
|
378
|
-
result = browser.screenshot(output_path, full_page=True)
|
|
379
|
-
return result.success
|
|
380
|
-
|
|
381
|
-
finally:
|
|
382
|
-
browser.close()
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
def check_page_errors(url: str, timeout: int = 30) -> Dict:
|
|
386
|
-
"""
|
|
387
|
-
檢查頁面 JS 錯誤
|
|
388
|
-
|
|
389
|
-
Args:
|
|
390
|
-
url: 網址
|
|
391
|
-
timeout: 超時時間 (秒)
|
|
392
|
-
|
|
393
|
-
Returns:
|
|
394
|
-
{
|
|
395
|
-
'success': bool,
|
|
396
|
-
'url': str,
|
|
397
|
-
'title': str,
|
|
398
|
-
'errors': List[str],
|
|
399
|
-
'load_time': int
|
|
400
|
-
}
|
|
401
|
-
"""
|
|
402
|
-
import time
|
|
403
|
-
browser = AgentBrowser()
|
|
404
|
-
result = {
|
|
405
|
-
'success': True,
|
|
406
|
-
'url': url,
|
|
407
|
-
'title': '',
|
|
408
|
-
'errors': [],
|
|
409
|
-
'load_time': 0
|
|
410
|
-
}
|
|
411
|
-
|
|
412
|
-
try:
|
|
413
|
-
start = time.time()
|
|
414
|
-
open_result = browser.open(url, timeout=timeout)
|
|
415
|
-
result['load_time'] = int((time.time() - start) * 1000)
|
|
416
|
-
|
|
417
|
-
if not open_result.success:
|
|
418
|
-
result['success'] = False
|
|
419
|
-
result['errors'].append(open_result.error or "頁面載入失敗")
|
|
420
|
-
return result
|
|
421
|
-
|
|
422
|
-
# 等待 JS 執行
|
|
423
|
-
browser.wait('2000')
|
|
424
|
-
|
|
425
|
-
# 取得標題
|
|
426
|
-
result['title'] = browser.get_title()
|
|
427
|
-
|
|
428
|
-
# 取得錯誤
|
|
429
|
-
errors_result = browser.errors()
|
|
430
|
-
if errors_result.output:
|
|
431
|
-
# 解析錯誤訊息
|
|
432
|
-
error_lines = [
|
|
433
|
-
line.strip()
|
|
434
|
-
for line in errors_result.output.split('\n')
|
|
435
|
-
if line.strip() and 'favicon' not in line.lower()
|
|
436
|
-
]
|
|
437
|
-
result['errors'] = error_lines
|
|
438
|
-
|
|
439
|
-
result['success'] = len(result['errors']) == 0
|
|
440
|
-
|
|
441
|
-
except Exception as e:
|
|
442
|
-
result['success'] = False
|
|
443
|
-
result['errors'].append(str(e))
|
|
444
|
-
|
|
445
|
-
finally:
|
|
446
|
-
browser.close()
|
|
447
|
-
|
|
448
|
-
return result
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
def fill_form(url: str, fields: Dict[str, str], submit_ref: Optional[str] = None) -> BrowserResult:
|
|
452
|
-
"""
|
|
453
|
-
填寫表單
|
|
454
|
-
|
|
455
|
-
Args:
|
|
456
|
-
url: 網址
|
|
457
|
-
fields: {ref: value} 對應
|
|
458
|
-
submit_ref: 送出按鈕 ref (可選)
|
|
459
|
-
|
|
460
|
-
Returns:
|
|
461
|
-
操作結果
|
|
462
|
-
"""
|
|
463
|
-
browser = AgentBrowser()
|
|
464
|
-
try:
|
|
465
|
-
result = browser.open(url)
|
|
466
|
-
if not result.success:
|
|
467
|
-
return result
|
|
468
|
-
|
|
469
|
-
browser.wait('2000')
|
|
470
|
-
|
|
471
|
-
# 填寫欄位
|
|
472
|
-
for ref, value in fields.items():
|
|
473
|
-
result = browser.fill(ref, value)
|
|
474
|
-
if not result.success:
|
|
475
|
-
return result
|
|
476
|
-
|
|
477
|
-
# 送出表單
|
|
478
|
-
if submit_ref:
|
|
479
|
-
result = browser.click(submit_ref)
|
|
480
|
-
browser.wait_load('networkidle')
|
|
481
|
-
|
|
482
|
-
return BrowserResult(success=True, output="表單填寫完成")
|
|
483
|
-
|
|
484
|
-
finally:
|
|
485
|
-
browser.close()
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
def login_and_save_state(
|
|
489
|
-
login_url: str,
|
|
490
|
-
username_ref: str,
|
|
491
|
-
password_ref: str,
|
|
492
|
-
submit_ref: str,
|
|
493
|
-
username: str,
|
|
494
|
-
password: str,
|
|
495
|
-
state_file: str,
|
|
496
|
-
success_url_pattern: Optional[str] = None
|
|
497
|
-
) -> BrowserResult:
|
|
498
|
-
"""
|
|
499
|
-
登入並儲存狀態
|
|
500
|
-
|
|
501
|
-
Args:
|
|
502
|
-
login_url: 登入頁面網址
|
|
503
|
-
username_ref: 帳號輸入框 ref
|
|
504
|
-
password_ref: 密碼輸入框 ref
|
|
505
|
-
submit_ref: 登入按鈕 ref
|
|
506
|
-
username: 帳號
|
|
507
|
-
password: 密碼
|
|
508
|
-
state_file: 狀態儲存檔案
|
|
509
|
-
success_url_pattern: 登入成功後的網址 pattern
|
|
510
|
-
|
|
511
|
-
Returns:
|
|
512
|
-
操作結果
|
|
513
|
-
"""
|
|
514
|
-
browser = AgentBrowser()
|
|
515
|
-
try:
|
|
516
|
-
result = browser.open(login_url)
|
|
517
|
-
if not result.success:
|
|
518
|
-
return result
|
|
519
|
-
|
|
520
|
-
browser.wait('2000')
|
|
521
|
-
|
|
522
|
-
# 填寫登入資訊
|
|
523
|
-
browser.fill(username_ref, username)
|
|
524
|
-
browser.fill(password_ref, password)
|
|
525
|
-
browser.click(submit_ref)
|
|
526
|
-
|
|
527
|
-
# 等待登入完成
|
|
528
|
-
if success_url_pattern:
|
|
529
|
-
browser.wait_url(success_url_pattern, timeout=30)
|
|
530
|
-
else:
|
|
531
|
-
browser.wait_load('networkidle')
|
|
532
|
-
|
|
533
|
-
# 儲存狀態
|
|
534
|
-
result = browser.state_save(state_file)
|
|
535
|
-
if result.success:
|
|
536
|
-
return BrowserResult(success=True, output=f"登入成功,狀態已儲存至 {state_file}")
|
|
537
|
-
else:
|
|
538
|
-
return result
|
|
539
|
-
|
|
540
|
-
finally:
|
|
541
|
-
browser.close()
|
|
353
|
+
# 便捷函數 re-export(向下相容)
|
|
354
|
+
from .browser_helpers import quick_screenshot, check_page_errors, fill_form, login_and_save_state # noqa: E402, F401
|