Skip to content

Commit

Permalink
organise imports
Browse files Browse the repository at this point in the history
  • Loading branch information
k-yle committed Jul 15, 2023
1 parent 123b80e commit ff6309a
Show file tree
Hide file tree
Showing 12 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"all": "npm run preprocess && npm run conflate && npm run action && npm run upload",
"changelog": "ts-node src/changelog",
"changesetWatch": "ts-node src/changesetWatch",
"lint": "eslint --fix --ignore-path .gitignore . && tsc",
"lint": "eslint --ignore-path .gitignore . && tsc",
"pretest": "cp src/__tests__/bin/osmconvert src/__tests__/bin/osmconvert2 && chmod u+x src/__tests__/bin/osmconvert2",
"test": "jest"
},
Expand Down
2 changes: 1 addition & 1 deletion src/action/createIndex.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { promises as fs } from 'node:fs';
import { join } from 'node:path';
import { GeoJson, HandlerReturnWithBBox } from '../types';
import { calcCount, CDN_URL, mock, suburbsFolder } from './util';
import { hash } from '../common';
import { calcCount, CDN_URL, mock, suburbsFolder } from './util';

function toId(suburb: string) {
// macrons are url safe
Expand Down
2 changes: 1 addition & 1 deletion src/changelog/processChangelog.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import fetch from 'node-fetch';
import { promises as fs, createReadStream } from 'node:fs';
import { join } from 'node:path';
import fetch from 'node-fetch';
import csv from 'csv-parser';
import { ChangelogJson, LinzChangelog } from '../types';

Expand Down
2 changes: 1 addition & 1 deletion src/changesetWatch/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import {
listChangesets,
} from 'osm-api';
import { config as dotenv } from 'dotenv';
import { timeout, fetchIgnoreList } from '../common';
import { watchArea } from './constants';
import { updateIgnoreList, updateLastCheckDate } from './api';
import { timeout, fetchIgnoreList } from '../common';
import { CSWithDiff, patchOsmChange } from './patchOsmChange';
import { checkDiffsForAddress } from './checkDiffsForAddress';

Expand Down
2 changes: 1 addition & 1 deletion src/common/fetchIgnoreList.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { createReadStream } from 'node:fs';
import { join } from 'node:path';
import fetch from 'node-fetch';
import csv from 'csv-parser';
import { join } from 'node:path';
import { IgnoreFile, mock } from '../preprocess/const';

export const spreadsheetId = '1BNrUQof78t-OZlCHF3n_MKnYDARFoCRZB7xKxQPmKds';
Expand Down
2 changes: 1 addition & 1 deletion src/extraLayers/geodetic/checkStatus.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { exec } from 'node:child_process';
import { promisify } from 'node:util';
import csv from 'csv-parser';
import { Readable } from 'node:stream';
import csv from 'csv-parser';
import { LINZCSVItem, LINZMarker } from './const';
import { csvToMarker } from './readLINZData';

Expand Down
4 changes: 2 additions & 2 deletions src/extraLayers/geodetic/readLINZData.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { createReadStream } from 'node:fs';
import csv from 'csv-parser';
import { join } from 'node:path';
import { beaconTypes, LINZCSVItem, LINZMarker, markConditions } from './const';
import csv from 'csv-parser';
import { BBox } from '../../types';
import { withinBBox } from '../../common';
import { beaconTypes, LINZCSVItem, LINZMarker, markConditions } from './const';

type Structure = false | [string, string?, string?];

Expand Down
4 changes: 2 additions & 2 deletions src/extraLayers/linzTopo/_specialLinzLayers.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { promises as fs, createReadStream } from 'node:fs';
import csv from 'csv-parser';
import { join } from 'node:path';
import { F_OK } from 'node:constants';
import csv from 'csv-parser';
import { Query } from 'which-polygon';
import {
ChunkSize,
Expand All @@ -10,9 +10,9 @@ import {
GeoJsonFeature,
Tags,
} from '../../types';
import { wktToGeoJson } from './geoOperations';
import { IgnoreFile } from '../../preprocess/const';
import { getFirstCoord, hash } from '../../common';
import { wktToGeoJson } from './geoOperations';
import { Chart, getBestChart } from './seamarkTagging';

const existsAsync = (path: string) =>
Expand Down
4 changes: 2 additions & 2 deletions src/extraLayers/linzTopo/seamarkTagging/nauticalChartIndex.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { createReadStream } from 'node:fs';
import { join } from 'node:path';
import csv from 'csv-parser';
import { Query } from 'which-polygon';
import { join } from 'node:path';
import { GeoJson, GeoJsonFeature } from '../../../types';
import { fixChartName } from './helpers';
import { wktToGeoJson } from '../geoOperations';
import { fixChartName } from './helpers';

const filePath = join(
__dirname,
Expand Down
2 changes: 1 addition & 1 deletion src/preprocess/processLinzData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import { promises as fs, createReadStream } from 'node:fs';
import { join } from 'node:path';
import csv from 'csv-parser';
import { LinzSourceAddress, LinzData } from '../types';
import { linzTempFile, mock, ignoreFile, IgnoreFile } from './const';
import { nzgbNamesTable } from '../common/nzgbFile';
import { linzTempFile, mock, ignoreFile, IgnoreFile } from './const';

const input = join(
__dirname,
Expand Down
2 changes: 1 addition & 1 deletion src/preprocess/stackLinzData.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { promises as fs, readFileSync } from 'node:fs';
import whichPolygon from 'which-polygon';
import { join } from 'node:path';
import whichPolygon from 'which-polygon';
import { LinzData, LinzAddr, OSMData, CouldStackData, GeoJson } from '../types';
import { toStackId, uniq } from '../common';
import { linzFile, linzTempFile, mock, osmFile, stackFile } from './const';
Expand Down
2 changes: 1 addition & 1 deletion src/upload/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import { BlobServiceClient, ContainerClient } from '@azure/storage-blob';
import { config as dotenv } from 'dotenv';
import { lookup } from 'mime-types';
import fetch from 'node-fetch';
import { uploadStatsToGH } from './uploadStatsToGH';
import { CDN_URL } from '../action/util';
import { uploadStatsToGH } from './uploadStatsToGH';

dotenv();

Expand Down

0 comments on commit ff6309a

Please sign in to comment.