@effect-app/eslint-shared-config 0.0.7 → 0.0.9
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/CHANGELOG.md +14 -0
- package/node_modules/@dprint/formatter/LICENSE +21 -0
- package/node_modules/@dprint/formatter/README.md +70 -0
- package/node_modules/@dprint/formatter/esm/_dnt.shims.d.ts +2 -0
- package/node_modules/@dprint/formatter/esm/_dnt.shims.d.ts.map +1 -0
- package/node_modules/@dprint/formatter/esm/_dnt.shims.js +57 -0
- package/node_modules/@dprint/formatter/esm/_dnt.test_shims.d.ts.map +1 -0
- package/node_modules/@dprint/formatter/esm/common.d.ts +80 -0
- package/node_modules/@dprint/formatter/esm/common.d.ts.map +1 -0
- package/node_modules/@dprint/formatter/esm/common.js +1 -0
- package/node_modules/@dprint/formatter/esm/deps/jsr.io/@std/assert/0.226.0/assert.d.ts.map +1 -0
- package/node_modules/@dprint/formatter/esm/deps/jsr.io/@std/assert/0.226.0/assert_almost_equals.d.ts.map +1 -0
- package/node_modules/@dprint/formatter/esm/deps/jsr.io/@std/assert/0.226.0/assert_array_includes.d.ts.map +1 -0
- package/node_modules/@dprint/formatter/esm/deps/jsr.io/@std/assert/0.226.0/assert_equals.d.ts.map +1 -0
- package/node_modules/@dprint/formatter/esm/deps/jsr.io/@std/assert/0.226.0/assert_exists.d.ts.map +1 -0
- package/node_modules/@dprint/formatter/esm/deps/jsr.io/@std/assert/0.226.0/assert_false.d.ts.map +1 -0
- package/node_modules/@dprint/formatter/esm/deps/jsr.io/@std/assert/0.226.0/assert_greater.d.ts.map +1 -0
- package/node_modules/@dprint/formatter/esm/deps/jsr.io/@std/assert/0.226.0/assert_greater_or_equal.d.ts.map +1 -0
- package/node_modules/@dprint/formatter/esm/deps/jsr.io/@std/assert/0.226.0/assert_instance_of.d.ts.map +1 -0
- package/node_modules/@dprint/formatter/esm/deps/jsr.io/@std/assert/0.226.0/assert_is_error.d.ts.map +1 -0
- package/node_modules/@dprint/formatter/esm/deps/jsr.io/@std/assert/0.226.0/assert_less.d.ts.map +1 -0
- package/node_modules/@dprint/formatter/esm/deps/jsr.io/@std/assert/0.226.0/assert_less_or_equal.d.ts.map +1 -0
- package/node_modules/@dprint/formatter/esm/deps/jsr.io/@std/assert/0.226.0/assert_match.d.ts.map +1 -0
- package/node_modules/@dprint/formatter/esm/deps/jsr.io/@std/assert/0.226.0/assert_not_equals.d.ts.map +1 -0
- package/node_modules/@dprint/formatter/esm/deps/jsr.io/@std/assert/0.226.0/assert_not_instance_of.d.ts.map +1 -0
- package/node_modules/@dprint/formatter/esm/deps/jsr.io/@std/assert/0.226.0/assert_not_match.d.ts.map +1 -0
- package/node_modules/@dprint/formatter/esm/deps/jsr.io/@std/assert/0.226.0/assert_not_strict_equals.d.ts.map +1 -0
- package/node_modules/@dprint/formatter/esm/deps/jsr.io/@std/assert/0.226.0/assert_object_match.d.ts.map +1 -0
- package/node_modules/@dprint/formatter/esm/deps/jsr.io/@std/assert/0.226.0/assert_rejects.d.ts.map +1 -0
- package/node_modules/@dprint/formatter/esm/deps/jsr.io/@std/assert/0.226.0/assert_strict_equals.d.ts.map +1 -0
- package/node_modules/@dprint/formatter/esm/deps/jsr.io/@std/assert/0.226.0/assert_string_includes.d.ts.map +1 -0
- package/node_modules/@dprint/formatter/esm/deps/jsr.io/@std/assert/0.226.0/assert_throws.d.ts.map +1 -0
- package/node_modules/@dprint/formatter/esm/deps/jsr.io/@std/assert/0.226.0/assertion_error.d.ts.map +1 -0
- package/node_modules/@dprint/formatter/esm/deps/jsr.io/@std/assert/0.226.0/equal.d.ts.map +1 -0
- package/node_modules/@dprint/formatter/esm/deps/jsr.io/@std/assert/0.226.0/fail.d.ts.map +1 -0
- package/node_modules/@dprint/formatter/esm/deps/jsr.io/@std/assert/0.226.0/mod.d.ts.map +1 -0
- package/node_modules/@dprint/formatter/esm/deps/jsr.io/@std/assert/0.226.0/unimplemented.d.ts.map +1 -0
- package/node_modules/@dprint/formatter/esm/deps/jsr.io/@std/assert/0.226.0/unreachable.d.ts.map +1 -0
- package/node_modules/@dprint/formatter/esm/deps/jsr.io/@std/internal/1.0.0/build_message.d.ts.map +1 -0
- package/node_modules/@dprint/formatter/esm/deps/jsr.io/@std/internal/1.0.0/diff.d.ts.map +1 -0
- package/node_modules/@dprint/formatter/esm/deps/jsr.io/@std/internal/1.0.0/diff_str.d.ts.map +1 -0
- package/node_modules/@dprint/formatter/esm/deps/jsr.io/@std/internal/1.0.0/format.d.ts.map +1 -0
- package/node_modules/@dprint/formatter/esm/deps/jsr.io/@std/internal/1.0.0/mod.d.ts.map +1 -0
- package/node_modules/@dprint/formatter/esm/deps/jsr.io/@std/internal/1.0.0/styles.d.ts.map +1 -0
- package/node_modules/@dprint/formatter/esm/deps/jsr.io/@std/internal/1.0.0/types.d.ts.map +1 -0
- package/node_modules/@dprint/formatter/esm/mod.d.ts +23 -0
- package/node_modules/@dprint/formatter/esm/mod.d.ts.map +1 -0
- package/node_modules/@dprint/formatter/esm/mod.js +84 -0
- package/node_modules/@dprint/formatter/esm/mod_test.d.ts.map +1 -0
- package/node_modules/@dprint/formatter/esm/package.json +3 -0
- package/node_modules/@dprint/formatter/esm/v3.d.ts +7 -0
- package/node_modules/@dprint/formatter/esm/v3.d.ts.map +1 -0
- package/node_modules/@dprint/formatter/esm/v3.js +216 -0
- package/node_modules/@dprint/formatter/esm/v4.d.ts +7 -0
- package/node_modules/@dprint/formatter/esm/v4.d.ts.map +1 -0
- package/node_modules/@dprint/formatter/esm/v4.js +198 -0
- package/node_modules/@dprint/formatter/package.json +38 -0
- package/node_modules/@dprint/formatter/script/_dnt.shims.d.ts +2 -0
- package/node_modules/@dprint/formatter/script/_dnt.shims.d.ts.map +1 -0
- package/node_modules/@dprint/formatter/script/_dnt.shims.js +60 -0
- package/node_modules/@dprint/formatter/script/_dnt.test_shims.d.ts.map +1 -0
- package/node_modules/@dprint/formatter/script/common.d.ts +80 -0
- package/node_modules/@dprint/formatter/script/common.d.ts.map +1 -0
- package/node_modules/@dprint/formatter/script/common.js +2 -0
- package/node_modules/@dprint/formatter/script/deps/jsr.io/@std/assert/0.226.0/assert.d.ts.map +1 -0
- package/node_modules/@dprint/formatter/script/deps/jsr.io/@std/assert/0.226.0/assert_almost_equals.d.ts.map +1 -0
- package/node_modules/@dprint/formatter/script/deps/jsr.io/@std/assert/0.226.0/assert_array_includes.d.ts.map +1 -0
- package/node_modules/@dprint/formatter/script/deps/jsr.io/@std/assert/0.226.0/assert_equals.d.ts.map +1 -0
- package/node_modules/@dprint/formatter/script/deps/jsr.io/@std/assert/0.226.0/assert_exists.d.ts.map +1 -0
- package/node_modules/@dprint/formatter/script/deps/jsr.io/@std/assert/0.226.0/assert_false.d.ts.map +1 -0
- package/node_modules/@dprint/formatter/script/deps/jsr.io/@std/assert/0.226.0/assert_greater.d.ts.map +1 -0
- package/node_modules/@dprint/formatter/script/deps/jsr.io/@std/assert/0.226.0/assert_greater_or_equal.d.ts.map +1 -0
- package/node_modules/@dprint/formatter/script/deps/jsr.io/@std/assert/0.226.0/assert_instance_of.d.ts.map +1 -0
- package/node_modules/@dprint/formatter/script/deps/jsr.io/@std/assert/0.226.0/assert_is_error.d.ts.map +1 -0
- package/node_modules/@dprint/formatter/script/deps/jsr.io/@std/assert/0.226.0/assert_less.d.ts.map +1 -0
- package/node_modules/@dprint/formatter/script/deps/jsr.io/@std/assert/0.226.0/assert_less_or_equal.d.ts.map +1 -0
- package/node_modules/@dprint/formatter/script/deps/jsr.io/@std/assert/0.226.0/assert_match.d.ts.map +1 -0
- package/node_modules/@dprint/formatter/script/deps/jsr.io/@std/assert/0.226.0/assert_not_equals.d.ts.map +1 -0
- package/node_modules/@dprint/formatter/script/deps/jsr.io/@std/assert/0.226.0/assert_not_instance_of.d.ts.map +1 -0
- package/node_modules/@dprint/formatter/script/deps/jsr.io/@std/assert/0.226.0/assert_not_match.d.ts.map +1 -0
- package/node_modules/@dprint/formatter/script/deps/jsr.io/@std/assert/0.226.0/assert_not_strict_equals.d.ts.map +1 -0
- package/node_modules/@dprint/formatter/script/deps/jsr.io/@std/assert/0.226.0/assert_object_match.d.ts.map +1 -0
- package/node_modules/@dprint/formatter/script/deps/jsr.io/@std/assert/0.226.0/assert_rejects.d.ts.map +1 -0
- package/node_modules/@dprint/formatter/script/deps/jsr.io/@std/assert/0.226.0/assert_strict_equals.d.ts.map +1 -0
- package/node_modules/@dprint/formatter/script/deps/jsr.io/@std/assert/0.226.0/assert_string_includes.d.ts.map +1 -0
- package/node_modules/@dprint/formatter/script/deps/jsr.io/@std/assert/0.226.0/assert_throws.d.ts.map +1 -0
- package/node_modules/@dprint/formatter/script/deps/jsr.io/@std/assert/0.226.0/assertion_error.d.ts.map +1 -0
- package/node_modules/@dprint/formatter/script/deps/jsr.io/@std/assert/0.226.0/equal.d.ts.map +1 -0
- package/node_modules/@dprint/formatter/script/deps/jsr.io/@std/assert/0.226.0/fail.d.ts.map +1 -0
- package/node_modules/@dprint/formatter/script/deps/jsr.io/@std/assert/0.226.0/mod.d.ts.map +1 -0
- package/node_modules/@dprint/formatter/script/deps/jsr.io/@std/assert/0.226.0/unimplemented.d.ts.map +1 -0
- package/node_modules/@dprint/formatter/script/deps/jsr.io/@std/assert/0.226.0/unreachable.d.ts.map +1 -0
- package/node_modules/@dprint/formatter/script/deps/jsr.io/@std/internal/1.0.0/build_message.d.ts.map +1 -0
- package/node_modules/@dprint/formatter/script/deps/jsr.io/@std/internal/1.0.0/diff.d.ts.map +1 -0
- package/node_modules/@dprint/formatter/script/deps/jsr.io/@std/internal/1.0.0/diff_str.d.ts.map +1 -0
- package/node_modules/@dprint/formatter/script/deps/jsr.io/@std/internal/1.0.0/format.d.ts.map +1 -0
- package/node_modules/@dprint/formatter/script/deps/jsr.io/@std/internal/1.0.0/mod.d.ts.map +1 -0
- package/node_modules/@dprint/formatter/script/deps/jsr.io/@std/internal/1.0.0/styles.d.ts.map +1 -0
- package/node_modules/@dprint/formatter/script/deps/jsr.io/@std/internal/1.0.0/types.d.ts.map +1 -0
- package/node_modules/@dprint/formatter/script/mod.d.ts +23 -0
- package/node_modules/@dprint/formatter/script/mod.d.ts.map +1 -0
- package/node_modules/@dprint/formatter/script/mod.js +113 -0
- package/node_modules/@dprint/formatter/script/mod_test.d.ts.map +1 -0
- package/node_modules/@dprint/formatter/script/package.json +3 -0
- package/node_modules/@dprint/formatter/script/v3.d.ts +7 -0
- package/node_modules/@dprint/formatter/script/v3.d.ts.map +1 -0
- package/node_modules/@dprint/formatter/script/v3.js +221 -0
- package/node_modules/@dprint/formatter/script/v4.d.ts +7 -0
- package/node_modules/@dprint/formatter/script/v4.d.ts.map +1 -0
- package/node_modules/@dprint/formatter/script/v4.js +226 -0
- package/node_modules/jsonc-parser/CHANGELOG.md +76 -0
- package/node_modules/jsonc-parser/LICENSE.md +21 -0
- package/node_modules/jsonc-parser/README.md +364 -0
- package/node_modules/jsonc-parser/SECURITY.md +41 -0
- package/node_modules/jsonc-parser/lib/esm/impl/edit.js +185 -0
- package/node_modules/jsonc-parser/lib/esm/impl/format.js +261 -0
- package/node_modules/jsonc-parser/lib/esm/impl/parser.js +659 -0
- package/node_modules/jsonc-parser/lib/esm/impl/scanner.js +443 -0
- package/node_modules/jsonc-parser/lib/esm/impl/string-intern.js +29 -0
- package/node_modules/jsonc-parser/lib/esm/main.d.ts +351 -0
- package/node_modules/jsonc-parser/lib/esm/main.js +178 -0
- package/node_modules/jsonc-parser/lib/umd/impl/edit.js +201 -0
- package/node_modules/jsonc-parser/lib/umd/impl/format.js +275 -0
- package/node_modules/jsonc-parser/lib/umd/impl/parser.js +682 -0
- package/node_modules/jsonc-parser/lib/umd/impl/scanner.js +456 -0
- package/node_modules/jsonc-parser/lib/umd/impl/string-intern.js +42 -0
- package/node_modules/jsonc-parser/lib/umd/main.d.ts +351 -0
- package/node_modules/jsonc-parser/lib/umd/main.js +194 -0
- package/node_modules/jsonc-parser/package.json +37 -0
- package/package.json +3 -1
|
@@ -0,0 +1,216 @@
|
|
|
1
|
+
const decoder = new TextDecoder();
|
|
2
|
+
const encoder = new TextEncoder();
|
|
3
|
+
/**
|
|
4
|
+
* Creates host for host formatting.
|
|
5
|
+
*/
|
|
6
|
+
export function createHost() {
|
|
7
|
+
let instance;
|
|
8
|
+
let hostFormatter = undefined;
|
|
9
|
+
let overrideConfig = {};
|
|
10
|
+
let filePath = "";
|
|
11
|
+
let formattedText = "";
|
|
12
|
+
let errorText = "";
|
|
13
|
+
return {
|
|
14
|
+
setInstance(wasmInstance) {
|
|
15
|
+
instance = wasmInstance;
|
|
16
|
+
},
|
|
17
|
+
setHostFormatter(formatWithHost) {
|
|
18
|
+
hostFormatter = formatWithHost;
|
|
19
|
+
},
|
|
20
|
+
createImportObject() {
|
|
21
|
+
let sharedBuffer = new Uint8Array(0);
|
|
22
|
+
let sharedBufferIndex = 0;
|
|
23
|
+
const resetSharedBuffer = (length) => {
|
|
24
|
+
sharedBuffer = new Uint8Array(length);
|
|
25
|
+
sharedBufferIndex = 0;
|
|
26
|
+
};
|
|
27
|
+
return {
|
|
28
|
+
dprint: {
|
|
29
|
+
"host_clear_bytes": (length) => {
|
|
30
|
+
resetSharedBuffer(length);
|
|
31
|
+
},
|
|
32
|
+
"host_read_buffer": (pointer, length) => {
|
|
33
|
+
sharedBuffer.set(getWasmBufferAtPointer(instance, pointer, length), sharedBufferIndex);
|
|
34
|
+
sharedBufferIndex += length;
|
|
35
|
+
},
|
|
36
|
+
"host_write_buffer": (pointer, index, length) => {
|
|
37
|
+
getWasmBufferAtPointer(instance, pointer, length).set(sharedBuffer.slice(index, index + length));
|
|
38
|
+
},
|
|
39
|
+
"host_take_file_path": () => {
|
|
40
|
+
filePath = decoder.decode(sharedBuffer);
|
|
41
|
+
resetSharedBuffer(0);
|
|
42
|
+
},
|
|
43
|
+
"host_take_override_config": () => {
|
|
44
|
+
overrideConfig = JSON.parse(decoder.decode(sharedBuffer));
|
|
45
|
+
resetSharedBuffer(0);
|
|
46
|
+
},
|
|
47
|
+
"host_format": () => {
|
|
48
|
+
const fileText = decoder.decode(sharedBuffer);
|
|
49
|
+
try {
|
|
50
|
+
formattedText = hostFormatter?.({
|
|
51
|
+
filePath,
|
|
52
|
+
fileText,
|
|
53
|
+
overrideConfig,
|
|
54
|
+
}) ?? fileText;
|
|
55
|
+
return fileText === formattedText ? 0 : 1;
|
|
56
|
+
}
|
|
57
|
+
catch (error) {
|
|
58
|
+
errorText = String(error);
|
|
59
|
+
return 2;
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
"host_get_formatted_text": () => {
|
|
63
|
+
sharedBuffer = encoder.encode(formattedText);
|
|
64
|
+
sharedBufferIndex = 0;
|
|
65
|
+
return sharedBuffer.length;
|
|
66
|
+
},
|
|
67
|
+
"host_get_error_text": () => {
|
|
68
|
+
sharedBuffer = encoder.encode(errorText);
|
|
69
|
+
sharedBufferIndex = 0;
|
|
70
|
+
return sharedBuffer.length;
|
|
71
|
+
},
|
|
72
|
+
},
|
|
73
|
+
};
|
|
74
|
+
},
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
export function createFromInstance(wasmInstance, host) {
|
|
78
|
+
host.setInstance(wasmInstance);
|
|
79
|
+
// deno-lint-ignore no-explicit-any
|
|
80
|
+
const wasmExports = wasmInstance.exports;
|
|
81
|
+
const { get_plugin_schema_version, set_file_path, set_override_config, get_formatted_text, format, get_error_text, get_plugin_info, get_resolved_config, get_config_diagnostics, set_global_config, set_plugin_config, get_license_text, reset_config, } = wasmExports;
|
|
82
|
+
const pluginSchemaVersion = get_plugin_schema_version();
|
|
83
|
+
const expectedPluginSchemaVersion = 3;
|
|
84
|
+
if (pluginSchemaVersion !== 2
|
|
85
|
+
&& pluginSchemaVersion !== expectedPluginSchemaVersion) {
|
|
86
|
+
throw new Error(`Not compatible plugin. `
|
|
87
|
+
+ `Expected schema ${expectedPluginSchemaVersion}, `
|
|
88
|
+
+ `but plugin had ${pluginSchemaVersion}.`);
|
|
89
|
+
}
|
|
90
|
+
let configSet = false;
|
|
91
|
+
return {
|
|
92
|
+
setConfig(globalConfig, pluginConfig) {
|
|
93
|
+
setConfig(globalConfig, pluginConfig);
|
|
94
|
+
},
|
|
95
|
+
getConfigDiagnostics() {
|
|
96
|
+
setConfigIfNotSet();
|
|
97
|
+
const length = get_config_diagnostics();
|
|
98
|
+
return JSON.parse(receiveString(wasmInstance, length));
|
|
99
|
+
},
|
|
100
|
+
getResolvedConfig() {
|
|
101
|
+
setConfigIfNotSet();
|
|
102
|
+
const length = get_resolved_config();
|
|
103
|
+
return JSON.parse(receiveString(wasmInstance, length));
|
|
104
|
+
},
|
|
105
|
+
getFileMatchingInfo() {
|
|
106
|
+
const length = get_plugin_info();
|
|
107
|
+
const pluginInfo = JSON.parse(receiveString(wasmInstance, length));
|
|
108
|
+
return {
|
|
109
|
+
// deno-lint-ignore no-explicit-any
|
|
110
|
+
fileExtensions: pluginInfo.fileExtensions ?? [],
|
|
111
|
+
// deno-lint-ignore no-explicit-any
|
|
112
|
+
fileNames: pluginInfo.fileNames ?? [],
|
|
113
|
+
};
|
|
114
|
+
},
|
|
115
|
+
getPluginInfo() {
|
|
116
|
+
const length = get_plugin_info();
|
|
117
|
+
const pluginInfo = JSON.parse(receiveString(wasmInstance, length));
|
|
118
|
+
// deno-lint-ignore no-explicit-any
|
|
119
|
+
delete pluginInfo.fileNames;
|
|
120
|
+
// deno-lint-ignore no-explicit-any
|
|
121
|
+
delete pluginInfo.fileExtensions;
|
|
122
|
+
return pluginInfo;
|
|
123
|
+
},
|
|
124
|
+
getLicenseText() {
|
|
125
|
+
const length = get_license_text();
|
|
126
|
+
return receiveString(wasmInstance, length);
|
|
127
|
+
},
|
|
128
|
+
formatText(request, formatWithHost) {
|
|
129
|
+
if (request.bytesRange != null) {
|
|
130
|
+
// not supported for v3
|
|
131
|
+
return request.fileText;
|
|
132
|
+
}
|
|
133
|
+
host.setHostFormatter(formatWithHost);
|
|
134
|
+
setConfigIfNotSet();
|
|
135
|
+
if (request.overrideConfig != null) {
|
|
136
|
+
if (pluginSchemaVersion === 2) {
|
|
137
|
+
throw new Error("Cannot set the override configuration for this old plugin.");
|
|
138
|
+
}
|
|
139
|
+
sendString(wasmInstance, JSON.stringify(request.overrideConfig));
|
|
140
|
+
set_override_config();
|
|
141
|
+
}
|
|
142
|
+
sendString(wasmInstance, request.filePath);
|
|
143
|
+
set_file_path();
|
|
144
|
+
sendString(wasmInstance, request.fileText);
|
|
145
|
+
const responseCode = format();
|
|
146
|
+
switch (responseCode) {
|
|
147
|
+
case 0: // no change
|
|
148
|
+
return request.fileText;
|
|
149
|
+
case 1: // change
|
|
150
|
+
return receiveString(wasmInstance, get_formatted_text());
|
|
151
|
+
case 2: // error
|
|
152
|
+
throw new Error(receiveString(wasmInstance, get_error_text()));
|
|
153
|
+
default:
|
|
154
|
+
throw new Error(`Unexpected response code: ${responseCode}`);
|
|
155
|
+
}
|
|
156
|
+
},
|
|
157
|
+
};
|
|
158
|
+
function setConfigIfNotSet() {
|
|
159
|
+
if (!configSet) {
|
|
160
|
+
setConfig({}, {});
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
function setConfig(globalConfig, pluginConfig) {
|
|
164
|
+
if (reset_config != null) {
|
|
165
|
+
reset_config();
|
|
166
|
+
}
|
|
167
|
+
sendString(wasmInstance, JSON.stringify(globalConfig));
|
|
168
|
+
set_global_config();
|
|
169
|
+
sendString(wasmInstance, JSON.stringify(pluginConfig));
|
|
170
|
+
set_plugin_config();
|
|
171
|
+
configSet = true;
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
function sendString(wasmInstance, text) {
|
|
175
|
+
// deno-lint-ignore no-explicit-any
|
|
176
|
+
const exports = wasmInstance.exports;
|
|
177
|
+
const encodedText = encoder.encode(text);
|
|
178
|
+
const length = encodedText.length;
|
|
179
|
+
const memoryBufferSize = exports.get_wasm_memory_buffer_size();
|
|
180
|
+
const memoryBufferPointer = getWasmMemoryBufferPointer(wasmInstance);
|
|
181
|
+
exports.clear_shared_bytes(length);
|
|
182
|
+
let index = 0;
|
|
183
|
+
while (index < length) {
|
|
184
|
+
const writeCount = Math.min(length - index, memoryBufferSize);
|
|
185
|
+
const wasmBuffer = getWasmBufferAtPointer(wasmInstance, memoryBufferPointer, writeCount);
|
|
186
|
+
wasmBuffer.set(encodedText.slice(index, index + writeCount));
|
|
187
|
+
exports.add_to_shared_bytes_from_buffer(writeCount);
|
|
188
|
+
index += writeCount;
|
|
189
|
+
}
|
|
190
|
+
return length;
|
|
191
|
+
}
|
|
192
|
+
function receiveString(wasmInstance, length) {
|
|
193
|
+
// deno-lint-ignore no-explicit-any
|
|
194
|
+
const exports = wasmInstance.exports;
|
|
195
|
+
const memoryBufferSize = exports.get_wasm_memory_buffer_size();
|
|
196
|
+
const memoryBufferPointer = getWasmMemoryBufferPointer(wasmInstance);
|
|
197
|
+
const buffer = new Uint8Array(length);
|
|
198
|
+
let index = 0;
|
|
199
|
+
while (index < length) {
|
|
200
|
+
const readCount = Math.min(length - index, memoryBufferSize);
|
|
201
|
+
exports.set_buffer_with_shared_bytes(index, readCount);
|
|
202
|
+
const wasmBuffer = getWasmBufferAtPointer(wasmInstance, memoryBufferPointer, readCount);
|
|
203
|
+
buffer.set(wasmBuffer, index);
|
|
204
|
+
index += readCount;
|
|
205
|
+
}
|
|
206
|
+
return decoder.decode(buffer);
|
|
207
|
+
}
|
|
208
|
+
function getWasmMemoryBufferPointer(wasmInstance) {
|
|
209
|
+
// deno-lint-ignore no-explicit-any
|
|
210
|
+
return wasmInstance.exports.get_wasm_memory_buffer();
|
|
211
|
+
}
|
|
212
|
+
function getWasmBufferAtPointer(wasmInstance, pointer, length) {
|
|
213
|
+
return new Uint8Array(
|
|
214
|
+
// deno-lint-ignore no-explicit-any
|
|
215
|
+
wasmInstance.exports.memory.buffer, pointer, length);
|
|
216
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { Formatter, Host } from "./common.js";
|
|
2
|
+
/**
|
|
3
|
+
* Creates host for host formatting.
|
|
4
|
+
*/
|
|
5
|
+
export declare function createHost(): Host;
|
|
6
|
+
export declare function createFromInstance(wasmInstance: WebAssembly.Instance, host: Host): Formatter;
|
|
7
|
+
//# sourceMappingURL=v4.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"v4.d.ts","sourceRoot":"","sources":["../src/v4.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAiB,SAAS,EAAuB,IAAI,EAAc,MAAM,aAAa,CAAC;AAMnG;;GAEG;AACH,wBAAgB,UAAU,IAAI,IAAI,CAuHjC;AAED,wBAAgB,kBAAkB,CAChC,YAAY,EAAE,WAAW,CAAC,QAAQ,EAClC,IAAI,EAAE,IAAI,GACT,SAAS,CAmHX"}
|
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
import * as dntShim from "./_dnt.shims.js";
|
|
2
|
+
const decoder = new TextDecoder();
|
|
3
|
+
const encoder = new TextEncoder();
|
|
4
|
+
/**
|
|
5
|
+
* Creates host for host formatting.
|
|
6
|
+
*/
|
|
7
|
+
export function createHost() {
|
|
8
|
+
function writeStderr(buf) {
|
|
9
|
+
try {
|
|
10
|
+
// deno-lint-ignore no-explicit-any
|
|
11
|
+
const global = dntShim.dntGlobalThis;
|
|
12
|
+
if (global.Deno) {
|
|
13
|
+
global.Deno.stderr.writeSync(buf);
|
|
14
|
+
}
|
|
15
|
+
else if (global.process) {
|
|
16
|
+
global.process.stderr.writeSync(buf);
|
|
17
|
+
}
|
|
18
|
+
else {
|
|
19
|
+
// ignore
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
catch {
|
|
23
|
+
// ignore
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
let instance;
|
|
27
|
+
let hostFormatter = undefined;
|
|
28
|
+
let formattedText = "";
|
|
29
|
+
let errorText = "";
|
|
30
|
+
return {
|
|
31
|
+
setInstance(wasmInstance) {
|
|
32
|
+
instance = wasmInstance;
|
|
33
|
+
},
|
|
34
|
+
setHostFormatter(formatWithHost) {
|
|
35
|
+
hostFormatter = formatWithHost;
|
|
36
|
+
},
|
|
37
|
+
createImportObject() {
|
|
38
|
+
let sharedBuffer = new Uint8Array(0);
|
|
39
|
+
return {
|
|
40
|
+
env: {
|
|
41
|
+
"fd_write": (fd, iovsPtr, iovsLen, nwrittenPtr) => {
|
|
42
|
+
let totalWritten = 0;
|
|
43
|
+
// deno-lint-ignore no-explicit-any
|
|
44
|
+
const wasmMemoryBuffer = instance.exports.memory.buffer;
|
|
45
|
+
const dataView = new DataView(wasmMemoryBuffer);
|
|
46
|
+
for (let i = 0; i < iovsLen; i++) {
|
|
47
|
+
const iovsOffset = iovsPtr + i * 8;
|
|
48
|
+
const iovecBufPtr = dataView.getUint32(iovsOffset, true);
|
|
49
|
+
const iovecBufLen = dataView.getUint32(iovsOffset + 4, true);
|
|
50
|
+
const buf = new Uint8Array(wasmMemoryBuffer, iovecBufPtr, iovecBufLen);
|
|
51
|
+
if (fd === 1 || fd === 2) {
|
|
52
|
+
// just write both stdout and stderr to stderr
|
|
53
|
+
writeStderr(buf);
|
|
54
|
+
}
|
|
55
|
+
else {
|
|
56
|
+
return 1; // not supported fd
|
|
57
|
+
}
|
|
58
|
+
totalWritten += iovecBufLen;
|
|
59
|
+
}
|
|
60
|
+
dataView.setUint32(nwrittenPtr, totalWritten, true);
|
|
61
|
+
return 0; // success
|
|
62
|
+
},
|
|
63
|
+
},
|
|
64
|
+
dprint: {
|
|
65
|
+
"host_has_cancelled": () => 0,
|
|
66
|
+
"host_write_buffer": (pointer) => {
|
|
67
|
+
getWasmBufferAtPointer(instance, pointer, sharedBuffer.length).set(sharedBuffer);
|
|
68
|
+
},
|
|
69
|
+
"host_format": (filePathPtr, filePathLen, rangeStart, rangeEnd, overrideConfigPtr, overrideConfigLen, fileBytesPtr, fileBytesLen) => {
|
|
70
|
+
const filePath = receiveString(filePathPtr, filePathLen);
|
|
71
|
+
const overrideConfigRaw = receiveString(overrideConfigPtr, overrideConfigLen);
|
|
72
|
+
const overrideConfig = overrideConfigRaw === "" ? {} : JSON.parse(overrideConfigRaw);
|
|
73
|
+
const fileText = receiveString(fileBytesPtr, fileBytesLen);
|
|
74
|
+
const bytesRange = rangeStart === 0 && rangeEnd === fileBytesLen
|
|
75
|
+
? undefined
|
|
76
|
+
: [rangeStart, rangeEnd];
|
|
77
|
+
try {
|
|
78
|
+
formattedText = hostFormatter?.({
|
|
79
|
+
filePath,
|
|
80
|
+
fileText,
|
|
81
|
+
bytesRange,
|
|
82
|
+
overrideConfig,
|
|
83
|
+
}) ?? fileText;
|
|
84
|
+
return fileText === formattedText ? 0 : 1;
|
|
85
|
+
}
|
|
86
|
+
catch (error) {
|
|
87
|
+
errorText = String(error);
|
|
88
|
+
return 2;
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
"host_get_formatted_text": () => {
|
|
92
|
+
sharedBuffer = encoder.encode(formattedText);
|
|
93
|
+
return sharedBuffer.length;
|
|
94
|
+
},
|
|
95
|
+
"host_get_error_text": () => {
|
|
96
|
+
sharedBuffer = encoder.encode(errorText);
|
|
97
|
+
return sharedBuffer.length;
|
|
98
|
+
},
|
|
99
|
+
},
|
|
100
|
+
};
|
|
101
|
+
},
|
|
102
|
+
};
|
|
103
|
+
function receiveString(ptr, length) {
|
|
104
|
+
return decoder.decode(getWasmBufferAtPointer(instance, ptr, length));
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
export function createFromInstance(wasmInstance, host) {
|
|
108
|
+
host.setInstance(wasmInstance);
|
|
109
|
+
// only a single config is supported in here atm
|
|
110
|
+
const configId = 1;
|
|
111
|
+
// deno-lint-ignore no-explicit-any
|
|
112
|
+
const wasmExports = wasmInstance.exports;
|
|
113
|
+
const { get_shared_bytes_ptr, set_file_path, set_override_config, clear_shared_bytes, get_formatted_text, format, format_range, get_error_text, get_plugin_info, get_config_file_matching, get_resolved_config, get_config_diagnostics, get_license_text, register_config, release_config, } = wasmExports;
|
|
114
|
+
let configSet = false;
|
|
115
|
+
return {
|
|
116
|
+
setConfig(globalConfig, pluginConfig) {
|
|
117
|
+
setConfig(globalConfig, pluginConfig);
|
|
118
|
+
},
|
|
119
|
+
getConfigDiagnostics() {
|
|
120
|
+
setConfigIfNotSet();
|
|
121
|
+
const length = get_config_diagnostics(configId);
|
|
122
|
+
return JSON.parse(receiveString(length));
|
|
123
|
+
},
|
|
124
|
+
getResolvedConfig() {
|
|
125
|
+
setConfigIfNotSet();
|
|
126
|
+
const length = get_resolved_config(configId);
|
|
127
|
+
return JSON.parse(receiveString(length));
|
|
128
|
+
},
|
|
129
|
+
getFileMatchingInfo() {
|
|
130
|
+
const length = get_config_file_matching(configId);
|
|
131
|
+
return JSON.parse(receiveString(length));
|
|
132
|
+
},
|
|
133
|
+
getPluginInfo() {
|
|
134
|
+
const length = get_plugin_info();
|
|
135
|
+
return JSON.parse(receiveString(length));
|
|
136
|
+
},
|
|
137
|
+
getLicenseText() {
|
|
138
|
+
const length = get_license_text();
|
|
139
|
+
return receiveString(length);
|
|
140
|
+
},
|
|
141
|
+
formatText(request, formatWithHost) {
|
|
142
|
+
if (request.bytesRange != null && format_range == null) {
|
|
143
|
+
// plugin doesn't support range formatting
|
|
144
|
+
return request.fileText;
|
|
145
|
+
}
|
|
146
|
+
host.setHostFormatter(formatWithHost);
|
|
147
|
+
setConfigIfNotSet();
|
|
148
|
+
if (request.overrideConfig != null) {
|
|
149
|
+
sendString(JSON.stringify(request.overrideConfig));
|
|
150
|
+
set_override_config();
|
|
151
|
+
}
|
|
152
|
+
sendString(request.filePath);
|
|
153
|
+
set_file_path();
|
|
154
|
+
sendString(request.fileText);
|
|
155
|
+
const responseCode = request.bytesRange != null
|
|
156
|
+
? format_range(configId, request.bytesRange[0], request.bytesRange[1])
|
|
157
|
+
: format(configId);
|
|
158
|
+
switch (responseCode) {
|
|
159
|
+
case 0: // no change
|
|
160
|
+
return request.fileText;
|
|
161
|
+
case 1: // change
|
|
162
|
+
return receiveString(get_formatted_text());
|
|
163
|
+
case 2: // error
|
|
164
|
+
throw new Error(receiveString(get_error_text()));
|
|
165
|
+
default:
|
|
166
|
+
throw new Error(`Unexpected response code: ${responseCode}`);
|
|
167
|
+
}
|
|
168
|
+
},
|
|
169
|
+
};
|
|
170
|
+
function setConfigIfNotSet() {
|
|
171
|
+
if (!configSet) {
|
|
172
|
+
setConfig({}, {});
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
function setConfig(globalConfig, pluginConfig) {
|
|
176
|
+
release_config(configId);
|
|
177
|
+
sendString(JSON.stringify({
|
|
178
|
+
global: globalConfig,
|
|
179
|
+
plugin: pluginConfig,
|
|
180
|
+
}));
|
|
181
|
+
register_config(configId);
|
|
182
|
+
configSet = true;
|
|
183
|
+
}
|
|
184
|
+
function sendString(value) {
|
|
185
|
+
const bytes = encoder.encode(value);
|
|
186
|
+
const ptr = clear_shared_bytes(bytes.length);
|
|
187
|
+
getWasmBufferAtPointer(wasmInstance, ptr, bytes.length).set(bytes);
|
|
188
|
+
}
|
|
189
|
+
function receiveString(length) {
|
|
190
|
+
const ptr = get_shared_bytes_ptr();
|
|
191
|
+
return decoder.decode(getWasmBufferAtPointer(wasmInstance, ptr, length));
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
function getWasmBufferAtPointer(wasmInstance, pointer, length) {
|
|
195
|
+
return new Uint8Array(
|
|
196
|
+
// deno-lint-ignore no-explicit-any
|
|
197
|
+
wasmInstance.exports.memory.buffer, pointer, length);
|
|
198
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@dprint/formatter",
|
|
3
|
+
"version": "0.4.1",
|
|
4
|
+
"description": "Wasm formatter for dprint plugins.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"dprint",
|
|
7
|
+
"formatter",
|
|
8
|
+
"wasm"
|
|
9
|
+
],
|
|
10
|
+
"author": "David Sherret",
|
|
11
|
+
"homepage": "https://github.com/dprint/js-formatter#readme",
|
|
12
|
+
"repository": {
|
|
13
|
+
"type": "git",
|
|
14
|
+
"url": "git+https://github.com/dprint/js-formatter.git"
|
|
15
|
+
},
|
|
16
|
+
"license": "MIT",
|
|
17
|
+
"bugs": {
|
|
18
|
+
"url": "https://github.com/dprint/js-formatter/issues"
|
|
19
|
+
},
|
|
20
|
+
"main": "./script/mod.js",
|
|
21
|
+
"module": "./esm/mod.js",
|
|
22
|
+
"exports": {
|
|
23
|
+
".": {
|
|
24
|
+
"import": "./esm/mod.js",
|
|
25
|
+
"require": "./script/mod.js"
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
"scripts": {
|
|
29
|
+
"test": "node test_runner.js"
|
|
30
|
+
},
|
|
31
|
+
"devDependencies": {
|
|
32
|
+
"@types/node": "^20.9.0",
|
|
33
|
+
"picocolors": "^1.0.0",
|
|
34
|
+
"@deno/shim-deno-test": "~0.5.0",
|
|
35
|
+
"undici": "^4.12.1"
|
|
36
|
+
},
|
|
37
|
+
"_generatedBy": "dnt@dev"
|
|
38
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"_dnt.shims.d.ts","sourceRoot":"","sources":["../src/_dnt.shims.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,aAAa,gCAA2C,CAAC"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.dntGlobalThis = void 0;
|
|
4
|
+
const dntGlobals = {};
|
|
5
|
+
exports.dntGlobalThis = createMergeProxy(globalThis, dntGlobals);
|
|
6
|
+
function createMergeProxy(baseObj, extObj) {
|
|
7
|
+
return new Proxy(baseObj, {
|
|
8
|
+
get(_target, prop, _receiver) {
|
|
9
|
+
if (prop in extObj) {
|
|
10
|
+
return extObj[prop];
|
|
11
|
+
}
|
|
12
|
+
else {
|
|
13
|
+
return baseObj[prop];
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
set(_target, prop, value) {
|
|
17
|
+
if (prop in extObj) {
|
|
18
|
+
delete extObj[prop];
|
|
19
|
+
}
|
|
20
|
+
baseObj[prop] = value;
|
|
21
|
+
return true;
|
|
22
|
+
},
|
|
23
|
+
deleteProperty(_target, prop) {
|
|
24
|
+
let success = false;
|
|
25
|
+
if (prop in extObj) {
|
|
26
|
+
delete extObj[prop];
|
|
27
|
+
success = true;
|
|
28
|
+
}
|
|
29
|
+
if (prop in baseObj) {
|
|
30
|
+
delete baseObj[prop];
|
|
31
|
+
success = true;
|
|
32
|
+
}
|
|
33
|
+
return success;
|
|
34
|
+
},
|
|
35
|
+
ownKeys(_target) {
|
|
36
|
+
const baseKeys = Reflect.ownKeys(baseObj);
|
|
37
|
+
const extKeys = Reflect.ownKeys(extObj);
|
|
38
|
+
const extKeysSet = new Set(extKeys);
|
|
39
|
+
return [...baseKeys.filter((k) => !extKeysSet.has(k)), ...extKeys];
|
|
40
|
+
},
|
|
41
|
+
defineProperty(_target, prop, desc) {
|
|
42
|
+
if (prop in extObj) {
|
|
43
|
+
delete extObj[prop];
|
|
44
|
+
}
|
|
45
|
+
Reflect.defineProperty(baseObj, prop, desc);
|
|
46
|
+
return true;
|
|
47
|
+
},
|
|
48
|
+
getOwnPropertyDescriptor(_target, prop) {
|
|
49
|
+
if (prop in extObj) {
|
|
50
|
+
return Reflect.getOwnPropertyDescriptor(extObj, prop);
|
|
51
|
+
}
|
|
52
|
+
else {
|
|
53
|
+
return Reflect.getOwnPropertyDescriptor(baseObj, prop);
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
has(_target, prop) {
|
|
57
|
+
return prop in extObj || prop in baseObj;
|
|
58
|
+
},
|
|
59
|
+
});
|
|
60
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"_dnt.test_shims.d.ts","sourceRoot":"","sources":["../src/_dnt.test_shims.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAC5C,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAC5C,OAAO,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAC;AAC/B,OAAO,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAC;AAM/B,eAAO,MAAM,aAAa;;;CAA2C,CAAC"}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
export interface FormatRequest {
|
|
2
|
+
/** The file path to format. */
|
|
3
|
+
filePath: string;
|
|
4
|
+
/** File text to format. */
|
|
5
|
+
fileText: string;
|
|
6
|
+
/** Byte range to format. Note this is BYTE range and NOT character range. */
|
|
7
|
+
bytesRange?: readonly [number, number];
|
|
8
|
+
/** Configuration to set for a single format. */
|
|
9
|
+
overrideConfig?: Record<string, unknown>;
|
|
10
|
+
}
|
|
11
|
+
export interface Host {
|
|
12
|
+
setInstance(wasmInstance: WebAssembly.Instance): void;
|
|
13
|
+
setHostFormatter(formatWithHost: ((request: FormatRequest) => string) | undefined): void;
|
|
14
|
+
createImportObject(): WebAssembly.Imports;
|
|
15
|
+
}
|
|
16
|
+
/** Formats code. */
|
|
17
|
+
export interface Formatter {
|
|
18
|
+
/**
|
|
19
|
+
* Sets the configuration.
|
|
20
|
+
* @param globalConfig - Global configuration for use across plugins.
|
|
21
|
+
* @param pluginConfig - Plugin specific configuration.
|
|
22
|
+
*/
|
|
23
|
+
setConfig(globalConfig: GlobalConfiguration, pluginConfig: Record<string, unknown>): void;
|
|
24
|
+
/**
|
|
25
|
+
* Gets the configuration diagnostics.
|
|
26
|
+
*/
|
|
27
|
+
getConfigDiagnostics(): ConfigurationDiagnostic[];
|
|
28
|
+
/**
|
|
29
|
+
* Gets the resolved configuration.
|
|
30
|
+
* @returns An object containing the resolved configuration.
|
|
31
|
+
*/
|
|
32
|
+
getResolvedConfig(): Record<string, unknown>;
|
|
33
|
+
/**
|
|
34
|
+
* Gets the plugin info.
|
|
35
|
+
*/
|
|
36
|
+
getPluginInfo(): PluginInfo;
|
|
37
|
+
/**
|
|
38
|
+
* Gets what files the plugin matches based on the current configuration.
|
|
39
|
+
*/
|
|
40
|
+
getFileMatchingInfo(): FileMatchingInfo;
|
|
41
|
+
/**
|
|
42
|
+
* Gets the license text of the plugin.
|
|
43
|
+
*/
|
|
44
|
+
getLicenseText(): string;
|
|
45
|
+
/**
|
|
46
|
+
* Formats the specified file text.
|
|
47
|
+
* @param request - Data to format.
|
|
48
|
+
* @param formatWithHost - Host formatter.
|
|
49
|
+
* @returns The formatted text.
|
|
50
|
+
* @throws If there is an error formatting.
|
|
51
|
+
*/
|
|
52
|
+
formatText(request: FormatRequest, formatWithHost?: (request: FormatRequest) => string): string;
|
|
53
|
+
}
|
|
54
|
+
/** Configuration specified for use across plugins. */
|
|
55
|
+
export interface GlobalConfiguration {
|
|
56
|
+
lineWidth?: number;
|
|
57
|
+
indentWidth?: number;
|
|
58
|
+
useTabs?: boolean;
|
|
59
|
+
newLineKind?: "auto" | "lf" | "crlf" | "system";
|
|
60
|
+
}
|
|
61
|
+
/** A diagnostic indicating a problem with the specified configuration. */
|
|
62
|
+
export interface ConfigurationDiagnostic {
|
|
63
|
+
propertyName: string;
|
|
64
|
+
message: string;
|
|
65
|
+
}
|
|
66
|
+
/** Information about a plugin. */
|
|
67
|
+
export interface PluginInfo {
|
|
68
|
+
name: string;
|
|
69
|
+
version: string;
|
|
70
|
+
configKey: string;
|
|
71
|
+
helpUrl: string;
|
|
72
|
+
configSchemaUrl: string;
|
|
73
|
+
updateUrl?: string;
|
|
74
|
+
}
|
|
75
|
+
/** Information about how the current config matches files. */
|
|
76
|
+
export interface FileMatchingInfo {
|
|
77
|
+
fileExtensions: string[];
|
|
78
|
+
fileNames: string[];
|
|
79
|
+
}
|
|
80
|
+
//# sourceMappingURL=common.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../src/common.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,aAAa;IAC5B,+BAA+B;IAC/B,QAAQ,EAAE,MAAM,CAAC;IACjB,2BAA2B;IAC3B,QAAQ,EAAE,MAAM,CAAC;IACjB,6EAA6E;IAC7E,UAAU,CAAC,EAAE,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACvC,gDAAgD;IAChD,cAAc,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAC1C;AAED,MAAM,WAAW,IAAI;IACnB,WAAW,CAAC,YAAY,EAAE,WAAW,CAAC,QAAQ,GAAG,IAAI,CAAC;IACtD,gBAAgB,CAAC,cAAc,EAAE,CAAC,CAAC,OAAO,EAAE,aAAa,KAAK,MAAM,CAAC,GAAG,SAAS,GAAG,IAAI,CAAC;IACzF,kBAAkB,IAAI,WAAW,CAAC,OAAO,CAAC;CAC3C;AAED,oBAAoB;AACpB,MAAM,WAAW,SAAS;IACxB;;;;OAIG;IACH,SAAS,CACP,YAAY,EAAE,mBAAmB,EACjC,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GACpC,IAAI,CAAC;IACR;;OAEG;IACH,oBAAoB,IAAI,uBAAuB,EAAE,CAAC;IAClD;;;OAGG;IACH,iBAAiB,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC7C;;OAEG;IACH,aAAa,IAAI,UAAU,CAAC;IAC5B;;OAEG;IACH,mBAAmB,IAAI,gBAAgB,CAAC;IACxC;;OAEG;IACH,cAAc,IAAI,MAAM,CAAC;IACzB;;;;;;OAMG;IACH,UAAU,CAAC,OAAO,EAAE,aAAa,EAAE,cAAc,CAAC,EAAE,CAAC,OAAO,EAAE,aAAa,KAAK,MAAM,GAAG,MAAM,CAAC;CACjG;AAED,sDAAsD;AACtD,MAAM,WAAW,mBAAmB;IAClC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,MAAM,GAAG,QAAQ,CAAC;CACjD;AAED,0EAA0E;AAC1E,MAAM,WAAW,uBAAuB;IACtC,YAAY,EAAE,MAAM,CAAC;IACrB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,kCAAkC;AAClC,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,eAAe,EAAE,MAAM,CAAC;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,8DAA8D;AAC9D,MAAM,WAAW,gBAAgB;IAC/B,cAAc,EAAE,MAAM,EAAE,CAAC;IACzB,SAAS,EAAE,MAAM,EAAE,CAAC;CACrB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"assert.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/0.226.0/assert.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;GAaG;AACH,wBAAgB,MAAM,CAAC,IAAI,EAAE,OAAO,EAAE,GAAG,SAAK,GAAG,OAAO,CAAC,IAAI,CAI5D"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"assert_almost_equals.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/0.226.0/assert_almost_equals.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,MAAM,EAChB,SAAS,SAAO,EAChB,GAAG,CAAC,EAAE,MAAM,QAgBb"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"assert_array_includes.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/0.226.0/assert_array_includes.ts"],"names":[],"mappings":"AAMA,0FAA0F;AAC1F,MAAM,MAAM,YAAY,CAAC,CAAC,IAAI,SAAS,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC;AAEpD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,mBAAmB,CAAC,CAAC,EACnC,MAAM,EAAE,YAAY,CAAC,CAAC,CAAC,EACvB,QAAQ,EAAE,YAAY,CAAC,CAAC,CAAC,EACzB,GAAG,CAAC,EAAE,MAAM,QAwBb"}
|
package/node_modules/@dprint/formatter/script/deps/jsr.io/@std/assert/0.226.0/assert_equals.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"assert_equals.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/0.226.0/assert_equals.ts"],"names":[],"mappings":"AAMA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,YAAY,CAAC,CAAC,EAC5B,MAAM,EAAE,CAAC,EACT,QAAQ,EAAE,CAAC,EACX,GAAG,CAAC,EAAE,MAAM,QAkBb"}
|
package/node_modules/@dprint/formatter/script/deps/jsr.io/@std/assert/0.226.0/assert_exists.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"assert_exists.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/0.226.0/assert_exists.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,YAAY,CAAC,CAAC,EAC5B,MAAM,EAAE,CAAC,EACT,GAAG,CAAC,EAAE,MAAM,GACX,OAAO,CAAC,MAAM,IAAI,WAAW,CAAC,CAAC,CAAC,CAOlC"}
|
package/node_modules/@dprint/formatter/script/deps/jsr.io/@std/assert/0.226.0/assert_false.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"assert_false.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/0.226.0/assert_false.ts"],"names":[],"mappings":"AAIA,uDAAuD;AACvD,MAAM,MAAM,KAAK,GAAG,KAAK,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,GAAG,SAAS,CAAC;AAE3D;;;;;;;;;;;;;GAaG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,OAAO,EAAE,GAAG,SAAK,GAAG,OAAO,CAAC,IAAI,IAAI,KAAK,CAI1E"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"assert_greater.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/0.226.0/assert_greater.ts"],"names":[],"mappings":"AAKA;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,aAAa,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,QAAQ,EAAE,CAAC,EAAE,GAAG,CAAC,EAAE,MAAM,QAMpE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"assert_greater_or_equal.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/0.226.0/assert_greater_or_equal.ts"],"names":[],"mappings":"AAKA;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,oBAAoB,CAAC,CAAC,EACpC,MAAM,EAAE,CAAC,EACT,QAAQ,EAAE,CAAC,EACX,GAAG,CAAC,EAAE,MAAM,QASb"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"assert_instance_of.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/0.226.0/assert_instance_of.ts"],"names":[],"mappings":"AAIA,sBAAsB;AAEtB,MAAM,MAAM,cAAc,GAAG,KAAK,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAAC;AACzD,4BAA4B;AAC5B,MAAM,MAAM,kBAAkB,CAAC,CAAC,SAAS,cAAc,IAAI,CAAC,SAC5D,KAAK,GAAG,IAAI,EAAE,GAAG,KAAK,MAAM,CAAC,GAAG,CAAC,GAC7B,KAAK,CAAC;AAEV;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,gBAAgB,CAAC,CAAC,SAAS,cAAc,EACvD,MAAM,EAAE,OAAO,EACf,YAAY,EAAE,CAAC,EACf,GAAG,SAAK,GACP,OAAO,CAAC,MAAM,IAAI,kBAAkB,CAAC,CAAC,CAAC,CA6BzC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"assert_is_error.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/0.226.0/assert_is_error.ts"],"names":[],"mappings":"AAKA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,aAAa,CAAC,CAAC,SAAS,KAAK,GAAG,KAAK,EACnD,KAAK,EAAE,OAAO,EAEd,UAAU,CAAC,EAAE,KAAK,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,CAAC,EACtC,UAAU,CAAC,EAAE,MAAM,GAAG,MAAM,EAC5B,GAAG,CAAC,EAAE,MAAM,GACX,OAAO,CAAC,KAAK,IAAI,CAAC,CA8BpB"}
|