@vcmap/plugin-cli 4.1.3 → 4.1.5

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.
@@ -1,200 +1,6 @@
1
- default:
2
- image: gitlab.virtualcitysystems.de:5050/vcsuite/devops/gitlabrunner/node:20-bullseye
3
-
4
- variables:
5
- GIT_CLONE_PATH: $CI_BUILDS_DIR/$CI_PROJECT_PATH_SLUG/$CI_COMMIT_REF_SLUG
6
-
7
- stages:
8
- - build
9
- - test
10
- - bundle
11
- - deploy
12
- - prepublish
13
- - version
14
- - publish
15
- - deployCluster
16
-
17
- .template: &job_definition
18
- only:
19
- - /^(feature-.*|hotfix-.*|main|release-.*)$/
20
- tags:
21
- - linux-2.0
22
-
23
- build:
24
- <<: *job_definition
25
- script:
26
- - npm ci
27
- before_script:
28
- - mkdir -p ~/.ssh
29
- - chmod 700 ~/.ssh
30
- - echo "$SSH_RUNNER_KEY" | tr -d '\r' > ~/.ssh/id_rsa
31
- - chmod 600 ~/.ssh/id_rsa
32
- - ssh-keyscan gitlab.virtualcitysystems.de >> ~/.ssh/known_hosts
33
- - chmod 644 ~/.ssh/known_hosts
34
- - git config user.name "Gitlab Runner"
35
- - git config user.email "gitlab-runner@vc.systems"
36
- stage: build
37
-
38
- .after_build_template: &after_build_definition
39
- <<: *job_definition
40
- variables:
41
- GIT_STRATEGY: none
42
-
43
- .staging_build_template: &staging_build_template
44
- <<: *after_build_definition
45
- except:
46
- variables:
47
- - $PUBLISH
48
-
49
- lint:
50
- <<: *after_build_definition
51
- stage: test
52
- script:
53
- - npm run lint
54
-
55
- test:
56
- <<: *after_build_definition
57
- stage: test
58
- script:
59
- - npm run coverage -- --reporter junit --outputFile test-report.xml
60
- coverage: '/^Statements\s*:\s*([^%]+)/'
61
- artifacts:
62
- reports:
63
- junit: test-report.xml
64
-
65
- audit:
66
- <<: *after_build_definition
67
- stage: test
68
- script:
69
- - npm audit --production --audit-level=low
70
-
71
- buildPreview:
72
- <<: *staging_build_template
73
- stage: bundle
74
- script:
75
- - npm run buildStagingApp
76
- before_script:
77
- - mkdir -p ~/.ssh
78
- - chmod 700 ~/.ssh
79
- - echo "$SSH_RUNNER_KEY" | tr -d '\r' > ~/.ssh/id_rsa
80
- - chmod 600 ~/.ssh/id_rsa
81
- - ssh-keyscan gitlab.virtualcitysystems.de >> ~/.ssh/known_hosts
82
- - chmod 644 ~/.ssh/known_hosts
83
- - git config user.name "Gitlab Runner"
84
- - git config user.email "gitlab-runner@vc.systems"
85
-
86
- bundle:
87
- <<: *after_build_definition
88
- stage: bundle
89
- only:
90
- variables:
91
- - $PUBLISH
92
- refs:
93
- - /^(main|release-v.*)$/
94
- script:
95
- - npm run build
96
-
97
- deployStaging:
98
- <<: *staging_build_template
99
- stage: deploy
100
- environment:
101
- name: staging/$CI_COMMIT_REF_SLUG
102
- url: http://$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG.stagingcluster.intern.virtualcitysystems.de
103
- on_stop: stopEnvironment
104
- image:
105
- name: gcr.io/kaniko-project/executor:debug
106
- entrypoint: ['']
107
- script:
108
- - /kaniko/executor --context dist/ --dockerfile node_modules/@vcmap/plugin-cli/assets/build/staging/Dockerfile --destination $CI_REGISTRY_IMAGE/staging:$CI_COMMIT_REF_SLUG
109
- before_script:
110
- - mkdir -p /kaniko/.docker
111
- - echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > /kaniko/.docker/config.json
112
-
113
- stopEnvironment:
114
- stage: deploy
115
- variables:
116
- GIT_STRATEGY: none
117
- image:
118
- name: bitnami/kubectl:latest
119
- entrypoint: ['']
120
- tags:
121
- - linux-2.0
122
- script:
123
- - echo "Stop environment staging/$CI_COMMIT_REF_NAME"
124
- - echo "Delete namespace on k9s $CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG"
125
- - kubectl config use-context vcsuite/cluster-management:agent
126
- - kubectl delete namespace $CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG
127
- when: manual
128
- environment:
129
- name: staging/$CI_COMMIT_REF_SLUG
130
- action: stop
131
-
132
- deployStagingCluster:
133
- stage: deployCluster
134
- except:
135
- variables:
136
- - $PUBLISH
137
- inherit:
138
- variables: false
139
- variables:
140
- STAGE_BRANCH: $CI_COMMIT_REF_SLUG
141
- STAGE_PROJECT_NAME: $CI_PROJECT_PATH_SLUG
142
- STAGE_REGISTRY_IMAGE: $CI_REGISTRY_IMAGE
143
- STAGE_NAMESPACE: $CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG
144
- trigger:
145
- project: vcsuite/devops/manifests
146
- branch: main
147
-
148
- sshDependenciesCheck:
149
- <<: *after_build_definition
150
- stage: prepublish
151
- only:
152
- variables:
153
- - $PUBLISH
154
- refs:
155
- - /^(main|release-v.*)$/
156
- script:
157
- - echo "Checking for SSH dependencies in package.json..."
158
- - |
159
- if grep -E "git(\+ssh)?://git@gitlab|ssh://git@gitlab:|gitlab:" package.json; then
160
- echo "Error: SSH link dependencies found in package.json."
161
- exit 1
162
- else
163
- echo "No SSH link dependencies found."
164
- fi
165
-
166
- version:
167
- <<: *after_build_definition
168
- stage: version
169
- only:
170
- variables:
171
- - $PUBLISH
172
- refs:
173
- - /^(main|release-v.*)$/
174
- script:
175
- - npm version patch -m "%s [skip-ci]"
176
- - TAG=`git describe --abbrev=0`
177
- - echo git push git@gitlab:vcsuite/"$CI_PROJECT_PATH".git
178
- - git push git@gitlab:"$CI_PROJECT_PATH".git $TAG
179
- - git push git@gitlab:"$CI_PROJECT_PATH".git HEAD:$CI_COMMIT_REF_NAME
180
- before_script:
181
- - mkdir -p ~/.ssh
182
- - chmod 700 ~/.ssh
183
- - echo "$SSH_RUNNER_KEY" | tr -d '\r' > ~/.ssh/id_rsa
184
- - chmod 600 ~/.ssh/id_rsa
185
- - ssh-keyscan gitlab >> ~/.ssh/known_hosts
186
- - chmod 644 ~/.ssh/known_hosts
187
- - git config user.name "Gitlab Runner"
188
- - git config user.email "gitlab-runner@vc.systems"
189
-
190
- publish:
191
- <<: *after_build_definition
192
- stage: publish
193
- only:
194
- refs:
195
- - /^(main|release-v.*)$/
196
- variables:
197
- - $PUBLISH
198
- script:
199
- - npm config set '//registry.npmjs.org/:_authToken' "${NPM_TOKEN}"
200
- - npm publish --registry https://registry.npmjs.org --access public
1
+ include:
2
+ - project: 'vcsuite/npm/vcmap/ui'
3
+ ref: main
4
+ file:
5
+ - 'templates/.plugin-v1.yml'
6
+ - 'templates/.publish-npm-public-v1.yml'
@@ -1,4 +1,4 @@
1
- FROM httpd:2-buster
1
+ FROM httpd:2-bookworm
2
2
  COPY . /usr/local/apache2/htdocs/
