@launchtray/hatch-util
Advanced tools
Comparing version 0.23.0-alpha.14 to 0.23.0-alpha.15
@@ -7,3 +7,3 @@ import { DependencyContainer } from '@launchtray/tsyringe-async'; | ||
import { ErrorReporter } from './ErrorReporter'; | ||
import { Class, containerSingleton, initializeInjection, initializer, inject, injectAll, injectable, InjectionInitializationContext, resolveParams, ROOT_CONTAINER } from './injection'; | ||
import { addMetadata, Class, containerSingleton, initializeInjection, initializer, inject, injectAll, injectable, InjectionInitializationContext, resolveParams, ROOT_CONTAINER } from './injection'; | ||
import { Logger } from './Logger'; | ||
@@ -16,2 +16,2 @@ import { NON_LOGGER, NonLogger } from './NonLogger'; | ||
import StreamUtils from './StreamUtils'; | ||
export { ALT_ACTION_CODE_KEY, ALT_ACTION_KEY, getTypeHint, setTypeHint, isPrimitive, AnyJson, AnyJsonObject, ApiAlternateAction, ApiDelegateResponse, ApiError, Class, CompletableFuture, ConsoleLogger, containerSingleton, delay, delegate, DependencyContainer, ErrorReporter, getAlternateAction, getStatusCode, initializeInjection, initializer, inject, injectable, injectAll, InjectionInitializationContext, isApiAlternateAction, isApiError, isStream, Logger, NON_LOGGER, NonLogger, PREVENT_DEFAULT_RESPONSE, PREVENT_DEFAULT_RESPONSE_CODE, preventsDefaultResponse, resolveParams, ROOT_CONTAINER, SentryMonitor, SentryReporter, StreamUtils, }; | ||
export { addMetadata, ALT_ACTION_CODE_KEY, ALT_ACTION_KEY, getTypeHint, setTypeHint, isPrimitive, AnyJson, AnyJsonObject, ApiAlternateAction, ApiDelegateResponse, ApiError, Class, CompletableFuture, ConsoleLogger, containerSingleton, delay, delegate, DependencyContainer, ErrorReporter, getAlternateAction, getStatusCode, initializeInjection, initializer, inject, injectable, injectAll, InjectionInitializationContext, isApiAlternateAction, isApiError, isStream, Logger, NON_LOGGER, NonLogger, PREVENT_DEFAULT_RESPONSE, PREVENT_DEFAULT_RESPONSE_CODE, preventsDefaultResponse, resolveParams, ROOT_CONTAINER, SentryMonitor, SentryReporter, StreamUtils, }; |
@@ -6,3 +6,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.StreamUtils = exports.SentryReporter = exports.ROOT_CONTAINER = exports.resolveParams = exports.preventsDefaultResponse = exports.PREVENT_DEFAULT_RESPONSE_CODE = exports.PREVENT_DEFAULT_RESPONSE = exports.NonLogger = exports.NON_LOGGER = exports.isStream = exports.isApiError = exports.isApiAlternateAction = exports.injectAll = exports.injectable = exports.inject = exports.initializer = exports.initializeInjection = exports.getStatusCode = exports.getAlternateAction = exports.delegate = exports.delay = exports.containerSingleton = exports.ConsoleLogger = exports.CompletableFuture = exports.ApiError = exports.ApiAlternateAction = exports.isPrimitive = exports.setTypeHint = exports.getTypeHint = exports.ALT_ACTION_KEY = exports.ALT_ACTION_CODE_KEY = void 0; | ||
exports.StreamUtils = exports.SentryReporter = exports.ROOT_CONTAINER = exports.resolveParams = exports.preventsDefaultResponse = exports.PREVENT_DEFAULT_RESPONSE_CODE = exports.PREVENT_DEFAULT_RESPONSE = exports.NonLogger = exports.NON_LOGGER = exports.isStream = exports.isApiError = exports.isApiAlternateAction = exports.injectAll = exports.injectable = exports.inject = exports.initializer = exports.initializeInjection = exports.getStatusCode = exports.getAlternateAction = exports.delegate = exports.delay = exports.containerSingleton = exports.ConsoleLogger = exports.CompletableFuture = exports.ApiError = exports.ApiAlternateAction = exports.isPrimitive = exports.setTypeHint = exports.getTypeHint = exports.ALT_ACTION_KEY = exports.ALT_ACTION_CODE_KEY = exports.addMetadata = void 0; | ||
const ConsoleLogger_1 = require("./ConsoleLogger"); | ||
@@ -15,2 +15,3 @@ Object.defineProperty(exports, "ConsoleLogger", { enumerable: true, get: function () { return ConsoleLogger_1.ConsoleLogger; } }); | ||
const injection_1 = require("./injection"); | ||
Object.defineProperty(exports, "addMetadata", { enumerable: true, get: function () { return injection_1.addMetadata; } }); | ||
Object.defineProperty(exports, "containerSingleton", { enumerable: true, get: function () { return injection_1.containerSingleton; } }); | ||
@@ -17,0 +18,0 @@ Object.defineProperty(exports, "initializeInjection", { enumerable: true, get: function () { return injection_1.initializeInjection; } }); |
@@ -16,2 +16,3 @@ import 'reflect-metadata'; | ||
export declare const initializeInjection: (context?: InjectionInitializationContext) => void; | ||
export declare const addMetadata: () => (target: unknown, propertyKey: string, descriptor: PropertyDescriptor) => void; | ||
export declare const injectable: <T>() => (target: Class<T>) => void; | ||
@@ -18,0 +19,0 @@ export declare const ROOT_CONTAINER: DependencyContainer; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.initializer = exports.resolveParams = exports.containerSingleton = exports.ROOT_CONTAINER = exports.injectable = exports.initializeInjection = exports.injectAll = exports.inject = void 0; | ||
exports.initializer = exports.resolveParams = exports.containerSingleton = exports.ROOT_CONTAINER = exports.injectable = exports.addMetadata = exports.initializeInjection = exports.injectAll = exports.inject = void 0; | ||
require("reflect-metadata"); | ||
@@ -65,2 +65,8 @@ const tsyringe_async_1 = require("@launchtray/tsyringe-async"); | ||
exports.initializeInjection = initializeInjection; | ||
// No-op decorator to force metadata to be emitted | ||
const addMetadata = () => { | ||
// eslint-disable-next-line @typescript-eslint/no-empty-function,@typescript-eslint/no-unused-vars | ||
return (target, propertyKey, descriptor) => { }; | ||
}; | ||
exports.addMetadata = addMetadata; | ||
exports.injectable = tsyringe_async_1.injectable; | ||
@@ -67,0 +73,0 @@ exports.ROOT_CONTAINER = tsyringe_async_1.container; |
{ | ||
"name": "@launchtray/hatch-util", | ||
"version": "0.23.0-alpha.14", | ||
"version": "0.23.0-alpha.15", | ||
"description": "Utilities used by several other hatch modules", | ||
@@ -29,5 +29,5 @@ "main": "./dist/index.js", | ||
"typescript": "4.9.5", | ||
"@launchtray/hatch-eslint-config": "0.23.0-alpha.14", | ||
"@launchtray/hatch-jest-config": "0.23.0-alpha.14", | ||
"@launchtray/hatch-test": "0.23.0-alpha.14" | ||
"@launchtray/hatch-eslint-config": "0.23.0-alpha.15", | ||
"@launchtray/hatch-jest-config": "0.23.0-alpha.15", | ||
"@launchtray/hatch-test": "0.23.0-alpha.15" | ||
}, | ||
@@ -34,0 +34,0 @@ "peerDependencies": { |
@@ -8,2 +8,3 @@ import {DependencyContainer} from '@launchtray/tsyringe-async'; | ||
import { | ||
addMetadata, | ||
Class, | ||
@@ -46,2 +47,3 @@ containerSingleton, | ||
export { | ||
addMetadata, | ||
ALT_ACTION_CODE_KEY, | ||
@@ -48,0 +50,0 @@ ALT_ACTION_KEY, |
@@ -86,2 +86,8 @@ import 'reflect-metadata'; | ||
// No-op decorator to force metadata to be emitted | ||
export const addMetadata = () => { | ||
// eslint-disable-next-line @typescript-eslint/no-empty-function,@typescript-eslint/no-unused-vars | ||
return (target: unknown, propertyKey: string, descriptor: PropertyDescriptor) => {}; | ||
}; | ||
export const injectable: <T>() => (target: Class<T>) => void = tsyringe_injectable; | ||
@@ -88,0 +94,0 @@ export const ROOT_CONTAINER: DependencyContainer = tsyringe_container; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
95986
1951