kn-cli 1.0.64 → 1.0.65

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.
Files changed (129) hide show
  1. package/package.json +2 -1
  2. package/readme.md +3 -0
  3. package/src/create.js +2 -0
  4. package/templates/template_oa/public/src/components/IFrame/index.jsx +3 -0
  5. package/templates/template_oa/webpack.api.js +7 -3
  6. package/templates/template_oa_jwt/.gitignore +6 -0
  7. package/templates/template_oa_jwt/build.sh +7 -0
  8. package/templates/template_oa_jwt/cli.config.js +30 -0
  9. package/templates/template_oa_jwt/dev.sh +89 -0
  10. package/templates/template_oa_jwt/frontend_build.sh +88 -0
  11. package/templates/template_oa_jwt/init/prepare-commit-msg +5 -0
  12. package/templates/template_oa_jwt/init.sh +33 -0
  13. package/templates/template_oa_jwt/jsconfig.json +10 -0
  14. package/templates/template_oa_jwt/package.json +25 -0
  15. package/templates/template_oa_jwt/public/404.html +26 -0
  16. package/templates/template_oa_jwt/public/favicon.ico +0 -0
  17. package/templates/template_oa_jwt/public/index.html +44 -0
  18. package/templates/template_oa_jwt/public/src/_antd.less +216 -0
  19. package/templates/template_oa_jwt/public/src/_reset.less +134 -0
  20. package/templates/template_oa_jwt/public/src/_variable.less +84 -0
  21. package/templates/template_oa_jwt/public/src/assets/iconfont/iconfont.eot +0 -0
  22. package/templates/template_oa_jwt/public/src/assets/iconfont/iconfont.less +57 -0
  23. package/templates/template_oa_jwt/public/src/assets/iconfont/iconfont.svg +36 -0
  24. package/templates/template_oa_jwt/public/src/assets/iconfont/iconfont.ttf +0 -0
  25. package/templates/template_oa_jwt/public/src/assets/iconfont/iconfont.woff +0 -0
  26. package/templates/template_oa_jwt/public/src/assets/iconfont/iconfont.woff2 +0 -0
  27. package/templates/template_oa_jwt/public/src/assets/images/NY-pop-bg.png +0 -0
  28. package/templates/template_oa_jwt/public/src/assets/images/avatar.png +0 -0
  29. package/templates/template_oa_jwt/public/src/assets/images/loading.svg +40 -0
  30. package/templates/template_oa_jwt/public/src/components/Alert/index.jsx +0 -0
  31. package/templates/template_oa_jwt/public/src/components/Alert/index.less +0 -0
  32. package/templates/template_oa_jwt/public/src/components/Auth/index.jsx +44 -0
  33. package/templates/template_oa_jwt/public/src/components/Dialog/index.jsx +150 -0
  34. package/templates/template_oa_jwt/public/src/components/Dialog/index.less +123 -0
  35. package/templates/template_oa_jwt/public/src/components/Empty/index.jsx +23 -0
  36. package/templates/template_oa_jwt/public/src/components/Empty/index.less +6 -0
  37. package/templates/template_oa_jwt/public/src/components/Footer/index.jsx +17 -0
  38. package/templates/template_oa_jwt/public/src/components/Footer/index.less +28 -0
  39. package/templates/template_oa_jwt/public/src/components/FormRow/index.jsx +39 -0
  40. package/templates/template_oa_jwt/public/src/components/FormRow/index.less +67 -0
  41. package/templates/template_oa_jwt/public/src/components/FormTable/index.jsx +137 -0
  42. package/templates/template_oa_jwt/public/src/components/FormTable/index.less +18 -0
  43. package/templates/template_oa_jwt/public/src/components/IFrame/index.jsx +44 -0
  44. package/templates/template_oa_jwt/public/src/components/IFrame/index.less +4 -0
  45. package/templates/template_oa_jwt/public/src/components/IconFont/index.jsx +10 -0
  46. package/templates/template_oa_jwt/public/src/components/IconFont/index.less +5 -0
  47. package/templates/template_oa_jwt/public/src/components/Layout/Basic/index.jsx +52 -0
  48. package/templates/template_oa_jwt/public/src/components/Layout/Basic/index.less +82 -0
  49. package/templates/template_oa_jwt/public/src/components/Layout/CenterBody/index.jsx +15 -0
  50. package/templates/template_oa_jwt/public/src/components/Layout/CenterBody/index.less +36 -0
  51. package/templates/template_oa_jwt/public/src/components/Layout/FormBlock/index.jsx +23 -0
  52. package/templates/template_oa_jwt/public/src/components/Layout/FormBlock/index.less +37 -0
  53. package/templates/template_oa_jwt/public/src/components/Layout/Provider/index.jsx +12 -0
  54. package/templates/template_oa_jwt/public/src/components/Layout/index.jsx +27 -0
  55. package/templates/template_oa_jwt/public/src/components/Layout/index.less +8 -0
  56. package/templates/template_oa_jwt/public/src/components/Link/index.jsx +24 -0
  57. package/templates/template_oa_jwt/public/src/components/Link/index.less +11 -0
  58. package/templates/template_oa_jwt/public/src/components/Loading/index.jsx +16 -0
  59. package/templates/template_oa_jwt/public/src/components/Loading/index.less +96 -0
  60. package/templates/template_oa_jwt/public/src/components/Nav/index.jsx +184 -0
  61. package/templates/template_oa_jwt/public/src/components/Nav/index.less +38 -0
  62. package/templates/template_oa_jwt/public/src/components/Page/PageLoading/index.jsx +30 -0
  63. package/templates/template_oa_jwt/public/src/components/Page/PageLoading/index.less +29 -0
  64. package/templates/template_oa_jwt/public/src/components/Popup/index.jsx +22 -0
  65. package/templates/template_oa_jwt/public/src/components/Popup/index.less +18 -0
  66. package/templates/template_oa_jwt/public/src/components/Select/DepSelect/index.jsx +47 -0
  67. package/templates/template_oa_jwt/public/src/components/Select/StaffSelect/index.jsx +97 -0
  68. package/templates/template_oa_jwt/public/src/components/Select/StaffSelect/index.less +24 -0
  69. package/templates/template_oa_jwt/public/src/components/Toast/index.jsx +60 -0
  70. package/templates/template_oa_jwt/public/src/components/Toast/index.less +43 -0
  71. package/templates/template_oa_jwt/public/src/components/Upload/index.jsx +358 -0
  72. package/templates/template_oa_jwt/public/src/components/title/index.jsx +12 -0
  73. package/templates/template_oa_jwt/public/src/components/title/index.less +21 -0
  74. package/templates/template_oa_jwt/public/src/dictionary/index.js +20 -0
  75. package/templates/template_oa_jwt/public/src/hooks/index.jsx +21 -0
  76. package/templates/template_oa_jwt/public/src/hooks/useDelay.jsx +29 -0
  77. package/templates/template_oa_jwt/public/src/hooks/useImageLoader.jsx +27 -0
  78. package/templates/template_oa_jwt/public/src/hooks/useLoading.jsx +42 -0
  79. package/templates/template_oa_jwt/public/src/hooks/useLogin.jsx +33 -0
  80. package/templates/template_oa_jwt/public/src/hooks/usePreload.jsx +66 -0
  81. package/templates/template_oa_jwt/public/src/hooks/useScrollTop.jsx +32 -0
  82. package/templates/template_oa_jwt/public/src/hooks/useSearch.jsx +137 -0
  83. package/templates/template_oa_jwt/public/src/hooks/useUpdate.jsx +11 -0
  84. package/templates/template_oa_jwt/public/src/index.jsx +50 -0
  85. package/templates/template_oa_jwt/public/src/mock/common.js +484 -0
  86. package/templates/template_oa_jwt/public/src/mock/index.js +63 -0
  87. package/templates/template_oa_jwt/public/src/mock/user.js +70 -0
  88. package/templates/template_oa_jwt/public/src/mock/utils.js +33 -0
  89. package/templates/template_oa_jwt/public/src/pages/components/pageTitle/index.jsx +13 -0
  90. package/templates/template_oa_jwt/public/src/pages/components/pageTitle/index.less +20 -0
  91. package/templates/template_oa_jwt/public/src/pages/components/totalRecord/index.jsx +21 -0
  92. package/templates/template_oa_jwt/public/src/pages/components/totalRecord/index.less +16 -0
  93. package/templates/template_oa_jwt/public/src/pages/demo/detail/index.jsx +14 -0
  94. package/templates/template_oa_jwt/public/src/pages/demo/index.jsx +399 -0
  95. package/templates/template_oa_jwt/public/src/pages/demo/index.less +15 -0
  96. package/templates/template_oa_jwt/public/src/pages/login/index.jsx +29 -0
  97. package/templates/template_oa_jwt/public/src/pages/login/index.less +44 -0
  98. package/templates/template_oa_jwt/public/src/pages/redirect/index.jsx +31 -0
  99. package/templates/template_oa_jwt/public/src/provider/app.jsx +66 -0
  100. package/templates/template_oa_jwt/public/src/route.jsx +45 -0
  101. package/templates/template_oa_jwt/public/src/services/common.js +133 -0
  102. package/templates/template_oa_jwt/public/src/services/demo.js +41 -0
  103. package/templates/template_oa_jwt/public/src/services/index.js +266 -0
  104. package/templates/template_oa_jwt/public/src/services/token.js +132 -0
  105. package/templates/template_oa_jwt/public/src/utils/index.js +115 -0
  106. package/templates/template_oa_jwt/public/static/about.html +1 -0
  107. package/templates/template_oa_jwt/public/static/kssoLogin.html +22 -0
  108. package/templates/template_oa_jwt/public/static/noAuth.html +217 -0
  109. package/templates/template_oa_jwt/public/static/noAuth.png +0 -0
  110. package/templates/template_oa_jwt/readme.md +71 -0
  111. package/templates/template_oa_jwt/report.sh +68 -0
  112. package/templates/template_oa_jwt/tools/iconfont/gulpfile.js +70 -0
  113. package/templates/template_oa_jwt/tools/iconfont/package.json +20 -0
  114. package/templates/template_oa_jwt/tools/iconfont/run.sh +39 -0
  115. package/templates/template_oa_jwt/tools/iconfont/svg/arrowBack.svg +1 -0
  116. package/templates/template_oa_jwt/tools/iconfont/svg/check.svg +1 -0
  117. package/templates/template_oa_jwt/tools/iconfont/svg/close.svg +1 -0
  118. package/templates/template_oa_jwt/tools/iconfont/svg/down.svg +1 -0
  119. package/templates/template_oa_jwt/tools/iconfont/svg/image.svg +1 -0
  120. package/templates/template_oa_jwt/tools/iconfont/svg/play.svg +1 -0
  121. package/templates/template_oa_jwt/tools/iconfont/svg/refresh.svg +1 -0
  122. package/templates/template_oa_jwt/tools/iconfont/svg/warn.svg +1 -0
  123. package/templates/template_oa_jwt/tools/iconfont/templates/_icons.css +26 -0
  124. package/templates/template_oa_jwt/tools/iconfont/templates/_icons.less +29 -0
  125. package/templates/template_oa_jwt/tools/iconfont/templates/index.html +56 -0
  126. package/templates/template_oa_jwt/tools/tinypng/package.json +11 -0
  127. package/templates/template_oa_jwt/tools/tinypng/run.sh +15 -0
  128. package/templates/template_oa_jwt/versionPublish.sh +27 -0
  129. package/templates/template_oa_jwt/webpack.api.js +61 -0
