@dnax/core 0.2.3 → 0.2.4

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/bin/index.ts CHANGED
@@ -2,6 +2,7 @@
2
2
 
3
3
  import ch from "chokidar";
4
4
  import { spinner } from "@clack/prompts";
5
+ import "@colors/colors";
5
6
  var exec;
6
7
  var s = spinner();
7
8
  function runPkg(
@@ -52,7 +53,7 @@ ch.watch(".", {
52
53
  ],
53
54
  })
54
55
  .on("change", (path) => {
55
- console.log(path);
56
+ console.log("Changed file:".gray, path.green);
56
57
  let dev = process.argv.includes("--dev");
57
58
  if (dev && (path?.endsWith(".ts") || path?.endsWith(".js"))) {
58
59
  s.start("Restarting due to changes ...");
@@ -61,7 +62,7 @@ ch.watch(".", {
61
62
  }
62
63
  setTimeout(() => {
63
64
  runPkg({ stopSpinner: true });
64
- }, 600);
65
+ }, 1000);
65
66
  }
66
67
  })
67
68
  .on("ready", () => {
@@ -27,6 +27,7 @@ import {
27
27
  setUUID,
28
28
  } from "./utils";
29
29
  import { Cfg } from "../../config";
30
+ import cleanDeep from "clean-deep";
30
31
 
31
32
  type options = {
32
33
  tenant_id: string;
@@ -420,6 +421,9 @@ class useRest {
420
421
  ): Promise<object[]> {
421
422
  return new Promise(async (resolve, reject) => {
422
423
  try {
424
+ if (options?.cleanDeep) {
425
+ params = cleanDeep(params);
426
+ }
423
427
  let useHook = options?.useHook ?? this.#useHook;
424
428
  let useCustomApi = options?.useCustomApi ?? this.#useCustomApi;
425
429
  let sharedData = {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dnax/core",
3
- "version": "0.2.3",
3
+ "version": "0.2.4",
4
4
  "module": "index.ts",
5
5
  "type": "module",
6
6
  "bin": {