@dainprotocol/cli 1.0.47 → 1.0.48

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.
@@ -55,14 +55,14 @@ var ora_1 = __importDefault(require("ora"));
55
55
  var utils_1 = require("../utils");
56
56
  function logs(options_1) {
57
57
  return __awaiter(this, arguments, void 0, function (options, isWatching) {
58
- var config, _a, apiKey, deploymentId, logsUrl, orgId, spinner, result, formatLogs, error_1;
58
+ var config, orgId, _a, apiKey, deploymentId, logsUrl, spinner, result, formatLogs, error_1;
59
59
  if (isWatching === void 0) { isWatching = false; }
60
60
  return __generator(this, function (_b) {
61
61
  switch (_b.label) {
62
62
  case 0:
63
63
  config = (0, utils_1.getDainConfig)(options.config);
64
- _a = initializeConfig(config), apiKey = _a.apiKey, deploymentId = _a.deploymentId, logsUrl = _a.logsUrl;
65
64
  orgId = 'hackathon';
65
+ _a = initializeConfig(config, orgId), apiKey = _a.apiKey, deploymentId = _a.deploymentId, logsUrl = _a.logsUrl;
66
66
  if (!orgId || !deploymentId) {
67
67
  (0, utils_1.logError)('Org ID or deployment ID not found');
68
68
  return [2 /*return*/];
@@ -100,10 +100,9 @@ function logs(options_1) {
100
100
  });
101
101
  });
102
102
  }
103
- var initializeConfig = function (config) {
103
+ var initializeConfig = function (config, orgId) {
104
104
  var baseUrl = config['platform-base-url'] || 'https://codegen-deploy-service.dainapp.com/';
105
105
  var apiKey = config['api-key'];
106
- var orgId = (0, utils_1.extractOrgId)(apiKey);
107
106
  var deploymentId = config['deployment-id'];
108
107
  var logsUrl = "".concat(baseUrl, "/codegen-deploy/logs/").concat(orgId, "/").concat(deploymentId);
109
108
  return { baseUrl: baseUrl, apiKey: apiKey, orgId: orgId, deploymentId: deploymentId, logsUrl: logsUrl };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dainprotocol/cli",
3
- "version": "1.0.47",
3
+ "version": "1.0.48",
4
4
  "private": false,
5
5
  "publishConfig": {
6
6
  "access": "public"