@promptbook/pdf 0.84.0-14 β 0.84.0-15
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/LICENSE.md +1 -0
- package/README.md +3 -3
- package/esm/index.es.js +7 -6
- package/esm/index.es.js.map +1 -1
- package/package.json +3 -15
- package/umd/index.umd.js +7 -6
- package/umd/index.umd.js.map +1 -1
package/package.json
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@promptbook/pdf",
|
|
3
|
-
"version": "0.84.0-
|
|
3
|
+
"version": "0.84.0-15",
|
|
4
4
|
"description": "It's time for a paradigm shift. The future of software in plain English, French or Latin",
|
|
5
|
-
"--note-0": " <- [π]",
|
|
6
5
|
"private": false,
|
|
7
6
|
"sideEffects": false,
|
|
8
7
|
"repository": {
|
|
@@ -12,7 +11,6 @@
|
|
|
12
11
|
"contributors": [
|
|
13
12
|
"Pavol HejnΓ½ <pavol@ptbk.io> (https://www.pavolhejny.com/)"
|
|
14
13
|
],
|
|
15
|
-
"--todo-0": "TODO: [βοΈ] Make better list of keywords",
|
|
16
14
|
"keywords": [
|
|
17
15
|
"ai",
|
|
18
16
|
"llm",
|
|
@@ -35,26 +33,16 @@
|
|
|
35
33
|
"anthropic",
|
|
36
34
|
"LLMOps"
|
|
37
35
|
],
|
|
38
|
-
"license": "
|
|
36
|
+
"license": "SEE LICENSE IN LICENSE.md",
|
|
39
37
|
"bugs": {
|
|
40
38
|
"url": "https://github.com/webgptorg/promptbook/issues"
|
|
41
39
|
},
|
|
42
40
|
"homepage": "https://www.npmjs.com/package/@promptbook/core",
|
|
43
|
-
"funding": [
|
|
44
|
-
{
|
|
45
|
-
"type": "individual",
|
|
46
|
-
"url": "https://buymeacoffee.com/hejny"
|
|
47
|
-
},
|
|
48
|
-
{
|
|
49
|
-
"type": "github",
|
|
50
|
-
"url": "https://github.com/webgptorg/promptbook/blob/main/README.md#%EF%B8%8F-contributing"
|
|
51
|
-
}
|
|
52
|
-
],
|
|
53
41
|
"main": "./umd/index.umd.js",
|
|
54
42
|
"module": "./esm/index.es.js",
|
|
55
43
|
"typings": "./esm/typings/src/_packages/pdf.index.d.ts",
|
|
56
44
|
"peerDependencies": {
|
|
57
|
-
"@promptbook/core": "0.84.0-
|
|
45
|
+
"@promptbook/core": "0.84.0-15"
|
|
58
46
|
},
|
|
59
47
|
"dependencies": {
|
|
60
48
|
"crypto-js": "4.2.0",
|
package/umd/index.umd.js
CHANGED
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
* @generated
|
|
26
26
|
* @see https://github.com/webgptorg/promptbook
|
|
27
27
|
*/
|
|
28
|
-
var PROMPTBOOK_ENGINE_VERSION = '0.84.0-
|
|
28
|
+
var PROMPTBOOK_ENGINE_VERSION = '0.84.0-14';
|
|
29
29
|
/**
|
|
30
30
|
* TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
|
|
31
31
|
* Note: [π] Ignore a discrepancy between file name and entity name
|
|
@@ -6358,10 +6358,10 @@
|
|
|
6358
6358
|
this.tools = tools;
|
|
6359
6359
|
this.options = options;
|
|
6360
6360
|
this.markdownScraper = new MarkdownScraper(tools, options);
|
|
6361
|
+
// Note: Module `markitdown-ts` has no types available, so it is imported using `require`
|
|
6361
6362
|
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
|
6362
6363
|
var MarkItDown = require('markitdown-ts').MarkItDown;
|
|
6363
|
-
// <- TODO:
|
|
6364
|
-
// <- Note: !!!!!!!
|
|
6364
|
+
// <- TODO: 'Use Markitdown directly not through this package
|
|
6365
6365
|
this.markitdown = new MarkItDown();
|
|
6366
6366
|
}
|
|
6367
6367
|
Object.defineProperty(MarkitdownScraper.prototype, "metadata", {
|
|
@@ -6406,12 +6406,12 @@
|
|
|
6406
6406
|
case 2:
|
|
6407
6407
|
if (!!(_f.sent())) return [3 /*break*/, 5];
|
|
6408
6408
|
src = source.filename || source.url || null;
|
|
6409
|
-
console.log('!!!', { src
|
|
6409
|
+
// console.log('!!!', { src, source, cacheFilehandler });
|
|
6410
6410
|
if (src === null) {
|
|
6411
6411
|
throw new UnexpectedError('Source has no filename or url');
|
|
6412
6412
|
}
|
|
6413
6413
|
return [4 /*yield*/, this.markitdown.convert(src, {
|
|
6414
|
-
// TODO:
|
|
6414
|
+
// TODO: Pass when sacraping Youtube
|
|
6415
6415
|
// enableYoutubeTranscript: true,
|
|
6416
6416
|
// youtubeTranscriptLanguage: 'en',
|
|
6417
6417
|
})];
|
|
@@ -6421,9 +6421,10 @@
|
|
|
6421
6421
|
throw new Error("Markitdown could not convert the \"".concat(source.source, "\""));
|
|
6422
6422
|
// <- TODO: !!! Make MarkitdownError
|
|
6423
6423
|
}
|
|
6424
|
-
console.log('!!!', { result
|
|
6424
|
+
// console.log('!!!', { result, cacheFilehandler });
|
|
6425
6425
|
return [4 /*yield*/, this.tools.fs.writeFile(cacheFilehandler.filename, result.text_content)];
|
|
6426
6426
|
case 4:
|
|
6427
|
+
// console.log('!!!', { result, cacheFilehandler });
|
|
6427
6428
|
_f.sent();
|
|
6428
6429
|
_f.label = 5;
|
|
6429
6430
|
case 5: return [2 /*return*/, cacheFilehandler];
|