@awsless/awsless 0.0.100 → 0.0.102

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/bin.js CHANGED
@@ -7243,6 +7243,19 @@ var Renderer = class {
7243
7243
  this.output.clearLine?.(1, () => resolve(void 0));
7244
7244
  });
7245
7245
  }
7246
+ // private stripEscapeCode(str: string) {
7247
+ // return str.replace(/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/g, '')
7248
+ // }
7249
+ // private chunkString(str: string, size: number): string[] {
7250
+ // const strLength: number = str.length
7251
+ // const numChunks: number = Math.ceil(strLength / size)
7252
+ // const chunks: string[] = new Array(numChunks)
7253
+ // for (let i = 0; i < numChunks; ++i) {
7254
+ // const s = i * size
7255
+ // chunks[i] = str.substring(s, s + size)
7256
+ // }
7257
+ // return chunks
7258
+ // }
7246
7259
  async flush() {
7247
7260
  clearTimeout(this.timeout);
7248
7261
  if (this.flushing) {
@@ -7265,8 +7278,8 @@ var Renderer = class {
7265
7278
  };
7266
7279
  this.unsubs.forEach((unsub) => unsub());
7267
7280
  this.unsubs = [];
7268
- const screen = walk(this.fragments).split("\n");
7269
7281
  const height = this.height();
7282
+ const screen = walk(this.fragments).split("\n");
7270
7283
  const oldSize = this.screen.length;
7271
7284
  const newSize = screen.length;
7272
7285
  const size = Math.max(oldSize, newSize);
@@ -8283,6 +8296,15 @@ import json3 from "@rollup/plugin-json";
8283
8296
  import { swc as swc4 } from "rollup-plugin-swc3";
8284
8297
  import { getTests } from "@vitest/runner/utils";
8285
8298
  import { basename as basename3, extname, join as join11, relative as relative4 } from "path";
8299
+
8300
+ // src/cli/ui/layout/text-box.ts
8301
+ import wrapAnsi3 from "wrap-ansi";
8302
+ var textBox = (text, width, { indent = 0, ...rest } = {}) => {
8303
+ const space = " ".repeat(indent);
8304
+ return wrapAnsi3(text, width + indent, rest).split(br()).map((line2) => `${space}${line2}`).join(br());
8305
+ };
8306
+
8307
+ // src/cli/ui/complex/tester.ts
8286
8308
  var CustomReporter = class {
8287
8309
  constructor(stack, out) {
8288
8310
  this.stack = stack;
@@ -8400,11 +8422,17 @@ var CustomReporter = class {
8400
8422
  br(),
8401
8423
  test2.result.errors.map((error) => {
8402
8424
  const [message, ...comment] = error.message.split("//");
8403
- const values = [
8404
- " ",
8425
+ const errorMessage = [
8405
8426
  style.error(`${style.error.bold(error.name)}: ${message}`),
8406
8427
  comment.length > 0 ? style.placeholder(`//${comment}`) : "",
8407
8428
  br()
8429
+ ].join("");
8430
+ const values = [
8431
+ textBox(errorMessage, this.out.width(), { indent: 2, hard: true })
8432
+ // ' ',
8433
+ // style.error(`${style.error.bold(error.name)}: ${message}`),
8434
+ // comment.length > 0 ? style.placeholder(`//${comment}`) : '',
8435
+ // br(),
8408
8436
  ];
8409
8437
  if (error.showDiff && error.diff) {
8410
8438
  values.push(br(), error.diff, br());
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@awsless/awsless",
3
- "version": "0.0.100",
3
+ "version": "0.0.102",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "sideEffects": false,
@@ -24,12 +24,12 @@
24
24
  }
25
25
  },
26
26
  "peerDependencies": {
27
- "@awsless/redis": "^0.0.8",
28
- "@awsless/sns": "^0.0.7",
29
27
  "@awsless/lambda": "^0.0.13",
30
28
  "@awsless/sqs": "^0.0.7",
31
- "@awsless/validate": "^0.0.6",
32
- "@awsless/ssm": "^0.0.7"
29
+ "@awsless/sns": "^0.0.7",
30
+ "@awsless/redis": "^0.0.8",
31
+ "@awsless/ssm": "^0.0.7",
32
+ "@awsless/validate": "^0.0.6"
33
33
  },
34
34
  "dependencies": {
35
35
  "@aws-appsync/utils": "^1.5.0",