fix(core): update

This commit is contained in:
Philipp Kunz 2022-06-26 20:36:22 +02:00
parent 1f80df6ec2
commit 0e11d0e760
13 changed files with 8503 additions and 9937 deletions

View File

@ -12,6 +12,9 @@ stages:
- release
- metadata
before_script:
- npm install -g @shipzone/npmci
# ====================
# security stage
# ====================
@ -36,6 +39,7 @@ auditProductionDependencies:
- npmci command npm audit --audit-level=high --only=prod --production
tags:
- docker
allow_failure: true
auditDevDependencies:
image: registry.gitlab.com/hosttoday/ht-docker-node:npmci
@ -96,10 +100,9 @@ codequality:
only:
- tags
script:
- npmci command npm install -g tslint typescript
- npmci command npm install -g typescript
- npmci npm prepare
- npmci npm install
- npmci command "tslint -c tslint.json ./ts/**/*.ts"
tags:
- lossless
- docker
@ -119,11 +122,10 @@ trigger:
pages:
stage: metadata
script:
- npmci node install lts
- npmci command npm install -g @gitzone/tsdoc
- npmci node install stable
- npmci npm prepare
- npmci npm install
- npmci command tsdoc
- npmci command npm run buildDocs
tags:
- lossless
- docker

24
.vscode/launch.json vendored
View File

@ -2,28 +2,10 @@
"version": "0.2.0",
"configurations": [
{
"name": "current file",
"type": "node",
"command": "npm test",
"name": "Run npm test",
"request": "launch",
"args": [
"${relativeFile}"
],
"runtimeArgs": ["-r", "@gitzone/tsrun"],
"cwd": "${workspaceRoot}",
"protocol": "inspector",
"internalConsoleOptions": "openOnSessionStart"
},
{
"name": "test.ts",
"type": "node",
"request": "launch",
"args": [
"test/test.ts"
],
"runtimeArgs": ["-r", "@gitzone/tsrun"],
"cwd": "${workspaceRoot}",
"protocol": "inspector",
"internalConsoleOptions": "openOnSessionStart"
"type": "node-terminal"
}
]
}

View File

@ -9,7 +9,7 @@
"githost": "gitlab.com",
"gitscope": "pushrocks",
"gitrepo": "smartcache",
"shortDescription": "cache things in smart ways",
"description": "cache things in smart ways",
"npmPackagename": "@pushrocks/smartcache",
"license": "MIT"
}

18321
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -9,23 +9,24 @@
"license": "MIT",
"scripts": {
"test": "(tstest test/)",
"build": "(tsbuild)"
"build": "(tsbuild)",
"buildDocs": "tsdoc"
},
"devDependencies": {
"@gitzone/tsbuild": "^2.1.25",
"@gitzone/tsrun": "^1.2.12",
"@gitzone/tstest": "^1.0.52",
"@pushrocks/tapbundle": "^3.2.14",
"@types/node": "^14.14.41",
"@gitzone/tsbuild": "^2.1.63",
"@gitzone/tsrun": "^1.2.37",
"@gitzone/tstest": "^1.0.71",
"@pushrocks/tapbundle": "^5.0.3",
"@types/node": "^18.0.0",
"tslint": "^6.1.3",
"tslint-config-prettier": "^1.18.0"
},
"dependencies": {
"@pushrocks/smartdelay": "^2.0.10",
"@pushrocks/smartdelay": "^2.0.13",
"@pushrocks/smarterror": "^2.0.1",
"@pushrocks/smarthash": "^2.1.10",
"@pushrocks/smartpromise": "^3.1.3",
"@pushrocks/smarttime": "^3.0.38"
"@pushrocks/smarthash": "^3.0.1",
"@pushrocks/smartpromise": "^3.1.7",
"@pushrocks/smarttime": "^3.0.45"
},
"files": [
"ts/**/*",
@ -41,5 +42,6 @@
],
"browserslist": [
"last 1 chrome versions"
]
],
"type": "module"
}

View File

@ -29,7 +29,6 @@ Platform support | [![Supports Windows 10](https://badgen.net/badge/supports%20W
We are always happy for code contributions. If you are not the code contributing type that is ok. Still, maintaining Open Source repositories takes considerable time and thought. If you like the quality of what we do and our modules are useful to you we would appreciate a little monthly contribution: You can [contribute one time](https://lossless.link/contribute-onetime) or [contribute monthly](https://lossless.link/contribute). :)
## Contribution
We are always happy for code contributions. If you are not the code contributing type that is ok. Still, maintaining Open Source repositories takes considerable time and thought. If you like the quality of what we do and our modules are useful to you we would appreciate a little monthly contribution: You can [contribute one time](https://lossless.link/contribute-onetime) or [contribute monthly](https://lossless.link/contribute). :)

View File

@ -1,14 +1,14 @@
import { expect, tap } from '@pushrocks/tapbundle';
import * as smartcache from '../ts/index';
import * as smartcache from '../ts/index.js';
let smartcacheInstance: smartcache.SmartCache;
tap.test('should create a valid instance of SmartCache', async () => {
smartcacheInstance = new smartcache.SmartCache();
expect(smartcacheInstance).to.be.instanceof(smartcache.SmartCache);
expect(smartcacheInstance).toBeInstanceOf(smartcache.SmartCache);
});
tap.test('try to get async responses', async (tools) => {
tap.test('try to get async responses', async (toolsArg) => {
let response1Counter = 0;
const getResponse = async () => {
const response = await smartcacheInstance
@ -43,9 +43,9 @@ tap.test('try to get async responses', async (tools) => {
await getResponse();
await getResponse2();
await getResponse2();
await tools.delayFor(500);
await toolsArg.delayFor(500);
await getResponse();
await tools.delayFor(2000);
await toolsArg.delayFor(2000);
await getResponse2();
});

8
ts/00_commitinfo_data.ts Normal file
View File

@ -0,0 +1,8 @@
/**
* autocreated commitinfo by @pushrocks/commitinfo
*/
export const commitinfo = {
name: '@pushrocks/smartcache',
version: '1.0.15',
description: 'cache things in smart ways'
}

View File

@ -1 +1 @@
export * from './smartcache.classes.smartcache';
export * from './smartcache.classes.smartcache.js';

View File

@ -1,4 +1,4 @@
import * as plugins from './smartcache.plugins';
import * as plugins from './smartcache.plugins.js';
import { SmartError } from '@pushrocks/smarterror';
export interface ICacheMap {
@ -12,7 +12,7 @@ export interface ICacheMap {
export class CacheManager {
private _cacheMap: ICacheMap = {};
cacheExists(identifierArg): boolean {
cacheExists(identifierArg: string): boolean {
if (this._cacheMap[identifierArg]) {
return true;
}

View File

@ -1,5 +1,5 @@
import * as plugins from './smartcache.plugins';
import { CacheManager } from './smartcache.classes.cachemanager';
import * as plugins from './smartcache.plugins.js';
import { CacheManager } from './smartcache.classes.cachemanager.js';
export class SmartCache {
private _cacheManager = new CacheManager();

9
tsconfig.json Normal file
View File

@ -0,0 +1,9 @@
{
"compilerOptions": {
"experimentalDecorators": true,
"useDefineForClassFields": false,
"target": "ES2022",
"module": "ES2022",
"moduleResolution": "nodenext"
}
}

View File

@ -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"
}