@awsless/awsless 0.0.109 → 0.0.110
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 +25 -21
- package/dist/features/cognito-client-secret/bundle.zip +0 -0
- package/dist/features/delete-bucket/bundle.zip +0 -0
- package/dist/features/delete-hosted-zone/bundle.zip +0 -0
- package/dist/features/global-exports/bundle.zip +0 -0
- package/dist/features/invalidate-cache/bundle.zip +0 -0
- package/dist/features/upload-bucket-asset/bundle.zip +0 -0
- package/package.json +4 -3
package/dist/bin.js
CHANGED
|
@@ -995,7 +995,7 @@ import { join as join2 } from "path";
|
|
|
995
995
|
import { createHash as createHash2 } from "crypto";
|
|
996
996
|
import { readFile, readdir, stat as stat2 } from "fs/promises";
|
|
997
997
|
import { basename, dirname as dirname2, extname, join } from "path";
|
|
998
|
-
import
|
|
998
|
+
import parseStaticImports from "parse-static-imports";
|
|
999
999
|
var extensions = ["js", "mjs", "jsx", "ts", "mts", "tsx"];
|
|
1000
1000
|
var generateFileHashes = async (file, hashes) => {
|
|
1001
1001
|
if (hashes.has(file)) {
|
|
@@ -1055,8 +1055,8 @@ var readFiles = async (files) => {
|
|
|
1055
1055
|
throw new Error(`No such file: ${files.join(", ")}`);
|
|
1056
1056
|
};
|
|
1057
1057
|
var findDependencies = async (file, code) => {
|
|
1058
|
-
const imports =
|
|
1059
|
-
return imports.map((entry) => entry.
|
|
1058
|
+
const imports = await parseStaticImports(code);
|
|
1059
|
+
return imports.map((entry) => entry.moduleName).filter(Boolean).map((value) => value?.startsWith(".") ? join(dirname2(file), value) : value);
|
|
1060
1060
|
};
|
|
1061
1061
|
|
|
1062
1062
|
// src/formation/resource/lambda/code.ts
|
|
@@ -8308,8 +8308,8 @@ import { startVitest } from "vitest/node";
|
|
|
8308
8308
|
import commonjs3 from "@rollup/plugin-commonjs";
|
|
8309
8309
|
import nodeResolve3 from "@rollup/plugin-node-resolve";
|
|
8310
8310
|
import { swc as swc4 } from "rollup-plugin-swc3";
|
|
8311
|
-
import { getTests } from "@vitest/runner/utils";
|
|
8312
|
-
import { basename as basename3, extname as extname2, join as join11, relative as relative4 } from "path";
|
|
8311
|
+
import { getSuites, getTests } from "@vitest/runner/utils";
|
|
8312
|
+
import { basename as basename3, dirname as dirname6, extname as extname2, join as join11, relative as relative4 } from "path";
|
|
8313
8313
|
|
|
8314
8314
|
// src/cli/ui/layout/text-box.ts
|
|
8315
8315
|
import wrapAnsi3 from "wrap-ansi";
|
|
@@ -8344,16 +8344,18 @@ var CustomReporter = class {
|
|
|
8344
8344
|
onFinished() {
|
|
8345
8345
|
clearInterval(this.interval);
|
|
8346
8346
|
this.interval = void 0;
|
|
8347
|
+
const suites = getSuites(this.tasks);
|
|
8347
8348
|
const tests = getTests(this.tasks);
|
|
8348
|
-
const
|
|
8349
|
-
const
|
|
8350
|
-
const
|
|
8349
|
+
const tasks = [...suites, ...tests];
|
|
8350
|
+
const passed = tasks.filter((t) => t.result?.state === "pass").length;
|
|
8351
|
+
const failed = tasks.filter((t) => t.result?.state === "fail").length;
|
|
8352
|
+
const errors = [...suites, ...tests].map((test2) => {
|
|
8351
8353
|
if (!test2.result?.errors || test2.result.errors.length === 0) {
|
|
8352
8354
|
return [];
|
|
8353
8355
|
}
|
|
8354
8356
|
return test2.result.errors.map((error) => ({
|
|
8355
|
-
file: test2.file?.name,
|
|
8356
|
-
test: test2.name,
|
|
8357
|
+
file: test2.type === "suite" ? test2.name : test2.file?.name,
|
|
8358
|
+
test: test2.type === "test" ? test2.name : void 0,
|
|
8357
8359
|
diff: error.showDiff && error.diff ? error.diff : void 0,
|
|
8358
8360
|
type: error.name,
|
|
8359
8361
|
message: error.message
|
|
@@ -8396,8 +8398,10 @@ var singleTester = (stack, dir) => {
|
|
|
8396
8398
|
path = join11(process.cwd(), path);
|
|
8397
8399
|
path = relative4(dir, path);
|
|
8398
8400
|
const ext = extname2(path);
|
|
8399
|
-
const
|
|
8400
|
-
|
|
8401
|
+
const name = basename3(path, ext);
|
|
8402
|
+
const base = dirname6(path);
|
|
8403
|
+
const start = base === "." ? "" : style.placeholder(base + "/");
|
|
8404
|
+
return `${start}${name}${style.placeholder(ext)}`;
|
|
8401
8405
|
};
|
|
8402
8406
|
const formatLogs = (logs2, width) => {
|
|
8403
8407
|
const length2 = logs2.length;
|
|
@@ -8408,14 +8412,14 @@ var singleTester = (stack, dir) => {
|
|
|
8408
8412
|
const lineSize = (width - 2) / 2 - header2.length / 2;
|
|
8409
8413
|
return [
|
|
8410
8414
|
" ",
|
|
8411
|
-
style.
|
|
8412
|
-
style.
|
|
8413
|
-
style.
|
|
8415
|
+
style.info(symbol.line.repeat(lineSize)),
|
|
8416
|
+
style.info.inverse.bold(header2),
|
|
8417
|
+
style.info(symbol.line.repeat(lineSize + (header2.length % 2 ? 0 : 1))),
|
|
8414
8418
|
br(),
|
|
8415
8419
|
br(),
|
|
8416
8420
|
...logs2.map((log) => {
|
|
8417
8421
|
return [
|
|
8418
|
-
textWrap([style.
|
|
8422
|
+
textWrap([style.info(`${symbol.dot} `), log].join(""), width, {
|
|
8419
8423
|
skipFirstLine: true,
|
|
8420
8424
|
indent: 2
|
|
8421
8425
|
}),
|
|
@@ -8441,11 +8445,14 @@ var singleTester = (stack, dir) => {
|
|
|
8441
8445
|
...errors.map((error, i) => {
|
|
8442
8446
|
const [message, ...comment] = error.message.split("//");
|
|
8443
8447
|
const errorMessage = [
|
|
8444
|
-
style.error
|
|
8448
|
+
style.error.bold(error.type + ":"),
|
|
8449
|
+
" ",
|
|
8450
|
+
message,
|
|
8445
8451
|
comment.length > 0 ? style.placeholder(`//${comment}`) : "",
|
|
8446
8452
|
br()
|
|
8447
8453
|
].join("");
|
|
8448
8454
|
const pagination = `[${i + 1}/${length2}]${symbol.line}`;
|
|
8455
|
+
const name = error.test ? [" ", style.placeholder(symbol.pointerSmall), " ", error.test] : [];
|
|
8449
8456
|
return [
|
|
8450
8457
|
br(),
|
|
8451
8458
|
style.error(`${symbol.error} `),
|
|
@@ -8454,10 +8461,7 @@ var singleTester = (stack, dir) => {
|
|
|
8454
8461
|
style.placeholder(symbol.pointerSmall),
|
|
8455
8462
|
" ",
|
|
8456
8463
|
formatFileName(error.file),
|
|
8457
|
-
|
|
8458
|
-
style.placeholder(symbol.pointerSmall),
|
|
8459
|
-
" ",
|
|
8460
|
-
error.test,
|
|
8464
|
+
...name,
|
|
8461
8465
|
br(),
|
|
8462
8466
|
br(),
|
|
8463
8467
|
textWrap(errorMessage, width, { indent: 2 }),
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@awsless/awsless",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.110",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -27,9 +27,9 @@
|
|
|
27
27
|
"@awsless/lambda": "^0.0.13",
|
|
28
28
|
"@awsless/redis": "^0.0.8",
|
|
29
29
|
"@awsless/sns": "^0.0.7",
|
|
30
|
-
"@awsless/validate": "^0.0.7",
|
|
31
30
|
"@awsless/sqs": "^0.0.7",
|
|
32
|
-
"@awsless/ssm": "^0.0.7"
|
|
31
|
+
"@awsless/ssm": "^0.0.7",
|
|
32
|
+
"@awsless/validate": "^0.0.7"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"@aws-appsync/utils": "^1.5.0",
|
|
@@ -67,6 +67,7 @@
|
|
|
67
67
|
"jszip": "^3.10.1",
|
|
68
68
|
"mime-types": "^2.1.35",
|
|
69
69
|
"parse-imports": "^1.1.2",
|
|
70
|
+
"parse-static-imports": "^1.1.0",
|
|
70
71
|
"pretty-hrtime": "^1.0.3",
|
|
71
72
|
"rollup": "^4.0.2",
|
|
72
73
|
"rollup-plugin-replace": "^2.2.0",
|