Skip to content

Commit

Permalink
Merge pull request #253 from briteliteimmersive/sync-bli
Browse files Browse the repository at this point in the history
Sync BLI to OSS
  • Loading branch information
tysonrm authored Dec 28, 2022
2 parents e9fb107 + a6fffad commit 0080b9d
Show file tree
Hide file tree
Showing 45 changed files with 18,672 additions and 205 deletions.
7 changes: 7 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,19 @@
module.exports = {
env: {
browser: true,
es6: true,
node: true,
commonjs: true,
es2020: true,
},
extends: ['standard', 'plugin:prettier/recommended'],
parserOptions: {
ecmaVersion: 11,
sourceType: 'module',
ecmaFeatures: {
modules: true,
},
},
extends: ['eslint:recommended', 'plugin:prettier/recommended'],
rules: {},
}
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
esm linguist-generated=true
lib linguist-generated=true
54 changes: 54 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
---
name: Node.js CI
on:
pull_request:
branches:
- develop
- main
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version:
- 16.x
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Run install
uses: borales/actions-yarn@v4
with:
cmd: install
- name: Build bundle
uses: borales/actions-yarn@v4
with:
cmd: build
# - name: Run Test
# uses: borales/actions-yarn@v4
# with:
# cmd: test
- name: Check for modified files
id: git-check
run:
echo ::set-output name=modified::$(if [ -n "$(git status --porcelain)" ];
then echo "true"; else echo "false"; fi)

- name: Extract branch name
shell: bash
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
id: extract_branch
- name: Update changes in GitHub repository
if: steps.git-check.outputs.modified == 'true'
run: >
git config --global user.name 'buildbot'
git config --global user.email '[email protected]'
git add -A
git commit -m '[automated commit] add built bundle using GitHub workflows'
git push origin HEAD:${{ github.head_ref }} --force
22 changes: 22 additions & 0 deletions .github/workflows/bump-version.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Bump version
on:
push:
branches:
- develop
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Bump version and push tag
id: tag_version
uses: mathieudutour/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: Create a GitHub release
uses: ncipollo/release-action@v1
with:
tag: ${{ steps.tag_version.outputs.new_tag }}
name: Release ${{ steps.tag_version.outputs.new_tag }}
body: ${{ steps.tag_version.outputs.changelog }}
#### https://github.com/marketplace/actions/github-tag
90 changes: 0 additions & 90 deletions .github/workflows/codesee-arch-diagram.yml

This file was deleted.

51 changes: 0 additions & 51 deletions .github/workflows/npm-publish.yml

This file was deleted.

4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
/esm
/lib
*.log
yarn.lock
package-lock.json
Expand All @@ -8,3 +6,5 @@ node_modules
.DS_Store
tst-rtry.js
.VSCodeCounter/
esm
lib
109 changes: 109 additions & 0 deletions .gitpod.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
github:
prebuilds:
# enable for the master/default branch (defaults to true)
master: true
# enable for all branches in this repo (defaults to false)
branches: true
# enable for pull requests coming from this repo (defaults to true)
pullRequests: true
# add a check to pull requests (defaults to true)
addCheck: true
# add a "Review in Gitpod" button as a comment to pull requests (defaults to false)
addComment: true

tasks:
- name: install & run
env:
NODE_OPTIONS: --openssl-legacy-provider
PORT: 8080
before: |
[ -d ../aegis ] || ( cd ../aegis && nvm install --lts )
[ -d ../aegis-host ] || ( cd ../aegis-host && nvm install --lts )
[ -d ../aegis-app ] || ( cd ../aegis-app && nvm install --lts )
init: |
cd ..
git clone https://github.com/module-federation/aegis-app
cd aegis-app
nvm install --lts
nvm use --lts
yarn
yarn build
cd ../aegis
nvm install --lts
nvm use --lts
yarn
yarn build
cd ..
git clone https://github.com/module-federation/aegis-host
cd aegis-host
nvm install --lts
nvm use --lts
yarn
command: |
cd ../aegis
nvm use --lts
yarn link
cd ../aegis-app
nvm use --lts
nohup node repo.js 8000 dist &
nohup node repo.js 8001 cache &
yarn build
cd ../aegis-host
nvm use --lts
yarn link @module-federation/aegis
yarn build
gp sync-done start
node --title aegis src/bootstrap.js | tee public/aegis.log
- name: service mesh
env:
NODE_OPTIONS: --openssl-legacy-provider
PORT: 8888
SWITCH: true
before: |
[ -d ../aegis-host ] || ( cd ../aegis-host && nvm install --lts )
command: |
gp sync-await start
cd ../aegis-host
nvm install --lts
nvm use --lts
node --title webswitch src/bootstrap.js | tee public/webswitch.log
- name: mongodb
command: |
cd ../aegis
./mongo.sh
- name: watch core
command: |
gp sync-await start
cd ../aegis
node watch.mjs
- name: watch app
command: |
gp sync-await start
cd ../aegis-app
node watch.mjs
ports:
- port: 8000
description: local repo
visibility: public
onOpen: ignore
- port: 8080
description: http api
visibility: public
onOpen: open-preview
- port: 8888
description: webswitch
visibility: public
onOpen: open-browser
- port: 27017
description: mongodb
visibility: public
onOpen: ignore
- port: 5353
description: multicast dns
visibility: public
onOpen: ignore
2 changes: 1 addition & 1 deletion __test__/use-cases/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ exports.test = [
{
name: 'test',
url: 'http://localhost:8000/remmoteEntry.js',
path: '/Users/tysonmidboe/aegis/__test__/use-cases',
path: '/Users/kylefahey/OCVIBE/module-federation/aegis/__test__/use-cases',
type: 'model',
importRemote: () => import('test/models'),
},
Expand Down
20 changes: 20 additions & 0 deletions aegis.code-workspace
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"folders": [
{
"path": "../aegis"
},
{
"path": "../aegis-host"
},
{
"path": "../aegis-app"
}
],
"settings": {
"liveServer.settings.multiRootWorkspaceName": "aegis",
"githubPullRequests.ignoredPullRequestBranches": ["master"],
"files.associations": {
"types.h": "c"
}
}
}
Loading

0 comments on commit 0080b9d

Please sign in to comment.