Skip to content

Commit b75c365

Browse files
committed
Post snapshot of the zap tool.
1 parent 947bd85 commit b75c365

File tree

167 files changed

+57130
-0
lines changed

Some content is hidden

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

167 files changed

+57130
-0
lines changed

.babelrc

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"plugins": ["@babel/plugin-syntax-dynamic-import"],
3+
"env": {
4+
"test": {
5+
"plugins": ["dynamic-import-node"],
6+
"presets": [
7+
[
8+
"@babel/preset-env",
9+
{
10+
"modules": "commonjs",
11+
"targets": {
12+
"node": "current"
13+
}
14+
}
15+
]
16+
]
17+
}
18+
}
19+
}

.editorconfig

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

.eslintignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/dist

.eslintrc.js

+55
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
module.exports = {
2+
root: true,
3+
4+
parserOptions: {
5+
parser: 'babel-eslint',
6+
sourceType: 'module'
7+
},
8+
9+
env: {
10+
browser: true
11+
},
12+
13+
extends: [
14+
// https://eslint.vuejs.org/rules/#priority-a-essential-error-prevention
15+
// consider switching to `plugin:vue/strongly-recommended` or `plugin:vue/recommended` for stricter rules.
16+
'plugin:vue/essential',
17+
'@vue/standard'
18+
],
19+
20+
// required to lint *.vue files
21+
plugins: [
22+
'vue'
23+
],
24+
25+
globals: {
26+
'ga': true, // Google Analytics
27+
'cordova': true,
28+
'__statics': true,
29+
'process': true,
30+
'Capacitor': true,
31+
'chrome': true
32+
},
33+
34+
// add your custom rules here
35+
rules: {
36+
// allow async-await
37+
'generator-star-spacing': 'off',
38+
// allow paren-less arrow functions
39+
'arrow-parens': 'off',
40+
'one-var': 'off',
41+
42+
'import/first': 'off',
43+
'import/named': 'error',
44+
'import/namespace': 'error',
45+
'import/default': 'error',
46+
'import/export': 'error',
47+
'import/extensions': 'off',
48+
'import/no-unresolved': 'off',
49+
'import/no-extraneous-dependencies': 'off',
50+
'prefer-promise-reject-errors': 'off',
51+
52+
// allow debugger during development only
53+
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off'
54+
}
55+
}

.gitignore

+54
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
.DS_Store
2+
.thumbs.db
3+
node_modules
4+
5+
generated-html
6+
7+
# Temp generation file
8+
docs/zap-schema.dot
9+
10+
# Quasar core related directories
11+
.quasar
12+
/dist
13+
14+
#We don't save the coverage within
15+
#this repo.
16+
test/jest/coverage
17+
test/jest/__tests__/data/zap.sqlite
18+
19+
# Cordova related directories and files
20+
/src-cordova/node_modules
21+
/src-cordova/platforms
22+
/src-cordova/plugins
23+
/src-cordova/www
24+
25+
# Capacitor related directories and files
26+
/src-capacitor/www
27+
/src-capacitor/node_modules
28+
29+
# BEX related directories and files
30+
/src-bex/www
31+
/src-bex/js/core
32+
33+
# Log files
34+
npm-debug.log*
35+
yarn-debug.log*
36+
yarn-error.log*
37+
38+
# Random test file that I keep using for the JSON output.
39+
test.json
40+
41+
# Editor directories and files
42+
.idea
43+
.vscode
44+
*.suo
45+
*.ntvs*
46+
*.njsproj
47+
*.sln
48+
49+
# Sonarqube stuff
50+
.scannerwork
51+
sonar-project.properties
52+
53+
# Temporary place for handlebars stuff.
54+
src-electron/handlebars/out/

.gitmodules

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
[submodule "zcl"]
2+
path = zcl
3+
url = ../zcl.git
4+
branch = master

.postcssrc.js

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
// https://github.com/michael-ciniawsky/postcss-load-config
2+
3+
module.exports = {
4+
plugins: [
5+
// to edit target browsers: use "browserslist" field in package.json
6+
require('autoprefixer')
7+
]
8+
}

.stylintrc

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
{
2+
"blocks": "never",
3+
"brackets": "never",
4+
"colons": "never",
5+
"colors": "always",
6+
"commaSpace": "always",
7+
"commentSpace": "always",
8+
"cssLiteral": "never",
9+
"depthLimit": false,
10+
"duplicates": true,
11+
"efficient": "always",
12+
"extendPref": false,
13+
"globalDupe": true,
14+
"indentPref": 2,
15+
"leadingZero": "never",
16+
"maxErrors": false,
17+
"maxWarnings": false,
18+
"mixed": false,
19+
"namingConvention": false,
20+
"namingConventionStrict": false,
21+
"none": "never",
22+
"noImportant": false,
23+
"parenSpace": "never",
24+
"placeholder": false,
25+
"prefixVarsWithDollar": "always",
26+
"quotePref": "single",
27+
"semicolons": "never",
28+
"sortOrder": false,
29+
"stackedProperties": "never",
30+
"trailingWhitespace": "never",
31+
"universal": "never",
32+
"valid": true,
33+
"zeroUnits": "never",
34+
"zIndexNormalize": false
35+
}

