@forsakringskassan/vite-lib-config 2.0.3 → 2.1.0
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/README.md +20 -0
- package/dist/cli.mjs +49 -56
- package/dist/tsdoc-metadata.json +1 -1
- package/dist/vite.config.cjs +57 -178
- package/dist/vite.config.mjs +57 -178
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -2,6 +2,26 @@
|
|
|
2
2
|
|
|
3
3
|
Toolchain for building Vue framework libraries.
|
|
4
4
|
|
|
5
|
+
- Hybrid ESM/CJS packages.
|
|
6
|
+
- Transpiled with Babel.
|
|
7
|
+
- Supports monorepo.
|
|
8
|
+
|
|
9
|
+
## Configuration
|
|
10
|
+
|
|
11
|
+
### Bundled dependencies
|
|
12
|
+
|
|
13
|
+
By default all dependencies (`dependencies` and `peerDependencies`) are marked as external and not bundled in output files.
|
|
14
|
+
This can be overriden by setting `externalDependencies` in `package.json`:
|
|
15
|
+
|
|
16
|
+
```diff
|
|
17
|
+
"dependencies": {
|
|
18
|
+
"lodash": "^4.17.20"
|
|
19
|
+
},
|
|
20
|
+
+ "externalDependencies": [
|
|
21
|
+
+ "lodash"
|
|
22
|
+
+ ],
|
|
23
|
+
```
|
|
24
|
+
|
|
5
25
|
## Usage
|
|
6
26
|
|
|
7
27
|
### `babel.config.js`
|
package/dist/cli.mjs
CHANGED
|
@@ -6,13 +6,7 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
|
6
6
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
7
|
var __getProtoOf = Object.getPrototypeOf;
|
|
8
8
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
|
-
var
|
|
10
|
-
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
|
|
11
|
-
}) : x)(function(x) {
|
|
12
|
-
if (typeof require !== "undefined") return require.apply(this, arguments);
|
|
13
|
-
throw Error('Dynamic require of "' + x + '" is not supported');
|
|
14
|
-
});
|
|
15
|
-
var __commonJS = (cb, mod) => function __require2() {
|
|
9
|
+
var __commonJS = (cb, mod) => function __require() {
|
|
16
10
|
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
17
11
|
};
|
|
18
12
|
var __copyProps = (to, from, except, desc) => {
|
|
@@ -35,17 +29,16 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
35
29
|
// node_modules/picocolors/picocolors.js
|
|
36
30
|
var require_picocolors = __commonJS({
|
|
37
31
|
"node_modules/picocolors/picocolors.js"(exports, module) {
|
|
38
|
-
var
|
|
39
|
-
var
|
|
40
|
-
var
|
|
32
|
+
var p = process || {};
|
|
33
|
+
var argv = p.argv || [];
|
|
34
|
+
var env = p.env || {};
|
|
35
|
+
var isColorSupported = !(!!env.NO_COLOR || argv.includes("--no-color")) && (!!env.FORCE_COLOR || argv.includes("--color") || p.platform === "win32" || (p.stdout || {}).isTTY && env.TERM !== "dumb" || !!env.CI);
|
|
41
36
|
var formatter = (open, close, replace = open) => (input) => {
|
|
42
|
-
let string = "" + input;
|
|
43
|
-
let index = string.indexOf(close, open.length);
|
|
37
|
+
let string = "" + input, index = string.indexOf(close, open.length);
|
|
44
38
|
return ~index ? open + replaceClose(string, close, replace, index) + close : open + string + close;
|
|
45
39
|
};
|
|
46
40
|
var replaceClose = (string, close, replace, index) => {
|
|
47
|
-
let result = "";
|
|
48
|
-
let cursor = 0;
|
|
41
|
+
let result = "", cursor = 0;
|
|
49
42
|
do {
|
|
50
43
|
result += string.substring(cursor, index) + replace;
|
|
51
44
|
cursor = index + close.length;
|
|
@@ -54,50 +47,50 @@ var require_picocolors = __commonJS({
|
|
|
54
47
|
return result + string.substring(cursor);
|
|
55
48
|
};
|
|
56
49
|
var createColors = (enabled = isColorSupported) => {
|
|
57
|
-
let
|
|
50
|
+
let f = enabled ? formatter : () => String;
|
|
58
51
|
return {
|
|
59
52
|
isColorSupported: enabled,
|
|
60
|
-
reset:
|
|
61
|
-
bold:
|
|
62
|
-
dim:
|
|
63
|
-
italic:
|
|
64
|
-
underline:
|
|
65
|
-
inverse:
|
|
66
|
-
hidden:
|
|
67
|
-
strikethrough:
|
|
68
|
-
black:
|
|
69
|
-
red:
|
|
70
|
-
green:
|
|
71
|
-
yellow:
|
|
72
|
-
blue:
|
|
73
|
-
magenta:
|
|
74
|
-
cyan:
|
|
75
|
-
white:
|
|
76
|
-
gray:
|
|
77
|
-
bgBlack:
|
|
78
|
-
bgRed:
|
|
79
|
-
bgGreen:
|
|
80
|
-
bgYellow:
|
|
81
|
-
bgBlue:
|
|
82
|
-
bgMagenta:
|
|
83
|
-
bgCyan:
|
|
84
|
-
bgWhite:
|
|
85
|
-
blackBright:
|
|
86
|
-
redBright:
|
|
87
|
-
greenBright:
|
|
88
|
-
yellowBright:
|
|
89
|
-
blueBright:
|
|
90
|
-
magentaBright:
|
|
91
|
-
cyanBright:
|
|
92
|
-
whiteBright:
|
|
93
|
-
bgBlackBright:
|
|
94
|
-
bgRedBright:
|
|
95
|
-
bgGreenBright:
|
|
96
|
-
bgYellowBright:
|
|
97
|
-
bgBlueBright:
|
|
98
|
-
bgMagentaBright:
|
|
99
|
-
bgCyanBright:
|
|
100
|
-
bgWhiteBright:
|
|
53
|
+
reset: f("\x1B[0m", "\x1B[0m"),
|
|
54
|
+
bold: f("\x1B[1m", "\x1B[22m", "\x1B[22m\x1B[1m"),
|
|
55
|
+
dim: f("\x1B[2m", "\x1B[22m", "\x1B[22m\x1B[2m"),
|
|
56
|
+
italic: f("\x1B[3m", "\x1B[23m"),
|
|
57
|
+
underline: f("\x1B[4m", "\x1B[24m"),
|
|
58
|
+
inverse: f("\x1B[7m", "\x1B[27m"),
|
|
59
|
+
hidden: f("\x1B[8m", "\x1B[28m"),
|
|
60
|
+
strikethrough: f("\x1B[9m", "\x1B[29m"),
|
|
61
|
+
black: f("\x1B[30m", "\x1B[39m"),
|
|
62
|
+
red: f("\x1B[31m", "\x1B[39m"),
|
|
63
|
+
green: f("\x1B[32m", "\x1B[39m"),
|
|
64
|
+
yellow: f("\x1B[33m", "\x1B[39m"),
|
|
65
|
+
blue: f("\x1B[34m", "\x1B[39m"),
|
|
66
|
+
magenta: f("\x1B[35m", "\x1B[39m"),
|
|
67
|
+
cyan: f("\x1B[36m", "\x1B[39m"),
|
|
68
|
+
white: f("\x1B[37m", "\x1B[39m"),
|
|
69
|
+
gray: f("\x1B[90m", "\x1B[39m"),
|
|
70
|
+
bgBlack: f("\x1B[40m", "\x1B[49m"),
|
|
71
|
+
bgRed: f("\x1B[41m", "\x1B[49m"),
|
|
72
|
+
bgGreen: f("\x1B[42m", "\x1B[49m"),
|
|
73
|
+
bgYellow: f("\x1B[43m", "\x1B[49m"),
|
|
74
|
+
bgBlue: f("\x1B[44m", "\x1B[49m"),
|
|
75
|
+
bgMagenta: f("\x1B[45m", "\x1B[49m"),
|
|
76
|
+
bgCyan: f("\x1B[46m", "\x1B[49m"),
|
|
77
|
+
bgWhite: f("\x1B[47m", "\x1B[49m"),
|
|
78
|
+
blackBright: f("\x1B[90m", "\x1B[39m"),
|
|
79
|
+
redBright: f("\x1B[91m", "\x1B[39m"),
|
|
80
|
+
greenBright: f("\x1B[92m", "\x1B[39m"),
|
|
81
|
+
yellowBright: f("\x1B[93m", "\x1B[39m"),
|
|
82
|
+
blueBright: f("\x1B[94m", "\x1B[39m"),
|
|
83
|
+
magentaBright: f("\x1B[95m", "\x1B[39m"),
|
|
84
|
+
cyanBright: f("\x1B[96m", "\x1B[39m"),
|
|
85
|
+
whiteBright: f("\x1B[97m", "\x1B[39m"),
|
|
86
|
+
bgBlackBright: f("\x1B[100m", "\x1B[49m"),
|
|
87
|
+
bgRedBright: f("\x1B[101m", "\x1B[49m"),
|
|
88
|
+
bgGreenBright: f("\x1B[102m", "\x1B[49m"),
|
|
89
|
+
bgYellowBright: f("\x1B[103m", "\x1B[49m"),
|
|
90
|
+
bgBlueBright: f("\x1B[104m", "\x1B[49m"),
|
|
91
|
+
bgMagentaBright: f("\x1B[105m", "\x1B[49m"),
|
|
92
|
+
bgCyanBright: f("\x1B[106m", "\x1B[49m"),
|
|
93
|
+
bgWhiteBright: f("\x1B[107m", "\x1B[49m")
|
|
101
94
|
};
|
|
102
95
|
};
|
|
103
96
|
module.exports = createColors();
|
package/dist/tsdoc-metadata.json
CHANGED
package/dist/vite.config.cjs
CHANGED
|
@@ -135,17 +135,16 @@ var require_cjs = __commonJS({
|
|
|
135
135
|
// node_modules/picocolors/picocolors.js
|
|
136
136
|
var require_picocolors = __commonJS({
|
|
137
137
|
"node_modules/picocolors/picocolors.js"(exports2, module2) {
|
|
138
|
-
var
|
|
139
|
-
var
|
|
140
|
-
var
|
|
138
|
+
var p = process || {};
|
|
139
|
+
var argv = p.argv || [];
|
|
140
|
+
var env = p.env || {};
|
|
141
|
+
var isColorSupported = !(!!env.NO_COLOR || argv.includes("--no-color")) && (!!env.FORCE_COLOR || argv.includes("--color") || p.platform === "win32" || (p.stdout || {}).isTTY && env.TERM !== "dumb" || !!env.CI);
|
|
141
142
|
var formatter = (open, close, replace = open) => (input) => {
|
|
142
|
-
let string = "" + input;
|
|
143
|
-
let index = string.indexOf(close, open.length);
|
|
143
|
+
let string = "" + input, index = string.indexOf(close, open.length);
|
|
144
144
|
return ~index ? open + replaceClose(string, close, replace, index) + close : open + string + close;
|
|
145
145
|
};
|
|
146
146
|
var replaceClose = (string, close, replace, index) => {
|
|
147
|
-
let result = "";
|
|
148
|
-
let cursor = 0;
|
|
147
|
+
let result = "", cursor = 0;
|
|
149
148
|
do {
|
|
150
149
|
result += string.substring(cursor, index) + replace;
|
|
151
150
|
cursor = index + close.length;
|
|
@@ -154,50 +153,50 @@ var require_picocolors = __commonJS({
|
|
|
154
153
|
return result + string.substring(cursor);
|
|
155
154
|
};
|
|
156
155
|
var createColors = (enabled = isColorSupported) => {
|
|
157
|
-
let
|
|
156
|
+
let f = enabled ? formatter : () => String;
|
|
158
157
|
return {
|
|
159
158
|
isColorSupported: enabled,
|
|
160
|
-
reset:
|
|
161
|
-
bold:
|
|
162
|
-
dim:
|
|
163
|
-
italic:
|
|
164
|
-
underline:
|
|
165
|
-
inverse:
|
|
166
|
-
hidden:
|
|
167
|
-
strikethrough:
|
|
168
|
-
black:
|
|
169
|
-
red:
|
|
170
|
-
green:
|
|
171
|
-
yellow:
|
|
172
|
-
blue:
|
|
173
|
-
magenta:
|
|
174
|
-
cyan:
|
|
175
|
-
white:
|
|
176
|
-
gray:
|
|
177
|
-
bgBlack:
|
|
178
|
-
bgRed:
|
|
179
|
-
bgGreen:
|
|
180
|
-
bgYellow:
|
|
181
|
-
bgBlue:
|
|
182
|
-
bgMagenta:
|
|
183
|
-
bgCyan:
|
|
184
|
-
bgWhite:
|
|
185
|
-
blackBright:
|
|
186
|
-
redBright:
|
|
187
|
-
greenBright:
|
|
188
|
-
yellowBright:
|
|
189
|
-
blueBright:
|
|
190
|
-
magentaBright:
|
|
191
|
-
cyanBright:
|
|
192
|
-
whiteBright:
|
|
193
|
-
bgBlackBright:
|
|
194
|
-
bgRedBright:
|
|
195
|
-
bgGreenBright:
|
|
196
|
-
bgYellowBright:
|
|
197
|
-
bgBlueBright:
|
|
198
|
-
bgMagentaBright:
|
|
199
|
-
bgCyanBright:
|
|
200
|
-
bgWhiteBright:
|
|
159
|
+
reset: f("\x1B[0m", "\x1B[0m"),
|
|
160
|
+
bold: f("\x1B[1m", "\x1B[22m", "\x1B[22m\x1B[1m"),
|
|
161
|
+
dim: f("\x1B[2m", "\x1B[22m", "\x1B[22m\x1B[2m"),
|
|
162
|
+
italic: f("\x1B[3m", "\x1B[23m"),
|
|
163
|
+
underline: f("\x1B[4m", "\x1B[24m"),
|
|
164
|
+
inverse: f("\x1B[7m", "\x1B[27m"),
|
|
165
|
+
hidden: f("\x1B[8m", "\x1B[28m"),
|
|
166
|
+
strikethrough: f("\x1B[9m", "\x1B[29m"),
|
|
167
|
+
black: f("\x1B[30m", "\x1B[39m"),
|
|
168
|
+
red: f("\x1B[31m", "\x1B[39m"),
|
|
169
|
+
green: f("\x1B[32m", "\x1B[39m"),
|
|
170
|
+
yellow: f("\x1B[33m", "\x1B[39m"),
|
|
171
|
+
blue: f("\x1B[34m", "\x1B[39m"),
|
|
172
|
+
magenta: f("\x1B[35m", "\x1B[39m"),
|
|
173
|
+
cyan: f("\x1B[36m", "\x1B[39m"),
|
|
174
|
+
white: f("\x1B[37m", "\x1B[39m"),
|
|
175
|
+
gray: f("\x1B[90m", "\x1B[39m"),
|
|
176
|
+
bgBlack: f("\x1B[40m", "\x1B[49m"),
|
|
177
|
+
bgRed: f("\x1B[41m", "\x1B[49m"),
|
|
178
|
+
bgGreen: f("\x1B[42m", "\x1B[49m"),
|
|
179
|
+
bgYellow: f("\x1B[43m", "\x1B[49m"),
|
|
180
|
+
bgBlue: f("\x1B[44m", "\x1B[49m"),
|
|
181
|
+
bgMagenta: f("\x1B[45m", "\x1B[49m"),
|
|
182
|
+
bgCyan: f("\x1B[46m", "\x1B[49m"),
|
|
183
|
+
bgWhite: f("\x1B[47m", "\x1B[49m"),
|
|
184
|
+
blackBright: f("\x1B[90m", "\x1B[39m"),
|
|
185
|
+
redBright: f("\x1B[91m", "\x1B[39m"),
|
|
186
|
+
greenBright: f("\x1B[92m", "\x1B[39m"),
|
|
187
|
+
yellowBright: f("\x1B[93m", "\x1B[39m"),
|
|
188
|
+
blueBright: f("\x1B[94m", "\x1B[39m"),
|
|
189
|
+
magentaBright: f("\x1B[95m", "\x1B[39m"),
|
|
190
|
+
cyanBright: f("\x1B[96m", "\x1B[39m"),
|
|
191
|
+
whiteBright: f("\x1B[97m", "\x1B[39m"),
|
|
192
|
+
bgBlackBright: f("\x1B[100m", "\x1B[49m"),
|
|
193
|
+
bgRedBright: f("\x1B[101m", "\x1B[49m"),
|
|
194
|
+
bgGreenBright: f("\x1B[102m", "\x1B[49m"),
|
|
195
|
+
bgYellowBright: f("\x1B[103m", "\x1B[49m"),
|
|
196
|
+
bgBlueBright: f("\x1B[104m", "\x1B[49m"),
|
|
197
|
+
bgMagentaBright: f("\x1B[105m", "\x1B[49m"),
|
|
198
|
+
bgCyanBright: f("\x1B[106m", "\x1B[49m"),
|
|
199
|
+
bgWhiteBright: f("\x1B[107m", "\x1B[49m")
|
|
201
200
|
};
|
|
202
201
|
};
|
|
203
202
|
module2.exports = createColors();
|
|
@@ -205,115 +204,6 @@ var require_picocolors = __commonJS({
|
|
|
205
204
|
}
|
|
206
205
|
});
|
|
207
206
|
|
|
208
|
-
// node_modules/has-flag/index.js
|
|
209
|
-
var require_has_flag = __commonJS({
|
|
210
|
-
"node_modules/has-flag/index.js"(exports2, module2) {
|
|
211
|
-
"use strict";
|
|
212
|
-
module2.exports = (flag, argv) => {
|
|
213
|
-
argv = argv || process.argv;
|
|
214
|
-
const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--";
|
|
215
|
-
const pos = argv.indexOf(prefix + flag);
|
|
216
|
-
const terminatorPos = argv.indexOf("--");
|
|
217
|
-
return pos !== -1 && (terminatorPos === -1 ? true : pos < terminatorPos);
|
|
218
|
-
};
|
|
219
|
-
}
|
|
220
|
-
});
|
|
221
|
-
|
|
222
|
-
// node_modules/supports-color/index.js
|
|
223
|
-
var require_supports_color = __commonJS({
|
|
224
|
-
"node_modules/supports-color/index.js"(exports2, module2) {
|
|
225
|
-
"use strict";
|
|
226
|
-
var os = require("os");
|
|
227
|
-
var hasFlag = require_has_flag();
|
|
228
|
-
var env = process.env;
|
|
229
|
-
var forceColor;
|
|
230
|
-
if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false")) {
|
|
231
|
-
forceColor = false;
|
|
232
|
-
} else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) {
|
|
233
|
-
forceColor = true;
|
|
234
|
-
}
|
|
235
|
-
if ("FORCE_COLOR" in env) {
|
|
236
|
-
forceColor = env.FORCE_COLOR.length === 0 || parseInt(env.FORCE_COLOR, 10) !== 0;
|
|
237
|
-
}
|
|
238
|
-
function translateLevel(level) {
|
|
239
|
-
if (level === 0) {
|
|
240
|
-
return false;
|
|
241
|
-
}
|
|
242
|
-
return {
|
|
243
|
-
level,
|
|
244
|
-
hasBasic: true,
|
|
245
|
-
has256: level >= 2,
|
|
246
|
-
has16m: level >= 3
|
|
247
|
-
};
|
|
248
|
-
}
|
|
249
|
-
function supportsColor(stream2) {
|
|
250
|
-
if (forceColor === false) {
|
|
251
|
-
return 0;
|
|
252
|
-
}
|
|
253
|
-
if (hasFlag("color=16m") || hasFlag("color=full") || hasFlag("color=truecolor")) {
|
|
254
|
-
return 3;
|
|
255
|
-
}
|
|
256
|
-
if (hasFlag("color=256")) {
|
|
257
|
-
return 2;
|
|
258
|
-
}
|
|
259
|
-
if (stream2 && !stream2.isTTY && forceColor !== true) {
|
|
260
|
-
return 0;
|
|
261
|
-
}
|
|
262
|
-
const min = forceColor ? 1 : 0;
|
|
263
|
-
if (process.platform === "win32") {
|
|
264
|
-
const osRelease = os.release().split(".");
|
|
265
|
-
if (Number(process.versions.node.split(".")[0]) >= 8 && Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
|
|
266
|
-
return Number(osRelease[2]) >= 14931 ? 3 : 2;
|
|
267
|
-
}
|
|
268
|
-
return 1;
|
|
269
|
-
}
|
|
270
|
-
if ("CI" in env) {
|
|
271
|
-
if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI"].some((sign) => sign in env) || env.CI_NAME === "codeship") {
|
|
272
|
-
return 1;
|
|
273
|
-
}
|
|
274
|
-
return min;
|
|
275
|
-
}
|
|
276
|
-
if ("TEAMCITY_VERSION" in env) {
|
|
277
|
-
return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;
|
|
278
|
-
}
|
|
279
|
-
if (env.COLORTERM === "truecolor") {
|
|
280
|
-
return 3;
|
|
281
|
-
}
|
|
282
|
-
if ("TERM_PROGRAM" in env) {
|
|
283
|
-
const version2 = parseInt((env.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
|
|
284
|
-
switch (env.TERM_PROGRAM) {
|
|
285
|
-
case "iTerm.app":
|
|
286
|
-
return version2 >= 3 ? 3 : 2;
|
|
287
|
-
case "Apple_Terminal":
|
|
288
|
-
return 2;
|
|
289
|
-
}
|
|
290
|
-
}
|
|
291
|
-
if (/-256(color)?$/i.test(env.TERM)) {
|
|
292
|
-
return 2;
|
|
293
|
-
}
|
|
294
|
-
if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) {
|
|
295
|
-
return 1;
|
|
296
|
-
}
|
|
297
|
-
if ("COLORTERM" in env) {
|
|
298
|
-
return 1;
|
|
299
|
-
}
|
|
300
|
-
if (env.TERM === "dumb") {
|
|
301
|
-
return min;
|
|
302
|
-
}
|
|
303
|
-
return min;
|
|
304
|
-
}
|
|
305
|
-
function getSupportLevel(stream2) {
|
|
306
|
-
const level = supportsColor(stream2);
|
|
307
|
-
return translateLevel(level);
|
|
308
|
-
}
|
|
309
|
-
module2.exports = {
|
|
310
|
-
supportsColor: getSupportLevel,
|
|
311
|
-
stdout: getSupportLevel(process.stdout),
|
|
312
|
-
stderr: getSupportLevel(process.stderr)
|
|
313
|
-
};
|
|
314
|
-
}
|
|
315
|
-
});
|
|
316
|
-
|
|
317
207
|
// internal/plugin-vue3/node_modules/@vitejs/plugin-vue/dist/index.cjs
|
|
318
208
|
var require_dist = __commonJS({
|
|
319
209
|
"internal/plugin-vue3/node_modules/@vitejs/plugin-vue/dist/index.cjs"(exports2, module2) {
|
|
@@ -1766,7 +1656,7 @@ import.meta.hot.accept(({ render }) => {
|
|
|
1766
1656
|
);
|
|
1767
1657
|
exports3.colors = [6, 2, 3, 4, 5, 1];
|
|
1768
1658
|
try {
|
|
1769
|
-
const supportsColor =
|
|
1659
|
+
const supportsColor = require("supports-color");
|
|
1770
1660
|
if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) {
|
|
1771
1661
|
exports3.colors = [
|
|
1772
1662
|
20,
|
|
@@ -4864,27 +4754,19 @@ function packageJsonPlugin() {
|
|
|
4864
4754
|
}
|
|
4865
4755
|
|
|
4866
4756
|
// src/utils/detect-internal-dependencies.ts
|
|
4867
|
-
var exclude = ["/css-variables", "/design"];
|
|
4868
|
-
function isExcluded(name) {
|
|
4869
|
-
return exclude.some((suffix) => name.endsWith(suffix));
|
|
4870
|
-
}
|
|
4871
4757
|
function detectInternalDependencies(packages2, dependencies2) {
|
|
4872
4758
|
const internal = packages2.filter((pkg) => dependencies2.includes(pkg.name));
|
|
4873
|
-
const included = internal.filter((pkg) => !isExcluded(pkg.name));
|
|
4874
4759
|
const num = internal.length;
|
|
4875
|
-
const skipped = internal.length - included.length;
|
|
4876
4760
|
console.group("Detecting monorepo dependencies:");
|
|
4877
4761
|
if (num > 0) {
|
|
4878
4762
|
const ies = num === 1 ? "y" : "ies";
|
|
4879
|
-
console.log(
|
|
4880
|
-
|
|
4881
|
-
`
|
|
4882
|
-
);
|
|
4763
|
+
console.log(`${num} internal dependenc${ies} found.
|
|
4764
|
+
`);
|
|
4883
4765
|
} else {
|
|
4884
4766
|
console.log("No internal dependencies found");
|
|
4885
4767
|
}
|
|
4886
4768
|
console.groupEnd();
|
|
4887
|
-
return
|
|
4769
|
+
return internal;
|
|
4888
4770
|
}
|
|
4889
4771
|
|
|
4890
4772
|
// src/utils/detect-monorepo-packages.ts
|
|
@@ -11354,8 +11236,12 @@ var vueMajor = detectVueMajor();
|
|
|
11354
11236
|
var packageJson = readJsonFile("package.json");
|
|
11355
11237
|
var dependencies = Object.keys(packageJson.dependencies ?? {});
|
|
11356
11238
|
var peerDependencies = Object.keys(packageJson.peerDependencies ?? {});
|
|
11239
|
+
var externalDependencies = packageJson.externalDependencies;
|
|
11357
11240
|
var allDependencies = [...dependencies, ...peerDependencies].sort();
|
|
11358
|
-
var external = /* @__PURE__ */ new Set([
|
|
11241
|
+
var external = /* @__PURE__ */ new Set([
|
|
11242
|
+
...externalDependencies ?? dependencies,
|
|
11243
|
+
...peerDependencies
|
|
11244
|
+
]);
|
|
11359
11245
|
console.log(
|
|
11360
11246
|
"Building",
|
|
11361
11247
|
import_picocolors.default.cyan(packageJson.name),
|
|
@@ -11371,13 +11257,6 @@ var defaultPlugins = [indexHtmlPlugin(), packageJsonPlugin(), vuePlugin()];
|
|
|
11371
11257
|
var defaultConfig = {
|
|
11372
11258
|
fk: {},
|
|
11373
11259
|
plugins: defaultPlugins,
|
|
11374
|
-
resolve: {
|
|
11375
|
-
alias: Object.fromEntries(
|
|
11376
|
-
internalDependencies.map((it) => {
|
|
11377
|
-
return [it.name, it.srcPath];
|
|
11378
|
-
})
|
|
11379
|
-
)
|
|
11380
|
-
},
|
|
11381
11260
|
optimizeDeps: {
|
|
11382
11261
|
/**
|
|
11383
11262
|
* Vite treats monorepo packages as sourcecode and performs no prebundling by default.
|
package/dist/vite.config.mjs
CHANGED
|
@@ -136,17 +136,16 @@ var require_cjs = __commonJS({
|
|
|
136
136
|
// node_modules/picocolors/picocolors.js
|
|
137
137
|
var require_picocolors = __commonJS({
|
|
138
138
|
"node_modules/picocolors/picocolors.js"(exports, module) {
|
|
139
|
-
var
|
|
140
|
-
var
|
|
141
|
-
var
|
|
139
|
+
var p = process || {};
|
|
140
|
+
var argv = p.argv || [];
|
|
141
|
+
var env = p.env || {};
|
|
142
|
+
var isColorSupported = !(!!env.NO_COLOR || argv.includes("--no-color")) && (!!env.FORCE_COLOR || argv.includes("--color") || p.platform === "win32" || (p.stdout || {}).isTTY && env.TERM !== "dumb" || !!env.CI);
|
|
142
143
|
var formatter = (open, close, replace = open) => (input) => {
|
|
143
|
-
let string = "" + input;
|
|
144
|
-
let index = string.indexOf(close, open.length);
|
|
144
|
+
let string = "" + input, index = string.indexOf(close, open.length);
|
|
145
145
|
return ~index ? open + replaceClose(string, close, replace, index) + close : open + string + close;
|
|
146
146
|
};
|
|
147
147
|
var replaceClose = (string, close, replace, index) => {
|
|
148
|
-
let result = "";
|
|
149
|
-
let cursor = 0;
|
|
148
|
+
let result = "", cursor = 0;
|
|
150
149
|
do {
|
|
151
150
|
result += string.substring(cursor, index) + replace;
|
|
152
151
|
cursor = index + close.length;
|
|
@@ -155,50 +154,50 @@ var require_picocolors = __commonJS({
|
|
|
155
154
|
return result + string.substring(cursor);
|
|
156
155
|
};
|
|
157
156
|
var createColors = (enabled = isColorSupported) => {
|
|
158
|
-
let
|
|
157
|
+
let f = enabled ? formatter : () => String;
|
|
159
158
|
return {
|
|
160
159
|
isColorSupported: enabled,
|
|
161
|
-
reset:
|
|
162
|
-
bold:
|
|
163
|
-
dim:
|
|
164
|
-
italic:
|
|
165
|
-
underline:
|
|
166
|
-
inverse:
|
|
167
|
-
hidden:
|
|
168
|
-
strikethrough:
|
|
169
|
-
black:
|
|
170
|
-
red:
|
|
171
|
-
green:
|
|
172
|
-
yellow:
|
|
173
|
-
blue:
|
|
174
|
-
magenta:
|
|
175
|
-
cyan:
|
|
176
|
-
white:
|
|
177
|
-
gray:
|
|
178
|
-
bgBlack:
|
|
179
|
-
bgRed:
|
|
180
|
-
bgGreen:
|
|
181
|
-
bgYellow:
|
|
182
|
-
bgBlue:
|
|
183
|
-
bgMagenta:
|
|
184
|
-
bgCyan:
|
|
185
|
-
bgWhite:
|
|
186
|
-
blackBright:
|
|
187
|
-
redBright:
|
|
188
|
-
greenBright:
|
|
189
|
-
yellowBright:
|
|
190
|
-
blueBright:
|
|
191
|
-
magentaBright:
|
|
192
|
-
cyanBright:
|
|
193
|
-
whiteBright:
|
|
194
|
-
bgBlackBright:
|
|
195
|
-
bgRedBright:
|
|
196
|
-
bgGreenBright:
|
|
197
|
-
bgYellowBright:
|
|
198
|
-
bgBlueBright:
|
|
199
|
-
bgMagentaBright:
|
|
200
|
-
bgCyanBright:
|
|
201
|
-
bgWhiteBright:
|
|
160
|
+
reset: f("\x1B[0m", "\x1B[0m"),
|
|
161
|
+
bold: f("\x1B[1m", "\x1B[22m", "\x1B[22m\x1B[1m"),
|
|
162
|
+
dim: f("\x1B[2m", "\x1B[22m", "\x1B[22m\x1B[2m"),
|
|
163
|
+
italic: f("\x1B[3m", "\x1B[23m"),
|
|
164
|
+
underline: f("\x1B[4m", "\x1B[24m"),
|
|
165
|
+
inverse: f("\x1B[7m", "\x1B[27m"),
|
|
166
|
+
hidden: f("\x1B[8m", "\x1B[28m"),
|
|
167
|
+
strikethrough: f("\x1B[9m", "\x1B[29m"),
|
|
168
|
+
black: f("\x1B[30m", "\x1B[39m"),
|
|
169
|
+
red: f("\x1B[31m", "\x1B[39m"),
|
|
170
|
+
green: f("\x1B[32m", "\x1B[39m"),
|
|
171
|
+
yellow: f("\x1B[33m", "\x1B[39m"),
|
|
172
|
+
blue: f("\x1B[34m", "\x1B[39m"),
|
|
173
|
+
magenta: f("\x1B[35m", "\x1B[39m"),
|
|
174
|
+
cyan: f("\x1B[36m", "\x1B[39m"),
|
|
175
|
+
white: f("\x1B[37m", "\x1B[39m"),
|
|
176
|
+
gray: f("\x1B[90m", "\x1B[39m"),
|
|
177
|
+
bgBlack: f("\x1B[40m", "\x1B[49m"),
|
|
178
|
+
bgRed: f("\x1B[41m", "\x1B[49m"),
|
|
179
|
+
bgGreen: f("\x1B[42m", "\x1B[49m"),
|
|
180
|
+
bgYellow: f("\x1B[43m", "\x1B[49m"),
|
|
181
|
+
bgBlue: f("\x1B[44m", "\x1B[49m"),
|
|
182
|
+
bgMagenta: f("\x1B[45m", "\x1B[49m"),
|
|
183
|
+
bgCyan: f("\x1B[46m", "\x1B[49m"),
|
|
184
|
+
bgWhite: f("\x1B[47m", "\x1B[49m"),
|
|
185
|
+
blackBright: f("\x1B[90m", "\x1B[39m"),
|
|
186
|
+
redBright: f("\x1B[91m", "\x1B[39m"),
|
|
187
|
+
greenBright: f("\x1B[92m", "\x1B[39m"),
|
|
188
|
+
yellowBright: f("\x1B[93m", "\x1B[39m"),
|
|
189
|
+
blueBright: f("\x1B[94m", "\x1B[39m"),
|
|
190
|
+
magentaBright: f("\x1B[95m", "\x1B[39m"),
|
|
191
|
+
cyanBright: f("\x1B[96m", "\x1B[39m"),
|
|
192
|
+
whiteBright: f("\x1B[97m", "\x1B[39m"),
|
|
193
|
+
bgBlackBright: f("\x1B[100m", "\x1B[49m"),
|
|
194
|
+
bgRedBright: f("\x1B[101m", "\x1B[49m"),
|
|
195
|
+
bgGreenBright: f("\x1B[102m", "\x1B[49m"),
|
|
196
|
+
bgYellowBright: f("\x1B[103m", "\x1B[49m"),
|
|
197
|
+
bgBlueBright: f("\x1B[104m", "\x1B[49m"),
|
|
198
|
+
bgMagentaBright: f("\x1B[105m", "\x1B[49m"),
|
|
199
|
+
bgCyanBright: f("\x1B[106m", "\x1B[49m"),
|
|
200
|
+
bgWhiteBright: f("\x1B[107m", "\x1B[49m")
|
|
202
201
|
};
|
|
203
202
|
};
|
|
204
203
|
module.exports = createColors();
|
|
@@ -206,115 +205,6 @@ var require_picocolors = __commonJS({
|
|
|
206
205
|
}
|
|
207
206
|
});
|
|
208
207
|
|
|
209
|
-
// node_modules/has-flag/index.js
|
|
210
|
-
var require_has_flag = __commonJS({
|
|
211
|
-
"node_modules/has-flag/index.js"(exports, module) {
|
|
212
|
-
"use strict";
|
|
213
|
-
module.exports = (flag, argv) => {
|
|
214
|
-
argv = argv || process.argv;
|
|
215
|
-
const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--";
|
|
216
|
-
const pos = argv.indexOf(prefix + flag);
|
|
217
|
-
const terminatorPos = argv.indexOf("--");
|
|
218
|
-
return pos !== -1 && (terminatorPos === -1 ? true : pos < terminatorPos);
|
|
219
|
-
};
|
|
220
|
-
}
|
|
221
|
-
});
|
|
222
|
-
|
|
223
|
-
// node_modules/supports-color/index.js
|
|
224
|
-
var require_supports_color = __commonJS({
|
|
225
|
-
"node_modules/supports-color/index.js"(exports, module) {
|
|
226
|
-
"use strict";
|
|
227
|
-
var os = __require("os");
|
|
228
|
-
var hasFlag = require_has_flag();
|
|
229
|
-
var env = process.env;
|
|
230
|
-
var forceColor;
|
|
231
|
-
if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false")) {
|
|
232
|
-
forceColor = false;
|
|
233
|
-
} else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) {
|
|
234
|
-
forceColor = true;
|
|
235
|
-
}
|
|
236
|
-
if ("FORCE_COLOR" in env) {
|
|
237
|
-
forceColor = env.FORCE_COLOR.length === 0 || parseInt(env.FORCE_COLOR, 10) !== 0;
|
|
238
|
-
}
|
|
239
|
-
function translateLevel(level) {
|
|
240
|
-
if (level === 0) {
|
|
241
|
-
return false;
|
|
242
|
-
}
|
|
243
|
-
return {
|
|
244
|
-
level,
|
|
245
|
-
hasBasic: true,
|
|
246
|
-
has256: level >= 2,
|
|
247
|
-
has16m: level >= 3
|
|
248
|
-
};
|
|
249
|
-
}
|
|
250
|
-
function supportsColor(stream2) {
|
|
251
|
-
if (forceColor === false) {
|
|
252
|
-
return 0;
|
|
253
|
-
}
|
|
254
|
-
if (hasFlag("color=16m") || hasFlag("color=full") || hasFlag("color=truecolor")) {
|
|
255
|
-
return 3;
|
|
256
|
-
}
|
|
257
|
-
if (hasFlag("color=256")) {
|
|
258
|
-
return 2;
|
|
259
|
-
}
|
|
260
|
-
if (stream2 && !stream2.isTTY && forceColor !== true) {
|
|
261
|
-
return 0;
|
|
262
|
-
}
|
|
263
|
-
const min = forceColor ? 1 : 0;
|
|
264
|
-
if (process.platform === "win32") {
|
|
265
|
-
const osRelease = os.release().split(".");
|
|
266
|
-
if (Number(process.versions.node.split(".")[0]) >= 8 && Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
|
|
267
|
-
return Number(osRelease[2]) >= 14931 ? 3 : 2;
|
|
268
|
-
}
|
|
269
|
-
return 1;
|
|
270
|
-
}
|
|
271
|
-
if ("CI" in env) {
|
|
272
|
-
if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI"].some((sign) => sign in env) || env.CI_NAME === "codeship") {
|
|
273
|
-
return 1;
|
|
274
|
-
}
|
|
275
|
-
return min;
|
|
276
|
-
}
|
|
277
|
-
if ("TEAMCITY_VERSION" in env) {
|
|
278
|
-
return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;
|
|
279
|
-
}
|
|
280
|
-
if (env.COLORTERM === "truecolor") {
|
|
281
|
-
return 3;
|
|
282
|
-
}
|
|
283
|
-
if ("TERM_PROGRAM" in env) {
|
|
284
|
-
const version2 = parseInt((env.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
|
|
285
|
-
switch (env.TERM_PROGRAM) {
|
|
286
|
-
case "iTerm.app":
|
|
287
|
-
return version2 >= 3 ? 3 : 2;
|
|
288
|
-
case "Apple_Terminal":
|
|
289
|
-
return 2;
|
|
290
|
-
}
|
|
291
|
-
}
|
|
292
|
-
if (/-256(color)?$/i.test(env.TERM)) {
|
|
293
|
-
return 2;
|
|
294
|
-
}
|
|
295
|
-
if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) {
|
|
296
|
-
return 1;
|
|
297
|
-
}
|
|
298
|
-
if ("COLORTERM" in env) {
|
|
299
|
-
return 1;
|
|
300
|
-
}
|
|
301
|
-
if (env.TERM === "dumb") {
|
|
302
|
-
return min;
|
|
303
|
-
}
|
|
304
|
-
return min;
|
|
305
|
-
}
|
|
306
|
-
function getSupportLevel(stream2) {
|
|
307
|
-
const level = supportsColor(stream2);
|
|
308
|
-
return translateLevel(level);
|
|
309
|
-
}
|
|
310
|
-
module.exports = {
|
|
311
|
-
supportsColor: getSupportLevel,
|
|
312
|
-
stdout: getSupportLevel(process.stdout),
|
|
313
|
-
stderr: getSupportLevel(process.stderr)
|
|
314
|
-
};
|
|
315
|
-
}
|
|
316
|
-
});
|
|
317
|
-
|
|
318
208
|
// internal/plugin-vue3/node_modules/@vitejs/plugin-vue/dist/index.cjs
|
|
319
209
|
var require_dist = __commonJS({
|
|
320
210
|
"internal/plugin-vue3/node_modules/@vitejs/plugin-vue/dist/index.cjs"(exports, module) {
|
|
@@ -1767,7 +1657,7 @@ import.meta.hot.accept(({ render }) => {
|
|
|
1767
1657
|
);
|
|
1768
1658
|
exports2.colors = [6, 2, 3, 4, 5, 1];
|
|
1769
1659
|
try {
|
|
1770
|
-
const supportsColor =
|
|
1660
|
+
const supportsColor = __require("supports-color");
|
|
1771
1661
|
if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) {
|
|
1772
1662
|
exports2.colors = [
|
|
1773
1663
|
20,
|
|
@@ -4858,27 +4748,19 @@ function packageJsonPlugin() {
|
|
|
4858
4748
|
}
|
|
4859
4749
|
|
|
4860
4750
|
// src/utils/detect-internal-dependencies.ts
|
|
4861
|
-
var exclude = ["/css-variables", "/design"];
|
|
4862
|
-
function isExcluded(name) {
|
|
4863
|
-
return exclude.some((suffix) => name.endsWith(suffix));
|
|
4864
|
-
}
|
|
4865
4751
|
function detectInternalDependencies(packages2, dependencies2) {
|
|
4866
4752
|
const internal = packages2.filter((pkg) => dependencies2.includes(pkg.name));
|
|
4867
|
-
const included = internal.filter((pkg) => !isExcluded(pkg.name));
|
|
4868
4753
|
const num = internal.length;
|
|
4869
|
-
const skipped = internal.length - included.length;
|
|
4870
4754
|
console.group("Detecting monorepo dependencies:");
|
|
4871
4755
|
if (num > 0) {
|
|
4872
4756
|
const ies = num === 1 ? "y" : "ies";
|
|
4873
|
-
console.log(
|
|
4874
|
-
|
|
4875
|
-
`
|
|
4876
|
-
);
|
|
4757
|
+
console.log(`${num} internal dependenc${ies} found.
|
|
4758
|
+
`);
|
|
4877
4759
|
} else {
|
|
4878
4760
|
console.log("No internal dependencies found");
|
|
4879
4761
|
}
|
|
4880
4762
|
console.groupEnd();
|
|
4881
|
-
return
|
|
4763
|
+
return internal;
|
|
4882
4764
|
}
|
|
4883
4765
|
|
|
4884
4766
|
// src/utils/detect-monorepo-packages.ts
|
|
@@ -11350,8 +11232,12 @@ var vueMajor = detectVueMajor();
|
|
|
11350
11232
|
var packageJson = readJsonFile("package.json");
|
|
11351
11233
|
var dependencies = Object.keys(packageJson.dependencies ?? {});
|
|
11352
11234
|
var peerDependencies = Object.keys(packageJson.peerDependencies ?? {});
|
|
11235
|
+
var externalDependencies = packageJson.externalDependencies;
|
|
11353
11236
|
var allDependencies = [...dependencies, ...peerDependencies].sort();
|
|
11354
|
-
var external = /* @__PURE__ */ new Set([
|
|
11237
|
+
var external = /* @__PURE__ */ new Set([
|
|
11238
|
+
...externalDependencies ?? dependencies,
|
|
11239
|
+
...peerDependencies
|
|
11240
|
+
]);
|
|
11355
11241
|
console.log(
|
|
11356
11242
|
"Building",
|
|
11357
11243
|
import_picocolors.default.cyan(packageJson.name),
|
|
@@ -11367,13 +11253,6 @@ var defaultPlugins = [indexHtmlPlugin(), packageJsonPlugin(), vuePlugin()];
|
|
|
11367
11253
|
var defaultConfig = {
|
|
11368
11254
|
fk: {},
|
|
11369
11255
|
plugins: defaultPlugins,
|
|
11370
|
-
resolve: {
|
|
11371
|
-
alias: Object.fromEntries(
|
|
11372
|
-
internalDependencies.map((it) => {
|
|
11373
|
-
return [it.name, it.srcPath];
|
|
11374
|
-
})
|
|
11375
|
-
)
|
|
11376
|
-
},
|
|
11377
11256
|
optimizeDeps: {
|
|
11378
11257
|
/**
|
|
11379
11258
|
* Vite treats monorepo packages as sourcecode and performs no prebundling by default.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@forsakringskassan/vite-lib-config",
|
|
3
|
-
"version": "2.0
|
|
3
|
+
"version": "2.1.0",
|
|
4
4
|
"description": "Försäkringskassan toolchain to build libraries with Vite",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"vite"
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"dist"
|
|
43
43
|
],
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"@microsoft/api-extractor": "7.47.
|
|
45
|
+
"@microsoft/api-extractor": "7.47.11",
|
|
46
46
|
"@vue/babel-preset-app": "5.0.8"
|
|
47
47
|
},
|
|
48
48
|
"peerDependencies": {
|