File tree Expand file tree Collapse file tree 13 files changed +4872
-5720
lines changed
json-rpc/nestjs-json-rpc-sdk Expand file tree Collapse file tree 13 files changed +4872
-5720
lines changed Original file line number Diff line number Diff line change 1- DB_HOST = localhost
1+ DB_HOST = 192.168.2.243
22DB_LOGGING = 1
33
44DB_USERNAME = " postgres"
Original file line number Diff line number Diff line change 3333 "jest" : true
3434 },
3535 "rules" : {}
36+ },
37+ {
38+ "files" : [" *.ts" ],
39+ "rules" : {
40+ "@angular-eslint/prefer-standalone" : " off"
41+ }
3642 }
3743 ],
3844 "extends" : [" ./.eslintrc.base.json" ]
Original file line number Diff line number Diff line change 2424 "prefix" : " nestjs-json-api" ,
2525 "style" : " kebab-case"
2626 }
27- ]
27+ ],
28+ "@angular-eslint/prefer-standalone" : " off"
2829 }
2930 },
3031 {
Original file line number Diff line number Diff line change @@ -16,11 +16,11 @@ type RpcMap = {
1616} ;
1717
1818@Component ( {
19- standalone : true ,
2019 imports : [ NxWelcomeComponent ] ,
2120 selector : 'nestjs-json-api-root' ,
2221 templateUrl : './app.component.html' ,
2322 styleUrl : './app.component.css' ,
23+ standalone : true ,
2424} )
2525export class AppComponent implements OnInit {
2626 private JsonApiSdkService = inject ( JsonApiSdkService ) ;
Original file line number Diff line number Diff line change 1+ import { ApplicationConfig , InjectionToken } from '@angular/core' ;
2+ import { provideJsonApi } from 'json-api-nestjs-sdk/ngModule' ;
13import {
2- ApplicationConfig ,
3- importProvidersFrom ,
4- InjectionToken ,
5- } from '@angular/core' ;
6- import { JsonApiAngular , provideJsonApi } from 'json-api-nestjs-sdk/ngModule' ;
7- import {
8- JsonRpcAngular ,
94 JsonRpcAngularConfig ,
105 TransportType ,
116 provideJsonRpc ,
127} from '@klerick/nestjs-json-rpc-sdk/ngModule' ;
138import { Subject } from 'rxjs' ;
149import { webSocket } from 'rxjs/webSocket' ;
1510import { io } from 'socket.io-client' ;
16- import { provideHttpClient , withInterceptors } from '@angular/common/http' ;
11+ import { provideHttpClient , withFetch } from '@angular/common/http' ;
1712
1813const destroySubject = new Subject < boolean > ( ) ;
1914setTimeout ( ( ) => {
@@ -60,21 +55,18 @@ const ioConfig: JsonRpcAngularConfig = {
6055
6156export const appConfig : ApplicationConfig = {
6257 providers : [
63- importProvidersFrom (
64- JsonApiAngular . forRoot ( {
65- apiHost : 'http://localhost:4200' ,
66- idKey : 'id' ,
67- apiPrefix : 'api' ,
68- operationUrl : 'operation' ,
69- } )
70- ) ,
71- importProvidersFrom (
72- JsonRpcAngular . forRoot (
73- // httpConfig
74- // wsConfig
75- // wsConfigWithToken,
76- ioConfig
77- )
58+ provideHttpClient ( withFetch ( ) ) ,
59+ provideJsonApi ( {
60+ apiHost : 'http://localhost:4200' ,
61+ idKey : 'id' ,
62+ apiPrefix : 'api' ,
63+ operationUrl : 'operation' ,
64+ } ) ,
65+ provideJsonRpc (
66+ // httpConfig
67+ // wsConfig
68+ // wsConfigWithToken,
69+ ioConfig
7870 ) ,
7971 ] ,
8072} ;
Original file line number Diff line number Diff line change @@ -3,8 +3,8 @@ import { CommonModule } from '@angular/common';
33
44@Component ( {
55 selector : 'nestjs-json-api-nx-welcome' ,
6- standalone : true ,
76 imports : [ CommonModule ] ,
7+ standalone : true ,
88 template : `
99 <!--
1010 * * * * * * * * * * * * * * * * * * * * * * * * * * * *
Original file line number Diff line number Diff line change 1- import { getJestProjects } from '@nx/jest' ;
1+ import { getJestProjectsAsync } from '@nx/jest' ;
22
3- export default {
4- projects : getJestProjects ( )
5- } ;
3+ export default async ( ) => ( {
4+ projects : await getJestProjectsAsync ( )
5+ } ) ;
Original file line number Diff line number Diff line change 2020 "rules" : {
2121 "@nx/dependency-checks" : " error"
2222 }
23+ },
24+ {
25+ "files" : [" *.ts" ],
26+ "rules" : {
27+ "@angular-eslint/prefer-standalone" : " off"
28+ }
2329 }
2430 ]
2531}
Original file line number Diff line number Diff line change 44 "sourceRoot" : " libs/json-api/json-api-nestjs/src" ,
55 "projectType" : " library" ,
66 "targets" : {
7- "build" : {
7+ "build-ts " : {
88 "executor" : " @nx/js:tsc" ,
99 "outputs" : [" {options.outputPath}" ],
1010 "options" : {
1818 "generateExportsField" : true
1919 }
2020 },
21+ "build" : {
22+ "executor" : " nx:run-commands" ,
23+ "dependsOn" : [
24+ " build-ts"
25+ ],
26+ "options" : {
27+ "commands" : [" rm -rf dist/libs/json-api/json-api-nestjs/libs" ],
28+ "cwd" : " ./" ,
29+ "parallel" : false
30+ }
31+ },
2132 "publish" : {
2233 "command" : " node tools/scripts/publish.mjs json-api-nestjs {args.ver} {args.tag}" ,
2334 "dependsOn" : [" build" ]
Original file line number Diff line number Diff line change 2020 "rules" : {
2121 "@nx/dependency-checks" : " error"
2222 }
23+ },
24+ {
25+ "files" : [" *.ts" ],
26+ "rules" : {
27+ "@angular-eslint/prefer-standalone" : " off"
28+ }
2329 }
2430 ]
2531}
You can’t perform that action at this time.
0 commit comments