@greatapps/common 1.1.32 → 1.1.33

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.
@@ -2,7 +2,7 @@ import { headers } from "next/headers";
2
2
  import { whitelabelService } from "../services/whitelabel.service";
3
3
  import { ApiError } from "../../../infra/api/types";
4
4
  import { cache } from "react";
5
- const findWhitelabelAction = cache(async () => {
5
+ const findWhitelabel = cache(async () => {
6
6
  const headersList = await headers();
7
7
  const host = headersList.get("host");
8
8
  if (!host) {
@@ -15,6 +15,6 @@ const findWhitelabelAction = cache(async () => {
15
15
  return whitelabel;
16
16
  });
17
17
  export {
18
- findWhitelabelAction
18
+ findWhitelabel
19
19
  };
20
20
  //# sourceMappingURL=find-whitelabel.action.mjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/modules/whitelabel/actions/find-whitelabel.action.ts"],"sourcesContent":["\nimport { headers } from \"next/headers\";\nimport { whitelabelService } from \"../services/whitelabel.service\";\nimport { ApiError } from \"../../../infra/api/types\";\nimport { cache } from \"react\";\n\nexport const findWhitelabelAction = cache(async () => {\n const headersList = await headers();\n const host = headersList.get('host');\n\n if (!host) {\n throw new ApiError('Host header not found', 'HOST_NOT_FOUND', 400);\n }\n\n const whitelabel = await whitelabelService.getTokenByDomain(host);\n\n if (!whitelabel) {\n throw new ApiError('Whitelabel not found', 'WL_NOT_FOUND', 404);\n }\n\n return whitelabel;\n});"],"mappings":"AACA,SAAS,eAAe;AACxB,SAAS,yBAAyB;AAClC,SAAS,gBAAgB;AACzB,SAAS,aAAa;AAEf,MAAM,uBAAuB,MAAM,YAAY;AAClD,QAAM,cAAc,MAAM,QAAQ;AAClC,QAAM,OAAO,YAAY,IAAI,MAAM;AAEnC,MAAI,CAAC,MAAM;AACP,UAAM,IAAI,SAAS,yBAAyB,kBAAkB,GAAG;AAAA,EACrE;AAEA,QAAM,aAAa,MAAM,kBAAkB,iBAAiB,IAAI;AAEhE,MAAI,CAAC,YAAY;AACb,UAAM,IAAI,SAAS,wBAAwB,gBAAgB,GAAG;AAAA,EAClE;AAEA,SAAO;AACX,CAAC;","names":[]}
1
+ {"version":3,"sources":["../../../../src/modules/whitelabel/actions/find-whitelabel.action.ts"],"sourcesContent":["\nimport { headers } from \"next/headers\";\nimport { whitelabelService } from \"../services/whitelabel.service\";\nimport { ApiError } from \"../../../infra/api/types\";\nimport { cache } from \"react\";\n\nexport const findWhitelabel = cache(async () => {\n const headersList = await headers();\n const host = headersList.get('host');\n\n if (!host) {\n throw new ApiError('Host header not found', 'HOST_NOT_FOUND', 400);\n }\n\n const whitelabel = await whitelabelService.getTokenByDomain(host);\n\n if (!whitelabel) {\n throw new ApiError('Whitelabel not found', 'WL_NOT_FOUND', 404);\n }\n\n return whitelabel;\n});"],"mappings":"AACA,SAAS,eAAe;AACxB,SAAS,yBAAyB;AAClC,SAAS,gBAAgB;AACzB,SAAS,aAAa;AAEf,MAAM,iBAAiB,MAAM,YAAY;AAC5C,QAAM,cAAc,MAAM,QAAQ;AAClC,QAAM,OAAO,YAAY,IAAI,MAAM;AAEnC,MAAI,CAAC,MAAM;AACP,UAAM,IAAI,SAAS,yBAAyB,kBAAkB,GAAG;AAAA,EACrE;AAEA,QAAM,aAAa,MAAM,kBAAkB,iBAAiB,IAAI;AAEhE,MAAI,CAAC,YAAY;AACb,UAAM,IAAI,SAAS,wBAAwB,gBAAgB,GAAG;AAAA,EAClE;AAEA,SAAO;AACX,CAAC;","names":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@greatapps/common",
3
- "version": "1.1.32",
3
+ "version": "1.1.33",
4
4
  "description": "Shared library for GreatApps frontend applications",
5
5
  "main": "./dist/index.mjs",
6
6
  "types": "./src/index.ts",
@@ -4,7 +4,7 @@ import { whitelabelService } from "../services/whitelabel.service";
4
4
  import { ApiError } from "../../../infra/api/types";
5
5
  import { cache } from "react";
6
6
 
7
- export const findWhitelabelAction = cache(async () => {
7
+ export const findWhitelabel = cache(async () => {
8
8
  const headersList = await headers();
9
9
  const host = headersList.get('host');
10
10