Skip to content

Commit

Permalink
Merge branch 'main' into ory-cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
deepakprabhakara authored Dec 17, 2024
2 parents 5e7aaf7 + 4bb014b commit 1fd9143
Show file tree
Hide file tree
Showing 34 changed files with 4,957 additions and 2,390 deletions.
7 changes: 6 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ jobs:
BOXYHQ_LICENSE_KEY: 'dummy-license'
strategy:
matrix:
node-version: [20]
node-version: [22]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

services:
Expand Down Expand Up @@ -136,6 +136,11 @@ jobs:
scope: '@boxyhq'
cache: 'npm'
check-latest: true
- name: Run docker-compose up
id: docker_compose
uses: isbang/[email protected]
with:
compose-file: './_dev/docker-compose-cockroachdb.yml'
- run: node -v
- run: npm -v
- name: Setup Next.js cache
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -56,3 +56,4 @@ _dev/docker/libsql/iku.db
/playwright-report/
/playwright/.cache/
.idea
_dev/cockroach-data
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG NODEJS_IMAGE=node:20.17-alpine3.19
ARG NODEJS_IMAGE=node:22.12-alpine3.21
FROM --platform=$BUILDPLATFORM $NODEJS_IMAGE AS base

# Install dependencies only when needed
Expand Down Expand Up @@ -54,6 +54,7 @@ COPY --from=builder /app/public ./public
# https://nextjs.org/docs/advanced-features/output-file-tracing
COPY --from=builder --chown=nextjs:nodejs /app/.next/standalone ./
COPY --from=builder --chown=nextjs:nodejs /app/.next/static ./.next/static

# Support for DB migration
COPY --from=builder --chown=nextjs:nodejs /app/migrate.sh ./migrate.sh
COPY npm npm
Expand Down
8 changes: 8 additions & 0 deletions _dev/docker-compose-cockroachdb.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
services:
cockroachdb:
image: cockroachdb/cockroach:v24.3.0
platform: linux/amd64
ports:
- '26257:26257'
- '8081:8080'
command: start-single-node --insecure
8 changes: 8 additions & 0 deletions _dev/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ services:
MARIADB_ALLOW_EMPTY_ROOT_PASSWORD: 'yes'
mssql:
image: mcr.microsoft.com/azure-sql-edge:2.0.0
platform: linux/amd64
ports:
- 1433:1433
restart: always
Expand All @@ -61,3 +62,10 @@ services:
command: '/bin/sqld --enable-http-console'
volumes:
- ./docker/libsql:/var/lib/sqld
cockroachdb:
image: cockroachdb/cockroach:v24.3.0
platform: linux/amd64
ports:
- '26257:26257'
- '8081:8080'
command: start-single-node --insecure
11 changes: 8 additions & 3 deletions components/terminus/Blockly/BlocklyComponent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ import { ButtonBase, ButtonPrimary, ConfirmationModal } from '@boxyhq/internal-u
function BlocklyComponent(props) {
const { t } = useTranslation('common');

const blocklyDiv = useRef();
const toolbox = useRef();
const primaryWorkspace = useRef();
const blocklyDiv = useRef(null);
const toolbox = useRef(null);
const primaryWorkspace = useRef(null);
const productField = createRef();

const getEndpoint = () => {
Expand Down Expand Up @@ -63,6 +63,11 @@ function BlocklyComponent(props) {
const retrieveModel = async () => {
const rsp = await fetch(getEndpoint());
const response = await rsp.json();
if (!response.ok) {
errorToast(t('model_retrieve_failed'));
return;
}

(primaryWorkspace.current! as any).clear();
const textToDom = Blockly.utils.xml.textToDom(response.data);
Blockly.Xml.domToWorkspace(textToDom, primaryWorkspace.current! as any);
Expand Down
Loading

0 comments on commit 1fd9143

Please sign in to comment.