@hostlink/nuxt-light 1.12.7 → 1.13.2

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 (73) hide show
  1. package/dist/module.d.mts +1 -1
  2. package/dist/module.d.ts +1 -1
  3. package/dist/module.json +5 -1
  4. package/dist/module.mjs +1 -1
  5. package/dist/runtime/components/l-app.vue +3 -4
  6. package/dist/runtime/components/l-banner.vue +1 -1
  7. package/dist/runtime/components/l-btn.vue +1 -1
  8. package/dist/runtime/components/l-card.vue +1 -1
  9. package/dist/runtime/components/l-checkbox.vue +1 -1
  10. package/dist/runtime/components/l-editor.vue +1 -1
  11. package/dist/runtime/components/l-file-manager.vue +8 -12
  12. package/dist/runtime/components/l-form.vue +1 -1
  13. package/dist/runtime/components/l-input.vue +1 -1
  14. package/dist/runtime/components/l-item.vue +1 -1
  15. package/dist/runtime/components/l-list.vue +1 -1
  16. package/dist/runtime/components/l-login.vue +22 -24
  17. package/dist/runtime/components/l-page.vue +1 -1
  18. package/dist/runtime/components/l-select.vue +1 -1
  19. package/dist/runtime/components/l-table.vue +2 -2
  20. package/dist/runtime/components/l-tabs.vue +1 -1
  21. package/dist/runtime/formkit/Form.vue +1 -1
  22. package/dist/runtime/index.d.ts +3 -3
  23. package/dist/runtime/{index.mjs → index.js} +2 -2
  24. package/dist/runtime/lib/{SystemValue.mjs → SystemValue.js} +2 -2
  25. package/dist/runtime/lib/defineLightModel.d.ts +1 -1
  26. package/dist/runtime/lib/{defineLightModel.mjs → defineLightModel.js} +2 -2
  27. package/dist/runtime/lib/{f.mjs → f.js} +1 -1
  28. package/dist/runtime/lib/{getApiUrl.mjs → getApiUrl.js} +1 -1
  29. package/dist/runtime/lib/{getCurrentUser.mjs → getCurrentUser.js} +1 -1
  30. package/dist/runtime/lib/{getGQLFields.mjs → getGQLFields.js} +3 -3
  31. package/dist/runtime/lib/{getID.mjs → getID.js} +1 -1
  32. package/dist/runtime/lib/{getModelColumns.mjs → getModelColumns.js} +1 -1
  33. package/dist/runtime/lib/getModelField.d.ts +2 -2
  34. package/dist/runtime/lib/getModelField.js +4 -0
  35. package/dist/runtime/lib/{getModelFields.mjs → getModelFields.js} +1 -1
  36. package/dist/runtime/lib/{getObject.mjs → getObject.js} +2 -2
  37. package/dist/runtime/lib/index.d.ts +25 -23
  38. package/dist/runtime/lib/index.js +39 -0
  39. package/dist/runtime/lib/{list.mjs → list.js} +3 -2
  40. package/dist/runtime/lib/{listObject.mjs → listObject.js} +1 -1
  41. package/dist/runtime/lib/{loadObject.mjs → loadObject.js} +1 -1
  42. package/dist/runtime/lib/m.js +4 -0
  43. package/dist/runtime/lib/model.d.ts +3 -3
  44. package/dist/runtime/lib/{model.mjs → model.js} +4 -4
  45. package/dist/runtime/lib/{q.mjs → q.js} +3 -7
  46. package/dist/runtime/lib/{sv.mjs → sv.js} +2 -2
  47. package/dist/runtime/lib/{updateObject.mjs → updateObject.js} +1 -1
  48. package/dist/runtime/pages/Permission/all.vue +4 -4
  49. package/dist/runtime/pages/Permission/export.vue +2 -2
  50. package/dist/runtime/pages/System/database/table.vue +2 -2
  51. package/dist/runtime/pages/User/index.vue +2 -0
  52. package/dist/runtime/pages/User/setting/bio-auth.vue +2 -2
  53. package/dist/runtime/pages/User/setting/password.vue +4 -4
  54. package/dist/runtime/pages/logout.vue +2 -2
  55. package/dist/runtime/plugin.d.ts +2 -2
  56. package/dist/runtime/{plugin.mjs → plugin.js} +14 -13
  57. package/dist/types.d.mts +1 -16
  58. package/dist/types.d.ts +1 -16
  59. package/package.json +9 -13
  60. package/dist/runtime/lib/getModelField.mjs +0 -2
  61. package/dist/runtime/lib/index.mjs +0 -35
  62. package/dist/runtime/lib/m.mjs +0 -4
  63. /package/dist/runtime/formkit/{index.mjs → index.js} +0 -0
  64. /package/dist/runtime/lib/{GQLFieldBuilder.mjs → GQLFieldBuilder.js} +0 -0
  65. /package/dist/runtime/lib/{isGranted.mjs → isGranted.js} +0 -0
  66. /package/dist/runtime/lib/{t.mjs → t.js} +0 -0
  67. /package/dist/runtime/lib/{tc2sc.mjs → tc2sc.js} +0 -0
  68. /package/dist/runtime/lib/{toJson.mjs → toJson.js} +0 -0
  69. /package/dist/runtime/types/{EventLog.mjs → EventLog.js} +0 -0
  70. /package/dist/runtime/types/{MailLog.mjs → MailLog.js} +0 -0
  71. /package/dist/runtime/types/{SystemValue.mjs → SystemValue.js} +0 -0
  72. /package/dist/runtime/types/{User.mjs → User.js} +0 -0
  73. /package/dist/runtime/types/{UserLog.mjs → UserLog.js} +0 -0
package/dist/module.d.mts CHANGED
@@ -2,6 +2,6 @@ import * as _nuxt_schema from '@nuxt/schema';
2
2
 
3
3
  interface ModuleOptions {
4
4
  }
5
- declare const _default: _nuxt_schema.NuxtModule<ModuleOptions>;
5
+ declare const _default: _nuxt_schema.NuxtModule<ModuleOptions, ModuleOptions, false>;
6
6
 
7
7
  export { type ModuleOptions, _default as default };
package/dist/module.d.ts CHANGED
@@ -2,6 +2,6 @@ import * as _nuxt_schema from '@nuxt/schema';
2
2
 
3
3
  interface ModuleOptions {
4
4
  }
