@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.
@@ -1 +1 @@
1
- {"version":3,"file":"build.d.ts","sourceRoot":"","sources":["../build.ts"],"names":[],"mappings":";AAEA,QAAA,MAAM,YAAY,UAAoB,CAAC;AAEvC,iBAAe,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CA+FpC"}
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"}
@@ -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
- function __accessProp(key) {
6
- return this[key];
7
- }
5
+ var __moduleCache = /* @__PURE__ */ new WeakMap;
8
6
  var __toCommonJS = (from) => {
9
- var entry = (__moduleCache ??= new WeakMap).get(from), desc;
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
- for (var key of __getOwnPropNames(from))
15
- if (!__hasOwnProp.call(entry, key))
16
- __defProp(entry, key, {
17
- get: __accessProp.bind(from, key),
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: __exportSetter.bind(all, name)
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
- // ../node_modules/.bun/unpdf@1.4.0+b49fa9fdb04b5b62/node_modules/unpdf/dist/pdfjs.mjs
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:///private/tmp/plugin-fixes/plugin-pdf/node_modules/.bun/unpdf@1.4.0+b49fa9fdb04b5b62/node_modules/unpdf/dist/pdfjs.mjs");
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
- // ../node_modules/.bun/unpdf@1.4.0+b49fa9fdb04b5b62/node_modules/unpdf/dist/index.mjs
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=FAC0AF14E72EDB4664756E2164756E21
38522
+ //# debugId=1C03348174ACE51564756E2164756E21