@forsakringskassan/vite-lib-config 2.1.0 → 2.2.1

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.
@@ -205,6 +205,133 @@ var require_picocolors = __commonJS({
205
205
  }
206
206
  });
207
207
 
208
+ // node_modules/has-flag/index.js
209
+ var require_has_flag = __commonJS({
210
+ "node_modules/has-flag/index.js"(exports, module) {
211
+ "use strict";
212
+ module.exports = (flag, argv = process.argv) => {
213
+ const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--";
214
+ const position = argv.indexOf(prefix + flag);
215
+ const terminatorPosition = argv.indexOf("--");
216
+ return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);
217
+ };
218
+ }
219
+ });
220
+
221
+ // node_modules/supports-color/index.js
222
+ var require_supports_color = __commonJS({
223
+ "node_modules/supports-color/index.js"(exports, module) {
224
+ "use strict";
225
+ var os = __require("os");
226
+ var tty = __require("tty");
227
+ var hasFlag = require_has_flag();
228
+ var { env } = process;
229
+ var flagForceColor;
230
+ if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false") || hasFlag("color=never")) {
231
+ flagForceColor = 0;
232
+ } else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) {
233
+ flagForceColor = 1;
234
+ }
235
+ function envForceColor() {
236
+ if ("FORCE_COLOR" in env) {
237
+ if (env.FORCE_COLOR === "true") {
238
+ return 1;
239
+ }
240
+ if (env.FORCE_COLOR === "false") {
241
+ return 0;
242
+ }
243
+ return env.FORCE_COLOR.length === 0 ? 1 : Math.min(Number.parseInt(env.FORCE_COLOR, 10), 3);
244
+ }
245
+ }
246
+ function translateLevel(level) {
247
+ if (level === 0) {
248
+ return false;
249
+ }
250
+ return {
251
+ level,
252
+ hasBasic: true,
253
+ has256: level >= 2,
254
+ has16m: level >= 3
255
+ };
256
+ }
257
+ function supportsColor(haveStream, { streamIsTTY, sniffFlags = true } = {}) {
258
+ const noFlagForceColor = envForceColor();
259
+ if (noFlagForceColor !== void 0) {
260
+ flagForceColor = noFlagForceColor;
261
+ }
262
+ const forceColor = sniffFlags ? flagForceColor : noFlagForceColor;
263
+ if (forceColor === 0) {
264
+ return 0;
265
+ }
266
+ if (sniffFlags) {
267
+ if (hasFlag("color=16m") || hasFlag("color=full") || hasFlag("color=truecolor")) {
268
+ return 3;
269
+ }
270
+ if (hasFlag("color=256")) {
271
+ return 2;
272
+ }
273
+ }
274
+ if (haveStream && !streamIsTTY && forceColor === void 0) {
275
+ return 0;
276
+ }
277
+ const min = forceColor || 0;
278
+ if (env.TERM === "dumb") {
279
+ return min;
280
+ }
281
+ if (process.platform === "win32") {
282
+ const osRelease = os.release().split(".");
283
+ if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
284
+ return Number(osRelease[2]) >= 14931 ? 3 : 2;
285
+ }
286
+ return 1;
287
+ }
288
+ if ("CI" in env) {
289
+ if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI", "GITHUB_ACTIONS", "BUILDKITE", "DRONE"].some((sign) => sign in env) || env.CI_NAME === "codeship") {
290
+ return 1;
291
+ }
292
+ return min;
293
+ }
294
+ if ("TEAMCITY_VERSION" in env) {
295
+ return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;
296
+ }
297
+ if (env.COLORTERM === "truecolor") {
298
+ return 3;
299
+ }
300
+ if ("TERM_PROGRAM" in env) {
301
+ const version2 = Number.parseInt((env.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
302
+ switch (env.TERM_PROGRAM) {
303
+ case "iTerm.app":
304
+ return version2 >= 3 ? 3 : 2;
305
+ case "Apple_Terminal":
306
+ return 2;
307
+ }
308
+ }
309
+ if (/-256(color)?$/i.test(env.TERM)) {
310
+ return 2;
311
+ }
312
+ if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) {
313
+ return 1;
314
+ }
315
+ if ("COLORTERM" in env) {
316
+ return 1;
317
+ }
318
+ return min;
319
+ }
320
+ function getSupportLevel(stream2, options = {}) {
321
+ const level = supportsColor(stream2, {
322
+ streamIsTTY: stream2 && stream2.isTTY,
323
+ ...options
324
+ });
325
+ return translateLevel(level);
326
+ }
327
+ module.exports = {
328
+ supportsColor: getSupportLevel,
329
+ stdout: getSupportLevel({ isTTY: tty.isatty(1) }),
330
+ stderr: getSupportLevel({ isTTY: tty.isatty(2) })
331
+ };
332
+ }
333
+ });
334
+
208
335
  // internal/plugin-vue3/node_modules/@vitejs/plugin-vue/dist/index.cjs
