@awsless/cli 0.0.40 → 0.0.41
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/app.stage.json +1 -1
- package/dist/bin.js +4 -1
- package/dist/build-json-schema.js +1 -0
- package/dist/prebuild/icon/bundle.zip +0 -0
- package/dist/prebuild/image/bundle.zip +0 -0
- package/dist/prebuild/on-error-log/bundle.zip +0 -0
- package/dist/prebuild/on-failure/bundle.zip +0 -0
- package/dist/prebuild/pubsub-publisher/bundle.zip +0 -0
- package/dist/prebuild/rpc/bundle.zip +0 -0
- package/dist/prebuild.js +2 -1
- package/dist/stack.json +1 -1
- package/dist/stack.stage.json +1 -1
- package/package.json +10 -10
package/dist/bin.js
CHANGED
|
@@ -1205,6 +1205,7 @@ var LayersSchema = z15.string().array().describe(
|
|
|
1205
1205
|
var FileCodeSchema = z15.object({
|
|
1206
1206
|
file: LocalFileSchema.describe("The file path of the function code."),
|
|
1207
1207
|
minify: MinifySchema.optional().default(true),
|
|
1208
|
+
moduleSideEffects: z15.boolean().default(false).describe(`Will flag all modules as having potential side effects.`),
|
|
1208
1209
|
external: z15.string().array().optional().describe(`A list of external packages that won't be included in the bundle.`),
|
|
1209
1210
|
importAsString: z15.string().array().optional().describe(`A list of glob patterns, which specifies the files that should be imported as string.`)
|
|
1210
1211
|
});
|
|
@@ -3734,6 +3735,7 @@ var bundleTypeScriptWithRolldown = async ({
|
|
|
3734
3735
|
file,
|
|
3735
3736
|
nativeDir,
|
|
3736
3737
|
external,
|
|
3738
|
+
moduleSideEffects,
|
|
3737
3739
|
externalAwsSdk = true,
|
|
3738
3740
|
codeSplitting = true,
|
|
3739
3741
|
importAsString: importAsStringList
|
|
@@ -3748,7 +3750,7 @@ var bundleTypeScriptWithRolldown = async ({
|
|
|
3748
3750
|
debugError(error.message);
|
|
3749
3751
|
},
|
|
3750
3752
|
treeshake: {
|
|
3751
|
-
moduleSideEffects: (id) => file === id
|
|
3753
|
+
moduleSideEffects: moduleSideEffects ? true : (id) => file === id
|
|
3752
3754
|
},
|
|
3753
3755
|
plugins: [
|
|
3754
3756
|
// nodeResolve({ preferBuiltins: true }),
|
|
@@ -3836,6 +3838,7 @@ var createLambdaFunction = (parentGroup, ctx, ns, id, local) => {
|
|
|
3836
3838
|
...fileCode.external ?? [],
|
|
3837
3839
|
...(props.layers ?? []).flatMap((id2) => ctx.shared.entry("layer", `packages`, id2))
|
|
3838
3840
|
],
|
|
3841
|
+
moduleSideEffects: fileCode.moduleSideEffects,
|
|
3839
3842
|
minify: fileCode.minify,
|
|
3840
3843
|
nativeDir: temp.path,
|
|
3841
3844
|
importAsString: fileCode.importAsString
|
|
@@ -259,6 +259,7 @@ var LayersSchema = z11.string().array().describe(
|
|
|
259
259
|
var FileCodeSchema = z11.object({
|
|
260
260
|
file: LocalFileSchema.describe("The file path of the function code."),
|
|
261
261
|
minify: MinifySchema.optional().default(true),
|
|
262
|
+
moduleSideEffects: z11.boolean().default(false).describe(`Will flag all modules as having potential side effects.`),
|
|
262
263
|
external: z11.string().array().optional().describe(`A list of external packages that won't be included in the bundle.`),
|
|
263
264
|
importAsString: z11.string().array().optional().describe(`A list of glob patterns, which specifies the files that should be imported as string.`)
|
|
264
265
|
});
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/dist/prebuild.js
CHANGED
|
@@ -51,6 +51,7 @@ var bundleTypeScriptWithRolldown = async ({
|
|
|
51
51
|
file,
|
|
52
52
|
nativeDir,
|
|
53
53
|
external,
|
|
54
|
+
moduleSideEffects,
|
|
54
55
|
externalAwsSdk = true,
|
|
55
56
|
codeSplitting = true,
|
|
56
57
|
importAsString: importAsStringList
|
|
@@ -65,7 +66,7 @@ var bundleTypeScriptWithRolldown = async ({
|
|
|
65
66
|
debugError(error.message);
|
|
66
67
|
},
|
|
67
68
|
treeshake: {
|
|
68
|
-
moduleSideEffects: (id) => file === id
|
|
69
|
+
moduleSideEffects: moduleSideEffects ? true : (id) => file === id
|
|
69
70
|
},
|
|
70
71
|
plugins: [
|
|
71
72
|
// nodeResolve({ preferBuiltins: true }),
|