Skip to content

Commit

Permalink
refactor(init): refactor code for digthread from devsecops
Browse files Browse the repository at this point in the history
  • Loading branch information
jdhaines committed Feb 5, 2024
0 parents commit 0235f4d
Show file tree
Hide file tree
Showing 26 changed files with 10,048 additions and 0 deletions.
79 changes: 79 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
/* eslint-env node */
// require("@rushstack/eslint-patch/modern-module-resolution")

module.exports = {
env: {
node: true,
es6: true,
},
extends: [
"airbnb-base",
"plugin:import/typescript",
"eslint:recommended",
"prettier",
],
globals: {
Atomics: "readonly",
SharedArrayBuffer: "readonly",
defineProps: "readonly",
defineEmits: "readonly",
defineExpose: "readonly",
withDefaults: "readonly",
},
parserOptions: {
ecmaVersion: 6,
parser: "@typescript-eslint/parser",
sourceType: "module",
tsconfigRootDir: __dirname,
},
plugins: ["@typescript-eslint", "prettier", "import"],
settings: {
"import/resolver": {
node: {
extensions: [".js", ".jsx", ".ts", ".tsx", ".json"],
},
typescript: {
alwaysTryTypes: true,
project: ["src/frontend/tsconfig.json", "src/backend/tsconfig.json"],
},
},
},
ignorePatterns: ["node_modules/", "dist/", "**/local_db/"],
rules: {
"no-plusplus": "off",
"prettier/prettier": "warn",
"no-var": "error",
"comma-dangle": ["error", "only-multiline"],
"id-length": "off",
"no-unused-vars": [2, { args: "all", argsIgnorePattern: "^_" }],
"@typescript-eslint/no-unused-vars": ["error", { argsIgnorePattern: "^_" }],
"security/detect-object-injection": "off",
"import/no-extraneous-dependencies": [
"error",
{
devDependencies: ["**/*.test.ts", "**/tests/*.ts"],
},
],
"import/prefer-default-export": "off",
"import/extensions": [
"warn",
"ignorePackages",
{
ts: "never",
},
],
"no-shadow": "off",
"@typescript-eslint/no-shadow": ["error"],
},
overrides: [
{
files: [
"**/__tests__/*.{j,t}s?(x)",
"**/tests/unit/**/*.spec.{j,t}s?(x)",
],
env: {
jest: true,
},
},
],
}
49 changes: 49 additions & 0 deletions .github/workflows/deployToGitHubPages.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Deploy to GitHub Pages
on:
workflow_dispatch:
push:
branches:
- main
paths-ignore:
- ".github/**"

concurrency:
group: pages
cancel-in-progress: false

jobs:
build-and-deploy:
name: Build and Deploy
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎️
uses: actions/checkout@v3
with:
persist-credentials: false

- name: Setup Node 🔧
uses: actions/setup-node@v3
with:
node-version: 18
cache: 'npm'

- name: Install Dependencies ⚙️
run: |
npm ci
- name: Build Application 🏗️
run: |
npm run build
- name: Deploy 🚀
if: success()
uses: crazy-max/ghaction-github-pages@v3
with:
target_branch: gh-pages
build_dir: docs/.vitepress/dist
commit_message: 'chore(deploy): deploy docs Site to GitHub Pages'
keep_history: false
jekyll: false
fqdn: digthread.aiaadeic.org
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
node_modules/
cache/
dist/
.idea/
7 changes: 7 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
node_modules/
dist/
coverage/
.github/
.env
local_db/
generated/
13 changes: 13 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"tabWidth": 2,
"useTabs": false,
"semi": false,
"singleQuote": false,
"quoteProps": "as-needed",
"jsxSingleQuote": false,
"trailingComma": "es5",
"bracketSpacing": true,
"bracketSameLine": false,
"endOfLine": "lf",
"arrowParens": "always"
}
128 changes: 128 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
# Contributor Covenant Code of Conduct

## Our Pledge

We as members, contributors, and leaders pledge to make participation in our
community a harassment-free experience for everyone, regardless of age, body
size, visible or invisible disability, ethnicity, sex characteristics, gender
identity and expression, level of experience, education, socio-economic status,
nationality, personal appearance, race, religion, or sexual identity
and orientation.

We pledge to act and interact in ways that contribute to an open, welcoming,
diverse, inclusive, and healthy community.

## Our Standards

Examples of behavior that contributes to a positive environment for our
community include:

- Demonstrating empathy and kindness toward other people
- Being respectful of differing opinions, viewpoints, and experiences
- Giving and gracefully accepting constructive feedback
- Accepting responsibility and apologizing to those affected by our mistakes,
and learning from the experience
- Focusing on what is best not just for us as individuals, but for the
overall community

Examples of unacceptable behavior include:

- The use of sexualized language or imagery, and sexual attention or
advances of any kind
- Trolling, insulting or derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information, such as a physical or email
address, without their explicit permission
- Other conduct which could reasonably be considered inappropriate in a
professional setting

## Enforcement Responsibilities

Community leaders are responsible for clarifying and enforcing our standards of
acceptable behavior and will take appropriate and fair corrective action in
response to any behavior that they deem inappropriate, threatening, offensive,
or harmful.

