@nymphjs/nymph 1.0.0-beta.45 → 1.0.0-beta.47

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.
@@ -4,7 +4,7 @@ export default {
4
4
  guid: Joi.alternatives()
5
5
  .try(
6
6
  Joi.any().only().allow(null),
7
- Joi.string().trim(false).length(24).hex()
7
+ Joi.string().trim(false).length(24).hex(),
8
8
  )
9
9
  .required(),
10
10
  cdate: Joi.alternatives()
@@ -18,7 +18,7 @@ export default {
18
18
  Joi.string().pattern(/[[\x01-\x1F\x7F]]/, {
19
19
  name: 'control characters',
20
20
  invert: true,
21
- })
21
+ }),
22
22
  )
23
23
  .required(),
24
24
  };
@@ -95,7 +95,7 @@ export class TestEmptyModel extends Entity<TestEmptyModelData> {
95
95
  static class = 'TestEmptyModel';
96
96
 
97
97
  static async factory(
98
- guid?: string
98
+ guid?: string,
99
99
  ): Promise<TestEmptyModel & TestEmptyModelData> {
100
100
  return (await super.factory(guid)) as TestEmptyModel & TestEmptyModelData;
101
101
  }
package/src/testMocks.ts CHANGED
@@ -25,11 +25,11 @@ export class MockNymphDriver {
25
25
  ): Promise<ReturnType<T['factorySync']> | null>;
26
26
  public async getEntity<T extends EntityConstructor = EntityConstructor>(
27
27
  options: Options<T> & { return: 'guid' },
28
- guid: string
28
+ guid: string,
29
29
  ): Promise<string | null>;
30
30
  public async getEntity<T extends EntityConstructor = EntityConstructor>(
31
31
  options: Options<T>,
32
- guid: string
32
+ guid: string,
33
33
  ): Promise<ReturnType<T['factorySync']> | null>;
34
34
  public async getEntity<T extends EntityConstructor = EntityConstructor>(
35
35
  options: Options<T> = {},
@@ -84,7 +84,7 @@ export class MockNymph {
84
84
  public getEntityClass<T extends EntityConstructor>(className: T): T;
85
85
  public getEntityClass(className: string): EntityConstructor;
86
86
  public getEntityClass<T extends EntityConstructor = EntityConstructor>(
87
- className: T | string
87
+ className: T | string,
88
88
  ): T | EntityConstructor {
89
89
  let key: string | null = null;
90
90
  if (typeof className === 'string') {
@@ -108,11 +108,11 @@ export class MockNymph {
108
108
  ): Promise<ReturnType<T['factorySync']> | null>;
109
109
  public async getEntity<T extends EntityConstructor = EntityConstructor>(
110
110
  options: Options<T> & { return: 'guid' },
111
- guid: string
111
+ guid: string,
112
112
  ): Promise<string | null>;
113
113
  public async getEntity<T extends EntityConstructor = EntityConstructor>(
114
114
  options: Options<T>,
115
- guid: string
115
+ guid: string,
116
116
  ): Promise<ReturnType<T['factorySync']> | null>;
117
117
  public async getEntity<T extends EntityConstructor = EntityConstructor>(
118
118
  options: Options<T> = {},
package/src/utils.ts CHANGED
@@ -18,7 +18,7 @@ export function uniqueStrings(array: string[]) {
18
18
  export function classNamesToEntityConstructors(
19
19
  nymph: Nymph,
20
20
  selectors: Selector[],
21
- enforceRestEnabledFlag = false
21
+ enforceRestEnabledFlag = false,
22
22
  ): Selector[] {
23
23
  const newSelectors: Selector[] = [];
24
24
 
@@ -63,7 +63,7 @@ export function classNamesToEntityConstructors(
63
63
  ...classNamesToEntityConstructors(
64
64
  nymph,
65
65
  selectors,
66
- enforceRestEnabledFlag
66
+ enforceRestEnabledFlag,
67
67
  ),
68
68
  ],
69
69
  ]);
@@ -73,7 +73,7 @@ export function classNamesToEntityConstructors(
73
73
  newSelector[key] = classNamesToEntityConstructors(
74
74
  nymph,
75
75
  tmpArr,
76
- enforceRestEnabledFlag
76
+ enforceRestEnabledFlag,
77
77
  );
78
78
  } else {
79
79
  // @ts-ignore: ts doesn't know what value is here.
@@ -108,7 +108,7 @@ export function entitiesToReferences(item: any): any {
108
108
  export function referencesToEntities(
109
109
  item: any,
110
110
  nymph: Nymph,
111
- useSkipAc = false
111
+ useSkipAc = false,
112
112
  ): any {
113
113
  if (Array.isArray(item)) {
114
114
  // Check if it's a reference.