@digipair/skill-editor 0.54.0 → 0.54.2

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 CHANGED
@@ -15127,9 +15127,13 @@ let EditorService = class EditorService {
15127
15127
  const originPath = `${templatesPath}/${template}`;
15128
15128
  const files = await fs.promises.readdir(originPath);
15129
15129
  for (const file of files){
15130
- const content = await fs.promises.readFile(`${originPath}/${file}`, 'utf8');
15131
- const result = lodash.exports.template(content)(data);
15132
- await fs.promises.writeFile(`${path}/${digipair}/${file}`, result);
15130
+ if (file.endsWith('.json')) {
15131
+ const content = await fs.promises.readFile(`${originPath}/${file}`, 'utf8');
15132
+ const result = lodash.exports.template(content)(data);
15133
+ await fs.promises.writeFile(`${path}/${digipair}/${file}`, result);
15134
+ } else {
15135
+ await fs.promises.copyFile(`${originPath}/${file}`, `${path}/${digipair}/${file}`);
15136
+ }
15133
15137
  }
15134
15138
  return {};
15135
15139
  }
package/index.esm.js CHANGED
@@ -15123,9 +15123,13 @@ let EditorService = class EditorService {
15123
15123
  const originPath = `${templatesPath}/${template}`;
15124
15124
  const files = await promises.readdir(originPath);
15125
15125
  for (const file of files){
15126
- const content = await promises.readFile(`${originPath}/${file}`, 'utf8');
15127
- const result = lodash.exports.template(content)(data);
15128
- await promises.writeFile(`${path}/${digipair}/${file}`, result);
15126
+ if (file.endsWith('.json')) {
15127
+ const content = await promises.readFile(`${originPath}/${file}`, 'utf8');
15128
+ const result = lodash.exports.template(content)(data);
15129
+ await promises.writeFile(`${path}/${digipair}/${file}`, result);
15130
+ } else {
15131
+ await promises.copyFile(`${originPath}/${file}`, `${path}/${digipair}/${file}`);
15132
+ }
15129
15133
  }
15130
15134
  return {};
15131
15135
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@digipair/skill-editor",
3
- "version": "0.54.0",
3
+ "version": "0.54.2",
4
4
  "dependencies": {},
5
5
  "main": "./index.cjs.js",
6
6
  "module": "./index.esm.js"