sequence
This commit is contained in:
parent
14954deeb0
commit
14538b6708
42
index.js
42
index.js
|
@ -29388,20 +29388,35 @@ var external_path_default = /*#__PURE__*/__nccwpck_require__.n(external_path_);
|
||||||
// EXTERNAL MODULE: ../../../node_modules/.pnpm/xml-js@1.6.11/node_modules/xml-js/lib/index.js
|
// EXTERNAL MODULE: ../../../node_modules/.pnpm/xml-js@1.6.11/node_modules/xml-js/lib/index.js
|
||||||
var lib = __nccwpck_require__(4305);
|
var lib = __nccwpck_require__(4305);
|
||||||
var lib_default = /*#__PURE__*/__nccwpck_require__.n(lib);
|
var lib_default = /*#__PURE__*/__nccwpck_require__.n(lib);
|
||||||
|
;// CONCATENATED MODULE: ./src/document/lib/sequence.js
|
||||||
|
/* harmony default export */ const sequence = (async (promises) => {
|
||||||
|
let results = [];
|
||||||
|
// eslint-disable-next-line no-restricted-syntax
|
||||||
|
for (const promise of promises) {
|
||||||
|
results = [
|
||||||
|
...results,
|
||||||
|
// eslint-disable-next-line no-await-in-loop
|
||||||
|
await promise(),
|
||||||
|
];
|
||||||
|
}
|
||||||
|
return results;
|
||||||
|
});
|
||||||
|
|
||||||
;// CONCATENATED MODULE: ./src/data.js
|
;// CONCATENATED MODULE: ./src/data.js
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* harmony default export */ const data = (async ({ dir, exclude }) => (
|
/* harmony default export */ const data = (async ({ dir, exclude }) => (
|
||||||
await Promise.all(
|
await sequence(
|
||||||
(await external_fs_.promises.readdir(dir))
|
(await external_fs_.promises.readdir(dir))
|
||||||
.filter(
|
.filter(
|
||||||
(name) => name !== exclude
|
(name) => name !== exclude
|
||||||
&& external_path_default().extname(name) === '.xml',
|
&& external_path_default().extname(name) === '.xml',
|
||||||
)
|
)
|
||||||
.map(
|
.map(
|
||||||
(name) => external_fs_.promises.readFile(
|
(name) => () => external_fs_.promises.readFile(
|
||||||
`${dir}/${name}`,
|
`${dir}/${name}`,
|
||||||
).then(
|
).then(
|
||||||
(buffer) => ({
|
(buffer) => ({
|
||||||
|
@ -29463,20 +29478,6 @@ const removeDir = async (path) => {
|
||||||
|
|
||||||
/* harmony default export */ const remove_dir = (removeDir);
|
/* harmony default export */ const remove_dir = (removeDir);
|
||||||
|
|
||||||
;// CONCATENATED MODULE: ./src/document/lib/sequence.js
|
|
||||||
/* harmony default export */ const sequence = (async (promises) => {
|
|
||||||
let results = [];
|
|
||||||
// eslint-disable-next-line no-restricted-syntax
|
|
||||||
for (const promise of promises) {
|
|
||||||
results = [
|
|
||||||
...results,
|
|
||||||
// eslint-disable-next-line no-await-in-loop
|
|
||||||
await promise(),
|
|
||||||
];
|
|
||||||
}
|
|
||||||
return results;
|
|
||||||
});
|
|
||||||
|
|
||||||
;// CONCATENATED MODULE: ./src/document/lib/table-line.js
|
;// CONCATENATED MODULE: ./src/document/lib/table-line.js
|
||||||
|
|
||||||
|
|
||||||
|
@ -29992,14 +29993,15 @@ const findDisplay = (line, link) => {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* harmony default export */ const document_displays = (async ({
|
/* harmony default export */ const document_displays = (async ({
|
||||||
displays,
|
displays,
|
||||||
myDisplayFields,
|
myDisplayFields,
|
||||||
root,
|
root,
|
||||||
}) => {
|
}) => {
|
||||||
await mkdir_if_new(`${root}/displays`);
|
await mkdir_if_new(`${root}/displays`);
|
||||||
await Promise.all(
|
await sequence(
|
||||||
displays.map(async (display) => {
|
displays.map((display) => async () => {
|
||||||
const fileName = `${root}/displays/${display.name}.md`;
|
const fileName = `${root}/displays/${display.name}.md`;
|
||||||
await external_fs_.promises.appendFile(
|
await external_fs_.promises.appendFile(
|
||||||
fileName,
|
fileName,
|
||||||
|
@ -30315,8 +30317,8 @@ const findDisplay = (line, link) => {
|
||||||
`${root}/globals/README.md`,
|
`${root}/globals/README.md`,
|
||||||
'# globals\n\n',
|
'# globals\n\n',
|
||||||
);
|
);
|
||||||
await Promise.all(
|
await sequence(
|
||||||
globals.map(async (global) => {
|
globals.map((global) => async () => {
|
||||||
await external_fs_.promises.appendFile(
|
await external_fs_.promises.appendFile(
|
||||||
`${root}/globals/README.md`,
|
`${root}/globals/README.md`,
|
||||||
`* [${global.name}](./${global.name})\n`,
|
`* [${global.name}](./${global.name})\n`,
|
||||||
|
|
Loading…
Reference in New Issue