rollup 3.26.3 → 4.0.0-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.
- package/LICENSE.md +0 -29
- package/package.json +73 -29
- package/dist/bin/rollup +0 -1715
- package/dist/es/getLogFilter.js +0 -64
- package/dist/es/package.json +0 -1
- package/dist/es/rollup.js +0 -17
- package/dist/es/shared/node-entry.js +0 -27056
- package/dist/es/shared/watch.js +0 -4857
- package/dist/getLogFilter.d.ts +0 -5
- package/dist/getLogFilter.js +0 -69
- package/dist/loadConfigFile.d.ts +0 -20
- package/dist/loadConfigFile.js +0 -29
- package/dist/rollup.d.ts +0 -1008
- package/dist/rollup.js +0 -31
- package/dist/shared/fsevents-importer.js +0 -37
- package/dist/shared/index.js +0 -4571
- package/dist/shared/loadConfigFile.js +0 -546
- package/dist/shared/rollup.js +0 -27134
- package/dist/shared/watch-cli.js +0 -554
- package/dist/shared/watch-proxy.js +0 -87
- package/dist/shared/watch.js +0 -316
package/dist/es/getLogFilter.js
DELETED
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
@license
|
|
3
|
-
Rollup.js v3.26.3
|
|
4
|
-
Mon, 17 Jul 2023 10:32:34 GMT - commit ce6f05843f6af9545fb2321c7ec99387ac1e2df0
|
|
5
|
-
|
|
6
|
-
https://github.com/rollup/rollup
|
|
7
|
-
|
|
8
|
-
Released under the MIT License.
|
|
9
|
-
*/
|
|
10
|
-
const getLogFilter = filters => {
|
|
11
|
-
if (filters.length === 0)
|
|
12
|
-
return () => true;
|
|
13
|
-
const normalizedFilters = filters.map(filter => filter.split('&').map(subFilter => {
|
|
14
|
-
const inverted = subFilter.startsWith('!');
|
|
15
|
-
if (inverted)
|
|
16
|
-
subFilter = subFilter.slice(1);
|
|
17
|
-
const [key, ...value] = subFilter.split(':');
|
|
18
|
-
return { inverted, key: key.split('.'), parts: value.join(':').split('*') };
|
|
19
|
-
}));
|
|
20
|
-
return (log) => {
|
|
21
|
-
nextIntersectedFilter: for (const intersectedFilters of normalizedFilters) {
|
|
22
|
-
for (const { inverted, key, parts } of intersectedFilters) {
|
|
23
|
-
const isFilterSatisfied = testFilter(log, key, parts);
|
|
24
|
-
if (inverted ? isFilterSatisfied : !isFilterSatisfied) {
|
|
25
|
-
continue nextIntersectedFilter;
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
return true;
|
|
29
|
-
}
|
|
30
|
-
return false;
|
|
31
|
-
};
|
|
32
|
-
};
|
|
33
|
-
const testFilter = (log, key, parts) => {
|
|
34
|
-
let rawValue = log;
|
|
35
|
-
for (let index = 0; index < key.length; index++) {
|
|
36
|
-
if (!rawValue) {
|
|
37
|
-
return false;
|
|
38
|
-
}
|
|
39
|
-
const part = key[index];
|
|
40
|
-
if (!(part in rawValue)) {
|
|
41
|
-
return false;
|
|
42
|
-
}
|
|
43
|
-
rawValue = rawValue[part];
|
|
44
|
-
}
|
|
45
|
-
let value = typeof rawValue === 'object' ? JSON.stringify(rawValue) : String(rawValue);
|
|
46
|
-
if (parts.length === 1) {
|
|
47
|
-
return value === parts[0];
|
|
48
|
-
}
|
|
49
|
-
if (!value.startsWith(parts[0])) {
|
|
50
|
-
return false;
|
|
51
|
-
}
|
|
52
|
-
const lastPartIndex = parts.length - 1;
|
|
53
|
-
for (let index = 1; index < lastPartIndex; index++) {
|
|
54
|
-
const part = parts[index];
|
|
55
|
-
const position = value.indexOf(part);
|
|
56
|
-
if (position === -1) {
|
|
57
|
-
return false;
|
|
58
|
-
}
|
|
59
|
-
value = value.slice(position + part.length);
|
|
60
|
-
}
|
|
61
|
-
return value.endsWith(parts[lastPartIndex]);
|
|
62
|
-
};
|
|
63
|
-
|
|
64
|
-
export { getLogFilter };
|
package/dist/es/package.json
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"type":"module"}
|
package/dist/es/rollup.js
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
@license
|
|
3
|
-
Rollup.js v3.26.3
|
|
4
|
-
Mon, 17 Jul 2023 10:32:34 GMT - commit ce6f05843f6af9545fb2321c7ec99387ac1e2df0
|
|
5
|
-
|
|
6
|
-
https://github.com/rollup/rollup
|
|
7
|
-
|
|
8
|
-
Released under the MIT License.
|
|
9
|
-
*/
|
|
10
|
-
export { version as VERSION, defineConfig, rollup, watch } from './shared/node-entry.js';
|
|
11
|
-
import 'node:path';
|
|
12
|
-
import 'path';
|
|
13
|
-
import 'node:process';
|
|
14
|
-
import 'node:perf_hooks';
|
|
15
|
-
import 'node:crypto';
|
|
16
|
-
import 'node:fs/promises';
|
|
17
|
-
import 'tty';
|