quankee-framework-common-ts 1.0.1

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/.editorconfig ADDED
@@ -0,0 +1,17 @@
1
+ # Editor configuration, see https://editorconfig.org
2
+ root = true
3
+
4
+ [*]
5
+ charset = utf-8
6
+ indent_style = space
7
+ indent_size = 2
8
+ insert_final_newline = true
9
+ trim_trailing_whitespace = true
10
+
11
+ [*.ts]
12
+ quote_type = single
13
+ ij_typescript_use_double_quotes = false
14
+
15
+ [*.md]
16
+ max_line_length = off
17
+ trim_trailing_whitespace = false
package/.gitlab-ci.yml ADDED
@@ -0,0 +1,4 @@
1
+
2
+ include:
3
+ - project: 'quankee-framework/quankee-ci'
4
+ file: '/templates/typescript/common-build.yml'
package/LICENSE ADDED
@@ -0,0 +1,15 @@
1
+ ISC License
2
+
3
+ Copyright (c) 2025 Quankee Software, Lda
4
+
5
+ Permission to use, copy, modify, and/or distribute this software for any
6
+ purpose with or without fee is hereby granted, provided that the above
7
+ copyright notice and this permission notice appear in all copies.
8
+
9
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10
+ WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11
+ MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12
+ ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13
+ WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14
+ ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15
+ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,42 @@
1
+ # Quankee Framework Common Ts
2
+
3
+ This project was generated using [Angular CLI](https://github.com/angular/angular-cli) version 19.2.11.
4
+
5
+ # create workspace
6
+ ng new quankee-framework-common-ts --create-application=false
7
+
8
+ # create the lib
9
+ ng generate library quankee-framework-common-ts
10
+
11
+ # version bump
12
+ npm run bump:patch # bumps 1.0.0 → 1.0.1
13
+ npm run bump:minor # bumps 1.0.0 → 1.1.0
14
+ npm run bump:major # bumps 1.0.0 → 2.0.0
15
+
16
+ # create lib for common http response
17
+ ng generate library quankee-framework-response
18
+
19
+ # create lib for language
20
+ ng generate library quankee-framework-language
21
+
22
+ # create lib for keycloak integration
23
+ ng generate library quankee-framework-keycloak
24
+
25
+ # Keycloak
26
+ npm install keycloak-angular keycloak-js
27
+
28
+ # JWT
29
+ npm install jwt-decode
30
+
31
+ # install jest
32
+ npm install --save-dev @types/jest
33
+
34
+ # clean cache
35
+ rm -rf dist node_modules package-lock.json
36
+
37
+
38
+ # build
39
+ npm run build
40
+
41
+ # test npm run test -- --watch=false --browsers=ChromeHeadless
42
+ ng test --watch=false --browsers=ChromeHeadless
package/angular.json ADDED
@@ -0,0 +1,109 @@
1
+ {
2
+ "$schema": "./node_modules/@angular/cli/lib/config/schema.json",
3
+ "version": 1,
4
+ "newProjectRoot": "projects",
5
+ "projects": {
6
+ "quankee-framework-response": {
7
+ "projectType": "library",
8
+ "root": "projects/quankee-framework-response",
9
+ "sourceRoot": "projects/quankee-framework-response/src",
10
+ "prefix": "lib",
11
+ "architect": {
12
+ "build": {
13
+ "builder": "@angular-devkit/build-angular:ng-packagr",
14
+ "options": {
15
+ "project": "projects/quankee-framework-response/ng-package.json"
16
+ },
17
+ "configurations": {
18
+ "production": {
19
+ "tsConfig": "projects/quankee-framework-response/tsconfig.lib.prod.json"
20
+ },
21
+ "development": {
22
+ "tsConfig": "projects/quankee-framework-response/tsconfig.lib.json"
23
+ }
24
+ },
25
+ "defaultConfiguration": "production"
26
+ },
27
+ "test": {
28
+ "builder": "@angular-devkit/build-angular:karma",
29
+ "options": {
30
+ "tsConfig": "projects/quankee-framework-response/tsconfig.spec.json",
31
+ "polyfills": [
32
+ "zone.js",
33
+ "zone.js/testing"
34
+ ]
35
+ }
36
+ }
37
+ }
38
+ },
39
+ "quankee-framework-language": {
40
+ "projectType": "library",
41
+ "root": "projects/quankee-framework-language",
42
+ "sourceRoot": "projects/quankee-framework-language/src",
43
+ "prefix": "lib",
44
+ "architect": {
45
+ "build": {
46
+ "builder": "@angular-devkit/build-angular:ng-packagr",
47
+ "options": {
48
+ "project": "projects/quankee-framework-language/ng-package.json"
49
+ },
50
+ "configurations": {
51
+ "production": {
52
+ "tsConfig": "projects/quankee-framework-language/tsconfig.lib.prod.json"
53
+ },
54
+ "development": {
55
+ "tsConfig": "projects/quankee-framework-language/tsconfig.lib.json"
56
+ }
57
+ },
58
+ "defaultConfiguration": "production"
59
+ },
60
+ "test": {
61
+ "builder": "@angular-devkit/build-angular:karma",
62
+ "options": {
63
+ "tsConfig": "projects/quankee-framework-language/tsconfig.spec.json",
64
+ "polyfills": [
65
+ "zone.js",
66
+ "zone.js/testing"
67
+ ]
68
+ }
69
+ }
70
+ }
71
+ },
72
+ "quankee-framework-keycloak": {
73
+ "projectType": "library",
74
+ "root": "projects/quankee-framework-keycloak",
75
+ "sourceRoot": "projects/quankee-framework-keycloak/src",
76
+ "prefix": "lib",
77
+ "architect": {
78
+ "build": {
79
+ "builder": "@angular-devkit/build-angular:ng-packagr",
80
+ "options": {
81
+ "project": "projects/quankee-framework-keycloak/ng-package.json"
82
+ },
83
+ "configurations": {
84
+ "production": {
85
+ "tsConfig": "projects/quankee-framework-keycloak/tsconfig.lib.prod.json"
86
+ },
87
+ "development": {
88
+ "tsConfig": "projects/quankee-framework-keycloak/tsconfig.lib.json"
89
+ }
90
+ },
91
+ "defaultConfiguration": "production"
92
+ },
93
+ "test": {
94
+ "builder": "@angular-devkit/build-angular:karma",
95
+ "options": {
96
+ "tsConfig": "projects/quankee-framework-keycloak/tsconfig.spec.json",
97
+ "polyfills": [
98
+ "zone.js",
99
+ "zone.js/testing"
100
+ ]
101
+ }
102
+ }
103
+ }
104
+ }
105
+ },
106
+ "cli": {
107
+ "analytics": "5f6f9f58-7562-4078-b930-99069ac7e701"
108
+ }
109
+ }
package/package.json ADDED
@@ -0,0 +1,57 @@
1
+ {
2
+ "name": "quankee-framework-common-ts",
3
+ "description": "Quankee Framework Typescript Lib",
4
+ "version": "1.0.1",
5
+ "author": {
6
+ "email": "info@quankee.co.mz",
7
+ "name": "Quankee Software, Lda",
8
+ "repository": {
9
+ "type": "git",
10
+ "url": "https://gitlab.com/quankee-framework/quankee-framework-common-ts"
11
+ },
12
+ "homepage": "https://gitlab.com/quankee-framework/quankee-framework-common-ts#readme",
13
+ "publishConfig": {
14
+ "registry": "https://registry.npmjs.org/"
15
+ }
16
+ },
17
+ "scripts": {
18
+ "ng": "ng",
19
+ "start": "ng serve",
20
+ "build": "ng build quankee-framework-response && ng build quankee-framework-language && ng build quankee-framework-keycloak",
21
+ "watch": "ng build --watch --configuration development",
22
+ "test": "echo",
23
+ "bump:major": "npm version major && node sync-versions.js",
24
+ "bump:minor": "npm version minor && node sync-versions.js",
25
+ "bump:patch": "npm version patch && node sync-versions.js"
26
+ },
27
+ "dependencies": {
28
+ "@angular/common": "^19.2.0",
29
+ "@angular/compiler": "^19.2.0",
30
+ "@angular/core": "^19.2.0",
31
+ "@angular/forms": "^19.2.0",
32
+ "@angular/platform-browser": "^19.2.0",
33
+ "@angular/platform-browser-dynamic": "^19.2.0",
34
+ "@angular/router": "^19.2.0",
35
+ "jwt-decode": "4.0.0",
36
+ "keycloak-angular": "20.0.0",
37
+ "keycloak-js": "26.2.0",
38
+ "rxjs": "~7.8.0",
39
+ "tslib": "^2.3.0",
40
+ "zone.js": "~0.15.0"
41
+ },
42
+ "devDependencies": {
43
+ "@angular-devkit/build-angular": "^19.2.15",
44
+ "@angular/cli": "^19.2.11",
45
+ "@angular/compiler-cli": "^19.2.0",
46
+ "@types/jasmine": "~5.1.0",
47
+ "@types/jest": "30.0.0",
48
+ "jasmine-core": "~5.6.0",
49
+ "karma": "~6.4.0",
50
+ "karma-chrome-launcher": "~3.2.0",
51
+ "karma-coverage": "~2.2.0",
52
+ "karma-jasmine": "~5.1.0",
53
+ "karma-jasmine-html-reporter": "~2.1.0",
54
+ "ng-packagr": "^19.2.0",
55
+ "typescript": "~5.7.2"
56
+ }
57
+ }
@@ -0,0 +1,7 @@
1
+ {
2
+ "$schema": "../../node_modules/ng-packagr/ng-package.schema.json",
3
+ "dest": "../../dist/quankee-framework-keycloak",
4
+ "lib": {
5
+ "entryFile": "src/public-api.ts"
6
+ }
7
+ }
@@ -0,0 +1,12 @@
1
+ {
2
+ "name": "quankee-framework-keycloak",
3
+ "version": "1.0.1",
4
+ "peerDependencies": {
5
+ "@angular/common": "^19.2.0",
6
+ "@angular/core": "^19.2.0"
7
+ },
8
+ "dependencies": {
9
+ "tslib": "^2.3.0"
10
+ },
11
+ "sideEffects": false
12
+ }
@@ -0,0 +1,7 @@
1
+ {
2
+ "$schema": "../../node_modules/ng-packagr/ng-package.schema.json",
3
+ "dest": "../../dist/quankee-framework-language",
4
+ "lib": {
5
+ "entryFile": "src/public-api.ts"
6
+ }
7
+ }
@@ -0,0 +1,12 @@
1
+ {
2
+ "name": "quankee-framework-language",
3
+ "version": "1.0.1",
4
+ "peerDependencies": {
5
+ "@angular/common": "^19.2.0",
6
+ "@angular/core": "^19.2.0"
7
+ },
8
+ "dependencies": {
9
+ "tslib": "^2.3.0"
10
+ },
11
+ "sideEffects": false
12
+ }
@@ -0,0 +1,7 @@
1
+ {
2
+ "$schema": "../../node_modules/ng-packagr/ng-package.schema.json",
3
+ "dest": "../../dist/quankee-framework-response",
4
+ "lib": {
5
+ "entryFile": "src/public-api.ts"
6
+ }
7
+ }
@@ -0,0 +1,12 @@
1
+ {
2
+ "name": "quankee-framework-response",
3
+ "version": "1.0.1",
4
+ "peerDependencies": {
5
+ "@angular/common": "^19.2.0",
6
+ "@angular/core": "^19.2.0"
7
+ },
8
+ "dependencies": {
9
+ "tslib": "^2.3.0"
10
+ },
11
+ "sideEffects": false
12
+ }
@@ -0,0 +1,26 @@
1
+ const fs = require('fs');
2
+ const path = require('path');
3
+
4
+ const ROOT_DIR = process.cwd();
5
+ const LIBS_DIR = path.join(ROOT_DIR, 'projects');
6
+
7
+ const rootPackage = JSON.parse(fs.readFileSync('package.json', 'utf8'));
8
+ const newVersion = rootPackage.version;
9
+
10
+ function updateLibVersion(libPath) {
11
+ const pkgJsonPath = path.join(libPath, 'package.json');
12
+ if (fs.existsSync(pkgJsonPath)) {
13
+ const pkg = JSON.parse(fs.readFileSync(pkgJsonPath, 'utf8'));
14
+ pkg.version = newVersion;
15
+ fs.writeFileSync(pkgJsonPath, JSON.stringify(pkg, null, 2));
16
+ console.log(`✔ Updated ${pkg.name} to version ${newVersion}`);
17
+ }
18
+ }
19
+
20
+ fs.readdirSync(LIBS_DIR).forEach((dir) => {
21
+ const libPath = path.join(LIBS_DIR, dir);
22
+ const stat = fs.statSync(libPath);
23
+ if (stat.isDirectory()) {
24
+ updateLibVersion(libPath);
25
+ }
26
+ });