Skip to content

Commit

Permalink
SALTO-5293 hide types by default, avoid requiring client config (#5758)
Browse files Browse the repository at this point in the history
  • Loading branch information
netama authored Apr 11, 2024
1 parent 5ddd829 commit ba87306
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export type UserConfig<
}>,
TDeploy extends UserDeployConfig = UserDeployConfig,
> = {
client: TClient
client?: TClient
fetch: TFetch
deploy?: TDeploy
}
Expand Down Expand Up @@ -104,7 +104,7 @@ export const adapterConfigFromConfig = <
): Co & UserConfig<TCustomNameMappingOptions> => {
// TODO extend validations SALTO-5584
validateClientConfig('client', config?.value?.client)
const client = mergeWithDefaultConfig(defaultConfig.client, config?.value?.client)
const client = mergeWithDefaultConfig(defaultConfig.client ?? {}, config?.value?.client)

const fetch = _.defaults({}, config?.value?.fetch, defaultConfig.fetch)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ const getMockFunction = (method: HTTPMethod, mockAxiosAdapter: MockAdapter): Moc
}

const DEFAULT_CONFIG: UserConfig = {
client: {},
fetch: {
...INCLUDE_ALL_CONFIG,
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ describe('common filters', () => {
const filters = createCommonFilters({
referenceRules: [],
config: {
client: {},
fetch: {
...INCLUDE_ALL_CONFIG,
},
Expand Down
2 changes: 1 addition & 1 deletion packages/confluence-adapter/src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ export type UserConfig = definitions.UserConfig<
>

export const DEFAULT_CONFIG: UserConfig = {
client: {},
fetch: {
...elements.query.INCLUDE_ALL_CONFIG,
hideTypes: true,
},
}
2 changes: 1 addition & 1 deletion packages/google-workspace-adapter/src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ export type UserConfig = definitions.UserConfig<
>

export const DEFAULT_CONFIG: UserConfig = {
client: {},
fetch: {
...elements.query.INCLUDE_ALL_CONFIG,
hideTypes: true,
},
}
2 changes: 1 addition & 1 deletion packages/intercom-adapter/src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ export type UserConfig = definitions.UserConfig<
>

export const DEFAULT_CONFIG: UserConfig = {
client: {},
fetch: {
include: [{ type: elements.query.ALL_TYPES }],
exclude: [{ type: 'company' }],
hideTypes: true,
},
}
3 changes: 2 additions & 1 deletion packages/serviceplaceholder-adapter/src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,9 @@ export type UserConfig = definitions.UserConfig<
>

export const DEFAULT_CONFIG: UserConfig = {
client: {},
fetch: {
...elements.query.INCLUDE_ALL_CONFIG,
// TODO hideTypes should be true when the adapter is ready. for development, it helps to set to false
hideTypes: true,
},
}

0 comments on commit ba87306

Please sign in to comment.