Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
duiba-tiny-image-node
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
劳工
duiba-tiny-image-node
Commits
58b9840a
Commit
58b9840a
authored
Oct 28, 2020
by
rockyl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rewrite by ts
parent
777fa58a
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
26 additions
and
26 deletions
+26
-26
api.js
dist/api.js
+6
-6
api.js.map
dist/api.js.map
+1
-1
index.js
dist/index.js
+5
-5
index.js.map
dist/index.js.map
+1
-1
logger.js
dist/logger.js
+5
-5
logger.js.map
dist/logger.js.map
+1
-1
api.ts
src/api.ts
+4
-4
index.ts
src/index.ts
+1
-1
logger.ts
src/logger.ts
+2
-2
No files found.
dist/api.js
View file @
58b9840a
...
...
@@ -4,9 +4,9 @@
*/
Object
.
defineProperty
(
exports
,
"__esModule"
,
{
value
:
true
});
const
logger_1
=
require
(
"./logger"
);
const
imagemin
_1
=
require
(
"imagemin"
);
const
imagemin
_jpegtran_1
=
require
(
"imagemin-jpegtran"
);
const
imagemin
_pngquant_1
=
require
(
"imagemin-pngquant"
);
const
imagemin
=
require
(
"imagemin"
);
const
imagemin
Jpegtran
=
require
(
"imagemin-jpegtran"
);
const
imagemin
Pngquant
=
require
(
"imagemin-pngquant"
);
const
acceptTypes
=
[
'image/png'
,
'image/jpeg'
];
function
applyApi
(
server
)
{
server
.
get
(
'/info'
,
function
(
req
,
res
,
next
)
{
...
...
@@ -22,10 +22,10 @@ function applyApi(server) {
if
(
file
)
{
if
(
acceptTypes
.
includes
(
file
.
type
))
{
try
{
const
buffer
=
await
imagemin
_1
.
default
([
file
.
path
],
{
const
buffer
=
await
imagemin
([
file
.
path
],
{
plugins
:
[
imagemin
_jpegtran_1
.
default
(),
imagemin
_pngquant_1
.
defaul
t
({
imagemin
Jpegtran
(),
imagemin
Pngquan
t
({
quality
:
[
0.6
,
0.8
]
})
]
...
...
dist/api.js.map
View file @
58b9840a
{"version":3,"file":"api.js","sourceRoot":"","sources":["../src/api.ts"],"names":[],"mappings":";AAAA;;GAEG;;AAEH,qCAA8B;AAC9B,uCAAgC;AAChC,yDAAiD;AACjD,yDAAiD;AAEjD,MAAM,WAAW,GAAG,CAAC,WAAW,EAAE,YAAY,CAAC,CAAC;AAEhD,SAAwB,QAAQ,CAAC,MAAM;IACtC,MAAM,CAAC,GAAG,CAAC,OAAO,EAAE,UAAU,GAAG,EAAE,GAAG,EAAE,IAAI;QAC3C,GAAG,CAAC,OAAO,CAAC,8BAA8B,CAAC,CAAC;QAC5C,OAAO,IAAI,EAAE,CAAC;IACf,CAAC,CAAC,CAAC;IAEH,MAAM,CAAC,GAAG,CAAC,gBAAgB,EAAE,UAAU,GAAG,EAAE,GAAG,EAAE,IAAI;QACpD,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QAClB,OAAO,IAAI,EAAE,CAAC;IACf,CAAC,CAAC,CAAC;IAEH,MAAM,CAAC,IAAI,CAAC,SAAS,EAAE,KAAK,WAAY,GAAG,EAAE,GAAG,EAAE,IAAI;QACrD,IAAI,IAAI,GAAG,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC;QAE1B,IAAG,IAAI,EAAC;YACP,IAAG,WAAW,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,EAAC;gBAClC,IAAI;oBACH,MAAM,MAAM,GAAG,MAAM,kBAAQ,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE;wBAC1C,OAAO,EAAE;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,CAAC,SAAS,EAAE,YAAY,CAAC,CAAC;gBACtC,GAAG,CAAC,IAAI,CAAC;oBACR,IAAI,EAAE,CAAC;oBACP,GAAG,EAAE,YAAY;iBACjB,CAAC,CAAC;aACH;SACD;aAAI;YACJ,GAAG,CAAC,IAAI,CAAC;gBACR,IAAI,EAAE,CAAC;gBACP,GAAG,EAAE,iBAAiB;aACtB,CAAC,CAAC;SACH;QAED,OAAO,IAAI,EAAE,CAAC;IACf,CAAC,CAAC,CAAC;AACJ,CAAC;AApDD,2BAoDC"}
\ No newline at end of file
dist/index.js
View file @
58b9840a
...
...
@@ -3,21 +3,21 @@
* Created by rockyl on 2020-02-12.
*/
Object
.
defineProperty
(
exports
,
"__esModule"
,
{
value
:
true
});
const
restify
_1
=
require
(
"restify"
);
const
restify
=
require
(
'restify'
);
const
eureka_1
=
require
(
"./eureka"
);
const
logger_1
=
require
(
"./logger"
);
const
api_1
=
require
(
"./api"
);
let
[
_
,
__
,
portStr
=
'8090'
]
=
process
.
argv
;
let
eureka
;
let
port
=
parseInt
(
portStr
);
const
server
=
restify
_1
.
default
.
createServer
({
const
server
=
restify
.
createServer
({
name
:
'tiny-image'
,
version
:
'1.0.0'
});
const
ignoreUrlLogger
=
[
'/monitor/check'
];
server
.
use
(
restify
_1
.
default
.
plugins
.
acceptParser
(
server
.
acceptable
));
server
.
use
(
restify
_1
.
default
.
plugins
.
queryParser
());
server
.
use
(
restify
_1
.
default
.
plugins
.
bodyParser
());
server
.
use
(
restify
.
plugins
.
acceptParser
(
server
.
acceptable
));
server
.
use
(
restify
.
plugins
.
queryParser
());
server
.
use
(
restify
.
plugins
.
bodyParser
());
server
.
use
(
function
(
req
,
res
,
next
)
{
if
(
!
ignoreUrlLogger
.
includes
(
req
.
url
))
{
logger_1
.
default
.
info
(
req
.
url
);
...
...
dist/index.js.map
View file @
58b9840a
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;GAEG;;AAEH,qCAA8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AAO,CAAC,UAAU,EAAE,CAAC,CAAC;AACzC,MAAM,CAAC,GAAG,CAAC,UAAU,GAAG,EAAE,GAAG,EAAE,IAAI;IAClC,IAAI,CAAC,eAAe,CAAC,QAAQ,CAAC,GAAG,CAAC,GAAa,CAAC,EAAE;QACjD,gBAAM,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;KACrB;IACD,OAAO,IAAI,EAAE,CAAC;AACf,CAAC,CAAC,CAAC;AAEH,aAAQ,CAAC,MAAM,CAAC,CAAC;AAEjB,OAAO,CAAC,EAAE,CAAC,mBAAmB,EAAE,CAAC,GAAG,EAAE,EAAE;IACvC,gBAAM,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;AACnB,CAAC,CAAC,CAAC;AAEH,OAAO,CAAC,EAAE,CAAC,SAAS,EAAE,GAAG,EAAE;IAC1B,MAAM,CAAC,IAAI,EAAE,CAAC;IACd,UAAU,CAAC,GAAG,EAAE;QACf,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;IAChB,CAAC,EAAE,IAAI,CAAC,CAAC;AACV,CAAC,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,KAAK;IACxB,IAAI;QACH,MAAM,GAAG,MAAM,wBAAe,CAAC,IAAI,CAAC,CAAC;QACrC,gBAAM,CAAC,IAAI,CAAC,yBAAyB,CAAC,CAAC;KACvC;IAAC,OAAO,CAAC,EAAE;QACX,gBAAM,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;KACrB;IACD,gBAAM,CAAC,IAAI,CAAC,oBAAoB,EAAE,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,GAAG,CAAC,CAAC;AAC5D,CAAC,CAAC,CAAC"}
\ No newline at end of file
dist/logger.js
View file @
58b9840a
...
...
@@ -4,16 +4,16 @@
*/
Object
.
defineProperty
(
exports
,
"__esModule"
,
{
value
:
true
});
const
log4js_1
=
require
(
"log4js"
);
const
path
_1
=
require
(
"path"
);
const
fs
_extra_1
=
require
(
"fs-extra"
);
const
logPath
=
path
_1
.
default
.
join
(
process
.
env
.
HOME
||
process
.
env
.
USERPROFILE
,
'logs'
,
'tiny-image'
);
fs
_extra_1
.
default
.
ensureDir
(
logPath
);
const
path
=
require
(
"path"
);
const
fs
=
require
(
"fs-extra"
);
const
logPath
=
path
.
join
(
process
.
env
.
HOME
||
process
.
env
.
USERPROFILE
,
'logs'
,
'tiny-image'
);
fs
.
ensureDir
(
logPath
);
log4js_1
.
configure
({
appenders
:
{
out
:
{
type
:
'console'
},
allLog
:
{
type
:
'dateFile'
,
filename
:
path
_1
.
default
.
join
(
logPath
,
'log.log'
),
filename
:
path
.
join
(
logPath
,
'log.log'
),
},
},
categories
:
{
...
...
dist/logger.js.map
View file @
58b9840a
{"version":3,"file":"logger.js","sourceRoot":"","sources":["../src/logger.ts"],"names":[],"mappings":";AAAA;;GAEG;;AAEH,mCAA4C;AAC5C,+BAAwB;AACxB,uCAA0B;AAE1B,MAAM,OAAO,GAAG,cAAI,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,IAAI,OAAO,CAAC,GAAG,CAAC,WAAqB,EAAE,MAAM,EAAE,YAAY,CAAC,CAAC;AAEvG,kBAAE,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;AAEtB,kBAAS,CAAC;IACT,SAAS,EAAE;QACV,GAAG,EAAE,EAAC,IAAI,EAAE,SAAS,EAAC;QACtB,MAAM,EAAE;YACP,IAAI,EAAE,UAAU;YAChB,QAAQ,EAAE,cAAI,CAAC,IAAI,CAAC,OAAO,EAAE,SAAS,CAAC;SACvC;KACD;IACD,UAAU,EAAE;QACX,OAAO,EAAE,EAAC,SAAS,EAAE,CAAC,KAAK,EAAE,QAAQ,CAAC,EAAE,KAAK,EAAE,OAAO,EAAC;KACvD;CAED,CAAC,CAAC;AAEH,MAAM,MAAM,GAAG,kBAAS,EAAE,CAAC;AAE3B,kBAAe,MAAM,CAAC"}
\ No newline at end of file
{"version":3,"file":"logger.js","sourceRoot":"","sources":["../src/logger.ts"],"names":[],"mappings":";AAAA;;GAEG;;AAEH,mCAA4C;AAC5C,MAAM,IAAI,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;AAC7B,MAAM,EAAE,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;AAE/B,MAAM,OAAO,GAAG,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,IAAI,OAAO,CAAC,GAAG,CAAC,WAAqB,EAAE,MAAM,EAAE,YAAY,CAAC,CAAC;AAEvG,EAAE,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;AAEtB,kBAAS,CAAC;IACT,SAAS,EAAE;QACV,GAAG,EAAE,EAAC,IAAI,EAAE,SAAS,EAAC;QACtB,MAAM,EAAE;YACP,IAAI,EAAE,UAAU;YAChB,QAAQ,EAAE,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,SAAS,CAAC;SACvC;KACD;IACD,UAAU,EAAE;QACX,OAAO,EAAE,EAAC,SAAS,EAAE,CAAC,KAAK,EAAE,QAAQ,CAAC,EAAE,KAAK,EAAE,OAAO,EAAC;KACvD;CAED,CAAC,CAAC;AAEH,MAAM,MAAM,GAAG,kBAAS,EAAE,CAAC;AAE3B,kBAAe,MAAM,CAAC"}
\ No newline at end of file
src/api.ts
View file @
58b9840a
...
...
@@ -3,9 +3,9 @@
*/
import
logger
from
"./logger"
;
import
imagemin
from
"imagemin"
;
import
imageminJpegtran
from
"imagemin-jpegtran"
;
import
imageminPngquant
from
"imagemin-pngquant"
;
const
imagemin
=
require
(
"imagemin"
)
;
const
imageminJpegtran
=
require
(
"imagemin-jpegtran"
)
;
const
imageminPngquant
=
require
(
"imagemin-pngquant"
)
;
const
acceptTypes
=
[
'image/png'
,
'image/jpeg'
];
...
...
@@ -61,4 +61,4 @@ export default function applyApi(server){
return
next
();
});
}
\ No newline at end of file
}
src/index.ts
View file @
58b9840a
...
...
@@ -2,7 +2,7 @@
* Created by rockyl on 2020-02-12.
*/
import
restify
from
'restify'
;
const
restify
=
require
(
'restify'
)
;
import
{
getEurekaClient
}
from
"./eureka"
;
import
logger
from
"./logger"
;
import
applyApi
from
"./api"
;
...
...
src/logger.ts
View file @
58b9840a
...
...
@@ -3,8 +3,8 @@
*/
import
{
configure
,
getLogger
}
from
'log4js'
;
import
path
from
"path"
;
import
fs
from
"fs-extra"
;
const
path
=
require
(
"path"
)
;
const
fs
=
require
(
"fs-extra"
)
;
const
logPath
=
path
.
join
(
process
.
env
.
HOME
||
process
.
env
.
USERPROFILE
as
string
,
'logs'
,
'tiny-image'
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment