mystmd 1.3.27__tar.gz → 1.3.28__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.4
2
2
  Name: mystmd
3
- Version: 1.3.27
3
+ Version: 1.3.28
4
4
  Summary: Command line tools for MyST Markdown
5
5
  Project-URL: Homepage, https://github.com/jupyter-book/mystmd
6
6
  Project-URL: Bug Tracker, https://github.com/jupyter-book/mystmd/issues
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mystmd",
3
- "version": "1.3.27",
3
+ "version": "1.3.28",
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.3.27"
48
+ "myst-cli": "^1.3.28"
49
49
  }
50
50
  }
@@ -193440,7 +193440,7 @@ var {
193440
193440
  } = import_index.default;
193441
193441
 
193442
193442
  // src/version.ts
193443
- var version = "1.3.27";
193443
+ var version = "1.3.28";
193444
193444
  var version_default = version;
193445
193445
 
193446
193446
  // ../myst-cli/dist/build/build.js
@@ -289736,7 +289736,7 @@ var import_mime_types = __toESM(require_mime_types(), 1);
289736
289736
  var import_node_path16 = __toESM(require("path"), 1);
289737
289737
 
289738
289738
  // ../myst-cli/dist/version.js
289739
- var version2 = "1.3.27";
289739
+ var version2 = "1.3.28";
289740
289740
  var version_default2 = version2;
289741
289741
 
289742
289742
  // ../myst-cli/dist/utils/headers.js
@@ -298320,7 +298320,8 @@ function projectFromTOC(session, path44, toc, level = 1, file, opts) {
298320
298320
  }
298321
298321
  if ((opts === null || opts === void 0 ? void 0 : opts.urlFolders) && !opts.projectPath)
298322
298322
  opts.projectPath = path44;
298323
- const { slug } = fileInfo2(indexFile, pageSlugs, { ...opts, session });
298323
+ const slug = "index";
298324
+ pageSlugs[slug] = 1;
298324
298325
  const pages = [];
298325
298326
  pagesFromEntries(session, path44, entries2, pages, level, pageSlugs, opts);
298326
298327
  return { path: path44 || ".", file: indexFile, index: slug, pages };
@@ -300244,7 +300245,7 @@ var KIND_TO_EXT = {
300244
300245
  site: void 0
300245
300246
  };
