@common-stack/core 0.6.1-alpha.3 → 1.0.1-alpha.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.
@@ -1,18 +1,2 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./types"), exports);
1
+ export * from './types';
18
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/constants/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0CAAwB"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/constants/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC"}
@@ -11,6 +11,7 @@ export declare const TaggedType: {
11
11
  export declare const ClientTypes: {
12
12
  Logger: symbol;
13
13
  ApolloClient: symbol;
14
+ ApolloClientFactory: symbol;
14
15
  InMemoryCache: symbol;
15
16
  UtilityClass: symbol;
16
17
  };
@@ -1,24 +1,22 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ElectronTypes = exports.ClientTypes = exports.TaggedType = exports.CommonType = void 0;
4
- exports.CommonType = {
1
+ export const CommonType = {
5
2
  LOGGER: 'LOGGER',
6
3
  ENVIRONMENT: 'ENVIRONMENT',
7
4
  HEMERA: 'HEMERA',
8
5
  MOLECULER_BROKER: 'MOLECULER_BROKER',
9
6
  PUBSUB: 'PUBSUB',
10
7
  };
11
- exports.TaggedType = {
8
+ export const TaggedType = {
12
9
  MICROSERVICE: 'MICROSERVICE',
13
10
  };
14
- exports.ClientTypes = {
11
+ export const ClientTypes = {
15
12
  // common types
16
13
  Logger: Symbol.for('Logger'),
17
14
  ApolloClient: Symbol.for('ApolloClient'),
15
+ ApolloClientFactory: Symbol.for('ApolloClientFactory'),
18
16
  InMemoryCache: Symbol.for('InMemoryCache'),
19
17
  UtilityClass: Symbol.for('UtilityClass'),
20
18
  };
21
- exports.ElectronTypes = {
19
+ export const ElectronTypes = {
22
20
  MainWindow: Symbol.for('MainWindow'),
23
21
  AboutWindow: Symbol.for('AboutWindow'),
24
22
  TrayWindow: Symbol.for('TrayWindow'),
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/constants/types.ts"],"names":[],"mappings":";;;AACa,QAAA,UAAU,GAAG;IACtB,MAAM,EAAE,QAAQ;IAChB,WAAW,EAAE,aAAa;IAC1B,MAAM,EAAE,QAAQ;IAChB,gBAAgB,EAAE,kBAAkB;IACpC,MAAM,EAAE,QAAQ;CACnB,CAAA;AAEY,QAAA,UAAU,GAAG;IACtB,YAAY,EAAE,cAAc;CAC/B,CAAA;AAEY,QAAA,WAAW,GAAG;IACvB,eAAe;IACf,MAAM,EAAE,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC;IAC5B,YAAY,EAAE,MAAM,CAAC,GAAG,CAAC,cAAc,CAAC;IACxC,aAAa,EAAE,MAAM,CAAC,GAAG,CAAC,eAAe,CAAC;IAC1C,YAAY,EAAE,MAAM,CAAC,GAAG,CAAC,cAAc,CAAC;CAC3C,CAAC;AAEW,QAAA,aAAa,GAAG;IACzB,UAAU,EAAE,MAAM,CAAC,GAAG,CAAC,YAAY,CAAC;IACpC,WAAW,EAAE,MAAM,CAAC,GAAG,CAAC,aAAa,CAAC;IACtC,UAAU,EAAE,MAAM,CAAC,GAAG,CAAC,YAAY,CAAC;CACvC,CAAA"}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/constants/types.ts"],"names":[],"mappings":"AACA,MAAM,CAAC,MAAM,UAAU,GAAG;IACtB,MAAM,EAAE,QAAQ;IAChB,WAAW,EAAE,aAAa;IAC1B,MAAM,EAAE,QAAQ;IAChB,gBAAgB,EAAE,kBAAkB;IACpC,MAAM,EAAE,QAAQ;CACnB,CAAA;AAED,MAAM,CAAC,MAAM,UAAU,GAAG;IACtB,YAAY,EAAE,cAAc;CAC/B,CAAA;AAED,MAAM,CAAC,MAAM,WAAW,GAAG;IACvB,eAAe;IACf,MAAM,EAAE,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC;IAC5B,YAAY,EAAE,MAAM,CAAC,GAAG,CAAC,cAAc,CAAC;IACxC,mBAAmB,EAAE,MAAM,CAAC,GAAG,CAAC,qBAAqB,CAAC;IACtD,aAAa,EAAE,MAAM,CAAC,GAAG,CAAC,eAAe,CAAC;IAC1C,YAAY,EAAE,MAAM,CAAC,GAAG,CAAC,cAAc,CAAC;CAC3C,CAAC;AAEF,MAAM,CAAC,MAAM,aAAa,GAAG;IACzB,UAAU,EAAE,MAAM,CAAC,GAAG,CAAC,YAAY,CAAC;IACpC,WAAW,EAAE,MAAM,CAAC,GAAG,CAAC,aAAa,CAAC;IACtC,UAAU,EAAE,MAAM,CAAC,GAAG,CAAC,YAAY,CAAC;CACvC,CAAA"}
package/lib/envalid.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as envalid from 'envalid';
2
- export declare type EnvalidConfig = {
2
+ export type EnvalidConfig = {
3
3
  required: boolean;
4
4
  devRequired: boolean;
5
5
  };
package/lib/envalid.js CHANGED
@@ -1,7 +1,4 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.buildEnv = void 0;
4
- const envalid = require("envalid");
1
+ import * as envalid from 'envalid';
5
2
  function buildEnv(environment, specs, options) {
6
3
  const envalidConfig = Object.keys(specs).reduce((prev, key) => {
7
4
  return Object.assign(Object.assign({}, prev), { [key]: {
@@ -17,5 +14,5 @@ function buildEnv(environment, specs, options) {
17
14
  cleanEnv,
18
15
  };
19
16
  }
20
- exports.buildEnv = buildEnv;
17
+ export { buildEnv };
21
18
  //# sourceMappingURL=envalid.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"envalid.js","sourceRoot":"","sources":["../src/envalid.ts"],"names":[],"mappings":";;;AAAA,mCAAmC;AAGnC,SAAS,QAAQ,CACb,WAAoB,EACpB,KAAsD,EACtD,OAAiC;IAEjC,MAAM,aAAa,GAAG,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,CAA8C,CAAC,IAAI,EAAE,GAAG,EAAE,EAAE;QACvG,uCACO,IAAI,KACP,CAAC,GAAG,CAAC,EAAE;gBACH,QAAQ,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,OAAO;gBAC/B,WAAW,EAAE,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,OAAO,IAAI,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,UAAU,CAAC;aAClE,IACH;IACN,CAAC,EAAE,EAAiD,CAAC,CAAC;IAEtD,SAAS,QAAQ;QACb,OAAO,OAAO,CAAC,QAAQ,CAAI,WAAW,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC;IAC5D,CAAC;IAED,OAAO;QACH,aAAa;QACb,QAAQ;KACX,CAAC;AACN,CAAC;AAEQ,4BAAQ"}
1
+ {"version":3,"file":"envalid.js","sourceRoot":"","sources":["../src/envalid.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,OAAO,MAAM,SAAS,CAAC;AAGnC,SAAS,QAAQ,CACb,WAAoB,EACpB,KAAsD,EACtD,OAAiC;IAEjC,MAAM,aAAa,GAAG,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,CAA8C,CAAC,IAAI,EAAE,GAAG,EAAE,EAAE;QACvG,uCACO,IAAI,KACP,CAAC,GAAG,CAAC,EAAE;gBACH,QAAQ,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,OAAO;gBAC/B,WAAW,EAAE,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,OAAO,IAAI,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,UAAU,CAAC;aAClE,IACH;IACN,CAAC,EAAE,EAAiD,CAAC,CAAC;IAEtD,SAAS,QAAQ;QACb,OAAO,OAAO,CAAC,QAAQ,CAAI,WAAW,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC;IAC5D,CAAC;IAED,OAAO;QACH,aAAa;QACb,QAAQ;KACX,CAAC;AACN,CAAC;AAED,OAAO,EAAE,QAAQ,EAAE,CAAC"}
@@ -1,7 +1,4 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.FieldError = void 0;
4
- class FieldError {
1
+ export class FieldError {
5
2
  constructor() {
6
3
  this.errors = {};
7
4
  }
@@ -23,5 +20,4 @@ class FieldError {
23
20
  }
24
21
  }
25
22
  }
26
- exports.FieldError = FieldError;
27
23
  //# sourceMappingURL=field-error.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"field-error.js","sourceRoot":"","sources":["../src/field-error.ts"],"names":[],"mappings":";;;AAAA,MAAa,UAAU;IAGnB;QACI,IAAI,CAAC,MAAM,GAAG,EAAE,CAAC;IACrB,CAAC;IAEM,MAAM;QACT,OAAO,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC;IAC7C,CAAC;IAEM,QAAQ,CAAC,KAAK,EAAE,OAAO;QAC1B,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,OAAO,CAAC;IACjC,CAAC;IAEM,SAAS;QACZ,OAAO,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;YAC1C,KAAK;YACL,OAAO,EAAE,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC;SAC9B,CAAC,CAAC,CAAC;IACR,CAAC;IAEM,OAAO;QACV,IAAI,IAAI,CAAC,MAAM,EAAE,EAAE;YACf,MAAM,IAAI,CAAC,SAAS,EAAE,CAAC;SAC1B;IACL,CAAC;CACJ;AA3BD,gCA2BC"}
1
+ {"version":3,"file":"field-error.js","sourceRoot":"","sources":["../src/field-error.ts"],"names":[],"mappings":"AAAA,MAAM,OAAO,UAAU;IAGnB;QACI,IAAI,CAAC,MAAM,GAAG,EAAE,CAAC;IACrB,CAAC;IAEM,MAAM;QACT,OAAO,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC;IAC7C,CAAC;IAEM,QAAQ,CAAC,KAAK,EAAE,OAAO;QAC1B,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,OAAO,CAAC;IACjC,CAAC;IAEM,SAAS;QACZ,OAAO,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;YAC1C,KAAK;YACL,OAAO,EAAE,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC;SAC9B,CAAC,CAAC,CAAC;IACR,CAAC;IAEM,OAAO;QACV,IAAI,IAAI,CAAC,MAAM,EAAE,EAAE;YACf,MAAM,IAAI,CAAC,SAAS,EAAE,CAAC;SAC1B;IACL,CAAC;CACJ"}
package/lib/index.d.ts CHANGED
@@ -1,4 +1,3 @@
1
1
  export * from './field-error';
2
2
  export * from './interfaces';
3
3
  export * from './constants';
4
- export * from './connectors';
package/lib/index.js CHANGED
@@ -1,21 +1,4 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./field-error"), exports);
18
- __exportStar(require("./interfaces"), exports);
19
- __exportStar(require("./constants"), exports);
20
- __exportStar(require("./connectors"), exports);
1
+ export * from './field-error';
2
+ export * from './interfaces';
3
+ export * from './constants';
21
4
  //# sourceMappingURL=index.js.map
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,gDAA8B;AAC9B,+CAA6B;AAC7B,8CAA4B;AAC5B,+CAA6B"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC"}
@@ -1,3 +1,2 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ export {};
3
2
  //# sourceMappingURL=common-settings.js.map
@@ -1,3 +1 @@
1
1
  export * from './common-settings';
2
- export * from './feature';
3
- export * from './common-feature';
@@ -1,20 +1,2 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./common-settings"), exports);
18
- __exportStar(require("./feature"), exports);
19
- __exportStar(require("./common-feature"), exports);
1
+ export * from './common-settings';
20
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/interfaces/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,oDAAkC;AAClC,4CAA0B;AAC1B,mDAAiC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/interfaces/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC"}
package/package.json CHANGED
@@ -1,10 +1,11 @@
1
1
  {
2
2
  "name": "@common-stack/core",
3
- "version": "0.6.1-alpha.3",
3
+ "version": "1.0.1-alpha.0",
4
4
  "description": "Common core for higher packages to depend on",
5
5
  "license": "ISC",
6
6
  "author": "CDMBase LLC",
7
7
  "main": "lib/index.js",
8
+ "module": "lib/index.js",
8
9
  "typings": "lib/index.d.ts",
9
10
  "scripts": {
10
11
  "build": "yarn build:clean && yarn build:lib",
@@ -18,14 +19,11 @@
18
19
  "test:watch": "npm test -- --watch",
19
20
  "watch": "yarn build:lib:watch"
20
21
  },
21
- "dependencies": {
22
- "fractal-objects": "^0.10.4"
23
- },
24
22
  "publishConfig": {
25
23
  "access": "public"
26
24
  },
27
25
  "typescript": {
28
26
  "definition": "lib/index.d.ts"
29
27
  },
30
- "gitHead": "8c23bfd49fb16286e23bf5d3d2dce2deb724b275"
28
+ "gitHead": "e23d595c58eedb3ecda0913cf206f54d8a9e470f"
31
29
  }
@@ -1,22 +0,0 @@
1
- import { interfaces } from 'inversify';
2
- import { Feature2 } from './feature';
3
- import { ICommonFeature, ICommonFeatureShape, ILocalization, ContainerFunc } from '../interfaces';
4
- declare class CommonFeature<S = unknown> extends Feature2 implements ICommonFeature<S> {
5
- readonly localizationIn?: ILocalization[];
6
- readonly appContextIn?: {
7
- [key: string]: any;
8
- };
9
- readonly createContainerFuncIn?: ContainerFunc[];
10
- readonly createServiceFuncIn?: Function[];
11
- protected _container: interfaces.Container;
12
- protected _services: {
13
- [key: string]: S;
14
- };
15
- constructor(...modules: ICommonFeatureShape[]);
16
- get localizations(): ILocalization[];
17
- get container(): interfaces.Container;
18
- get services(): {
19
- [key: string]: S;
20
- };
21
- }
22
- export { CommonFeature };
@@ -1,24 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.CommonFeature = void 0;
4
- const fractal_objects_1 = require("fractal-objects");
5
- const inversify_1 = require("inversify");
6
- const feature_1 = require("./feature");
7
- class CommonFeature extends feature_1.Feature2 {
8
- constructor(...modules) {
9
- super(...modules);
10
- this._container = new inversify_1.Container();
11
- (0, fractal_objects_1.foldTo)(this, modules);
12
- }
13
- get localizations() {
14
- return this.localizationIn || [];
15
- }
16
- get container() {
17
- return this._container;
18
- }
19
- get services() {
20
- return this._services;
21
- }
22
- }
23
- exports.CommonFeature = CommonFeature;
24
- //# sourceMappingURL=common-feature.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"common-feature.js","sourceRoot":"","sources":["../../src/connectors/common-feature.ts"],"names":[],"mappings":";;;AAAA,qDAAyC;AACzC,yCAAkD;AAClD,uCAAqC;AAGrC,MAAM,aAAyB,SAAQ,kBAAQ;IAQ3C,YAAY,GAAG,OAA8B;QACzC,KAAK,CAAC,GAAG,OAAO,CAAC,CAAC;QAJZ,eAAU,GAAyB,IAAI,qBAAS,EAAE,CAAC;QAKzD,IAAA,wBAAM,EAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IAC1B,CAAC;IAED,IAAI,aAAa;QACb,OAAO,IAAI,CAAC,cAAc,IAAI,EAAE,CAAC;IACrC,CAAC;IAED,IAAI,SAAS;QACT,OAAO,IAAI,CAAC,UAAU,CAAC;IAC3B,CAAC;IAED,IAAI,QAAQ;QACR,OAAO,IAAI,CAAC,SAAS,CAAC;IAC1B,CAAC;CACJ;AACQ,sCAAa"}
@@ -1,8 +0,0 @@
1
- /// <reference types="@types/node" />
2
- import { IFeature2, IFeature2Shape } from '../interfaces';
3
- declare class Feature2 implements IFeature2 {
4
- readonly onAppCreate?: Array<(modules: IFeature2, entryModule: NodeModule) => Promise<any>>;
5
- constructor(...modules: IFeature2Shape[]);
6
- createApp(entryModule: NodeModule): Promise<void>;
7
- }
8
- export { Feature2 };
@@ -1,29 +0,0 @@
1
- "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
- Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.Feature2 = void 0;
13
- const fractal_objects_1 = require("fractal-objects");
14
- class Feature2 {
15
- constructor(...modules) {
16
- (0, fractal_objects_1.foldTo)(this, modules);
17
- }
18
- createApp(entryModule) {
19
- return __awaiter(this, void 0, void 0, function* () {
20
- if (this.onAppCreate) {
21
- for (const callback of this.onAppCreate) {
22
- yield callback(this, entryModule);
23
- }
24
- }
25
- });
26
- }
27
- }
28
- exports.Feature2 = Feature2;
29
- //# sourceMappingURL=feature.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"feature.js","sourceRoot":"","sources":["../../src/connectors/feature.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAyC;AAGzC,MAAM,QAAQ;IAIV,YAAY,GAAG,OAAyB;QACpC,IAAA,wBAAM,EAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IAC1B,CAAC;IAEY,SAAS,CAAC,WAAuB;;YAC1C,IAAI,IAAI,CAAC,WAAW,EAAE;gBAClB,KAAK,MAAM,QAAQ,IAAI,IAAI,CAAC,WAAW,EAAE;oBACrC,MAAM,QAAQ,CAAC,IAAI,EAAE,WAAW,CAAC,CAAC;iBACrC;aACJ;QACL,CAAC;KAAA;CACJ;AAEQ,4BAAQ"}
@@ -1,2 +0,0 @@
1
- export * from './feature';
2
- export * from './common-feature';
@@ -1,19 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./feature"), exports);
18
- __exportStar(require("./common-feature"), exports);
19
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/connectors/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4CAA0B;AAC1B,mDAAiC"}
@@ -1,59 +0,0 @@
1
- import { Resource } from 'i18next';
2
- import { interfaces } from 'inversify';
3
- import { IFeature2Shape } from './feature';
4
- export declare type ILocalization = {
5
- ns: string;
6
- resources: Resource;
7
- };
8
- export declare type ContainerFunc = (options?: any) => interfaces.ContainerModule;
9
- /**
10
- * Common Feature Shape
11
- */
12
- export interface ICommonFeatureShape extends IFeature2Shape {
13
- /**
14
- * localizations for `i18next` library
15
- */
16
- localizationIn?: ILocalization[];
17
- /**
18
- * Feature modules shared context
19
- */
20
- appContextIn?: {
21
- [key: string]: any;
22
- };
23
- /**
24
- * @param createContainerFunc Synchronous Container Modules of inversify.
25
- * @inheritdoc https://github.com/inversify/InversifyJS/blob/master/wiki/container_modules.md
26
- */
27
- createContainerFuncIn?: ContainerFunc[];
28
- /**
29
- * @param createServiceFunc Services
30
- */
31
- createServiceFuncIn?: Function[];
32
- }
33
- /**
34
- * Common ancestor for server and client feature modules interfaces.
35
- * param S Services type
36
- */
37
- export interface ICommonFeature<S = unknown> extends IFeature2Shape {
38
- readonly localizationIn?: ILocalization[];
39
- readonly appContextIn?: {
40
- [key: string]: any;
41
- };
42
- readonly createContainerFuncIn?: ContainerFunc[];
43
- readonly createServiceFuncIn?: Function[];
44
- /**
45
- * @returns localization for i18next library
46
- */
47
- readonly localizations?: ILocalization[];
48
- /**
49
- * @param args Options to pass to each Container Module
50
- * @returns create container loaded with all container modules.
51
- */
52
- readonly container?: interfaces.Container;
53
- /**
54
- * @return Created services
55
- */
56
- readonly services: {
57
- [key: string]: S;
58
- };
59
- }
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=common-feature.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"common-feature.js","sourceRoot":"","sources":["../../src/interfaces/common-feature.ts"],"names":[],"mappings":""}
@@ -1,23 +0,0 @@
1
- /// <reference types="@types/node" />
2
- /**
3
- * @param Feature2Shape
4
- * @description Shape of the Feature2
5
- */
6
- export interface IFeature2Shape {
7
- /**
8
- * A hook called on the very start of the application right after all the feature modules are imported.
9
- * @param modules Feature modules
10
- * @param entryModule
11
- */
12
- onAppCreate?: Array<(modules: IFeature2, entryModule: NodeModule) => Promise<any>>;
13
- }
14
- export interface IFeature2 extends IFeature2Shape {
15
- readonly onAppCreate?: Array<(modules: IFeature2, entryModule: NodeModule) => Promise<any>>;
16
- /**
17
- * Calls each feature module `onAppCreate` hook, with `module` object as a first argument and the list of all feature modules as a second argument, extending this `Feature2Share` interface.
18
- *
19
- * In `onAppCreate` hook each module can initialize itself. Usually, the `core` feature module in `onAppCreate` hook initializes used framework adn registers callbacks exported by other feature mdoules. And then the framework calls these callbacks.
20
- * @param entryModule Feature Module
21
- */
22
- createApp(entryModule: IFeature2 | NodeModule): any;
23
- }
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=feature.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"feature.js","sourceRoot":"","sources":["../../src/interfaces/feature.ts"],"names":[],"mappings":""}