@common-stack/server-core 7.0.4-alpha.9 → 7.1.1-alpha.14

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.
@@ -187,7 +187,7 @@ declare class Feature<T = ConfigurationScope, S = any> {
187
187
  get graphqlMiddlewares(): any[];
188
188
  getPreferences<S = ConfigurationScope>(): IPreferences<S>[];
189
189
  getPreferencesObj<S>(): {
190
- [x: number]: IPreferences<S>;
190
+ [n: number]: IPreferences<S>;
191
191
  length: number;
192
192
  toString(): string;
193
193
  toLocaleString(): string;
@@ -273,7 +273,7 @@ declare class Feature<T = ConfigurationScope, S = any> {
273
273
  };
274
274
  getPermissionPreferences<T = ConfigurationScope>(): IPreferences<T>[];
275
275
  getPermissionPreferencesObj<T>(): {
276
- [x: number]: IPreferences<T>;
276
+ [n: number]: IPreferences<T>;
277
277
  length: number;
278
278
  toString(): string;
279
279
  toLocaleString(): string;
@@ -359,7 +359,7 @@ declare class Feature<T = ConfigurationScope, S = any> {
359
359
  };
360
360
  getPolicyPreferences<T = ConfigurationScope>(): IPreferences<T>[];
361
361
  getPolicyPreferencesObj<T>(): {
362
- [x: number]: IPreferences<T>;
362
+ [n: number]: IPreferences<T>;
363
363
  length: number;
364
364
  toString(): string;
365
365
  toLocaleString(): string;
@@ -445,7 +445,7 @@ declare class Feature<T = ConfigurationScope, S = any> {
445
445
  };
446
446
  getRoles(): {};
447
447
  getRolesObj<S>(): {
448
- [x: number]: IPreferences<S>;
448
+ [n: number]: IPreferences<S>;
449
449
  length: number;
450
450
  toString(): string;
451
451
  toLocaleString(): string;
@@ -1 +1 @@
1
- export declare const extractTenantId: (authority?: string) => string;
1
+ export declare const extractTenantId: (authority: string) => string;
@@ -1,4 +1,4 @@
1
- const extractTenantId = (authority = 'default') => {
2
- const parts = authority.split('.');
3
- return parts[0] ?? authority;
1
+ const extractTenantId = (authority) => {
2
+ const [part] = authority?.split('.') ?? [];
3
+ return part ?? authority;
4
4
  };export{extractTenantId};//# sourceMappingURL=extract-tenant-id.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"extract-tenant-id.js","sources":["../../src/utils/extract-tenant-id.ts"],"sourcesContent":[null],"names":[],"mappings":"MAAa,eAAe,GAAG,CAAC,SAAoB,GAAA,SAAS,KAAY;IACrE,MAAM,KAAK,GAAG,SAAS,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;AACnC,IAAA,OAAO,KAAK,CAAC,CAAC,CAAC,IAAI,SAAS,CAAC;AACjC"}
1
+ {"version":3,"file":"extract-tenant-id.js","sources":["../../src/utils/extract-tenant-id.ts"],"sourcesContent":[null],"names":[],"mappings":"AAAa,MAAA,eAAe,GAAG,CAAC,SAAiB,KAAY;AACzD,IAAA,MAAM,CAAC,IAAI,CAAC,GAAG,SAAS,EAAE,KAAK,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC;IAC3C,OAAO,IAAI,IAAI,SAAS,CAAC;AAC7B"}
@@ -7,7 +7,7 @@ import {createHash}from'crypto';import {print}from'graphql/language/index.js';co
7
7
  logger.trace('About to hash variables: [%j]', variables);
8
8
  }
9
9
  const queryHash = createHash('sha256').update(normalizedQuery).digest('hex');
10
- const variablesHash = createHash('sha256').update(JSON.stringify(variables)).digest('hex');
10
+ const variablesHash = variables ? createHash('sha256').update(JSON.stringify(variables)).digest('hex') : null;
11
11
  const prefix = `${tenantId ? `${tenantId}:` : ''}${userId ? `${userId}:` : ''}`;
12
- return `${prefix}${queryName}:${queryHash}:${variablesHash}`;
12
+ return `${prefix}${queryName}:${queryHash}${variablesHash ? `:${variablesHash}` : ''}`;
13
13
  };export{generateQueryCacheKey};//# sourceMappingURL=generate-query-cache-key.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"generate-query-cache-key.js","sources":["../../src/utils/generate-query-cache-key.ts"],"sourcesContent":[null],"names":[],"mappings":"8EAWa,MAAA,qBAAqB,GAAG,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE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G,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC,EAAE,IAAI,EAAE,CAAC;AAClF,IAAA,MAAM,GAAG,SAAS,CAAC,GAAG,eAAe,EAAE,KAAK,CAAC,WAAW,CAAC,IAAI,EAAE,CAAC;;IAGhE,IAAI,MAAM,EAAE;AACR,QAAA,MAAM,CAAC,KAAK,CAAC,sCAAsC,EAAE,eAAe,CAAC,CAAC;AACtE,QAAA,MAAM,CAAC,KAAK,CAAC,+BAA+B,EAAE,SAAS,CAAC,CAAC;KAC5D;AAED,IAAA,MAAM,SAAS,GAAG,UAAU,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,eAAe,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AAC7E,IAAA,MAAM,aAAa,GAAG,SAAS,GAAG,UAAU,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC;IAC9G,MAAM,MAAM,GAAG,CAAA,EAAG,QAAQ,GAAG,CAAG,EAAA,QAAQ,CAAG,CAAA,CAAA,GAAG,EAAE,CAAA,EAAG,MAAM,GAAG,CAAG,EAAA,MAAM,CAAG,CAAA,CAAA,GAAG,EAAE,CAAA,CAAE,CAAC;AAChF,IAAA,OAAO,GAAG,MAAM,CAAA,EAAG,SAAS,CAAI,CAAA,EAAA,SAAS,GAAG,aAAa,GAAG,CAAA,CAAA,EAAI,aAAa,CAAE,CAAA,GAAG,EAAE,EAAE,CAAC;AAC3F"}
@@ -1,6 +1,6 @@
1
1
  import { IPreferences, IOverwritePreference, IPreferencesData } from '../interfaces';
2
2
  export declare function getCurrentPreferences<T>(preferencesDefaultArr: IPreferences<T>[], overwritePreferences: IOverwritePreference[]): {
3
- [x: number]: IPreferences<T>;
3
+ [n: number]: IPreferences<T>;
4
4
  length: number;
5
5
  toString(): string;
6
6
  toLocaleString(): string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@common-stack/server-core",
3
- "version": "7.0.4-alpha.9",
3
+ "version": "7.1.1-alpha.14",
4
4
  "description": "common core for higher packages to depend on",
5
5
  "license": "ISC",
6
6
  "author": "CDMBase LLC",
@@ -24,7 +24,7 @@
24
24
  "watch": "yarn build:lib:watch"
25
25
  },
26
26
  "dependencies": {
27
- "@common-stack/core": "7.0.4-alpha.6"
27
+ "@common-stack/core": "7.1.1-alpha.14"
28
28
  },
29
29
  "peerDependencies": {
30
30
  "@cdm-logger/core": ">=7.0.12",
@@ -33,7 +33,7 @@
33
33
  "publishConfig": {
34
34
  "access": "public"
35
35
  },
36
- "gitHead": "84a0d19ce739995bb9b7073086c89768b0bccc56",
36
+ "gitHead": "7786ecfaab0098f0bbd2f0ee6979ae1cb2da89e1",
37
37
  "typescript": {
38
38
  "definition": "lib/index.d.ts"
39
39
  }