@awsless/awsless 0.0.612 → 0.0.614
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 +21 -22
- package/dist/prebuild/icon/bundle.zip +0 -0
- package/dist/prebuild/image/bundle.zip +0 -0
- package/dist/prebuild/rpc/bundle.zip +0 -0
- package/package.json +14 -14
package/dist/bin.js
CHANGED
|
@@ -3188,25 +3188,24 @@ import { toMebibytes as toMebibytes2 } from "@awsless/size";
|
|
|
3188
3188
|
import { pascalCase } from "change-case";
|
|
3189
3189
|
|
|
3190
3190
|
// src/util/cache.ts
|
|
3191
|
-
import { createHash } from "node:crypto";
|
|
3192
|
-
import { createReadStream as createReadStream2 } from "node:fs";
|
|
3193
3191
|
import { lstat as lstat2, readdir } from "node:fs/promises";
|
|
3194
3192
|
import { join as join7 } from "node:path";
|
|
3195
3193
|
var generateCacheKey = async (directories2) => {
|
|
3196
3194
|
const files = await listAllFiles(directories2);
|
|
3195
|
+
const sortedFiles = files.toSorted();
|
|
3197
3196
|
const hashes = {};
|
|
3198
|
-
for (const file of
|
|
3197
|
+
for (const file of sortedFiles) {
|
|
3199
3198
|
hashes[file] = await createHashFromFile(file);
|
|
3200
3199
|
}
|
|
3201
|
-
return
|
|
3200
|
+
return Bun.MD5.hash(JSON.stringify(hashes), "hex");
|
|
3202
3201
|
};
|
|
3203
|
-
var createHashFromFile = (
|
|
3204
|
-
|
|
3205
|
-
|
|
3206
|
-
|
|
3207
|
-
|
|
3208
|
-
|
|
3209
|
-
|
|
3202
|
+
var createHashFromFile = async (filePath) => {
|
|
3203
|
+
const hasher = new Bun.MD5();
|
|
3204
|
+
const stream = Bun.file(filePath).stream();
|
|
3205
|
+
for await (const chunk3 of stream) {
|
|
3206
|
+
hasher.update(chunk3);
|
|
3207
|
+
}
|
|
3208
|
+
return hasher.digest("hex");
|
|
3210
3209
|
};
|
|
3211
3210
|
var listAllFiles = async (list3) => {
|
|
3212
3211
|
const files = [];
|
|
@@ -3217,7 +3216,7 @@ var listAllFiles = async (list3) => {
|
|
|
3217
3216
|
recursive: true,
|
|
3218
3217
|
withFileTypes: true
|
|
3219
3218
|
});
|
|
3220
|
-
files.push(...dirents.filter((d) => d.isFile()).map((file) => join7(file.
|
|
3219
|
+
files.push(...dirents.filter((d) => d.isFile()).map((file) => join7(file.parentPath, file.name)));
|
|
3221
3220
|
} else if (stat4.isFile()) {
|
|
3222
3221
|
files.push(entry);
|
|
3223
3222
|
}
|
|
@@ -3226,9 +3225,9 @@ var listAllFiles = async (list3) => {
|
|
|
3226
3225
|
};
|
|
3227
3226
|
|
|
3228
3227
|
// src/util/id.ts
|
|
3229
|
-
import { createHash
|
|
3228
|
+
import { createHash } from "crypto";
|
|
3230
3229
|
var shortId = (ns) => {
|
|
3231
|
-
return
|
|
3230
|
+
return createHash("md5").update(ns).digest("hex").substring(0, 10);
|
|
3232
3231
|
};
|
|
3233
3232
|
|
|
3234
3233
|
// src/util/temp.ts
|
|
@@ -3264,7 +3263,7 @@ var formatFilterPattern = (filters) => {
|
|
|
3264
3263
|
|
|
3265
3264
|
// src/feature/function/build/bundle/bundle.ts
|
|
3266
3265
|
import JSZip2 from "jszip";
|
|
3267
|
-
import { createReadStream as
|
|
3266
|
+
import { createReadStream as createReadStream2 } from "node:fs";
|
|
3268
3267
|
import { readdir as readdir3 } from "node:fs/promises";
|
|
3269
3268
|
import { join as join9, relative as relative2 } from "node:path";
|
|
3270
3269
|
var zipBundle = async ({ directory }) => {
|
|
@@ -3277,7 +3276,7 @@ var zipBundle = async ({ directory }) => {
|
|
|
3277
3276
|
if (file.isFile()) {
|
|
3278
3277
|
const path = join9(file.path, file.name);
|
|
3279
3278
|
const rel = relative2(directory, path);
|
|
3280
|
-
zip.file(rel,
|
|
3279
|
+
zip.file(rel, createReadStream2(path));
|
|
3281
3280
|
}
|
|
3282
3281
|
}
|
|
3283
3282
|
return zip.generateAsync({
|
|
@@ -3290,7 +3289,7 @@ var zipBundle = async ({ directory }) => {
|
|
|
3290
3289
|
};
|
|
3291
3290
|
|
|
3292
3291
|
// src/feature/function/build/typescript/rolldown.ts
|
|
3293
|
-
import { createHash as
|
|
3292
|
+
import { createHash as createHash2 } from "crypto";
|
|
3294
3293
|
import { rolldown } from "rolldown";
|
|
3295
3294
|
import { importAsString } from "rollup-plugin-string-import";
|
|
3296
3295
|
var bundleTypeScriptWithRolldown = async ({
|
|
@@ -3336,7 +3335,7 @@ var bundleTypeScriptWithRolldown = async ({
|
|
|
3336
3335
|
chunkFileNames: `[name].${ext}`,
|
|
3337
3336
|
minify
|
|
3338
3337
|
});
|
|
3339
|
-
const hash =
|
|
3338
|
+
const hash = createHash2("sha1");
|
|
3340
3339
|
const files = [];
|
|
3341
3340
|
for (const item of result.output) {
|
|
3342
3341
|
if (item.type !== "chunk") {
|
|
@@ -6534,7 +6533,7 @@ import deepmerge4 from "deepmerge";
|
|
|
6534
6533
|
import { join as join16 } from "path";
|
|
6535
6534
|
|
|
6536
6535
|
// src/feature/instance/build/executable.ts
|
|
6537
|
-
import { createHash as
|
|
6536
|
+
import { createHash as createHash3 } from "crypto";
|
|
6538
6537
|
import { readFile as readFile4 } from "fs/promises";
|
|
6539
6538
|
import { join as join15 } from "path";
|
|
6540
6539
|
var buildExecutable = async (input, outputPath, architecture) => {
|
|
@@ -6561,7 +6560,7 @@ ${result.logs?.map((log30) => log30.message).join("\n")}`);
|
|
|
6561
6560
|
}
|
|
6562
6561
|
const file = await readFile4(filePath);
|
|
6563
6562
|
return {
|
|
6564
|
-
hash:
|
|
6563
|
+
hash: createHash3("sha1").update(file).update("x86_64").digest("hex"),
|
|
6565
6564
|
file
|
|
6566
6565
|
};
|
|
6567
6566
|
};
|
|
@@ -7265,7 +7264,7 @@ async function handler(event) {
|
|
|
7265
7264
|
`;
|
|
7266
7265
|
|
|
7267
7266
|
// src/feature/router/index.ts
|
|
7268
|
-
import { createHash as
|
|
7267
|
+
import { createHash as createHash4 } from "node:crypto";
|
|
7269
7268
|
var routerFeature = defineFeature({
|
|
7270
7269
|
name: "router",
|
|
7271
7270
|
onApp(ctx) {
|
|
@@ -7617,7 +7616,7 @@ var routerFeature = defineFeature({
|
|
|
7617
7616
|
version: new Future((resolve) => {
|
|
7618
7617
|
$combine(...versions).then((versions2) => {
|
|
7619
7618
|
const combined = versions2.filter((v) => !!v).sort().join(",");
|
|
7620
|
-
const version =
|
|
7619
|
+
const version = createHash4("sha1").update(combined).digest("hex");
|
|
7621
7620
|
resolve(version);
|
|
7622
7621
|
});
|
|
7623
7622
|
})
|
|
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.614",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -34,22 +34,22 @@
|
|
|
34
34
|
},
|
|
35
35
|
"peerDependencies": {
|
|
36
36
|
"@awsless/big-float": "^0.1.5",
|
|
37
|
-
"@awsless/duration": "^0.0.4",
|
|
38
37
|
"@awsless/cloudwatch": "^0.0.1",
|
|
39
38
|
"@awsless/clui": "^0.0.8",
|
|
39
|
+
"@awsless/duration": "^0.0.4",
|
|
40
40
|
"@awsless/json": "^0.0.10",
|
|
41
|
+
"@awsless/iot": "^0.0.3",
|
|
41
42
|
"@awsless/dynamodb": "^0.3.8",
|
|
42
43
|
"@awsless/lambda": "^0.0.35",
|
|
43
|
-
"@awsless/
|
|
44
|
+
"@awsless/mqtt": "^0.0.2",
|
|
45
|
+
"@awsless/redis": "^0.0.14",
|
|
46
|
+
"@awsless/open-search": "^0.0.21",
|
|
44
47
|
"@awsless/s3": "^0.0.21",
|
|
45
48
|
"@awsless/sns": "^0.0.10",
|
|
46
49
|
"@awsless/sqs": "^0.0.16",
|
|
47
|
-
"@awsless/redis": "^0.0.14",
|
|
48
|
-
"@awsless/open-search": "^0.0.21",
|
|
49
|
-
"@awsless/validate": "^0.1.3",
|
|
50
|
-
"@awsless/weak-cache": "^0.0.1",
|
|
51
50
|
"@awsless/ssm": "^0.0.7",
|
|
52
|
-
"@awsless/
|
|
51
|
+
"@awsless/weak-cache": "^0.0.1",
|
|
52
|
+
"@awsless/validate": "^0.1.3"
|
|
53
53
|
},
|
|
54
54
|
"dependencies": {
|
|
55
55
|
"@arcanyx/cidr-slicer": "^0.3.0",
|
|
@@ -78,7 +78,7 @@
|
|
|
78
78
|
"@terraforge/core": "^0.0.19",
|
|
79
79
|
"@terraforge/terraform": "^0.0.14",
|
|
80
80
|
"@types/aws-lambda": "^8.10.110",
|
|
81
|
-
"@types/bun": "1.3.
|
|
81
|
+
"@types/bun": "1.3.9",
|
|
82
82
|
"@types/chunk": "^0.0.0",
|
|
83
83
|
"@types/decompress": "^4.2.4",
|
|
84
84
|
"@types/folder-hash": "^4.0.4",
|
|
@@ -140,15 +140,15 @@
|
|
|
140
140
|
"zod": "^3.24.2",
|
|
141
141
|
"zod-to-json-schema": "^3.24.3",
|
|
142
142
|
"@awsless/big-float": "^0.1.5",
|
|
143
|
+
"@awsless/cloudwatch": "^0.0.1",
|
|
144
|
+
"@awsless/clui": "^0.0.8",
|
|
143
145
|
"@awsless/duration": "^0.0.4",
|
|
144
146
|
"@awsless/json": "^0.0.10",
|
|
145
|
-
"@awsless/
|
|
147
|
+
"@awsless/scheduler": "^0.0.4",
|
|
148
|
+
"@awsless/ts-file-cache": "^0.0.12",
|
|
146
149
|
"@awsless/graphql": "^0.0.9",
|
|
147
|
-
"@awsless/validate": "^0.1.3",
|
|
148
150
|
"@awsless/size": "^0.0.2",
|
|
149
|
-
"@awsless/
|
|
150
|
-
"@awsless/ts-file-cache": "^0.0.12",
|
|
151
|
-
"@awsless/scheduler": "^0.0.4"
|
|
151
|
+
"@awsless/validate": "^0.1.3"
|
|
152
152
|
},
|
|
153
153
|
"devDependencies": {
|
|
154
154
|
"@hono/node-server": "1.19.9",
|