Skip to content

Commit 1944ee6

Browse files
committed
feat: complete main features
0 parents  commit 1944ee6

File tree

13 files changed

+17775
-0
lines changed

13 files changed

+17775
-0
lines changed

.eslintignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
dist/
2+
lib/
3+
node_modules/

.eslintrc.json

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
{
2+
"plugins": ["jest", "@typescript-eslint"],
3+
"extends": ["airbnb"],
4+
"parser": "@typescript-eslint/parser",
5+
"parserOptions": {
6+
"ecmaVersion": 9,
7+
"sourceType": "module",
8+
"project": "./tsconfig.json"
9+
},
10+
"rules": {
11+
"import/prefer-default-export": "off",
12+
"import/extensions": "off",
13+
"eslint-comments/no-use": "off",
14+
"import/no-namespace": "off",
15+
"consistent-return": "off",
16+
"@typescript-eslint/no-unused-vars": "error",
17+
"@typescript-eslint/explicit-member-accessibility": ["error", {"accessibility": "no-public"}],
18+
"@typescript-eslint/no-require-imports": "error",
19+
"@typescript-eslint/array-type": "error",
20+
"@typescript-eslint/await-thenable": "error",
21+
"@typescript-eslint/ban-ts-ignore": "error",
22+
"camelcase": "off",
23+
"@typescript-eslint/camelcase": "error",
24+
"@typescript-eslint/class-name-casing": "error",
25+
"@typescript-eslint/explicit-function-return-type": ["error", {"allowExpressions": true}],
26+
"@typescript-eslint/func-call-spacing": ["error", "never"],
27+
"@typescript-eslint/generic-type-naming": ["error", "^[A-Z][A-Za-z]*$"],
28+
"@typescript-eslint/no-array-constructor": "error",
29+
"@typescript-eslint/no-empty-interface": "error",
30+
"@typescript-eslint/no-extraneous-class": "error",
31+
"@typescript-eslint/no-for-in-array": "error",
32+
"@typescript-eslint/no-inferrable-types": "error",
33+
"@typescript-eslint/no-misused-new": "error",
34+
"@typescript-eslint/no-namespace": "error",
35+
"@typescript-eslint/no-non-null-assertion": "warn",
36+
"@typescript-eslint/no-unnecessary-qualifier": "error",
37+
"@typescript-eslint/no-unnecessary-type-assertion": "error",
38+
"@typescript-eslint/no-useless-constructor": "error",
39+
"@typescript-eslint/no-var-requires": "error",
40+
"@typescript-eslint/prefer-for-of": "warn",
41+
"@typescript-eslint/prefer-function-type": "warn",
42+
"@typescript-eslint/prefer-includes": "error",
43+
"@typescript-eslint/prefer-string-starts-ends-with": "error",
44+
"@typescript-eslint/require-array-sort-compare": "error",
45+
"@typescript-eslint/restrict-plus-operands": "error",
46+
"semi": "off",
47+
"@typescript-eslint/semi": ["error", "always"],
48+
"@typescript-eslint/type-annotation-spacing": "error",
49+
"@typescript-eslint/unbound-method": "error"
50+
},
51+
"env": {
52+
"node": true,
53+
"es6": true,
54+
"jest/globals": true
55+
},
56+
"settings": {
57+
"import/resolver": {
58+
"node": {
59+
"extensions": [".js", ".jsx", ".ts", ".tsx"]
60+
}
61+
}
62+
}
63+
}

.gitignore

Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
# Dependency directory
2+
node_modules
3+
4+
# Rest pulled from https://github.com/github/gitignore/blob/master/Node.gitignore
5+
# Logs
6+
logs
7+
*.log
8+
npm-debug.log*
9+
yarn-debug.log*
10+
yarn-error.log*
11+
lerna-debug.log*
12+
13+
# Diagnostic reports (https://nodejs.org/api/report.html)
14+
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
15+
16+
# Runtime data
17+
pids
18+
*.pid
19+
*.seed
20+
*.pid.lock
21+
22+
# Directory for instrumented libs generated by jscoverage/JSCover
23+
lib-cov
24+
25+
# Coverage directory used by tools like istanbul
26+
coverage
27+
*.lcov
28+
29+
# nyc test coverage
30+
.nyc_output
31+
32+
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
33+
.grunt
34+
35+
# Bower dependency directory (https://bower.io/)
36+
bower_components
37+
38+
# node-waf configuration
39+
.lock-wscript
40+
41+
# Compiled binary addons (https://nodejs.org/api/addons.html)
42+
build/Release
43+
44+
# Dependency directories
45+
jspm_packages/
46+
47+
# TypeScript v1 declaration files
48+
typings/
49+
50+
# TypeScript cache
51+
*.tsbuildinfo
52+
53+
# Optional npm cache directory
54+
.npm
55+
56+
# Optional eslint cache
57+
.eslintcache
58+
59+
# Optional REPL history
60+
.node_repl_history
61+
62+
# Output of 'npm pack'
63+
*.tgz
64+
65+
# Yarn Integrity file
66+
.yarn-integrity
67+
68+
# dotenv environment variables file
69+
.env
70+
.env.test
71+
72+
# parcel-bundler cache (https://parceljs.org/)
73+
.cache
74+
75+
# next.js build output
76+
.next
77+
78+
# nuxt.js build output
79+
.nuxt
80+
81+
# vuepress build output
82+
.vuepress/dist
83+
84+
# Serverless directories
85+
.serverless/
86+
87+
# FuseBox cache
88+
.fusebox/
89+
90+
# DynamoDB Local files
91+
.dynamodb/
92+
93+
# OS metadata
94+
.DS_Store
95+
Thumbs.db
96+
97+
# Ignore built ts files
98+
test/runner/*
99+
lib

LICENSE

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
2+
The MIT License (MIT)
3+
4+
Copyright (c) 2019 Jiulong Hu
5+
6+
Permission is hereby granted, free of charge, to any person obtaining a copy
7+
of this software and associated documentation files (the "Software"), to deal
8+
in the Software without restriction, including without limitation the rights
9+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10+
copies of the Software, and to permit persons to whom the Software is
11+
furnished to do so, subject to the following conditions:
12+
13+
The above copyright notice and this permission notice shall be included in
14+
all copies or substantial portions of the Software.
15+
16+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22+
THE SOFTWARE.

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Github Action for Uploading Files to Qiniu

action.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: 'Qiniu Upload'
2+
description: 'github action for uploading files to qiniu'
3+
author: 'Jiulong Hu'
4+
inputs:
5+
access_key:
6+
description: 'access key'
7+
required: true
8+
secret_key:
9+
description: 'secret key'
10+
required: true
11+
bucket:
12+
description: 'bucket'
13+
required: true
14+
source_dir:
15+
description: 'source dir'
16+
default: './'
17+
required: false
18+
dest_dir:
19+
description: 'dest dir, namely key prefix'
20+
default: '/'
21+
required: false
22+
# overwrite:
23+
# description: 'overwrite the file of same key in bucket'
24+
# default: true
25+
# required: false
26+
ignore_source_map:
27+
description: 'ignore source maps'
28+
default: true
29+
required: false
30+
runs:
31+
using: 'node12'
32+
main: 'dist/index.js'

0 commit comments

Comments
 (0)