@@ -0,0 +1,27 @@
1
+
2
+ checkResult(){
3
+ ret=$?
4
+ if [ $ret != 0 ]
5
+ then
6
+ echo "[$1]执行失败"
7
+ exit 2
8
+ return 0
9
+ else
10
+ echo "[$1]执行成功"
11
+ return 0
12
+ fi
13
+ }
14
+
15
+ # version=$(grep -m1 '"version":' package.json | awk -F'"' '{print $4}')
16
+ # checkResult "获取当前版本号"
17
+
18
+ read -p "版本发布备注:" message
19
+ npm version patch -m "[%s]version publish:$message"
20
+ checkResult "版本号升级"
21
+ git push
22
+ checkResult "git push"
23
+
24
+ git push origin --tags
25
+ checkResult "git push tags"
26
+
27
+ echo "版本Tag标记完毕"
@@ -0,0 +1,61 @@
1
+ const configs = {
2
+ // 本地研发环境(npm start)
3
+ localdebug: {
4
+ API_HOST: '/api',
5
+ KSSO_HOST: '/oAuth',
6
+ OA_HOST: '/oaApi',
7
+ OA_MENU_HOST:'//192.168.90.250:8020/oa-menu/?mock=1',
8
+ OA_KSSO_HOST:'http://192.168.90.250:8886/ksso/auto_redirect',
9
+ },
10
+ // cicd构建时研发环境
11
+ dev: {
12
+ API_HOST: 'http://192.168.90.250:8540/api/v1',
13
+ KSSO_HOST: 'http://192.168.90.250:8540',
14
+ OA_HOST: 'http://192.168.90.250:8886',
15
+ OA_MENU_HOST:'//192.168.90.250:8020/oa-menu/',
16
+ OA_KSSO_HOST:'http://192.168.90.250:8886/ksso/auto_redirect',
17
+ },
18
+ // cicd构建时生产环境
19
+ prod: {
20
+ API_HOST: '//case-api.kingnet.com/api/v1',
21
+ KSSO_HOST: '//case-api.kingnet.com',
22
+ OA_HOST: 'https://oa.kingnet.com',
23
+ OA_MENU_HOST:'//micro-front.kingnet.com/oa-menu/',
24
+ OA_KSSO_HOST:'https://oa.kingnet.com/ksso/auto_redirect',
25
+ },
26
+ };
27
+
28
+ const API_PROXY= {
29
+ '/api/**': {
30
+ target: 'http://192.168.90.250:8540/api/v1/',
31
+ changeOrigin: true,
32
+ logLevel: 'debug',
33
+ pathRewrite: {
34
+ '^/api': '/', // rewrite path
35
+ },
36
+ },
37
+ '/oAuth/**': {
38
+ target: 'http://192.168.90.250:8540/',
39
+ changeOrigin: true,
40
+ logLevel: 'debug',
41
+ pathRewrite: {
42
+ '^/oAuth': '/', // rewrite path
43
+ },
44
+ },
45
+ '/oaApi/**': {
46
+ target: 'http://192.168.90.250:8886/',
47
+ changeOrigin: true,
48
+ logLevel: 'debug',
49
+ pathRewrite: {
50
+ '^/oaApi': '/', // rewrite path
51
+ },
52
+ },
53
+ };
54
+
55
+ const env = process.env.build_env||'localdebug';
56
+
57
+
58
+ module.exports = {
59
+ API_HOSTS:configs[env],
60
+ API_PROXY
61
+ };