@standardagents/builder 0.12.4 → 0.12.6
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/built-in-routes.js +3779 -3712
- package/dist/built-in-routes.js.map +1 -1
- package/dist/index.js +37 -0
- package/dist/index.js.map +1 -1
- package/dist/plugin.js +37 -0
- package/dist/plugin.js.map +1 -1
- package/package.json +4 -4
package/dist/plugin.js
CHANGED
|
@@ -4859,6 +4859,23 @@ function agentbuilder(options = {}) {
|
|
|
4859
4859
|
return {
|
|
4860
4860
|
// Set publicDir to builder's client assets so Cloudflare plugin preserves assets config
|
|
4861
4861
|
publicDir: fs2__default.existsSync(builderClientDir) ? builderClientDir : void 0,
|
|
4862
|
+
build: {
|
|
4863
|
+
rollupOptions: {
|
|
4864
|
+
// The packing system dynamically imports rollup, typescript, and related
|
|
4865
|
+
// plugins for the CLI `pack` command. These are never needed at runtime
|
|
4866
|
+
// in Cloudflare Workers and must be externalized:
|
|
4867
|
+
// - rollup/typescript/fsevents contain Node.js-only APIs (__filename, fs)
|
|
4868
|
+
// - fsevents is macOS-only and doesn't exist on Linux CI
|
|
4869
|
+
external: [
|
|
4870
|
+
"rollup",
|
|
4871
|
+
"@rollup/plugin-commonjs",
|
|
4872
|
+
"@rollup/plugin-node-resolve",
|
|
4873
|
+
"rollup-plugin-esbuild",
|
|
4874
|
+
"fsevents",
|
|
4875
|
+
"typescript"
|
|
4876
|
+
]
|
|
4877
|
+
}
|
|
4878
|
+
},
|
|
4862
4879
|
optimizeDeps: {
|
|
4863
4880
|
// Exclude our packages from pre-bundling - they contain cloudflare:workers imports
|
|
4864
4881
|
// that cannot be resolved during dependency optimization
|
|
@@ -4924,6 +4941,26 @@ function agentbuilder(options = {}) {
|
|
|
4924
4941
|
...config.optimizeDeps.include || [],
|
|
4925
4942
|
...depsToInclude.filter((dep) => !config.optimizeDeps?.include?.includes(dep))
|
|
4926
4943
|
];
|
|
4944
|
+
const packingDeps = [
|
|
4945
|
+
"rollup",
|
|
4946
|
+
"@rollup/plugin-commonjs",
|
|
4947
|
+
"@rollup/plugin-node-resolve",
|
|
4948
|
+
"rollup-plugin-esbuild",
|
|
4949
|
+
"fsevents",
|
|
4950
|
+
"typescript"
|
|
4951
|
+
];
|
|
4952
|
+
config.build = config.build || {};
|
|
4953
|
+
config.build.rollupOptions = config.build.rollupOptions || {};
|
|
4954
|
+
const existing = config.build.rollupOptions.external;
|
|
4955
|
+
if (Array.isArray(existing)) {
|
|
4956
|
+
for (const dep of packingDeps) {
|
|
4957
|
+
if (!existing.includes(dep)) existing.push(dep);
|
|
4958
|
+
}
|
|
4959
|
+
} else if (typeof existing === "string") {
|
|
4960
|
+
config.build.rollupOptions.external = [existing, ...packingDeps];
|
|
4961
|
+
} else if (!existing) {
|
|
4962
|
+
config.build.rollupOptions.external = [...packingDeps];
|
|
4963
|
+
}
|
|
4927
4964
|
},
|
|
4928
4965
|
resolveId(id) {
|
|
4929
4966
|
if (id === VIRTUAL_TOOLS_ID) {
|