Skip to content

Commit

Permalink
Updated to map.apps 4.18.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Marius Austerschulte committed Jun 13, 2024
1 parent 9d48b1d commit acf2f42
Show file tree
Hide file tree
Showing 28 changed files with 157 additions and 50 deletions.
8 changes: 4 additions & 4 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"extends": "eslint-config-ct-prodeng",
"plugins": [
"vue"
]
"extends": "eslint-config-ct-prodeng",
"plugins": [
"vue"
]
}
5 changes: 3 additions & 2 deletions LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -178,15 +178,15 @@
APPENDIX: How to apply the Apache License to your work.

To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
boilerplate notice, with the fields enclosed by brackets "{}"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright [yyyy] [name of copyright owner]
Copyright {yyyy} {name of copyright owner}

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand All @@ -199,3 +199,4 @@
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

4 changes: 2 additions & 2 deletions gulpfile.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2024 con terra GmbH (info@conterra.de)
* Copyright (C) 2023 con terra GmbH (info@conterra.de)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -149,7 +149,7 @@ gulp.task("run-tests",
function transportTestUrls() {
// transport test url to run-browser-tests
// eslint-disable-next-line max-len
const testsAt = mapappsBrowserSync.state.url + "/resources/jsregistry/root/@conterra/mapapps-mocha-runner/latest/mocha.html?boot=/js/tests/test-init.js&timeout=5000&test=dn_what3words/tests/all&reporter=tap";
const testsAt = mapappsBrowserSync.state.url + "/resources/jsregistry/root/@conterra/mapapps-mocha-runner/latest/mocha.html?boot=/js/tests/test-init.js&timeout=5000&test=tests/tests/all&reporter=tap";
runBrowserTests.push(testsAt);
return Promise.resolve();
},
Expand Down
13 changes: 7 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "mapapps-4-developers",
"name": "mapapps-what3words",
"description": "test build",
"version": "0.0.1",
"license": "CC0-1.0",
Expand All @@ -9,15 +9,16 @@
"watch-types": "tsc -w --noEmit"
},
"devDependencies": {
"@conterra/ct-mapapps-typings": "~4.17.0",
"@conterra/ct-mapapps-typings": "~4.18.1",
"@conterra/mapapps-mocha-runner": "1.1.1",
"@types/arcgis-js-api": "4.28.0",
"@conterra/reactivity-core": "^0.4.0",
"@types/chai": "4.3.10",
"@types/license-checker": "^25.0.6",
"@types/mocha": "10.0.4",
"arcgis-js-api": "4.29.10",
"chai": "4.3.10",
"ct-mapapps-browser-sync": "0.0.35",
"ct-mapapps-gulp-js": "0.10.2",
"ct-mapapps-browser-sync": "0.0.39",
"ct-mapapps-gulp-js": "0.10.3",
"eslint-config-ct-prodeng": "1.4.0",
"license-checker": "25.0.1",
"mocha": "10.2.0",
Expand All @@ -28,7 +29,7 @@
"stylelint-config-recommended-less": "2.0.0",
"ts-node": "^10.9.1",
"tsx": "^4.6.0",
"typescript": "5.2.2",
"typescript": "5.4.5",
"vue": "2.7.15",
"vue-template-compiler": "2.7.15"
}
Expand Down
62 changes: 48 additions & 14 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (C) 2024 con terra GmbH (info@conterra.de)
Copyright (C) 2023 con terra GmbH (info@conterra.de)
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -77,13 +77,6 @@
<version>${ct.jsrt-test.version}</version>
<scope>test</scope>
</dependency>

