Skip to content

Commit 93fc8b4

Browse files
committed
🎉 Initial commit
0 parents  commit 93fc8b4

30 files changed

+25601
-0
lines changed

.eslintignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
dist/
2+
lib/
3+
node_modules/
4+
jest.config.js

.eslintrc.json

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
{
2+
"plugins": ["jest", "@typescript-eslint", "import"],
3+
"extends": ["plugin:import/recommended", "plugin:github/recommended", "plugin:import/typescript"],
4+
"parser": "@typescript-eslint/parser",
5+
"parserOptions": {
6+
"sourceType": "module",
7+
"project": "./tsconfig.json"
8+
},
9+
"settings": {
10+
"import/extensions": [".js", ".jsx", ".ts", ".tsx"],
11+
"import/parsers": {
12+
"@typescript-eslint/parser": [".ts", ".tsx"]
13+
},
14+
"import/resolver": {
15+
"node": {
16+
"extensions": [".js", ".jsx", ".ts", ".tsx"]
17+
}
18+
}
19+
},
20+
"rules": {
21+
"import/extensions": [
22+
"error",
23+
"ignorePackages",
24+
{
25+
"js": "never",
26+
"jsx": "never",
27+
"ts": "never",
28+
"tsx": "never"
29+
}
30+
],
31+
"i18n-text/no-en": "warn",
32+
"eslint-comments/no-use": "warn",
33+
"import/no-namespace": "off",
34+
"@typescript-eslint/no-unused-vars": "error",
35+
"@typescript-eslint/explicit-member-accessibility": ["error", {"accessibility": "no-public"}],
36+
"@typescript-eslint/no-require-imports": "error",
37+
"@typescript-eslint/array-type": "error",
38+
"@typescript-eslint/await-thenable": "error",
39+
"@typescript-eslint/ban-ts-comment": "error",
40+
"camelcase": "off",
41+
"@typescript-eslint/consistent-type-assertions": "error",
42+
"@typescript-eslint/explicit-function-return-type": ["error", {"allowExpressions": true}],
43+
"@typescript-eslint/func-call-spacing": ["error", "never"],
44+
"@typescript-eslint/no-array-constructor": "error",
45+
"@typescript-eslint/no-empty-interface": "error",
46+
"@typescript-eslint/no-explicit-any": "error",
47+
"@typescript-eslint/no-extraneous-class": "error",
48+
"@typescript-eslint/no-for-in-array": "error",
49+
"@typescript-eslint/no-inferrable-types": "error",
50+
"@typescript-eslint/no-misused-new": "error",
51+
"@typescript-eslint/no-namespace": "error",
52+
"@typescript-eslint/no-non-null-assertion": "warn",
53+
"@typescript-eslint/no-unnecessary-qualifier": "error",
54+
"@typescript-eslint/no-unnecessary-type-assertion": "error",
55+
"@typescript-eslint/no-useless-constructor": "error",
56+
"@typescript-eslint/no-var-requires": "error",
57+
"@typescript-eslint/prefer-for-of": "warn",
58+
"@typescript-eslint/prefer-function-type": "warn",
59+
"@typescript-eslint/prefer-includes": "error",
60+
"@typescript-eslint/prefer-string-starts-ends-with": "error",
61+
"@typescript-eslint/promise-function-async": "error",
62+
"@typescript-eslint/require-array-sort-compare": "error",
63+
"@typescript-eslint/restrict-plus-operands": "error",
64+
"semi": "off",
65+
"@typescript-eslint/semi": ["error", "never"],
66+
"@typescript-eslint/type-annotation-spacing": "error",
67+
"@typescript-eslint/unbound-method": "error"
68+
},
69+
"env": {
70+
"node": true,
71+
"es2022": true,
72+
"jest/globals": true
73+
}
74+
}

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
dist/** -diff linguist-generated=true

.github/codeql/codeql-config.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
name: "CodeQL config"
2+
3+
paths-ignore:
4+
- node_modules
5+
- dist
6+
7+
queries:
8+
- uses: security-and-quality

.github/dependabot.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: github-actions
4+
directory: /
5+
schedule:
6+
interval: weekly
7+
day: "monday"
8+
time: "06:00"
9+
timezone: "Europe/Vienna"
10+
assignees:
11+
- "burgholzer"
12+
13+
- package-ecosystem: npm
14+
directory: /
15+
schedule:
16+
interval: weekly
17+
day: "monday"
18+
time: "06:00"
19+
timezone: "Europe/Vienna"
20+
assignees:
21+
- "burgholzer"

.github/workflows/check-dist.yml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# `dist/main.ts` is a special file in Actions.
2+
# When you reference an action with `uses:` in a workflow,
3+
# `main.ts` is the code that will run.
4+
# For our project, we generate this file through a build process from other source files.
5+
# We need to make sure the checked-in `main.ts` actually matches what we expect it to be.
6+
name: Check dist/
7+
8+
on:
9+
push:
10+
branches:
11+
- main
12+
paths-ignore:
13+
- "**.md"
14+
pull_request:
15+
paths-ignore:
16+
- "**.md"
17+
workflow_dispatch:
18+
19+
concurrency:
20+
group: ${{ github.workflow }}-${{ github.ref }}
21+
cancel-in-progress: true
22+
23+
jobs:
24+
check-dist:
25+
runs-on: ubuntu-latest
26+
27+
steps:
28+
- uses: actions/checkout@v3
29+
30+
- name: Set Node.js 16.x
31+
uses: actions/[email protected]
32+
with:
33+
node-version: 16.x
34+
35+
- name: Install dependencies
36+
run: npm ci
37+
38+
- name: Rebuild the dist/ directory
39+
run: |
40+
npm run build
41+
npm run package
42+
43+
- name: Compare the expected and actual dist/ directories
44+
run: |
45+
if [ "$(git diff --ignore-space-at-eol dist/ | wc -l)" -gt "0" ]; then
46+
echo "Detected uncommitted changes after build. See status below:"
47+
git diff
48+
exit 1
49+
fi
50+
id: diff
51+
52+
# If index.js was different from expected, upload the expected version as an artifact
53+
- uses: actions/upload-artifact@v3
54+
if: ${{ failure() && steps.diff.conclusion == 'failure' }}
55+
with:
56+
name: dist
57+
path: dist/

.github/workflows/codeql-analysis.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: "CodeQL"
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
schedule:
9+
- cron: "31 7 * * 3"
10+
11+
concurrency:
12+
group: ${{ github.workflow }}-${{ github.ref }}
13+
cancel-in-progress: true
14+
15+
jobs:
16+
analyze:
17+
name: Analyze
18+
runs-on: ubuntu-latest
19+
permissions:
20+
actions: read
21+
contents: read
22+
security-events: write
23+
24+
strategy:
25+
fail-fast: false
26+
matrix:
27+
language: ["TypeScript"]
28+
29+
steps:
30+
- name: Checkout repository
31+
uses: actions/checkout@v3
32+
33+
- name: Initialize CodeQL
34+
uses: github/codeql-action/init@v2
35+
with:
36+
languages: ${{ matrix.language }}
37+
config-file: ./.github/codeql/codeql-config.yml
38+
source-root: src
39+
40+
- name: Autobuild
41+
uses: github/codeql-action/autobuild@v2
42+
43+
- name: Perform CodeQL Analysis
44+
uses: github/codeql-action/analyze@v2

.github/workflows/release.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Release
2+
3+
on:
4+
release:
5+
branches: main
6+
types: [published]
7+
workflow_dispatch:
8+
inputs:
9+
tag:
10+
description: "Which tag to update to"
11+
default: "v1"
12+
required: true
13+
14+
jobs:
15+
re-tag:
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/checkout@v3
19+
with:
20+
fetch-depth: 0
21+
- name: update tag
22+
run: |
23+
git config user.name 'github-actions'
24+
git config user.email '41898282+github-actions[bot]@users.noreply.github.com'
25+
git tag --delete ${{ inputs.tag }} || true
26+
git push --delete origin ${{ inputs.tag }} || true
27+
git tag -a ${{ inputs.tag }} -m '🔖 Re-tag ${{ inputs.tag }}'
28+
git push origin ${{ inputs.tag }}

.github/workflows/test.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: "units-test"
2+
on:
3+
pull_request:
4+
push:
5+
branches:
6+
- main
7+
- "releases/*"
8+
9+
concurrency:
10+
group: ${{ github.workflow }}-${{ github.ref }}
11+
cancel-in-progress: true
12+
13+
jobs:
14+
# unit tests
15+
units:
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/checkout@v3
19+
- run: npm ci
20+
- run: npm run all
21+
22+
# test action works running from the graph
23+
test:
24+
runs-on: ubuntu-latest
25+
steps:
26+
- uses: actions/checkout@v3
27+
- uses: ./
28+
id: z3
29+
- run: echo ${{ steps.z3.outputs.z3-root }}

.gitignore

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

0 commit comments

Comments
 (0)