address-client 3.2.104 → 3.2.105-shimen

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.
File without changes
Binary file
File without changes
@@ -1,185 +1,185 @@
1
- var express = require('express')
2
- var webpack = require('webpack')
3
- var config = require('./webpack.dev.conf')
4
- var proxyMiddleware = require('http-proxy-middleware')
5
- var httpProxy = require('http-proxy')
6
- var checkVersion = require('./versionCheck.js')
7
- checkVersion()
8
- var app = express()
9
- var compiler = webpack(config)
10
- var proxy = httpProxy.createProxyServer()
11
-
12
- // Define HTTP proxies to your custom API backend
13
- // https://github.com/chimurai/http-proxy-middleware
14
- var str = 'http://192.168.50.4:8400', str2= 'http://192.168.50.4:8400'
15
- var str3= 'http://192.168.50.4:8400'
16
- var proxyTable = {
17
- '/api/af-auth': {
18
- target: str
19
- },
20
- '/api/af-system': {
21
- target: str
22
- },
23
- '/api/af-revenue': {
24
- pathRewrite: {'/api/af-revenue': '/'},
25
- target: 'http://127.0.0.1:9026'
26
- },
27
- '/rs/entity': {
28
- target: str
29
- // secure:true,
30
- // changeOrigin:true
31
- // target: 'http://127.0.0.1:8080'
32
- },
33
- '/webapps':{
34
- target: str3,
35
- secure:true,
36
- changeOrigin:true
37
- // target: 'http://127.0.0.1:8080'
38
- },
39
- '/rs/logic/getLogin': {
40
- target: str3,
41
- secure:true,
42
- changeOrigin:true
43
- },
44
- '/rs/logic/getInitData': {
45
- target: str3,
46
- secure:true,
47
- changeOrigin:true,
48
- },
49
- '/rs/logic/getSaleInitData': {
50
- target: str3,
51
- secure:true,
52
- changeOrigin:true
53
- },
54
- // '/rs/logic':{
55
- // target: str3,
56
- // secure:true,
57
- // changeOrigin:true
58
- // // target: 'http://127.0.0.1:8080'
59
- // },
60
- '/rs/vue': {
61
- target: str3,
62
- secure:true,
63
- changeOrigin:true
64
- },
65
- '/rs/user': {
66
- target: str3,
67
- secure:true,
68
- changeOrigin:true
69
- },
70
- '/rs/db': {
71
- target: str3,
72
- secure:true,
73
- changeOrigin:true
74
- },
75
- '/rs/search': {
76
- target: str3,
77
- secure:true,
78
- changeOrigin:true
79
- // target: 'http://127.0.0.1:8080'
80
- },
81
- '/rs/data': {
82
- target: str3,
83
- secure:true,
84
- changeOrigin:true
85
- },
86
- '/rs/sql': {
87
- target: str
88
- // secure: true,
89
- // changeOrigin:true
90
- // target: 'http://127.0.0.1:8080'
91
- },
92
- '/rs/logic': {
93
- target: str
94
- // secure: true,
95
- // changeOrigin:true
96
- // target: 'http://127.0.0.1:8080'
97
- },
98
- '/rs': {
99
- // target: 'http://192.168.50.199:8300'
100
- target: str3,
101
- secure:true,
102
- changeOrigin:true
103
- }
104
- }
105
-
106
- var devMiddleware = require('webpack-dev-middleware')(compiler, {
107
- publicPath: config.output.publicPath,
108
- stats: {
109
- colors: true,
110
- chunks: false
111
- }
112
- })
113
-
114
- var hotMiddleware = require('webpack-hot-middleware')(compiler)
115
- // force page reload when html-webpack-plugin template changes
116
- compiler.plugin('compilation', function (compilation) {
117
- compilation.plugin('html-webpack-plugin-after-emit', function (data, cb) {
118
- hotMiddleware.publish({ action: 'reload' })
119
- cb()
120
- })
121
- })
122
-
123
- // proxy api requests
124
- Object.keys(proxyTable).forEach(function (context) {
125
- var options = proxyTable[context]
126
- if (typeof options === 'string') {
127
- options = { target: options }
128
- }
129
- app.use(proxyMiddleware(context, options))
130
- })
131
-
132
- // handle fallback for HTML5 history API
133
- app.use(require('connect-history-api-fallback')())
134
-
135
- // serve webpack bundle output
136
- app.use(devMiddleware)
137
-
138
- // enable hot-reload and state-preserving
139
- // compilation error display
140
- app.use(hotMiddleware)
141
-
142
- // serve pure static assets
143
- app.use('/static', express.static('./static'))
144
-
145
- // app.all('/rs/*', function (req, res) {
146
- // proxy.web(req, res, {
147
- // target: 'http://127.0.0.1:8081/reports'
148
- // })
149
- // })
150
-
151
- // app.all('/rs/*', function (req, res) {
152
- // proxy.web(req, res, {
153
- // target: 'http://127.0.0.1:8081/ldap'
154
- // })
155
- // })
156
- // app.all('/excel/*', function (req, res) {
157
- // proxy.web(req, res, {
158
- // target: 'http://127.0.0.1:8081/charge'
159
- // })
160
- // })
161
-
162
- // app.all('/rs/*', function (req, res) {
163
- // proxy.web(req, res, {
164
- // target: 'http://127.0.0.1:82/charge'
165
- // })
166
- // })
167
-
168
- // app.all('/*', function (req, res) {
169
- // proxy.web(req, res, {
170
- // target: 'http://127.0.0.1:82'
171
- // })
172
- // })
173
- // app.all('/rs/user', function (req, res) {
174
- // proxy.web(req, res, {
175
- // target: 'http://127.0.0.1:82'
176
- // })
177
- // })
178
-
179
- module.exports = app.listen(8085, function (err) {
180
- if (err) {
181
- console.log(err)
182
- return
183
- }
184
- console.log('Listening at http://localhost:8085')
185
- })
1
+ var express = require('express')
2
+ var webpack = require('webpack')
3
+ var config = require('./webpack.dev.conf')
4
+ var proxyMiddleware = require('http-proxy-middleware')
5
+ var httpProxy = require('http-proxy')
6
+ var checkVersion = require('./versionCheck.js')
7
+ checkVersion()
8
+ var app = express()
9
+ var compiler = webpack(config)
10
+ var proxy = httpProxy.createProxyServer()
11
+
12
+ // Define HTTP proxies to your custom API backend
13
+ // https://github.com/chimurai/http-proxy-middleware
14
+ var str = 'http://192.168.50.4:8400', str2= 'http://192.168.50.4:8400'
15
+ var str3= 'http://192.168.50.4:8400'
16
+ var proxyTable = {
17
+ '/api/af-auth': {
18
+ target: str
19
+ },
20
+ '/api/af-system': {
21
+ target: str
22
+ },
23
+ '/api/af-revenue': {
24
+ pathRewrite: {'/api/af-revenue': '/'},
25
+ target: 'http://127.0.0.1:9026'
26
+ },
27
+ '/rs/entity': {
28
+ target: str
29
+ // secure:true,
30
+ // changeOrigin:true
31
+ // target: 'http://127.0.0.1:8080'
32
+ },
33
+ '/webapps':{
34
+ target: str3,
35
+ secure:true,
36
+ changeOrigin:true
37
+ // target: 'http://127.0.0.1:8080'
38
+ },
39
+ '/rs/logic/getLogin': {
40
+ target: str3,
41
+ secure:true,
42
+ changeOrigin:true
43
+ },
44
+ '/rs/logic/getInitData': {
45
+ target: str3,
46
+ secure:true,
47
+ changeOrigin:true,
48
+ },
49
+ '/rs/logic/getSaleInitData': {
50
+ target: str3,
51
+ secure:true,
52
+ changeOrigin:true
53
+ },
54
+ // '/rs/logic':{
55
+ // target: str3,
56
+ // secure:true,
57
+ // changeOrigin:true
58
+ // // target: 'http://127.0.0.1:8080'
59
+ // },
60
+ '/rs/vue': {
61
+ target: str3,
62
+ secure:true,
63
+ changeOrigin:true
64
+ },
65
+ '/rs/user': {
66
+ target: str3,
67
+ secure:true,
68
+ changeOrigin:true
69
+ },
70
+ '/rs/db': {
71
+ target: str3,
72
+ secure:true,
73
+ changeOrigin:true
74
+ },
75
+ '/rs/search': {
76
+ target: str3,
77
+ secure:true,
78
+ changeOrigin:true
79
+ // target: 'http://127.0.0.1:8080'
80
+ },
81
+ '/rs/data': {
82
+ target: str3,
83
+ secure:true,
84
+ changeOrigin:true
85
+ },
86
+ '/rs/sql': {
87
+ target: str
88
+ // secure: true,
89
+ // changeOrigin:true
90
+ // target: 'http://127.0.0.1:8080'
91
+ },
92
+ '/rs/logic': {
93
+ target: str
94
+ // secure: true,
95
+ // changeOrigin:true
96
+ // target: 'http://127.0.0.1:8080'
97
+ },
98
+ '/rs': {
99
+ // target: 'http://192.168.50.199:8300'
100
+ target: str3,
101
+ secure:true,
102
+ changeOrigin:true
103
+ }
104
+ }
105
+
106
+ var devMiddleware = require('webpack-dev-middleware')(compiler, {
107
+ publicPath: config.output.publicPath,
108
+ stats: {
109
+ colors: true,
110
+ chunks: false
111
+ }
112
+ })
113
+
114
+ var hotMiddleware = require('webpack-hot-middleware')(compiler)
115
+ // force page reload when html-webpack-plugin template changes
116
+ compiler.plugin('compilation', function (compilation) {
117
+ compilation.plugin('html-webpack-plugin-after-emit', function (data, cb) {
118
+ hotMiddleware.publish({ action: 'reload' })
119
+ cb()
120
+ })
121
+ })
122
+
123
+ // proxy api requests
124
+ Object.keys(proxyTable).forEach(function (context) {
125
+ var options = proxyTable[context]
126
+ if (typeof options === 'string') {
127
+ options = { target: options }
128
+ }
129
+ app.use(proxyMiddleware(context, options))
130
+ })
131
+
132
+ // handle fallback for HTML5 history API
133
+ app.use(require('connect-history-api-fallback')())
134
+
135
+ // serve webpack bundle output
136
+ app.use(devMiddleware)
137
+
138
+ // enable hot-reload and state-preserving
139
+ // compilation error display
140
+ app.use(hotMiddleware)
141
+
142
+ // serve pure static assets
143
+ app.use('/static', express.static('./static'))
144
+
145
+ // app.all('/rs/*', function (req, res) {
146
+ // proxy.web(req, res, {
147
+ // target: 'http://127.0.0.1:8081/reports'
148
+ // })
149
+ // })
150
+
151
+ // app.all('/rs/*', function (req, res) {
152
+ // proxy.web(req, res, {
153
+ // target: 'http://127.0.0.1:8081/ldap'
154
+ // })
155
+ // })
156
+ // app.all('/excel/*', function (req, res) {
157
+ // proxy.web(req, res, {
158
+ // target: 'http://127.0.0.1:8081/charge'
159
+ // })
160
+ // })
161
+
162
+ // app.all('/rs/*', function (req, res) {
163
+ // proxy.web(req, res, {
164
+ // target: 'http://127.0.0.1:82/charge'
165
+ // })
166
+ // })
167
+
168
+ // app.all('/*', function (req, res) {
169
+ // proxy.web(req, res, {
170
+ // target: 'http://127.0.0.1:82'
171
+ // })
172
+ // })
173
+ // app.all('/rs/user', function (req, res) {
174
+ // proxy.web(req, res, {
175
+ // target: 'http://127.0.0.1:82'
176
+ // })
177
+ // })
178
+
179
+ module.exports = app.listen(8085, function (err) {
180
+ if (err) {
181
+ console.log(err)
182
+ return
183
+ }
184
+ console.log('Listening at http://localhost:8085')
185
+ })
@@ -1,31 +1,31 @@
1
- function isVersionGreaterThan (version1, version2) {
2
- const v1parts = version1.split('.')
3
- const v2parts = version2.split('.')
4
- let flag = false
5
- for (let i = 0; i < v1parts.length; ++i) {
6
- if (v1parts[i] > v2parts[i]) {
7
- flag = true
8
- break
9
- }
10
- }
11
-
12
- return flag
13
- }
14
-
15
- const pkg = require('../package.json')
16
- const checkVersion = () => {
17
- console.log('\x1b[48;5;88m\x1b[1m\x1b[37m%s\x1b[0m', '请注意:当前使用的 addressclient 版本, 会发送 api/af-revenue/sql ,api/af-revenue/logic 到v4 服务')
18
- const {devDependencies} = pkg
19
- if (devDependencies && devDependencies['system-clients']) {
20
- if (isVersionGreaterThan(devDependencies['system-clients'], '3.2.87')) {
21
- console.log('\x1b[48;5;88m\x1b[1m\x1b[37m%s\x1b[0m', '请注意:当前使用的 systemClients 版本不兼容旧版登录')
22
- console.log('\x1b[48;5;88m\x1b[1m\x1b[37m%s\x1b[0m', '登录是会发送 api/af-auth 请求')
23
- console.log('\x1b[48;5;88m\x1b[1m\x1b[37m%s\x1b[0m', '请转发到公司 v4 测试地址或者客户 v4 网关')
24
- console.log('\x1b[48;5;88m\x1b[1m\x1b[37m%s\x1b[0m', '如不使用新版登录,请降级 system-clients 版本到 3.2.87')
25
- console.log('\x1b[48;5;88m\x1b[1m\x1b[37m%s\x1b[0m', '请查看营收后台升级日志:' +
26
- 'http://aote-office.8866.org:31467/sale-doc-web/V4Product/%E8%90%A5%E6%94%B6%E5%90%8E%E5%8F%B0%E6%94%B9%E9%80%A0%E8%AF%B4%E6%98%8E')
27
- }
28
- }
29
- }
30
-
31
- module.exports = checkVersion
1
+ function isVersionGreaterThan (version1, version2) {
2
+ const v1parts = version1.split('.')
3
+ const v2parts = version2.split('.')
4
+ let flag = false
5
+ for (let i = 0; i < v1parts.length; ++i) {
6
+ if (v1parts[i] > v2parts[i]) {
7
+ flag = true
8
+ break
9
+ }
10
+ }
11
+
12
+ return flag
13
+ }
14
+
15
+ const pkg = require('../package.json')
16
+ const checkVersion = () => {
17
+ console.log('\x1b[48;5;88m\x1b[1m\x1b[37m%s\x1b[0m', '请注意:当前使用的 addressclient 版本, 会发送 api/af-revenue/sql ,api/af-revenue/logic 到v4 服务')
18
+ const {devDependencies} = pkg
19
+ if (devDependencies && devDependencies['system-clients']) {
20
+ if (isVersionGreaterThan(devDependencies['system-clients'], '3.2.87')) {
21
+ console.log('\x1b[48;5;88m\x1b[1m\x1b[37m%s\x1b[0m', '请注意:当前使用的 systemClients 版本不兼容旧版登录')
22
+ console.log('\x1b[48;5;88m\x1b[1m\x1b[37m%s\x1b[0m', '登录是会发送 api/af-auth 请求')
23
+ console.log('\x1b[48;5;88m\x1b[1m\x1b[37m%s\x1b[0m', '请转发到公司 v4 测试地址或者客户 v4 网关')
24
+ console.log('\x1b[48;5;88m\x1b[1m\x1b[37m%s\x1b[0m', '如不使用新版登录,请降级 system-clients 版本到 3.2.87')
25
+ console.log('\x1b[48;5;88m\x1b[1m\x1b[37m%s\x1b[0m', '请查看营收后台升级日志:' +
26
+ 'http://aote-office.8866.org:31467/sale-doc-web/V4Product/%E8%90%A5%E6%94%B6%E5%90%8E%E5%8F%B0%E6%94%B9%E9%80%A0%E8%AF%B4%E6%98%8E')
27
+ }
28
+ }
29
+ }
30
+
31
+ module.exports = checkVersion
@@ -0,0 +1,7 @@
1
+ distributionBase=GRADLE_USER_HOME
2
+ distributionPath=wrapper/dists
3
+ distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
4
+ networkTimeout=10000
5
+ validateDistributionUrl=true
6
+ zipStoreBase=GRADLE_USER_HOME
7
+ zipStorePath=wrapper/dists