Skip to content

Commit

Permalink
Post snapshot of the zap tool.
Browse files Browse the repository at this point in the history
  • Loading branch information
tecimovic committed Mar 27, 2020
1 parent 947bd85 commit b75c365
Show file tree
Hide file tree
Showing 167 changed files with 57,130 additions and 0 deletions.
19 changes: 19 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"plugins": ["@babel/plugin-syntax-dynamic-import"],
"env": {
"test": {
"plugins": ["dynamic-import-node"],
"presets": [
[
"@babel/preset-env",
{
"modules": "commonjs",
"targets": {
"node": "current"
}
}
]
]
}
}
}
9 changes: 9 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
root = true

[*]
charset = utf-8
indent_style = space
indent_size = 2
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/dist
55 changes: 55 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
module.exports = {
root: true,

parserOptions: {
parser: 'babel-eslint',
sourceType: 'module'
},

env: {
browser: true
},

extends: [
// https://eslint.vuejs.org/rules/#priority-a-essential-error-prevention
// consider switching to `plugin:vue/strongly-recommended` or `plugin:vue/recommended` for stricter rules.
'plugin:vue/essential',
'@vue/standard'
],

// required to lint *.vue files
plugins: [
'vue'
],

globals: {
'ga': true, // Google Analytics
'cordova': true,
'__statics': true,
'process': true,
'Capacitor': true,
'chrome': true
},

// add your custom rules here
rules: {
// allow async-await
'generator-star-spacing': 'off',
// allow paren-less arrow functions
'arrow-parens': 'off',
'one-var': 'off',

'import/first': 'off',
'import/named': 'error',
'import/namespace': 'error',
'import/default': 'error',
'import/export': 'error',
'import/extensions': 'off',
'import/no-unresolved': 'off',
'import/no-extraneous-dependencies': 'off',
'prefer-promise-reject-errors': 'off',

// allow debugger during development only
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off'
}
}
54 changes: 54 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
.DS_Store
.thumbs.db
node_modules

generated-html

# Temp generation file
docs/zap-schema.dot

# Quasar core related directories
.quasar
/dist

#We don't save the coverage within
#this repo.
test/jest/coverage
test/jest/__tests__/data/zap.sqlite

# Cordova related directories and files
/src-cordova/node_modules
/src-cordova/platforms
/src-cordova/plugins
/src-cordova/www

# Capacitor related directories and files
/src-capacitor/www
/src-capacitor/node_modules

# BEX related directories and files
/src-bex/www
/src-bex/js/core

# Log files
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Random test file that I keep using for the JSON output.
test.json

# Editor directories and files
.idea
.vscode
*.suo
*.ntvs*
*.njsproj
*.sln

# Sonarqube stuff
.scannerwork
sonar-project.properties

# Temporary place for handlebars stuff.
src-electron/handlebars/out/
4 changes: 4 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[submodule "zcl"]
path = zcl
url = ../zcl.git
branch = master
8 changes: 8 additions & 0 deletions .postcssrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
// https://github.com/michael-ciniawsky/postcss-load-config

