npmapps 1.0.25 → 1.0.27
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/PUBLISH.md +268 -0
- package/app/.codegraph/daemon.pid +6 -0
- package/app/.eslintrc.js +19 -0
- package/app/README.md +24 -0
- package/app/babel.config.js +5 -0
- package/app/devtool-windows-amd64.zip +0 -0
- package/app/docs/superpowers/plans/2026-05-29-quill-editor.md +836 -0
- package/app/docs/superpowers/specs/2026-05-29-quill-editor-design.md +210 -0
- package/app/docs/superpowers/specs/2026-06-06-lazy-cascader-design.md +400 -0
- package/app/jsconfig.json +19 -0
- package/app/package-lock.json +21347 -0
- package/app/package.json +63 -0
- package/app/postcss.config.js +10 -0
- package/app/public/favicon.ico +0 -0
- package/app/public/index.html +17 -0
- package/app/public//344/270/200/351/224/256/351/273/221/346/232/227.html +136 -0
- package/app/src/App.vue +110 -0
- package/app/src/assets/bpmn-camunda.jpg +0 -0
- package/app/src/assets/css/diagram.less +17 -0
- package/app/src/assets/icon/Icon.less +31 -0
- package/app/src/assets/icon/font/app-codes.css +26 -0
- package/app/src/assets/icon/font/app.eot +0 -0
- package/app/src/assets/icon/font/app.svg +60 -0
- package/app/src/assets/icon/font/app.ttf +0 -0
- package/app/src/assets/icon/font/app.woff +0 -0
- package/app/src/assets/icon/font/app.woff2 +0 -0
- package/app/src/assets/icon/font/config.json +248 -0
- package/app/src/assets/icon/font/source/raw/align-bottom-tool.svg +30 -0
- package/app/src/assets/icon/font/source/raw/align-horizontal-center-tool.svg +85 -0
- package/app/src/assets/icon/font/source/raw/align-left-tool.svg +84 -0
- package/app/src/assets/icon/font/source/raw/align-right-tool.svg +80 -0
- package/app/src/assets/icon/font/source/raw/align-top-tool.svg +84 -0
- package/app/src/assets/icon/font/source/raw/align-vertical-center-tool.svg +89 -0
- package/app/src/assets/icon/font/source/raw/distribute-horizontally-tool.svg +95 -0
- package/app/src/assets/icon/font/source/raw/distribute-vertically-tool.svg +99 -0
- package/app/src/assets/icon/font/source/raw/set-color-tool.svg +111 -0
- package/app/src/assets/icon/font/source/symbols/align-bottom-tool.svg +30 -0
- package/app/src/assets/icon/font/source/symbols/align-horizontal-center-tool.svg +30 -0
- package/app/src/assets/icon/font/source/symbols/align-left-tool.svg +30 -0
- package/app/src/assets/icon/font/source/symbols/align-right-tool.svg +30 -0
- package/app/src/assets/icon/font/source/symbols/align-top-tool.svg +30 -0
- package/app/src/assets/icon/font/source/symbols/align-vertical-center-tool.svg +30 -0
- package/app/src/assets/icon/font/source/symbols/distribute-horizontally-tool.svg +30 -0
- package/app/src/assets/icon/font/source/symbols/distribute-vertically-tool.svg +30 -0
- package/app/src/assets/icon/font/source/symbols/set-color-tool.svg +63 -0
- package/app/src/assets/logo.png +0 -0
- package/app/src/components/EllTable/README.md +70 -0
- package/app/src/components/EllTable/article.md +184 -0
- package/app/src/components/EllTable/index.js +213 -0
- package/app/src/components/FormulaEditor/FunctionSelector.vue +123 -0
- package/app/src/components/FormulaEditor/OperatorSelector.vue +184 -0
- package/app/src/components/FormulaEditor/ParameterSelector.vue +123 -0
- package/app/src/components/FormulaEditor/api.js +69 -0
- package/app/src/components/FormulaEditor/index.vue +435 -0
- package/app/src/components/HelloWorld.vue +58 -0
- package/app/src/components/PageHeader/index.vue +158 -0
- package/app/src/components/Splitter/README.md +144 -0
- package/app/src/components/Splitter/example.vue +88 -0
- package/app/src/components/Splitter/index.vue +203 -0
- package/app/src/components/diagram/ToolBar.vue +357 -0
- package/app/src/components/diagram/customTranslate/customTranslate.js +12 -0
- package/app/src/components/diagram/customTranslate/translationsGerman.js +241 -0
- package/app/src/components/diagram/index.vue +261 -0
- package/app/src/components/diagram/xmlData.js +29 -0
- package/app/src/directives/filldown.js +155 -0
- package/app/src/directives/filldownTable.js +291 -0
- package/app/src/main.js +40 -0
- package/app/src/router/index.js +63 -0
- package/app/src/store/index.js +23 -0
- package/app/src/utils/winBox.js +23 -0
- package/app/src/views/Extend/A.vue +12 -0
- package/app/src/views/Extend/B.vue +10 -0
- package/app/src/views/Extend/MagicalComponentsForELFormItem.vue +87 -0
- package/app/src/views/Extend/index.vue +59 -0
- package/app/src/views/Extend/tableMouseHorizontalWheel.vue +193 -0
- package/app/src/views/Home.vue +37 -0
- package/app/src/views/RouterJump.vue +155 -0
- package/app/src/views/css.vue +57 -0
- package/app/src/views/cssComponents/EllipsisText.vue +83 -0
- package/app/src/views/cssComponents/HoverCard.vue +79 -0
- package/app/src/views/cssComponents/TableHover.vue +140 -0
- package/app/src/views/cssComponents/inputSlo.vue +52 -0
- package/app/src/views/cssComponents/tableFixed.vue +158 -0
- package/app/src/views/echarts/echart-dome.vue +82 -0
- package/app/src/views/echarts/index.vue +118 -0
- package/app/src/views/echarts/pei3d.vue +667 -0
- package/app/src/views/element/bpmn/index.vue +18 -0
- package/app/src/views/element/components/attendanceCycle/index.vue +131 -0
- package/app/src/views/element/components/attendanceGroup/index.vue +147 -0
- package/app/src/views/element/components/attendancePersonnel/index.vue +158 -0
- package/app/src/views/element/components/companyCalendar/index.vue +147 -0
- package/app/src/views/element/components/shift/index.vue +147 -0
- package/app/src/views/element/components/shiftRotationSystem/index.vue +147 -0
- package/app/src/views/element/elTableJsx/columnManagement.vue +340 -0
- package/app/src/views/element/elTableJsx/dialogInput.vue +71 -0
- package/app/src/views/element/elTableJsx/elTableJsx.vue +1826 -0
- package/app/src/views/element/elTableJsx/formTable.vue +598 -0
- package/app/src/views/element/elTableJsx/index.vue +29 -0
- package/app/src/views/element/elTableJsx/simpleTable.vue +192 -0
- package/app/src/views/element/elTableJsx.zip +0 -0
- package/app/src/views/element/index.vue +44 -0
- package/app/src/views/element/lazyCascader/LazyCascader.vue +302 -0
- package/app/src/views/element/lazyCascader/data.js +205 -0
- package/app/src/views/element/lazyCascader/index.vue +315 -0
- package/app/src/views/element/quillEditor/README.md +163 -0
- package/app/src/views/element/quillEditor/example.vue +314 -0
- package/app/src/views/element/quillEditor/index.vue +409 -0
- package/app/src/views/element/quillEditor/toolbar.js +122 -0
- package/app/vue.config.js +15 -0
- package/package.json +1 -1
- package/app/wujie-vue3-child/.claude/settings.local.json +0 -8
- package/app/wujie-vue3-child/.vscode/extensions.json +0 -3
- package/app/wujie-vue3-child/PROJECT_MEMORY.md +0 -427
- package/app/wujie-vue3-child/README.md +0 -5
- package/app/wujie-vue3-child/index.html +0 -13
- package/app/wujie-vue3-child/package-lock.json +0 -5744
- package/app/wujie-vue3-child/package.json +0 -28
- package/app/wujie-vue3-child/public/vite.svg +0 -1
- package/app/wujie-vue3-child/src/App.vue +0 -130
- package/app/wujie-vue3-child/src/assets/vue.svg +0 -1
- package/app/wujie-vue3-child/src/components/HelloWorld.vue +0 -43
- package/app/wujie-vue3-child/src/components/SmartAnchorTabs/index.jsx +0 -224
- package/app/wujie-vue3-child/src/components/SmartAnchorTabs/style.css +0 -154
- package/app/wujie-vue3-child/src/components/tags-view.vue +0 -193
- package/app/wujie-vue3-child/src/components/tags-view1.vue +0 -131
- package/app/wujie-vue3-child/src/directives/aiLoading.js +0 -182
- package/app/wujie-vue3-child/src/hooks/useClickOutside.js +0 -11
- package/app/wujie-vue3-child/src/hooks/useTableDragSort.js +0 -28
- package/app/wujie-vue3-child/src/main.js +0 -18
- package/app/wujie-vue3-child/src/router/index.js +0 -104
- package/app/wujie-vue3-child/src/store/tagsViewStroe.js +0 -34
- package/app/wujie-vue3-child/src/style.css +0 -171
- package/app/wujie-vue3-child/src/views/aiCoach/collapseExpand/index.jsx +0 -108
- package/app/wujie-vue3-child/src/views/aiCoach/collapseExpand/index.module.scss +0 -97
- package/app/wujie-vue3-child/src/views/aiCoach/departmentPersonnel/README.md +0 -836
- package/app/wujie-vue3-child/src/views/aiCoach/departmentPersonnel/REFLEX_EXAMPLES.md +0 -728
- package/app/wujie-vue3-child/src/views/aiCoach/departmentPersonnel/components/DepartmentPersonnelSelector.jsx +0 -687
- package/app/wujie-vue3-child/src/views/aiCoach/departmentPersonnel/components/DepartmentPersonnelSelector.module.scss +0 -560
- package/app/wujie-vue3-child/src/views/aiCoach/departmentPersonnel/components/DepartmentSelector.jsx +0 -570
- package/app/wujie-vue3-child/src/views/aiCoach/departmentPersonnel/components/DepartmentSelector.module.scss +0 -330
- package/app/wujie-vue3-child/src/views/aiCoach/departmentPersonnel/components/DepartmentSelectorV2.jsx +0 -378
- package/app/wujie-vue3-child/src/views/aiCoach/departmentPersonnel/components/DepartmentSelectorV2.module.scss +0 -228
- package/app/wujie-vue3-child/src/views/aiCoach/departmentPersonnel/components/OptionsSelector.jsx +0 -399
- package/app/wujie-vue3-child/src/views/aiCoach/departmentPersonnel/components/OptionsSelector.module.scss +0 -252
- package/app/wujie-vue3-child/src/views/aiCoach/departmentPersonnel/components/PersonnelSelector.jsx +0 -585
- package/app/wujie-vue3-child/src/views/aiCoach/departmentPersonnel/components/PersonnelSelector.module.scss +0 -331
- package/app/wujie-vue3-child/src/views/aiCoach/departmentPersonnel/components/PopoverSelector.jsx +0 -392
- package/app/wujie-vue3-child/src/views/aiCoach/departmentPersonnel/components/PopoverSelector.module.scss +0 -39
- package/app/wujie-vue3-child/src/views/aiCoach/departmentPersonnel/components/README.md +0 -248
- package/app/wujie-vue3-child/src/views/aiCoach/departmentPersonnel/components/SelectorTrigger.jsx +0 -194
- package/app/wujie-vue3-child/src/views/aiCoach/departmentPersonnel/index.jsx +0 -1459
- package/app/wujie-vue3-child/src/views/aiCoach/departmentPersonnel/mockData.js +0 -301
- package/app/wujie-vue3-child/src/views/aiCoach/dialogueSegment/index.jsx +0 -182
- package/app/wujie-vue3-child/src/views/aiCoach/dialogueSegment/index.module.scss +0 -28
- package/app/wujie-vue3-child/src/views/aiCoach/index.jsx +0 -375
- package/app/wujie-vue3-child/src/views/aiCoach/practiceStatus/components/ChartsPanel/index.jsx +0 -121
- package/app/wujie-vue3-child/src/views/aiCoach/practiceStatus/components/ChartsPanel/index.module.scss +0 -76
- package/app/wujie-vue3-child/src/views/aiCoach/practiceStatus/components/DonutChart/index.jsx +0 -104
- package/app/wujie-vue3-child/src/views/aiCoach/practiceStatus/components/PracticeTable/index.jsx +0 -75
- package/app/wujie-vue3-child/src/views/aiCoach/practiceStatus/components/PracticeTable/index.module.scss +0 -12
- package/app/wujie-vue3-child/src/views/aiCoach/practiceStatus/components/RankBarChart/index.jsx +0 -62
- package/app/wujie-vue3-child/src/views/aiCoach/practiceStatus/components/RankBarChart/index.module.scss +0 -43
- package/app/wujie-vue3-child/src/views/aiCoach/practiceStatus/components/RankingGroup/index.jsx +0 -29
- package/app/wujie-vue3-child/src/views/aiCoach/practiceStatus/components/RankingGroup/index.module.scss +0 -5
- package/app/wujie-vue3-child/src/views/aiCoach/practiceStatus/components/RankingList/index.jsx +0 -58
- package/app/wujie-vue3-child/src/views/aiCoach/practiceStatus/components/RankingList/index.module.scss +0 -85
- package/app/wujie-vue3-child/src/views/aiCoach/practiceStatus/components/ScriptStatsPanel/index.jsx +0 -92
- package/app/wujie-vue3-child/src/views/aiCoach/practiceStatus/components/ScriptStatsPanel/index.module.scss +0 -56
- package/app/wujie-vue3-child/src/views/aiCoach/practiceStatus/components/StatCardsRow/index.jsx +0 -40
- package/app/wujie-vue3-child/src/views/aiCoach/practiceStatus/components/StatCardsRow/index.module.scss +0 -53
- package/app/wujie-vue3-child/src/views/aiCoach/practiceStatus/components/echarts/EchartsDonut.jsx +0 -106
- package/app/wujie-vue3-child/src/views/aiCoach/practiceStatus/components/echarts/EchartsRankBar.jsx +0 -132
- package/app/wujie-vue3-child/src/views/aiCoach/practiceStatus/index.jsx +0 -176
- package/app/wujie-vue3-child/src/views/aiCoach/practiceStatus/index.module.scss +0 -96
- package/app/wujie-vue3-child/src/views/aiCoach/reportDetail/components/CoachReport/index.jsx +0 -162
- package/app/wujie-vue3-child/src/views/aiCoach/reportDetail/components/CoachReport/index.module.scss +0 -16
- package/app/wujie-vue3-child/src/views/aiCoach/reportDetail/components/ComprehensiveEvaluation/index.jsx +0 -29
- package/app/wujie-vue3-child/src/views/aiCoach/reportDetail/components/ComprehensiveEvaluation/index.module.scss +0 -25
- package/app/wujie-vue3-child/src/views/aiCoach/reportDetail/components/DialogueBubble/index.jsx +0 -106
- package/app/wujie-vue3-child/src/views/aiCoach/reportDetail/components/DialogueBubble/index.module.scss +0 -164
- package/app/wujie-vue3-child/src/views/aiCoach/reportDetail/components/DialogueRecord/index.jsx +0 -182
- package/app/wujie-vue3-child/src/views/aiCoach/reportDetail/components/DialogueRecord/index.module.scss +0 -203
- package/app/wujie-vue3-child/src/views/aiCoach/reportDetail/components/DimensionDetail/index.jsx +0 -145
- package/app/wujie-vue3-child/src/views/aiCoach/reportDetail/components/DimensionDetail/index.module.scss +0 -126
- package/app/wujie-vue3-child/src/views/aiCoach/reportDetail/components/DimensionScores/index.jsx +0 -67
- package/app/wujie-vue3-child/src/views/aiCoach/reportDetail/components/DimensionScores/index.module.scss +0 -105
- package/app/wujie-vue3-child/src/views/aiCoach/reportDetail/components/ReportHeader/index.jsx +0 -81
- package/app/wujie-vue3-child/src/views/aiCoach/reportDetail/components/ReportHeader/index.module.scss +0 -47
- package/app/wujie-vue3-child/src/views/aiCoach/reportDetail/components/RoleInfo/index.jsx +0 -64
- package/app/wujie-vue3-child/src/views/aiCoach/reportDetail/components/RoleInfo/index.module.scss +0 -85
- package/app/wujie-vue3-child/src/views/aiCoach/reportDetail/components/ScoreBadge/index.jsx +0 -39
- package/app/wujie-vue3-child/src/views/aiCoach/reportDetail/components/ScoreBadge/index.module.scss +0 -44
- package/app/wujie-vue3-child/src/views/aiCoach/reportDetail/components/SubDimensionItem/index.jsx +0 -83
- package/app/wujie-vue3-child/src/views/aiCoach/reportDetail/components/SubDimensionItem/index.module.scss +0 -101
- package/app/wujie-vue3-child/src/views/aiCoach/reportDetail/index.jsx +0 -50
- package/app/wujie-vue3-child/src/views/aiCoach/reportDetail/index.module.scss +0 -25
- package/app/wujie-vue3-child/src/views/aiCoach/scriptTable/index.jsx +0 -196
- package/app/wujie-vue3-child/src/views/aiCoach/scriptTable/index.module.scss +0 -41
- package/app/wujie-vue3-child/src/views/aiCoach/scriptTable/inputColumn/index.jsx +0 -183
- package/app/wujie-vue3-child/src/views/aiCoach/scriptTable/inputColumn/index.module.scss +0 -115
- package/app/wujie-vue3-child/src/views/child-to-parent.vue +0 -117
- package/app/wujie-vue3-child/src/views/home.vue +0 -53
- package/app/wujie-vue3-child/src/views/jsx/btnSelect/btnSelect.vue +0 -169
- package/app/wujie-vue3-child/src/views/jsx/btnSelect/index.vue +0 -69
- package/app/wujie-vue3-child/src/views/jsx/com.vue +0 -44
- package/app/wujie-vue3-child/src/views/jsx/dialog.jsx +0 -66
- package/app/wujie-vue3-child/src/views/jsx/index.vue +0 -72
- package/app/wujie-vue3-child/src/views/jsx/props.vue +0 -33
- package/app/wujie-vue3-child/src/views/parent-to-child.vue +0 -225
- package/app/wujie-vue3-child/src/views/phone-code.vue +0 -318
- package/app/wujie-vue3-child/src/views/router-jump.vue +0 -123
- package/app/wujie-vue3-child/src/views/test.vue +0 -192
- package/app/wujie-vue3-child/vite.config.js +0 -15
package/PUBLISH.md
ADDED
|
@@ -0,0 +1,268 @@
|
|
|
1
|
+
# npmapps 发布流程
|
|
2
|
+
|
|
3
|
+
> 本机作为「内网文件分发 / 跨设备搬运」工具的 npm 发布会话。包名 `npmapps`,基于公网 npmjs.org。每次发布照本流程做,5-10 分钟跑完。
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## 0. 前置检查(30 秒)
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
cd /Users/wk/Documents/npmapps
|
|
11
|
+
cat package.json | grep -E '"(name|version)"'
|
|
12
|
+
npm config get registry
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
期望:
|
|
16
|
+
- `name: "npmapps"`
|
|
17
|
+
- `version: "1.0.<上次版本号>"`
|
|
18
|
+
- `registry: https://registry.npmjs.org/`
|
|
19
|
+
|
|
20
|
+
如果 `registry` 是内网,后面所有命令一致,只是发布目标不同。
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
## 1. 阶段 1:搬运源文件到 `app/`(2-5 分钟)
|
|
25
|
+
|
|
26
|
+
### 1.1 搬整个文件夹(过滤 `node_modules`)
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
# 源
|
|
30
|
+
SRC=/Users/wk/Documents/wk/web/wujie-wk/wujie-vue2-child
|
|
31
|
+
|
|
32
|
+
# 目标
|
|
33
|
+
DST=/Users/wk/Documents/npmapps/app
|
|
34
|
+
|
|
35
|
+
# 同步(过滤 node_modules)
|
|
36
|
+
rsync -a --exclude='node_modules' "$SRC/" "$DST/"
|
|
37
|
+
|
|
38
|
+
# 删除原目录(完成"移动"语义)
|
|
39
|
+
rm -rf "$SRC"
|
|
40
|
+
|
|
41
|
+
# 验证:确认没漏
|
|
42
|
+
du -sh "$DST"
|
|
43
|
+
find "$DST" -type d -name node_modules # 应该无输出
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
### 1.2 搬单个文件(zip / 压缩包 / 二进制)
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
mv /path/to/some.zip /Users/wk/Documents/npmapps/app/
|
|
50
|
+
|
|
51
|
+
# 验证
|
|
52
|
+
ls -la /Users/wk/Documents/npmapps/app/some.zip
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
### 1.3 验证 `app/` 状态
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
ls -la /Users/wk/Documents/npmapps/app
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
确认:
|
|
62
|
+
- ✅ `wujie-vue2-child/` 子目录在(整个 Vue2 子应用)
|
|
63
|
+
- ✅ `*.zip` 文件在
|
|
64
|
+
- ✅ 没有 `node_modules`
|
|
65
|
+
|
|
66
|
+
---
|
|
67
|
+
|
|
68
|
+
## 2. 阶段 2:更新版本号(10 秒)
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
# 推荐用 npm 内置命令(自动修改 package.json)
|
|
72
|
+
npm version patch # 1.0.25 → 1.0.26
|
|
73
|
+
# 其它选项:minor → 1.1.0,major → 2.0.0,具体版本号 → 1.0.27
|
|
74
|
+
|
|
75
|
+
# 或者手动改 package.json
|
|
76
|
+
# "version": "1.0.25" → "1.0.26"
|
|
77
|
+
|
|
78
|
+
# 验证
|
|
79
|
+
grep '"version"' package.json
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
> ⚠️ 注意:`npm version` 默认会 `git commit` + `git tag`。这个项目不是 git 仓库所以没事。如果以后初始化了 git,加 `--no-git-tag-version` 防止自动 commit。
|
|
83
|
+
|
|
84
|
+
---
|
|
85
|
+
|
|
86
|
+
## 3. 阶段 3:预览(20 秒,发布前最后一道检查)
|
|
87
|
+
|
|
88
|
+
```bash
|
|
89
|
+
npm pack --dry-run
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
期望输出:
|
|
93
|
+
```
|
|
94
|
+
npm notice name: npmapps
|
|
95
|
+
npm notice version: 1.0.26
|
|
96
|
+
npm notice total files: 109 (大概)
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
**重点检查**:
|
|
100
|
+
- ⚠️ 警告 `No .npmignore file found, using .gitignore` —— 这个项目外层没 `.gitignore`,npm 会读 `app/wujie-vue2-child/.gitignore`(嵌套目录的 gitignore npm 不读),所以 .codegraph、.DS_Store 之类的不会被自动排除
|
|
101
|
+
- ⚠️ 出现 `app/.codegraph/daemon.pid` —— 这是本地 codegraph 索引 daemon 运行时残留文件,会进包。按需决定:
|
|
102
|
+
- 想干净:加 `.npmignore`(见附录 A)
|
|
103
|
+
- 无所谓:照发,166B 不影响
|
|
104
|
+
|
|
105
|
+
---
|
|
106
|
+
|
|
107
|
+
## 4. 阶段 4:处理 2FA / token(最容易卡住的环节)
|
|
108
|
+
|
|
109
|
+
### 4.1 现状诊断
|
|
110
|
+
|
|
111
|
+
```bash
|
|
112
|
+
npm whoami # 应该返回 npm 用户名
|
|
113
|
+
npm profile get | grep "two-factor"
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
- `npm whoami` 返回用户名 ✅ token 有效
|
|
117
|
+
- `two-factor auth: auth-and-writes` ❌ publish 会被 2FA 拦
|
|
118
|
+
|
|
119
|
+
### 4.2 如果 `npm whoami` 401(token 失效)
|
|
120
|
+
|
|
121
|
+
在终端跑(交互式):
|
|
122
|
+
|
|
123
|
+
```
|
|
124
|
+
! npm login
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
走 web flow:浏览器打开,登录授权,完成后 npm 自动把 token 写到 `~/.npmrc`。
|
|
128
|
+
|
|
129
|
+
### 4.3 如果 publish 报 EOTP(2FA 拦下)
|
|
130
|
+
|
|
131
|
+
**最快路径 —— 生成 bypass 2FA 的 token**:
|
|
132
|
+
|
|
133
|
+
1. 浏览器打开 https://www.npmjs.com/settings/<用户名>/tokens
|
|
134
|
+
2. **Generate New Token** → 名字随便(例如 `local-publish`)
|
|
135
|
+
3. 类型选 **"Publish"**
|
|
136
|
+
4. **关键:勾上 "Bypass two-factor authentication"** ⚠️ 这步必须勾,否则 publish 仍要 OTP
|
|
137
|
+
5. 复制 token(`npm_xxxxxx...`)
|
|
138
|
+
6. 替换 `~/.npmrc`:
|
|
139
|
+
|
|
140
|
+
```bash
|
|
141
|
+
# 备份 + 替换
|
|
142
|
+
cp ~/.npmrc ~/.npmrc.bak
|
|
143
|
+
# 编辑 ~/.npmrc,把 _authToken 那行的 token 换成新复制的
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
或者直接跑(把新 token 替换成你拿到的):
|
|
147
|
+
|
|
148
|
+
```bash
|
|
149
|
+
TOKEN=npm_xxxxxxxx
|
|
150
|
+
sed -i '' "s|//registry.npmjs.org/:_authToken=.*|//registry.npmjs.org/:_authToken=$TOKEN|" ~/.npmrc
|
|
151
|
+
|
|
152
|
+
# 验证
|
|
153
|
+
npm whoami
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
### 4.4 替代方案:从账号层改 2FA 模式
|
|
157
|
+
|
|
158
|
+
如果不想用 bypass token:
|
|
159
|
+
1. 浏览器打开 https://www.npmjs.com/settings/<用户名>/security
|
|
160
|
+
2. Two-Factor Authentication 改成 **"Authorization only"** 或 **Disabled**
|
|
161
|
+
3. 保存(可能需要再输一次 OTP 或点邮件 magic link)
|
|
162
|
+
4. 回来重试 publish
|
|
163
|
+
|
|
164
|
+
---
|
|
165
|
+
|
|
166
|
+
## 5. 阶段 5:真正发布(10 秒)
|
|
167
|
+
|
|
168
|
+
```bash
|
|
169
|
+
cd /Users/wk/Documents/npmapps
|
|
170
|
+
npm publish
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
成功标志:
|
|
174
|
+
|
|
175
|
+
```
|
|
176
|
+
+ npmapps@1.0.26
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
失败标志:
|
|
180
|
+
- `EOTP`:回到阶段 4.3 换 bypass token
|
|
181
|
+
- `E404: PUT ... npmapps`:token 失效,回到阶段 4.2
|
|
182
|
+
- `ENEEDAUTH`:同上
|
|
183
|
+
- `You do not have permission`:包名在公网被占,需要换名
|
|
184
|
+
|
|
185
|
+
---
|
|
186
|
+
|
|
187
|
+
## 6. 阶段 6:验证(10 秒)
|
|
188
|
+
|
|
189
|
+
```bash
|
|
190
|
+
# 1. 查公网版本列表
|
|
191
|
+
npm view npmapps versions --json | tail -5
|
|
192
|
+
# 期望看到刚发的版本
|
|
193
|
+
|
|
194
|
+
# 2. 查发布时间戳
|
|
195
|
+
npm view npmapps time --json | grep "<新版本号>"
|
|
196
|
+
# 期望: "<新版本号>": "2026-..."
|
|
197
|
+
|
|
198
|
+
# 3. 查 tarball 信息
|
|
199
|
+
npm view npmapps dist
|
|
200
|
+
# 期望:tarball URL 指向新版本
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
---
|
|
204
|
+
|
|
205
|
+
## 7. 收尾(可选,2 分钟)
|
|
206
|
+
|
|
207
|
+
```bash
|
|
208
|
+
# 1. 清理 .npmrc 备份
|
|
209
|
+
rm -f ~/.npmrc.bak
|
|
210
|
+
|
|
211
|
+
# 2. 在 npm 网站 revoke 失效/过期的 token
|
|
212
|
+
# https://www.npmjs.com/settings/<用户名>/tokens
|
|
213
|
+
# 只保留当前 .npmrc 里的那个,其余全 revoke
|
|
214
|
+
|
|
215
|
+
# 3. 检查发布的 tarball 内容
|
|
216
|
+
npm pack
|
|
217
|
+
tar -tzf npmapps-<新版本号>.tgz | head -20
|
|
218
|
+
# 看到不应该出现的文件就清理后再发新版本
|
|
219
|
+
```
|
|
220
|
+
|
|
221
|
+
---
|
|
222
|
+
|
|
223
|
+
## 附录 A:加 `.npmignore` 让发布更干净(可选)
|
|
224
|
+
|
|
225
|
+
如果想排除 `.codegraph`、`.DS_Store`、`package-lock.json`、`dist/` 等:
|
|
226
|
+
|
|
227
|
+
```bash
|
|
228
|
+
cat > /Users/wk/Documents/npmapps/.npmignore <<'EOF'
|
|
229
|
+
.DS_Store
|
|
230
|
+
.codegraph
|
|
231
|
+
*.pid
|
|
232
|
+
node_modules
|
|
233
|
+
package-lock.json
|
|
234
|
+
dist
|
|
235
|
+
EOF
|
|
236
|
+
```
|
|
237
|
+
|
|
238
|
+
之后 `npm pack --dry-run` 会用这个文件,不再读 `.gitignore`。
|
|
239
|
+
|
|
240
|
+
---
|
|
241
|
+
|
|
242
|
+
## 附录 B:常用命令速查
|
|
243
|
+
|
|
244
|
+
| 目的 | 命令 |
|
|
245
|
+
|---|---|
|
|
246
|
+
| 查包是否被占 | `npm view <name> name version` |
|
|
247
|
+
| 查包全部元信息 | `npm view <name> --json` |
|
|
248
|
+
| 查自己是谁 | `npm whoami` |
|
|
249
|
+
| 查账号 2FA 模式 | `npm profile get` |
|
|
250
|
+
| 生成 tarball(不发布) | `npm pack` |
|
|
251
|
+
| 预览 tarball 内容 | `npm pack --dry-run` |
|
|
252
|
+
| 登录 | `npm login`(交互) |
|
|
253
|
+
| 登出 | `npm logout` |
|
|
254
|
+
| 撤销发布(24 小时内) | `npm unpublish <pkg>@<version>` ⚠️ 慎用 |
|
|
255
|
+
| deprecate 版本 | `npm deprecate <pkg>@<version> "msg"` |
|
|
256
|
+
|
|
257
|
+
---
|
|
258
|
+
|
|
259
|
+
## 附录 C:本次踩过的坑(避坑指南)
|
|
260
|
+
|
|
261
|
+
| 坑 | 原因 | 解法 |
|
|
262
|
+
|---|---|---|
|
|
263
|
+
| `npm whoami` 401 | `~/.npmrc` 里 token 失效 | `npm login` 重新登录 |
|
|
264
|
+
| publish E404 | 包名被占,token 无权覆盖 | 确认包归属 / 换名 / 用有 publish 权限的 token |
|
|
265
|
+
| publish EOTP | 账号 `auth-and-writes` 2FA 模式 | 生成 **bypass 2FA** 的 token,或网站改 2FA 模式 |
|
|
266
|
+
| tarball 里有 `.codegraph/` | 外层没 `.gitignore`/`.npmignore` | 加 `.npmignore`(附录 A),或接受 166B 的 daemon.pid 跟着发 |
|
|
267
|
+
| `npm version` 自动 commit | 项目变成 git 仓库后 | 加 `--no-git-tag-version` 标志 |
|
|
268
|
+
| `npmrc` 改了没生效 | 缓存 / 文件权限 | `cat ~/.npmrc` 确认;`chmod 600 ~/.npmrc` |
|
package/app/.eslintrc.js
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
root: true,
|
|
3
|
+
env: {
|
|
4
|
+
node: true,
|
|
5
|
+
es6: true
|
|
6
|
+
},
|
|
7
|
+
extends: [
|
|
8
|
+
'plugin:vue/essential',
|
|
9
|
+
'eslint:recommended'
|
|
10
|
+
],
|
|
11
|
+
parserOptions: {
|
|
12
|
+
parser: 'babel-eslint',
|
|
13
|
+
ecmaVersion: 2020,
|
|
14
|
+
sourceType: 'module'
|
|
15
|
+
},
|
|
16
|
+
rules: {
|
|
17
|
+
'vue/multi-word-component-names': 'off'
|
|
18
|
+
}
|
|
19
|
+
};
|
package/app/README.md
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# wujie-vue2-child
|
|
2
|
+
|
|
3
|
+
## Project setup
|
|
4
|
+
```
|
|
5
|
+
npm install
|
|
6
|
+
```
|
|
7
|
+
|
|
8
|
+
### Compiles and hot-reloads for development
|
|
9
|
+
```
|
|
10
|
+
npm run serve
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
### Compiles and minifies for production
|
|
14
|
+
```
|
|
15
|
+
npm run build
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
### Lints and fixes files
|
|
19
|
+
```
|
|
20
|
+
npm run lint
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
### Customize configuration
|
|
24
|
+
See [Configuration Reference](https://cli.vuejs.org/config/).
|
|
Binary file
|