@awsless/awsless 0.0.470 → 0.0.472
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/app.json +1 -1
- package/dist/bin.js +424 -369
- package/dist/build-json-schema.js +232 -198
- package/dist/prebuild/rpc/HASH +1 -1
- package/dist/prebuild/rpc/bundle.zip +0 -0
- package/dist/prebuild.js +21 -24
- package/dist/stack.json +1 -1
- package/package.json +12 -12
package/dist/prebuild/rpc/HASH
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
19645fcec77189d7f564499303ce68d059f8305e
|
|
Binary file
|
package/dist/prebuild.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// src/prebuild.ts
|
|
2
2
|
import { mkdir } from "fs/promises";
|
|
3
|
-
import { dirname
|
|
3
|
+
import { dirname, join as join2 } from "path";
|
|
4
4
|
import { fileURLToPath } from "url";
|
|
5
5
|
|
|
6
6
|
// src/feature/function/prebuild.ts
|
|
@@ -11,15 +11,13 @@ 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";
|
|
14
|
+
// src/feature/function/build/typescript/rolldown.ts
|
|
16
15
|
import json from "@rollup/plugin-json";
|
|
17
16
|
import nodeResolve from "@rollup/plugin-node-resolve";
|
|
18
17
|
import { createHash } from "crypto";
|
|
19
|
-
import {
|
|
20
|
-
import { rollup } from "rollup";
|
|
18
|
+
import { rolldown } from "rolldown";
|
|
21
19
|
import natives from "rollup-plugin-natives";
|
|
22
|
-
import {
|
|
20
|
+
import { minify as swcMinify } from "rollup-plugin-swc3";
|
|
23
21
|
|
|
24
22
|
// src/cli/ui/style.ts
|
|
25
23
|
import chalk from "chalk";
|
|
@@ -50,15 +48,15 @@ var debugError = (error) => {
|
|
|
50
48
|
});
|
|
51
49
|
};
|
|
52
50
|
|
|
53
|
-
// src/feature/function/build/typescript/
|
|
54
|
-
var
|
|
51
|
+
// src/feature/function/build/typescript/rolldown.ts
|
|
52
|
+
var bundleTypeScriptWithRolldown = async ({
|
|
55
53
|
format = "esm",
|
|
56
54
|
minify = true,
|
|
57
55
|
file,
|
|
58
56
|
nativeDir,
|
|
59
57
|
external
|
|
60
58
|
}) => {
|
|
61
|
-
const bundle = await
|
|
59
|
+
const bundle = await rolldown({
|
|
62
60
|
input: file,
|
|
63
61
|
external: (importee) => {
|
|
64
62
|
return importee.startsWith("@aws-sdk") || importee.startsWith("aws-sdk") || external?.includes(importee);
|
|
@@ -67,27 +65,26 @@ var bundleTypeScript = async ({
|
|
|
67
65
|
debugError(error.message);
|
|
68
66
|
},
|
|
69
67
|
treeshake: {
|
|
70
|
-
preset:
|
|
68
|
+
// preset: 'smallest',
|
|
71
69
|
moduleSideEffects: (id) => file === id
|
|
72
70
|
},
|
|
73
71
|
plugins: [
|
|
74
|
-
commonjs({ sourceMap: true }),
|
|
72
|
+
// commonjs({ sourceMap: true }),
|
|
75
73
|
nodeResolve({ preferBuiltins: true }),
|
|
76
|
-
// @ts-ignore
|
|
77
74
|
nativeDir ? natives({
|
|
78
75
|
copyTo: nativeDir,
|
|
79
76
|
targetEsm: format === "esm",
|
|
80
77
|
sourcemap: true
|
|
81
78
|
}) : void 0,
|
|
82
|
-
swc({
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
}),
|
|
79
|
+
// swc({
|
|
80
|
+
// // minify,
|
|
81
|
+
// // module: true,
|
|
82
|
+
// jsc: {
|
|
83
|
+
// baseUrl: dirname(file),
|
|
84
|
+
// minify: { sourceMap: true },
|
|
85
|
+
// },
|
|
86
|
+
// sourceMaps: true,
|
|
87
|
+
// }),
|
|
91
88
|
minify ? swcMinify({
|
|
92
89
|
module: format === "esm",
|
|
93
90
|
sourceMap: true,
|
|
@@ -101,7 +98,7 @@ var bundleTypeScript = async ({
|
|
|
101
98
|
format,
|
|
102
99
|
sourcemap: "hidden",
|
|
103
100
|
exports: "auto",
|
|
104
|
-
manualChunks: {},
|
|
101
|
+
// manualChunks: {},
|
|
105
102
|
entryFileNames: `index.${ext}`,
|
|
106
103
|
chunkFileNames: `[name].${ext}`
|
|
107
104
|
});
|
|
@@ -149,7 +146,7 @@ var zipFiles = (files) => {
|
|
|
149
146
|
|
|
150
147
|
// src/feature/function/prebuild.ts
|
|
151
148
|
var prebuild = async (file, output) => {
|
|
152
|
-
const bundle = await
|
|
149
|
+
const bundle = await bundleTypeScriptWithRolldown({
|
|
153
150
|
file,
|
|
154
151
|
minify: true,
|
|
155
152
|
external: []
|
|
@@ -160,7 +157,7 @@ var prebuild = async (file, output) => {
|
|
|
160
157
|
};
|
|
161
158
|
|
|
162
159
|
// src/prebuild.ts
|
|
163
|
-
var __dirname =
|
|
160
|
+
var __dirname = dirname(fileURLToPath(import.meta.url));
|
|
164
161
|
var builds = {
|
|
165
162
|
rpc: "../src/feature/rpc/server/handle.ts"
|
|
166
163
|
};
|