Skip to content

Commit

Permalink
v0.20.4 (#673)
Browse files Browse the repository at this point in the history
  • Loading branch information
chavda-bhavik authored Jul 10, 2024
2 parents c0e2e16 + 1e784cf commit 0efdee9
Show file tree
Hide file tree
Showing 24 changed files with 15,456 additions and 33,244 deletions.
41 changes: 33 additions & 8 deletions .github/workflows/build-web.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,22 +39,47 @@ jobs:
with:
version: 8.9.0
run_install: true

- name: Build, tag, and push image to Github container registry
id: build-image

- name: Log in to GitHub Container Registry
env:
GH_ACTOR: implerhq
GH_PASSWORD: ${{ secrets.GH_PACKAGES }}
run: echo $GH_PASSWORD | docker login ghcr.io -u $GH_ACTOR --password-stdin

- name: Build & Tag Docker image
env:
REGISTERY_OWNER: implerhq
DOCKER_NAME: impler/web
IMAGE_TAG: ${{ github.event.pull_request.head.sha || github.sha }}
GH_ACTOR: implerhq
GH_PASSWORD: ${{ secrets.GH_PACKAGES }}
run: |
echo $GH_PASSWORD | docker login ghcr.io -u $GH_ACTOR --password-stdin
docker build -t ghcr.io/$REGISTERY_OWNER/$DOCKER_NAME:$IMAGE_TAG -f apps/web/Dockerfile .
# docker tag ghcr.io/$REGISTERY_OWNER/$DOCKER_NAME:$IMAGE_TAG ghcr.io/$REGISTERY_OWNER/$DOCKER_NAME:prod
docker tag ghcr.io/$REGISTERY_OWNER/$DOCKER_NAME:$IMAGE_TAG ghcr.io/$REGISTERY_OWNER/$DOCKER_NAME:latest
# docker push ghcr.io/$REGISTERY_OWNER/$DOCKER_NAME:prod
- name: Run Docker container
env:
REGISTERY_OWNER: implerhq
DOCKER_NAME: impler/web
IMAGE_TAG: ${{ github.event.pull_request.head.sha || github.sha }}
run: docker run --network=host -dit ghcr.io/$REGISTERY_OWNER/$DOCKER_NAME:$IMAGE_TAG

- name: Check application health
run: |
for i in {1..5}; do
if curl --output /dev/null --silent --head --fail http://localhost:4200; then
exit 0
fi
echo "Waiting for the application to start..."
sleep 5
done
echo "Application failed to start"
exit 1
- name: Push Docker image
env:
REGISTERY_OWNER: implerhq
DOCKER_NAME: impler/web
IMAGE_TAG: ${{ github.event.pull_request.head.sha || github.sha }}
run: |
docker push ghcr.io/$REGISTERY_OWNER/$DOCKER_NAME:latest
docker push ghcr.io/$REGISTERY_OWNER/$DOCKER_NAME:$IMAGE_TAG
echo "::set-output name=IMAGE::ghcr.io/$REGISTERY_OWNER/$DOCKER_NAME:$IMAGE_TAG"
7 changes: 4 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
name: Build

on:
push:
branches:
- next
workflow_dispatch
# push:
# branches:
# - next

jobs:
build:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deploy-prod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -91,4 +91,4 @@ jobs:
- name: Run Docker Compose Up
run: |
ssh -o StrictHostKeyChecking=no ${{ secrets.SSH_USERNAME_QA }}@${{ secrets.SSH_HOST_QA }} \
"cd ${{ secrets.SSH_PATH_QA }} && docker compose up --pull always -d"
"cd ${{ secrets.SSH_PATH_QA }} && sudo docker compose up --pull always -d && sudo docker image prune -a -f"
2 changes: 1 addition & 1 deletion .github/workflows/deploy-quality.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -71,4 +71,4 @@ jobs:
- name: Run Docker Compose Up
run: |
ssh -o StrictHostKeyChecking=no ${{ secrets.SSH_USERNAME_QA }}@${{ secrets.SSH_HOST_QA }} \
"cd ${{ secrets.SSH_PATH_QA }} && sudo docker compose up --pull always -d"
"cd ${{ secrets.SSH_PATH_QA }} && sudo docker compose up --pull always -d && sudo docker image prune -a -f"
6 changes: 3 additions & 3 deletions apps/api/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@impler/api",
"version": "0.20.3",
"version": "0.20.4",
"author": "implerhq",
"license": "MIT",
"private": true,
Expand All @@ -21,8 +21,8 @@
"dependencies": {
"@aws-sdk/client-s3": "^3.185.0",
"@aws-sdk/client-ses": "^3.354.0",
"@impler/dal": "^0.20.3",
"@impler/shared": "^0.20.3",
"@impler/dal": "^0.20.4",
"@impler/shared": "^0.20.4",
"@nestjs/common": "^9.1.2",
"@nestjs/core": "^9.1.2",
"@nestjs/jwt": "^10.0.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ export class MakeUploadEntry {
{
_templateId: templateId,
},
'name key isRequired isUnique isFrozen selectValues dateFormats defaultValue type regex sequence allowMultiSelect',
'name key isRequired isUnique isFrozen selectValues dateFormats defaultValue type regex sequence allowMultiSelect alternateKeys',
{
sort: 'sequence',
}
Expand Down Expand Up @@ -100,6 +100,7 @@ export class MakeUploadEntry {
isUnique: schemaItem.isUnique || false,
defaultValue: schemaItem.defaultValue,
allowMultiSelect: schemaItem.allowMultiSelect,
alternateKeys: Array.isArray(schemaItem.alternateKeys) ? schemaItem.alternateKeys : [],

sequence: Object.keys(formattedColumns).length,
columnHeading: '', // used later during mapping
Expand Down
8 changes: 4 additions & 4 deletions apps/demo/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@impler/demo",
"version": "0.20.3",
"version": "0.20.4",
"author": "implerhq",
"license": "MIT",
"private": true,
Expand All @@ -15,9 +15,9 @@
},
"dependencies": {
"@emotion/react": "^11.10.5",
"@impler/client": "^0.20.3",
"@impler/react": "^0.20.3",
"@impler/shared": "^0.20.3",
"@impler/client": "^0.20.4",
"@impler/react": "^0.20.4",
"@impler/shared": "^0.20.4",
"@mantine/core": "^5.9.5",
"@mantine/hooks": "^5.9.5",
"@mantine/next": "^5.9.5",
Expand Down
6 changes: 3 additions & 3 deletions apps/queue-manager/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@impler/queue-manager",
"version": "0.20.3",
"version": "0.20.4",
"author": "implerhq",
"license": "MIT",
"private": true,
Expand All @@ -16,8 +16,8 @@
"lint:fix": "pnpm lint -- --fix"
},
"dependencies": {
"@impler/dal": "^0.20.3",
"@impler/shared": "^0.20.3",
"@impler/dal": "^0.20.4",
"@impler/shared": "^0.20.4",
"@sentry/node": "^7.112.2",
"axios": "1.6.2",
"dotenv": "^16.0.2",
Expand Down
1 change: 1 addition & 0 deletions apps/web/.example.env
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ NEXT_PUBLIC_TAWK_PROPERTY_ID=
NEXT_PUBLIC_TAWK_WIDGET_ID=
NEXT_PUBLIC_OPENREPLAY_KEY=
NEXT_PUBLIC_SENTRY_DSN=
SENTRY_DSN=
NEXT_PUBLIC_FORMBRICKS_ENVIRONMENT_ID=
27 changes: 13 additions & 14 deletions apps/web/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,31 +2,30 @@ FROM node:20.13.1-slim

WORKDIR /usr/src/app

RUN npm i -g \
[email protected] \
[email protected]
RUN npm i -g [email protected] [email protected]

COPY .npmrc .
COPY package.json .

COPY apps/web ./apps/web
COPY apps/web/.example.env ./apps/web/.env
COPY libs/shared ./libs/shared
COPY packages/react ./packages/react
COPY pnpm-lock.yaml .

COPY tsconfig.json .
COPY tsconfig.base.json .

COPY nx.json .
COPY pnpm-workspace.yaml .

COPY .eslintrc.js .
COPY .prettierrc .
COPY .prettierignore .
COPY nx.json .
COPY pnpm-workspace.yaml .
COPY pnpm-lock.yaml .

ENV NEXT_TELEMETRY_DISABLED 1
COPY apps/web ./apps/web
COPY apps/web/.example.env ./apps/web/.env
COPY libs/shared ./libs/shared
COPY packages/react ./packages/react

ENV NEXT_TELEMETRY_DISABLED=1

RUN pnpm i
RUN pnpm build
# RUN pnpm build

CMD [ "pnpm", "start:static:web" ]
CMD ["pnpm", "start:static:web"]
4 changes: 2 additions & 2 deletions apps/web/components/imports/Snippet.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export function Snippet({ projectId, templateId, accessToken }: SnippetProps) {

return (
<>
<Accordion variant="contained" radius={0}>
<Accordion variant="contained" radius={0} defaultValue="button">
<Accordion.Item value="script">
<Accordion.Control>
<Title color={colorScheme === 'dark' ? colors.white : colors.black} order={4}>
Expand Down Expand Up @@ -60,8 +60,8 @@ export function Snippet({ projectId, templateId, accessToken }: SnippetProps) {
<Prism language="tsx">{`import { useImpler } from '@impler/react';
const { showWidget, isImplerInitiated } = useImpler({
templateId: "${templateId}",
projectId: "${projectId}",
templateId: "${templateId}",
accessToken: "${accessToken}",
});
Expand Down
4 changes: 2 additions & 2 deletions apps/web/components/imports/forms/ColumnForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ export function ColumnForm({ onSubmit, data, isLoading }: ColumnFormProps) {
searchable
value={value}
onChange={onChange}
label="Excel column keys"
placeholder="Excel column keys"
label="Alternative column keys"
placeholder="Alternative column keys"
getCreateLabel={(query) => `+ ${query}`}
data={Array.isArray(value) ? value : []}
onCreate={(newItem) => {
Expand Down
2 changes: 1 addition & 1 deletion apps/web/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@impler/web",
"version": "0.20.3",
"version": "0.20.4",
"author": "implerhq",
"license": "MIT",
"private": true,
Expand Down
6 changes: 3 additions & 3 deletions apps/widget/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@impler/widget",
"version": "0.20.3",
"version": "0.20.4",
"author": "implerhq",
"license": "MIT",
"private": true,
Expand Down Expand Up @@ -40,8 +40,8 @@
"@craco/craco": "^6.4.5",
"@emotion/react": "^11.10.5",
"@handsontable/react": "^14.1.0",
"@impler/client": "^0.20.3",
"@impler/shared": "^0.20.3",
"@impler/client": "^0.20.4",
"@impler/shared": "^0.20.4",
"@mantine/core": "6.0.21",
"@mantine/dropzone": "6.0.21",
"@mantine/hooks": "6.0.21",
Expand Down
10 changes: 5 additions & 5 deletions docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ services:
- impler
api:
privileged: true
image: "ghcr.io/implerhq/impler/api:0.20.3"
image: "ghcr.io/implerhq/impler/api:0.20.4"
depends_on:
- mongodb
- rabbitmq
Expand Down Expand Up @@ -49,7 +49,7 @@ services:
networks:
- impler
queue-manager:
image: "ghcr.io/implerhq/impler/queue-manager:0.20.3"
image: "ghcr.io/implerhq/impler/queue-manager:0.20.4"
depends_on:
- api
- rabbitmq
Expand All @@ -66,7 +66,7 @@ services:
networks:
- impler
widget:
image: "ghcr.io/implerhq/impler/widget:0.20.3"
image: "ghcr.io/implerhq/impler/widget:0.20.4"
depends_on:
- api
container_name: widget
Expand All @@ -82,7 +82,7 @@ services:
embed:
depends_on:
- widget
image: "ghcr.io/implerhq/impler/embed:0.20.3"
image: "ghcr.io/implerhq/impler/embed:0.20.4"
container_name: embed
environment:
WIDGET_URL: ${WIDGET_BASE_URL}
Expand All @@ -93,7 +93,7 @@ services:
web:
depends_on:
- api
image: "ghcr.io/implerhq/impler/web:0.20.3"
image: "ghcr.io/implerhq/impler/web:0.20.4"
container_name: web
environment:
NEXT_PUBLIC_API_BASE_URL: ${API_ROOT_URL}
Expand Down
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
"npmClient": "pnpm",
"useNx": true,
"packages": ["apps/*", "libs/*", "packages/*"],
"version": "0.20.3"
"version": "0.20.4"
}
4 changes: 2 additions & 2 deletions libs/dal/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@impler/dal",
"version": "0.20.3",
"version": "0.20.4",
"author": "implerhq",
"license": "MIT",
"private": true,
Expand All @@ -16,7 +16,7 @@
"lint:fix": "eslint src --fix"
},
"dependencies": {
"@impler/shared": "^0.20.3",
"@impler/shared": "^0.20.4",
"class-transformer": "^0.5.1",
"date-fns": "^2.30.0",
"mongoose": "8.0.1",
Expand Down
2 changes: 1 addition & 1 deletion libs/embed/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@impler/embed",
"version": "0.20.3",
"version": "0.20.4",
"private": true,
"license": "MIT",
"author": "implerhq",
Expand Down
2 changes: 1 addition & 1 deletion libs/embed/src/embed.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ class Impler {
this.postMessageToContentWindow(event.data.type, this.activeWidgetId!);
break;
default:
this.postMessageToContentWindow(event.data.type, event.data.value);
this.postMessageToContentWindow(event.data.type, this.activeWidgetId!, event.data.value);
}
}
};
Expand Down
2 changes: 1 addition & 1 deletion libs/shared/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@impler/shared",
"version": "0.20.3",
"version": "0.20.4",
"description": "Reusable types and classes to shared between apps and libraries",
"license": "MIT",
"author": "implerhq",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "impler.io",
"version": "0.20.3",
"version": "0.20.4",
"description": "Open source infrastructure to import data easily",
"packageManager": "[email protected]",
"private": true,
Expand Down
4 changes: 2 additions & 2 deletions packages/client/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@impler/client",
"version": "0.20.3",
"version": "0.20.4",
"description": "API client to be used in end user environments",
"license": "MIT",
"author": "implerhq",
Expand Down Expand Up @@ -37,7 +37,7 @@
"typescript": "4.8.4"
},
"dependencies": {
"@impler/shared": "^0.20.3",
"@impler/shared": "^0.20.4",
"axios": "1.6.2"
},
"engines": {
Expand Down
Loading

0 comments on commit 0efdee9

Please sign in to comment.