snyk 1.1021.0 → 1.1022.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.
@@ -5220,6 +5220,7 @@ const path = __webpack_require__(85622);
5220
5220
  const error_utils_1 = __webpack_require__(36401);
5221
5221
  const output_1 = __webpack_require__(39313);
5222
5222
  const utils_1 = __webpack_require__(9176);
5223
+ const wrapAnsi = __webpack_require__(88152);
5223
5224
  function buildOutput({ scanResult, testSpinner, orgSettings, options, }) {
5224
5225
  if (scanResult.results) {
5225
5226
  testSpinner === null || testSpinner === void 0 ? void 0 : testSpinner.succeed(text_1.spinnerSuccessMessage);
@@ -5310,22 +5311,18 @@ function buildTextOutput({ scanResult, projectName, orgSettings, options, }) {
5310
5311
  response += os_1.EOL;
5311
5312
  response += utils_1.colors.title('Info') + os_1.EOL;
5312
5313
  response += os_1.EOL;
5313
- response +=
5314
- utils_1.contentPadding +
5315
- `Your organization ${orgSettings.meta.org} is using Integrated IaC. To switch to Current IaC,` +
5316
- os_1.EOL;
5317
- response +=
5318
- utils_1.contentPadding +
5319
- `use --org=<ORG_ID> to select a different organization. For more information about Integrated IaC, see:` +
5320
- os_1.EOL;
5321
- response += os_1.EOL;
5322
- response +=
5323
- utils_1.contentPadding +
5324
- utils_1.contentPadding +
5325
- 'https://docs.snyk.io/products/snyk-infrastructure-as-code/snyk-cli-for-infrastructure-as-code/integrated-infrastructure-as-code' +
5326
- os_1.EOL;
5314
+ response += wrapWithPadding(infoMessage(orgSettings), 80) + os_1.EOL;
5327
5315
  return response;
5328
5316
  }
5317
+ function wrapWithPadding(s, columns) {
5318
+ return wrapAnsi(s, columns)
5319
+ .split('\n')
5320
+ .map((s) => utils_1.contentPadding + s)
5321
+ .join('\n');
5322
+ }
5323
+ function infoMessage(orgSettings) {
5324
+ return `Your organization ${orgSettings.meta.org} is using Integrated IaC. To switch to Current IaC, use --org=<ORG_ID> to select a different organization. For more information about Integrated IaC, see https://snyk.co/integrated-iac.`;
5325
+ }
5329
5326
  function assertHasSuccessfulScans(scanResult, responseData, options) {
5330
5327
  var _a, _b, _c;
5331
5328
  const hasResources = !!((_b = (_a = scanResult.results) === null || _a === void 0 ? void 0 : _a.resources) === null || _b === void 0 ? void 0 : _b.length);