300246
300247
  var DEFAULT_TEMPLATES = {
300247
- tex: "tex/myst/curvenote",
300248
+ tex: "tex/myst/plain_latex",
300248
300249
  typst: "typst/myst/lapreprint-typst",
300249
300250
  docx: "docx/myst/default",
300250
300251
  site: "site/myst/book-theme"
@@ -302012,8 +302013,8 @@ function makeNamedExportOption(description) {
302012
302013
  function makeStrictOption() {
302013
302014
  return new Option("--strict", "Summarize build warnings and stop on any errors.").default(false);
302014
302015
  }
302015
- function makeForceOption() {
302016
- return new Option("--force", "Build outputs for the given format, even if corresponding exports are not defined in file frontmatter").default(false);
302016
+ function makeForceOption(description) {
302017
+ return new Option("--force", description).default(false);
302017
302018
  }
302018
302019
  function makeCheckLinksOption() {
302019
302020
  return new Option("--check-links", "Check all links to websites resolve.").default(false);
@@ -321198,7 +321199,7 @@ async function clean2(session, files, opts) {
321198
321199
 
321199
321200
  // ../myst-cli/dist/cli/build.js
321200
321201
  function makeBuildCommand() {
321201
- const command = new Command("build").description("Build PDF, LaTeX, Word and website exports from MyST files").argument("[files...]", "list of files to export").addOption(makeExecuteOption("Execute Notebooks")).addOption(makePdfOption("Build PDF output")).addOption(makeTexOption("Build LaTeX outputs")).addOption(makeTypstOption("Build Typst outputs")).addOption(makeDocxOption("Build Docx output")).addOption(makeMdOption("Build MD output")).addOption(makeJatsOption("Build JATS xml output")).addOption(makeMecaOptions("Build MECA zip output")).addOption(makeCffOption("Build CFF output")).addOption(makeSiteOption(`Build ${readableName()} site content`)).addOption(makeHtmlOption("Build static HTML site content")).addOption(makeAllOption("Build all exports")).addOption(makeDOIBibOption()).addOption(makeWatchOption()).addOption(makeNamedExportOption("Output file for the export")).addOption(makeForceOption()).addOption(makeCheckLinksOption()).addOption(makeStrictOption()).addOption(makeCIOption()).addOption(makeMaxSizeWebpOption());
321202
+ const command = new Command("build").description("Build PDF, LaTeX, Word and website exports from MyST files").argument("[files...]", "list of files to export").addOption(makeExecuteOption("Execute Notebooks")).addOption(makePdfOption("Build PDF output")).addOption(makeTexOption("Build LaTeX outputs")).addOption(makeTypstOption("Build Typst outputs")).addOption(makeDocxOption("Build Docx output")).addOption(makeMdOption("Build MD output")).addOption(makeJatsOption("Build JATS xml output")).addOption(makeMecaOptions("Build MECA zip output")).addOption(makeCffOption("Build CFF output")).addOption(makeSiteOption(`Build ${readableName()} site content`)).addOption(makeHtmlOption("Build static HTML site content")).addOption(makeAllOption("Build all exports")).addOption(makeDOIBibOption()).addOption(makeWatchOption()).addOption(makeNamedExportOption("Output file for the export")).addOption(makeForceOption("Build outputs for the given format, even if corresponding exports are not defined in file frontmatter")).addOption(makeCheckLinksOption()).addOption(makeStrictOption()).addOption(makeCIOption()).addOption(makeMaxSizeWebpOption());
321202
321203
  return command;
321203
321204
  }
321204
321205
 
@@ -333845,7 +333846,7 @@ function getKind(session, kinds) {
333845
333846
  return void 0;
333846
333847
  const { pdf, tex, typst, docx, site } = kinds;
333847
333848
  if (pdf)
333848
- session.log.warn('PDF templates may use either "tex" or "typst"');
333849
+ session.log.warn('PDF templates may be either "tex" or "typst", including both.');
333849
333850
  const flags = {
333850
333851
  [TemplateKind.tex]: (tex || pdf) ?? false,
333851
333852
  [TemplateKind.typst]: (typst || pdf) ?? false,
@@ -333860,8 +333861,11 @@ function getKind(session, kinds) {
333860
333861
  async function downloadTemplateCLI(session, template, path44, opts) {
333861
333862
  const templateKind = getKindFromName(template);
333862
333863
  const kinds = templateKind ? [templateKind] : getKind(session, opts);
333863
- if (!kinds || kinds.length > 1) {
333864
- throw new Error("Cannot lookup a template with more than one kind.");
333864
+ if (!(kinds == null ? void 0 : kinds.length)) {
333865
+ throw new Error("Cannot lookup a template without specifying a kind (e.g. typst).");
333866
+ }
333867
+ if (kinds.length > 1) {
333868
+ throw new Error("Cannot lookup a template when more than one kind is specified.");
333865
333869
  }
333866
333870
  const kind = kinds[0];
333867
333871
  const { templatePath: defaultTemplatePath, templateUrl } = resolveInputs(session, {
@@ -333968,7 +333972,7 @@ Tags: ${source_default8.dim(
333968
333972
  });
333969
333973
  }
333970
333974
  function makeDownloadCLI(program3) {
333971
- const command = new Command("download").description("Download a public template to a path").argument("<template>", "The template URL or name").argument("[path]", "A folder to download and unzip the template to").addOption(makePdfOption("Download PDF template")).addOption(makeTexOption("Download LaTeX template")).addOption(makeTypstOption("Download Typst template")).addOption(makeDocxOption("Download Docx template")).addOption(makeSiteOption("Download Site template")).addOption(makeForceOption()).action(clirun2(Session, downloadTemplateCLI, program3));
333975
+ const command = new Command("download").description("Download a public template to a path").argument("<template>", "The template URL or name").argument("[path]", "A folder to download and unzip the template to").addOption(makePdfOption("Download PDF template")).addOption(makeTexOption("Download LaTeX template")).addOption(makeTypstOption("Download Typst template")).addOption(makeDocxOption("Download Docx template")).addOption(makeSiteOption("Download Site template")).addOption(makeForceOption("Overwrite existing downloaded templates")).action(clirun2(Session, downloadTemplateCLI, program3));
333972
333976
  return command;
333973
333977
  }
333974
333978
  function makeListCLI(program3) {
File without changes
File without changes
File without changes
File without changes
File without changes