codify-plugin-lib 1.0.167 → 1.0.168
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/plugin/plugin.js
CHANGED
|
@@ -73,13 +73,13 @@ export class Plugin {
|
|
|
73
73
|
return { match };
|
|
74
74
|
}
|
|
75
75
|
async import(data) {
|
|
76
|
-
const { core, parameters } = data;
|
|
76
|
+
const { core, parameters, autoSearchAll } = data;
|
|
77
77
|
if (!this.resourceControllers.has(core.type)) {
|
|
78
78
|
throw new Error(`Cannot get info for resource ${core.type}, resource doesn't exist`);
|
|
79
79
|
}
|
|
80
80
|
const result = await ptyLocalStorage.run(this.planPty, () => this.resourceControllers
|
|
81
81
|
.get(core.type)
|
|
82
|
-
?.import(core, parameters,
|
|
82
|
+
?.import(core, parameters, autoSearchAll));
|
|
83
83
|
return {
|
|
84
84
|
request: data,
|
|
85
85
|
result: result ?? [],
|
|
@@ -197,7 +197,7 @@ export class ResourceController {
|
|
|
197
197
|
return [];
|
|
198
198
|
}
|
|
199
199
|
const parametersToImport = await this.settings.allowMultiple.findAllParameters?.();
|
|
200
|
-
const results = await Promise.all(parametersToImport.map((p) => this.import(core, p)));
|
|
200
|
+
const results = await Promise.all(parametersToImport.map((p) => this.import(core, p).catch(() => null)));
|
|
201
201
|
return results.filter(Boolean).flat();
|
|
202
202
|
}
|
|
203
203
|
this.addDefaultValues(parameters);
|
package/package.json
CHANGED
package/src/plugin/plugin.ts
CHANGED
|
@@ -113,7 +113,7 @@ export class Plugin {
|
|
|
113
113
|
}
|
|
114
114
|
|
|
115
115
|
async import(data: ImportRequestData): Promise<ImportResponseData> {
|
|
116
|
-
const { core, parameters } = data;
|
|
116
|
+
const { core, parameters, autoSearchAll } = data;
|
|
117
117
|
|
|
118
118
|
if (!this.resourceControllers.has(core.type)) {
|
|
119
119
|
throw new Error(`Cannot get info for resource ${core.type}, resource doesn't exist`);
|
|
@@ -122,7 +122,7 @@ export class Plugin {
|
|
|
122
122
|
const result = await ptyLocalStorage.run(this.planPty, () =>
|
|
123
123
|
this.resourceControllers
|
|
124
124
|
.get(core.type!)
|
|
125
|
-
?.import(core, parameters,
|
|
125
|
+
?.import(core, parameters, autoSearchAll)
|
|
126
126
|
)
|
|
127
127
|
|
|
128
128
|
return {
|
|
@@ -279,7 +279,9 @@ export class ResourceController<T extends StringIndexedObject> {
|
|
|
279
279
|
}
|
|
280
280
|
|
|
281
281
|
const parametersToImport = await this.settings.allowMultiple.findAllParameters?.();
|
|
282
|
-
const results = await Promise.all(parametersToImport.map((p) =>
|
|
282
|
+
const results = await Promise.all(parametersToImport.map((p) =>
|
|
283
|
+
this.import(core, p).catch(() => null))
|
|
284
|
+
);
|
|
283
285
|
return results.filter(Boolean).flat() as ResourceJson[];
|
|
284
286
|
}
|
|
285
287
|
|