@elizaos/plugin-pdf 2.0.0-alpha.14 → 2.0.0-alpha.16
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/browser/index.browser.js +56 -56
- package/dist/browser/index.browser.js.map +4 -4
- package/dist/build.d.ts.map +1 -1
- package/dist/cjs/index.node.cjs +13 -23
- package/dist/cjs/index.node.js.map +4 -4
- package/dist/node/index.node.js +5 -9
- package/dist/node/index.node.js.map +4 -4
- package/package.json +16 -15
package/dist/build.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build.d.ts","sourceRoot":"","sources":["../build.ts"],"names":[],"mappings":";AAEA,QAAA,MAAM,YAAY,
|
|
1
|
+
{"version":3,"file":"build.d.ts","sourceRoot":"","sources":["../build.ts"],"names":[],"mappings":";AAEA,QAAA,MAAM,YAAY,UAAkC,CAAC;AAErD,iBAAe,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CA+FpC"}
|
package/dist/cjs/index.node.cjs
CHANGED
|
@@ -2,42 +2,32 @@ var __defProp = Object.defineProperty;
|
|
|
2
2
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
3
3
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
4
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
-
|
|
6
|
-
return this[key];
|
|
7
|
-
}
|
|
5
|
+
var __moduleCache = /* @__PURE__ */ new WeakMap;
|
|
8
6
|
var __toCommonJS = (from) => {
|
|
9
|
-
var entry =
|
|
7
|
+
var entry = __moduleCache.get(from), desc;
|
|
10
8
|
if (entry)
|
|
11
9
|
return entry;
|
|
12
10
|
entry = __defProp({}, "__esModule", { value: true });
|
|
13
|
-
if (from && typeof from === "object" || typeof from === "function")
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
19
|
-
});
|
|
20
|
-
}
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function")
|
|
12
|
+
__getOwnPropNames(from).map((key) => !__hasOwnProp.call(entry, key) && __defProp(entry, key, {
|
|
13
|
+
get: () => from[key],
|
|
14
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
15
|
+
}));
|
|
21
16
|
__moduleCache.set(from, entry);
|
|
22
17
|
return entry;
|
|
23
18
|
};
|
|
24
|
-
var __moduleCache;
|
|
25
|
-
var __returnValue = (v) => v;
|
|
26
|
-
function __exportSetter(name, newValue) {
|
|
27
|
-
this[name] = __returnValue.bind(null, newValue);
|
|
28
|
-
}
|
|
29
19
|
var __export = (target, all) => {
|
|
30
20
|
for (var name in all)
|
|
31
21
|
__defProp(target, name, {
|
|
32
22
|
get: all[name],
|
|
33
23
|
enumerable: true,
|
|
34
24
|
configurable: true,
|
|
35
|
-
set:
|
|
25
|
+
set: (newValue) => all[name] = () => newValue
|
|
36
26
|
});
|
|
37
27
|
};
|
|
38
28
|
var __esm = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
|
|
39
29
|
|
|
40
|
-
//
|
|
30
|
+
// node_modules/unpdf/dist/pdfjs.mjs
|
|
41
31
|
var exports_pdfjs = {};
|
|
42
32
|
__export(exports_pdfjs, {
|
|
43
33
|
version: () => lh,
|
|
@@ -34121,7 +34111,7 @@ var init_pdfjs = __esm(() => {
|
|
|
34121
34111
|
};
|
|
34122
34112
|
NodeCanvasFactory = class NodeCanvasFactory extends BaseCanvasFactory {
|
|
34123
34113
|
_createCanvas(e2, t2) {
|
|
34124
|
-
process.getBuiltinModule("module").createRequire("file:///
|
|
34114
|
+
process.getBuiltinModule("module").createRequire("file:///Users/shawwalters/eliza-workspace/plugins/plugin-pdf/typescript/node_modules/unpdf/dist/pdfjs.mjs");
|
|
34125
34115
|
return new Proxy({}, { get: (e3, t3) => () => {
|
|
34126
34116
|
throw new Error("@napi-rs/canvas is not available in this environment");
|
|
34127
34117
|
} }).createCanvas(e2, t2);
|
|
@@ -38321,7 +38311,7 @@ module.exports = __toCommonJS(exports_index_node);
|
|
|
38321
38311
|
// services/pdf.ts
|
|
38322
38312
|
var import_core = require("@elizaos/core");
|
|
38323
38313
|
|
|
38324
|
-
//
|
|
38314
|
+
// node_modules/unpdf/dist/index.mjs
|
|
38325
38315
|
var resolvedModule;
|
|
38326
38316
|
var isNode = globalThis.process?.release?.name === "node";
|
|
38327
38317
|
async function getDocumentProxy(data, options = {}) {
|
|
@@ -38410,7 +38400,7 @@ class PdfService extends import_core.Service {
|
|
|
38410
38400
|
return service;
|
|
38411
38401
|
}
|
|
38412
38402
|
static async stop(runtime) {
|
|
38413
|
-
const service = runtime.getService(import_core.ServiceType.PDF);
|
|
38403
|
+
const service = await runtime.getService(import_core.ServiceType.PDF);
|
|
38414
38404
|
if (service) {
|
|
38415
38405
|
await service.stop();
|
|
38416
38406
|
}
|
|
@@ -38529,4 +38519,4 @@ var pdfPlugin = {
|
|
|
38529
38519
|
};
|
|
38530
38520
|
var typescript_default = pdfPlugin;
|
|
38531
38521
|
|
|
38532
|
-
//# debugId=
|
|
38522
|
+
//# debugId=1C03348174ACE51564756E2164756E21
|