This repository was archived by the owner on Jun 20, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 6 files changed +2047
-1410
lines changed Expand file tree Collapse file tree 6 files changed +2047
-1410
lines changed Original file line number Diff line number Diff line change 11{
2- "parser": "babel- eslint",
2+ "parser" : " @ babel/ eslint-parser " ,
33 "env" : {
44 "node" : true ,
55 "es6" : true
88 " umbrellio" ,
99 " plugin:promise/recommended"
1010 ],
11+ "parserOptions" : {
12+ "requireConfigFile" : false
13+ },
1114 "rules" : {
1215 "quotes" : [" error" , " double" ],
1316 "no-console" : " off"
Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ Available AWS regions can be viewed at https://docs.aws.amazon.com/sns/latest/dg
3737--exclude, -e excluded extenstions [default: ["html","gz"]]
3838--accessKeyId, --access-key-id AWS access key ID [required]
3939--secretAccessKey, --secret-access-key AWS secret access key [required]
40- --targetDir, --target-dir AWS bucket target directory [default: "/ "]
40+ --targetDir, --target-dir AWS bucket target directory [default: ""]
4141```
4242
4343## Contributing
Original file line number Diff line number Diff line change 11{
22 "name" : " @umbrellio/ucdn" ,
3- "version" : " 0.5 .0" ,
3+ "version" : " 0.6 .0" ,
44 "bin" : " ucdn" ,
55 "main" : " index.js" ,
66 "repository" : " git@github.com:umbrellio/ucdn.git" ,
1111 "lint" : " eslint . ucdn"
1212 },
1313 "dependencies" : {
14- "@aws-sdk/client-s3" : " ^3.34 .0" ,
14+ "@aws-sdk/client-s3" : " ^3.421 .0" ,
1515 "js-yaml" : " ^4.1.0" ,
16- "mime-types" : " ^2.1.32 " ,
17- "yargs" : " ^17.2.1 "
16+ "mime-types" : " ^2.1.35 " ,
17+ "yargs" : " ^17.7.2 "
1818 },
1919 "devDependencies" : {
20- "babel-eslint" : " ^10.1.0" ,
21- "eslint" : " ^7.32.0" ,
20+ "@babel/core" : " ^7.23.0" ,
21+ "@babel/eslint-parser" : " ^7.22.15" ,
22+ "eslint" : " ^8.50.0" ,
2223 "eslint-config-umbrellio" : " ^5.0.1" ,
2324 "eslint-plugin-import" : " ^2.24.2" ,
2425 "eslint-plugin-node" : " ^11.1.0" ,
2526 "eslint-plugin-prefer-object-spread" : " ^1.2.1" ,
26- "eslint-plugin-promise" : " ^5 .1.0 "
27+ "eslint-plugin-promise" : " ^6 .1.1 "
2728 }
2829}
Original file line number Diff line number Diff line change @@ -6,8 +6,6 @@ const pkg = require("./package")
66const utils = require ( "./utils" )
77const upload = require ( "./upload" )
88
9- const toDashCase = str => str . replace ( / ( [ A - Z ] ) / g, ( g ) => `-${ g [ 0 ] . toLowerCase ( ) } ` ) ;
10-
119const yargsOptions = {
1210 config : {
1311 alias : "c" ,
@@ -59,7 +57,7 @@ const yargsOptions = {
5957 alias : "target-dir" ,
6058 describe : "AWS bucket target directory" ,
6159 type : "string" ,
62- default : "/ " ,
60+ default : "" ,
6361 } ,
6462}
6563
@@ -77,10 +75,10 @@ yargs
7775
7876 Object
7977 . entries ( configObject )
80- . filter ( ( [ _ , value ] ) => value != null )
78+ . filter ( ( [ _ , value ] ) => value !== null )
8179 . forEach ( ( [ key , value ] ) => {
82- if ( argv [ key ] == yargsOptions [ key ] . default ) argv [ key ] = value
80+ // eslint-disable-next-line no-param-reassign
81+ if ( argv [ key ] === yargsOptions [ key ] . default ) argv [ key ] = value
8382 } )
84-
8583 } , true )
8684 . parse ( )
Original file line number Diff line number Diff line change @@ -2,15 +2,12 @@ const path = require("path")
22const fs = require ( "fs" )
33const yaml = require ( "js-yaml" )
44
5- const toDashCase = str => str . replace ( / ( [ A - Z ] ) / g, g => `-${ g [ 0 ] . toLowerCase ( ) } ` )
6-
75const loadYamlFile = filePath => {
86 const configPath = path . resolve ( filePath )
97 const content = fs . readFileSync ( configPath )
108 return yaml . load ( content )
119}
1210
1311module . exports = {
14- toDashCase,
1512 loadYamlFile,
1613}
You can’t perform that action at this time.
0 commit comments