@appconda/nextjs 1.0.78 → 1.0.80

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.
package/dist/lib/env.d.ts CHANGED
@@ -1,4 +1,3 @@
1
- import 'server-only';
2
1
  export declare const env: Readonly<{
3
2
  APPCONDA_ENDPOINT: string;
4
3
  APPCONDA_CLIENT_ENDPOINT: string;
package/dist/lib/env.js CHANGED
@@ -1,6 +1,5 @@
1
1
  import { createEnv } from "@t3-oss/env-nextjs";
2
2
  import { z } from "zod";
3
- import 'server-only';
4
3
  export const env = createEnv({
5
4
  /*
6
5
  * Serverside Environment variables, not available on the client.
@@ -112,10 +111,10 @@ export const env = createEnv({
112
111
  * 💡 You'll get type errors if not all variables from `server` & `client` are included here.
113
112
  */
114
113
  runtimeEnv: {
115
- APPCONDA_ENDPOINT: process.env.APPCONDA_ENDPOINT,
116
- APPCONDA_CLIENT_ENDPOINT: process.env.APPCONDA_CLIENT_ENDPOINT,
117
- _SERVICE_TOKEN: process.env._SERVICE_TOKEN,
118
- ENTERPRISE_LICENSE_KEY: process.env.ENTERPRISE_LICENSE_KEY,
114
+ APPCONDA_ENDPOINT: typeof window !== 'undefined' ? process.env.APPCONDA_ENDPOINT : "",
115
+ APPCONDA_CLIENT_ENDPOINT: typeof window !== 'undefined' ? process.env.APPCONDA_CLIENT_ENDPOINT : "",
116
+ _SERVICE_TOKEN: typeof window !== 'undefined' ? process.env._SERVICE_TOKEN : "",
117
+ ENTERPRISE_LICENSE_KEY: typeof window !== 'undefined' ? process.env.ENTERPRISE_LICENSE_KEY : "",
119
118
  },
120
119
  });
121
120
  console.log(env);
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@appconda/nextjs",
3
3
  "homepage": "https://appconda.io/support",
4
4
  "description": "Appconda is an open-source self-hosted backend server that abstract and simplify complex and repetitive development tasks behind a very simple REST API",
5
- "version": "1.0.78",
5
+ "version": "1.0.80",
6
6
  "license": "BSD-3-Clause",
7
7
  "main": "dist/index.js",
8
8
  "types": "dist/index.d.ts",
@@ -9,8 +9,6 @@ import { Query } from "../query";
9
9
 
10
10
 
11
11
  export async function signIn({ userName, password }: { userName: string, password: string }) {
12
-
13
-
14
12
  const adminClient = await getAppcondaClient();
15
13
 
16
14
  const account = new Account(adminClient);
package/src/lib/env.ts CHANGED
@@ -1,6 +1,5 @@
1
1
  import { createEnv } from "@t3-oss/env-nextjs";
2
2
  import { z } from "zod";
3
- import 'server-only';
4
3
 
5
4
  export const env = createEnv({
6
5
  /*
@@ -114,10 +113,10 @@ export const env = createEnv({
114
113
  * 💡 You'll get type errors if not all variables from `server` & `client` are included here.
115
114
  */
116
115
  runtimeEnv: {
117
- APPCONDA_ENDPOINT: process.env.APPCONDA_ENDPOINT,
118
- APPCONDA_CLIENT_ENDPOINT: process.env.APPCONDA_CLIENT_ENDPOINT,
119
- _SERVICE_TOKEN: process.env._SERVICE_TOKEN,
120
- ENTERPRISE_LICENSE_KEY: process.env.ENTERPRISE_LICENSE_KEY,
116
+ APPCONDA_ENDPOINT: typeof window !== 'undefined' ? process.env.APPCONDA_ENDPOINT : "",
117
+ APPCONDA_CLIENT_ENDPOINT: typeof window !== 'undefined' ? process.env.APPCONDA_CLIENT_ENDPOINT : "",
118
+ _SERVICE_TOKEN: typeof window !== 'undefined' ? process.env._SERVICE_TOKEN : "",
119
+ ENTERPRISE_LICENSE_KEY: typeof window !== 'undefined' ? process.env.ENTERPRISE_LICENSE_KEY : "",
121
120
  },
122
121
  });
123
122