Skip to content

Commit

Permalink
small requested changes
Browse files Browse the repository at this point in the history
  • Loading branch information
catosaurusrex2003 committed Sep 24, 2024
1 parent f1993b4 commit 2570d65
Show file tree
Hide file tree
Showing 5 changed files with 98 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .sonarcloud.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Disable specific file since it would introduce more complexity to reduce it - mainly code complexity and complex template literals
sonar.exclusions=apps/studio/public/js/monaco/**,apps/studio/src/tailwind.css,apps/studio/src/components/SplitPane/**,apps/studio/cypress/**,apps/studio/Dockerfile
# Disable duplicate code in tests since it would introduce more complexity to reduce it.
sonar.cpd.exclusions=apps/studio/**,apps/studio/src/components/Navigationv3.tsx,apps/studio/src/components/Navigation.tsx,apps/studio/cypress/**,apps/studio/src/helpers/driver.ts
sonar.cpd.exclusions=apps/studio/**
2 changes: 2 additions & 0 deletions apps/studio/.eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
build
.turbo
48 changes: 42 additions & 6 deletions apps/studio/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,61 @@
# studio
# @asyncapi/studio

## 0.1.4
## 0.21.4

### Patch Changes

- 877810d: fix: temporarily hard-lock `@asyncapi/converter` on `v1.5.0` as a hotfix (#1138)

## 0.1.3
## 0.21.3

### Patch Changes

- 943fec1: fix: report correct `range` values in error diagnostics for YAML files

## 0.1.2
## 0.21.2

### Patch Changes

- c3248c8: fix: fix the validation error for payload of type `date` (https://github.com/asyncapi/parser-js/issues/980)

## 0.1.1
## 0.21.1

### Patch Changes

- a4b7fd1: Use Next.js framework
- 481b28c: fix: Incorrect rendering of security schemas: by reference and inline, #1066

## 0.21.0

### Minor Changes

- 26dc05f: Fix side bar color and update @asyncapi/html-template.

## 0.20.2

### Patch Changes

- 5c7b4c1: scrollTo navigation to right code block in yaml.

## 0.20.1

### Patch Changes

- 6995cdf: bump dependencies

## 0.20.0

### Minor Changes

- 5129432: start publishing studio.

## 0.19.1

### Patch Changes

- 9187c17: fix studio breaking when trying to generate code/document

## 0.19.0

### Minor Changes

- 94215e6: Support spec V3.0.0 in studio
52 changes: 52 additions & 0 deletions apps/studio/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# Use a UUID as placeholder value to have a unique string to replace.
ARG BASE_URL_PLACEHOLDER=189b303e-37a0-4f6f-8c0a-50333bc3c36e


FROM node:18-alpine AS base

FROM base AS builder
RUN apk add --no-cache libc6-compat
RUN apk update
# Set working directory
WORKDIR /app
RUN npm install --global turbo
COPY . .
RUN turbo prune --scope=@asyncapi/studio --docker

# Add lockfile and package.json's of isolated subworkspace
FROM base AS installer

ARG BASE_URL_PLACEHOLDER

RUN apk add --no-cache libc6-compat
RUN apk update
WORKDIR /app

# First install the dependencies (as they change less often)

COPY .gitignore .gitignore
COPY --from=builder /app/out/json/ .
COPY --from=builder /app/out/package-lock.json ./package-lock.json
RUN PUPPETEER_SKIP_DOWNLOAD=true npm ci

# Build the project
COPY --from=builder /app/out/full/ .
RUN PUBLIC_URL=${BASE_URL_PLACEHOLDER} npm run build:studio


FROM docker.io/library/nginx:1.25.5-alpine as runtime

ARG BASE_URL_PLACEHOLDER
# The base Nginx image automatically executes all shell scripts
# within the /docker-entrypoint.d/ directory ("entrypoint scripts")
# when the container is started. See the relevant logic at
# https://github.com/nginxinc/docker-nginx/blob/master/entrypoint/docker-entrypoint.sh#L16.
ARG ENTRYPOINT_SCRIPT=/docker-entrypoint.d/set-public-url.sh

COPY --from=installer /app/apps/studio/build /usr/share/nginx/html/
# Add an entrypoint script that replaces all occurrences of the
# placeholder value by the configured base URL. If no base URL
# is configured we assume the application is running at '/'.
RUN echo "find /usr/share/nginx/html/ -type f -print0 | xargs -0 sed -i \"s|${BASE_URL_PLACEHOLDER}|\${BASE_URL}|g\"" > $ENTRYPOINT_SCRIPT && chmod +x $ENTRYPOINT_SCRIPT

FROM runtime
2 changes: 1 addition & 1 deletion apps/studio/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@asyncapi/studio",
"version": "0.1.4",
"version": "0.21.4",
"description": "One place that allows you to develop an AsyncAPI document, validate it, convert it to the latest version, preview the documentation and visualize the events flow.",
"license": "Apache-2.0",
"bugs": {
Expand Down

0 comments on commit 2570d65

Please sign in to comment.