<!-- devnet -->
<dependency>
<groupId>de.conterra.devnet</groupId>
<artifactId>mapapps-welcome</artifactId>
<version>1.4.0</version>
</dependency>
</dependencies>
<build>
<pluginManagement>
Expand All @@ -98,6 +91,10 @@
<artifactId>ct-jsregistry-maven-plugin</artifactId>
<version>${ct.jsregistry.version}</version>
</plugin>
<plugin>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.8.2</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
Expand Down Expand Up @@ -198,6 +195,29 @@
</testResource>
</testResources>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<version>3.4.1</version>
<executions>
<execution>
<id>enforce-versions</id>
<goals>
<goal>enforce</goal>
</goals>
<configuration>
<rules>
<requireMavenVersion>
<version>[3.8.0,)</version>
</requireMavenVersion>
<requireJavaVersion>
<version>[17,)</version>
</requireJavaVersion>
</rules>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>de.conterra.maven</groupId>
<artifactId>setproperties-maven-plugin</artifactId>
Expand Down Expand Up @@ -321,7 +341,7 @@
<properties>
<owner>con terra GmbH</owner>
<email>info@conterra.de</email>
<project.inceptionYear>2024</project.inceptionYear>
<project.inceptionYear>2023</project.inceptionYear>
</properties>
<includes>
<include>src/main/js/**/*.js</include>
Expand Down Expand Up @@ -394,7 +414,7 @@
<configuration>
<!-- don't list not shipped bundles in the
META-INF\js-registry-packs.properties file -->
<scanPackagesExcludes>apps/**,bundles/sample_tests</scanPackagesExcludes>
<scanPackagesExcludes>apps/**,bundles/tests</scanPackagesExcludes>
</configuration>
</execution>
</executions>
Expand All @@ -409,6 +429,7 @@
<configuration>
<!-- only build zip files -->
<skipDeploy>true</skipDeploy>
<createApp>false</createApp>
<sourceDirectory>${js.build.outputPath}/apps</sourceDirectory>
<outputDirectory>${project.build.directory}</outputDirectory>
</configuration>
Expand Down Expand Up @@ -492,12 +513,12 @@
<root.build.outputPath>${project.build.directory}/webapp</root.build.outputPath>
<js.build.outputPath>${root.build.outputPath}/js</js.build.outputPath>

<mapapps.version>4.17.0</mapapps.version>
<vuetify.version>1.5.28</vuetify.version>
<mapapps.version>4.18.1</mapapps.version>
<vuetify.version>1.5.30</vuetify.version>
<!-- JS lib versions -->
<apprt.version>${mapapps.version}</apprt.version>
<!-- java lib versions -->
<ct.jsregistry.version>2.0.1</ct.jsregistry.version>
<ct.jsregistry.version>2.1.1</ct.jsregistry.version>
<ct.jsrt-test.version>2.0.2</ct.jsrt-test.version>

<!-- the default app, replaced in the *.html files to switch app names-->
Expand Down Expand Up @@ -527,7 +548,7 @@
required -->
<mapapps.useChunkedRequestEncoding>true</mapapps.useChunkedRequestEncoding>
<!-- enable this if "upload" profile should only deploy bundles -->
<skip.apps.upload>true</skip.apps.upload>
<skip.apps.upload>false</skip.apps.upload>
<!-- enable this if "upload" profile should pre-optimize apps -->
<triggerPreOptimization>false</triggerPreOptimization>
</properties>
Expand Down Expand Up @@ -575,6 +596,11 @@
<artifactId>apprt-polyfill</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>de.conterra.js</groupId>
<artifactId>reactivity</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
</profile>
<profile>
Expand Down Expand Up @@ -667,6 +693,12 @@
</properties>
<build>
<plugins>
<plugin>
<artifactId>maven-deploy-plugin</artifactId>
<configuration>
<updateReleaseInfo>true</updateReleaseInfo>
</configuration>
</plugin>
<plugin>
<groupId>de.conterra.jsregistry</groupId>
<artifactId>ct-jsregistry-maven-plugin</artifactId>
Expand Down Expand Up @@ -709,6 +741,8 @@
<configuration>
<skipDeploy>${skip.apps.upload}</skipDeploy>
<deployAsApp>true</deployAsApp>
<appName>${project.artifactId}</appName>
<appTitle>${project.artifactId}-${project.version}</appTitle>
<appEditorState>PUBLISHED</appEditorState>
<serverResourcesEndpoint>${mapapps.remote.base}/resources</serverResourcesEndpoint>
<username>${mapapps.user}</username>
Expand Down
4 changes: 2 additions & 2 deletions src/main/config/assembly.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<!--
Copyright (C) 2024 con terra GmbH (info@conterra.de)
Copyright (C) 2023 con terra GmbH (info@conterra.de)
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -34,4 +34,4 @@
<outputDirectory>.</outputDirectory>
</fileSet>
</fileSets>
</assembly>
</assembly>
2 changes: 1 addition & 1 deletion src/main/js/bundles/dn_what3words/MapClickPopupHandler.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2024 con terra GmbH (info@conterra.de)
* Copyright (C) 2023 con terra GmbH (info@conterra.de)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2024 con terra GmbH (info@conterra.de)
* Copyright (C) 2023 con terra GmbH (info@conterra.de)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion src/main/js/bundles/dn_what3words/What3wordsModel.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2024 con terra GmbH (info@conterra.de)
* Copyright (C) 2023 con terra GmbH (info@conterra.de)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion src/main/js/bundles/dn_what3words/What3wordsStore.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2024 con terra GmbH (info@conterra.de)
* Copyright (C) 2023 con terra GmbH (info@conterra.de)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2024 con terra GmbH (info@conterra.de)
* Copyright (C) 2023 con terra GmbH (info@conterra.de)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion src/main/js/bundles/dn_what3words/module.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2024 con terra GmbH (info@conterra.de)
* Copyright (C) 2023 con terra GmbH (info@conterra.de)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion src/main/js/bundles/dn_what3words/nls/bundle.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2024 con terra GmbH (info@conterra.de)
* Copyright (C) 2023 con terra GmbH (info@conterra.de)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion src/main/js/bundles/dn_what3words/nls/de/bundle.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2024 con terra GmbH (info@conterra.de)
* Copyright (C) 2023 con terra GmbH (info@conterra.de)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion src/main/js/bundles/dn_what3words/styles/styles.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (C) 2024 con terra GmbH (info@conterra.de)
* Copyright (C) 2023 con terra GmbH (info@conterra.de)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion src/main/js/bundles/dn_what3words/tests/all.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2024 con terra GmbH (info@conterra.de)
* Copyright (C) 2023 con terra GmbH (info@conterra.de)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
1 change: 1 addition & 0 deletions src/main/types/mocha-global.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
declare const testConfig: (opts?: Record<string, any>) => void;
7 changes: 7 additions & 0 deletions src/main/types/thirdparty.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/*
* Copyright (C) con terra GmbH
*/

declare module "dojo/*";
declare module "dijit/*";
declare module "dojox/*";
4 changes: 4 additions & 0 deletions src/main/types/vue-shim.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
declare module "*.vue" {
import Vue from "vue";
export default Vue;
}
59 changes: 59 additions & 0 deletions src/support/js/check-licenses.ts
Original file line number Diff line number Diff line change
@@ -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);
}
);
Loading

0 comments on commit acf2f42

Please sign in to comment.