filelist-utils
Advanced tools
Comparing version 1.7.0-pre.1676620495 to 1.7.0-pre.1676660187
@@ -19,2 +19,3 @@ import fetch from 'cross-fetch'; | ||
let fileCollectionItems = []; | ||
const existing = {}; | ||
/* | ||
@@ -33,2 +34,8 @@ Answer should contain: | ||
const { lastModified = 0, size = -1 } = entry; | ||
if (existing[entry.relativePath]) { | ||
throw new Error(`Duplicate relativePath: ${entry.relativePath}`); | ||
} | ||
else { | ||
existing[entry.relativePath] = true; | ||
} | ||
const realBaseURL = entry.baseURL ?? | ||
@@ -35,0 +42,0 @@ source.baseURL ?? |
@@ -25,2 +25,3 @@ "use strict"; | ||
let fileCollectionItems = []; | ||
const existing = {}; | ||
/* | ||
@@ -39,2 +40,8 @@ Answer should contain: | ||
const { lastModified = 0, size = -1 } = entry; | ||
if (existing[entry.relativePath]) { | ||
throw new Error(`Duplicate relativePath: ${entry.relativePath}`); | ||
} | ||
else { | ||
existing[entry.relativePath] = true; | ||
} | ||
const realBaseURL = entry.baseURL ?? | ||
@@ -41,0 +48,0 @@ source.baseURL ?? |
{ | ||
"name": "filelist-utils", | ||
"version": "1.7.0-pre.1676620495", | ||
"version": "1.7.0-pre.1676660187", | ||
"description": "Create a FileCollection from a path or a zip file", | ||
@@ -5,0 +5,0 @@ "main": "./lib/index.js", |
@@ -27,2 +27,5 @@ import fetch from 'cross-fetch'; | ||
let fileCollectionItems: FileCollectionItem[] = []; | ||
const existing: { [key: string]: boolean } = {}; | ||
/* | ||
@@ -41,2 +44,9 @@ Answer should contain: | ||
const { lastModified = 0, size = -1 } = entry; | ||
if (existing[entry.relativePath]) { | ||
throw new Error(`Duplicate relativePath: ${entry.relativePath}`); | ||
} else { | ||
existing[entry.relativePath] = true; | ||
} | ||
const realBaseURL = | ||
@@ -43,0 +53,0 @@ entry.baseURL ?? |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
159145
2485