Skip to content

Commit b2f45ec

Browse files
authored
Initial commit
0 parents  commit b2f45ec

11 files changed

+458
-0
lines changed

.github/workflows/project-build.yml

+48
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: project-build
2+
on: push
3+
jobs:
4+
secrets-gate:
5+
runs-on: ubuntu-latest
6+
outputs:
7+
ok: ${{ steps.check-secrets.outputs.ok }}
8+
steps:
9+
- name: check for secrets needed to run workflows
10+
id: check-secrets
11+
run: |
12+
if [ ${{ secrets.PROJECT_BUILD_ENABLED }} == 'true' ]; then
13+
echo "ok=enabled" >> $GITHUB_OUTPUT
14+
fi
15+
compile-codebase:
16+
needs:
17+
- secrets-gate
18+
if: ${{ needs.secrets-gate.outputs.ok == 'enabled' }}
19+
runs-on: ubuntu-latest
20+
steps:
21+
- name: Checkout Ethereal Engine
22+
uses: actions/checkout@v3
23+
with:
24+
repository: etherealengine/etherealengine
25+
- name: Checkout Project
26+
uses: actions/checkout@v3
27+
with:
28+
path: './packages/projects/projects/${{ github.event.repository.name }}'
29+
- name: Use Node.js
30+
uses: actions/setup-node@v3
31+
with:
32+
node-version: 18.x
33+
- name: restore lerna
34+
uses: actions/cache@v3
35+
with:
36+
path: |
37+
node_modules
38+
*/*/node_modules
39+
package-lock.json
40+
key: ${{ runner.os }}-branch-build-${{ hashFiles('**/package.json') }}
41+
- run: cp .env.local.default .env.local
42+
- run: npm install --production=false --loglevel notice --legacy-peer-deps
43+
- run: npm run lint
44+
- run: npm run check-errors
45+
- run: npm run dev-docker
46+
- run: npm run dev-reinit
47+
- run: npx lerna run --ignore '@etherealengine/*' test
48+
- run: npm run build-client
+61
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
name: version-increment
2+
3+
on:
4+
release:
5+
types: [created]
6+
7+
jobs:
8+
secrets-gate:
9+
runs-on: ubuntu-latest
10+
outputs:
11+
ok: ${{ steps.check-secrets.outputs.ok }}
12+
steps:
13+
- name: check for secrets needed to run workflows
14+
id: check-secrets
15+
run: |
16+
if [ ${{ secrets.PROJECT_VERSION_INCREMENT_ENABLED }} == 'true' ]; then
17+
echo "ok=enabled" >> $GITHUB_OUTPUT
18+
fi
19+
publish-npm:
20+
runs-on: ubuntu-latest
21+
steps:
22+
- uses: actions/checkout@v3
23+
- uses: actions/setup-node@v3
24+
with:
25+
node-version: 18.x
26+
scope: '@etherealengine'
27+
- name: Set git username
28+
run: git config user.name "CI Bot"
29+
- name: Set git email
30+
run: git config user.email [email protected]
31+
- name: Set pr_branch_name environment variable
32+
run: echo pr_branch_name=version-increment-${{ github.event.release.tag_name }} >> $GITHUB_ENV
33+
- name: Switch to branch ${{ env.pr_branch_name }}
34+
run: git switch -c ${{ env.pr_branch_name }}
35+
- name: NPM increment version
36+
run: npm version ${{ github.event.release.tag_name }} --no-git-tag-version
37+
env:
38+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
39+
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
40+
- name: Move root package.json
41+
run: mv package.json package.json.altered
42+
- name: Install dependencies for running bump-project-versions
43+
44+
- name: Move root package.json back
45+
run: mv package.json.altered package.json
46+
- name: Bump default and template project version
47+
run: node scripts/bump-project-versions.js
48+
- name: Run git add
49+
run: git add .
50+
- name: Commit changes
51+
run: git commit -m ${{ github.event.release.tag_name }}
52+
- name: Push changes to new branch
53+
run: git push --no-verify origin ${{ env.pr_branch_name }}
54+
- name: Create version bump PR
55+
uses: repo-sync/pull-request@v2
56+
with:
57+
destination_branch: ${{ github.event.release.target_commitish }}
58+
github_token: ${{ secrets.GITHUB_TOKEN }}
59+
source_branch: ${{ env.pr_branch_name }}
60+
pr_title: ${{ github.event.release.tag_name }}
61+
pr_body: Bump version to ${{ github.event.release.tag_name }}

