@sfxcode/nuxt-mongocamp-server 1.0.0 → 1.0.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.
package/dist/module.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sfxcode/nuxt-mongocamp-server",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "configKey": "mongocamp",
5
5
  "compatibility": {
6
6
  "nuxt": "^3.0.0"
package/dist/module.mjs CHANGED
@@ -53,6 +53,7 @@ const LogLevels = {
53
53
  fail: 3,
54
54
  ready: 3,
55
55
  start: 3,
56
+ box: 3,
56
57
  debug: 4,
57
58
  trace: 5,
58
59
  verbose: Number.POSITIVE_INFINITY
@@ -93,6 +94,9 @@ const LogTypes = {
93
94
  start: {
94
95
  level: LogLevels.info
95
96
  },
97
+ box: {
98
+ level: LogLevels.info
99
+ },
96
100
  // Level 4
97
101
  debug: {
98
102
  level: LogLevels.debug
@@ -222,10 +226,14 @@ class Consola {
222
226
  return this.options.prompt(message, opts);
223
227
  }
224
228
  create(options) {
225
- return new Consola({
229
+ const instance = new Consola({
226
230
  ...this.options,
227
231
  ...options
228
232
  });
233
+ if (this._mockFn) {
234
+ instance.mockTypes(this._mockFn);
235
+ }
236
+ return instance;
229
237
  }
230
238
  withDefaults(defaults) {
231
239
  return this.create({
@@ -324,6 +332,7 @@ class Consola {
324
332
  }
325
333
  mockTypes(mockFn) {
326
334
  const _mockFn = mockFn || this.options.mockFn;
335
+ this._mockFn = _mockFn;
327
336
  if (typeof _mockFn !== "function") {
328
337
  return;
329
338
  }
@@ -368,7 +377,7 @@ class Consola {
368
377
  delete logObj.additional;
369
378
  }
370
379
  logObj.type = typeof logObj.type === "string" ? logObj.type.toLowerCase() : "log";
371
- logObj.tag = typeof logObj.tag === "string" ? logObj.tag.toLowerCase() : "";
380
+ logObj.tag = typeof logObj.tag === "string" ? logObj.tag : "";
372
381
  const resolveLog = (newLog = false) => {
373
382
  const repeated = (this._lastLog.count || 0) - this.options.throttleMin;
374
383
  if (this._lastLog.object && repeated > 0) {
@@ -470,7 +479,7 @@ class BrowserReporter {
470
479
  }
471
480
  log(logObj) {
472
481
  const consoleLogFn = this._getLogFn(logObj.level);
473
- const type = logObj.type !== "log" ? logObj.type : "";
482
+ const type = logObj.type === "log" ? "" : logObj.type;
474
483
  const tag = logObj.tag || "";
475
484
  const color = this.typeColorMap[logObj.type] || this.levelColorMap[logObj.level] || this.defaultColor;
476
485
  const style = `
@@ -511,7 +520,7 @@ function createConsola(options = {}) {
511
520
  const consola = createConsola();
512
521
 
513
522
  const name = "@sfxcode/nuxt-mongocamp-server";
514
- const version = "1.0.0";
523
+ const version = "1.0.2";
515
524
 
516
525
  const module = defineNuxtModule({
517
526
  meta: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sfxcode/nuxt-mongocamp-server",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "exports": {
@@ -18,19 +18,19 @@
18
18
  "failOnWarn": false
19
19
  },
20
20
  "dependencies": {
21
- "@nuxt/kit": "^3.4.3",
22
- "@vueuse/nuxt": "^10.1.2"
21
+ "@nuxt/kit": "^3.6.2",
22
+ "@vueuse/nuxt": "^10.2.1"
23
23
  },
24
24
  "devDependencies": {
25
- "@iconify-json/mdi": "^1.1.50",
26
- "@nuxt/module-builder": "^0.3.1",
25
+ "@iconify-json/mdi": "^1.1.53",
26
+ "@nuxt/module-builder": "^0.4.0",
27
27
  "@nuxtjs/eslint-config-typescript": "12.0.0",
28
28
  "@openapitools/openapi-generator-cli": "^2.6.0",
29
- "@types/node": "^18.16.3",
30
- "@unocss/nuxt": "^0.51.8",
29
+ "@types/node": "^20.4.1",
30
+ "@unocss/nuxt": "^0.53.5",
31
31
  "defu": "^6.1.2",
32
- "jiti": "^1.18.2",
33
- "nuxt": "^3.4.3"
32
+ "jiti": "^1.19.1",
33
+ "nuxt": "^3.6.2"
34
34
  },
35
35
  "scripts": {
36
36
  "dev": "nuxi dev --port 3333 playground",