@effect-app/eslint-shared-config 0.0.6 → 0.0.8
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/package.json +2 -1
|
@@ -0,0 +1,226 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.createFromInstance = exports.createHost = void 0;
|
|
27
|
+
const dntShim = __importStar(require("./_dnt.shims.js"));
|
|
28
|
+
const decoder = new TextDecoder();
|
|
29
|
+
const encoder = new TextEncoder();
|
|
30
|
+
/**
|
|
31
|
+
* Creates host for host formatting.
|
|
32
|
+
*/
|
|
33
|
+
function createHost() {
|
|
34
|
+
function writeStderr(buf) {
|
|
35
|
+
try {
|
|
36
|
+
// deno-lint-ignore no-explicit-any
|
|
37
|
+
const global = dntShim.dntGlobalThis;
|
|
38
|
+
if (global.Deno) {
|
|
39
|
+
global.Deno.stderr.writeSync(buf);
|
|
40
|
+
}
|
|
41
|
+
else if (global.process) {
|
|
42
|
+
global.process.stderr.writeSync(buf);
|
|
43
|
+
}
|
|
44
|
+
else {
|
|
45
|
+
// ignore
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
catch {
|
|
49
|
+
// ignore
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
let instance;
|
|
53
|
+
let hostFormatter = undefined;
|
|
54
|
+
let formattedText = "";
|
|
55
|
+
let errorText = "";
|
|
56
|
+
return {
|
|
57
|
+
setInstance(wasmInstance) {
|
|
58
|
+
instance = wasmInstance;
|
|
59
|
+
},
|
|
60
|
+
setHostFormatter(formatWithHost) {
|
|
61
|
+
hostFormatter = formatWithHost;
|
|
62
|
+
},
|
|
63
|
+
createImportObject() {
|
|
64
|
+
let sharedBuffer = new Uint8Array(0);
|
|
65
|
+
return {
|
|
66
|
+
env: {
|
|
67
|
+
"fd_write": (fd, iovsPtr, iovsLen, nwrittenPtr) => {
|
|
68
|
+
let totalWritten = 0;
|
|
69
|
+
// deno-lint-ignore no-explicit-any
|
|
70
|
+
const wasmMemoryBuffer = instance.exports.memory.buffer;
|
|
71
|
+
const dataView = new DataView(wasmMemoryBuffer);
|
|
72
|
+
for (let i = 0; i < iovsLen; i++) {
|
|
73
|
+
const iovsOffset = iovsPtr + i * 8;
|
|
74
|
+
const iovecBufPtr = dataView.getUint32(iovsOffset, true);
|
|
75
|
+
const iovecBufLen = dataView.getUint32(iovsOffset + 4, true);
|
|
76
|
+
const buf = new Uint8Array(wasmMemoryBuffer, iovecBufPtr, iovecBufLen);
|
|
77
|
+
if (fd === 1 || fd === 2) {
|
|
78
|
+
// just write both stdout and stderr to stderr
|
|
79
|
+
writeStderr(buf);
|
|
80
|
+
}
|
|
81
|
+
else {
|
|
82
|
+
return 1; // not supported fd
|
|
83
|
+
}
|
|
84
|
+
totalWritten += iovecBufLen;
|
|
85
|
+
}
|
|
86
|
+
dataView.setUint32(nwrittenPtr, totalWritten, true);
|
|
87
|
+
return 0; // success
|
|
88
|
+
},
|
|
89
|
+
},
|
|
90
|
+
dprint: {
|
|
91
|
+
"host_has_cancelled": () => 0,
|
|
92
|
+
"host_write_buffer": (pointer) => {
|
|
93
|
+
getWasmBufferAtPointer(instance, pointer, sharedBuffer.length).set(sharedBuffer);
|
|
94
|
+
},
|
|
95
|
+
"host_format": (filePathPtr, filePathLen, rangeStart, rangeEnd, overrideConfigPtr, overrideConfigLen, fileBytesPtr, fileBytesLen) => {
|
|
96
|
+
const filePath = receiveString(filePathPtr, filePathLen);
|
|
97
|
+
const overrideConfigRaw = receiveString(overrideConfigPtr, overrideConfigLen);
|
|
98
|
+
const overrideConfig = overrideConfigRaw === "" ? {} : JSON.parse(overrideConfigRaw);
|
|
99
|
+
const fileText = receiveString(fileBytesPtr, fileBytesLen);
|
|
100
|
+
const bytesRange = rangeStart === 0 && rangeEnd === fileBytesLen
|
|
101
|
+
? undefined
|
|
102
|
+
: [rangeStart, rangeEnd];
|
|
103
|
+
try {
|
|
104
|
+
formattedText = hostFormatter?.({
|
|
105
|
+
filePath,
|
|
106
|
+
fileText,
|
|
107
|
+
bytesRange,
|
|
108
|
+
overrideConfig,
|
|
109
|
+
}) ?? fileText;
|
|
110
|
+
return fileText === formattedText ? 0 : 1;
|
|
111
|
+
}
|
|
112
|
+
catch (error) {
|
|
113
|
+
errorText = String(error);
|
|
114
|
+
return 2;
|
|
115
|
+
}
|
|
116
|
+
},
|
|
117
|
+
"host_get_formatted_text": () => {
|
|
118
|
+
sharedBuffer = encoder.encode(formattedText);
|
|
119
|
+
return sharedBuffer.length;
|
|
120
|
+
},
|
|
121
|
+
"host_get_error_text": () => {
|
|
122
|
+
sharedBuffer = encoder.encode(errorText);
|
|
123
|
+
return sharedBuffer.length;
|
|
124
|
+
},
|
|
125
|
+
},
|
|
126
|
+
};
|
|
127
|
+
},
|
|
128
|
+
};
|
|
129
|
+
function receiveString(ptr, length) {
|
|
130
|
+
return decoder.decode(getWasmBufferAtPointer(instance, ptr, length));
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
exports.createHost = createHost;
|
|
134
|
+
function createFromInstance(wasmInstance, host) {
|
|
135
|
+
host.setInstance(wasmInstance);
|
|
136
|
+
// only a single config is supported in here atm
|
|
137
|
+
const configId = 1;
|
|
138
|
+
// deno-lint-ignore no-explicit-any
|
|
139
|
+
const wasmExports = wasmInstance.exports;
|
|
140
|
+
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;
|
|
141
|
+
let configSet = false;
|
|
142
|
+
return {
|
|
143
|
+
setConfig(globalConfig, pluginConfig) {
|
|
144
|
+
setConfig(globalConfig, pluginConfig);
|
|
145
|
+
},
|
|
146
|
+
getConfigDiagnostics() {
|
|
147
|
+
setConfigIfNotSet();
|
|
148
|
+
const length = get_config_diagnostics(configId);
|
|
149
|
+
return JSON.parse(receiveString(length));
|
|
150
|
+
},
|
|
151
|
+
getResolvedConfig() {
|
|
152
|
+
setConfigIfNotSet();
|
|
153
|
+
const length = get_resolved_config(configId);
|
|
154
|
+
return JSON.parse(receiveString(length));
|
|
155
|
+
},
|
|
156
|
+
getFileMatchingInfo() {
|
|
157
|
+
const length = get_config_file_matching(configId);
|
|
158
|
+
return JSON.parse(receiveString(length));
|
|
159
|
+
},
|
|
160
|
+
getPluginInfo() {
|
|
161
|
+
const length = get_plugin_info();
|
|
162
|
+
return JSON.parse(receiveString(length));
|
|
163
|
+
},
|
|
164
|
+
getLicenseText() {
|
|
165
|
+
const length = get_license_text();
|
|
166
|
+
return receiveString(length);
|
|
167
|
+
},
|
|
168
|
+
formatText(request, formatWithHost) {
|
|
169
|
+
if (request.bytesRange != null && format_range == null) {
|
|
170
|
+
// plugin doesn't support range formatting
|
|
171
|
+
return request.fileText;
|
|
172
|
+
}
|
|
173
|
+
host.setHostFormatter(formatWithHost);
|
|
174
|
+
setConfigIfNotSet();
|
|
175
|
+
if (request.overrideConfig != null) {
|
|
176
|
+
sendString(JSON.stringify(request.overrideConfig));
|
|
177
|
+
set_override_config();
|
|
178
|
+
}
|
|
179
|
+
sendString(request.filePath);
|
|
180
|
+
set_file_path();
|
|
181
|
+
sendString(request.fileText);
|
|
182
|
+
const responseCode = request.bytesRange != null
|
|
183
|
+
? format_range(configId, request.bytesRange[0], request.bytesRange[1])
|
|
184
|
+
: format(configId);
|
|
185
|
+
switch (responseCode) {
|
|
186
|
+
case 0: // no change
|
|
187
|
+
return request.fileText;
|
|
188
|
+
case 1: // change
|
|
189
|
+
return receiveString(get_formatted_text());
|
|
190
|
+
case 2: // error
|
|
191
|
+
throw new Error(receiveString(get_error_text()));
|
|
192
|
+
default:
|
|
193
|
+
throw new Error(`Unexpected response code: ${responseCode}`);
|
|
194
|
+
}
|
|
195
|
+
},
|
|
196
|
+
};
|
|
197
|
+
function setConfigIfNotSet() {
|
|
198
|
+
if (!configSet) {
|
|
199
|
+
setConfig({}, {});
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
function setConfig(globalConfig, pluginConfig) {
|
|
203
|
+
release_config(configId);
|
|
204
|
+
sendString(JSON.stringify({
|
|
205
|
+
global: globalConfig,
|
|
206
|
+
plugin: pluginConfig,
|
|
207
|
+
}));
|
|
208
|
+
register_config(configId);
|
|
209
|
+
configSet = true;
|
|
210
|
+
}
|
|
211
|
+
function sendString(value) {
|
|
212
|
+
const bytes = encoder.encode(value);
|
|
213
|
+
const ptr = clear_shared_bytes(bytes.length);
|
|
214
|
+
getWasmBufferAtPointer(wasmInstance, ptr, bytes.length).set(bytes);
|
|
215
|
+
}
|
|
216
|
+
function receiveString(length) {
|
|
217
|
+
const ptr = get_shared_bytes_ptr();
|
|
218
|
+
return decoder.decode(getWasmBufferAtPointer(wasmInstance, ptr, length));
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
exports.createFromInstance = createFromInstance;
|
|
222
|
+
function getWasmBufferAtPointer(wasmInstance, pointer, length) {
|
|
223
|
+
return new Uint8Array(
|
|
224
|
+
// deno-lint-ignore no-explicit-any
|
|
225
|
+
wasmInstance.exports.memory.buffer, pointer, length);
|
|
226
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@effect-app/eslint-shared-config",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.8",
|
|
4
4
|
"description": "Shared flat ESLint base & vue configs for effect-app monorepo",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"private": false,
|
|
@@ -40,6 +40,7 @@
|
|
|
40
40
|
"eslint-plugin-prettier": "^5.5.4",
|
|
41
41
|
"@typescript-eslint/eslint-plugin": "8.42.0",
|
|
42
42
|
"@typescript-eslint/parser": "8.42.0",
|
|
43
|
+
"@dprint/formatter": "^0.4.1",
|
|
43
44
|
"@effect-app/eslint-codegen-model": "1.42.3"
|
|
44
45
|
},
|
|
45
46
|
"bundledDependencies": [
|