7
shared/README.md
Normal file
7
shared/README.md
Normal file
@@ -0,0 +1,7 @@
|
||||
# shared
|
||||
|
||||
This library was generated with [Nx](https://nx.dev).
|
||||
|
||||
## Building
|
||||
|
||||
Run `nx build shared` to build the library.
|
||||
19
shared/eslint.config.mjs
Normal file
19
shared/eslint.config.mjs
Normal file
@@ -0,0 +1,19 @@
|
||||
import baseConfig from '../eslint.config.mjs';
|
||||
|
||||
export default [
|
||||
...baseConfig,
|
||||
{
|
||||
files: ['**/*.json'],
|
||||
rules: {
|
||||
'@nx/dependency-checks': [
|
||||
'error',
|
||||
{
|
||||
ignoredFiles: ['{projectRoot}/eslint.config.{js,cjs,mjs,ts,cts,mts}'],
|
||||
},
|
||||
],
|
||||
},
|
||||
languageOptions: {
|
||||
parser: await import('jsonc-eslint-parser'),
|
||||
},
|
||||
},
|
||||
];
|
||||
11
shared/package.json
Normal file
11
shared/package.json
Normal file
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"name": "@appweb/shared",
|
||||
"version": "0.0.1",
|
||||
"private": true,
|
||||
"type": "commonjs",
|
||||
"main": "./src/index.js",
|
||||
"types": "./src/index.d.ts",
|
||||
"dependencies": {
|
||||
"tslib": "^2.3.0"
|
||||
}
|
||||
}
|
||||
19
shared/project.json
Normal file
19
shared/project.json
Normal file
@@ -0,0 +1,19 @@
|
||||
{
|
||||
"name": "shared",
|
||||
"$schema": "../node_modules/nx/schemas/project-schema.json",
|
||||
"sourceRoot": "shared/src",
|
||||
"projectType": "library",
|
||||
"tags": [],
|
||||
"targets": {
|
||||
"build": {
|
||||
"executor": "@nx/js:tsc",
|
||||
"outputs": ["{options.outputPath}"],
|
||||
"options": {
|
||||
"outputPath": "dist/shared",
|
||||
"main": "shared/src/index.ts",
|
||||
"tsConfig": "shared/tsconfig.lib.json",
|
||||
"assets": ["shared/*.md"]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
1
shared/src/index.ts
Normal file
1
shared/src/index.ts
Normal file
@@ -0,0 +1 @@
|
||||
export * from './lib/constants';
|
||||
11
shared/src/lib/constants.ts
Normal file
11
shared/src/lib/constants.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
/**
|
||||
* Nomi delle chiavi per le variabili d'ambiente.
|
||||
* Centralizzandole qui, evitiamo di scrivere stringhe a mano nei vari moduli.
|
||||
*/
|
||||
export class KeycloakConfigKeys {
|
||||
static readonly BASE_URL = 'KEYCLOAK_BASE_URL';
|
||||
static readonly URL_AUTH = 'KEYCLOAK_URL_AUTH';
|
||||
static readonly REALM = 'KEYCLOAK_REALM';
|
||||
static readonly CLIENT_ID = 'KEYCLOAK_CLIENT_ID';
|
||||
static readonly CLIENT_SECRET = 'KEYCLOAK_CLIENT_SECRET';
|
||||
}
|
||||
20
shared/tsconfig.json
Normal file
20
shared/tsconfig.json
Normal file
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"extends": "../tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"strict": true,
|
||||
"importHelpers": true,
|
||||
"noImplicitOverride": true,
|
||||
"noImplicitReturns": true,
|
||||
"noFallthroughCasesInSwitch": true,
|
||||
"noPropertyAccessFromIndexSignature": true
|
||||
},
|
||||
"files": [],
|
||||
"include": [],
|
||||
"references": [
|
||||
{
|
||||
"path": "./tsconfig.lib.json"
|
||||
}
|
||||
]
|
||||
}
|
||||
9
shared/tsconfig.lib.json
Normal file
9
shared/tsconfig.lib.json
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"extends": "./tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "../dist/out-tsc",
|
||||
"declaration": true,
|
||||
"types": ["node"]
|
||||
},
|
||||
"include": ["src/**/*.ts"]
|
||||
}
|
||||
Reference in New Issue
Block a user