@nmtjs/core 0.7.8 → 0.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/constants.js CHANGED
@@ -7,4 +7,3 @@ export const kClassInjectable = Symbol.for("neemata:ClassInjectableKey");
7
7
  export const kProvider = Symbol.for("neemata:ProviderKey");
8
8
  export const kHookCollection = Symbol.for("neemata:HookCollectionKey");
9
9
  export const kPlugin = Symbol.for("neemata:PluginKey");
10
- export const isPlugin = (value) => kPlugin in value;
@@ -1 +1 @@
1
- {"mappings":"AAEA,OAAO,MAAMA,sBAAqC,OAAO,IACvD,gCACD;AAGD,OAAO,MAAMC,cAA6B,OAAO,IAAI,wBAAwB;AAG7E,OAAO,MAAMC,kBAAiC,OAAO,IACnD,4BACD;AAGD,OAAO,MAAMC,mBAAkC,OAAO,IACpD,6BACD;AAGD,OAAO,MAAMC,qBAAoC,OAAO,IACtD,+BACD;AAGD,OAAO,MAAMC,mBAAkC,OAAO,IACpD,6BACD;AAGD,OAAO,MAAMC,YAA2B,OAAO,IAAI,sBAAsB;AAGzE,OAAO,MAAMC,kBAAiC,OAAO,IACnD,4BACD;AAGD,OAAO,MAAMC,UAAyB,OAAO,IAAI,oBAAoB;AAErE,OAAO,MAAM,WAAW,CAACC,UAAgC,WAAW","names":["kOptionalDependency: unique symbol","kInjectable: unique symbol","kLazyInjectable: unique symbol","kValueInjectable: unique symbol","kFactoryInjectable: unique symbol","kClassInjectable: unique symbol","kProvider: unique symbol","kHookCollection: unique symbol","kPlugin: unique symbol","value: any"],"sources":["src/constants.ts"],"sourcesContent":["import type { Plugin } from './plugin.ts'\n\nexport const kOptionalDependency: unique symbol = Symbol.for(\n 'neemata:OptionalDependencyKey',\n)\nexport type kOptionalDependency = typeof kOptionalDependency\n\nexport const kInjectable: unique symbol = Symbol.for('neemata:InjectableKey')\nexport type kInjectable = typeof kInjectable\n\nexport const kLazyInjectable: unique symbol = Symbol.for(\n 'neemata:LazyInjectableKey',\n)\nexport type kLazyInjectable = typeof kLazyInjectable\n\nexport const kValueInjectable: unique symbol = Symbol.for(\n 'neemata:ValueInjectableKey',\n)\nexport type kValueInjectable = typeof kValueInjectable\n\nexport const kFactoryInjectable: unique symbol = Symbol.for(\n 'neemata:FactoryInjectableKey',\n)\nexport type kFactoryInjectable = typeof kFactoryInjectable\n\nexport const kClassInjectable: unique symbol = Symbol.for(\n 'neemata:ClassInjectableKey',\n)\nexport type kClassInjectable = typeof kClassInjectable\n\nexport const kProvider: unique symbol = Symbol.for('neemata:ProviderKey')\nexport type kProvider = typeof kProvider\n\nexport const kHookCollection: unique symbol = Symbol.for(\n 'neemata:HookCollectionKey',\n)\nexport type kHookCollection = typeof kHookCollection\n\nexport const kPlugin: unique symbol = Symbol.for('neemata:PluginKey')\nexport type kPlugin = typeof kPlugin\nexport const isPlugin = (value: any): value is Plugin => kPlugin in value\n"],"version":3}
1
+ {"mappings":"AAEA,OAAO,MAAMA,sBAAqC,OAAO,IACvD,gCACD;AAGD,OAAO,MAAMC,cAA6B,OAAO,IAAI,wBAAwB;AAG7E,OAAO,MAAMC,kBAAiC,OAAO,IACnD,4BACD;AAGD,OAAO,MAAMC,mBAAkC,OAAO,IACpD,6BACD;AAGD,OAAO,MAAMC,qBAAoC,OAAO,IACtD,+BACD;AAGD,OAAO,MAAMC,mBAAkC,OAAO,IACpD,6BACD;AAGD,OAAO,MAAMC,YAA2B,OAAO,IAAI,sBAAsB;AAGzE,OAAO,MAAMC,kBAAiC,OAAO,IACnD,4BACD;AAGD,OAAO,MAAMC,UAAyB,OAAO,IAAI,oBAAoB","names":["kOptionalDependency: unique symbol","kInjectable: unique symbol","kLazyInjectable: unique symbol","kValueInjectable: unique symbol","kFactoryInjectable: unique symbol","kClassInjectable: unique symbol","kProvider: unique symbol","kHookCollection: unique symbol","kPlugin: unique symbol"],"sources":["src/constants.ts"],"sourcesContent":["import type { Plugin } from './plugin.ts'\n\nexport const kOptionalDependency: unique symbol = Symbol.for(\n 'neemata:OptionalDependencyKey',\n)\nexport type kOptionalDependency = typeof kOptionalDependency\n\nexport const kInjectable: unique symbol = Symbol.for('neemata:InjectableKey')\nexport type kInjectable = typeof kInjectable\n\nexport const kLazyInjectable: unique symbol = Symbol.for(\n 'neemata:LazyInjectableKey',\n)\nexport type kLazyInjectable = typeof kLazyInjectable\n\nexport const kValueInjectable: unique symbol = Symbol.for(\n 'neemata:ValueInjectableKey',\n)\nexport type kValueInjectable = typeof kValueInjectable\n\nexport const kFactoryInjectable: unique symbol = Symbol.for(\n 'neemata:FactoryInjectableKey',\n)\nexport type kFactoryInjectable = typeof kFactoryInjectable\n\nexport const kClassInjectable: unique symbol = Symbol.for(\n 'neemata:ClassInjectableKey',\n)\nexport type kClassInjectable = typeof kClassInjectable\n\nexport const kProvider: unique symbol = Symbol.for('neemata:ProviderKey')\nexport type kProvider = typeof kProvider\n\nexport const kHookCollection: unique symbol = Symbol.for(\n 'neemata:HookCollectionKey',\n)\nexport type kHookCollection = typeof kHookCollection\n\nexport const kPlugin: unique symbol = Symbol.for('neemata:PluginKey')\nexport type kPlugin = typeof kPlugin\n"],"version":3}
package/dist/index.js CHANGED
@@ -7,5 +7,4 @@ export * from "./logger.js";
7
7
  export * from "./plugin.js";
