aeria-populate 0.0.28 → 0.0.30

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.
Files changed (2) hide show
  1. package/dist/cli.js +3 -3
  2. package/package.json +2 -2
package/dist/cli.js CHANGED
@@ -166,13 +166,13 @@ export const main = async () => {
166
166
  }
167
167
  const files = await Array.fromAsync(fs.promises.glob(pattern));
168
168
  let failed = 0, successful = 0, dropped = 0;
169
- const collections = [];
169
+ const collections = new Set();
170
170
  for (const file of files) {
171
171
  const content = await fs.promises.readFile(file, {
172
172
  encoding: 'utf-8',
173
173
  });
174
174
  const { frontmatter } = await parseMarkdown(content);
175
- collections.push(frontmatter.collection);
175
+ collections.add(frontmatter.collection);
176
176
  }
177
177
  if (opts.dropCollections) {
178
178
  for (const collection of collections) {
@@ -192,7 +192,7 @@ export const main = async () => {
192
192
  failed++;
193
193
  }
194
194
  }
195
- console.log(dropped, 'dropped collections:', collections.map((collection) => styleText(['bold'], collection)).join(', '));
195
+ console.log(dropped, 'dropped collections:', Array.from(collections).map((collection) => styleText(['bold'], collection)).join(', '));
196
196
  console.log(successful, 'documents imported successfully');
197
197
  console.log(failed, 'failed to import');
198
198
  if (failed) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "aeria-populate",
3
3
  "type": "module",
4
- "version": "0.0.28",
4
+ "version": "0.0.30",
5
5
  "description": "",
6
6
  "license": "ISC",
7
7
  "keywords": [],
@@ -20,7 +20,7 @@
20
20
  "aeria": "file:../aeria"
21
21
  },
22
22
  "peerDependencies": {
23
- "aeria": "^0.0.352"
23
+ "aeria": "^0.0.354"
24
24
  },
25
25
  "dependencies": {
26
26
  "chokidar": "^5.0.0",