Skip to content

Commit

Permalink
Init
Browse files Browse the repository at this point in the history
  • Loading branch information
charlieegan3 committed Oct 5, 2023
0 parents commit 7783aa5
Show file tree
Hide file tree
Showing 18 changed files with 29,516 additions and 0 deletions.
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
dist/
46 changes: 46 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
module.exports = {
"env": {
"commonjs": true,
"es6": true,
"jest": true,
"node": true
},
extends: [
'airbnb-base',
'plugin:@typescript-eslint/recommended',
'plugin:@typescript-eslint/recommended-requiring-type-checking',
'prettier',
],
parserOptions: {
project: './tsconfig.json',
},

parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint'],
settings: {
'import/resolver': {
node: {
paths: ['src'],
extensions: ['.ts', '.js'],
},
},
},
rules: {
'import/extensions': 'off',
'import/no-extraneous-dependencies': ['error', {'devDependencies': ['**/*.test.ts']}],
'max-classes-per-file': 'off',
'max-len': 'off',
'no-await-in-loop': 'off',
'no-continue': 'off',
'no-plusplus': 'off',
'no-restricted-syntax': 'off',
'no-shadow': 'off',
'no-use-before-define': 'off',
'no-useless-constructor': 'off',
},
ignorePatterns: [
'src/generated/**/*',
'dist/**/*',
'.eslintrc.js',
],
};
6 changes: 6 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
74 changes: 74 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
name: Test Setup Regal

on:
push:
branches:
- main
pull_request:

defaults:
run:
shell: bash

jobs:
test:
name: Test Setup Regal
runs-on: ${{ matrix.os }}
strategy:
matrix:
version: ["<0.9", "0.10.0", "latest"]
os: [macos-latest, windows-latest, ubuntu-latest]
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Regal
uses: ./
with:
version: ${{ matrix.version }}

- name: Get expected version
run: |
if [ "${{ matrix.version }}" = "<0.9" ]; then
export EXPECTED_VERSION=v0.8.0
elif [ "${{ matrix.version }}" = "0.10.0" ]; then
export EXPECTED_VERSION=v0.10.0
else
# get the latest version info from the github api
export EXPECTED_VERSION=$(curl --header 'authorization: Bearer ${{ secrets.GITHUB_TOKEN }}' https://api.github.com/repos/StyraInc/regal/releases/latest | jq -r .name )
fi
echo "Expected version for ${{ matrix.version }}: $EXPECTED_VERSION"
echo "EXPECTED_VERSION=$EXPECTED_VERSION" >> $GITHUB_ENV
- name: Capture version installed
run: |
echo "VERSION_INSTALLED=$( regal version | head -1 | echo "v$(awk '{ print $2}')" )" >> $GITHUB_ENV
- name: Verify
shell: bash
run: |
if [ "$EXPECTED_VERSION" != "$VERSION_INSTALLED" ]; then
echo "Unexpected version, expected $EXPECTED_VERSION, got: $VERSION_INSTALLED"
exit 1;
fi
exit 0;
verify-dist:
name: Verify Dist Dir State
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- run: npm install

- name: Rebuild dist (npm run prepare)
run: npm run prepare

- name: Verify no dist changes
run: |
if [ -n "$(git status dist --porcelain)" ]; then
# Uncommitted changes
git status dist --porcelain
echo "::error::Uncommitted changes after npm run prepare. Run 'npm run prepare' and commit any changes to ./dist."
exit 1
fi
106 changes: 106 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-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

# 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/

# TypeScript v1 declaration files
typings/

# TypeScript cache
*.tsbuildinfo

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# 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 variables file
.env
.env.test

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

# Next.js build output
.next

# Nuxt.js build / generate output
.nuxt

# 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

# Serverless directories
.serverless/

# FuseBox cache
.fusebox/

# DynamoDB Local files
.dynamodb/

# TernJS port file
.tern-port

# IDE
.idea
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
16
3 changes: 3 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"singleQuote": true
}
Loading

0 comments on commit 7783aa5

Please sign in to comment.