Skip to content

Commit

Permalink
[Fix][WRS-2236] Include default runtime options during publish of the…
Browse files Browse the repository at this point in the history
… connector (#96)
  • Loading branch information
psamusev authored Jan 22, 2025
1 parent b38c8b1 commit 8f1ab42
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"publish-all": "node scripts/publish.js"
},
"devDependencies": {
"@chili-publish/connector-cli": "^1.0.50",
"@chili-publish/connector-cli": "^1.9.6-rc.0",
"prettier": "^3.0.3"
}
}
12 changes: 11 additions & 1 deletion src/connector-cli/src/commands/publish/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,16 @@ export async function runPublish(

validateRuntimeOptions(runtimeOptions, config.options);

let rOptions = runtimeOptions;

const defaultRuntimeOptionValues = Object.values(config.options).filter(
(o) => o !== null && o !== undefined
);
if (defaultRuntimeOptionValues.length > 0) {
info('Reading default runtime optinos...');
rOptions = { ...config.options, ...runtimeOptions };
}

info('Extracting package information...');

const { description, version, apiVersion } = extractPackageInfo(
Expand All @@ -92,7 +102,7 @@ export async function runPublish(
version,
type: config.type,
iconUrl: config.iconUrl,
options: runtimeOptions,
options: rOptions,
script: connectorJs,
apiVersion,
allowedDomains: proxyOptions.allowedDomains ?? ['*'],
Expand Down

0 comments on commit 8f1ab42

Please sign in to comment.