Jenkinsfile

+131
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,131 @@
1+
pipeline
2+
{
3+
agent { label 'Zap-Build' }
4+
5+
options { buildDiscarder(logRotator(artifactNumToKeepStr: '10')) }
6+
7+
stages
8+
{
9+
stage('Git setup')
10+
{
11+
steps
12+
{
13+
script
14+
{
15+
checkout scm
16+
sh 'git submodule update --init --recursive'
17+
}
18+
}
19+
}
20+
stage('Npm install')
21+
{
22+
steps
23+
{
24+
script
25+
{
26+
sh 'npm install'
27+
sh 'npm list || true'
28+
}
29+
}
30+
}
31+
stage('License check')
32+
{
33+
steps
34+
{
35+
script
36+
{
37+
sh 'npm run lic'
38+
}
39+
}
40+
}
41+
stage('Build SPA layout for unit tests')
42+
{
43+
steps
44+
{
45+
script
46+
{
47+
sh 'npm run build-spa'
48+
}
49+
}
50+
}
51+
stage('Unit test execution')
52+
{
53+
steps
54+
{
55+
script
56+
{
57+
sh 'npm run test'
58+
}
59+
}
60+
}
61+
stage('Zap application build')
62+
{
63+
steps
64+
{
65+
script
66+
{
67+
sh 'npm run electron-build'
68+
}
69+
}
70+
}
71+
stage('Generate HTML documentation')
72+
{
73+
steps
74+
{
75+
script
76+
{
77+
sh 'npm run doc'
78+
}
79+
}
80+
}
81+
stage('Artifact creation')
82+
{
83+
steps
84+
{
85+
script
86+
{
87+
zip archive: true, dir: './dist/electron/zap-linux-x64', glob: '', zipFile: 'zap-linux-x64.zip'
88+
zip archive: true, dir: './dist/electron/zap-linux-ia32', glob: '', zipFile: 'zap-linux-ia32.zip'
89+
zip archive: true, dir: './dist/electron/zap-darwin-x64', glob: '', zipFile: 'zap-darwin-x64.zip'
90+
zip archive: true, dir: './dist/electron/zap-win32-ia32', glob: '', zipFile: 'zap-win32-ia32.zip'
91+
zip archive: true, dir: './dist/electron/zap-win32-x64', glob: '', zipFile: 'zap-win32-x64.zip'
92+
archiveArtifacts artifacts:'generated-html/**', fingerprint: true
93+
}
94+
}
95+
}
96+
stage('Build status resolution')
97+
{
98+
steps
99+
{
100+
script
101+
{
102+
currentBuild.result = "SUCCESS"
103+
}
104+
}
105+
}
106+
}
107+
post {
108+
always {
109+
script
110+
{
111+
def committers = emailextrecipients([[$class: 'CulpritsRecipientProvider'],
112+
[$class: 'DevelopersRecipientProvider']])
113+
114+
jobName = "${currentBuild.fullDisplayName}".replace("%2","/")
115+
if(currentBuild.result != "SUCCESS")
116+
{
117+
slackMessage=":zap_failure: FAILED: <${env.RUN_DISPLAY_URL}|"+jobName + ">, changes by: " + committers
118+
slackColor='#FF0000'
119+
slackSend (color: slackColor, channel: '#zap', message: slackMessage)
120+
}
121+
else
122+
{
123+
slackMessage=":zap_success: SUCCESS: <${env.RUN_DISPLAY_URL}|"+jobName + ">, changes by: " + committers
124+
slackColor='good'
125+
slackSend (color: slackColor, channel: '#zap', message: slackMessage)
126+
}
127+
}
128+
cleanWs()
129+
}
130+
}
131+
}

README.md

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
![ZCL Advanced Platform](src-electron/icons/zap_128x128.png)
2+
3+
# ZCL Advanced Platform
4+
5+
## Quick instructions
6+
7+
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:
8+
```
9+
npm install
10+
```
11+
which will download install all the project dependencies, and then run:
12+
```
13+
npm run zap
14+
```
15+
16+
Refer to [more detailed instructions](docs/instructions.md) for more details.
17+
18+
## Detailed Documentation
19+
20+
* [Design](docs/design.md)
21+
* [Instructions](docs/instructions.md)
22+
* [API](docs/api.md)
23+
* [Release notes](docs/releasenotes.md)
24+
* [FAQ](docs/faq.md)
25+

babel.config.js

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
const fs = require('fs-extra')
2+
let extend = undefined
3+
4+
/**
5+
* The .babelrc file has been created to assist Jest for transpiling.
6+
* You should keep your application's babel rules in this file.
7+
*/
8+
9+
if (fs.existsSync('./.babelrc')) {
10+
extend = './.babelrc'
11+
}
12+
13+
module.exports = {
14+
presets: [
15+
'@quasar/babel-preset-app'
16+
],
17+
extends: extend
18+
}

0 commit comments

Comments
 (0)