@awsless/awsless 0.0.634 → 0.0.636
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 +28 -32
- package/dist/prebuild/icon/HASH +1 -1
- package/dist/prebuild/icon/bundle.zip +0 -0
- package/dist/prebuild/image/HASH +1 -1
- package/dist/prebuild/image/bundle.zip +0 -0
- package/dist/prebuild/rpc/HASH +1 -1
- package/dist/prebuild/rpc/bundle.zip +0 -0
- package/dist/prebuild.js +17 -39
- package/package.json +13 -41
package/dist/bin.js
CHANGED
|
@@ -2599,8 +2599,8 @@ var validateConfig = async (schema, file, data) => {
|
|
|
2599
2599
|
// src/config/load/read.ts
|
|
2600
2600
|
var readConfig = async (file) => {
|
|
2601
2601
|
try {
|
|
2602
|
-
const
|
|
2603
|
-
const data = Bun.JSON5.parse(
|
|
2602
|
+
const json = await readFile2(file, "utf8");
|
|
2603
|
+
const data = Bun.JSON5.parse(json);
|
|
2604
2604
|
return data;
|
|
2605
2605
|
} catch (error) {
|
|
2606
2606
|
if (error instanceof Error) {
|
|
@@ -3923,7 +3923,7 @@ var createLambdaFunction = (parentGroup, ctx, ns, id, local) => {
|
|
|
3923
3923
|
var createAsyncLambdaFunction = (group, ctx, ns, id, local) => {
|
|
3924
3924
|
const result = createLambdaFunction(group, ctx, ns, id, { ...local, warm: 0 });
|
|
3925
3925
|
const props = deepmerge(ctx.appConfig.defaults.function, local);
|
|
3926
|
-
result.setEnvironment("
|
|
3926
|
+
result.setEnvironment("THROW_EXPECTED_ERRORS", "1");
|
|
3927
3927
|
const onFailure = getGlobalOnFailure(ctx);
|
|
3928
3928
|
new aws4.lambda.FunctionEventInvokeConfig(
|
|
3929
3929
|
group,
|
|
@@ -4683,7 +4683,7 @@ var queueFeature = defineFeature({
|
|
|
4683
4683
|
});
|
|
4684
4684
|
if (typeof local === "object") {
|
|
4685
4685
|
const lambdaConsumer = createLambdaFunction(group, ctx, `queue`, id, local.consumer);
|
|
4686
|
-
lambdaConsumer.setEnvironment("
|
|
4686
|
+
lambdaConsumer.setEnvironment("THROW_EXPECTED_ERRORS", "1");
|
|
4687
4687
|
new aws11.lambda.EventSourceMapping(
|
|
4688
4688
|
group,
|
|
4689
4689
|
"event",
|
|
@@ -5895,7 +5895,7 @@ var tableFeature = defineFeature({
|
|
|
5895
5895
|
);
|
|
5896
5896
|
if (props.stream) {
|
|
5897
5897
|
const result = createLambdaFunction(group, ctx, "table", id, props.stream.consumer);
|
|
5898
|
-
result.setEnvironment("
|
|
5898
|
+
result.setEnvironment("THROW_EXPECTED_ERRORS", "1");
|
|
5899
5899
|
const onFailure = getGlobalOnFailure(ctx);
|
|
5900
5900
|
new aws18.lambda.EventSourceMapping(
|
|
5901
5901
|
group,
|
|
@@ -8965,11 +8965,7 @@ import { parse as parse4, stringify } from "@awsless/json";
|
|
|
8965
8965
|
import { generateFolderHash, loadWorkspace as loadWorkspace2 } from "@awsless/ts-file-cache";
|
|
8966
8966
|
|
|
8967
8967
|
// src/test/start.ts
|
|
8968
|
-
import commonjs from "@rollup/plugin-commonjs";
|
|
8969
|
-
import json from "@rollup/plugin-json";
|
|
8970
|
-
import nodeResolve from "@rollup/plugin-node-resolve";
|
|
8971
8968
|
import { dirname as dirname9, join as join17 } from "path";
|
|
8972
|
-
import { swc } from "rollup-plugin-swc3";
|
|
8973
8969
|
import { fileURLToPath as fileURLToPath4 } from "url";
|
|
8974
8970
|
import { configDefaults } from "vitest/config";
|
|
8975
8971
|
import { startVitest } from "vitest/node";
|
|
@@ -9031,19 +9027,19 @@ var startTest = async (props) => {
|
|
|
9031
9027
|
{
|
|
9032
9028
|
logLevel: "silent",
|
|
9033
9029
|
plugins: [
|
|
9034
|
-
// @ts-ignore
|
|
9035
|
-
commonjs({ sourceMap: true }),
|
|
9036
|
-
// @ts-ignore
|
|
9037
|
-
nodeResolve({ preferBuiltins: true }),
|
|
9038
|
-
swc({
|
|
9039
|
-
|
|
9040
|
-
|
|
9041
|
-
|
|
9042
|
-
|
|
9043
|
-
|
|
9044
|
-
}),
|
|
9045
|
-
// @ts-ignore
|
|
9046
|
-
json()
|
|
9030
|
+
// // @ts-ignore
|
|
9031
|
+
// commonjs({ sourceMap: true }),
|
|
9032
|
+
// // @ts-ignore
|
|
9033
|
+
// nodeResolve({ preferBuiltins: true }),
|
|
9034
|
+
// swc({
|
|
9035
|
+
// jsc: {
|
|
9036
|
+
// // baseUrl: dirname(input),
|
|
9037
|
+
// minify: { sourceMap: true },
|
|
9038
|
+
// },
|
|
9039
|
+
// sourceMaps: true,
|
|
9040
|
+
// }),
|
|
9041
|
+
// // @ts-ignore
|
|
9042
|
+
// json(),
|
|
9047
9043
|
]
|
|
9048
9044
|
}
|
|
9049
9045
|
);
|
|
@@ -10370,28 +10366,28 @@ var formatLog = (level, date, group, message) => {
|
|
|
10370
10366
|
);
|
|
10371
10367
|
};
|
|
10372
10368
|
var parseJsonLog = (message) => {
|
|
10373
|
-
let
|
|
10369
|
+
let json;
|
|
10374
10370
|
try {
|
|
10375
|
-
|
|
10371
|
+
json = JSON.parse(message);
|
|
10376
10372
|
} catch (error) {
|
|
10377
10373
|
}
|
|
10378
|
-
if ("level" in
|
|
10374
|
+
if ("level" in json && typeof json.level === "string" && "timestamp" in json && typeof json.timestamp === "string" && "message" in json) {
|
|
10379
10375
|
return {
|
|
10380
|
-
level:
|
|
10381
|
-
message: typeof
|
|
10382
|
-
date: new Date(
|
|
10376
|
+
level: json.level,
|
|
10377
|
+
message: typeof json.message === "string" ? json.message : JSON.stringify(json.message, void 0, 2),
|
|
10378
|
+
date: new Date(json.timestamp)
|
|
10383
10379
|
};
|
|
10384
10380
|
}
|
|
10385
|
-
if ("type" in
|
|
10381
|
+
if ("type" in json && typeof json.type === "string" && json.type.startsWith("platform") && "time" in json && typeof json.time === "string" && "record" in json) {
|
|
10386
10382
|
return {
|
|
10387
10383
|
level: "SYSTEM",
|
|
10388
|
-
message: JSON.stringify(
|
|
10389
|
-
date: new Date(
|
|
10384
|
+
message: JSON.stringify(json.record, void 0, 2),
|
|
10385
|
+
date: new Date(json.time)
|
|
10390
10386
|
};
|
|
10391
10387
|
}
|
|
10392
10388
|
return {
|
|
10393
10389
|
level: "INFO",
|
|
10394
|
-
message: JSON.stringify(
|
|
10390
|
+
message: JSON.stringify(json, void 0, 2)
|
|
10395
10391
|
};
|
|
10396
10392
|
};
|
|
10397
10393
|
|
package/dist/prebuild/icon/HASH
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
73b3439fb155315b972518d0d736d72eae472234
|
|
Binary file
|
package/dist/prebuild/image/HASH
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
a8a0c621098150215b693d66e3304f6d4ae1db1b
|
|
Binary file
|
package/dist/prebuild/rpc/HASH
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
0a9ac239bd887ff2a80174c8e335813a8349852a
|
|
Binary file
|
package/dist/prebuild.js
CHANGED
|
@@ -11,16 +11,10 @@ import { pascalCase } from "change-case";
|
|
|
11
11
|
import { writeFile } from "fs/promises";
|
|
12
12
|
import { join } from "path";
|
|
13
13
|
|
|
14
|
-
// src/feature/function/build/typescript/
|
|
15
|
-
import commonjs from "@rollup/plugin-commonjs";
|
|
16
|
-
import json from "@rollup/plugin-json";
|
|
17
|
-
import nodeResolve from "@rollup/plugin-node-resolve";
|
|
14
|
+
// src/feature/function/build/typescript/rolldown.ts
|
|
18
15
|
import { createHash } from "crypto";
|
|
19
|
-
import {
|
|
20
|
-
import { rollup } from "rollup";
|
|
21
|
-
import natives from "rollup-plugin-natives";
|
|
16
|
+
import { rolldown } from "rolldown";
|
|
22
17
|
import { importAsString } from "rollup-plugin-string-import";
|
|
23
|
-
import { swc, minify as swcMinify } from "rollup-plugin-swc3";
|
|
24
18
|
|
|
25
19
|
// src/cli/ui/style.ts
|
|
26
20
|
import chalk from "chalk";
|
|
@@ -51,8 +45,8 @@ var debugError = (error) => {
|
|
|
51
45
|
});
|
|
52
46
|
};
|
|
53
47
|
|
|
54
|
-
// src/feature/function/build/typescript/
|
|
55
|
-
var
|
|
48
|
+
// src/feature/function/build/typescript/rolldown.ts
|
|
49
|
+
var bundleTypeScriptWithRolldown = async ({
|
|
56
50
|
format = "esm",
|
|
57
51
|
minify = true,
|
|
58
52
|
file,
|
|
@@ -60,8 +54,9 @@ var bundleTypeScript = async ({
|
|
|
60
54
|
external,
|
|
61
55
|
importAsString: importAsStringList
|
|
62
56
|
}) => {
|
|
63
|
-
const bundle = await
|
|
57
|
+
const bundle = await rolldown({
|
|
64
58
|
input: file,
|
|
59
|
+
platform: "node",
|
|
65
60
|
external: (importee) => {
|
|
66
61
|
return importee.startsWith("@aws-sdk") || importee.startsWith("aws-sdk") || external?.includes(importee);
|
|
67
62
|
},
|
|
@@ -69,33 +64,17 @@ var bundleTypeScript = async ({
|
|
|
69
64
|
debugError(error.message);
|
|
70
65
|
},
|
|
71
66
|
treeshake: {
|
|
72
|
-
preset: "smallest",
|
|
73
67
|
moduleSideEffects: (id) => file === id
|
|
74
68
|
},
|
|
75
69
|
plugins: [
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
//
|
|
79
|
-
nativeDir
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
swc({
|
|
85
|
-
// minify,
|
|
86
|
-
// module: true,
|
|
87
|
-
jsc: {
|
|
88
|
-
baseUrl: dirname(file),
|
|
89
|
-
minify: { sourceMap: true }
|
|
90
|
-
},
|
|
91
|
-
sourceMaps: true
|
|
92
|
-
}),
|
|
93
|
-
minify ? swcMinify({
|
|
94
|
-
module: format === "esm",
|
|
95
|
-
sourceMap: true,
|
|
96
|
-
compress: true
|
|
97
|
-
}) : void 0,
|
|
98
|
-
json(),
|
|
70
|
+
// nodeResolve({ preferBuiltins: true }),
|
|
71
|
+
// nativeDir
|
|
72
|
+
// ? natives({
|
|
73
|
+
// copyTo: nativeDir,
|
|
74
|
+
// targetEsm: format === 'esm',
|
|
75
|
+
// sourcemap: true,
|
|
76
|
+
// })
|
|
77
|
+
// : undefined,
|
|
99
78
|
importAsStringList ? importAsString({
|
|
100
79
|
include: importAsStringList
|
|
101
80
|
}) : void 0
|
|
@@ -106,9 +85,9 @@ var bundleTypeScript = async ({
|
|
|
106
85
|
format,
|
|
107
86
|
sourcemap: "hidden",
|
|
108
87
|
exports: "auto",
|
|
109
|
-
manualChunks: {},
|
|
110
88
|
entryFileNames: `index.${ext}`,
|
|
111
|
-
chunkFileNames: `[name].${ext}
|
|
89
|
+
chunkFileNames: `[name].${ext}`,
|
|
90
|
+
minify
|
|
112
91
|
});
|
|
113
92
|
const hash = createHash("sha1");
|
|
114
93
|
const files = [];
|
|
@@ -118,7 +97,6 @@ var bundleTypeScript = async ({
|
|
|
118
97
|
}
|
|
119
98
|
const code = Buffer.from(item.code, "utf8");
|
|
120
99
|
const map = item.map ? Buffer.from(item.map.toString(), "utf8") : void 0;
|
|
121
|
-
item.map?.version;
|
|
122
100
|
hash.update(code);
|
|
123
101
|
files.push({
|
|
124
102
|
name: item.fileName,
|
|
@@ -155,7 +133,7 @@ var zipFiles = (files) => {
|
|
|
155
133
|
|
|
156
134
|
// src/feature/function/prebuild.ts
|
|
157
135
|
var prebuild = async (file, output, external = []) => {
|
|
158
|
-
const bundle = await
|
|
136
|
+
const bundle = await bundleTypeScriptWithRolldown({
|
|
159
137
|
file,
|
|
160
138
|
minify: true,
|
|
161
139
|
external
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@awsless/awsless",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.636",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -34,26 +34,24 @@
|
|
|
34
34
|
},
|
|
35
35
|
"peerDependencies": {
|
|
36
36
|
"@awsless/big-float": "^0.1.5",
|
|
37
|
+
"@awsless/clui": "^0.0.8",
|
|
38
|
+
"@awsless/duration": "^0.0.4",
|
|
37
39
|
"@awsless/cloudwatch": "^0.0.1",
|
|
38
|
-
"@awsless/
|
|
40
|
+
"@awsless/dynamodb": "^0.3.14",
|
|
41
|
+
"@awsless/lambda": "^0.0.37",
|
|
39
42
|
"@awsless/json": "^0.0.11",
|
|
40
|
-
"@awsless/
|
|
41
|
-
"@awsless/lambda": "^0.0.36",
|
|
43
|
+
"@awsless/iot": "^0.0.3",
|
|
42
44
|
"@awsless/s3": "^0.0.21",
|
|
43
45
|
"@awsless/sns": "^0.0.10",
|
|
44
|
-
"@awsless/
|
|
46
|
+
"@awsless/sqs": "^0.0.16",
|
|
45
47
|
"@awsless/validate": "^0.1.5",
|
|
46
|
-
"@awsless/redis": "^0.0.14",
|
|
47
|
-
"@awsless/duration": "^0.0.4",
|
|
48
|
-
"@awsless/ssm": "^0.0.7",
|
|
49
48
|
"@awsless/mqtt": "^0.0.2",
|
|
50
|
-
"@awsless/
|
|
49
|
+
"@awsless/redis": "^0.0.14",
|
|
51
50
|
"@awsless/open-search": "^0.0.21",
|
|
51
|
+
"@awsless/ssm": "^0.0.7",
|
|
52
52
|
"@awsless/weak-cache": "^0.0.1"
|
|
53
53
|
},
|
|
54
54
|
"dependencies": {
|
|
55
|
-
"@arcanyx/cidr-slicer": "^0.3.0",
|
|
56
|
-
"@aws-appsync/utils": "^1.5.0",
|
|
57
55
|
"@aws-sdk/client-cloudformation": "^3.369.0",
|
|
58
56
|
"@aws-sdk/client-cloudfront": "^3.991.0",
|
|
59
57
|
"@aws-sdk/client-cloudfront-keyvaluestore": "^3.817.0",
|
|
@@ -69,25 +67,16 @@
|
|
|
69
67
|
"@aws-sdk/lib-storage": "^3.423.0",
|
|
70
68
|
"@aws-sdk/signature-v4-crt": "^3.816.0",
|
|
71
69
|
"@clack/prompts": "^0.7.0",
|
|
72
|
-
"@graphql-tools/merge": "^9.0.0",
|
|
73
|
-
"@rollup/plugin-commonjs": "^25.0.5",
|
|
74
|
-
"@rollup/plugin-json": "^6.0.1",
|
|
75
|
-
"@rollup/plugin-node-resolve": "^15.2.3",
|
|
76
|
-
"@swc/core": "^1.3.70",
|
|
77
70
|
"@terraforge/aws": "^6.35.1",
|
|
78
71
|
"@terraforge/core": "^0.0.22",
|
|
79
72
|
"@terraforge/terraform": "^0.0.19",
|
|
80
73
|
"@types/aws-lambda": "^8.10.110",
|
|
81
74
|
"@types/bun": "1.3.10",
|
|
82
75
|
"@types/chunk": "^0.0.0",
|
|
83
|
-
"@types/decompress": "^4.2.4",
|
|
84
76
|
"@types/folder-hash": "^4.0.4",
|
|
85
77
|
"@types/mime-types": "^2.1.2",
|
|
86
|
-
"@types/minimist": "^1.2.5",
|
|
87
78
|
"@types/play-sound": "^1.1.2",
|
|
88
79
|
"@types/pretty-hrtime": "^1.0.1",
|
|
89
|
-
"@types/promise-dag": "^1.0.4",
|
|
90
|
-
"@types/rollup-plugin-natives": "^0.7.5",
|
|
91
80
|
"@types/uuid": "^9.0.0",
|
|
92
81
|
"@types/wildstring": "^1.0.3",
|
|
93
82
|
"@vitest/runner": "^3.1.4",
|
|
@@ -101,54 +90,37 @@
|
|
|
101
90
|
"cli-table3": "^0.6.4",
|
|
102
91
|
"commander": "^9.4.1",
|
|
103
92
|
"date-fns": "^4.1.0",
|
|
104
|
-
"decompress": "^4.2.1",
|
|
105
93
|
"deepmerge": "^4.3.1",
|
|
106
|
-
"event-iterator": "^2.0.0",
|
|
107
94
|
"fast-json-patch": "^3.1.1",
|
|
108
|
-
"fastq": "^1.16.0",
|
|
109
95
|
"filesize": "^10.0.7",
|
|
110
96
|
"folder-hash": "^4.0.4",
|
|
111
97
|
"glob": "^10.3.9",
|
|
112
|
-
"graphql": "^16.7.1",
|
|
113
98
|
"json5": "^2.2.3",
|
|
114
99
|
"jszip": "^3.10.1",
|
|
115
100
|
"mime-types": "^2.1.35",
|
|
116
|
-
"minimist": "^1.2.8",
|
|
117
|
-
"node-docker-api": "^1.1.22",
|
|
118
101
|
"p-limit": "7.2.0",
|
|
119
|
-
"parse-imports": "^1.1.2",
|
|
120
|
-
"parse-static-imports": "^1.1.0",
|
|
121
102
|
"play-sound": "^1.1.6",
|
|
122
103
|
"pretty-hrtime": "^1.0.3",
|
|
123
|
-
"promise-dag": "^1.0.0",
|
|
124
|
-
"promisify-child-process": "^4.1.2",
|
|
125
104
|
"rolldown": "1.0.0-rc.3",
|
|
126
|
-
"rollup": "^4.18.0",
|
|
127
|
-
"rollup-plugin-natives": "^0.7.8",
|
|
128
|
-
"rollup-plugin-replace": "^2.2.0",
|
|
129
105
|
"rollup-plugin-string-import": "1.2.6",
|
|
130
|
-
"rollup-plugin-swc3": "^0.11.2",
|
|
131
106
|
"svgo": "^4.0.0",
|
|
132
107
|
"svgstore": "^3.0.1",
|
|
133
|
-
"tsx": "^4.15.5",
|
|
134
108
|
"type-fest": "^4.20.1",
|
|
135
109
|
"uuid": "^9.0.0",
|
|
136
|
-
"
|
|
137
|
-
"vitest": "^4.0.18",
|
|
110
|
+
"vitest": "^4.1.0",
|
|
138
111
|
"wildstring": "^1.0.9",
|
|
139
112
|
"wrap-ansi": "^8.1.0",
|
|
140
113
|
"zip-a-folder": "^3.1.6",
|
|
141
114
|
"zod": "^3.24.2",
|
|
142
115
|
"zod-to-json-schema": "^3.24.3",
|
|
143
|
-
"@awsless/cloudwatch": "^0.0.1",
|
|
144
116
|
"@awsless/big-float": "^0.1.5",
|
|
117
|
+
"@awsless/cloudwatch": "^0.0.1",
|
|
145
118
|
"@awsless/duration": "^0.0.4",
|
|
119
|
+
"@awsless/json": "^0.0.11",
|
|
120
|
+
"@awsless/ts-file-cache": "^0.0.12",
|
|
146
121
|
"@awsless/size": "^0.0.2",
|
|
147
|
-
"@awsless/graphql": "^0.0.9",
|
|
148
122
|
"@awsless/validate": "^0.1.5",
|
|
149
123
|
"@awsless/clui": "^0.0.8",
|
|
150
|
-
"@awsless/json": "^0.0.11",
|
|
151
|
-
"@awsless/ts-file-cache": "^0.0.12",
|
|
152
124
|
"@awsless/scheduler": "^0.0.4"
|
|
153
125
|
},
|
|
154
126
|
"devDependencies": {
|