Skip to content
This repository has been archived by the owner on Jul 9, 2024. It is now read-only.

Commit

Permalink
fix: migrate tsconfig.json
Browse files Browse the repository at this point in the history
  • Loading branch information
coderbyheart committed Mar 20, 2023
1 parent 0bda910 commit 5f74c27
Show file tree
Hide file tree
Showing 24 changed files with 66 additions and 61 deletions.
6 changes: 3 additions & 3 deletions agps/deviceRequestHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@ import {
} from '@aws-sdk/client-iot-data-plane'
import { SFNClient, StartExecutionCommand } from '@aws-sdk/client-sfn'
import {
SendMessageBatchCommand,
SendMessageBatchRequestEntry,
SQSClient,
SendMessageBatchCommand,
type SendMessageBatchRequestEntry,
} from '@aws-sdk/client-sqs'
import type { Static } from '@sinclair/typebox'
import type { SQSEvent, SQSMessageAttributes } from 'aws-lambda'
import { randomUUID } from 'node:crypto'
import { fromEnv } from '../util/fromEnv.js'
import { cacheKey } from './cacheKey.js'
import { AGPSDataCache, getCache } from './getCache.js'
import { getCache, type AGPSDataCache } from './getCache.js'
import type { agpsRequestSchema } from './types.js'

