Skip to content

Commit bbc2be6

Browse files
committed
BGDIINF_SB-3071: Moved the external-layer-providers.json in its module
Move it into its module as well as its utilities, which are highly related to the import tool. Also avoid a typescript failure in vscode by adding explicitly json file in the tsconfig.json include pattern.
1 parent 5594130 commit bbc2be6

File tree

6 files changed

+13
-6
lines changed

6 files changed

+13
-6
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ Depending on the target (`dev|int|prod`), you will have to build and bundle/mini
212212

213213
## Check External Layer Provider list
214214

215-
In the `Import` tool we provide an hardcoded list of provider via the [src/external-layer-providers.json](./src/external-layer-providers.json) file. Because we have quite a lot of provider, we have a CLI tool in order to
215+
In the `Import` tool we provide an hardcoded list of provider via the [src/modules/infobox/utils/external-layer-providers.json](./src/modules/infobox/utils/external-layer-providers.json) file. Because we have quite a lot of provider, we have a CLI tool in order to
216216
check their validity. The tool can also be used with a single url as input parameter to see the url would be valid
217217
for our application.
218218

scripts/check-external-layers-providers.js

+8-2
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,20 @@ import { hideBin } from 'yargs/helpers'
99
import ogcParser from 'ogc-parser'
1010
import { exit } from 'process'
1111

12-
import { transformUrl, isWmsGetCap, isWmtsGetCap, isKml, isGpx } from '@/utils/external-provider'
12+
import {
13+
transformUrl,
14+
isWmsGetCap,
15+
isWmtsGetCap,
16+
isKml,
17+
isGpx,
18+
} from '@/modules/infobox/utils/external-provider'
1319

1420
const options = yargs(hideBin(process.argv))
1521
.usage('Usage: $0 [options]')
1622
.version('1.0.0')
1723
.epilog('Check validity of all providers')
1824
.option('input', {
19-
default: './src/external-layer-providers.json',
25+
default: './src/modules/infobox/utils/external-layer-providers.json',
2026
describe: 'Input JSON providers file to check',
2127
type: 'string',
2228
})

src/modules/infobox/components/ImportContent.vue

+3-2
Original file line numberDiff line numberDiff line change
@@ -78,15 +78,15 @@
7878
</div>
7979
</template>
8080
<script>
81-
import externalLayerProviders from '@/external-layer-providers.json'
81+
import externalLayerProviders from '@/modules/infobox/utils/external-layer-providers.json'
8282
import {
8383
isValidUrl,
8484
transformUrl,
8585
isGpx,
8686
isKml,
8787
isWmsGetCap,
8888
isWmtsGetCap,
89-
} from '@/utils/external-provider'
89+
} from '@/modules/infobox/utils/external-provider'
9090
import { mapState } from 'vuex'
9191
import { getCapWMSLayers, getCapWMTSLayers } from '@/utils/file'
9292
import { WMSCapabilities } from 'ol/format'
@@ -323,3 +323,4 @@ export default {
323323
right: 50px;
324324
}
325325
</style>
326+
../utils/external-layer-providers.js

tsconfig.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"extends": "@vue/tsconfig/tsconfig.dom.json",
3-
"include": ["env.d.ts", "src/**/*", "src/**/*.vue"],
3+
"include": ["env.d.ts", "src/**/*", "src/**/*.json", "src/**/*.vue"],
44
"exclude": ["src/**/__tests__/*"],
55
"compilerOptions": {
66
"composite": true,

0 commit comments

Comments
 (0)