Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@t3-oss/env-nextjs

Package Overview
Dependencies
Maintainers
2
Versions
39
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@t3-oss/env-nextjs - npm Package Compare versions

Comparing version 0.2.2 to 0.2.3-canary.786d85a

2

dist/index.d.ts

@@ -28,4 +28,4 @@ import * as zod from 'zod';

}
declare function createEnv<TServer extends Record<string, ZodType> = NonNullable<unknown>, TClient extends Record<`${ClientPrefix}${string}`, ZodType> = NonNullable<unknown>>({ runtimeEnv, ...opts }: Options<TServer, TClient>): (zod.objectUtil.addQuestionMarks<zod.baseObjectOutputType<TServer>, (zod.baseObjectOutputType<TServer> extends infer T_2 extends object ? { [k_1 in keyof T_2]: undefined extends zod.baseObjectOutputType<TServer>[k_1] ? never : k_1; } : never)[keyof TServer]> extends infer T ? { [k in keyof T]: zod.objectUtil.addQuestionMarks<zod.baseObjectOutputType<TServer>, (zod.baseObjectOutputType<TServer> extends infer T_1 extends object ? { [k_1 in keyof T_1]: undefined extends zod.baseObjectOutputType<TServer>[k_1] ? never : k_1; } : never)[keyof TServer]>[k]; } : never) & (zod.objectUtil.addQuestionMarks<zod.baseObjectOutputType<TClient>, (zod.baseObjectOutputType<TClient> extends infer T_5 extends object ? { [k_3 in keyof T_5]: undefined extends zod.baseObjectOutputType<TClient>[k_3] ? never : k_3; } : never)[keyof TClient]> extends infer T_3 ? { [k_2 in keyof T_3]: zod.objectUtil.addQuestionMarks<zod.baseObjectOutputType<TClient>, (zod.baseObjectOutputType<TClient> extends infer T_4 extends object ? { [k_3 in keyof T_4]: undefined extends zod.baseObjectOutputType<TClient>[k_3] ? never : k_3; } : never)[keyof TClient]>[k_2]; } : never);
declare function createEnv<TServer extends Record<string, ZodType> = NonNullable<unknown>, TClient extends Record<`${ClientPrefix}${string}`, ZodType> = NonNullable<unknown>>({ runtimeEnv, ...opts }: Options<TServer, TClient>): TClient extends Record<string, never> ? (zod.objectUtil.addQuestionMarks<zod.baseObjectOutputType<TServer>, (zod.baseObjectOutputType<TServer> extends infer T_6 extends object ? { [k_1 in keyof T_6]: undefined extends zod.baseObjectOutputType<TServer>[k_1] ? never : k_1; } : never)[keyof TServer]> extends infer T_4 ? { [k in keyof T_4]: zod.objectUtil.addQuestionMarks<zod.baseObjectOutputType<TServer>, (zod.baseObjectOutputType<TServer> extends infer T_5 extends object ? { [k_1 in keyof T_5]: undefined extends zod.baseObjectOutputType<TServer>[k_1] ? never : k_1; } : never)[keyof TServer]>[k]; } : never) extends infer T ? { [TKey in keyof T]: (zod.objectUtil.addQuestionMarks<zod.baseObjectOutputType<TServer>, (zod.baseObjectOutputType<TServer> extends infer T_3 extends object ? { [k_1 in keyof T_3]: undefined extends zod.baseObjectOutputType<TServer>[k_1] ? never : k_1; } : never)[keyof TServer]> extends infer T_1 ? { [k in keyof T_1]: zod.objectUtil.addQuestionMarks<zod.baseObjectOutputType<TServer>, (zod.baseObjectOutputType<TServer> extends infer T_2 extends object ? { [k_1 in keyof T_2]: undefined extends zod.baseObjectOutputType<TServer>[k_1] ? never : k_1; } : never)[keyof TServer]>[k]; } : never)[TKey]; } : never : TServer extends Record<string, never> ? (zod.objectUtil.addQuestionMarks<zod.baseObjectOutputType<TClient>, (zod.baseObjectOutputType<TClient> extends infer T_13 extends object ? { [k_3 in keyof T_13]: undefined extends zod.baseObjectOutputType<TClient>[k_3] ? never : k_3; } : never)[keyof TClient]> extends infer T_11 ? { [k_2 in keyof T_11]: zod.objectUtil.addQuestionMarks<zod.baseObjectOutputType<TClient>, (zod.baseObjectOutputType<TClient> extends infer T_12 extends object ? { [k_3 in keyof T_12]: undefined extends zod.baseObjectOutputType<TClient>[k_3] ? never : k_3; } : never)[keyof TClient]>[k_2]; } : never) extends infer T_7 ? { [TKey_1 in keyof T_7]: (zod.objectUtil.addQuestionMarks<zod.baseObjectOutputType<TClient>, (zod.baseObjectOutputType<TClient> extends infer T_10 extends object ? { [k_3 in keyof T_10]: undefined extends zod.baseObjectOutputType<TClient>[k_3] ? never : k_3; } : never)[keyof TClient]> extends infer T_8 ? { [k_2 in keyof T_8]: zod.objectUtil.addQuestionMarks<zod.baseObjectOutputType<TClient>, (zod.baseObjectOutputType<TClient> extends infer T_9 extends object ? { [k_3 in keyof T_9]: undefined extends zod.baseObjectOutputType<TClient>[k_3] ? never : k_3; } : never)[keyof TClient]>[k_2]; } : never)[TKey_1]; } : never : (zod.objectUtil.addQuestionMarks<zod.baseObjectOutputType<TServer>, (zod.baseObjectOutputType<TServer> extends infer T_23 extends object ? { [k_1 in keyof T_23]: undefined extends zod.baseObjectOutputType<TServer>[k_1] ? never : k_1; } : never)[keyof TServer]> extends infer T_21 ? { [k in keyof T_21]: zod.objectUtil.addQuestionMarks<zod.baseObjectOutputType<TServer>, (zod.baseObjectOutputType<TServer> extends infer T_22 extends object ? { [k_1 in keyof T_22]: undefined extends zod.baseObjectOutputType<TServer>[k_1] ? never : k_1; } : never)[keyof TServer]>[k]; } : never) & (zod.objectUtil.addQuestionMarks<zod.baseObjectOutputType<TClient>, (zod.baseObjectOutputType<TClient> extends infer T_26 extends object ? { [k_3 in keyof T_26]: undefined extends zod.baseObjectOutputType<TClient>[k_3] ? never : k_3; } : never)[keyof TClient]> extends infer T_24 ? { [k_2 in keyof T_24]: zod.objectUtil.addQuestionMarks<zod.baseObjectOutputType<TClient>, (zod.baseObjectOutputType<TClient> extends infer T_25 extends object ? { [k_3 in keyof T_25]: undefined extends zod.baseObjectOutputType<TClient>[k_3] ? never : k_3; } : never)[keyof TClient]>[k_2]; } : never) extends infer T_14 ? { [TKey_2 in keyof T_14]: ((zod.objectUtil.addQuestionMarks<zod.baseObjectOutputType<TServer>, (zod.baseObjectOutputType<TServer> extends infer T_17 extends object ? { [k_1 in keyof T_17]: undefined extends zod.baseObjectOutputType<TServer>[k_1] ? never : k_1; } : never)[keyof TServer]> extends infer T_15 ? { [k in keyof T_15]: zod.objectUtil.addQuestionMarks<zod.baseObjectOutputType<TServer>, (zod.baseObjectOutputType<TServer> extends infer T_16 extends object ? { [k_1 in keyof T_16]: undefined extends zod.baseObjectOutputType<TServer>[k_1] ? never : k_1; } : never)[keyof TServer]>[k]; } : never) & (zod.objectUtil.addQuestionMarks<zod.baseObjectOutputType<TClient>, (zod.baseObjectOutputType<TClient> extends infer T_20 extends object ? { [k_3 in keyof T_20]: undefined extends zod.baseObjectOutputType<TClient>[k_3] ? never : k_3; } : never)[keyof TClient]> extends infer T_18 ? { [k_2 in keyof T_18]: zod.objectUtil.addQuestionMarks<zod.baseObjectOutputType<TClient>, (zod.baseObjectOutputType<TClient> extends infer T_19 extends object ? { [k_3 in keyof T_19]: undefined extends zod.baseObjectOutputType<TClient>[k_3] ? never : k_3; } : never)[keyof TClient]>[k_2]; } : never))[TKey_2]; } : never;
export { createEnv };

