Merge branch 'main' into feat/openid-custom-data

This commit is contained in:
Ruben Talstra
2025-04-11 15:14:01 +02:00
committed by GitHub
7 changed files with 30 additions and 9 deletions

View File

@@ -3,7 +3,15 @@
# Base node image
FROM node:20-alpine AS node
RUN apk --no-cache add curl
# Install jemalloc
RUN apk add --no-cache jemalloc
# Set environment variable to use jemalloc
ENV LD_PRELOAD=/usr/lib/libjemalloc.so.2
# Add `uv` for extended MCP support
COPY --from=ghcr.io/astral-sh/uv:0.6.13 /uv /uvx /bin/
RUN uv --version
RUN mkdir -p /app && chown node:node /app
WORKDIR /app
@@ -38,4 +46,4 @@ CMD ["npm", "run", "backend"]
# WORKDIR /usr/share/nginx/html
# COPY --from=node /app/client/dist /usr/share/nginx/html
# COPY client/nginx.conf /etc/nginx/conf.d/default.conf
# ENTRYPOINT ["nginx", "-g", "daemon off;"]
# ENTRYPOINT ["nginx", "-g", "daemon off;"]

View File

@@ -3,6 +3,10 @@
# Base for all builds
FROM node:20-alpine AS base-min
# Install jemalloc
RUN apk add --no-cache jemalloc
# Set environment variable to use jemalloc
ENV LD_PRELOAD=/usr/lib/libjemalloc.so.2
WORKDIR /app
RUN apk --no-cache add curl
RUN npm config set fetch-retry-maxtimeout 600000 && \
@@ -50,6 +54,9 @@ RUN npm run build
# API setup (including client dist)
FROM base-min AS api-build
# Add `uv` for extended MCP support
COPY --from=ghcr.io/astral-sh/uv:0.6.13 /uv /uvx /bin/
RUN uv --version
WORKDIR /app
# Install only production deps
RUN npm ci --omit=dev

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"

View File

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