@dtwo/kit 3.1.0 → 3.1.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/LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- MIT License
1
+ The MIT License (MIT)
2
2
 
3
3
  Copyright (c) 2022 - Dtwo Team
4
4
 
package/dist/index.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  import { promises, existsSync, readFileSync } from 'node:fs';
2
- import defu, { defu as defu$1 } from 'defu';
2
+ import { defu } from 'defu';
3
3
  import { applyDefaults } from 'untyped';
4
4
  import { dirname, join, normalize, relative, isAbsolute, resolve, basename, parse } from 'pathe';
5
5
  import consola from 'consola';
@@ -147,7 +147,7 @@ function defineDtwoModule(definition) {
147
147
  if (uniqueKey) {
148
148
  dtwo.options._requiredModules = dtwo.options._requiredModules || {};
149
149
  if (dtwo.options._requiredModules[uniqueKey]) {
150
- return;
150
+ return false;
151
151
  }
152
152
  dtwo.options._requiredModules[uniqueKey] = true;
153
153
  }
@@ -432,7 +432,10 @@ async function resolveFiles(path, pattern, opts = {}) {
432
432
  async function installModule(moduleToInstall, _inlineOptions, _dtwo) {
433
433
  const dtwo = useDtwo();
434
434
  const { dtwoModule, inlineOptions } = await normalizeModule(moduleToInstall, _inlineOptions);
435
- await dtwoModule(inlineOptions, dtwo);
435
+ const res = await dtwoModule(inlineOptions, dtwo);
436
+ if (res === false) {
437
+ return;
438
+ }
436
439
  if (typeof moduleToInstall === "string") {
437
440
  dtwo.options.build.transpile.push(moduleToInstall);
438
441
  }
@@ -794,7 +797,7 @@ function extendRouteRules(route, rule, options = {}) {
794
797
  if (!opts.routeRules) {
795
798
  opts.routeRules = {};
796
799
  }
797
- opts.routeRules[route] = options.override ? defu$1(rule, opts.routeRules[route]) : defu$1(opts.routeRules[route], rule);
800
+ opts.routeRules[route] = options.override ? defu(rule, opts.routeRules[route]) : defu(opts.routeRules[route], rule);
798
801
  }
799
802
  }
800
803
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dtwo/kit",
3
- "version": "3.1.0",
3
+ "version": "3.1.2",
4
4
  "repository": "d2js/dtwo",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -10,19 +10,19 @@
10
10
  "dist"
11
11
  ],
12
12
  "dependencies": {
13
- "@dtwo/schema": "3.1.0",
13
+ "@dtwo/schema": "3.1.2",
14
14
  "c12": "1.1.0",
15
15
  "consola": "2.15.3",
16
- "defu": "6.1.1",
16
+ "defu": "6.1.2",
17
17
  "globby": "13.1.3",
18
18
  "hash-sum": "2.0.0",
19
19
  "ignore": "5.2.4",
20
20
  "jiti": "1.16.2",
21
- "kdimport": "2.0.1",
21
+ "kdimport": "2.1.0",
22
22
  "knitwork": "1.0.0",
23
23
  "lodash.template": "4.5.0",
24
24
  "mlly": "1.1.0",
25
- "pathe": "1.0.0",
25
+ "pathe": "1.1.0",
26
26
  "pkg-types": "1.0.1",
27
27
  "scule": "1.0.0",
28
28
  "semver": "7.3.8",