module.exports = {
plugins: [
// to edit target browsers: use "browserslist" field in package.json
require('autoprefixer')
]
}
35 changes: 35 additions & 0 deletions .stylintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"blocks": "never",
"brackets": "never",
"colons": "never",
"colors": "always",
"commaSpace": "always",
"commentSpace": "always",
"cssLiteral": "never",
"depthLimit": false,
"duplicates": true,
"efficient": "always",
"extendPref": false,
"globalDupe": true,
"indentPref": 2,
"leadingZero": "never",
"maxErrors": false,
"maxWarnings": false,
"mixed": false,
"namingConvention": false,
"namingConventionStrict": false,
"none": "never",
"noImportant": false,
"parenSpace": "never",
"placeholder": false,
"prefixVarsWithDollar": "always",
"quotePref": "single",
"semicolons": "never",
"sortOrder": false,
"stackedProperties": "never",
"trailingWhitespace": "never",
"universal": "never",
"valid": true,
"zeroUnits": "never",
"zIndexNormalize": false
}
131 changes: 131 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,131 @@
pipeline
{
agent { label 'Zap-Build' }

options { buildDiscarder(logRotator(artifactNumToKeepStr: '10')) }

stages
{
stage('Git setup')
{
steps
{
script
{
checkout scm
sh 'git submodule update --init --recursive'
}
}
}
stage('Npm install')
{
steps
{
script
{
sh 'npm install'
sh 'npm list || true'
}
}
}
stage('License check')
{
steps
{
script
{
sh 'npm run lic'
}
}
}
stage('Build SPA layout for unit tests')
{
steps
{
script
{
sh 'npm run build-spa'
}
}
}
stage('Unit test execution')
{
steps
{
script
{
sh 'npm run test'
}
}
}
stage('Zap application build')
{
steps
{
script
{
sh 'npm run electron-build'
}
}
}
stage('Generate HTML documentation')
{
steps
{
script
{
sh 'npm run doc'
}
}
}
stage('Artifact creation')
{
steps
{
script
{
zip archive: true, dir: './dist/electron/zap-linux-x64', glob: '', zipFile: 'zap-linux-x64.zip'
zip archive: true, dir: './dist/electron/zap-linux-ia32', glob: '', zipFile: 'zap-linux-ia32.zip'
zip archive: true, dir: './dist/electron/zap-darwin-x64', glob: '', zipFile: 'zap-darwin-x64.zip'
zip archive: true, dir: './dist/electron/zap-win32-ia32', glob: '', zipFile: 'zap-win32-ia32.zip'
zip archive: true, dir: './dist/electron/zap-win32-x64', glob: '', zipFile: 'zap-win32-x64.zip'
archiveArtifacts artifacts:'generated-html/**', fingerprint: true
}
}
}
stage('Build status resolution')
{
steps
{
script
{
currentBuild.result = "SUCCESS"
}
}
}
}
post {
always {
script
{
def committers = emailextrecipients([[$class: 'CulpritsRecipientProvider'],
[$class: 'DevelopersRecipientProvider']])

jobName = "${currentBuild.fullDisplayName}".replace("%2","/")
if(currentBuild.result != "SUCCESS")
{
slackMessage=":zap_failure: FAILED: <${env.RUN_DISPLAY_URL}|"+jobName + ">, changes by: " + committers
slackColor='#FF0000'
slackSend (color: slackColor, channel: '#zap', message: slackMessage)
}
else
{
slackMessage=":zap_success: SUCCESS: <${env.RUN_DISPLAY_URL}|"+jobName + ">, changes by: " + committers
slackColor='good'
slackSend (color: slackColor, channel: '#zap', message: slackMessage)
}
}
cleanWs()
}
}
}
25 changes: 25 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
![ZCL Advanced Platform](src-electron/icons/zap_128x128.png)

# ZCL Advanced Platform

## Quick instructions

This is a node.js application. In order to run it, you need to have [npm](https://www.npmjs.com/) installed. Once you do, you can run:
```
npm install
```
which will download install all the project dependencies, and then run:
```
npm run zap
```

Refer to [more detailed instructions](docs/instructions.md) for more details.

## Detailed Documentation

* [Design](docs/design.md)
* [Instructions](docs/instructions.md)
* [API](docs/api.md)
* [Release notes](docs/releasenotes.md)
* [FAQ](docs/faq.md)

18 changes: 18 additions & 0 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
const fs = require('fs-extra')
let extend = undefined

/**
* The .babelrc file has been created to assist Jest for transpiling.
* You should keep your application's babel rules in this file.
*/

if (fs.existsSync('./.babelrc')) {
extend = './.babelrc'
}

module.exports = {
presets: [
'@quasar/babel-preset-app'
],
extends: extend
}
Loading

0 comments on commit b75c365

Please sign in to comment.