Skip to content

Commit 0080b9d

Browse files
authored
Merge pull request #253 from briteliteimmersive/sync-bli
Sync BLI to OSS
2 parents e9fb107 + a6fffad commit 0080b9d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+18672
-205
lines changed

.eslintrc.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,19 @@
11
module.exports = {
22
env: {
33
browser: true,
4+
es6: true,
5+
node: true,
6+
commonjs: true,
47
es2020: true,
58
},
69
extends: ['standard', 'plugin:prettier/recommended'],
710
parserOptions: {
811
ecmaVersion: 11,
912
sourceType: 'module',
13+
ecmaFeatures: {
14+
modules: true,
15+
},
1016
},
17+
extends: ['eslint:recommended', 'plugin:prettier/recommended'],
1118
rules: {},
1219
}

.gitattributes

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
esm linguist-generated=true
2+
lib linguist-generated=true

.github/workflows/build.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
---
2+
name: Node.js CI
3+
on:
4+
pull_request:
5+
branches:
6+
- develop
7+
- main
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
strategy:
12+
matrix:
13+
node-version:
14+
- 16.x
15+
steps:
16+
- uses: actions/checkout@v2
17+
- name: Use Node.js ${{ matrix.node-version }}
18+
uses: actions/setup-node@v1
19+
with:
20+
node-version: ${{ matrix.node-version }}
21+
- name: Run install
22+
uses: borales/actions-yarn@v4
23+
with:
24+
cmd: install
25+
- name: Build bundle
26+
uses: borales/actions-yarn@v4
27+
with:
28+
cmd: build
29+
# - name: Run Test
30+
# uses: borales/actions-yarn@v4
31+
# with:
32+
# cmd: test
33+
- name: Check for modified files
34+
id: git-check
35+
run:
36+
echo ::set-output name=modified::$(if [ -n "$(git status --porcelain)" ];
37+
then echo "true"; else echo "false"; fi)
38+
39+
- name: Extract branch name
40+
shell: bash
41+
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
42+
id: extract_branch
43+
- name: Update changes in GitHub repository
44+
if: steps.git-check.outputs.modified == 'true'
45+
run: >
46+
git config --global user.name 'buildbot'
47+
48+
git config --global user.email '[email protected]'
49+
50+
git add -A
51+
52+
git commit -m '[automated commit] add built bundle using GitHub workflows'
53+
54+
git push origin HEAD:${{ github.head_ref }} --force

.github/workflows/bump-version.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Bump version
2+
on:
3+
push:
4+
branches:
5+
- develop
6+
jobs:
7+
build:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v2
11+
- name: Bump version and push tag
12+
id: tag_version
13+
uses: mathieudutour/[email protected]
14+
with:
15+
github_token: ${{ secrets.GITHUB_TOKEN }}
16+
- name: Create a GitHub release
17+
uses: ncipollo/release-action@v1
18+
with:
19+
tag: ${{ steps.tag_version.outputs.new_tag }}
20+
name: Release ${{ steps.tag_version.outputs.new_tag }}
21+
body: ${{ steps.tag_version.outputs.changelog }}
22+
#### https://github.com/marketplace/actions/github-tag

.github/workflows/codesee-arch-diagram.yml

Lines changed: 0 additions & 90 deletions
This file was deleted.

.github/workflows/npm-publish.yml

Lines changed: 0 additions & 51 deletions
This file was deleted.

.gitignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
/esm
2-
/lib
31
*.log
42
yarn.lock
53
package-lock.json
@@ -8,3 +6,5 @@ node_modules
86
.DS_Store
97
tst-rtry.js
108
.VSCodeCounter/
9+
esm
10+
lib

