@juspay/neurolink 9.55.8 → 9.55.9
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/CHANGELOG.md +2 -0
- package/dist/browser/neurolink.min.js +284 -284
- package/dist/lib/utils/fileDetector.js +17 -6
- package/dist/utils/fileDetector.js +17 -6
- package/package.json +1 -1
|
@@ -5,9 +5,20 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import { readFile, stat } from "fs/promises";
|
|
7
7
|
import { getGlobalDispatcher, interceptors, request } from "undici";
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
// Lazy-loaded processor singletons — avoids loading heavy media deps
|
|
9
|
+
// (mediabunny, fluent-ffmpeg, music-metadata, adm-zip) on every generate() call.
|
|
10
|
+
async function getVideoProcessor() {
|
|
11
|
+
const mod = await import("../processors/media/VideoProcessor.js");
|
|
12
|
+
return mod.videoProcessor;
|
|
13
|
+
}
|
|
14
|
+
async function getAudioProcessor() {
|
|
15
|
+
const mod = await import("../processors/media/AudioProcessor.js");
|
|
16
|
+
return mod.audioProcessor;
|
|
17
|
+
}
|
|
18
|
+
async function getArchiveProcessor() {
|
|
19
|
+
const mod = await import("../processors/archive/ArchiveProcessor.js");
|
|
20
|
+
return mod.archiveProcessor;
|
|
21
|
+
}
|
|
11
22
|
import { tracers, ATTR, withSpan } from "../telemetry/index.js";
|
|
12
23
|
import { CSVProcessor } from "./csvProcessor.js";
|
|
13
24
|
import { ImageProcessor } from "./imageProcessor.js";
|
|
@@ -877,7 +888,7 @@ export class FileDetector {
|
|
|
877
888
|
static async processVideoFile(content, detection) {
|
|
878
889
|
const videoFilename = detection.metadata.filename || "video";
|
|
879
890
|
try {
|
|
880
|
-
const videoResult = await
|
|
891
|
+
const videoResult = await (await getVideoProcessor()).processFile({
|
|
881
892
|
id: videoFilename,
|
|
882
893
|
name: videoFilename,
|
|
883
894
|
mimetype: detection.mimeType || "video/mp4",
|
|
@@ -924,7 +935,7 @@ export class FileDetector {
|
|
|
924
935
|
static async processAudioFile(content, detection) {
|
|
925
936
|
const audioFilename = detection.metadata.filename || "audio";
|
|
926
937
|
try {
|
|
927
|
-
const audioResult = await
|
|
938
|
+
const audioResult = await (await getAudioProcessor()).processFile({
|
|
928
939
|
id: audioFilename,
|
|
929
940
|
name: audioFilename,
|
|
930
941
|
mimetype: detection.mimeType || "audio/mpeg",
|
|
@@ -968,7 +979,7 @@ export class FileDetector {
|
|
|
968
979
|
static async processArchiveFile(content, detection) {
|
|
969
980
|
const archiveFilename = detection.metadata.filename || "archive";
|
|
970
981
|
try {
|
|
971
|
-
const archiveResult = await
|
|
982
|
+
const archiveResult = await (await getArchiveProcessor()).processFile({
|
|
972
983
|
id: archiveFilename,
|
|
973
984
|
name: archiveFilename,
|
|
974
985
|
mimetype: detection.mimeType || "application/zip",
|
|
@@ -5,9 +5,20 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import { readFile, stat } from "fs/promises";
|
|
7
7
|
import { getGlobalDispatcher, interceptors, request } from "undici";
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
// Lazy-loaded processor singletons — avoids loading heavy media deps
|
|
9
|
+
// (mediabunny, fluent-ffmpeg, music-metadata, adm-zip) on every generate() call.
|
|
10
|
+
async function getVideoProcessor() {
|
|
11
|
+
const mod = await import("../processors/media/VideoProcessor.js");
|
|
12
|
+
return mod.videoProcessor;
|
|
13
|
+
}
|
|
14
|
+
async function getAudioProcessor() {
|
|
15
|
+
const mod = await import("../processors/media/AudioProcessor.js");
|
|
16
|
+
return mod.audioProcessor;
|
|
17
|
+
}
|
|
18
|
+
async function getArchiveProcessor() {
|
|
19
|
+
const mod = await import("../processors/archive/ArchiveProcessor.js");
|
|
20
|
+
return mod.archiveProcessor;
|
|
21
|
+
}
|
|
11
22
|
import { tracers, ATTR, withSpan } from "../telemetry/index.js";
|
|
12
23
|
import { CSVProcessor } from "./csvProcessor.js";
|
|
13
24
|
import { ImageProcessor } from "./imageProcessor.js";
|
|
@@ -877,7 +888,7 @@ export class FileDetector {
|
|
|
877
888
|
static async processVideoFile(content, detection) {
|
|
878
889
|
const videoFilename = detection.metadata.filename || "video";
|
|
879
890
|
try {
|
|
880
|
-
const videoResult = await
|
|
891
|
+
const videoResult = await (await getVideoProcessor()).processFile({
|
|
881
892
|
id: videoFilename,
|
|
882
893
|
name: videoFilename,
|
|
883
894
|
mimetype: detection.mimeType || "video/mp4",
|
|
@@ -924,7 +935,7 @@ export class FileDetector {
|
|
|
924
935
|
static async processAudioFile(content, detection) {
|
|
925
936
|
const audioFilename = detection.metadata.filename || "audio";
|
|
926
937
|
try {
|
|
927
|
-
const audioResult = await
|
|
938
|
+
const audioResult = await (await getAudioProcessor()).processFile({
|
|
928
939
|
id: audioFilename,
|
|
929
940
|
name: audioFilename,
|
|
930
941
|
mimetype: detection.mimeType || "audio/mpeg",
|
|
@@ -968,7 +979,7 @@ export class FileDetector {
|
|
|
968
979
|
static async processArchiveFile(content, detection) {
|
|
969
980
|
const archiveFilename = detection.metadata.filename || "archive";
|
|
970
981
|
try {
|
|
971
|
-
const archiveResult = await
|
|
982
|
+
const archiveResult = await (await getArchiveProcessor()).processFile({
|
|
972
983
|
id: archiveFilename,
|
|
973
984
|
name: archiveFilename,
|
|
974
985
|
mimetype: detection.mimeType || "application/zip",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@juspay/neurolink",
|
|
3
|
-
"version": "9.55.
|
|
3
|
+
"version": "9.55.9",
|
|
4
4
|
"packageManager": "pnpm@10.15.1",
|
|
5
5
|
"description": "Universal AI Development Platform with working MCP integration, multi-provider support, and professional CLI. Built-in tools operational, 58+ external MCP servers discoverable. Connect to filesystem, GitHub, database operations, and more. Build, test, and deploy AI applications with 13 providers: OpenAI, Anthropic, Google AI, AWS Bedrock, Azure, Hugging Face, Ollama, and Mistral AI.",
|
|
6
6
|
"author": {
|