History

Refactor scope config boundary

Rhys Sullivan committed 7 months ago

Commit 2d004cd1 parent 3f52c6036 files · +1834 −360Browse files

Showing the changes to plugins/openapi (1 of 36 files). Show all

Unified · Split

plugins/openapi/sdk/index.ts+7−7
@@ -8,7 +8,7 @@ import { · 7 unmodified lines
88 createSourceCatalogSyncResult,
99 } from "@executor/source-core";
1010 import type {
11− LocalExecutorConfig,
11+ ExecutorScopeConfig,
1212 Source,
1313 } from "@executor/platform-sdk/schema";
1414 import {
@@ -18,9 +18,9 @@ import { · 3 unmodified lines
1818 defineExecutorSourcePlugin,
1919 } from "@executor/platform-sdk/plugins";
2020 import {
21− createPluginLocalConfigEntrySchema,
21+ createPluginScopeConfigEntrySchema,
2222 provideExecutorRuntime,
23− pluginLocalConfigSourceFromConfig,
23+ pluginScopeConfigSourceFromConfig,
2424 runtimeEffectError,
2525 SecretMaterialResolverService,
2626 } from "@executor/platform-sdk/runtime";
@@ -157,7 +157,7 @@ const OpenApiLocalSourceConfigSchema = Schema.Struct({ · 130 unmodified lines
157157 });
158158
159159 const decodeOpenApiCurrentLocalConfigOption = Schema.decodeUnknownOption(
160− createPluginLocalConfigEntrySchema({
160+ createPluginScopeConfigEntrySchema({
161161 kind: "openapi",
162162 config: OpenApiLocalSourceConfigSchema,
163163 }),
@@ -193,7 +193,7 @@ const configFromStoredSourceData = ( · 29 unmodified lines
193193
194194 const openApiStoredSourceDataFromLocalConfig = (input: {
195195 config: unknown;
196− loadedConfig: LocalExecutorConfig | null;
196+ loadedConfig: ExecutorScopeConfig | null;
197197 }): OpenApiStoredSourceData => {
198198 const current = decodeOpenApiCurrentLocalConfigOption(input.config);
199199 if (Option.isSome(current)) {
@@ -539,9 +539,9 @@ export const openApiSdkPlugin = ( · 339 unmodified lines
539539 toConfig: ({ source, stored }) =>
540540 configFromStoredSourceData(source, normalizeStoredSourceData(stored)),
541541 },
542− localConfig: {
542+ scopeConfig: {
543543 toConfigSource: ({ source, stored }) =>
544− pluginLocalConfigSourceFromConfig({
544+ pluginScopeConfigSourceFromConfig({
545545 source,
546546 config: {
547547 specUrl: stored.specUrl,