utilitas 1995.2.19 → 1995.2.21
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/README.md +2 -1
- package/dist/utilitas.lite.mjs +1 -1
- package/dist/utilitas.lite.mjs.map +1 -1
- package/lib/dbio.mjs +1 -1
- package/lib/manifest.mjs +3 -2
- package/lib/web.mjs +11 -1
- package/package.json +3 -2
package/lib/dbio.mjs
CHANGED
package/lib/manifest.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
const manifest = {
|
|
2
2
|
"name": "utilitas",
|
|
3
3
|
"description": "Just another common utility for JavaScript.",
|
|
4
|
-
"version": "1995.2.
|
|
4
|
+
"version": "1995.2.21",
|
|
5
5
|
"private": false,
|
|
6
6
|
"homepage": "https://github.com/Leask/utilitas",
|
|
7
7
|
"main": "index.mjs",
|
|
@@ -24,7 +24,6 @@ const manifest = {
|
|
|
24
24
|
"uuid": "^9.0.1"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
|
-
"xlsx": "https://cdn.sheetjs.com/xlsx-0.20.1/xlsx-0.20.1.tgz",
|
|
28
27
|
"@ffmpeg-installer/ffmpeg": "^1.1.0",
|
|
29
28
|
"@ffprobe-installer/ffprobe": "^2.1.2",
|
|
30
29
|
"@google-cloud/speech": "^6.1.0",
|
|
@@ -32,6 +31,7 @@ const manifest = {
|
|
|
32
31
|
"@google-cloud/text-to-speech": "^5.0.1",
|
|
33
32
|
"@google-cloud/vision": "^4.0.2",
|
|
34
33
|
"@mozilla/readability": "^0.4.4",
|
|
34
|
+
"@ngrok/ngrok": "^0.9.1",
|
|
35
35
|
"@sentry/node": "^7.86.0",
|
|
36
36
|
"@waylaidwanderer/chatgpt-api": "^1.37.3",
|
|
37
37
|
"acme-client": "^5.0.0",
|
|
@@ -62,6 +62,7 @@ const manifest = {
|
|
|
62
62
|
"url": "github:Leask/node-url",
|
|
63
63
|
"webpack-cli": "^5.1.4",
|
|
64
64
|
"whisper-node": "^1.1.1",
|
|
65
|
+
"xlsx": "https://cdn.sheetjs.com/xlsx-0.20.1/xlsx-0.20.1.tgz",
|
|
65
66
|
"youtube-transcript": "^1.0.6"
|
|
66
67
|
}
|
|
67
68
|
};
|
package/lib/web.mjs
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import { assembleUrl, ignoreErrFunc, need, throwError } from './utilitas.mjs';
|
|
2
2
|
import { getJson, getParsedHtml } from './shot.mjs';
|
|
3
3
|
|
|
4
|
-
const _NEED = [
|
|
4
|
+
const _NEED = [
|
|
5
|
+
'jsdom', 'youtube-transcript', '@mozilla/readability', '@ngrok/ngrok'
|
|
6
|
+
];
|
|
7
|
+
|
|
5
8
|
// https://stackoverflow.com/questions/19377262/regex-for-youtube-url
|
|
6
9
|
const YT_REGEXP = /^((?:https?:)?\/\/)?((?:www|m)\.)?((?:youtube(-nocookie)?\.com|youtu.be))(\/(?:[\w\-]+\?v=|embed\/|v\/)?)([\w\-]+)(\S+)?$/i;
|
|
7
10
|
const isYoutubeUrl = url => (url || '').match(YT_REGEXP)?.[6];
|
|
@@ -99,6 +102,12 @@ const distill = async url => {
|
|
|
99
102
|
};
|
|
100
103
|
};
|
|
101
104
|
|
|
105
|
+
const forward = async (options) => {
|
|
106
|
+
const { forward } = await need('@ngrok/ngrok');
|
|
107
|
+
// https://ngrok.github.io/ngrok-javascript/
|
|
108
|
+
return await forward(options);
|
|
109
|
+
};
|
|
110
|
+
|
|
102
111
|
export {
|
|
103
112
|
_NEED,
|
|
104
113
|
assertYoutubeUrl,
|
|
@@ -106,6 +115,7 @@ export {
|
|
|
106
115
|
distillHtml,
|
|
107
116
|
distillPage,
|
|
108
117
|
distillYoutube,
|
|
118
|
+
forward,
|
|
109
119
|
getYoutubeMetadata,
|
|
110
120
|
getYoutubeTranscript,
|
|
111
121
|
isYoutubeUrl,
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "utilitas",
|
|
3
3
|
"description": "Just another common utility for JavaScript.",
|
|
4
|
-
"version": "1995.2.
|
|
4
|
+
"version": "1995.2.21",
|
|
5
5
|
"private": false,
|
|
6
6
|
"homepage": "https://github.com/Leask/utilitas",
|
|
7
7
|
"main": "index.mjs",
|
|
@@ -35,7 +35,6 @@
|
|
|
35
35
|
"uuid": "^9.0.1"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
|
-
"xlsx": "https://cdn.sheetjs.com/xlsx-0.20.1/xlsx-0.20.1.tgz",
|
|
39
38
|
"@ffmpeg-installer/ffmpeg": "^1.1.0",
|
|
40
39
|
"@ffprobe-installer/ffprobe": "^2.1.2",
|
|
41
40
|
"@google-cloud/speech": "^6.1.0",
|
|
@@ -43,6 +42,7 @@
|
|
|
43
42
|
"@google-cloud/text-to-speech": "^5.0.1",
|
|
44
43
|
"@google-cloud/vision": "^4.0.2",
|
|
45
44
|
"@mozilla/readability": "^0.4.4",
|
|
45
|
+
"@ngrok/ngrok": "^0.9.1",
|
|
46
46
|
"@sentry/node": "^7.86.0",
|
|
47
47
|
"@waylaidwanderer/chatgpt-api": "^1.37.3",
|
|
48
48
|
"acme-client": "^5.0.0",
|
|
@@ -73,6 +73,7 @@
|
|
|
73
73
|
"url": "github:Leask/node-url",
|
|
74
74
|
"webpack-cli": "^5.1.4",
|
|
75
75
|
"whisper-node": "^1.1.1",
|
|
76
|
+
"xlsx": "https://cdn.sheetjs.com/xlsx-0.20.1/xlsx-0.20.1.tgz",
|
|
76
77
|
"youtube-transcript": "^1.0.6"
|
|
77
78
|
}
|
|
78
79
|
}
|