@albi_scando/as-backbone-lib 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/.branchlintrc.json +22 -0
- package/.editorconfig +18 -0
- package/.eslintcache +1 -0
- package/.github/workflows/release.yml +48 -0
- package/.gitignore copy +44 -0
- package/.husky/commit-msg +5 -0
- package/.husky/pre-commit +1 -0
- package/.husky/pre-push +5 -0
- package/.nvmrc +1 -0
- package/.prettierignore +5 -0
- package/.prettierrc +12 -0
- package/.releaserc.json +11 -0
- package/.vscode/extensions.json +4 -0
- package/.vscode/launch.json +20 -0
- package/.vscode/mcp.json +9 -0
- package/.vscode/tasks.json +42 -0
- package/CHANGELOG.md +21 -0
- package/README copy.md +21 -0
- package/README.md +59 -0
- package/angular.json +36 -0
- package/commitlint.config.js +1 -0
- package/documentation/pages/CONTRIBUTING.md +11 -0
- package/documentation/pages/INSTALLATION.md +17 -0
- package/documentation/pages/LICENSE.md +6 -0
- package/eslint.config.js +162 -0
- package/lint-staged.config.js +10 -0
- package/netlify.toml +6 -0
- package/package.json +109 -0
- package/prettier.config.js +12 -0
- package/projects/as-backbone-lib/README.md +64 -0
- package/projects/as-backbone-lib/ng-package.json +7 -0
- package/projects/as-backbone-lib/package.json +12 -0
- package/projects/as-backbone-lib/src/lib/constants/application.constant.ts +4 -0
- package/projects/as-backbone-lib/src/public-api.ts +1 -0
- package/projects/as-backbone-lib/tsconfig.lib.json +13 -0
- package/projects/as-backbone-lib/tsconfig.lib.prod.json +11 -0
- package/projects/as-backbone-lib/tsconfig.spec.json +10 -0
- package/scripts/check-branch.sh +7 -0
- package/scripts/lint-project.sh +11 -0
- package/tsconfig.json +36 -0
- package/typedoc.json +7 -0
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{
|
|
2
|
+
"branchNameLinter": {
|
|
3
|
+
"prefixes": ["feature", "feat", "bugfix", "fix", "hotfix", "release", "chore"],
|
|
4
|
+
|
|
5
|
+
"suggestions": {
|
|
6
|
+
"feat": "feature",
|
|
7
|
+
"fix": "bugfix",
|
|
8
|
+
"hot": "hotfix",
|
|
9
|
+
"releases": "release",
|
|
10
|
+
"docs": "chore",
|
|
11
|
+
"doc": "chore"
|
|
12
|
+
},
|
|
13
|
+
|
|
14
|
+
"banned": ["wip"],
|
|
15
|
+
"skip": ["main", "master", "develop"],
|
|
16
|
+
"disallowed": ["master", "develop", "staging"],
|
|
17
|
+
"separator": "/",
|
|
18
|
+
|
|
19
|
+
"regex": "^(feature|feat|bugfix|fix|hotfix|chore)\\/[a-z0-9]+(?:-[a-z0-9]+)*$|^release\\/v?[0-9]+(?:\\.[0-9]+)+$",
|
|
20
|
+
"regexOptions": ""
|
|
21
|
+
}
|
|
22
|
+
}
|
package/.editorconfig
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# Editor configuration, see https://editorconfig.org
|
|
2
|
+
root = true
|
|
3
|
+
|
|
4
|
+
[*]
|
|
5
|
+
charset = utf-8
|
|
6
|
+
indent_style = space
|
|
7
|
+
indent_size = tab
|
|
8
|
+
insert_final_newline = true
|
|
9
|
+
trim_trailing_whitespace = true
|
|
10
|
+
end_of_line = lf
|
|
11
|
+
|
|
12
|
+
[*.ts]
|
|
13
|
+
quote_type = single
|
|
14
|
+
ij_typescript_use_double_quotes = false
|
|
15
|
+
|
|
16
|
+
[*.md]
|
|
17
|
+
max_line_length = off
|
|
18
|
+
trim_trailing_whitespace = false
|
package/.eslintcache
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
[{"C:\\Users\\alber\\Desktop\\CV\\as-backbone-workspace\\commitlint.config.js":"1","C:\\Users\\alber\\Desktop\\CV\\as-backbone-workspace\\eslint.config.js":"2","C:\\Users\\alber\\Desktop\\CV\\as-backbone-workspace\\lint-staged.config.js":"3","C:\\Users\\alber\\Desktop\\CV\\as-backbone-workspace\\prettier.config.js":"4","C:\\Users\\alber\\Desktop\\CV\\as-backbone-workspace\\projects\\as-backbone-lib\\src\\lib\\constants\\application.constant.ts":"5","C:\\Users\\alber\\Desktop\\CV\\as-backbone-workspace\\projects\\as-backbone-lib\\src\\public-api.ts":"6"},{"size":65,"mtime":1773474515796,"results":"7","hashOfConfig":"8"},{"size":5541,"mtime":1773474590486,"results":"9","hashOfConfig":"8"},{"size":332,"mtime":1773474515853,"results":"10","hashOfConfig":"8"},{"size":225,"mtime":1773474515952,"results":"11","hashOfConfig":"8"},{"size":95,"mtime":1773474395678,"results":"12","hashOfConfig":"13"},{"size":73,"mtime":1773475042502,"results":"14","hashOfConfig":"13"},{"filePath":"15","messages":"16","suppressedMessages":"17","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"k4nm6q",{"filePath":"18","messages":"19","suppressedMessages":"20","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"21","messages":"22","suppressedMessages":"23","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"24","messages":"25","suppressedMessages":"26","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"27","messages":"28","suppressedMessages":"29","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"1ginjhi",{"filePath":"30","messages":"31","suppressedMessages":"32","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"C:\\Users\\alber\\Desktop\\CV\\as-backbone-workspace\\commitlint.config.js",[],[],"C:\\Users\\alber\\Desktop\\CV\\as-backbone-workspace\\eslint.config.js",[],[],"C:\\Users\\alber\\Desktop\\CV\\as-backbone-workspace\\lint-staged.config.js",[],[],"C:\\Users\\alber\\Desktop\\CV\\as-backbone-workspace\\prettier.config.js",[],[],"C:\\Users\\alber\\Desktop\\CV\\as-backbone-workspace\\projects\\as-backbone-lib\\src\\lib\\constants\\application.constant.ts",[],[],"C:\\Users\\alber\\Desktop\\CV\\as-backbone-workspace\\projects\\as-backbone-lib\\src\\public-api.ts",[],[]]
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
name: Release
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
release:
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
|
+
steps:
|
|
12
|
+
# 1. Checkout repository
|
|
13
|
+
- uses: actions/checkout@v4
|
|
14
|
+
with:
|
|
15
|
+
fetch-depth: 0
|
|
16
|
+
|
|
17
|
+
# 2. Setup Node.js
|
|
18
|
+
- uses: actions/setup-node@v4
|
|
19
|
+
with:
|
|
20
|
+
node-version: 22
|
|
21
|
+
registry-url: 'https://registry.npmjs.org/'
|
|
22
|
+
|
|
23
|
+
# 3. Configure npm authentication using environment variable
|
|
24
|
+
- name: Configure npm authentication
|
|
25
|
+
run: |
|
|
26
|
+
echo "@albi_scando:registry=https://registry.npmjs.org/" >> ~/.npmrc
|
|
27
|
+
echo "//registry.npmjs.org/:_authToken=${NPM_PORTFOLIO_TOKEN}" >> ~/.npmrc
|
|
28
|
+
echo "always-auth=true" >> ~/.npmrc
|
|
29
|
+
env:
|
|
30
|
+
NPM_PORTFOLIO_TOKEN: ${{ secrets.NPM_PORTFOLIO_TOKEN }}
|
|
31
|
+
|
|
32
|
+
# 4. Install dependencies
|
|
33
|
+
- name: Install dependencies
|
|
34
|
+
run: npm ci
|
|
35
|
+
env:
|
|
36
|
+
NPM_PORTFOLIO_TOKEN: ${{ secrets.NPM_PORTFOLIO_TOKEN }}
|
|
37
|
+
|
|
38
|
+
# 5. Build the project
|
|
39
|
+
- name: Build
|
|
40
|
+
run: npm run build
|
|
41
|
+
|
|
42
|
+
# 6. Release using semantic-release
|
|
43
|
+
- name: Release
|
|
44
|
+
run: npx semantic-release
|
|
45
|
+
env:
|
|
46
|
+
HUSKY: 0
|
|
47
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
48
|
+
NPM_PORTFOLIO_TOKEN: ${{ secrets.NPM_PORTFOLIO_TOKEN }}
|
package/.gitignore copy
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# dependencies
|
|
2
|
+
node_modules/
|
|
3
|
+
yarn.lock
|
|
4
|
+
pnpm-lock.yaml
|
|
5
|
+
|
|
6
|
+
# compiled output
|
|
7
|
+
dist/
|
|
8
|
+
build/
|
|
9
|
+
out/
|
|
10
|
+
*.tsbuildinfo
|
|
11
|
+
|
|
12
|
+
# test coverage
|
|
13
|
+
coverage/
|
|
14
|
+
|
|
15
|
+
# logs
|
|
16
|
+
*.log
|
|
17
|
+
npm-debug.log*
|
|
18
|
+
yarn-debug.log*
|
|
19
|
+
yarn-error.log*
|
|
20
|
+
pnpm-debug.log*
|
|
21
|
+
|
|
22
|
+
# IDE/editor-specific
|
|
23
|
+
.vscode/
|
|
24
|
+
.idea/
|
|
25
|
+
*.sw?
|
|
26
|
+
*.sublime-project
|
|
27
|
+
*.sublime-workspace
|
|
28
|
+
|
|
29
|
+
# OS-specific
|
|
30
|
+
.DS_Store
|
|
31
|
+
Thumbs.db
|
|
32
|
+
|
|
33
|
+
# environment
|
|
34
|
+
.env
|
|
35
|
+
.env.*.local
|
|
36
|
+
.env.local
|
|
37
|
+
|
|
38
|
+
# jest
|
|
39
|
+
jest-cache/
|
|
40
|
+
jest-config.json
|
|
41
|
+
|
|
42
|
+
# storybook
|
|
43
|
+
*storybook.log
|
|
44
|
+
storybook-static
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
npx lint-staged
|
package/.husky/pre-push
ADDED
package/.nvmrc
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
22
|
package/.prettierignore
ADDED
package/.prettierrc
ADDED
package/.releaserc.json
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
|
|
3
|
+
"version": "0.2.0",
|
|
4
|
+
"configurations": [
|
|
5
|
+
{
|
|
6
|
+
"name": "ng serve",
|
|
7
|
+
"type": "chrome",
|
|
8
|
+
"request": "launch",
|
|
9
|
+
"preLaunchTask": "npm: start",
|
|
10
|
+
"url": "http://localhost:4200/"
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
"name": "ng test",
|
|
14
|
+
"type": "chrome",
|
|
15
|
+
"request": "launch",
|
|
16
|
+
"preLaunchTask": "npm: test",
|
|
17
|
+
"url": "http://localhost:9876/debug.html"
|
|
18
|
+
}
|
|
19
|
+
]
|
|
20
|
+
}
|
package/.vscode/mcp.json
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
{
|
|
2
|
+
// For more information, visit: https://go.microsoft.com/fwlink/?LinkId=733558
|
|
3
|
+
"version": "2.0.0",
|
|
4
|
+
"tasks": [
|
|
5
|
+
{
|
|
6
|
+
"type": "npm",
|
|
7
|
+
"script": "start",
|
|
8
|
+
"isBackground": true,
|
|
9
|
+
"problemMatcher": {
|
|
10
|
+
"owner": "typescript",
|
|
11
|
+
"pattern": "$tsc",
|
|
12
|
+
"background": {
|
|
13
|
+
"activeOnStart": true,
|
|
14
|
+
"beginsPattern": {
|
|
15
|
+
"regexp": "Changes detected"
|
|
16
|
+
},
|
|
17
|
+
"endsPattern": {
|
|
18
|
+
"regexp": "bundle generation (complete|failed)"
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"type": "npm",
|
|
25
|
+
"script": "test",
|
|
26
|
+
"isBackground": true,
|
|
27
|
+
"problemMatcher": {
|
|
28
|
+
"owner": "typescript",
|
|
29
|
+
"pattern": "$tsc",
|
|
30
|
+
"background": {
|
|
31
|
+
"activeOnStart": true,
|
|
32
|
+
"beginsPattern": {
|
|
33
|
+
"regexp": "Changes detected"
|
|
34
|
+
},
|
|
35
|
+
"endsPattern": {
|
|
36
|
+
"regexp": "bundle generation (complete|failed)"
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
]
|
|
42
|
+
}
|
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
## [1.0.1](https://github.com/albertoscandolara/as-backbone-lib/compare/v1.0.0...v1.0.1) (2026-03-14)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* **fixed package name:** fixed package name ([3262327](https://github.com/albertoscandolara/as-backbone-lib/commit/32623278a9d19aca0105835dc9dfd8ede047aaec))
|
|
7
|
+
* fixed semantic release config ([b33cd59](https://github.com/albertoscandolara/as-backbone-lib/commit/b33cd5924827110b5ed4cf8923372664f29334ea))
|
|
8
|
+
* fixed semantic release config ([43b5c0d](https://github.com/albertoscandolara/as-backbone-lib/commit/43b5c0d7c5745e8b28a565c5456dde6e2a3f0715))
|
|
9
|
+
* resolved conflict ([a6ce1d4](https://github.com/albertoscandolara/as-backbone-lib/commit/a6ce1d48ed99dcc5a473be74632a6f0deee6a551))
|
|
10
|
+
|
|
11
|
+
# 1.0.0 (2026-03-14)
|
|
12
|
+
|
|
13
|
+
### Bug Fixes
|
|
14
|
+
|
|
15
|
+
- added scripts ([db88e52](https://github.com/albertoscandolara/as-backbone-lib/commit/db88e5276f7ae7cceac2942fd3599737df1506c6))
|
|
16
|
+
- **exports:** added app-name to exports ([2f5eb1a](https://github.com/albertoscandolara/as-backbone-lib/commit/2f5eb1a564f8151637a5f5f9664c5ab289220fd5))
|
|
17
|
+
- fixed formatter ([24ec655](https://github.com/albertoscandolara/as-backbone-lib/commit/24ec655b13d4a93059f98ae99dbccd4038ad965c))
|
|
18
|
+
- **fixed npmrc:** fixed npmrc ([5eec8b3](https://github.com/albertoscandolara/as-backbone-lib/commit/5eec8b33cac40444a098ff01b9e50976cee09bc6))
|
|
19
|
+
- fixed release.yml ([07bf035](https://github.com/albertoscandolara/as-backbone-lib/commit/07bf035c20b45d021c936d7945e8e0db0f8bb973))
|
|
20
|
+
- fixed release.yml ([573d941](https://github.com/albertoscandolara/as-backbone-lib/commit/573d94158d642f25e47ee98318ed6741911a9db2))
|
|
21
|
+
- fixed release.yml ([d7fe5f0](https://github.com/albertoscandolara/as-backbone-lib/commit/d7fe5f0f6e2e0cab949e7bfab565aa450ed4fdbf))
|
package/README copy.md
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# `as-backbone-lib`
|
|
2
|
+
|
|
3
|
+
## Description
|
|
4
|
+
|
|
5
|
+
A lightweight, fully typed Angular and TypeScript library for handling application languages and translations. `as-backbone-lib` helps you define allowed locales, detect and switch the active language, load translations from one or more sources, and consume translated values through both services and a template pipe.
|
|
6
|
+
|
|
7
|
+
### Key Features
|
|
8
|
+
|
|
9
|
+
- **Language Management**: Set and validate allowed locales, then switch language at runtime
|
|
10
|
+
- **Automatic Fallback Strategy**: Resolves language from user preferences, browser locale, and default values
|
|
11
|
+
- **Multi-Source Translations**: Register multiple translation sources and merge results
|
|
12
|
+
- **Reactive by Design**: Uses RxJS and Angular Signals to keep UI translation state in sync
|
|
13
|
+
- **Template-Friendly**: Translate keys in components via a dedicated Angular `TranslatePipe`
|
|
14
|
+
- **TypeScript First**: Strong typing across services, models, and language flows
|
|
15
|
+
|
|
16
|
+
## Table of Contents
|
|
17
|
+
|
|
18
|
+
- [License](documentation/pages/LICENSE.md)
|
|
19
|
+
- [Installation](documentation/pages/INSTALLATION.md)
|
|
20
|
+
- [Contributing](documentation/pages/CONTRIBUTING.md)
|
|
21
|
+
- [Changelog](CHANGELOG.md)
|
package/README.md
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
# AsBackboneWorkspace
|
|
2
|
+
|
|
3
|
+
This project was generated using [Angular CLI](https://github.com/angular/angular-cli) version 21.2.2.
|
|
4
|
+
|
|
5
|
+
## Development server
|
|
6
|
+
|
|
7
|
+
To start a local development server, run:
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
ng serve
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Once the server is running, open your browser and navigate to `http://localhost:4200/`. The application will automatically reload whenever you modify any of the source files.
|
|
14
|
+
|
|
15
|
+
## Code scaffolding
|
|
16
|
+
|
|
17
|
+
Angular CLI includes powerful code scaffolding tools. To generate a new component, run:
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
ng generate component component-name
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
For a complete list of available schematics (such as `components`, `directives`, or `pipes`), run:
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
ng generate --help
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Building
|
|
30
|
+
|
|
31
|
+
To build the project run:
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
ng build
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
This will compile your project and store the build artifacts in the `dist/` directory. By default, the production build optimizes your application for performance and speed.
|
|
38
|
+
|
|
39
|
+
## Running unit tests
|
|
40
|
+
|
|
41
|
+
To execute unit tests with the [Vitest](https://vitest.dev/) test runner, use the following command:
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
ng test
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
## Running end-to-end tests
|
|
48
|
+
|
|
49
|
+
For end-to-end (e2e) testing, run:
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
ng e2e
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
Angular CLI does not come with an end-to-end testing framework by default. You can choose one that suits your needs.
|
|
56
|
+
|
|
57
|
+
## Additional Resources
|
|
58
|
+
|
|
59
|
+
For more information on using the Angular CLI, including detailed command references, visit the [Angular CLI Overview and Command Reference](https://angular.dev/tools/cli) page.
|
package/angular.json
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
|
|
3
|
+
"version": 1,
|
|
4
|
+
"cli": {
|
|
5
|
+
"packageManager": "npm"
|
|
6
|
+
},
|
|
7
|
+
"newProjectRoot": "projects",
|
|
8
|
+
"projects": {
|
|
9
|
+
"as-backbone-lib": {
|
|
10
|
+
"projectType": "library",
|
|
11
|
+
"root": "projects/as-backbone-lib",
|
|
12
|
+
"sourceRoot": "projects/as-backbone-lib/src",
|
|
13
|
+
"prefix": "lib",
|
|
14
|
+
"architect": {
|
|
15
|
+
"build": {
|
|
16
|
+
"builder": "@angular/build:ng-packagr",
|
|
17
|
+
"configurations": {
|
|
18
|
+
"production": {
|
|
19
|
+
"tsConfig": "projects/as-backbone-lib/tsconfig.lib.prod.json"
|
|
20
|
+
},
|
|
21
|
+
"development": {
|
|
22
|
+
"tsConfig": "projects/as-backbone-lib/tsconfig.lib.json"
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
"defaultConfiguration": "production"
|
|
26
|
+
},
|
|
27
|
+
"test": {
|
|
28
|
+
"builder": "@angular/build:unit-test",
|
|
29
|
+
"options": {
|
|
30
|
+
"tsConfig": "projects/as-backbone-lib/tsconfig.spec.json"
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default { extends: ['@commitlint/config-conventional'] };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# Contributing
|
|
2
|
+
|
|
3
|
+
Contributions are welcome! To contribute:
|
|
4
|
+
|
|
5
|
+
1. Fork the repo
|
|
6
|
+
2. Create a feature branch (git checkout -b feature-my-feature)
|
|
7
|
+
3. Commit your changes (git commit -m 'feat: add feature description')
|
|
8
|
+
4. Push to the branch (git push origin feature-my-feature)
|
|
9
|
+
5. Open a pull request
|
|
10
|
+
|
|
11
|
+
Please ensure your code follows the existing style and passes lint and format checks.
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
# License
|
|
2
|
+
|
|
3
|
+
This software is the property of **Alberto Scandolara** and is provided for **authorized use only**.
|
|
4
|
+
🔒 Copying, modification, or distribution of this code is **strictly prohibited** without prior written consent from Alberto Scandolara.
|
|
5
|
+
|
|
6
|
+
© 2025 **Alberto Scandolara**. All rights reserved.
|
package/eslint.config.js
ADDED
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
// eslint.config.js
|
|
2
|
+
import tseslint from 'typescript-eslint';
|
|
3
|
+
import prettier from 'eslint-config-prettier';
|
|
4
|
+
import prettierPlugin from 'eslint-plugin-prettier';
|
|
5
|
+
import js from '@eslint/js';
|
|
6
|
+
import eslintPluginRegExp from 'eslint-plugin-regexp';
|
|
7
|
+
import eslintPluginImportX from 'eslint-plugin-import-x';
|
|
8
|
+
import eslintPluginSecurity from 'eslint-plugin-security';
|
|
9
|
+
import path from 'path';
|
|
10
|
+
|
|
11
|
+
export default [
|
|
12
|
+
// ----------------------------------------------------
|
|
13
|
+
// Ignore build artifacts
|
|
14
|
+
// ----------------------------------------------------
|
|
15
|
+
{
|
|
16
|
+
ignores: ['dist', 'node_modules', 'docs/**', 'vite.config.ts', 'vitepress.config.ts'],
|
|
17
|
+
},
|
|
18
|
+
|
|
19
|
+
// ----------------------------------------------------
|
|
20
|
+
// Base JavaScript recommended rules
|
|
21
|
+
// ----------------------------------------------------
|
|
22
|
+
js.configs.recommended,
|
|
23
|
+
|
|
24
|
+
// ----------------------------------------------------
|
|
25
|
+
// Disable formatting rules incompatible with Prettier
|
|
26
|
+
// ----------------------------------------------------
|
|
27
|
+
prettier,
|
|
28
|
+
|
|
29
|
+
// ----------------------------------------------------
|
|
30
|
+
// TypeScript recommended rules
|
|
31
|
+
// ----------------------------------------------------
|
|
32
|
+
...tseslint.configs.recommended,
|
|
33
|
+
|
|
34
|
+
// ----------------------------------------------------
|
|
35
|
+
// TypeScript strict & stylistic
|
|
36
|
+
// ----------------------------------------------------
|
|
37
|
+
...tseslint.configs.strict,
|
|
38
|
+
...tseslint.configs.stylistic,
|
|
39
|
+
|
|
40
|
+
// ----------------------------------------------------
|
|
41
|
+
// Project-level rules
|
|
42
|
+
// ----------------------------------------------------
|
|
43
|
+
{
|
|
44
|
+
files: ['**/*.ts'],
|
|
45
|
+
|
|
46
|
+
languageOptions: {
|
|
47
|
+
parserOptions: {
|
|
48
|
+
projectService: true,
|
|
49
|
+
tsconfigRootDir: path.resolve(),
|
|
50
|
+
},
|
|
51
|
+
},
|
|
52
|
+
|
|
53
|
+
plugins: {
|
|
54
|
+
prettier: prettierPlugin,
|
|
55
|
+
import: eslintPluginImportX,
|
|
56
|
+
regexp: eslintPluginRegExp,
|
|
57
|
+
security: eslintPluginSecurity,
|
|
58
|
+
},
|
|
59
|
+
|
|
60
|
+
rules: {
|
|
61
|
+
// ----------------------------------------------
|
|
62
|
+
// PRETTIER
|
|
63
|
+
// ----------------------------------------------
|
|
64
|
+
'prettier/prettier': ['error', {}, { usePrettierrc: true }],
|
|
65
|
+
|
|
66
|
+
// ----------------------------------------------
|
|
67
|
+
// TYPESCRIPT RULES — MAX STRICTNESS
|
|
68
|
+
// ----------------------------------------------
|
|
69
|
+
'@typescript-eslint/no-unused-vars': [
|
|
70
|
+
'error',
|
|
71
|
+
{ argsIgnorePattern: '^_', varsIgnorePattern: '^_' },
|
|
72
|
+
],
|
|
73
|
+
'@typescript-eslint/no-explicit-any': 'error',
|
|
74
|
+
'@typescript-eslint/no-floating-promises': 'error',
|
|
75
|
+
'@typescript-eslint/no-misused-promises': 'error',
|
|
76
|
+
'@typescript-eslint/no-non-null-assertion': 'error',
|
|
77
|
+
'@typescript-eslint/no-unnecessary-type-assertion': 'error',
|
|
78
|
+
'@typescript-eslint/no-redundant-type-constituents': 'error',
|
|
79
|
+
'@typescript-eslint/explicit-function-return-type': [
|
|
80
|
+
'error',
|
|
81
|
+
{ allowExpressions: true, allowTypedFunctionExpressions: true },
|
|
82
|
+
],
|
|
83
|
+
'@typescript-eslint/strict-boolean-expressions': [
|
|
84
|
+
'error',
|
|
85
|
+
{
|
|
86
|
+
allowNumber: false,
|
|
87
|
+
allowString: false,
|
|
88
|
+
allowNullableObject: false,
|
|
89
|
+
allowNullableBoolean: false,
|
|
90
|
+
allowNullableString: false,
|
|
91
|
+
allowNullableNumber: false,
|
|
92
|
+
allowAny: false,
|
|
93
|
+
},
|
|
94
|
+
],
|
|
95
|
+
'@typescript-eslint/switch-exhaustiveness-check': 'error',
|
|
96
|
+
'@typescript-eslint/consistent-type-imports': [
|
|
97
|
+
'error',
|
|
98
|
+
{ prefer: 'type-imports', fixStyle: 'separate-type-imports' },
|
|
99
|
+
],
|
|
100
|
+
'@typescript-eslint/no-confusing-void-expression': 'error',
|
|
101
|
+
'@typescript-eslint/prefer-nullish-coalescing': 'error',
|
|
102
|
+
|
|
103
|
+
// ----------------------------------------------
|
|
104
|
+
// IMPORT RULES — ULTRA STRICT
|
|
105
|
+
// ----------------------------------------------
|
|
106
|
+
'import/no-absolute-path': 'error',
|
|
107
|
+
'import/no-useless-path-segments': 'error',
|
|
108
|
+
'import/no-cycle': 'error',
|
|
109
|
+
'import/no-self-import': 'error',
|
|
110
|
+
'import/first': 'error',
|
|
111
|
+
'import/newline-after-import': 'error',
|
|
112
|
+
'import/order': [
|
|
113
|
+
'error',
|
|
114
|
+
{
|
|
115
|
+
groups: ['builtin', 'external', 'internal', ['parent', 'sibling', 'index']],
|
|
116
|
+
'newlines-between': 'always',
|
|
117
|
+
alphabetize: { order: 'asc' },
|
|
118
|
+
},
|
|
119
|
+
],
|
|
120
|
+
|
|
121
|
+
// ----------------------------------------------
|
|
122
|
+
// REGEXP RULES
|
|
123
|
+
// ----------------------------------------------
|
|
124
|
+
'regexp/no-dupe-disjunctions': 'error',
|
|
125
|
+
'regexp/no-empty-capturing-group': 'error',
|
|
126
|
+
'regexp/no-empty-character-class': 'error',
|
|
127
|
+
'regexp/no-legacy-features': 'error',
|
|
128
|
+
'regexp/no-trivially-nested-quantifier': 'error',
|
|
129
|
+
'regexp/no-useless-lazy': 'error',
|
|
130
|
+
|
|
131
|
+
// ----------------------------------------------
|
|
132
|
+
// SECURITY RULES
|
|
133
|
+
// ----------------------------------------------
|
|
134
|
+
'security/detect-non-literal-fs-filename': 'error',
|
|
135
|
+
'security/detect-eval-with-expression': 'error',
|
|
136
|
+
'security/detect-child-process': 'error',
|
|
137
|
+
|
|
138
|
+
// ----------------------------------------------
|
|
139
|
+
// GENERAL JS RULES
|
|
140
|
+
// ----------------------------------------------
|
|
141
|
+
eqeqeq: ['error', 'always', { null: 'ignore' }],
|
|
142
|
+
'no-debugger': 'error',
|
|
143
|
+
'no-alert': 'error',
|
|
144
|
+
'no-var': 'error',
|
|
145
|
+
'prefer-const': 'error',
|
|
146
|
+
'no-return-await': 'error',
|
|
147
|
+
|
|
148
|
+
// Specific rules
|
|
149
|
+
curly: ['error', 'all'],
|
|
150
|
+
},
|
|
151
|
+
},
|
|
152
|
+
|
|
153
|
+
{
|
|
154
|
+
files: ['.storybook/**/*.ts'],
|
|
155
|
+
languageOptions: {
|
|
156
|
+
parserOptions: {
|
|
157
|
+
projectService: true,
|
|
158
|
+
tsconfigRootDir: path.resolve(),
|
|
159
|
+
},
|
|
160
|
+
},
|
|
161
|
+
},
|
|
162
|
+
];
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
'*.{ts,js}': (filenames) => {
|
|
3
|
+
// only lint files outside docs
|
|
4
|
+
const files = filenames.filter((f) => !f.startsWith('docs/'));
|
|
5
|
+
return files.length
|
|
6
|
+
? [`eslint --fix ${files.join(' ')}`, `prettier --write ${files.join(' ')}`]
|
|
7
|
+
: [];
|
|
8
|
+
},
|
|
9
|
+
'*.{json,md,html,css,scss}': ['prettier --write'],
|
|
10
|
+
};
|
package/netlify.toml
ADDED
package/package.json
ADDED
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@albi_scando/as-backbone-lib",
|
|
3
|
+
"version": "1.0.1",
|
|
4
|
+
"description": "Workspace for as-backbone-lib",
|
|
5
|
+
"repository": {
|
|
6
|
+
"type": "git",
|
|
7
|
+
"url": "git+https://github.com/albertoscandolara/as-backbone-lib"
|
|
8
|
+
},
|
|
9
|
+
"author": "Alberto Scandolara",
|
|
10
|
+
"license": "ISC",
|
|
11
|
+
"bugs": {
|
|
12
|
+
"url": "https://github.com/albertoscandolara/as-backbone-lib/issues"
|
|
13
|
+
},
|
|
14
|
+
"homepage": "https://github.com/albertoscandolara/as-backbone-lib#readme",
|
|
15
|
+
"type": "module",
|
|
16
|
+
"main": "index.js",
|
|
17
|
+
"scripts": {
|
|
18
|
+
"ng": "ng",
|
|
19
|
+
"start": "ng serve",
|
|
20
|
+
"build": "ng build",
|
|
21
|
+
"commit": "cz",
|
|
22
|
+
"watch": "ng build --watch --configuration development",
|
|
23
|
+
"test": "ng test",
|
|
24
|
+
"docs:build": "typedoc",
|
|
25
|
+
"docs:serve": "npx http-server docs -o",
|
|
26
|
+
"formatter": "npm run prettier && npm run lint",
|
|
27
|
+
"formatter:fix": "npm run prettier:fix && npm run lint:fix",
|
|
28
|
+
"lint": "eslint .",
|
|
29
|
+
"lint:fix": "eslint . --fix",
|
|
30
|
+
"prepare": "husky",
|
|
31
|
+
"preview": "vite preview",
|
|
32
|
+
"prettier": "prettier . --check",
|
|
33
|
+
"prettier:fix": "prettier . --write",
|
|
34
|
+
"release": "semantic-release",
|
|
35
|
+
"release:dry": "semantic-release --dry-run"
|
|
36
|
+
},
|
|
37
|
+
"packageManager": "pnpm@10.28.2",
|
|
38
|
+
"engines": {
|
|
39
|
+
"node": ">=22.11.0"
|
|
40
|
+
},
|
|
41
|
+
"config": {
|
|
42
|
+
"commitizen": {
|
|
43
|
+
"path": "./node_modules/cz-conventional-changelog"
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
"lint-staged": {
|
|
47
|
+
"*.ts": "prettier --write",
|
|
48
|
+
"*.{js,scss,css,md}": [
|
|
49
|
+
"prettier --write",
|
|
50
|
+
"eslint --fix"
|
|
51
|
+
]
|
|
52
|
+
},
|
|
53
|
+
"dependencies": {
|
|
54
|
+
"@angular/common": "^21.2.0",
|
|
55
|
+
"@angular/compiler": "^21.2.0",
|
|
56
|
+
"@angular/core": "^21.2.0",
|
|
57
|
+
"@angular/forms": "^21.2.0",
|
|
58
|
+
"@angular/platform-browser": "^21.2.0",
|
|
59
|
+
"@angular/router": "^21.2.0",
|
|
60
|
+
"rxjs": "~7.8.0",
|
|
61
|
+
"tslib": "^2.3.0"
|
|
62
|
+
},
|
|
63
|
+
"devDependencies": {
|
|
64
|
+
"@albi_scando/as-const-http-lib": "^1.0.0",
|
|
65
|
+
"@albi_scando/as-const-languages-lib": "^1.1.0",
|
|
66
|
+
"@albi_scando/as-const-lib": "^1.10.1",
|
|
67
|
+
"@albi_scando/as-log-lib": "^1.0.1",
|
|
68
|
+
"@angular/build": "^21.2.2",
|
|
69
|
+
"@angular/cli": "^21.2.2",
|
|
70
|
+
"@angular/compiler-cli": "^21.2.0",
|
|
71
|
+
"@commitlint/cli": "^20.4.1",
|
|
72
|
+
"@commitlint/config-conventional": "^20.4.1",
|
|
73
|
+
"@eslint/js": "^9.39.2",
|
|
74
|
+
"@semantic-release/changelog": "^6.0.3",
|
|
75
|
+
"@semantic-release/git": "^10.0.1",
|
|
76
|
+
"@semantic-release/github": "^12.0.3",
|
|
77
|
+
"@semantic-release/npm": "^13.1.3",
|
|
78
|
+
"@types/jasmine": "~5.1.0",
|
|
79
|
+
"@types/node": "^25.2.1",
|
|
80
|
+
"@types/numeric": "^1.2.6",
|
|
81
|
+
"branch-name-lint": "^3.0.1",
|
|
82
|
+
"commitizen": "^4.3.1",
|
|
83
|
+
"cz-conventional-changelog": "^3.3.0",
|
|
84
|
+
"eslint": "^9.39.2",
|
|
85
|
+
"eslint-config-prettier": "^10.1.8",
|
|
86
|
+
"eslint-plugin-import-x": "^4.16.1",
|
|
87
|
+
"eslint-plugin-prettier": "^5.5.5",
|
|
88
|
+
"eslint-plugin-regexp": "^3.0.0",
|
|
89
|
+
"eslint-plugin-security": "^3.0.1",
|
|
90
|
+
"globals": "^17.3.0",
|
|
91
|
+
"husky": "^9.1.7",
|
|
92
|
+
"jsdom": "^28.0.0",
|
|
93
|
+
"lint-staged": "^16.2.7",
|
|
94
|
+
"ng-packagr": "^21.2.0",
|
|
95
|
+
"prettier": "^3.8.1",
|
|
96
|
+
"semantic-release": "^25.0.3",
|
|
97
|
+
"typedoc": "^0.28.16",
|
|
98
|
+
"typescript": "~5.9.2",
|
|
99
|
+
"vitest": "^4.0.8",
|
|
100
|
+
"typescript-eslint": "^8.54.0",
|
|
101
|
+
"validate-branch-name": "^1.3.2"
|
|
102
|
+
},
|
|
103
|
+
"peerDependencies": {
|
|
104
|
+
"@albi_scando/as-const-http-lib": "^1.0.0",
|
|
105
|
+
"@albi_scando/as-const-languages-lib": "^1.1.0",
|
|
106
|
+
"@albi_scando/as-const-lib": "^1.10.1",
|
|
107
|
+
"@albi_scando/as-log-lib": "^1.0.1"
|
|
108
|
+
}
|
|
109
|
+
}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
# AsBackboneLib
|
|
2
|
+
|
|
3
|
+
This project was generated using [Angular CLI](https://github.com/angular/angular-cli) version 21.2.0.
|
|
4
|
+
|
|
5
|
+
## Code scaffolding
|
|
6
|
+
|
|
7
|
+
Angular CLI includes powerful code scaffolding tools. To generate a new component, run:
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
ng generate component component-name
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
For a complete list of available schematics (such as `components`, `directives`, or `pipes`), run:
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
ng generate --help
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Building
|
|
20
|
+
|
|
21
|
+
To build the library, run:
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
ng build as-backbone-lib
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
This command will compile your project, and the build artifacts will be placed in the `dist/` directory.
|
|
28
|
+
|
|
29
|
+
### Publishing the Library
|
|
30
|
+
|
|
31
|
+
Once the project is built, you can publish your library by following these steps:
|
|
32
|
+
|
|
33
|
+
1. Navigate to the `dist` directory:
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
cd dist/as-backbone-lib
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
2. Run the `npm publish` command to publish your library to the npm registry:
|
|
40
|
+
```bash
|
|
41
|
+
npm publish
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
## Running unit tests
|
|
45
|
+
|
|
46
|
+
To execute unit tests with the [Karma](https://karma-runner.github.io) test runner, use the following command:
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
ng test
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
## Running end-to-end tests
|
|
53
|
+
|
|
54
|
+
For end-to-end (e2e) testing, run:
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
ng e2e
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
Angular CLI does not come with an end-to-end testing framework by default. You can choose one that suits your needs.
|
|
61
|
+
|
|
62
|
+
## Additional Resources
|
|
63
|
+
|
|
64
|
+
For more information on using the Angular CLI, including detailed command references, visit the [Angular CLI Overview and Command Reference](https://angular.dev/tools/cli) page.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { APPLICATION_NAME } from './lib/constants/application.constant';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/* To learn more about Typescript configuration file: https://www.typescriptlang.org/docs/handbook/tsconfig-json.html. */
|
|
2
|
+
/* To learn more about Angular compiler options: https://angular.dev/reference/configs/angular-compiler-options. */
|
|
3
|
+
{
|
|
4
|
+
"extends": "../../tsconfig.json",
|
|
5
|
+
"compilerOptions": {
|
|
6
|
+
"outDir": "../../out-tsc/lib",
|
|
7
|
+
"declaration": true,
|
|
8
|
+
"declarationMap": true,
|
|
9
|
+
"types": []
|
|
10
|
+
},
|
|
11
|
+
"include": ["src/**/*.ts"],
|
|
12
|
+
"exclude": ["**/*.spec.ts"]
|
|
13
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/* To learn more about Typescript configuration file: https://www.typescriptlang.org/docs/handbook/tsconfig-json.html. */
|
|
2
|
+
/* To learn more about Angular compiler options: https://angular.dev/reference/configs/angular-compiler-options. */
|
|
3
|
+
{
|
|
4
|
+
"extends": "./tsconfig.lib.json",
|
|
5
|
+
"compilerOptions": {
|
|
6
|
+
"declarationMap": false
|
|
7
|
+
},
|
|
8
|
+
"angularCompilerOptions": {
|
|
9
|
+
"compilationMode": "partial"
|
|
10
|
+
}
|
|
11
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/* To learn more about Typescript configuration file: https://www.typescriptlang.org/docs/handbook/tsconfig-json.html. */
|
|
2
|
+
/* To learn more about Angular compiler options: https://angular.dev/reference/configs/angular-compiler-options. */
|
|
3
|
+
{
|
|
4
|
+
"extends": "../../tsconfig.json",
|
|
5
|
+
"compilerOptions": {
|
|
6
|
+
"outDir": "../../out-tsc/spec",
|
|
7
|
+
"types": ["vitest/globals"]
|
|
8
|
+
},
|
|
9
|
+
"include": ["src/**/*.d.ts", "src/**/*.spec.ts"]
|
|
10
|
+
}
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/* To learn more about Typescript configuration file: https://www.typescriptlang.org/docs/handbook/tsconfig-json.html. */
|
|
2
|
+
/* To learn more about Angular compiler options: https://angular.dev/reference/configs/angular-compiler-options. */
|
|
3
|
+
{
|
|
4
|
+
"compileOnSave": false,
|
|
5
|
+
"compilerOptions": {
|
|
6
|
+
"paths": {
|
|
7
|
+
"as-backbone-lib": ["./dist/as-backbone-lib"]
|
|
8
|
+
},
|
|
9
|
+
"strict": true,
|
|
10
|
+
"noImplicitOverride": true,
|
|
11
|
+
"noPropertyAccessFromIndexSignature": true,
|
|
12
|
+
"noImplicitReturns": true,
|
|
13
|
+
"noFallthroughCasesInSwitch": true,
|
|
14
|
+
"skipLibCheck": true,
|
|
15
|
+
"isolatedModules": true,
|
|
16
|
+
"experimentalDecorators": true,
|
|
17
|
+
"importHelpers": true,
|
|
18
|
+
"target": "ES2022",
|
|
19
|
+
"module": "preserve"
|
|
20
|
+
},
|
|
21
|
+
"angularCompilerOptions": {
|
|
22
|
+
"enableI18nLegacyMessageIdFormat": false,
|
|
23
|
+
"strictInjectionParameters": true,
|
|
24
|
+
"strictInputAccessModifiers": true,
|
|
25
|
+
"strictTemplates": true
|
|
26
|
+
},
|
|
27
|
+
"files": [],
|
|
28
|
+
"references": [
|
|
29
|
+
{
|
|
30
|
+
"path": "./projects/as-backbone-lib/tsconfig.lib.json"
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"path": "./projects/as-backbone-lib/tsconfig.spec.json"
|
|
34
|
+
}
|
|
35
|
+
]
|
|
36
|
+
}
|