@hostlink/nuxt-light 0.0.62 → 0.0.63

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": "light",
3
3
  "configKey": "light",
4
- "version": "0.0.62"
4
+ "version": "0.0.63"
5
5
  }
@@ -18,24 +18,9 @@ export default async function listData(name, props = {}, fields = []) {
18
18
  json.data.__args = json.data.__args || {};
19
19
  json.data.__args.limit = props.limit;
20
20
  }
21
- if (fields instanceof Array) {
22
- fields.forEach((field) => {
23
- if (field instanceof Object) {
24
- Object.entries(field).forEach(([key, value]) => {
25
- json.data[key] = toQuery(value);
26
- });
27
- } else {
28
- json.data[field] = true;
29
- }
30
- });
31
- } else if (fields instanceof Object) {
32
- json.data = Object.assign({}, fields);
33
- if (props.fields) {
34
- props.fields.forEach((field) => {
35
- json.data[field] = true;
36
- });
37
- }
38
- }
21
+ Object.entries(toQuery(fields)).forEach(([key, value]) => {
22
+ json.data[key] = value;
23
+ });
39
24
  json.meta = {
40
25
  total: true,
41
26
  key: true,
@@ -2,6 +2,7 @@
2
2
  import { getObject, loadObject } from '../../../';
3
3
  const obj = await getObject(["user_id", "username", "first_name", "last_name", "email", "phone", "roles"]);
4
4
 
5
+ //await getObject(["user_id", { test: ["username"] }])
5
6
  /* const test = async () => {
6
7
  console.log(await loadObject("User", { user_id: obj.user_id }, ["username"]));
7
8
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hostlink/nuxt-light",
3
- "version": "0.0.62",
3
+ "version": "0.0.63",
4
4
  "description": "HostLink Nuxt Light Framework",
5
5
  "repository": "@hostlink/nuxt-light",
6
6
  "license": "MIT",
@@ -34,7 +34,7 @@
34
34
  "route-gen": "node route-generate.mjs"
35
35
  },
36
36
  "dependencies": {
37
- "@hostlink/light": "^0.0.12",
37
+ "@hostlink/light": "^0.0.16",
38
38
  "@nuxt/kit": "^3.7.0",
39
39
  "@quasar/extras": "^1.16.6",
40
40
  "axios": "^1.5.0",