Community leaders have the right and responsibility to remove, edit, or reject
comments, commits, code, wiki edits, issues, and other contributions that are
not aligned to this Code of Conduct, and will communicate reasons for moderation
decisions when appropriate.

## Scope

This Code of Conduct applies within all community spaces, and also applies when
an individual is officially representing the community in public spaces.
Examples of representing our community include using an official e-mail address,
posting via an official social media account, or acting as an appointed
representative at an online or offline event.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported to the community leaders responsible for enforcement by
raising an issue in the Repository or emailing [Josh Haines](mailto:Josh@JoshHaines.com).
All complaints will be reviewed and investigated promptly and fairly.

All community leaders are obligated to respect the privacy and security of the
reporter of any incident.

## Enforcement Guidelines

Community leaders will follow these Community Impact Guidelines in determining
the consequences for any action they deem in violation of this Code of Conduct:

### 1. Correction

**Community Impact**: Use of inappropriate language or other behavior deemed
unprofessional or unwelcome in the community.

**Consequence**: A private, written warning from community leaders, providing
clarity around the nature of the violation and an explanation of why the
behavior was inappropriate. A public apology may be requested.

### 2. Warning

**Community Impact**: A violation through a single incident or series
of actions.

**Consequence**: A warning with consequences for continued behavior. No
interaction with the people involved, including unsolicited interaction with
those enforcing the Code of Conduct, for a specified period of time. This
includes avoiding interactions in community spaces as well as external channels
like social media. Violating these terms may lead to a temporary or
permanent ban.

### 3. Temporary Ban

**Community Impact**: A serious violation of community standards, including
sustained inappropriate behavior.

**Consequence**: A temporary ban from any sort of interaction or public
communication with the community for a specified period of time. No public or
private interaction with the people involved, including unsolicited interaction
with those enforcing the Code of Conduct, is allowed during this period.
Violating these terms may lead to a permanent ban.

### 4. Permanent Ban

**Community Impact**: Demonstrating a pattern of violation of community
standards, including sustained inappropriate behavior, harassment of an
individual, or aggression toward or disparagement of classes of individuals.

**Consequence**: A permanent ban from any sort of public interaction within
the community.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 2.0, available at
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.

Community Impact Guidelines were inspired by [Mozilla's code of conduct
enforcement ladder](https://github.com/mozilla/diversity).

[homepage]: https://www.contributor-covenant.org

For answers to common questions about this code of conduct, see the FAQ at
https://www.contributor-covenant.org/faq. Translations are available at
https://www.contributor-covenant.org/translations.
11 changes: 11 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
---

# Contributing

This project supports contributions!

The source code for this project automatically builds a public facing website available at <https://digthread.aiaadeic.org>.
There is a page on that website you can review to learn more about how to contribute to our project.
That page is [available here](https://digthread.aiaadeic.org/about/contributing.html) as a web page,
or you can review the [markdown source code](https://github.com/aiaa-deic/digthread/tree/main/docs/about/contributing.md) of that page directly in GitHub.
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2023 AIAA Digital Engineering Integration Committee

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.
29 changes: 29 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<p>
<img alt="AIAA Logo" width="350" style="margin-bottom: 25px;" src="https://raw.githubusercontent.com/aiaa-deic/digthread/main/docs/public/img/darkLogo.png">
<br/>
American Institute of Aeronautics and Astronautics (AIAA) Digital Engineering Integration Committee (DEIC) Digital Thread Subcommittee
</p>
<p>
<a href="https://github.com/aiaa-deic/digthread/actions/workflows/deployToGitHubPages.yaml"><img src="https://github.com/aiaa-deic/digthread/actions/workflows/deployToGitHubPages.yaml/badge.svg?branch=main"></a>
</p>

---

<p>
<a href="https://vitepress.dev/"><img src="https://img.shields.io/badge/vitepress-%2335495e.svg?style=flat&logo=vuedotjs&logoColor=%23#10B981" /></a>
<a href="https://img.shields.io/badge/Conventional%20Commits-1.0.0-%23FE5196?logo=conventionalcommits&logoColor=white"><img src="https://img.shields.io/badge/Conventional%20Commits-1.0.0-%23FE5196?logo=conventionalcommits&logoColor=white" /></a>
</p>

## Overview

This is the main repository for the AIAA DEIC Digital Thread Subcommittee.
It contains the source code for the [subcommittee website](https://digthread.aiaadeic.org)
and is the main location for collaboration for the subcommittee.
We also use the discussions feature to discuss topics related to Digital Thread.

## Contacts

Contact [Melanie Lorang](mailto:melanie.k.lorang@boeing.com] or [Josh Haines](mailto:Josh@JoshHaines.com) if you have any questions
or want help adapting this for another subcommittee or situation.

You should also feel free to raise an issue in the repository to get help or ask a question.
10 changes: 10 additions & 0 deletions SECURITY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Security Policy

This is an open source project
that includes dependency specifications in the node ecosystem with others potentially in the future.
We make use of GitHub built-in tools to manage security vulnerabilities in our projects where appropriate.

## Reporting a Vulnerability

If you find a vulnerability in this project, please let us know by raising an issue in the repository.
We'll do our best to respond and address the issue as quickly as possible.
Loading

0 comments on commit 0235f4d

Please sign in to comment.