const {
Expand Down
2 changes: 1 addition & 1 deletion agps/getCache.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { DynamoDBClient, GetItemCommand } from '@aws-sdk/client-dynamodb'
import { unmarshall } from '@aws-sdk/util-dynamodb'
import type { Static } from '@sinclair/typebox'
import { ErrorInfo, ErrorType } from '../api/ErrorInfo.js'
import { ErrorType, type ErrorInfo } from '../api/ErrorInfo.js'
import type { agpsRequestSchema } from './types.js'

export type AGPSDataCache = Static<typeof agpsRequestSchema> & {
Expand Down
2 changes: 1 addition & 1 deletion cdk/helper/lambdas/findDependencies.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { readFileSync, statSync } from 'node:fs'
import path from 'node:path'
import ts, { ImportDeclaration, StringLiteral } from 'typescript'
import ts, { type ImportDeclaration, type StringLiteral } from 'typescript'

/**
* Resolve project-level dependencies for the given file using TypeScript compiler API
Expand Down
2 changes: 1 addition & 1 deletion cellGeolocation/addCellToCacheIfNotExists.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { DynamoDBClient, PutItemCommand } from '@aws-sdk/client-dynamodb'
import { cellId } from '@nordicsemiconductor/cell-geolocation-helpers'
import { ErrorInfo, ErrorType } from '../api/ErrorInfo.js'
import { ErrorType, type ErrorInfo } from '../api/ErrorInfo.js'
import type { Cell } from '../geolocation/Cell.js'
import type { Location } from '../geolocation/Location.js'
import { fromDeviceLocations } from './cellGeolocationFromDeviceLocations.js'
Expand Down
2 changes: 1 addition & 1 deletion cellGeolocation/geolocateFromCache.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { DynamoDBClient, GetItemCommand } from '@aws-sdk/client-dynamodb'
import { cellId } from '@nordicsemiconductor/cell-geolocation-helpers'
import { ErrorInfo, ErrorType } from '../api/ErrorInfo.js'
import { ErrorType, type ErrorInfo } from '../api/ErrorInfo.js'
import type { Cell } from '../geolocation/Cell.js'
import type { Location } from '../geolocation/Location.js'

Expand Down
2 changes: 1 addition & 1 deletion cli/commands/create-and-provision-device-cert.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import {
atHostHexfile,
connect,
Connection,
createPrivateKeyAndCSR,
flashCertificate,
getIMEI,
type Connection,
} from '@nordicsemiconductor/firmware-ci-device-helpers'
import chalk from 'chalk'
import { promises as fs } from 'fs'
Expand Down
2 changes: 1 addition & 1 deletion cli/jitp/registerCA.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import {
GetRegistrationCodeCommand,
IoTClient,
RegisterCACertificateCommand,
Tag,
UpdateEventConfigurationsCommand,
type Tag,
} from '@aws-sdk/client-iot'
import { toObject } from '@nordicsemiconductor/cloudformation-helpers'
import { randomUUID } from 'crypto'
Expand Down
6 changes: 3 additions & 3 deletions feature-runner/steps/asset-tracker.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import {
InterpolatedStep,
regexGroupMatcher,
regexMatcher,
StepRunnerFunc,
type InterpolatedStep,
type StepRunnerFunc,
} from '@nordicsemiconductor/e2e-bdd-test-runner'
import { randomWords } from '@nordicsemiconductor/random-words'
import { expect } from 'chai'
Expand All @@ -13,7 +13,7 @@ import { getCurrentCA } from '../../cli/jitp/currentCA.js'
import { deviceFileLocations } from '../../cli/jitp/deviceFileLocations.js'
import {
awsIotDeviceConnection,
ListenerWithPayload,
type ListenerWithPayload,
} from './awsIotDeviceConnection.js'

type World = {
Expand Down
4 changes: 2 additions & 2 deletions feature-runner/steps/httpApiMock.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import {
QueryCommand,
} from '@aws-sdk/client-dynamodb'
import {
InterpolatedStep,
regexGroupMatcher,
StepRunnerFunc,
type InterpolatedStep,
type StepRunnerFunc,
} from '@nordicsemiconductor/e2e-bdd-test-runner'
import chai, { expect } from 'chai'
import chaiSubset from 'chai-subset'
Expand Down
4 changes: 2 additions & 2 deletions feature-runner/steps/timestream.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ import {
TimestreamQueryClient,
} from '@aws-sdk/client-timestream-query'
import {
InterpolatedStep,
regexMatcher,
StepRunnerFunc,
type InterpolatedStep,
type StepRunnerFunc,
} from '@nordicsemiconductor/e2e-bdd-test-runner'
import { parseResult } from '@nordicsemiconductor/timestream-helpers'
import type { AssetTrackerWorld } from '../run-features.js'
Expand Down
2 changes: 1 addition & 1 deletion geolocation/queueJob.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { SendMessageCommand, SQSClient } from '@aws-sdk/client-sqs'
import { ErrorInfo, ErrorType } from '../api/ErrorInfo.js'
import { ErrorType, type ErrorInfo } from '../api/ErrorInfo.js'

export const queueJob =
({ sqs, QueueUrl }: { sqs: SQSClient; QueueUrl: string }) =>
Expand Down
2 changes: 1 addition & 1 deletion historicalData/storeRecordsInTimeseries.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {
TimestreamWriteClient,
WriteRecordsCommand,
_Record,
type _Record,
} from '@aws-sdk/client-timestream-write'

type AWSError = { message: string; code: number }
Expand Down
2 changes: 1 addition & 1 deletion networkSurveyGeolocation/geolocateSurvey.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { DynamoDBClient, GetItemCommand } from '@aws-sdk/client-dynamodb'
import { unmarshall } from '@aws-sdk/util-dynamodb'
import { ErrorInfo, ErrorType } from '../api/ErrorInfo.js'
import { ErrorType, type ErrorInfo } from '../api/ErrorInfo.js'
import type { Location } from '../geolocation/Location.js'

export type Survey = {
Expand Down
2 changes: 1 addition & 1 deletion networkSurveyGeolocation/httpApi/locateSurvey.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import type {
import { ErrorType, toStatusCode } from '../../api/ErrorInfo.js'
import { res } from '../../api/res.js'
import { fromEnv } from '../../util/fromEnv.js'
import { geolocateSurvey, Survey } from '../geolocateSurvey.js'
import { geolocateSurvey, type Survey } from '../geolocateSurvey.js'

const inputSchema = Type.Object(
{
Expand Down
55 changes: 27 additions & 28 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"test": "jest --detectOpenHandles --forceExit",
"test:e2e": "node --unhandled-rejections=strict --loader tsx feature-runner/run-features.ts ./features --print-results --progress",
"prepare": "husky install && check-node-version --package",
"prepublish": "npx swc -d dist ./cli npx swc -d dist ./features"
"prepublishOnly": "npx swc -d dist ./cli npx swc -d dist ./features"
},
"repository": {
"type": "git",
Expand Down Expand Up @@ -92,6 +92,7 @@
"nock": "13.3.0",
"octokit-auth-netrc": "2.1.0",
"tsx": "3.12.5",
"typescript": "5.0.2",
"yazl": "2.5.1"
},
"lint-staged": {
Expand Down
6 changes: 3 additions & 3 deletions pgps/deviceRequestHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import {
} from '@aws-sdk/client-iot-data-plane'
import { SFNClient, StartExecutionCommand } from '@aws-sdk/client-sfn'
import {
SendMessageBatchCommand,
SendMessageBatchRequestEntry,
SQSClient,
SendMessageBatchCommand,
type SendMessageBatchRequestEntry,
} from '@aws-sdk/client-sqs'
import type { Static } from '@sinclair/typebox'
import type { SQSEvent, SQSMessageAttributes } from 'aws-lambda'
Expand All @@ -21,7 +21,7 @@ import {
defaultNumberOfPredictions,
defaultTimeOfDay,
} from './cacheKey.js'
import { getCache, PGPSDataCache } from './getCache.js'
import { getCache, type PGPSDataCache } from './getCache.js'
import { gpsDay } from './gpsTime.js'
import type { pgpsRequestSchema } from './types.js'

Expand Down
2 changes: 1 addition & 1 deletion pgps/getCache.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { DynamoDBClient, GetItemCommand } from '@aws-sdk/client-dynamodb'
import { unmarshall } from '@aws-sdk/util-dynamodb'
import type { Static } from '@sinclair/typebox'
import { URL } from 'url'
import { ErrorInfo, ErrorType } from '../api/ErrorInfo.js'
import { ErrorType, type ErrorInfo } from '../api/ErrorInfo.js'
import type { pgpsRequestSchema } from './types.js'

export type PGPSDataCache = Static<typeof pgpsRequestSchema> & {
Expand Down
4 changes: 2 additions & 2 deletions third-party/nrfcloud.com/agps.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { SSMClient } from '@aws-sdk/client-ssm'
import { validateWithType } from '@nordicsemiconductor/asset-tracker-cloud-docs/protocol'
import { verify } from '@nordicsemiconductor/nrfcloud-location-services-tests'
import { Static, Type } from '@sinclair/typebox'
import { Type, type Static } from '@sinclair/typebox'
import { URL } from 'url'
import { agpsRequestSchema, AGPSType } from '../../agps/types.js'
import { AGPSType, agpsRequestSchema } from '../../agps/types.js'
import type { ErrorInfo } from '../../api/ErrorInfo.js'
import { fromEnv } from '../../util/fromEnv.js'
import { apiClient } from './apiclient.js'
Expand Down
4 changes: 2 additions & 2 deletions third-party/nrfcloud.com/apiclient.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import type { Static, TObject, TProperties } from '@sinclair/typebox'
import Ajv from 'ajv'
import type { IncomingHttpHeaders, OutgoingHttpHeaders } from 'http'
import { request as nodeRequest, RequestOptions } from 'https'
import { request as nodeRequest, type RequestOptions } from 'https'
import type { URL } from 'url'
import { ErrorInfo, ErrorType } from '../../api/ErrorInfo.js'
import { ErrorType, type ErrorInfo } from '../../api/ErrorInfo.js'
import { createToken } from './createToken.js'

const ajv = new Ajv()
Expand Down
7 changes: 6 additions & 1 deletion third-party/nrfcloud.com/networksurveygeolocation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,12 @@ import {
validateWithType,
WiFiSiteSurvey,
} from '@nordicsemiconductor/asset-tracker-cloud-docs/protocol'
import { Static, TObject, TProperties, Type } from '@sinclair/typebox'
import {
Type,
type Static,
type TObject,
type TProperties,
} from '@sinclair/typebox'
import { URL } from 'url'
import type { MaybeLocation } from '../../geolocation/types.js'
import { expandMac } from '../../networkSurveyGeolocation/expandMac.js'
Expand Down
2 changes: 1 addition & 1 deletion third-party/nrfcloud.com/pgps.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { SSMClient } from '@aws-sdk/client-ssm'
import { validateWithType } from '@nordicsemiconductor/asset-tracker-cloud-docs/protocol'
import { Static, Type } from '@sinclair/typebox'
import { Type, type Static } from '@sinclair/typebox'
import { URL } from 'url'
import {
defaultInterval,
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"noUncheckedIndexedAccess": true,
"noUnusedLocals": true,
"noEmit": true,
"importsNotUsedAsValues": "error",
"verbatimModuleSyntax": true,
"skipLibCheck": true
}
}
2 changes: 1 addition & 1 deletion util/settings.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import {
DeleteParameterCommand,
GetParametersByPathCommand,
Parameter,
PutParameterCommand,
SSMClient,
type Parameter,
} from '@aws-sdk/client-ssm'
import { paginate } from './paginate.js'

Expand Down

0 comments on commit 5f74c27

Please sign in to comment.