@@ -8,8 +8,8 @@ import { DependencyMap, PluginManager } from '../plugins/plugin-manager.js';
88import { Reporter } from '../ui/reporters/reporter.js' ;
99import { InitializeOrchestrator } from './initialize.js' ;
1010
11- export type RequiredProperties = Map < string , RequiredProperty [ ] > ;
12- export type UserSuppliedProperties = Map < string , Record < string , unknown > > ;
11+ export type RequiredParameters = Map < string , RequiredParameter [ ] > ;
12+ export type UserSuppliedParameters = Map < string , Record < string , unknown > > ;
1313export type ImportResult = { result : ResourceConfig [ ] , errors : string [ ] }
1414
1515export interface ImportArgs {
@@ -18,9 +18,9 @@ export interface ImportArgs {
1818 secureMode ?: boolean ;
1919}
2020
21- export interface RequiredProperty {
22- propertyName : string ;
23- propertyType : string ;
21+ export interface RequiredParameter {
22+ parameterName : string ;
23+ parameterType : string ;
2424 plugin : string ;
2525}
2626
@@ -44,8 +44,8 @@ export class ImportOrchestrator {
4444
4545 const requiredParameters = await ImportOrchestrator . getRequiredParameters ( typeIds , pluginManager ) ;
4646
47- const userSuppliedProperties = await reporter . askRequiredPropertiesForImport ( requiredParameters ) ;
48- const importResult = await ImportOrchestrator . getImportedConfigs ( pluginManager , typeIds , userSuppliedProperties )
47+ const userSuppliedParameters = await reporter . askRequiredParametersForImport ( requiredParameters ) ;
48+ const importResult = await ImportOrchestrator . getImportedConfigs ( pluginManager , typeIds , userSuppliedParameters )
4949
5050 ctx . processFinished ( ProcessName . IMPORT )
5151 reporter . displayImportResult ( importResult ) ;
@@ -54,10 +54,10 @@ export class ImportOrchestrator {
5454 static async getRequiredParameters (
5555 typeIds : string [ ] ,
5656 pluginManager : PluginManager
57- ) : Promise < RequiredProperties > {
57+ ) : Promise < RequiredParameters > {
5858 ctx . subprocessStarted ( SubProcessName . GET_REQUIRED_PARAMETERS ) ;
5959
60- const allRequiredProperties = new Map < string , RequiredProperty [ ] > ( ) ;
60+ const allRequiredParameters = new Map < string , RequiredParameter [ ] > ( ) ;
6161 for ( const type of typeIds ) {
6262 const resourceInfo = await pluginManager . getResourceInfo ( type ) ;
6363
@@ -66,36 +66,36 @@ export class ImportOrchestrator {
6666 continue ;
6767 }
6868
69- const requiredPropertyNames = resourceInfo . import ?. requiredParameters ;
70- if ( ! requiredPropertyNames || requiredPropertyNames . length === 0 ) {
69+ const requiredParameterNames = resourceInfo . import ?. requiredParameters ;
70+ if ( ! requiredParameterNames || requiredParameterNames . length === 0 ) {
7171 continue ;
7272 }
7373
74- requiredPropertyNames
74+ requiredParameterNames
7575 . forEach ( ( name ) => {
76- if ( ! allRequiredProperties . has ( type ) ) {
77- allRequiredProperties . set ( type , [ ] ) ;
76+ if ( ! allRequiredParameters . has ( type ) ) {
77+ allRequiredParameters . set ( type , [ ] ) ;
7878 }
7979
80- const propertyInfo = ( schema . properties as any ) [ name ] ;
80+ const schemaInfo = ( schema . properties as any ) [ name ] ;
8181
82- allRequiredProperties . get ( type ) ! . push ( {
83- propertyName : name ,
84- propertyType : propertyInfo . type ?? null ,
82+ allRequiredParameters . get ( type ) ! . push ( {
83+ parameterName : name ,
84+ parameterType : schemaInfo . type ?? null ,
8585 plugin : resourceInfo . plugin
8686 } )
8787 } ) ;
8888 }
8989
9090 ctx . subprocessFinished ( SubProcessName . GET_REQUIRED_PARAMETERS ) ;
9191
92- return allRequiredProperties ;
92+ return allRequiredParameters ;
9393 }
9494
9595 static async getImportedConfigs (
9696 pluginManager : PluginManager ,
9797 typeIds : string [ ] ,
98- userSuppliedProperties : UserSuppliedProperties
98+ userSuppliedParameters : UserSuppliedParameters
9999 ) : Promise < ImportResult > {
100100 const importedConfigs = [ ] ;
101101 const errors = [ ] ;
@@ -105,7 +105,7 @@ export class ImportOrchestrator {
105105 try {
106106 const config : ResourceJson = {
107107 core : { type } ,
108- parameters : userSuppliedProperties . get ( type ) ?? { } ,
108+ parameters : userSuppliedParameters . get ( type ) ?? { } ,
109109 } ;
110110
111111 const response = await pluginManager . importResource ( config ) ;
0 commit comments