Skip to content

Commit

Permalink
feat: added environments and launch functionality to projects (#87)
Browse files Browse the repository at this point in the history
* feat: add environments schema definition

Signed-off-by: Francisco Madeira <francisco.madeira@diconium.com>

* feat: remove query from getProjects action

* refactor: remove query from getProjects

* refactor: remove query from getProjectsById

* refactor: fix projects/{id} with fixed environtment

* refactor: project components list and add

* refactor: project components actions

* feat: add environment picker

* feat: add environment picker to projects page

Signed-off-by: Francisco Madeira <francisco.madeira@diconium.com>

* refactor: component actions with environments

* refactor: api routes for projects

* feat: add new environment based api routes

* feat: add copy url to environments

* feat: actions on project environments

* refactor: clean types on projects actions

* feat: add default environment to new projects

* feat: create launch page

Signed-off-by: Francisco Madeira <francisco.madeira@diconium.com>

* feat: added launch funcionality

* feat: improve comparison page result

Signed-off-by: Francisco Madeira <francisco.madeira@diconium.com>

* chore: add changeset

Signed-off-by: Francisco Madeira <francisco.madeira@diconium.com>

* fix: remove group to display all the components

Signed-off-by: Francisco Madeira <francisco.madeira@diconium.com>

* chore: update the release workflow

Signed-off-by: Francisco Madeira <francisco.madeira@diconium.com>

---------

Signed-off-by: Francisco Madeira <francisco.madeira@diconium.com>
  • Loading branch information
fgmadeira committed Sep 30, 2024
1 parent f3c585b commit 03ce67b
Show file tree
Hide file tree
Showing 62 changed files with 2,509 additions and 1,055 deletions.
13 changes: 13 additions & 0 deletions .changeset/clever-fireants-walk.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
'@ethereal-nexus/dashboard': major
'@ethereal-nexus/site': major
'@ethereal-nexus/cli': major
'@ethereal-nexus/conector-aem-react': major
'@ethereal-nexus/core': major
'@ethereal-nexus/vite-plugin-ethereal-nexus': major
---

This is the first Major release of Ethereal Nexus!

Added environments features. This allows projects to have several configurations based on the respective environemnt and to publish them from one environment to the other using launches.
Because of this there were breaking changes to the schema of the component configs.
2 changes: 1 addition & 1 deletion .changeset/tiny-mayflies-yawn.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
'@ethereal-nexus/core': patch
---

fix type inference for select schema
Fix type inference for select schema
10 changes: 9 additions & 1 deletion .github/workflows/astro.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,44 +39,52 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Detect package manager
id: detect-package-manager
run: |
echo "manager=pnpm" >> $GITHUB_OUTPUT
echo "command=install" >> $GITHUB_OUTPUT
echo "runner=pnpm run" >> $GITHUB_OUTPUT
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 20

- uses: pnpm/action-setup@v4
name: Install pnpm
with:
version: 8
run_install: false

- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- uses: actions/cache@v4
name: Setup pnpm cache
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Setup Pages
id: pages
uses: actions/configure-pages@v4

- name: Install dependencies
run: ${{ steps.detect-package-manager.outputs.manager }} ${{ steps.detect-package-manager.outputs.command }}
working-directory: ${{ env.BUILD_PATH }}

- name: Build with Astro
run: |
${{ steps.detect-package-manager.outputs.runner }} astro build \
--site "${{ steps.pages.outputs.origin }}" \
--base "${{ steps.pages.outputs.base_path }}"
working-directory: ${{ env.BUILD_PATH }}

- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/dashboard-preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ jobs:
echo "${{ secrets.AZURE_BLOB_STORAGE_ACCOUNT }}" >> ./web/dashboard/.env
echo "${{ secrets.AZURE_BLOB_STORAGE_SECRET }}" >> ./web/dashboard/.env
echo "${{ secrets.NEXT_AUTH_SECRET }}" >> ./web/dashboard/.env
echo "AZURE_CONTAINER_NAME=remote-components-aem-demo" >> ./web/dashboard/.env
echo "DRIZZLE_DATABASE_TYPE=neon" >> ./web/dashboard/.env
echo "DRIZZLE_DATABASE_URL=${{ steps.create-branch.outputs.db_url }}?sslmode=require" >> ./web/dashboard/.env
Expand Down
48 changes: 48 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Release

on:
push:
branches:
- main

concurrency: ${{ github.workflow }}-${{ github.ref }}

jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v3

- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 20

- uses: pnpm/action-setup@v4
name: Install pnpm
with:
run_install: false

- name: Install Dependencies
run: pnpm i --frozen-lockfile

- name: Build Packages
run: pnpm run build

- name: Fix npmrc
run: npm config set "//registry.npmjs.org/:_authToken" "$NPM_TOKEN"
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Publish to npm
id: changesets
uses: changesets/action@v1
with:
publish: pnpm release
commit: "chore: release version"
title: "[ci] Release version"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
29 changes: 0 additions & 29 deletions examples/next-mf/home/next.config.js

This file was deleted.

18 changes: 0 additions & 18 deletions examples/next-mf/home/package.json

This file was deleted.

32 changes: 0 additions & 32 deletions examples/next-mf/home/pages/_app.js

This file was deleted.

63 changes: 0 additions & 63 deletions examples/next-mf/home/pages/_document.js

This file was deleted.

45 changes: 0 additions & 45 deletions examples/next-mf/home/pages/index.js

This file was deleted.

Binary file removed examples/next-mf/home/public/favicon.ico
Binary file not shown.
17 changes: 0 additions & 17 deletions examples/next-mf/package.json

This file was deleted.

10 changes: 0 additions & 10 deletions examples/next-mf/remote/components/Button.js

This file was deleted.

22 changes: 0 additions & 22 deletions examples/next-mf/remote/next.config.js

This file was deleted.

18 changes: 0 additions & 18 deletions examples/next-mf/remote/package.json

This file was deleted.

Loading

0 comments on commit 03ce67b

Please sign in to comment.