mystmd 1.3.23__py3-none-any.whl → 1.3.24__py3-none-any.whl
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.
- {mystmd-1.3.23.dist-info → mystmd-1.3.24.dist-info}/METADATA +1 -1
- mystmd-1.3.24.dist-info/RECORD +9 -0
- mystmd_py/myst.cjs +375 -116
- mystmd-1.3.23.dist-info/RECORD +0 -9
- {mystmd-1.3.23.dist-info → mystmd-1.3.24.dist-info}/WHEEL +0 -0
- {mystmd-1.3.23.dist-info → mystmd-1.3.24.dist-info}/entry_points.txt +0 -0
- {mystmd-1.3.23.dist-info → mystmd-1.3.24.dist-info}/licenses/LICENSE +0 -0
@@ -0,0 +1,9 @@
|
|
1
|
+
mystmd_py/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
2
|
+
mystmd_py/main.py,sha256=qFAnpbiqjx7jXMMmPSVUBA7SSxuRjmr6SiRDBH0rhKQ,2767
|
3
|
+
mystmd_py/myst.cjs,sha256=0WoIIKOkEzVzHh8b7Z3vNVWLWO6eaT410VD9BedxqKw,13199414
|
4
|
+
mystmd_py/nodeenv.py,sha256=8KER0P-WIXM2MsRJF4vcedBKscGoc26lJKojbkDxjbg,2447
|
5
|
+
mystmd-1.3.24.dist-info/METADATA,sha256=oQ-oPG2lAXFWRmcGheofalO6DDkhl4YROZbHOAFS8RM,3020
|
6
|
+
mystmd-1.3.24.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
7
|
+
mystmd-1.3.24.dist-info/entry_points.txt,sha256=eC2ol2gqS2q5E-ktkMrBSvV0tckGUcNGS-c4hEQ-_V4,45
|
8
|
+
mystmd-1.3.24.dist-info/licenses/LICENSE,sha256=4BcikqvulW5nh_MxaocO-lC7ydIX23dMbcqtNTUSxr4,1082
|
9
|
+
mystmd-1.3.24.dist-info/RECORD,,
|
mystmd_py/myst.cjs
CHANGED
@@ -48855,7 +48855,7 @@ var require_input4 = __commonJS({
|
|
48855
48855
|
var { nanoid: nanoid3 } = require_non_secure();
|
48856
48856
|
var { isAbsolute, resolve: resolve9 } = require("path");
|
48857
48857
|
var { SourceMapConsumer, SourceMapGenerator } = require_source_map();
|
48858
|
-
var { fileURLToPath: fileURLToPath5, pathToFileURL } = require("url");
|
48858
|
+
var { fileURLToPath: fileURLToPath5, pathToFileURL: pathToFileURL2 } = require("url");
|
48859
48859
|
var CssSyntaxError = require_css_syntax_error();
|
48860
48860
|
var PreviousMap = require_previous_map();
|
48861
48861
|
var terminalHighlight = require_terminal_highlight();
|
@@ -48944,8 +48944,8 @@ var require_input4 = __commonJS({
|
|
48944
48944
|
}
|
48945
48945
|
result.input = { column, endColumn, endLine, line: line2, source: this.css };
|
48946
48946
|
if (this.file) {
|
48947
|
-
if (
|
48948
|
-
result.input.url =
|
48947
|
+
if (pathToFileURL2) {
|
48948
|
+
result.input.url = pathToFileURL2(this.file).toString();
|
48949
48949
|
}
|
48950
48950
|
result.input.file = this.file;
|
48951
48951
|
}
|
@@ -49008,11 +49008,11 @@ var require_input4 = __commonJS({
|
|
49008
49008
|
}
|
49009
49009
|
let fromUrl;
|
49010
49010
|
if (isAbsolute(from4.source)) {
|
49011
|
-
fromUrl =
|
49011
|
+
fromUrl = pathToFileURL2(from4.source);
|
49012
49012
|
} else {
|
49013
49013
|
fromUrl = new URL(
|
49014
49014
|
from4.source,
|
49015
|
-
this.map.consumer().sourceRoot ||
|
49015
|
+
this.map.consumer().sourceRoot || pathToFileURL2(this.map.mapFile)
|
49016
49016
|
);
|
49017
49017
|
}
|
49018
49018
|
let result = {
|
@@ -49267,7 +49267,7 @@ var require_map_generator = __commonJS({
|
|
49267
49267
|
"use strict";
|
49268
49268
|
var { dirname: dirname8, relative: relative6, resolve: resolve9, sep: sep5 } = require("path");
|
49269
49269
|
var { SourceMapConsumer, SourceMapGenerator } = require_source_map();
|
49270
|
-
var { pathToFileURL } = require("url");
|
49270
|
+
var { pathToFileURL: pathToFileURL2 } = require("url");
|
49271
49271
|
var Input = require_input4();
|
49272
49272
|
var sourceMapAvailable = Boolean(SourceMapConsumer && SourceMapGenerator);
|
49273
49273
|
var pathAvailable = Boolean(dirname8 && resolve9 && relative6 && sep5);
|
@@ -49565,8 +49565,8 @@ var require_map_generator = __commonJS({
|
|
49565
49565
|
let cached = this.memoizedFileURLs.get(path44);
|
49566
49566
|
if (cached)
|
49567
49567
|
return cached;
|
49568
|
-
if (
|
49569
|
-
let fileURL =
|
49568
|
+
if (pathToFileURL2) {
|
49569
|
+
let fileURL = pathToFileURL2(path44).toString();
|
49570
49570
|
this.memoizedFileURLs.set(path44, fileURL);
|
49571
49571
|
return fileURL;
|
49572
49572
|
} else {
|
@@ -193891,7 +193891,7 @@ var {
|
|
193891
193891
|
} = import_index.default;
|
193892
193892
|
|
193893
193893
|
// src/version.ts
|
193894
|
-
var version = "1.3.
|
193894
|
+
var version = "1.3.24";
|
193895
193895
|
var version_default = version;
|
193896
193896
|
|
193897
193897
|
// ../myst-cli/dist/build/build.js
|
@@ -195602,7 +195602,8 @@ var PAGE_FRONTMATTER_KEYS = [
|
|
195602
195602
|
"tags",
|
195603
195603
|
"site",
|
195604
195604
|
"enumerator",
|
195605
|
-
"content_includes_title"
|
195605
|
+
"content_includes_title",
|
195606
|
+
"skip_execution"
|
195606
195607
|
];
|
195607
195608
|
|
195608
195609
|
// ../myst-frontmatter/dist/exports/types.js
|
@@ -199691,6 +199692,9 @@ function validatePageFrontmatterKeys(value, opts) {
|
|
199691
199692
|
if (defined(value.jupytext)) {
|
199692
199693
|
output2.jupytext = validateJupytext(value.jupytext, incrementOptions("jupytext", opts));
|
199693
199694
|
}
|
199695
|
+
if (defined(value.skip_execution)) {
|
199696
|
+
output2.skip_execution = validateBoolean(value.skip_execution, incrementOptions("skip_execution", opts));
|
199697
|
+
}
|
199694
199698
|
if (defined(value.enumerator)) {
|
199695
199699
|
output2.enumerator = validateString(value.enumerator, incrementOptions("enumerator", opts));
|
199696
199700
|
}
|
@@ -205546,7 +205550,6 @@ var TRANSFORM_SOURCE = "myst-transforms:footnotes";
|
|
205546
205550
|
function footnotesTransform(mdast2, file) {
|
205547
205551
|
const footnotes = selectAll("footnoteDefinition", mdast2);
|
205548
205552
|
const footnotesLookup = Object.fromEntries(footnotes.map((n) => {
|
205549
|
-
delete n.number;
|
205550
205553
|
return [n.identifier, n];
|
205551
205554
|
}));
|
205552
205555
|
const references = selectAll("footnoteReference", mdast2);
|
@@ -205571,20 +205574,15 @@ function footnotesTransform(mdast2, file) {
|
|
205571
205574
|
return;
|
205572
205575
|
}
|
205573
205576
|
if (def.enumerator) {
|
205574
|
-
node3.number = def.number;
|
205575
205577
|
node3.enumerator = def.enumerator;
|
205576
205578
|
return;
|
205577
205579
|
}
|
205578
205580
|
const identifierNumber = Number(node3.identifier);
|
205579
205581
|
if (!Number.isNaN(identifierNumber) && identifierNumber > 0) {
|
205580
|
-
def.number = identifierNumber;
|
205581
|
-
node3.number = identifierNumber;
|
205582
205582
|
def.enumerator = String(identifierNumber);
|
205583
205583
|
node3.enumerator = String(identifierNumber);
|
205584
205584
|
} else {
|
205585
205585
|
footnoteCount = nextNumber(footnoteCount, reserved);
|
205586
|
-
def.number = footnoteCount;
|
205587
|
-
node3.number = footnoteCount;
|
205588
205586
|
def.enumerator = String(footnoteCount);
|
205589
205587
|
node3.enumerator = String(footnoteCount);
|
205590
205588
|
}
|
@@ -238916,6 +238914,154 @@ async function headingDepthTransform(tree, vfile2, opts) {
|
|
238916
238914
|
});
|
238917
238915
|
}
|
238918
238916
|
|
238917
|
+
// ../myst-transforms/dist/toc.js
|
238918
|
+
function listFromPages(pages, projectSlug) {
|
238919
|
+
if (pages.length === 0)
|
238920
|
+
return { type: "list", children: [] };
|
238921
|
+
let ignore3 = false;
|
238922
|
+
const level = pages[0].level;
|
238923
|
+
const children = pages.map((page, index4) => {
|
238924
|
+
if (ignore3)
|
238925
|
+
return void 0;
|
238926
|
+
if (page.level < level)
|
238927
|
+
ignore3 = true;
|
238928
|
+
if (page.level !== level)
|
238929
|
+
return void 0;
|
238930
|
+
return listItemFromPages(pages.slice(index4), projectSlug);
|
238931
|
+
}).filter((item) => !!item);
|
238932
|
+
return { type: "list", children };
|
238933
|
+
}
|
238934
|
+
function listItemFromPages(pages, projectSlug) {
|
238935
|
+
if (pages.length === 0)
|
238936
|
+
return;
|
238937
|
+
const { title, slug, enumerator, level } = pages[0];
|
238938
|
+
const text7 = {
|
238939
|
+
type: "text",
|
238940
|
+
value: `${enumerator ? `${enumerator} ` : ""}${title}`
|
238941
|
+
};
|
238942
|
+
const child = slug != null ? {
|
238943
|
+
type: "link",
|
238944
|
+
url: `${projectSlug ? `/${projectSlug}` : ""}/${slug}`,
|
238945
|
+
internal: true,
|
238946
|
+
children: [text7]
|
238947
|
+
} : text7;
|
238948
|
+
const item = {
|
238949
|
+
type: "listItem",
|
238950
|
+
children: [child]
|
238951
|
+
};
|
238952
|
+
if (pages[1] && pages[1].level > level) {
|
238953
|
+
item.children.push(listFromPages(pages.slice(1), projectSlug));
|
238954
|
+
}
|
238955
|
+
return item;
|
238956
|
+
}
|
238957
|
+
function listFromHeadings(headings) {
|
238958
|
+
if (headings.length === 0)
|
238959
|
+
return { type: "list", children: [] };
|
238960
|
+
let ignore3 = false;
|
238961
|
+
const depth = headings[0].depth;
|
238962
|
+
const children = headings.map((heading6, index4) => {
|
238963
|
+
if (ignore3)
|
238964
|
+
return void 0;
|
238965
|
+
if (heading6.depth < depth)
|
238966
|
+
ignore3 = true;
|
238967
|
+
if (heading6.depth !== depth)
|
238968
|
+
return void 0;
|
238969
|
+
return listItemFromHeadings(headings.slice(index4));
|
238970
|
+
}).filter((item) => !!item);
|
238971
|
+
return { type: "list", children };
|
238972
|
+
}
|
238973
|
+
function listItemFromHeadings(headings) {
|
238974
|
+
if (headings.length === 0)
|
238975
|
+
return;
|
238976
|
+
const { children, enumerator, depth, identifier } = headings[0];
|
238977
|
+
const text7 = {
|
238978
|
+
type: "text",
|
238979
|
+
value: `${enumerator ? `${enumerator} ` : ""}${toText(children)}`
|
238980
|
+
};
|
238981
|
+
const child = identifier ? {
|
238982
|
+
type: "link",
|
238983
|
+
url: `#${identifier}`,
|
238984
|
+
internal: true,
|
238985
|
+
children: [text7],
|
238986
|
+
suppressImplicitWarning: true
|
238987
|
+
} : text7;
|
238988
|
+
const item = {
|
238989
|
+
type: "listItem",
|
238990
|
+
children: [child]
|
238991
|
+
};
|
238992
|
+
if (headings[1] && headings[1].depth > depth) {
|
238993
|
+
item.children.push(listFromHeadings(headings.slice(1)));
|
238994
|
+
}
|
238995
|
+
return item;
|
238996
|
+
}
|
238997
|
+
function buildTocTransform(mdast2, vfile2, pages, projectSlug) {
|
238998
|
+
const tocHeadings = selectAll("toc > heading", mdast2);
|
238999
|
+
const tocsAndHeadings = selectAll("toc,heading", mdast2).filter((item) => {
|
239000
|
+
return !tocHeadings.includes(item);
|
239001
|
+
});
|
239002
|
+
if (!tocsAndHeadings.find((node3) => node3.type === "toc"))
|
239003
|
+
return;
|
239004
|
+
const projectTocs = tocsAndHeadings.filter((node3) => node3.type === "toc" && node3.kind === "project");
|
239005
|
+
const pageTocs = tocsAndHeadings.filter((node3) => node3.type === "toc" && node3.kind === "page");
|
239006
|
+
const sectionTocs = tocsAndHeadings.filter((node3) => node3.type === "toc" && node3.kind === "section");
|
239007
|
+
if (projectTocs.length) {
|
239008
|
+
if (!pages) {
|
239009
|
+
fileError(vfile2, `Pages not available to build Table of Contents`);
|
239010
|
+
} else {
|
239011
|
+
if (pages[0].level !== 1) {
|
239012
|
+
fileWarn(vfile2, `First page of Table of Contents must be level 1`);
|
239013
|
+
}
|
239014
|
+
projectTocs.forEach((toc) => {
|
239015
|
+
const filteredPages = toc.depth ? pages.filter((page) => page.level <= toc.depth) : pages;
|
239016
|
+
toc.type = "block";
|
239017
|
+
delete toc.kind;
|
239018
|
+
toc.data = { part: "toc:project" };
|
239019
|
+
if (!toc.children)
|
239020
|
+
toc.children = [];
|
239021
|
+
toc.children.push(listFromPages(filteredPages, projectSlug));
|
239022
|
+
});
|
239023
|
+
}
|
239024
|
+
}
|
239025
|
+
if (pageTocs.length) {
|
239026
|
+
const headings = tocsAndHeadings.filter((node3) => node3.type === "heading");
|
239027
|
+
if (headings.length === 0) {
|
239028
|
+
fileWarn(vfile2, `No page headings found for Table of Contents`);
|
239029
|
+
} else {
|
239030
|
+
if (Math.min(...headings.map((h4) => h4.depth)) !== headings[0].depth) {
|
239031
|
+
fileWarn(vfile2, "Page heading levels do not start with highest level");
|
239032
|
+
}
|
239033
|
+
pageTocs.forEach((toc) => {
|
239034
|
+
const filteredHeadings = toc.depth ? headings.filter((heading6) => heading6.depth - headings[0].depth < toc.depth) : headings;
|
239035
|
+
toc.type = "block";
|
239036
|
+
delete toc.kind;
|
239037
|
+
toc.data = { part: "toc:page" };
|
239038
|
+
if (!toc.children)
|
239039
|
+
toc.children = [];
|
239040
|
+
toc.children.push(listFromHeadings(filteredHeadings));
|
239041
|
+
});
|
239042
|
+
}
|
239043
|
+
}
|
239044
|
+
if (sectionTocs.length) {
|
239045
|
+
tocsAndHeadings.forEach((toc, index4) => {
|
239046
|
+
if (toc.type !== "toc" || toc.kind !== "section")
|
239047
|
+
return;
|
239048
|
+
const headings = tocsAndHeadings.slice(index4 + 1).filter((h4) => h4.type === "heading");
|
239049
|
+
if (headings.length === 0) {
|
239050
|
+
fileWarn(vfile2, `No section headings found for Table of Contents`);
|
239051
|
+
} else {
|
239052
|
+
const filteredHeadings = toc.depth ? headings.filter((heading6) => heading6.depth - headings[0].depth < toc.depth) : headings;
|
239053
|
+
toc.type = "block";
|
239054
|
+
delete toc.kind;
|
239055
|
+
toc.data = { part: "toc:section" };
|
239056
|
+
if (!toc.children)
|
239057
|
+
toc.children = [];
|
239058
|
+
const nextSection = filteredHeadings.findIndex((h4) => h4.depth < filteredHeadings[0].depth);
|
239059
|
+
toc.children.push(listFromHeadings(nextSection === -1 ? filteredHeadings : filteredHeadings.slice(0, nextSection)));
|
239060
|
+
}
|
239061
|
+
});
|
239062
|
+
}
|
239063
|
+
}
|
239064
|
+
|
238919
239065
|
// ../myst-transforms/dist/enumerate.js
|
238920
239066
|
var TRANSFORM_NAME2 = "myst-transforms:enumerate";
|
238921
239067
|
var DEFAULT_NUMBERING = {
|
@@ -239378,7 +239524,7 @@ function addContainerCaptionNumbersTransform(tree, file, opts) {
|
|
239378
239524
|
});
|
239379
239525
|
}
|
239380
239526
|
function implicitTargetWarning(target, node3, opts) {
|
239381
|
-
if (target.node.implicit && opts.state.vfile) {
|
239527
|
+
if (target.node.implicit && opts.state.vfile && !node3.suppressImplicitWarning) {
|
239382
239528
|
fileWarn(opts.state.vfile, `Linking "${target.node.identifier}" to an implicit ${target.kind} reference, best practice is to create an explicit reference.`, {
|
239383
239529
|
node: node3,
|
239384
239530
|
note: "Explicit references do not break when you update the title to a section, they are preferred over using the implicit HTML ID created for headers.",
|
@@ -239386,6 +239532,7 @@ function implicitTargetWarning(target, node3, opts) {
|
|
239386
239532
|
ruleId: RuleId.referenceTargetExplicit
|
239387
239533
|
});
|
239388
239534
|
}
|
239535
|
+
delete node3.suppressImplicitWarning;
|
239389
239536
|
}
|
239390
239537
|
var resolveReferenceLinksTransform = (tree, opts) => {
|
239391
239538
|
selectAll("link", tree).forEach((node3) => {
|
@@ -282455,33 +282602,26 @@ var includeDirective = {
|
|
282455
282602
|
var _a6, _b, _c, _d2, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
282456
282603
|
const literal = data.name === "literalinclude" || !!((_a6 = data.options) === null || _a6 === void 0 ? void 0 : _a6.literal) || !!((_b = data.options) === null || _b === void 0 ? void 0 : _b.lang);
|
282457
282604
|
const file = data.arg;
|
282458
|
-
if (!literal) {
|
282459
|
-
const include4 = {
|
282460
|
-
type: "include",
|
282461
|
-
file
|
282462
|
-
};
|
282463
|
-
addCommonDirectiveOptions(data, include4);
|
282464
|
-
return [include4];
|
282465
|
-
}
|
282466
282605
|
const lang = (_d2 = (_c = data.options) === null || _c === void 0 ? void 0 : _c.lang) !== null && _d2 !== void 0 ? _d2 : extToLanguage(file.split(".").pop());
|
282467
|
-
const opts = getCodeBlockOptions(
|
282606
|
+
const opts = literal ? getCodeBlockOptions(
|
282468
282607
|
data,
|
282469
282608
|
vfile2,
|
282470
282609
|
// Set the filename in the literal include by default
|
282471
282610
|
file.split(/\/|\\/).pop()
|
282472
|
-
);
|
282611
|
+
) : {};
|
282612
|
+
const caption3 = literal ? (_e = data.options) === null || _e === void 0 ? void 0 : _e.caption : void 0;
|
282473
282613
|
const filter7 = {};
|
282474
282614
|
ensureOnlyOneOf(data, vfile2, ["start-at", "start-line", "start-after", "lines"]);
|
282475
282615
|
ensureOnlyOneOf(data, vfile2, ["end-at", "end-line", "end-before", "lines"]);
|
282476
|
-
filter7.startAt = (
|
282477
|
-
filter7.startAfter = (
|
282478
|
-
filter7.endAt = (
|
282479
|
-
filter7.endBefore = (
|
282480
|
-
if ((
|
282481
|
-
filter7.lines = parseLinesString(vfile2, (
|
282616
|
+
filter7.startAt = (_f = data.options) === null || _f === void 0 ? void 0 : _f["start-at"];
|
282617
|
+
filter7.startAfter = (_g = data.options) === null || _g === void 0 ? void 0 : _g["start-after"];
|
282618
|
+
filter7.endAt = (_h = data.options) === null || _h === void 0 ? void 0 : _h["end-at"];
|
282619
|
+
filter7.endBefore = (_j = data.options) === null || _j === void 0 ? void 0 : _j["end-before"];
|
282620
|
+
if ((_k = data.options) === null || _k === void 0 ? void 0 : _k.lines) {
|
282621
|
+
filter7.lines = parseLinesString(vfile2, (_l = select('mystDirectiveOption[name="lines"]', data.node)) !== null && _l !== void 0 ? _l : void 0, (_m = data.options) === null || _m === void 0 ? void 0 : _m.lines);
|
282482
282622
|
} else {
|
282483
|
-
const startLine = (
|
282484
|
-
const endLine = (
|
282623
|
+
const startLine = (_o = data.options) === null || _o === void 0 ? void 0 : _o["start-line"];
|
282624
|
+
const endLine = (_p = data.options) === null || _p === void 0 ? void 0 : _p["end-line"];
|
282485
282625
|
const lines = [];
|
282486
282626
|
if (startLine != null)
|
282487
282627
|
lines.push(startLine);
|
@@ -282499,13 +282639,14 @@ var includeDirective = {
|
|
282499
282639
|
];
|
282500
282640
|
}
|
282501
282641
|
}
|
282642
|
+
const usesFilter = Object.values(filter7).some((value) => value !== void 0);
|
282502
282643
|
const include3 = {
|
282503
282644
|
type: "include",
|
282504
282645
|
file,
|
282505
282646
|
literal,
|
282506
282647
|
lang,
|
282507
|
-
caption:
|
282508
|
-
filter:
|
282648
|
+
caption: caption3,
|
282649
|
+
filter: usesFilter ? filter7 : void 0,
|
282509
282650
|
...opts
|
282510
282651
|
};
|
282511
282652
|
addCommonDirectiveOptions(data, include3);
|
@@ -282658,7 +282799,8 @@ var genIndexDirective = {
|
|
282658
282799
|
} else {
|
282659
282800
|
children.push({
|
282660
282801
|
type: "heading",
|
282661
|
-
depth:
|
282802
|
+
depth: 2,
|
282803
|
+
enumerated: false,
|
282662
282804
|
children: parsedArg
|
282663
282805
|
});
|
282664
282806
|
}
|
@@ -286150,6 +286292,61 @@ var divDirective = {
|
|
286150
286292
|
}
|
286151
286293
|
};
|
286152
286294
|
|
286295
|
+
// ../myst-directives/dist/toc.js
|
286296
|
+
var CONTEXTS = ["project", "page", "section"];
|
286297
|
+
var tocDirective = {
|
286298
|
+
name: "toc",
|
286299
|
+
doc: "Inserts table of contents in the page. This may be for the project (each page has an entry), the current page (each heading has an entry), or the current section (only headings in the section have an entry).",
|
286300
|
+
alias: ["tableofcontents", "table-of-contents", "toctree", "contents"],
|
286301
|
+
arg: {
|
286302
|
+
type: "myst",
|
286303
|
+
doc: "Heading to be included with table of contents"
|
286304
|
+
},
|
286305
|
+
options: {
|
286306
|
+
context: {
|
286307
|
+
type: String,
|
286308
|
+
doc: "Table of Contents context; one of project, page, or section",
|
286309
|
+
alias: ["kind"]
|
286310
|
+
},
|
286311
|
+
depth: {
|
286312
|
+
type: Number,
|
286313
|
+
doc: "Number of levels to include in Table of Contents; by default, all levels will be included",
|
286314
|
+
alias: ["maxdepth"]
|
286315
|
+
},
|
286316
|
+
...commonDirectiveOptions("toc")
|
286317
|
+
},
|
286318
|
+
run(data, vfile2) {
|
286319
|
+
var _a6, _b, _c;
|
286320
|
+
let context = ((_a6 = data.options) === null || _a6 === void 0 ? void 0 : _a6.context) ? data.options.context : data.name === "contents" ? "section" : "project";
|
286321
|
+
if (!CONTEXTS.includes(context)) {
|
286322
|
+
fileError(vfile2, `Unknown context for ${data.name} directive: ${context}`);
|
286323
|
+
context = "project";
|
286324
|
+
}
|
286325
|
+
let depth = (_b = data.options) === null || _b === void 0 ? void 0 : _b.depth;
|
286326
|
+
if (depth != null && depth < 1) {
|
286327
|
+
fileError(vfile2, `Table of Contents 'depth' must be a number greater than 0`);
|
286328
|
+
depth = void 0;
|
286329
|
+
}
|
286330
|
+
const children = [];
|
286331
|
+
if (data.arg) {
|
286332
|
+
const parsedArg = data.arg;
|
286333
|
+
if (((_c = parsedArg[0]) === null || _c === void 0 ? void 0 : _c.type) === "heading") {
|
286334
|
+
children.push(...parsedArg);
|
286335
|
+
} else {
|
286336
|
+
children.push({
|
286337
|
+
type: "heading",
|
286338
|
+
depth: 2,
|
286339
|
+
enumerated: false,
|
286340
|
+
children: parsedArg
|
286341
|
+
});
|
286342
|
+
}
|
286343
|
+
}
|
286344
|
+
const toc = { type: "toc", kind: context, depth, children };
|
286345
|
+
addCommonDirectiveOptions(data, toc);
|
286346
|
+
return [toc];
|
286347
|
+
}
|
286348
|
+
};
|
286349
|
+
|
286153
286350
|
// ../myst-directives/dist/index.js
|
286154
286351
|
var defaultDirectives = [
|
286155
286352
|
admonitionDirective,
|
@@ -286177,7 +286374,8 @@ var defaultDirectives = [
|
|
286177
286374
|
rawDirective,
|
286178
286375
|
rawLatexDirective,
|
286179
286376
|
rawTypstDirective,
|
286180
|
-
divDirective
|
286377
|
+
divDirective,
|
286378
|
+
tocDirective
|
286181
286379
|
];
|
286182
286380
|
|
286183
286381
|
// ../myst-roles/dist/abbreviation.js
|
@@ -289547,7 +289745,7 @@ var import_node_path16 = __toESM(require("path"), 1);
|
|
289547
289745
|
var import_nbtx = __toESM(require_cjs2(), 1);
|
289548
289746
|
|
289549
289747
|
// ../myst-cli/dist/version.js
|
289550
|
-
var version2 = "1.3.
|
289748
|
+
var version2 = "1.3.24";
|
289551
289749
|
var version_default2 = version2;
|
289552
289750
|
|
289553
289751
|
// ../myst-cli/dist/utils/headers.js
|
@@ -300032,6 +300230,9 @@ var Domains;
|
|
300032
300230
|
var import_node_fs24 = __toESM(require("fs"), 1);
|
300033
300231
|
var import_node_path29 = __toESM(require("path"), 1);
|
300034
300232
|
|
300233
|
+
// ../myst-cli/dist/spec-version.js
|
300234
|
+
var SPEC_VERSION = 1;
|
300235
|
+
|
300035
300236
|
// ../myst-cli/dist/build/site/template.js
|
300036
300237
|
var import_node_fs22 = __toESM(require("fs"), 1);
|
300037
300238
|
var import_node_path26 = require("path");
|
@@ -301413,6 +301614,71 @@ async function collectExportOptions(session, files, formats, opts) {
|
|
301413
301614
|
return filterAndMakeUnique(exportOptionsList);
|
301414
301615
|
}
|
301415
301616
|
|
301617
|
+
// ../myst-cli/dist/build/utils/projectManifest.js
|
301618
|
+
async function manifestPagesFromProject(session, projectPath) {
|
301619
|
+
const state = session.store.getState();
|
301620
|
+
const proj = selectors_exports.selectLocalProject(state, projectPath);
|
301621
|
+
if (!proj)
|
301622
|
+
return [];
|
301623
|
+
const cache = castSession(session);
|
301624
|
+
const pages = await Promise.all(proj.pages.map(async (page) => {
|
301625
|
+
var _a6, _b, _c, _d2, _e, _f, _g, _h, _j, _k;
|
301626
|
+
if ("file" in page) {
|
301627
|
+
const fileInfo3 = selectors_exports.selectFileInfo(state, page.file);
|
301628
|
+
const title = fileInfo3.title || fileTitle(page.file);
|
301629
|
+
const short_title = (_a6 = fileInfo3.short_title) !== null && _a6 !== void 0 ? _a6 : void 0;
|
301630
|
+
const description = (_b = fileInfo3.description) !== null && _b !== void 0 ? _b : "";
|
301631
|
+
const thumbnail = (_c = fileInfo3.thumbnail) !== null && _c !== void 0 ? _c : "";
|
301632
|
+
const thumbnailOptimized = (_d2 = fileInfo3.thumbnailOptimized) !== null && _d2 !== void 0 ? _d2 : "";
|
301633
|
+
const banner = (_e = fileInfo3.banner) !== null && _e !== void 0 ? _e : "";
|
301634
|
+
const bannerOptimized = (_f = fileInfo3.bannerOptimized) !== null && _f !== void 0 ? _f : "";
|
301635
|
+
const date = (_g = fileInfo3.date) !== null && _g !== void 0 ? _g : "";
|
301636
|
+
const tags = (_h = fileInfo3.tags) !== null && _h !== void 0 ? _h : [];
|
301637
|
+
const { slug, level, file } = page;
|
301638
|
+
const { frontmatter } = (_k = (_j = cache.$getMdast(file)) === null || _j === void 0 ? void 0 : _j.post) !== null && _k !== void 0 ? _k : {};
|
301639
|
+
const projectPage = {
|
301640
|
+
slug,
|
301641
|
+
title,
|
301642
|
+
short_title,
|
301643
|
+
description,
|
301644
|
+
date,
|
301645
|
+
thumbnail,
|
301646
|
+
thumbnailOptimized,
|
301647
|
+
banner,
|
301648
|
+
bannerOptimized,
|
301649
|
+
tags,
|
301650
|
+
level,
|
301651
|
+
enumerator: frontmatter === null || frontmatter === void 0 ? void 0 : frontmatter.enumerator
|
301652
|
+
};
|
301653
|
+
return projectPage;
|
301654
|
+
}
|
301655
|
+
return { ...page };
|
301656
|
+
}));
|
301657
|
+
return pages;
|
301658
|
+
}
|
301659
|
+
function manifestTitleFromProject(session, projectPath) {
|
301660
|
+
const state = session.store.getState();
|
301661
|
+
const projConfig = selectors_exports.selectLocalProjectConfig(state, projectPath);
|
301662
|
+
if (projConfig === null || projConfig === void 0 ? void 0 : projConfig.title)
|
301663
|
+
return projConfig.title;
|
301664
|
+
const proj = selectors_exports.selectLocalProject(state, projectPath);
|
301665
|
+
if (!proj)
|
301666
|
+
return "Untitled";
|
301667
|
+
const projectFileInfo = selectors_exports.selectFileInfo(session.store.getState(), proj.file);
|
301668
|
+
return projectFileInfo.title || proj.index || "Untitled";
|
301669
|
+
}
|
301670
|
+
function indexFrontmatterFromProject(session, projectPath) {
|
301671
|
+
var _a6, _b;
|
301672
|
+
const state = session.store.getState();
|
301673
|
+
const cache = castSession(session);
|
301674
|
+
const proj = selectors_exports.selectLocalProject(state, projectPath);
|
301675
|
+
if (!proj)
|
301676
|
+
return {};
|
301677
|
+
const { file } = proj;
|
301678
|
+
const { frontmatter } = (_b = (_a6 = cache.$getMdast(file)) === null || _a6 === void 0 ? void 0 : _a6.post) !== null && _b !== void 0 ? _b : {};
|
301679
|
+
return frontmatter !== null && frontmatter !== void 0 ? frontmatter : {};
|
301680
|
+
}
|
301681
|
+
|
301416
301682
|
// ../myst-cli/dist/build/site/manifest.js
|
301417
301683
|
async function resolvePageExports(session, file) {
|
301418
301684
|
const exports2 = (await collectExportOptions(session, [file], [
|
@@ -301479,7 +301745,6 @@ async function resolvePageDownloads(session, file, projectPath) {
|
|
301479
301745
|
return resolvedDownloads;
|
301480
301746
|
}
|
301481
301747
|
async function localToManifestProject(session, projectPath, projectSlug) {
|
301482
|
-
var _a6, _b;
|
301483
301748
|
if (!projectPath)
|
301484
301749
|
return null;
|
301485
301750
|
const state = session.store.getState();
|
@@ -301487,43 +301752,9 @@ async function localToManifestProject(session, projectPath, projectSlug) {
|
|
301487
301752
|
const proj = selectors_exports.selectLocalProject(state, projectPath);
|
301488
301753
|
if (!proj)
|
301489
301754
|
return null;
|
301490
|
-
const { index: index4
|
301755
|
+
const { index: index4 } = proj;
|
301491
301756
|
const projectFileInfo = selectors_exports.selectFileInfo(state, proj.file);
|
301492
|
-
const
|
301493
|
-
const cache = castSession(session);
|
301494
|
-
const pages = await Promise.all(proj.pages.map(async (page) => {
|
301495
|
-
var _a7, _b2, _c, _d2, _e, _f, _g, _h, _j, _k;
|
301496
|
-
if ("file" in page) {
|
301497
|
-
const fileInfo3 = selectors_exports.selectFileInfo(state, page.file);
|
301498
|
-
const title = fileInfo3.title || fileTitle(page.file);
|
301499
|
-
const short_title = (_a7 = fileInfo3.short_title) !== null && _a7 !== void 0 ? _a7 : void 0;
|
301500
|
-
const description = (_b2 = fileInfo3.description) !== null && _b2 !== void 0 ? _b2 : "";
|
301501
|
-
const thumbnail2 = (_c = fileInfo3.thumbnail) !== null && _c !== void 0 ? _c : "";
|
301502
|
-
const thumbnailOptimized = (_d2 = fileInfo3.thumbnailOptimized) !== null && _d2 !== void 0 ? _d2 : "";
|
301503
|
-
const banner2 = (_e = fileInfo3.banner) !== null && _e !== void 0 ? _e : "";
|
301504
|
-
const bannerOptimized = (_f = fileInfo3.bannerOptimized) !== null && _f !== void 0 ? _f : "";
|
301505
|
-
const date = (_g = fileInfo3.date) !== null && _g !== void 0 ? _g : "";
|
301506
|
-
const tags = (_h = fileInfo3.tags) !== null && _h !== void 0 ? _h : [];
|
301507
|
-
const { slug, level, file } = page;
|
301508
|
-
const { frontmatter: frontmatter2 } = (_k = (_j = cache.$getMdast(file)) === null || _j === void 0 ? void 0 : _j.post) !== null && _k !== void 0 ? _k : {};
|
301509
|
-
const projectPage = {
|
301510
|
-
slug,
|
301511
|
-
title,
|
301512
|
-
short_title,
|
301513
|
-
description,
|
301514
|
-
date,
|
301515
|
-
thumbnail: thumbnail2,
|
301516
|
-
thumbnailOptimized,
|
301517
|
-
banner: banner2,
|
301518
|
-
bannerOptimized,
|
301519
|
-
tags,
|
301520
|
-
level,
|
301521
|
-
enumerator: frontmatter2 === null || frontmatter2 === void 0 ? void 0 : frontmatter2.enumerator
|
301522
|
-
};
|
301523
|
-
return projectPage;
|
301524
|
-
}
|
301525
|
-
return { ...page };
|
301526
|
-
}));
|
301757
|
+
const pages = await manifestPagesFromProject(session, projectPath);
|
301527
301758
|
const projFrontmatter = projConfig ? filterKeys(projConfig, PROJECT_FRONTMATTER_KEYS) : {};
|
301528
301759
|
const projConfigFile = selectors_exports.selectLocalConfigFile(state, projectPath);
|
301529
301760
|
const exports2 = projConfigFile ? await resolvePageExports(session, projConfigFile) : [];
|
@@ -301531,7 +301762,7 @@ async function localToManifestProject(session, projectPath, projectSlug) {
|
|
301531
301762
|
const parts = resolveFrontmatterParts(session, projFrontmatter);
|
301532
301763
|
const banner = await transformBanner(session, import_node_path29.default.join(projectPath, "myst.yml"), projFrontmatter, session.publicPath(), { altOutputFolder: "/", webp: true });
|
301533
301764
|
const thumbnail = await transformThumbnail(session, null, import_node_path29.default.join(projectPath, "myst.yml"), projFrontmatter, session.publicPath(), { altOutputFolder: "/", webp: true });
|
301534
|
-
const
|
301765
|
+
const frontmatter = indexFrontmatterFromProject(session, projectPath);
|
301535
301766
|
return {
|
301536
301767
|
...projFrontmatter,
|
301537
301768
|
// TODO: a null in the project frontmatter should not fall back to index page
|
@@ -301544,7 +301775,7 @@ async function localToManifestProject(session, projectPath, projectSlug) {
|
|
301544
301775
|
downloads,
|
301545
301776
|
parts,
|
301546
301777
|
bibliography: projFrontmatter.bibliography || [],
|
301547
|
-
title:
|
301778
|
+
title: manifestTitleFromProject(session, projectPath),
|
301548
301779
|
slug: projectSlug,
|
301549
301780
|
index: index4,
|
301550
301781
|
enumerator: frontmatter === null || frontmatter === void 0 ? void 0 : frontmatter.enumerator,
|
@@ -301659,9 +301890,10 @@ async function getSiteManifest(session, opts) {
|
|
301659
301890
|
validatedFrontmatter.options = resolvedOptions;
|
301660
301891
|
const parts = resolveFrontmatterParts(session, validatedFrontmatter);
|
301661
301892
|
const manifest = {
|
301893
|
+
version: SPEC_VERSION,
|
301894
|
+
myst: version_default2,
|
301662
301895
|
...validatedFrontmatter,
|
301663
301896
|
parts,
|
301664
|
-
myst: version_default2,
|
301665
301897
|
nav: nav || [],
|
301666
301898
|
actions: actions || [],
|
301667
301899
|
projects: siteProjects
|
@@ -304300,7 +304532,7 @@ async function transformMdast(session, opts) {
|
|
304300
304532
|
rendererFiles.push(...localFiles);
|
304301
304533
|
}
|
304302
304534
|
const fileCitationRenderer = combineCitationRenderers(cache, ...rendererFiles);
|
304303
|
-
if (execute) {
|
304535
|
+
if (execute && !frontmatter.skip_execution) {
|
304304
304536
|
const cachePath2 = import_node_path39.default.join(session.buildPath(), "execute");
|
304305
304537
|
await kernelExecutionTransform(mdast2, vfile2, {
|
304306
304538
|
basePath: session.sourcePath(),
|
@@ -304360,8 +304592,8 @@ async function transformMdast(session, opts) {
|
|
304360
304592
|
if (!watchMode)
|
304361
304593
|
log.info(toc(`\u{1F4D6} Built ${file} in %s.`));
|
304362
304594
|
}
|
304363
|
-
async function postProcessMdast(session, { file, checkLinks, pageReferenceStates, extraLinkTransformers }) {
|
304364
|
-
var _a6;
|
304595
|
+
async function postProcessMdast(session, { file, checkLinks, pageReferenceStates, extraLinkTransformers, site }) {
|
304596
|
+
var _a6, _b, _c;
|
304365
304597
|
const toc = tic();
|
304366
304598
|
const { log } = session;
|
304367
304599
|
const cache = castSession(session);
|
@@ -304373,6 +304605,21 @@ async function postProcessMdast(session, { file, checkLinks, pageReferenceStates
|
|
304373
304605
|
const { mdast: mdast2, dependencies, frontmatter } = mdastPost;
|
304374
304606
|
const state = new MultiPageReferenceResolver(pageReferenceStates, file, vfile2);
|
304375
304607
|
const externalReferences = Object.values(cache.$externalReferences);
|
304608
|
+
const storeState = session.store.getState();
|
304609
|
+
const projectPath = selectors_exports.selectCurrentProjectPath(storeState);
|
304610
|
+
const siteConfig = selectors_exports.selectCurrentSiteConfig(storeState);
|
304611
|
+
const projectSlug = (_b = (_a6 = siteConfig === null || siteConfig === void 0 ? void 0 : siteConfig.projects) === null || _a6 === void 0 ? void 0 : _a6.find((proj) => proj.path === projectPath)) === null || _b === void 0 ? void 0 : _b.slug;
|
304612
|
+
if (site) {
|
304613
|
+
buildTocTransform(mdast2, vfile2, projectPath ? [
|
304614
|
+
{
|
304615
|
+
title: manifestTitleFromProject(session, projectPath),
|
304616
|
+
level: 1,
|
304617
|
+
slug: "",
|
304618
|
+
enumerator: indexFrontmatterFromProject(session, projectPath).enumerator
|
304619
|
+
},
|
304620
|
+
...await manifestPagesFromProject(session, projectPath)
|
304621
|
+
] : void 0, projectSlug);
|
304622
|
+
}
|
304376
304623
|
const transformers = [
|
304377
304624
|
...extraLinkTransformers || [],
|
304378
304625
|
new WikiTransformer(),
|
@@ -304396,7 +304643,7 @@ async function postProcessMdast(session, { file, checkLinks, pageReferenceStates
|
|
304396
304643
|
await transformMystXRefs(session, vfile2, mdast2, frontmatter);
|
304397
304644
|
await embedTransform(session, mdast2, file, dependencies, state);
|
304398
304645
|
const pipe = unified();
|
304399
|
-
(
|
304646
|
+
(_c = session.plugins) === null || _c === void 0 ? void 0 : _c.transforms.forEach((t2) => {
|
304400
304647
|
if (t2.stage !== "project")
|
304401
304648
|
return;
|
304402
304649
|
pipe.use(t2.plugin, void 0, pluginUtils);
|
@@ -304807,6 +305054,7 @@ async function writeFile(session, { file, pageSlug, projectSlug, projectPath })
|
|
304807
305054
|
const parts = resolveFrontmatterParts(session, frontmatter);
|
304808
305055
|
const frontmatterWithExports = { ...frontmatter, exports: exports2, downloads, parts };
|
304809
305056
|
const mystData = {
|
305057
|
+
version: SPEC_VERSION,
|
304810
305058
|
kind,
|
304811
305059
|
sha256,
|
304812
305060
|
slug,
|
@@ -304857,7 +305105,8 @@ async function fastProcessFile(session, { file, pageSlug, projectPath, projectSl
|
|
304857
305105
|
return postProcessMdast(session, {
|
304858
305106
|
file: f3,
|
304859
305107
|
pageReferenceStates,
|
304860
|
-
extraLinkTransformers
|
305108
|
+
extraLinkTransformers,
|
305109
|
+
site: true
|
304861
305110
|
});
|
304862
305111
|
}));
|
304863
305112
|
await Promise.all([...pages.map((p5) => p5.file), ...fileParts].map(async (f3) => {
|
@@ -304869,7 +305118,7 @@ async function fastProcessFile(session, { file, pageSlug, projectPath, projectSl
|
|
304869
305118
|
imageAltOutputFolder: imageAltOutputFolder !== null && imageAltOutputFolder !== void 0 ? imageAltOutputFolder : "/",
|
304870
305119
|
imageExtensions: imageExtensions !== null && imageExtensions !== void 0 ? imageExtensions : WEB_IMAGE_EXTENSIONS,
|
304871
305120
|
optimizeWebp: true,
|
304872
|
-
processThumbnail:
|
305121
|
+
processThumbnail: f3 === file,
|
304873
305122
|
maxSizeWebp
|
304874
305123
|
});
|
304875
305124
|
}
|
@@ -304937,7 +305186,8 @@ async function processProject(session, siteProject, opts) {
|
|
304937
305186
|
file: page.file,
|
304938
305187
|
checkLinks: checkLinks || strict,
|
304939
305188
|
pageReferenceStates,
|
304940
|
-
extraLinkTransformers
|
305189
|
+
extraLinkTransformers,
|
305190
|
+
site: true
|
304941
305191
|
})));
|
304942
305192
|
if (writeFiles) {
|
304943
305193
|
await Promise.all(pagesToTransform.map(async (page) => {
|
@@ -309540,7 +309790,7 @@ var caption2 = (state, node3) => {
|
|
309540
309790
|
};
|
309541
309791
|
function getFootnoteNumber(node3) {
|
309542
309792
|
var _a6;
|
309543
|
-
return (_a6 = node3.
|
309793
|
+
return (_a6 = Number.parseInt(node3.enumerator, 10)) !== null && _a6 !== void 0 ? _a6 : Number(node3.identifier);
|
309544
309794
|
}
|
309545
309795
|
var footnoteDefinition = (state, node3) => {
|
309546
309796
|
const { children, current: current2 } = state;
|
@@ -318229,7 +318479,7 @@ function rewriteAssetsFolder(directory, baseurl) {
|
|
318229
318479
|
if (![".html", ".js", ".json"].includes(import_node_path57.default.extname(file)))
|
318230
318480
|
return;
|
318231
318481
|
const data = import_fs_extra.default.readFileSync(file).toString();
|
318232
|
-
const modified = data.replace(new RegExp(`\\/${ASSETS_FOLDER}\\/`, "g"), `${baseurl || ""}/build/`).replace('href="/favicon.ico"', `href="${baseurl || ""}/favicon.ico"`);
|
318482
|
+
const modified = data.replace(new RegExp(`\\/${ASSETS_FOLDER}\\/`, "g"), `${baseurl || ""}/build/`).replace('href="/favicon.ico"', `href="${baseurl || ""}/favicon.ico"`).replace('href="/myst-theme.css"', `href="${baseurl || ""}/myst-theme.css"`);
|
318233
318483
|
import_fs_extra.default.writeFileSync(file, modified);
|
318234
318484
|
});
|
318235
318485
|
}
|
@@ -325347,7 +325597,7 @@ var TOCTreeOptions = z.object({
|
|
325347
325597
|
caption: z.string(),
|
325348
325598
|
hidden: z.boolean(),
|
325349
325599
|
maxdepth: z.number(),
|
325350
|
-
|
325600
|
+
numbered: z.boolean(),
|
325351
325601
|
reversed: z.boolean(),
|
325352
325602
|
titlesonly: z.boolean()
|
325353
325603
|
}).partial();
|
@@ -325802,6 +326052,7 @@ async function upgradeGlossary(documentLines) {
|
|
325802
326052
|
|
325803
326053
|
// ../myst-cli/dist/init/jupyter-book/upgrade.js
|
325804
326054
|
async function upgradeJupyterBook(session, configFile) {
|
326055
|
+
var _a6, _b;
|
325805
326056
|
const config3 = {
|
325806
326057
|
version: 1,
|
325807
326058
|
project: {}
|
@@ -325815,14 +326066,19 @@ async function upgradeJupyterBook(session, configFile) {
|
|
325815
326066
|
session.log.info(`Migrating Jupyter Book configuration to ${source_default.blue("myst.yml")}`);
|
325816
326067
|
({ site: config3.site, project: config3.project } = upgradeConfig(configData2));
|
325817
326068
|
}
|
325818
|
-
if (await fsExists("_toc.yml")) {
|
325819
|
-
|
325820
|
-
|
325821
|
-
|
325822
|
-
|
325823
|
-
|
325824
|
-
}
|
326069
|
+
if (!await fsExists("_toc.yml")) {
|
326070
|
+
throw new Error(`${source_default.blue("_toc.yml")} is a required Jupyter Book configuration file`);
|
326071
|
+
}
|
326072
|
+
const tocContent = await import_promises4.default.readFile("_toc.yml", { encoding: "utf-8" });
|
326073
|
+
const tocData = validateSphinxExternalTOC(js_yaml_default.load(tocContent));
|
326074
|
+
if (defined2(tocData)) {
|
326075
|
+
session.log.info(`Migrating TOC to ${source_default.blue("myst.yml")}`);
|
326076
|
+
config3.project.toc = upgradeTOC(session, tocData);
|
325825
326077
|
}
|
326078
|
+
config3.site = (_a6 = config3.site) !== null && _a6 !== void 0 ? _a6 : {};
|
326079
|
+
config3.site.options = (_b = config3.site.options) !== null && _b !== void 0 ? _b : {};
|
326080
|
+
session.log.debug(source_default.dim(`Setting ${source_default.blue("site.options.folders")} to ${source_default.blue("true")}`));
|
326081
|
+
config3.site.options.folders = true;
|
325826
326082
|
await upgradeProjectSyntax(session);
|
325827
326083
|
await import_promises4.default.writeFile(configFile, js_yaml_default.dump(config3));
|
325828
326084
|
await import_promises4.default.rename("_config.yml", "._config.yml.bak");
|
@@ -326003,6 +326259,7 @@ You can start the ${readableName()} web server later with:`), source_default.bol
|
|
326003
326259
|
|
326004
326260
|
// ../myst-cli/dist/plugins.js
|
326005
326261
|
var import_node_fs44 = __toESM(require("fs"), 1);
|
326262
|
+
var import_node_url3 = require("url");
|
326006
326263
|
|
326007
326264
|
// ../myst-cli/dist/executablePlugin.js
|
326008
326265
|
var import_node_child_process2 = require("child_process");
|
@@ -326144,10 +326401,11 @@ async function loadPlugins(session) {
|
|
326144
326401
|
}
|
326145
326402
|
session.log.debug(`Loading plugins: "${configPlugins.map((info) => `${info.path} (${info.type})`).join('", "')}"`);
|
326146
326403
|
const modules = await Promise.all(configPlugins.map(async (info) => {
|
326404
|
+
var _a6, _b;
|
326147
326405
|
const { type: type2, path: path44 } = info;
|
326148
326406
|
switch (type2) {
|
326149
326407
|
case "executable": {
|
326150
|
-
if (!import_node_fs44.default.statSync(path44).isFile) {
|
326408
|
+
if (!((_a6 = import_node_fs44.default.statSync(path44, { throwIfNoEntry: false })) === null || _a6 === void 0 ? void 0 : _a6.isFile())) {
|
326151
326409
|
addWarningForFile(session, path44, `Unknown plugin "${path44}", it must be an executable file`, "error", {
|
326152
326410
|
ruleId: RuleId.pluginLoads
|
326153
326411
|
});
|
@@ -326171,15 +326429,16 @@ async function loadPlugins(session) {
|
|
326171
326429
|
return { path: path44, module: { plugin: plugin5 } };
|
326172
326430
|
}
|
326173
326431
|
case "javascript": {
|
326174
|
-
if (!import_node_fs44.default.statSync(path44).isFile || !path44.endsWith(".mjs")) {
|
326432
|
+
if (!((_b = import_node_fs44.default.statSync(path44, { throwIfNoEntry: false })) === null || _b === void 0 ? void 0 : _b.isFile()) || !path44.endsWith(".mjs")) {
|
326175
326433
|
addWarningForFile(session, path44, `Unknown plugin "${path44}", it must be an mjs file`, "error", {
|
326176
326434
|
ruleId: RuleId.pluginLoads
|
326177
326435
|
});
|
326178
326436
|
return null;
|
326179
326437
|
}
|
326180
326438
|
let module2;
|
326439
|
+
const pathURL = (0, import_node_url3.pathToFileURL)(path44);
|
326181
326440
|
try {
|
326182
|
-
module2 = await import(
|
326441
|
+
module2 = await import(pathURL.toString());
|
326183
326442
|
} catch (error) {
|
326184
326443
|
session.log.debug(`
|
326185
326444
|
|
@@ -326874,7 +327133,7 @@ var AbortError2 = class extends RequestError {
|
|
326874
327133
|
var import_node_process8 = __toESM(require("process"), 1);
|
326875
327134
|
var import_node_buffer4 = require("buffer");
|
326876
327135
|
var import_node_stream6 = require("stream");
|
326877
|
-
var
|
327136
|
+
var import_node_url6 = require("url");
|
326878
327137
|
var import_node_http4 = __toESM(require("http"), 1);
|
326879
327138
|
|
326880
327139
|
// ../../node_modules/@szmarczak/http-timer/dist/source/index.js
|
@@ -326984,7 +327243,7 @@ var source_default5 = timer;
|
|
326984
327243
|
|
326985
327244
|
// ../../node_modules/cacheable-request/dist/index.js
|
326986
327245
|
var import_node_events2 = __toESM(require("events"), 1);
|
326987
|
-
var
|
327246
|
+
var import_node_url4 = __toESM(require("url"), 1);
|
326988
327247
|
var import_node_crypto5 = __toESM(require("crypto"), 1);
|
326989
327248
|
var import_node_stream5 = __toESM(require("stream"), 1);
|
326990
327249
|
|
@@ -327313,10 +327572,10 @@ var CacheableRequest = class {
|
|
327313
327572
|
this.request = () => (options, cb) => {
|
327314
327573
|
let url;
|
327315
327574
|
if (typeof options === "string") {
|
327316
|
-
url = normalizeUrlObject(
|
327575
|
+
url = normalizeUrlObject(import_node_url4.default.parse(options));
|
327317
327576
|
options = {};
|
327318
|
-
} else if (options instanceof
|
327319
|
-
url = normalizeUrlObject(
|
327577
|
+
} else if (options instanceof import_node_url4.default.URL) {
|
327578
|
+
url = normalizeUrlObject(import_node_url4.default.parse(options.toString()));
|
327320
327579
|
options = {};
|
327321
327580
|
} else {
|
327322
327581
|
const [pathname, ...searchParts] = (options.path ?? "").split("?");
|
@@ -327334,7 +327593,7 @@ var CacheableRequest = class {
|
|
327334
327593
|
};
|
327335
327594
|
options.headers = Object.fromEntries(entries(options.headers).map(([key3, value]) => [key3.toLowerCase(), value]));
|
327336
327595
|
const ee = new import_node_events2.default();
|
327337
|
-
const normalizedUrlString = normalizeUrl(
|
327596
|
+
const normalizedUrlString = normalizeUrl(import_node_url4.default.format(url), {
|
327338
327597
|
stripWWW: false,
|
327339
327598
|
removeTrailingSlash: false,
|
327340
327599
|
stripAuthentication: false
|
@@ -328069,7 +328328,7 @@ var calculate_retry_delay_default = calculateRetryDelay;
|
|
328069
328328
|
// ../../node_modules/got/dist/source/core/options.js
|
328070
328329
|
var import_node_process7 = __toESM(require("process"), 1);
|
328071
328330
|
var import_node_util6 = require("util");
|
328072
|
-
var
|
328331
|
+
var import_node_url5 = require("url");
|
328073
328332
|
var import_node_tls = require("tls");
|
328074
328333
|
var import_node_http3 = __toESM(require("http"), 1);
|
328075
328334
|
var import_node_https2 = __toESM(require("https"), 1);
|
@@ -328614,7 +328873,7 @@ var defaultInternals = {
|
|
328614
328873
|
const next = parsed.find((entry) => entry.parameters.rel === "next" || entry.parameters.rel === '"next"');
|
328615
328874
|
if (next) {
|
328616
328875
|
return {
|
328617
|
-
url: new
|
328876
|
+
url: new import_node_url5.URL(next.reference, response.url)
|
328618
328877
|
};
|
328619
328878
|
}
|
328620
328879
|
return false;
|
@@ -328655,7 +328914,7 @@ var cloneInternals = (internals) => {
|
|
328655
328914
|
beforeRetry: [...hooks.beforeRetry],
|
328656
328915
|
afterResponse: [...hooks.afterResponse]
|
328657
328916
|
},
|
328658
|
-
searchParams: internals.searchParams ? new
|
328917
|
+
searchParams: internals.searchParams ? new import_node_url5.URLSearchParams(internals.searchParams) : void 0,
|
328659
328918
|
pagination: { ...internals.pagination }
|
328660
328919
|
};
|
328661
328920
|
if (result.url !== void 0) {
|
@@ -329106,7 +329365,7 @@ var Options2 = class {
|
|
329106
329365
|
throw new Error("`url` must not start with a slash");
|
329107
329366
|
}
|
329108
329367
|
const urlString = `${this.prefixUrl}${value.toString()}`;
|
329109
|
-
const url = new
|
329368
|
+
const url = new import_node_url5.URL(urlString);
|
329110
329369
|
this._internals.url = url;
|
329111
329370
|
if (url.protocol === "unix:") {
|
329112
329371
|
url.href = `http://unix${url.pathname}${url.search}`;
|
@@ -329240,7 +329499,7 @@ var Options2 = class {
|
|
329240
329499
|
return this._internals.url.searchParams;
|
329241
329500
|
}
|
329242
329501
|
if (this._internals.searchParams === void 0) {
|
329243
|
-
this._internals.searchParams = new
|
329502
|
+
this._internals.searchParams = new import_node_url5.URLSearchParams();
|
329244
329503
|
}
|
329245
329504
|
return this._internals.searchParams;
|
329246
329505
|
}
|
@@ -329257,12 +329516,12 @@ var Options2 = class {
|
|
329257
329516
|
const searchParameters = this.searchParams;
|
329258
329517
|
let updated;
|
329259
329518
|
if (dist_default5.string(value)) {
|
329260
|
-
updated = new
|
329261
|
-
} else if (value instanceof
|
329519
|
+
updated = new import_node_url5.URLSearchParams(value);
|
329520
|
+
} else if (value instanceof import_node_url5.URLSearchParams) {
|
329262
329521
|
updated = value;
|
329263
329522
|
} else {
|
329264
329523
|
validateSearchParameters(value);
|
329265
|
-
updated = new
|
329524
|
+
updated = new import_node_url5.URLSearchParams();
|
329266
329525
|
for (const key2 in value) {
|
329267
329526
|
const entry = value[key2];
|
329268
329527
|
if (entry === null) {
|
@@ -330571,7 +330830,7 @@ var Request3 = class extends import_node_stream6.Duplex {
|
|
330571
330830
|
}
|
330572
330831
|
const { form } = options;
|
330573
330832
|
options.form = void 0;
|
330574
|
-
options.body = new
|
330833
|
+
options.body = new import_node_url6.URLSearchParams(form).toString();
|
330575
330834
|
} else {
|
330576
330835
|
if (noContentType) {
|
330577
330836
|
headers["content-type"] = "application/json";
|
@@ -330675,7 +330934,7 @@ var Request3 = class extends import_node_stream6.Duplex {
|
|
330675
330934
|
}
|
330676
330935
|
try {
|
330677
330936
|
const redirectBuffer = import_node_buffer4.Buffer.from(response.headers.location, "binary").toString();
|
330678
|
-
const redirectUrl = new
|
330937
|
+
const redirectUrl = new import_node_url6.URL(redirectBuffer, url);
|
330679
330938
|
if (!isUnixSocketURL(url) && isUnixSocketURL(redirectUrl)) {
|
330680
330939
|
this._beforeError(new RequestError("Cannot redirect to UNIX socket", {}, this));
|
330681
330940
|
return;
|
mystmd-1.3.23.dist-info/RECORD
DELETED
@@ -1,9 +0,0 @@
|
|
1
|
-
mystmd_py/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
2
|
-
mystmd_py/main.py,sha256=qFAnpbiqjx7jXMMmPSVUBA7SSxuRjmr6SiRDBH0rhKQ,2767
|
3
|
-
mystmd_py/myst.cjs,sha256=00dVzv1WaK2tqvUGNeE0kbFiseD2ZnQOJM_abBdWRhI,13189143
|
4
|
-
mystmd_py/nodeenv.py,sha256=8KER0P-WIXM2MsRJF4vcedBKscGoc26lJKojbkDxjbg,2447
|
5
|
-
mystmd-1.3.23.dist-info/METADATA,sha256=483pxz-GI-p5hnhfYt-YvtQkrdugNf9e7EZZyPrPqOw,3020
|
6
|
-
mystmd-1.3.23.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
7
|
-
mystmd-1.3.23.dist-info/entry_points.txt,sha256=eC2ol2gqS2q5E-ktkMrBSvV0tckGUcNGS-c4hEQ-_V4,45
|
8
|
-
mystmd-1.3.23.dist-info/licenses/LICENSE,sha256=4BcikqvulW5nh_MxaocO-lC7ydIX23dMbcqtNTUSxr4,1082
|
9
|
-
mystmd-1.3.23.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|