5
- declare const _default: _nuxt_schema.NuxtModule<ModuleOptions>;
5
+ declare const _default: _nuxt_schema.NuxtModule<ModuleOptions, ModuleOptions, false>;
6
6
 
7
7
  export { type ModuleOptions, _default as default };
package/dist/module.json CHANGED
@@ -1,5 +1,9 @@
1
1
  {
2
2
  "name": "light",
3
3
  "configKey": "light",
4
- "version": "1.12.7"
4
+ "version": "1.13.2",
5
+ "builder": {
6
+ "@nuxt/module-builder": "0.8.3",
7
+ "unbuild": "2.0.0"
8
+ }
5
9
  }
package/dist/module.mjs CHANGED
@@ -248,7 +248,6 @@ const module = defineNuxtModule({
248
248
  async setup(options, nuxt) {
249
249
  const resolver = createResolver(import.meta.url);
250
250
  const { resolve: resolveQuasar } = createResolver(dirname(await resolvePath("quasar/package.json")));
251
- JSON.parse(await readFile(resolveQuasar("package.json"), "utf-8"));
252
251
  const importMap = JSON.parse(await await readFile(resolveQuasar("dist/transforms/import-map.json"), "utf-8"));
253
252
  nuxt.options.css.push("quasar/dist/quasar.prod.css");
254
253
  nuxt.options.css.push("@quasar/extras/material-icons/material-icons.css");
@@ -269,6 +268,7 @@ const module = defineNuxtModule({
269
268
  const index = resolver.resolve("./runtime/index");
270
269
  const SystemValue = resolver.resolve("./runtime/lib/SystemValue");
271
270
  addImports([
271
+ { name: "api", from },
272
272
  { name: "id", from },
273
273
  { name: "getID", from },
274
274
  { name: "addObject", from },
@@ -1,14 +1,13 @@
1
1
  <script setup>
2
2
  import { provide, ref } from 'vue'
3
3
  import { useLight, watch } from "#imports";
4
- import { useRuntimeConfig } from 'nuxt/app'
5
- import { setApiUrl } from '@hostlink/light'
4
+ //import { useRuntimeConfig } from 'nuxt/app'
6
5
  import { useQuasar } from 'quasar'
7
6
  import { q } from '#imports'
8
7
  import { useRoute } from "vue-router";
9
- const config = useRuntimeConfig();
8
+ /* const config = useRuntimeConfig();
10
9
  setApiUrl(config?.public?.apiBase ?? '/api/');
11
-
10
+ */
12
11
  const route = useRoute();
13
12
  const light = useLight()
14
13
  const quasar = useQuasar()
@@ -2,7 +2,7 @@
2
2
  import { type QBannerProps } from 'quasar'
3
3
  import { computed, useSlots } from 'vue'
4
4
 
5
- export interface LBannerProps extends QBannerProps {
5
+ export interface LBannerProps extends /* @vue-ignore */ QBannerProps {
6
6
  icon?: string
7
7
  type?: 'primary' | 'secondary' | 'accent' | 'dark' | 'positive' | 'negative' | 'info' | 'warning'
8
8
  }
@@ -4,7 +4,7 @@ import { computed, inject, unref, toRaw } from "vue";
4
4
  import { useLight } from '#imports';
5
5
  import { useI18n } from "vue-i18n";
6
6
 
7
- export interface LBtnProps extends QBtnProps {
7
+ export interface LBtnProps extends /* @vue-ignore */ QBtnProps {
8
8
  permission?: string;
9
9
  }
10
10
 
@@ -8,7 +8,7 @@ const emit = defineEmits(["close"]);
8
8
  const minimized = defineModel<boolean>("minimized", { default: false })
9
9
  const maximized = defineModel<boolean>("maximized", { default: false })
10
10
 
11
- export interface LCardProps extends QCardProps {
11
+ export interface LCardProps extends /* @vue-ignore */ QCardProps {
12
12
  loading?: boolean;
13
13
  title?: string;
14
14
  /**
@@ -2,7 +2,7 @@
2
2
  import { computed } from "vue"
3
3
  import { type QCheckboxProps } from "quasar"
4
4
 
5
- export interface LCheckboxProps extends QCheckboxProps {
5
+ export interface LCheckboxProps extends /* @vue-ignore */ QCheckboxProps {
6
6
  }
7
7
 
8
8
  const emit = defineEmits(["update:modelValue"]);
@@ -27,7 +27,7 @@ const TextHightlightCMD = ((cmd, name) => {
27
27
  edit.focus()
28
28
  })
29
29
 
30
- export interface LEditorProps extends QEditorProps {
30
+ export interface LEditorProps extends /* @vue-ignore */ QEditorProps {
31
31
  }
32
32
 
33
33
  const emit = defineEmits(["update:modelValue"]);
@@ -3,11 +3,7 @@ import { useI18n } from "vue-i18n";
3
3
  import { ref, watch, computed } from 'vue';
4
4
  import { useQuasar, format } from 'quasar';
5
5
  import { q, m, useLight } from '#imports';
6
- import {
7
- fsListFolders, fsCreateFolder, fsDeleteFolder, fsDeleteFile, fsRenameFile, fsRenameFolder, fsReadFile,
8
- granted
9
-
10
- } from "@hostlink/light";
6
+ import { api } from "../lib";
11
7
  const { humanStorageSize } = format
12
8
 
13
9
  const light = useLight();
@@ -107,7 +103,7 @@ function toggleLeftDrawer() {
107
103
  const path = ref(props.base);
108
104
 
109
105
  const onLazyLoad = async ({ node, key, done, fail }) => {
110
- const data = await fsListFolders(node.path);
106
+ const data = await api.fs.folders.list(node.path);
111
107
  data.map((item) => {
112
108
  item.lazy = true;
113
109
  return item;
@@ -139,7 +135,7 @@ const loadItems = async () => {
139
135
 
140
136
  let folders = [];
141
137
  if (!label.value && !localSearch.value) {
142
- folders = await fsListFolders(path.value);
138
+ folders = await api.fs.folders.list(path.value);
143
139
  folders = folders.map((item) => {
144
140
  item.type = "folder";
145
141
  item.lazy = true;
@@ -279,7 +275,7 @@ const onNewFolder = () => {
279
275
  },
280
276
  cancel: true,
281
277
  }).onOk(async (name) => {
282
- await fsCreateFolder(path.value + "/" + name)
278
+ await api.fs.folders.create(path.value + "/" + name)
283
279
  const items = await loadItems();
284
280
  reloadTreeFolder(path.value, items.folders);
285
281
  });
@@ -424,7 +420,7 @@ const onDownloadRow = async (row) => {
424
420
  const search = ref(null);
425
421
 
426
422
  const reloadStorage = async () => {
427
- path.value = props.base;
423
+ ath.value = props.base;
428
424
 
429
425
  search.value = "";
430
426
  localSearch.value = "";
@@ -433,7 +429,7 @@ const reloadStorage = async () => {
433
429
  reloadTreeFolder(path.value, items.folders);
434
430
  }
435
431
 
436
- const permission = await granted([
432
+ const permission = await api.auth.granted([
437
433
  'fs.folder.create', 'fs.folder.delete', 'fs.folder.rename',
438
434
  'fs.file.delete', 'fs.file.rename', 'fs.file.upload'
439
435
  ]);
@@ -489,8 +485,8 @@ const onPreviewPDF = async (row) => {
489
485
  }
490
486
 
491
487
  const onClickInfo = async (row) => {
492
- rightDrawerOpen.value = true;
493
-
488
+ rightDrawerOpen.value = true;
489
+
494
490
  }
495
491
 
496
492
  </script>
@@ -2,7 +2,7 @@
2
2
  import { ref } from "vue";
3
3
  import { useRouter, useRoute } from "vue-router";
4
4
  import { useQuasar } from "quasar";
5
- import { model } from "@hostlink/light"
5
+ import { model } from "#imports";
6
6
 
7
7
  const route = useRoute();
8
8
  const router = useRouter();
@@ -5,7 +5,7 @@ import tc2sc from "../lib/tc2sc";
5
5
  import { useLight } from '#imports';
6
6
 
7
7
  import type { QInputProps } from "quasar";
8
- export interface LInputProps extends QInputProps {
8
+ export interface LInputProps extends /* @vue-ignore */ QInputProps {
9
9
  showPassword?: boolean;
10
10
  translate?: boolean;
11
11
  required?: boolean;
@@ -1,7 +1,7 @@
1
1
  <script setup lang="ts">
2
2
  import type { QItemProps } from 'quasar';
3
3
 
4
- export interface LItemProps extends QItemProps {
4
+ export interface LItemProps extends /* @vue-ignore */ QItemProps {
5
5
  label?: string;
6
6
  type?: 'text' | 'caption';
7
7
  name?: string;
@@ -2,7 +2,7 @@
2
2
 
3
3
  import type { QListProps } from 'quasar';
4
4
 
5
- export interface LListProps extends QListProps {
5
+ export interface LListProps extends /* @vue-ignore */ QListProps {
6
6
  fields?: any[];
7
7
  modelValue?: any;
8
8
  }
@@ -1,12 +1,8 @@
1
1
  <script setup>
2
- import { useLight } from "#imports";
3
2
  import { ref, reactive, onMounted } from 'vue'
4
- import { useQuasar, Dialog } from 'quasar';
3
+ import { useQuasar } from 'quasar';
5
4
  import { useI18n } from 'vue-i18n';
6
- import { m, notify } from '#imports';
7
-
8
-
9
- import { login, webauthnLogin } from '@hostlink/light';
5
+ import { useLight, m, notify, api } from '#imports';
10
6
 
11
7
  const light = useLight();
12
8
 
@@ -21,13 +17,14 @@ const data = reactive({
21
17
  username: "", password: "", code: ""
22
18
  });
23
19
 
24
- const qua = useQuasar()
20
+ const quasar = useQuasar()
25
21
 
26
22
  const submit = async () => {
27
23
  if (await form1.value.validate()) {
28
24
 
29
25
  try {
30
- await login(data.username, data.password, data.code)
26
+
27
+ await api.auth.login(data.username, data.password, data.code)
31
28
  window.self.location.reload();
32
29
  } catch (e) {
33
30
  notify(e.message, "negative");
@@ -37,9 +34,9 @@ const submit = async () => {
37
34
  }
38
35
 
39
36
  const forgetPassword = async () => {
40
- Dialog.create({
37
+ quasar.dialog({
41
38
  title: i18n.t("Forget password"),
42
- message: "Please enter your email address, we will send you a code to reset your password",
39
+ message: i18n.t("Please enter your email address, we will send you a code to reset your password"),
43
40
  prompt: {
44
41
  model: "",
45
42
  type: "email",
@@ -50,11 +47,12 @@ const forgetPassword = async () => {
50
47
  return;
51
48
  }
52
49
 
50
+
53
51
  try {
54
- await m("forgetPassword", { email: email });
55
- qua.dialog({
56
- title: "Enter your code",
57
- message: "Please enter the code sent to your email, your code will expire in 10 minutes",
52
+ await api.auth.forgetPassword(email);
53
+ quasar.dialog({
54
+ title: i18n.t("Enter your code"),
55
+ message: i18n.t("Please enter the code sent to your email, your code will expire in 10 minutes"),
58
56
  prompt: {
59
57
  model: "",
60
58
  type: "text"
@@ -67,9 +65,9 @@ const forgetPassword = async () => {
67
65
  }
68
66
 
69
67
  if (await m("verifyCode", { code: code, email: email })) {
70
- qua.dialog({
71
- title: "Reset password",
72
- message: "Please enter your new password",
68
+ quasar.dialog({
69
+ title: i18n.t("Reset password"),
70
+ message: i18n.t("Please enter your new password"),
73
71
  prompt: {
74
72
  model: "",
75
73
  type: "password"
@@ -79,9 +77,9 @@ const forgetPassword = async () => {
79
77
  return;
80
78
  }
81
79
 
82
- if (await m("resetPassword", { password: password, email: email, code: code })) {
83
- qua.notify({
84
- message: "Your password has been reset successfully",
80
+ if (api.auth.resetPassword(email, password, code)) {
81
+ quasar.notify({
82
+ message: i18n.t("Your password has been reset successfully"),
85
83
  color: "positive",
86
84
  icon: "sym_o_check",
87
85
  position: "top",
@@ -90,8 +88,8 @@ const forgetPassword = async () => {
90
88
  }
91
89
  });
92
90
  } else {
93
- qua.notify({
94
- message: "Your code is invalid",
91
+ quasar.notify({
92
+ message: i18n.t("Your code is invalid"),
95
93
  color: "negative",
96
94
  icon: "sym_o_error",
97
95
  position: "top",
@@ -103,7 +101,7 @@ const forgetPassword = async () => {
103
101
 
104
102
  });
105
103
  } catch (e) {
106
- qua.notify({
104
+ quasar.notify({
107
105
  message: e.message,
108
106
  color: "negative",
109
107
  icon: "sym_o_error",
@@ -144,7 +142,7 @@ onMounted(() => {
144
142
 
145
143
 
146
144
  if (!window.google) {
147
- qua.notify({
145
+ quasar.notify({
148
146
  message: "Google login is not available", //set script https://accounts.google.com/gsi/client in nuuxt.config.js
149
147
  color: "negative",
150
148
  icon: "sym_o_error",
@@ -9,7 +9,7 @@ const router = useRouter();
9
9
  const route = useRoute();
10
10
  const light = useLight();
11
11
 
12
- export interface LPageProps extends QPageProps {
12
+ export interface LPageProps extends /* @vue-ignore */ QPageProps {
13
13
  title?: string;
14
14
  backBtn?: boolean;
15
15
  editBtn?: boolean;
@@ -8,7 +8,7 @@ const emits = defineEmits(["update:modelValue"]);
8
8
 
9
9
  const { t } = useI18n();
10
10
  const light = useLight();
11
- interface LSelectProps extends QSelectProps {
11
+ interface LSelectProps extends /* @vue-ignore */ QSelectProps {
12
12
  required?: boolean,
13
13
  }
14
14
 
@@ -11,7 +11,7 @@ const maximized = defineModel<boolean>("maximized", { default: false })
11
11
 
12
12
 
13
13
  // extends QTableColumn
14
- export interface LTableColumn extends QTableColumn {
14
+ export interface LTableColumn extends /* @vue-ignore */ QTableColumn {
15
15
  searchable?: boolean,
16
16
  searchType?: string,
17
17
  searchOptions?: Array<any> | Function,
@@ -23,7 +23,7 @@ export interface LTableColumn extends QTableColumn {
23
23
  const errors = ref<InstanceType<any>>([
24
24
  ]);
25
25
 
26
- export interface LTableProps extends QTableProps {
26
+ export interface LTableProps extends /* @vue-ignore */ QTableProps {
27
27
  columns?: Array<LTableColumn>,
28
28
  actions?: Array<string>,
29
29
  sortBy?: string | null | undefined,
@@ -2,7 +2,7 @@
2
2
  import type { QTabsProps } from 'quasar';
3
3
  import { onMounted, useSlots } from '#imports';
4
4
  const model = defineModel<string | number | null | undefined>()
5
- export interface LTabsProps extends QTabsProps {
5
+ export interface LTabsProps extends /* @vue-ignore */ QTabsProps {
6
6
  }
7
7
  defineProps<LTabsProps>();
8
8
  const slots = useSlots()
@@ -2,7 +2,7 @@
2
2
  import { ref } from 'vue'
3
3
  import { useRouter, useRoute } from "vue-router";
4
4
  import { useQuasar } from "quasar";
5
- import { model } from "@hostlink/light"
5
+ import { model } from "#imports";
6
6
 
7
7
  const route = useRoute();
8
8
  const router = useRouter();
@@ -33,7 +33,7 @@ declare const app: {
33
33
  getCompany: () => string;
34
34
  setCompanyLogo: (logo: string) => void;
35
35
  getCompanyLogo: () => string;
36
- getVersion: () => any;
36
+ getVersion: () => string;
37
37
  addError: (error: String) => void;
38
38
  getErrors: () => String[];
39
39
  removeError: (error: String) => void;
@@ -82,7 +82,7 @@ export declare const useLight: (options?: {
82
82
  getCompany: () => string;
83
83
  setCompanyLogo: (logo: string) => void;
84
84
  getCompanyLogo: () => string;
85
- getVersion: () => any;
85
+ getVersion: () => string;
86
86
  addError: (error: String) => void;
87
87
  getErrors: () => String[];
88
88
  removeError: (error: String) => void;
@@ -98,4 +98,4 @@ export declare const useLight: (options?: {
98
98
  isGranted: (right?: string) => boolean;
99
99
  setPermissions: (permissions: Array<string>) => void;
100
100
  };
101
- export * from "./lib";
101
+ export * from "./lib.js";
@@ -1,6 +1,6 @@
1
1
  import packageJson from "../../package.json";
2
2
  import { watch, reactive, toRaw } from "vue";
3
- import { m, q } from "./lib/index.mjs";
3
+ import { m, q } from "./lib/index.js";
4
4
  const errors = [];
5
5
  let styles = {};
6
6
  const COLOR_CODE = {
@@ -207,4 +207,4 @@ export const useLight = (options = {}) => {
207
207
  }
208
208
  return app;
209
209
  };
210
- export * from "./lib/index.mjs";
210
+ export * from "./lib/index.js";
@@ -1,5 +1,5 @@
1
- import sv from "./sv.mjs";
2
- import { cache } from "./sv.mjs";
1
+ import sv from "./sv.js";
2
+ import { cache } from "./sv.js";
3
3
  export const loadSV = (name) => {
4
4
  return () => sv(name);
5
5
  };
@@ -19,5 +19,5 @@ export interface LightModel {
19
19
  name: string;
20
20
  fields: LightModelFields;
21
21
  }
22
- declare const _default: (model: LightModel) => any;
22
+ declare const _default: (model: LightModel) => import("#app").Plugin<Record<string, unknown>> & import("#app").ObjectPlugin<Record<string, unknown>>;
23
23
  export default _default;
@@ -1,7 +1,7 @@
1
1
  import { defineNuxtPlugin } from "#app";
2
- import { defineModel } from "@hostlink/light";
2
+ import { api } from "./index.js";
3
3
  export default (model) => {
4
4
  return defineNuxtPlugin(() => {
5
- defineModel(model.name, model.fields);
5
+ api.models.create(model.name, model.fields);
6
6
  });
7
7
  };
@@ -1,5 +1,5 @@
1
1
  import { jsonToGraphQLQuery } from "json-to-graphql-query";
2
- import toJson from "./toJson.mjs";
2
+ import toJson from "./toJson.js";
3
3
  export default function(operation, args, fields = []) {
4
4
  if (arguments.length === 2) {
5
5
  fields = args;
@@ -1,4 +1,4 @@
1
- import { getApiBase } from "./index.mjs";
1
+ import { getApiBase } from "./index.js";
2
2
  export default function getApiUrl(url, params) {
3
3
  const urlParams = new URLSearchParams(params).toString();
4
4
  return getApiBase() + `${url}?${urlParams}`;
@@ -1,4 +1,4 @@
1
- import q from "./q.mjs";
1
+ import q from "./q.js";
2
2
  export default async () => {
3
3
  try {
4
4
  return await q("my", ["username", "first_name", "last_name", "roles"]);
@@ -1,9 +1,9 @@
1
- import GQLFieldBuilder from "./GQLFieldBuilder.mjs";
2
- import { getModelField } from "@hostlink/light";
1
+ import GQLFieldBuilder from "./GQLFieldBuilder.js";
2
+ import { api } from "./index.js";
3
3
  export default (name, fields) => {
4
4
  const builder = GQLFieldBuilder();
5
5
  fields.forEach((field) => {
6
- const modelField = getModelField(name, field);
6
+ const modelField = api.model(name).field(field);
7
7
  if (modelField) {
8
8
  builder.add(modelField.getGQLField());
9
9
  }
@@ -1,4 +1,4 @@
1
- import { useLight } from "../index.mjs";
1
+ import { useLight } from "../index.js";
2
2
  export default () => {
3
3
  return useLight().getID();
4
4
  };
@@ -1,4 +1,4 @@
1
- import { getModelField } from "@hostlink/light";
1
+ import { getModelField } from "./index.js";
2
2
  export default (model, names) => {
3
3
  let columns = [];
4
4
  for (let name of names) {
@@ -1,2 +1,2 @@
1
- import { getModelField } from "@hostlink/light";
2
- export default getModelField;
1
+ declare const _default: (name: string, field: string) => import("@hostlink/light").ModelField | null;
2
+ export default _default;
@@ -0,0 +1,4 @@
1
+ import { api } from "./index.js";
2
+ export default (name, field) => {
3
+ return api.model(name).field(field);
4
+ };
@@ -1,4 +1,4 @@
1
- import { getModelField } from "@hostlink/light";
1
+ import { getModelField } from "./index.js";
2
2
  export default (model, names) => {
3
3
  let fields = [];
4
4
  for (let name of names) {
@@ -1,6 +1,6 @@
1
1
  import { useRoute } from "vue-router";
2
- import loadObject from "./loadObject.mjs";
3
- import { getModelField } from "@hostlink/light";
2
+ import loadObject from "./loadObject.js";
3
+ import { getModelField } from "./index.js";
4
4
  export default async function(fields = []) {
5
5
  let route = useRoute();
6
6
  if (!route.name) {
@@ -1,25 +1,27 @@
1
- export { default as f } from "./f";
2
- export { default as getApiUrl } from "./getApiUrl";
3
- export { default as getCurrentUser } from "./getCurrentUser";
4
- export { default as getObject } from "./getObject";
5
- export { default as list } from "./list";
6
- export { default as m } from "./m";
7
- export { default as q } from "./q";
8
- export { default as t } from "./t";
9
- export { default as updateObject } from "./updateObject";
10
- export { default as listObject } from "./listObject";
11
- export { default as loadObject } from "./loadObject";
12
- export { default as isGranted } from "./isGranted";
13
- export { default as GQLFieldBuilder } from "./GQLFieldBuilder";
14
- export { default as getModelField } from "./getModelField";
15
- export { default as getModelFields } from "./getModelFields";
16
- export { default as getModelColumns } from "./getModelColumns";
17
- export { default as sv } from "./sv";
18
- export { default as model } from "./model";
19
- export { default as defineLightModel } from "./defineLightModel";
20
- export { type LightModelField, type LightModel } from "./defineLightModel";
1
+ import type { LightClient } from '@hostlink/light';
2
+ export { default as f } from "./f.js";
3
+ export { default as getApiUrl } from "./getApiUrl.js";
4
+ export { default as getCurrentUser } from "./getCurrentUser.js";
5
+ export { default as getObject } from "./getObject.js";
6
+ export { default as list } from "./list.js";
7
+ export { default as m } from "./m.js";
8
+ export { default as q } from "./q.js";
9
+ export { default as t } from "./t.js";
10
+ export { default as updateObject } from "./updateObject.js";
11
+ export { default as listObject } from "./listObject.js";
12
+ export { default as loadObject } from "./loadObject.js";
13
+ export { default as isGranted } from "./isGranted.js";
14
+ export { default as GQLFieldBuilder } from "./GQLFieldBuilder.js";
15
+ export { default as getModelField } from "./getModelField.js";
16
+ export { default as getModelFields } from "./getModelFields.js";
17
+ export { default as getModelColumns } from "./getModelColumns.js";
18
+ export { default as sv } from "./sv.js";
19
+ export { default as model } from "./model.js";
20
+ export { default as defineLightModel } from "./defineLightModel.js";
21
+ export { type LightModelField, type LightModel } from "./defineLightModel.js";
21
22
  export declare const notify: (message: string, color?: string) => void;
22
- export { default as getID } from "./getID";
23
- export { default as id } from "./getID";
23
+ export { default as getID } from "./getID.js";
24
+ export { default as id } from "./getID.js";
24
25
  export declare const getApiBase: () => {};
25
- export { getGQLFields } from '@hostlink/light';
26
+ export declare const api: LightClient;
27
+ export declare const getGQLFields: (name: string, fields: string[]) => any[];
@@ -0,0 +1,39 @@
1
+ import { useRuntimeConfig } from "nuxt/app";
2
+ import { Notify } from "quasar";
3
+ import { createClient } from "@hostlink/light";
4
+ export { default as f } from "./f.js";
5
+ export { default as getApiUrl } from "./getApiUrl.js";
6
+ export { default as getCurrentUser } from "./getCurrentUser.js";
7
+ export { default as getObject } from "./getObject.js";
8
+ export { default as list } from "./list.js";
9
+ export { default as m } from "./m.js";
10
+ export { default as q } from "./q.js";
11
+ export { default as t } from "./t.js";
12
+ export { default as updateObject } from "./updateObject.js";
13
+ export { default as listObject } from "./listObject.js";
14
+ export { default as loadObject } from "./loadObject.js";
15
+ export { default as isGranted } from "./isGranted.js";
16
+ export { default as GQLFieldBuilder } from "./GQLFieldBuilder.js";
17
+ export { default as getModelField } from "./getModelField.js";
18
+ export { default as getModelFields } from "./getModelFields.js";
19
+ export { default as getModelColumns } from "./getModelColumns.js";
20
+ export { default as sv } from "./sv.js";
21
+ export { default as model } from "./model.js";
22
+ export { default as defineLightModel } from "./defineLightModel.js";
23
+ export const notify = function(message, color = "positive") {
24
+ Notify.create({
25
+ message,
26
+ color,
27
+ position: "top"
28
+ });
29
+ };
30
+ export { default as getID } from "./getID.js";
31
+ export { default as id } from "./getID.js";
32
+ export const getApiBase = () => {
33
+ const config = useRuntimeConfig();
34
+ return config?.public?.apiBase ?? "/api/";
35
+ };
36
+ export const api = createClient("");
37
+ export const getGQLFields = (name, fields) => {
38
+ return api.model(name).gqlFields(fields);
39
+ };
@@ -1,4 +1,5 @@
1
- import { query, toQuery } from "@hostlink/light";
1
+ import { toQuery } from "@hostlink/light";
2
+ import { api } from "./index.js";
2
3
  export default async function list(name, props = null, fields = []) {
3
4
  let q = {};
4
5
  if (props) {
@@ -31,7 +32,7 @@ export default async function list(name, props = null, fields = []) {
31
32
  key: true,
32
33
  name: true
33
34
  };
34
- const resp = await query({
35
+ const resp = await api.query({
35
36
  [`list${name}`]: q
36
37
  });
37
38
  return resp[`list${name}`];
@@ -1,4 +1,4 @@
1
- import list from "./list.mjs";
1
+ import list from "./list.js";
2
2
  export default async function listObject(name, filters = {}, sort, offset, limit, fields = []) {
3
3
  const resp = await list(name, {
4
4
  filters,
@@ -1,4 +1,4 @@
1
- import list from "./list.mjs";
1
+ import list from "./list.js";
2
2
  export default async function(module, filters, fields = []) {
3
3
  let { data } = await list(module, {
4
4
  filters
@@ -0,0 +1,4 @@
1
+ import { api } from "./index.js";
2
+ export default function(operation, args, fields = []) {
3
+ return api.mutation(operation, args, fields);
4
+ }
@@ -1,6 +1,6 @@
1
- import { model } from "@hostlink/light";
2
- import type { LTableColumn } from "../components/l-table.vue";
3
- interface LModel extends ReturnType<typeof model> {
1
+ import { api } from ".";
2
+ import type { LTableColumn } from "../components/l-table.vue.js";
3
+ interface LModel extends ReturnType<typeof api.model> {
4
4
  columns(fields: string[]): Array<LTableColumn>;
5
5
  }
6
6
  declare const _default: (name: string) => LModel;
@@ -1,12 +1,12 @@
1
- import { model, getModelField } from "@hostlink/light";
1
+ import { api } from "./index.js";
2
2
  export default (name) => {
3
- const m = model(name);
3
+ const m = api.model(name);
4
4
  return Object.assign(m, {
5
5
  columns(fields) {
6
6
  let columns = [];
7
7
  if (Array.isArray(fields)) {
8
8
  for (let f of fields) {
9
- const field = getModelField(name, f);
9
+ const field = m.field(f);
10
10
  if (!field) continue;
11
11
  const option = field.getRaw();
12
12
  option.name = field.getName();
@@ -15,7 +15,7 @@ export default (name) => {
15
15
  } else {
16
16
  for (let f in fields) {
17
17
  if (!fields[f]) continue;
18
- const field = getModelField(name, f);
18
+ const field = m.field(f);
19
19
  if (!field) continue;
20
20
  const option = field.getRaw();
21
21
  option.name = field.getName();
@@ -1,12 +1,8 @@
1
- import axios from "axios";
2
- import f from "./f.mjs";
1
+ import f from "./f.js";
3
2
  import { jsonToGraphQLQuery } from "json-to-graphql-query";
4
- import { getApiBase } from "./index.mjs";
5
3
  import { toQuery } from "@hostlink/light";
4
+ import { api } from "./index.js";
6
5
  export default async function(operation, args = null, fields = []) {
7
- const service = axios.create({
8
- withCredentials: true
9
- });
10
6
  let query;
11
7
  if (operation instanceof Object) {
12
8
  query = jsonToGraphQLQuery(toQuery(operation));
@@ -17,7 +13,7 @@ export default async function(operation, args = null, fields = []) {
17
13
  }
18
14
  query = f(operation, args, fields);
19
15
  }
20
- const resp = (await service.post(getApiBase(), {
16
+ const resp = (await api.axios.post("", {
21
17
  query: `{ ${query} }`
22
18
  })).data;
23
19
  if (resp.errors) {
@@ -1,11 +1,11 @@
1
- import { query } from "@hostlink/light";
1
+ import { q } from "#imports";
2
2
  export const cache = {};
3
3
  export default (name) => {
4
4
  if (cache[name]) {
5
5
  return cache[name];
6
6
  }
7
7
  const p = new Promise(async (resolve, reject) => {
8
- const resp = await query({
8
+ const resp = await q({
9
9
  systemValue: {
10
10
  __args: {
11
11
  name
@@ -1,4 +1,4 @@
1
- import m from "./m.mjs";
1
+ import m from "./m.js";
2
2
  import { Dialog } from "quasar";
3
3
  export default async (name, id, data) => {
4
4
  try {
@@ -1,11 +1,10 @@
1
1
  <script setup>
2
2
  import { reactive } from 'vue'
3
- import { m } from '#imports'
3
+ import { m, q } from '#imports'
4
4
  import { useI18n } from 'vue-i18n';
5
- import { query } from '@hostlink/light';
6
5
  const { t } = useI18n();
7
6
 
8
- const { app, listRole: roles } = await query({
7
+ const { app, listRole: roles } = await q({
9
8
  app: {
10
9
  permissions: true
11
10
  },
@@ -78,7 +77,8 @@ const onUpdate = (value, role, permission) => {
78
77
  </q-td>
79
78
  <q-td v-for="role in roles">
80
79
  <q-checkbox v-model="props.row[role.name]"
81
- @update:model-value="onUpdate($event, role.name, props.row.permission)" :color="$light.color" />
80
+ @update:model-value="onUpdate($event, role.name, props.row.permission)"
81
+ :color="$light.color" />
82
82
  </q-td>
83
83
  </q-tr>
84
84
  </template>
@@ -1,12 +1,12 @@
1
1
  <script setup>
2
2
  import { reactive } from 'vue'
3
3
  import { utils, writeFileXLSX } from 'xlsx';
4
- import { query } from '@hostlink/light';
4
+ import { q } from '#imports';
5
5
  const obj = reactive({
6
6
  roles: []
7
7
  });
8
8
 
9
- const { app, listRole } = await query({
9
+ const { app, listRole } = await q({
10
10
  app: {
11
11
  permissions: true
12
12
  },
@@ -1,7 +1,7 @@
1
1
  <script setup>
2
- import { query } from '@hostlink/light';
2
+ import { q } from '#imports';
3
3
 
4
- const { system: { database } } = await query({
4
+ const { system: { database } } = await q({
5
5
  system: {
6
6
  database: {
7
7
  table: true
@@ -16,6 +16,8 @@ const columns = model("User").columns({
16
16
  has2FA: true,
17
17
  })
18
18
 
19
+ console.log(columns);
20
+
19
21
  const status = ref("0");
20
22
 
21
23
  </script>
@@ -4,13 +4,13 @@ import { ref } from "vue"
4
4
  import { q, m, getCurrentUser } from '#imports'
5
5
  const app = await q("app", ["hasBioAuth"]);
6
6
 
7
- import { webauthnRegister } from "@hostlink/light"
7
+ import { api } from "#imports"
8
8
 
9
9
  const data = ref(await q("listWebAuthn", ["uuid", "ip", "user_agent", "createdTime"]));
10
10
 
11
11
  const register = async () => {
12
12
  try {
13
- await webauthnRegister();
13
+ await api.auth.WebAuthn.register();
14
14
  data.value = await q("listWebAuthn", ["uuid", "ip", "user_agent", "createdTime"]);
15
15
  const user = await getCurrentUser();
16
16
  localStorage.setItem("username", user.username);
@@ -2,14 +2,14 @@
2
2
  import { useI18n } from 'vue-i18n'
3
3
  import { Dialog } from 'quasar'
4
4
  import { reset } from "@formkit/core"
5
- import { updatePassword } from "@hostlink/light"
5
+
6
6
  import { computed } from 'vue'
7
- import { q } from "#imports"
7
+ import { q, api } from "#imports"
8
8
 
9
9
  const { t } = useI18n()
10
10
 
11
11
  const onSubmit = async (data, form) => {
12
- if (await updatePassword(data.old_password, data.new_password)) {
12
+ if (await api.auth.updatePassword(data.old_password, data.new_password)) {
13
13
  reset(form);
14
14
  await Dialog.create({
15
15
  title: "Password updated",
@@ -35,7 +35,7 @@ const policies = computed(() => {
35
35
  if (name == "length") {
36
36
  return t('Must contain at least {0} characters', [policy.split(":")[1]]);
37
37
  }
38
-
38
+
39
39
  return t(name);
40
40
  })
41
41
  })
@@ -1,8 +1,8 @@
1
1
  <script setup>
2
2
 
3
- import { logout } from '@hostlink/light';
3
+ import { api } from '#imports';
4
4
 
5
- await logout();
5
+ await api.auth.logout();
6
6
  const href = window.self.location.href;
7
7
 
8
8
  const url = new URL(href);
@@ -1,3 +1,3 @@
1
- import "./assets/main.css";
2
- declare const _default: any;
1
+ import "./assets/main.css.js";
2
+ declare const _default: import("#app").Plugin<Record<string, unknown>> & import("#app").ObjectPlugin<Record<string, unknown>>;
3
3
  export default _default;
@@ -4,24 +4,25 @@ import { defineNuxtPlugin } from "#app";
4
4
  import "./assets/main.css";
5
5
  import message_en from "./locales/en.json";
6
6
  import message_zh from "./locales/zh-hk.json";
7
- import { defineModel } from "@hostlink/light";
7
+ import { api } from "./lib/index.js";
8
8
  localStorage.getItem("locale") || localStorage.setItem("locale", "en");
9
9
  import { createQuasarPlugin } from "formkit-quasar";
10
- import { createLightPlugin } from "./formkit/index.mjs";
10
+ import { createLightPlugin } from "./formkit/index.js";
11
11
  import { plugin, defaultConfig } from "@formkit/vue";
12
- import { useLight } from "./index.mjs";
13
- import TypeUser from "./types/User.mjs";
14
- import TypeUserLog from "./types/UserLog.mjs";
15
- import TypeSystemValue from "./types/SystemValue.mjs";
16
- import TypeMailLog from "./types/MailLog.mjs";
17
- import TypeEventLog from "./types/EventLog.mjs";
12
+ import { getApiBase, useLight } from "./index.js";
13
+ import TypeUser from "./types/User.js";
14
+ import TypeUserLog from "./types/UserLog.js";
15
+ import TypeSystemValue from "./types/SystemValue.js";
16
+ import TypeMailLog from "./types/MailLog.js";
17
+ import TypeEventLog from "./types/EventLog.js";
18
18
  import { zhTW } from "@formkit/i18n";
19
19
  export default defineNuxtPlugin((nuxtApp) => {
20
- defineModel("User", TypeUser);
21
- defineModel("UserLog", TypeUserLog);
22
- defineModel("SystemValue", TypeSystemValue);
23
- defineModel("MailLog", TypeMailLog);
24
- defineModel("EventLog", TypeEventLog);
20
+ api.axios.defaults.baseURL = getApiBase();
21
+ api.models.create("User", TypeUser);
22
+ api.models.create("UserLog", TypeUserLog);
23
+ api.models.create("SystemValue", TypeSystemValue);
24
+ api.models.create("MailLog", TypeMailLog);
25
+ api.models.create("EventLog", TypeEventLog);
25
26
  nuxtApp.vueApp.config.globalProperties.$light = useLight();
26
27
  nuxtApp.vueApp.config.errorHandler = (error) => {
27
28
  console.log(error);
package/dist/types.d.mts CHANGED
@@ -1,16 +1 @@
1
-
2
- import type { ModuleOptions } from './module.js'
3
-
4
-
5
- declare module '@nuxt/schema' {
6
- interface NuxtConfig { ['light']?: Partial<ModuleOptions> }
7
- interface NuxtOptions { ['light']?: ModuleOptions }
8
- }
9
-
10
- declare module 'nuxt/schema' {
11
- interface NuxtConfig { ['light']?: Partial<ModuleOptions> }
12
- interface NuxtOptions { ['light']?: ModuleOptions }
13
- }
14
-
15
-
16
- export type { ModuleOptions, default } from './module.js'
1
+ export { type ModuleOptions, default } from './module.js'
package/dist/types.d.ts CHANGED
@@ -1,16 +1 @@
1
-
2
- import type { ModuleOptions } from './module'
3
-
4
-
5
- declare module '@nuxt/schema' {
6
- interface NuxtConfig { ['light']?: Partial<ModuleOptions> }
7
- interface NuxtOptions { ['light']?: ModuleOptions }
8
- }
9
-
10
- declare module 'nuxt/schema' {
11
- interface NuxtConfig { ['light']?: Partial<ModuleOptions> }
12
- interface NuxtOptions { ['light']?: ModuleOptions }
13
- }
14
-
15
-
16
- export type { ModuleOptions, default } from './module'
1
+ export { type ModuleOptions, default } from './module'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hostlink/nuxt-light",
3
- "version": "1.12.7",
3
+ "version": "1.13.2",
4
4
  "description": "HostLink Nuxt Light Framework",
5
5
  "repository": "@hostlink/nuxt-light",
6
6
  "license": "MIT",
@@ -10,10 +10,6 @@
10
10
  "types": "./dist/types.d.ts",
11
11
  "import": "./dist/module.mjs",
12
12
  "require": "./dist/module.cjs"
13
- },
14
- "./dist": {
15
- "types": "./dist/runtime/index.d.ts",
16
- "import": "./dist/runtime/index.mjs"
17
13
  }
18
14
  },
19
15
  "main": "./dist/module.cjs",
@@ -25,7 +21,7 @@
25
21
  "prepack": "nuxt-module-build build",
26
22
  "dev": "nuxi dev playground --host",
27
23
  "dev:build": "nuxi build playground",
28
- "dev:prepare": "nuxt-module-build build --stub && nuxi prepare playground",
24
+ "dev:prepare": "nuxt-module-build build --stub && nuxt-module-build prepare && nuxi prepare playground",
29
25
  "release:org": "npm run lint && npm run test && npm run prepack && changelogen --release && npm publish && git push --follow-tags",
30
26
  "release": "npm run prepack && changelogen --release && npm publish --access=public && git push --follow-tags",
31
27
  "lint": "eslint .",
@@ -33,26 +29,26 @@
33
29
  "test:watch": "vitest watch"
34
30
  },
35
31
  "dependencies": {
36
- "@formkit/drag-and-drop": "^0.0.36",
37
- "@hostlink/light": "^1.2.1",
38
- "@nuxt/kit": "^3.7.4",
39
- "@nuxt/module-builder": "^0.5.2",
32
+ "@formkit/drag-and-drop": "^0.1.6",
33
+ "@hostlink/light": "^2.0.1",
34
+ "@nuxt/kit": "^3.13.0",
40
35
  "@quasar/extras": "^1.16.11",
41
36
  "@quasar/vite-plugin": "^1.7.0",
42
- "axios": "^1.5.0",
37
+ "axios": "^1.7.7",
43
38
  "diff2html": "^3.4.47",
44
39
  "formkit-quasar": "^0.0.15",
45
40
  "json-to-graphql-query": "^2.2.5",
46
- "quasar": "^2.15.4",
41
+ "quasar": "^2.16.9",
47
42
  "vue-i18n": "^9.2.2",
48
43
  "xlsx": "https://cdn.sheetjs.com/xlsx-0.20.2/xlsx-0.20.2.tgz"
49
44
  },
50
45
  "devDependencies": {
51
46
  "@nuxt/devtools": "latest",
52
47
  "@nuxt/eslint-config": "^0.2.0",
48
+ "@nuxt/module-builder": "^0.8.3",
53
49
  "@nuxt/schema": "^3.7.4",
54
50
  "@nuxt/test-utils": "^3.7.0",
55
- "@types/node": "^18.17.3",
51
+ "@types/node": "^22.5.0",
56
52
  "changelogen": "^0.5.4",
57
53
  "eslint": "^8.46.0",
58
54
  "nuxt": "^3.7.0"
@@ -1,2 +0,0 @@
1
- import { getModelField } from "@hostlink/light";
2
- export default getModelField;
@@ -1,35 +0,0 @@
1
- import { useRuntimeConfig } from "nuxt/app";
2
- import { Notify } from "quasar";
3
- export { default as f } from "./f.mjs";
4
- export { default as getApiUrl } from "./getApiUrl.mjs";
5
- export { default as getCurrentUser } from "./getCurrentUser.mjs";
6
- export { default as getObject } from "./getObject.mjs";
7
- export { default as list } from "./list.mjs";
8
- export { default as m } from "./m.mjs";
9
- export { default as q } from "./q.mjs";
10
- export { default as t } from "./t.mjs";
11
- export { default as updateObject } from "./updateObject.mjs";
12
- export { default as listObject } from "./listObject.mjs";
13
- export { default as loadObject } from "./loadObject.mjs";
14
- export { default as isGranted } from "./isGranted.mjs";
15
- export { default as GQLFieldBuilder } from "./GQLFieldBuilder.mjs";
16
- export { default as getModelField } from "./getModelField.mjs";
17
- export { default as getModelFields } from "./getModelFields.mjs";
18
- export { default as getModelColumns } from "./getModelColumns.mjs";
19
- export { default as sv } from "./sv.mjs";
20
- export { default as model } from "./model.mjs";
21
- export { default as defineLightModel } from "./defineLightModel.mjs";
22
- export const notify = function(message, color = "positive") {
23
- Notify.create({
24
- message,
25
- color,
26
- position: "top"
27
- });
28
- };
29
- export { default as getID } from "./getID.mjs";
30
- export { default as id } from "./getID.mjs";
31
- export const getApiBase = () => {
32
- const config = useRuntimeConfig();
33
- return config?.public?.apiBase ?? "/api/";
34
- };
35
- export { getGQLFields } from "@hostlink/light";
@@ -1,4 +0,0 @@
1
- import { mutation } from "@hostlink/light";
2
- export default function(operation, args, fields = []) {
3
- return mutation(operation, args, fields);
4
- }
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes