diff --git a/.eslintrc b/.eslintrc index c20bc85..ae8ae61 100644 --- a/.eslintrc +++ b/.eslintrc @@ -1,6 +1,6 @@ { - "extends": "eslint-config-ct-prodeng", - "plugins": [ - "vue" - ] + "extends": "eslint-config-ct-prodeng", + "plugins": [ + "vue" + ] } diff --git a/.gitignore b/.gitignore index cc762e4..e41ab5f 100644 --- a/.gitignore +++ b/.gitignore @@ -14,3 +14,4 @@ /.vscode/settings.json /.externalToolBuilders/ /package-lock.json +/gulpfile.overrides.js diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..f143875 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,460 @@ +# Changelog + +All notable changes to this project will be documented in this file. +## [4.16.0] - T.B.D. + +- Support for map.apps 4.16.0 +- The bundle `sample_camera` is now implemented in Typescript +- The bundle `sample_camera_js` with the same functionality is still implemented in Javascript + +### Changes in pom.xml + +- Update `mapapps.version` property to `4.16.0` +- Add missing `vuetify.version` with value `1.5.28` +- Update `ct.jsregistry.version` property to `1.5.14` +- Update `frontend-maven-plugin` plugin version to `1.14.2` +- Update `frontend-maven-plugin` configuration to: + ```xml + + v20.9.0 + + ``` +- Update `maven-compiler-plugin` plugin version to `3.11.0` +- Update `maven-javadoc-plugin` plugin version to `3.5.0` +- Add version `3.5.0` to `maven-dependency-plugin` plugin + +### Changes in package.json + +- Update `@conterra/ct-mapapps-typings` to `4.16.0` +- Update `@types/arcgis-js-api` to `4.28.0` +- Update `ct-mapapps-gulp-js` property to `0.10.2` +- Update `ct-mapapps-browser-sync` property to `0.0.34` +- Update `typescript` to `5.2.2`, +- Update `vue-template-compiler` to `2.7.15`, +- Update `@types/chai` to `4.3.10` +- Update `chai` to `4.3.10` +- Update `@types/mocha` to `10.0.4` +- Update `puppeteer` to `21.5.2` +- Update `stylelint` to `15.11.0` +- Update `stylelint-config-ct-prodeng` to `2.0.0` +- Update `stylelint-config-recommended` to `13.0.0` +- Update `stylelint-config-recommended-less` to `2.0.0` + + +### Changes due to Typescript migration of the `sample_camera` bundle +- changes in `package.json` file + - Add script `"check-types": "tsc --noEmit"` + - Add script `"watch-types": "tsc -w --noEmit` + - Add `"@types/chai": "^4.3.10",` to `devDependencies` + - Add `"@types/mocha": "^10.0.3"` to `devDependencies` + - Add `"ts-node": "^10.9.1"` to `devDependencies` + - Add `"typescript": "^5.1.6"` to `devDependencies` +- New files + - `types\mocha-global.d.ts` + - `types\thirdparty.d.ts` + - `types\vue-shim.d.ts` +- Renamed folder `sample_camera` to `sample_camera_js` +- Implemented sample camera widget in Typescript, see folder `sample_camera` +- changes in `tsconfig.json` + - add `"strict": true,` + - add `"noImplicitAny": true,` + - add `"strictNullChecks": true,` + - add `"include": ["src"]` +- Migrated `sample_tests\all.js` to Typescript: `sample_tests\all.ts` +- Migrated `sample_tests\test-init.js` to Typescript: `sample_tests\test-init.ts` +- Deleted `sample_tests\intern-all.js` + +## [4.15.1] - 06.09.2023 + +- Support for map.apps 4.15.1 +- Update `mapapps.version` property in `./pom.xml` to `4.15.1` +- Update `@conterra/ct-mapapps-typings` in `package.json` to `4.15.1` +- Update `ct.jsregistry.version` property in `./pom.xml` to `1.5.10` +- Remove following entry from ``, it is automatically provided by the ´ct-mapapps` parent pom import: + + ```xml + + de.conterra.mapapps + ct-mapapps-js + ${mapapps.version} + + ``` + +## [4.15.0] - 26.05.2023 + +- Support for map.apps 4.15.0 +- Use `ct-mapapps-browser-sync` drop use of jetty +- Update `mapapps.version` property in `./pom.xml` to `4.15.0` +- Update `@conterra/ct-mapapps-typings` in `package.json` to `4.15.0` +- Add properties and samples to use Identity Service in dev project in `test/resources/application.properties` +- Rename property `proxy.cors.trustedServers` to `cors.request.trustedServers` in `./pom.xml`, `test/resources/application.properties` and `test/webapp/index.html` +- Update `ct.jsregistry.version` property in `./pom.xml` to `1.5.9` +- Update `mocha` to `^10.2.0`, +- Update `puppeteer` to `^19.11.1` +- Update `chai` to `^4.3.7` +- Update `@conterra/mapapps-mocha-runner` to `^1.1.1` +- Update `"@types/arcgis-js-api` to `4.26.0` +- Integrate the `rollup-build` task into the gulpfile.js +- Add `build.config.js` to `sample_camera` sample, to demonstrate the rollup build and change `sample_camera/module.js` to make `module.js` the only entrypoint of the bundle. +- Integrate the optional `gulpfile.overrides.js` file. +- Properties `jsregistry.replacement.paths`, `jsregistry.directoryscanner.npmfolder`, `jsregistry.directoryscanner.npmincludes` are moved into gulpfile.js in the `registerBrowserSync` config. +- Property `jsregistry.sourcemaps.enabled` is obsolete, the dev registry will always support sourcemaps. +- Property `jsregistry.root.url` is provided automatically by the browsersync dev server. +- `sample_camera` is using 1.0.0-SNAPSHOT version, like in the pom.xml + +## [4.14.3] - 20.03.2023 + +- Support for map.apps 4.14.3 +- Update `mapapps.version` property in `./pom.xml` to `4.14.3` +- Update `@conterra/ct-mapapps-typings` in `package.json` to `4.14.3` +- Update Node.js and npm version in `./pom.xml` to latest LTS Version (18.x) +- Add `transpileTargets` property to `gulpfile.js` to streamline transpilation with ArcGIS Maps SDK for JS requirements. +- Ignore gulp task on VS Code file change by adding `` to `frontend-maven-plugin` in `./pom.xml` + +## [4.14.2] - 24.01.2023 + +- Support for map.apps 4.14.2 +- Update `mapapps.version` property in `./pom.xml` to `4.14.2` + +## [4.14.1] - 01.12.2022 + +- Support for map.apps 4.14.1 +- Update `mapapps.version` property in `./pom.xml` to `4.14.1` +- Update `ct.jsregistry.version` property in `./pom.xml` to `1.5.7` +- Update `@conterra/ct-mapapps-typings` in `package.json` to `4.14.1` + +## [4.14.0] - 28.10.2022 + +- Support for map.apps 4.14.0 +- Update `mapapps.version` property in `./pom.xml` to `4.14.0` +- Update `ct.jsregistry.version` property in `./pom.xml` to `1.5.6` +- Update `@conterra/ct-mapapps-typings` in `package.json` to `4.14.0` +- Update `@types/arcgis-js-api` in `package.json` to `4.24.0` +- Update `chai` in `package.json` to `^4.3.6` +- Update `vue-template-compiler` in `package.json` to `2.7.8` +- Update `ct-mapapps-gulp-js` in `package.json` to `^0.7.4` +- Add `jsregistry.sourcemaps.enabled=true` in `test/resources/application.properties` to ship source maps during development +- Add `sourceMaps: "file"` in `gulpfile.js` to generate `.js.map` files instead of inlined source maps +- Replace `module.exports` in nls files with `export default`. + Support for `module.exports` will be removed soon and should be replaced + with an appropriate `export` or `export default` directive. +- replaced the old `favicon.ico` with a modern png base `favicon.png`. The file link inside the `ìndex.html` + was set accordingly +- `ct-mapapps-js-api` for `ct-mapapps-js` in `./pom.xml` + + +## 28.04.2022 + +- Make `proxy.cors.trustedServers` configurable, via application.properties. + +## 22.04.2022 + +- The `compress` profile was modified to remove usage of the google closure compiler. + [Terser](https://github.com/terser/terser) is now used to optimize JavaScript files. + This solves an issue with the old configuration where too modern JavaScript syntax could + be introduced by accident. +- Update `ct-mapapps-gulp-js` in `package.json` to `0.6.20` +- Update the `optimize js` plugin execution in `pom.xml` +- Introduce internal `gulp.node.env` property that configures the environment variable `NODE_ENV` +- Update `gulpfile.js` to enable JavaScript compression if `NODE_ENV` is `production` + +## [4.13.1] - 06.04.2022 + +- Support for map.apps 4.13.1 +- Update `mapapps.version` property in `./pom.xml` to `4.13.1` +- Update `@conterra/ct-mapapps-typings` in `package.json` to `4.13.1` + +## [4.13.0] - 29.03.2022 + +- Support for map.apps 4.13.0 +- Update `mapapps.version` property in `./pom.xml` to `4.13.0` +- Update `nodeVersion` in `./pom.xml` to `v16.14.0` +- Update `npmVersion` in `./pom.xml` to `8.3.1` +- Update `@types/arcgis-js-api` in `package.json` to `4.22.0` +- Update `@conterra/ct-mapapps-typings` in `package.json` to `4.13.0` +- Update `ct-mapapps-gulp-js` in `package.json` to `^0.6.18` +- Update `eslint-config-ct-prodeng` in `package.json` to `^1.2.5` +- Update `puppeteer` in `package.json` to `^13.3.2` +- Update babel defaults to target modern browsers by default +- Add support for oauth tokens in automatic deployments by updating to latest `ct-jsregistry-maven-plugin` +- Use basemap `streets-vector` by default +- Update jetty to version `10.0.8` + + :warning: There are breaking configuration changes for the jetty maven plugin in the `pom.xml`. Please compare the plugin configuration in the `pom.xml` with your existing configuration to find all changes. + For example, the `scanIntervalSeconds` property is now called `scan` and the `webAppConfig` is now called `webApp`. + See the documentation of the [jetty maven plugin](https://www.eclipse.org/jetty/documentation/jetty-10/programming-guide/index.html#jetty-maven-plugin). +- Add new tasks to `.vscode/tasks.json` and prefer `-Denv=dev` over `-Pwatch-all` + +## [4.12.3] - 15.12.2021 + +- Support for map.apps 4.12.3 that includes a critical security fix +- Update `mapapps.version` property in `./pom.xml` to `4.12.3` + +## [4.12.2] - 13.12.2021 + +- Support for map.apps 4.12.2 that includes a critical security fix +- Update `mapapps.version` property in `./pom.xml` to `4.12.2` + +## [4.12.1] - 10.11.2021 + +- Support for map.apps 4.12.1 +- Update `mapapps.version` property in `./pom.xml` to `4.12.1` +- Update `ct.jsregistry.version` property in `./pom.xml` to `1.4.4` +- Update `@types/arcgis-js-api` to `4.20.1` (`package.json`) +- Update `eslint-config-ct-prodeng` to `1.2.3` (`package.json`)` + +NOTE: since `eslint-config-ct-prodeng@1.2.0` linting for basic a11y rules is activated for custom vue components. +The occurring warnings should be easily be fixable. More infos can be found at the [eslint-plugin-vuejs-accessibility](https://github.com/vue-a11y/eslint-plugin-vuejs-accessibility) page. + +## [4.12.0] - 2021-08-31 + +- Support for map.apps 4.12.0 +- Update `mapapps.version` property in `./pom.xml` to `4.12.0` +- Update `ct.jsregistry.version` property in `./pom.xml` to `1.4.3` +- Update `ct.jsrt-test.version` property in `./pom.xml` to `2.0.2` +- Update `@conterra/ct-mapapps-typings` to `~4.12.0` (`package.json`) +- Update `@types/arcgis-js-api` to `4.20.0` (`package.json`) +- Update `ct-mapapps-gulp-js` to `^0.5.27` (`package.json`) +- Update `vue-template-compiler` to `2.6.14` (`package.json`) +- Update `puppeteer` to `^10.0.0` (`package.json`) +- Add `"@conterra/mapapps-mocha-runner": "^1.0.0"` (`package.json`) +- Add `"chai": "^4.3.4"` (`package.json`) +- Add `"mocha": "^9.0.0"` (`package.json`) +- Changed default test-runner from intern-js to mocha. (see [MIGRATION.md](./MIGRATION.md)) for details. + +## [4.11.1] - 2021-02-22 + +- Support for map.apps 4.11.1 +- Change `mapapps.version` property in `./pom.xml` to `4.11.1` +- Change `ct.jsregistry.version` property in `./pom.xml` to `1.4.1` +- Update `ct-mapapps-gulp-js` to `^0.5.14` (`package.json`) +- Update `@types/arcgis-js-api` to `4.18.0` (`package.json`) + +## [4.11.0] - 2021-02-17 + +- Support for map.apps 4.11.0 +- Change `mapapps.version` property in `./pom.xml` to `4.11.0` +- Change `ct.jsregistry.version` property in `./pom.xml` to `1.4.0` +- Change `ct.jsrt-test.version` property in `./pom.xml` to `2.0.0` +- Update `ct-mapapps-gulp-js` to `^0.5.13` (`package.json`) +- Add `@conterra/ct-mapapps-typings` with version `~4.11.0` (`package.json`) +- Update `@types/arcgis-js-api` to `4.18.0` (`package.json`) +- Use `tsconfig.json` file from mapapps-4-developers 4.11.0 release. +- Update splashscreen styles (see [MIGRATION.md](./MIGRATION.md)) for details. Relevant for non-customized splashscreens. + +## [4.10.1] - 2020-12-09 + +- Support for map.apps 4.10.1 + +## [4.10.0] - 2020-12-08 + +- Support for map.apps 4.10.0 +- Change `mapapps.version` property in `./pom.xml` to `4.10.0` +- Change `ct.jsregistry.version` property in `./pom.xml` to `1.3.10` +- Change `nodeVersion` property in `./pom.xml` to `v14.15.1` +- Change `npmVersion` property in `./pom.xml` to `6.14.9` +- Update `@types/arcgis-js-api` to `4.17.0` (`package.json`) +- Update `ct-mapapps-gulp-js` to `^0.5.5` (`package.json`) +- Update `puppeteer` to `^5.5.0` (`package.json`) +- Update `eslint-config-ct-prodeng` to `^1.1.16` (`package.json`) +- Update `stylelint-config-ct-prodeng` to `1.0.3` (`package.json`) + +- improved documentation, e.g. [MIGRATION.md](./MIGRATION.md) +- remove `optimizeCSS` goal from `./pom.xml` + +```xml + + optimize CSS + + optimizeCSS + + compile + + + + bundles/*/*/*.css + + + **/themeSettings.css + + + + +``` + +- add execution of `gulp compress` task to `compress` profile in `pom.xml` + +```xml + + compress + + compress + + ... + +``` + +- add `compress` task to `./gulpfile.js` + +```js +gulp.task( + "compress", + gulp.series( + "copy-resources", + "themes-copy", + gulp.parallel("js-transpile", gulp.series("themes-compile", "themes-compress")) + ) +); +``` + +## [4.9.2] - 2020-10-06 + +- Support for map.apps 4.9.2 +- Change `mapapps.version` property in `./pom.xml` to `4.9.2` + +## [4.9.1] - 2020-09-04 + +- Support for map.apps 4.9.1 +- Change `mapapps.version` property in `./pom.xml` to `4.9.1` + +## [4.9.0] - 2020-08-18 + +- Support for map.apps 4.9.0 +- Change `mapapps.version` property in `./pom.xml` to `4.9.0` +- Change `ct.jsregistry.version` property in `./pom.xml` to `1.3.8` +- Update `ct-mapapps-gulp-js` to `^0.4.5` (`package.json`) +- Update `@types/arcgis-js-api` to `4.16.0` (`package.json`) +- Update `puppeteer` to `^3.3.0` (`package.json`) +- Update `eslint-config-ct-prodeng` to `^1.1.11` (`package.json`) + +- Added several omnisearch properties in `src/main/js/bundles/theme-custom/styles/themeSettings.less`: + +```less +// Omni Search Colors +@ct-omnisearch-input-background-color: #fff; +@ct-omnisearch-input-text-color: #000; +@ct-omnisearch-result-list-hover-color: @minor-selected-color; +@ct-omnisearch-drawer-button-background-color: @ct-omnisearch-input-background-color; +@ct-omnisearch-drawer-button-icon-color: darken(@disabled-text-color, 30); +``` + +## [4.8.4] - 2020-05-20 + +- Upgrade some Maven-Plugin versions in `./pom.xml`. +- Change `mapapps.version` property in `./pom.xml` to `4.8.4` +- Change `ct.jsregistry.version` property in `./pom.xml` to `1.3.7` +- Update `ct-mapapps-gulp-js` to `^0.4.4` (`package.json`) this change requires to list additional `peerDependencies`: + +```js + // for .vue file support: + "vue-template-compiler": "2.6.6", + // for test execution (optional): + "puppeteer": "^3.1.0", + // for js linting (optional): + "eslint-config-ct-prodeng": "^1.1.10", + // for css/less linting (optional): + "stylelint-config-ct-prodeng": "1.0.2" +``` + +- Change dependency `ct-mapapps-proxy` to `ct-proxy-servlet` in `pom.xml`: + +```xml + + de.conterra.ct-proxy + ct-proxy-servlet + test + +``` + +- Change class name of Proxy Servlet in `src/test/webapp/WEB-INF/web.xml` (optional): + +```xml + + ProxyServlet + ProxyServlet + de.conterra.proxy.servlet.ProxyServlet + 0 + +``` + +## [4.8.3] - 2020-03-06 + +- Support for map.apps 4.8.3. +- Update ct-mapapps-gulp-js to 0.3.6 (package.json) + +## [4.8.2] - 2020-02-11 + +- Support for map.apps 4.8.2. +- Replace `babel-polyfill` by `apprt-polyfill`. +- Replace `$apprt.load` and `$apprt.lauchAppFromParam` by `$apprt.startApp` + note that the function signature also changed + instead of: + + ```js + $apprt.load(function(Launcher) { + new Launcher({ + configLocation: "builderapps" + }).launchApp("@@appId@@"); + ``` + + it will be: + + ```js + $apprt.startApp({ + configLocation: "builderapps", + param: "app", + defaultApp: "@@appId@@" + }); + ``` + +- Introduce property `skip.apps.upload` to decide if apps should be uploaded +- Apps located in `/src/main/js/apps/[app]` are by default zipped into the folder `/target/[app].zip`. + +## [4.8.1] - 2020-01-10 + +- Support for map.apps 4.8.1. + +## [4.8.0] - 2020-01-06 + +- Support for map.apps 4.8.0. +- Update ct.jsregistry.version version. +- Update ct-mapapps-gulp-js version. + +## [4.7.2] - 2019-09-18 + +- Support for map.apps 4.7.2. +- Update ct.jsregistry.version version. +- sample_camera sample for sync logging added +- sample_camera small enhancements +- Update ct-mapapps-gulp-js version (requires additional changes, see this [commit](https://github.com/conterra/mapapps-4-developers/commit/c974a74a08a70316204d5c09aee22f8d39c70446)) + +## [4.7.1] - 2019-08-16 + +- Support for map.apps 4.7.1. +- Update ct.jsregistry.version version. + +## [4.7.0] - 2019-06-28 + +- Support for map.apps 4.7.0. +- Update ct.jsregistry.version version. +- Update vue-template-compiler version. +- Update eslint-config-ct-prodeng version. + +## [4.6.1] - 2019-04-24 + +- Explain `-Denv=dev`. +- Add support for local configuration of `proxy.use.rules`. +- Support for map.apps 4.6.1. +- Update node/npm versions, add profile for dedicated npm install, use newer jetty version. + +## [4.6.0] - 2019-03-01 + +- Support for map.apps 4.6.0. +- Update ct-mapapps-gulp-js version. +- Use maven.home not M2_HOME. +- Update node, npm and dependencies. +- Property `trustedServers` has been removed with property `corsEnabledServers`. + +[unreleased]: https://github.com/conterra/mapapps-4-developers/compare/4.6.0...HEAD +[4.6.1]: https://github.com/conterra/mapapps-4-developers/compare/4.6.0...4.6.1 +[4.6.0]: https://github.com/conterra/mapapps-4-developers/compare/4.5.0...4.6.0 diff --git a/RELEASE.md b/RELEASE.md index 7951b33..ed14746 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -1,4 +1,4 @@ -✅ Tested for map.apps 4.15.1 / Linie 4 +✅ Tested for map.apps 4.16.0 / Linie 4 #### Release Notes - autogenerated SNAPSHOT-Release diff --git a/gulpfile.js b/gulpfile.js index f9527ef..2e68a1c 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -64,15 +64,13 @@ mapapps.registerTasks({ }, /* a list of themes inside this project */ - themes: [/*"sample-theme"*/], + themes: [], /* state that the custom theme will be dependant from map.apps everlasting theme that provides the base styles */ hasBaseThemes: true, /* state that we want to support vuetify components and therefore need the vuetify core styles*/ hasVuetify: true, themeChangeTargets: { - "vuetify": [ - // "sample_theme" - ] + "vuetify": [] }, /* A list oft target browser versions. This should be streamlined with Esri JS API requirements. */ transpileTargets: { @@ -139,7 +137,6 @@ gulp.task("lint", gulp.task("preview", gulp.series( "build", - "lint", gulp.parallel( "watch", "browser-sync" diff --git a/gulpfile.overrides-sample.js b/gulpfile.overrides-sample.js new file mode 100644 index 0000000..9ba324e --- /dev/null +++ b/gulpfile.overrides-sample.js @@ -0,0 +1,34 @@ +/* + * Copyright (C) con terra GmbH + */ +/* + Rename this file to `gulpfile.overrides.js`, then you are able to modify the listed build flags. + + Do not commit this file, it is intended to be a local developer file. + +*/ +module.exports = { + // debug mode of ct-mapapps-gulp-js + debug: true, + + // enable linting during watch + lintOnWatch: true, + + // use https not http (uses self signed certificate ) + https: false, + + // should the browser reload the open windows if files change + autoReload: true, + + // disable initial build before starting the dev server + previewNoInitialBuild: false, + + // defines how much workers are maximal allowed to use (3 is enough) + rollupBuildMaxWorkers: 1, + + // on which port should the dev server be opened + port: 9090, + + // should the browser be opened pointing to the dev server? + openBrowser: true, +}; diff --git a/package.json b/package.json index 899af04..885ba70 100644 --- a/package.json +++ b/package.json @@ -4,22 +4,31 @@ "version": "0.0.1", "license": "CC0-1.0", "scripts": { - "check-licenses": "node ./src/support/js/check-licenses.js" + "check-licenses": "tsx ./src/support/js/check-licenses.ts", + "check-types": "tsc --noEmit", + "watch-types": "tsc -w --noEmit" }, "devDependencies": { - "@conterra/ct-mapapps-typings": "4.15.1", - "@conterra/mapapps-mocha-runner": "^1.1.1", - "@types/arcgis-js-api": "4.26.0", - "chai": "^4.3.7", - "ct-mapapps-browser-sync": "0.0.30", - "ct-mapapps-gulp-js": "0.9.4", - "eslint-config-ct-prodeng": "1.3.0-next-2", - "license-checker": "^25.0.1", - "mocha": "^10.2.0", - "puppeteer": "^19.11.1", - "vue-template-compiler": "2.7.8", - "stylelint-config-ct-prodeng": "1.0.4", - "stylelint-config-recommended": "5.0.0", - "stylelint": "^13.13.1" + "@conterra/ct-mapapps-typings": "~4.16.0", + "@conterra/mapapps-mocha-runner": "1.1.1", + "@types/arcgis-js-api": "4.28.0", + "@types/chai": "4.3.10", + "@types/license-checker": "^25.0.6", + "@types/mocha": "10.0.4", + "chai": "4.3.10", + "ct-mapapps-browser-sync": "0.0.34", + "ct-mapapps-gulp-js": "0.10.2", + "eslint-config-ct-prodeng": "1.4.0", + "license-checker": "25.0.1", + "mocha": "10.2.0", + "puppeteer": "21.5.2", + "stylelint": "15.11.0", + "stylelint-config-ct-prodeng": "2.0.0", + "stylelint-config-recommended": "13.0.0", + "stylelint-config-recommended-less": "2.0.0", + "ts-node": "^10.9.1", + "tsx": "^4.6.0", + "typescript": "5.2.2", + "vue-template-compiler": "2.7.15" } } diff --git a/pom.xml b/pom.xml index 0e1024b..589ab2e 100644 --- a/pom.xml +++ b/pom.xml @@ -46,11 +46,6 @@ pom import - - de.conterra.mapapps - ct-mapapps-js - ${mapapps.version} - @@ -81,7 +76,6 @@ ${ct.jsrt-test.version} test - @@ -143,10 +137,9 @@ com.github.eirslett frontend-maven-plugin - 1.12.1 + 1.14.2 - v18.13.0 - 8.19.3 + v20.9.0 @@ -224,7 +217,7 @@ org.apache.maven.plugins maven-compiler-plugin - 3.8.0 + 3.11.0 true @@ -232,7 +225,7 @@ org.apache.maven.plugins maven-javadoc-plugin - 3.1.0 + 3.5.0 true @@ -240,6 +233,7 @@ org.apache.maven.plugins maven-dependency-plugin + 3.5.0 unpack-themes-src @@ -408,6 +402,12 @@ de.conterra.mapapps mapapps-maven-plugin + + + true + ${js.build.outputPath}/apps + ${project.build.directory} + @@ -416,32 +416,7 @@ deployApps - - build-app-template - prepare-package - - deployAppTemplate - - - ${project.build.directory}/${project.artifactId}-sample-app.zip - - - ${js.build.outputPath}/apps/sample - - **/* - - - - - - - - true - false - ${js.build.outputPath}/apps - ${project.build.directory} - maven-assembly-plugin @@ -495,11 +470,12 @@ ${project.build.directory}/webapp ${root.build.outputPath}/js - 4.15.1 + 4.16.0 + 1.5.28 ${mapapps.version} - 1.5.10 + 1.5.14 2.0.2 @@ -562,6 +538,11 @@ ags-js-api4 test + + com.esri + terraformer-js + test + moment-js moment-js diff --git a/src/support/js/check-licenses.ts b/src/support/js/check-licenses.ts new file mode 100644 index 0000000..9eda7f4 --- /dev/null +++ b/src/support/js/check-licenses.ts @@ -0,0 +1,59 @@ +/* + Checks licenses of node dependencies against a list of allowed licenses. + Fails with exit code != 0 and an error message if a disallowed license is encountered. + The script should be executed from the project root directory after dependencies have been installed: + + $ tsx ./src/support/js/check-licenses.ts + + To run checks yourself (e.g. to update the allow list or to get details), install + license-checker yourself and run it from the project root directory: + + $ npm install -g license-checker + $ license-checker --summary # outputs list of used licenses + $ license-checker --json # outputs details + + See also https://www.npmjs.com/package/license-checker +*/ + +import { init as initChecker } from "license-checker"; +import { cwd, exit} from "node:process"; + +// Licenses known to be OK. +const ACCEPTED_LICENSES = [ + "MIT", + "ISC", + "Apache-2.0", + "Apache 2.0", + "BSD-2-Clause", + "BSD-3-Clause", + "BSD", + "CC0-1.0", + "CC-BY-3.0", + "CC-BY-4.0", + "Python-2.0", + "Unlicense" // Note: not unlicenseD (https://opensource.org/licenses/unlicense) +]; + +// Packages with licenses that are not recognized properly by license-checker. +// These must be checked manually. +const SKIP_PACKAGES = [ + "event-stream@3.0.20", // MIT License not recognized + "taffydb@2.6.2" // BSD-1-Clause License in source code +]; + +initChecker( + { + start: cwd(), + onlyAllow: ACCEPTED_LICENSES.join(";"), + excludePackages: SKIP_PACKAGES.join(";") + }, + (error, packages) => { + void packages; // currently unused + + if (error) { + console.error("Error: ", error); + exit(1); + } + exit(0); + } +); diff --git a/src/test/webapp/js/tests/test-init.js b/src/test/webapp/js/tests/test-init.js index 68bef32..267060e 100644 --- a/src/test/webapp/js/tests/test-init.js +++ b/src/test/webapp/js/tests/test-init.js @@ -15,12 +15,11 @@ */ testConfig({ jsregistry: [{ - //root: "url to registry..", - packages: [ - // register all self hosted packages - "*" - ] - } + //root: "url to registry..", + packages: [ + // register all self hosted packages + "*" + ]} //uncomment, if project runs in remote mode // ,{ // root: "@@mapapps.remote.base@@/resources/jsregistry/root", diff --git a/src/test/webapp/login.css b/src/test/webapp/login.css index d28165e..3976a7d 100644 --- a/src/test/webapp/login.css +++ b/src/test/webapp/login.css @@ -129,4 +129,4 @@ .dj_ie .start.notheme .dijitInputInner, .dj_gecko .start.notheme .dijitInputInner{ height: 22px; -} \ No newline at end of file +} diff --git a/tsconfig.json b/tsconfig.json index f33e19d..c1df1bb 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -9,7 +9,11 @@ }, "allowJs": true, "noEmit": true, + "strict": true, + "noImplicitAny": true, + "strictNullChecks": true, "skipLibCheck": true, "esModuleInterop": true - } + }, + "include": ["src"] }