@sasjs/cli 3.22.0 → 3.23.0
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/build/commands/build/compileBuildCommand.js +1 -1
- package/build/commands/build/spec/compileBuildCommand.spec.js +4 -2
- package/build/commands/compile/compileCommand.js +1 -1
- package/build/commands/compile/spec/compileCommand.spec.js +4 -2
- package/build/commands/deploy/compileBuildDeployCommand.js +1 -1
- package/build/commands/deploy/spec/compileBuildDeployCommand.spec.js +4 -2
- package/package.json +1 -1
|
@@ -97,7 +97,7 @@ var CompileBuildCommand = /** @class */ (function (_super) {
|
|
|
97
97
|
return [2 /*return*/, returnCode];
|
|
98
98
|
}
|
|
99
99
|
buildDestinationFolder = process.sasjsConstants.buildDestinationFolder;
|
|
100
|
-
(_a = process.logger) === null || _a === void 0 ? void 0 : _a.success("
|
|
100
|
+
(_a = process.logger) === null || _a === void 0 ? void 0 : _a.success("The project was successfully compiled using the '".concat(target.name, "' target (serverType '").concat(target.serverType, "')!\nThe compile output is located in the ").concat(buildDestinationFolder, " directory."));
|
|
101
101
|
return [4 /*yield*/, (0, build_1.build)(target)
|
|
102
102
|
.then(function () { return command_1.ReturnCode.Success; })
|
|
103
103
|
.catch(function (err) {
|
|
@@ -162,7 +162,7 @@ describe('CompileBuildCommand', function () {
|
|
|
162
162
|
});
|
|
163
163
|
}); });
|
|
164
164
|
it('should log success and return the success code when execution is successful', function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
165
|
-
var args, command, returnCode;
|
|
165
|
+
var args, command, returnCode, buildDestinationFolder, expectedLoggedMessage;
|
|
166
166
|
return __generator(this, function (_a) {
|
|
167
167
|
switch (_a.label) {
|
|
168
168
|
case 0:
|
|
@@ -171,8 +171,10 @@ describe('CompileBuildCommand', function () {
|
|
|
171
171
|
return [4 /*yield*/, command.execute()];
|
|
172
172
|
case 1:
|
|
173
173
|
returnCode = _a.sent();
|
|
174
|
+
buildDestinationFolder = process.sasjsConstants.buildDestinationFolder;
|
|
175
|
+
expectedLoggedMessage = "The project was successfully compiled using the '".concat(target.name, "' target (serverType '").concat(target.serverType, "')!\nThe compile output is located in the ").concat(buildDestinationFolder, " directory.");
|
|
174
176
|
expect(returnCode).toEqual(command_1.ReturnCode.Success);
|
|
175
|
-
expect(process.logger.success).
|
|
177
|
+
expect(process.logger.success).toHaveBeenNthCalledWith(1, expectedLoggedMessage);
|
|
176
178
|
return [2 /*return*/];
|
|
177
179
|
}
|
|
178
180
|
});
|
|
@@ -167,7 +167,7 @@ var CompileCommand = /** @class */ (function (_super) {
|
|
|
167
167
|
return [4 /*yield*/, (0, compile_1.compile)(target, true)
|
|
168
168
|
.then(function () {
|
|
169
169
|
var _a;
|
|
170
|
-
(_a = process.logger) === null || _a === void 0 ? void 0 : _a.success("
|
|
170
|
+
(_a = process.logger) === null || _a === void 0 ? void 0 : _a.success("The project was successfully compiled using the '".concat(target.name, "' target (serverType '").concat(target.serverType, "')!\nThe compile output is located in the ").concat(buildDestinationFolder, " directory."));
|
|
171
171
|
return command_1.ReturnCode.Success;
|
|
172
172
|
})
|
|
173
173
|
.catch(function (err) {
|
|
@@ -177,7 +177,7 @@ describe('CompileCommand', function () {
|
|
|
177
177
|
});
|
|
178
178
|
}); });
|
|
179
179
|
it('should log success and return the success code when execution is successful', function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
180
|
-
var args, command, returnCode;
|
|
180
|
+
var args, command, returnCode, buildDestinationFolder, expectedLoggedMessage;
|
|
181
181
|
return __generator(this, function (_a) {
|
|
182
182
|
switch (_a.label) {
|
|
183
183
|
case 0:
|
|
@@ -186,8 +186,10 @@ describe('CompileCommand', function () {
|
|
|
186
186
|
return [4 /*yield*/, command.execute()];
|
|
187
187
|
case 1:
|
|
188
188
|
returnCode = _a.sent();
|
|
189
|
+
buildDestinationFolder = process.sasjsConstants.buildDestinationFolder;
|
|
190
|
+
expectedLoggedMessage = "The project was successfully compiled using the '".concat(target.name, "' target (serverType '").concat(target.serverType, "')!\nThe compile output is located in the ").concat(buildDestinationFolder, " directory.");
|
|
189
191
|
expect(returnCode).toEqual(command_1.ReturnCode.Success);
|
|
190
|
-
expect(process.logger.success).
|
|
192
|
+
expect(process.logger.success).toHaveBeenNthCalledWith(1, expectedLoggedMessage);
|
|
191
193
|
return [2 /*return*/];
|
|
192
194
|
}
|
|
193
195
|
});
|
|
@@ -98,7 +98,7 @@ var CompileBuildDeployCommand = /** @class */ (function (_super) {
|
|
|
98
98
|
return [2 /*return*/, returnCode];
|
|
99
99
|
}
|
|
100
100
|
buildDestinationFolder = process.sasjsConstants.buildDestinationFolder;
|
|
101
|
-
(_a = process.logger) === null || _a === void 0 ? void 0 : _a.success("
|
|
101
|
+
(_a = process.logger) === null || _a === void 0 ? void 0 : _a.success("The project was successfully compiled using the '".concat(target.name, "' target (serverType '").concat(target.serverType, "')!\nThe compile output is located in the ").concat(buildDestinationFolder, " directory."));
|
|
102
102
|
return [4 /*yield*/, (0, build_1.build)(target)
|
|
103
103
|
.then(function () { return command_1.ReturnCode.Success; })
|
|
104
104
|
.catch(function (err) {
|
|
@@ -168,7 +168,7 @@ describe('CompileBuildDeployCommand', function () {
|
|
|
168
168
|
});
|
|
169
169
|
}); });
|
|
170
170
|
it('should log success and return the success code when execution is successful', function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
171
|
-
var args, command, returnCode;
|
|
171
|
+
var args, command, returnCode, buildDestinationFolder, expectedLoggedMessage;
|
|
172
172
|
return __generator(this, function (_a) {
|
|
173
173
|
switch (_a.label) {
|
|
174
174
|
case 0:
|
|
@@ -177,8 +177,10 @@ describe('CompileBuildDeployCommand', function () {
|
|
|
177
177
|
return [4 /*yield*/, command.execute()];
|
|
178
178
|
case 1:
|
|
179
179
|
returnCode = _a.sent();
|
|
180
|
+
buildDestinationFolder = process.sasjsConstants.buildDestinationFolder;
|
|
181
|
+
expectedLoggedMessage = "The project was successfully compiled using the '".concat(target.name, "' target (serverType '").concat(target.serverType, "')!\nThe compile output is located in the ").concat(buildDestinationFolder, " directory.");
|
|
180
182
|
expect(returnCode).toEqual(command_1.ReturnCode.Success);
|
|
181
|
-
expect(process.logger.success).
|
|
183
|
+
expect(process.logger.success).toHaveBeenNthCalledWith(1, expectedLoggedMessage);
|
|
182
184
|
return [2 /*return*/];
|
|
183
185
|
}
|
|
184
186
|
});
|
package/package.json
CHANGED