@50arms/plugin-sdk 0.2.73 → 0.2.75
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/dist/card-kit.d.ts +116 -87
- package/dist/cli.js +27 -9
- package/dist/publish.js +27 -9
- package/package.json +1 -1
package/dist/card-kit.d.ts
CHANGED
|
@@ -108,7 +108,7 @@ declare module "@danxbot/card-kit@1" {
|
|
|
108
108
|
}
|
|
109
109
|
type BehaviorSignoffStatus = "compliant" | "incompliant" | "rejected" | "not_applicable";
|
|
110
110
|
type SlotStatus = BehaviorSignoffStatus | "unverified";
|
|
111
|
-
type BehaviorRuleKind = "
|
|
111
|
+
type BehaviorRuleKind = "journey" | "destination";
|
|
112
112
|
type BehaviorSlotProblemState = "waiting_on_person" | "waiting_on_agent" | "accepted";
|
|
113
113
|
|
|
114
114
|
interface ReportedSlot {
|
|
@@ -132,6 +132,11 @@ declare module "@danxbot/card-kit@1" {
|
|
|
132
132
|
}
|
|
133
133
|
type EvidenceBlockType = "note" | "steps" | "command" | "table" | "code" | "diff" | "log" | "samples";
|
|
134
134
|
type EvidenceMadeBy = "human" | "agent";
|
|
135
|
+
interface EvidenceImplications {
|
|
136
|
+
change: string;
|
|
137
|
+
card_and_plan: string;
|
|
138
|
+
actions: string;
|
|
139
|
+
}
|
|
135
140
|
type EvidenceColumnType = "number" | "boolean" | "text" | "date";
|
|
136
141
|
type EvidenceChartKind = "line" | "time_series" | "bar";
|
|
137
142
|
type EvidenceAttachmentRole = "samples" | "file" | "csv";
|
|
@@ -296,6 +301,7 @@ declare module "@danxbot/card-kit@1" {
|
|
|
296
301
|
unverified: string[];
|
|
297
302
|
method: string | null;
|
|
298
303
|
reproduced_failure: boolean;
|
|
304
|
+
implications: EvidenceImplications;
|
|
299
305
|
}
|
|
300
306
|
interface EvidenceRaisedProblemView {
|
|
301
307
|
card_id: string;
|
|
@@ -329,6 +335,11 @@ declare module "@danxbot/card-kit@1" {
|
|
|
329
335
|
block_count: number;
|
|
330
336
|
gathered: boolean;
|
|
331
337
|
}
|
|
338
|
+
interface EvidenceArchivedView {
|
|
339
|
+
at: string;
|
|
340
|
+
by_user_id: number | null;
|
|
341
|
+
by_name: string;
|
|
342
|
+
}
|
|
332
343
|
interface DecisionRecordPage {
|
|
333
344
|
offset: number;
|
|
334
345
|
target_found: boolean | null;
|
|
@@ -382,7 +393,7 @@ declare module "@danxbot/card-kit@1" {
|
|
|
382
393
|
con: string;
|
|
383
394
|
recommended: boolean;
|
|
384
395
|
}
|
|
385
|
-
type
|
|
396
|
+
type ReviewChoiceKind = "reject" | "accept" | "revert" | "restore" | "inconclusive" | "archive";
|
|
386
397
|
type EvidenceReviewReason = "threshold" | "rejected_before" | "refreshed";
|
|
387
398
|
|
|
388
399
|
interface V2CopyComment {
|
|
@@ -574,6 +585,7 @@ declare module "@danxbot/card-kit@1" {
|
|
|
574
585
|
unverified: string[];
|
|
575
586
|
method: string | null;
|
|
576
587
|
reproduced_failure: boolean;
|
|
588
|
+
implications: EvidenceImplications;
|
|
577
589
|
approvals: V2CopyEvidenceApproval[];
|
|
578
590
|
}
|
|
579
591
|
interface V2CopyEvidenceBlockAttachment {
|
|
@@ -599,10 +611,16 @@ declare module "@danxbot/card-kit@1" {
|
|
|
599
611
|
created_at: string;
|
|
600
612
|
blocks: V2CopyEvidenceBlock[];
|
|
601
613
|
}
|
|
614
|
+
interface V2CopyEvidenceArchived {
|
|
615
|
+
at: string;
|
|
616
|
+
by_email: string | null;
|
|
617
|
+
by_name: string;
|
|
618
|
+
}
|
|
602
619
|
interface V2CopyEvidenceRecord {
|
|
603
620
|
ref_num: number;
|
|
604
621
|
last_exhibit_no: number;
|
|
605
622
|
created_at: string;
|
|
623
|
+
archived: V2CopyEvidenceArchived | null;
|
|
606
624
|
hypothesis_versions: V2CopyEvidenceHypothesisVersion[];
|
|
607
625
|
rounds: V2CopyEvidenceRound[];
|
|
608
626
|
verdict_versions: V2CopyEvidenceVerdictVersion[];
|
|
@@ -723,7 +741,7 @@ declare module "@danxbot/card-kit@1" {
|
|
|
723
741
|
steps: V2CopyStep[];
|
|
724
742
|
}
|
|
725
743
|
interface V2CopyDecisionChoice {
|
|
726
|
-
kind:
|
|
744
|
+
kind: ReviewChoiceKind;
|
|
727
745
|
version_no: number;
|
|
728
746
|
}
|
|
729
747
|
interface V2CopyDecisionReview {
|
|
@@ -853,84 +871,6 @@ declare module "@danxbot/card-kit@1" {
|
|
|
853
871
|
blobs: Record<string, string>;
|
|
854
872
|
}
|
|
855
873
|
|
|
856
|
-
interface HolderAgentPause {
|
|
857
|
-
reason: string;
|
|
858
|
-
since: string;
|
|
859
|
-
until: string | null;
|
|
860
|
-
}
|
|
861
|
-
|
|
862
|
-
interface AgentIdentity {
|
|
863
|
-
id: number;
|
|
864
|
-
name: string;
|
|
865
|
-
avatar_url: string | null;
|
|
866
|
-
}
|
|
867
|
-
type AssignedAgentKind = "person" | "session" | "worker" | "label";
|
|
868
|
-
|
|
869
|
-
interface UsageTokenCounts {
|
|
870
|
-
input: number;
|
|
871
|
-
output: number;
|
|
872
|
-
cacheRead: number;
|
|
873
|
-
cacheWrite: number;
|
|
874
|
-
}
|
|
875
|
-
interface UsageSlice {
|
|
876
|
-
tokens: UsageTokenCounts;
|
|
877
|
-
costUsd: number;
|
|
878
|
-
}
|
|
879
|
-
interface UsageTotals extends UsageTokenCounts {
|
|
880
|
-
cacheWrite5m: number;
|
|
881
|
-
cacheWrite1h: number;
|
|
882
|
-
cacheWriteUnsplit: number;
|
|
883
|
-
}
|
|
884
|
-
interface UsageModelRow extends UsageSlice {
|
|
885
|
-
model: string | null;
|
|
886
|
-
}
|
|
887
|
-
type UsageKind = "work" | "operator-session" | `gate:${string}` | "triage" | "maintenance" | "chat" | "other";
|
|
888
|
-
interface UsageKindRow extends UsageSlice {
|
|
889
|
-
kind: UsageKind;
|
|
890
|
-
label: string;
|
|
891
|
-
}
|
|
892
|
-
type UsageSubagentTypeKey = "main" | "unknown" | "unattributed" | `agent:${string}`;
|
|
893
|
-
interface UsageSubagentTypeRow extends UsageSlice {
|
|
894
|
-
key: UsageSubagentTypeKey;
|
|
895
|
-
label: string;
|
|
896
|
-
sourceCount: number;
|
|
897
|
-
}
|
|
898
|
-
interface UsageTiming {
|
|
899
|
-
apiMs: number;
|
|
900
|
-
agentMs: number;
|
|
901
|
-
linesAdded: number;
|
|
902
|
-
linesRemoved: number;
|
|
903
|
-
}
|
|
904
|
-
interface UsageActivity {
|
|
905
|
-
activeMinutes: number;
|
|
906
|
-
agentMinutes: number;
|
|
907
|
-
tokens: number;
|
|
908
|
-
costUsd: number;
|
|
909
|
-
tokensPerMinute: number;
|
|
910
|
-
measuredSince: number;
|
|
911
|
-
}
|
|
912
|
-
interface UsageSummary {
|
|
913
|
-
totals: UsageTotals;
|
|
914
|
-
costUsd: number;
|
|
915
|
-
byModel: UsageModelRow[];
|
|
916
|
-
byKind: UsageKindRow[];
|
|
917
|
-
bySubagentType: UsageSubagentTypeRow[];
|
|
918
|
-
dispatchCount: number;
|
|
919
|
-
operatorAttributionSince: number | null;
|
|
920
|
-
timing: UsageTiming;
|
|
921
|
-
timingMeasuredSince: number | null;
|
|
922
|
-
activity: UsageActivity | null;
|
|
923
|
-
}
|
|
924
|
-
type UsageErrorCode = "unattributable_dispatch" | "usage_inconsistent";
|
|
925
|
-
interface UsageError {
|
|
926
|
-
error: {
|
|
927
|
-
code: UsageErrorCode;
|
|
928
|
-
message: string;
|
|
929
|
-
dispatchId: string;
|
|
930
|
-
};
|
|
931
|
-
}
|
|
932
|
-
type CardUsage = UsageSummary | UsageError | null;
|
|
933
|
-
|
|
934
874
|
interface BehaviorDecisionView {
|
|
935
875
|
readonly signoff_id: number;
|
|
936
876
|
readonly status: Exclude<SlotStatus, "unverified">;
|
|
@@ -1031,6 +971,84 @@ declare module "@danxbot/card-kit@1" {
|
|
|
1031
971
|
content: string;
|
|
1032
972
|
}
|
|
1033
973
|
|
|
974
|
+
interface HolderAgentPause {
|
|
975
|
+
reason: string;
|
|
976
|
+
since: string;
|
|
977
|
+
until: string | null;
|
|
978
|
+
}
|
|
979
|
+
|
|
980
|
+
interface AgentIdentity {
|
|
981
|
+
id: number;
|
|
982
|
+
name: string;
|
|
983
|
+
avatar_url: string | null;
|
|
984
|
+
}
|
|
985
|
+
type AssignedAgentKind = "person" | "session" | "worker" | "label";
|
|
986
|
+
|
|
987
|
+
interface UsageTokenCounts {
|
|
988
|
+
input: number;
|
|
989
|
+
output: number;
|
|
990
|
+
cacheRead: number;
|
|
991
|
+
cacheWrite: number;
|
|
992
|
+
}
|
|
993
|
+
interface UsageSlice {
|
|
994
|
+
tokens: UsageTokenCounts;
|
|
995
|
+
costUsd: number;
|
|
996
|
+
}
|
|
997
|
+
interface UsageTotals extends UsageTokenCounts {
|
|
998
|
+
cacheWrite5m: number;
|
|
999
|
+
cacheWrite1h: number;
|
|
1000
|
+
cacheWriteUnsplit: number;
|
|
1001
|
+
}
|
|
1002
|
+
interface UsageModelRow extends UsageSlice {
|
|
1003
|
+
model: string | null;
|
|
1004
|
+
}
|
|
1005
|
+
type UsageKind = "work" | "operator-session" | `gate:${string}` | "triage" | "maintenance" | "chat" | "other";
|
|
1006
|
+
interface UsageKindRow extends UsageSlice {
|
|
1007
|
+
kind: UsageKind;
|
|
1008
|
+
label: string;
|
|
1009
|
+
}
|
|
1010
|
+
type UsageSubagentTypeKey = "main" | "unknown" | "unattributed" | `agent:${string}`;
|
|
1011
|
+
interface UsageSubagentTypeRow extends UsageSlice {
|
|
1012
|
+
key: UsageSubagentTypeKey;
|
|
1013
|
+
label: string;
|
|
1014
|
+
sourceCount: number;
|
|
1015
|
+
}
|
|
1016
|
+
interface UsageTiming {
|
|
1017
|
+
apiMs: number;
|
|
1018
|
+
agentMs: number;
|
|
1019
|
+
linesAdded: number;
|
|
1020
|
+
linesRemoved: number;
|
|
1021
|
+
}
|
|
1022
|
+
interface UsageActivity {
|
|
1023
|
+
activeMinutes: number;
|
|
1024
|
+
agentMinutes: number;
|
|
1025
|
+
tokens: number;
|
|
1026
|
+
costUsd: number;
|
|
1027
|
+
tokensPerMinute: number;
|
|
1028
|
+
measuredSince: number;
|
|
1029
|
+
}
|
|
1030
|
+
interface UsageSummary {
|
|
1031
|
+
totals: UsageTotals;
|
|
1032
|
+
costUsd: number;
|
|
1033
|
+
byModel: UsageModelRow[];
|
|
1034
|
+
byKind: UsageKindRow[];
|
|
1035
|
+
bySubagentType: UsageSubagentTypeRow[];
|
|
1036
|
+
dispatchCount: number;
|
|
1037
|
+
operatorAttributionSince: number | null;
|
|
1038
|
+
timing: UsageTiming;
|
|
1039
|
+
timingMeasuredSince: number | null;
|
|
1040
|
+
activity: UsageActivity | null;
|
|
1041
|
+
}
|
|
1042
|
+
type UsageErrorCode = "unattributable_dispatch" | "usage_inconsistent";
|
|
1043
|
+
interface UsageError {
|
|
1044
|
+
error: {
|
|
1045
|
+
code: UsageErrorCode;
|
|
1046
|
+
message: string;
|
|
1047
|
+
dispatchId: string;
|
|
1048
|
+
};
|
|
1049
|
+
}
|
|
1050
|
+
type CardUsage = UsageSummary | UsageError | null;
|
|
1051
|
+
|
|
1034
1052
|
type NotificationText = {
|
|
1035
1053
|
kind: "reason";
|
|
1036
1054
|
reason: StatusReason;
|
|
@@ -1273,6 +1291,7 @@ declare module "@danxbot/card-kit@1" {
|
|
|
1273
1291
|
readonly problems: readonly {
|
|
1274
1292
|
readonly ref_num: number;
|
|
1275
1293
|
readonly type: IssueProblemType;
|
|
1294
|
+
readonly shown_type: ShownProblemType;
|
|
1276
1295
|
readonly statement: string;
|
|
1277
1296
|
readonly created_at: string;
|
|
1278
1297
|
}[];
|
|
@@ -1608,6 +1627,7 @@ declare module "@danxbot/card-kit@1" {
|
|
|
1608
1627
|
assigned_agent: null | string;
|
|
1609
1628
|
content_hash: string;
|
|
1610
1629
|
retro?: undefined | RetroViewV2;
|
|
1630
|
+
behavior_policies?: undefined | CardBehaviorPoliciesView;
|
|
1611
1631
|
stored_row?: undefined | IssueDisplayV2;
|
|
1612
1632
|
stored_checklists?: undefined | Array<ChecklistWithItemsV2>;
|
|
1613
1633
|
stored_attachments?: undefined | Array<IssueAttachmentV2>;
|
|
@@ -1650,7 +1670,6 @@ declare module "@danxbot/card-kit@1" {
|
|
|
1650
1670
|
start_commit?: undefined | null | { at: string; sha: string | null; error: "no_repo" | "not_github_repo" | "no_token" | "github_refused" | "github_unreachable" | "unreadable_tip" | "unexpected" | null; error_detail: string | null; };
|
|
1651
1671
|
problem_total?: undefined | number;
|
|
1652
1672
|
evidence_record_total?: undefined | number;
|
|
1653
|
-
behavior_policies?: undefined | CardBehaviorPoliciesView;
|
|
1654
1673
|
behavior_signoffs?: undefined | CardBehaviorSignoffs;
|
|
1655
1674
|
decision_record_total?: undefined | number;
|
|
1656
1675
|
decision_record_page?: undefined | DecisionRecordPage;
|
|
@@ -1790,6 +1809,7 @@ declare module "@danxbot/card-kit@1" {
|
|
|
1790
1809
|
evidence_records?: undefined | (Array<{
|
|
1791
1810
|
hypothesis: EvidenceHypothesisVersionView;
|
|
1792
1811
|
verdict: null | EvidenceVerdictVersionView;
|
|
1812
|
+
archived: null | EvidenceArchivedView;
|
|
1793
1813
|
rev: number;
|
|
1794
1814
|
created_at: string;
|
|
1795
1815
|
updated_at: string;
|
|
@@ -1848,6 +1868,7 @@ declare module "@danxbot/card-kit@1" {
|
|
|
1848
1868
|
unverified: Array<string>;
|
|
1849
1869
|
method: null | string;
|
|
1850
1870
|
reproduced_failure: boolean;
|
|
1871
|
+
implications: EvidenceImplications;
|
|
1851
1872
|
author: string;
|
|
1852
1873
|
by: AuthorV2;
|
|
1853
1874
|
via_key: null | ViaKey;
|
|
@@ -1930,11 +1951,12 @@ declare module "@danxbot/card-kit@1" {
|
|
|
1930
1951
|
conflict_on_ids: Array<string>;
|
|
1931
1952
|
board_id: BoardRefNum;
|
|
1932
1953
|
}>);
|
|
1933
|
-
plans?: undefined | Array<{
|
|
1954
|
+
plans?: undefined | (Array<{
|
|
1934
1955
|
id: PlanRefNum;
|
|
1935
1956
|
ref: string;
|
|
1936
1957
|
name: string;
|
|
1937
|
-
|
|
1958
|
+
status: "planning" | "awaiting-session" | "building" | "awaiting-sign-off" | "awaiting-docs" | "complete";
|
|
1959
|
+
}>);
|
|
1938
1960
|
mirrors?: undefined | (Array<{
|
|
1939
1961
|
target_type: "trello" | "slack" | "asana" | "linear";
|
|
1940
1962
|
target_url: string;
|
|
@@ -2033,6 +2055,7 @@ declare module "@danxbot/card-kit@1" {
|
|
|
2033
2055
|
comment_count: number;
|
|
2034
2056
|
unread_comment_count: number;
|
|
2035
2057
|
issue_id: string;
|
|
2058
|
+
shown_type: "design" | "question" | "action" | "decision_review" | "behavior_rules" | "hypothesis_review" | "verdict_review";
|
|
2036
2059
|
feedback_consent: boolean;
|
|
2037
2060
|
choice_locked: boolean;
|
|
2038
2061
|
docs_land: boolean;
|
|
@@ -2047,7 +2070,7 @@ declare module "@danxbot/card-kit@1" {
|
|
|
2047
2070
|
problem_ref_num: number;
|
|
2048
2071
|
record_ref: string;
|
|
2049
2072
|
answered_version_no: null | number;
|
|
2050
|
-
choices: Array<{ solution_id: number; kind:
|
|
2073
|
+
choices: Array<{ solution_id: number; kind: ReviewChoiceKind; version_no: number; title: string; }>;
|
|
2051
2074
|
versions?: undefined | (Array<{
|
|
2052
2075
|
text: string;
|
|
2053
2076
|
made_by: "human" | "agent";
|
|
@@ -2072,11 +2095,12 @@ declare module "@danxbot/card-kit@1" {
|
|
|
2072
2095
|
}>);
|
|
2073
2096
|
}>);
|
|
2074
2097
|
evidence_review?: undefined | (Array<{
|
|
2098
|
+
title: string;
|
|
2075
2099
|
version_no: null | number;
|
|
2076
2100
|
problem_ref_num: number;
|
|
2077
2101
|
record_ref: string;
|
|
2078
2102
|
answered_version_no: null | number;
|
|
2079
|
-
choices: Array<{ solution_id: number; kind:
|
|
2103
|
+
choices: Array<{ solution_id: number; kind: ReviewChoiceKind; version_no: number; title: string; }>;
|
|
2080
2104
|
part: "hypothesis" | "verdict";
|
|
2081
2105
|
asked_because: null | "threshold" | "rejected_before" | "refreshed";
|
|
2082
2106
|
hypothesis_versions?: undefined | (Array<{
|
|
@@ -2114,6 +2138,7 @@ declare module "@danxbot/card-kit@1" {
|
|
|
2114
2138
|
unverified: Array<string>;
|
|
2115
2139
|
method: null | string;
|
|
2116
2140
|
reproduced_failure: boolean;
|
|
2141
|
+
implications: EvidenceImplications;
|
|
2117
2142
|
author: string;
|
|
2118
2143
|
by: AuthorV2;
|
|
2119
2144
|
via_key: null | ViaKey;
|
|
@@ -2233,6 +2258,7 @@ declare module "@danxbot/card-kit@1" {
|
|
|
2233
2258
|
type IssueStatus = "Review" | "ToDo" | "In Progress" | "Backlog" | "Done" | "Cancelled";
|
|
2234
2259
|
type EffortLevelName = "min" | "very_low" | "low" | "medium" | "high" | "very_high" | "max";
|
|
2235
2260
|
type IssueProblemType = "design" | "question" | "action" | "decision_review" | "evidence_review" | "behavior_rules";
|
|
2261
|
+
type ShownProblemType = "design" | "question" | "action" | "decision_review" | "behavior_rules" | "hypothesis_review" | "verdict_review";
|
|
2236
2262
|
type DecisionOutcome = "rejected" | "answered";
|
|
2237
2263
|
type GatingDependencyKind = "conflict_on" | "depends_on";
|
|
2238
2264
|
type IssueDependencyKind = GatingDependencyKind | "depends_on_landing";
|
|
@@ -2309,6 +2335,7 @@ declare module "@danxbot/card-kit@1" {
|
|
|
2309
2335
|
triage_last_status: string;
|
|
2310
2336
|
triage_last_explain: string;
|
|
2311
2337
|
terminal_derived: boolean;
|
|
2338
|
+
cancelled_derived: boolean;
|
|
2312
2339
|
in_progress_derived: boolean;
|
|
2313
2340
|
dispatchable_derived: boolean;
|
|
2314
2341
|
triage_enabled: boolean;
|
|
@@ -2475,6 +2502,8 @@ declare module "@danxbot/card-kit@1" {
|
|
|
2475
2502
|
quote: string | null;
|
|
2476
2503
|
quote_verified: boolean;
|
|
2477
2504
|
label: string;
|
|
2505
|
+
printed_ref: string;
|
|
2506
|
+
title: string | null;
|
|
2478
2507
|
url: string | null;
|
|
2479
2508
|
external: boolean;
|
|
2480
2509
|
author: AuthorV2 | null;
|
|
@@ -2538,7 +2567,7 @@ declare module "@danxbot/card-kit@1" {
|
|
|
2538
2567
|
dispatchId: string;
|
|
2539
2568
|
stop: "requested" | "unreachable";
|
|
2540
2569
|
}
|
|
2541
|
-
type ProblemCard = Pick<IssueViewV2, "id"> & Partial<Pick<IssueViewV2, "problems" | "open_problem_count">>;
|
|
2570
|
+
type ProblemCard = Pick<IssueViewV2, "id"> & Partial<Pick<IssueViewV2, "problems" | "open_problem_count" | "board_id">>;
|
|
2542
2571
|
|
|
2543
2572
|
interface LaneMoveRequest {
|
|
2544
2573
|
issueId: string;
|
package/dist/cli.js
CHANGED
|
@@ -4,10 +4,8 @@
|
|
|
4
4
|
import { parseArgs } from "node:util";
|
|
5
5
|
|
|
6
6
|
// src/publish/archive.ts
|
|
7
|
-
import { execFile } from "node:child_process";
|
|
8
7
|
import { lstat, readdir, readFile } from "node:fs/promises";
|
|
9
8
|
import { join as join2, resolve } from "node:path";
|
|
10
|
-
import { promisify } from "node:util";
|
|
11
9
|
|
|
12
10
|
// node_modules/@isaacs/fs-minipass/dist/esm/index.js
|
|
13
11
|
import EE from "events";
|
|
@@ -5796,8 +5794,31 @@ var mtimeFilter = (opt) => {
|
|
|
5796
5794
|
((opt.mtimeCache?.get(path8) ?? stat.mtime ?? 0) > (stat.mtime ?? 0));
|
|
5797
5795
|
};
|
|
5798
5796
|
|
|
5797
|
+
// ../../src/util/hidden-process.mjs
|
|
5798
|
+
import * as cp from "node:child_process";
|
|
5799
|
+
import { promisify } from "node:util";
|
|
5800
|
+
function withWindowsHidden(args, optionsAfterArgs) {
|
|
5801
|
+
const out = [...args];
|
|
5802
|
+
let at = 1;
|
|
5803
|
+
if (optionsAfterArgs && (Array.isArray(out[1]) || (out[1] === void 0 || out[1] === null) && out.length > 2 && typeof out[2] !== "function")) {
|
|
5804
|
+
at = 2;
|
|
5805
|
+
}
|
|
5806
|
+
const given = out[at];
|
|
5807
|
+
if (given === void 0 || given === null) out[at] = { windowsHide: true };
|
|
5808
|
+
else if (typeof given === "function")
|
|
5809
|
+
out.splice(at, 0, { windowsHide: true });
|
|
5810
|
+
else out[at] = { ...given, windowsHide: true };
|
|
5811
|
+
return out;
|
|
5812
|
+
}
|
|
5813
|
+
var spawn2 = (...args) => cp.spawn(...withWindowsHidden(args, true));
|
|
5814
|
+
var execFileAsync = (...args) => promisify(cp.execFile)(...withWindowsHidden(args, true));
|
|
5815
|
+
var execAsync = (...args) => promisify(cp.exec)(...withWindowsHidden(args, false));
|
|
5816
|
+
var execFile2 = (...args) => cp.execFile(...withWindowsHidden(args, true));
|
|
5817
|
+
var exec2 = (...args) => cp.exec(...withWindowsHidden(args, false));
|
|
5818
|
+
execFile2[promisify.custom] = execFileAsync;
|
|
5819
|
+
exec2[promisify.custom] = execAsync;
|
|
5820
|
+
|
|
5799
5821
|
// src/publish/archive.ts
|
|
5800
|
-
var execFileAsync = promisify(execFile);
|
|
5801
5822
|
var EXCLUDED_SEGMENTS = /* @__PURE__ */ new Set(["node_modules", ".git"]);
|
|
5802
5823
|
var EXCLUDED_TOP_LEVEL = /* @__PURE__ */ new Set(["dist"]);
|
|
5803
5824
|
var LOCKFILE_NAMES = [
|
|
@@ -5863,8 +5884,7 @@ function gitFailure(err) {
|
|
|
5863
5884
|
async function gitFiles(dir) {
|
|
5864
5885
|
try {
|
|
5865
5886
|
await execFileAsync("git", ["rev-parse", "--is-inside-work-tree"], {
|
|
5866
|
-
cwd: dir
|
|
5867
|
-
windowsHide: true
|
|
5887
|
+
cwd: dir
|
|
5868
5888
|
});
|
|
5869
5889
|
} catch (err) {
|
|
5870
5890
|
if (err.code === 128 && /not a git repository/i.test(gitFailure(err)))
|
|
@@ -5878,7 +5898,7 @@ async function gitFiles(dir) {
|
|
|
5878
5898
|
({ stdout } = await execFileAsync(
|
|
5879
5899
|
"git",
|
|
5880
5900
|
["ls-files", "-z", "--cached", "--others", "--exclude-standard"],
|
|
5881
|
-
{ cwd: dir,
|
|
5901
|
+
{ cwd: dir, maxBuffer: 64 * 1024 * 1024 }
|
|
5882
5902
|
));
|
|
5883
5903
|
} catch (err) {
|
|
5884
5904
|
throw new Error(
|
|
@@ -5920,7 +5940,6 @@ async function archiveSource(projectDir) {
|
|
|
5920
5940
|
}
|
|
5921
5941
|
|
|
5922
5942
|
// src/publish/build.ts
|
|
5923
|
-
import { spawn } from "node:child_process";
|
|
5924
5943
|
import { readFile as readFile2 } from "node:fs/promises";
|
|
5925
5944
|
import { join as join3, resolve as resolve2 } from "node:path";
|
|
5926
5945
|
|
|
@@ -5965,9 +5984,8 @@ var BUILD_OUTPUT_TAIL_CHARS = 4e3;
|
|
|
5965
5984
|
function runProjectBuild(projectDir) {
|
|
5966
5985
|
return new Promise((resolvePromise, reject) => {
|
|
5967
5986
|
let output = "";
|
|
5968
|
-
const child =
|
|
5987
|
+
const child = spawn2("npm", ["run", "build"], {
|
|
5969
5988
|
cwd: projectDir,
|
|
5970
|
-
windowsHide: true,
|
|
5971
5989
|
shell: process.platform === "win32",
|
|
5972
5990
|
stdio: ["ignore", "pipe", "pipe"]
|
|
5973
5991
|
});
|
package/dist/publish.js
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
// src/publish/archive.ts
|
|
2
|
-
import { execFile } from "node:child_process";
|
|
3
2
|
import { lstat, readdir, readFile } from "node:fs/promises";
|
|
4
3
|
import { join as join2, resolve } from "node:path";
|
|
5
|
-
import { promisify } from "node:util";
|
|
6
4
|
|
|
7
5
|
// node_modules/@isaacs/fs-minipass/dist/esm/index.js
|
|
8
6
|
import EE from "events";
|
|
@@ -5791,8 +5789,31 @@ var mtimeFilter = (opt) => {
|
|
|
5791
5789
|
((opt.mtimeCache?.get(path8) ?? stat.mtime ?? 0) > (stat.mtime ?? 0));
|
|
5792
5790
|
};
|
|
5793
5791
|
|
|
5792
|
+
// ../../src/util/hidden-process.mjs
|
|
5793
|
+
import * as cp from "node:child_process";
|
|
5794
|
+
import { promisify } from "node:util";
|
|
5795
|
+
function withWindowsHidden(args, optionsAfterArgs) {
|
|
5796
|
+
const out = [...args];
|
|
5797
|
+
let at = 1;
|
|
5798
|
+
if (optionsAfterArgs && (Array.isArray(out[1]) || (out[1] === void 0 || out[1] === null) && out.length > 2 && typeof out[2] !== "function")) {
|
|
5799
|
+
at = 2;
|
|
5800
|
+
}
|
|
5801
|
+
const given = out[at];
|
|
5802
|
+
if (given === void 0 || given === null) out[at] = { windowsHide: true };
|
|
5803
|
+
else if (typeof given === "function")
|
|
5804
|
+
out.splice(at, 0, { windowsHide: true });
|
|
5805
|
+
else out[at] = { ...given, windowsHide: true };
|
|
5806
|
+
return out;
|
|
5807
|
+
}
|
|
5808
|
+
var spawn2 = (...args) => cp.spawn(...withWindowsHidden(args, true));
|
|
5809
|
+
var execFileAsync = (...args) => promisify(cp.execFile)(...withWindowsHidden(args, true));
|
|
5810
|
+
var execAsync = (...args) => promisify(cp.exec)(...withWindowsHidden(args, false));
|
|
5811
|
+
var execFile2 = (...args) => cp.execFile(...withWindowsHidden(args, true));
|
|
5812
|
+
var exec2 = (...args) => cp.exec(...withWindowsHidden(args, false));
|
|
5813
|
+
execFile2[promisify.custom] = execFileAsync;
|
|
5814
|
+
exec2[promisify.custom] = execAsync;
|
|
5815
|
+
|
|
5794
5816
|
// src/publish/archive.ts
|
|
5795
|
-
var execFileAsync = promisify(execFile);
|
|
5796
5817
|
var EXCLUDED_SEGMENTS = /* @__PURE__ */ new Set(["node_modules", ".git"]);
|
|
5797
5818
|
var EXCLUDED_TOP_LEVEL = /* @__PURE__ */ new Set(["dist"]);
|
|
5798
5819
|
var LOCKFILE_NAMES = [
|
|
@@ -5858,8 +5879,7 @@ function gitFailure(err) {
|
|
|
5858
5879
|
async function gitFiles(dir) {
|
|
5859
5880
|
try {
|
|
5860
5881
|
await execFileAsync("git", ["rev-parse", "--is-inside-work-tree"], {
|
|
5861
|
-
cwd: dir
|
|
5862
|
-
windowsHide: true
|
|
5882
|
+
cwd: dir
|
|
5863
5883
|
});
|
|
5864
5884
|
} catch (err) {
|
|
5865
5885
|
if (err.code === 128 && /not a git repository/i.test(gitFailure(err)))
|
|
@@ -5873,7 +5893,7 @@ async function gitFiles(dir) {
|
|
|
5873
5893
|
({ stdout } = await execFileAsync(
|
|
5874
5894
|
"git",
|
|
5875
5895
|
["ls-files", "-z", "--cached", "--others", "--exclude-standard"],
|
|
5876
|
-
{ cwd: dir,
|
|
5896
|
+
{ cwd: dir, maxBuffer: 64 * 1024 * 1024 }
|
|
5877
5897
|
));
|
|
5878
5898
|
} catch (err) {
|
|
5879
5899
|
throw new Error(
|
|
@@ -5915,7 +5935,6 @@ async function archiveSource(projectDir) {
|
|
|
5915
5935
|
}
|
|
5916
5936
|
|
|
5917
5937
|
// src/publish/build.ts
|
|
5918
|
-
import { spawn } from "node:child_process";
|
|
5919
5938
|
import { readFile as readFile2 } from "node:fs/promises";
|
|
5920
5939
|
import { join as join3, resolve as resolve2 } from "node:path";
|
|
5921
5940
|
|
|
@@ -5960,9 +5979,8 @@ var BUILD_OUTPUT_TAIL_CHARS = 4e3;
|
|
|
5960
5979
|
function runProjectBuild(projectDir) {
|
|
5961
5980
|
return new Promise((resolvePromise, reject) => {
|
|
5962
5981
|
let output = "";
|
|
5963
|
-
const child =
|
|
5982
|
+
const child = spawn2("npm", ["run", "build"], {
|
|
5964
5983
|
cwd: projectDir,
|
|
5965
|
-
windowsHide: true,
|
|
5966
5984
|
shell: process.platform === "win32",
|
|
5967
5985
|
stdio: ["ignore", "pipe", "pipe"]
|
|
5968
5986
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@50arms/plugin-sdk",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.75",
|
|
4
4
|
"description": "SDK for building 50 Arms plugins (DX-5170): the card kit's type declarations, the Widget declaration kit, a Vite preset that builds a plugin against the app's shared runtime and writes its manifest, and the danx-plugin CLI.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|