smartbundle 0.7.2 → 0.7.3

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.
@@ -23,20 +23,20 @@ async function binsTask({
23
23
  if (el.fileName.endsWith(".cjs")) {
24
24
  continue;
25
25
  }
26
- const binsPath = reversedEntrypoints.get(el.facadeModuleId);
27
- if (!binsPath) {
26
+ const binsNames = reversedEntrypoints.get(el.facadeModuleId);
27
+ if (!binsNames) {
28
28
  continue;
29
29
  }
30
- for (const path$1 of binsPath) {
30
+ for (const binName of binsNames) {
31
31
  const totalPath = path.relative(outBinsDir, path.join(outDir, el.fileName));
32
- const execPath = path.join(outBinsDir, path$1);
32
+ const execPath = path.join(outBinsDir, `${binName}.js`);
33
33
  await fs.writeFile(
34
34
  execPath,
35
35
  `#!/usr/bin/env node
36
36
  import("${totalPath}");
37
37
  `
38
38
  );
39
- res.set(path.relative(outDir, execPath), path$1);
39
+ res.set(path.relative(outDir, execPath), binName);
40
40
  }
41
41
  }
42
42
  return res;
@@ -21,20 +21,20 @@ async function binsTask({
21
21
  if (el.fileName.endsWith(".cjs")) {
22
22
  continue;
23
23
  }
24
- const binsPath = reversedEntrypoints.get(el.facadeModuleId);
25
- if (!binsPath) {
24
+ const binsNames = reversedEntrypoints.get(el.facadeModuleId);
25
+ if (!binsNames) {
26
26
  continue;
27
27
  }
28
- for (const path of binsPath) {
28
+ for (const binName of binsNames) {
29
29
  const totalPath = relative(outBinsDir, join(outDir, el.fileName));
30
- const execPath = join(outBinsDir, path);
30
+ const execPath = join(outBinsDir, `${binName}.js`);
31
31
  await writeFile(
32
32
  execPath,
33
33
  `#!/usr/bin/env node
34
34
  import("${totalPath}");
35
35
  `
36
36
  );
37
- res.set(relative(outDir, execPath), path);
37
+ res.set(relative(outDir, execPath), binName);
38
38
  }
39
39
  }
40
40
  return res;
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "smartbundle",
3
3
  "type": "module",
4
- "version": "0.7.2",
4
+ "version": "0.7.3",
5
5
  "bin": {
6
- "smartbundle": "__bin__/smartbundle"
6
+ "smartbundle": "__bin__/smartbundle.js"
7
7
  },
8
8
  "types": "./src/index.d.ts",
9
9
  "module": "./src/index.js",
File without changes