Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@carpasse/dapi

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@carpasse/dapi - npm Package Compare versions

Comparing version 1.1.0 to 1.1.1-beta.1

98

dist/cjs/createDapi.d.ts

@@ -1,4 +0,4 @@

import { DapiDefinition } from './DapiMixin';
import { DapiFns } from './types';
import { Constructor } from './types/utils';
import { DapiDefinition } from './DapiMixin.js';
import type { DapiFns } from './types/index.js';
import { Constructor } from './types/utils.js';
/**

@@ -16,11 +16,11 @@ * Creates an Dapi facade.

readonly __decoratedFns: (keyof API)[];
readonly __facade: { [key in keyof API]: (...args: import("./types/utils").ExtractFirstParam<API[key]>) => ReturnType<API[key]>; };
readonly decorators: keyof API extends infer T_1 extends keyof API ? { [key_1 in T_1]?: import("./types").DecoratorFn<API[key_1], any>[] | undefined; } : never;
readonly __facade: { [key in keyof API]: (...args: import("./types/utils.js").ExtractFirstParam<API[key]>) => ReturnType<API[key]>; };
readonly decorators: keyof API extends infer T_1 extends keyof API ? { [key_1 in T_1]?: import("./types/index.js").DecoratorFn<API[key_1], any>[] | undefined; } : never;
readonly hooks: keyof API extends infer T_2 extends keyof API ? { [key_2 in T_2]: {
pre: import("./types").HookFn<API[key_2], any>[];
post: import("./types").HookFn<API[key_2], any>[];
pre: import("./types/index.js").HookFn<API[key_2], any>[];
post: import("./types/index.js").HookFn<API[key_2], any>[];
}; } : never;
readonly type: string;
readonly name: string | undefined;
__makeFacade(): { [key in keyof API]: (...args: import("./types/utils").ExtractFirstParam<API[key]>) => ReturnType<API[key]>; };
__makeFacade(): { [key in keyof API]: (...args: import("./types/utils.js").ExtractFirstParam<API[key]>) => ReturnType<API[key]>; };
__makeDecorable<KEY extends keyof API>(key: KEY): void;

@@ -34,14 +34,14 @@ unmakeDecorable<KEY_1 extends keyof API>(key: KEY_1): void;

toString(): string;
addDecorator<KEY_2 extends keyof API>(key: KEY_2, decorator: import("./types").DecoratorFn<API[KEY_2], any>): () => void;
decorateAll(decorator: import("./types").DecoratorFn<API[keyof API], any>): () => void;
removeDecorator<KEY_3 extends keyof API>(key: KEY_3, decorator: import("./types").DecoratorFn<API[KEY_3], any>): void;
addHook<KEY_4 extends keyof API>(hookType: "pre" | "post", key: KEY_4, hook: import("./types").HookFn<API[KEY_4], any>): () => void;
removeHook<KEY_5 extends keyof API>(hookType: "pre" | "post", key: KEY_5, hook: import("./types").HookFn<API[KEY_5], any>): void;
addPreHook<KEY_6 extends keyof API>(key: KEY_6, hook: import("./types").HookFn<API[KEY_6], any>): () => void;
addPostHook<KEY_7 extends keyof API>(key: KEY_7, hook: import("./types").HookFn<API[KEY_7], any>): () => void;
removePreHook<KEY_8 extends keyof API>(key: KEY_8, hook: import("./types").HookFn<API[KEY_8], any>): void;
removePostHook<KEY_9 extends keyof API>(key: KEY_9, hook: import("./types").HookFn<API[KEY_9], any>): void;
__hookDecorator<KEY_10 extends keyof API>(key: KEY_10): import("./types").DecoratorFn<API[KEY_10], any> | undefined;
addDecorator<KEY_2 extends keyof API>(key: KEY_2, decorator: import("./types/index.js").DecoratorFn<API[KEY_2], any>): () => void;
decorateAll(decorator: import("./types/index.js").DecoratorFn<API[keyof API], any>): () => void;
removeDecorator<KEY_3 extends keyof API>(key: KEY_3, decorator: import("./types/index.js").DecoratorFn<API[KEY_3], any>): void;
addHook<KEY_4 extends keyof API>(hookType: "pre" | "post", key: KEY_4, hook: import("./types/index.js").HookFn<API[KEY_4], any>): () => void;
removeHook<KEY_5 extends keyof API>(hookType: "pre" | "post", key: KEY_5, hook: import("./types/index.js").HookFn<API[KEY_5], any>): void;
addPreHook<KEY_6 extends keyof API>(key: KEY_6, hook: import("./types/index.js").HookFn<API[KEY_6], any>): () => void;
addPostHook<KEY_7 extends keyof API>(key: KEY_7, hook: import("./types/index.js").HookFn<API[KEY_7], any>): () => void;
removePreHook<KEY_8 extends keyof API>(key: KEY_8, hook: import("./types/index.js").HookFn<API[KEY_8], any>): void;
removePostHook<KEY_9 extends keyof API>(key: KEY_9, hook: import("./types/index.js").HookFn<API[KEY_9], any>): void;
__hookDecorator<KEY_10 extends keyof API>(key: KEY_10): import("./types/index.js").DecoratorFn<API[KEY_10], any> | undefined;
};
} & T> & { [key in keyof API]: (...args: import("./types/utils").ExtractFirstParam<API[key]>) => ReturnType<API[key]>; } & ThisType<InstanceType<{
} & T> & { [key in keyof API]: (...args: import("./types/utils.js").ExtractFirstParam<API[key]>) => ReturnType<API[key]>; } & ThisType<InstanceType<{
new (...args: any[]): {

@@ -51,11 +51,11 @@ readonly __definition: DapiDefinition<DEPENDENCIES, API>;

readonly __decoratedFns: (keyof API)[];
readonly __facade: { [key in keyof API]: (...args: import("./types/utils").ExtractFirstParam<API[key]>) => ReturnType<API[key]>; };
readonly decorators: keyof API extends infer T_3 extends keyof API ? { [key_1 in T_3]?: import("./types").DecoratorFn<API[key_1], any>[] | undefined; } : never;
readonly __facade: { [key in keyof API]: (...args: import("./types/utils.js").ExtractFirstParam<API[key]>) => ReturnType<API[key]>; };
readonly decorators: keyof API extends infer T_3 extends keyof API ? { [key_1 in T_3]?: import("./types/index.js").DecoratorFn<API[key_1], any>[] | undefined; } : never;
readonly hooks: keyof API extends infer T_4 extends keyof API ? { [key_2 in T_4]: {
pre: import("./types").HookFn<API[key_2], any>[];
post: import("./types").HookFn<API[key_2], any>[];
pre: import("./types/index.js").HookFn<API[key_2], any>[];
post: import("./types/index.js").HookFn<API[key_2], any>[];
}; } : never;
readonly type: string;
readonly name: string | undefined;
__makeFacade(): { [key in keyof API]: (...args: import("./types/utils").ExtractFirstParam<API[key]>) => ReturnType<API[key]>; };
__makeFacade(): { [key in keyof API]: (...args: import("./types/utils.js").ExtractFirstParam<API[key]>) => ReturnType<API[key]>; };
__makeDecorable<KEY extends keyof API>(key: KEY): void;

@@ -69,12 +69,12 @@ unmakeDecorable<KEY_1 extends keyof API>(key: KEY_1): void;

toString(): string;
addDecorator<KEY_2 extends keyof API>(key: KEY_2, decorator: import("./types").DecoratorFn<API[KEY_2], any>): () => void;
decorateAll(decorator: import("./types").DecoratorFn<API[keyof API], any>): () => void;
removeDecorator<KEY_3 extends keyof API>(key: KEY_3, decorator: import("./types").DecoratorFn<API[KEY_3], any>): void;
addHook<KEY_4 extends keyof API>(hookType: "pre" | "post", key: KEY_4, hook: import("./types").HookFn<API[KEY_4], any>): () => void;
removeHook<KEY_5 extends keyof API>(hookType: "pre" | "post", key: KEY_5, hook: import("./types").HookFn<API[KEY_5], any>): void;
addPreHook<KEY_6 extends keyof API>(key: KEY_6, hook: import("./types").HookFn<API[KEY_6], any>): () => void;
addPostHook<KEY_7 extends keyof API>(key: KEY_7, hook: import("./types").HookFn<API[KEY_7], any>): () => void;
removePreHook<KEY_8 extends keyof API>(key: KEY_8, hook: import("./types").HookFn<API[KEY_8], any>): void;
removePostHook<KEY_9 extends keyof API>(key: KEY_9, hook: import("./types").HookFn<API[KEY_9], any>): void;
__hookDecorator<KEY_10 extends keyof API>(key: KEY_10): import("./types").DecoratorFn<API[KEY_10], any> | undefined;
addDecorator<KEY_2 extends keyof API>(key: KEY_2, decorator: import("./types/index.js").DecoratorFn<API[KEY_2], any>): () => void;
decorateAll(decorator: import("./types/index.js").DecoratorFn<API[keyof API], any>): () => void;
removeDecorator<KEY_3 extends keyof API>(key: KEY_3, decorator: import("./types/index.js").DecoratorFn<API[KEY_3], any>): void;
addHook<KEY_4 extends keyof API>(hookType: "pre" | "post", key: KEY_4, hook: import("./types/index.js").HookFn<API[KEY_4], any>): () => void;
removeHook<KEY_5 extends keyof API>(hookType: "pre" | "post", key: KEY_5, hook: import("./types/index.js").HookFn<API[KEY_5], any>): void;
addPreHook<KEY_6 extends keyof API>(key: KEY_6, hook: import("./types/index.js").HookFn<API[KEY_6], any>): () => void;
addPostHook<KEY_7 extends keyof API>(key: KEY_7, hook: import("./types/index.js").HookFn<API[KEY_7], any>): () => void;
removePreHook<KEY_8 extends keyof API>(key: KEY_8, hook: import("./types/index.js").HookFn<API[KEY_8], any>): void;
removePostHook<KEY_9 extends keyof API>(key: KEY_9, hook: import("./types/index.js").HookFn<API[KEY_9], any>): void;
__hookDecorator<KEY_10 extends keyof API>(key: KEY_10): import("./types/index.js").DecoratorFn<API[KEY_10], any> | undefined;
};

@@ -85,11 +85,11 @@ } & T>> & {

readonly __decoratedFns: (keyof API)[];
readonly __facade: { [key in keyof API]: (...args: import("./types/utils").ExtractFirstParam<API[key]>) => ReturnType<API[key]>; };
readonly decorators: keyof API extends infer T_5 extends keyof API ? { [key_1 in T_5]?: import("./types").DecoratorFn<API[key_1], any>[] | undefined; } : never;
readonly __facade: { [key in keyof API]: (...args: import("./types/utils.js").ExtractFirstParam<API[key]>) => ReturnType<API[key]>; };
readonly decorators: keyof API extends infer T_5 extends keyof API ? { [key_1 in T_5]?: import("./types/index.js").DecoratorFn<API[key_1], any>[] | undefined; } : never;
readonly hooks: keyof API extends infer T_6 extends keyof API ? { [key_2 in T_6]: {
pre: import("./types").HookFn<API[key_2], any>[];
post: import("./types").HookFn<API[key_2], any>[];
pre: import("./types/index.js").HookFn<API[key_2], any>[];
post: import("./types/index.js").HookFn<API[key_2], any>[];
}; } : never;
readonly type: string;
readonly name: string | undefined;
__makeFacade(): { [key in keyof API]: (...args: import("./types/utils").ExtractFirstParam<API[key]>) => ReturnType<API[key]>; };
__makeFacade(): { [key in keyof API]: (...args: import("./types/utils.js").ExtractFirstParam<API[key]>) => ReturnType<API[key]>; };
__makeDecorable<KEY extends keyof API>(key: KEY): void;

@@ -103,12 +103,12 @@ unmakeDecorable<KEY_1 extends keyof API>(key: KEY_1): void;

toString(): string;
addDecorator<KEY_2 extends keyof API>(key: KEY_2, decorator: import("./types").DecoratorFn<API[KEY_2], any>): () => void;
decorateAll(decorator: import("./types").DecoratorFn<API[keyof API], any>): () => void;
removeDecorator<KEY_3 extends keyof API>(key: KEY_3, decorator: import("./types").DecoratorFn<API[KEY_3], any>): void;
addHook<KEY_4 extends keyof API>(hookType: "pre" | "post", key: KEY_4, hook: import("./types").HookFn<API[KEY_4], any>): () => void;
removeHook<KEY_5 extends keyof API>(hookType: "pre" | "post", key: KEY_5, hook: import("./types").HookFn<API[KEY_5], any>): void;
addPreHook<KEY_6 extends keyof API>(key: KEY_6, hook: import("./types").HookFn<API[KEY_6], any>): () => void;
addPostHook<KEY_7 extends keyof API>(key: KEY_7, hook: import("./types").HookFn<API[KEY_7], any>): () => void;
removePreHook<KEY_8 extends keyof API>(key: KEY_8, hook: import("./types").HookFn<API[KEY_8], any>): void;
removePostHook<KEY_9 extends keyof API>(key: KEY_9, hook: import("./types").HookFn<API[KEY_9], any>): void;
__hookDecorator<KEY_10 extends keyof API>(key: KEY_10): import("./types").DecoratorFn<API[KEY_10], any> | undefined;
addDecorator<KEY_2 extends keyof API>(key: KEY_2, decorator: import("./types/index.js").DecoratorFn<API[KEY_2], any>): () => void;
decorateAll(decorator: import("./types/index.js").DecoratorFn<API[keyof API], any>): () => void;
removeDecorator<KEY_3 extends keyof API>(key: KEY_3, decorator: import("./types/index.js").DecoratorFn<API[KEY_3], any>): void;
addHook<KEY_4 extends keyof API>(hookType: "pre" | "post", key: KEY_4, hook: import("./types/index.js").HookFn<API[KEY_4], any>): () => void;
removeHook<KEY_5 extends keyof API>(hookType: "pre" | "post", key: KEY_5, hook: import("./types/index.js").HookFn<API[KEY_5], any>): void;
addPreHook<KEY_6 extends keyof API>(key: KEY_6, hook: import("./types/index.js").HookFn<API[KEY_6], any>): () => void;
addPostHook<KEY_7 extends keyof API>(key: KEY_7, hook: import("./types/index.js").HookFn<API[KEY_7], any>): () => void;
removePreHook<KEY_8 extends keyof API>(key: KEY_8, hook: import("./types/index.js").HookFn<API[KEY_8], any>): void;
removePostHook<KEY_9 extends keyof API>(key: KEY_9, hook: import("./types/index.js").HookFn<API[KEY_9], any>): void;
__hookDecorator<KEY_10 extends keyof API>(key: KEY_10): import("./types/index.js").DecoratorFn<API[KEY_10], any> | undefined;
};
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.createDapi = void 0;
const DapiMixin_1 = require("./DapiMixin");
const DapiMixin_js_1 = require("./DapiMixin.js");
/**

@@ -15,3 +15,3 @@ * Creates an Dapi facade.

SuperClass = class {
}) => new ((0, DapiMixin_1.DapiMixin)(definition, SuperClass))();
}) => new ((0, DapiMixin_js_1.DapiMixin)(definition, SuperClass))();
exports.createDapi = createDapi;

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

import { Constructor, ExtractFirstParam } from './types/utils';
import { DapiFns, DecoratorFn, HookFn } from './types';
import { Constructor, ExtractFirstParam } from './types/utils.js';
import { DapiFns, DecoratorFn, HookFn } from './types/index.js';
/**

@@ -4,0 +4,0 @@ * Represents an DAPI definition with dependencies and pure functions.

/**
* @module @carpasse/dapi
*/
export { DapiMixin, type DapiDefinition, type DapiWrapper } from './DapiMixin';
export { DapiMixin, type DapiDefinition, type DapiWrapper } from './DapiMixin.js';
export type { DapiFns, DapiFn, DecoratorFn, HookFn } from './types';
export { createDapi } from './createDapi';
export { createDapi } from './createDapi.js';

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

*/
var DapiMixin_1 = require("./DapiMixin");
Object.defineProperty(exports, "DapiMixin", { enumerable: true, get: function () { return DapiMixin_1.DapiMixin; } });
var createDapi_1 = require("./createDapi");
Object.defineProperty(exports, "createDapi", { enumerable: true, get: function () { return createDapi_1.createDapi; } });
var DapiMixin_js_1 = require("./DapiMixin.js");
Object.defineProperty(exports, "DapiMixin", { enumerable: true, get: function () { return DapiMixin_js_1.DapiMixin; } });
var createDapi_js_1 = require("./createDapi.js");
Object.defineProperty(exports, "createDapi", { enumerable: true, get: function () { return createDapi_js_1.createDapi; } });

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

import { AnyFunction } from './utils';
import { AnyFunction } from './utils.js';
/**

@@ -3,0 +3,0 @@ * Dapi function type. It is a function that receives the dependencies as the first argument.

@@ -1,4 +0,4 @@

import { DapiDefinition } from './DapiMixin';
import { DapiFns } from './types';
import { Constructor } from './types/utils';
import { DapiDefinition } from './DapiMixin.js';
import type { DapiFns } from './types/index.js';
import { Constructor } from './types/utils.js';
/**

@@ -16,11 +16,11 @@ * Creates an Dapi facade.

readonly __decoratedFns: (keyof API)[];
readonly __facade: { [key in keyof API]: (...args: import("./types/utils").ExtractFirstParam<API[key]>) => ReturnType<API[key]>; };
readonly decorators: keyof API extends infer T_1 extends keyof API ? { [key_1 in T_1]?: import("./types").DecoratorFn<API[key_1], any>[] | undefined; } : never;
readonly __facade: { [key in keyof API]: (...args: import("./types/utils.js").ExtractFirstParam<API[key]>) => ReturnType<API[key]>; };
readonly decorators: keyof API extends infer T_1 extends keyof API ? { [key_1 in T_1]?: import("./types/index.js").DecoratorFn<API[key_1], any>[] | undefined; } : never;
readonly hooks: keyof API extends infer T_2 extends keyof API ? { [key_2 in T_2]: {
pre: import("./types").HookFn<API[key_2], any>[];
post: import("./types").HookFn<API[key_2], any>[];
pre: import("./types/index.js").HookFn<API[key_2], any>[];
post: import("./types/index.js").HookFn<API[key_2], any>[];
}; } : never;
readonly type: string;
readonly name: string | undefined;
__makeFacade(): { [key in keyof API]: (...args: import("./types/utils").ExtractFirstParam<API[key]>) => ReturnType<API[key]>; };
__makeFacade(): { [key in keyof API]: (...args: import("./types/utils.js").ExtractFirstParam<API[key]>) => ReturnType<API[key]>; };
__makeDecorable<KEY extends keyof API>(key: KEY): void;

@@ -34,14 +34,14 @@ unmakeDecorable<KEY_1 extends keyof API>(key: KEY_1): void;

toString(): string;
addDecorator<KEY_2 extends keyof API>(key: KEY_2, decorator: import("./types").DecoratorFn<API[KEY_2], any>): () => void;
decorateAll(decorator: import("./types").DecoratorFn<API[keyof API], any>): () => void;
removeDecorator<KEY_3 extends keyof API>(key: KEY_3, decorator: import("./types").DecoratorFn<API[KEY_3], any>): void;
addHook<KEY_4 extends keyof API>(hookType: "pre" | "post", key: KEY_4, hook: import("./types").HookFn<API[KEY_4], any>): () => void;
removeHook<KEY_5 extends keyof API>(hookType: "pre" | "post", key: KEY_5, hook: import("./types").HookFn<API[KEY_5], any>): void;
addPreHook<KEY_6 extends keyof API>(key: KEY_6, hook: import("./types").HookFn<API[KEY_6], any>): () => void;
addPostHook<KEY_7 extends keyof API>(key: KEY_7, hook: import("./types").HookFn<API[KEY_7], any>): () => void;
removePreHook<KEY_8 extends keyof API>(key: KEY_8, hook: import("./types").HookFn<API[KEY_8], any>): void;
removePostHook<KEY_9 extends keyof API>(key: KEY_9, hook: import("./types").HookFn<API[KEY_9], any>): void;
__hookDecorator<KEY_10 extends keyof API>(key: KEY_10): import("./types").DecoratorFn<API[KEY_10], any> | undefined;
addDecorator<KEY_2 extends keyof API>(key: KEY_2, decorator: import("./types/index.js").DecoratorFn<API[KEY_2], any>): () => void;
decorateAll(decorator: import("./types/index.js").DecoratorFn<API[keyof API], any>): () => void;
removeDecorator<KEY_3 extends keyof API>(key: KEY_3, decorator: import("./types/index.js").DecoratorFn<API[KEY_3], any>): void;
addHook<KEY_4 extends keyof API>(hookType: "pre" | "post", key: KEY_4, hook: import("./types/index.js").HookFn<API[KEY_4], any>): () => void;
removeHook<KEY_5 extends keyof API>(hookType: "pre" | "post", key: KEY_5, hook: import("./types/index.js").HookFn<API[KEY_5], any>): void;
addPreHook<KEY_6 extends keyof API>(key: KEY_6, hook: import("./types/index.js").HookFn<API[KEY_6], any>): () => void;
addPostHook<KEY_7 extends keyof API>(key: KEY_7, hook: import("./types/index.js").HookFn<API[KEY_7], any>): () => void;
removePreHook<KEY_8 extends keyof API>(key: KEY_8, hook: import("./types/index.js").HookFn<API[KEY_8], any>): void;
removePostHook<KEY_9 extends keyof API>(key: KEY_9, hook: import("./types/index.js").HookFn<API[KEY_9], any>): void;
__hookDecorator<KEY_10 extends keyof API>(key: KEY_10): import("./types/index.js").DecoratorFn<API[KEY_10], any> | undefined;
};
} & T> & { [key in keyof API]: (...args: import("./types/utils").ExtractFirstParam<API[key]>) => ReturnType<API[key]>; } & ThisType<InstanceType<{
} & T> & { [key in keyof API]: (...args: import("./types/utils.js").ExtractFirstParam<API[key]>) => ReturnType<API[key]>; } & ThisType<InstanceType<{
new (...args: any[]): {

@@ -51,11 +51,11 @@ readonly __definition: DapiDefinition<DEPENDENCIES, API>;

readonly __decoratedFns: (keyof API)[];
readonly __facade: { [key in keyof API]: (...args: import("./types/utils").ExtractFirstParam<API[key]>) => ReturnType<API[key]>; };
readonly decorators: keyof API extends infer T_3 extends keyof API ? { [key_1 in T_3]?: import("./types").DecoratorFn<API[key_1], any>[] | undefined; } : never;
readonly __facade: { [key in keyof API]: (...args: import("./types/utils.js").ExtractFirstParam<API[key]>) => ReturnType<API[key]>; };
readonly decorators: keyof API extends infer T_3 extends keyof API ? { [key_1 in T_3]?: import("./types/index.js").DecoratorFn<API[key_1], any>[] | undefined; } : never;
readonly hooks: keyof API extends infer T_4 extends keyof API ? { [key_2 in T_4]: {
pre: import("./types").HookFn<API[key_2], any>[];
post: import("./types").HookFn<API[key_2], any>[];
pre: import("./types/index.js").HookFn<API[key_2], any>[];
post: import("./types/index.js").HookFn<API[key_2], any>[];
}; } : never;
readonly type: string;
readonly name: string | undefined;
__makeFacade(): { [key in keyof API]: (...args: import("./types/utils").ExtractFirstParam<API[key]>) => ReturnType<API[key]>; };
__makeFacade(): { [key in keyof API]: (...args: import("./types/utils.js").ExtractFirstParam<API[key]>) => ReturnType<API[key]>; };
__makeDecorable<KEY extends keyof API>(key: KEY): void;

@@ -69,12 +69,12 @@ unmakeDecorable<KEY_1 extends keyof API>(key: KEY_1): void;

toString(): string;
addDecorator<KEY_2 extends keyof API>(key: KEY_2, decorator: import("./types").DecoratorFn<API[KEY_2], any>): () => void;
decorateAll(decorator: import("./types").DecoratorFn<API[keyof API], any>): () => void;
removeDecorator<KEY_3 extends keyof API>(key: KEY_3, decorator: import("./types").DecoratorFn<API[KEY_3], any>): void;
addHook<KEY_4 extends keyof API>(hookType: "pre" | "post", key: KEY_4, hook: import("./types").HookFn<API[KEY_4], any>): () => void;
removeHook<KEY_5 extends keyof API>(hookType: "pre" | "post", key: KEY_5, hook: import("./types").HookFn<API[KEY_5], any>): void;
addPreHook<KEY_6 extends keyof API>(key: KEY_6, hook: import("./types").HookFn<API[KEY_6], any>): () => void;
addPostHook<KEY_7 extends keyof API>(key: KEY_7, hook: import("./types").HookFn<API[KEY_7], any>): () => void;
removePreHook<KEY_8 extends keyof API>(key: KEY_8, hook: import("./types").HookFn<API[KEY_8], any>): void;
removePostHook<KEY_9 extends keyof API>(key: KEY_9, hook: import("./types").HookFn<API[KEY_9], any>): void;
__hookDecorator<KEY_10 extends keyof API>(key: KEY_10): import("./types").DecoratorFn<API[KEY_10], any> | undefined;
addDecorator<KEY_2 extends keyof API>(key: KEY_2, decorator: import("./types/index.js").DecoratorFn<API[KEY_2], any>): () => void;
decorateAll(decorator: import("./types/index.js").DecoratorFn<API[keyof API], any>): () => void;
removeDecorator<KEY_3 extends keyof API>(key: KEY_3, decorator: import("./types/index.js").DecoratorFn<API[KEY_3], any>): void;
addHook<KEY_4 extends keyof API>(hookType: "pre" | "post", key: KEY_4, hook: import("./types/index.js").HookFn<API[KEY_4], any>): () => void;
removeHook<KEY_5 extends keyof API>(hookType: "pre" | "post", key: KEY_5, hook: import("./types/index.js").HookFn<API[KEY_5], any>): void;
addPreHook<KEY_6 extends keyof API>(key: KEY_6, hook: import("./types/index.js").HookFn<API[KEY_6], any>): () => void;
addPostHook<KEY_7 extends keyof API>(key: KEY_7, hook: import("./types/index.js").HookFn<API[KEY_7], any>): () => void;
removePreHook<KEY_8 extends keyof API>(key: KEY_8, hook: import("./types/index.js").HookFn<API[KEY_8], any>): void;
removePostHook<KEY_9 extends keyof API>(key: KEY_9, hook: import("./types/index.js").HookFn<API[KEY_9], any>): void;
__hookDecorator<KEY_10 extends keyof API>(key: KEY_10): import("./types/index.js").DecoratorFn<API[KEY_10], any> | undefined;
};

@@ -85,11 +85,11 @@ } & T>> & {

readonly __decoratedFns: (keyof API)[];
readonly __facade: { [key in keyof API]: (...args: import("./types/utils").ExtractFirstParam<API[key]>) => ReturnType<API[key]>; };
readonly decorators: keyof API extends infer T_5 extends keyof API ? { [key_1 in T_5]?: import("./types").DecoratorFn<API[key_1], any>[] | undefined; } : never;
readonly __facade: { [key in keyof API]: (...args: import("./types/utils.js").ExtractFirstParam<API[key]>) => ReturnType<API[key]>; };
readonly decorators: keyof API extends infer T_5 extends keyof API ? { [key_1 in T_5]?: import("./types/index.js").DecoratorFn<API[key_1], any>[] | undefined; } : never;
readonly hooks: keyof API extends infer T_6 extends keyof API ? { [key_2 in T_6]: {
pre: import("./types").HookFn<API[key_2], any>[];
post: import("./types").HookFn<API[key_2], any>[];
pre: import("./types/index.js").HookFn<API[key_2], any>[];
post: import("./types/index.js").HookFn<API[key_2], any>[];
}; } : never;
readonly type: string;
readonly name: string | undefined;
__makeFacade(): { [key in keyof API]: (...args: import("./types/utils").ExtractFirstParam<API[key]>) => ReturnType<API[key]>; };
__makeFacade(): { [key in keyof API]: (...args: import("./types/utils.js").ExtractFirstParam<API[key]>) => ReturnType<API[key]>; };
__makeDecorable<KEY extends keyof API>(key: KEY): void;

@@ -103,12 +103,12 @@ unmakeDecorable<KEY_1 extends keyof API>(key: KEY_1): void;

toString(): string;
addDecorator<KEY_2 extends keyof API>(key: KEY_2, decorator: import("./types").DecoratorFn<API[KEY_2], any>): () => void;
decorateAll(decorator: import("./types").DecoratorFn<API[keyof API], any>): () => void;
removeDecorator<KEY_3 extends keyof API>(key: KEY_3, decorator: import("./types").DecoratorFn<API[KEY_3], any>): void;
addHook<KEY_4 extends keyof API>(hookType: "pre" | "post", key: KEY_4, hook: import("./types").HookFn<API[KEY_4], any>): () => void;
removeHook<KEY_5 extends keyof API>(hookType: "pre" | "post", key: KEY_5, hook: import("./types").HookFn<API[KEY_5], any>): void;
addPreHook<KEY_6 extends keyof API>(key: KEY_6, hook: import("./types").HookFn<API[KEY_6], any>): () => void;
addPostHook<KEY_7 extends keyof API>(key: KEY_7, hook: import("./types").HookFn<API[KEY_7], any>): () => void;
removePreHook<KEY_8 extends keyof API>(key: KEY_8, hook: import("./types").HookFn<API[KEY_8], any>): void;
removePostHook<KEY_9 extends keyof API>(key: KEY_9, hook: import("./types").HookFn<API[KEY_9], any>): void;
__hookDecorator<KEY_10 extends keyof API>(key: KEY_10): import("./types").DecoratorFn<API[KEY_10], any> | undefined;
addDecorator<KEY_2 extends keyof API>(key: KEY_2, decorator: import("./types/index.js").DecoratorFn<API[KEY_2], any>): () => void;
decorateAll(decorator: import("./types/index.js").DecoratorFn<API[keyof API], any>): () => void;
removeDecorator<KEY_3 extends keyof API>(key: KEY_3, decorator: import("./types/index.js").DecoratorFn<API[KEY_3], any>): void;
addHook<KEY_4 extends keyof API>(hookType: "pre" | "post", key: KEY_4, hook: import("./types/index.js").HookFn<API[KEY_4], any>): () => void;
removeHook<KEY_5 extends keyof API>(hookType: "pre" | "post", key: KEY_5, hook: import("./types/index.js").HookFn<API[KEY_5], any>): void;
addPreHook<KEY_6 extends keyof API>(key: KEY_6, hook: import("./types/index.js").HookFn<API[KEY_6], any>): () => void;
addPostHook<KEY_7 extends keyof API>(key: KEY_7, hook: import("./types/index.js").HookFn<API[KEY_7], any>): () => void;
removePreHook<KEY_8 extends keyof API>(key: KEY_8, hook: import("./types/index.js").HookFn<API[KEY_8], any>): void;
removePostHook<KEY_9 extends keyof API>(key: KEY_9, hook: import("./types/index.js").HookFn<API[KEY_9], any>): void;
__hookDecorator<KEY_10 extends keyof API>(key: KEY_10): import("./types/index.js").DecoratorFn<API[KEY_10], any> | undefined;
};

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

import { DapiMixin } from './DapiMixin';
import { DapiMixin } from './DapiMixin.js';
/**

@@ -3,0 +3,0 @@ * Creates an Dapi facade.

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

import { Constructor, ExtractFirstParam } from './types/utils';
import { DapiFns, DecoratorFn, HookFn } from './types';
import { Constructor, ExtractFirstParam } from './types/utils.js';
import { DapiFns, DecoratorFn, HookFn } from './types/index.js';
/**

@@ -4,0 +4,0 @@ * Represents an DAPI definition with dependencies and pure functions.

/**
* @module @carpasse/dapi
*/
export { DapiMixin, type DapiDefinition, type DapiWrapper } from './DapiMixin';
export { DapiMixin, type DapiDefinition, type DapiWrapper } from './DapiMixin.js';
export type { DapiFns, DapiFn, DecoratorFn, HookFn } from './types';
export { createDapi } from './createDapi';
export { createDapi } from './createDapi.js';
/**
* @module @carpasse/dapi
*/
export { DapiMixin } from './DapiMixin';
export { createDapi } from './createDapi';
export { DapiMixin } from './DapiMixin.js';
export { createDapi } from './createDapi.js';

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

