@0x-jerry/x 2.9.0 → 2.9.1
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.
|
@@ -19,8 +19,8 @@ function sourceToStr(source) {
|
|
|
19
19
|
// src/hooks/text.ts
|
|
20
20
|
var supportedExtensions = [".txt", ".sql", ".md"];
|
|
21
21
|
var FORMAT_TYPE = "text";
|
|
22
|
-
var resolve = (specifier,
|
|
23
|
-
const nextResult = nextResolve(specifier);
|
|
22
|
+
var resolve = (specifier, ctx, nextResolve) => {
|
|
23
|
+
const nextResult = nextResolve(specifier, ctx);
|
|
24
24
|
const ext = path.extname(specifier);
|
|
25
25
|
if (!supportedExtensions.includes(ext)) return nextResult;
|
|
26
26
|
return {
|
|
@@ -50,8 +50,8 @@ import path2 from "path";
|
|
|
50
50
|
import stripJsonComment from "strip-json-comments";
|
|
51
51
|
var supportedExtensions2 = [".jsonc"];
|
|
52
52
|
var FORMAT_TYPE2 = "jsonc";
|
|
53
|
-
var resolve2 = (specifier,
|
|
54
|
-
const nextResult = nextResolve(specifier);
|
|
53
|
+
var resolve2 = (specifier, ctx, nextResolve) => {
|
|
54
|
+
const nextResult = nextResolve(specifier, ctx);
|
|
55
55
|
const ext = path2.extname(specifier);
|
|
56
56
|
if (!supportedExtensions2.includes(ext)) return nextResult;
|
|
57
57
|
return {
|
|
@@ -81,8 +81,8 @@ import path3 from "path";
|
|
|
81
81
|
import yaml from "yaml";
|
|
82
82
|
var supportedExtensions3 = [".yaml", ".yml"];
|
|
83
83
|
var FORMAT_TYPE3 = "yaml";
|
|
84
|
-
var resolve3 = (specifier,
|
|
85
|
-
const nextResult = nextResolve(specifier);
|
|
84
|
+
var resolve3 = (specifier, ctx, nextResolve) => {
|
|
85
|
+
const nextResult = nextResolve(specifier, ctx);
|
|
86
86
|
const ext = path3.extname(specifier);
|
|
87
87
|
if (!supportedExtensions3.includes(ext)) return nextResult;
|
|
88
88
|
return {
|
|
@@ -92,7 +92,7 @@ var resolve3 = (specifier, _ctx, nextResolve) => {
|
|
|
92
92
|
};
|
|
93
93
|
var load3 = (url, ctx, nextLoad) => {
|
|
94
94
|
if (ctx.format !== FORMAT_TYPE3) return nextLoad(url, ctx);
|
|
95
|
-
const nextResult = nextLoad(url,
|
|
95
|
+
const nextResult = nextLoad(url, ctx);
|
|
96
96
|
const source = yaml.parse(sourceToStr(nextResult.source));
|
|
97
97
|
return {
|
|
98
98
|
format: "json",
|
package/dist/preload.js
CHANGED
package/dist/x.js
CHANGED
package/dist/xn.js
CHANGED
package/dist/xr.js
CHANGED