209
336
  var require_dist = __commonJS({
210
337
  "internal/plugin-vue3/node_modules/@vitejs/plugin-vue/dist/index.cjs"(exports, module) {
@@ -214,7 +341,7 @@ var require_dist = __commonJS({
214
341
  var vite = __require("vite");
215
342
  var vue = __require("vue");
216
343
  var node_module = __require("node:module");
217
- var path5 = __require("node:path");
344
+ var path4 = __require("node:path");
218
345
  var node_crypto = __require("node:crypto");
219
346
  var require$$0 = __require("tty");
220
347
  var require$$1 = __require("util");
@@ -223,7 +350,7 @@ var require_dist = __commonJS({
223
350
  return e && typeof e === "object" && "default" in e ? e.default : e;
224
351
  }
225
352
  var fs__default = /* @__PURE__ */ _interopDefaultCompat(fs4);
226
- var path__default = /* @__PURE__ */ _interopDefaultCompat(path5);
353
+ var path__default = /* @__PURE__ */ _interopDefaultCompat(path4);
227
354
  var require$$0__default = /* @__PURE__ */ _interopDefaultCompat(require$$0);
228
355
  var require$$1__default = /* @__PURE__ */ _interopDefaultCompat(require$$1);
229
356
  var version2 = "4.6.2";
@@ -273,12 +400,12 @@ var require_dist = __commonJS({
273
400
  query
274
401
  };
275
402
  }
276
- function slash(path6) {
277
- const isExtendedLengthPath = path6.startsWith("\\\\?\\");
403
+ function slash(path5) {
404
+ const isExtendedLengthPath = path5.startsWith("\\\\?\\");
278
405
  if (isExtendedLengthPath) {
279
- return path6;
406
+ return path5;
280
407
  }
281
- return path6.replace(/\\/g, "/");
408
+ return path5.replace(/\\/g, "/");
282
409
  }
283
410
  var cache = /* @__PURE__ */ new Map();
284
411
  var hmrCache = /* @__PURE__ */ new Map();
@@ -772,16 +899,16 @@ import.meta.hot.accept(({ render }) => {
772
899
  }
773
900
  function parseFileUrl(input) {
774
901
  const match2 = fileRegex.exec(input);
775
- const path6 = match2[2];
776
- return makeUrl("file:", "", match2[1] || "", "", isAbsolutePath(path6) ? path6 : "/" + path6, match2[3] || "", match2[4] || "");
902
+ const path5 = match2[2];
903
+ return makeUrl("file:", "", match2[1] || "", "", isAbsolutePath(path5) ? path5 : "/" + path5, match2[3] || "", match2[4] || "");
777
904
  }
778
- function makeUrl(scheme, user, host, port, path6, query, hash) {
905
+ function makeUrl(scheme, user, host, port, path5, query, hash) {
779
906
  return {
780
907
  scheme,
781
908
  user,
782
909
  host,
783
910
  port,
784
- path: path6,
911
+ path: path5,
785
912
  query,
786
913
  hash,
787
914
  type: UrlType.Absolute
@@ -811,11 +938,11 @@ import.meta.hot.accept(({ render }) => {
811
938
  url.type = input ? input.startsWith("?") ? UrlType.Query : input.startsWith("#") ? UrlType.Hash : UrlType.RelativePath : UrlType.Empty;
812
939
  return url;
813
940
  }
814
- function stripPathFilename(path6) {
815
- if (path6.endsWith("/.."))
816
- return path6;
817
- const index = path6.lastIndexOf("/");
818
- return path6.slice(0, index + 1);
941
+ function stripPathFilename(path5) {
942
+ if (path5.endsWith("/.."))
943
+ return path5;
944
+ const index = path5.lastIndexOf("/");
945
+ return path5.slice(0, index + 1);
819
946
  }
820
947
  function mergePaths(url, base) {
821
948
  normalizePath(base, base.type);
@@ -853,14 +980,14 @@ import.meta.hot.accept(({ render }) => {
853
980
  pieces[pointer++] = piece;
854
981
  positive++;
855
982
  }
856
- let path6 = "";
983
+ let path5 = "";
857
984
  for (let i = 1; i < pointer; i++) {
858
- path6 += "/" + pieces[i];
985
+ path5 += "/" + pieces[i];
859
986
  }
860
- if (!path6 || addTrailingSlash && !path6.endsWith("/..")) {
861
- path6 += "/";
987
+ if (!path5 || addTrailingSlash && !path5.endsWith("/..")) {
988
+ path5 += "/";
862
989
  }
863
- url.path = path6;
990
+ url.path = path5;
864
991
  }
865
992
  function resolve$1(input, base) {
866
993
  if (!input && !base)
@@ -901,13 +1028,13 @@ import.meta.hot.accept(({ render }) => {
901
1028
  case UrlType.Query:
902
1029
  return queryHash;
903
1030
  case UrlType.RelativePath: {
904
- const path6 = url.path.slice(1);
905
- if (!path6)
1031
+ const path5 = url.path.slice(1);
1032
+ if (!path5)
906
1033
  return queryHash || ".";
907
- if (isRelative(base || input) && !isRelative(path6)) {
908
- return "./" + path6 + queryHash;
1034
+ if (isRelative(base || input) && !isRelative(path5)) {
1035
+ return "./" + path5 + queryHash;
909
1036
  }
910
- return path6 + queryHash;
1037
+ return path5 + queryHash;
911
1038
  }
912
1039
  case UrlType.AbsolutePath:
913
1040
  return url.path + queryHash;
@@ -920,11 +1047,11 @@ import.meta.hot.accept(({ render }) => {
920
1047
  base += "/";
921
1048
  return resolve$1(input, base);
922
1049
  }
923
- function stripFilename(path6) {
924
- if (!path6)
1050
+ function stripFilename(path5) {
1051
+ if (!path5)
925
1052
  return "";
926
- const index = path6.lastIndexOf("/");
927
- return path6.slice(0, index + 1);
1053
+ const index = path5.lastIndexOf("/");
1054
+ return path5.slice(0, index + 1);
928
1055
  }
929
1056
  var COLUMN$1 = 0;
930
1057
  function maybeSort(mappings, owned) {
@@ -1657,7 +1784,7 @@ import.meta.hot.accept(({ render }) => {
1657
1784
  );
1658
1785
  exports2.colors = [6, 2, 3, 4, 5, 1];
1659
1786
  try {
1660
- const supportsColor = __require("supports-color");
1787
+ const supportsColor = require_supports_color();
1661
1788
  if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) {
1662
1789
  exports2.colors = [
1663
1790
  20,
@@ -2416,7 +2543,7 @@ import ${styleVar} from ${JSON.stringify(moduleRequest)}`,
2416
2543
  cssDevSourcemap: false,
2417
2544
  devToolsEnabled: process.env.NODE_ENV !== "production"
2418
2545
  });
2419
- const filter2 = vue.computed(
2546
+ const filter3 = vue.computed(
2420
2547
  () => vite.createFilter(options.value.include, options.value.exclude)
2421
2548
  );
2422
2549
  const customElementFilter = vue.computed(
@@ -2443,7 +2570,7 @@ import ${styleVar} from ${JSON.stringify(moduleRequest)}`,
2443
2570
  if (typeDepToSFCMap.has(ctx.file)) {
2444
2571
  return handleTypeDepChange(typeDepToSFCMap.get(ctx.file), ctx);
2445
2572
  }
2446
- if (filter2.value(ctx.file)) {
2573
+ if (filter3.value(ctx.file)) {
2447
2574
  return handleHotUpdate(ctx, options.value);
2448
2575
  }
2449
2576
  },
@@ -2527,7 +2654,7 @@ import ${styleVar} from ${JSON.stringify(moduleRequest)}`,
2527
2654
  if (query.raw || query.url) {
2528
2655
  return;
2529
2656
  }
2530
- if (!filter2.value(filename) && !query.vue) {
2657
+ if (!filter3.value(filename) && !query.vue) {
2531
2658
  if (!query.vue && refTransformFilter.value(filename) && options.value.compiler.shouldTransformRef(code)) {
2532
2659
  const result = options.value.compiler.transformRef(code, {
2533
2660
  filename,
@@ -4647,6 +4774,61 @@ var import_picocolors = __toESM(require_picocolors());
4647
4774
  var import_plugin_vue3 = __toESM(require_plugin_vue3());
4648
4775
  import { vitePlugin as apimockPlugin } from "@forsakringskassan/apimock-express";
4649
4776
 
4777
+ // src/plugins/babel-plugin.ts
4778
+ import * as babel from "@babel/core";
4779
+ var filter = /\.(js|ts|vue)$/;
4780
+ function babelPlugin() {
4781
+ return {
4782
+ name: "fk:babel",
4783
+ enforce: "post",
4784
+ apply: "build",
4785
+ async transform(src, id) {
4786
+ const { pathname: filename } = new URL(id, "file://");
4787
+ if (!filter.test(filename)) {
4788
+ return null;
4789
+ }
4790
+ const transformed = await babel.transformAsync(src, {
4791
+ sourceMaps: true,
4792
+ comments: true,
4793
+ filename
4794
+ });
4795
+ if (!transformed) {
4796
+ return null;
4797
+ }
4798
+ const { code, map } = transformed;
4799
+ return {
4800
+ code: code ?? src,
4801
+ map: map ?? null
4802
+ };
4803
+ }
4804
+ };
4805
+ }
4806
+
4807
+ // src/plugins/custom-mapping-plugin.ts
4808
+ var folder = {
4809
+ es: "esm",
4810
+ cjs: "cjs"
4811
+ };
4812
+ function customMappingPlugin() {
4813
+ return {
4814
+ name: "fk:custom-mapping",
4815
+ renderStart(options) {
4816
+ const { format } = options;
4817
+ if (format !== "es" && format !== "cjs") {
4818
+ return;
4819
+ }
4820
+ const replacement = folder[format];
4821
+ options.dir = options.dir?.replace("[custom-format]", replacement);
4822
+ if (typeof options.entryFileNames === "string") {
4823
+ options.entryFileNames = options.entryFileNames.replace(
4824
+ "[custom-format]",
4825
+ replacement
4826
+ );
4827
+ }
4828
+ }
4829
+ };
4830
+ }
4831
+
4650
4832
  // src/plugins/index-html-plugin.ts
4651
4833
  import fs from "node:fs/promises";
4652
4834
  import path from "node:path";
@@ -4718,15 +4900,10 @@ function indexHtmlPlugin() {
4718
4900
  }
4719
4901
 
4720
4902
  // src/plugins/package-json-plugin.ts
4721
- import path2 from "node:path/posix";
4722
4903
  var mapping = {
4723
4904
  es: "module",
4724
4905
  cjs: "commonjs"
4725
4906
  };
4726
- var folder = {
4727
- es: "esm",
4728
- cjs: "cjs"
4729
- };
4730
4907
  function packageJsonPlugin() {
4731
4908
  return {
4732
4909
  name: "fk:package-json",
@@ -4740,7 +4917,7 @@ function packageJsonPlugin() {
4740
4917
  };
4741
4918
  this.emitFile({
4742
4919
  type: "asset",
4743
- fileName: path2.join("dist", folder[format], "package.json"),
4920
+ fileName: "package.json",
4744
4921
  source: JSON.stringify(pkg, null, 2)
4745
4922
  });
4746
4923
  }
@@ -4765,7 +4942,7 @@ function detectInternalDependencies(packages2, dependencies2) {
4765
4942
 
4766
4943
  // src/utils/detect-monorepo-packages.ts
4767
4944
  import fs3 from "fs";
4768
- import path4 from "node:path";
4945
+ import path3 from "node:path";
4769
4946
 
4770
4947
  // node_modules/glob/node_modules/minimatch/dist/esm/index.js
4771
4948
  var import_brace_expansion = __toESM(require_brace_expansion(), 1);
@@ -5438,11 +5615,11 @@ var qmarksTestNoExtDot = ([$0]) => {
5438
5615
  return (f) => f.length === len && f !== "." && f !== "..";
5439
5616
  };
5440
5617
  var defaultPlatform = typeof process === "object" && process ? typeof process.env === "object" && process.env && process.env.__MINIMATCH_TESTING_PLATFORM__ || process.platform : "posix";
5441
- var path3 = {
5618
+ var path2 = {
5442
5619
  win32: { sep: "\\" },
5443
5620
  posix: { sep: "/" }
5444
5621
  };
5445
- var sep = defaultPlatform === "win32" ? path3.win32.sep : path3.posix.sep;
5622
+ var sep = defaultPlatform === "win32" ? path2.win32.sep : path2.posix.sep;
5446
5623
  minimatch.sep = sep;
5447
5624
  var GLOBSTAR = Symbol("globstar **");
5448
5625
  minimatch.GLOBSTAR = GLOBSTAR;
@@ -5450,8 +5627,8 @@ var qmark2 = "[^/]";
5450
5627
  var star2 = qmark2 + "*?";
5451
5628
  var twoStarDot = "(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?";
5452
5629
  var twoStarNoDot = "(?:(?!(?:\\/|^)\\.).)*?";
5453
- var filter = (pattern, options = {}) => (p) => minimatch(p, pattern, options);
5454
- minimatch.filter = filter;
5630
+ var filter2 = (pattern, options = {}) => (p) => minimatch(p, pattern, options);
5631
+ minimatch.filter = filter2;
5455
5632
  var ext = (a, b = {}) => Object.assign({}, a, b);
5456
5633
  var defaults = (def) => {
5457
5634
  if (!def || typeof def !== "object" || !Object.keys(def).length) {
@@ -8524,12 +8701,12 @@ var PathBase = class {
8524
8701
  /**
8525
8702
  * Get the Path object referenced by the string path, resolved from this Path
8526
8703
  */
8527
- resolve(path5) {
8528
- if (!path5) {
8704
+ resolve(path4) {
8705
+ if (!path4) {
8529
8706
  return this;
8530
8707
  }
8531
- const rootPath = this.getRootString(path5);
8532
- const dir = path5.substring(rootPath.length);
8708
+ const rootPath = this.getRootString(path4);
8709
+ const dir = path4.substring(rootPath.length);
8533
8710
  const dirParts = dir.split(this.splitSep);
8534
8711
  const result = rootPath ? this.getRoot(rootPath).#resolveParts(dirParts) : this.#resolveParts(dirParts);
8535
8712
  return result;
@@ -9281,8 +9458,8 @@ var PathWin32 = class _PathWin32 extends PathBase {
9281
9458
  /**
9282
9459
  * @internal
9283
9460
  */
9284
- getRootString(path5) {
9285
- return win32.parse(path5).root;
9461
+ getRootString(path4) {
9462
+ return win32.parse(path4).root;
9286
9463
  }
9287
9464
  /**
9288
9465
  * @internal
@@ -9328,8 +9505,8 @@ var PathPosix = class _PathPosix extends PathBase {
9328
9505
  /**
9329
9506
  * @internal
9330
9507
  */
9331
- getRootString(path5) {
9332
- return path5.startsWith("/") ? "/" : "";
9508
+ getRootString(path4) {
9509
+ return path4.startsWith("/") ? "/" : "";
9333
9510
  }
9334
9511
  /**
9335
9512
  * @internal
@@ -9418,11 +9595,11 @@ var PathScurryBase = class {
9418
9595
  /**
9419
9596
  * Get the depth of a provided path, string, or the cwd
9420
9597
  */
9421
- depth(path5 = this.cwd) {
9422
- if (typeof path5 === "string") {
9423
- path5 = this.cwd.resolve(path5);
9598
+ depth(path4 = this.cwd) {
9599
+ if (typeof path4 === "string") {
9600
+ path4 = this.cwd.resolve(path4);
9424
9601
  }
9425
- return path5.depth();
9602
+ return path4.depth();
9426
9603
  }
9427
9604
  /**
9428
9605
  * Return the cache of child entries. Exposed so subclasses can create
@@ -9648,9 +9825,9 @@ var PathScurryBase = class {
9648
9825
  opts = entry;
9649
9826
  entry = this.cwd;
9650
9827
  }
9651
- const { withFileTypes = true, follow = false, filter: filter2, walkFilter } = opts;
9828
+ const { withFileTypes = true, follow = false, filter: filter3, walkFilter } = opts;
9652
9829
  const results = [];
9653
- if (!filter2 || filter2(entry)) {
9830
+ if (!filter3 || filter3(entry)) {
9654
9831
  results.push(withFileTypes ? entry : entry.fullpath());
9655
9832
  }
9656
9833
  const dirs = /* @__PURE__ */ new Set();
@@ -9669,7 +9846,7 @@ var PathScurryBase = class {
9669
9846
  }
9670
9847
  };
9671
9848
  for (const e of entries) {
9672
- if (!filter2 || filter2(e)) {
9849
+ if (!filter3 || filter3(e)) {
9673
9850
  results.push(withFileTypes ? e : e.fullpath());
9674
9851
  }
9675
9852
  if (follow && e.isSymbolicLink()) {
@@ -9700,16 +9877,16 @@ var PathScurryBase = class {
9700
9877
  opts = entry;
9701
9878
  entry = this.cwd;
9702
9879
  }
9703
- const { withFileTypes = true, follow = false, filter: filter2, walkFilter } = opts;
9880
+ const { withFileTypes = true, follow = false, filter: filter3, walkFilter } = opts;
9704
9881
  const results = [];
9705
- if (!filter2 || filter2(entry)) {
9882
+ if (!filter3 || filter3(entry)) {
9706
9883
  results.push(withFileTypes ? entry : entry.fullpath());
9707
9884
  }
9708
9885
  const dirs = /* @__PURE__ */ new Set([entry]);
9709
9886
  for (const dir of dirs) {
9710
9887
  const entries = dir.readdirSync();
9711
9888
  for (const e of entries) {
9712
- if (!filter2 || filter2(e)) {
9889
+ if (!filter3 || filter3(e)) {
9713
9890
  results.push(withFileTypes ? e : e.fullpath());
9714
9891
  }
9715
9892
  let r = e;
@@ -9762,15 +9939,15 @@ var PathScurryBase = class {
9762
9939
  opts = entry;
9763
9940
  entry = this.cwd;
9764
9941
  }
9765
- const { withFileTypes = true, follow = false, filter: filter2, walkFilter } = opts;
9766
- if (!filter2 || filter2(entry)) {
9942
+ const { withFileTypes = true, follow = false, filter: filter3, walkFilter } = opts;
9943
+ if (!filter3 || filter3(entry)) {
9767
9944
  yield withFileTypes ? entry : entry.fullpath();
9768
9945
  }
9769
9946
  const dirs = /* @__PURE__ */ new Set([entry]);
9770
9947
  for (const dir of dirs) {
9771
9948
  const entries = dir.readdirSync();
9772
9949
  for (const e of entries) {
9773
- if (!filter2 || filter2(e)) {
9950
+ if (!filter3 || filter3(e)) {
9774
9951
  yield withFileTypes ? e : e.fullpath();
9775
9952
  }
9776
9953
  let r = e;
@@ -9793,9 +9970,9 @@ var PathScurryBase = class {
9793
9970
  opts = entry;
9794
9971
  entry = this.cwd;
9795
9972
  }
9796
- const { withFileTypes = true, follow = false, filter: filter2, walkFilter } = opts;
9973
+ const { withFileTypes = true, follow = false, filter: filter3, walkFilter } = opts;
9797
9974
  const results = new Minipass({ objectMode: true });
9798
- if (!filter2 || filter2(entry)) {
9975
+ if (!filter3 || filter3(entry)) {
9799
9976
  results.write(withFileTypes ? entry : entry.fullpath());
9800
9977
  }
9801
9978
  const dirs = /* @__PURE__ */ new Set();
@@ -9828,7 +10005,7 @@ var PathScurryBase = class {
9828
10005
  }
9829
10006
  }
9830
10007
  for (const e of entries) {
9831
- if (e && (!filter2 || filter2(e))) {
10008
+ if (e && (!filter3 || filter3(e))) {
9832
10009
  if (!results.write(withFileTypes ? e : e.fullpath())) {
9833
10010
  paused = true;
9834
10011
  }
@@ -9862,10 +10039,10 @@ var PathScurryBase = class {
9862
10039
  opts = entry;
9863
10040
  entry = this.cwd;
9864
10041
  }
9865
- const { withFileTypes = true, follow = false, filter: filter2, walkFilter } = opts;
10042
+ const { withFileTypes = true, follow = false, filter: filter3, walkFilter } = opts;
9866
10043
  const results = new Minipass({ objectMode: true });
9867
10044
  const dirs = /* @__PURE__ */ new Set();
9868
- if (!filter2 || filter2(entry)) {
10045
+ if (!filter3 || filter3(entry)) {
9869
10046
  results.write(withFileTypes ? entry : entry.fullpath());
9870
10047
  }
9871
10048
  const queue = [entry];
@@ -9883,7 +10060,7 @@ var PathScurryBase = class {
9883
10060
  dirs.add(dir);
9884
10061
  const entries = dir.readdirSync();
9885
10062
  for (const e of entries) {
9886
- if (!filter2 || filter2(e)) {
10063
+ if (!filter3 || filter3(e)) {
9887
10064
  if (!results.write(withFileTypes ? e : e.fullpath())) {
9888
10065
  paused = true;
9889
10066
  }
@@ -9909,9 +10086,9 @@ var PathScurryBase = class {
9909
10086
  process2();
9910
10087
  return results;
9911
10088
  }
9912
- chdir(path5 = this.cwd) {
10089
+ chdir(path4 = this.cwd) {
9913
10090
  const oldCwd = this.cwd;
9914
- this.cwd = typeof path5 === "string" ? this.cwd.resolve(path5) : path5;
10091
+ this.cwd = typeof path4 === "string" ? this.cwd.resolve(path4) : path4;
9915
10092
  this.cwd[setAsCwd](oldCwd);
9916
10093
  }
9917
10094
  };
@@ -10267,8 +10444,8 @@ var MatchRecord = class {
10267
10444
  }
10268
10445
  // match, absolute, ifdir
10269
10446
  entries() {
10270
- return [...this.store.entries()].map(([path5, n]) => [
10271
- path5,
10447
+ return [...this.store.entries()].map(([path4, n]) => [
10448
+ path4,
10272
10449
  !!(n & 2),
10273
10450
  !!(n & 1)
10274
10451
  ]);
@@ -10473,9 +10650,9 @@ var GlobUtil = class {
10473
10650
  signal;
10474
10651
  maxDepth;
10475
10652
  includeChildMatches;
10476
- constructor(patterns, path5, opts) {
10653
+ constructor(patterns, path4, opts) {
10477
10654
  this.patterns = patterns;
10478
- this.path = path5;
10655
+ this.path = path4;
10479
10656
  this.opts = opts;
10480
10657
  this.#sep = !opts.posix && opts.platform === "win32" ? "\\" : "/";
10481
10658
  this.includeChildMatches = opts.includeChildMatches !== false;
@@ -10494,11 +10671,11 @@ var GlobUtil = class {
10494
10671
  });
10495
10672
  }
10496
10673
  }
10497
- #ignored(path5) {
10498
- return this.seen.has(path5) || !!this.#ignore?.ignored?.(path5);
10674
+ #ignored(path4) {
10675
+ return this.seen.has(path4) || !!this.#ignore?.ignored?.(path4);
10499
10676
  }
10500
- #childrenIgnored(path5) {
10501
- return !!this.#ignore?.childrenIgnored?.(path5);
10677
+ #childrenIgnored(path4) {
10678
+ return !!this.#ignore?.childrenIgnored?.(path4);
10502
10679
  }
10503
10680
  // backpressure mechanism
10504
10681
  pause() {
@@ -10713,8 +10890,8 @@ var GlobUtil = class {
10713
10890
  };
10714
10891
  var GlobWalker = class extends GlobUtil {
10715
10892
  matches = /* @__PURE__ */ new Set();
10716
- constructor(patterns, path5, opts) {
10717
- super(patterns, path5, opts);
10893
+ constructor(patterns, path4, opts) {
10894
+ super(patterns, path4, opts);
10718
10895
  }
10719
10896
  matchEmit(e) {
10720
10897
  this.matches.add(e);
@@ -10751,8 +10928,8 @@ var GlobWalker = class extends GlobUtil {
10751
10928
  };
10752
10929
  var GlobStream = class extends GlobUtil {
10753
10930
  results;
10754
- constructor(patterns, path5, opts) {
10755
- super(patterns, path5, opts);
10931
+ constructor(patterns, path4, opts) {
10932
+ super(patterns, path4, opts);
10756
10933
  this.results = new Minipass({
10757
10934
  signal: this.signal,
10758
10935
  objectMode: true
@@ -11057,7 +11234,7 @@ function detectMonorepoPackages(...pkgPaths) {
11057
11234
  if (!fs3.existsSync(pkgPath)) {
11058
11235
  continue;
11059
11236
  }
11060
- const rootDir = path4.dirname(pkgPath);
11237
+ const rootDir = path3.dirname(pkgPath);
11061
11238
  const { workspaces } = readJsonFile(pkgPath);
11062
11239
  if (!workspaces) {
11063
11240
  continue;
@@ -11066,7 +11243,7 @@ function detectMonorepoPackages(...pkgPaths) {
11066
11243
  return {
11067
11244
  name: readJsonFile(filename).name,
11068
11245
  pkgPath: filename,
11069
- srcPath: path4.resolve(path4.dirname(filename), "src")
11246
+ srcPath: path3.resolve(path3.dirname(filename), "src")
11070
11247
  };
11071
11248
  });
11072
11249
  }
@@ -11249,7 +11426,13 @@ var internalDependencies = detectInternalDependencies(
11249
11426
  packages,
11250
11427
  allDependencies
11251
11428
  );
11252
- var defaultPlugins = [indexHtmlPlugin(), packageJsonPlugin(), vuePlugin()];
11429
+ var defaultPlugins = [
11430
+ indexHtmlPlugin(),
11431
+ packageJsonPlugin(),
11432
+ vuePlugin(),
11433
+ customMappingPlugin(),
11434
+ babelPlugin()
11435
+ ];
11253
11436
  var defaultConfig = {
11254
11437
  fk: {},
11255
11438
  plugins: defaultPlugins,
@@ -11265,22 +11448,16 @@ var defaultConfig = {
11265
11448
  emptyOutDir: false,
11266
11449
  minify: false,
11267
11450
  sourcemap: true,
11268
- outDir: "",
11451
+ outDir: "dist/[custom-format]",
11269
11452
  lib: {
11270
11453
  entry: "src/index.ts",
11271
11454
  formats: ["es", "cjs"]
11272
11455
  },
11273
11456
  rollupOptions: {
11274
11457
  output: {
11275
- entryFileNames: `temp/index.[format].js`,
11458
+ entryFileNames: `index.[custom-format].js`,
11276
11459
  globals: {
11277
11460
  vue: "Vue"
11278
- },
11279
- assetFileNames(assetInfo) {
11280
- if (assetInfo.name === "style.css") {
11281
- return "dist/style.css";
11282
- }
11283
- return assetInfo.name ?? "";
11284
11461
  }
11285
11462
  },
11286
11463
  external: Array.from(external)