.gitignore

+112
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
lerna-debug.log*
8+
9+
# Diagnostic reports (https://nodejs.org/api/report.html)
10+
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
11+
12+
# Runtime data
13+
pids
14+
*.pid
15+
*.seed
16+
*.pid.lock
17+
18+
# Directory for instrumented libs generated by jscoverage/JSCover
19+
lib-cov
20+
21+
# Coverage directory used by tools like istanbul
22+
coverage
23+
*.lcov
24+
25+
# nyc test coverage
26+
.nyc_output
27+
28+
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
29+
.grunt
30+
31+
# Bower dependency directory (https://bower.io/)
32+
bower_components
33+
34+
# node-waf configuration
35+
.lock-wscript
36+
37+
# Compiled binary addons (https://nodejs.org/api/addons.html)
38+
build/Release
39+
40+
# Dependency directories
41+
node_modules/
42+
jspm_packages/
43+
44+
# TypeScript v1 declaration files
45+
typings/
46+
47+
# TypeScript cache
48+
*.tsbuildinfo
49+
50+
# Optional npm cache directory
51+
.npm
52+
53+
# Optional eslint cache
54+
.eslintcache
55+
56+
# Microbundle cache
57+
.rpt2_cache/
58+
.rts2_cache_cjs/
59+
.rts2_cache_es/
60+
.rts2_cache_umd/
61+
62+
# Optional REPL history
63+
.node_repl_history
64+
65+
# Output of 'npm pack'
66+
*.tgz
67+
68+
# Yarn Integrity file
69+
.yarn-integrity
70+
71+
# dotenv environment variables file
72+
.env
73+
.env.test
74+
75+
# parcel-bundler cache (https://parceljs.org/)
76+
.cache
77+
78+
# Next.js build output
79+
.next
80+
81+
# Nuxt.js build / generate output
82+
.nuxt
83+
84+
# Gatsby files
85+
.cache/
86+
87+
# vuepress build output
88+
.vuepress/dist
89+
90+
# Serverless directories
91+
.serverless/
92+
93+
# FuseBox cache
94+
.fusebox/
95+
96+
# DynamoDB Local files
97+
.dynamodb/
98+
99+
# TernJS port file
100+
.tern-port
101+
.buildcache
102+
103+
build/
104+
dist/
105+
**/docs/
106+
107+
.DS_Store
108+
109+
.history
110+
.history/
111+
112+
index.ts.bak

.mocharc.js

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
2+
/*
3+
CPAL-1.0 License
4+
5+
The contents of this file are subject to the Common Public Attribution License
6+
Version 1.0. (the "License"); you may not use this file except in compliance
7+
with the License. You may obtain a copy of the License at
8+
https://github.com/EtherealEngine/etherealengine/blob/dev/LICENSE.
9+
The License is based on the Mozilla Public License Version 1.1, but Sections 14
10+
and 15 have been added to cover use of software over a computer network and
11+
provide for limited attribution for the Original Developer. In addition,
12+
Exhibit A has been modified to be consistent with Exhibit B.
13+
14+
Software distributed under the License is distributed on an "AS IS" basis,
15+
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the
16+
specific language governing rights and limitations under the License.
17+
18+
The Original Code is Ethereal Engine.
19+
20+
The Original Developer is the Initial Developer. The Initial Developer of the
21+
Original Code is the Ethereal Engine team.
22+
23+
All portions of the code written by the Ethereal Engine team are Copyright © 2021-2023
24+
Ethereal Engine. All Rights Reserved.
25+
*/
26+
27+
module.exports = {
28+
failZero: false,
29+
parallel: false,
30+
spec: ['tests/**/*.test.ts'],
31+
require: [
32+
'tests/mocha.env', // init env here
33+
'jsdom-global/register'
34+
],
35+
extension: [
36+
'ts'
37+
],
38+
bail: true,
39+
exit: true,
40+
recursive: true,
41+
jobs: '1',
42+
timeout: '60000'
43+
};

