open-index/open-npm huggingface dataset:
npm package: @nhaancs/configuration
Description: Example Usage:
Latest version: 0.0.4

# configuration

Example Usage:

```typescript
imports: [
    // For root is important because you will want
    // the ConfigurationContext will be provided to 
    /// the root level of DI system
    ConfigurationModule.forRoot({ config: environment.appConfig }),
],
```

## Notes on tsconfig.json

```
...
"angularCompilerOptions": {
  // publishable library cannot build with ivy
  "enableIvy": false
},
...
```

This library was generated with [Nx](https://nx.dev).

## Running unit tests

Run `nx test configuration` to execute the unit tests.
npm package: @nhaancs/error-handling
Description: This module is for automatically handling errors in application, it override the default behaviors of the ErrorHandler provided by Angular.
Latest version: 0.0.5

# error-handling

This module is for automatically handling errors in application, it override the default behaviors of the ErrorHandler provided by Angular.

## Example Usage

You only need to import this module to your app and replace the default error handler with ErrorHandlingService. Our new service will automatically handle when new error occurs.

```typescript
@NgModule({
    ...
    imports: [
        ...
        ErrorHandlingModule,
    ],
    providers: [
        ...
        {
            // replace default error handler with ErrorHandlingService
            provide: ErrorHandler,
            useClass: ErrorHandlingService,
            deps: [ConfigurationService, LoggingService],
        },
    ]
})

```

## Notes on tsconfig.json

```
...
"angularCompilerOptions": {
  // publishable library cannot build with ivy
  "enableIvy": false
},
...
```

This library was generated with [Nx](https://nx.dev).

## Running unit tests

Run `nx test error-handling` to execute the unit tests.
npm package: @nhaancs/http-service
Description: This is a wrapper of HTTP Client service, responsible for http error handling in the sam place and provide the same interface for making http requests.
Latest version: 0.0.2

# http-service

This is a wrapper of HTTP Client service, responsible for http error handling in the sam place and provide the same interface for making http requests.

## Example usage

We only need to inject the http service and its dependency (HttpClient)

```typescript
...
constructor(
    ...
    @Inject(HttpClient) public http: HttpClient,
    @Inject(HttpService) public httpService: HttpService,
) {
    ...
}
...

const requestUrl = this.baseUrl.concat('courses/latest');
const options = this.httpService.createOptions(
    HttpRequestMethod.get, 
    this.httpService.createHeader(), 
    requestUrl, 
    null, 
    this.noCredentials
);
this.httpService.execute<T>(options);
``

This library was generated with [Nx](https://nx.dev).

## Running unit tests

Run `nx test http-service` to execute the unit tests.
npm package: @nhaancs/logging
Description: This module handles logging activities. You can choose to write logs to console or send them to the 3rd parties.
Latest version: 0.0.4

# logging

This module handles logging activities. You can choose to write logs to console or send them to the 3rd parties.

## ILogEntry interface

```typescript
// Each message logged is a object sastified ILogEntry interface
export interface ILogEntry {
  source: string;
  application: string;
  severity: Severity;
  message: string;
  timestamp: Date;
  tags?: string[];
}
```


## Log service

```typescript
@Injectable()
export class LoggingService {
  // implementation hidden
  /*
  - Use this class to add new messages.
  - Log writer will be responsible to output these 
  messages.
  */
}
```

## Log writer

```typescript
/**
 * The factory function to initialize the logging service and writer for the
 * application.
 */
export function initializeLogWriter(consoleWriter: ConsoleWriter) {
  return () => {
    return consoleWriter;
  };
}

...

@NgModule({
    ...
    providers: [
        ...
        {
            provide: APP_INITIALIZER,
            useFactory: initializeLogWriter,
            deps: [LoggingService, ConsoleWriter, LogglyWriter],
            multi: true,
        },
    ]
})
```

After register a log writer, it will automatically listen to log service for new messages. We do not need to do any thing else.

## Notes on tsconfig.json

```
...
"angularCompilerOptions": {
  // publishable library cannot build with ivy
  "enableIvy": false,
  // 3 params below is for https://github.com/angular/angular/issues/23609#issuecomment-386876693
  "skipTemplateCodegen": true,
  "strictMetadataEmit": true,
  "fullTemplateTypeCheck": true
},
...
```

This library was generated with [Nx](https://nx.dev).

## Running unit tests

Run `nx test logging` to execute the unit tests.