Socket
Socket
Sign inDemoInstall

@deepkit/core

Package Overview
Dependencies
Maintainers
1
Versions
83
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@deepkit/core - npm Package Compare versions

Comparing version 1.0.1-alpha.114 to 1.0.1-alpha.121

6

CHANGELOG.md

@@ -6,2 +6,8 @@ # Change Log

## [1.0.1-alpha.121](https://github.com/deepkit/deepkit-framework/compare/v1.0.1-alpha.120...v1.0.1-alpha.121) (2024-01-31)
### Bug Fixes
- **core:** clear timeouts correctly in ProcessLock ([89cd2d5](https://github.com/deepkit/deepkit-framework/commit/89cd2d5631e09555562a2a25d1c098f70406a469))
## [1.0.1-alpha.114](https://github.com/deepkit/deepkit-framework/compare/v1.0.1-alpha.113...v1.0.1-alpha.114) (2024-01-21)

@@ -8,0 +14,0 @@

2

dist/cjs/src/compiler.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.CompilerContext = void 0;
const __ΩPartial = ['T', 'l+e#!e"!fRb!Pde"!gN#"y'];
const __ΩPartial = ['T', 'Partial', 'l+e#!e"!fRb!Pde"!gN#"w"y'];
/*

@@ -6,0 +6,0 @@ * Deepkit Framework

@@ -8,10 +8,10 @@ "use strict";

exports.formatError = exports.forwardTypeArguments = exports.zip = exports.rangeArray = exports.range = exports.hasProperty = exports.escapeRegExp = exports.getCurrentFileName = exports.isIterable = exports.createDynamicClass = exports.inDebugMode = exports.getParentClass = exports.isPrototypeOfBase = exports.isConstructable = exports.getObjectKeysSize = void 0;
const __ΩObject = ['', 'constructor', 'toString', 'toLocaleString', 0, 'valueOf', () => __ΩPropertyKey, 'v', 'hasOwnProperty', 0, 'isPrototypeOf', () => __ΩPropertyKey, 'propertyIsEnumerable', 'PP"/!4"P&1#P&1$Pn%1&Pn\'2()1)Pn*2()1+Pn,2()1-My'];
const __ΩError = ['name', 'message', 'stack', 'P&4!&4"&4#8My'];
const __ΩIterableIterator = ['T', () => __ΩIterator, 0, () => Symbol.iterator, 'b!Pe"!o""Pe#!o#"1$My'];
const __ΩPropertyKey = ['P&\'+Jy'];
const __ΩIterator = ['T', 'TReturn', 'TNext', 'args', () => __ΩIteratorResult, 'next', 'value', () => __ΩIteratorResult, 'return', 'e', () => __ΩIteratorResult, 'throw', 'b!"c"-c#PPPPGPe%#GJ@2$e#!e#"o%#1&Pe#"2\'8e#!e#"o(#1)P"2*8e#!e#"o+#1,My'];
const __ΩIteratorResult = ['T', 'TReturn', () => __ΩIteratorYieldResult, () => __ΩIteratorReturnResult, 'b!"c"Pe"!o#"e""o$"Jy'];
const __ΩIteratorYieldResult = ['TYield', false, 'done', 'value', 'b!P."4#8e"!4$My'];
const __ΩIteratorReturnResult = ['TReturn', true, 'done', 'value', 'b!P."4#e"!4$My'];
const __ΩObject = ['', 'constructor', 'toString', 'toLocaleString', 0, 'valueOf', () => __ΩPropertyKey, 'v', 'hasOwnProperty', 0, 'isPrototypeOf', () => __ΩPropertyKey, 'propertyIsEnumerable', 'Object', 'PP"/!4"P&1#P&1$Pn%1&Pn\'2()1)Pn*2()1+Pn,2()1-Mw.y'];
const __ΩError = ['name', 'message', 'stack', 'Error', 'P&4!&4"&4#8Mw$y'];
const __ΩIterableIterator = ['T', () => __ΩIterator, 0, () => Symbol.iterator, 'IterableIterator', 'b!Pe"!o""Pe#!o#"1$Mw%y'];
const __ΩPropertyKey = ['PropertyKey', 'P&\'+Jw!y'];
const __ΩIterator = ['T', 'TReturn', 'TNext', 'args', () => __ΩIteratorResult, 'next', 'value', () => __ΩIteratorResult, 'return', 'e', () => __ΩIteratorResult, 'throw', 'Iterator', 'b!"c"-c#PPPPGPe%#GJ@2$e#!e#"o%#1&Pe#"2\'8e#!e#"o(#1)P"2*8e#!e#"o+#1,Mw-y'];
const __ΩIteratorResult = ['T', 'TReturn', () => __ΩIteratorYieldResult, () => __ΩIteratorReturnResult, 'IteratorResult', 'b!"c"Pe"!o#"e""o$"Jw%y'];
const __ΩIteratorYieldResult = ['TYield', false, 'done', 'value', 'IteratorYieldResult', 'b!P."4#8e"!4$Mw%y'];
const __ΩIteratorReturnResult = ['TReturn', true, 'done', 'value', 'IteratorReturnResult', 'b!P."4#e"!4$Mw%y'];
function __assignType(fn, args) {

@@ -53,7 +53,7 @@ fn.__type = args;

CustomError.__type = [() => Error, 'name', 'stack', 'message', () => "", 'constructor', 'CustomError', 'P7!&3"&3#8P&2$:>%"0&5w\''];
const __ΩClassType = ['T', 'args', 'new', '"c!PP"@2"e#!1#My'];
const __ΩClassType = ['T', 'args', 'new', 'ClassType', '"c!PP"@2"e#!1#Mw$y'];
exports.__ΩClassType = __ΩClassType;
const __ΩAbstractClassType = ['T', 'args', 'new', '"c!P"@2"e"!/#y'];
const __ΩAbstractClassType = ['T', 'args', 'new', 'AbstractClassType', '"c!P"@2"e"!/#w$y'];
exports.__ΩAbstractClassType = __ΩAbstractClassType;
const __ΩExtractClassType = ['T', () => __ΩAbstractClassType, 'l:e"!R!RPde#!h!!o""qk#\'QRb!Pde"!p)y'];
const __ΩExtractClassType = ['T', () => __ΩAbstractClassType, 'ExtractClassType', 'l:e"!R!RPde#!h!!o""qk#\'QRb!Pde"!p)w#y'];
exports.__ΩExtractClassType = __ΩExtractClassType;

@@ -60,0 +60,0 @@ /**

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.singleStack = exports.stack = exports.log = void 0;
const __ΩPropertyDescriptor = ['configurable', 'enumerable', 'value', 'writable', 'get', 'v', 'set', 'P)4!8)4"8"4#8)4$8P"1%P"2&$1\'My'];
const __ΩTypedPropertyDescriptor = ['T', 'enumerable', 'configurable', 'writable', 'value', '', 'get', 'set', 'b!P)4"8)4#8)4$8e"!4%8Pe#!/&4\'8Pe#!2%$/&4(8My'];
const __ΩPropertyDescriptor = ['configurable', 'enumerable', 'value', 'writable', 'get', 'v', 'set', 'PropertyDescriptor', 'P)4!8)4"8"4#8)4$8P"1%P"2&$1\'Mw(y'];
const __ΩTypedPropertyDescriptor = ['T', 'enumerable', 'configurable', 'writable', 'value', '', 'get', 'set', 'TypedPropertyDescriptor', 'b!P)4"8)4#8)4$8e"!4%8Pe#!/&4\'8Pe#!2%$/&4(8Mw)y'];
function __assignType(fn, args) {

@@ -7,0 +7,0 @@ fn.__type = args;

@@ -14,7 +14,7 @@ "use strict";

const array_js_1 = require("./array.js");
const __ΩAsyncSubscriber = ['T', 'event', '', 'b!Pe"!2"P$`$J/#y'];
const __ΩSubscriber = ['T', 'event', '', 'b!Pe"!2"P$`$J/#y'];
const __ΩAsyncEventSubscription = ['', 'unsubscribe', 'PP$/!4"My'];
const __ΩAsyncSubscriber = ['T', 'event', '', 'AsyncSubscriber', 'b!Pe"!2"P$`$J/#w$y'];
const __ΩSubscriber = ['T', 'event', '', 'Subscriber', 'b!Pe"!2"P$`$J/#w$y'];
const __ΩAsyncEventSubscription = ['', 'unsubscribe', 'AsyncEventSubscription', 'PP$/!4"Mw#y'];
exports.__ΩAsyncEventSubscription = __ΩAsyncEventSubscription;
const __ΩEventSubscription = ['', 'unsubscribe', 'PP$/!4"My'];
const __ΩEventSubscription = ['', 'unsubscribe', 'EventSubscription', 'PP$/!4"Mw#y'];
exports.__ΩEventSubscription = __ΩEventSubscription;

@@ -21,0 +21,0 @@ let asyncId = 0;

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getValidEnumValue = exports.isValidEnumValue = exports.getEnumKeyLabelMap = exports.getEnumValues = exports.getEnumLabels = exports.getEnumLabel = void 0;
const __ΩObject = ['', 'constructor', 'toString', 'toLocaleString', 0, 'valueOf', () => __ΩPropertyKey, 'v', 'hasOwnProperty', 0, 'isPrototypeOf', () => __ΩPropertyKey, 'propertyIsEnumerable', 'PP"/!4"P&1#P&1$Pn%1&Pn\'2()1)Pn*2()1+Pn,2()1-My'];
const __ΩPropertyKey = ['P&\'+Jy'];
const __ΩObject = ['', 'constructor', 'toString', 'toLocaleString', 0, 'valueOf', () => __ΩPropertyKey, 'v', 'hasOwnProperty', 0, 'isPrototypeOf', () => __ΩPropertyKey, 'propertyIsEnumerable', 'Object', 'PP"/!4"P&1#P&1$Pn%1&Pn\'2()1)Pn*2()1+Pn,2()1-Mw.y'];
const __ΩPropertyKey = ['PropertyKey', 'P&\'+Jw!y'];
function __assignType(fn, args) {

@@ -7,0 +7,0 @@ fn.__type = args;

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.eachPair = exports.each = exports.eachKey = void 0;
const __ΩArrayLike = ['T', 'length', 'b!P\'4"9\'e"!LMy'];
const __ΩIterableIterator = ['T', () => __ΩIterator, 0, () => Symbol.iterator, 'b!Pe"!o""Pe#!o#"1$My'];
const __ΩIterator = ['T', 'TReturn', 'TNext', 'args', () => __ΩIteratorResult, 'next', 'value', () => __ΩIteratorResult, 'return', 'e', () => __ΩIteratorResult, 'throw', 'b!"c"-c#PPPPGPe%#GJ@2$e#!e#"o%#1&Pe#"2\'8e#!e#"o(#1)P"2*8e#!e#"o+#1,My'];
const __ΩIteratorResult = ['T', 'TReturn', () => __ΩIteratorYieldResult, () => __ΩIteratorReturnResult, 'b!"c"Pe"!o#"e""o$"Jy'];
const __ΩIteratorYieldResult = ['TYield', false, 'done', 'value', 'b!P."4#8e"!4$My'];
const __ΩIteratorReturnResult = ['TReturn', true, 'done', 'value', 'b!P."4#e"!4$My'];
const __ΩArrayLike = ['T', 'length', 'ArrayLike', 'b!P\'4"9\'e"!LMw#y'];
const __ΩIterableIterator = ['T', () => __ΩIterator, 0, () => Symbol.iterator, 'IterableIterator', 'b!Pe"!o""Pe#!o#"1$Mw%y'];
const __ΩIterator = ['T', 'TReturn', 'TNext', 'args', () => __ΩIteratorResult, 'next', 'value', () => __ΩIteratorResult, 'return', 'e', () => __ΩIteratorResult, 'throw', 'Iterator', 'b!"c"-c#PPPPGPe%#GJ@2$e#!e#"o%#1&Pe#"2\'8e#!e#"o(#1)P"2*8e#!e#"o+#1,Mw-y'];
const __ΩIteratorResult = ['T', 'TReturn', () => __ΩIteratorYieldResult, () => __ΩIteratorReturnResult, 'IteratorResult', 'b!"c"Pe"!o#"e""o$"Jw%y'];
const __ΩIteratorYieldResult = ['TYield', false, 'done', 'value', 'IteratorYieldResult', 'b!P."4#8e"!4$Mw%y'];
const __ΩIteratorReturnResult = ['TReturn', true, 'done', 'value', 'IteratorReturnResult', 'b!P."4#e"!4$Mw%y'];
eachKey.__type = [() => __ΩArrayLike, 'object', () => __ΩIterableIterator, 'eachKey', 'P"o!"2"\'o#"/$'];

@@ -11,0 +11,0 @@ eachKey.__type = ['object', () => __ΩIterableIterator, 'eachKey', 'P"2!&o""/#'];

@@ -37,21 +37,23 @@ "use strict";

return (Promise.Ω = [['$']], new Promise(__assignType((resolve, reject) => {
const ourTake = () => {
LOCKS[this.id].time = Date.now() / 1000;
this.holding = true;
resolve();
if (ttl) {
this.ttlTimeout = setTimeout(() => {
this.unlock();
}, ttl * 1000);
if (LOCKS[this.id]) {
let timeoutId;
const ourTake = () => {
LOCKS[this.id].time = Date.now() / 1000;
clearTimeout(timeoutId);
this.holding = true;
resolve();
if (ttl) {
this.ttlTimeout = setTimeout(() => {
this.unlock();
}, ttl * 1000);
}
};
if (timeout > 0) {
timeoutId = setTimeout(() => {
if (LOCKS[this.id])
(0, array_js_1.arrayRemoveItem)(LOCKS[this.id].queue, ourTake);
//reject is never handled when resolve is called first
reject('Lock timed out ' + this.id);
}, timeout * 1000);
}
};
if (timeout > 0) {
setTimeout(() => {
if (LOCKS[this.id])
(0, array_js_1.arrayRemoveItem)(LOCKS[this.id].queue, ourTake);
//reject is never handled when resolve is called first
reject('Lock timed out ' + this.id);
}, timeout * 1000);
}
if (LOCKS[this.id]) {
LOCKS[this.id].queue.push(ourTake);

@@ -58,0 +60,0 @@ }

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.__ΩInject = exports.__ΩInjectMeta = void 0;
const __ΩInjectMeta = ['T', "inject", '__meta', '!c!PP!P."e$!GK4#8My'];
const __ΩInjectMeta = ['T', "inject", '__meta', 'InjectMeta', '!c!PP!P."e$!GK4#8Mw$y'];
exports.__ΩInjectMeta = __ΩInjectMeta;
const __ΩInject = ['Type', 'Token', () => __ΩInjectMeta, 'b!!c"Pe"!e""o#"Ky'];
const __ΩInject = ['Type', 'Token', () => __ΩInjectMeta, 'Inject', 'b!!c"Pe"!e""o#"Kw$y'];
exports.__ΩInject = __ΩInject;
//# sourceMappingURL=types.js.map

@@ -1,2 +0,2 @@

const __ΩPartial = ['T', 'l+e#!e"!fRb!Pde"!gN#"y'];
const __ΩPartial = ['T', 'Partial', 'l+e#!e"!fRb!Pde"!gN#"w"y'];
/*

@@ -3,0 +3,0 @@ * Deepkit Framework

@@ -1,9 +0,9 @@

const __ΩObject = ['', 'constructor', 'toString', 'toLocaleString', 0, 'valueOf', () => __ΩPropertyKey, 'v', 'hasOwnProperty', 0, 'isPrototypeOf', () => __ΩPropertyKey, 'propertyIsEnumerable', 'PP"/!4"P&1#P&1$Pn%1&Pn\'2()1)Pn*2()1+Pn,2()1-My'];
const __ΩError = ['name', 'message', 'stack', 'P&4!&4"&4#8My'];
const __ΩIterableIterator = ['T', () => __ΩIterator, 0, () => Symbol.iterator, 'b!Pe"!o""Pe#!o#"1$My'];
const __ΩPropertyKey = ['P&\'+Jy'];
const __ΩIterator = ['T', 'TReturn', 'TNext', 'args', () => __ΩIteratorResult, 'next', 'value', () => __ΩIteratorResult, 'return', 'e', () => __ΩIteratorResult, 'throw', 'b!"c"-c#PPPPGPe%#GJ@2$e#!e#"o%#1&Pe#"2\'8e#!e#"o(#1)P"2*8e#!e#"o+#1,My'];
const __ΩIteratorResult = ['T', 'TReturn', () => __ΩIteratorYieldResult, () => __ΩIteratorReturnResult, 'b!"c"Pe"!o#"e""o$"Jy'];
const __ΩIteratorYieldResult = ['TYield', false, 'done', 'value', 'b!P."4#8e"!4$My'];
const __ΩIteratorReturnResult = ['TReturn', true, 'done', 'value', 'b!P."4#e"!4$My'];
const __ΩObject = ['', 'constructor', 'toString', 'toLocaleString', 0, 'valueOf', () => __ΩPropertyKey, 'v', 'hasOwnProperty', 0, 'isPrototypeOf', () => __ΩPropertyKey, 'propertyIsEnumerable', 'Object', 'PP"/!4"P&1#P&1$Pn%1&Pn\'2()1)Pn*2()1+Pn,2()1-Mw.y'];
const __ΩError = ['name', 'message', 'stack', 'Error', 'P&4!&4"&4#8Mw$y'];
const __ΩIterableIterator = ['T', () => __ΩIterator, 0, () => Symbol.iterator, 'IterableIterator', 'b!Pe"!o""Pe#!o#"1$Mw%y'];
const __ΩPropertyKey = ['PropertyKey', 'P&\'+Jw!y'];
const __ΩIterator = ['T', 'TReturn', 'TNext', 'args', () => __ΩIteratorResult, 'next', 'value', () => __ΩIteratorResult, 'return', 'e', () => __ΩIteratorResult, 'throw', 'Iterator', 'b!"c"-c#PPPPGPe%#GJ@2$e#!e#"o%#1&Pe#"2\'8e#!e#"o(#1)P"2*8e#!e#"o+#1,Mw-y'];
const __ΩIteratorResult = ['T', 'TReturn', () => __ΩIteratorYieldResult, () => __ΩIteratorReturnResult, 'IteratorResult', 'b!"c"Pe"!o#"e""o$"Jw%y'];
const __ΩIteratorYieldResult = ['TYield', false, 'done', 'value', 'IteratorYieldResult', 'b!P."4#8e"!4$Mw%y'];
const __ΩIteratorReturnResult = ['TReturn', true, 'done', 'value', 'IteratorReturnResult', 'b!P."4#e"!4$Mw%y'];
function __assignType(fn, args) {

@@ -44,7 +44,7 @@ fn.__type = args;

CustomError.__type = [() => Error, 'name', 'stack', 'message', () => "", 'constructor', 'CustomError', 'P7!&3"&3#8P&2$:>%"0&5w\''];
const __ΩClassType = ['T', 'args', 'new', '"c!PP"@2"e#!1#My'];
const __ΩClassType = ['T', 'args', 'new', 'ClassType', '"c!PP"@2"e#!1#Mw$y'];
export { __ΩClassType as __ΩClassType };
const __ΩAbstractClassType = ['T', 'args', 'new', '"c!P"@2"e"!/#y'];
const __ΩAbstractClassType = ['T', 'args', 'new', 'AbstractClassType', '"c!P"@2"e"!/#w$y'];
export { __ΩAbstractClassType as __ΩAbstractClassType };
const __ΩExtractClassType = ['T', () => __ΩAbstractClassType, 'l:e"!R!RPde#!h!!o""qk#\'QRb!Pde"!p)y'];
const __ΩExtractClassType = ['T', () => __ΩAbstractClassType, 'ExtractClassType', 'l:e"!R!RPde#!h!!o""qk#\'QRb!Pde"!p)w#y'];
export { __ΩExtractClassType as __ΩExtractClassType };

@@ -51,0 +51,0 @@ /**

@@ -1,3 +0,3 @@

const __ΩPropertyDescriptor = ['configurable', 'enumerable', 'value', 'writable', 'get', 'v', 'set', 'P)4!8)4"8"4#8)4$8P"1%P"2&$1\'My'];
const __ΩTypedPropertyDescriptor = ['T', 'enumerable', 'configurable', 'writable', 'value', '', 'get', 'set', 'b!P)4"8)4#8)4$8e"!4%8Pe#!/&4\'8Pe#!2%$/&4(8My'];
const __ΩPropertyDescriptor = ['configurable', 'enumerable', 'value', 'writable', 'get', 'v', 'set', 'PropertyDescriptor', 'P)4!8)4"8"4#8)4$8P"1%P"2&$1\'Mw(y'];
const __ΩTypedPropertyDescriptor = ['T', 'enumerable', 'configurable', 'writable', 'value', '', 'get', 'set', 'TypedPropertyDescriptor', 'b!P)4"8)4#8)4$8e"!4%8Pe#!/&4\'8Pe#!2%$/&4(8Mw)y'];
function __assignType(fn, args) {

@@ -4,0 +4,0 @@ fn.__type = args;

@@ -11,7 +11,7 @@ /*

import { arrayRemoveItem } from './array.js';
const __ΩAsyncSubscriber = ['T', 'event', '', 'b!Pe"!2"P$`$J/#y'];
const __ΩSubscriber = ['T', 'event', '', 'b!Pe"!2"P$`$J/#y'];
const __ΩAsyncEventSubscription = ['', 'unsubscribe', 'PP$/!4"My'];
const __ΩAsyncSubscriber = ['T', 'event', '', 'AsyncSubscriber', 'b!Pe"!2"P$`$J/#w$y'];
const __ΩSubscriber = ['T', 'event', '', 'Subscriber', 'b!Pe"!2"P$`$J/#w$y'];
const __ΩAsyncEventSubscription = ['', 'unsubscribe', 'AsyncEventSubscription', 'PP$/!4"Mw#y'];
export { __ΩAsyncEventSubscription as __ΩAsyncEventSubscription };
const __ΩEventSubscription = ['', 'unsubscribe', 'PP$/!4"My'];
const __ΩEventSubscription = ['', 'unsubscribe', 'EventSubscription', 'PP$/!4"Mw#y'];
export { __ΩEventSubscription as __ΩEventSubscription };

@@ -18,0 +18,0 @@ let asyncId = 0;

@@ -1,3 +0,3 @@

const __ΩObject = ['', 'constructor', 'toString', 'toLocaleString', 0, 'valueOf', () => __ΩPropertyKey, 'v', 'hasOwnProperty', 0, 'isPrototypeOf', () => __ΩPropertyKey, 'propertyIsEnumerable', 'PP"/!4"P&1#P&1$Pn%1&Pn\'2()1)Pn*2()1+Pn,2()1-My'];
const __ΩPropertyKey = ['P&\'+Jy'];
const __ΩObject = ['', 'constructor', 'toString', 'toLocaleString', 0, 'valueOf', () => __ΩPropertyKey, 'v', 'hasOwnProperty', 0, 'isPrototypeOf', () => __ΩPropertyKey, 'propertyIsEnumerable', 'Object', 'PP"/!4"P&1#P&1$Pn%1&Pn\'2()1)Pn*2()1+Pn,2()1-Mw.y'];
const __ΩPropertyKey = ['PropertyKey', 'P&\'+Jw!y'];
function __assignType(fn, args) {

@@ -4,0 +4,0 @@ fn.__type = args;

@@ -1,7 +0,7 @@

const __ΩArrayLike = ['T', 'length', 'b!P\'4"9\'e"!LMy'];
const __ΩIterableIterator = ['T', () => __ΩIterator, 0, () => Symbol.iterator, 'b!Pe"!o""Pe#!o#"1$My'];
const __ΩIterator = ['T', 'TReturn', 'TNext', 'args', () => __ΩIteratorResult, 'next', 'value', () => __ΩIteratorResult, 'return', 'e', () => __ΩIteratorResult, 'throw', 'b!"c"-c#PPPPGPe%#GJ@2$e#!e#"o%#1&Pe#"2\'8e#!e#"o(#1)P"2*8e#!e#"o+#1,My'];
const __ΩIteratorResult = ['T', 'TReturn', () => __ΩIteratorYieldResult, () => __ΩIteratorReturnResult, 'b!"c"Pe"!o#"e""o$"Jy'];
const __ΩIteratorYieldResult = ['TYield', false, 'done', 'value', 'b!P."4#8e"!4$My'];
const __ΩIteratorReturnResult = ['TReturn', true, 'done', 'value', 'b!P."4#e"!4$My'];
const __ΩArrayLike = ['T', 'length', 'ArrayLike', 'b!P\'4"9\'e"!LMw#y'];
const __ΩIterableIterator = ['T', () => __ΩIterator, 0, () => Symbol.iterator, 'IterableIterator', 'b!Pe"!o""Pe#!o#"1$Mw%y'];
const __ΩIterator = ['T', 'TReturn', 'TNext', 'args', () => __ΩIteratorResult, 'next', 'value', () => __ΩIteratorResult, 'return', 'e', () => __ΩIteratorResult, 'throw', 'Iterator', 'b!"c"-c#PPPPGPe%#GJ@2$e#!e#"o%#1&Pe#"2\'8e#!e#"o(#1)P"2*8e#!e#"o+#1,Mw-y'];
const __ΩIteratorResult = ['T', 'TReturn', () => __ΩIteratorYieldResult, () => __ΩIteratorReturnResult, 'IteratorResult', 'b!"c"Pe"!o#"e""o$"Jw%y'];
const __ΩIteratorYieldResult = ['TYield', false, 'done', 'value', 'IteratorYieldResult', 'b!P."4#8e"!4$Mw%y'];
const __ΩIteratorReturnResult = ['TReturn', true, 'done', 'value', 'IteratorReturnResult', 'b!P."4#e"!4$Mw%y'];
eachKey.__type = [() => __ΩArrayLike, 'object', () => __ΩIterableIterator, 'eachKey', 'P"o!"2"\'o#"/$'];

@@ -8,0 +8,0 @@ eachKey.__type = ['object', () => __ΩIterableIterator, 'eachKey', 'P"2!&o""/#'];

@@ -34,21 +34,23 @@ function __assignType(fn, args) {

return (Promise.Ω = [['$']], new Promise(__assignType((resolve, reject) => {
const ourTake = () => {
LOCKS[this.id].time = Date.now() / 1000;
this.holding = true;
resolve();
if (ttl) {
this.ttlTimeout = setTimeout(() => {
this.unlock();
}, ttl * 1000);
if (LOCKS[this.id]) {
let timeoutId;
const ourTake = () => {
LOCKS[this.id].time = Date.now() / 1000;
clearTimeout(timeoutId);
this.holding = true;
resolve();
if (ttl) {
this.ttlTimeout = setTimeout(() => {
this.unlock();
}, ttl * 1000);
}
};
if (timeout > 0) {
timeoutId = setTimeout(() => {
if (LOCKS[this.id])
arrayRemoveItem(LOCKS[this.id].queue, ourTake);
//reject is never handled when resolve is called first
reject('Lock timed out ' + this.id);
}, timeout * 1000);
}
};
if (timeout > 0) {
setTimeout(() => {
if (LOCKS[this.id])
arrayRemoveItem(LOCKS[this.id].queue, ourTake);
//reject is never handled when resolve is called first
reject('Lock timed out ' + this.id);
}, timeout * 1000);
}
if (LOCKS[this.id]) {
LOCKS[this.id].queue.push(ourTake);

@@ -55,0 +57,0 @@ }

@@ -1,5 +0,5 @@

const __ΩInjectMeta = ['T', "inject", '__meta', '!c!PP!P."e$!GK4#8My'];
const __ΩInjectMeta = ['T', "inject", '__meta', 'InjectMeta', '!c!PP!P."e$!GK4#8Mw$y'];
export { __ΩInjectMeta as __ΩInjectMeta };
const __ΩInject = ['Type', 'Token', () => __ΩInjectMeta, 'b!!c"Pe"!e""o#"Ky'];
const __ΩInject = ['Type', 'Token', () => __ΩInjectMeta, 'Inject', 'b!!c"Pe"!e""o#"Kw$y'];
export { __ΩInject as __ΩInject };
//# sourceMappingURL=types.js.map
{
"name": "@deepkit/core",
"version": "1.0.1-alpha.114",
"version": "1.0.1-alpha.121",
"description": "Deepkit core library",

@@ -50,3 +50,3 @@ "type": "commonjs",

},
"gitHead": "075b5b53a53327d280ea59cce9fe51cc998e2141"
"gitHead": "47cccf148d5e47cd65f2a9853b09041e43cafa26"
}

@@ -38,24 +38,23 @@ /*

return new Promise<void>((resolve, reject) => {
const ourTake = () => {
LOCKS[this.id].time = Date.now() / 1000;
if (LOCKS[this.id]) {
let timeoutId: any;
const ourTake = () => {
LOCKS[this.id].time = Date.now() / 1000;
clearTimeout(timeoutId);
this.holding = true;
resolve();
this.holding = true;
resolve();
if (ttl) {
this.ttlTimeout = setTimeout(() => {
this.unlock();
}, ttl * 1000);
if (ttl) {
this.ttlTimeout = setTimeout(() => {
this.unlock();
}, ttl * 1000);
}
};
if (timeout > 0) {
timeoutId = setTimeout(() => {
if (LOCKS[this.id]) arrayRemoveItem(LOCKS[this.id].queue, ourTake);
//reject is never handled when resolve is called first
reject('Lock timed out ' + this.id);
}, timeout * 1000);
}
};
if (timeout > 0) {
setTimeout(() => {
if (LOCKS[this.id]) arrayRemoveItem(LOCKS[this.id].queue, ourTake);
//reject is never handled when resolve is called first
reject('Lock timed out ' + this.id);
}, timeout * 1000);
}
if (LOCKS[this.id]) {
LOCKS[this.id].queue.push(ourTake);

@@ -62,0 +61,0 @@ } else {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc