librechat-data-provider 0.8.402 → 0.8.404
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/index.es.js +1 -1
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/react-query/index.es.js +1 -1
- package/dist/react-query/index.es.js.map +1 -1
- package/dist/types/accessPermissions.d.ts +744 -0
- package/dist/types/actions.d.ts +118 -0
- package/dist/types/api-endpoints.d.ts +150 -0
- package/dist/types/artifacts.d.ts +97 -0
- package/dist/types/azure.d.ts +22 -0
- package/dist/types/bedrock.d.ts +1220 -0
- package/dist/types/config.d.ts +14849 -0
- package/dist/types/config.spec.d.ts +1 -0
- package/dist/types/createPayload.d.ts +5 -0
- package/dist/types/data-service.d.ts +287 -0
- package/dist/types/feedback.d.ts +36 -0
- package/dist/types/file-config.d.ts +263 -0
- package/dist/types/file-config.spec.d.ts +1 -0
- package/dist/types/generate.d.ts +597 -0
- package/dist/types/headers-helpers.d.ts +2 -0
- package/{src/index.ts → dist/types/index.d.ts} +0 -15
- package/dist/types/keys.d.ts +92 -0
- package/dist/types/mcp.d.ts +2760 -0
- package/dist/types/messages.d.ts +10 -0
- package/dist/types/models.d.ts +1547 -0
- package/dist/types/parameterSettings.d.ts +69 -0
- package/dist/types/parsers.d.ts +110 -0
- package/dist/types/permissions.d.ts +522 -0
- package/dist/types/react-query/react-query-service.d.ts +85 -0
- package/dist/types/request.d.ts +25 -0
- package/dist/types/roles.d.ts +554 -0
- package/dist/types/roles.spec.d.ts +1 -0
- package/dist/types/schemas.d.ts +5110 -0
- package/dist/types/schemas.spec.d.ts +1 -0
- package/dist/types/types/agents.d.ts +433 -0
- package/dist/types/types/assistants.d.ts +547 -0
- package/dist/types/types/files.d.ts +172 -0
- package/dist/types/types/graph.d.ts +135 -0
- package/{src/types/mcpServers.ts → dist/types/types/mcpServers.d.ts} +12 -18
- package/dist/types/types/mutations.d.ts +209 -0
- package/dist/types/types/queries.d.ts +169 -0
- package/dist/types/types/runs.d.ts +36 -0
- package/dist/types/types/web.d.ts +520 -0
- package/dist/types/types.d.ts +503 -0
- package/dist/types/utils.d.ts +12 -0
- package/package.json +5 -1
- package/babel.config.js +0 -4
- package/check_updates.sh +0 -52
- package/jest.config.js +0 -19
- package/react-query/package-lock.json +0 -292
- package/react-query/package.json +0 -10
- package/rollup.config.js +0 -74
- package/server-rollup.config.js +0 -40
- package/specs/actions.spec.ts +0 -2533
- package/specs/api-endpoints-subdir.spec.ts +0 -140
- package/specs/api-endpoints.spec.ts +0 -74
- package/specs/azure.spec.ts +0 -844
- package/specs/bedrock.spec.ts +0 -862
- package/specs/filetypes.spec.ts +0 -175
- package/specs/generate.spec.ts +0 -770
- package/specs/headers-helpers.spec.ts +0 -24
- package/specs/mcp.spec.ts +0 -147
- package/specs/openapiSpecs.ts +0 -524
- package/specs/parsers.spec.ts +0 -601
- package/specs/request-interceptor.spec.ts +0 -304
- package/specs/utils.spec.ts +0 -196
- package/src/accessPermissions.ts +0 -346
- package/src/actions.ts +0 -813
- package/src/api-endpoints.ts +0 -440
- package/src/artifacts.ts +0 -3104
- package/src/azure.ts +0 -328
- package/src/bedrock.ts +0 -425
- package/src/config.spec.ts +0 -315
- package/src/config.ts +0 -2006
- package/src/createPayload.ts +0 -46
- package/src/data-service.ts +0 -1087
- package/src/feedback.ts +0 -141
- package/src/file-config.spec.ts +0 -1248
- package/src/file-config.ts +0 -764
- package/src/generate.ts +0 -634
- package/src/headers-helpers.ts +0 -13
- package/src/keys.ts +0 -99
- package/src/mcp.ts +0 -271
- package/src/messages.ts +0 -50
- package/src/models.ts +0 -69
- package/src/parameterSettings.ts +0 -1111
- package/src/parsers.ts +0 -563
- package/src/permissions.ts +0 -188
- package/src/react-query/react-query-service.ts +0 -566
- package/src/request.ts +0 -171
- package/src/roles.spec.ts +0 -132
- package/src/roles.ts +0 -225
- package/src/schemas.spec.ts +0 -355
- package/src/schemas.ts +0 -1234
- package/src/types/agents.ts +0 -470
- package/src/types/assistants.ts +0 -654
- package/src/types/files.ts +0 -191
- package/src/types/graph.ts +0 -145
- package/src/types/mutations.ts +0 -422
- package/src/types/queries.ts +0 -208
- package/src/types/runs.ts +0 -40
- package/src/types/web.ts +0 -588
- package/src/types.ts +0 -676
- package/src/utils.ts +0 -85
- package/tsconfig.json +0 -28
- package/tsconfig.spec.json +0 -10
- /package/{src/react-query/index.ts → dist/types/react-query/index.d.ts} +0 -0
- /package/{src/types/index.ts → dist/types/types/index.d.ts} +0 -0
package/src/utils.ts
DELETED
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
export const envVarRegex = /^\${(.+)}$/;
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Infrastructure env vars that must never be resolved via placeholder expansion.
|
|
5
|
-
* These are internal secrets whose exposure would compromise the system —
|
|
6
|
-
* they have no legitimate reason to appear in outbound headers, MCP env/args, or OAuth config.
|
|
7
|
-
*
|
|
8
|
-
* Intentionally excludes API keys (operators reference them in config) and
|
|
9
|
-
* OAuth/session secrets (referenced in MCP OAuth config via processMCPEnv).
|
|
10
|
-
*/
|
|
11
|
-
const SENSITIVE_ENV_VARS = new Set([
|
|
12
|
-
'JWT_SECRET',
|
|
13
|
-
'JWT_REFRESH_SECRET',
|
|
14
|
-
'CREDS_KEY',
|
|
15
|
-
'CREDS_IV',
|
|
16
|
-
'MEILI_MASTER_KEY',
|
|
17
|
-
'MONGO_URI',
|
|
18
|
-
'REDIS_URI',
|
|
19
|
-
'REDIS_PASSWORD',
|
|
20
|
-
]);
|
|
21
|
-
|
|
22
|
-
/** Returns true when `varName` refers to an infrastructure secret that must not leak. */
|
|
23
|
-
export function isSensitiveEnvVar(varName: string): boolean {
|
|
24
|
-
return SENSITIVE_ENV_VARS.has(varName);
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
/** Extracts the environment variable name from a template literal string */
|
|
28
|
-
export function extractVariableName(value: string): string | null {
|
|
29
|
-
if (!value) {
|
|
30
|
-
return null;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
const match = value.trim().match(envVarRegex);
|
|
34
|
-
return match ? match[1] : null;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
/** Extracts the value of an environment variable from a string. */
|
|
38
|
-
export function extractEnvVariable(value: string) {
|
|
39
|
-
if (!value) {
|
|
40
|
-
return value;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
const trimmed = value.trim();
|
|
44
|
-
|
|
45
|
-
const singleMatch = trimmed.match(envVarRegex);
|
|
46
|
-
if (singleMatch) {
|
|
47
|
-
const varName = singleMatch[1];
|
|
48
|
-
if (isSensitiveEnvVar(varName)) {
|
|
49
|
-
return trimmed;
|
|
50
|
-
}
|
|
51
|
-
return process.env[varName] || trimmed;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
const regex = /\${([^}]+)}/g;
|
|
55
|
-
let result = trimmed;
|
|
56
|
-
|
|
57
|
-
const matches = [];
|
|
58
|
-
let match;
|
|
59
|
-
while ((match = regex.exec(trimmed)) !== null) {
|
|
60
|
-
matches.push({
|
|
61
|
-
fullMatch: match[0],
|
|
62
|
-
varName: match[1],
|
|
63
|
-
index: match.index,
|
|
64
|
-
});
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
for (let i = matches.length - 1; i >= 0; i--) {
|
|
68
|
-
const { fullMatch, varName, index } = matches[i];
|
|
69
|
-
if (isSensitiveEnvVar(varName)) {
|
|
70
|
-
continue;
|
|
71
|
-
}
|
|
72
|
-
const envValue = process.env[varName] || fullMatch;
|
|
73
|
-
result = result.substring(0, index) + envValue + result.substring(index + fullMatch.length);
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
return result;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
/**
|
|
80
|
-
* Normalize the endpoint name to system-expected value.
|
|
81
|
-
* @param name
|
|
82
|
-
*/
|
|
83
|
-
export function normalizeEndpointName(name = ''): string {
|
|
84
|
-
return name.toLowerCase() === 'ollama' ? 'ollama' : name;
|
|
85
|
-
}
|
package/tsconfig.json
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"declaration": true,
|
|
4
|
-
"declarationDir": "./dist/types",
|
|
5
|
-
"module": "esnext",
|
|
6
|
-
"noImplicitAny": true,
|
|
7
|
-
"outDir": "./types",
|
|
8
|
-
"target": "es5",
|
|
9
|
-
"moduleResolution": "node",
|
|
10
|
-
"allowSyntheticDefaultImports": true,
|
|
11
|
-
"lib": ["es2017", "dom", "ES2021.String"],
|
|
12
|
-
"allowJs": true,
|
|
13
|
-
"skipLibCheck": true,
|
|
14
|
-
"esModuleInterop": true,
|
|
15
|
-
"strict": true,
|
|
16
|
-
"forceConsistentCasingInFileNames": true,
|
|
17
|
-
"resolveJsonModule": true,
|
|
18
|
-
"isolatedModules": true,
|
|
19
|
-
"noEmit": true,
|
|
20
|
-
"sourceMap": true,
|
|
21
|
-
"baseUrl": ".",
|
|
22
|
-
"paths": {
|
|
23
|
-
"librechat-data-provider/react-query": ["./src/react-query/index.ts"]
|
|
24
|
-
}
|
|
25
|
-
},
|
|
26
|
-
"exclude": ["node_modules", "dist", "types"],
|
|
27
|
-
"include": ["src/**/*", "types/index.d.ts", "types/react-query/index.d.ts"]
|
|
28
|
-
}
|
package/tsconfig.spec.json
DELETED
|
File without changes
|
|
File without changes
|