File tree 17 files changed +62
-28
lines changed
17 files changed +62
-28
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
8
8
## [ Unreleased]
9
9
10
+ ## [ 1.2.2] - 2023-10-30
11
+
12
+ ### Fixed
13
+ - Fix null values propagating through the code ([ #11 ] ( https://github.com/TzviPM/laravel-deploy/pull/11 ) ).
14
+ - Use stricter settings in TS Config ([ #11 ] ( https://github.com/TzviPM/laravel-deploy/pull/11 ) ).
15
+
10
16
## [ 1.2.1] - 2023-10-30
11
17
12
18
### Fixed
@@ -52,8 +58,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
52
58
53
59
This was the initial release of ` laravel-deploy ` .
54
60
55
- [ unreleased ] : https://github.com/TzviPM/laravel-deploy/compare/v1.2.0...HEAD
56
- [ 1.1.0 ] : https://github.com/TzviPM/laravel-deploy/compare/v1.1.0...v1.2.0
61
+ [ unreleased ] : https://github.com/TzviPM/laravel-deploy/compare/v1.2.2...HEAD
62
+ [ 1.2.2 ] : https://github.com/TzviPM/laravel-deploy/compare/v1.2.1...v1.2.2
63
+ [ 1.2.1 ] : https://github.com/TzviPM/laravel-deploy/compare/v1.2.0...v1.2.1
64
+ [ 1.2.0 ] : https://github.com/TzviPM/laravel-deploy/compare/v1.1.0...v1.2.0
57
65
[ 1.1.0 ] : https://github.com/TzviPM/laravel-deploy/compare/v1.0.4...v1.1.0
58
66
[ 1.0.4 ] : https://github.com/TzviPM/laravel-deploy/compare/v1.0.3...v1.0.4
59
67
[ 1.0.3 ] : https://github.com/TzviPM/laravel-deploy/compare/v1.0.2...v1.0.3
Load Diff Large diffs are not rendered by default.
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " laravel-deploy" ,
3
- "version" : " 1.2.1 " ,
3
+ "version" : " 1.2.2 " ,
4
4
"description" : " A GitHub Action to create on-demand preview environments for Laravel apps." ,
5
5
"author" : " Tzvi Melamed (TzviPM)" ,
6
6
"private" : true ,
52
52
"@types/jest" : " ^29.5.2" ,
53
53
"@types/node" : " ^20.3.1" ,
54
54
"@types/supertest" : " ^2.0.12" ,
55
+ "@types/uuid" : " ^9.0.6" ,
55
56
"@typescript-eslint/eslint-plugin" : " ^6.0.0" ,
56
57
"@typescript-eslint/parser" : " ^6.0.0" ,
57
58
"@vercel/ncc" : " ^0.38.1" ,
Original file line number Diff line number Diff line change @@ -134,7 +134,7 @@ export class DeploymentService {
134
134
}
135
135
this . logger . log ( `Checking for SSL Certificate on forge` ) ;
136
136
const certs = await site . listCerts ( ) ;
137
- let cert = certs . find ( ( cert ) => cert . domain === site . name ) ;
137
+ let cert = certs . find ( ( cert ) => cert . domain === site ! . name ) ;
138
138
if ( cert != null ) {
139
139
this . logger . log ( 'cert exists' ) ;
140
140
} else {
@@ -299,7 +299,7 @@ function dbBranchName(
299
299
branchMappings : Map < string , string > ,
300
300
) : string {
301
301
if ( branchMappings . has ( branchName ) ) {
302
- return branchMappings . get ( branchName ) ;
302
+ return branchMappings . get ( branchName ) ! ;
303
303
}
304
304
return kebabCase ( branchName ) ;
305
305
}
Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ export class PreviewConfigService {
28
28
} catch ( e : unknown ) {
29
29
const error = e as Error ;
30
30
this . logger . error ( `Invalid \`servers\` input. ${ error . message } ` ) ;
31
+ throw e ;
31
32
}
32
33
} ) ;
33
34
}
Original file line number Diff line number Diff line change @@ -24,6 +24,7 @@ export class Backup {
24
24
) {
25
25
this . id = data . id ;
26
26
this . name = data . name ;
27
+ this . state = data . state ;
27
28
}
28
29
29
30
private async refetch ( ) {
Original file line number Diff line number Diff line change @@ -12,8 +12,8 @@ export const credentialsSchema = z.object({
12
12
export class Credentials {
13
13
public id : string ;
14
14
public name : string ;
15
- public username : string ;
16
- public password : string ;
15
+ public username ? : string | null ;
16
+ public password ? : string | null ;
17
17
18
18
public get path ( ) {
19
19
return `${ this . branch . path } /passwords/${ this . id } ` ;
Original file line number Diff line number Diff line change @@ -48,8 +48,8 @@ export abstract class ErrorHandler {
48
48
delete error . request . socket ;
49
49
delete error . request . agent ;
50
50
delete error . request . res ;
51
- delete error . response . config ;
52
- delete error . response . request ;
51
+ delete ( error . response as any ) ? .config ;
52
+ delete error . response ? .request ;
53
53
this . sanitize ( error ) ;
54
54
}
55
55
if ( error instanceof ZodError ) {
Original file line number Diff line number Diff line change @@ -17,9 +17,10 @@ export class EnvActionsService implements ActionsService {
17
17
*/
18
18
public getInput ( name : string , options ?: InputOptions ) : string {
19
19
const envVariableName = this . constantCase ( name ) ;
20
- return this . configService
21
- . getOrThrow < string > ( envVariableName , options ?. required ? undefined : '' )
22
- . trim ( ) ;
20
+ if ( options ?. required ) {
21
+ return this . configService . getOrThrow < string > ( envVariableName ) . trim ( ) ;
22
+ }
23
+ return this . configService . getOrThrow < string > ( envVariableName , '' ) . trim ( ) ;
23
24
}
24
25
25
26
/**
Original file line number Diff line number Diff line change 1
1
import { Test , TestingModule } from '@nestjs/testing' ;
2
2
import { CommentsService } from './comments.service' ;
3
+ import { LoggerCommentsService } from './logger_comments.service' ;
3
4
4
5
describe ( 'CommentsService' , ( ) => {
5
6
let service : CommentsService ;
6
7
7
8
beforeEach ( async ( ) => {
8
9
const module : TestingModule = await Test . createTestingModule ( {
9
- providers : [ CommentsService ] ,
10
+ providers : [
11
+ {
12
+ provide : CommentsService ,
13
+ useClass : LoggerCommentsService ,
14
+ } ,
15
+ ] ,
10
16
} ) . compile ( ) ;
11
17
12
18
service = module . get < CommentsService > ( CommentsService ) ;
Original file line number Diff line number Diff line change 1
1
import { Test , TestingModule } from '@nestjs/testing' ;
2
2
import { ContextService } from './context.service' ;
3
+ import { EnvContextService } from './env_context_service' ;
3
4
4
5
describe ( 'ContextService' , ( ) => {
5
6
let service : ContextService ;
6
7
7
8
beforeEach ( async ( ) => {
8
9
const module : TestingModule = await Test . createTestingModule ( {
9
- providers : [ ContextService ] ,
10
+ providers : [
11
+ {
12
+ provide : ContextService ,
13
+ useClass : EnvContextService ,
14
+ } ,
15
+ ] ,
10
16
} ) . compile ( ) ;
11
17
12
18
service = module . get < ContextService > ( ContextService ) ;
Original file line number Diff line number Diff line change @@ -38,12 +38,12 @@ export abstract class Logger extends ConsoleLogger implements LoggerService {
38
38
39
39
protected parseArgs ( ...args : unknown [ ] ) {
40
40
if ( args . length <= 1 ) {
41
- return { messages : args , context : this . context } ;
41
+ return { messages : args , context : this . context ?? Logger . name } ;
42
42
}
43
43
const lastElement = args [ args . length - 1 ] ;
44
44
const isContext = typeof lastElement === 'string' ;
45
45
if ( ! isContext ) {
46
- return { messages : args , context : this . context } ;
46
+ return { messages : args , context : this . context ?? Logger . name } ;
47
47
}
48
48
return {
49
49
context : lastElement ,
Original file line number Diff line number Diff line change @@ -22,7 +22,9 @@ export class TSLogger extends Logger {
22
22
const oldName = this . logger . settings . name ;
23
23
this . setContext ( name ) ;
24
24
fn ( ) ;
25
- this . setContext ( oldName ) ;
25
+ if ( oldName ) {
26
+ this . setContext ( oldName ) ;
27
+ }
26
28
}
27
29
28
30
printLog ( context : string , ...messages : unknown [ ] ) : void {
Original file line number Diff line number Diff line change @@ -17,8 +17,8 @@ async function bootstrap() {
17
17
try {
18
18
await CommandFactory . runApplication ( app ) ;
19
19
await app . close ( ) ;
20
- } catch ( e ) {
21
- await errorHandler . handle ( e ) ;
20
+ } catch ( e : unknown ) {
21
+ await errorHandler . handle ( e as Error ) ;
22
22
}
23
23
}
24
24
bootstrap ( ) ;
Original file line number Diff line number Diff line change 1
1
import { Test , TestingModule } from '@nestjs/testing' ;
2
2
import { INestApplication } from '@nestjs/common' ;
3
- import * as request from 'supertest' ;
3
+ import request from 'supertest' ;
4
4
import { AppModule } from './../src/app.module' ;
5
5
6
6
describe ( 'AppController (e2e)' , ( ) => {
Original file line number Diff line number Diff line change 13
13
"baseUrl" : " ./" ,
14
14
"incremental" : true ,
15
15
"skipLibCheck" : true ,
16
- "strictNullChecks" : false ,
17
- "noImplicitAny" : false ,
18
- "strictBindCallApply" : false ,
19
- "forceConsistentCasingInFileNames" : false ,
20
- "noFallthroughCasesInSwitch" : false
16
+ "strictNullChecks" : true ,
17
+ "noImplicitAny" : true ,
18
+ "strictBindCallApply" : true ,
19
+ "forceConsistentCasingInFileNames" : true ,
20
+ "noFallthroughCasesInSwitch" : true ,
21
+ "strict" : true
21
22
}
22
23
}
You can’t perform that action at this time.
0 commit comments