@@ -1,2 +0,2 @@

"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }var _zod = require('zod'); var _zod2 = _interopRequireDefault(_zod);function l(e){let r=_nullishCoalesce(_nullishCoalesce(e.runtimeEnvStrict, () => (e.runtimeEnv)), () => (process.env));if(_nullishCoalesce(e.skipValidation, () => ((!!process.env.SKIP_ENV_VALIDATION&&process.env.SKIP_ENV_VALIDATION!=="false"&&process.env.SKIP_ENV_VALIDATION!=="0"))))return r;let a=typeof e.client=="object"?e.client:{},o=_zod2.default.object(a),v=_zod2.default.object(e.server),s=_nullishCoalesce(e.isServer, () => (typeof window>"u")),p=v.merge(o),i=s?p.safeParse(r):o.safeParse(r),f=_nullishCoalesce(e.onValidationError, () => ((t=>{throw console.error("\u274C Invalid environment variables:",t.flatten().fieldErrors),new Error("Invalid environment variables")}))),d=_nullishCoalesce(e.onInvalidAccess, () => ((t=>{throw new Error("\u274C Attempted to access a server-side environment variable on the client")})));return i.success===!1?f(i.error):new Proxy(i.data,{get(t,n){if(typeof n=="string")return!s&&!n.startsWith(e.clientPrefix)?d(n):t[n]}})}var T="NEXT_PUBLIC_";function C({runtimeEnv:e,...r}){return l({...r,clientPrefix:T,runtimeEnvStrict:e})}exports.createEnv = C;
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }var _zod = require('zod'); var _zod2 = _interopRequireDefault(_zod);function l(e){let r=_nullishCoalesce(_nullishCoalesce(e.runtimeEnvStrict, () => (e.runtimeEnv)), () => (process.env));if(e.skipValidation)return r;let a=typeof e.client=="object"?e.client:{},o=_zod2.default.object(a),v=_zod2.default.object(e.server),s=_nullishCoalesce(e.isServer, () => (typeof window>"u")),d=v.merge(o),i=s?d.safeParse(r):o.safeParse(r),f=_nullishCoalesce(e.onValidationError, () => ((t=>{throw console.error("\u274C Invalid environment variables:",t.flatten().fieldErrors),new Error("Invalid environment variables")}))),p=_nullishCoalesce(e.onInvalidAccess, () => ((t=>{throw new Error("\u274C Attempted to access a server-side environment variable on the client")})));return i.success===!1?f(i.error):new Proxy(i.data,{get(t,n){if(typeof n=="string")return!s&&!n.startsWith(e.clientPrefix)?p(n):t[n]}})}var u="NEXT_PUBLIC_";function C({runtimeEnv:e,...r}){return l({...r,clientPrefix:u,runtimeEnvStrict:e})}exports.createEnv = C;
//# sourceMappingURL=index.js.map
{
"name": "@t3-oss/env-nextjs",
"version": "0.2.2",
"version": "0.2.3-canary.786d85a",
"keywords": [

@@ -5,0 +5,0 @@ "create-t3-app",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc