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.7.0 to 0.7.1

2

dist/index.d.ts

@@ -12,2 +12,3 @@ import * as zod from 'zod';

skipValidation?: boolean;
emptyStringAsUndefined?: boolean;
}

@@ -34,3 +35,2 @@ interface StrictOptions<TPrefix extends string | undefined, TServer extends Record<string, ZodType>, TClient extends Record<string, ZodType>, TShared extends Record<string, ZodType>> extends BaseOptions<TShared> {

}>;
emptyStringAsUndefined?: boolean;
}

@@ -37,0 +37,0 @@ type ServerClientOptions<TPrefix extends string | undefined, TServer extends Record<string, ZodType>, TClient extends Record<string, ZodType>> = (ClientOptions<TPrefix, TClient> & ServerOptions<TPrefix, TServer>) | (ServerOptions<TPrefix, TServer> & Impossible<ClientOptions<never, never>>) | (ClientOptions<TPrefix, TClient> & Impossible<ServerOptions<never, never>>);

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

"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }var _zod = require('zod');function f(e){let n=_nullishCoalesce(_nullishCoalesce(e.runtimeEnvStrict, () => (e.runtimeEnv)), () => (process.env));if(_nullishCoalesce(e.emptyStringAsUndefined, () => (!1)))for(let[t,r]of Object.entries(n))r===""&&delete n[t];if(e.skipValidation)return n;let i=typeof e.client=="object"?e.client:{},o=typeof e.server=="object"?e.server:{},s=typeof e.shared=="object"?e.shared:{},d=_zod.z.object(i),T=_zod.z.object(o),l=_zod.z.object(s),v=_nullishCoalesce(e.isServer, () => (typeof window>"u")),y=d.merge(l),p=T.merge(l).merge(d),a=v?p.safeParse(n):y.safeParse(n),m=_nullishCoalesce(e.onValidationError, () => ((t=>{throw console.error("\u274C Invalid environment variables:",t.flatten().fieldErrors),new Error("Invalid environment variables")}))),u=_nullishCoalesce(e.onInvalidAccess, () => ((t=>{throw new Error("\u274C Attempted to access a server-side environment variable on the client")})));return a.success===!1?m(a.error):new Proxy(a.data,{get(t,r){if(!(typeof r!="string"||r==="__esModule"||r==="$$typeof"))return!v&&e.clientPrefix&&!r.startsWith(e.clientPrefix)&&l.shape[r]===void 0?u(r):t[r]}})}var x="NEXT_PUBLIC_";function h(e){let n=typeof e.client=="object"?e.client:{},i=typeof e.server=="object"?e.server:{},o=typeof e.shared=="object"?e.shared:{},s=e.runtimeEnv?e.runtimeEnv:{...process.env,...e.experimental__runtimeEnv};return f({...e,shared:o,client:n,server:i,clientPrefix:x,runtimeEnv:s})}exports.createEnv = h;
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }var _zod = require('zod');function f(e){let r=_nullishCoalesce(_nullishCoalesce(e.runtimeEnvStrict, () => (e.runtimeEnv)), () => (process.env));if(_nullishCoalesce(e.emptyStringAsUndefined, () => (!1)))for(let[t,n]of Object.entries(r))n===""&&delete r[t];if(e.skipValidation)return r;let i=typeof e.client=="object"?e.client:{},o=typeof e.server=="object"?e.server:{},s=typeof e.shared=="object"?e.shared:{},d=_zod.z.object(i),T=_zod.z.object(o),l=_zod.z.object(s),v=_nullishCoalesce(e.isServer, () => (typeof window>"u")),p=d.merge(l),y=T.merge(l).merge(d),c=v?y.safeParse(r):p.safeParse(r),m=_nullishCoalesce(e.onValidationError, () => ((t=>{throw console.error("\u274C Invalid environment variables:",t.flatten().fieldErrors),new Error("Invalid environment variables")}))),u=_nullishCoalesce(e.onInvalidAccess, () => ((t=>{throw new Error("\u274C Attempted to access a server-side environment variable on the client")})));return c.success===!1?m(c.error):new Proxy(c.data,{get(t,n){if(!(typeof n!="string"||n==="__esModule"||n==="$$typeof"))return!v&&e.clientPrefix&&!n.startsWith(e.clientPrefix)&&l.shape[n]===void 0?u(n):t[n]}})}var x="NEXT_PUBLIC_";function P(e){let r=typeof e.client=="object"?e.client:{},i=typeof e.server=="object"?e.server:{},o=e.shared,s=e.runtimeEnv?e.runtimeEnv:{...process.env,...e.experimental__runtimeEnv};return f({...e,shared:o,client:r,server:i,clientPrefix:x,runtimeEnv:s})}exports.createEnv = P;
//# sourceMappingURL=index.js.map
{
"name": "@t3-oss/env-nextjs",
"version": "0.7.0",
"version": "0.7.1",
"keywords": [

@@ -35,3 +35,3 @@ "create-t3-app",

"dependencies": {
"@t3-oss/env-core": "0.7.0"
"@t3-oss/env-core": "0.7.1"
},

@@ -38,0 +38,0 @@ "peerDependencies": {

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