@effortless-aws/cli 0.9.0 → 0.9.1
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/cli/index.js +5 -2
- package/package.json +1 -1
package/dist/cli/index.js
CHANGED
|
@@ -4433,6 +4433,7 @@ var bundle = (input) => Effect24.gen(function* () {
|
|
|
4433
4433
|
const awsExternals = ["@aws-sdk/*", "@smithy/*"];
|
|
4434
4434
|
const nodeExternals = builtinModules.flatMap((m) => [m, `node:${m}`]);
|
|
4435
4435
|
const allExternals = [.../* @__PURE__ */ new Set([...awsExternals, ...nodeExternals, ...externals])];
|
|
4436
|
+
const format = input.format ?? "esm";
|
|
4436
4437
|
const result = yield* Effect24.tryPromise({
|
|
4437
4438
|
try: () => esbuild.build({
|
|
4438
4439
|
stdin: {
|
|
@@ -4446,9 +4447,11 @@ var bundle = (input) => Effect24.gen(function* () {
|
|
|
4446
4447
|
write: false,
|
|
4447
4448
|
minify: false,
|
|
4448
4449
|
sourcemap: false,
|
|
4449
|
-
format
|
|
4450
|
+
format,
|
|
4450
4451
|
external: allExternals,
|
|
4451
|
-
metafile: true
|
|
4452
|
+
metafile: true,
|
|
4453
|
+
// CJS packages bundled into ESM need a `require` function for Node.js builtins
|
|
4454
|
+
...format === "esm" ? { banner: { js: "import { createRequire } from 'module'; const require = createRequire(import.meta.url);" } } : {}
|
|
4452
4455
|
}),
|
|
4453
4456
|
catch: (error) => new Error(`esbuild failed: ${error}`)
|
|
4454
4457
|
});
|