File tree Expand file tree Collapse file tree 9 files changed +181
-94
lines changed
modules/runner-binaries-syncer/lambdas/runner-binaries-syncer Expand file tree Collapse file tree 9 files changed +181
-94
lines changed Original file line number Diff line number Diff line change 3
3
"singleQuote": true,
4
4
"trailingComma": "all",
5
5
"semi": true,
6
- }
7
-
6
+ "importOrderSeparation": true,
7
+ "importOrderSortSpecifiers": true,
8
+ "importOrder": [
9
+ "<THIRD_PARTY_MODULES>",
10
+ "^[./]"
11
+ ]
12
+ }
Original file line number Diff line number Diff line change 16
16
},
17
17
"devDependencies" : {
18
18
"@octokit/rest" : " ^18.12.0" ,
19
+ "@trivago/prettier-plugin-sort-imports" : " ^3.1.1" ,
19
20
"@types/jest" : " ^27.4.0" ,
20
21
"@types/node" : " ^17.0.8" ,
21
22
"@types/request" : " ^2.48.8" ,
36
37
"axios" : " ^0.24.0" ,
37
38
"tslog" : " ^3.3.1"
38
39
}
39
- }
40
+ }
Original file line number Diff line number Diff line change 1
- import { sync } from './syncer/syncer' ;
2
- import { handler } from './lambda' ;
3
1
import { mocked } from 'jest-mock' ;
4
2
3
+ import { handler } from './lambda' ;
4
+ import { sync } from './syncer/syncer' ;
5
+
5
6
jest . mock ( './syncer/syncer' ) ;
6
7
7
8
describe ( 'Test download sync wrapper.' , ( ) => {
Original file line number Diff line number Diff line change 1
- import { sync } from './syncer/syncer' ;
2
1
import { logger } from './syncer/logger' ;
2
+ import { sync } from './syncer/syncer' ;
3
3
4
4
// eslint-disable-next-line
5
5
export async function handler ( event : any , context : any ) : Promise < void > {
Original file line number Diff line number Diff line change 1
- import { sync } from './syncer/syncer' ;
2
1
import { logger } from './syncer/logger' ;
2
+ import { sync } from './syncer/syncer' ;
3
3
4
4
sync ( )
5
5
. then ( )
Original file line number Diff line number Diff line change 1
- import { LogType , LogLevel } from './logger' ;
1
+ import { LogLevel , LogType } from './logger' ;
2
2
3
3
declare namespace NodeJS {
4
4
export interface ProcessEnv {
Original file line number Diff line number Diff line change 1
- import { sync } from './syncer' ;
2
- import listReleases from '../../test/resources/github-list-releases.json' ;
3
- import listReleasesEmpty from '../../test/resources/github-list-releases-empty-assets.json' ;
4
- import listReleasesNoLinux from '../../test/resources/github-list-releases-no-linux.json' ;
5
- import listReleasesNoArm64 from '../../test/resources/github-list-releases-no-arm64.json' ;
6
1
import { S3 } from 'aws-sdk' ;
7
2
import axios from 'axios' ;
8
3
import { request } from 'http' ;
9
4
import { EventEmitter , PassThrough , Readable } from 'stream' ;
10
5
6
+ import listReleasesEmpty from '../../test/resources/github-list-releases-empty-assets.json' ;
7
+ import listReleasesNoArm64 from '../../test/resources/github-list-releases-no-arm64.json' ;
8
+ import listReleasesNoLinux from '../../test/resources/github-list-releases-no-linux.json' ;
9
+ import listReleases from '../../test/resources/github-list-releases.json' ;
10
+ import { sync } from './syncer' ;
11
+
11
12
const mockOctokit = {
12
13
repos : {
13
14
listReleases : jest . fn ( ) ,
Original file line number Diff line number Diff line change 1
1
import { Octokit } from '@octokit/rest' ;
2
- import { PassThrough } from 'stream' ;
3
2
import { S3 } from 'aws-sdk' ;
4
3
import AWS from 'aws-sdk' ;
5
4
import axios from 'axios' ;
5
+ import { PassThrough } from 'stream' ;
6
+
6
7
import { logger as rootLogger } from './logger' ;
7
8
8
9
const logger = rootLogger . getChildLogger ( ) ;
You can’t perform that action at this time.
0 commit comments