import-in-the-middle 1.4.1 → 1.4.2
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/hook.js +2 -2
- package/package.json +1 -1
- package/test/low-level/sanitized-url.mjs +11 -0
package/hook.js
CHANGED
|
@@ -122,7 +122,7 @@ function createHook (meta) {
|
|
|
122
122
|
return {
|
|
123
123
|
source: `
|
|
124
124
|
import { register } from '${iitmURL}'
|
|
125
|
-
import * as namespace from
|
|
125
|
+
import * as namespace from ${JSON.stringify(url)}
|
|
126
126
|
const set = {}
|
|
127
127
|
${exportNames.map((n) => `
|
|
128
128
|
let $${n} = namespace.${n}
|
|
@@ -132,7 +132,7 @@ set.${n} = (v) => {
|
|
|
132
132
|
return true
|
|
133
133
|
}
|
|
134
134
|
`).join('\n')}
|
|
135
|
-
register(
|
|
135
|
+
register(${JSON.stringify(realUrl)}, namespace, set, ${JSON.stringify(specifiers.get(realUrl))})
|
|
136
136
|
`
|
|
137
137
|
}
|
|
138
138
|
}
|
package/package.json
CHANGED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// Unless explicitly stated otherwise all files in this repository are licensed under the Apache 2.0 License.
|
|
2
|
+
//
|
|
3
|
+
// This product includes software developed at Datadog (https://www.datadoghq.com/). Copyright 2021 Datadog, Inc.
|
|
4
|
+
|
|
5
|
+
import { addHook } from '../../index.js'
|
|
6
|
+
|
|
7
|
+
addHook(() => {})
|
|
8
|
+
|
|
9
|
+
;(async () => {
|
|
10
|
+
await import("../fixtures/something.mjs#*/'/*';eval('process.exit\x281\x29\x0A')")
|
|
11
|
+
})()
|