8
8
  export * from "./registry.js";
9
9
  export * from "./types.js";
10
- export * from "./types.js";
11
10
  export * from "./utils/index.js";
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"mappings":"AAAA,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc","names":[],"sources":["src/index.ts"],"sourcesContent":["export * from './constants.ts'\nexport * from './container.ts'\nexport * from './enums.ts'\nexport * from './hooks.ts'\nexport * from './injectables.ts'\nexport * from './logger.ts'\nexport * from './plugin.ts'\nexport * from './registry.ts'\nexport * from './types.ts'\nexport * from './types.ts'\nexport * from './utils/index.ts'\n"],"version":3}
1
+ {"mappings":"AAAA,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc","names":[],"sources":["src/index.ts"],"sourcesContent":["export * from './constants.ts'\nexport * from './container.ts'\nexport * from './enums.ts'\nexport * from './hooks.ts'\nexport * from './injectables.ts'\nexport * from './logger.ts'\nexport * from './plugin.ts'\nexport * from './registry.ts'\nexport * from './types.ts'\nexport * from './utils/index.ts'\n"],"version":3}
package/dist/plugin.js CHANGED
@@ -4,3 +4,4 @@ export const createPlugin = (name, init) => ({
4
4
  init,
5
5
  [kPlugin]: true
6
6
  });
