Skip to content

Commit f4d4e71

Browse files
committed
chore: initial import
0 parents  commit f4d4e71

21 files changed

+3652
-0
lines changed

.editorconfig

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# EditorConfig is awesome: http://EditorConfig.org
2+
3+
# https://github.com/jokeyrhyme/standard-editorconfig
4+
5+
# top-most EditorConfig file
6+
root = true
7+
8+
# defaults
9+
[*]
10+
charset = utf-8
11+
end_of_line = lf
12+
insert_final_newline = true
13+
trim_trailing_whitespace = true
14+
indent_size = 2
15+
indent_style = space
16+
17+
[*.md]
18+
trim_trailing_whitespace = false

.eslintignore

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
build
2+
*.config.js
3+
__mocks__
4+
coverage

.eslintrc.json

+90
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
{
2+
"root": true,
3+
"env": {
4+
"es2021": true,
5+
"node": true,
6+
"browser": false
7+
},
8+
"extends": [
9+
"eslint:recommended",
10+
/** @see https://github.com/typescript-eslint/typescript-eslint/tree/master/packages/eslint-plugin#recommended-configs */
11+
"plugin:@typescript-eslint/recommended",
12+
"plugin:import/recommended",
13+
"plugin:import/typescript",
14+
"plugin:etc/recommended",
15+
"plugin:sonarjs/recommended"
16+
],
17+
"parser": "@typescript-eslint/parser",
18+
"parserOptions": {
19+
"ecmaVersion": 12,
20+
"sourceType": "module",
21+
"project": [
22+
"./tsconfig.json"
23+
]
24+
},
25+
"settings": {
26+
"import/resolver": {
27+
"typescript": true,
28+
"node": true,
29+
"eslint-import-resolver-custom-alias": {
30+
"alias": {
31+
"/@": "./src",
32+
"/@gen": "./src-generated"
33+
},
34+
"extensions": [".ts"],
35+
"packages": ["packages/*", "extensions/*"]
36+
}
37+
}
38+
},
39+
"plugins": ["@typescript-eslint", "sonarjs", "etc", "redundant-undefined"],
40+
"ignorePatterns": [
41+
"node_modules/**",
42+
"**/dist/**"
43+
],
44+
"rules": {
45+
"@typescript-eslint/no-unused-vars": "error",
46+
"@typescript-eslint/no-var-requires": "off",
47+
"@typescript-eslint/consistent-type-imports": "error",
48+
"@typescript-eslint/no-explicit-any": "error",
49+
"prefer-promise-reject-errors": "error",
50+
"@typescript-eslint/await-thenable": "error",
51+
"@typescript-eslint/no-floating-promises": "error",
52+
"@typescript-eslint/no-misused-promises": "error",
53+
"@typescript-eslint/prefer-optional-chain": "error",
54+
55+
/**
56+
* Having a semicolon helps the optimizer interpret your code correctly.
57+
* This avoids rare errors in optimized code.
58+
* @see https://twitter.com/alex_kozack/status/1364210394328408066
59+
*/
60+
"semi": [
61+
"error",
62+
"always"
63+
],
64+
/**
65+
* This will make the history of changes in the hit a little cleaner
66+
*/
67+
"comma-dangle": [
68+
"warn",
69+
"always-multiline"
70+
],
71+
/**
72+
* Just for beauty
73+
*/
74+
"quotes": [
75+
"warn", "single"
76+
],
77+
"import/no-duplicates" : "error",
78+
"import/no-unresolved": "off",
79+
"import/default": "off",
80+
"import/no-named-as-default-member": "off",
81+
"import/no-named-as-default": "off",
82+
"sonarjs/cognitive-complexity": "off",
83+
"sonarjs/no-duplicate-string": "off",
84+
"sonarjs/no-empty-collection": "off",
85+
"sonarjs/no-small-switch": "off",
86+
"etc/no-commented-out-code": "error",
87+
"etc/no-deprecated": "off",
88+
"redundant-undefined/redundant-undefined": "error"
89+
}
90+
}

.github/workflows/build-next.yaml

+67
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
#
2+
# Copyright (C) 2023 Red Hat, Inc.
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
#
16+
# SPDX-License-Identifier: Apache-2.0
17+
18+
name: CI
19+
20+
on:
21+
push:
22+
branches:
23+
- 'main'
24+
25+
jobs:
26+
build:
27+
runs-on: ubuntu-22.04
28+
steps:
29+
- uses: actions/checkout@v3
30+
31+
- uses: actions/setup-node@v3
32+
with:
33+
node-version: 18
34+
35+
# disable cache for now to not store any resource on private repo
36+
# - name: Get yarn cache directory path
37+
# id: yarn-cache-dir-path
38+
# run: echo "dir=$(npx yarn cache dir)" >> ${GITHUB_OUTPUT}
39+
#
40+
# - uses: actions/cache@v3
41+
# id: yarn-cache
42+
# with:
43+
# path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
44+
# key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
45+
# restore-keys: |
46+
# ${{ runner.os }}-yarn-
47+
48+
- name: Execute yarn
49+
if: ${{ steps.cacheNodeModules.outputs.cache-hit != 'true' }}
50+
run: npx yarn --frozen-lockfile --network-timeout 180000
51+
52+
- name: Run Build
53+
run: npx yarn build
54+
55+
- name: Login to quay.io
56+
run: podman login --username ${{ secrets.QUAY_USERNAME }} --password ${{ secrets.QUAY_PASSWORD }} quay.io
57+
58+
- name: Publish Image
59+
id: publish-image
60+
run: |
61+
IMAGE_NAME=quay.io/bootsy/bootc-extension
62+
IMAGE_LATEST=${IMAGE_NAME}:latest
63+
IMAGE_SHA=${IMAGE_NAME}:${GITHUB_SHA}
64+
podman build -t $IMAGE_LATEST .
65+
podman push $IMAGE_LATEST
66+
podman tag $IMAGE_LATEST $IMAGE_SHA
67+
podman push $IMAGE_SHA

.gitignore

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
node_modules
2+
.DS_Store
3+
dist
4+
.eslintcache
5+
**/coverage

.prettierrc

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"bracketSameLine": true,
3+
"singleQuote": true,
4+
"arrowParens": "avoid",
5+
"printWidth": 120,
6+
"trailingComma": "all"
7+
}
8+

.yarnrc

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
ignore-engines true

Containerfile

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
#
2+
# Copyright (C) 2024 Red Hat, Inc.
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
#
16+
# SPDX-License-Identifier: Apache-2.0
17+
18+
FROM scratch as builder
19+
COPY dist/ /extension/dist
20+
COPY package.json /extension/
21+
COPY LICENSE /extension/
22+
COPY icon.png /extension/
23+
COPY README.md /extension/
24+
25+
26+
FROM scratch
27+
28+
LABEL org.opencontainers.image.title="Boot-c extension" \
29+
org.opencontainers.image.description="Boot-c extension" \
30+
org.opencontainers.image.vendor="Red Hat" \
31+
io.podman-desktop.api.version=">= 1.6.0"
32+
33+
COPY --from=builder /extension /extension

0 commit comments

Comments
 (0)