@sevenvip666/rop 0.1.17 → 0.1.18

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.
Files changed (2) hide show
  1. package/dist/bin/index.mjs +12 -7
  2. package/package.json +1 -1
@@ -1440,9 +1440,9 @@ var upload = function (platform, arch, options) { return __awaiter(void 0, void
1440
1440
  }); };
1441
1441
  var _upload = function (config) { return __awaiter(void 0, void 0, void 0, function () {
1442
1442
  var accessKey, projectId, token, teamSign, artifact, arch, version, platform, autoRelease, signature, checksum, sigPath, checkSumPath, targetPath, updatePath, targetPathSplit, targetName, updateName, updatePathSplit, uploadClient;
1443
- var _a, _b, _c, _d;
1444
- return __generator(this, function (_e) {
1445
- switch (_e.label) {
1443
+ var _a, _b, _c, _d, _e, _f, _g, _h;
1444
+ return __generator(this, function (_j) {
1445
+ switch (_j.label) {
1446
1446
  case 0:
1447
1447
  accessKey = config.accessKey, projectId = config.projectId, token = config.token, teamSign = config.teamSign, artifact = config.artifact, arch = config.arch, version = config.version, platform = config.platform, config.host, autoRelease = config.autoRelease;
1448
1448
  if (typeof artifact.sig === 'string') {
@@ -1476,13 +1476,18 @@ var _upload = function (config) { return __awaiter(void 0, void 0, void 0, funct
1476
1476
  targetPath = typeof artifact.target === 'string' ? artifact.target : artifact.target.path;
1477
1477
  updatePath = typeof artifact.update === 'string' ? artifact.update : (_c = artifact.update) === null || _c === void 0 ? void 0 : _c.path;
1478
1478
  targetPathSplit = targetPath.split('/');
1479
- targetName = targetPathSplit[targetPathSplit.length - 1];
1479
+ targetName = typeof artifact.target !== 'string'
1480
+ ? ((_e = (_d = artifact.target) === null || _d === void 0 ? void 0 : _d.name) !== null && _e !== void 0 ? _e : targetPathSplit[targetPathSplit.length - 1])
1481
+ : undefined;
1480
1482
  updateName = undefined;
1481
1483
  if (updatePath) {
1482
1484
  updatePathSplit = updatePath === null || updatePath === void 0 ? void 0 : updatePath.split('/');
1483
- updateName = updatePathSplit[updatePathSplit.length - 1];
1485
+ updateName =
1486
+ typeof artifact.update !== 'string'
1487
+ ? ((_g = (_f = artifact.update) === null || _f === void 0 ? void 0 : _f.name) !== null && _g !== void 0 ? _g : updatePathSplit[updatePathSplit.length - 1])
1488
+ : undefined;
1484
1489
  }
1485
- uploadClient = new RopUploadApi({ baseDomain: (_d = config.host) !== null && _d !== void 0 ? _d : defaultHost });
1490
+ uploadClient = new RopUploadApi({ baseDomain: (_h = config.host) !== null && _h !== void 0 ? _h : defaultHost });
1486
1491
  return [4 /*yield*/, uploadClient.upload({
1487
1492
  accessKey: accessKey,
1488
1493
  projectId: projectId,
@@ -1501,7 +1506,7 @@ var _upload = function (config) { return __awaiter(void 0, void 0, void 0, funct
1501
1506
  autoRelease: autoRelease,
1502
1507
  })];
1503
1508
  case 1:
1504
- _e.sent();
1509
+ _j.sent();
1505
1510
  return [2 /*return*/];
1506
1511
  }
1507
1512
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sevenvip666/rop",
3
- "version": "0.1.17",
3
+ "version": "0.1.18",
4
4
  "files": [
5
5
  "dist"
6
6
  ],