@awsless/awsless 0.0.50 → 0.0.51

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.
Files changed (2) hide show
  1. package/dist/bin.js +20 -11
  2. package/package.json +2 -2
package/dist/bin.js CHANGED
@@ -841,20 +841,29 @@ var rollupBundle = ({ format: format2 = "esm", minify = true, handler = "index.d
841
841
  const result = await bundle.generate({
842
842
  format: format2,
843
843
  sourcemap: "hidden",
844
- exports: "auto"
844
+ exports: "auto",
845
+ manualChunks: {}
845
846
  });
846
- const output = result.output[0];
847
- const code = Buffer.from(output.code, "utf8");
848
- const map = output.map ? Buffer.from(output.map.toString(), "utf8") : void 0;
849
- const hash = createHash("sha1").update(code).digest("hex");
850
- return {
851
- handler,
852
- hash,
853
- files: [{
854
- name: format2 === "esm" ? "index.mjs" : "index.js",
847
+ const hash = createHash("sha1");
848
+ const files = [];
849
+ for (const item of result.output) {
850
+ if (item.type !== "chunk") {
851
+ continue;
852
+ }
853
+ const name = item.isEntry ? format2 === "esm" ? "index.mjs" : "index.js" : item.fileName;
854
+ const code = Buffer.from(item.code, "utf8");
855
+ const map = item.map ? Buffer.from(item.map.toString(), "utf8") : void 0;
856
+ hash.update(code);
857
+ files.push({
858
+ name,
855
859
  code,
856
860
  map
857
- }]
861
+ });
862
+ }
863
+ return {
864
+ handler,
865
+ hash: hash.digest("hex"),
866
+ files
858
867
  };
859
868
  };
860
869
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@awsless/awsless",
3
- "version": "0.0.50",
3
+ "version": "0.0.51",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "repository": {
@@ -24,8 +24,8 @@
24
24
  },
25
25
  "peerDependencies": {
26
26
  "@awsless/lambda": "^0.0.6",
27
- "@awsless/sns": "^0.0.6",
28
27
  "@awsless/sqs": "^0.0.6",
28
+ "@awsless/sns": "^0.0.6",
29
29
  "@awsless/ssm": "^0.0.7"
30
30
  },
31
31
  "dependencies": {