nuxt-outfit 1.2.5 → 1.2.7

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/module.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@nuxt/outfit",
3
3
  "configKey": "outfit",
4
- "version": "1.2.5"
4
+ "version": "1.2.7"
5
5
  }
@@ -2,7 +2,7 @@ import { useRuntimeConfig, useNuxtApp, useState } from "#imports";
2
2
  import { ref, reactive } from "vue";
3
3
  import { klona as deepClone } from "klona/full";
4
4
  import { has, unset } from "lodash-es";
5
- import { unflatten } from "flat";
5
+ import flat from "flat";
6
6
  export const useForm = (opts = {}) => {
7
7
  const httpInstance = useRuntimeConfig().public.outfit.httpInstance;
8
8
  const http = useNuxtApp()?.[httpInstance] ?? $fetch;
@@ -52,6 +52,7 @@ export const useForm = (opts = {}) => {
52
52
  }
53
53
  };
54
54
  const handleFail = (fail, isRunCallback = true) => {
55
+ const { unflatten } = flat;
55
56
  let messages = {};
56
57
  const brackets = (text) => text.replace(/[[\].]+/g, ".");
57
58
  if (fail.name === "ValidationError") {
@@ -18,9 +18,7 @@ export const useSpaHeaders = (additionalHeaders = {}) => {
18
18
  const event = useRequestEvent();
19
19
  const headers = useRequestHeaders(["cookie", "referer", "host"]);
20
20
  const goodResponses = [200, 201, 202, 203, 204, 205, 206, 207, 208, 226];
21
- if (!Object.prototype.hasOwnProperty.call(headers, "referer")) {
22
- headers.referer = `${headers.host}/${event.node.req.originalUrl}`;
23
- }
21
+ headers.referer = `${headers.host}${event.node.req.originalUrl}`;
24
22
  const parseCookie = (cookies) => {
25
23
  return parse(split(cookies)).map((cookie) => serialize(cookie.name, cookie.value, cookie));
26
24
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nuxt-outfit",
3
- "version": "1.2.5",
3
+ "version": "1.2.7",
4
4
  "description": "Outfit - Connection Laravel and Nuxt",
5
5
  "repository": {
6
6
  "type": "git",