switch to new org scheme

This commit is contained in:
Philipp Kunz 2023-07-10 02:48:58 +02:00
parent 9f16f7d1fe
commit cd2d9f8168
6 changed files with 38 additions and 29 deletions

View File

@ -8,10 +8,10 @@
"projectType": "npm",
"module": {
"githost": "gitlab.com",
"gitscope": "pushrocks",
"gitscope": "push.rocks",
"gitrepo": "smartevent",
"shortDescription": "handle events in smart ways",
"npmPackagename": "@pushrocks/smartevent",
"npmPackagename": "@push.rocks/smartevent",
"license": "MIT"
}
}

13
package-lock.json generated
View File

@ -517,7 +517,7 @@
},
"builtin-modules": {
"version": "1.1.1",
"resolved": "https://verdaccio.lossless.one/builtin-modules/-/builtin-modules-1.1.1.tgz",
"resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz",
"integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=",
"dev": true
},
@ -745,6 +745,11 @@
"integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==",
"dev": true
},
"events": {
"version": "3.1.0",
"resolved": "https://verdaccio.lossless.one/events/-/events-3.1.0.tgz",
"integrity": "sha512-Rv+u8MLHNOdMjTAFeT3nCjHn2aGlx435FP/sDHNaRhDEMwyI/aB22Kj2qIN8R0cw3z28psEQLYwxVKLsKrMgWg=="
},
"execa": {
"version": "1.0.0",
"resolved": "https://verdaccio.lossless.one/execa/-/execa-1.0.0.tgz",
@ -1041,7 +1046,7 @@
},
"mkdirp": {
"version": "0.5.1",
"resolved": "https://verdaccio.lossless.one/mkdirp/-/mkdirp-0.5.1.tgz",
"resolved": "http://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz",
"integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=",
"dev": true,
"requires": {
@ -1223,7 +1228,7 @@
},
"path-parse": {
"version": "1.0.6",
"resolved": "https://verdaccio.lossless.one/path-parse/-/path-parse-1.0.6.tgz",
"resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz",
"integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==",
"dev": true
},
@ -1480,7 +1485,7 @@
},
"tsutils": {
"version": "2.29.0",
"resolved": "https://verdaccio.lossless.one/tsutils/-/tsutils-2.29.0.tgz",
"resolved": "https://registry.npmjs.org/tsutils/-/tsutils-2.29.0.tgz",
"integrity": "sha512-g5JVHCIJwzfISaXpXE1qvNalca5Jwob6FjI4AoPlqMusJ6ftFE7IkkFoMhVLRgK+4Kx3gkzb8UZK5t5yTTvEmA==",
"dev": true,
"requires": {

View File

@ -1,5 +1,5 @@
{
"name": "@pushrocks/smartevent",
"name": "@push.rocks/smartevent",
"version": "2.0.5",
"private": false,
"description": "handle events in smart ways",
@ -21,7 +21,8 @@
"homepage": "https://gitlab.com/pushrocks/smartevent#README",
"dependencies": {
"@pushrocks/smartpromise": "^3.0.6",
"@pushrocks/smartrx": "^2.0.5"
"@pushrocks/smartrx": "^2.0.5",
"events": "^3.1.0"
},
"devDependencies": {
"@gitzone/tsbuild": "^2.1.17",
@ -43,4 +44,4 @@
"npmextra.json",
"readme.md"
]
}
}

View File

@ -1,9 +1,28 @@
import * as plugins from './smartevent.plugins';
import { EventEmitter } from 'events';
export { EventEmitter };
export {
};
export const once = async <T>(eventEmitter: EventEmitter, eventName: string): Promise<T> => {
export class SmartEventEmitter {
public eventSubject = new plugins.
public once () {
};
public emit () {
}
public on () {}
}
// instrument globalThis
export const once = async <T>(eventEmitter: SmartEventEmitter, eventName: string): Promise<T> => {
const done = plugins.smartpromise.defer<T>();
eventEmitter.once(eventName, eventPayload => {
done.resolve(eventPayload);

View File

@ -1,4 +1,5 @@
// pushrocks scope
import * as smartpromise from '@pushrocks/smartpromise';
import events = require('events');
import * as events from 'events';
export { events, smartpromise };

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