aurochs 0.12.1 → 0.12.2
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/dist/cli.js
CHANGED
|
@@ -17208,210 +17208,6 @@ var require_jpeg_js = __commonJS((exports, module) => {
|
|
|
17208
17208
|
};
|
|
17209
17209
|
});
|
|
17210
17210
|
|
|
17211
|
-
// ../../../node_modules/@resvg/resvg-js-linux-x64-musl/resvgjs.linux-x64-musl.node
|
|
17212
|
-
var require_resvgjs_linux_x64_musl = __commonJS((exports, module) => {
|
|
17213
|
-
module.exports = __require("./resvgjs.linux-x64-musl-80m5e4kx.node");
|
|
17214
|
-
});
|
|
17215
|
-
|
|
17216
|
-
// ../../../node_modules/@resvg/resvg-js-linux-x64-gnu/resvgjs.linux-x64-gnu.node
|
|
17217
|
-
var require_resvgjs_linux_x64_gnu = __commonJS((exports, module) => {
|
|
17218
|
-
module.exports = __require("./resvgjs.linux-x64-gnu-7zy3zqas.node");
|
|
17219
|
-
});
|
|
17220
|
-
|
|
17221
|
-
// ../../../node_modules/@resvg/resvg-js/js-binding.js
|
|
17222
|
-
var require_js_binding = __commonJS((exports, module) => {
|
|
17223
|
-
var __dirname = "/home/runner/work/aurochs/aurochs/node_modules/@resvg/resvg-js";
|
|
17224
|
-
var { existsSync, readFileSync } = __require("fs");
|
|
17225
|
-
var { join: join4 } = __require("path");
|
|
17226
|
-
var { platform, arch } = process;
|
|
17227
|
-
var nativeBinding = null;
|
|
17228
|
-
var localFileExisted = false;
|
|
17229
|
-
var loadError = null;
|
|
17230
|
-
function isMusl() {
|
|
17231
|
-
if (!process.report || typeof process.report.getReport != "function")
|
|
17232
|
-
try {
|
|
17233
|
-
const e = __require("child_process").execSync("which ldd").toString().trim();
|
|
17234
|
-
return readFileSync(e, "utf8").includes("musl");
|
|
17235
|
-
} catch {
|
|
17236
|
-
return true;
|
|
17237
|
-
}
|
|
17238
|
-
else {
|
|
17239
|
-
const { glibcVersionRuntime: e } = process.report.getReport().header;
|
|
17240
|
-
return !e;
|
|
17241
|
-
}
|
|
17242
|
-
}
|
|
17243
|
-
switch (platform) {
|
|
17244
|
-
case "android":
|
|
17245
|
-
switch (arch) {
|
|
17246
|
-
case "arm64":
|
|
17247
|
-
localFileExisted = existsSync(join4(__dirname, "resvgjs.android-arm64.node"));
|
|
17248
|
-
try {
|
|
17249
|
-
localFileExisted ? nativeBinding = (()=>{throw new Error("Cannot require module "+"./resvgjs.android-arm64.node");})() : nativeBinding = (()=>{throw new Error("Cannot require module "+"@resvg/resvg-js-android-arm64");})();
|
|
17250
|
-
} catch (e) {
|
|
17251
|
-
loadError = e;
|
|
17252
|
-
}
|
|
17253
|
-
break;
|
|
17254
|
-
case "arm":
|
|
17255
|
-
localFileExisted = existsSync(join4(__dirname, "resvgjs.android-arm-eabi.node"));
|
|
17256
|
-
try {
|
|
17257
|
-
localFileExisted ? nativeBinding = (()=>{throw new Error("Cannot require module "+"./resvgjs.android-arm-eabi.node");})() : nativeBinding = (()=>{throw new Error("Cannot require module "+"@resvg/resvg-js-android-arm-eabi");})();
|
|
17258
|
-
} catch (e) {
|
|
17259
|
-
loadError = e;
|
|
17260
|
-
}
|
|
17261
|
-
break;
|
|
17262
|
-
default:
|
|
17263
|
-
throw new Error(`Unsupported architecture on Android ${arch}`);
|
|
17264
|
-
}
|
|
17265
|
-
break;
|
|
17266
|
-
case "win32":
|
|
17267
|
-
switch (arch) {
|
|
17268
|
-
case "x64":
|
|
17269
|
-
localFileExisted = existsSync(join4(__dirname, "resvgjs.win32-x64-msvc.node"));
|
|
17270
|
-
try {
|
|
17271
|
-
localFileExisted ? nativeBinding = (()=>{throw new Error("Cannot require module "+"./resvgjs.win32-x64-msvc.node");})() : nativeBinding = (()=>{throw new Error("Cannot require module "+"@resvg/resvg-js-win32-x64-msvc");})();
|
|
17272
|
-
} catch (e) {
|
|
17273
|
-
loadError = e;
|
|
17274
|
-
}
|
|
17275
|
-
break;
|
|
17276
|
-
case "ia32":
|
|
17277
|
-
localFileExisted = existsSync(join4(__dirname, "resvgjs.win32-ia32-msvc.node"));
|
|
17278
|
-
try {
|
|
17279
|
-
localFileExisted ? nativeBinding = (()=>{throw new Error("Cannot require module "+"./resvgjs.win32-ia32-msvc.node");})() : nativeBinding = (()=>{throw new Error("Cannot require module "+"@resvg/resvg-js-win32-ia32-msvc");})();
|
|
17280
|
-
} catch (e) {
|
|
17281
|
-
loadError = e;
|
|
17282
|
-
}
|
|
17283
|
-
break;
|
|
17284
|
-
case "arm64":
|
|
17285
|
-
localFileExisted = existsSync(join4(__dirname, "resvgjs.win32-arm64-msvc.node"));
|
|
17286
|
-
try {
|
|
17287
|
-
localFileExisted ? nativeBinding = (()=>{throw new Error("Cannot require module "+"./resvgjs.win32-arm64-msvc.node");})() : nativeBinding = (()=>{throw new Error("Cannot require module "+"@resvg/resvg-js-win32-arm64-msvc");})();
|
|
17288
|
-
} catch (e) {
|
|
17289
|
-
loadError = e;
|
|
17290
|
-
}
|
|
17291
|
-
break;
|
|
17292
|
-
default:
|
|
17293
|
-
throw new Error(`Unsupported architecture on Windows: ${arch}`);
|
|
17294
|
-
}
|
|
17295
|
-
break;
|
|
17296
|
-
case "darwin":
|
|
17297
|
-
localFileExisted = existsSync(join4(__dirname, "resvgjs.darwin-universal.node"));
|
|
17298
|
-
try {
|
|
17299
|
-
localFileExisted ? nativeBinding = (()=>{throw new Error("Cannot require module "+"./resvgjs.darwin-universal.node");})() : nativeBinding = (()=>{throw new Error("Cannot require module "+"@resvg/resvg-js-darwin-universal");})();
|
|
17300
|
-
break;
|
|
17301
|
-
} catch {}
|
|
17302
|
-
switch (arch) {
|
|
17303
|
-
case "x64":
|
|
17304
|
-
localFileExisted = existsSync(join4(__dirname, "resvgjs.darwin-x64.node"));
|
|
17305
|
-
try {
|
|
17306
|
-
localFileExisted ? nativeBinding = (()=>{throw new Error("Cannot require module "+"./resvgjs.darwin-x64.node");})() : nativeBinding = (()=>{throw new Error("Cannot require module "+"@resvg/resvg-js-darwin-x64");})();
|
|
17307
|
-
} catch (e) {
|
|
17308
|
-
loadError = e;
|
|
17309
|
-
}
|
|
17310
|
-
break;
|
|
17311
|
-
case "arm64":
|
|
17312
|
-
localFileExisted = existsSync(join4(__dirname, "resvgjs.darwin-arm64.node"));
|
|
17313
|
-
try {
|
|
17314
|
-
localFileExisted ? nativeBinding = (()=>{throw new Error("Cannot require module "+"./resvgjs.darwin-arm64.node");})() : nativeBinding = (()=>{throw new Error("Cannot require module "+"@resvg/resvg-js-darwin-arm64");})();
|
|
17315
|
-
} catch (e) {
|
|
17316
|
-
loadError = e;
|
|
17317
|
-
}
|
|
17318
|
-
break;
|
|
17319
|
-
default:
|
|
17320
|
-
throw new Error(`Unsupported architecture on macOS: ${arch}`);
|
|
17321
|
-
}
|
|
17322
|
-
break;
|
|
17323
|
-
case "freebsd":
|
|
17324
|
-
if (arch !== "x64")
|
|
17325
|
-
throw new Error(`Unsupported architecture on FreeBSD: ${arch}`);
|
|
17326
|
-
localFileExisted = existsSync(join4(__dirname, "resvgjs.freebsd-x64.node"));
|
|
17327
|
-
try {
|
|
17328
|
-
localFileExisted ? nativeBinding = (()=>{throw new Error("Cannot require module "+"./resvgjs.freebsd-x64.node");})() : nativeBinding = (()=>{throw new Error("Cannot require module "+"@resvg/resvg-js-freebsd-x64");})();
|
|
17329
|
-
} catch (e) {
|
|
17330
|
-
loadError = e;
|
|
17331
|
-
}
|
|
17332
|
-
break;
|
|
17333
|
-
case "linux":
|
|
17334
|
-
switch (arch) {
|
|
17335
|
-
case "x64":
|
|
17336
|
-
if (isMusl()) {
|
|
17337
|
-
localFileExisted = existsSync(join4(__dirname, "resvgjs.linux-x64-musl.node"));
|
|
17338
|
-
try {
|
|
17339
|
-
localFileExisted ? nativeBinding = (()=>{throw new Error("Cannot require module "+"./resvgjs.linux-x64-musl.node");})() : nativeBinding = require_resvgjs_linux_x64_musl();
|
|
17340
|
-
} catch (e) {
|
|
17341
|
-
loadError = e;
|
|
17342
|
-
}
|
|
17343
|
-
} else {
|
|
17344
|
-
localFileExisted = existsSync(join4(__dirname, "resvgjs.linux-x64-gnu.node"));
|
|
17345
|
-
try {
|
|
17346
|
-
localFileExisted ? nativeBinding = (()=>{throw new Error("Cannot require module "+"./resvgjs.linux-x64-gnu.node");})() : nativeBinding = require_resvgjs_linux_x64_gnu();
|
|
17347
|
-
} catch (e) {
|
|
17348
|
-
loadError = e;
|
|
17349
|
-
}
|
|
17350
|
-
}
|
|
17351
|
-
break;
|
|
17352
|
-
case "arm64":
|
|
17353
|
-
if (isMusl()) {
|
|
17354
|
-
localFileExisted = existsSync(join4(__dirname, "resvgjs.linux-arm64-musl.node"));
|
|
17355
|
-
try {
|
|
17356
|
-
localFileExisted ? nativeBinding = (()=>{throw new Error("Cannot require module "+"./resvgjs.linux-arm64-musl.node");})() : nativeBinding = (()=>{throw new Error("Cannot require module "+"@resvg/resvg-js-linux-arm64-musl");})();
|
|
17357
|
-
} catch (e) {
|
|
17358
|
-
loadError = e;
|
|
17359
|
-
}
|
|
17360
|
-
} else {
|
|
17361
|
-
localFileExisted = existsSync(join4(__dirname, "resvgjs.linux-arm64-gnu.node"));
|
|
17362
|
-
try {
|
|
17363
|
-
localFileExisted ? nativeBinding = (()=>{throw new Error("Cannot require module "+"./resvgjs.linux-arm64-gnu.node");})() : nativeBinding = (()=>{throw new Error("Cannot require module "+"@resvg/resvg-js-linux-arm64-gnu");})();
|
|
17364
|
-
} catch (e) {
|
|
17365
|
-
loadError = e;
|
|
17366
|
-
}
|
|
17367
|
-
}
|
|
17368
|
-
break;
|
|
17369
|
-
case "arm":
|
|
17370
|
-
localFileExisted = existsSync(join4(__dirname, "resvgjs.linux-arm-gnueabihf.node"));
|
|
17371
|
-
try {
|
|
17372
|
-
localFileExisted ? nativeBinding = (()=>{throw new Error("Cannot require module "+"./resvgjs.linux-arm-gnueabihf.node");})() : nativeBinding = (()=>{throw new Error("Cannot require module "+"@resvg/resvg-js-linux-arm-gnueabihf");})();
|
|
17373
|
-
} catch (e) {
|
|
17374
|
-
loadError = e;
|
|
17375
|
-
}
|
|
17376
|
-
break;
|
|
17377
|
-
case "riscv64":
|
|
17378
|
-
if (isMusl()) {
|
|
17379
|
-
localFileExisted = existsSync(join4(__dirname, "resvgjs.linux-riscv64-musl.node"));
|
|
17380
|
-
try {
|
|
17381
|
-
localFileExisted ? nativeBinding = (()=>{throw new Error("Cannot require module "+"./resvgjs.linux-riscv64-musl.node");})() : nativeBinding = (()=>{throw new Error("Cannot require module "+"@resvg/resvg-js-linux-riscv64-musl");})();
|
|
17382
|
-
} catch (e) {
|
|
17383
|
-
loadError = e;
|
|
17384
|
-
}
|
|
17385
|
-
} else {
|
|
17386
|
-
localFileExisted = existsSync(join4(__dirname, "resvgjs.linux-riscv64-gnu.node"));
|
|
17387
|
-
try {
|
|
17388
|
-
localFileExisted ? nativeBinding = (()=>{throw new Error("Cannot require module "+"./resvgjs.linux-riscv64-gnu.node");})() : nativeBinding = (()=>{throw new Error("Cannot require module "+"@resvg/resvg-js-linux-riscv64-gnu");})();
|
|
17389
|
-
} catch (e) {
|
|
17390
|
-
loadError = e;
|
|
17391
|
-
}
|
|
17392
|
-
}
|
|
17393
|
-
break;
|
|
17394
|
-
case "s390x":
|
|
17395
|
-
localFileExisted = existsSync(join4(__dirname, "resvgjs.linux-s390x-gnu.node"));
|
|
17396
|
-
try {
|
|
17397
|
-
localFileExisted ? nativeBinding = (()=>{throw new Error("Cannot require module "+"./resvgjs.linux-s390x-gnu.node");})() : nativeBinding = (()=>{throw new Error("Cannot require module "+"@resvg/resvg-js-linux-s390x-gnu");})();
|
|
17398
|
-
} catch (e) {
|
|
17399
|
-
loadError = e;
|
|
17400
|
-
}
|
|
17401
|
-
break;
|
|
17402
|
-
default:
|
|
17403
|
-
throw new Error(`Unsupported architecture on Linux: ${arch}`);
|
|
17404
|
-
}
|
|
17405
|
-
break;
|
|
17406
|
-
default:
|
|
17407
|
-
throw new Error(`Unsupported OS: ${platform}, architecture: ${arch}`);
|
|
17408
|
-
}
|
|
17409
|
-
if (!nativeBinding)
|
|
17410
|
-
throw loadError || new Error("Failed to load native binding");
|
|
17411
|
-
var { BBox, Resvg, RenderedImage, renderAsync } = nativeBinding;
|
|
17412
|
-
exports.BBox = BBox, exports.Resvg = Resvg, exports.RenderedImage = RenderedImage, exports.renderAsync = renderAsync;
|
|
17413
|
-
});
|
|
17414
|
-
|
|
17415
17211
|
// ../../../node_modules/commander/esm.mjs
|
|
17416
17212
|
var import__ = __toESM(require_commander(), 1);
|
|
17417
17213
|
var {
|
|
@@ -100512,34 +100308,6 @@ function isSymbolFont(baseFont) {
|
|
|
100512
100308
|
const family = dashIndex > 0 ? name.slice(0, dashIndex) : name;
|
|
100513
100309
|
return SYMBOL_FONT_FAMILIES.has(family.toLowerCase());
|
|
100514
100310
|
}
|
|
100515
|
-
// ../../@aurochs/pdf/src/domain/font/font-name-map.ts
|
|
100516
|
-
var PDF_STANDARD_14_FONTS = {
|
|
100517
|
-
Helvetica: "Arial",
|
|
100518
|
-
"Helvetica-Bold": "Arial",
|
|
100519
|
-
"Helvetica-Oblique": "Arial",
|
|
100520
|
-
"Helvetica-BoldOblique": "Arial",
|
|
100521
|
-
"Times-Roman": "Times New Roman",
|
|
100522
|
-
"Times-Bold": "Times New Roman",
|
|
100523
|
-
"Times-Italic": "Times New Roman",
|
|
100524
|
-
"Times-BoldItalic": "Times New Roman",
|
|
100525
|
-
Courier: "Courier New",
|
|
100526
|
-
"Courier-Bold": "Courier New",
|
|
100527
|
-
"Courier-Oblique": "Courier New",
|
|
100528
|
-
"Courier-BoldOblique": "Courier New",
|
|
100529
|
-
Symbol: "Symbol",
|
|
100530
|
-
ZapfDingbats: "Wingdings"
|
|
100531
|
-
};
|
|
100532
|
-
function normalizeFontFamily(pdfFontName) {
|
|
100533
|
-
const cleanName = pdfFontName.startsWith("/") ? pdfFontName.slice(1) : pdfFontName;
|
|
100534
|
-
const plusIndex = cleanName.indexOf("+");
|
|
100535
|
-
const baseName = plusIndex > 0 ? cleanName.slice(plusIndex + 1) : cleanName;
|
|
100536
|
-
const standard14 = PDF_STANDARD_14_FONTS[baseName];
|
|
100537
|
-
if (standard14) {
|
|
100538
|
-
return standard14;
|
|
100539
|
-
}
|
|
100540
|
-
return baseName;
|
|
100541
|
-
}
|
|
100542
|
-
|
|
100543
100311
|
// ../../@aurochs/pdf/src/domain/font/unicode-classification.ts
|
|
100544
100312
|
function isPrivateUseCodePoint(codePoint) {
|
|
100545
100313
|
return codePoint >= 57344 && codePoint <= 63743 || codePoint >= 983040 && codePoint <= 1048573 || codePoint >= 1048576 && codePoint <= 1114109;
|
|
@@ -103596,6 +103364,34 @@ function uint8ArrayToBase64(data) {
|
|
|
103596
103364
|
return btoa(binary);
|
|
103597
103365
|
}
|
|
103598
103366
|
|
|
103367
|
+
// ../../@aurochs/pdf/src/domain/font/font-name-map.ts
|
|
103368
|
+
var PDF_STANDARD_14_FONTS = {
|
|
103369
|
+
Helvetica: "Arial",
|
|
103370
|
+
"Helvetica-Bold": "Arial",
|
|
103371
|
+
"Helvetica-Oblique": "Arial",
|
|
103372
|
+
"Helvetica-BoldOblique": "Arial",
|
|
103373
|
+
"Times-Roman": "Times New Roman",
|
|
103374
|
+
"Times-Bold": "Times New Roman",
|
|
103375
|
+
"Times-Italic": "Times New Roman",
|
|
103376
|
+
"Times-BoldItalic": "Times New Roman",
|
|
103377
|
+
Courier: "Courier New",
|
|
103378
|
+
"Courier-Bold": "Courier New",
|
|
103379
|
+
"Courier-Oblique": "Courier New",
|
|
103380
|
+
"Courier-BoldOblique": "Courier New",
|
|
103381
|
+
Symbol: "Symbol",
|
|
103382
|
+
ZapfDingbats: "Wingdings"
|
|
103383
|
+
};
|
|
103384
|
+
function normalizeFontFamily(pdfFontName) {
|
|
103385
|
+
const cleanName = pdfFontName.startsWith("/") ? pdfFontName.slice(1) : pdfFontName;
|
|
103386
|
+
const plusIndex = cleanName.indexOf("+");
|
|
103387
|
+
const baseName = plusIndex > 0 ? cleanName.slice(plusIndex + 1) : cleanName;
|
|
103388
|
+
const standard14 = PDF_STANDARD_14_FONTS[baseName];
|
|
103389
|
+
if (standard14) {
|
|
103390
|
+
return standard14;
|
|
103391
|
+
}
|
|
103392
|
+
return baseName;
|
|
103393
|
+
}
|
|
103394
|
+
|
|
103599
103395
|
// ../../@aurochs/pdf/src/domain/font/font-provider.ts
|
|
103600
103396
|
var PDF_STANDARD_14_NAMES = [
|
|
103601
103397
|
"Helvetica",
|
|
@@ -138234,15 +138030,8 @@ function renderPdfPageMermaid(page) {
|
|
|
138234
138030
|
|
|
138235
138031
|
`);
|
|
138236
138032
|
}
|
|
138237
|
-
// ../../../node_modules/@resvg/resvg-js/index.js
|
|
138238
|
-
var { render: _render, renderAsync: _renderAsync, Resvg: _Resvg } = require_js_binding();
|
|
138239
|
-
var $Resvg = class Resvg extends _Resvg {
|
|
138240
|
-
constructor(svg4, options) {
|
|
138241
|
-
super(svg4, JSON.stringify(options));
|
|
138242
|
-
}
|
|
138243
|
-
};
|
|
138244
|
-
|
|
138245
138033
|
// ../../@aurochs-cli/cli/src/convert.ts
|
|
138034
|
+
import { Resvg } from "@resvg/resvg-js";
|
|
138246
138035
|
var EXTENSION_MAP = {
|
|
138247
138036
|
".pptx": { format: "pptx", legacy: false },
|
|
138248
138037
|
".ppt": { format: "pptx", legacy: true },
|
|
@@ -138533,7 +138322,7 @@ async function convertDocxToText(filePath) {
|
|
|
138533
138322
|
}));
|
|
138534
138323
|
}
|
|
138535
138324
|
function svgToPngBuffer(svg4) {
|
|
138536
|
-
const resvg = new
|
|
138325
|
+
const resvg = new Resvg(svg4, {
|
|
138537
138326
|
font: { loadSystemFonts: true }
|
|
138538
138327
|
});
|
|
138539
138328
|
const pngData = resvg.render();
|
|
@@ -138646,7 +138435,7 @@ function getSupportedOutputExtensions() {
|
|
|
138646
138435
|
// ../../@aurochs-cli/cli/package.json
|
|
138647
138436
|
var package_default = {
|
|
138648
138437
|
name: "@aurochs-cli/cli",
|
|
138649
|
-
version: "0.12.
|
|
138438
|
+
version: "0.12.2",
|
|
138650
138439
|
type: "module",
|
|
138651
138440
|
bin: {
|
|
138652
138441
|
aurochs: "./dist/cli.js"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "aurochs",
|
|
3
|
-
"version": "0.12.
|
|
3
|
+
"version": "0.12.2",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -183,6 +183,10 @@
|
|
|
183
183
|
"scripts": {
|
|
184
184
|
"prepublishOnly": "echo 'Run build from @aurochs-build/aurochs first'"
|
|
185
185
|
},
|
|
186
|
+
"dependencies": {
|
|
187
|
+
"@resvg/resvg-js": "^2.6.2",
|
|
188
|
+
"zstd-codec": "^0.1.5"
|
|
189
|
+
},
|
|
186
190
|
"peerDependencies": {
|
|
187
191
|
"react": "^18.0.0 || ^19.0.0",
|
|
188
192
|
"react-dom": "^18.0.0 || ^19.0.0"
|
|
Binary file
|
|
Binary file
|