@levr-one/cli 0.12.4 → 0.12.6
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/{addHandler-LO6SChns.js → addHandler-ybX54_3f.js} +6 -6
- package/dist/{appendHandler-DtxLpPu6.js → appendHandler-CKkl9ymw.js} +7 -7
- package/dist/{artifact-upload-BvBSevIx.js → artifact-upload-Ba801tb6.js} +1 -1
- package/dist/{attachHandler-DXZi2ILT.js → attachHandler-CfNvVAV2.js} +7 -7
- package/dist/cli.js +77 -18
- package/dist/{connect-DVjgyfls.js → connect-yq3fGXkW.js} +9 -8
- package/dist/{find-workspace-Bl4rfr73.js → find-workspace-4Us2vEb7.js} +1 -1
- package/dist/{importHandler-uFdalKtw.js → importHandler-bYBWYC_0.js} +8 -8
- package/dist/{listHandler-BW92JLCl.js → listHandler-Du_YGzre.js} +4 -4
- package/dist/{loginHandler-C9Oi92IY.js → loginHandler-PbKmDAGo.js} +4 -4
- package/dist/{logoutHandler-Cf5aI1wq.js → logoutHandler-DxnzGPYx.js} +1 -1
- package/dist/{pushHandler-CXFZt3SO.js → pushHandler-BulraEwP.js} +15 -13
- package/dist/refsHandler-DtcceTRP.js +1757 -0
- package/dist/{resolve-token-ByZq05Us.js → resolve-token-DKEXT7SA.js} +8 -5
- package/dist/{resolve-workspace-BbK3uYQc.js → resolve-workspace-D8y7twod.js} +37 -5
- package/dist/{runHandler-IyPhhiGs.js → runHandler-B-u-0eRk.js} +25 -13
- package/dist/{sdk-client-B4FMd_Fa.js → sdk-client-BgzKzVIR.js} +1 -1
- package/dist/{selectHandler-D6cvq60S.js → selectHandler-C0gs-Q70.js} +9 -4
- package/dist/{statusHandler-BQXn93-r.js → statusHandler-Dnnh80ZN.js} +7 -5
- package/dist/{token-refresh-CJB7Qlxy.js → token-refresh-BpFuU4Ij.js} +26 -2
- package/package.json +1 -1
- /package/dist/{currentHandler-QhCywr3S.js → currentHandler-PaLZKLGF.js} +0 -0
- /package/dist/{env-CvjMSRd7.js → env-DjeRwmZ7.js} +0 -0
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { configureClient } from "./sdk-client-
|
|
2
|
-
import
|
|
3
|
-
import "./
|
|
4
|
-
import { resolveToken } from "./resolve-token-
|
|
1
|
+
import { configureClient } from "./sdk-client-BgzKzVIR.js";
|
|
2
|
+
import "./token-refresh-BpFuU4Ij.js";
|
|
3
|
+
import { getApiUrl } from "./env-DjeRwmZ7.js";
|
|
4
|
+
import { resolveToken } from "./resolve-token-DKEXT7SA.js";
|
|
5
5
|
import "./workspace-store-Bmw104Qa.js";
|
|
6
|
-
import { fetchSites } from "./resolve-workspace-
|
|
7
|
-
import { describeWorkspaces, findWorkspaceByKeyOrName, isScopedMcpUrl, resolveMcpUrl, scopedMcpUrl, servedBySessionApi } from "./find-workspace-
|
|
6
|
+
import { fetchSites } from "./resolve-workspace-D8y7twod.js";
|
|
7
|
+
import { describeWorkspaces, findWorkspaceByKeyOrName, isScopedMcpUrl, resolveMcpUrl, scopedMcpUrl, servedBySessionApi } from "./find-workspace-4Us2vEb7.js";
|
|
8
8
|
import { chmodSync, copyFileSync, existsSync, mkdirSync, readFileSync, realpathSync, renameSync, statSync, unlinkSync, writeFileSync } from "node:fs";
|
|
9
9
|
import { basename, delimiter, dirname, join, resolve } from "node:path";
|
|
10
10
|
import { homedir } from "node:os";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { appendActualResult } from "./sdk-client-
|
|
2
|
-
import "./
|
|
3
|
-
import "./
|
|
4
|
-
import "./resolve-token-
|
|
1
|
+
import { appendActualResult } from "./sdk-client-BgzKzVIR.js";
|
|
2
|
+
import "./token-refresh-BpFuU4Ij.js";
|
|
3
|
+
import "./env-DjeRwmZ7.js";
|
|
4
|
+
import "./resolve-token-DKEXT7SA.js";
|
|
5
5
|
import "./workspace-store-Bmw104Qa.js";
|
|
6
|
-
import "./resolve-workspace-
|
|
7
|
-
import { connect } from "./connect-
|
|
6
|
+
import "./resolve-workspace-D8y7twod.js";
|
|
7
|
+
import { connect } from "./connect-yq3fGXkW.js";
|
|
8
8
|
import "./sleep-CGBHjsj5.js";
|
|
9
|
-
import { embedMarkdown, parseTarget, uploadArtifactFile } from "./artifact-upload-
|
|
9
|
+
import { embedMarkdown, parseTarget, uploadArtifactFile } from "./artifact-upload-Ba801tb6.js";
|
|
10
10
|
import { readFileSync } from "node:fs";
|
|
11
11
|
import { basename } from "node:path";
|
|
12
12
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { uploadAttachment } from "./sdk-client-
|
|
1
|
+
import { uploadAttachment } from "./sdk-client-BgzKzVIR.js";
|
|
2
2
|
import { sleep } from "./sleep-CGBHjsj5.js";
|
|
3
3
|
import { constants, promises, readlinkSync, realpathSync, statSync } from "node:fs";
|
|
4
4
|
import path from "node:path";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { appendActualResult, createComment } from "./sdk-client-
|
|
2
|
-
import "./
|
|
3
|
-
import "./
|
|
4
|
-
import "./resolve-token-
|
|
1
|
+
import { appendActualResult, createComment } from "./sdk-client-BgzKzVIR.js";
|
|
2
|
+
import "./token-refresh-BpFuU4Ij.js";
|
|
3
|
+
import "./env-DjeRwmZ7.js";
|
|
4
|
+
import "./resolve-token-DKEXT7SA.js";
|
|
5
5
|
import "./workspace-store-Bmw104Qa.js";
|
|
6
|
-
import "./resolve-workspace-
|
|
7
|
-
import { connect } from "./connect-
|
|
6
|
+
import "./resolve-workspace-D8y7twod.js";
|
|
7
|
+
import { connect } from "./connect-yq3fGXkW.js";
|
|
8
8
|
import "./sleep-CGBHjsj5.js";
|
|
9
|
-
import { TargetParseError, embedMarkdown, parseTarget, uploadArtifactFile } from "./artifact-upload-
|
|
9
|
+
import { TargetParseError, embedMarkdown, parseTarget, uploadArtifactFile } from "./artifact-upload-Ba801tb6.js";
|
|
10
10
|
import { readFileSync } from "node:fs";
|
|
11
11
|
import { basename } from "node:path";
|
|
12
12
|
|
package/dist/cli.js
CHANGED
|
@@ -224,7 +224,7 @@ Examples:
|
|
|
224
224
|
aliases: { y: "yes" }
|
|
225
225
|
},
|
|
226
226
|
loader: async () => {
|
|
227
|
-
const { mcpAddHandler } = await import("./addHandler-
|
|
227
|
+
const { mcpAddHandler } = await import("./addHandler-ybX54_3f.js");
|
|
228
228
|
return mcpAddHandler;
|
|
229
229
|
}
|
|
230
230
|
});
|
|
@@ -273,7 +273,7 @@ Examples:
|
|
|
273
273
|
aliases: { d: "device-code" }
|
|
274
274
|
},
|
|
275
275
|
loader: async () => {
|
|
276
|
-
const { loginHandler } = await import("./loginHandler-
|
|
276
|
+
const { loginHandler } = await import("./loginHandler-PbKmDAGo.js");
|
|
277
277
|
return loginHandler;
|
|
278
278
|
}
|
|
279
279
|
});
|
|
@@ -292,7 +292,7 @@ Examples:
|
|
|
292
292
|
},
|
|
293
293
|
parameters: {},
|
|
294
294
|
loader: async () => {
|
|
295
|
-
const { logoutHandler } = await import("./logoutHandler-
|
|
295
|
+
const { logoutHandler } = await import("./logoutHandler-DxnzGPYx.js");
|
|
296
296
|
return logoutHandler;
|
|
297
297
|
}
|
|
298
298
|
});
|
|
@@ -312,7 +312,7 @@ Examples:
|
|
|
312
312
|
},
|
|
313
313
|
parameters: {},
|
|
314
314
|
loader: async () => {
|
|
315
|
-
const { statusHandler } = await import("./statusHandler-
|
|
315
|
+
const { statusHandler } = await import("./statusHandler-Dnnh80ZN.js");
|
|
316
316
|
return statusHandler;
|
|
317
317
|
}
|
|
318
318
|
});
|
|
@@ -367,7 +367,7 @@ levr attach --manifest or later uploads.`
|
|
|
367
367
|
"workspace-id": {
|
|
368
368
|
kind: "parsed",
|
|
369
369
|
parse: String,
|
|
370
|
-
brief: "Workspace ID
|
|
370
|
+
brief: "Workspace ID: needed with a login token and several workspaces; a personal access token is bound to its own",
|
|
371
371
|
placeholder: "uuid",
|
|
372
372
|
optional: true
|
|
373
373
|
},
|
|
@@ -441,7 +441,7 @@ levr attach --manifest or later uploads.`
|
|
|
441
441
|
}
|
|
442
442
|
},
|
|
443
443
|
loader: async () => {
|
|
444
|
-
const { pushHandler } = await import("./pushHandler-
|
|
444
|
+
const { pushHandler } = await import("./pushHandler-BulraEwP.js");
|
|
445
445
|
return pushHandler;
|
|
446
446
|
}
|
|
447
447
|
});
|
|
@@ -482,7 +482,7 @@ Examples:
|
|
|
482
482
|
"workspace-id": {
|
|
483
483
|
kind: "parsed",
|
|
484
484
|
parse: String,
|
|
485
|
-
brief: "Workspace ID
|
|
485
|
+
brief: "Workspace ID: needed with a login token and several workspaces; a personal access token is bound to its own",
|
|
486
486
|
placeholder: "uuid",
|
|
487
487
|
optional: true
|
|
488
488
|
},
|
|
@@ -561,7 +561,7 @@ Examples:
|
|
|
561
561
|
}
|
|
562
562
|
},
|
|
563
563
|
loader: async () => {
|
|
564
|
-
const { importHandler } = await import("./importHandler-
|
|
564
|
+
const { importHandler } = await import("./importHandler-bYBWYC_0.js");
|
|
565
565
|
return importHandler;
|
|
566
566
|
}
|
|
567
567
|
});
|
|
@@ -582,7 +582,7 @@ Examples:
|
|
|
582
582
|
},
|
|
583
583
|
parameters: {},
|
|
584
584
|
loader: async () => {
|
|
585
|
-
const { listHandler } = await import("./listHandler-
|
|
585
|
+
const { listHandler } = await import("./listHandler-Du_YGzre.js");
|
|
586
586
|
return listHandler;
|
|
587
587
|
}
|
|
588
588
|
});
|
|
@@ -620,7 +620,7 @@ Examples:
|
|
|
620
620
|
flags: {}
|
|
621
621
|
},
|
|
622
622
|
loader: async () => {
|
|
623
|
-
const { selectHandler } = await import("./selectHandler-
|
|
623
|
+
const { selectHandler } = await import("./selectHandler-C0gs-Q70.js");
|
|
624
624
|
return selectHandler;
|
|
625
625
|
}
|
|
626
626
|
});
|
|
@@ -637,11 +637,69 @@ Examples:
|
|
|
637
637
|
},
|
|
638
638
|
parameters: {},
|
|
639
639
|
loader: async () => {
|
|
640
|
-
const { currentHandler } = await import("./currentHandler-
|
|
640
|
+
const { currentHandler } = await import("./currentHandler-PaLZKLGF.js");
|
|
641
641
|
return currentHandler;
|
|
642
642
|
}
|
|
643
643
|
});
|
|
644
644
|
|
|
645
|
+
//#endregion
|
|
646
|
+
//#region src/commands/gates/refs.ts
|
|
647
|
+
const gatesRefsCommand = buildCommand({
|
|
648
|
+
docs: {
|
|
649
|
+
brief: "Check that a symbol is declared in a scope and referenced elsewhere",
|
|
650
|
+
fullDescription: `Find where a symbol is declared under --scope and count the references to it
|
|
651
|
+
from other modules, through the language's own tooling. This is the command a
|
|
652
|
+
symbol_referenced gate runs.
|
|
653
|
+
|
|
654
|
+
Exit code 0 when the symbol is declared in the scope and referenced from
|
|
655
|
+
outside its declaring file, 1 when it is not referenced or not found, and 2 for
|
|
656
|
+
a usage, scope or toolchain error.
|
|
657
|
+
|
|
658
|
+
--scope must be a directory (or file) inside the repository, narrower than the
|
|
659
|
+
repository root. References from test code are not counted unless
|
|
660
|
+
--include-tests is set.
|
|
661
|
+
|
|
662
|
+
Languages:
|
|
663
|
+
ts tsgo --lsp. Needs typescript and @typescript/native-preview installed
|
|
664
|
+
in the checkout.
|
|
665
|
+
rust rust-analyzer. Needs \`rustup component add rust-analyzer\`; waits for
|
|
666
|
+
indexing to finish (CODE_INTEL_RA_TIMEOUT_MS, default 300000).
|
|
667
|
+
|
|
668
|
+
Examples:
|
|
669
|
+
levr gates refs --lang ts --symbol GateDefinitionSeeder --scope packages/db-core/src
|
|
670
|
+
levr gates refs --lang rust --symbol used_helper --scope crates/core/src`
|
|
671
|
+
},
|
|
672
|
+
parameters: { flags: {
|
|
673
|
+
lang: {
|
|
674
|
+
kind: "parsed",
|
|
675
|
+
parse: String,
|
|
676
|
+
brief: "Language engine: ts or rust",
|
|
677
|
+
placeholder: "lang"
|
|
678
|
+
},
|
|
679
|
+
symbol: {
|
|
680
|
+
kind: "parsed",
|
|
681
|
+
parse: String,
|
|
682
|
+
brief: "Symbol name to resolve",
|
|
683
|
+
placeholder: "name"
|
|
684
|
+
},
|
|
685
|
+
scope: {
|
|
686
|
+
kind: "parsed",
|
|
687
|
+
parse: String,
|
|
688
|
+
brief: "Directory to search for the declaration, inside the repository",
|
|
689
|
+
placeholder: "dir"
|
|
690
|
+
},
|
|
691
|
+
"include-tests": {
|
|
692
|
+
kind: "boolean",
|
|
693
|
+
default: false,
|
|
694
|
+
brief: "Count references from test code"
|
|
695
|
+
}
|
|
696
|
+
} },
|
|
697
|
+
loader: async () => {
|
|
698
|
+
const { gatesRefsHandler } = await import("./refsHandler-DtcceTRP.js");
|
|
699
|
+
return gatesRefsHandler;
|
|
700
|
+
}
|
|
701
|
+
});
|
|
702
|
+
|
|
645
703
|
//#endregion
|
|
646
704
|
//#region src/commands/gates/run.ts
|
|
647
705
|
const gatesRunCommand = buildCommand({
|
|
@@ -687,7 +745,7 @@ Examples:
|
|
|
687
745
|
"workspace-id": {
|
|
688
746
|
kind: "parsed",
|
|
689
747
|
parse: String,
|
|
690
|
-
brief: "Workspace ID
|
|
748
|
+
brief: "Workspace ID: needed with a login token and several workspaces; a personal access token is bound to its own",
|
|
691
749
|
placeholder: "uuid",
|
|
692
750
|
optional: true
|
|
693
751
|
},
|
|
@@ -718,7 +776,7 @@ Examples:
|
|
|
718
776
|
}
|
|
719
777
|
},
|
|
720
778
|
loader: async () => {
|
|
721
|
-
const { gatesRunHandler } = await import("./runHandler-
|
|
779
|
+
const { gatesRunHandler } = await import("./runHandler-B-u-0eRk.js");
|
|
722
780
|
return gatesRunHandler;
|
|
723
781
|
}
|
|
724
782
|
});
|
|
@@ -784,7 +842,7 @@ Examples:
|
|
|
784
842
|
"workspace-id": {
|
|
785
843
|
kind: "parsed",
|
|
786
844
|
parse: String,
|
|
787
|
-
brief: "Workspace ID
|
|
845
|
+
brief: "Workspace ID: needed with a login token and several workspaces; a personal access token is bound to its own",
|
|
788
846
|
placeholder: "uuid",
|
|
789
847
|
optional: true
|
|
790
848
|
},
|
|
@@ -831,7 +889,7 @@ Examples:
|
|
|
831
889
|
}
|
|
832
890
|
},
|
|
833
891
|
loader: async () => {
|
|
834
|
-
const { attachHandler } = await import("./attachHandler-
|
|
892
|
+
const { attachHandler } = await import("./attachHandler-CfNvVAV2.js");
|
|
835
893
|
return attachHandler;
|
|
836
894
|
}
|
|
837
895
|
});
|
|
@@ -866,7 +924,7 @@ Examples:
|
|
|
866
924
|
"workspace-id": {
|
|
867
925
|
kind: "parsed",
|
|
868
926
|
parse: String,
|
|
869
|
-
brief: "Workspace ID
|
|
927
|
+
brief: "Workspace ID: needed with a login token and several workspaces; a personal access token is bound to its own",
|
|
870
928
|
placeholder: "uuid",
|
|
871
929
|
optional: true
|
|
872
930
|
},
|
|
@@ -907,14 +965,14 @@ Examples:
|
|
|
907
965
|
}
|
|
908
966
|
},
|
|
909
967
|
loader: async () => {
|
|
910
|
-
const { resultAppendHandler } = await import("./appendHandler-
|
|
968
|
+
const { resultAppendHandler } = await import("./appendHandler-CKkl9ymw.js");
|
|
911
969
|
return resultAppendHandler;
|
|
912
970
|
}
|
|
913
971
|
});
|
|
914
972
|
|
|
915
973
|
//#endregion
|
|
916
974
|
//#region package.json
|
|
917
|
-
var version = "0.12.
|
|
975
|
+
var version = "0.12.6";
|
|
918
976
|
|
|
919
977
|
//#endregion
|
|
920
978
|
//#region src/app.ts
|
|
@@ -937,6 +995,7 @@ const workspaceRoutes = buildRouteMap({
|
|
|
937
995
|
const gatesRoutes = buildRouteMap({
|
|
938
996
|
routes: {
|
|
939
997
|
inspect: gatesInspectCommand,
|
|
998
|
+
refs: gatesRefsCommand,
|
|
940
999
|
run: gatesRunCommand
|
|
941
1000
|
},
|
|
942
1001
|
docs: { brief: "Run a deliverable's gates and report the raw results" }
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import { client, configureClient } from "./sdk-client-
|
|
2
|
-
import { resolveToken } from "./resolve-token-
|
|
3
|
-
import {
|
|
1
|
+
import { client, configureClient } from "./sdk-client-BgzKzVIR.js";
|
|
2
|
+
import { resolveToken } from "./resolve-token-DKEXT7SA.js";
|
|
3
|
+
import { resolveWorkspaceFor } from "./resolve-workspace-D8y7twod.js";
|
|
4
4
|
|
|
5
5
|
//#region src/utils/connect.ts
|
|
6
6
|
/**
|
|
7
7
|
* Authenticate the SDK client for a command (ENG-6164): resolve the token,
|
|
8
|
-
*
|
|
9
|
-
*
|
|
8
|
+
* then the workspace — looked up for a JWT, taken from an explicit flag or
|
|
9
|
+
* `LEVR_WORKSPACE_ID` for a PAT (ENG-6068). Reports the failure and sets exit
|
|
10
|
+
* code 1; returns false when the command must stop.
|
|
10
11
|
*/
|
|
11
12
|
async function connect(ctx, workspaceIdFlag) {
|
|
12
13
|
let auth;
|
|
@@ -18,9 +19,9 @@ async function connect(ctx, workspaceIdFlag) {
|
|
|
18
19
|
return false;
|
|
19
20
|
}
|
|
20
21
|
configureClient(auth);
|
|
21
|
-
|
|
22
|
-
const ws = await
|
|
23
|
-
client.setConfig({
|
|
22
|
+
try {
|
|
23
|
+
const ws = await resolveWorkspaceFor(auth, workspaceIdFlag);
|
|
24
|
+
if (ws) client.setConfig({
|
|
24
25
|
...client.getConfig(),
|
|
25
26
|
workspaceId: ws.workspaceId
|
|
26
27
|
});
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { authGetProfileV1, client, configureClient } from "./sdk-client-
|
|
2
|
-
import
|
|
3
|
-
import "./
|
|
4
|
-
import { resolveToken } from "./resolve-token-
|
|
1
|
+
import { authGetProfileV1, client, configureClient } from "./sdk-client-BgzKzVIR.js";
|
|
2
|
+
import "./token-refresh-BpFuU4Ij.js";
|
|
3
|
+
import { getApiUrl, getTeamId } from "./env-DjeRwmZ7.js";
|
|
4
|
+
import { resolveToken } from "./resolve-token-DKEXT7SA.js";
|
|
5
5
|
import "./workspace-store-Bmw104Qa.js";
|
|
6
|
-
import {
|
|
6
|
+
import { resolveWorkspaceFor } from "./resolve-workspace-D8y7twod.js";
|
|
7
7
|
import chalk from "chalk";
|
|
8
8
|
import { createReadStream } from "node:fs";
|
|
9
9
|
import { basename } from "node:path";
|
|
@@ -373,16 +373,16 @@ async function importHandler(flags, file) {
|
|
|
373
373
|
this.logger.debug(`Auth: ${auth.type.toUpperCase()}`);
|
|
374
374
|
this.logger.debug(`API: ${getApiUrl()}`);
|
|
375
375
|
}
|
|
376
|
-
|
|
376
|
+
{
|
|
377
377
|
let workspace;
|
|
378
378
|
try {
|
|
379
|
-
workspace = await
|
|
379
|
+
workspace = await resolveWorkspaceFor(auth, flags["workspace-id"]);
|
|
380
380
|
} catch (err) {
|
|
381
381
|
this.logger.error(err instanceof Error ? err.message : "Could not resolve the workspace.");
|
|
382
382
|
this.process.exitCode = 1;
|
|
383
383
|
return;
|
|
384
384
|
}
|
|
385
|
-
configureClient(auth, workspace.workspaceId);
|
|
385
|
+
if (workspace) configureClient(auth, workspace.workspaceId);
|
|
386
386
|
}
|
|
387
387
|
let teamId;
|
|
388
388
|
try {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { authGetSitesV1, configureClient } from "./sdk-client-
|
|
2
|
-
import "./
|
|
3
|
-
import "./
|
|
4
|
-
import { resolveToken } from "./resolve-token-
|
|
1
|
+
import { authGetSitesV1, configureClient } from "./sdk-client-BgzKzVIR.js";
|
|
2
|
+
import "./token-refresh-BpFuU4Ij.js";
|
|
3
|
+
import "./env-DjeRwmZ7.js";
|
|
4
|
+
import { resolveToken } from "./resolve-token-DKEXT7SA.js";
|
|
5
5
|
import { loadWorkspace } from "./workspace-store-Bmw104Qa.js";
|
|
6
6
|
|
|
7
7
|
//#region src/commands/workspace/listHandler.ts
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { configureClient } from "./sdk-client-
|
|
2
|
-
import { CLI_CLIENT_ID, getApiUrl, getAuthUrl, setSessionApiUrl, writeCredentials } from "./env-
|
|
1
|
+
import { configureClient } from "./sdk-client-BgzKzVIR.js";
|
|
2
|
+
import { CLI_CLIENT_ID, getApiUrl, getAuthUrl, setSessionApiUrl, writeCredentials } from "./env-DjeRwmZ7.js";
|
|
3
3
|
import { saveWorkspace } from "./workspace-store-Bmw104Qa.js";
|
|
4
|
-
import { autoSelectWorkspace, fetchSites } from "./resolve-workspace-
|
|
4
|
+
import { autoSelectWorkspace, fetchSites } from "./resolve-workspace-D8y7twod.js";
|
|
5
5
|
import { sleep } from "./sleep-CGBHjsj5.js";
|
|
6
|
-
import { findWorkspaceByKeyOrName, looksLikeUrlKey, resolveMcpUrl, scopedMcpUrl } from "./find-workspace-
|
|
6
|
+
import { findWorkspaceByKeyOrName, looksLikeUrlKey, resolveMcpUrl, scopedMcpUrl } from "./find-workspace-4Us2vEb7.js";
|
|
7
7
|
import chalk from "chalk";
|
|
8
8
|
import { createHash, randomBytes } from "node:crypto";
|
|
9
9
|
import { createServer } from "node:http";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { client, configureClient, uploadImport } from "./sdk-client-
|
|
2
|
-
import
|
|
3
|
-
import "./
|
|
4
|
-
import { resolveToken } from "./resolve-token-
|
|
1
|
+
import { client, configureClient, uploadImport } from "./sdk-client-BgzKzVIR.js";
|
|
2
|
+
import "./token-refresh-BpFuU4Ij.js";
|
|
3
|
+
import { getApiUrl, getAutomationSourceIdOverride, getSourceOverride, getTeamId } from "./env-DjeRwmZ7.js";
|
|
4
|
+
import { resolveToken } from "./resolve-token-DKEXT7SA.js";
|
|
5
5
|
import "./workspace-store-Bmw104Qa.js";
|
|
6
|
-
import {
|
|
6
|
+
import { resolveWorkspaceFor } from "./resolve-workspace-D8y7twod.js";
|
|
7
7
|
import "./sleep-CGBHjsj5.js";
|
|
8
|
-
import { resolveArtifactPath, uploadArtifactFile } from "./artifact-upload-
|
|
8
|
+
import { resolveArtifactPath, uploadArtifactFile } from "./artifact-upload-Ba801tb6.js";
|
|
9
9
|
import { readFileSync, statSync, writeFileSync } from "node:fs";
|
|
10
10
|
import { basename, dirname, resolve } from "node:path";
|
|
11
11
|
import { execSync } from "node:child_process";
|
|
@@ -474,13 +474,15 @@ async function pushHandler(flags, file) {
|
|
|
474
474
|
this.logger.debug(`Auth: ${auth.type.toUpperCase()}`);
|
|
475
475
|
this.logger.debug(`API: ${getApiUrl()}`);
|
|
476
476
|
}
|
|
477
|
-
|
|
478
|
-
const ws = await
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
477
|
+
try {
|
|
478
|
+
const ws = await resolveWorkspaceFor(auth, flags["workspace-id"]);
|
|
479
|
+
if (ws) {
|
|
480
|
+
client.setConfig({
|
|
481
|
+
...client.getConfig(),
|
|
482
|
+
workspaceId: ws.workspaceId
|
|
483
|
+
});
|
|
484
|
+
if (flags.verbose) this.logger.debug(`Workspace: ${ws.workspaceId} (${ws.source})`);
|
|
485
|
+
} else if (flags.verbose) this.logger.debug("Workspace: the token's own");
|
|
484
486
|
} catch (err) {
|
|
485
487
|
this.logger.error(err instanceof Error ? err.message : "Workspace resolution failed.");
|
|
486
488
|
this.process.exitCode = 1;
|