@model-w/preset-nuxt3 1.0.5 → 2023.4.0-beta.1

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.
Files changed (2) hide show
  1. package/index.ts +9 -7
  2. package/package.json +1 -1
package/index.ts CHANGED
@@ -235,8 +235,10 @@ export function defineModelWConfig(
235
235
  });
236
236
  const apiUrl =
237
237
  config.apiUrl ||
238
- env.get({ name: "API_URL", buildDefault: "http://localhost" });
238
+ env.get({ name: "NUXT_API_URL", buildDefault: "http://localhost" });
239
239
 
240
+ const proxyTarget = config.apiUrl ||
241
+ env.get({ name: "NUXT_PROXY_OPTIONS_TARGET", buildDefault: "http://localhost" });
240
242
  const backAlias = config.backAlias || "back";
241
243
  const cmsAlias = config.cmsAlias || "wubba-lubba-dub-dub";
242
244
 
@@ -248,11 +250,11 @@ export function defineModelWConfig(
248
250
  );
249
251
 
250
252
  const sentryDsn =
251
- config.sentryDsn || env.get({ name: "SENTRY_DSN", defaultValue: "" });
252
- const environment =
253
+ config.sentryDsn || env.get({ name: "NUXT_PUBLIC_SENTRY_DSN", defaultValue: "" });
254
+ const sentryEnvironment =
253
255
  config.environment ||
254
256
  env.get({
255
- name: "ENVIRONMENT",
257
+ name: "NUXT_PUBLIC_SENTRY_ENVIRONMENT",
256
258
  defaultValue: sentryDsn ? undefined : "",
257
259
  });
258
260
 
@@ -264,12 +266,12 @@ export function defineModelWConfig(
264
266
  runtimeConfig: defu(config.runtimeConfig || {}, {
265
267
  apiUrl,
266
268
  proxy: {
267
- options: { target: apiUrl },
269
+ options: { target: proxyTarget },
268
270
  },
269
271
  public: {
270
272
  sentry: {
271
273
  dsn: sentryDsn,
272
- environment,
274
+ environment: sentryEnvironment,
273
275
  },
274
276
  },
275
277
  }),
@@ -306,7 +308,7 @@ export function defineModelWConfig(
306
308
 
307
309
  sentry: {
308
310
  dsn: sentryDsn,
309
- environment: environment,
311
+ environment: sentryEnvironment,
310
312
  } as SentryOptions,
311
313
 
312
314
  modules: [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@model-w/preset-nuxt3",
3
- "version": "1.0.5",
3
+ "version": "2023.4.0-beta.1",
4
4
  "type": "module",
5
5
  "description": "Preset of Nuxt3 for ModelW",
6
6
  "license": "WTFPL",