You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Rename Hyperdrive local connection string environment variable from `WRANGLER_HYPERDRIVE_LOCAL_CONNECTION_STRING_<BINDING_NAME>` to `CLOUDFLARE_HYPERDRIVE_LOCAL_CONNECTION_STRING_<BINDING_NAME>`. The old variable name is still supported but will now show a deprecation warning.
// only require a local connection string in the wrangler file or the env if not using dev --remote
919
926
if(
920
927
local&&
921
928
connectionStringFromEnv===undefined&&
922
929
hyperdrive.localConnectionString===undefined
923
930
){
924
931
thrownewUserError(
925
-
`When developing locally, you should use a local Postgres connection string to emulate Hyperdrive functionality. Please setup Postgres locally and set the value of the 'WRANGLER_HYPERDRIVE_LOCAL_CONNECTION_STRING_${hyperdrive.binding}' variable or "${hyperdrive.binding}"'s "localConnectionString" to the Postgres connection string.`,
932
+
`When developing locally, you should use a local Postgres connection string to emulate Hyperdrive functionality. Please setup Postgres locally and set the value of the '${desiredPrefix}${hyperdrive.binding}' variable or "${hyperdrive.binding}"'s "localConnectionString" to the Postgres connection string.`,
926
933
{telemetryMessage: "no local hyperdrive connection string"}
927
934
);
928
935
}
929
936
930
937
// If there is a non-empty connection string specified in the environment,
931
938
// use that as our local connection string configuration.
932
939
if(connectionStringFromEnv){
940
+
if(varName.startsWith(deprecatedPrefix)){
941
+
logger.once.warn(
942
+
`Using "${deprecatedPrefix}<BINDING_NAME>" environment variable. This is deprecated. Please use "${desiredPrefix}<BINDING_NAME>", instead.`
943
+
);
944
+
}
933
945
logger.log(
934
-
`Found a non-empty WRANGLER_HYPERDRIVE_LOCAL_CONNECTION_STRING variable for binding. Hyperdrive will connect to this database during local development.`
946
+
`Found a non-empty ${varName} variable for binding. Hyperdrive will connect to this database during local development.`
0 commit comments