Compare commits
49 Commits
Author | SHA1 | Date | |
---|---|---|---|
249c9bf155 | |||
2dd7d42a5a | |||
82468b75a9 | |||
9313de5c82 | |||
6a644225d9 | |||
d5a9e1ce69 | |||
57433e2b4a | |||
48dd9e377f | |||
e82bf28689 | |||
e7993c4683 | |||
165606da8d | |||
e656ac6e82 | |||
912051f255 | |||
d4442ecddc | |||
af52293c73 | |||
367cb5d2ba | |||
2b3f5b5ce5 | |||
c17ff2dd8b | |||
82b859e4c7 | |||
0c79a521be | |||
164fe4a33c | |||
c0d3e507f7 | |||
429aacb20e | |||
9a299a6b2e | |||
d5ffd321d5 | |||
4a67657b10 | |||
b046558225 | |||
f1b4211ce0 | |||
97538b2a40 | |||
8d2a4bff17 | |||
00ebafb94a | |||
3c7b5215da | |||
685cd7a723 | |||
35075a67f5 | |||
0b6f676ec7 | |||
55e3f0370e | |||
bb5ac420c6 | |||
ceb5982bd7 | |||
0ed70f3698 | |||
dd50320b28 | |||
ef766d96fa | |||
b1623dd9ef | |||
48b3eebd84 | |||
a6efeb9a6f | |||
c190f07449 | |||
1e40ec8432 | |||
cbf442f984 | |||
93ad0576e4 | |||
4005665d87 |
4
.gitignore
vendored
4
.gitignore
vendored
@ -15,8 +15,6 @@ node_modules/
|
||||
|
||||
# builds
|
||||
dist/
|
||||
dist_web/
|
||||
dist_serve/
|
||||
dist_ts_web/
|
||||
dist_*/
|
||||
|
||||
# custom
|
118
.gitlab-ci.yml
118
.gitlab-ci.yml
@ -1,118 +0,0 @@
|
||||
# gitzone ci_default
|
||||
image: registry.gitlab.com/hosttoday/ht-docker-node:npmci
|
||||
|
||||
cache:
|
||||
paths:
|
||||
- .npmci_cache/
|
||||
key: "$CI_BUILD_STAGE"
|
||||
|
||||
stages:
|
||||
- security
|
||||
- test
|
||||
- release
|
||||
- metadata
|
||||
|
||||
# ====================
|
||||
# security stage
|
||||
# ====================
|
||||
mirror:
|
||||
stage: security
|
||||
script:
|
||||
- npmci git mirror
|
||||
tags:
|
||||
- docker
|
||||
- notpriv
|
||||
|
||||
snyk:
|
||||
stage: security
|
||||
script:
|
||||
- npmci npm prepare
|
||||
- npmci command npm install -g snyk
|
||||
- npmci command npm install --ignore-scripts
|
||||
- npmci command snyk test
|
||||
tags:
|
||||
- docker
|
||||
- notpriv
|
||||
|
||||
# ====================
|
||||
# test stage
|
||||
# ====================
|
||||
|
||||
testStable:
|
||||
stage: test
|
||||
script:
|
||||
- npmci npm prepare
|
||||
- npmci node install stable
|
||||
- npmci npm install
|
||||
- npmci npm test
|
||||
coverage: /\d+.?\d+?\%\s*coverage/
|
||||
tags:
|
||||
- docker
|
||||
- priv
|
||||
|
||||
testBuild:
|
||||
stage: test
|
||||
script:
|
||||
- npmci npm prepare
|
||||
- npmci node install stable
|
||||
- npmci npm install
|
||||
- npmci command npm run build
|
||||
coverage: /\d+.?\d+?\%\s*coverage/
|
||||
tags:
|
||||
- docker
|
||||
- notpriv
|
||||
|
||||
release:
|
||||
stage: release
|
||||
script:
|
||||
- npmci node install stable
|
||||
- npmci npm publish
|
||||
only:
|
||||
- tags
|
||||
tags:
|
||||
- docker
|
||||
- notpriv
|
||||
|
||||
# ====================
|
||||
# metadata stage
|
||||
# ====================
|
||||
codequality:
|
||||
stage: metadata
|
||||
allow_failure: true
|
||||
script:
|
||||
- npmci command npm install -g tslint typescript
|
||||
- npmci npm prepare
|
||||
- npmci npm install
|
||||
- npmci command "tslint -c tslint.json ./ts/**/*.ts"
|
||||
tags:
|
||||
- docker
|
||||
- priv
|
||||
|
||||
trigger:
|
||||
stage: metadata
|
||||
script:
|
||||
- npmci trigger
|
||||
only:
|
||||
- tags
|
||||
tags:
|
||||
- docker
|
||||
- notpriv
|
||||
|
||||
pages:
|
||||
stage: metadata
|
||||
script:
|
||||
- npmci node install lts
|
||||
- npmci command npm install -g @gitzone/tsdoc
|
||||
- npmci npm prepare
|
||||
- npmci npm install
|
||||
- npmci command tsdoc
|
||||
tags:
|
||||
- docker
|
||||
- notpriv
|
||||
only:
|
||||
- tags
|
||||
artifacts:
|
||||
expire_in: 1 week
|
||||
paths:
|
||||
- public
|
||||
allow_failure: true
|
4
.snyk
4
.snyk
@ -1,4 +0,0 @@
|
||||
# Snyk (https://snyk.io) policy file, patches or ignores known vulnerabilities.
|
||||
version: v1.12.0
|
||||
ignore: {}
|
||||
patch: {}
|
11
.vscode/launch.json
vendored
Normal file
11
.vscode/launch.json
vendored
Normal file
@ -0,0 +1,11 @@
|
||||
{
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
"command": "npm test",
|
||||
"name": "Run npm test",
|
||||
"request": "launch",
|
||||
"type": "node-terminal"
|
||||
}
|
||||
]
|
||||
}
|
26
.vscode/settings.json
vendored
Normal file
26
.vscode/settings.json
vendored
Normal file
@ -0,0 +1,26 @@
|
||||
{
|
||||
"json.schemas": [
|
||||
{
|
||||
"fileMatch": ["/npmextra.json"],
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"npmci": {
|
||||
"type": "object",
|
||||
"description": "settings for npmci"
|
||||
},
|
||||
"gitzone": {
|
||||
"type": "object",
|
||||
"description": "settings for gitzone",
|
||||
"properties": {
|
||||
"projectType": {
|
||||
"type": "string",
|
||||
"enum": ["website", "element", "service", "npm", "wcc"]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
@ -4,13 +4,28 @@
|
||||
"npmAccessLevel": "public"
|
||||
},
|
||||
"gitzone": {
|
||||
"projectType": "npm",
|
||||
"module": {
|
||||
"githost": "gitlab.com",
|
||||
"gitscope": "pushrocks",
|
||||
"githost": "code.foss.global",
|
||||
"gitscope": "push.rocks",
|
||||
"gitrepo": "smartlog-interfaces",
|
||||
"shortDescription": "interfaces for the smartlog ecosystem",
|
||||
"npmPackagename": "@pushrocks/smartlog-interfaces",
|
||||
"license": "MIT"
|
||||
"description": "Defines interfaces for the smartlog ecosystem.",
|
||||
"npmPackagename": "@push.rocks/smartlog-interfaces",
|
||||
"license": "MIT",
|
||||
"keywords": [
|
||||
"logging",
|
||||
"interfaces",
|
||||
"typescript",
|
||||
"smartlog",
|
||||
"log management",
|
||||
"log interface",
|
||||
"ecosystem",
|
||||
"node.js",
|
||||
"typescript definitions"
|
||||
]
|
||||
}
|
||||
},
|
||||
"tsdoc": {
|
||||
"legal": "\n## License and Legal Information\n\nThis repository contains open-source code that is licensed under the MIT License. A copy of the MIT License can be found in the [license](license) file within this repository. \n\n**Please note:** The MIT License does not grant permission to use the trade names, trademarks, service marks, or product names of the project, except as required for reasonable and customary use in describing the origin of the work and reproducing the content of the NOTICE file.\n\n### Trademarks\n\nThis project is owned and maintained by Task Venture Capital GmbH. The names and logos associated with Task Venture Capital GmbH and any related products or services are trademarks of Task Venture Capital GmbH and are not included within the scope of the MIT license granted herein. Use of these trademarks must comply with Task Venture Capital GmbH's Trademark Guidelines, and any usage must be approved in writing by Task Venture Capital GmbH.\n\n### Company Information\n\nTask Venture Capital GmbH \nRegistered at District court Bremen HRB 35230 HB, Germany\n\nFor any legal inquiries or if you require further information, please contact us via email at hello@task.vc.\n\nBy using this repository, you acknowledge that you have read this section, agree to comply with its terms, and understand that the licensing of the code does not imply endorsement by Task Venture Capital GmbH of any derivative works.\n"
|
||||
}
|
||||
}
|
1687
package-lock.json
generated
1687
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
56
package.json
56
package.json
@ -1,38 +1,58 @@
|
||||
{
|
||||
"name": "@pushrocks/smartlog-interfaces",
|
||||
"version": "2.0.8",
|
||||
"name": "@push.rocks/smartlog-interfaces",
|
||||
"version": "3.0.2",
|
||||
"private": false,
|
||||
"description": "interfaces for the smartlog ecosystem",
|
||||
"main": "dist/index.js",
|
||||
"typings": "dist/index.d.ts",
|
||||
"description": "Defines interfaces for the smartlog ecosystem.",
|
||||
"main": "dist_ts/index.js",
|
||||
"typings": "dist_ts/index.d.ts",
|
||||
"author": "Lossless GmbH",
|
||||
"license": "MIT",
|
||||
"scripts": {
|
||||
"test": "tsrun test/test.ts",
|
||||
"build": "(tsbuild)",
|
||||
"format": "(gitzone format)"
|
||||
"test": "tstest test/",
|
||||
"build": "(tsbuild --web)",
|
||||
"buildDocs": "tsdoc"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@gitzone/tsbuild": "^2.1.17",
|
||||
"@gitzone/tsrun": "^1.2.8",
|
||||
"@gitzone/tstest": "^1.0.28",
|
||||
"@pushrocks/tapbundle": "^3.0.13",
|
||||
"@types/node": "^12.11.2",
|
||||
"tslint": "^5.20.0",
|
||||
"tslint-config-prettier": "^1.18.0"
|
||||
"@git.zone/tsbuild": "^2.1.66",
|
||||
"@git.zone/tsrun": "^1.2.44",
|
||||
"@git.zone/tstest": "^1.0.77",
|
||||
"@push.rocks/tapbundle": "^5.0.8",
|
||||
"@types/node": "^20.14.2"
|
||||
},
|
||||
"dependencies": {
|
||||
"@apiglobal/typedrequest-interfaces": "^1.0.7"
|
||||
"@api.global/typedrequest-interfaces": "^2.0.1",
|
||||
"@tsclass/tsclass": "^4.0.54"
|
||||
},
|
||||
"files": [
|
||||
"ts/**/*",
|
||||
"ts_web/**/*",
|
||||
"dist/**/*",
|
||||
"dist_web/**/*",
|
||||
"dist_*/**/*",
|
||||
"dist_ts/**/*",
|
||||
"dist_ts_web/**/*",
|
||||
"assets/**/*",
|
||||
"cli.js",
|
||||
"npmextra.json",
|
||||
"readme.md"
|
||||
]
|
||||
],
|
||||
"browserslist": [
|
||||
"last 1 chrome versions"
|
||||
],
|
||||
"type": "module",
|
||||
"keywords": [
|
||||
"logging",
|
||||
"interfaces",
|
||||
"typescript",
|
||||
"smartlog",
|
||||
"log management",
|
||||
"log interface",
|
||||
"ecosystem",
|
||||
"node.js",
|
||||
"typescript definitions"
|
||||
],
|
||||
"homepage": "https://code.foss.global/push.rocks/smartlog-interfaces",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://code.foss.global/push.rocks/smartlog-interfaces.git"
|
||||
}
|
||||
}
|
||||
|
6722
pnpm-lock.yaml
generated
Normal file
6722
pnpm-lock.yaml
generated
Normal file
File diff suppressed because it is too large
Load Diff
1
readme.hints.md
Normal file
1
readme.hints.md
Normal file
@ -0,0 +1 @@
|
||||
|
142
readme.md
142
readme.md
@ -1,35 +1,131 @@
|
||||
# @pushrocks/smartlog-interfaces
|
||||
# @push.rocks/smartlog-interfaces
|
||||
interfaces for the smartlog ecosystem
|
||||
|
||||
## Availabililty and Links
|
||||
* [npmjs.org (npm package)](https://www.npmjs.com/package/@pushrocks/smartlog-interfaces)
|
||||
* [gitlab.com (source)](https://gitlab.com/pushrocks/smartlog-interfaces)
|
||||
* [github.com (source mirror)](https://github.com/pushrocks/smartlog-interfaces)
|
||||
* [docs (typedoc)](https://pushrocks.gitlab.io/smartlog-interfaces/)
|
||||
## Install
|
||||
To install `@push.rocks/smartlog-interfaces`, ensure you have Node.js and npm installed. Then, run the following command in your project directory:
|
||||
|
||||
## Status for master
|
||||
[](https://gitlab.com/pushrocks/smartlog-interfaces/commits/master)
|
||||
[](https://gitlab.com/pushrocks/smartlog-interfaces/commits/master)
|
||||
[](https://www.npmjs.com/package/@pushrocks/smartlog-interfaces)
|
||||
[](https://snyk.io/test/npm/@pushrocks/smartlog-interfaces)
|
||||
[](https://nodejs.org/dist/latest-v10.x/docs/api/)
|
||||
[](https://nodejs.org/dist/latest-v10.x/docs/api/)
|
||||
[](https://prettier.io/)
|
||||
```sh
|
||||
npm install @push.rocks/smartlog-interfaces --save
|
||||
```
|
||||
|
||||
This command adds `@push.rocks/smartlog-interfaces` to your package's dependencies and downloads it into the `node_modules` folder.
|
||||
|
||||
## Usage
|
||||
|
||||
Use TypeScript for best in class instellisense.
|
||||
`@push.rocks/smartlog-interfaces` provides TypeScript interfaces for structuring log messages within the Smartlog ecosystem. These interfaces standardize how log data is structured and transmitted across different parts of a system, making it easier to collect, query, and analyze logs.
|
||||
|
||||
For further information read the linked docs at the top of this README.
|
||||
The Smartlog ecosystem is designed to support a versatile range of logging needs, from simple application logs to complex, structured data logging for microservices. To utilize these interfaces in your project, follow the steps below:
|
||||
|
||||
> licensed | **©** [Lossless GmbH](https://lossless.gmbh)
|
||||
> | By using this npm module you agree to our [privacy policy](https://lossless.gmbH/privacy.html)
|
||||
### Setting Up
|
||||
|
||||
[](https://push.rocks)
|
||||
First, ensure you're using TypeScript in your project. Install TypeScript if you haven't already:
|
||||
|
||||
For further information read the linked docs at the top of this readme.
|
||||
```sh
|
||||
npm install typescript --save-dev
|
||||
```
|
||||
|
||||
> MIT licensed | **©** [Lossless GmbH](https://lossless.gmbh)
|
||||
| By using this npm module you agree to our [privacy policy](https://lossless.gmbH/privacy)
|
||||
Then, import the necessary interfaces from the package in your logging module or any place you intend to produce logs:
|
||||
|
||||
[](https://maintainedby.lossless.com)
|
||||
```typescript
|
||||
import {
|
||||
ILogPackage,
|
||||
ILogDestination,
|
||||
TLogLevel,
|
||||
TLogType,
|
||||
ILogContext,
|
||||
TRuntime,
|
||||
TEnvironment,
|
||||
ILogCorrelation
|
||||
} from '@push.rocks/smartlog-interfaces';
|
||||
```
|
||||
|
||||
### Creating a Log Message
|
||||
|
||||
Here's how to create a log package conforming to the `ILogPackage` interface:
|
||||
|
||||
```typescript
|
||||
const myLogContext: ILogContext = {
|
||||
environment: 'production' as TEnvironment,
|
||||
runtime: 'node' as TRuntime,
|
||||
zone: 'eu-central-1'
|
||||
};
|
||||
|
||||
const myLogCorrelation: ILogCorrelation = {
|
||||
id: '123456789',
|
||||
type: 'service'
|
||||
};
|
||||
|
||||
const myLogPackage: ILogPackage = {
|
||||
timestamp: Date.now(),
|
||||
type: 'log' as TLogType,
|
||||
context: myLogContext,
|
||||
level: 'info' as TLogLevel,
|
||||
correlation: myLogCorrelation,
|
||||
message: 'This is a sample log message.',
|
||||
};
|
||||
```
|
||||
|
||||
In this example, `myLogPackage` encapsulates all the required data for a log message, including contextual data about where and when the log was generated.
|
||||
|
||||
### Implementing ILogDestination
|
||||
|
||||
`ILogDestination` is an interface that defines how log packages are handled. You can implement your own log destination (e.g., a cloud-based logging service, local log file writer) by conforming to this interface.
|
||||
|
||||
```typescript
|
||||
class MyLogService implements ILogDestination {
|
||||
async handleLog(logPackage: ILogPackage): Promise<void> {
|
||||
// Implement log handling logic here.
|
||||
// For demonstration, we'll simply log to the console.
|
||||
console.log(JSON.stringify(logPackage));
|
||||
}
|
||||
}
|
||||
|
||||
// Usage
|
||||
const myLogService = new MyLogService();
|
||||
await myLogService.handleLog(myLogPackage);
|
||||
```
|
||||
|
||||
This basic implementation of `ILogDestination` offers a foundational structure on which you can build more sophisticated log handling mechanisms, like batch processing, filtering, or routing based on log metadata.
|
||||
|
||||
### Extending Functionality
|
||||
|
||||
The interfaces provided by `@push.rocks/smartlog-interfaces` serve as a starting point. In a complex application or service, you might need to extend these interfaces with additional properties or create new interfaces that extend these base interfaces to include more specific log data relevant to your application.
|
||||
|
||||
#### Custom Log Data
|
||||
|
||||
For example, if your application needs to log request-specific information, you could extend `ILogPackage`:
|
||||
|
||||
```typescript
|
||||
interface ILogPackageWithRequestData extends ILogPackage<ILogPackageDataRequest> {
|
||||
// You can add more fields or override existing ones
|
||||
}
|
||||
|
||||
// Then, when creating a log package:
|
||||
const myLogPackageWithRequestData: ILogPackageWithRequestData = {
|
||||
// Include all required fields from ILogPackage
|
||||
// And add your additional request-specific log data in the 'data' field
|
||||
};
|
||||
```
|
||||
|
||||
### Conclusion
|
||||
|
||||
`@push.rocks/smartlog-interfaces` provides the foundation for consistent and structured logging across your applications and services. By adhering to the interfaces defined in the package, you can ensure that your logs are standardized, making them easier to query, analyze, and understand. Whether you're developing a small application or a large, distributed system, these interfaces offer the flexibility and structure needed to implement robust logging practices.
|
||||
|
||||
## License and Legal Information
|
||||
|
||||
This repository contains open-source code that is licensed under the MIT License. A copy of the MIT License can be found in the [license](license) file within this repository.
|
||||
|
||||
**Please note:** The MIT License does not grant permission to use the trade names, trademarks, service marks, or product names of the project, except as required for reasonable and customary use in describing the origin of the work and reproducing the content of the NOTICE file.
|
||||
|
||||
### Trademarks
|
||||
|
||||
This project is owned and maintained by Task Venture Capital GmbH. The names and logos associated with Task Venture Capital GmbH and any related products or services are trademarks of Task Venture Capital GmbH and are not included within the scope of the MIT license granted herein. Use of these trademarks must comply with Task Venture Capital GmbH's Trademark Guidelines, and any usage must be approved in writing by Task Venture Capital GmbH.
|
||||
|
||||
### Company Information
|
||||
|
||||
Task Venture Capital GmbH
|
||||
Registered at District court Bremen HRB 35230 HB, Germany
|
||||
|
||||
For any legal inquiries or if you require further information, please contact us via email at hello@task.vc.
|
||||
|
||||
By using this repository, you acknowledge that you have read this section, agree to comply with its terms, and understand that the licensing of the code does not imply endorsement by Task Venture Capital GmbH of any derivative works.
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { expect, tap } from '@pushrocks/tapbundle';
|
||||
import * as commonlog from '../ts/index';
|
||||
import { expect, expectAsync, tap } from '@push.rocks/tapbundle';
|
||||
import * as commonlog from '../ts/index.js';
|
||||
|
||||
tap.test('first test', async () => {
|
||||
console.log('Since this is an interface package, there is nothing to test dynamically :)');
|
||||
|
8
ts/00_commitinfo_data.ts
Normal file
8
ts/00_commitinfo_data.ts
Normal file
@ -0,0 +1,8 @@
|
||||
/**
|
||||
* autocreated commitinfo by @pushrocks/commitinfo
|
||||
*/
|
||||
export const commitinfo = {
|
||||
name: '@push.rocks/smartlog-interfaces',
|
||||
version: '3.0.2',
|
||||
description: 'Defines interfaces for the smartlog ecosystem.'
|
||||
}
|
79
ts/index.ts
79
ts/index.ts
@ -1,4 +1,8 @@
|
||||
import * as plugins from './smartlog-interfaces.plugins';
|
||||
import * as plugins from './smartlog-interfaces.plugins.js';
|
||||
|
||||
import * as requestInterfaces from './smartlog-interfaces.requests.js';
|
||||
|
||||
export { requestInterfaces as request };
|
||||
|
||||
/**
|
||||
* the different available log types
|
||||
@ -35,24 +39,73 @@ export type TEnvironment = 'local' | 'test' | 'staging' | 'production';
|
||||
/**
|
||||
* the available runtimes
|
||||
*/
|
||||
export type TRuntime = 'node' | 'chrome' | 'rust';
|
||||
export type TRuntime = 'node' | 'chrome' | 'rust' | 'deno' | 'cloudflare_workers';
|
||||
|
||||
/**
|
||||
* the log context e.g. what app in what version on what server
|
||||
*/
|
||||
export interface ILogContext {
|
||||
commitinfo?: plugins.tsclass.code.ICommitInfo;
|
||||
company?: string;
|
||||
companyunit?: string;
|
||||
containerName?: string;
|
||||
environment: TEnvironment;
|
||||
runtime: TRuntime;
|
||||
zone: string;
|
||||
environment?: TEnvironment;
|
||||
runtime?: TRuntime;
|
||||
zone?: string;
|
||||
}
|
||||
|
||||
export interface ILogPackage {
|
||||
export interface ILogCorrelation {
|
||||
/**
|
||||
* a unique id for this log
|
||||
*/
|
||||
id: string;
|
||||
/**
|
||||
* the type of this log
|
||||
*/
|
||||
type: 'none' | 'service' | 'build' | 'infrastructure' | 'cdn';
|
||||
/**
|
||||
* the instance on which the log is created
|
||||
* use it for pinning logs to a certain instance in a cluster
|
||||
*/
|
||||
instance?: string;
|
||||
/**
|
||||
* a series of logs
|
||||
*/
|
||||
group?: string;
|
||||
/**
|
||||
* a log that belongs to a transaction. E.g. a Payment or a request traveling through multiple backend instances
|
||||
*/
|
||||
transaction?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* the main logpackage
|
||||
*/
|
||||
export interface ILogPackage<T = unknown> {
|
||||
/**
|
||||
* a unix timestamp in milliseconds
|
||||
*/
|
||||
timestamp: number;
|
||||
type: TLogType;
|
||||
context: ILogContext;
|
||||
level: TLogLevel;
|
||||
/**
|
||||
* allows grouping of log messages
|
||||
*/
|
||||
correlation: ILogCorrelation;
|
||||
/**
|
||||
* the message to log
|
||||
*/
|
||||
message: string;
|
||||
data?: any;
|
||||
data?: T;
|
||||
}
|
||||
|
||||
export interface ILogPackageDataRequest {
|
||||
requestCorrelationId: string;
|
||||
url: string;
|
||||
pathname: string;
|
||||
method: string;
|
||||
status: string;
|
||||
}
|
||||
|
||||
export interface ILogPackageAuthenticated {
|
||||
@ -60,6 +113,14 @@ export interface ILogPackageAuthenticated {
|
||||
logPackage: ILogPackage;
|
||||
}
|
||||
|
||||
export interface ILogDestination {
|
||||
handleLog: (logPackage: ILogPackage) => void;
|
||||
export interface ILogPackageArrayAuthenticated {
|
||||
auth: string;
|
||||
logPackages: ILogPackage[];
|
||||
}
|
||||
|
||||
/**
|
||||
* a destination interface for extending smartlog modules
|
||||
*/
|
||||
export interface ILogDestination {
|
||||
handleLog: (logPackage: ILogPackage) => Promise<void>;
|
||||
}
|
||||
|
@ -1,3 +1,10 @@
|
||||
import * as typedrequestInterfaces from '@apiglobal/typedrequest-interfaces';
|
||||
import * as typedrequestInterfaces from '@api.global/typedrequest-interfaces';
|
||||
|
||||
export { typedrequestInterfaces };
|
||||
|
||||
// tsclass scope
|
||||
import * as tsclass from '@tsclass/tsclass';
|
||||
|
||||
export {
|
||||
tsclass
|
||||
}
|
@ -1,8 +1,9 @@
|
||||
import { ILogPackageAuthenticated } from "./index";
|
||||
import { type ILogPackageAuthenticated } from './index.js';
|
||||
|
||||
export interface IRequest_SmartlogDestinationReceiver_Any_PostLogPackages {
|
||||
method: 'postLogPackages';
|
||||
request: {
|
||||
logPackages: ILogPackageAuthenticated[];
|
||||
};
|
||||
response: {};
|
||||
}
|
14
tsconfig.json
Normal file
14
tsconfig.json
Normal file
@ -0,0 +1,14 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"experimentalDecorators": true,
|
||||
"useDefineForClassFields": false,
|
||||
"target": "ES2022",
|
||||
"module": "NodeNext",
|
||||
"moduleResolution": "NodeNext",
|
||||
"esModuleInterop": true,
|
||||
"verbatimModuleSyntax": true
|
||||
},
|
||||
"exclude": [
|
||||
"dist_*/**/*.d.ts"
|
||||
]
|
||||
}
|
17
tslint.json
17
tslint.json
@ -1,17 +0,0 @@
|
||||
{
|
||||
"extends": ["tslint:latest", "tslint-config-prettier"],
|
||||
"rules": {
|
||||
"semicolon": [true, "always"],
|
||||
"no-console": false,
|
||||
"ordered-imports": false,
|
||||
"object-literal-sort-keys": false,
|
||||
"member-ordering": {
|
||||
"options":{
|
||||
"order": [
|
||||
"static-method"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"defaultSeverity": "warning"
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user