@opentui/core 0.4.4 → 0.4.5
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/chunk-bun-t2myhmwd.js +16382 -0
- package/chunk-bun-t2myhmwd.js.map +62 -0
- package/chunk-bun-tkm837n2.js +10047 -0
- package/chunk-bun-tkm837n2.js.map +32 -0
- package/{index-7z5n7k9m.js → chunk-node-51kpf0mz.js} +3 -3
- package/{index-7z5n7k9m.js.map → chunk-node-51kpf0mz.js.map} +1 -1
- package/{index-za1krqsf.js → chunk-node-q0cwyvm9.js} +413 -320
- package/chunk-node-q0cwyvm9.js.map +61 -0
- package/index.bun.js +13086 -0
- package/{index.js.map → index.bun.js.map} +2 -2
- package/index.d.ts +1 -0
- package/{index.js → index.node.js} +6 -4
- package/index.node.js.map +70 -0
- package/lib/tree-sitter/default-parser-assets.bun.d.ts +1 -0
- package/lib/tree-sitter/default-parsers.d.ts +1 -0
- package/lib/tree-sitter/parsers-config.d.ts +2 -2
- package/lib/tree-sitter/types.d.ts +1 -0
- package/lib/tree-sitter/update-assets.js +124 -58
- package/lib/tree-sitter/update-assets.js.map +3 -3
- package/node-asset-target.d.ts +12 -0
- package/node-assets.d.ts +7 -0
- package/node-assets.js +261 -0
- package/node-assets.js.map +16 -0
- package/package.json +23 -13
- package/parser.worker.js +3350 -188
- package/parser.worker.js.map +18 -12
- package/platform/assets.d.ts +5 -0
- package/platform/runtime-assets.bun.d.ts +4 -0
- package/platform/runtime-assets.node.d.ts +4 -0
- package/platform/runtime.d.ts +5 -1
- package/runtime-plugin.js +2 -2
- package/runtime-plugin.js.map +1 -1
- package/testing.bun.js +1005 -0
- package/testing.bun.js.map +18 -0
- package/testing.js +2 -2
- package/yoga.bun.js +194 -0
- package/yoga.bun.js.map +9 -0
- package/yoga.js +1 -1
- package/index-za1krqsf.js.map +0 -58
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function resolveBundledDefaultParserAsset(relativePath: string, fallbackPath: URL): Promise<string>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This file contains the configuration for the defaulttree-sitter parsers.
|
|
3
|
-
* It is used by ./assets/update.ts to generate the default
|
|
4
|
-
* For changes here to be reflected in
|
|
3
|
+
* It is used by ./assets/update.ts to generate the default parser runtime files and asset manifest.
|
|
4
|
+
* For changes here to be reflected in generated files, you need to run `bun run ./assets/update.ts`
|
|
5
5
|
*/
|
|
6
6
|
declare const _default: {
|
|
7
7
|
parsers: ({
|
|
@@ -155,7 +155,7 @@ async function downloadLanguage(filetype, languageUrl, assetsDir, outputPath) {
|
|
|
155
155
|
if (result.error) {
|
|
156
156
|
throw new Error(`Failed to download language for ${filetype}: ${result.error}`);
|
|
157
157
|
}
|
|
158
|
-
return "./" + path2.relative(path2.dirname(outputPath), languagePath);
|
|
158
|
+
return "./" + path2.relative(path2.dirname(outputPath), languagePath).replaceAll(path2.sep, "/");
|
|
159
159
|
}
|
|
160
160
|
async function downloadAndCombineQueries(filetype, queryUrls, assetsDir, outputPath, queryType, configPath) {
|
|
161
161
|
const queriesDir = path2.join(assetsDir, filetype);
|
|
@@ -203,79 +203,145 @@ ${content}`);
|
|
|
203
203
|
`);
|
|
204
204
|
await writeFile2(queryPath, combinedContent, "utf-8");
|
|
205
205
|
console.log(` Combined ${queryContents.length} queries into ${queryPath}`);
|
|
206
|
-
return "./" + path2.relative(path2.dirname(outputPath), queryPath);
|
|
206
|
+
return "./" + path2.relative(path2.dirname(outputPath), queryPath).replaceAll(path2.sep, "/");
|
|
207
207
|
}
|
|
208
208
|
async function generateDefaultParsersFile(parsers, outputPath) {
|
|
209
|
-
const
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
lines.push(`const ${safeFiletype}_injections = await resolveBundledFilePath(`, ` () => import("${parser.injectionsPath}" as string, { with: { type: "file" } }),`, ` "${parser.injectionsPath}",`, ` import.meta.url,`, `)`);
|
|
225
|
-
}
|
|
226
|
-
return lines.join(`
|
|
227
|
-
`);
|
|
228
|
-
}).join(`
|
|
209
|
+
const descriptors = parsers.map((parser) => ({
|
|
210
|
+
filetype: parser.filetype,
|
|
211
|
+
...parser.aliases?.length ? { aliases: parser.aliases } : {},
|
|
212
|
+
queries: {
|
|
213
|
+
highlights: [toPackageRelativeAssetPath(parser.highlightsPath)],
|
|
214
|
+
...parser.injectionsPath ? { injections: [toPackageRelativeAssetPath(parser.injectionsPath)] } : {}
|
|
215
|
+
},
|
|
216
|
+
wasm: toPackageRelativeAssetPath(parser.languagePath),
|
|
217
|
+
...parser.injectionMapping ? { injectionMapping: parser.injectionMapping } : {}
|
|
218
|
+
}));
|
|
219
|
+
const assetPaths = [
|
|
220
|
+
...new Set(parsers.flatMap((parser) => [parser.highlightsPath, parser.languagePath, parser.injectionsPath].filter((assetPath) => assetPath !== undefined).map(toPackageRelativeAssetPath)))
|
|
221
|
+
];
|
|
222
|
+
const isDefaultOutput = path2.resolve(outputPath) === getDefaultOptions().outputPath;
|
|
223
|
+
const bundledAssetLoaderEntries = assetPaths.map((assetPath) => ` ${JSON.stringify(assetPath)}: () => import(${JSON.stringify(`./${assetPath}`)} as string, { with: { type: "file" } }),`).join(`
|
|
229
224
|
`);
|
|
230
|
-
const
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
`)
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
225
|
+
const parserImports = isDefaultOutput ? `import { resolveDefaultParserAsset } from "#opentui/runtime-assets"
|
|
226
|
+
|
|
227
|
+
import type { FiletypeParserOptions, InjectionMapping } from "./types.js"` : `import { resolveBundledFilePath } from "@opentui/core"
|
|
228
|
+
import type { FiletypeParserOptions, InjectionMapping } from "@opentui/core"`;
|
|
229
|
+
const parserAssetLoaders = isDefaultOutput ? "" : `interface FileImportModule {
|
|
230
|
+
readonly default: string
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
const bundledAssetLoaders: Record<string, () => Promise<FileImportModule>> = {
|
|
234
|
+
${bundledAssetLoaderEntries}
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
`;
|
|
238
|
+
const parserAssetResolver = isDefaultOutput ? `function resolveParserAsset(relativePath: string): Promise<string> {
|
|
239
|
+
return resolveDefaultParserAsset(relativePath, new URL(\`./\${relativePath}\`, import.meta.url))
|
|
240
|
+
}` : `function resolveParserAsset(relativePath: string): Promise<string> {
|
|
241
|
+
const loadBundledFile = bundledAssetLoaders[relativePath]
|
|
242
|
+
if (!loadBundledFile) {
|
|
243
|
+
throw new Error(\`Unknown parser asset: \${JSON.stringify(relativePath)}\`)
|
|
244
|
+
}
|
|
245
|
+
return resolveBundledFilePath(
|
|
246
|
+
relativePath,
|
|
247
|
+
loadBundledFile,
|
|
248
|
+
new URL(\`./\${relativePath}\`, import.meta.url),
|
|
249
|
+
import.meta.url,
|
|
250
|
+
{ loadBundledFileFallback: true, useAssetRoot: false },
|
|
251
|
+
)
|
|
252
|
+
}`;
|
|
253
|
+
const parserFile = `// This file is generated by assets/update.ts - DO NOT EDIT MANUALLY
|
|
251
254
|
// Run 'bun assets/update.ts' to regenerate this file
|
|
252
|
-
// Last generated: ${new Date().toISOString()}
|
|
253
255
|
|
|
254
|
-
|
|
255
|
-
|
|
256
|
+
${parserImports}
|
|
257
|
+
|
|
258
|
+
${parserAssetLoaders}interface DefaultParserDescriptor {
|
|
259
|
+
readonly filetype: string
|
|
260
|
+
readonly aliases?: readonly string[]
|
|
261
|
+
readonly queries: {
|
|
262
|
+
readonly highlights: readonly string[]
|
|
263
|
+
readonly injections?: readonly string[]
|
|
264
|
+
}
|
|
265
|
+
readonly wasm: string
|
|
266
|
+
readonly injectionMapping?: InjectionMapping
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
const defaultParserDescriptors: readonly DefaultParserDescriptor[] = ${JSON.stringify(descriptors, null, 2)}
|
|
270
|
+
|
|
271
|
+
export const defaultParserAssetPaths: readonly string[] = [
|
|
272
|
+
...new Set(
|
|
273
|
+
defaultParserDescriptors.flatMap((parser) => [
|
|
274
|
+
...parser.queries.highlights,
|
|
275
|
+
parser.wasm,
|
|
276
|
+
...(parser.queries.injections ?? []),
|
|
277
|
+
]),
|
|
278
|
+
),
|
|
279
|
+
]
|
|
256
280
|
|
|
257
|
-
|
|
258
|
-
let _cachedParsers: Promise<FiletypeParserOptions[]> | undefined
|
|
281
|
+
let cachedParsers: Promise<FiletypeParserOptions[]> | undefined
|
|
259
282
|
|
|
260
283
|
export function getParsers(): Promise<FiletypeParserOptions[]> {
|
|
261
|
-
|
|
262
|
-
|
|
284
|
+
cachedParsers ??= Promise.all(defaultParserDescriptors.map(resolveDefaultParser))
|
|
285
|
+
return cachedParsers
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
async function resolveDefaultParser(parser: DefaultParserDescriptor): Promise<FiletypeParserOptions> {
|
|
289
|
+
const queries: FiletypeParserOptions["queries"] = {
|
|
290
|
+
highlights: await Promise.all(parser.queries.highlights.map(resolveParserAsset)),
|
|
291
|
+
}
|
|
292
|
+
if (parser.queries.injections) {
|
|
293
|
+
queries.injections = await Promise.all(parser.queries.injections.map(resolveParserAsset))
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
return {
|
|
297
|
+
filetype: parser.filetype,
|
|
298
|
+
...(parser.aliases ? { aliases: [...parser.aliases] } : {}),
|
|
299
|
+
queries,
|
|
300
|
+
wasm: await resolveParserAsset(parser.wasm),
|
|
301
|
+
...(parser.injectionMapping ? { injectionMapping: parser.injectionMapping } : {}),
|
|
263
302
|
}
|
|
264
|
-
return _cachedParsers
|
|
265
303
|
}
|
|
266
304
|
|
|
267
|
-
|
|
268
|
-
|
|
305
|
+
${parserAssetResolver}
|
|
306
|
+
`;
|
|
307
|
+
const bunAssetFile = `// This file is generated by assets/update.ts - DO NOT EDIT MANUALLY
|
|
308
|
+
// Run 'bun assets/update.ts' to regenerate this file
|
|
269
309
|
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
310
|
+
import { resolveBundledFilePath } from "../../platform/runtime.js"
|
|
311
|
+
|
|
312
|
+
interface FileImportModule {
|
|
313
|
+
readonly default: string
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
const bundledAssetLoaders: Record<string, () => Promise<FileImportModule>> = {
|
|
317
|
+
${bundledAssetLoaderEntries}
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
export function resolveBundledDefaultParserAsset(relativePath: string, fallbackPath: URL): Promise<string> {
|
|
321
|
+
const loadBundledFile = bundledAssetLoaders[relativePath]
|
|
322
|
+
if (!loadBundledFile) {
|
|
323
|
+
throw new Error(\`Unknown OpenTUI default parser asset: \${JSON.stringify(relativePath)}\`)
|
|
324
|
+
}
|
|
325
|
+
return resolveBundledFilePath(
|
|
326
|
+
\`@opentui/core/\${relativePath}\`,
|
|
327
|
+
loadBundledFile,
|
|
328
|
+
fallbackPath,
|
|
329
|
+
import.meta.url,
|
|
330
|
+
)
|
|
273
331
|
}
|
|
274
332
|
`;
|
|
333
|
+
const bunAssetOutputPath = path2.join(path2.dirname(outputPath), "default-parser-assets.bun.ts");
|
|
275
334
|
await mkdir2(path2.dirname(outputPath), { recursive: true });
|
|
276
|
-
|
|
335
|
+
const writes = [writeFile2(outputPath, parserFile, "utf-8")];
|
|
336
|
+
if (isDefaultOutput) {
|
|
337
|
+
writes.push(writeFile2(bunAssetOutputPath, bunAssetFile, "utf-8"));
|
|
338
|
+
}
|
|
339
|
+
await Promise.all(writes);
|
|
277
340
|
console.log(`Generated ${path2.basename(outputPath)} with ${parsers.length} parsers`);
|
|
278
341
|
}
|
|
342
|
+
function toPackageRelativeAssetPath(assetPath) {
|
|
343
|
+
return assetPath.replace(/^\.\//, "");
|
|
344
|
+
}
|
|
279
345
|
async function main(options) {
|
|
280
346
|
const opts = { ...getDefaultOptions(), ...options };
|
|
281
347
|
try {
|
|
@@ -375,5 +441,5 @@ export {
|
|
|
375
441
|
runUpdateAssetsCli
|
|
376
442
|
};
|
|
377
443
|
|
|
378
|
-
//# debugId=
|
|
444
|
+
//# debugId=EC6FDBCB61B1DFC664756E2164756E21
|
|
379
445
|
//# sourceMappingURL=update-assets.js.map
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/lib/tree-sitter/assets/update.ts", "../../../src/lib/tree-sitter/download-utils.ts", "../../../src/lib/tree-sitter/update-assets.ts"],
|
|
4
4
|
"sourcesContent": [
|
|
5
|
-
"#!/usr/bin/env bun\n\nimport { readFile, writeFile, mkdir } from \"fs/promises\"\nimport * as path from \"path\"\nimport { DownloadUtils } from \"../download-utils.js\"\nimport { parseArgs } from \"util\"\nimport type { FiletypeParserOptions } from \"../types.js\"\nimport { readdir } from \"fs/promises\"\nimport { fileURLToPath } from \"node:url\"\n\nconst __filename = fileURLToPath(import.meta.url)\nconst __dirname = path.dirname(__filename)\n\ninterface ParsersConfig {\n parsers: FiletypeParserOptions[]\n}\n\ninterface GeneratedParser {\n filetype: string\n aliases?: string[]\n languagePath: string\n highlightsPath: string\n injectionsPath?: string\n injectionMapping?: any\n}\n\nexport interface UpdateOptions {\n /** Path to parsers-config.json */\n configPath: string\n /** Directory where .wasm and .scm files will be downloaded */\n assetsDir: string\n /** Path where the generated TypeScript file will be written */\n outputPath: string\n}\n\nfunction getDefaultOptions(): UpdateOptions {\n return {\n configPath: path.resolve(__dirname, \"../parsers-config\"),\n assetsDir: path.resolve(__dirname),\n outputPath: path.resolve(__dirname, \"../default-parsers.ts\"),\n }\n}\n\nasync function loadConfig(configPath: string): Promise<ParsersConfig> {\n let ext = path.extname(configPath)\n let resolvedConfigPath = configPath\n\n if (ext === \"\") {\n const files = await readdir(path.dirname(configPath))\n const file = files.find(\n (file) =>\n file.startsWith(path.basename(configPath)) &&\n (file.endsWith(\".json\") || file.endsWith(\".ts\") || file.endsWith(\".js\")),\n )\n if (!file) {\n throw new Error(`No config file found for ${configPath}`)\n }\n resolvedConfigPath = path.join(path.dirname(configPath), file)\n ext = path.extname(resolvedConfigPath)\n }\n\n if (ext === \".json\") {\n const configContent = await readFile(resolvedConfigPath, \"utf-8\")\n return JSON.parse(configContent)\n } else if (ext === \".ts\" || ext === \".js\") {\n const { default: configContent } = await import(resolvedConfigPath)\n return configContent\n }\n throw new Error(`Unsupported config file extension: ${ext}`)\n}\n\nasync function downloadLanguage(\n filetype: string,\n languageUrl: string,\n assetsDir: string,\n outputPath: string,\n): Promise<string> {\n const languageDir = path.join(assetsDir, filetype)\n const languageFilename = path.basename(languageUrl)\n const languagePath = path.join(languageDir, languageFilename)\n\n const result = await DownloadUtils.downloadToPath(languageUrl, languagePath)\n\n if (result.error) {\n throw new Error(`Failed to download language for ${filetype}: ${result.error}`)\n }\n\n return \"./\" + path.relative(path.dirname(outputPath), languagePath)\n}\n\nasync function downloadAndCombineQueries(\n filetype: string,\n queryUrls: string[],\n assetsDir: string,\n outputPath: string,\n queryType: \"highlights\" | \"injections\",\n configPath: string,\n): Promise<string> {\n const queriesDir = path.join(assetsDir, filetype)\n const queryPath = path.join(queriesDir, `${queryType}.scm`)\n\n const queryContents: string[] = []\n\n for (let i = 0; i < queryUrls.length; i++) {\n const queryUrl = queryUrls[i]\n\n if (queryUrl.startsWith(\"./\")) {\n console.log(` Using local query ${i + 1}/${queryUrls.length}: ${queryUrl}`)\n\n try {\n const localPath = path.resolve(path.dirname(configPath), queryUrl)\n const content = await readFile(localPath, \"utf-8\")\n\n if (content.trim()) {\n queryContents.push(content)\n console.log(` ✓ Loaded ${content.split(\"\\n\").length} lines from local file`)\n }\n } catch (error) {\n console.warn(`Failed to read local query from ${queryUrl}: ${error}`)\n continue\n }\n } else {\n console.log(` Downloading query ${i + 1}/${queryUrls.length}: ${queryUrl}`)\n\n try {\n const response = await fetch(queryUrl)\n if (!response.ok) {\n console.warn(`Failed to download query from ${queryUrl}: ${response.statusText}`)\n continue\n }\n\n const content = await response.text()\n if (content.trim()) {\n queryContents.push(`; Query from: ${queryUrl}\\n${content}`)\n console.log(` ✓ Downloaded ${content.split(\"\\n\").length} lines`)\n }\n } catch (error) {\n console.warn(`Failed to download query from ${queryUrl}: ${error}`)\n continue\n }\n }\n }\n\n const combinedContent = queryContents.join(\"\\n\\n\")\n await writeFile(queryPath, combinedContent, \"utf-8\")\n\n console.log(` Combined ${queryContents.length} queries into ${queryPath}`)\n\n return \"./\" + path.relative(path.dirname(outputPath), queryPath)\n}\n\nasync function generateDefaultParsersFile(parsers: GeneratedParser[], outputPath: string): Promise<void> {\n const assetPaths = parsers\n .map((parser) => {\n const safeFiletype = parser.filetype.replace(/[^a-zA-Z0-9]/g, \"_\")\n const lines = [\n `const ${safeFiletype}_highlights = await resolveBundledFilePath(`,\n ` () => import(\"${parser.highlightsPath}\" as string, { with: { type: \"file\" } }),`,\n ` \"${parser.highlightsPath}\",`,\n ` import.meta.url,`,\n `)`,\n `const ${safeFiletype}_language = await resolveBundledFilePath(`,\n ` () => import(\"${parser.languagePath}\" as string, { with: { type: \"file\" } }),`,\n ` \"${parser.languagePath}\",`,\n ` import.meta.url,`,\n `)`,\n ]\n\n if (parser.injectionsPath) {\n lines.push(\n `const ${safeFiletype}_injections = await resolveBundledFilePath(`,\n ` () => import(\"${parser.injectionsPath}\" as string, { with: { type: \"file\" } }),`,\n ` \"${parser.injectionsPath}\",`,\n ` import.meta.url,`,\n `)`,\n )\n }\n\n return lines.join(\"\\n\")\n })\n .join(\"\\n\")\n\n const parserDefinitions = parsers\n .map((parser) => {\n const safeFiletype = parser.filetype.replace(/[^a-zA-Z0-9]/g, \"_\")\n const queriesLines = [` highlights: [${safeFiletype}_highlights],`]\n\n if (parser.injectionsPath) {\n queriesLines.push(` injections: [${safeFiletype}_injections],`)\n }\n\n const injectionMappingLine = parser.injectionMapping\n ? ` injectionMapping: ${JSON.stringify(parser.injectionMapping, null, 10)},`\n : \"\"\n const aliasesLine = parser.aliases?.length ? ` aliases: ${JSON.stringify(parser.aliases)},` : \"\"\n\n return ` {\n filetype: \"${parser.filetype}\",\n${aliasesLine ? aliasesLine + \"\\n\" : \"\"} queries: {\n${queriesLines.join(\"\\n\")}\n },\n wasm: ${safeFiletype}_language,${injectionMappingLine ? \"\\n\" + injectionMappingLine : \"\"}\n }`\n })\n .join(\",\\n\")\n\n const fileContent = `// This file is generated by assets/update.ts - DO NOT EDIT MANUALLY\n// Run 'bun assets/update.ts' to regenerate this file\n// Last generated: ${new Date().toISOString()}\n\nimport type { FiletypeParserOptions } from \"./types.js\"\nimport { resolveBundledFilePath } from \"../../platform/runtime.js\"\n\n// Cached parsers to avoid re-resolving paths on every call\nlet _cachedParsers: Promise<FiletypeParserOptions[]> | undefined\n\nexport function getParsers(): Promise<FiletypeParserOptions[]> {\n if (!_cachedParsers) {\n _cachedParsers = loadParsers()\n }\n return _cachedParsers\n}\n\nasync function loadParsers(): Promise<FiletypeParserOptions[]> {\n${assetPaths}\n\n return [\n${parserDefinitions},\n ]\n}\n`\n\n await mkdir(path.dirname(outputPath), { recursive: true })\n await writeFile(outputPath, fileContent, \"utf-8\")\n console.log(`Generated ${path.basename(outputPath)} with ${parsers.length} parsers`)\n}\n\nasync function main(options?: Partial<UpdateOptions>): Promise<void> {\n const opts = { ...getDefaultOptions(), ...options }\n\n try {\n console.log(\"Loading parsers configuration...\")\n console.log(` Config: ${opts.configPath}`)\n console.log(` Assets Dir: ${opts.assetsDir}`)\n console.log(` Output: ${opts.outputPath}`)\n\n const config = await loadConfig(opts.configPath)\n\n console.log(`Found ${config.parsers.length} parsers to process`)\n\n const generatedParsers: GeneratedParser[] = []\n\n for (const parser of config.parsers) {\n console.log(`Processing ${parser.filetype}...`)\n\n console.log(` Downloading language...`)\n const languagePath = await downloadLanguage(parser.filetype, parser.wasm, opts.assetsDir, opts.outputPath)\n\n console.log(` Downloading ${parser.queries.highlights.length} highlight queries...`)\n const highlightsPath = await downloadAndCombineQueries(\n parser.filetype,\n parser.queries.highlights,\n opts.assetsDir,\n opts.outputPath,\n \"highlights\",\n opts.configPath,\n )\n\n let injectionsPath: string | undefined\n if (parser.queries.injections && parser.queries.injections.length > 0) {\n console.log(` Downloading ${parser.queries.injections.length} injection queries...`)\n injectionsPath = await downloadAndCombineQueries(\n parser.filetype,\n parser.queries.injections,\n opts.assetsDir,\n opts.outputPath,\n \"injections\",\n opts.configPath,\n )\n }\n\n generatedParsers.push({\n filetype: parser.filetype,\n aliases: parser.aliases,\n languagePath,\n highlightsPath,\n injectionsPath,\n injectionMapping: parser.injectionMapping,\n })\n\n console.log(` ✓ Completed ${parser.filetype}`)\n }\n\n console.log(\"Generating output file...\")\n await generateDefaultParsersFile(generatedParsers, opts.outputPath)\n\n console.log(\"✅ Update completed successfully!\")\n } catch (error) {\n console.error(\"❌ Update failed:\", error)\n process.exit(1)\n }\n}\n\nfunction parseCLIArgs(): Partial<UpdateOptions> | null {\n try {\n const { values } = parseArgs({\n args: process.argv.slice(2),\n options: {\n config: { type: \"string\" },\n assets: { type: \"string\" },\n output: { type: \"string\" },\n help: { type: \"boolean\" },\n },\n strict: true,\n })\n\n if (values.help) {\n const command = path.basename(Bun.argv[1] ?? \"update-assets.js\")\n\n console.log(`Usage: bun ${command} [options]\n\nOptions:\n --config <path> Path to parsers-config.json\n --assets <path> Directory where .wasm and .scm files will be downloaded\n --output <path> Path where the generated TypeScript file will be written\n --help Show this help message\n\nExamples:\n # Use default paths (for OpenTUI core development)\n bun ${command}\n\n # Use custom paths (for application integration)\n bun ${command} --config ./my-parsers.json --assets ./src/parsers --output ./src/parsers.ts\n`)\n process.exit(0)\n }\n\n const options: Partial<UpdateOptions> = {}\n if (values.config) options.configPath = path.resolve(values.config)\n if (values.assets) options.assetsDir = path.resolve(values.assets)\n if (values.output) options.outputPath = path.resolve(values.output)\n\n return Object.keys(options).length > 0 ? options : null\n } catch (error) {\n console.error(`Error parsing arguments: ${error}`)\n console.log(\"Run with --help for usage information\")\n process.exit(1)\n }\n}\n\nexport function runUpdateAssetsCli(): Promise<void> {\n const cliOptions = parseCLIArgs()\n return main(cliOptions || undefined)\n}\n\nif (import.meta.main) {\n await runUpdateAssetsCli()\n}\n\nexport { main as updateAssets }\n",
|
|
5
|
+
"#!/usr/bin/env bun\n\nimport { readFile, writeFile, mkdir } from \"fs/promises\"\nimport * as path from \"path\"\nimport { DownloadUtils } from \"../download-utils.js\"\nimport { parseArgs } from \"util\"\nimport type { FiletypeParserOptions } from \"../types.js\"\nimport { readdir } from \"fs/promises\"\nimport { fileURLToPath } from \"node:url\"\n\nconst __filename = fileURLToPath(import.meta.url)\nconst __dirname = path.dirname(__filename)\n\ninterface ParsersConfig {\n parsers: FiletypeParserOptions[]\n}\n\ninterface GeneratedParser {\n filetype: string\n aliases?: string[]\n languagePath: string\n highlightsPath: string\n injectionsPath?: string\n injectionMapping?: any\n}\n\nexport interface UpdateOptions {\n /** Path to parsers-config.json */\n configPath: string\n /** Directory where .wasm and .scm files will be downloaded */\n assetsDir: string\n /** Path where the generated TypeScript file will be written */\n outputPath: string\n}\n\nfunction getDefaultOptions(): UpdateOptions {\n return {\n configPath: path.resolve(__dirname, \"../parsers-config\"),\n assetsDir: path.resolve(__dirname),\n outputPath: path.resolve(__dirname, \"../default-parsers.ts\"),\n }\n}\n\nasync function loadConfig(configPath: string): Promise<ParsersConfig> {\n let ext = path.extname(configPath)\n let resolvedConfigPath = configPath\n\n if (ext === \"\") {\n const files = await readdir(path.dirname(configPath))\n const file = files.find(\n (file) =>\n file.startsWith(path.basename(configPath)) &&\n (file.endsWith(\".json\") || file.endsWith(\".ts\") || file.endsWith(\".js\")),\n )\n if (!file) {\n throw new Error(`No config file found for ${configPath}`)\n }\n resolvedConfigPath = path.join(path.dirname(configPath), file)\n ext = path.extname(resolvedConfigPath)\n }\n\n if (ext === \".json\") {\n const configContent = await readFile(resolvedConfigPath, \"utf-8\")\n return JSON.parse(configContent)\n } else if (ext === \".ts\" || ext === \".js\") {\n const { default: configContent } = await import(resolvedConfigPath)\n return configContent\n }\n throw new Error(`Unsupported config file extension: ${ext}`)\n}\n\nasync function downloadLanguage(\n filetype: string,\n languageUrl: string,\n assetsDir: string,\n outputPath: string,\n): Promise<string> {\n const languageDir = path.join(assetsDir, filetype)\n const languageFilename = path.basename(languageUrl)\n const languagePath = path.join(languageDir, languageFilename)\n\n const result = await DownloadUtils.downloadToPath(languageUrl, languagePath)\n\n if (result.error) {\n throw new Error(`Failed to download language for ${filetype}: ${result.error}`)\n }\n\n return \"./\" + path.relative(path.dirname(outputPath), languagePath).replaceAll(path.sep, \"/\")\n}\n\nasync function downloadAndCombineQueries(\n filetype: string,\n queryUrls: string[],\n assetsDir: string,\n outputPath: string,\n queryType: \"highlights\" | \"injections\",\n configPath: string,\n): Promise<string> {\n const queriesDir = path.join(assetsDir, filetype)\n const queryPath = path.join(queriesDir, `${queryType}.scm`)\n\n const queryContents: string[] = []\n\n for (let i = 0; i < queryUrls.length; i++) {\n const queryUrl = queryUrls[i]\n\n if (queryUrl.startsWith(\"./\")) {\n console.log(` Using local query ${i + 1}/${queryUrls.length}: ${queryUrl}`)\n\n try {\n const localPath = path.resolve(path.dirname(configPath), queryUrl)\n const content = await readFile(localPath, \"utf-8\")\n\n if (content.trim()) {\n queryContents.push(content)\n console.log(` ✓ Loaded ${content.split(\"\\n\").length} lines from local file`)\n }\n } catch (error) {\n console.warn(`Failed to read local query from ${queryUrl}: ${error}`)\n continue\n }\n } else {\n console.log(` Downloading query ${i + 1}/${queryUrls.length}: ${queryUrl}`)\n\n try {\n const response = await fetch(queryUrl)\n if (!response.ok) {\n console.warn(`Failed to download query from ${queryUrl}: ${response.statusText}`)\n continue\n }\n\n const content = await response.text()\n if (content.trim()) {\n queryContents.push(`; Query from: ${queryUrl}\\n${content}`)\n console.log(` ✓ Downloaded ${content.split(\"\\n\").length} lines`)\n }\n } catch (error) {\n console.warn(`Failed to download query from ${queryUrl}: ${error}`)\n continue\n }\n }\n }\n\n const combinedContent = queryContents.join(\"\\n\\n\")\n await writeFile(queryPath, combinedContent, \"utf-8\")\n\n console.log(` Combined ${queryContents.length} queries into ${queryPath}`)\n\n return \"./\" + path.relative(path.dirname(outputPath), queryPath).replaceAll(path.sep, \"/\")\n}\n\nasync function generateDefaultParsersFile(parsers: GeneratedParser[], outputPath: string): Promise<void> {\n const descriptors = parsers.map((parser) => ({\n filetype: parser.filetype,\n ...(parser.aliases?.length ? { aliases: parser.aliases } : {}),\n queries: {\n highlights: [toPackageRelativeAssetPath(parser.highlightsPath)],\n ...(parser.injectionsPath ? { injections: [toPackageRelativeAssetPath(parser.injectionsPath)] } : {}),\n },\n wasm: toPackageRelativeAssetPath(parser.languagePath),\n ...(parser.injectionMapping ? { injectionMapping: parser.injectionMapping } : {}),\n }))\n const assetPaths = [\n ...new Set(\n parsers.flatMap((parser) =>\n [parser.highlightsPath, parser.languagePath, parser.injectionsPath]\n .filter((assetPath): assetPath is string => assetPath !== undefined)\n .map(toPackageRelativeAssetPath),\n ),\n ),\n ]\n const isDefaultOutput = path.resolve(outputPath) === getDefaultOptions().outputPath\n const bundledAssetLoaderEntries = assetPaths\n .map(\n (assetPath) =>\n ` ${JSON.stringify(assetPath)}: () => import(${JSON.stringify(`./${assetPath}`)} as string, { with: { type: \"file\" } }),`,\n )\n .join(\"\\n\")\n const parserImports = isDefaultOutput\n ? `import { resolveDefaultParserAsset } from \"#opentui/runtime-assets\"\n\nimport type { FiletypeParserOptions, InjectionMapping } from \"./types.js\"`\n : `import { resolveBundledFilePath } from \"@opentui/core\"\nimport type { FiletypeParserOptions, InjectionMapping } from \"@opentui/core\"`\n const parserAssetLoaders = isDefaultOutput\n ? \"\"\n : `interface FileImportModule {\n readonly default: string\n}\n\nconst bundledAssetLoaders: Record<string, () => Promise<FileImportModule>> = {\n${bundledAssetLoaderEntries}\n}\n\n`\n const parserAssetResolver = isDefaultOutput\n ? `function resolveParserAsset(relativePath: string): Promise<string> {\n return resolveDefaultParserAsset(relativePath, new URL(\\`./\\${relativePath}\\`, import.meta.url))\n}`\n : `function resolveParserAsset(relativePath: string): Promise<string> {\n const loadBundledFile = bundledAssetLoaders[relativePath]\n if (!loadBundledFile) {\n throw new Error(\\`Unknown parser asset: \\${JSON.stringify(relativePath)}\\`)\n }\n return resolveBundledFilePath(\n relativePath,\n loadBundledFile,\n new URL(\\`./\\${relativePath}\\`, import.meta.url),\n import.meta.url,\n { loadBundledFileFallback: true, useAssetRoot: false },\n )\n}`\n\n const parserFile = `// This file is generated by assets/update.ts - DO NOT EDIT MANUALLY\n// Run 'bun assets/update.ts' to regenerate this file\n\n${parserImports}\n\n${parserAssetLoaders}interface DefaultParserDescriptor {\n readonly filetype: string\n readonly aliases?: readonly string[]\n readonly queries: {\n readonly highlights: readonly string[]\n readonly injections?: readonly string[]\n }\n readonly wasm: string\n readonly injectionMapping?: InjectionMapping\n}\n\nconst defaultParserDescriptors: readonly DefaultParserDescriptor[] = ${JSON.stringify(descriptors, null, 2)}\n\nexport const defaultParserAssetPaths: readonly string[] = [\n ...new Set(\n defaultParserDescriptors.flatMap((parser) => [\n ...parser.queries.highlights,\n parser.wasm,\n ...(parser.queries.injections ?? []),\n ]),\n ),\n]\n\nlet cachedParsers: Promise<FiletypeParserOptions[]> | undefined\n\nexport function getParsers(): Promise<FiletypeParserOptions[]> {\n cachedParsers ??= Promise.all(defaultParserDescriptors.map(resolveDefaultParser))\n return cachedParsers\n}\n\nasync function resolveDefaultParser(parser: DefaultParserDescriptor): Promise<FiletypeParserOptions> {\n const queries: FiletypeParserOptions[\"queries\"] = {\n highlights: await Promise.all(parser.queries.highlights.map(resolveParserAsset)),\n }\n if (parser.queries.injections) {\n queries.injections = await Promise.all(parser.queries.injections.map(resolveParserAsset))\n }\n\n return {\n filetype: parser.filetype,\n ...(parser.aliases ? { aliases: [...parser.aliases] } : {}),\n queries,\n wasm: await resolveParserAsset(parser.wasm),\n ...(parser.injectionMapping ? { injectionMapping: parser.injectionMapping } : {}),\n }\n}\n\n${parserAssetResolver}\n`\n\n const bunAssetFile = `// This file is generated by assets/update.ts - DO NOT EDIT MANUALLY\n// Run 'bun assets/update.ts' to regenerate this file\n\nimport { resolveBundledFilePath } from \"../../platform/runtime.js\"\n\ninterface FileImportModule {\n readonly default: string\n}\n\nconst bundledAssetLoaders: Record<string, () => Promise<FileImportModule>> = {\n${bundledAssetLoaderEntries}\n}\n\nexport function resolveBundledDefaultParserAsset(relativePath: string, fallbackPath: URL): Promise<string> {\n const loadBundledFile = bundledAssetLoaders[relativePath]\n if (!loadBundledFile) {\n throw new Error(\\`Unknown OpenTUI default parser asset: \\${JSON.stringify(relativePath)}\\`)\n }\n return resolveBundledFilePath(\n \\`@opentui/core/\\${relativePath}\\`,\n loadBundledFile,\n fallbackPath,\n import.meta.url,\n )\n}\n`\n\n const bunAssetOutputPath = path.join(path.dirname(outputPath), \"default-parser-assets.bun.ts\")\n await mkdir(path.dirname(outputPath), { recursive: true })\n const writes = [writeFile(outputPath, parserFile, \"utf-8\")]\n if (isDefaultOutput) {\n writes.push(writeFile(bunAssetOutputPath, bunAssetFile, \"utf-8\"))\n }\n await Promise.all(writes)\n console.log(`Generated ${path.basename(outputPath)} with ${parsers.length} parsers`)\n}\n\nfunction toPackageRelativeAssetPath(assetPath: string): string {\n return assetPath.replace(/^\\.\\//, \"\")\n}\n\nasync function main(options?: Partial<UpdateOptions>): Promise<void> {\n const opts = { ...getDefaultOptions(), ...options }\n\n try {\n console.log(\"Loading parsers configuration...\")\n console.log(` Config: ${opts.configPath}`)\n console.log(` Assets Dir: ${opts.assetsDir}`)\n console.log(` Output: ${opts.outputPath}`)\n\n const config = await loadConfig(opts.configPath)\n\n console.log(`Found ${config.parsers.length} parsers to process`)\n\n const generatedParsers: GeneratedParser[] = []\n\n for (const parser of config.parsers) {\n console.log(`Processing ${parser.filetype}...`)\n\n console.log(` Downloading language...`)\n const languagePath = await downloadLanguage(parser.filetype, parser.wasm, opts.assetsDir, opts.outputPath)\n\n console.log(` Downloading ${parser.queries.highlights.length} highlight queries...`)\n const highlightsPath = await downloadAndCombineQueries(\n parser.filetype,\n parser.queries.highlights,\n opts.assetsDir,\n opts.outputPath,\n \"highlights\",\n opts.configPath,\n )\n\n let injectionsPath: string | undefined\n if (parser.queries.injections && parser.queries.injections.length > 0) {\n console.log(` Downloading ${parser.queries.injections.length} injection queries...`)\n injectionsPath = await downloadAndCombineQueries(\n parser.filetype,\n parser.queries.injections,\n opts.assetsDir,\n opts.outputPath,\n \"injections\",\n opts.configPath,\n )\n }\n\n generatedParsers.push({\n filetype: parser.filetype,\n aliases: parser.aliases,\n languagePath,\n highlightsPath,\n injectionsPath,\n injectionMapping: parser.injectionMapping,\n })\n\n console.log(` ✓ Completed ${parser.filetype}`)\n }\n\n console.log(\"Generating output file...\")\n await generateDefaultParsersFile(generatedParsers, opts.outputPath)\n\n console.log(\"✅ Update completed successfully!\")\n } catch (error) {\n console.error(\"❌ Update failed:\", error)\n process.exit(1)\n }\n}\n\nfunction parseCLIArgs(): Partial<UpdateOptions> | null {\n try {\n const { values } = parseArgs({\n args: process.argv.slice(2),\n options: {\n config: { type: \"string\" },\n assets: { type: \"string\" },\n output: { type: \"string\" },\n help: { type: \"boolean\" },\n },\n strict: true,\n })\n\n if (values.help) {\n const command = path.basename(Bun.argv[1] ?? \"update-assets.js\")\n\n console.log(`Usage: bun ${command} [options]\n\nOptions:\n --config <path> Path to parsers-config.json\n --assets <path> Directory where .wasm and .scm files will be downloaded\n --output <path> Path where the generated TypeScript file will be written\n --help Show this help message\n\nExamples:\n # Use default paths (for OpenTUI core development)\n bun ${command}\n\n # Use custom paths (for application integration)\n bun ${command} --config ./my-parsers.json --assets ./src/parsers --output ./src/parsers.ts\n`)\n process.exit(0)\n }\n\n const options: Partial<UpdateOptions> = {}\n if (values.config) options.configPath = path.resolve(values.config)\n if (values.assets) options.assetsDir = path.resolve(values.assets)\n if (values.output) options.outputPath = path.resolve(values.output)\n\n return Object.keys(options).length > 0 ? options : null\n } catch (error) {\n console.error(`Error parsing arguments: ${error}`)\n console.log(\"Run with --help for usage information\")\n process.exit(1)\n }\n}\n\nexport function runUpdateAssetsCli(): Promise<void> {\n const cliOptions = parseCLIArgs()\n return main(cliOptions || undefined)\n}\n\nif (import.meta.main) {\n await runUpdateAssetsCli()\n}\n\nexport { main as updateAssets }\n",
|
|
6
6
|
"import { mkdir, readFile, writeFile } from \"fs/promises\"\nimport * as path from \"path\"\n\nexport interface DownloadResult {\n content?: Buffer\n filePath?: string\n error?: string\n}\n\nexport class DownloadUtils {\n private static hashUrl(url: string): string {\n let hash = 0\n for (let i = 0; i < url.length; i++) {\n const char = url.charCodeAt(i)\n hash = (hash << 5) - hash + char\n hash = hash & hash\n }\n return Math.abs(hash).toString(16)\n }\n\n /**\n * Download a file from URL or load from local path, with caching support\n */\n static async downloadOrLoad(\n source: string,\n cacheDir: string,\n cacheSubdir: string,\n fileExtension: string,\n useHashForCache: boolean = true,\n filetype?: string,\n ): Promise<DownloadResult> {\n const isUrl = source.startsWith(\"http://\") || source.startsWith(\"https://\")\n\n if (isUrl) {\n let cacheFileName: string\n if (useHashForCache) {\n const hash = this.hashUrl(source)\n cacheFileName = filetype ? `${filetype}-${hash}${fileExtension}` : `${hash}${fileExtension}`\n } else {\n cacheFileName = path.basename(source)\n }\n const cacheFile = path.join(cacheDir, cacheSubdir, cacheFileName)\n\n // Ensure cache directory exists\n await mkdir(path.dirname(cacheFile), { recursive: true })\n\n try {\n const cachedContent = await readFile(cacheFile)\n if (cachedContent.byteLength > 0) {\n console.log(`Loaded from cache: ${cacheFile} (${source})`)\n return { content: cachedContent, filePath: cacheFile }\n }\n } catch (error) {\n // Cache miss, continue to fetch\n }\n\n try {\n console.log(`Downloading from URL: ${source}`)\n const response = await fetch(source)\n if (!response.ok) {\n return { error: `Failed to fetch from ${source}: ${response.statusText}` }\n }\n const content = Buffer.from(await response.arrayBuffer())\n\n try {\n await writeFile(cacheFile, Buffer.from(content))\n console.log(`Cached: ${source}`)\n } catch (cacheError) {\n console.warn(`Failed to cache: ${cacheError}`)\n }\n\n return { content, filePath: cacheFile }\n } catch (error) {\n return { error: `Error downloading from ${source}: ${error}` }\n }\n } else {\n try {\n console.log(`Loading from local path: ${source}`)\n const content = await readFile(source)\n return { content, filePath: source }\n } catch (error) {\n return { error: `Error loading from local path ${source}: ${error}` }\n }\n }\n }\n\n /**\n * Download and save a file to a specific target path\n */\n static async downloadToPath(source: string, targetPath: string): Promise<DownloadResult> {\n const isUrl = source.startsWith(\"http://\") || source.startsWith(\"https://\")\n\n await mkdir(path.dirname(targetPath), { recursive: true })\n\n if (isUrl) {\n try {\n console.log(`Downloading from URL: ${source}`)\n const response = await fetch(source)\n if (!response.ok) {\n return { error: `Failed to fetch from ${source}: ${response.statusText}` }\n }\n const content = Buffer.from(await response.arrayBuffer())\n\n await writeFile(targetPath, Buffer.from(content))\n console.log(`Downloaded: ${source} -> ${targetPath}`)\n\n return { content, filePath: targetPath }\n } catch (error) {\n return { error: `Error downloading from ${source}: ${error}` }\n }\n } else {\n try {\n console.log(`Copying from local path: ${source}`)\n const content = await readFile(source)\n await writeFile(targetPath, Buffer.from(content))\n return { content, filePath: targetPath }\n } catch (error) {\n return { error: `Error copying from local path ${source}: ${error}` }\n }\n }\n }\n\n /**\n * Fetch multiple highlight queries and concatenate them\n */\n static async fetchHighlightQueries(sources: string[], cacheDir: string, filetype: string): Promise<string> {\n const queryPromises = sources.map((source) => this.fetchHighlightQuery(source, cacheDir, filetype))\n const queryResults = await Promise.all(queryPromises)\n\n const validQueries = queryResults.filter((query) => query.trim().length > 0)\n return validQueries.join(\"\\n\")\n }\n\n private static async fetchHighlightQuery(source: string, cacheDir: string, filetype: string): Promise<string> {\n const result = await this.downloadOrLoad(source, cacheDir, \"queries\", \".scm\", true, filetype)\n\n if (result.error) {\n console.error(`Error fetching highlight query from ${source}:`, result.error)\n return \"\"\n }\n\n if (result.content) {\n return new TextDecoder().decode(result.content)\n }\n\n return \"\"\n }\n}\n",
|
|
7
7
|
"#!/usr/bin/env bun\n\nimport { runUpdateAssetsCli } from \"./assets/update.js\"\n\nexport { runUpdateAssetsCli, updateAssets } from \"./assets/update.js\"\nexport type { UpdateOptions } from \"./assets/update.js\"\n\nif (import.meta.main) {\n await runUpdateAssetsCli()\n}\n"
|
|
8
8
|
],
|
|
9
|
-
"mappings": ";;;;AAEA,qBAAS,wBAAU,qBAAW;AAC9B;;;ACHA;AACA;AAAA;AAQO,MAAM,cAAc;AAAA,SACV,OAAO,CAAC,KAAqB;AAAA,IAC1C,IAAI,OAAO;AAAA,IACX,SAAS,IAAI,EAAG,IAAI,IAAI,QAAQ,KAAK;AAAA,MACnC,MAAM,OAAO,IAAI,WAAW,CAAC;AAAA,MAC7B,QAAQ,QAAQ,KAAK,OAAO;AAAA,MAC5B,OAAO,OAAO;AAAA,IAChB;AAAA,IACA,OAAO,KAAK,IAAI,IAAI,EAAE,SAAS,EAAE;AAAA;AAAA,cAMtB,eAAc,CACzB,QACA,UACA,aACA,eACA,kBAA2B,MAC3B,UACyB;AAAA,IACzB,MAAM,QAAQ,OAAO,WAAW,SAAS,KAAK,OAAO,WAAW,UAAU;AAAA,IAE1E,IAAI,OAAO;AAAA,MACT,IAAI;AAAA,MACJ,IAAI,iBAAiB;AAAA,QACnB,MAAM,OAAO,KAAK,QAAQ,MAAM;AAAA,QAChC,gBAAgB,WAAW,GAAG,YAAY,OAAO,kBAAkB,GAAG,OAAO;AAAA,MAC/E,EAAO;AAAA,QACL,gBAAqB,cAAS,MAAM;AAAA;AAAA,MAEtC,MAAM,YAAiB,UAAK,UAAU,aAAa,aAAa;AAAA,MAGhE,MAAM,MAAW,aAAQ,SAAS,GAAG,EAAE,WAAW,KA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+
readonly arch: "arm64" | "x64";
|
|
4
|
+
readonly libc?: "glibc" | "musl";
|
|
5
|
+
};
|
|
6
|
+
export interface NativeAssetDescriptor {
|
|
7
|
+
readonly key: string;
|
|
8
|
+
readonly packageName: string;
|
|
9
|
+
readonly fileName: string;
|
|
10
|
+
}
|
|
11
|
+
export declare function getNativeAssetDescriptor(target: NodeAssetTarget): NativeAssetDescriptor;
|
|
12
|
+
export declare function getCurrentNodeAssetTarget(): NodeAssetTarget;
|
package/node-assets.d.ts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type NodeAssetTarget } from "./node-asset-target.js";
|
|
2
|
+
export type { NodeAssetTarget };
|
|
3
|
+
export type NodeAsset = {
|
|
4
|
+
readonly key: string;
|
|
5
|
+
readonly source: string;
|
|
6
|
+
};
|
|
7
|
+
export declare function getNodeAssets(target: NodeAssetTarget): readonly NodeAsset[];
|