Skip to content

Commit 021bc95

Browse files
committed
Initial commit
0 parents  commit 021bc95

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+17704
-0
lines changed

.editorconfig

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
root = true
2+
3+
[*]
4+
end_of_line = lf
5+
indent_style = space
6+
indent_size = 2
7+
insert_final_newline = true
8+
trim_trailing_whitespace = true

.env.example

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Unused atm (jest sets this to `test`)
2+
NODE_ENV=development
3+
4+
# Debug node modules - https://nodejs.org/api/cli.html#node_debugmodule
5+
# NODE_DEBUG=
6+
7+
# Debug node native modules - https://nodejs.org/api/cli.html#node_debug_nativemodule
8+
# NODE_DEBUG_NATIVE=
9+
10+
# Path to container registry authentication file used by `skopeo`
11+
# The file has the same contents as `DOCKER_AUTH_CONFIG`
12+
# Use this command to acquire the auth file at `./tmp/auth.json`:
13+
# ```
14+
# printf 'PASSWORD' | skopeo login \
15+
# --username 'USERNAME' \
16+
# --password-stdin \
17+
# $CI_REGISTRY_IMAGE \
18+
# --authfile=./tmp/auth.json
19+
# ```
20+
# REGISTRY_AUTH_FILE=

.eslintrc

