@pippit-dev/cli 0.0.28 → 0.0.29
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/checksums.txt +6 -6
- package/cmd/short_drama/short_drama.go +2 -2
- package/cmd/update/update.go +0 -2
- package/cmd/update/update_test.go +0 -8
- package/internal/common/client.go +0 -2
- package/internal/{short_drama → common}/get_thread.go +3 -4
- package/package.json +1 -1
- package/scripts/telemetry.js +0 -2
package/checksums.txt
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
c444ddc4fab86a19832f60148c8ce6d51e269796fa15f72a54465b7d763ee70e pippit-tool-cli-0.0.29-darwin-amd64.tar.gz
|
|
2
|
+
64c24941c80b7ce592ca0875fae671fa704e0798416d1f13a2168cd6d37b28b2 pippit-tool-cli-0.0.29-darwin-arm64.tar.gz
|
|
3
|
+
551e089b4a533a9ca6fcdb8c3978b48442a2b16ed4d91ed10e789454910f402d pippit-tool-cli-0.0.29-linux-amd64.tar.gz
|
|
4
|
+
b968b76e2486a04b82bf4fed90859428e076f827a61f692522cf6023772830a6 pippit-tool-cli-0.0.29-linux-arm64.tar.gz
|
|
5
|
+
661f9bd514d04ff1a38143f2b0196fa5dffbd7a8634fac27072d0f9ce71026c1 pippit-tool-cli-0.0.29-windows-amd64.zip
|
|
6
|
+
26bc973e153cf781244cc1cc6175af2d6650563083e9ac1a2061f28932ff6560 pippit-tool-cli-0.0.29-windows-arm64.zip
|
|
@@ -143,7 +143,7 @@ func newShortDramaDownloadResultCommand(stdout, stderr io.Writer, runner *common
|
|
|
143
143
|
}
|
|
144
144
|
|
|
145
145
|
func newShortDramaGetThreadCommand(stdout, stderr io.Writer, runner *common.Runner) *cobra.Command {
|
|
146
|
-
var opts
|
|
146
|
+
var opts common.GetThreadOptions
|
|
147
147
|
|
|
148
148
|
cmd := &cobra.Command{
|
|
149
149
|
Use: "+get-thread",
|
|
@@ -161,7 +161,7 @@ func newShortDramaGetThreadCommand(stdout, stderr io.Writer, runner *common.Runn
|
|
|
161
161
|
}
|
|
162
162
|
opts.RunID = strings.TrimSpace(opts.RunID)
|
|
163
163
|
|
|
164
|
-
result, err :=
|
|
164
|
+
result, err := common.GetThread(cmd.Context(), &opts, runner)
|
|
165
165
|
if err != nil {
|
|
166
166
|
return err
|
|
167
167
|
}
|
package/cmd/update/update.go
CHANGED
|
@@ -180,8 +180,6 @@ func reportSkillTelemetry(payload telemetryPayload) error {
|
|
|
180
180
|
}
|
|
181
181
|
req.Header.Set("Content-Type", "application/json")
|
|
182
182
|
req.Header.Set("Authorization", telemetryAuthHeader)
|
|
183
|
-
req.Header.Set("x-use-ppe", "1")
|
|
184
|
-
req.Header.Set("x-tt-env", "ppe_harness_novel_v2")
|
|
185
183
|
|
|
186
184
|
resp, err := telemetryHTTPClient.Do(req)
|
|
187
185
|
if err != nil {
|
|
@@ -77,14 +77,12 @@ func TestCleanupLegacyGlobalSkills(t *testing.T) {
|
|
|
77
77
|
|
|
78
78
|
func TestReportSkillTelemetry(t *testing.T) {
|
|
79
79
|
var gotAuth string
|
|
80
|
-
var gotHeaders http.Header
|
|
81
80
|
var gotPayload telemetryPayload
|
|
82
81
|
server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
|
83
82
|
if r.URL.Path != telemetryPath {
|
|
84
83
|
t.Fatalf("path = %q, want %q", r.URL.Path, telemetryPath)
|
|
85
84
|
}
|
|
86
85
|
gotAuth = r.Header.Get("Authorization")
|
|
87
|
-
gotHeaders = r.Header.Clone()
|
|
88
86
|
if err := json.NewDecoder(r.Body).Decode(&gotPayload); err != nil {
|
|
89
87
|
t.Fatalf("decode request body: %v", err)
|
|
90
88
|
}
|
|
@@ -107,12 +105,6 @@ func TestReportSkillTelemetry(t *testing.T) {
|
|
|
107
105
|
if gotAuth != telemetryAuthHeader {
|
|
108
106
|
t.Fatalf("Authorization = %q, want %q", gotAuth, telemetryAuthHeader)
|
|
109
107
|
}
|
|
110
|
-
if got := gotHeaders.Get("x-use-ppe"); got != "1" {
|
|
111
|
-
t.Fatalf("x-use-ppe = %q, want 1", got)
|
|
112
|
-
}
|
|
113
|
-
if got := gotHeaders.Get("x-tt-env"); got != "ppe_harness_novel_v2" {
|
|
114
|
-
t.Fatalf("x-tt-env = %q, want ppe_harness_novel_v2", got)
|
|
115
|
-
}
|
|
116
108
|
if gotPayload.Event != "update" || gotPayload.SkillName != "xyq-skill" || gotPayload.Source != "cli_update" {
|
|
117
109
|
t.Fatalf("payload = %#v", gotPayload)
|
|
118
110
|
}
|
|
@@ -202,8 +202,6 @@ func (c *httpClient) injectHeaders(req *http.Request) {
|
|
|
202
202
|
}
|
|
203
203
|
}
|
|
204
204
|
req.Header.Set("User-Agent", "Pippit-CLI/1.0")
|
|
205
|
-
req.Header.Set("x-use-ppe", "1")
|
|
206
|
-
req.Header.Set("x-tt-env", "ppe_harness_novel_v2")
|
|
207
205
|
}
|
|
208
206
|
|
|
209
207
|
func (c *httpClient) do(req *http.Request, out any) error {
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
package
|
|
1
|
+
package common
|
|
2
2
|
|
|
3
3
|
import (
|
|
4
4
|
"context"
|
|
5
5
|
"fmt"
|
|
6
6
|
|
|
7
|
-
"github.com/Pippit-dev/pippit-cli/internal/common"
|
|
8
7
|
"github.com/Pippit-dev/pippit-cli/internal/config"
|
|
9
8
|
)
|
|
10
9
|
|
|
@@ -29,7 +28,7 @@ type getThreadResponse struct {
|
|
|
29
28
|
} `json:"data"`
|
|
30
29
|
}
|
|
31
30
|
|
|
32
|
-
func GetThread(ctx context.Context, opts *GetThreadOptions, runner *
|
|
31
|
+
func GetThread(ctx context.Context, opts *GetThreadOptions, runner *Runner) (*GetThreadResult, error) {
|
|
33
32
|
if runner == nil || runner.Client == nil {
|
|
34
33
|
return nil, fmt.Errorf("get_thread runner client is required")
|
|
35
34
|
}
|
|
@@ -61,7 +60,7 @@ func GetThread(ctx context.Context, opts *GetThreadOptions, runner *common.Runne
|
|
|
61
60
|
}, nil
|
|
62
61
|
}
|
|
63
62
|
|
|
64
|
-
func getThreadPath(runner *
|
|
63
|
+
func getThreadPath(runner *Runner) string {
|
|
65
64
|
if runner != nil && runner.Config != nil && runner.Config.Paths != nil && runner.Config.Paths.GetThread != "" {
|
|
66
65
|
return runner.Config.Paths.GetThread
|
|
67
66
|
}
|
package/package.json
CHANGED
package/scripts/telemetry.js
CHANGED