@ttsc/banner 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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ttsc/banner",
3
- "version": "0.6.0-dev.20250501-2",
3
+ "version": "0.7.0",
4
4
  "description": "First-party ttsc plugin that prepends a banner comment to emitted files.",
5
5
  "main": "src/index.cjs",
6
6
  "exports": {
package/plugin/banner.go CHANGED
@@ -9,12 +9,10 @@ import (
9
9
  "strings"
10
10
  )
11
11
 
12
- const modeBanner = "ttsc-banner"
13
-
14
12
  type pluginEntry struct {
15
13
  Config map[string]any `json:"config"`
16
- Mode string `json:"mode"`
17
14
  Name string `json:"name"`
15
+ Stage string `json:"stage"`
18
16
  }
19
17
 
20
18
  func RunOutput(args []string) int {
@@ -25,7 +23,6 @@ func RunOutput(args []string) int {
25
23
  _ = fs.String("cwd", "", "project directory")
26
24
  _ = fs.String("outDir", "", "emit directory override")
27
25
  pluginsJSON := fs.String("plugins-json", "", "ttsc plugin manifest JSON")
28
- _ = fs.String("rewrite-mode", modeBanner, "native mode")
29
26
  _ = fs.String("tsconfig", "tsconfig.json", "project tsconfig")
30
27
  if err := fs.Parse(args); err != nil {
31
28
  return 2
@@ -102,7 +99,7 @@ func findConfig(pluginsJSON string) (map[string]any, error) {
102
99
  return nil, fmt.Errorf("@ttsc/banner: invalid --plugins-json: %w", err)
103
100
  }
104
101
  for _, entry := range entries {
105
- if entry.Mode == modeBanner || entry.Name == "@ttsc/banner" {
102
+ if entry.Name == "@ttsc/banner" {
106
103
  if entry.Config == nil {
107
104
  return map[string]any{}, nil
108
105
  }
package/src/index.cjs CHANGED
@@ -6,14 +6,7 @@ const path = require("node:path");
6
6
  module.exports = function createTtscBanner() {
7
7
  return {
8
8
  name: "@ttsc/banner",
9
- native: {
10
- mode: "ttsc-banner",
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
  };