mystmd 1.2.6__tar.gz → 1.2.7__tar.gz

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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: mystmd
3
- Version: 1.2.6
3
+ Version: 1.2.7
4
4
  Summary: Command line tools for MyST Markdown
5
5
  Project-URL: Homepage, https://github.com/executablebooks/mystmd
6
6
  Project-URL: Bug Tracker, https://github.com/executablebooks/mystmd/issues
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mystmd",
3
- "version": "1.2.6",
3
+ "version": "1.2.7",
4
4
  "description": "Command line tools for MyST Markdown",
5
5
  "author": "Rowan Cockett <rowan@curvenote.com>",
6
6
  "license": "MIT",
@@ -45,6 +45,6 @@
45
45
  "commander": "^10.0.1",
46
46
  "core-js": "^3.31.1",
47
47
  "js-yaml": "^4.1.0",
48
- "myst-cli": "^1.2.6"
48
+ "myst-cli": "^1.2.7"
49
49
  }
50
50
  }
@@ -98777,7 +98777,7 @@ var require_p_limit = __commonJS({
98777
98777
  "../myst-cli/node_modules/p-limit/index.js"(exports2, module2) {
98778
98778
  "use strict";
98779
98779
  var Queue = require_yocto_queue();
98780
- var pLimit2 = (concurrency) => {
98780
+ var pLimit3 = (concurrency) => {
98781
98781
  if (!((Number.isInteger(concurrency) || concurrency === Infinity) && concurrency > 0)) {
98782
98782
  throw new TypeError("Expected `concurrency` to be a number from 1 and up");
98783
98783
  }
@@ -98826,7 +98826,7 @@ var require_p_limit = __commonJS({
98826
98826
  });
98827
98827
  return generator;
98828
98828
  };
98829
- module2.exports = pLimit2;
98829
+ module2.exports = pLimit3;
98830
98830
  }
98831
98831
  });
98832
98832
 
@@ -193305,7 +193305,7 @@ var {
193305
193305
  } = import_index.default;
193306
193306
 
193307
193307
  // src/version.ts
193308
- var version = "1.2.6";
193308
+ var version = "1.2.7";
193309
193309
  var version_default = version;
193310
193310
 
193311
193311
  // ../myst-cli/dist/build/build.js
@@ -287772,7 +287772,7 @@ var import_node_path16 = __toESM(require("path"), 1);
287772
287772
  var import_nbtx = __toESM(require_cjs2(), 1);
287773
287773
 
287774
287774
  // ../myst-cli/dist/version.js
287775
- var version2 = "1.2.6";
287775
+ var version2 = "1.2.7";
287776
287776
  var version_default2 = version2;
287777
287777
 
287778
287778
  // ../myst-cli/dist/utils/headers.js
@@ -299780,6 +299780,7 @@ function transformLiftCodeBlocksInJupytext(mdast2) {
299780
299780
  }
299781
299781
 
299782
299782
  // ../myst-cli/dist/transforms/dois.js
299783
+ var import_p_limit = __toESM(require_p_limit(), 1);
299783
299784
  var CSL_JSON_MIMETYPE = "application/vnd.citationstyles.csl+json";
299784
299785
  var BIBTEX_MIMETYPE = "application/x-bibtex";
299785
299786
  function doiCSLJSONCacheFilename(normalizedDoi) {
@@ -299949,10 +299950,18 @@ async function transformLinkedDOIs(session, vfile2, mdast2, doiRenderer, path41)
299949
299950
  });
299950
299951
  if (linkedDois.length === 0 && citeDois.length === 0)
299951
299952
  return renderer;
299952
- session.log.debug(`Found ${plural("%s DOI(s)", linkedDois.length + citeDois.length)} to auto link.`);
299953
+ const total = linkedDois.length + citeDois.length;
299954
+ session.log.debug(`Found ${plural("%s DOI(s)", total)} to auto link.`);
299955
+ const logData = { total, done: false };
299956
+ setTimeout(() => {
299957
+ if (!logData.done) {
299958
+ session.log.info(`\u23F3 Waiting to resolve up to ${plural("%s DOI(s)", logData.total)} from doi.org...`);
299959
+ }
299960
+ }, 5e3);
299953
299961
  let number2 = 0;
299962
+ const limit = (0, import_p_limit.default)(3);
299954
299963
  await Promise.all([
299955
- ...linkedDois.map(async (node3) => {
299964
+ ...linkedDois.map((node3) => limit(async () => {
299956
299965
  var _a6;
299957
299966
  const normalized = (_a6 = doi.normalize(node3.url)) === null || _a6 === void 0 ? void 0 : _a6.toLowerCase();
299958
299967
  if (!normalized)
@@ -299978,8 +299987,8 @@ async function transformLinkedDOIs(session, vfile2, mdast2, doiRenderer, path41)
299978
299987
  citeNode.children = [];
299979
299988
  }
299980
299989
  return true;
299981
- }),
299982
- ...citeDois.map(async (node3) => {
299990
+ })),
299991
+ ...citeDois.map((node3) => limit(async () => {
299983
299992
  var _a6;
299984
299993
  const normalized = (_a6 = doi.normalize(node3.label)) === null || _a6 === void 0 ? void 0 : _a6.toLowerCase();
299985
299994
  if (!normalized)
@@ -299998,10 +300007,11 @@ async function transformLinkedDOIs(session, vfile2, mdast2, doiRenderer, path41)
299998
300007
  doiRenderer[normalized] = cite3;
299999
300008
  node3.label = cite3.render.getLabel();
300000
300009
  return true;
300001
- })
300010
+ }))
300002
300011
  ]);
300012
+ logData.done = true;
300003
300013
  if (number2 > 0) {
300004
- session.log.info(toc(`\u{1FA84} Linked ${number2} DOI${number2 > 1 ? "s" : ""} in %s for ${path41}`));
300014
+ session.log.info(toc(`\u{1FA84} Linked ${plural("%s DOI(s)", number2)} from doi.org in %s for ${path41}`));
300005
300015
  }
300006
300016
  return renderer;
300007
300017
  }
@@ -300135,7 +300145,7 @@ var filter2 = (
300135
300145
  // ../myst-cli/dist/transforms/links.js
300136
300146
  var import_node_fs26 = __toESM(require("fs"), 1);
300137
300147
  var import_node_path31 = __toESM(require("path"), 1);
300138
- var import_p_limit = __toESM(require_p_limit(), 1);
300148
+ var import_p_limit2 = __toESM(require_p_limit(), 1);
300139
300149
  var LINK_MAX_AGE = 30;
300140
300150
  var skippedDomains = [
300141
300151
  "www.linkedin.com",
@@ -300265,7 +300275,7 @@ var StaticFileTransformer = class {
300265
300275
  return true;
300266
300276
  }
300267
300277
  };
300268
- var limitOutgoingConnections = (0, import_p_limit.default)(25);
300278
+ var limitOutgoingConnections = (0, import_p_limit2.default)(25);
300269
300279
  async function checkLinksTransform(session, file, mdast2) {
300270
300280
  const linkNodes = selectAll("link,linkBlock,card", mdast2).filter((link4) => !(link4.internal || link4.static));
300271
300281
  if (linkNodes.length === 0)
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes