diff --git a/.github/workflows/onPush.js.yml b/.github/workflows/onPush.js.yml index 2799896d1..3b1df66b4 100644 --- a/.github/workflows/onPush.js.yml +++ b/.github/workflows/onPush.js.yml @@ -12,7 +12,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - node-version: [16.x, 18.x] + node-version: [18.x] steps: - name: The branch or tag ref that triggered the workflow run. diff --git a/README.md b/README.md index 2ed060ee7..5ae20e376 100644 --- a/README.md +++ b/README.md @@ -85,7 +85,8 @@ Requis: | IGO2 version | Node version | | ------------ | ------------ | -| > 1.15.x | >= 16.19.0 | +| >= 16.x | >= 18.10.0 | +| > 1.15.x | >= 16.19.0 | | > 1.5.x | >= 12, <= 16 | | < 1.5.x | >= 8, <= 11 | | 0.x.x | >= 6, <= 10 | @@ -115,6 +116,9 @@ $ npm run doc # Ouvrir un navigateur http://localhost:4220/ ``` +Si vous voulez développer en même temps ce projet ainsi que la librairie associée, référez vous à la procédure suivante: +https://github.com/infra-geo-ouverte/igo2-lib#for-developers + ## Tests ```bash @@ -175,7 +179,9 @@ Require: | IGO2 version | Node version | | ------------ | ------------ | -| > 1.5.x | >= 12, <= 14 | +| >= 16.x | >= 18.10.0 | +| > 1.15.x | >= 16.19.0 | +| > 1.5.x | >= 12, <= 16 | | < 1.5.x | >= 8, <= 11 | | 0.x.x | >= 6, <= 10 | @@ -203,6 +209,9 @@ $ npm run serve.prod $ npm run doc # Open your browser at http://localhost:4220/ +If you want to develop this project and the associated library at the same time, refer to the following procedure: +https://github.com/infra-geo-ouverte/igo2-lib#for-developers + ``` ## Tests-en diff --git a/angular.json b/angular.json index 092a97874..6c0237af8 100644 --- a/angular.json +++ b/angular.json @@ -42,6 +42,12 @@ "input": "./node_modules/@igo2/core/assets/", "output": "./assets/igo2/core/" }, + { + "glob": "**/*", + "input": "./node_modules/@igo2/core/locale/", + "output": "./locale/libs_locale", + "ignore": ["**/*.core.json"] + }, { "glob": "**/*", "input": "./node_modules/@igo2/core/theming/prebuilt-themes", @@ -110,6 +116,64 @@ "buildOptimizer": false, "serviceWorker": false }, + "production-link": { + "budgets": [ + { + "type": "anyComponentStyle", + "maximumWarning": "12kb" + } + ], + "fileReplacements": [ + { + "replace": "src/environments/environment.ts", + "with": "src/environments/environment.prod.ts" + } + ], + "optimization": true, + "outputHashing": "all", + "sourceMap": true, + "namedChunks": false, + "aot": true, + "extractLicenses": true, + "vendorChunk": true, + "buildOptimizer": false, + "serviceWorker": false, + "assets": [ + "src/favicon.ico", + "src/assets", + "src/config", + "src/contexts", + "src/data", + "src/locale", + "src/manifest.webmanifest", + { + "glob": "**/*", + "input": "../../dist/common/assets/", + "output": "./assets/igo2/common/" + }, + { + "glob": "**/*", + "input": "../../dist/core/assets/", + "output": "./assets/igo2/core/" + }, + { + "glob": "**/*", + "input": "../../dist/core/locale/", + "output": "./locale/libs_locale", + "ignore": ["**/*.core.json"] + }, + { + "glob": "**/*", + "input": "../../dist/core/theming/prebuilt-themes", + "output": "./assets/igo2/core/theming/prebuilt-themes" + }, + { + "glob": "**/*", + "input": "../../dist/geo/assets/", + "output": "./assets/igo2/geo/" + } + ] + }, "developpement": { "buildOptimizer": false, "optimization": false, @@ -118,6 +182,49 @@ "sourceMap": true, "namedChunks": true }, + "developpement-link": { + "buildOptimizer": false, + "optimization": false, + "vendorChunk": true, + "extractLicenses": false, + "sourceMap": true, + "namedChunks": true, + "assets": [ + "src/favicon.ico", + "src/assets", + "src/config", + "src/contexts", + "src/data", + "src/locale", + "src/manifest.webmanifest", + { + "glob": "**/*", + "input": "../../packages/common/src/assets/", + "output": "./assets/igo2/common/" + }, + { + "glob": "**/*", + "input": "../../dist/core/assets/", + "output": "./assets/igo2/core/" + }, + { + "glob": "**/*", + "input": "../../dist/core/locale/", + "output": "./locale/libs_locale", + "ignore": ["**/*.core.json"] + }, + { + "glob": "**/*", + "input": "../../dist/core/theming/prebuilt-themes", + "output": "./assets/igo2/core/theming/prebuilt-themes" + }, + { + "glob": "**/*", + "input": "../../packages/geo/src/assets/", + "output": "./assets/igo2/geo/" + } + ] + }, "github": { "budgets": [ { @@ -172,12 +279,18 @@ "builder": "@angular-devkit/build-angular:dev-server", "options": { "browserTarget": "igo2:build", - "port": 4201 + "host": "0.0.0.0", + "port": 4201, + "hmr": true, + "proxyConfig": "proxy.conf.json" }, "configurations": { "developpement": { "browserTarget": "igo2:build:developpement" }, + "developpement-link": { + "browserTarget": "igo2:build:developpement-link" + }, "production": { "browserTarget": "igo2:build:production" }, @@ -218,10 +331,7 @@ "lint": { "builder": "@angular-eslint/builder:lint", "options": { - "lintFilePatterns": [ - "src/**/*.ts", - "src/**/*.html" - ] + "lintFilePatterns": ["src/**/*.ts", "src/**/*.html"] } }, "e2e": { @@ -263,9 +373,7 @@ "lint": { "builder": "@angular-eslint/builder:lint", "options": { - "lintFilePatterns": [ - "e2e/**/*.ts" - ] + "lintFilePatterns": ["e2e/**/*.ts"] } } } diff --git a/package-lock.json b/package-lock.json index a1b98a4c0..c546cc9ba 100644 --- a/package-lock.json +++ b/package-lock.json @@ -7,7 +7,6 @@ "": { "name": "igo", "version": "16.0.0-rc.8", - "hasInstallScript": true, "license": "LiLiQ-R", "dependencies": { "@angular/animations": "^16.2.5", @@ -21,13 +20,13 @@ "@angular/platform-browser-dynamic": "^16.2.5", "@angular/router": "^16.2.5", "@angular/service-worker": "^16.2.5", - "@igo2/auth": "~16.0.0-rc.7", - "@igo2/common": "~16.0.0-rc.7", - "@igo2/context": "~16.0.0-rc.7", - "@igo2/core": "~16.0.0-rc.7", - "@igo2/geo": "~16.0.0-rc.7", - "@igo2/integration": "~16.0.0-rc.7", - "@igo2/utils": "~16.0.0-rc.7", + "@igo2/auth": "*", + "@igo2/common": "*", + "@igo2/context": "*", + "@igo2/core": "*", + "@igo2/geo": "*", + "@igo2/integration": "*", + "@igo2/utils": "*", "core-js": "^3.32.2", "hammerjs": "^2.0.8", "ol": "^7.5.2", @@ -2759,6 +2758,20 @@ "node": ">= 6" } }, + "node_modules/@cypress/request/node_modules/form-data": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", + "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", + "dev": true, + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.6", + "mime-types": "^2.1.12" + }, + "engines": { + "node": ">= 0.12" + } + }, "node_modules/@cypress/schematic": { "version": "2.5.1", "resolved": "https://registry.npmjs.org/@cypress/schematic/-/schematic-2.5.1.tgz", @@ -3378,7 +3391,7 @@ "tslib": "^2.6.0" }, "engines": { - "node": ">=18.10.0" + "node": ">=16.19.0" }, "peerDependencies": { "@angular/cdk": "^16.2.4", @@ -3398,10 +3411,10 @@ "resolved": "https://registry.npmjs.org/@igo2/common/-/common-16.0.0-rc.7.tgz", "integrity": "sha512-PoetChqcifNN5M2i7+XsgGTznPV5HDVeq6V3VM38mZ3H/Z0q0+cdH4iLL3UI6/yXqv4ZktPwuwIsC7HmJWcvvA==", "dependencies": { - "tslib": "^2.6.0" + "tslib": "^2.4.0" }, "engines": { - "node": ">=18.10.0" + "node": ">=16.19.0" }, "peerDependencies": { "@angular/common": "^16.2.5", @@ -3423,10 +3436,10 @@ "resolved": "https://registry.npmjs.org/@igo2/context/-/context-16.0.0-rc.7.tgz", "integrity": "sha512-L5ELyGZtEhK+E7vh2DqLfvRLtowoCQQLbZm1y2I9JUdZMsjZ1gSJoYBAbsgYRbj0BfUEsB9kq8wEr3a2voL5OA==", "dependencies": { - "tslib": "^2.6.0" + "tslib": "^2.4.0" }, "engines": { - "node": ">=18.10.0" + "node": ">=16.19.0" }, "peerDependencies": { "@angular/animations": "^16.2.5", @@ -3450,10 +3463,10 @@ "integrity": "sha512-hMj4FC0ZGhuWQS16NWiDNnVCtV40DObd2S4/eE9+07mneKD0NL1j7s94eO7IrbdFCVTgn2jBTfJApF0CRX21dA==", "dependencies": { "@ngx-translate/core": "^15.0.0", - "tslib": "^2.6.0" + "tslib": "^2.4.0" }, "engines": { - "node": ">=18.10.0" + "node": ">=16.19.0" }, "peerDependencies": { "@angular/cdk": "^16.2.4", @@ -3482,14 +3495,7 @@ "windows-1252": "^3.0.4" }, "engines": { - "node": ">=18.10.0" - }, - "optionalDependencies": { - "file-saver": "^2.0.2", - "html2canvas": "^1.4.1", - "jspdf": "^2.5.1", - "jszip": "^3.10.1", - "moment": "^2.29.4" + "node": ">=16.19.0" }, "peerDependencies": { "@angular/animations": "^16.2.5", @@ -3502,6 +3508,7 @@ "@igo2/core": "^16.0.0-rc.7", "@igo2/utils": "^16.0.0-rc.7", "@mat-datetimepicker/core": "~12.0.0", + "file-saver": "^2.0.2", "flexsearch": "0.7.21", "ngx-indexed-db": "^11.0.2", "ol": "^7.5.2", @@ -3519,7 +3526,7 @@ "tslib": "^2.6.0" }, "engines": { - "node": ">=18.10.0" + "node": ">=16.19.0" }, "peerDependencies": { "@angular/common": "^16.2.5", @@ -3540,7 +3547,7 @@ "tslib": "^2.6.0" }, "engines": { - "node": ">=18.10.0" + "node": ">=16.19.0" }, "peerDependencies": { "@angular/common": "^16.2.5", @@ -4847,140 +4854,19 @@ ], "dev": true, "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@nx/nx-darwin-x64": { - "version": "16.5.1", - "resolved": "https://registry.npmjs.org/@nx/nx-darwin-x64/-/nx-darwin-x64-16.5.1.tgz", - "integrity": "sha512-j9HmL1l8k7EVJ3eOM5y8COF93gqrydpxCDoz23ZEtsY+JHY77VAiRQsmqBgEx9GGA2dXi9VEdS67B0+1vKariw==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@nx/nx-freebsd-x64": { - "version": "16.5.1", - "resolved": "https://registry.npmjs.org/@nx/nx-freebsd-x64/-/nx-freebsd-x64-16.5.1.tgz", - "integrity": "sha512-CXSPT01aVS869tvCCF2tZ7LnCa8l41wJ3mTVtWBkjmRde68E5Up093hklRMyXb3kfiDYlfIKWGwrV4r0eH6x1A==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@nx/nx-linux-arm-gnueabihf": { - "version": "16.5.1", - "resolved": "https://registry.npmjs.org/@nx/nx-linux-arm-gnueabihf/-/nx-linux-arm-gnueabihf-16.5.1.tgz", - "integrity": "sha512-BhrumqJSZCWFfLFUKl4CAUwR0Y0G2H5EfFVGKivVecEQbb+INAek1aa6c89evg2/OvetQYsJ+51QknskwqvLsA==", - "cpu": [ - "arm" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@nx/nx-linux-arm64-gnu": { - "version": "16.5.1", - "resolved": "https://registry.npmjs.org/@nx/nx-linux-arm64-gnu/-/nx-linux-arm64-gnu-16.5.1.tgz", - "integrity": "sha512-x7MsSG0W+X43WVv7JhiSq2eKvH2suNKdlUHEG09Yt0vm3z0bhtym1UCMUg3IUAK7jy9hhLeDaFVFkC6zo+H/XQ==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@nx/nx-linux-arm64-musl": { - "version": "16.5.1", - "resolved": "https://registry.npmjs.org/@nx/nx-linux-arm64-musl/-/nx-linux-arm64-musl-16.5.1.tgz", - "integrity": "sha512-J+/v/mFjOm74I0PNtH5Ka+fDd+/dWbKhpcZ2R1/6b9agzZk+Ff/SrwJcSYFXXWKbPX+uQ4RcJoytT06Zs3s0ow==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@nx/nx-linux-x64-gnu": { - "version": "16.5.1", - "resolved": "https://registry.npmjs.org/@nx/nx-linux-x64-gnu/-/nx-linux-x64-gnu-16.5.1.tgz", - "integrity": "sha512-igooWJ5YxQ94Zft7IqgL+Lw0qHaY15Btw4gfK756g/YTYLZEt4tTvR1y6RnK/wdpE3sa68bFTLVBNCGTyiTiDQ==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@nx/nx-linux-x64-musl": { - "version": "16.5.1", - "resolved": "https://registry.npmjs.org/@nx/nx-linux-x64-musl/-/nx-linux-x64-musl-16.5.1.tgz", - "integrity": "sha512-zF/exnPqFYbrLAduGhTmZ7zNEyADid2bzNQiIjJkh8Y6NpDwrQIwVIyvIxqynsjMrIs51kBH+8TUjKjj2Jgf5A==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], + "dependencies": { + "yallist": "^4.0.0" + }, "engines": { - "node": ">= 10" + "node": ">=10" } }, - "node_modules/@nx/nx-win32-arm64-msvc": { - "version": "16.5.1", - "resolved": "https://registry.npmjs.org/@nx/nx-win32-arm64-msvc/-/nx-win32-arm64-msvc-16.5.1.tgz", - "integrity": "sha512-qtqiLS9Y9TYyAbbpq58kRoOroko4ZXg5oWVqIWFHoxc5bGPweQSJCROEqd1AOl2ZDC6BxfuVHfhDDop1kK05WA==", - "cpu": [ - "arm64" - ], + "node_modules/@nx/nx-darwin-arm64/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", "dev": true, - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">= 10" - } + "optional": true }, "node_modules/@nx/nx-win32-x64-msvc": { "version": "16.5.1", @@ -6928,6 +6814,7 @@ "version": "2.1.2", "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz", "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==", + "peer": true, "bin": { "atob": "bin/atob.js" }, @@ -7115,6 +7002,7 @@ "resolved": "https://registry.npmjs.org/base64-arraybuffer/-/base64-arraybuffer-1.0.2.tgz", "integrity": "sha512-I3yl4r9QB5ZRY3XuJVEPfc2XhZO6YweFPI+UovAzn+8/hb3oJ6lnysaFcjVpkCPfVWFUDvoZ8kmVDP7WyRtYtQ==", "optional": true, + "peer": true, "engines": { "node": ">= 0.6.0" } @@ -7377,6 +7265,7 @@ "version": "1.2.1", "resolved": "https://registry.npmjs.org/btoa/-/btoa-1.2.1.tgz", "integrity": "sha512-SB4/MIGlsiVkMcHmT+pSmIPoNDoHg+7cMzmt3Uxt628MTz2487DKSqK/fuhFBrkuqrYv5UCEnACpF4dTFNKc/g==", + "peer": true, "bin": { "btoa": "bin/btoa.js" }, @@ -8371,7 +8260,7 @@ "version": "1.0.3", "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==", - "devOptional": true + "dev": true }, "node_modules/cors": { "version": "2.8.5", @@ -8549,6 +8438,7 @@ "resolved": "https://registry.npmjs.org/css-line-break/-/css-line-break-2.1.0.tgz", "integrity": "sha512-FHcKFCZcAha3LwfVBhCQbW2nCNbkZXn7KVUJcsT5/P8YmfsVja0FMPJr0B903j/E69HUphKiV9iQArX8SDYA4w==", "optional": true, + "peer": true, "dependencies": { "utrie": "^1.0.2" } @@ -10381,7 +10271,8 @@ "node_modules/fflate": { "version": "0.4.8", "resolved": "https://registry.npmjs.org/fflate/-/fflate-0.4.8.tgz", - "integrity": "sha512-FJqqoDBR00Mdj9ppamLa/Y7vxm+PRmNWA67N846RvsoYVMKB4q3y/de5PA7gUmRMYK/8CMz2GDZQmCRN1wBcWA==" + "integrity": "sha512-FJqqoDBR00Mdj9ppamLa/Y7vxm+PRmNWA67N846RvsoYVMKB4q3y/de5PA7gUmRMYK/8CMz2GDZQmCRN1wBcWA==", + "peer": true }, "node_modules/figures": { "version": "3.2.0", @@ -10414,7 +10305,7 @@ "version": "2.0.5", "resolved": "https://registry.npmjs.org/file-saver/-/file-saver-2.0.5.tgz", "integrity": "sha512-P9bmyZ3h/PRG+Nzga+rbdI4OEpNDzAVyy74uVO9ATgzLK6VtAsYybF/+TOCvrc0MO793d6+42lLyZTw7/ArVzA==", - "optional": true + "peer": true }, "node_modules/filelist": { "version": "1.0.4", @@ -10650,20 +10541,6 @@ "node": "*" } }, - "node_modules/form-data": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", - "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", - "dev": true, - "dependencies": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.6", - "mime-types": "^2.1.12" - }, - "engines": { - "node": ">= 0.12" - } - }, "node_modules/forwarded": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", @@ -11421,6 +11298,7 @@ "resolved": "https://registry.npmjs.org/html2canvas/-/html2canvas-1.4.1.tgz", "integrity": "sha512-fPU6BHNpsyIhr8yyMpTLLxAbkaK8ArIBcmZIRiBLiDhjeqvXolaEmDGmELFuX9I4xDcaKKcJl+TKZLqruBbmWA==", "optional": true, + "peer": true, "dependencies": { "css-line-break": "^2.1.0", "text-segmentation": "^1.0.3" @@ -11786,12 +11664,6 @@ "node": ">=0.10.0" } }, - "node_modules/immediate": { - "version": "3.0.6", - "resolved": "https://registry.npmjs.org/immediate/-/immediate-3.0.6.tgz", - "integrity": "sha512-XXOFtyqDjNDAQxVfYxuF7g9Il/IbWmmlQg2MYKOH8ExIT1qg6xc4zyS3HaEEATgs1btfzxq15ciUiY7gjSXRGQ==", - "optional": true - }, "node_modules/immutable": { "version": "4.3.4", "resolved": "https://registry.npmjs.org/immutable/-/immutable-4.3.4.tgz", @@ -11861,7 +11733,7 @@ "version": "2.0.4", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", - "devOptional": true + "dev": true }, "node_modules/ini": { "version": "4.1.1", @@ -12218,12 +12090,6 @@ "node": ">=8" } }, - "node_modules/isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==", - "devOptional": true - }, "node_modules/isbinaryfile": { "version": "4.0.10", "resolved": "https://registry.npmjs.org/isbinaryfile/-/isbinaryfile-4.0.10.tgz", @@ -12760,6 +12626,7 @@ "version": "2.5.1", "resolved": "https://registry.npmjs.org/jspdf/-/jspdf-2.5.1.tgz", "integrity": "sha512-hXObxz7ZqoyhxET78+XR34Xu2qFGrJJ2I2bE5w4SM8eFaFEkW2xcGRVUss360fYelwRSid/jT078kbNvmoW0QA==", + "peer": true, "dependencies": { "@babel/runtime": "^7.14.0", "atob": "^2.1.2", @@ -12797,18 +12664,6 @@ "verror": "1.10.0" } }, - "node_modules/jszip": { - "version": "3.10.1", - "resolved": "https://registry.npmjs.org/jszip/-/jszip-3.10.1.tgz", - "integrity": "sha512-xXDvecyTpGLrqFrvkrUSoxxfJI5AH7U8zxxtVclpsUtMCq4JQ290LY8AW5c7Ggnr/Y/oK+bQMbqK2qmtk3pN4g==", - "optional": true, - "dependencies": { - "lie": "~3.3.0", - "pako": "~1.0.2", - "readable-stream": "~2.3.6", - "setimmediate": "^1.0.5" - } - }, "node_modules/jwt-decode": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/jwt-decode/-/jwt-decode-2.2.0.tgz", @@ -13150,15 +13005,6 @@ } } }, - "node_modules/lie": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/lie/-/lie-3.3.0.tgz", - "integrity": "sha512-UaiMJzeWRlEujzAuw5LokY1L5ecNQYZKfmyZ9L7wDHb/p5etKaxXhohBcrw0EYby+G/NA52vRSN4N39dxHAIwQ==", - "optional": true, - "dependencies": { - "immediate": "~3.0.5" - } - }, "node_modules/lines-and-columns": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-2.0.3.tgz", @@ -14109,15 +13955,6 @@ "mkdirp": "bin/cmd.js" } }, - "node_modules/moment": { - "version": "2.29.4", - "resolved": "https://registry.npmjs.org/moment/-/moment-2.29.4.tgz", - "integrity": "sha512-5LC9SOxjSc2HF6vO2CyuTDNivEdoz2IvyJJGj6X8DJ0eFyfszE0QiEd+iXmBvUP3WHxSjFH/vIsA0EN00cgr8w==", - "optional": true, - "engines": { - "node": "*" - } - }, "node_modules/mrmime": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/mrmime/-/mrmime-1.0.1.tgz", @@ -14274,21 +14111,6 @@ "@angular/platform-browser": ">=16.0.0-0" } }, - "node_modules/nice-napi": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/nice-napi/-/nice-napi-1.0.2.tgz", - "integrity": "sha512-px/KnJAJZf5RuBGcfD+Sp2pAKq0ytz8j+1NehvgIGFkvtvFrDM3T8E4x/JJODXK9WZow8RRGrbA9QQ3hs+pDhA==", - "dev": true, - "hasInstallScript": true, - "optional": true, - "os": [ - "!win32" - ], - "dependencies": { - "node-addon-api": "^3.0.0", - "node-gyp-build": "^4.2.2" - } - }, "node_modules/node-addon-api": { "version": "3.2.1", "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-3.2.1.tgz", @@ -15281,7 +15103,7 @@ "version": "1.0.11", "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.11.tgz", "integrity": "sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==", - "devOptional": true + "dev": true }, "node_modules/parent-module": { "version": "1.0.1", @@ -15854,7 +15676,7 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", - "devOptional": true + "dev": true }, "node_modules/proj4": { "version": "2.9.2", @@ -16380,7 +16202,7 @@ "version": "2.3.8", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", - "devOptional": true, + "dev": true, "dependencies": { "core-util-is": "~1.0.0", "inherits": "~2.0.3", @@ -16391,11 +16213,17 @@ "util-deprecate": "~1.0.1" } }, + "node_modules/readable-stream/node_modules/isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==", + "dev": true + }, "node_modules/readable-stream/node_modules/safe-buffer": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "devOptional": true + "dev": true }, "node_modules/readdirp": { "version": "3.6.0", @@ -17079,12 +16907,6 @@ "node": ">= 0.4" } }, - "node_modules/setimmediate": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", - "integrity": "sha512-MATJdZp8sLqDl/68LfQmbP8zKPLQNV6BIZoIgrscFDQ+RsvK/BxeDQOgyxKKoh0y/8h3BqVFnCqQ/gd+reiIXA==", - "optional": true - }, "node_modules/setprototypeof": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", @@ -17743,7 +17565,7 @@ "version": "1.1.1", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "devOptional": true, + "dev": true, "dependencies": { "safe-buffer": "~5.1.0" } @@ -17752,7 +17574,7 @@ "version": "5.1.2", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "devOptional": true + "dev": true }, "node_modules/string-width": { "version": "4.2.3", @@ -18038,10 +17860,7 @@ "temp-dir": "^3.0.0" }, "engines": { - "node": ">=14.18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": ">=8" } }, "node_modules/terser": { @@ -18182,6 +18001,7 @@ "resolved": "https://registry.npmjs.org/text-segmentation/-/text-segmentation-1.0.3.tgz", "integrity": "sha512-iOiPUo/BGnZ6+54OsWxZidGCsdU8YbE4PSpdPinp7DeMtUJNJBoJ/ouUSTJjHkh1KntHaltHl/gDs2FC4i5+Nw==", "optional": true, + "peer": true, "dependencies": { "utrie": "^1.0.2" } @@ -18328,19 +18148,19 @@ } }, "node_modules/ts-cacheable": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/ts-cacheable/-/ts-cacheable-1.0.10.tgz", - "integrity": "sha512-eWPYcbbiXE6TSw39RCTrKBhGDoepcuufhh51bwSxa5qQKwQ8EHbCj+QOL5aOEoLsitwZZiW5/sTxiU8WycA0sw==", + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/ts-cacheable/-/ts-cacheable-1.0.6.tgz", + "integrity": "sha512-Fqr0Xt3ra5ADqJytckD6P83vzVBM/t/z/Oa8nkPXjKAjJY5i/VsefbWXmNZAca0oLs+DxKErBkwfQFqLG8snqw==", "peerDependencies": { "rxjs": "^6.6.0 || ^7.4.0" } }, "node_modules/ts-md5": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/ts-md5/-/ts-md5-1.3.1.tgz", - "integrity": "sha512-DiwiXfwvcTeZ5wCE0z+2A9EseZsztaiZtGrtSaY5JOD7ekPnR/GoIVD5gXZAlK9Na9Kvpo9Waz5rW64WKAWApg==", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/ts-md5/-/ts-md5-1.3.0.tgz", + "integrity": "sha512-0tvHQRuLBZ1cGDl84PXB4tz3/pSRuajI3yi58OFcOBVRh4D/jd8kjLcxe5Wo/rd0iHhZKkurt0qF3X2aEzW/KA==", "engines": { - "node": ">=12" + "node": ">=10" } }, "node_modules/ts-node": { @@ -18817,7 +18637,7 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", - "devOptional": true + "dev": true }, "node_modules/utils-merge": { "version": "1.0.1", @@ -18833,6 +18653,7 @@ "resolved": "https://registry.npmjs.org/utrie/-/utrie-1.0.2.tgz", "integrity": "sha512-1MLa5ouZiOmQzUbjbu9VmjLzn1QLXBhwpUa7kdLUQK+KQ5KA9I1vk5U4YHe/X2Ch7PYnJfWuWT+VbuxbGwljhw==", "optional": true, + "peer": true, "dependencies": { "base64-arraybuffer": "^1.0.2" } diff --git a/package.json b/package.json index e7ab4a7ba..a8a29267e 100644 --- a/package.json +++ b/package.json @@ -12,21 +12,21 @@ }, "scripts": { "ng": "ng", - "start": "ng serve --host 0.0.0.0 --port 4201 --proxy-config proxy.conf.json", + "start": "ng serve", "start-pwa": "ng build --configuration pwa --output-path ./dist/pwa && npm run serve.pwa", "build": "ng build", - "format": "prettier --write ./src/**/*.{ts,js,html,scss,css,json}", + "build.prod": "ng build --configuration production", + "link.start": "ng serve --configuration developpement-link", + "link.build": "ng build --configuration production-link", "lint": "ng lint", "lint.fix": "ng lint --fix", + "format": "prettier --write ./src/**/*.{ts,js,html,scss,css,json}", "e2e": "ng run igo2:e2e:production", "e2e.local": "ng run igo2:e2e:local", - "postinstall": "npm run copyLocaleToDemo", - "build.prod": "ng build --configuration production", "build.github": "ng build --configuration=github --output-path ./dist/ghpages --base-href /igo2/", "build.pwa": "ng build --configuration pwa --output-path ./dist/pwa", "serve.prod": "http-server ./dist/igo2/ --port 4201 --no-browser", "serve.pwa": "http-server ./dist/pwa/ --port 4201 --no-browser", - "copyLocaleToDemo": "ts-node scripts/src/locale-copy-from-igo2-core.ts", "doc": "compodoc -p src/tsconfig.app.json -s --port 4220", "build.doc": "compodoc -p src/tsconfig.app.json", "serve.doc": "compodoc -s --port 4220", @@ -37,7 +37,6 @@ "test": "ng test --watch=false --browsers=ChromeHeadless", "test.watch": "ng test", "test.all": "npm run test && npm run e2e", - "clean": "rimraf ./dist && rimraf ./node_modules && npm cache clean --force && git checkout -- package.json && git checkout -- package-lock.json", "changelog": "conventional-changelog -p angular -i CHANGELOG.md -s -r 0", "changelog-current": "conventional-changelog -p angular -r 2", "preversion.linux": "npm run test.all", @@ -65,13 +64,13 @@ "@angular/platform-browser-dynamic": "^16.2.5", "@angular/router": "^16.2.5", "@angular/service-worker": "^16.2.5", - "@igo2/auth": "~16.0.0-rc.7", - "@igo2/common": "~16.0.0-rc.7", - "@igo2/context": "~16.0.0-rc.7", - "@igo2/core": "~16.0.0-rc.7", - "@igo2/geo": "~16.0.0-rc.7", - "@igo2/integration": "~16.0.0-rc.7", - "@igo2/utils": "~16.0.0-rc.7", + "@igo2/auth": "*", + "@igo2/common": "*", + "@igo2/context": "*", + "@igo2/core": "*", + "@igo2/geo": "*", + "@igo2/integration": "*", + "@igo2/utils": "*", "core-js": "^3.32.2", "hammerjs": "^2.0.8", "ol": "^7.5.2", diff --git a/scripts/src/locale-copy-from-igo2-core.ts b/scripts/src/locale-copy-from-igo2-core.ts deleted file mode 100644 index c3de37800..000000000 --- a/scripts/src/locale-copy-from-igo2-core.ts +++ /dev/null @@ -1,26 +0,0 @@ - -import { readdir } from 'fs/promises'; -import { copyFile } from '../src/utils/file-system.utils'; -import path from 'path'; - -const srcPath = 'node_modules/@igo2/core/locale'; -const distPath = 'src/locale/libs_locale'; - - -(async () => { - - await copyLocales(); -})(); - -async function copyLocales(): Promise { - - const files = await readdir(srcPath); - const localeFiles = files.filter((filePath) => - !filePath.includes('.core.') - ); - for (const localeFile of localeFiles) { - const input = path.join(srcPath, localeFile); - const output = path.join(distPath, localeFile); - await copyFile(input, output); - } -} \ No newline at end of file diff --git a/scripts/src/utils/file-system.utils.ts b/scripts/src/utils/file-system.utils.ts deleted file mode 100644 index e0604797f..000000000 --- a/scripts/src/utils/file-system.utils.ts +++ /dev/null @@ -1,63 +0,0 @@ -import { existsSync } from 'fs'; -import { - copyFile as fsCopyFile, - mkdir, - readFile, - writeFile -} from 'fs/promises'; -import { normalize, sep } from 'path'; - -const BUFFER_ENCODING: BufferEncoding = 'utf-8'; - -export async function readFileContent(path: string): Promise { - const body = await readFile(path, BUFFER_ENCODING); - return JSON.parse(body) as T; -} - -export async function createFile( - fileName: string, - dest: string, - body: string -): Promise { - const path = `${dest}/${fileName}`; - try { - await writeFile(path, body, BUFFER_ENCODING); - } catch (err: any) { - if (err.code === 'ENOENT') { - await createFolderRecursively(dest); - await writeFile(path, body, BUFFER_ENCODING); - } - } -} - -export async function copyFile(src: string, dest: string): Promise { - try { - await fsCopyFile(src, dest); - } catch (err: any) { - if (err.code === 'ENOENT') { - await createPreviousFolder(dest); - await fsCopyFile(src, dest); - } - } -} - -export async function createFolderRecursively(dest: string): Promise { - try { - await mkdir(dest); - } catch (err: any) { - if (err.code === 'ENOENT') { - await createPreviousFolder(dest); - await createFolderRecursively(dest); - } - } -} - -async function createPreviousFolder(dest: string): Promise { - const folders = normalize(dest).split(sep); - folders.pop(); - await createFolderRecursively(folders.join(sep)); -} - -export function pathExist(path: string): boolean { - return existsSync(path); -} diff --git a/scripts/tsconfig.json b/scripts/tsconfig.json deleted file mode 100644 index 4442bc0b2..000000000 --- a/scripts/tsconfig.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "compilerOptions": { - "lib": ["es2022"], - "module": "NodeNext", - "target": "es2022", - "rootDir": "./src", - "baseUrl": "./", - - "isolatedModules": true, - "noImplicitAny": true, - "sourceMap": true, - "strict": true, - "esModuleInterop": true, - "skipLibCheck": true, - "forceConsistentCasingInFileNames": true, - "moduleResolution": "node" - }, - "exclude": ["node_modules"] -} diff --git a/src/app/app.component.scss b/src/app/app.component.scss index 54c44b04c..feb30ad73 100644 --- a/src/app/app.component.scss +++ b/src/app/app.component.scss @@ -1,4 +1,4 @@ -@import '@igo2/core/style/partial/core.variables'; +@import '@igo2/core/partial/core.variables'; :host { font-family: Roboto, 'Helvetica Neue', sans-serif; diff --git a/src/app/pages/portal/portal.variables.scss b/src/app/pages/portal/portal.variables.scss index 4f3245328..5f057251b 100644 --- a/src/app/pages/portal/portal.variables.scss +++ b/src/app/pages/portal/portal.variables.scss @@ -1,4 +1,4 @@ -@import '@igo2/core/style/partial/media'; +@import '@igo2/core/partial/media'; @import 'variables'; $app-footer-height: 48px; @@ -14,10 +14,6 @@ $app-expansion-panel-header-height: calc( $app-toast-panel-collapsed-height: 46px; $app-toast-panel-collapsed-height-mobile: 35px; -// $app-toast-panel-max-height: 281px; -// $app-full-toast-panel-max-height: 800px; -// $app-full-toast-panel-max-width: 750px; -// $app-toast-panel-width: 30%; $app-toast-panel-width-tablet: 500px; $app-toast-panel-width: 42vw; diff --git a/src/style/partial/variables.scss b/src/style/partial/variables.scss index 454363ba9..786871088 100644 --- a/src/style/partial/variables.scss +++ b/src/style/partial/variables.scss @@ -1,4 +1,4 @@ -@import '@igo2/core/style/partial/core.variables'; +@import '@igo2/core/partial/core.variables'; /*** Generic ***/ $app-background-color: rgb(255, 255, 255); diff --git a/tsconfig.json b/tsconfig.json index 8751d5dd5..b8574004f 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -7,12 +7,16 @@ "module": "ES2022", "target": "ES2022", "lib": ["ES2022", "dom"], + "allowSyntheticDefaultImports": true, "declaration": false, "downlevelIteration": true, "emitDecoratorMetadata": true, "experimentalDecorators": true, "skipLibCheck": true, - "sourceMap": true + "sourceMap": true, + "paths": { + "@igo2/*": ["node_modules/@igo2/*", "../../packages/*/src/public_api"] + } }, "exclude": ["dist", "scripts", "e2e/**/*"] } \ No newline at end of file