mapicgc-gl-js 0.0.56 → 0.0.57

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,33 @@
1
+ # This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
2
+ # For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages
3
+
4
+ name: Node.js Package
5
+
6
+ on:
7
+ release:
8
+ types: [created]
9
+
10
+ jobs:
11
+ build:
12
+ runs-on: ubuntu-latest
13
+ steps:
14
+ - uses: actions/checkout@v3
15
+ - uses: actions/setup-node@v3
16
+ with:
17
+ node-version: 16
18
+ - run: npm ci
19
+ - run: npm test
20
+
21
+ publish-npm:
22
+ needs: build
23
+ runs-on: ubuntu-latest
24
+ steps:
25
+ - uses: actions/checkout@v3
26
+ - uses: actions/setup-node@v3
27
+ with:
28
+ node-version: 16
29
+ registry-url: https://registry.npmjs.org/
30
+ - run: npm ci
31
+ - run: npm publish
32
+ env:
33
+ NODE_AUTH_TOKEN: ${{secrets.npm_token}}
@@ -0,0 +1,35 @@
1
+ const { exec } = require('child_process');
2
+
3
+ // Funció per fer un commit i fer push als repositoris remots
4
+ function commitAndPush(commitMessage) {
5
+ // Comandament per afegir tots els canvis a la zona d'espera
6
+ const addCommand = 'git add .';
7
+ // Comandament per fer un commit amb el missatge proporcionat
8
+ const commitCommand = `git commit -m "${commitMessage}"`;
9
+ // Comandament per fer push als repositoris remots
10
+ const pushCommand1 = 'git push origin master';
11
+ const pushCommand2 = 'git push -u origin2 master';
12
+ // Executar els comandaments en sèrie
13
+ exec(`${addCommand} && ${commitCommand} && ${pushCommand1} && ${pushCommand2}`, (error, stdout, stderr) => {
14
+
15
+ if (error) {
16
+ console.error(`Error: ${error.message}`);
17
+ return;
18
+ }
19
+ if (stderr) {
20
+ console.error(`stderr: ${stderr}`);
21
+ return;
22
+ }
23
+ console.log(`Commit realitzat amb èxit: ${commitMessage}`);
24
+ });
25
+ }
26
+
27
+ // Utilitzar el primer argument de la línia de comandes com a missatge del commit
28
+ const commitMessage = process.argv[2];
29
+
30
+ // Comprovar si s'ha proporcionat un missatge de commit
31
+ if (commitMessage) {
32
+ commitAndPush(commitMessage);
33
+ } else {
34
+ console.error('Cal proporcionar un missatge de commit com a argument.');
35
+ }
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "mapicgc-gl-js",
3
3
  "homepage": "https://autogitlab.icgc.local/geostarters/icgc/mapicgc/mapicgc-gl-js",
4
- "version": "0.0.56",
4
+ "version": "0.0.57",
5
5
  "description": "mapicgc-gl-js library",
6
6
  "author": "ICGC",
7
7
  "license": "BSD-3-Clause",
8
- "keywords": [
8
+ "keywords": [
9
9
  "map",
10
10
  "js",
11
11
  "webmap",
@@ -36,7 +36,7 @@
36
36
  "build-all": "npm-run-all build && node nodeDeploy.js",
37
37
  "build": "vite build",
38
38
  "preview": "vite preview",
39
- "publish": "npm publish --access public",
39
+ "publish": "npm publish --access public",
40
40
  "setConfig": "node nodeSetConfig.js"
41
41
  },
42
42
  "devDependencies": {
@@ -1,12 +1,12 @@
1
-
2
- const Styles = {
3
- TOPO: "https://geoserveis.icgc.cat/contextmaps/icgc_mapa_estandard_general.json",
4
- ORTO: "https://geoserveis.icgc.cat/contextmaps/icgc_orto_estandard.json",
5
- ORTO3D: "https://tilemaps.icgc.cat/cdn/styles/icgc_orto_3d.json",
6
- ADMIN: "https://geoserveis.icgc.cat/contextmaps/icgc_delimitacio_limits_administratius.json",
7
- DARK: "https://geoserveis.icgc.cat/contextmaps/icgc_mapa_base_fosc.json",
8
- LIGHT: "https://geoserveis.icgc.cat/contextmaps/icgc_mapa_base_gris.json",
9
- GEOLOGY: "https://geoserveis.icgc.cat/contextmaps/icgc_geologic_informacio.json",
10
- };
11
-
12
- export default Styles;
1
+
2
+ const Styles = {
3
+ TOPO: "https://geoserveis.icgc.cat/contextmaps/icgc_mapa_estandard_general.json",
4
+ ORTO: "https://geoserveis.icgc.cat/contextmaps/icgc_orto_estandard.json",
5
+ ORTO3D: "https://tilemaps.icgc.cat/cdn/styles/icgc_orto_3d.json",
6
+ ADMIN: "https://geoserveis.icgc.cat/contextmaps/icgc_delimitacio_limits_administratius.json",
7
+ DARK: "https://geoserveis.icgc.cat/contextmaps/icgc_mapa_base_fosc.json",
8
+ LIGHT: "https://geoserveis.icgc.cat/contextmaps/icgc_mapa_base_gris.json",
9
+ GEOLOGY: "https://geoserveis.icgc.cat/contextmaps/icgc_geologic_informacio.json",
10
+ };
11
+
12
+ export default Styles;
@@ -1,7 +1,7 @@
1
-
2
- const Terrains = {
3
- ICGC5M: "https://tilemaps.icgc.cat/tileserver/tileserver/terreny-5m-30m-rgb-extent/{z}/{x}/{y}.png",
4
- WORLD30M: "https://s3.amazonaws.com/elevation-tiles-prod/terrarium/{z}/{x}/{y}.png",
5
- };
6
-
7
- export default Terrains;
1
+
2
+ const Terrains = {
3
+ ICGC5M: "https://tilemaps.icgc.cat/tileserver/tileserver/terreny-5m-30m-rgb-extent/{z}/{x}/{y}.png",
4
+ WORLD30M: "https://s3.amazonaws.com/elevation-tiles-prod/terrarium/{z}/{x}/{y}.png",
5
+ };
6
+
7
+ export default Terrains;