@opexa/portal-components 0.0.89 → 0.0.90

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.
@@ -38,6 +38,10 @@ export const config = {
38
38
  experimental: {
39
39
  nodeMiddleware: true,
40
40
  },
41
+ poweredByHeader: false,
42
+ compiler: {
43
+ removeConsole: process.env.NODE_ENV === 'production',
44
+ },
41
45
  };
42
46
  export function extendConfig(userConfig) {
43
47
  return {
@@ -1,11 +1,12 @@
1
1
  /* eslint-disable @typescript-eslint/no-explicit-any */
2
- import { BYPASS_RECAPTCHA, PLATFORM_CODE, PLATFORM_ID, SITE_ID, TEST_PASS_HEADER_KEY, } from '../constants/index.js';
2
+ import { BYPASS_RECAPTCHA, ENVIRONMENT, PLATFORM_CODE, PLATFORM_ID, SITE_ID, TEST_PASS_HEADER_KEY, } from '../constants/index.js';
3
3
  export async function graphqlRequest(url, query, variables, options) {
4
4
  const headers = new Headers();
5
5
  headers.set('Role', 'MEMBER');
6
6
  headers.set('Site-ID', SITE_ID);
7
7
  headers.set('Platform-ID', PLATFORM_ID);
8
8
  headers.set('Platform-Code', PLATFORM_CODE);
9
+ headers.set('Environment', ENVIRONMENT);
9
10
  headers.set('Accept', 'application/json');
10
11
  headers.set('Content-Type', 'application/json');
11
12
  new Headers(options?.headers).forEach((value, key) => {
@@ -110,6 +111,7 @@ export async function graphqlUpload(url, query, variables, options) {
110
111
  headers.set('Site-ID', SITE_ID);
111
112
  headers.set('Platform-ID', PLATFORM_ID);
112
113
  headers.set('Platform-Code', PLATFORM_CODE);
114
+ headers.set('Environment', ENVIRONMENT);
113
115
  headers.delete('Content-Type');
114
116
  if (BYPASS_RECAPTCHA) {
115
117
  headers.set(TEST_PASS_HEADER_KEY, '');
@@ -1,11 +1,12 @@
1
1
  import { z } from 'zod';
2
- import { BYPASS_RECAPTCHA, PLATFORM_CODE, PLATFORM_ID, SITE_ID, TEST_PASS_HEADER_KEY, } from '../constants/index.js';
2
+ import { BYPASS_RECAPTCHA, ENVIRONMENT, PLATFORM_CODE, PLATFORM_ID, SITE_ID, TEST_PASS_HEADER_KEY, } from '../constants/index.js';
3
3
  export async function httpRequest(url, opts = {}) {
4
4
  const headers = new Headers(opts.headers);
5
5
  headers.set('Role', 'MEMBER');
6
6
  headers.set('Site-ID', SITE_ID);
7
7
  headers.set('Platform-ID', PLATFORM_ID);
8
8
  headers.set('Platform-Code', PLATFORM_CODE);
9
+ headers.set('Environment', ENVIRONMENT);
9
10
  new Headers(opts.headers).forEach((value, key) => {
10
11
  headers.set(key, value);
11
12
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opexa/portal-components",
3
- "version": "0.0.89",
3
+ "version": "0.0.90",
4
4
  "exports": {
5
5
  ".": {
6
6
  "types": "./dist/components/index.d.ts",