qcobjectsnewapp 2.4.10 → 2.4.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.dockerignore +98 -1
- package/.eslintignore +4 -0
- package/.eslintrc.cjs +21 -0
- package/.gitlab-ci.yml +9 -10
- package/.hintrc +8 -0
- package/.prettierignore +7 -0
- package/Dockerfile +3 -5
- package/README.md +99 -2
- package/VERSION +1 -1
- package/_redirects +3 -1
- package/config.json +13 -0
- package/package.json +79 -18
- package/{index.html → src/index.html} +6 -7
- package/src/js/config.ts +24 -0
- package/src/js/init.ts +27 -0
- package/{js/packages/com.qcobjects.installer.js → src/js/packages/com.qcobjects.installer.ts} +42 -15
- package/{js/packages/com.qcobjects.services.github.js → src/js/packages/com.qcobjects.services.github.ts} +63 -6
- package/{js/packages/org.quickcorp.custom.components.js → src/js/packages/org.quickcorp.custom.components.ts} +3 -0
- package/src/js/packages/org.quickcorp.custom.controllers.ts +112 -0
- package/{js/packages/org.quickcorp.custom.effects.js → src/js/packages/org.quickcorp.custom.effects.ts} +3 -0
- package/{js/packages/org.quickcorp.custom.models.js → src/js/packages/org.quickcorp.custom.models.ts} +3 -0
- package/src/js/packages/org.quickcorp.custom.ts +9 -0
- package/src/js/packages/org.quickcorp.custom.views.ts +19 -0
- package/src/js/types/global.d.ts +25 -0
- package/{manifest.json → src/manifest.json} +20 -6
- package/src/templates/components/blank.tpl.html +0 -0
- package/tsconfig.json +23 -0
- package/.eslintrc.js +0 -7
- package/js/init.js +0 -58
- package/js/packages/org.quickcorp.custom.controllers.js +0 -115
- package/js/packages/org.quickcorp.custom.js +0 -8
- package/js/packages/org.quickcorp.custom.views.js +0 -14
- /package/{app.js → backend/app.js} +0 -0
- /package/{css → src/css}/components/button.css +0 -0
- /package/{css → src/css}/components/card.css +0 -0
- /package/{css → src/css}/components/github-grid-landscape.css +0 -0
- /package/{css → src/css}/components/github-grid-portrait.css +0 -0
- /package/{css → src/css}/components/hero/hero-call-to-action.css +0 -0
- /package/{css → src/css}/components/hero/hero-overlay.css +0 -0
- /package/{css → src/css}/components/hero/hero-two-column-form.css +0 -0
- /package/{css → src/css}/components/modal.css +0 -0
- /package/{css → src/css}/desktop/container.css +0 -0
- /package/{css → src/css}/desktop/content.css +0 -0
- /package/{css → src/css}/desktop/footer.css +0 -0
- /package/{css → src/css}/desktop/index.css +0 -0
- /package/{css → src/css}/desktop/navbar.css +0 -0
- /package/{css → src/css}/desktop/sidebar.css +0 -0
- /package/{css → src/css}/index.css +0 -0
- /package/{css → src/css}/mobile/content.css +0 -0
- /package/{css → src/css}/mobile/footer.css +0 -0
- /package/{css → src/css}/mobile/index.css +0 -0
- /package/{css → src/css}/mobile/navbar.css +0 -0
- /package/{css → src/css}/mobile/sidebar.css +0 -0
- /package/{css → src/css}/modern-base.css +0 -0
- /package/{css → src/css}/theme/basic/style.css +0 -0
- /package/{css → src/css}/theme/cyan/style.css +0 -0
- /package/{css → src/css}/theme/redlight/style.css +0 -0
- /package/{css → src/css}/theme/xtra/style.css +0 -0
- /package/{favicon.ico → src/favicon.ico} +0 -0
- /package/{humans.txt → src/humans.txt} +0 -0
- /package/{img → src/img}/Q_web copy.png +0 -0
- /package/{img → src/img}/Q_web-white.png +0 -0
- /package/{img → src/img}/Q_web.png +0 -0
- /package/{img → src/img}/Q_web.svg +0 -0
- /package/{img → src/img}/icons/icon-128x128.png +0 -0
- /package/{img → src/img}/icons/icon-144x144.png +0 -0
- /package/{img → src/img}/icons/icon-152x152.png +0 -0
- /package/{img → src/img}/icons/icon-192x192.png +0 -0
- /package/{img → src/img}/icons/icon-384x384.png +0 -0
- /package/{img → src/img}/icons/icon-512x512.png +0 -0
- /package/{img → src/img}/icons/icon-72x72.png +0 -0
- /package/{img → src/img}/icons/icon-96x96.png +0 -0
- /package/{img → src/img}/logo-qcobjects-version.svg +0 -0
- /package/{img → src/img}/logo-qcobjects-white-powered-quickcorp.svg +0 -0
- /package/{img → src/img}/logo-qcobjects-white.svg +0 -0
- /package/{img → src/img}/logo.png +0 -0
- /package/{img → src/img}/octocat.svg +0 -0
- /package/{img → src/img}/placeholder.svg +0 -0
- /package/{img → src/img}/screenshots/screenshot1.png +0 -0
- /package/{img → src/img}/screenshots/screenshot1.webp +0 -0
- /package/{img → src/img}/screenshots/screenshot2.png +0 -0
- /package/{img → src/img}/screenshots/screenshot2.webp +0 -0
- /package/{templates/components/blank.tpl.html → src/js/types/init.d.ts} +0 -0
- /package/{robots.txt → src/robots.txt} +0 -0
- /package/{sw.js → src/sw.js} +0 -0
- /package/{templates → src/templates}/components/article1.tpl.html +0 -0
- /package/{templates → src/templates}/components/article2.tpl.html +0 -0
- /package/{templates → src/templates}/components/card.tpl.html +0 -0
- /package/{templates → src/templates}/components/contentblock.tpl.html +0 -0
- /package/{templates → src/templates}/components/footer.tpl.html +0 -0
- /package/{templates → src/templates}/components/footer2.tpl.html +0 -0
- /package/{templates → src/templates}/components/github-card.tpl.html +0 -0
- /package/{templates → src/templates}/components/header.tpl.html +0 -0
- /package/{templates → src/templates}/components/hero/hero-call-to-action.tpl.html +0 -0
- /package/{templates → src/templates}/components/hero/hero-overlay.tpl.html +0 -0
- /package/{templates → src/templates}/components/hero/hero-two-column-form.tpl.html +0 -0
- /package/{templates → src/templates}/components/install-button.tpl.html +0 -0
- /package/{templates → src/templates}/components/layout-basic.tpl.html +0 -0
- /package/{templates → src/templates}/components/loading.tpl.html +0 -0
- /package/{templates → src/templates}/components/loadingfooter.tpl.html +0 -0
- /package/{templates → src/templates}/components/login-button.tpl.html +0 -0
- /package/{templates → src/templates}/components/login2.tpl.html +0 -0
- /package/{templates → src/templates}/components/loginform.tpl.html +0 -0
- /package/{templates → src/templates}/components/modal.tpl.html +0 -0
- /package/{templates → src/templates}/components/nav.tpl.html +0 -0
- /package/{templates → src/templates}/components/octocat-icon.tpl.html +0 -0
- /package/{templates → src/templates}/components/pages/about-of.tpl.html +0 -0
- /package/{templates → src/templates}/components/pages/author.tpl.html +0 -0
- /package/{templates → src/templates}/components/pages/page1.tpl.html +0 -0
- /package/{templates → src/templates}/components/pages/page2.tpl.html +0 -0
- /package/{templates → src/templates}/components/pages/page3.tpl.html +0 -0
- /package/{templates → src/templates}/components/pages/qcobjects-forks-stars.tpl.html +0 -0
- /package/{templates → src/templates}/components/product.tpl.html +0 -0
- /package/{templates → src/templates}/components/profile.tpl.html +0 -0
- /package/{templates → src/templates}/components/section1.tpl.html +0 -0
- /package/{templates → src/templates}/components/section2.tpl.html +0 -0
- /package/{templates → src/templates}/components/shadowed-card.tpl.html +0 -0
- /package/{templates → src/templates}/components/signin-button.tpl.html +0 -0
- /package/{templates → src/templates}/components/signup-form.tpl.html +0 -0
- /package/{templates → src/templates}/components/signup.tpl.html +0 -0
- /package/{templates → src/templates}/components/signupbuttons.tpl.html +0 -0
- /package/{templates → src/templates}/components/signupform.tpl.html +0 -0
- /package/{templates → src/templates}/components/signuppage.tpl.html +0 -0
- /package/{templates → src/templates}/components/signupsuccessful.tpl.html +0 -0
- /package/{templates → src/templates}/components/signupsuccessfulfooter.tpl.html +0 -0
- /package/{templates → src/templates}/components/splashscreen.tpl.html +0 -0
- /package/{templates → src/templates}/components/topmenu.tpl.html +0 -0
package/.dockerignore
CHANGED
|
@@ -1,2 +1,99 @@
|
|
|
1
|
+
.DS_Store
|
|
2
|
+
build
|
|
3
|
+
public
|
|
4
|
+
dist
|
|
5
|
+
.parcel*
|
|
6
|
+
.husky
|
|
7
|
+
hint-report
|
|
8
|
+
# Logs
|
|
9
|
+
logs
|
|
10
|
+
*.log
|
|
11
|
+
npm-debug.log*
|
|
12
|
+
yarn-debug.log*
|
|
13
|
+
yarn-error.log*
|
|
14
|
+
lerna-debug.log*
|
|
15
|
+
|
|
16
|
+
# Certificates
|
|
17
|
+
*.pem
|
|
18
|
+
# Diagnostic reports (https://nodejs.org/api/report.html)
|
|
19
|
+
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
|
|
20
|
+
|
|
21
|
+
# Runtime data
|
|
22
|
+
pids
|
|
23
|
+
*.pid
|
|
24
|
+
*.seed
|
|
25
|
+
*.pid.lock
|
|
26
|
+
|
|
27
|
+
# Directory for instrumented libs generated by jscoverage/JSCover
|
|
28
|
+
lib-cov
|
|
29
|
+
|
|
30
|
+
# Coverage directory used by tools like istanbul
|
|
31
|
+
coverage
|
|
32
|
+
*.lcov
|
|
33
|
+
|
|
34
|
+
# nyc test coverage
|
|
35
|
+
.nyc_output
|
|
36
|
+
|
|
37
|
+
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
|
|
38
|
+
.grunt
|
|
39
|
+
|
|
40
|
+
# Bower dependency directory (https://bower.io/)
|
|
41
|
+
bower_components
|
|
42
|
+
|
|
43
|
+
# node-waf configuration
|
|
44
|
+
.lock-wscript
|
|
45
|
+
|
|
46
|
+
# Compiled binary addons (https://nodejs.org/api/addons.html)
|
|
47
|
+
build/Release
|
|
48
|
+
|
|
49
|
+
# Dependency directories
|
|
50
|
+
**/node_modules
|
|
1
51
|
node_modules
|
|
2
|
-
|
|
52
|
+
node_modules/
|
|
53
|
+
jspm_packages/
|
|
54
|
+
|
|
55
|
+
# TypeScript v1 declaration files
|
|
56
|
+
typings/
|
|
57
|
+
|
|
58
|
+
# TypeScript cache
|
|
59
|
+
*.tsbuildinfo
|
|
60
|
+
|
|
61
|
+
# Optional npm cache directory
|
|
62
|
+
.npm
|
|
63
|
+
|
|
64
|
+
# Optional eslint cache
|
|
65
|
+
.eslintcache
|
|
66
|
+
|
|
67
|
+
# Optional REPL history
|
|
68
|
+
.node_repl_history
|
|
69
|
+
|
|
70
|
+
# Output of 'npm pack'
|
|
71
|
+
*.tgz
|
|
72
|
+
|
|
73
|
+
# Yarn Integrity file
|
|
74
|
+
.yarn-integrity
|
|
75
|
+
|
|
76
|
+
# dotenv environment variables file
|
|
77
|
+
.env
|
|
78
|
+
.env.test
|
|
79
|
+
|
|
80
|
+
# parcel-bundler cache (https://parceljs.org/)
|
|
81
|
+
.cache
|
|
82
|
+
|
|
83
|
+
# next.js build output
|
|
84
|
+
.next
|
|
85
|
+
|
|
86
|
+
# nuxt.js build output
|
|
87
|
+
.nuxt
|
|
88
|
+
|
|
89
|
+
# vuepress build output
|
|
90
|
+
.vuepress/dist
|
|
91
|
+
|
|
92
|
+
# Serverless directories
|
|
93
|
+
.serverless/
|
|
94
|
+
|
|
95
|
+
# FuseBox cache
|
|
96
|
+
.fusebox/
|
|
97
|
+
|
|
98
|
+
# DynamoDB Local files
|
|
99
|
+
.dynamodb/
|
package/.eslintignore
ADDED
package/.eslintrc.cjs
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
env: {
|
|
3
|
+
browser: true,
|
|
4
|
+
node: true,
|
|
5
|
+
es2021: true,
|
|
6
|
+
es2020: true,
|
|
7
|
+
es2017: true,
|
|
8
|
+
es6: true
|
|
9
|
+
},
|
|
10
|
+
|
|
11
|
+
extends: [
|
|
12
|
+
"eslint-config-semistandard",
|
|
13
|
+
"standard",
|
|
14
|
+
"prettier",
|
|
15
|
+
"eslint:recommended", "plugin:@typescript-eslint/recommended",
|
|
16
|
+
"qcobjects"
|
|
17
|
+
],
|
|
18
|
+
parser: "@typescript-eslint/parser",
|
|
19
|
+
plugins: ["@typescript-eslint"],
|
|
20
|
+
root: true
|
|
21
|
+
};
|
package/.gitlab-ci.yml
CHANGED
|
@@ -3,20 +3,19 @@ image: quickcorp/qcobjects:latest
|
|
|
3
3
|
pages:
|
|
4
4
|
stage: deploy
|
|
5
5
|
script:
|
|
6
|
-
- mkdir public
|
|
7
|
-
- cp -Rf css/ public/
|
|
8
|
-
- cp -Rf img/ public/
|
|
9
|
-
- cp -Rf js/ public/
|
|
10
|
-
- cp -Rf spec/ public/
|
|
11
|
-
- cp -Rf templates/ public/
|
|
12
|
-
- cp *.* public/
|
|
13
|
-
- cp _redirects public/
|
|
14
|
-
- cd public
|
|
15
6
|
- npm i qcobjects && npm i -D eslint-config-qcobjects
|
|
16
|
-
- npm
|
|
7
|
+
- npm ci
|
|
17
8
|
- npm test
|
|
9
|
+
- mkdir public
|
|
10
|
+
- npm run publish:web
|
|
11
|
+
- cp _redirects public/
|
|
12
|
+
- cp -r node_modules/qcobjects-sdk public/qcobjects-sdk
|
|
13
|
+
# Build the public/ directory first
|
|
14
|
+
- find public -type f -regex '.*\.\(htm\|html\|txt\|text\|js\|css\)$' -exec gzip -f -k {} \;
|
|
18
15
|
artifacts:
|
|
19
16
|
paths:
|
|
17
|
+
- node_modules/qcobjects-sdk
|
|
18
|
+
- build
|
|
20
19
|
- public
|
|
21
20
|
only:
|
|
22
21
|
- main
|
package/.hintrc
ADDED
package/.prettierignore
ADDED
package/Dockerfile
CHANGED
|
@@ -35,8 +35,6 @@ ENV container docker
|
|
|
35
35
|
|
|
36
36
|
RUN npm i -g qcobjects qcobjects-sdk qcobjects-cli
|
|
37
37
|
|
|
38
|
-
USER qcobjects
|
|
39
|
-
|
|
40
38
|
#Configure the internal user permissions
|
|
41
39
|
RUN mkdir -p /home/qcobjects/app && chown -R qcobjects:qcobjects /home/qcobjects/app
|
|
42
40
|
|
|
@@ -49,14 +47,14 @@ COPY package*.json ./
|
|
|
49
47
|
#Run the initial install init scripts for jasmine and cache verify
|
|
50
48
|
#RUN jasmine init
|
|
51
49
|
RUN npm cache verify
|
|
52
|
-
RUN npm
|
|
53
|
-
|
|
50
|
+
RUN npm i
|
|
54
51
|
|
|
55
|
-
USER root
|
|
56
52
|
|
|
57
53
|
# Bundle app source
|
|
58
54
|
COPY --chown=qcobjects:qcobjects . .
|
|
59
55
|
|
|
56
|
+
USER qcobjects
|
|
57
|
+
|
|
60
58
|
EXPOSE 8080:8080
|
|
61
59
|
EXPOSE 8443:8443
|
|
62
60
|
|
package/README.md
CHANGED
|
@@ -80,36 +80,62 @@ You can either use this function or import statement to load QCObjects packages.
|
|
|
80
80
|
|
|
81
81
|
In package.json file, in scripts section, you will find some common commands that need to be present in every project that works with QCObjects.
|
|
82
82
|
|
|
83
|
+
# Run tests
|
|
84
|
+
|
|
85
|
+
The "test" script uses the "eslint" linter and the "jasmine" framework to check the code for errors and run tests. If any errors are found, the script tries to fix them automatically. If all tests pass, the script exits with code 0.
|
|
86
|
+
|
|
83
87
|
```shell
|
|
84
88
|
# Executes the tests of the project (see spec and coverage folders)
|
|
85
89
|
npm run test
|
|
86
90
|
```
|
|
87
91
|
|
|
92
|
+
# Run sync
|
|
93
|
+
|
|
94
|
+
The "sync" script stages and commits any changes made to the codebase. This is useful for keeping track of changes and making sure everything is up-to-date.
|
|
95
|
+
|
|
88
96
|
```shell
|
|
89
97
|
# Syncronizes the version between npm and git
|
|
90
98
|
npm run sync
|
|
91
99
|
```
|
|
92
100
|
|
|
101
|
+
# Run preversion
|
|
102
|
+
|
|
103
|
+
The "preversion" script runs "npm i --upgrade" and "npm test" before a new version of the package is published. This ensures that the latest version of the code is tested and ready to be released.
|
|
104
|
+
|
|
93
105
|
```shell
|
|
94
106
|
# This command is executed before a npm version is changed
|
|
95
107
|
npm run preversion
|
|
96
108
|
```
|
|
97
109
|
|
|
110
|
+
# Run postversion
|
|
111
|
+
|
|
112
|
+
The "postversion" script pushes the changes to the codebase and tags the new version. This helps keep track of the changes made to the code over time.
|
|
113
|
+
|
|
98
114
|
```shell
|
|
99
115
|
# This command is executed after a npm version is changed
|
|
100
116
|
npm run postversion
|
|
101
117
|
```
|
|
102
118
|
|
|
119
|
+
# Run coverage
|
|
120
|
+
|
|
121
|
+
The "coverage" script generates a code coverage report using the "nyc" library. This is useful for understanding how much of the code is being tested and where there may be gaps in test coverage.
|
|
122
|
+
|
|
103
123
|
```shell
|
|
104
124
|
# You can run this command to dispatch the coverage scripts (see coverage folder)
|
|
105
125
|
npm run coverage
|
|
106
126
|
```
|
|
107
127
|
|
|
128
|
+
# Run start
|
|
129
|
+
|
|
130
|
+
The "start" script runs the "createcert" and "serve" scripts. This is useful for quickly launching the app and getting started with development.
|
|
131
|
+
|
|
108
132
|
```shell
|
|
109
133
|
# Start the QCObjects Server
|
|
110
134
|
npm run start
|
|
111
135
|
```
|
|
112
136
|
|
|
137
|
+
The "serve" and "server" scripts launch the app using the "qcobjects" library. This is the main tool used in the development process.
|
|
138
|
+
|
|
113
139
|
```shell
|
|
114
140
|
# An alias to start the QCObjects Server
|
|
115
141
|
npm run serve
|
|
@@ -120,36 +146,107 @@ npm run serve
|
|
|
120
146
|
npm run server
|
|
121
147
|
```
|
|
122
148
|
|
|
149
|
+
# Run QCObjects Collab
|
|
150
|
+
|
|
151
|
+
The "collab" script launches the collaborative coding tool "qcobjects-collab". This is useful for working with other developers on the same codebase.
|
|
152
|
+
|
|
123
153
|
```shell
|
|
124
154
|
# This command will open a shell with QCObjects Collab Tool
|
|
125
155
|
npm run collab
|
|
126
156
|
```
|
|
127
157
|
|
|
158
|
+
# Run QCObjects Shell
|
|
159
|
+
|
|
160
|
+
The "shell" script launches a shell terminal using the "qcobjects" library. This is useful for running commands and making changes to the codebase.
|
|
161
|
+
|
|
162
|
+
|
|
128
163
|
```shell
|
|
129
164
|
# This command will open a shell with QCObjects running
|
|
130
165
|
npm run shell
|
|
131
166
|
```
|
|
132
167
|
|
|
168
|
+
# Generate SSL certificates
|
|
169
|
+
|
|
170
|
+
The "createcert" script creates a certificate used for HTTPS connections. This is important for security reasons.
|
|
171
|
+
It uses letsencrypt certificate or openssl depending on settings. Default is openssl.
|
|
172
|
+
|
|
133
173
|
```shell
|
|
134
174
|
# This command will create a certificate for ssl
|
|
135
175
|
npm run createcert
|
|
136
176
|
```
|
|
137
177
|
|
|
178
|
+
# Dispatch a new version of your app
|
|
179
|
+
|
|
180
|
+
The "v-patch", "v-minor", and "v-major" scripts increment the version number of the package based on patch, minor or major changes. This is useful for keeping track of the changes made to the code over time.
|
|
181
|
+
|
|
182
|
+
```shell
|
|
183
|
+
npm run v-patch -m "message of commit" --git --npm
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
# Use the CLI with local dependencies
|
|
187
|
+
|
|
188
|
+
Install QCObjects CLI in local in order to use local dependencies and local settings of your project.
|
|
189
|
+
|
|
190
|
+
```shell
|
|
191
|
+
# This command will install QCObjects CLI in your local project
|
|
192
|
+
npm i --save-dev qcobjects-cli
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
The "qcobjects" script launches the "qcobjects" library command-line interface. This is the main tool used in the development process.
|
|
196
|
+
|
|
197
|
+
```shell
|
|
198
|
+
# This command will execute QCObjects CLI in your local project and show the version installed
|
|
199
|
+
npm run qcobjects -- --version
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
```shell
|
|
203
|
+
# To learn more about CLI commands, you can use the --help option
|
|
204
|
+
npm run qcobjects -- --help
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
```shell
|
|
208
|
+
# To learn more about CLI commands, you can use the --help option
|
|
209
|
+
npm run qcobjects -- create --help
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
# Launch a built-in HTTP Server
|
|
213
|
+
|
|
214
|
+
The "http-server" script starts an HTTP server using the "qcobjects-cli" library. This is useful for testing the app in a local environment.
|
|
215
|
+
|
|
138
216
|
```shell
|
|
139
|
-
# This command will run QCObjects HTTP Server without SSL
|
|
140
217
|
npm run http-server
|
|
141
218
|
```
|
|
142
219
|
|
|
220
|
+
# Publish your application to Google App Engine
|
|
221
|
+
|
|
222
|
+
The "gae-server" script starts a Google App Engine HTTP server using the "qcobjects-cli" library. This is useful for deploying the app to production.
|
|
223
|
+
|
|
224
|
+
Use this command in the settings of your GAE Application instead of "npm start"
|
|
225
|
+
|
|
143
226
|
```shell
|
|
144
|
-
# This command will run QCObjects Server adapted for Google App Engine
|
|
145
227
|
npm run gae-server
|
|
146
228
|
```
|
|
147
229
|
|
|
230
|
+
# Build your application from TypeScript to JavaScript
|
|
231
|
+
|
|
232
|
+
The "build:ts" script compiles the TypeScript code and runs the linter to fix any issues. This is useful for ensuring that the code is properly formatted and free of errors.
|
|
233
|
+
|
|
234
|
+
The "build:ts-types" script generates TypeScript type declarations for the codebase. This is useful for making sure that the code is properly typed and free of errors.
|
|
235
|
+
|
|
236
|
+
|
|
148
237
|
```shell
|
|
149
238
|
# This command will be implemented in the future for TypeScript
|
|
150
239
|
npm run build
|
|
151
240
|
```
|
|
152
241
|
|
|
242
|
+
# Publish your application to test in local environment
|
|
243
|
+
|
|
244
|
+
The "publish:local" script publishes the package locally using the "qcobjects" library. This is useful for testing the app in a local environment.
|
|
245
|
+
|
|
246
|
+
# Prettify your code before commit to git
|
|
247
|
+
|
|
248
|
+
Finally, the "prepare" script installs the "husky" library, which is used to manage Git hooks. This is useful for automating tasks in the development process.
|
|
249
|
+
|
|
153
250
|
# Docker installation
|
|
154
251
|
|
|
155
252
|
To run this app with docker, execute the following command:
|
package/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
2.4.
|
|
1
|
+
2.4.12
|
package/_redirects
CHANGED
package/config.json
CHANGED
|
@@ -1,11 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"devmode":"debug",
|
|
3
3
|
"autodiscover":true,
|
|
4
|
+
"autodiscover_commands":true,
|
|
5
|
+
"documentRoot": "$config(projectPath)public/",
|
|
6
|
+
"documentRootFileIndex":"index.html",
|
|
4
7
|
"cacheControl":"max-age=31536000",
|
|
5
8
|
"relativeImportPath":"js/packages/",
|
|
6
9
|
"serverPortHTTP": "8080",
|
|
7
10
|
"serverPortHTTPS": "8443",
|
|
8
11
|
"useLocalSDK":true,
|
|
12
|
+
"private-key-pem": "$config(domain)-privkey.pem",
|
|
13
|
+
"private-cert-pem": "$config(domain)-cert.pem",
|
|
9
14
|
"backend":{
|
|
10
15
|
"routes":[
|
|
11
16
|
{
|
|
@@ -34,5 +39,13 @@
|
|
|
34
39
|
|
|
35
40
|
|
|
36
41
|
]
|
|
42
|
+
},
|
|
43
|
+
"package":{
|
|
44
|
+
"source":{
|
|
45
|
+
"backend":"backend",
|
|
46
|
+
"frontend":"src"
|
|
47
|
+
},
|
|
48
|
+
"build": "build",
|
|
49
|
+
"dist": "dist"
|
|
37
50
|
}
|
|
38
51
|
}
|
package/package.json
CHANGED
|
@@ -1,23 +1,58 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "qcobjectsnewapp",
|
|
3
|
-
"version": "2.4.
|
|
3
|
+
"version": "2.4.12",
|
|
4
4
|
"description": "App template for New App in QCObjects",
|
|
5
|
-
"
|
|
5
|
+
"targets": {
|
|
6
|
+
"default": {
|
|
7
|
+
"source": "build/index.html",
|
|
8
|
+
"distDir": "public"
|
|
9
|
+
}
|
|
10
|
+
},
|
|
11
|
+
"main": "public/js/init.js",
|
|
12
|
+
"type": "commonjs",
|
|
13
|
+
"types": "src/ts/types/init.d.ts",
|
|
14
|
+
"browserslist": "> 0.5%, last 2 versions, not dead",
|
|
6
15
|
"scripts": {
|
|
7
|
-
"test": "(
|
|
16
|
+
"test": "(npm run lint && (npx jasmine))",
|
|
17
|
+
"lint": "(npx eslint \"src/**/*.ts\" --fix --ext ts)",
|
|
8
18
|
"sync": "git add . && git commit -am ",
|
|
9
19
|
"preversion": "npm i --upgrade && npm test",
|
|
10
20
|
"postversion": "git push && git push --tags",
|
|
11
21
|
"coverage": "nyc --reporter=lcov --reporter=text-summary npm run test",
|
|
12
22
|
"start": "npm run createcert && npm run serve",
|
|
13
|
-
"
|
|
14
|
-
"
|
|
15
|
-
"
|
|
16
|
-
"
|
|
17
|
-
"
|
|
18
|
-
"
|
|
19
|
-
"
|
|
20
|
-
"
|
|
23
|
+
"start:parcel": "npx parcel --dist-dir public",
|
|
24
|
+
"serve": "qcobjects-server",
|
|
25
|
+
"server": "npm run serve",
|
|
26
|
+
"collab": "qcobjects-collab",
|
|
27
|
+
"shell": "qcobjects shell",
|
|
28
|
+
"createcert": "qcobjects-createcert",
|
|
29
|
+
"v-patch": "qcobjects v-patch",
|
|
30
|
+
"v-minor": "qcobjects v-minor",
|
|
31
|
+
"v-major": "qcobjects v-major",
|
|
32
|
+
"qcobjects": "qcobjects",
|
|
33
|
+
"cli": "qcobjects",
|
|
34
|
+
"http-server": "qcobjects-http-server",
|
|
35
|
+
"gae-server": "qcobjects-gae-server",
|
|
36
|
+
"azure-server": "npm start",
|
|
37
|
+
"aws-server": "npm start",
|
|
38
|
+
"do-server": "npm start",
|
|
39
|
+
"build:docker": "docker build -t qcobjects/qcobjects-newapp:latest .",
|
|
40
|
+
"build:static": "npx qcobjects publish:static src/ build/ --exclude js --exclude=.DS_Store",
|
|
41
|
+
"build:ts": "npm test && npx tsc",
|
|
42
|
+
"build:ts-types": "npx -p typescript tsc src/**/*.ts --declaration --allowJs --esModuleInterop --emitDeclarationOnly --outDir types",
|
|
43
|
+
"publish:static": "npx qcobjects publish:static build/ public/ --exclude js --exclude=.DS_Store",
|
|
44
|
+
"publish:ios": "qcobjects publish ios",
|
|
45
|
+
"publish:android": "qcobjects publish android",
|
|
46
|
+
"publish:electron": "qcobjects publish electron",
|
|
47
|
+
"publish:esbuild": "npx esbuild build/js/*.js build/js/**/*.js --bundle --outdir=public/js --keep-names --minify --global-name=global --sourcemap",
|
|
48
|
+
"publish:parcel": "npx parcel build",
|
|
49
|
+
"publish:web": "npm run build:static && npm run build:ts && npm run publish:static && npm run publish:esbuild",
|
|
50
|
+
"publish:docker": "docker push qcobjects/qcobjects-newapp:latest",
|
|
51
|
+
"deploy:docker": "npm-run-all build:docker publish:docker",
|
|
52
|
+
"docker-server": "docker run -p 8080:8080 -p 8443:8443 -d --name qcobjects-newapp qcobjects/qcobjects-newapp",
|
|
53
|
+
"prepare": "node -e \"if(!require('fs').existsSync('.git')){process.exit(0)}\" || npx -y husky install",
|
|
54
|
+
"prestart": "npm run publish:web",
|
|
55
|
+
"cli:help": "qcobjects --help"
|
|
21
56
|
},
|
|
22
57
|
"repository": {
|
|
23
58
|
"type": "file",
|
|
@@ -32,25 +67,51 @@
|
|
|
32
67
|
"author": "Jean Machuca (correojean@gmail.com)",
|
|
33
68
|
"license": "LGPL-3.0-or-later",
|
|
34
69
|
"devDependencies": {
|
|
35
|
-
"
|
|
70
|
+
"@parcel/config-default": "^2.8.3",
|
|
71
|
+
"@parcel/packager-raw-url": "^2.8.3",
|
|
72
|
+
"@parcel/packager-ts": "^2.8.3",
|
|
73
|
+
"@parcel/transformer-typescript-tsc": "^2.8.3",
|
|
74
|
+
"@parcel/transformer-typescript-types": "^2.8.3",
|
|
75
|
+
"@parcel/transformer-webmanifest": "^2.8.3",
|
|
76
|
+
"@parcel/validator-typescript": "^2.8.3",
|
|
77
|
+
"@types/qcobjects": "github:QCObjects/-types-qcobjects",
|
|
78
|
+
"@types/qcobjects-sdk": "github:QCObjects/-types-qcobjects-sdk",
|
|
79
|
+
"@typescript-eslint/eslint-plugin": "^5.59.0",
|
|
80
|
+
"@typescript-eslint/parser": "^5.58.0",
|
|
81
|
+
"eslint": "^8.39.0",
|
|
82
|
+
"eslint-config-prettier": "^8.8.0",
|
|
36
83
|
"eslint-config-qcobjects": "^0.0.26",
|
|
37
84
|
"eslint-config-semistandard": "^17.0.0",
|
|
38
85
|
"eslint-config-standard": "^17.0.0",
|
|
86
|
+
"eslint-config-standard-with-typescript": "^34.0.1",
|
|
39
87
|
"eslint-plugin-import": "^2.27.5",
|
|
40
88
|
"eslint-plugin-n": "^15.7.0",
|
|
41
89
|
"eslint-plugin-promise": "^6.1.1",
|
|
42
|
-
"
|
|
90
|
+
"hint": "^2.0.0",
|
|
91
|
+
"husky": "^8.0.3",
|
|
92
|
+
"jasmine": "^3.99.0",
|
|
93
|
+
"lint-staged": "^13.2.1",
|
|
94
|
+
"npm-run-all": "^4.1.5",
|
|
95
|
+
"parcel": "^2.8.3",
|
|
96
|
+
"process": "^0.11.10",
|
|
97
|
+
"qcobjects-cli": "^2.4.34",
|
|
98
|
+
"systemjs": "^6.14.1",
|
|
99
|
+
"typescript": "^5.0.4"
|
|
43
100
|
},
|
|
44
101
|
"dependencies": {
|
|
45
102
|
"grunt": "^1.4.1",
|
|
46
103
|
"grunt-contrib-jasmine": "^4.0.0",
|
|
47
104
|
"nyc": "^15.1.0",
|
|
48
|
-
"qcobjects": "^2.4.
|
|
49
|
-
"qcobjects-
|
|
50
|
-
"qcobjects-sdk": "^2.4.
|
|
105
|
+
"qcobjects": "^2.4.67",
|
|
106
|
+
"qcobjects-command-publish-static": "^1.0.2",
|
|
107
|
+
"qcobjects-sdk": "^2.4.30",
|
|
108
|
+
"semistandard": "^16.0.1"
|
|
51
109
|
},
|
|
52
110
|
"engines": {
|
|
53
|
-
"npm": ">=8
|
|
54
|
-
"node": ">=
|
|
111
|
+
"npm": ">=8",
|
|
112
|
+
"node": ">=16"
|
|
113
|
+
},
|
|
114
|
+
"lint-staged": {
|
|
115
|
+
"**/*": "prettier --write --ignore-unknown"
|
|
55
116
|
}
|
|
56
117
|
}
|
|
@@ -10,16 +10,16 @@
|
|
|
10
10
|
<meta name="description" content="QCObjects New App v2.4">
|
|
11
11
|
<link rel="canonical" href="https://newapp.qcobjects.dev/">
|
|
12
12
|
<link rel="manifest" href="manifest.json">
|
|
13
|
-
<link rel="shortcut icon" href="
|
|
14
|
-
<link rel="icon" href="
|
|
13
|
+
<link rel="shortcut icon" href="./favicon.ico" type="image/x-icon">
|
|
14
|
+
<link rel="icon" href="./favicon.ico" type="image/x-icon">
|
|
15
15
|
<meta name="mobile-web-app-capable" content="yes">
|
|
16
16
|
<meta name="apple-mobile-web-app-capable" content="yes">
|
|
17
17
|
<meta name="application-name" content="QCObjects New App">
|
|
18
18
|
<meta name="apple-mobile-web-app-status-bar-style" content="black">
|
|
19
19
|
<meta name="apple-mobile-web-app-title" content="QCObjects New App">
|
|
20
|
-
<link rel="icon" sizes="192x192" href="
|
|
21
|
-
<link rel="apple-touch-icon" href="
|
|
22
|
-
<meta name="msapplication-TileImage" content="
|
|
20
|
+
<link rel="icon" sizes="192x192" href="./img/icons/icon-192x192.png">
|
|
21
|
+
<link rel="apple-touch-icon" href="./img/icons/icon-192x192.png">
|
|
22
|
+
<meta name="msapplication-TileImage" content="./img/icons/icon-144x144.png">
|
|
23
23
|
<meta name="msapplication-TileColor" content="rgb(1,1,1)">
|
|
24
24
|
<meta name="theme-color" content="rgb(1,1,1)">
|
|
25
25
|
<meta property="og:title" content="QCObjects Config">
|
|
@@ -45,8 +45,7 @@
|
|
|
45
45
|
data-cube_image="./img/Q_web-white.png"></splash-screen>
|
|
46
46
|
<layout-basic splashscreen shadowed=true controllerClass="MainController" data-one="1" data-two="2">
|
|
47
47
|
</layout-basic>
|
|
48
|
-
|
|
49
|
-
<script type="module" src="js/init.js"></script>
|
|
48
|
+
<script type="module" src="js/init.js"></script>
|
|
50
49
|
</body>
|
|
51
50
|
|
|
52
51
|
</html>
|
package/src/js/config.ts
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { CONFIG, Component, RegisterWidgets } from "qcobjects";
|
|
2
|
+
/*
|
|
3
|
+
* The next values are the default settings
|
|
4
|
+
* You can change any value in runtime by using CONFIG.set
|
|
5
|
+
* or changing the static initial value in a config.json file
|
|
6
|
+
*/
|
|
7
|
+
CONFIG.set("sourceType", "module");
|
|
8
|
+
CONFIG.set("relativeImportPath", "js/packages/");
|
|
9
|
+
CONFIG.set("componentsBasePath", "templates/components/");
|
|
10
|
+
CONFIG.set("delayForReady", 1); // delay to wait before executing the first ready event, it includes imports
|
|
11
|
+
CONFIG.set("preserveComponentBodyTag", false); // don't use <componentBody></componentBody> tag
|
|
12
|
+
CONFIG.set("useConfigService", false); // Load settings from config.json
|
|
13
|
+
CONFIG.set("routingWay", "hash"); // routingWay possible values are 'hash','pathname','search'
|
|
14
|
+
CONFIG.set("useLocalSDK", true); // on the frontend side you can chose whether to load the SDK from sdk.qcobjects.dev or from your local website
|
|
15
|
+
CONFIG.set("tplextension", "tpl.html"); // this is the file extension to locate the template files (if component.name = 'main' then template name will be main.tpl.html)
|
|
16
|
+
CONFIG.set("asynchronousImportsLoad", true); // it is recommended to load the Import declarations in an asyncronous way
|
|
17
|
+
CONFIG.set("serviceWorkerURI", "/sw.js"); // QCObjects will register an launch this service worker automatically to work offline
|
|
18
|
+
|
|
19
|
+
// if Component.cached is true, all the Class('Component') declarations will save the template in a localStorage cache
|
|
20
|
+
// until a cached=false attribute is found in a <component> html declaration
|
|
21
|
+
Component.cached = true; // this will load js/packages/org.quickcorp.custom.js file
|
|
22
|
+
|
|
23
|
+
// eslint-disable-next-line no-undef
|
|
24
|
+
RegisterWidgets("layout-basic", "splash-screen", "github-grid", "octocat-icon", "lib-list");
|
package/src/js/init.ts
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* QCObjects New App PWA Template 1.x
|
|
4
|
+
* ________________
|
|
5
|
+
*
|
|
6
|
+
* Author: Jean Machuca <correojean@gmail.com>
|
|
7
|
+
*
|
|
8
|
+
* Cross Browser Javascript Framework for MVC Patterns
|
|
9
|
+
* QuickCorp/QCObjects is licensed under the
|
|
10
|
+
* GNU Lesser General Public License v3.0
|
|
11
|
+
* [LICENSE] (https://github.com/QuickCorp/QCObjects/blob/master/LICENSE.txt)
|
|
12
|
+
*
|
|
13
|
+
* Permissions of this copyleft license are conditioned on making available
|
|
14
|
+
* complete source code of licensed works and modifications under the same
|
|
15
|
+
* license or the GNU GPLv3. Copyright and license notices must be preserved.
|
|
16
|
+
* Contributors provide an express grant of patent rights. However, a larger
|
|
17
|
+
* work using the licensed work through interfaces provided by the licensed
|
|
18
|
+
* work may be distributed under different terms and without source code for
|
|
19
|
+
* the larger work.
|
|
20
|
+
*
|
|
21
|
+
* Copyright (C) 2015 Jean Machuca,<correojean@gmail.com>
|
|
22
|
+
*
|
|
23
|
+
* Everyone is permitted to copy and distribute verbatim copies of this
|
|
24
|
+
* license document, but changing it is not allowed.
|
|
25
|
+
*/
|
|
26
|
+
import "./config";
|
|
27
|
+
import "./packages/org.quickcorp.custom";
|