@dainprotocol/cli 1.0.46 → 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.
- package/dist/commands/deploy.js +1 -1
- package/dist/commands/logs.js +3 -4
- package/package.json +1 -1
package/dist/commands/deploy.js
CHANGED
|
@@ -222,7 +222,7 @@ var recursiveStatusUntilRunning = function (config, deploymentId) { return __awa
|
|
|
222
222
|
if (statusResult.status === 'RUNNING') {
|
|
223
223
|
return [2 /*return*/];
|
|
224
224
|
}
|
|
225
|
-
return [4 /*yield*/, new Promise(function (resolve) { return setTimeout(resolve,
|
|
225
|
+
return [4 /*yield*/, new Promise(function (resolve) { return setTimeout(resolve, 15000); })];
|
|
226
226
|
case 2:
|
|
227
227
|
_a.sent();
|
|
228
228
|
return [4 /*yield*/, recursiveStatusUntilRunning(config, deploymentId)];
|
package/dist/commands/logs.js
CHANGED
|
@@ -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,
|
|
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 };
|