@contrast/esm-hooks 1.23.0 → 2.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 +1 -1
- package/README.md +742 -21
- package/lib/get-file-type.mjs +100 -14
- package/lib/index.mjs +109 -63
- package/lib/redirects/builtin/child_process.mjs +31 -0
- package/lib/redirects/builtin/fs/promises.mjs +53 -0
- package/lib/redirects/builtin/fs.mjs +126 -0
- package/lib/redirects/builtin/http.mjs +39 -0
- package/lib/redirects/builtin/http2.mjs +33 -0
- package/lib/redirects/builtin/https.mjs +29 -0
- package/lib/redirects/builtin/path/posix.mjs +38 -0
- package/lib/redirects/builtin/path/win32.mjs +38 -0
- package/lib/redirects/builtin/path.mjs +38 -0
- package/lib/redirects/builtin/querystring.mjs +29 -0
- package/lib/redirects/builtin/util/types.mjs +64 -0
- package/lib/redirects/builtin/util.mjs +66 -0
- package/lib/redirects/builtin/vm.mjs +31 -0
- package/lib/redirects/cjs/README.md +1 -0
- package/package.json +4 -4
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright: 2024 Contrast Security, Inc
|
|
3
|
+
* Contact: support@contrastsecurity.com
|
|
4
|
+
* License: Commercial
|
|
5
|
+
|
|
6
|
+
* NOTICE: This Software and the patented inventions embodied within may only be
|
|
7
|
+
* used as part of Contrast Security’s commercial offerings. Even though it is
|
|
8
|
+
* made available through public repositories, use of this Software is subject to
|
|
9
|
+
* the applicable End User Licensing Agreement found at
|
|
10
|
+
* https://www.contrastsecurity.com/enduser-terms-0317a or as otherwise agreed
|
|
11
|
+
* between Contrast Security and the End User. The Software may not be reverse
|
|
12
|
+
* engineered, modified, repackaged, sold, redistributed or otherwise used in a
|
|
13
|
+
* way not consistent with the End User License Agreement.
|
|
14
|
+
*/
|
|
15
|
+
import { createRequire } from 'node:module';
|
|
16
|
+
const require = createRequire(import.meta.url);
|
|
17
|
+
const path = require('node:path/win32');
|
|
18
|
+
|
|
19
|
+
export default path;
|
|
20
|
+
|
|
21
|
+
export const {
|
|
22
|
+
resolve,
|
|
23
|
+
normalize,
|
|
24
|
+
isAbsolute,
|
|
25
|
+
join,
|
|
26
|
+
relative,
|
|
27
|
+
toNamespacedPath,
|
|
28
|
+
dirname,
|
|
29
|
+
basename,
|
|
30
|
+
extname,
|
|
31
|
+
format,
|
|
32
|
+
parse,
|
|
33
|
+
sep,
|
|
34
|
+
delimiter,
|
|
35
|
+
win32,
|
|
36
|
+
posix,
|
|
37
|
+
_makeLong,
|
|
38
|
+
} = path;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright: 2024 Contrast Security, Inc
|
|
3
|
+
* Contact: support@contrastsecurity.com
|
|
4
|
+
* License: Commercial
|
|
5
|
+
|
|
6
|
+
* NOTICE: This Software and the patented inventions embodied within may only be
|
|
7
|
+
* used as part of Contrast Security’s commercial offerings. Even though it is
|
|
8
|
+
* made available through public repositories, use of this Software is subject to
|
|
9
|
+
* the applicable End User Licensing Agreement found at
|
|
10
|
+
* https://www.contrastsecurity.com/enduser-terms-0317a or as otherwise agreed
|
|
11
|
+
* between Contrast Security and the End User. The Software may not be reverse
|
|
12
|
+
* engineered, modified, repackaged, sold, redistributed or otherwise used in a
|
|
13
|
+
* way not consistent with the End User License Agreement.
|
|
14
|
+
*/
|
|
15
|
+
import { createRequire } from 'node:module';
|
|
16
|
+
const require = createRequire(import.meta.url);
|
|
17
|
+
const path = require('node:path');
|
|
18
|
+
|
|
19
|
+
export default path;
|
|
20
|
+
|
|
21
|
+
export const {
|
|
22
|
+
resolve,
|
|
23
|
+
normalize,
|
|
24
|
+
isAbsolute,
|
|
25
|
+
join,
|
|
26
|
+
relative,
|
|
27
|
+
toNamespacedPath,
|
|
28
|
+
dirname,
|
|
29
|
+
basename,
|
|
30
|
+
extname,
|
|
31
|
+
format,
|
|
32
|
+
parse,
|
|
33
|
+
sep,
|
|
34
|
+
delimiter,
|
|
35
|
+
win32,
|
|
36
|
+
posix,
|
|
37
|
+
_makeLong,
|
|
38
|
+
} = path;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright: 2024 Contrast Security, Inc
|
|
3
|
+
* Contact: support@contrastsecurity.com
|
|
4
|
+
* License: Commercial
|
|
5
|
+
|
|
6
|
+
* NOTICE: This Software and the patented inventions embodied within may only be
|
|
7
|
+
* used as part of Contrast Security’s commercial offerings. Even though it is
|
|
8
|
+
* made available through public repositories, use of this Software is subject to
|
|
9
|
+
* the applicable End User Licensing Agreement found at
|
|
10
|
+
* https://www.contrastsecurity.com/enduser-terms-0317a or as otherwise agreed
|
|
11
|
+
* between Contrast Security and the End User. The Software may not be reverse
|
|
12
|
+
* engineered, modified, repackaged, sold, redistributed or otherwise used in a
|
|
13
|
+
* way not consistent with the End User License Agreement.
|
|
14
|
+
*/
|
|
15
|
+
import { createRequire } from 'node:module';
|
|
16
|
+
const require = createRequire(import.meta.url);
|
|
17
|
+
const qs = require('node:querystring');
|
|
18
|
+
|
|
19
|
+
export default qs;
|
|
20
|
+
|
|
21
|
+
export const {
|
|
22
|
+
unescapeBuffer,
|
|
23
|
+
unescape,
|
|
24
|
+
escape,
|
|
25
|
+
stringify,
|
|
26
|
+
encode,
|
|
27
|
+
parse,
|
|
28
|
+
decode,
|
|
29
|
+
} = qs;
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright: 2024 Contrast Security, Inc
|
|
3
|
+
* Contact: support@contrastsecurity.com
|
|
4
|
+
* License: Commercial
|
|
5
|
+
|
|
6
|
+
* NOTICE: This Software and the patented inventions embodied within may only be
|
|
7
|
+
* used as part of Contrast Security’s commercial offerings. Even though it is
|
|
8
|
+
* made available through public repositories, use of this Software is subject to
|
|
9
|
+
* the applicable End User Licensing Agreement found at
|
|
10
|
+
* https://www.contrastsecurity.com/enduser-terms-0317a or as otherwise agreed
|
|
11
|
+
* between Contrast Security and the End User. The Software may not be reverse
|
|
12
|
+
* engineered, modified, repackaged, sold, redistributed or otherwise used in a
|
|
13
|
+
* way not consistent with the End User License Agreement.
|
|
14
|
+
*/
|
|
15
|
+
import { createRequire } from 'node:module';
|
|
16
|
+
const require = createRequire(import.meta.url);
|
|
17
|
+
const types = require('node:util/types');
|
|
18
|
+
|
|
19
|
+
export default types;
|
|
20
|
+
|
|
21
|
+
export const {
|
|
22
|
+
isExternal,
|
|
23
|
+
isDate,
|
|
24
|
+
isArgumentsObject,
|
|
25
|
+
isBigIntObject,
|
|
26
|
+
isBooleanObject,
|
|
27
|
+
isNumberObject,
|
|
28
|
+
isStringObject,
|
|
29
|
+
isSymbolObject,
|
|
30
|
+
isNativeError,
|
|
31
|
+
isRegExp,
|
|
32
|
+
isAsyncFunction,
|
|
33
|
+
isGeneratorFunction,
|
|
34
|
+
isGeneratorObject,
|
|
35
|
+
isPromise,
|
|
36
|
+
isMap,
|
|
37
|
+
isSet,
|
|
38
|
+
isMapIterator,
|
|
39
|
+
isSetIterator,
|
|
40
|
+
isWeakMap,
|
|
41
|
+
isWeakSet,
|
|
42
|
+
isArrayBuffer,
|
|
43
|
+
isDataView,
|
|
44
|
+
isSharedArrayBuffer,
|
|
45
|
+
isProxy,
|
|
46
|
+
isModuleNamespaceObject,
|
|
47
|
+
isAnyArrayBuffer,
|
|
48
|
+
isBoxedPrimitive,
|
|
49
|
+
isArrayBufferView,
|
|
50
|
+
isTypedArray,
|
|
51
|
+
isUint8Array,
|
|
52
|
+
isUint8ClampedArray,
|
|
53
|
+
isUint16Array,
|
|
54
|
+
isUint32Array,
|
|
55
|
+
isInt8Array,
|
|
56
|
+
isInt16Array,
|
|
57
|
+
isInt32Array,
|
|
58
|
+
isFloat32Array,
|
|
59
|
+
isFloat64Array,
|
|
60
|
+
isBigInt64Array,
|
|
61
|
+
isBigUint64Array,
|
|
62
|
+
isKeyObject,
|
|
63
|
+
isCryptoKey,
|
|
64
|
+
} = types;
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright: 2024 Contrast Security, Inc
|
|
3
|
+
* Contact: support@contrastsecurity.com
|
|
4
|
+
* License: Commercial
|
|
5
|
+
|
|
6
|
+
* NOTICE: This Software and the patented inventions embodied within may only be
|
|
7
|
+
* used as part of Contrast Security’s commercial offerings. Even though it is
|
|
8
|
+
* made available through public repositories, use of this Software is subject to
|
|
9
|
+
* the applicable End User Licensing Agreement found at
|
|
10
|
+
* https://www.contrastsecurity.com/enduser-terms-0317a or as otherwise agreed
|
|
11
|
+
* between Contrast Security and the End User. The Software may not be reverse
|
|
12
|
+
* engineered, modified, repackaged, sold, redistributed or otherwise used in a
|
|
13
|
+
* way not consistent with the End User License Agreement.
|
|
14
|
+
*/
|
|
15
|
+
import { createRequire } from 'node:module';
|
|
16
|
+
const require = createRequire(import.meta.url);
|
|
17
|
+
const util = require('node:util');
|
|
18
|
+
|
|
19
|
+
export default util;
|
|
20
|
+
|
|
21
|
+
export const {
|
|
22
|
+
_errnoException,
|
|
23
|
+
_exceptionWithHostPort,
|
|
24
|
+
_extend,
|
|
25
|
+
callbackify,
|
|
26
|
+
debug,
|
|
27
|
+
debuglog,
|
|
28
|
+
deprecate,
|
|
29
|
+
format,
|
|
30
|
+
formatWithOptions,
|
|
31
|
+
getSystemErrorMap,
|
|
32
|
+
getSystemErrorName,
|
|
33
|
+
inherits,
|
|
34
|
+
inspect,
|
|
35
|
+
isArray,
|
|
36
|
+
isBoolean,
|
|
37
|
+
isBuffer,
|
|
38
|
+
isDeepStrictEqual,
|
|
39
|
+
isNull,
|
|
40
|
+
isNullOrUndefined,
|
|
41
|
+
isNumber,
|
|
42
|
+
isString,
|
|
43
|
+
isSymbol,
|
|
44
|
+
isUndefined,
|
|
45
|
+
isRegExp,
|
|
46
|
+
isObject,
|
|
47
|
+
isDate,
|
|
48
|
+
isError,
|
|
49
|
+
isFunction,
|
|
50
|
+
isPrimitive,
|
|
51
|
+
log,
|
|
52
|
+
MIMEType,
|
|
53
|
+
MIMEParams,
|
|
54
|
+
parseArgs,
|
|
55
|
+
promisify,
|
|
56
|
+
stripVTControlCharacters,
|
|
57
|
+
toUSVString,
|
|
58
|
+
TextDecoder,
|
|
59
|
+
TextEncoder,
|
|
60
|
+
// the next three are getters. they don't appear to need special
|
|
61
|
+
// handling based on a simple test in the REPL, but be aware.
|
|
62
|
+
transferableAbortSignal,
|
|
63
|
+
transferableAbortController,
|
|
64
|
+
aborted,
|
|
65
|
+
types,
|
|
66
|
+
} = util;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright: 2024 Contrast Security, Inc
|
|
3
|
+
* Contact: support@contrastsecurity.com
|
|
4
|
+
* License: Commercial
|
|
5
|
+
|
|
6
|
+
* NOTICE: This Software and the patented inventions embodied within may only be
|
|
7
|
+
* used as part of Contrast Security’s commercial offerings. Even though it is
|
|
8
|
+
* made available through public repositories, use of this Software is subject to
|
|
9
|
+
* the applicable End User Licensing Agreement found at
|
|
10
|
+
* https://www.contrastsecurity.com/enduser-terms-0317a or as otherwise agreed
|
|
11
|
+
* between Contrast Security and the End User. The Software may not be reverse
|
|
12
|
+
* engineered, modified, repackaged, sold, redistributed or otherwise used in a
|
|
13
|
+
* way not consistent with the End User License Agreement.
|
|
14
|
+
*/
|
|
15
|
+
import { createRequire } from 'node:module';
|
|
16
|
+
const require = createRequire(import.meta.url);
|
|
17
|
+
const vm = require('node:vm');
|
|
18
|
+
|
|
19
|
+
export default vm;
|
|
20
|
+
|
|
21
|
+
export const {
|
|
22
|
+
Script,
|
|
23
|
+
createContext,
|
|
24
|
+
createScript,
|
|
25
|
+
runInContext,
|
|
26
|
+
runInNewContext,
|
|
27
|
+
runInThisContext,
|
|
28
|
+
isContext,
|
|
29
|
+
compileFunction,
|
|
30
|
+
measureMemory,
|
|
31
|
+
} = vm;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
This directory is not currently being used.
|
package/package.json
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contrast/esm-hooks",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Support for loading and instrumenting ECMAScript modules",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE",
|
|
7
7
|
"author": "Contrast Security <nodejs@contrastsecurity.com> (https://www.contrastsecurity.com)",
|
|
8
8
|
"files": [
|
|
9
|
-
"lib/"
|
|
9
|
+
"lib/",
|
|
10
|
+
"!lib/redirects/esm/node-fetch.mjs-tester"
|
|
10
11
|
],
|
|
11
12
|
"main": "lib/index.mjs",
|
|
12
13
|
"types": "lib/index.d.ts",
|
|
@@ -18,7 +19,6 @@
|
|
|
18
19
|
"test": "../scripts/test.sh"
|
|
19
20
|
},
|
|
20
21
|
"dependencies": {
|
|
21
|
-
"@contrast/core": "1.27.
|
|
22
|
-
"parent-package-json": "^2.0.1"
|
|
22
|
+
"@contrast/core": "1.27.1"
|
|
23
23
|
}
|
|
24
24
|
}
|