Skip to content

Commit

Permalink
feat: create-chaos tool
Browse files Browse the repository at this point in the history
  • Loading branch information
Rain120 committed Jul 19, 2023
0 parents commit 5e5a49f
Show file tree
Hide file tree
Showing 82 changed files with 7,592 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
root = true

[*]
charset = utf-8
indent_style = space
indent_size = 2
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
4 changes: 4 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
dist
temp
build.config.ts
template-*
7 changes: 7 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
const { defineConfig } = require('eslint-define-config');

module.exports = defineConfig({
root: true,
extends: ['@chaos-design/eslint-config'],
rules: {},
});
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* text=auto eol=lf
18 changes: 18 additions & 0 deletions .github/workflows/issue-close-require.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Issue Close Require

on:
schedule:
- cron: "0 0 * * *"

jobs:
close-issues:
if: github.repository == '@chaos-design/chaos'
runs-on: ubuntu-latest
steps:
- name: need reproduction
uses: actions-cool/issues-helper@v3
with:
actions: "close-issues"
token: ${{ secrets.GITHUB_TOKEN }}
labels: "need reproduction"
inactive-day: 3
24 changes: 24 additions & 0 deletions .github/workflows/lock-closed-issues.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Lock Closed Issues

on:
schedule:
- cron: "0 0 * * *"

permissions:
issues: write

jobs:
action:
if: github.repository == '@chaos-design/chaos'
runs-on: ubuntu-latest
steps:
- uses: dessant/lock-threads@v4
with:
github-token: ${{ secrets.ASSESS_TOKEN }}
issue-inactive-days: "14"
#issue-comment: |
# This issue has been locked since it has been closed for more than 14 days.
#
# If you have found a concrete bug or regression related to it, please open a new [bug report](https://github.com/vitejs/vite/issues/new/choose) with a reproduction against the latest Vite version. If you have any other comments you should join the chat at [Vite Land](https://chat.vitejs.dev) or create a new [discussion](https://github.com/vitejs/vite/discussions).
issue-lock-reason: ""
process-only: "issues"
41 changes: 41 additions & 0 deletions .github/workflows/release copy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Release

on:
push:
tags:
- "v*"

jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: ^7

- name: Set node version
uses: actions/setup-node@v3
with:
registry-url: https://registry.npmjs.org/
cache: "pnpm"

- name: Install deps
run: pnpm install

- name: Build
run: pnpm run build

- name: Publish package
run: pnpm publish -r --access public --no-git-checks
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}

- run: npx changelogithub
env:
GITHUB_TOKEN: ${{secrets.ACCESS_TOKEN}}
41 changes: 41 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Release

on:
push:
tags:
- "v*"

jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: ^7

- name: Set node version
uses: actions/setup-node@v3
with:
registry-url: https://registry.npmjs.org/
cache: "pnpm"

- name: Install deps
run: pnpm install

- name: Build
run: pnpm run build

- name: Publish package
run: pnpm publish -r --access public --no-git-checks
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}

- run: npx changelogithub
env:
GITHUB_TOKEN: ${{secrets.ACCESS_TOKEN}}
25 changes: 25 additions & 0 deletions .github/workflows/semantic-pull-request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Semantic Pull Request

on:
pull_request_target:
types:
- opened
- edited
- synchronize

jobs:
main:
if: github.repository == '@chaos-design/chaos'
runs-on: ubuntu-latest
name: Semantic Pull Request
steps:
- name: Validate PR title
uses: amannn/action-semantic-pull-request@v5
with:
subjectPattern: ^(?![A-Z]).+$
subjectPatternError: |
The subject "{subject}" found in the pull request title "{title}"
didn't match the configured pattern. Please ensure that the subject
doesn't start with an uppercase character.
env:
GITHUB_TOKEN: ${{ secrets.ASSESS_TOKEN }}
134 changes: 134 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,134 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*
.pnpm-debug.log*

# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov
lib

# Coverage directory used by tools like istanbul
coverage
*.lcov

# nyc test coverage
.nyc_output

# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# Snowpack dependency directory (https://snowpack.dev/)
web_modules/

# TypeScript cache
*.tsbuildinfo

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional stylelint cache
.stylelintcache

# Microbundle cache
.rpt2_cache/
.rts2_cache_cjs/
.rts2_cache_es/
.rts2_cache_umd/

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variable files
.env
.env.development.local
.env.test.local
.env.production.local
.env.local

# parcel-bundler cache (https://parceljs.org/)
.cache
.parcel-cache

# Next.js build output
.next
out

# Nuxt.js build / generate output
.nuxt
dist

# Gatsby files
.cache/
# Comment in the public line in if your project uses Gatsby and not Next.js
# https://nextjs.org/blog/next-9-1#public-directory-support
# public

# vuepress build output
.vuepress/dist

# vuepress v2.x temp and cache directory
.temp
.cache

# Docusaurus cache and generated files
.docusaurus

# Serverless directories
.serverless/

# FuseBox cache
.fusebox/

# DynamoDB Local files
.dynamodb/

# TernJS port file
.tern-port

# Stores VSCode versions used for testing VSCode extensions
.vscode-test

# yarn v2
.yarn/cache
.yarn/unplugged
.yarn/build-state.yml
.yarn/install-state.gz
.pnp.*

# for get changed pkg path
cache-changed-pkg-path.sh
4 changes: 4 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
registry=https://registry.npmjs.org
strict-peer-dependencies=false
shell-emulator=true
auto-install-peers=false
15 changes: 15 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
packages/*/CHANGELOG.md
dist/
temp/
.github/

template-*
tsconfig.json

# markdown
LICENSE.md
README.md
CONTRIBUTING.md

pnpm-lock.yaml
pnpm-workspace.yaml
22 changes: 22 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"semi": true,
"tabWidth": 2,
"singleQuote": true,
"printWidth": 80,
"trailingComma": "all",
"overrides": [
{
"files": ["*.json5"],
"options": {
"singleQuote": false,
"quoteProps": "preserve"
}
},
{
"files": ["*.yml"],
"options": {
"singleQuote": false
}
}
]
}
9 changes: 9 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Chaos Contributing Guide

Hi! We're really excited that you're interested in contributing to chaos! Before submitting your contribution, please read through the following guide.

It is organized as a series of tasks for aspiring programmers to complete, each with a specific aim.

Here, we will introduce the contribution process for the chaos library.

## Repo Setup
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 chaos-design

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.
Loading

0 comments on commit 5e5a49f

Please sign in to comment.