Skip to content

Commit 8731820

Browse files
committed
refactor: hide optional bundle helpers
1 parent bc77ab9 commit 8731820

2 files changed

Lines changed: 6 additions & 12 deletions

File tree

‎scripts/lib/optional-bundled-clusters-types.d.ts‎

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,4 @@
1-
export const optionalBundledClusters: string[];
21
export const optionalBundledClusterSet: Set<string>;
3-
export const OPTIONAL_BUNDLED_BUILD_ENV: "OPENCLAW_INCLUDE_OPTIONAL_BUNDLED";
4-
export function isOptionalBundledCluster(cluster: string): boolean;
5-
export function shouldIncludeOptionalBundledClusters(env?: NodeJS.ProcessEnv): boolean;
6-
export function hasReleasedBundledInstall(packageJson: unknown): boolean;
7-
export function isExplicitlyDownloadablePlugin(packageJson: unknown): boolean;
82
export function shouldBuildBundledCluster(
93
cluster: string,
104
env?: NodeJS.ProcessEnv,

‎scripts/lib/optional-bundled-clusters.mjs‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
export const optionalBundledClusters = [
1+
const optionalBundledClusters = [
22
"acpx",
33
"diagnostics-otel",
44
"diffs",
@@ -16,26 +16,26 @@ export const optionalBundledClusters = [
1616

1717
export const optionalBundledClusterSet = new Set(optionalBundledClusters);
1818

19-
export const OPTIONAL_BUNDLED_BUILD_ENV = "OPENCLAW_INCLUDE_OPTIONAL_BUNDLED";
19+
const OPTIONAL_BUNDLED_BUILD_ENV = "OPENCLAW_INCLUDE_OPTIONAL_BUNDLED";
2020

21-
export function isOptionalBundledCluster(cluster) {
21+
function isOptionalBundledCluster(cluster) {
2222
return optionalBundledClusterSet.has(cluster);
2323
}
2424

25-
export function shouldIncludeOptionalBundledClusters(env = process.env) {
25+
function shouldIncludeOptionalBundledClusters(env = process.env) {
2626
// Release artifacts should preserve the last shipped upgrade surface by
2727
// default. Specific size-sensitive lanes can still opt out explicitly.
2828
return env[OPTIONAL_BUNDLED_BUILD_ENV] !== "0";
2929
}
3030

31-
export function hasReleasedBundledInstall(packageJson) {
31+
function hasReleasedBundledInstall(packageJson) {
3232
return (
3333
typeof packageJson?.openclaw?.install?.npmSpec === "string" &&
3434
packageJson.openclaw.install.npmSpec.trim().length > 0
3535
);
3636
}
3737

38-
export function isExplicitlyDownloadablePlugin(packageJson) {
38+
function isExplicitlyDownloadablePlugin(packageJson) {
3939
return packageJson?.openclaw?.bundle?.includeInCore === false;
4040
}
4141

0 commit comments

Comments
 (0)