.gitpod.yml

Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
github:
2+
prebuilds:
3+
# enable for the master/default branch (defaults to true)
4+
master: true
5+
# enable for all branches in this repo (defaults to false)
6+
branches: true
7+
# enable for pull requests coming from this repo (defaults to true)
8+
pullRequests: true
9+
# add a check to pull requests (defaults to true)
10+
addCheck: true
11+
# add a "Review in Gitpod" button as a comment to pull requests (defaults to false)
12+
addComment: true
13+
14+
tasks:
15+
- name: install & run
16+
env:
17+
NODE_OPTIONS: --openssl-legacy-provider
18+
PORT: 8080
19+
before: |
20+
[ -d ../aegis ] || ( cd ../aegis && nvm install --lts )
21+
[ -d ../aegis-host ] || ( cd ../aegis-host && nvm install --lts )
22+
[ -d ../aegis-app ] || ( cd ../aegis-app && nvm install --lts )
23+
init: |
24+
cd ..
25+
git clone https://github.com/module-federation/aegis-app
26+
cd aegis-app
27+
nvm install --lts
28+
nvm use --lts
29+
yarn
30+
yarn build
31+
cd ../aegis
32+
nvm install --lts
33+
nvm use --lts
34+
yarn
35+
yarn build
36+
cd ..
37+
git clone https://github.com/module-federation/aegis-host
38+
cd aegis-host
39+
nvm install --lts
40+
nvm use --lts
41+
yarn
42+
command: |
43+
cd ../aegis
44+
nvm use --lts
45+
yarn link
46+
cd ../aegis-app
47+
nvm use --lts
48+
nohup node repo.js 8000 dist &
49+
nohup node repo.js 8001 cache &
50+
yarn build
51+
cd ../aegis-host
52+
nvm use --lts
53+
yarn link @module-federation/aegis
54+
yarn build
55+
gp sync-done start
56+
node --title aegis src/bootstrap.js | tee public/aegis.log
57+
58+
- name: service mesh
59+
env:
60+
NODE_OPTIONS: --openssl-legacy-provider
61+
PORT: 8888
62+
SWITCH: true
63+
before: |
64+
[ -d ../aegis-host ] || ( cd ../aegis-host && nvm install --lts )
65+
command: |
66+
gp sync-await start
67+
cd ../aegis-host
68+
nvm install --lts
69+
nvm use --lts
70+
node --title webswitch src/bootstrap.js | tee public/webswitch.log
71+
72+
- name: mongodb
73+
command: |
74+
cd ../aegis
75+
./mongo.sh
76+
77+
- name: watch core
78+
command: |
79+
gp sync-await start
80+
cd ../aegis
81+
node watch.mjs
82+
83+
- name: watch app
84+
command: |
85+
gp sync-await start
86+
cd ../aegis-app
87+
node watch.mjs
88+
89+
ports:
90+
- port: 8000
91+
description: local repo
92+
visibility: public
93+
onOpen: ignore
94+
- port: 8080
95+
description: http api
96+
visibility: public
97+
onOpen: open-preview
98+
- port: 8888
99+
description: webswitch
100+
visibility: public
101+
onOpen: open-browser
102+
- port: 27017
103+
description: mongodb
104+
visibility: public
105+
onOpen: ignore
106+
- port: 5353
107+
description: multicast dns
108+
visibility: public
109+
onOpen: ignore

__test__/use-cases/test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ exports.test = [
22
{
33
name: 'test',
44
url: 'http://localhost:8000/remmoteEntry.js',
5-
path: '/Users/tysonmidboe/aegis/__test__/use-cases',
5+
path: '/Users/kylefahey/OCVIBE/module-federation/aegis/__test__/use-cases',
66
type: 'model',
77
importRemote: () => import('test/models'),
88
},

aegis.code-workspace

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"folders": [
3+
{
4+
"path": "../aegis"
5+
},
6+
{
7+
"path": "../aegis-host"
8+
},
9+
{
10+
"path": "../aegis-app"
11+
}
12+
],
13+
"settings": {
14+
"liveServer.settings.multiRootWorkspaceName": "aegis",
15+
"githubPullRequests.ignoredPullRequestBranches": ["master"],
16+
"files.associations": {
17+
"types.h": "c"
18+
}
19+
}
20+
}

0 commit comments

Comments
 (0)