Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature/prepare manifest v3 migration #61

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .babelrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
{
"presets": ["@babel/preset-env"]
"presets": ["@babel/preset-env"],
"plugins": [
["@babel/plugin-proposal-decorators", { "legacy": true }]
]
}
15 changes: 15 additions & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# inlined shared variables, no needs of encryption

[[ -z "$GITHUB_WORKSPACE" ]] &&
source_up

[[ -z "$(command -v nix)" ]] &&
return

set -a
TAG_VERSION=0.0.0
set +a

pushd .nix
use flake . --impure
popd
56 changes: 56 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
{
"parser": "@babel/eslint-parser",
"parserOptions": {
"ecmaVersion": 2022,
"ecmaFeatures": {
"legacyDecorators": true,
"importAssertions": true
}
},
"extends": [
"eslint:recommended",
"airbnb-base"
],
"rules": {
"func-names": 0,
"indent": ["error", 2],
"import/no-extraneous-dependencies": ["error", {"devDependencies": ["**/*"]}],
"max-len": [2, 120, 2, {
"ignoreUrls": true,
"ignoreTemplateLiterals": true,
"ignoreRegExpLiterals": true,
"ignoreStrings": true,
"ignoreComments": false
}],
"no-console": 0,
"no-else-return": 0,
"no-multi-assign": 0,
"no-param-reassign": 0,
"no-throw-literal": 0,
"no-tabs": 0,
"no-underscore-dangle": 0,
"no-unused-expressions": 0,
"no-use-before-define": ["error", {"variables": false}],
"no-useless-escape": 0,
"operator-linebreak": "off",
"prefer-destructuring": ["error", {
"array": false,
"object": false
}, {
"enforceForRenamedProperties": false
}],
"radix": 0,
"wrap-iife": [2, "inside"]
},
"globals": {
"chrome": true,
"browser": true,
"app": true,
"navigator": true,
"window": true,
"document": true,
"Nuxeo": true,
"disableTabExtension": true,
"hljs": true
}
}
86 changes: 86 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
name: CI Build

on:
pull_request:

push:
branches:
- 'master'
- 'develop' # gitflow mainly on hosted runner

workflow_dispatch:
inputs:
ref:
description: git tag reference to build
required: true
type: string

workflow_call:
inputs:
ref:
description: git tag reference to build
required: true
type: string

jobs:
deploy:
permissions:
checks: write
contents: read
id-token: write
packages: write
pull-requests: write
statuses: write
runs-on:
- ${{ github.repository_owner != github.actor && 'ubuntu-latest' || 'self-hosted' }}

steps:

- name: Checkout Commit
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Setup Node
uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'

- name: Install pnpm
run: |
corepack enable
corepack prepare pnpm@next-8 --activate

- name: Install dependencies
run: pnpm install

- name: Build
run: pnpm build:chrome

- name: Zip the packages
run: |
pushd dist
zip -r chrome.zip chrome
popd

- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: false

- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./dist/chrome.zip
asset_name: chrome.zip
asset_content_type: application/zip
35 changes: 35 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: CI Build

on:
pull_request:

push:
branches:
- 'master'
- 'develop' # gitflow mainly on hosted runner

workflow_dispatch:
inputs:
ref:
description: git tag reference to build
required: true
type: string

workflow_call:
inputs:
ref:
description: git tag reference to build
required: true
type: string

jobs:
deploy:
runs-on:
- ${{ github.repository_owner != github.actor && 'ubuntu-latest' || 'self-hosted' }}

steps:

- name: Checkout Commit
uses: actions/checkout@v3
with:
fetch-depth: 0
9 changes: 6 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
node_modules
temp
.tmp
build
dist
.sass-cache
.npmrc
bower_components
package
app/scripts
app/vendor
npm-debug.log
target
test*/screenshots/*.png
Expand All @@ -17,4 +16,8 @@ ftest/src/test/resources/instance.clid
.project
ftest/.settings/
selenium-standalone.txt
.local
.local
.nix/.devenv
.env.chrome
.env.firefox
.env.local
3 changes: 0 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +0,0 @@
[submodule "make.d"]
path = make.d
url = https://github.com/nuxeo/nos-jx-make.d.git
14 changes: 14 additions & 0 deletions .hintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"extends": [
"development"
],
"hints": {
"meta-viewport": "off",
"axe/language": [
"default",
{
"html-has-lang": "off"
}
]
}
}
10 changes: 10 additions & 0 deletions .nix/.envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
if ! has nix_direnv_version || ! nix_direnv_version 2.2.1; then
source_url "https://raw.githubusercontent.com/nix-community/nix-direnv/2.2.1/direnvrc" "sha256-zelF0vLbEl5uaqrfIzbgNzJWGmLzCmYAkInj/LNxvKs="
fi

nix_direnv_watch_file flake.nix
nix_direnv_watch_file flake.lock
if ! use flake . --impure
then
echo "devenv could not be built. The devenv environment was not loaded. Make the necessary changes to devenv.nix and hit enter to try again." >&2
fi
1 change: 1 addition & 0 deletions .nix/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.devenv
Loading
Loading