Skip to content

Commit 5a420c7

Browse files
julkuhjessebluemrmbeckem
authored
changes for map.apps 4.19.2 (#31)
* MAPAPPS-5687 - integrate standalone profile for local app creation * add sample for env variables * drop 52n repository * Update README.md * Skip dev dependencies by default * Update ct-mapapps-browsersync to 0.0.45 * update ct-mapapps-gulp-js to 0.10.13 * update dependencies in preparation for release --------- Co-authored-by: Marko Reiprecht <m.reiprecht@conterra.de> Co-authored-by: Michael Beckemeyer <m.beckemeyer@conterra.de>
1 parent 1cebe82 commit 5a420c7

6 files changed

Lines changed: 129 additions & 36 deletions

File tree

CHANGELOG.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,28 @@
22

33
All notable changes to this project will be documented in this file.
44

5+
## [4.19.2] - 06.05.2025
6+
7+
- Support for map.apps 4.19.2
8+
- Add new profile `standalone` to build a standalone application which does not require a server.
9+
- The profile can be tested by `mvn clean package -P compress,standalone`
10+
- `check-licenses` script: Only check productive dependencies by default (devDependencies are skipped).
11+
12+
### Changes in pom.xml
13+
- Update `mapapps.version` property to `4.19.2`
14+
- Update `ct.jsregistry.version` property to `2.1.6`
15+
- Drop no longer required 52n repository and 52n plugin repository
16+
- Added a new profile `standalone` to build a standalone application which does not require a server. Please see the `pom.xml` for more information.
17+
- The `calculateDependencies` goal of the `ct-jsregistry-maven-plugin` is no longer required, if the rollup build is used.
18+
19+
### Changes in package.json
20+
- Dependencies are now grouped into `dependencies` and `devDependencies`
21+
- Update `@conterra/ct-mapapps-typings` to `~4.19.2`,
22+
Update `@conterra/reactivity-core` to `^0.5.0`,
23+
Update `puppeteer` to `24.6.1`,
24+
- Update `ct-mapapps-browser-sync` to `0.0.45`
25+
- Update `ct-mapapps-gulp-js` to `0.10.13`
26+
527
## [4.19.1] - 14.02.2025
628

729
- Support for map.apps 4.19.1

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,10 @@ For more details refer to the [Developer's Guide](https://docs.conterra.de/en/ma
3636

3737
## Updating from older versions
3838

39+
### from 4.19.0 to 4.19.1
40+
41+
See [Changelog](./CHANGELOG.md#4191---14022025)
42+
3943
### from 4.18.3 to 4.19.0
4044

4145
See [Changelog](./CHANGELOG.md#4190---21012025)

package.json

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,31 +8,33 @@
88
"check-types": "tsc --noEmit",
99
"watch-types": "tsc -w --noEmit"
1010
},
11+
"dependencies": {
12+
"arcgis-js-api": "4.31.6",
13+
"vue": "2.7.16"
14+
},
1115
"devDependencies": {
12-
"@conterra/ct-mapapps-typings": "~4.19.1",
16+
"@conterra/ct-mapapps-typings": "~4.19.2",
1317
"@conterra/mapapps-mocha-runner": "1.1.1",
14-
"@conterra/reactivity-core": "^0.4.4",
18+
"@conterra/reactivity-core": "^0.5.0",
1519
"@types/chai": "4.3.20",
1620
"@types/license-checker": "^25.0.6",
1721
"@types/mocha": "10.0.10",
1822
"@types/sinon": "^17.0.3",
19-
"arcgis-js-api": "4.31.6",
2023
"chai": "4.5.0",
21-
"ct-mapapps-browser-sync": "0.0.43",
24+
"ct-mapapps-browser-sync": "0.0.45",
2225
"ct-mapapps-gulp-js": "0.10.13",
2326
"eslint-config-ct-prodeng": "1.5.0",
2427
"license-checker": "25.0.1",
2528
"mocha": "11.0.1",
26-
"puppeteer": "23.11.1",
29+
"puppeteer": "24.6.1",
2730
"sinon": "19.0.2",
28-
"stylelint": "15.11.0",
2931
"stylelint-config-ct-prodeng": "2.0.0",
30-
"stylelint-config-recommended": "13.0.0",
3132
"stylelint-config-recommended-less": "2.0.0",
33+
"stylelint-config-recommended": "13.0.0",
34+
"stylelint": "15.11.0",
3235
"ts-node": "^10.9.1",
3336
"tsx": "^4.19.2",
3437
"typescript": "5.7.3",
35-
"vue": "2.7.16",
3638
"vue-template-compiler": "2.7.16"
3739
}
3840
}

pom.xml

Lines changed: 83 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -7,20 +7,6 @@
77
<artifactId>mapapps-4-developers</artifactId>
88
<version>1.0.0-SNAPSHOT</version>
99
<packaging>jar</packaging>
10-
<repositories>
11-
<repository>
12-
<id>52n-dependencies</id>
13-
<name>52n-dependencies</name>
14-
<url>https://52north.org/maven/repo/releases</url>
15-
</repository>
16-
</repositories>
17-
<pluginRepositories>
18-
<pluginRepository>
19-
<id>52n-dependencies</id>
20-
<name>52n-dependencies</name>
21-
<url>https://52north.org/maven/repo/releases</url>
22-
</pluginRepository>
23-
</pluginRepositories>
2410
<dependencyManagement>
2511
<dependencies>
2612
<!-- dependency versions available -->
@@ -353,12 +339,12 @@
353339
<js.build.outputPath>${root.build.outputPath}/js</js.build.outputPath>
354340

355341

356-
<mapapps.version>4.19.1</mapapps.version>
342+
<mapapps.version>4.19.2</mapapps.version>
357343
<!-- JS lib versions -->
358344
<apprt.version>${mapapps.version}</apprt.version>
359345

360346
<!-- java lib versions -->
361-
<ct.jsregistry.version>2.1.4</ct.jsregistry.version>
347+
<ct.jsregistry.version>2.1.6</ct.jsregistry.version>
362348

363349
<!-- the default app, replaced in the *.html files to switch app names-->
364350
<default.app.name>Demo</default.app.name>
@@ -376,12 +362,12 @@
376362
<gulp.task></gulp.task>
377363
<gulp.node.env>development</gulp.node.env>
378364

379-
<mapapps.user><!-- Set username for map.apps remote installation-->
380-
</mapapps.user>
381-
<mapapps.pw><!-- Set password for map.apps remote installation-->
382-
</mapapps.pw>
383-
<mapapps.token><!-- Set token for map.apps remote installation-->
384-
</mapapps.token>
365+
<!-- Set username for map.apps remote installation, use ${env.MAPAPPS_USER} to reference a environment variable -->
366+
<mapapps.user>${env.MAPAPPS_USER}</mapapps.user>
367+
<!-- Set password for map.apps remote installation, use ${env.MAPAPPS_USER_PASSWORD} to reference a environment variable -->
368+
<mapapps.pw></mapapps.pw>
369+
<!-- Set token for map.apps remote installation, use ${env.MAPAPPS_TOKEN} to reference a environment variable -->
370+
<mapapps.token></mapapps.token>
385371

386372
<!-- set to false if map.apps is configured behind integrated windows authentication is
387373
required -->
@@ -498,12 +484,14 @@
498484
<groupId>de.conterra.jsregistry</groupId>
499485
<artifactId>ct-jsregistry-maven-plugin</artifactId>
500486
<executions>
487+
<!--
488+
Not longer required, because the calculation of the dependencies is done via rollup build.
501489
<execution>
502490
<id>calculate js dependencies</id>
503491
<goals>
504492
<goal>calculateDependencies</goal>
505493
</goals>
506-
</execution>
494+
</execution>-->
507495
<!--
508496
509497
The optimizeJS goal is usually no longer required because compression is done via terser (see
@@ -567,6 +555,78 @@
567555
</plugins>
568556
</build>
569557
</profile>
558+
<profile>
559+
<!-- Triggers a standalone export of the apps.
560+
This profile should only be used together with the compressed profile.
561+
Example:
562+
mvn clean package -P compress,standalone
563+
-->
564+
<id>standalone</id>
565+
<dependencies>
566+
<!-- ensure the correct production dependencies are used during standalone export -->
567+
<dependency>
568+
<groupId>de.conterra.mapapps</groupId>
569+
<artifactId>ct-mapapps-js-bom-prod</artifactId>
570+
<version>${mapapps.version}</version>
571+
<type>pom</type>
572+
<scope>test</scope>
573+
</dependency>
574+
</dependencies>
575+
<build>
576+
<plugins>
577+
<plugin>
578+
<groupId>de.conterra.mapapps</groupId>
579+
<artifactId>mapapps-maven-plugin</artifactId>
580+
<version>${mapapps.version}</version>
581+
<executions>
582+
<execution>
583+
<id>create-standalone-apps</id>
584+
<goals>
585+
<goal>standaloneApp</goal>
586+
</goals>
587+
<configuration>
588+
<!-- Export target folder. All apps are exported into this folder. -->
589+
<outputDirectory>${project.build.directory}/export</outputDirectory>
590+
<!-- folder where the apps for export are located -->
591+
<sourceDirectory>${project.build.directory}/webapp/js/apps</sourceDirectory>
592+
<!-- (optional) regex which apps should be exported. By default all in the sourceDirectory. -->
593+
<includePattern>.*</includePattern>
594+
<!-- (optional) regex which apps should not be exported. By default empty. -->
595+
<skipPattern></skipPattern>
596+
<!-- (optional) folder to a local bundles directory, which is used as source of bundles. The bundles need to be compressed and have a dependencies.json. -->
597+
<localBundlesDirectory>${project.build.directory}/webapp/js/bundles</localBundlesDirectory>
598+
<!-- (optional) folder with custom index.html or config.js file of the exported app. -->
599+
<standaloneTemplateOverride>${project.build.directory}/standalone-template</standaloneTemplateOverride>
600+
<!-- (optional) read the application.properties as source for property replacement of the exported files -->
601+
<applicationProperties>${project.build.directory}/test-classes/application.properties</applicationProperties>
602+
<!-- (optional) define further replacement properties, this will overwrite settings from the application.properties -->
603+
<replacementProperties>
604+
<myproperty>xyz</myproperty>
605+
</replacementProperties>
606+
<!-- (optional) custom javascript modules included in the apps layer file
607+
e.g. myBundle/someModule,myBundle/anotherModule
608+
-->
609+
<exportCustomModules>map-preload-2D</exportCustomModules>
610+
<!-- (optional) custom files included in the export
611+
e.g. myBundle/*.gif,myBundle/*.svg
612+
-->
613+
<exportCustomFiles></exportCustomFiles>
614+
615+
<!-- If true .js, .json and .css files are pre-compressed,
616+
which means that .gz and .br variants of the files are added to the export.
617+
Enable it only if your target server supports pre-compressed files.
618+
The files are only compressed if the size of the file is bigger than the compressMinSize.
619+
The compressMinSize is in bytes.
620+
-->
621+
<compressFiles>false</compressFiles>
622+
<compressMinSize>512000</compressMinSize>
623+
</configuration>
624+
</execution>
625+
</executions>
626+
</plugin>
627+
</plugins>
628+
</build>
629+
</profile>
570630
<profile>
571631
<id>write-release-versions</id>
572632
<properties>
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
22
"name": "sample_tests",
3+
"version": "1.0.0-SNAPSHOT",
34
"bundle": false
45
}

src/support/js/check-licenses.ts

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,15 @@
1212
$ license-checker --summary # outputs list of used licenses
1313
$ license-checker --json # outputs details
1414
15+
16+
NOTE: This script only checks production licenses by default.
17+
Alter this script if you want to check development dependencies as well (see below).
18+
1519
See also https://www.npmjs.com/package/license-checker
1620
*/
1721

1822
import { init as initChecker } from "license-checker";
19-
import { cwd, exit} from "node:process";
23+
import { cwd, exit } from "node:process";
2024

2125
// Licenses known to be OK.
2226
const ACCEPTED_LICENSES = [
@@ -36,16 +40,16 @@ const ACCEPTED_LICENSES = [
3640

3741
// Packages with licenses that are not recognized properly by license-checker.
3842
// These must be checked manually.
39-
const SKIP_PACKAGES = [
40-
"event-stream@3.0.20", // MIT License not recognized
41-
"taffydb@2.6.2" // BSD-1-Clause License in source code
43+
const SKIP_PACKAGES: string[] = [
44+
"arcgis-js-api@4.31.6"
4245
];
4346

4447
initChecker(
4548
{
4649
start: cwd(),
4750
onlyAllow: ACCEPTED_LICENSES.join(";"),
48-
excludePackages: SKIP_PACKAGES.join(";")
51+
excludePackages: SKIP_PACKAGES.join(";"),
52+
production: true
4953
},
5054
(error, packages) => {
5155
void packages; // currently unused

0 commit comments

Comments
 (0)