@digipair/skill-editor 0.21.0 → 0.21.1
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 +1 -1
- package/index.esm.js +2 -2
- package/package.json +1 -1
package/index.cjs.js
CHANGED
|
@@ -87,7 +87,7 @@ let EditorService = class EditorService {
|
|
|
87
87
|
var _context_privates_EDITOR_PATH;
|
|
88
88
|
const { path = ((_context_privates_EDITOR_PATH = (_context_privates = context.privates) == null ? void 0 : _context_privates.EDITOR_PATH) != null ? _context_privates_EDITOR_PATH : process.env['DIGIPAIR_AGENTS_PATH']) ? `${process.env['DIGIPAIR_AGENTS_PATH']}/digipairs` : './factory/digipairs', digipair } = params;
|
|
89
89
|
// if digipair folder exists, return error
|
|
90
|
-
if (
|
|
90
|
+
if (fs.existsSync(`${path}/${digipair}`)) {
|
|
91
91
|
throw new Error('[DIGIPAIR-EDITOR] Digipair already exists');
|
|
92
92
|
}
|
|
93
93
|
// create digipair folder
|
package/index.esm.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { promises } from 'fs';
|
|
1
|
+
import { promises, existsSync } from 'fs';
|
|
2
2
|
|
|
3
3
|
function _extends() {
|
|
4
4
|
_extends = Object.assign || function assign(target) {
|
|
@@ -83,7 +83,7 @@ let EditorService = class EditorService {
|
|
|
83
83
|
var _context_privates_EDITOR_PATH;
|
|
84
84
|
const { path = ((_context_privates_EDITOR_PATH = (_context_privates = context.privates) == null ? void 0 : _context_privates.EDITOR_PATH) != null ? _context_privates_EDITOR_PATH : process.env['DIGIPAIR_AGENTS_PATH']) ? `${process.env['DIGIPAIR_AGENTS_PATH']}/digipairs` : './factory/digipairs', digipair } = params;
|
|
85
85
|
// if digipair folder exists, return error
|
|
86
|
-
if (
|
|
86
|
+
if (existsSync(`${path}/${digipair}`)) {
|
|
87
87
|
throw new Error('[DIGIPAIR-EDITOR] Digipair already exists');
|
|
88
88
|
}
|
|
89
89
|
// create digipair folder
|