@vcmap/plugin-cli 4.1.2 → 4.1.4
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.
- package/assets/.gitlab-ci.yml +6 -200
- package/assets/build/staging/Dockerfile +1 -1
- package/assets/ts.gitlab-ci.yml +7 -198
- package/package.json +1 -1
- package/src/buildStagingApp.js +1 -1
- package/src/serve.js +23 -1
package/assets/.gitlab-ci.yml
CHANGED
|
@@ -1,200 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
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'
|
package/assets/ts.gitlab-ci.yml
CHANGED
|
@@ -1,198 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
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
package/src/buildStagingApp.js
CHANGED
|
@@ -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(
|
|
32
|
+
return `RewriteRule ^${key.replace(/^[/^]/, '')}(.*) ${target.replace(/\/$/, '')}$1 [P,L]`;
|
|
33
33
|
});
|
|
34
34
|
|
|
35
35
|
if (htaccessLines.length > 0) {
|
package/src/serve.js
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import fs from 'fs';
|
|
2
|
-
import { lstat, readFile } from 'fs/promises';
|
|
2
|
+
import { lstat, readFile, readlink } from 'fs/promises';
|
|
3
3
|
import { createServer } from 'vite';
|
|
4
4
|
import vue from '@vitejs/plugin-vue';
|
|
5
5
|
import express from 'express';
|
|
6
6
|
import { logger } from '@vcsuite/cli-logger';
|
|
7
7
|
import path from 'path';
|
|
8
|
+
import { join, resolve, dirname } from 'node:path';
|
|
8
9
|
import { getContext } from './context.js';
|
|
9
10
|
import {
|
|
10
11
|
addConfigRoute,
|
|
@@ -142,6 +143,26 @@ export default async function serve(options) {
|
|
|
142
143
|
(name) => !optimizationIncludes.includes(name),
|
|
143
144
|
);
|
|
144
145
|
|
|
146
|
+
let serverFsConfig;
|
|
147
|
+
const coreModule = join(process.cwd(), 'node_modules', '@vcmap', 'core');
|
|
148
|
+
const coreStats = await lstat(coreModule);
|
|
149
|
+
if (coreStats.isSymbolicLink()) {
|
|
150
|
+
const linkPath = await readlink(coreModule);
|
|
151
|
+
serverFsConfig = {
|
|
152
|
+
allow: [
|
|
153
|
+
'.',
|
|
154
|
+
resolve(dirname(coreModule), join(linkPath, 'dist', 'src', 'workers')),
|
|
155
|
+
],
|
|
156
|
+
};
|
|
157
|
+
} else {
|
|
158
|
+
serverFsConfig = {
|
|
159
|
+
allow: [
|
|
160
|
+
'.',
|
|
161
|
+
resolve(dirname(coreModule), join('dist', 'src', 'workers')),
|
|
162
|
+
],
|
|
163
|
+
};
|
|
164
|
+
}
|
|
165
|
+
|
|
145
166
|
const server = await createServer({
|
|
146
167
|
root: getContext(),
|
|
147
168
|
publicDir: './node_modules/@vcmap/ui/public',
|
|
@@ -172,6 +193,7 @@ export default async function serve(options) {
|
|
|
172
193
|
},
|
|
173
194
|
plugins: [vue(), createConfigJsonReloadPlugin()],
|
|
174
195
|
server: {
|
|
196
|
+
fs: serverFsConfig,
|
|
175
197
|
middlewareMode: true,
|
|
176
198
|
proxy: { ...mergedOptions.proxy, ...proxy },
|
|
177
199
|
},
|