@weborigami/origami 0.5.5 → 0.5.7

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.
Files changed (67) hide show
  1. package/main.js +2 -26
  2. package/package.json +4 -5
  3. package/src/cli/cli.js +10 -8
  4. package/src/common/documentObject.js +1 -1
  5. package/src/common/utilities.d.ts +0 -1
  6. package/src/common/utilities.js +1 -19
  7. package/src/dev/ExplorableSiteTransform.js +2 -2
  8. package/src/dev/OriCommandTransform.js +29 -7
  9. package/src/dev/explore.js +17 -40
  10. package/src/dev/explore.ori +2 -2
  11. package/src/dev/help.yaml +4 -1
  12. package/src/dev/log.js +1 -1
  13. package/src/dev/svg.js +5 -5
  14. package/src/initializeBuiltins.js +23 -0
  15. package/src/origami/fetch.js +4 -8
  16. package/src/origami/indexPage.js +4 -4
  17. package/src/origami/inline.js +3 -4
  18. package/src/origami/jsonParse.js +1 -1
  19. package/src/origami/mdHtml.js +3 -7
  20. package/src/origami/mdOutline.js +3 -3
  21. package/src/origami/ori.js +16 -24
  22. package/src/origami/origami.js +0 -2
  23. package/src/origami/sitemap.js +2 -2
  24. package/src/origami/static.js +2 -2
  25. package/src/origami/string.js +1 -10
  26. package/src/origami/yaml.js +1 -5
  27. package/src/origami/yamlParse.js +1 -1
  28. package/src/server/constructResponse.js +1 -1
  29. package/src/server/server.js +6 -26
  30. package/src/builtinsProgram.js +0 -56
  31. package/src/builtinsShell.js +0 -18
  32. package/src/cli/getConfig.js +0 -11
  33. package/src/common/constructHref.js +0 -20
  34. package/src/common/constructSiteTree.js +0 -34
  35. package/src/common/fetchAndHandleExtension.js +0 -27
  36. package/src/handlers/css.handler.js +0 -7
  37. package/src/handlers/csv.handler.js +0 -129
  38. package/src/handlers/handlerBuiltins.js +0 -27
  39. package/src/handlers/handlers.js +0 -33
  40. package/src/handlers/htm.handler.js +0 -2
  41. package/src/handlers/html.handler.js +0 -7
  42. package/src/handlers/jpeg.handler.js +0 -62
  43. package/src/handlers/jpg.handler.js +0 -2
  44. package/src/handlers/js.handler.js +0 -20
  45. package/src/handlers/json.handler.js +0 -27
  46. package/src/handlers/md.handler.js +0 -7
  47. package/src/handlers/mjs.handler.js +0 -2
  48. package/src/handlers/ori.handler.js +0 -55
  49. package/src/handlers/oridocument.handler.js +0 -78
  50. package/src/handlers/parseFrontMatter.js +0 -16
  51. package/src/handlers/processUnpackedContent.js +0 -35
  52. package/src/handlers/ts.handler.js +0 -1
  53. package/src/handlers/txt.handler.js +0 -91
  54. package/src/handlers/wasm.handler.js +0 -17
  55. package/src/handlers/xhtml.handler.js +0 -2
  56. package/src/handlers/yaml.handler.js +0 -36
  57. package/src/handlers/yml.handler.js +0 -2
  58. package/src/origami/config.js +0 -18
  59. package/src/origami/project.js +0 -111
  60. package/src/protocols/explore.js +0 -17
  61. package/src/protocols/files.js +0 -31
  62. package/src/protocols/http.js +0 -18
  63. package/src/protocols/https.js +0 -18
  64. package/src/protocols/httpstree.js +0 -17
  65. package/src/protocols/httptree.js +0 -17
  66. package/src/protocols/node.js +0 -13
  67. package/src/protocols/package.js +0 -70
@@ -1,5 +1,5 @@
1
1
  import { Tree, getTreeArgument, jsonKeys } from "@weborigami/async-tree";
2
- import index from "./indexPage.js";
2
+ import indexPage from "./indexPage.js";
3
3
 
