@rollup/wasm-node 4.0.0-12
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 +666 -0
- package/dist/bin/rollup +1716 -0
- package/dist/es/getLogFilter.js +64 -0
- package/dist/es/package.json +1 -0
- package/dist/es/rollup.js +18 -0
- package/dist/es/shared/node-entry.js +28055 -0
- package/dist/es/shared/watch.js +4858 -0
- package/dist/getLogFilter.d.ts +5 -0
- package/dist/getLogFilter.js +69 -0
- package/dist/loadConfigFile.d.ts +20 -0
- package/dist/loadConfigFile.js +30 -0
- package/dist/native.js +3 -0
- package/dist/rollup.d.ts +1009 -0
- package/dist/rollup.js +32 -0
- package/dist/shared/fsevents-importer.js +37 -0
- package/dist/shared/index.js +4571 -0
- package/dist/shared/loadConfigFile.js +546 -0
- package/dist/shared/rollup.js +28133 -0
- package/dist/shared/watch-cli.js +562 -0
- package/dist/shared/watch-proxy.js +87 -0
- package/dist/shared/watch.js +317 -0
- package/dist/wasm-node/bindings_wasm.js +509 -0
- package/dist/wasm-node/bindings_wasm_bg.wasm +0 -0
- package/package.json +155 -0
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/*
|
|
2
|
+
@license
|
|
3
|
+
Rollup.js v4.0.0-12
|
|
4
|
+
Wed, 23 Aug 2023 14:39:48 GMT - commit b6eec18d711348e3b177ef58dc2836cdf75e0432
|
|
5
|
+
|
|
6
|
+
https://github.com/rollup/rollup
|
|
7
|
+
|
|
8
|
+
Released under the MIT License.
|
|
9
|
+
*/
|
|
10
|
+
'use strict';
|
|
11
|
+
|
|
12
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
13
|
+
|
|
14
|
+
const getLogFilter = filters => {
|
|
15
|
+
if (filters.length === 0)
|
|
16
|
+
return () => true;
|
|
17
|
+
const normalizedFilters = filters.map(filter => filter.split('&').map(subFilter => {
|
|
18
|
+
const inverted = subFilter.startsWith('!');
|
|
19
|
+
if (inverted)
|
|
20
|
+
subFilter = subFilter.slice(1);
|
|
21
|
+
const [key, ...value] = subFilter.split(':');
|
|
22
|
+
return { inverted, key: key.split('.'), parts: value.join(':').split('*') };
|
|
23
|
+
}));
|
|
24
|
+
return (log) => {
|
|
25
|
+
nextIntersectedFilter: for (const intersectedFilters of normalizedFilters) {
|
|
26
|
+
for (const { inverted, key, parts } of intersectedFilters) {
|
|
27
|
+
const isFilterSatisfied = testFilter(log, key, parts);
|
|
28
|
+
if (inverted ? isFilterSatisfied : !isFilterSatisfied) {
|
|
29
|
+
continue nextIntersectedFilter;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
return true;
|
|
33
|
+
}
|
|
34
|
+
return false;
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
const testFilter = (log, key, parts) => {
|
|
38
|
+
let rawValue = log;
|
|
39
|
+
for (let index = 0; index < key.length; index++) {
|
|
40
|
+
if (!rawValue) {
|
|
41
|
+
return false;
|
|
42
|
+
}
|
|
43
|
+
const part = key[index];
|
|
44
|
+
if (!(part in rawValue)) {
|
|
45
|
+
return false;
|
|
46
|
+
}
|
|
47
|
+
rawValue = rawValue[part];
|
|
48
|
+
}
|
|
49
|
+
let value = typeof rawValue === 'object' ? JSON.stringify(rawValue) : String(rawValue);
|
|
50
|
+
if (parts.length === 1) {
|
|
51
|
+
return value === parts[0];
|
|
52
|
+
}
|
|
53
|
+
if (!value.startsWith(parts[0])) {
|
|
54
|
+
return false;
|
|
55
|
+
}
|
|
56
|
+
const lastPartIndex = parts.length - 1;
|
|
57
|
+
for (let index = 1; index < lastPartIndex; index++) {
|
|
58
|
+
const part = parts[index];
|
|
59
|
+
const position = value.indexOf(part);
|
|
60
|
+
if (position === -1) {
|
|
61
|
+
return false;
|
|
62
|
+
}
|
|
63
|
+
value = value.slice(position + part.length);
|
|
64
|
+
}
|
|
65
|
+
return value.endsWith(parts[lastPartIndex]);
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
exports.getLogFilter = getLogFilter;
|
|
69
|
+
//# sourceMappingURL=getLogFilter.js.map
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { LogHandler, MergedRollupOptions, RollupLog } from './rollup';
|
|
2
|
+
|
|
3
|
+
export interface BatchWarnings {
|
|
4
|
+
add: (warning: RollupLog) => void;
|
|
5
|
+
readonly count: number;
|
|
6
|
+
flush: () => void;
|
|
7
|
+
log: LogHandler;
|
|
8
|
+
readonly warningOccurred: boolean;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export type LoadConfigFile = typeof loadConfigFile;
|
|
12
|
+
|
|
13
|
+
export function loadConfigFile(
|
|
14
|
+
fileName: string,
|
|
15
|
+
commandOptions: any,
|
|
16
|
+
watchMode?: boolean
|
|
17
|
+
): Promise<{
|
|
18
|
+
options: MergedRollupOptions[];
|
|
19
|
+
warnings: BatchWarnings;
|
|
20
|
+
}>;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/*
|
|
2
|
+
@license
|
|
3
|
+
Rollup.js v4.0.0-12
|
|
4
|
+
Wed, 23 Aug 2023 14:39:48 GMT - commit b6eec18d711348e3b177ef58dc2836cdf75e0432
|
|
5
|
+
|
|
6
|
+
https://github.com/rollup/rollup
|
|
7
|
+
|
|
8
|
+
Released under the MIT License.
|
|
9
|
+
*/
|
|
10
|
+
'use strict';
|
|
11
|
+
|
|
12
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
13
|
+
|
|
14
|
+
require('node:fs/promises');
|
|
15
|
+
require('node:path');
|
|
16
|
+
require('node:process');
|
|
17
|
+
require('node:url');
|
|
18
|
+
require('./shared/rollup.js');
|
|
19
|
+
const loadConfigFile_js = require('./shared/loadConfigFile.js');
|
|
20
|
+
require('tty');
|
|
21
|
+
require('path');
|
|
22
|
+
require('node:perf_hooks');
|
|
23
|
+
require('node:crypto');
|
|
24
|
+
require('./native.js');
|
|
25
|
+
require('./getLogFilter.js');
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
exports.loadConfigFile = loadConfigFile_js.loadConfigFile;
|
|
30
|
+
//# sourceMappingURL=loadConfigFile.js.map
|
package/dist/native.js
ADDED