@ttsc/strip 0.16.1 → 0.16.3
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/package.json +1 -1
- package/src/index.cjs +3 -1
- package/src/index.d.ts +13 -3
package/package.json
CHANGED
package/src/index.cjs
CHANGED
|
@@ -30,7 +30,9 @@ module.exports = function createTtscStrip(context) {
|
|
|
30
30
|
}
|
|
31
31
|
return {
|
|
32
32
|
name: "@ttsc/strip",
|
|
33
|
-
|
|
33
|
+
// `context.dirname` is this descriptor's own directory in every load mode —
|
|
34
|
+
// the ESM-safe replacement for `__dirname`.
|
|
35
|
+
source: path.resolve(context.dirname, "..", "driver"),
|
|
34
36
|
stage: "transform",
|
|
35
37
|
};
|
|
36
38
|
};
|
package/src/index.d.ts
CHANGED
|
@@ -1,12 +1,22 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Plugin descriptor factory consumed by ttsc's package discovery.
|
|
3
3
|
*
|
|
4
|
-
* `@ttsc/strip` is configured through a `strip.config.*` file,
|
|
5
|
-
*
|
|
4
|
+
* `@ttsc/strip` is configured through a `strip.config.*` file, not through
|
|
5
|
+
* inline plugin options. The factory reads only `context.dirname` to locate its
|
|
6
|
+
* own Go `source` (the load-mode-independent replacement for `__dirname`) and
|
|
7
|
+
* returns the native descriptor.
|
|
6
8
|
*
|
|
7
9
|
* @internal
|
|
8
10
|
*/
|
|
9
|
-
declare function createTtscStrip(context:
|
|
11
|
+
declare function createTtscStrip(context: {
|
|
12
|
+
/**
|
|
13
|
+
* Absolute directory of this descriptor module; the Go `source` resolves from
|
|
14
|
+
* it.
|
|
15
|
+
*/
|
|
16
|
+
dirname: string;
|
|
17
|
+
/** Original tsconfig plugin entry, validated for unsupported keys. */
|
|
18
|
+
plugin?: Record<string, unknown>;
|
|
19
|
+
}): {
|
|
10
20
|
name: string;
|
|
11
21
|
source: string;
|
|
12
22
|
stage: "transform";
|