import { AnyFunction } from './utils';
import { AnyFunction } from './utils.js';
/**

@@ -3,0 +3,0 @@ * Dapi function type. It is a function that receives the dependencies as the first argument.

{
"name": "@carpasse/dapi",
"version": "1.1.0",
"version": "1.1.1-beta.1",
"description": "Simple library to create complex systems out of pure functions",

@@ -5,0 +5,0 @@ "main": "./dist/cjs/index.js",

@@ -1,4 +0,4 @@

import {DapiMixin, DapiDefinition} from './DapiMixin';
import {DapiFns} from './types';
import {Constructor} from './types/utils';
import {DapiMixin, DapiDefinition} from './DapiMixin.js';
import type {DapiFns} from './types/index.js';
import {Constructor} from './types/utils.js';

@@ -5,0 +5,0 @@ /**

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

import {Constructor, ExtractFirstParam} from './types/utils';
import {DapiFns, DecoratorFn, HookFn} from './types';
import {Constructor, ExtractFirstParam} from './types/utils.js';
import {DapiFns, DecoratorFn, HookFn} from './types/index.js';

@@ -4,0 +4,0 @@ /**

/**
* @module @carpasse/dapi
*/
export {DapiMixin, type DapiDefinition, type DapiWrapper} from './DapiMixin';
export {DapiMixin, type DapiDefinition, type DapiWrapper} from './DapiMixin.js';
export type {DapiFns, DapiFn, DecoratorFn, HookFn} from './types';
export {createDapi} from './createDapi';
export {createDapi} from './createDapi.js';

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

import {AnyFunction} from './utils';
import {AnyFunction} from './utils.js';

@@ -3,0 +3,0 @@ /**

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