@elizaos/plugin-pdf 2.0.0-alpha.16 → 2.0.0-alpha.17
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/cjs/index.node.cjs
CHANGED
|
@@ -1,33 +1,67 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
1
3
|
var __defProp = Object.defineProperty;
|
|
2
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
3
5
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
6
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
-
|
|
7
|
+
function __accessProp(key) {
|
|
8
|
+
return this[key];
|
|
9
|
+
}
|
|
10
|
+
var __toESMCache_node;
|
|
11
|
+
var __toESMCache_esm;
|
|
12
|
+
var __toESM = (mod, isNodeMode, target) => {
|
|
13
|
+
var canCache = mod != null && typeof mod === "object";
|
|
14
|
+
if (canCache) {
|
|
15
|
+
var cache = isNodeMode ? __toESMCache_node ??= new WeakMap : __toESMCache_esm ??= new WeakMap;
|
|
16
|
+
var cached = cache.get(mod);
|
|
17
|
+
if (cached)
|
|
18
|
+
return cached;
|
|
19
|
+
}
|
|
20
|
+
target = mod != null ? __create(__getProtoOf(mod)) : {};
|
|
21
|
+
const to = isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target;
|
|
22
|
+
for (let key of __getOwnPropNames(mod))
|
|
23
|
+
if (!__hasOwnProp.call(to, key))
|
|
24
|
+
__defProp(to, key, {
|
|
25
|
+
get: __accessProp.bind(mod, key),
|
|
26
|
+
enumerable: true
|
|
27
|
+
});
|
|
28
|
+
if (canCache)
|
|
29
|
+
cache.set(mod, to);
|
|
30
|
+
return to;
|
|
31
|
+
};
|
|
6
32
|
var __toCommonJS = (from) => {
|
|
7
|
-
var entry = __moduleCache.get(from), desc;
|
|
33
|
+
var entry = (__moduleCache ??= new WeakMap).get(from), desc;
|
|
8
34
|
if (entry)
|
|
9
35
|
return entry;
|
|
10
36
|
entry = __defProp({}, "__esModule", { value: true });
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function")
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
37
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
38
|
+
for (var key of __getOwnPropNames(from))
|
|
39
|
+
if (!__hasOwnProp.call(entry, key))
|
|
40
|
+
__defProp(entry, key, {
|
|
41
|
+
get: __accessProp.bind(from, key),
|
|
42
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
43
|
+
});
|
|
44
|
+
}
|
|
16
45
|
__moduleCache.set(from, entry);
|
|
17
46
|
return entry;
|
|
18
47
|
};
|
|
48
|
+
var __moduleCache;
|
|
49
|
+
var __returnValue = (v) => v;
|
|
50
|
+
function __exportSetter(name, newValue) {
|
|
51
|
+
this[name] = __returnValue.bind(null, newValue);
|
|
52
|
+
}
|
|
19
53
|
var __export = (target, all) => {
|
|
20
54
|
for (var name in all)
|
|
21
55
|
__defProp(target, name, {
|
|
22
56
|
get: all[name],
|
|
23
57
|
enumerable: true,
|
|
24
58
|
configurable: true,
|
|
25
|
-
set: (
|
|
59
|
+
set: __exportSetter.bind(all, name)
|
|
26
60
|
});
|
|
27
61
|
};
|
|
28
62
|
var __esm = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
|
|
29
63
|
|
|
30
|
-
// node_modules/unpdf/dist/pdfjs.mjs
|
|
64
|
+
// ../../../node_modules/unpdf/dist/pdfjs.mjs
|
|
31
65
|
var exports_pdfjs = {};
|
|
32
66
|
__export(exports_pdfjs, {
|
|
33
67
|
version: () => lh,
|
|
@@ -34111,7 +34145,7 @@ var init_pdfjs = __esm(() => {
|
|
|
34111
34145
|
};
|
|
34112
34146
|
NodeCanvasFactory = class NodeCanvasFactory extends BaseCanvasFactory {
|
|
34113
34147
|
_createCanvas(e2, t2) {
|
|
34114
|
-
process.getBuiltinModule("module").createRequire("file:///Users/shawwalters/eliza-workspace/
|
|
34148
|
+
process.getBuiltinModule("module").createRequire("file:///Users/shawwalters/eliza-workspace/milady/node_modules/unpdf/dist/pdfjs.mjs");
|
|
34115
34149
|
return new Proxy({}, { get: (e3, t3) => () => {
|
|
34116
34150
|
throw new Error("@napi-rs/canvas is not available in this environment");
|
|
34117
34151
|
} }).createCanvas(e2, t2);
|
|
@@ -38303,7 +38337,7 @@ var init_pdfjs = __esm(() => {
|
|
|
38303
38337
|
var exports_index_node = {};
|
|
38304
38338
|
__export(exports_index_node, {
|
|
38305
38339
|
pdfPlugin: () => pdfPlugin,
|
|
38306
|
-
default: () =>
|
|
38340
|
+
default: () => import__.default,
|
|
38307
38341
|
PdfService: () => PdfService
|
|
38308
38342
|
});
|
|
38309
38343
|
module.exports = __toCommonJS(exports_index_node);
|
|
@@ -38311,7 +38345,7 @@ module.exports = __toCommonJS(exports_index_node);
|
|
|
38311
38345
|
// services/pdf.ts
|
|
38312
38346
|
var import_core = require("@elizaos/core");
|
|
38313
38347
|
|
|
38314
|
-
// node_modules/unpdf/dist/index.mjs
|
|
38348
|
+
// ../../../node_modules/unpdf/dist/index.mjs
|
|
38315
38349
|
var resolvedModule;
|
|
38316
38350
|
var isNode = globalThis.process?.release?.name === "node";
|
|
38317
38351
|
async function getDocumentProxy(data, options = {}) {
|
|
@@ -38400,7 +38434,7 @@ class PdfService extends import_core.Service {
|
|
|
38400
38434
|
return service;
|
|
38401
38435
|
}
|
|
38402
38436
|
static async stop(runtime) {
|
|
38403
|
-
const service =
|
|
38437
|
+
const service = runtime.getService(import_core.ServiceType.PDF);
|
|
38404
38438
|
if (service) {
|
|
38405
38439
|
await service.stop();
|
|
38406
38440
|
}
|
|
@@ -38517,6 +38551,5 @@ var pdfPlugin = {
|
|
|
38517
38551
|
services: [PdfService],
|
|
38518
38552
|
actions: []
|
|
38519
38553
|
};
|
|
38520
|
-
var typescript_default = pdfPlugin;
|
|
38521
38554
|
|
|
38522
|
-
//# debugId=
|
|
38555
|
+
//# debugId=7CEB4D588D0ED62664756E2164756E21
|