@digipair/skill-editor 0.64.1 → 0.64.3
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/index.cjs.js +4 -2
- package/index.esm.js +4 -2
- package/package.json +1 -1
package/index.cjs.js
CHANGED
|
@@ -15167,10 +15167,12 @@ let EditorService = class EditorService {
|
|
|
15167
15167
|
async schemas(params, _pinsSettingsList, _context) {
|
|
15168
15168
|
const { libraries, language } = params;
|
|
15169
15169
|
const list = Promise.all(Object.keys(libraries).map(async (library)=>{
|
|
15170
|
-
let
|
|
15170
|
+
let modulePath = require.resolve(`${library}`);
|
|
15171
|
+
modulePath = modulePath.substring(0, modulePath.lastIndexOf('/'));
|
|
15172
|
+
let schemasPath = modulePath + '/schema.json';
|
|
15171
15173
|
if (language !== 'en') {
|
|
15172
15174
|
try {
|
|
15173
|
-
schemasPath =
|
|
15175
|
+
schemasPath = modulePath + `/schema.${language}.json`;
|
|
15174
15176
|
} catch (e) {}
|
|
15175
15177
|
}
|
|
15176
15178
|
return JSON.parse(await promises.readFile(schemasPath, 'utf8'));
|
package/index.esm.js
CHANGED
|
@@ -15163,10 +15163,12 @@ let EditorService = class EditorService {
|
|
|
15163
15163
|
async schemas(params, _pinsSettingsList, _context) {
|
|
15164
15164
|
const { libraries, language } = params;
|
|
15165
15165
|
const list = Promise.all(Object.keys(libraries).map(async (library)=>{
|
|
15166
|
-
let
|
|
15166
|
+
let modulePath = require.resolve(`${library}`);
|
|
15167
|
+
modulePath = modulePath.substring(0, modulePath.lastIndexOf('/'));
|
|
15168
|
+
let schemasPath = modulePath + '/schema.json';
|
|
15167
15169
|
if (language !== 'en') {
|
|
15168
15170
|
try {
|
|
15169
|
-
schemasPath =
|
|
15171
|
+
schemasPath = modulePath + `/schema.${language}.json`;
|
|
15170
15172
|
} catch (e) {}
|
|
15171
15173
|
}
|
|
15172
15174
|
return JSON.parse(await readFile(schemasPath, 'utf8'));
|