4
4
  /**
5
5
  * Expose common static keys (index.html, .keys.json) for a tree.
@@ -23,7 +23,7 @@ function staticTree(tree) {
23
23
  async get(key) {
24
24
  let value = await tree.get(key);
25
25
  if (value === undefined && key === "index.html") {
26
- value = await index.call(this, this);
26
+ value = await indexPage(this);
27
27
  } else if (value === undefined && key === ".keys.json") {
28
28
  value = await jsonKeys.stringify(this);
29
29
  } else if (Tree.isTreelike(value)) {
@@ -1,10 +1 @@
1
- import { toString } from "../common/utilities.js";
2
-
3
- /**
4
- * Convert an object to a string.
5
- *
6
- * @param {any} object
7
- */
8
- export default function stringBuiltin(object) {
9
- return toString(object);
10
- }
1
+ export { toString as default } from "@weborigami/async-tree";
@@ -1,23 +1,19 @@
1
1
  /** @typedef {import("@weborigami/types").AsyncTree} AsyncTree */
2
2
  import { isUnpackable, toPlainValue } from "@weborigami/async-tree";
3
3
  import YAML from "yaml";
4
- import assertTreeIsDefined from "../common/assertTreeIsDefined.js";
5
4
 
6
5
  /**
7
6
  * Render the object as text in YAML format.
8
7
  *
9
- * @this {AsyncTree|null}
10
8
  * @param {any} [obj]
11
9
  */