7
+ export const isPlugin = (value) => kPlugin in value;
@@ -1 +1 @@
1
- {"mappings":"AACA,SAAS,eAAe,gBAAgB;AAoBxC,OAAO,MAAM,eAAe,CAC1BA,MACAC,UAC2B;CAAE;CAAM;EAAO,UAAU;AAAM","names":["name: string","init: Plugin<Type, Options>['init']"],"sources":["src/plugin.ts"],"sourcesContent":["import type { Async } from '../../common/src/index.ts'\nimport { kPlugin } from './constants.ts'\nimport type { PluginContext } from './types.ts'\n\nexport interface BasePlugin<\n Type = any,\n Options = unknown,\n Context extends PluginContext = PluginContext,\n> {\n name: string\n init: (context: Context, options: Options) => Async<Type>\n}\n\nexport interface Plugin<\n Type = void,\n Options = unknown,\n Context extends PluginContext = PluginContext,\n> extends BasePlugin<Type, Options, Context> {\n [kPlugin]: any\n}\n\nexport const createPlugin = <Options = unknown, Type = void>(\n name: string,\n init: Plugin<Type, Options>['init'],\n): Plugin<Type, Options> => ({ name, init, [kPlugin]: true })\n"],"version":3}
1
+ {"mappings":"AACA,SAAS,eAAe,gBAAgB;AAoBxC,OAAO,MAAM,eAAe,CAC1BA,MACAC,UAC2B;CAAE;CAAM;EAAO,UAAU;AAAM;AAE5D,OAAO,MAAM,WAAW,CAACC,UAAgC,WAAW","names":["name: string","init: Plugin<Type, Options>['init']","value: any"],"sources":["src/plugin.ts"],"sourcesContent":["import type { Async } from '../../common/src/index.ts'\nimport { kPlugin } from './constants.ts'\nimport type { PluginContext } from './types.ts'\n\nexport interface BasePlugin<\n Type = any,\n Options = unknown,\n Context extends PluginContext = PluginContext,\n> {\n name: string\n init: (context: Context, options: Options) => Async<Type>\n}\n\nexport interface Plugin<\n Type = void,\n Options = unknown,\n Context extends PluginContext = PluginContext,\n> extends BasePlugin<Type, Options, Context> {\n [kPlugin]: any\n}\n\nexport const createPlugin = <Options = unknown, Type = void>(\n name: string,\n init: Plugin<Type, Options>['init'],\n): Plugin<Type, Options> => ({ name, init, [kPlugin]: true })\n\nexport const isPlugin = (value: any): value is Plugin => kPlugin in value\n"],"version":3}
package/package.json CHANGED
@@ -7,14 +7,18 @@
7
7
  "import": "./dist/index.js"
8
8
  }
9
9
  },
10
- "dependencies": {
10
+ "peerDependencies": {
11
11
  "pino": "^9.6.0",
12
- "pino-pretty": "^11.3.0",
13
- "@nmtjs/common": "0.7.8",
14
- "@nmtjs/type": "0.7.8"
12
+ "pino-pretty": "^13.0.0",
13
+ "@nmtjs/common": "0.8.0",
14
+ "@nmtjs/type": "0.8.0"
15
15
  },
16
16
  "devDependencies": {
17
- "@types/node": "^20.17.30"
17
+ "@types/node": "^18",
18
+ "pino": "^9.6.0",
19
+ "pino-pretty": "^13.0.0",
20
+ "@nmtjs/common": "0.8.0",
21
+ "@nmtjs/type": "0.8.0"
18
22
  },
19
23
  "files": [
20
24
  "src",
@@ -22,7 +26,7 @@
22
26
  "LICENSE.md",
23
27
  "README.md"
24
28
  ],
25
- "version": "0.7.8",
29
+ "version": "0.8.0",
26
30
  "scripts": {
27
31
  "build": "neemata-build --root=./src './**/*.ts'",
28
32
  "type-check": "tsc --noEmit"
package/src/constants.ts CHANGED
@@ -38,4 +38,3 @@ export type kHookCollection = typeof kHookCollection
38
38
 
39
39
  export const kPlugin: unique symbol = Symbol.for('neemata:PluginKey')
40
40
  export type kPlugin = typeof kPlugin
41
- export const isPlugin = (value: any): value is Plugin => kPlugin in value
package/src/index.ts CHANGED
@@ -7,5 +7,4 @@ export * from './logger.ts'
7
7
  export * from './plugin.ts'
8
8
  export * from './registry.ts'
9
9
  export * from './types.ts'
10
- export * from './types.ts'
11
10
  export * from './utils/index.ts'
package/src/plugin.ts CHANGED
@@ -23,3 +23,5 @@ export const createPlugin = <Options = unknown, Type = void>(
23
23
  name: string,
24
24
  init: Plugin<Type, Options>['init'],
25
25
  ): Plugin<Type, Options> => ({ name, init, [kPlugin]: true })
26
+
27
+ export const isPlugin = (value: any): value is Plugin => kPlugin in value