Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Fix] Align on names for "info" command #47

Merged
merged 2 commits into from
Jul 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions src/connector-cli/src/commands/info.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,14 +77,14 @@ export async function runGetInfo(
console.table(formattedCapabilities, ['capability']);
}

// Connector settings
// Connector query options
const formattedConfigurationOptions =
connectorCodeConfig.configurationOptions;

if (formattedConfigurationOptions.length === 0) {
info('Settings: Connector does not have any settings defined');
info('Query options: Connector does not have any query options defined');
} else {
info('Settings...');
info('Query options...');
console.table(formattedConfigurationOptions, [
'type',
'name',
Expand All @@ -93,10 +93,10 @@ export async function runGetInfo(
}
}

// Runtime options
// Runtime settings
if (Object.values(connectorConfig.options).length === 0) {
info(
'Runtime options: Connector does not have any runtime options defined'
'Runtime settings: Connector does not have any runtime settings defined'
);
} else {
const formattedOptinos = Object.entries(connectorConfig.options).map(
Expand All @@ -110,7 +110,7 @@ export async function runGetInfo(
}
);

info('Runtime options...');
info('Runtime settings...');
console.table(formattedOptinos, ['name', 'required', 'default']);
}

Expand Down
7 changes: 7 additions & 0 deletions src/connector-cli/src/commands/init/templates.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,13 @@ export const getTsConfig = () => ({
const mediaConnectorFileContent = `import { Connector, Media } from "@chili-publish/studio-connectors";

export default class MyConnector implements Media.MediaConnector {

private runtime: Connector.ConnectorRuntimeContext;

constructor(runtime: Connector.ConnectorRuntimeContext) {
this.runtime = runtime;
}

query(
options: Connector.QueryOptions,
context: Connector.Dictionary
Expand Down
Loading