Skip to content

Commit

Permalink
Merge pull request #503 from geoadmin/feat-BGDIINF_SB-3071-url-list
Browse files Browse the repository at this point in the history
BGDIINF_SB-3071: Moved the external-layer-providers.json in its module
  • Loading branch information
ltshb authored Nov 1, 2023
2 parents 37bb4cc + 670630f commit 484d1c6
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 6 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ Depending on the target (`dev|int|prod`), you will have to build and bundle/mini

## Check External Layer Provider list

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
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
check their validity. The tool can also be used with a single url as input parameter to see the url would be valid
for our application.

Expand Down
10 changes: 8 additions & 2 deletions scripts/check-external-layers-providers.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,20 @@ import { hideBin } from 'yargs/helpers'
import ogcParser from 'ogc-parser'
import { exit } from 'process'

import { transformUrl, isWmsGetCap, isWmtsGetCap, isKml, isGpx } from '@/utils/external-provider'
import {
transformUrl,
isWmsGetCap,
isWmtsGetCap,
isKml,
isGpx,
} from '@/modules/infobox/utils/external-provider'

const options = yargs(hideBin(process.argv))
.usage('Usage: $0 [options]')
.version('1.0.0')
.epilog('Check validity of all providers')
.option('input', {
default: './src/external-layer-providers.json',
default: './src/modules/infobox/utils/external-layer-providers.json',
describe: 'Input JSON providers file to check',
type: 'string',
})
Expand Down
4 changes: 2 additions & 2 deletions src/modules/infobox/components/ImportContent.vue
Original file line number Diff line number Diff line change
Expand Up @@ -78,15 +78,15 @@
</div>
</template>
<script>
import externalLayerProviders from '@/external-layer-providers.json'
import externalLayerProviders from '@/modules/infobox/utils/external-layer-providers.json'
import {
isValidUrl,
transformUrl,
isGpx,
isKml,
isWmsGetCap,
isWmtsGetCap,
} from '@/utils/external-provider'
} from '@/modules/infobox/utils/external-provider'
import { mapState } from 'vuex'
import { getCapWMSLayers, getCapWMTSLayers } from '@/utils/file'
import { WMSCapabilities } from 'ol/format'
Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"extends": "@vue/tsconfig/tsconfig.dom.json",
"include": ["env.d.ts", "src/**/*", "src/**/*.vue"],
"include": ["env.d.ts", "src/**/*", "src/**/*.json", "src/**/*.vue"],
"exclude": ["src/**/__tests__/*"],
"compilerOptions": {
"composite": true,
Expand Down

0 comments on commit 484d1c6

Please sign in to comment.