feat: Self-hosted Artifacts Static Bundler URL (#6827)

* v0.7.791

* feat: configuration via `SANDPACK_STATIC_BUNDLER_URL` env var and update bundlerURL logic in Artifact components

* fix: update minimum length requirement for auth fields from 10 to 1 character
This commit is contained in:
Danny Avila 2025-04-10 15:37:23 -04:00 committed by GitHub
parent e16a6190a5
commit 12f4dbb8c5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 15 additions and 9 deletions

View file

@ -82,6 +82,7 @@ router.get('/', async function (req, res) {
analyticsGtmId: process.env.ANALYTICS_GTM_ID,
instanceProjectId: instanceProject._id.toString(),
bundlerURL: process.env.SANDPACK_BUNDLER_URL,
staticBundlerURL: process.env.SANDPACK_STATIC_BUNDLER_URL,
};
if (ldap) {

View file

@ -132,9 +132,9 @@ export const ArtifactCodeEditor = memo(function ({
}
return {
...sharedOptions,
bundlerURL: config.bundlerURL,
bundlerURL: template === 'static' ? config.staticBundlerURL : config.bundlerURL,
};
}, [config]);
}, [config, template]);
if (Object.keys(files).length === 0) {
return null;

View file

@ -46,11 +46,15 @@ export const ArtifactPreview = memo(function ({
if (!config) {
return sharedOptions;
}
return {
const _options: typeof sharedOptions = {
...sharedOptions,
bundlerURL: config.bundlerURL,
bundlerURL: template === 'static' ? config.staticBundlerURL : config.bundlerURL,
};
}, [config]);
return _options;
}, [config, template]);
console.log(options);
if (Object.keys(artifactFiles).length === 0) {
return null;

View file

@ -59,8 +59,8 @@ function PluginAuthForm({ plugin, onSubmit, isEntityTool }: TPluginAuthFormProps
{...register(authField, {
required: `${config.label} is required.`,
minLength: {
value: 10,
message: `${config.label} must be at least 10 characters long`,
value: 1,
message: `${config.label} must be at least 1 character long`,
},
})}
className="flex h-10 max-h-10 w-full resize-none rounded-md border border-gray-200 bg-transparent px-3 py-2 text-sm text-gray-700 shadow-[0_0_10px_rgba(0,0,0,0.05)] outline-none placeholder:text-gray-400 focus:border-gray-400 focus:bg-gray-50 focus:outline-none focus:ring-0 focus:ring-gray-400 focus:ring-opacity-0 focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 dark:border-gray-500 dark:bg-gray-700 dark:text-gray-50 dark:shadow-[0_0_15px_rgba(0,0,0,0.10)] dark:focus:border-gray-400 focus:dark:bg-gray-600 dark:focus:outline-none dark:focus:ring-0 dark:focus:ring-gray-400 dark:focus:ring-offset-0"

2
package-lock.json generated
View file

@ -43309,7 +43309,7 @@
},
"packages/data-provider": {
"name": "librechat-data-provider",
"version": "0.7.790",
"version": "0.7.791",
"license": "ISC",
"dependencies": {
"axios": "^1.8.2",

View file

@ -1,6 +1,6 @@
{
"name": "librechat-data-provider",
"version": "0.7.790",
"version": "0.7.791",
"description": "data services for librechat apps",
"main": "dist/index.js",
"module": "dist/index.es.js",

View file

@ -541,6 +541,7 @@ export type TStartupConfig = {
analyticsGtmId?: string;
instanceProjectId: string;
bundlerURL?: string;
staticBundlerURL?: string;
};
export enum OCRStrategy {