opentool 0.6.1 → 0.6.2
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 +11 -4
- package/dist/cli/index.js.map +1 -1
- package/dist/index.js +9 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/cli/index.js
CHANGED
|
@@ -33,14 +33,13 @@ async function transpileWithEsbuild(options) {
|
|
|
33
33
|
const buildOptions = {
|
|
34
34
|
entryPoints: options.entryPoints,
|
|
35
35
|
outdir: tempBase,
|
|
36
|
-
bundle: false,
|
|
36
|
+
bundle: options.bundle ?? false,
|
|
37
37
|
format: options.format,
|
|
38
38
|
platform: "node",
|
|
39
39
|
target: "node20",
|
|
40
40
|
logLevel: "warning",
|
|
41
41
|
sourcesContent: false,
|
|
42
42
|
sourcemap: false,
|
|
43
|
-
packages: "external",
|
|
44
43
|
loader: {
|
|
45
44
|
".ts": "ts",
|
|
46
45
|
".tsx": "tsx",
|
|
@@ -49,12 +48,19 @@ async function transpileWithEsbuild(options) {
|
|
|
49
48
|
".js": "js",
|
|
50
49
|
".jsx": "jsx",
|
|
51
50
|
".mjs": "js",
|
|
52
|
-
".cjs": "js"
|
|
51
|
+
".cjs": "js",
|
|
52
|
+
".json": "json"
|
|
53
53
|
},
|
|
54
54
|
metafile: false,
|
|
55
55
|
allowOverwrite: true,
|
|
56
56
|
absWorkingDir: projectRoot
|
|
57
57
|
};
|
|
58
|
+
if (options.external && options.external.length > 0) {
|
|
59
|
+
buildOptions.external = options.external;
|
|
60
|
+
}
|
|
61
|
+
if (!buildOptions.bundle) {
|
|
62
|
+
buildOptions.packages = "external";
|
|
63
|
+
}
|
|
58
64
|
if (tsconfig) {
|
|
59
65
|
buildOptions.tsconfig = tsconfig;
|
|
60
66
|
}
|
|
@@ -1686,7 +1692,8 @@ async function emitTools(tools, config) {
|
|
|
1686
1692
|
entryPoints,
|
|
1687
1693
|
projectRoot: config.projectRoot,
|
|
1688
1694
|
format: "cjs",
|
|
1689
|
-
outDir: toolsOutDir
|
|
1695
|
+
outDir: toolsOutDir,
|
|
1696
|
+
bundle: true
|
|
1690
1697
|
});
|
|
1691
1698
|
const compiled = tools.map((tool) => {
|
|
1692
1699
|
if (!tool.sourcePath) {
|