@squared-functions/types
Advanced tools
Comparing version 4.9.7 to 4.9.8
@@ -183,2 +183,24 @@ /// <reference path="./lib/type.d.ts" /> | ||
interface DB_TRANSACTION { | ||
ACTIVE: 1; | ||
PARTIAL: 2; | ||
COMMIT: 4; | ||
TERMINATE: 8; | ||
ABORT: 16; | ||
FAIL: 32; | ||
AUTH: 64; | ||
CACHE: 128; | ||
} | ||
const DB_TRANSACTION: { | ||
ACTIVE: 1; | ||
PARTIAL: 2; | ||
COMMIT: 4; | ||
TERMINATE: 8; | ||
ABORT: 16; | ||
FAIL: 32; | ||
AUTH: 64; | ||
CACHE: 128; | ||
}; | ||
interface WATCH_EVENT { | ||
@@ -198,2 +220,12 @@ MODIFIED: "modified"; | ||
interface THRESHOLD { | ||
WATCH_INTERVAL: number; | ||
WATCH_CHANGE: number; | ||
} | ||
const THRESHOLD: { | ||
WATCH_INTERVAL: number; | ||
WATCH_CHANGE: number; | ||
}; | ||
type FetchType = FETCH_TYPE[keyof FETCH_TYPE]; | ||
@@ -200,0 +232,0 @@ type WatchEventValue = WATCH_EVENT[keyof WATCH_EVENT]; |
35
index.js
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.generateUUID = exports.purgeMemory = exports.errorMessage = exports.errorValue = exports.validateUUID = exports.randomString = exports.decryptUTF8 = exports.encryptUTF8 = exports.getEncoding = exports.asFunction = exports.coerceObject = exports.cloneObject = exports.cascadeObject = exports.formatSize = exports.renameExt = exports.escapePattern = exports.hasGlob = exports.convertTime = exports.formatTime = exports.parseExpires = exports.parseTime = exports.isEmpty = exports.isString = exports.isObject = exports.isPlainObject = exports.isArray = exports.setTempDir = exports.getTempDir = exports.setLogCurrent = exports.getLogCurrent = exports.existsFlag = exports.mainFlag = exports.processFlag = exports.modifiedFlag = exports.watchFlag = exports.usingFlag = exports.cloneFlag = exports.ignoreFlag = exports.hasBit = exports.createAbortError = exports.WATCH_EVENT = exports.DB_TYPE = exports.FETCH_TYPE = exports.DOWNLOAD_TYPE = exports.ERR_CODE = exports.ASSET_FLAG = exports.FILE_TYPE = exports.STATUS_TYPE = exports.LOG_TYPE = void 0; | ||
exports.purgeMemory = exports.errorMessage = exports.errorValue = exports.validateUUID = exports.randomString = exports.decryptUTF8 = exports.encryptUTF8 = exports.getEncoding = exports.asFunction = exports.coerceObject = exports.cloneObject = exports.cascadeObject = exports.formatSize = exports.renameExt = exports.escapePattern = exports.hasGlob = exports.convertTime = exports.formatTime = exports.parseExpires = exports.parseTime = exports.isEmpty = exports.isString = exports.isObject = exports.isPlainObject = exports.isArray = exports.setTempDir = exports.getTempDir = exports.setLogCurrent = exports.getLogCurrent = exports.existsFlag = exports.mainFlag = exports.processFlag = exports.modifiedFlag = exports.watchFlag = exports.usingFlag = exports.cloneFlag = exports.ignoreFlag = exports.hasBit = exports.createAbortError = exports.THRESHOLD = exports.WATCH_EVENT = exports.DB_TRANSACTION = exports.DB_TYPE = exports.FETCH_TYPE = exports.DOWNLOAD_TYPE = exports.ERR_CODE = exports.ASSET_FLAG = exports.FILE_TYPE = exports.STATUS_TYPE = exports.LOG_TYPE = void 0; | ||
exports.generateUUID = void 0; | ||
const path = require("path"); | ||
@@ -227,2 +228,13 @@ const fs = require("fs"); | ||
})(DB_TYPE = exports.DB_TYPE || (exports.DB_TYPE = {})); | ||
var DB_TRANSACTION; | ||
(function (DB_TRANSACTION) { | ||
DB_TRANSACTION[DB_TRANSACTION["ACTIVE"] = 1] = "ACTIVE"; | ||
DB_TRANSACTION[DB_TRANSACTION["PARTIAL"] = 2] = "PARTIAL"; | ||
DB_TRANSACTION[DB_TRANSACTION["COMMIT"] = 4] = "COMMIT"; | ||
DB_TRANSACTION[DB_TRANSACTION["TERMINATE"] = 8] = "TERMINATE"; | ||
DB_TRANSACTION[DB_TRANSACTION["ABORT"] = 16] = "ABORT"; | ||
DB_TRANSACTION[DB_TRANSACTION["FAIL"] = 32] = "FAIL"; | ||
DB_TRANSACTION[DB_TRANSACTION["AUTH"] = 64] = "AUTH"; | ||
DB_TRANSACTION[DB_TRANSACTION["CACHE"] = 128] = "CACHE"; | ||
})(DB_TRANSACTION = exports.DB_TRANSACTION || (exports.DB_TRANSACTION = {})); | ||
var WATCH_EVENT; | ||
@@ -235,2 +247,7 @@ (function (WATCH_EVENT) { | ||
})(WATCH_EVENT = exports.WATCH_EVENT || (exports.WATCH_EVENT = {})); | ||
var THRESHOLD; | ||
(function (THRESHOLD) { | ||
THRESHOLD[THRESHOLD["WATCH_INTERVAL"] = 500] = "WATCH_INTERVAL"; | ||
THRESHOLD[THRESHOLD["WATCH_CHANGE"] = 100] = "WATCH_CHANGE"; | ||
})(THRESHOLD = exports.THRESHOLD || (exports.THRESHOLD = {})); | ||
function createAbortError() { | ||
@@ -245,31 +262,31 @@ return new AbortError(); | ||
function ignoreFlag(value) { | ||
return typeof value === 'number' && (value & 1 /* INTERNAL.ASSET_FLAG_IGNORE */) === 1 /* INTERNAL.ASSET_FLAG_IGNORE */; | ||
return typeof value === 'number' && (value & 1 /* IASSET_FLAG.IGNORE */) === 1 /* IASSET_FLAG.IGNORE */; | ||
} | ||
exports.ignoreFlag = ignoreFlag; | ||
function cloneFlag(value) { | ||
return typeof value === 'number' && (value & 2 /* INTERNAL.ASSET_FLAG_CLONE */) === 2 /* INTERNAL.ASSET_FLAG_CLONE */; | ||
return typeof value === 'number' && (value & 2 /* IASSET_FLAG.CLONE */) === 2 /* IASSET_FLAG.CLONE */; | ||
} | ||
exports.cloneFlag = cloneFlag; | ||
function usingFlag(value) { | ||
return typeof value === 'number' && (value & 4 /* INTERNAL.ASSET_FLAG_USING */) === 4 /* INTERNAL.ASSET_FLAG_USING */; | ||
return typeof value === 'number' && (value & 4 /* IASSET_FLAG.USING */) === 4 /* IASSET_FLAG.USING */; | ||
} | ||
exports.usingFlag = usingFlag; | ||
function watchFlag(value) { | ||
return typeof value === 'number' && (value & 8 /* INTERNAL.ASSET_FLAG_WATCH */) === 8 /* INTERNAL.ASSET_FLAG_WATCH */; | ||
return typeof value === 'number' && (value & 8 /* IASSET_FLAG.WATCH */) === 8 /* IASSET_FLAG.WATCH */; | ||
} | ||
exports.watchFlag = watchFlag; | ||
function modifiedFlag(value) { | ||
return typeof value === 'number' && (value & 16 /* INTERNAL.ASSET_FLAG_MODIFIED */) === 16 /* INTERNAL.ASSET_FLAG_MODIFIED */; | ||
return typeof value === 'number' && (value & 16 /* IASSET_FLAG.MODIFIED */) === 16 /* IASSET_FLAG.MODIFIED */; | ||
} | ||
exports.modifiedFlag = modifiedFlag; | ||
function processFlag(value) { | ||
return typeof value === 'number' && (value & 32 /* INTERNAL.ASSET_FLAG_PROCESS */) === 32 /* INTERNAL.ASSET_FLAG_PROCESS */; | ||
return typeof value === 'number' && (value & 32 /* IASSET_FLAG.PROCESS */) === 32 /* IASSET_FLAG.PROCESS */; | ||
} | ||
exports.processFlag = processFlag; | ||
function mainFlag(value) { | ||
return typeof value === 'number' && (value & 64 /* INTERNAL.ASSET_FLAG_MAIN */) === 64 /* INTERNAL.ASSET_FLAG_MAIN */; | ||
return typeof value === 'number' && (value & 64 /* IASSET_FLAG.MAIN */) === 64 /* IASSET_FLAG.MAIN */; | ||
} | ||
exports.mainFlag = mainFlag; | ||
function existsFlag(value) { | ||
return typeof value === 'number' && (value & 128 /* INTERNAL.ASSET_FLAG_EXISTS */) === 128 /* INTERNAL.ASSET_FLAG_EXISTS */; | ||
return typeof value === 'number' && (value & 128 /* IASSET_FLAG.EXISTS */) === 128 /* IASSET_FLAG.EXISTS */; | ||
} | ||
@@ -276,0 +293,0 @@ exports.existsFlag = existsFlag; |
@@ -35,3 +35,3 @@ import type { DataSource, DbDataSource } from './squared'; | ||
interface ExecuteAction<T = unknown> { | ||
export interface ExecuteAction<T = unknown> { | ||
params?: T; | ||
@@ -243,8 +243,8 @@ } | ||
export interface DbPoolConstructor<T extends DbDataSource = DbDataSource, U = unknown> { | ||
findKey<V extends IDbPool, W extends DbDataSource>(pools: ObjectMap<V>, uuidKey: unknown, poolKey: Undef<string>, ...items: W[]): Null<V>; | ||
validateKey<V extends IDbPool>(pools: ObjectMap<V>, username: string, uuidKey: unknown): [string, Null<V>]; | ||
checkTimeout<V extends IDbPool>(pools: ObjectMap<V>, value: number, limit?: number): Promise<number>; | ||
readonly prototype: IDbPool<T, U>; | ||
new(pool: U, poolKey: string, uuidKey?: string): IDbPool<T, U>; | ||
export interface DbPoolConstructor<T extends DbDataSource = DbDataSource, U = unknown, V = unknown> { | ||
findKey<W extends IDbPool, X extends DbDataSource>(pools: ObjectMap<W>, uuidKey: unknown, poolKey: Undef<string>, ...items: X[]): Null<W>; | ||
validateKey<W extends IDbPool>(pools: ObjectMap<W>, username: string, uuidKey: unknown): [string, Null<W>]; | ||
checkTimeout<W extends IDbPool>(pools: ObjectMap<W>, value: number, limit?: number): Promise<number>; | ||
readonly prototype: IDbPool<T, U, V>; | ||
new(pool: U, poolKey: string, uuidKey?: Null<AuthValue>): IDbPool<T, U, V>; | ||
} | ||
@@ -251,0 +251,0 @@ |
@@ -146,3 +146,4 @@ import type { LocationUri, MimeTypeAction, StorageAction } from './squared'; | ||
readonly prototype: SourceMap; | ||
new(code: string, uri?: string): SourceMap; | ||
new(code: string, remove: boolean): SourceMap; | ||
new(code: string, uri?: string, remove?: boolean): SourceMap; | ||
} | ||
@@ -149,0 +150,0 @@ |
@@ -290,3 +290,4 @@ /* eslint @typescript-eslint/no-explicit-any: "off" */ | ||
finalize(this: T, instance: V): Promise<unknown>; | ||
createSourceMap(code: string, uri?: string): SourceMap; | ||
createSourceMap(code: string, remove: boolean): SourceMap; | ||
createSourceMap(code: string, uri?: string, remove?: boolean): SourceMap; | ||
writeSourceMap(uri: string, data: SourceCode, options?: SourceMapOptions): Undef<string>; | ||
@@ -293,0 +294,0 @@ updateGradle(source: string, namespaces: string[], value: string, options?: UpdateGradleOptions | boolean): string; |
{ | ||
"name": "@squared-functions/types", | ||
"version": "4.9.7", | ||
"version": "4.9.8", | ||
"description": "Type definitions for squared-functions.", | ||
@@ -5,0 +5,0 @@ "types": "index.d.ts", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
177463
28
4097