@@ -5140,64 +5140,24 @@ module.exports = require("string_decoder");
5140
5140
/***/ 322:
5141
5141
/***/ (function(module, __unusedexports, __webpack_require__) {
5142
5142
5143
- function __ncc_wildcard$0 (arg) {
5144
- if (arg === "qiniu") return __webpack_require__(763);
5145
- }
5146
- function __ncc_wildcard$1 (arg) {
5147
- if (arg === "qiniu") return __webpack_require__(624);
5148
- }
5149
- function __ncc_wildcard$2 (arg) {
5150
- if (arg === "qiniu") return __webpack_require__(295);
5151
- }
5152
- function __ncc_wildcard$3 (arg) {
5153
- if (arg === "qiniu") return __webpack_require__(511);
5154
- }
5155
- function __ncc_wildcard$4 (arg) {
5156
- if (arg === "qiniu") return __webpack_require__(989);
5157
- }
5158
- function __ncc_wildcard$5 (arg) {
5159
- if (arg === "qiniu") return __webpack_require__(751);
5160
- }
5161
- function __ncc_wildcard$6 (arg) {
5162
- if (arg === "qiniu") return __webpack_require__(854);
5163
- }
5164
- function __ncc_wildcard$7 (arg) {
5165
- if (arg === "qiniu") return __webpack_require__(38);
5166
- }
5167
- function __ncc_wildcard$8 (arg) {
5168
- if (arg === "qiniu/rtc") return __webpack_require__(386);
5169
- else if (arg === "qiniu") return __webpack_require__(529);
5170
- }
5171
- function __ncc_wildcard$9 (arg) {
5172
- if (arg === "qiniu") return __webpack_require__(145);
5173
- }
5174
- function __ncc_wildcard$10 (arg) {
5175
- if (arg === "qiniu") return __webpack_require__(20);
5176
- }
5177
- function __ncc_wildcard$11 (arg) {
5178
- if (arg === "qiniu") return __webpack_require__(5);
5179
- }
5180
- function __ncc_wildcard$12 (arg) {
5181
- if (arg === "qiniu") return __webpack_require__(142);
5182
- }
5183
- var libPath = process.env.QINIU_COV ? './lib-cov' : './qiniu';
5143
+ var libPath = './qiniu';
5184
5144
5185
5145
module.exports = {
5186
5146
auth: {
5187
- digest: __ncc_wildcard$0(libPath )
5147
+ digest: __webpack_require__(763 )
5188
5148
},
5189
- cdn: __ncc_wildcard$1(libPath ),
5190
- form_up: __ncc_wildcard$2(libPath ),
5191
- resume_up: __ncc_wildcard$3(libPath ),
5192
- rs: __ncc_wildcard$4(libPath ),
5193
- fop: __ncc_wildcard$5(libPath ),
5194
- conf: __ncc_wildcard$6(libPath ),
5195
- rpc: __ncc_wildcard$7(libPath ),
5196
- util: __ncc_wildcard$8(libPath ),
5197
- zone: __ncc_wildcard$9(libPath ),
5198
- app: __ncc_wildcard$10(libPath ),
5199
- room: __ncc_wildcard$11(libPath ),
5200
- Credentials: __ncc_wildcard$12(libPath )
5149
+ cdn: __webpack_require__(624 ),
5150
+ form_up: __webpack_require__(295 ),
5151
+ resume_up: __webpack_require__(511 ),
5152
+ rs: __webpack_require__(989 ),
5153
+ fop: __webpack_require__(751 ),
5154
+ conf: __webpack_require__(854 ),
5155
+ rpc: __webpack_require__(38 ),
5156
+ util: __webpack_require__(529 ),
5157
+ zone: __webpack_require__(145 ),
5158
+ app: __webpack_require__(20 ),
5159
+ room: __webpack_require__(5 ),
5160
+ Credentials: __webpack_require__(142 )
5201
5161
};
5202
5162
5203
5163
@@ -5825,9 +5785,9 @@ function run() {
5825
5785
const bucket = core.getInput('bucket');
5826
5786
const sourceDir = core.getInput('source_dir');
5827
5787
const destDir = core.getInput('dest_dir');
5828
- const ignoreSourceMap = core.getInput('ignore_source_map');
5788
+ const ignoreSourceMap = core.getInput('ignore_source_map') === 'true' ;
5829
5789
const token = token_1.genToken(bucket, ak, sk);
5830
- upload_1.upload(token, sourceDir, destDir, Boolean( ignoreSourceMap) , (file, key) => core.info(`success: ${file} => ${key}`), () => core.info('Done!'), (error) => core.setFailed(error.message));
5790
+ upload_1.upload(token, sourceDir, destDir, ignoreSourceMap, (file, key) => core.info(`success: ${file} => [${bucket}]: ${key}`), () => core.info('Done!'), (error) => core.setFailed(error.message));
5831
5791
}
5832
5792
catch (error) {
5833
5793
core.setFailed(error.message);
@@ -13210,6 +13170,13 @@ const path_1 = __importDefault(__webpack_require__(622));
13210
13170
const glob_1 = __importDefault(__webpack_require__(458));
13211
13171
const p_all_1 = __importDefault(__webpack_require__(812));
13212
13172
const p_retry_1 = __importDefault(__webpack_require__(255));
13173
+ function normalizePath(input) {
13174
+ let val = input.replace(/^\//, '');
13175
+ if (!val.endsWith('/')) {
13176
+ val += '/';
13177
+ }
13178
+ return val;
13179
+ }
13213
13180
function upload(token, srcDir, destDir, ignoreSourceMap, onProgress, onComplete, onFail) {
13214
13181
const baseDir = path_1.default.resolve(process.cwd(), srcDir);
13215
13182
const files = glob_1.default.sync(`${baseDir}/**/*`, { nodir: true });
@@ -13218,7 +13185,7 @@ function upload(token, srcDir, destDir, ignoreSourceMap, onProgress, onComplete,
13218
13185
const putExtra = new qiniu_1.default.form_up.PutExtra();
13219
13186
const tasks = files.map((file) => {
13220
13187
const relativePath = path_1.default.relative(baseDir, path_1.default.dirname(file));
13221
- const key = path_1.default.join(destDir, relativePath, path_1.default.basename(file));
13188
+ const key = normalizePath( path_1.default.join(destDir, relativePath, path_1.default.basename(file) ));
13222
13189
if (ignoreSourceMap && file.endsWith('.map'))
13223
13190
return null;
13224
13191
const task = () => new Promise((resolve, reject) => {
0 commit comments