+165
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,165 @@
1+
{
2+
"env": {
3+
"browser": true,
4+
"commonjs": true,
5+
"es2021": true,
6+
"node": true,
7+
"jest": true
8+
},
9+
"parser": "@typescript-eslint/parser",
10+
"extends": [
11+
"eslint:recommended",
12+
"plugin:@typescript-eslint/recommended",
13+
"plugin:prettier/recommended",
14+
"prettier"
15+
],
16+
"plugins": [
17+
"import"
18+
],
19+
"parserOptions": {
20+
"project": "tsconfig.json",
21+
"sourceType": "module"
22+
},
23+
"rules": {
24+
"linebreak-style": ["error", "unix"],
25+
"no-empty": 1,
26+
"no-useless-catch": 1,
27+
"no-prototype-builtins": 1,
28+
"no-constant-condition": 0,
29+
"no-useless-escape": 0,
30+
"no-console": "error",
31+
"require-yield": 0,
32+
"eqeqeq": ["error", "smart"],
33+
"spaced-comment": [
34+
"warn",
35+
"always",
36+
{
37+
"line": {
38+
"exceptions": ["-"]
39+
},
40+
"block": {
41+
"exceptions": ["*"]
42+
}
43+
}
44+
],
45+
"capitalized-comments": [
46+
"warn",
47+
"always",
48+
{
49+
"ignoreInlineComments": true,
50+
"ignoreConsecutiveComments": true
51+
}
52+
],
53+
"curly": [
54+
"error",
55+
"multi-line",
56+
"consistent"
57+
],
58+
"import/order": [
59+
"error",
60+
{
61+
"groups": [
62+
"type",
63+
"builtin",
64+
"external",
65+
"internal",
66+
"index",
67+
"sibling",
68+
"parent",
69+
"object"
70+
],
71+
"pathGroups": [
72+
{
73+
"pattern": "@",
74+
"group": "internal"
75+
},
76+
{
77+
"pattern": "@/**",
78+
"group": "internal"
79+
}
80+
],
81+
"pathGroupsExcludedImportTypes": [
82+
"type"
83+
]
84+
}
85+
],
86+
"@typescript-eslint/no-namespace": 0,
87+
"@typescript-eslint/no-explicit-any": 0,
88+
"@typescript-eslint/explicit-module-boundary-types": 0,
89+
"@typescript-eslint/no-unused-vars": [
90+
"warn",
91+
{
92+
"varsIgnorePattern": "^_",
93+
"argsIgnorePattern": "^_"
94+
}
95+
],
96+
"@typescript-eslint/no-inferrable-types": 0,
97+
"@typescript-eslint/no-non-null-assertion": 0,
98+
"@typescript-eslint/no-this-alias": 0,
99+
"@typescript-eslint/no-var-requires": 0,
100+
"@typescript-eslint/no-empty-function": 0,
101+
"@typescript-eslint/no-empty-interface": 0,
102+
"@typescript-eslint/consistent-type-imports": ["error"],
103+
"@typescript-eslint/consistent-type-exports": ["error"],
104+
"no-throw-literal": "off",
105+
"@typescript-eslint/no-throw-literal": ["error"],
106+
"@typescript-eslint/no-floating-promises": ["error", {
107+
"ignoreVoid": true,
108+
"ignoreIIFE": true
109+
}],
110+
"@typescript-eslint/no-misused-promises": ["error", {
111+
"checksVoidReturn": false
112+
}],
113+
"@typescript-eslint/await-thenable": ["error"],
114+
"@typescript-eslint/naming-convention": [
115+
"error",
116+
{
117+
"selector": "default",
118+
"format": ["camelCase"],
119+
"leadingUnderscore": "allow",
120+
"trailingUnderscore": "allowSingleOrDouble"
121+
},
122+
{
123+
"selector": "function",
124+
"format": ["camelCase", "PascalCase"],
125+
"leadingUnderscore": "allow",
126+
"trailingUnderscore": "allowSingleOrDouble"
127+
},
128+
{
129+
"selector": "variable",
130+
"format": ["camelCase", "UPPER_CASE", "PascalCase"],
131+
"leadingUnderscore": "allow",
132+
"trailingUnderscore": "allowSingleOrDouble"
133+
},
134+
{
135+
"selector": "parameter",
136+
"format": ["camelCase"],
137+
"leadingUnderscore": "allow",
138+
"trailingUnderscore": "allowSingleOrDouble"
139+
},
140+
{
141+
"selector": "typeLike",
142+
"format": ["PascalCase"],
143+
"trailingUnderscore": "allowSingleOrDouble"
144+
},
145+
{
146+
"selector": "enumMember",
147+
"format": ["PascalCase", "UPPER_CASE"]
148+
},
149+
{
150+
"selector": "objectLiteralProperty",
151+
"format": null
152+
},
153+
{
154+
"selector": "typeProperty",
155+
"format": null
156+
}
157+
],
158+
"@typescript-eslint/ban-ts-comment": [
159+
"error",
160+
{
161+
"ts-ignore": "allow-with-description"
162+
}
163+
]
164+
}
165+
}
+87
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
on:
2+
push:
3+
branches:
4+
- master
5+
pull_request_target:
6+
types: [opened, synchronize, reopened]
7+
8+
name: CodeSee Map
9+
10+
jobs:
11+
test_map_action:
12+
runs-on: ubuntu-latest
13+
continue-on-error: true
14+
name: Run CodeSee Map Analysis
15+
steps:
16+
- name: checkout
17+
id: checkout
18+
uses: actions/checkout@v2
19+
with:
20+
repository: ${{ github.event.pull_request.head.repo.full_name }}
21+
ref: ${{ github.event.pull_request.head.ref }}
22+
fetch-depth: 0
23+
24+
# codesee-detect-languages has an output with id languages.
25+
- name: Detect Languages
26+
id: detect-languages
27+
uses: Codesee-io/codesee-detect-languages-action@latest
28+
29+
- name: Configure JDK 16
30+
uses: actions/setup-java@v2
31+
if: ${{ fromJSON(steps.detect-languages.outputs.languages).java }}
32+
with:
33+
java-version: '16'
34+
distribution: 'zulu'
35+
36+
# CodeSee Maps Go support uses a static binary so there's no setup step required.
37+
38+
- name: Configure Node.js 14
39+
uses: actions/setup-node@v2
40+
if: ${{ fromJSON(steps.detect-languages.outputs.languages).javascript }}
41+
with:
42+
node-version: '14'
43+
44+
- name: Configure Python 3.x
45+
uses: actions/setup-python@v2
46+
if: ${{ fromJSON(steps.detect-languages.outputs.languages).python }}
47+
with:
48+
python-version: '3.10'
49+
architecture: 'x64'
50+
51+
- name: Configure Ruby '3.x'
52+
uses: ruby/setup-ruby@v1
53+
if: ${{ fromJSON(steps.detect-languages.outputs.languages).ruby }}
54+
with:
55+
ruby-version: '3.0'
56+
57+
# We need the rust toolchain because it uses rustc and cargo to inspect the package
58+
- name: Configure Rust 1.x stable
59+
uses: actions-rs/toolchain@v1
60+
if: ${{ fromJSON(steps.detect-languages.outputs.languages).rust }}
61+
with:
62+
toolchain: stable
63+
64+
- name: Generate Map
65+
id: generate-map
66+
uses: Codesee-io/codesee-map-action@latest
67+
with:
68+
step: map
69+
api_token: ${{ secrets.CODESEE_ARCH_DIAG_API_TOKEN }}
70+
github_ref: ${{ github.ref }}
71+
languages: ${{ steps.detect-languages.outputs.languages }}
72+
73+
- name: Upload Map
74+
id: upload-map
75+
uses: Codesee-io/codesee-map-action@latest
76+
with:
77+
step: mapUpload
78+
api_token: ${{ secrets.CODESEE_ARCH_DIAG_API_TOKEN }}
79+
github_ref: ${{ github.ref }}
80+
81+
- name: Insights
82+
id: insights
83+
uses: Codesee-io/codesee-map-action@latest
84+
with:
85+
step: insights
86+
api_token: ${{ secrets.CODESEE_ARCH_DIAG_API_TOKEN }}
87+
github_ref: ${{ github.ref }}

0 commit comments

Comments
 (0)