LICENSE

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
CPAL-1.0 License
2+
3+
The contents of this file are subject to the Common Public Attribution License
4+
Version 1.0. (the "License"); you may not use this file except in compliance
5+
with the License. You may obtain a copy of the License at
6+
https://github.com/EtherealEngine/etherealengine/blob/dev/LICENSE.
7+
The License is based on the Mozilla Public License Version 1.1, but Sections 14
8+
and 15 have been added to cover use of software over a computer network and
9+
provide for limited attribution for the Original Developer. In addition,
10+
Exhibit A has been modified to be consistent with Exhibit B.
11+
12+
Software distributed under the License is distributed on an "AS IS" basis,
13+
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the
14+
specific language governing rights and limitations under the License.
15+
16+
The Original Code is Ethereal Engine.
17+
18+
The Original Developer is the Initial Developer. The Initial Developer of the
19+
Original Code is the Ethereal Engine team.
20+
21+
All portions of the code written by the Ethereal Engine team are Copyright © 2021-2023
22+
Ethereal Engine. All Rights Reserved.

package.json

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
{
2+
"name": "ee-template",
3+
"version": "0.0.0",
4+
"description": "",
5+
"main": "",
6+
"etherealEngine": {
7+
"version": "1.4.0"
8+
},
9+
"scripts": {
10+
"test": "mocha --config .mocharc.js",
11+
"format": "prettier --write \"**/*.{ts,tsx}\"",
12+
"format-scss": "stylelint \"**/*.scss\" --fix",
13+
"format-staged": "lint-staged",
14+
"precommit": "no-master-commits -b master"
15+
},
16+
"peerDependencies": {},
17+
"dependencies": {},
18+
"devDependencies": {},
19+
"license": "ISC",
20+
"pre-commit": [
21+
"format-staged"
22+
],
23+
"lint-staged": {
24+
"*.{ts,tsx}": [
25+
"prettier --write"
26+
],
27+
"*.scss": [
28+
"stylelint --fix"
29+
]
30+
}
31+
}

readme.md

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
### Ethereal Engine Project
2+
3+
This is an Ethereal Engine project.

tests/dummy.test.ts

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
/*
2+
CPAL-1.0 License
3+
4+
The contents of this file are subject to the Common Public Attribution License
5+
Version 1.0. (the "License"); you may not use this file except in compliance
6+
with the License. You may obtain a copy of the License at
7+
https://github.com/EtherealEngine/etherealengine/blob/dev/LICENSE.
8+
The License is based on the Mozilla Public License Version 1.1, but Sections 14
9+
and 15 have been added to cover use of software over a computer network and
10+
provide for limited attribution for the Original Developer. In addition,
11+
Exhibit A has been modified to be consistent with Exhibit B.
12+
13+
Software distributed under the License is distributed on an "AS IS" basis,
14+
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the
15+
specific language governing rights and limitations under the License.
16+
17+
The Original Code is Ethereal Engine.
18+
19+
The Original Developer is the Initial Developer. The Initial Developer of the
20+
Original Code is the Ethereal Engine team.
21+
22+
All portions of the code written by the Ethereal Engine team are Copyright © 2021-2023
23+
Ethereal Engine. All Rights Reserved.
24+
*/

tests/mocha.env.js

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
2+
/*
3+
CPAL-1.0 License
4+
5+
The contents of this file are subject to the Common Public Attribution License
6+
Version 1.0. (the "License"); you may not use this file except in compliance
7+
with the License. You may obtain a copy of the License at
8+
https://github.com/EtherealEngine/etherealengine/blob/dev/LICENSE.
9+
The License is based on the Mozilla Public License Version 1.1, but Sections 14
10+
and 15 have been added to cover use of software over a computer network and
11+
provide for limited attribution for the Original Developer. In addition,
12+
Exhibit A has been modified to be consistent with Exhibit B.
13+
14+
Software distributed under the License is distributed on an "AS IS" basis,
15+
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the
16+
specific language governing rights and limitations under the License.
17+
18+
The Original Code is Ethereal Engine.
19+
20+
The Original Developer is the Initial Developer. The Initial Developer of the
21+
Original Code is the Ethereal Engine team.
22+
23+
All portions of the code written by the Ethereal Engine team are Copyright © 2021-2023
24+
Ethereal Engine. All Rights Reserved.
25+
*/
26+
27+
process.env.APP_ENV = 'test'
28+
process.env.NODE_ENV = 'test'
29+
process.env.NODE_TLS_REJECT_UNAUTHORIZED='0'
30+
31+
require("ts-node").register({
32+
project: './tsconfig.json',
33+
files: true,
34+
swc: true
35+
})
36+
37+
require("fix-esm").register()

0 commit comments

Comments
 (0)