Skip to content

Commit

Permalink
add apps/connector (#589)
Browse files Browse the repository at this point in the history
* add `apps/connector`

---------

Co-authored-by: Jakub Kotula <[email protected]>
Co-authored-by: Felicio Mununga <[email protected]>
Co-authored-by: pavel <[email protected]>
Co-authored-by: marcelines <[email protected]>
  • Loading branch information
4 people authored Oct 3, 2024
1 parent 273db4e commit 006d57f
Show file tree
Hide file tree
Showing 50 changed files with 10,178 additions and 0 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@ This monorepo contains packages for building web applications in the Status ecos
| [`@status-im/colors`](./packages/colors) | [![npm version](https://img.shields.io/npm/v/@status-im/colors.svg)](https://www.npmjs.com/package/@status-im/colors) | Auto-generated color palette based on our [design system](https://www.figma.com/design/v98g9ZiaSHYUdKWrbFg9eM/Foundations?node-id=619-5995&node-type=canvas&m=dev). |
| [`@status-im/eslint-config`](./packages/eslint-config) | | Shared ESLint configuration for consistent code style across projects. |

## Apps

| Name | Description |
| -------------------------------------- | ----------------------------------------------------------------------------- |
| [`./apps/connector`](./apps/connector) | Status Desktop Wallet extended to decentralised applications in your browser. |

## Prerequisites

Required:
Expand Down
39 changes: 39 additions & 0 deletions apps/connector/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
module.exports = {
root: true,
overrides: [
{
files: ['*.ts', '*.tsx'],
extends: ['@status-im/eslint-config', 'plugin:tailwindcss/recommended'],

rules: {
'no-constant-binary-expression': 'error',
'no-restricted-globals': ['error', 'process'],
'jsx-a11y/alt-text': [
1,
{
img: [],
},
],
},
},
{
// parser: 'esprima',
files: ['*.mjs'],
// env: {
// browser: true,
// es2021: true,
// },
// extends: ['eslint:recommended', 'plugin:import/recommended'],
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
},
},
{
files: ['*.js'],
parserOptions: {
ecmaVersion: 'latest',
},
},
],
}
42 changes: 42 additions & 0 deletions apps/connector/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@

# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.js

# testing
/coverage

#cache
.turbo

# misc
.DS_Store
*.pem

# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*
.pnpm-debug.log*

# local env files
!.env.*
.env*.local

out/
build/
dist/

# plasmo - https://www.plasmo.com
.plasmo

# bpp - http://bpp.browser.market/
keys.json

# typescript
*.tsbuildinfo

apps/
7 changes: 7 additions & 0 deletions apps/connector/.prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"semi": false,
"singleQuote": true,
"arrowParens": "avoid",
"tailwindConfig": "./tailwind.config.ts",
"endOfLine": "auto"
}
26 changes: 26 additions & 0 deletions apps/connector/.prettierrc.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
/**
* @type {import('prettier').Options}
*/
export default {
printWidth: 80,
tabWidth: 2,
useTabs: false,
semi: false,
singleQuote: false,
trailingComma: 'none',
bracketSpacing: true,
bracketSameLine: true,
plugins: ['@ianvs/prettier-plugin-sort-imports'],
importOrder: [
'<BUILTIN_MODULES>', // Node.js built-in modules
'<THIRD_PARTY_MODULES>', // Imports not matched by other special words or groups.
'', // Empty line
'^@plasmo/(.*)$',
'',
'^@plasmohq/(.*)$',
'',
'^~(.*)$',
'',
'^[./]',
],
}
73 changes: 73 additions & 0 deletions apps/connector/Jenkinsfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
#!/usr/bin/env groovy
library '[email protected]'

pipeline {
agent { label 'linux' }

options {
timestamps()
/* Prevent Jenkins jobs from running forever */
timeout(time: 10, unit: 'MINUTES')
/* manage how many builds we keep */
buildDiscarder(logRotator(
numToKeepStr: '20',
daysToKeepStr: '30',
))
disableConcurrentBuilds()
}

environment {
PLATFORM = 'chrome'
ZIP_NAME = utils.pkgFilename(
type: 'Extension',
version: 'none',
arch: 'chrome',
ext: 'zip',
)
}

stages {
stage('Install') {
steps { script {
nix.shell('yarn install --frozen-lockfile', pure: false)
} }
}

stage('Build') {
steps { script {
nix.shell('yarn build:chrome', pure: false)
} }
}

stage('Zip') {
steps {
zip(
zipFile: env.ZIP_NAME,
dir: 'build/chrome-mv3-prod',
archive: false,
)
}
}

stage('Archive') {
steps {
archiveArtifacts(
artifacts: env.ZIP_NAME,
fingerprint: true,
)
}
}

stage('Upload') {
steps { script {
env.PKG_URL = s5cmd.upload(env.ZIP_NAME)
} }
}
}

post {
success { script { github.notifyPR(true) } }
failure { script { github.notifyPR(false) } }
cleanup { cleanWs() }
}
}
Loading

0 comments on commit 006d57f

Please sign in to comment.