-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit fa8ba5b
Showing
179 changed files
with
21,721 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
*.config.js | ||
*.config.base.js | ||
*.test.tsx | ||
/packages/plugins/simpos-ui/src/* | ||
/packages/plugins/simos-ui/src/* | ||
/packages/plugins/marmo-ui/src/* | ||
/packages/home/src/plugins.js | ||
/packages/plugins/form/src/test-utils.tsx | ||
dist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
{ | ||
"settings": { | ||
"react": { | ||
"version": "17.0.2" | ||
} | ||
}, | ||
"env": { | ||
"node": true, | ||
"browser": true, | ||
"es6": true | ||
}, | ||
"extends": [ | ||
"prettier", | ||
"eslint:recommended", | ||
"plugin:react/recommended", | ||
"plugin:@typescript-eslint/recommended" | ||
], | ||
"parser": "@typescript-eslint/parser", | ||
"parserOptions": { | ||
"ecmaFeatures": { | ||
"jsx": true | ||
}, | ||
"ecmaVersion": "latest", | ||
"sourceType": "module" | ||
}, | ||
"plugins": ["react", "@typescript-eslint"], | ||
"rules": { | ||
"@typescript-eslint/no-explicit-any": "off", | ||
"react/display-name": "off", | ||
"@typescript-eslint/ban-ts-comment": "off", | ||
"react/no-unescaped-entities": "off", | ||
"@typescript-eslint/no-inferrable-types": "off" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# Declare files that will always have LF line endings on checkout | ||
* text=auto eol=lf | ||
|
||
# Denote all files that are truly binary and should not be modified. | ||
*.png binary | ||
*.jpg binary |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
--- | ||
name: Bug Report | ||
about: Report something that is broken or not working as intended | ||
title: '' | ||
labels: 'type: :bug bug' | ||
assignees: '' | ||
--- | ||
|
||
#### Expected Behaviour | ||
|
||
#### Actual Behaviour | ||
|
||
#### Steps to Reproduce |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
--- | ||
name: Code Maintenance | ||
about: Project cleanup, improve documentation, refactor code | ||
title: '' | ||
labels: 'type: :wrench: maintenance' | ||
assignees: '' | ||
|
||
--- | ||
|
||
#### Describe Problem | ||
|
||
#### Suggest Changes | ||
|
||
#### Provide Examples |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
--- | ||
name: Feature Request | ||
about: Suggest an idea for a new feature or enhancement to existing features | ||
title: '' | ||
labels: 'type: :bulb: feature request' | ||
assignees: '' | ||
--- | ||
|
||
#### Describe Problem | ||
|
||
#### Suggest Solution | ||
|
||
#### Additional Details |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
## What does this pull request change? | ||
|
||
## Why is this pull request needed? | ||
|
||
## Issues related to this change | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
# For most projects, this workflow file will not need changing; you simply need | ||
# to commit it to your repository. | ||
# | ||
# You may wish to alter this file to override the set of languages analyzed, | ||
# or to provide custom queries or build logic. | ||
# | ||
# ******** NOTE ******** | ||
# We have attempted to detect the languages in your repository. Please check | ||
# the `language` matrix defined below to confirm you have the correct set of | ||
# supported CodeQL languages. | ||
# | ||
name: "CodeQL" | ||
|
||
on: | ||
push: | ||
branches: [ master ] | ||
pull_request: | ||
# The branches below must be a subset of the branches above | ||
branches: [ master ] | ||
schedule: | ||
- cron: '34 19 * * 0' | ||
|
||
jobs: | ||
analyze: | ||
name: Analyze | ||
runs-on: ubuntu-latest | ||
permissions: | ||
actions: read | ||
contents: read | ||
security-events: write | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
language: [ 'javascript' ] | ||
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ] | ||
# Learn more about CodeQL language support at https://git.io/codeql-language-support | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
# Initializes the CodeQL tools for scanning. | ||
- name: Initialize CodeQL | ||
uses: github/codeql-action/init@v2 | ||
with: | ||
languages: ${{ matrix.language }} | ||
# If you wish to specify custom queries, you can do so here or in a config file. | ||
# By default, queries listed here will override any specified in a config file. | ||
# Prefix the list here with "+" to use these queries and those in the config file. | ||
# queries: ./path/to/local/query, your-org/your-repo/queries@main | ||
|
||
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java). | ||
# If this step fails, then you should remove it and run the build manually (see below) | ||
- name: Autobuild | ||
uses: github/codeql-action/autobuild@v2 | ||
|
||
# ℹ️ Command-line programs to run using the OS shell. | ||
# 📚 https://git.io/JvXDl | ||
|
||
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines | ||
# and modify them (or add more) to build your code if your project | ||
# uses a compiled language | ||
|
||
#- run: | | ||
# make bootstrap | ||
# make release | ||
|
||
- name: Perform CodeQL Analysis | ||
uses: github/codeql-action/analyze@v2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
on: | ||
workflow_dispatch: | ||
push: | ||
branches-ignore: | ||
- master | ||
tags-ignore: | ||
- v* | ||
|
||
jobs: | ||
tests: | ||
uses: ./.github/workflows/tests.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
on: | ||
workflow_dispatch: | ||
push: | ||
tags: | ||
- v* | ||
|
||
jobs: | ||
tests: | ||
uses: ./.github/workflows/tests.yaml | ||
|
||
publish: | ||
needs: tests | ||
uses: ./.github/workflows/publish.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
name: Publish Package to npmjs | ||
on: | ||
push: | ||
tags: | ||
- v* | ||
|
||
jobs: | ||
publish: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-node@v2 | ||
with: | ||
node-version: '18.x' | ||
registry-url: 'https://registry.npmjs.org' | ||
- run: yarn install | ||
- run: cd src && tsc | ||
- run: cd src && npm publish | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
name: Mark stale issues and pull requests | ||
|
||
on: | ||
schedule: | ||
- cron: "0 0 * * *" | ||
|
||
jobs: | ||
stale: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/stale@v1 | ||
with: | ||
repo-token: ${{ secrets.GITHUB_TOKEN }} | ||
stale-issue-message: 'Stale issue message' | ||
stale-pr-message: 'Stale pull request message' | ||
stale-issue-label: 'no-issue-activity' | ||
stale-pr-label: 'no-pr-activity' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
on: | ||
# Workflow dispatch is used for manual triggers | ||
workflow_dispatch: | ||
# Workflow call is used for called from another workflow | ||
workflow_call: | ||
|
||
jobs: | ||
linting: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@master | ||
|
||
- name: Install Precommit | ||
run: pip install pre-commit | ||
- name: Run prettier formatting | ||
run: pre-commit run prettier --all-files | ||
|
||
tests: | ||
strategy: | ||
matrix: | ||
package: [blueprint, default-pdf, default-preview, dmt-core, job, mermaid, yaml-view] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@master | ||
- uses: actions/setup-node@v3 | ||
|
||
# TODO: Cache yarn install | ||
|
||
- name: "Web Tests" | ||
run: | | ||
cd packages/${{ matrix.package }} | ||
yarn install | ||
yarn tsc | ||
yarn test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
node_modules | ||
.idea | ||
.vscode |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v2.5.0 | ||
hooks: | ||
- id: check-merge-conflict | ||
- id: check-case-conflict | ||
- id: check-json | ||
- id: check-toml | ||
- id: check-yaml | ||
- id: trailing-whitespace | ||
exclude: ^.*\.(lock)$||^docs\/ | ||
- id: mixed-line-ending | ||
exclude: ^.*\.(lock)$||^docs\/ | ||
- id: detect-private-key | ||
|
||
- repo: https://github.com/pre-commit/mirrors-prettier | ||
rev: v2.2.1 | ||
hooks: | ||
- id: prettier | ||
files: ^.*\.(ts|tsx|js|css|html|json)$ | ||
args: ['--config=.prettierrc.js', '--ignore-path=.prettierignore'] | ||
|
||
- repo: local | ||
hooks: | ||
- id: eslint | ||
name: ESlint | ||
entry: sh -c "npm run lint:fix" | ||
language: system | ||
pass_filenames: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
**/gen/* | ||
|
||
build | ||
coverage | ||
node_modules | ||
dist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
// prettier.config.js or .prettierrc.js | ||
// default config | ||
module.exports = { | ||
trailingComma: 'es5', | ||
tabWidth: 2, | ||
semi: false, | ||
singleQuote: true, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
FROM node:16-alpine AS base | ||
|
||
ARG AUTH_ENABLED=0 | ||
ARG REDIRECT_URI=http://localhost/ | ||
# Azure AD requires a scope. | ||
ARG AUTH_SCOPE="" | ||
ARG CLIENT_ID="" | ||
ARG TENANT_ID="" | ||
ENV REACT_APP_AUTH_SCOPE=$AUTH_SCOPE | ||
ENV REACT_APP_AUTH=$AUTH_ENABLED | ||
ENV REACT_APP_AUTH_CLIENT_ID=$CLIENT_ID | ||
ENV REACT_APP_AUTH_TENANT=$TENANT_ID | ||
ENV REACT_APP_TOKEN_ENDPOINT=https://login.microsoftonline.com/${REACT_APP_AUTH_TENANT}/oauth2/v2.0/token | ||
ENV REACT_APP_AUTH_ENDPOINT=https://login.microsoftonline.com/${REACT_APP_AUTH_TENANT}/oauth2/v2.0/authorize | ||
ENV REACT_APP_LOGOUT_ENDPOINT=https://login.microsoftonline.com/${REACT_APP_AUTH_TENANT}/oauth2/logout | ||
ENV REACT_APP_AUTH_REDIRECT_URI=$REDIRECT_URI | ||
|
||
WORKDIR /code/ | ||
COPY jest.config.base.js package.json yarn.lock jest.config.js tsconfig.json .eslintignore .eslintrc.json ./ | ||
COPY --chown=1000 web/packages ./packages | ||
RUN yarn install --ignore-scripts --frozen-lockfile --link-duplicates | ||
|
||
FROM base AS development | ||
CMD ["yarn", "start"] | ||
|
||
FROM base AS prod | ||
RUN npm install -g serve | ||
RUN yarn build | ||
WORKDIR /code/packages/home | ||
EXPOSE 3000 | ||
CMD ["serve", "--single", "build", "--listen", "3000"] | ||
USER 1000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2022 Equinor | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
Oops, something went wrong.