@ttsc/paths 0.6.0-dev.20250501-2 → 0.7.0
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/plugin/paths.go +2 -5
- package/src/index.cjs +2 -9
package/package.json
CHANGED
package/plugin/paths.go
CHANGED
|
@@ -22,12 +22,10 @@ import (
|
|
|
22
22
|
"github.com/microsoft/typescript-go/shim/vfs/osvfs"
|
|
23
23
|
)
|
|
24
24
|
|
|
25
|
-
const modePaths = "ttsc-paths"
|
|
26
|
-
|
|
27
25
|
type pluginEntry struct {
|
|
28
26
|
Config map[string]any `json:"config"`
|
|
29
|
-
Mode string `json:"mode"`
|
|
30
27
|
Name string `json:"name"`
|
|
28
|
+
Stage string `json:"stage"`
|
|
31
29
|
}
|
|
32
30
|
|
|
33
31
|
type program struct {
|
|
@@ -63,7 +61,6 @@ func RunOutput(args []string) int {
|
|
|
63
61
|
cwd := fs.String("cwd", "", "project directory")
|
|
64
62
|
outDir := fs.String("outDir", "", "emit directory override")
|
|
65
63
|
pluginsJSON := fs.String("plugins-json", "", "ttsc plugin manifest JSON")
|
|
66
|
-
_ = fs.String("rewrite-mode", modePaths, "native mode")
|
|
67
64
|
tsconfig := fs.String("tsconfig", "tsconfig.json", "project tsconfig")
|
|
68
65
|
if err := fs.Parse(args); err != nil {
|
|
69
66
|
return 2
|
|
@@ -360,7 +357,7 @@ func requireConfig(pluginsJSON string) error {
|
|
|
360
357
|
return fmt.Errorf("@ttsc/paths: invalid --plugins-json: %w", err)
|
|
361
358
|
}
|
|
362
359
|
for _, entry := range entries {
|
|
363
|
-
if entry.
|
|
360
|
+
if entry.Name == "@ttsc/paths" {
|
|
364
361
|
return nil
|
|
365
362
|
}
|
|
366
363
|
}
|
package/src/index.cjs
CHANGED
|
@@ -6,14 +6,7 @@ const path = require("node:path");
|
|
|
6
6
|
module.exports = function createTtscPaths() {
|
|
7
7
|
return {
|
|
8
8
|
name: "@ttsc/paths",
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
source: {
|
|
12
|
-
dir: path.resolve(__dirname, ".."),
|
|
13
|
-
entry: "./plugin",
|
|
14
|
-
},
|
|
15
|
-
contractVersion: 1,
|
|
16
|
-
capabilities: ["output"],
|
|
17
|
-
},
|
|
9
|
+
source: path.resolve(__dirname, "..", "plugin"),
|
|
10
|
+
stage: "output",
|
|
18
11
|
};
|
|
19
12
|
};
|