3
3
  # allow for proxy
4
4
  RUN sed -i '/LoadModule rewrite_module/s/^#//g' /usr/local/apache2/conf/httpd.conf && \
@@ -1,198 +1,7 @@
1
- default:
2
- image: gitlab.virtualcitysystems.de:5050/vcsuite/devops/gitlabrunner/node:20-bullseye
3
-
4
- variables:
5
- GIT_CLONE_PATH: $CI_BUILDS_DIR/$CI_PROJECT_PATH_SLUG/$CI_COMMIT_REF_SLUG
6
-
7
- stages:
8
- - build
9
- - test
10
- - bundle
11
- - deploy
12
- - prepublish
13
- - version
14
- - publish
15
- - deployCluster
16
-
17
- .template: &job_definition
18
- only:
19
- - /^(feature-.*|hotfix-.*|main|release-.*)$/
20
- tags:
21
- - linux-2.0
22
-
23
- build:
24
- <<: *job_definition
25
- script:
26
- - npm ci
27
- - npm run ensure-types
28
- before_script:
29
- - mkdir -p ~/.ssh
30
- - chmod 700 ~/.ssh
31
- - echo "$SSH_RUNNER_KEY" | tr -d '\r' > ~/.ssh/id_rsa
32
- - chmod 600 ~/.ssh/id_rsa
33
- - ssh-keyscan gitlab.virtualcitysystems.de >> ~/.ssh/known_hosts
34
- - chmod 644 ~/.ssh/known_hosts
35
- - git config user.name "Gitlab Runner"
36
- - git config user.email "gitlab-runner@vc.systems"
37
- stage: build
38
-
39
- .after_build_template: &after_build_definition
40
- <<: *job_definition
41
- variables:
42
- GIT_STRATEGY: none
43
-
44
- .staging_build_template: &staging_build_template
45
- <<: *after_build_definition
46
- except:
47
- variables:
48
- - $PUBLISH
49
-
50
- lint:
51
- <<: *after_build_definition
52
- stage: test
53
- script:
54
- - npm run lint
55
-
56
- type-check:
57
- <<: *after_build_definition
58
- stage: test
59
- script:
60
- - npm run type-check
61
-
62
- test:
63
- <<: *after_build_definition
64
- stage: test
65
- script:
66
- - npm run coverage -- --reporter junit --outputFile test-report.xml
67
- coverage: '/^Statements\s*:\s*([^%]+)/'
68
- artifacts:
69
- reports:
70
- junit: test-report.xml
71
-
72
- audit:
73
- <<: *after_build_definition
74
- stage: test
75
- script:
76
- - npm audit --production --audit-level=low
77
-
78
- buildPreview:
79
- <<: *staging_build_template
80
- stage: bundle
81
- script:
82
- - npm run buildStagingApp
83
-
84
- bundle:
85
- <<: *after_build_definition
86
- stage: bundle
87
- only:
88
- variables:
89
- - $PUBLISH
90
- refs:
91
- - /^(main|release-v.*)$/
92
- script:
93
- - npm run build
94
-
95
- deployStaging:
96
- <<: *staging_build_template
97
- stage: deploy
98
- environment:
99
- name: staging/$CI_COMMIT_REF_SLUG
100
- url: http://$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG.stagingcluster.intern.virtualcitysystems.de
101
- on_stop: stopEnvironment
102
- image:
103
- name: gcr.io/kaniko-project/executor:debug
104
- entrypoint: ['']
105
- script:
106
- - /kaniko/executor --context dist/ --dockerfile node_modules/@vcmap/plugin-cli/assets/build/staging/Dockerfile --destination $CI_REGISTRY_IMAGE/staging:$CI_COMMIT_REF_SLUG
107
- before_script:
108
- - mkdir -p /kaniko/.docker
109
- - echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > /kaniko/.docker/config.json
110
-
111
- stopEnvironment:
112
- stage: deploy
113
- variables:
114
- GIT_STRATEGY: none
115
- image:
116
- name: bitnami/kubectl:latest
117
- entrypoint: ['']
118
- tags:
119
- - linux-2.0
120
- script:
121
- - echo "Stop environment staging/$CI_COMMIT_REF_NAME"
122
- - echo "Delete namespace on k9s $CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG"
123
- - kubectl config use-context vcsuite/cluster-management:agent
124
- - kubectl delete namespace $CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG
125
- when: manual
126
- environment:
127
- name: staging/$CI_COMMIT_REF_SLUG
128
- action: stop
129
-
130
- deployStagingCluster:
131
- stage: deployCluster
132
- except:
133
- variables:
134
- - $PUBLISH
135
- inherit:
136
- variables: false
137
- variables:
138
- STAGE_BRANCH: $CI_COMMIT_REF_SLUG
139
- STAGE_PROJECT_NAME: $CI_PROJECT_PATH_SLUG
140
- STAGE_REGISTRY_IMAGE: $CI_REGISTRY_IMAGE
141
- STAGE_NAMESPACE: $CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG
142
- trigger:
143
- project: vcsuite/devops/manifests
144
- branch: main
145
-
146
- sshDependenciesCheck:
147
- <<: *after_build_definition
148
- stage: prepublish
149
- only:
150
- variables:
151
- - $PUBLISH
152
- refs:
153
- - /^(main|release-v.*)$/
154
- script:
155
- - echo "Checking for SSH dependencies in package.json..."
156
- - |
157
- if grep -E "git(\+ssh)?://git@gitlab|ssh://git@gitlab:|gitlab:" package.json; then
158
- echo "Error: SSH link dependencies found in package.json."
159
- exit 1
160
- else
161
- echo "No SSH link dependencies found."
162
- fi
163
-
164
- version:
165
- <<: *after_build_definition
166
- stage: version
167
- only:
168
- variables:
169
- - $PUBLISH
170
- refs:
171
- - /^(main|release-v.*)$/
172
- script:
173
- - npm version patch -m "%s [skip-ci]"
174
- - TAG=`git describe --abbrev=0`
175
- - echo git push git@gitlab:vcsuite/"$CI_PROJECT_PATH".git
176
- - git push git@gitlab:"$CI_PROJECT_PATH".git $TAG
177
- - git push git@gitlab:"$CI_PROJECT_PATH".git HEAD:$CI_COMMIT_REF_NAME
178
- before_script:
179
- - mkdir -p ~/.ssh
180
- - chmod 700 ~/.ssh
181
- - echo "$SSH_RUNNER_KEY" | tr -d '\r' > ~/.ssh/id_rsa
182
- - chmod 600 ~/.ssh/id_rsa
183
- - ssh-keyscan gitlab >> ~/.ssh/known_hosts
184
- - chmod 644 ~/.ssh/known_hosts
185
- - git config user.name "Gitlab Runner"
186
- - git config user.email "gitlab-runner@vc.systems"
187
-
188
- publish:
189
- <<: *after_build_definition
190
- stage: publish
191
- only:
192
- refs:
193
- - /^(main|release-v.*)$/
194
- variables:
195
- - $PUBLISH
196
- script:
197
- - npm config set '//registry.npmjs.org/:_authToken' "${NPM_TOKEN}"
198
- - npm publish --registry https://registry.npmjs.org --access public
1
+ include:
2
+ - project: 'vcsuite/npm/vcmap/ui'
3
+ ref: main
4
+ file:
5
+ - 'templates/.plugin-v1.yml'
6
+ - 'templates/.plugin-ts-v1.yml'
7
+ - 'templates/.publish-npm-public-v1.yml'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vcmap/plugin-cli",
3
- "version": "4.1.3",
3
+ "version": "4.1.5",
4
4
  "description": "A CLI to help develop and build plugins for the VC Map",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -29,7 +29,7 @@ function getHtaccess(config) {
29
29
  `proxy settings for ${key} may be more complex, simply using rewrite to target: ${target}`,
30
30
  );
31
31
  }
32
- return `RewriteRule ^${key.replace(/^\^/, '')}(.*) ${target}$1 [P,L]`;
32
+ return `RewriteRule ^${key.replace(/^[/^]/, '')}(.*) ${target.replace(/\/$/, '')}$1 [P,L]`;
33
33
  });
34
34
 
35
35
  if (htaccessLines.length > 0) {