aeria-populate 0.0.29 → 0.0.31
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/dist/cli.js +5 -3
- 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.
|
|
175
|
+
collections.add(frontmatter.collection);
|
|
176
176
|
}
|
|
177
177
|
if (opts.dropCollections) {
|
|
178
178
|
for (const collection of collections) {
|
|
@@ -192,7 +192,9 @@ export const main = async () => {
|
|
|
192
192
|
failed++;
|
|
193
193
|
}
|
|
194
194
|
}
|
|
195
|
-
|
|
195
|
+
if (dropped) {
|
|
196
|
+
console.log(dropped, 'dropped collections:', Array.from(collections).map((collection) => styleText(['bold'], collection)).join(', '));
|
|
197
|
+
}
|
|
196
198
|
console.log(successful, 'documents imported successfully');
|
|
197
199
|
console.log(failed, 'failed to import');
|
|
198
200
|
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.
|
|
4
|
+
"version": "0.0.31",
|
|
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.
|
|
23
|
+
"aeria": "^0.0.355"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"chokidar": "^5.0.0",
|