12
- export default async function toYaml(obj) {
13
- assertTreeIsDefined(this, "yaml");
10
+ export default async function yamlBuiltin(obj) {
14
11
  // A fragment of the logic from getTreeArgument.js
15
12
  if (arguments.length > 0 && obj === undefined) {
16
13
  throw new Error(
17
14
  "An Origami function was called with an initial argument, but its value is undefined."
18
15
  );
19
16
  }
20
- obj = obj ?? this;
21
17
  if (obj === undefined) {
22
18
  return undefined;
23
19
  }
@@ -1,5 +1,5 @@
1
+ import { toString } from "@weborigami/async-tree";
1
2
  import * as serialize from "../common/serialize.js";
2
- import { toString } from "../common/utilities.js";
3
3
 
4
4
  export default async function yamlParse(input) {
5
5
  const text = toString(input);
@@ -4,10 +4,10 @@ import {
4
4
  isPlainObject,
5
5
  isStringlike,
6
6
  SiteTree,
7
+ toString,
7
8
  Tree,
8
9
  } from "@weborigami/async-tree";
9
10
  import * as serialize from "../common/serialize.js";
10
- import { toString } from "../common/utilities.js";
11
11
  import { mediaTypeForExtension } from "./mediaTypes.js";
12
12
 
13
13
  /**
@@ -81,35 +81,15 @@ export async function handleRequest(request, response, tree) {
81
81
  }
82
82
 
83
83
  function keysFromUrl(url) {
84
- // Split on occurrences of `/!`, which represent Origami debug commands.
85
- // Command arguments can contain slashes; don't treat those as path keys.
86
- const parts = url.pathname.split(/\/!/);
87
-
88
- // Split everything before the first command by slashes and decode those.
89
- let path = parts.shift();
90
- if (parts.length > 0) {
91
- // HACK: Add back trailing slash that was removed by split
92
- path += "/";
93
- }
94
- const pathKeys = keysFromPath(path).map((key) => decodeURIComponent(key));
95
- if (parts.length > 0 && pathKeys.at(-1) === "") {
96
- // HACK part 2: Remove empty string that was added for trailing slash
97
- pathKeys.pop();
98
- }
84
+ const encodedKeys = keysFromPath(url.pathname);
85
+ const keys = encodedKeys.map((key) => decodeURIComponent(key));
99
86
 
100
- // If there are no commands, and the path ends with a trailing slash, the
101
- // final key will be an empty string. Change that to "index.html".
102
- if (parts.length === 0 && pathKeys[pathKeys.length - 1] === "") {
103
- pathKeys[pathKeys.length - 1] = "index.html";
87
+ // If the path ends with a trailing slash, the final key will be an empty
88
+ // string. Change that to "index.html".
89
+ if (keys.at(-1) === "") {
90
+ keys[keys.length - 1] = "index.html";
104
91
  }
105
92
 
106
- // Decode the text of the commands, prefix spaces with a backslash, and add
107
- // back the `!` character.
108
- const commandKeys = parts.map(
109
- (command) => `!${decodeURIComponent(command).replace(/ /g, "\\ ")}`
110
- );
111
-
112
- const keys = [...pathKeys, ...commandKeys];
113
93
  return keys;
114
94
  }
115
95
 
@@ -1,56 +0,0 @@
1
- import { Tree } from "@weborigami/async-tree";
2
- import { jsGlobals } from "@weborigami/language";
3
- import * as dev from "./dev/dev.js";
4
- import help from "./dev/help.js";
5
- import handlerBuiltins from "./handlers/handlerBuiltins.js";
6
- import * as origami from "./origami/origami.js";
7
- import explore from "./protocols/explore.js";
8
- import files from "./protocols/files.js";
9
- import http from "./protocols/http.js";
10
- import https from "./protocols/https.js";
11
- import httpstree from "./protocols/httpstree.js";
12
- import httptree from "./protocols/httptree.js";
13
- import node from "./protocols/node.js";
14
- import packageNamespace from "./protocols/package.js";
15
-
16
- let builtins;
17
-
18
- export default function builtinsProgram() {
19
- if (!builtins) {
20
- const Protocol = {
21
- explore,
22
- files,
23
- http,
24
- https,
25
- httpstree,
26
- httptree,
27
- node,
28
- package: packageNamespace,
29
- };
30
-
31
- /** @type {any} */
32
- builtins = {
33
- ...jsGlobals,
34
-
35
- "explore:": explore,
36
- "files:": files,
37
- "help:": help,
38
- "http:": http,
39
- "https:": https,
40
- "httpstree:": httpstree,
41
- "httptree:": httptree,
42
- "node:": node,
43
- "package:": packageNamespace,
44
-
45
- Dev: dev,
46
- Tree,
47
- Origami: origami,
48
- Protocol,
49
-
50
- // Handlers need to be exposed at top level
51
- ...handlerBuiltins(),
52
- };
53
- }
54
-
55
- return builtins;
56
- }
@@ -1,18 +0,0 @@
1
- import builtinsProgram from "./builtinsProgram.js";
2
- import * as dev from "./dev/dev.js";
3
-
4
- let builtins;
5
-
6
- export default function builtinsShell() {
7
- if (!builtins) {
8
- builtins = {
9
- // All program builtins
10
- ...builtinsProgram(),
11
-
12
- // Dev builtins exposed at the top level in shell
13
- ...dev,
14
- };
15
- }
16
-
17
- return builtins;
18
- }
@@ -1,11 +0,0 @@
1
- import { Tree } from "@weborigami/async-tree";
2
-
3
- // Return the config for the given tree
4
- export default function getConfig(tree) {
5
- if (!tree) {
6
- return null;
7
- }
8
- /** @type {any} */
9
- const root = Tree.root(tree);
10
- return root.config;
11
- }
@@ -1,20 +0,0 @@
1
- import { pathFromKeys } from "@weborigami/async-tree";
2
-
3
- /**
4
- * Given a protocol, a host, and a list of keys, construct an href.
5
- *
6
- * @param {string} protocol
7
- * @param {string} host
8
- * @param {string[]} keys
9
- */
10
- export default function constructHref(protocol, host, ...keys) {
11
- const path = pathFromKeys(keys);
12
- let href = [host, path].join("/");
13
- if (!href.startsWith(protocol)) {
14
- if (!href.startsWith("//")) {
15
- href = `//${href}`;
16
- }
17
- href = `${protocol}${href}`;
18
- }
19
- return href;
20
- }
@@ -1,34 +0,0 @@
1
- import { trailingSlash } from "@weborigami/async-tree";
2
- import { HandleExtensionsTransform } from "@weborigami/language";
3
- import constructHref from "./constructHref.js";
4
-
5
- /**
6
- * Given a protocol, a host, and a list of keys, construct an href.
7
- *
8
- * @typedef {import("@weborigami/types").AsyncTree} AsyncTree
9
- *
10
- * @param {string} protocol
11
- * @param {import("../../index.ts").Constructor<AsyncTree>} treeClass
12
- * @param {AsyncTree|null} parent
13
- * @param {string} host
14
- * @param {string[]} keys
15
- */
16
- export default function constructSiteTree(
17
- protocol,
18
- treeClass,
19
- parent,
20
- host,
21
- ...keys
22
- ) {
23
- // If the last key doesn't end in a slash, remove it for now.
24
- let lastKey;
25
- if (keys.length > 0 && keys.at(-1) && !trailingSlash.has(keys.at(-1))) {
26
- lastKey = keys.pop();
27
- }
28
-
29
- const href = constructHref(protocol, host, ...keys);
30
- let result = new (HandleExtensionsTransform(treeClass))(href);
31
- result.parent = parent;
32
-
33
- return lastKey ? result.get(lastKey) : result;
34
- }
@@ -1,27 +0,0 @@
1
- import { getHandlers, handleExtension } from "@weborigami/language";
2
-
3
- /**
4
- * Fetch the resource at the given href.
5
- *
6
- * @typedef {import("@weborigami/types").AsyncTree} AsyncTree
7
- *
8
- * @this {AsyncTree|null}
9
- * @param {string} href
10
- */
11
- export default async function fetchAndHandleExtension(href) {
12
- const response = await fetch(href);
13
- if (!response.ok) {
14
- return undefined;
15
- }
16
- let buffer = await response.arrayBuffer();
17
-
18
- // Attach any loader defined for the file type.
19
- const url = new URL(href);
20
- const filename = url.pathname.split("/").pop();
21
- if (this && filename) {
22
- const handlers = getHandlers(this);
23
- buffer = await handleExtension(this, buffer, filename, handlers);
24
- }
25
-
26
- return buffer;
27
- }
@@ -1,7 +0,0 @@
1
- // .css files use the .txt loader
2
- import { txtHandler } from "./handlers.js";
3
-
4
- export default {
5
- ...txtHandler,
6
- mediaType: "text/css",
7
- };
@@ -1,129 +0,0 @@
1
- import { symbols, toString } from "@weborigami/async-tree";
2
-
3
- export default {
4
- mediaType: "text/csv",
5
-
6
- unpack(packed, options = {}) {
7
- const parent = options.parent ?? null;
8
- const text = toString(packed);
9
- if (text === null) {
10
- throw new TypeError("CSV handler can only unpack text");
11
- }
12
- const data = csvParse(text);
13
- // Define `parent` as non-enumerable property
14
- Object.defineProperty(data, symbols.parent, {
15
- configurable: true,
16
- enumerable: false,
17
- value: parent,
18
- writable: true,
19
- });
20
- return data;
21
- },
22
- };
23
-
24
- /**
25
- * Parse text as CSV following RFC 4180
26
- *
27
- * This assumes the presence of a header row, and accepts both CRLF and LF line
28
- * endings.
29
- *
30
- * @param {string} text
31
- * @returns {any[]}
32
- */
33
- function csvParse(text) {
34
- const rows = [];
35
- let currentRow = [];
36
- let currentField = "";
37
-
38
- const pushField = () => {
39
- // Push the completed field and reset for the next field.
40
- currentRow.push(currentField);
41
- currentField = "";
42
- };
43
-
44
- const pushRow = () => {
45
- // Push the row if there is at least one field (accounts for potential trailing newline)
46
- rows.push(currentRow);
47
- currentRow = [];
48
- };
49
-
50
- // Main state machine
51
- let i = 0;
52
- let inQuotes = false;
53
- while (i < text.length) {
54
- const char = text[i];
55
-
56
- if (inQuotes) {
57
- // In a quoted field
58
- if (char === '"') {
59
- // Check if next character is also a quote
60
- if (i + 1 < text.length && text[i + 1] === '"') {
61
- // Append a literal double quote and skip the next character
62
- currentField += '"';
63
- i += 2;
64
- continue;
65
- } else {
66
- // End of the quoted field
67
- inQuotes = false;
68
- i++;
69
- continue;
70
- }
71
- } else {
72
- // All other characters within quotes are taken literally.
73
- currentField += char;
74
- i++;
75
- continue;
76
- }
77
- } else if (char === '"') {
78
- // Start of a quoted field
79
- inQuotes = true;
80
- i++;
81
- continue;
82
- } else if (char === ",") {
83
- // End of field
84
- pushField();
85
- i++;
86
- continue;
87
- } else if (char === "\n" || (char === "\r" && text[i + 1] === "\n")) {
88
- // End of row: push the last field, then row.
89
- pushField();
90
- pushRow();
91
- if (char === "\r" && text[i + 1] === "\n") {
92
- i++; // Handle CRLF line endings
93
- }
94
- i++;
95
- continue;
96
- } else {
97
- // Regular character
98
- currentField += char;
99
- i++;
100
- continue;
101
- }
102
- }
103
-
104
- // Handle any remaining data after the loop.
105
- // This will capture the last field/row if the text did not end with a newline.
106
- if (inQuotes) {
107
- // Mismatched quotes: you might choose to throw an error or handle it gracefully.
108
- throw new Error("CSV parsing error: unmatched quote in the input.");
109
- }
110
- if (currentField !== "" || text.at(-1) === ",") {
111
- pushField();
112
- }
113
- if (currentRow.length > 0) {
114
- pushRow();
115
- }
116
-
117
- // The first row is assumed to be the header.
118
- if (rows.length === 0) {
119
- return [];
120
- }
121
-
122
- const header = rows.shift();
123
-
124
- const data = rows.map((row) =>
125
- Object.fromEntries(row.map((value, index) => [header[index], value]))
126
- );
127
-
128
- return data;
129
- }
@@ -1,27 +0,0 @@
1
- import * as handlers from "./handlers.js";
2
-
3
- export default function handlerBuiltins() {
4
- return {
5
- "css.handler": handlers.cssHandler,
6
- "csv.handler": handlers.csvHandler,
7
- "htm.handler": handlers.htmHandler,
8
- "html.handler": handlers.htmlHandler,
9
- "jpeg.handler": handlers.jpegHandler,
10
- "jpg.handler": handlers.jpgHandler,
11
- "js.handler": handlers.jsHandler,
12
- // TODO: Remove deprecated JSE extensions
13
- "jse.handler": handlers.oriHandler,
14
- "jsedocument.handler": handlers.oridocumentHandler,
15
- "json.handler": handlers.jsonHandler,
16
- "md.handler": handlers.mdHandler,
17
- "mjs.handler": handlers.mjsHandler,
18
- "ori.handler": handlers.oriHandler,
19
- "oridocument.handler": handlers.oridocumentHandler,
20
- "ts.handler": handlers.tsHandler,
21
- "txt.handler": handlers.txtHandler,
22
- "wasm.handler": handlers.wasmHandler,
23
- "xhtml.handler": handlers.xhtmlHandler,
24
- "yaml.handler": handlers.yamlHandler,
25
- "yml.handler": handlers.ymlHandler,
26
- };
27
- }
@@ -1,33 +0,0 @@
1
- //
2
- // This library includes a number of modules with circular dependencies. This
3
- // module exists to explicitly set the loading order for those modules. To
4
- // enforce use of this loading order, other modules should only load the modules
5
- // below via this module.
6
- //
7
- // About this pattern:
8
- // https://medium.com/visual-development/how-to-fix-nasty-circular-dependency-issues-once-and-for-all-in-javascript-typescript-a04c987cf0de
9
- //
10
- // Note: to avoid having VS Code auto-sort the imports, keep lines between them.
11
-
12
- export { default as jsHandler } from "./js.handler.js";
13
- export { default as tsHandler } from "./ts.handler.js";
14
-
15
- export { default as oriHandler } from "./ori.handler.js";
16
-
17
- export { default as oridocumentHandler } from "./oridocument.handler.js";
18
-
19
- export { default as txtHandler } from "./txt.handler.js";
20
-
21
- export { default as cssHandler } from "./css.handler.js";
22
- export { default as csvHandler } from "./csv.handler.js";
23
- export { default as htmHandler } from "./htm.handler.js";
24
- export { default as htmlHandler } from "./html.handler.js";
25
- export { default as jpegHandler } from "./jpeg.handler.js";
26
- export { default as jpgHandler } from "./jpg.handler.js";
27
- export { default as jsonHandler } from "./json.handler.js";
28
- export { default as mdHandler } from "./md.handler.js";
29
- export { default as mjsHandler } from "./mjs.handler.js";
30
- export { default as wasmHandler } from "./wasm.handler.js";
31
- export { default as xhtmlHandler } from "./xhtml.handler.js";
32
- export { default as yamlHandler } from "./yaml.handler.js";
33
- export { default as ymlHandler } from "./yml.handler.js";
@@ -1,2 +0,0 @@
1
- // .htm is a synonynm for .html
2
- export { htmlHandler as default } from "./handlers.js";
@@ -1,7 +0,0 @@
1
- // .html files use the .txt loader
2
- import { txtHandler } from "./handlers.js";
3
-
4
- export default {
5
- ...txtHandler,
6
- mediaType: "text/html",
7
- };
@@ -1,62 +0,0 @@
1
- import exifParser from "exif-parser";
2
-
3
- const exifDateTags = [
4
- "ModifyDate",
5
- "MDPrepDate",
6
- "DateTimeOriginal",
7
- "CreateDate",
8
- "PreviewDateTime",
9
- "GPSDateStamp",
10
- ];
11
-
12
- /**
13
- * A JPEG file with possible Exif metadata
14
- */
15
- export default {
16
- mediaType: "image/jpeg",
17
-
18
- /** @type {import("@weborigami/async-tree").UnpackFunction} */
19
- async unpack(packed, options) {
20
- if (packed instanceof Uint8Array) {
21
- // Downgrade to old Node Buffer for exif-parser.
22
- packed = Buffer.from(packed);
23
- }
24
- const parser = exifParser.create(packed);
25
- parser.enableTagNames(true);
26
- parser.enableSimpleValues(true);
27
- const parsed = await parser.parse();
28
-
29
- // The exif-parser `enableSimpleValues` option should convert dates to
30
- // JavaScript Date objects, but that doesn't seem to work. Ensure dates are
31
- // Date objects.
32
- const exif = parsed.tags;
33
- for (const tag of exifDateTags) {
34
- if (typeof exif[tag] === "number") {
35
- exif[tag] = new Date(exif[tag] * 1000);
36
- }
37
- }
38
-
39
- const result = {
40
- height: parsed.imageSize.height,
41
- width: parsed.imageSize.width,
42
- exif,
43
- };
44
-
45
- // Promote some Exif properties to the top level.
46
- const tagsToPromote = {
47
- ImageDescription: "caption",
48
- ModifyDate: "modified",
49
- Orientation: "orientation",
50
- };
51
- for (const [tag, key] of Object.entries(tagsToPromote)) {
52
- if (exif[tag] !== undefined) {
53
- result[key] = exif[tag];
54
- }
55
- }
56
-
57
- // Add aspect ratio for use with `aspect-ratio` CSS.
58
- result.aspectRatio = result.width / result.height;
59
-
60
- return result;
61
- },
62
- };
@@ -1,2 +0,0 @@
1
- // .jpg is a synonym for .jpeg
2
- export { jpegHandler as default } from "./handlers.js";
@@ -1,20 +0,0 @@
1
- import processUnpackedContent from "./processUnpackedContent.js";
2
-
3
- /**
4
- * A JavaScript file
5
- *
6
- * Unpacking a JavaScript file returns its default export, or its set of exports
7
- * if there is more than one.
8
- */
9
- export default {
10
- mediaType: "application/javascript",
11
-
12
- /** @type {import("@weborigami/async-tree").UnpackFunction} */
13
- async unpack(packed, options = {}) {
14
- const { key, parent } = options;
15
- if (parent && "import" in parent) {
16
- const content = await /** @type {any} */ (parent).import?.(key);
17
- return processUnpackedContent(content, parent);
18
- }
19
- },
20
- };
@@ -1,27 +0,0 @@
1
- import { symbols } from "@weborigami/async-tree";
2
- import * as utilities from "../common/utilities.js";
3
-
4
- /**
5
- * A JSON file
6
- *
7
- * Unpacking a JSON file returns the parsed data.
8
- */
9
- export default {
10
- mediaType: "application/json",
11
-
12
- /** @type {import("@weborigami/async-tree").UnpackFunction} */
13
- unpack(packed) {
14
- const json = utilities.toString(packed);
15
- if (!json) {
16
- throw new Error("Tried to parse something as JSON but it wasn't text.");
17
- }
18
- const data = JSON.parse(json);
19
- if (data && typeof data === "object" && Object.isExtensible(data)) {
20
- Object.defineProperty(data, symbols.deep, {
21
- enumerable: false,
22
- value: true,
23
- });
24
- }
25
- return data;
26
- },
27
- };
@@ -1,7 +0,0 @@
1
- // .md files use the .txt loader
2
- import { txtHandler } from "./handlers.js";
3
-
4
- export default {
5
- ...txtHandler,
6
- mediaType: "text/markdown",
7
- };
@@ -1,2 +0,0 @@
1
- // .mjs is a synonynm for .js
2
- export { jsHandler as default } from "./handlers.js";