diff --git a/scripts/lib/optional-bundled-clusters-types.d.ts b/scripts/lib/optional-bundled-clusters-types.d.ts index 8deff6cad4e..0b8633423a2 100644 --- a/scripts/lib/optional-bundled-clusters-types.d.ts +++ b/scripts/lib/optional-bundled-clusters-types.d.ts @@ -1,10 +1,4 @@ -export const optionalBundledClusters: string[]; export const optionalBundledClusterSet: Set; -export const OPTIONAL_BUNDLED_BUILD_ENV: "OPENCLAW_INCLUDE_OPTIONAL_BUNDLED"; -export function isOptionalBundledCluster(cluster: string): boolean; -export function shouldIncludeOptionalBundledClusters(env?: NodeJS.ProcessEnv): boolean; -export function hasReleasedBundledInstall(packageJson: unknown): boolean; -export function isExplicitlyDownloadablePlugin(packageJson: unknown): boolean; export function shouldBuildBundledCluster( cluster: string, env?: NodeJS.ProcessEnv, diff --git a/scripts/lib/optional-bundled-clusters.mjs b/scripts/lib/optional-bundled-clusters.mjs index 95c4c6d57dc..df5a06f7cdd 100644 --- a/scripts/lib/optional-bundled-clusters.mjs +++ b/scripts/lib/optional-bundled-clusters.mjs @@ -1,4 +1,4 @@ -export const optionalBundledClusters = [ +const optionalBundledClusters = [ "acpx", "diagnostics-otel", "diffs", @@ -16,26 +16,26 @@ export const optionalBundledClusters = [ export const optionalBundledClusterSet = new Set(optionalBundledClusters); -export const OPTIONAL_BUNDLED_BUILD_ENV = "OPENCLAW_INCLUDE_OPTIONAL_BUNDLED"; +const OPTIONAL_BUNDLED_BUILD_ENV = "OPENCLAW_INCLUDE_OPTIONAL_BUNDLED"; -export function isOptionalBundledCluster(cluster) { +function isOptionalBundledCluster(cluster) { return optionalBundledClusterSet.has(cluster); } -export function shouldIncludeOptionalBundledClusters(env = process.env) { +function shouldIncludeOptionalBundledClusters(env = process.env) { // Release artifacts should preserve the last shipped upgrade surface by // default. Specific size-sensitive lanes can still opt out explicitly. return env[OPTIONAL_BUNDLED_BUILD_ENV] !== "0"; } -export function hasReleasedBundledInstall(packageJson) { +function hasReleasedBundledInstall(packageJson) { return ( typeof packageJson?.openclaw?.install?.npmSpec === "string" && packageJson.openclaw.install.npmSpec.trim().length > 0 ); } -export function isExplicitlyDownloadablePlugin(packageJson) { +function isExplicitlyDownloadablePlugin(packageJson) { return packageJson?.openclaw?.bundle?.includeInCore === false; }