@engine9-io/input-tools 2.0.3 → 2.0.5
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/file/FileUtilities.js +1 -1
- package/index.js +11 -6
- package/package.json +1 -1
package/file/FileUtilities.js
CHANGED
|
@@ -810,7 +810,7 @@ Worker.prototype.move = async function ({ filename, target, remove = true }) {
|
|
|
810
810
|
await fsp.rename(filename, target);
|
|
811
811
|
} catch (e) {
|
|
812
812
|
//it may be a filesystem issue moving between items
|
|
813
|
-
debug('Assuming this is a filesystem crosslink error, ignoring ', e
|
|
813
|
+
debug('Assuming this is a filesystem crosslink error, ignoring ', e);
|
|
814
814
|
await fsp.copyFile(filename, target);
|
|
815
815
|
await fsp.unlink(filename);
|
|
816
816
|
}
|
package/index.js
CHANGED
|
@@ -167,7 +167,7 @@ function intToByteArray(_v) {
|
|
|
167
167
|
return byteArray;
|
|
168
168
|
}
|
|
169
169
|
function getPluginUUID(uniqueNamespaceLikeDomainName, valueWithinNamespace) {
|
|
170
|
-
// Random custom namespace for plugins -- not secure, just a namespace:
|
|
170
|
+
// Random custom namespace for plugins -- not intended for cryptographically secure, just a unique namespace:
|
|
171
171
|
return uuidv5(`${uniqueNamespaceLikeDomainName}::${valueWithinNamespace}`, 'f9e1024d-21ac-473c-bac6-64796dd771dd');
|
|
172
172
|
}
|
|
173
173
|
function getInputUUID(a, b) {
|
|
@@ -253,11 +253,16 @@ function getTimelineEntryUUID(inputObject, { defaults = {} } = {}) {
|
|
|
253
253
|
// get a temp ID
|
|
254
254
|
if (!o.input_id)
|
|
255
255
|
throw new Error('Error generating timeline entry uuid -- remote_entry_id specified, but no input_id');
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
256
|
+
try {
|
|
257
|
+
const uuid = uuidv5(String(o.remote_entry_id), o.input_id);
|
|
258
|
+
// Change out the ts to match the v7 sorting.
|
|
259
|
+
// But because outside specified remote_entry_uuid
|
|
260
|
+
// may not match this standard, uuid sorting isn't guaranteed
|
|
261
|
+
return getUUIDv7(o.ts, uuid);
|
|
262
|
+
} catch (e) {
|
|
263
|
+
debug('Error getting uuid with object:', o);
|
|
264
|
+
throw e;
|
|
265
|
+
}
|
|
261
266
|
}
|
|
262
267
|
o.entry_type_id = getEntryTypeId(o);
|
|
263
268
|
const missing = requiredTimelineEntryFields.filter((d) => o[d] === undefined); // 0 could be an entry type value
|