diff --git a/package.json b/package.json index 28c9fc1..ffe1deb 100644 --- a/package.json +++ b/package.json @@ -26,14 +26,6 @@ "prepublishOnly": "bun run build", "postpublish": "bun run package-binaries" }, - "pkg": { - "targets": [ - "node18-linux-x64", - "node18-macos-x64", - "node18-win-x64" - ], - "outputPath": "./binaries" - }, "repository": { "type": "git", "url": "git+https://github.com/geostyler/geostyler-cli.git" @@ -68,7 +60,6 @@ "@typescript-eslint/parser": "^5.59.1", "adm-zip": "^0.5.10", "eslint": "^8.39.0", - "pkg": "^5.8.1", "rimraf": "^5.0.0", "typescript": "^5.0.4" }, @@ -76,7 +67,6 @@ "geostyler-lyrx-parser": "^1.0.1", "geostyler-mapbox-parser": "^6.0.0", "geostyler-mapfile-parser": "^4.0.1", - "geostyler-openlayers-parser": "^5.0.0", "geostyler-qgis-parser": "^3.0.0", "geostyler-sld-parser": "^6.1.2", "geostyler-style": "^9.1.0", diff --git a/src/index.ts b/src/index.ts index 09650e6..b75a5fd 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,6 +1,5 @@ import SLDParser from 'geostyler-sld-parser'; import QGISParser from 'geostyler-qgis-parser'; -import OpenLayersParser from 'geostyler-openlayers-parser'; import MapfileParser from 'geostyler-mapfile-parser'; import MapboxParser from 'geostyler-mapbox-parser'; import ArcGISParser from 'geostyler-lyrx-parser'; @@ -62,8 +61,6 @@ const getParserFromFilename = (fileName: string): StyleParser | undefined => { return undefined; } switch (fileEnding.toLowerCase()) { - case 'ol': - return new OpenLayersParser(); case 'lyrx': return new ArcGISParser(); case 'mapbox': @@ -85,9 +82,6 @@ const getExtensionFromFormat = (format: string): string => { return ''; } switch (format.toLowerCase()) { - case 'openlayers': - case 'ol': - return 'ts'; case 'mapfile': return 'map'; case 'qgis': @@ -161,17 +155,13 @@ function collectPaths(basePath: string, isFile: boolean): string[] { } async function writeFile( - sourceFile: string, sourceParser: Exclude, + sourceFile: string, sourceParser: StyleParser, targetFile: string, targetParser: Exclude | undefined, oraIndicator: Ora ) { const inputFileData = await promises.readFile(sourceFile, 'utf-8'); const indicator = oraIndicator; // for linter. - if (sourceParser instanceof OpenLayersParser) { - throw new Error('OpenLayers is not supported as source.'); - } - if (targetParser instanceof ArcGISParser || targetParser instanceof MapfileParser) { throw new Error('ArcGIS (lyrx) and MapFile are not supported as target.'); } @@ -215,12 +205,6 @@ async function writeFile( console.log(writeUnsupportedProperties); } output = writeOutput; - if (targetParser instanceof OpenLayersParser) { - output = JSON.stringify(readOutput, undefined, 2); - if (!output) { - throw new Error('OpenLayers style could not be converted to JSON.'); - } - } } else { output = JSON.stringify(readOutput, undefined, 2); }