oxfmt 0.28.0 → 0.30.0
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.
- package/configuration_schema.json +6 -6
- package/dist/{acorn-DAW0FPiQ.js → acorn-DTid_xfu.js} +1 -1
- package/dist/{angular-Bp4COWBb.js → angular-9UbP57Ow.js} +1 -1
- package/dist/apis-B_SiDd1X.js +93 -0
- package/dist/{babel-BBXzPn-B.js → babel-CX7YS1y4.js} +7 -1
- package/dist/{bindings-DSU8hw_s.js → bindings-C0zQXeKX.js} +79 -79
- package/dist/chunk-DSjvVL_1-DGPqLkX8.js +38 -0
- package/dist/chunk-DpReBE2K.js +20 -0
- package/dist/cli-worker.d.ts +12 -19
- package/dist/cli-worker.js +1 -1
- package/dist/cli.js +14 -15
- package/dist/dist-D3CWjTTc.js +1151 -0
- package/dist/{flow-VOcv74DG.js → flow-D6joRvfg.js} +1 -1
- package/dist/{glimmer-CZDZs6hh.js → glimmer-CDzFnA-R.js} +1 -1
- package/dist/{html-BMeTtKPI.js → html-CRvdkeeP.js} +1 -1
- package/dist/index.js +7 -11
- package/dist/{meriyah-DSp1Ry3Y.js → meriyah-DSeGVyBs.js} +1 -1
- package/dist/{migrate-prettier-D2MK0fzz.js → migrate-prettier-CRIoVxnG.js} +1 -1
- package/dist/{postcss-DRQF_nwk.js → postcss-DKPxyBch.js} +10 -1
- package/dist/{prettier-nC608ysd.js → prettier-iX8V55ba.js} +36 -37
- package/dist/prettier-plugin-oxfmt-D9Ggp7I5.js +51 -0
- package/dist/resolve-pWjAK-4f-BDpC233X.js +4201 -0
- package/dist/sorter-DnKClyKU.js +5 -0
- package/dist/sorter-VB3XW2i_-BpFugw-x.js +214 -0
- package/dist/{typescript-B1IPgies.js → typescript-BFhFx1UJ.js} +1 -1
- package/dist/utils-D8dQkKEd-Dq0tCGW_.js +83 -0
- package/dist/v3-RIpeMkdf-CHWXIFE7.js +79883 -0
- package/dist/v4-C_IPPFom-CzWZrmWL.js +56373 -0
- package/package.json +45 -9
- package/dist/acorn-CLPbHJ67.js +0 -3
- package/dist/angular-B_Zlfo-B.js +0 -3
- package/dist/babel-6hlNsHrw.js +0 -3
- package/dist/dist-CaTLGVG6.js +0 -143525
- package/dist/flow-BgIY8g0A.js +0 -3
- package/dist/glimmer-B3e0jgXD.js +0 -3
- package/dist/html-BSz5Z0HR.js +0 -3
- package/dist/meriyah-CgkdFPMn.js +0 -3
- package/dist/postcss-CxsOmuAz.js +0 -3
- package/dist/prettier-O-uJkFBA.js +0 -3
- package/dist/prettier-gzzUBJre.js +0 -95
- package/dist/typescript-Ba60VIc1.js +0 -3
- /package/dist/{estree-B0I1Nhn2.js → estree-vodXR09f.js} +0 -0
- /package/dist/{graphql-hGnStqQP.js → graphql-DQKSu6tT.js} +0 -0
- /package/dist/{markdown-Drb2Pk6W.js → markdown-CDEe6Nm4.js} +0 -0
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"markdownDescription": "Print spaces between brackets in object literals.\n\n- Default: `true`"
|
|
34
34
|
},
|
|
35
35
|
"embeddedLanguageFormatting": {
|
|
36
|
-
"description": "Control whether to format embedded parts (For example, CSS-in-JS, or JS-in-Vue, etc.) in the file.\n\nNOTE: XXX-in-JS support is incomplete.\
|
|
36
|
+
"description": "Control whether to format embedded parts (For example, CSS-in-JS, or JS-in-Vue, etc.) in the file.\n\nNOTE: XXX-in-JS support is incomplete.\n\n- Default: `\"auto\"`",
|
|
37
37
|
"anyOf": [
|
|
38
38
|
{
|
|
39
39
|
"$ref": "#/definitions/EmbeddedLanguageFormattingConfig"
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"type": "null"
|
|
43
43
|
}
|
|
44
44
|
],
|
|
45
|
-
"markdownDescription": "Control whether to format embedded parts (For example, CSS-in-JS, or JS-in-Vue, etc.) in the file.\n\nNOTE: XXX-in-JS support is incomplete.\
|
|
45
|
+
"markdownDescription": "Control whether to format embedded parts (For example, CSS-in-JS, or JS-in-Vue, etc.) in the file.\n\nNOTE: XXX-in-JS support is incomplete.\n\n- Default: `\"auto\"`"
|
|
46
46
|
},
|
|
47
47
|
"endOfLine": {
|
|
48
48
|
"description": "Which end of line characters to apply.\n\nNOTE: `\"auto\"` is not supported.\n\n- Default: `\"lf\"`\n- Overrides `.editorconfig.end_of_line`",
|
|
@@ -265,13 +265,13 @@
|
|
|
265
265
|
"type": "object",
|
|
266
266
|
"properties": {
|
|
267
267
|
"elementNamePattern": {
|
|
268
|
-
"description": "List of
|
|
268
|
+
"description": "List of glob patterns to match import sources for this group.",
|
|
269
269
|
"default": [],
|
|
270
270
|
"type": "array",
|
|
271
271
|
"items": {
|
|
272
272
|
"type": "string"
|
|
273
273
|
},
|
|
274
|
-
"markdownDescription": "List of
|
|
274
|
+
"markdownDescription": "List of glob patterns to match import sources for this group."
|
|
275
275
|
},
|
|
276
276
|
"groupName": {
|
|
277
277
|
"description": "Name of the custom group, used in the `groups` option.",
|
|
@@ -328,7 +328,7 @@
|
|
|
328
328
|
"markdownDescription": "Print spaces between brackets in object literals.\n\n- Default: `true`"
|
|
329
329
|
},
|
|
330
330
|
"embeddedLanguageFormatting": {
|
|
331
|
-
"description": "Control whether to format embedded parts (For example, CSS-in-JS, or JS-in-Vue, etc.) in the file.\n\nNOTE: XXX-in-JS support is incomplete.\
|
|
331
|
+
"description": "Control whether to format embedded parts (For example, CSS-in-JS, or JS-in-Vue, etc.) in the file.\n\nNOTE: XXX-in-JS support is incomplete.\n\n- Default: `\"auto\"`",
|
|
332
332
|
"anyOf": [
|
|
333
333
|
{
|
|
334
334
|
"$ref": "#/definitions/EmbeddedLanguageFormattingConfig"
|
|
@@ -337,7 +337,7 @@
|
|
|
337
337
|
"type": "null"
|
|
338
338
|
}
|
|
339
339
|
],
|
|
340
|
-
"markdownDescription": "Control whether to format embedded parts (For example, CSS-in-JS, or JS-in-Vue, etc.) in the file.\n\nNOTE: XXX-in-JS support is incomplete.\
|
|
340
|
+
"markdownDescription": "Control whether to format embedded parts (For example, CSS-in-JS, or JS-in-Vue, etc.) in the file.\n\nNOTE: XXX-in-JS support is incomplete.\n\n- Default: `\"auto\"`"
|
|
341
341
|
},
|
|
342
342
|
"endOfLine": {
|
|
343
343
|
"description": "Which end of line characters to apply.\n\nNOTE: `\"auto\"` is not supported.\n\n- Default: `\"lf\"`\n- Overrides `.editorconfig.end_of_line`",
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
//#region src-js/libs/apis.ts
|
|
2
|
+
let prettierCache;
|
|
3
|
+
async function loadPrettier() {
|
|
4
|
+
if (prettierCache) return prettierCache;
|
|
5
|
+
prettierCache = await import("./prettier-iX8V55ba.js").then((n) => n.n);
|
|
6
|
+
return prettierCache;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* TODO: Plugins support
|
|
10
|
+
* - Read `plugins` field
|
|
11
|
+
* - Load plugins dynamically and parse `languages` field
|
|
12
|
+
* - Map file extensions and filenames to Prettier parsers
|
|
13
|
+
*
|
|
14
|
+
* @returns Array of loaded plugin's `languages` info
|
|
15
|
+
*/
|
|
16
|
+
async function resolvePlugins() {
|
|
17
|
+
return [];
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Format xxx-in-js code snippets
|
|
21
|
+
*
|
|
22
|
+
* @returns Formatted code snippet
|
|
23
|
+
* TODO: In the future, this should return `Doc` instead of string,
|
|
24
|
+
* otherwise, we cannot calculate `printWidth` correctly.
|
|
25
|
+
*/
|
|
26
|
+
async function formatEmbeddedCode({ code, options }) {
|
|
27
|
+
const prettier = await loadPrettier();
|
|
28
|
+
await setupTailwindPlugin(options);
|
|
29
|
+
return prettier.format(code, options);
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Format non-js file
|
|
33
|
+
*
|
|
34
|
+
* @returns Formatted code
|
|
35
|
+
*/
|
|
36
|
+
async function formatFile({ code, options }) {
|
|
37
|
+
const prettier = await loadPrettier();
|
|
38
|
+
await setupTailwindPlugin(options);
|
|
39
|
+
await setupOxfmtPlugin(options);
|
|
40
|
+
return prettier.format(code, options);
|
|
41
|
+
}
|
|
42
|
+
let tailwindPluginCache;
|
|
43
|
+
async function loadTailwindPlugin() {
|
|
44
|
+
if (tailwindPluginCache) return tailwindPluginCache;
|
|
45
|
+
tailwindPluginCache = await import("./dist-D3CWjTTc.js");
|
|
46
|
+
return tailwindPluginCache;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Load Tailwind CSS plugin lazily when `options._useTailwindPlugin` flag is set.
|
|
50
|
+
* The flag is added by Rust side only for relevant parsers.
|
|
51
|
+
*
|
|
52
|
+
* Option mapping (experimentalTailwindcss.xxx → tailwindXxx) is also done in Rust side.
|
|
53
|
+
*/
|
|
54
|
+
async function setupTailwindPlugin(options) {
|
|
55
|
+
if ("_useTailwindPlugin" in options === false) return;
|
|
56
|
+
const tailwindPlugin = await loadTailwindPlugin();
|
|
57
|
+
options.plugins ??= [];
|
|
58
|
+
options.plugins.push(tailwindPlugin);
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Process Tailwind CSS classes found in JS/TS files in batch.
|
|
62
|
+
* @param args - Object containing classes and options (filepath is in options.filepath)
|
|
63
|
+
* @returns Array of sorted class strings (same order/length as input)
|
|
64
|
+
*/
|
|
65
|
+
async function sortTailwindClasses({ classes, options }) {
|
|
66
|
+
const { createSorter } = await import("./sorter-DnKClyKU.js");
|
|
67
|
+
return (await createSorter({
|
|
68
|
+
filepath: options.filepath,
|
|
69
|
+
stylesheetPath: options.tailwindStylesheet,
|
|
70
|
+
configPath: options.tailwindConfig,
|
|
71
|
+
preserveWhitespace: options.tailwindPreserveWhitespace,
|
|
72
|
+
preserveDuplicates: options.tailwindPreserveDuplicates
|
|
73
|
+
})).sortClassAttributes(classes);
|
|
74
|
+
}
|
|
75
|
+
let oxfmtPluginCache;
|
|
76
|
+
async function loadOxfmtPlugin() {
|
|
77
|
+
if (oxfmtPluginCache) return oxfmtPluginCache;
|
|
78
|
+
oxfmtPluginCache = await import("./prettier-plugin-oxfmt-D9Ggp7I5.js");
|
|
79
|
+
return oxfmtPluginCache;
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Load oxfmt plugin for js-in-xxx parsers when `options._oxfmtPluginOptionsJson` is set.
|
|
83
|
+
* The flag is added by Rust side only for relevant parsers.
|
|
84
|
+
*/
|
|
85
|
+
async function setupOxfmtPlugin(options) {
|
|
86
|
+
if ("_oxfmtPluginOptionsJson" in options === false) return;
|
|
87
|
+
const oxcPlugin = await loadOxfmtPlugin();
|
|
88
|
+
options.plugins ??= [];
|
|
89
|
+
options.plugins.push(oxcPlugin);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
//#endregion
|
|
93
|
+
export { sortTailwindClasses as i, formatFile as n, resolvePlugins as r, formatEmbeddedCode as t };
|
|
@@ -1,4 +1,10 @@
|
|
|
1
|
+
import { t as __exportAll } from "./chunk-DpReBE2K.js";
|
|
2
|
+
|
|
1
3
|
//#region ../../node_modules/.pnpm/prettier@3.8.1/node_modules/prettier/plugins/babel.mjs
|
|
4
|
+
var babel_exports = /* @__PURE__ */ __exportAll({
|
|
5
|
+
default: () => Ks,
|
|
6
|
+
parsers: () => ra
|
|
7
|
+
});
|
|
2
8
|
var Hs = Object.defineProperty;
|
|
3
9
|
var Re = (a, t) => {
|
|
4
10
|
for (var e in t) Hs(a, e, {
|
|
@@ -9876,4 +9882,4 @@ var ra = {
|
|
|
9876
9882
|
};
|
|
9877
9883
|
|
|
9878
9884
|
//#endregion
|
|
9879
|
-
export { ra as
|
|
9885
|
+
export { Ks as default, ra as parsers, babel_exports as t };
|
|
@@ -56,9 +56,9 @@ function requireNative() {
|
|
|
56
56
|
loadErrors.push(e);
|
|
57
57
|
}
|
|
58
58
|
try {
|
|
59
|
-
const binding = require("@oxfmt/android-arm64");
|
|
60
|
-
const bindingPackageVersion = require("@oxfmt/android-arm64/package.json").version;
|
|
61
|
-
if (bindingPackageVersion !== "0.
|
|
59
|
+
const binding = require("@oxfmt/binding-android-arm64");
|
|
60
|
+
const bindingPackageVersion = require("@oxfmt/binding-android-arm64/package.json").version;
|
|
61
|
+
if (bindingPackageVersion !== "0.29.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 0.29.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
62
62
|
return binding;
|
|
63
63
|
} catch (e) {
|
|
64
64
|
loadErrors.push(e);
|
|
@@ -70,9 +70,9 @@ function requireNative() {
|
|
|
70
70
|
loadErrors.push(e);
|
|
71
71
|
}
|
|
72
72
|
try {
|
|
73
|
-
const binding = require("@oxfmt/android-arm-eabi");
|
|
74
|
-
const bindingPackageVersion = require("@oxfmt/android-arm-eabi/package.json").version;
|
|
75
|
-
if (bindingPackageVersion !== "0.
|
|
73
|
+
const binding = require("@oxfmt/binding-android-arm-eabi");
|
|
74
|
+
const bindingPackageVersion = require("@oxfmt/binding-android-arm-eabi/package.json").version;
|
|
75
|
+
if (bindingPackageVersion !== "0.29.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 0.29.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
76
76
|
return binding;
|
|
77
77
|
} catch (e) {
|
|
78
78
|
loadErrors.push(e);
|
|
@@ -85,9 +85,9 @@ function requireNative() {
|
|
|
85
85
|
loadErrors.push(e);
|
|
86
86
|
}
|
|
87
87
|
try {
|
|
88
|
-
const binding = require("@oxfmt/win32-x64-gnu");
|
|
89
|
-
const bindingPackageVersion = require("@oxfmt/win32-x64-gnu/package.json").version;
|
|
90
|
-
if (bindingPackageVersion !== "0.
|
|
88
|
+
const binding = require("@oxfmt/binding-win32-x64-gnu");
|
|
89
|
+
const bindingPackageVersion = require("@oxfmt/binding-win32-x64-gnu/package.json").version;
|
|
90
|
+
if (bindingPackageVersion !== "0.29.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 0.29.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
91
91
|
return binding;
|
|
92
92
|
} catch (e) {
|
|
93
93
|
loadErrors.push(e);
|
|
@@ -99,9 +99,9 @@ function requireNative() {
|
|
|
99
99
|
loadErrors.push(e);
|
|
100
100
|
}
|
|
101
101
|
try {
|
|
102
|
-
const binding = require("@oxfmt/win32-x64");
|
|
103
|
-
const bindingPackageVersion = require("@oxfmt/win32-x64/package.json").version;
|
|
104
|
-
if (bindingPackageVersion !== "0.
|
|
102
|
+
const binding = require("@oxfmt/binding-win32-x64-msvc");
|
|
103
|
+
const bindingPackageVersion = require("@oxfmt/binding-win32-x64-msvc/package.json").version;
|
|
104
|
+
if (bindingPackageVersion !== "0.29.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 0.29.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
105
105
|
return binding;
|
|
106
106
|
} catch (e) {
|
|
107
107
|
loadErrors.push(e);
|
|
@@ -114,9 +114,9 @@ function requireNative() {
|
|
|
114
114
|
loadErrors.push(e);
|
|
115
115
|
}
|
|
116
116
|
try {
|
|
117
|
-
const binding = require("@oxfmt/win32-ia32");
|
|
118
|
-
const bindingPackageVersion = require("@oxfmt/win32-ia32/package.json").version;
|
|
119
|
-
if (bindingPackageVersion !== "0.
|
|
117
|
+
const binding = require("@oxfmt/binding-win32-ia32-msvc");
|
|
118
|
+
const bindingPackageVersion = require("@oxfmt/binding-win32-ia32-msvc/package.json").version;
|
|
119
|
+
if (bindingPackageVersion !== "0.29.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 0.29.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
120
120
|
return binding;
|
|
121
121
|
} catch (e) {
|
|
122
122
|
loadErrors.push(e);
|
|
@@ -128,9 +128,9 @@ function requireNative() {
|
|
|
128
128
|
loadErrors.push(e);
|
|
129
129
|
}
|
|
130
130
|
try {
|
|
131
|
-
const binding = require("@oxfmt/win32-arm64");
|
|
132
|
-
const bindingPackageVersion = require("@oxfmt/win32-arm64/package.json").version;
|
|
133
|
-
if (bindingPackageVersion !== "0.
|
|
131
|
+
const binding = require("@oxfmt/binding-win32-arm64-msvc");
|
|
132
|
+
const bindingPackageVersion = require("@oxfmt/binding-win32-arm64-msvc/package.json").version;
|
|
133
|
+
if (bindingPackageVersion !== "0.29.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 0.29.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
134
134
|
return binding;
|
|
135
135
|
} catch (e) {
|
|
136
136
|
loadErrors.push(e);
|
|
@@ -143,9 +143,9 @@ function requireNative() {
|
|
|
143
143
|
loadErrors.push(e);
|
|
144
144
|
}
|
|
145
145
|
try {
|
|
146
|
-
const binding = require("@oxfmt/darwin-universal");
|
|
147
|
-
const bindingPackageVersion = require("@oxfmt/darwin-universal/package.json").version;
|
|
148
|
-
if (bindingPackageVersion !== "0.
|
|
146
|
+
const binding = require("@oxfmt/binding-darwin-universal");
|
|
147
|
+
const bindingPackageVersion = require("@oxfmt/binding-darwin-universal/package.json").version;
|
|
148
|
+
if (bindingPackageVersion !== "0.29.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 0.29.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
149
149
|
return binding;
|
|
150
150
|
} catch (e) {
|
|
151
151
|
loadErrors.push(e);
|
|
@@ -157,9 +157,9 @@ function requireNative() {
|
|
|
157
157
|
loadErrors.push(e);
|
|
158
158
|
}
|
|
159
159
|
try {
|
|
160
|
-
const binding = require("@oxfmt/darwin-x64");
|
|
161
|
-
const bindingPackageVersion = require("@oxfmt/darwin-x64/package.json").version;
|
|
162
|
-
if (bindingPackageVersion !== "0.
|
|
160
|
+
const binding = require("@oxfmt/binding-darwin-x64");
|
|
161
|
+
const bindingPackageVersion = require("@oxfmt/binding-darwin-x64/package.json").version;
|
|
162
|
+
if (bindingPackageVersion !== "0.29.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 0.29.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
163
163
|
return binding;
|
|
164
164
|
} catch (e) {
|
|
165
165
|
loadErrors.push(e);
|
|
@@ -171,9 +171,9 @@ function requireNative() {
|
|
|
171
171
|
loadErrors.push(e);
|
|
172
172
|
}
|
|
173
173
|
try {
|
|
174
|
-
const binding = require("@oxfmt/darwin-arm64");
|
|
175
|
-
const bindingPackageVersion = require("@oxfmt/darwin-arm64/package.json").version;
|
|
176
|
-
if (bindingPackageVersion !== "0.
|
|
174
|
+
const binding = require("@oxfmt/binding-darwin-arm64");
|
|
175
|
+
const bindingPackageVersion = require("@oxfmt/binding-darwin-arm64/package.json").version;
|
|
176
|
+
if (bindingPackageVersion !== "0.29.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 0.29.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
177
177
|
return binding;
|
|
178
178
|
} catch (e) {
|
|
179
179
|
loadErrors.push(e);
|
|
@@ -186,9 +186,9 @@ function requireNative() {
|
|
|
186
186
|
loadErrors.push(e);
|
|
187
187
|
}
|
|
188
188
|
try {
|
|
189
|
-
const binding = require("@oxfmt/freebsd-x64");
|
|
190
|
-
const bindingPackageVersion = require("@oxfmt/freebsd-x64/package.json").version;
|
|
191
|
-
if (bindingPackageVersion !== "0.
|
|
189
|
+
const binding = require("@oxfmt/binding-freebsd-x64");
|
|
190
|
+
const bindingPackageVersion = require("@oxfmt/binding-freebsd-x64/package.json").version;
|
|
191
|
+
if (bindingPackageVersion !== "0.29.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 0.29.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
192
192
|
return binding;
|
|
193
193
|
} catch (e) {
|
|
194
194
|
loadErrors.push(e);
|
|
@@ -200,9 +200,9 @@ function requireNative() {
|
|
|
200
200
|
loadErrors.push(e);
|
|
201
201
|
}
|
|
202
202
|
try {
|
|
203
|
-
const binding = require("@oxfmt/freebsd-arm64");
|
|
204
|
-
const bindingPackageVersion = require("@oxfmt/freebsd-arm64/package.json").version;
|
|
205
|
-
if (bindingPackageVersion !== "0.
|
|
203
|
+
const binding = require("@oxfmt/binding-freebsd-arm64");
|
|
204
|
+
const bindingPackageVersion = require("@oxfmt/binding-freebsd-arm64/package.json").version;
|
|
205
|
+
if (bindingPackageVersion !== "0.29.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 0.29.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
206
206
|
return binding;
|
|
207
207
|
} catch (e) {
|
|
208
208
|
loadErrors.push(e);
|
|
@@ -215,9 +215,9 @@ function requireNative() {
|
|
|
215
215
|
loadErrors.push(e);
|
|
216
216
|
}
|
|
217
217
|
try {
|
|
218
|
-
const binding = require("@oxfmt/linux-x64-musl");
|
|
219
|
-
const bindingPackageVersion = require("@oxfmt/linux-x64-musl/package.json").version;
|
|
220
|
-
if (bindingPackageVersion !== "0.
|
|
218
|
+
const binding = require("@oxfmt/binding-linux-x64-musl");
|
|
219
|
+
const bindingPackageVersion = require("@oxfmt/binding-linux-x64-musl/package.json").version;
|
|
220
|
+
if (bindingPackageVersion !== "0.29.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 0.29.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
221
221
|
return binding;
|
|
222
222
|
} catch (e) {
|
|
223
223
|
loadErrors.push(e);
|
|
@@ -229,9 +229,9 @@ function requireNative() {
|
|
|
229
229
|
loadErrors.push(e);
|
|
230
230
|
}
|
|
231
231
|
try {
|
|
232
|
-
const binding = require("@oxfmt/linux-x64-gnu");
|
|
233
|
-
const bindingPackageVersion = require("@oxfmt/linux-x64-gnu/package.json").version;
|
|
234
|
-
if (bindingPackageVersion !== "0.
|
|
232
|
+
const binding = require("@oxfmt/binding-linux-x64-gnu");
|
|
233
|
+
const bindingPackageVersion = require("@oxfmt/binding-linux-x64-gnu/package.json").version;
|
|
234
|
+
if (bindingPackageVersion !== "0.29.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 0.29.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
235
235
|
return binding;
|
|
236
236
|
} catch (e) {
|
|
237
237
|
loadErrors.push(e);
|
|
@@ -244,9 +244,9 @@ function requireNative() {
|
|
|
244
244
|
loadErrors.push(e);
|
|
245
245
|
}
|
|
246
246
|
try {
|
|
247
|
-
const binding = require("@oxfmt/linux-arm64-musl");
|
|
248
|
-
const bindingPackageVersion = require("@oxfmt/linux-arm64-musl/package.json").version;
|
|
249
|
-
if (bindingPackageVersion !== "0.
|
|
247
|
+
const binding = require("@oxfmt/binding-linux-arm64-musl");
|
|
248
|
+
const bindingPackageVersion = require("@oxfmt/binding-linux-arm64-musl/package.json").version;
|
|
249
|
+
if (bindingPackageVersion !== "0.29.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 0.29.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
250
250
|
return binding;
|
|
251
251
|
} catch (e) {
|
|
252
252
|
loadErrors.push(e);
|
|
@@ -258,9 +258,9 @@ function requireNative() {
|
|
|
258
258
|
loadErrors.push(e);
|
|
259
259
|
}
|
|
260
260
|
try {
|
|
261
|
-
const binding = require("@oxfmt/linux-arm64-gnu");
|
|
262
|
-
const bindingPackageVersion = require("@oxfmt/linux-arm64-gnu/package.json").version;
|
|
263
|
-
if (bindingPackageVersion !== "0.
|
|
261
|
+
const binding = require("@oxfmt/binding-linux-arm64-gnu");
|
|
262
|
+
const bindingPackageVersion = require("@oxfmt/binding-linux-arm64-gnu/package.json").version;
|
|
263
|
+
if (bindingPackageVersion !== "0.29.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 0.29.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
264
264
|
return binding;
|
|
265
265
|
} catch (e) {
|
|
266
266
|
loadErrors.push(e);
|
|
@@ -273,9 +273,9 @@ function requireNative() {
|
|
|
273
273
|
loadErrors.push(e);
|
|
274
274
|
}
|
|
275
275
|
try {
|
|
276
|
-
const binding = require("@oxfmt/linux-arm-musleabihf");
|
|
277
|
-
const bindingPackageVersion = require("@oxfmt/linux-arm-musleabihf/package.json").version;
|
|
278
|
-
if (bindingPackageVersion !== "0.
|
|
276
|
+
const binding = require("@oxfmt/binding-linux-arm-musleabihf");
|
|
277
|
+
const bindingPackageVersion = require("@oxfmt/binding-linux-arm-musleabihf/package.json").version;
|
|
278
|
+
if (bindingPackageVersion !== "0.29.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 0.29.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
279
279
|
return binding;
|
|
280
280
|
} catch (e) {
|
|
281
281
|
loadErrors.push(e);
|
|
@@ -287,9 +287,9 @@ function requireNative() {
|
|
|
287
287
|
loadErrors.push(e);
|
|
288
288
|
}
|
|
289
289
|
try {
|
|
290
|
-
const binding = require("@oxfmt/linux-arm-gnueabihf");
|
|
291
|
-
const bindingPackageVersion = require("@oxfmt/linux-arm-gnueabihf/package.json").version;
|
|
292
|
-
if (bindingPackageVersion !== "0.
|
|
290
|
+
const binding = require("@oxfmt/binding-linux-arm-gnueabihf");
|
|
291
|
+
const bindingPackageVersion = require("@oxfmt/binding-linux-arm-gnueabihf/package.json").version;
|
|
292
|
+
if (bindingPackageVersion !== "0.29.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 0.29.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
293
293
|
return binding;
|
|
294
294
|
} catch (e) {
|
|
295
295
|
loadErrors.push(e);
|
|
@@ -302,9 +302,9 @@ function requireNative() {
|
|
|
302
302
|
loadErrors.push(e);
|
|
303
303
|
}
|
|
304
304
|
try {
|
|
305
|
-
const binding = require("@oxfmt/linux-loong64-musl");
|
|
306
|
-
const bindingPackageVersion = require("@oxfmt/linux-loong64-musl/package.json").version;
|
|
307
|
-
if (bindingPackageVersion !== "0.
|
|
305
|
+
const binding = require("@oxfmt/binding-linux-loong64-musl");
|
|
306
|
+
const bindingPackageVersion = require("@oxfmt/binding-linux-loong64-musl/package.json").version;
|
|
307
|
+
if (bindingPackageVersion !== "0.29.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 0.29.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
308
308
|
return binding;
|
|
309
309
|
} catch (e) {
|
|
310
310
|
loadErrors.push(e);
|
|
@@ -316,9 +316,9 @@ function requireNative() {
|
|
|
316
316
|
loadErrors.push(e);
|
|
317
317
|
}
|
|
318
318
|
try {
|
|
319
|
-
const binding = require("@oxfmt/linux-loong64-gnu");
|
|
320
|
-
const bindingPackageVersion = require("@oxfmt/linux-loong64-gnu/package.json").version;
|
|
321
|
-
if (bindingPackageVersion !== "0.
|
|
319
|
+
const binding = require("@oxfmt/binding-linux-loong64-gnu");
|
|
320
|
+
const bindingPackageVersion = require("@oxfmt/binding-linux-loong64-gnu/package.json").version;
|
|
321
|
+
if (bindingPackageVersion !== "0.29.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 0.29.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
322
322
|
return binding;
|
|
323
323
|
} catch (e) {
|
|
324
324
|
loadErrors.push(e);
|
|
@@ -331,9 +331,9 @@ function requireNative() {
|
|
|
331
331
|
loadErrors.push(e);
|
|
332
332
|
}
|
|
333
333
|
try {
|
|
334
|
-
const binding = require("@oxfmt/linux-riscv64-musl");
|
|
335
|
-
const bindingPackageVersion = require("@oxfmt/linux-riscv64-musl/package.json").version;
|
|
336
|
-
if (bindingPackageVersion !== "0.
|
|
334
|
+
const binding = require("@oxfmt/binding-linux-riscv64-musl");
|
|
335
|
+
const bindingPackageVersion = require("@oxfmt/binding-linux-riscv64-musl/package.json").version;
|
|
336
|
+
if (bindingPackageVersion !== "0.29.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 0.29.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
337
337
|
return binding;
|
|
338
338
|
} catch (e) {
|
|
339
339
|
loadErrors.push(e);
|
|
@@ -345,9 +345,9 @@ function requireNative() {
|
|
|
345
345
|
loadErrors.push(e);
|
|
346
346
|
}
|
|
347
347
|
try {
|
|
348
|
-
const binding = require("@oxfmt/linux-riscv64-gnu");
|
|
349
|
-
const bindingPackageVersion = require("@oxfmt/linux-riscv64-gnu/package.json").version;
|
|
350
|
-
if (bindingPackageVersion !== "0.
|
|
348
|
+
const binding = require("@oxfmt/binding-linux-riscv64-gnu");
|
|
349
|
+
const bindingPackageVersion = require("@oxfmt/binding-linux-riscv64-gnu/package.json").version;
|
|
350
|
+
if (bindingPackageVersion !== "0.29.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 0.29.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
351
351
|
return binding;
|
|
352
352
|
} catch (e) {
|
|
353
353
|
loadErrors.push(e);
|
|
@@ -360,9 +360,9 @@ function requireNative() {
|
|
|
360
360
|
loadErrors.push(e);
|
|
361
361
|
}
|
|
362
362
|
try {
|
|
363
|
-
const binding = require("@oxfmt/linux-ppc64-gnu");
|
|
364
|
-
const bindingPackageVersion = require("@oxfmt/linux-ppc64-gnu/package.json").version;
|
|
365
|
-
if (bindingPackageVersion !== "0.
|
|
363
|
+
const binding = require("@oxfmt/binding-linux-ppc64-gnu");
|
|
364
|
+
const bindingPackageVersion = require("@oxfmt/binding-linux-ppc64-gnu/package.json").version;
|
|
365
|
+
if (bindingPackageVersion !== "0.29.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 0.29.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
366
366
|
return binding;
|
|
367
367
|
} catch (e) {
|
|
368
368
|
loadErrors.push(e);
|
|
@@ -374,9 +374,9 @@ function requireNative() {
|
|
|
374
374
|
loadErrors.push(e);
|
|
375
375
|
}
|
|
376
376
|
try {
|
|
377
|
-
const binding = require("@oxfmt/linux-s390x-gnu");
|
|
378
|
-
const bindingPackageVersion = require("@oxfmt/linux-s390x-gnu/package.json").version;
|
|
379
|
-
if (bindingPackageVersion !== "0.
|
|
377
|
+
const binding = require("@oxfmt/binding-linux-s390x-gnu");
|
|
378
|
+
const bindingPackageVersion = require("@oxfmt/binding-linux-s390x-gnu/package.json").version;
|
|
379
|
+
if (bindingPackageVersion !== "0.29.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 0.29.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
380
380
|
return binding;
|
|
381
381
|
} catch (e) {
|
|
382
382
|
loadErrors.push(e);
|
|
@@ -389,9 +389,9 @@ function requireNative() {
|
|
|
389
389
|
loadErrors.push(e);
|
|
390
390
|
}
|
|
391
391
|
try {
|
|
392
|
-
const binding = require("@oxfmt/openharmony-arm64");
|
|
393
|
-
const bindingPackageVersion = require("@oxfmt/openharmony-arm64/package.json").version;
|
|
394
|
-
if (bindingPackageVersion !== "0.
|
|
392
|
+
const binding = require("@oxfmt/binding-openharmony-arm64");
|
|
393
|
+
const bindingPackageVersion = require("@oxfmt/binding-openharmony-arm64/package.json").version;
|
|
394
|
+
if (bindingPackageVersion !== "0.29.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 0.29.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
395
395
|
return binding;
|
|
396
396
|
} catch (e) {
|
|
397
397
|
loadErrors.push(e);
|
|
@@ -403,9 +403,9 @@ function requireNative() {
|
|
|
403
403
|
loadErrors.push(e);
|
|
404
404
|
}
|
|
405
405
|
try {
|
|
406
|
-
const binding = require("@oxfmt/openharmony-x64");
|
|
407
|
-
const bindingPackageVersion = require("@oxfmt/openharmony-x64/package.json").version;
|
|
408
|
-
if (bindingPackageVersion !== "0.
|
|
406
|
+
const binding = require("@oxfmt/binding-openharmony-x64");
|
|
407
|
+
const bindingPackageVersion = require("@oxfmt/binding-openharmony-x64/package.json").version;
|
|
408
|
+
if (bindingPackageVersion !== "0.29.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 0.29.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
409
409
|
return binding;
|
|
410
410
|
} catch (e) {
|
|
411
411
|
loadErrors.push(e);
|
|
@@ -417,9 +417,9 @@ function requireNative() {
|
|
|
417
417
|
loadErrors.push(e);
|
|
418
418
|
}
|
|
419
419
|
try {
|
|
420
|
-
const binding = require("@oxfmt/openharmony-arm");
|
|
421
|
-
const bindingPackageVersion = require("@oxfmt/openharmony-arm/package.json").version;
|
|
422
|
-
if (bindingPackageVersion !== "0.
|
|
420
|
+
const binding = require("@oxfmt/binding-openharmony-arm");
|
|
421
|
+
const bindingPackageVersion = require("@oxfmt/binding-openharmony-arm/package.json").version;
|
|
422
|
+
if (bindingPackageVersion !== "0.29.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 0.29.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
423
423
|
return binding;
|
|
424
424
|
} catch (e) {
|
|
425
425
|
loadErrors.push(e);
|
|
@@ -438,7 +438,7 @@ if (!nativeBinding || process.env.NAPI_RS_FORCE_WASI) {
|
|
|
438
438
|
if (process.env.NAPI_RS_FORCE_WASI) wasiBindingError = err;
|
|
439
439
|
}
|
|
440
440
|
if (!nativeBinding || process.env.NAPI_RS_FORCE_WASI) try {
|
|
441
|
-
wasiBinding = require("@oxfmt/wasm32-wasi");
|
|
441
|
+
wasiBinding = require("@oxfmt/binding-wasm32-wasi");
|
|
442
442
|
nativeBinding = wasiBinding;
|
|
443
443
|
} catch (err) {
|
|
444
444
|
if (process.env.NAPI_RS_FORCE_WASI) {
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { createRequire } from "node:module";
|
|
2
|
+
|
|
3
|
+
//#region ../../node_modules/.pnpm/prettier-plugin-tailwindcss@0.0.0-insiders.2ac6e70_prettier@3.8.1/node_modules/prettier-plugin-tailwindcss/dist/chunk-DSjvVL_1.mjs
|
|
4
|
+
var __create = Object.create;
|
|
5
|
+
var __defProp = Object.defineProperty;
|
|
6
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
7
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
8
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
9
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
10
|
+
var __esmMin = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
|
|
11
|
+
var __commonJSMin = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
|
|
12
|
+
var __exportAll = (all, symbols) => {
|
|
13
|
+
let target = {};
|
|
14
|
+
for (var name in all) __defProp(target, name, {
|
|
15
|
+
get: all[name],
|
|
16
|
+
enumerable: true
|
|
17
|
+
});
|
|
18
|
+
if (symbols) __defProp(target, Symbol.toStringTag, { value: "Module" });
|
|
19
|
+
return target;
|
|
20
|
+
};
|
|
21
|
+
var __copyProps = (to, from, except, desc) => {
|
|
22
|
+
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
23
|
+
key = keys[i];
|
|
24
|
+
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
25
|
+
get: ((k) => from[k]).bind(null, key),
|
|
26
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
return to;
|
|
30
|
+
};
|
|
31
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
32
|
+
value: mod,
|
|
33
|
+
enumerable: true
|
|
34
|
+
}) : target, mod));
|
|
35
|
+
var __require = /* @__PURE__ */ createRequire(import.meta.url);
|
|
36
|
+
|
|
37
|
+
//#endregion
|
|
38
|
+
export { __toESM as a, __require as i, __esmMin as n, __exportAll as r, __commonJSMin as t };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { createRequire } from "node:module";
|
|
2
|
+
|
|
3
|
+
//#region \0rolldown/runtime.js
|
|
4
|
+
var __defProp = Object.defineProperty;
|
|
5
|
+
var __exportAll = (all, no_symbols) => {
|
|
6
|
+
let target = {};
|
|
7
|
+
for (var name in all) {
|
|
8
|
+
__defProp(target, name, {
|
|
9
|
+
get: all[name],
|
|
10
|
+
enumerable: true
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
if (!no_symbols) {
|
|
14
|
+
__defProp(target, Symbol.toStringTag, { value: "Module" });
|
|
15
|
+
}
|
|
16
|
+
return target;
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
//#endregion
|
|
20
|
+
export { __exportAll as t };
|