patchrelay 0.9.1 → 0.10.1
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/build-info.json +3 -3
- package/dist/cli/index.js +5 -0
- package/dist/linear-oauth.js +9 -3
- package/package.json +1 -1
package/dist/build-info.json
CHANGED
package/dist/cli/index.js
CHANGED
|
@@ -108,6 +108,11 @@ export async function runCli(argv, options) {
|
|
|
108
108
|
let commandArgs;
|
|
109
109
|
try {
|
|
110
110
|
parsed = parseArgs(argv);
|
|
111
|
+
if (parsed.flags.get("version") === true) {
|
|
112
|
+
const buildInfo = getBuildInfo();
|
|
113
|
+
writeOutput(stdout, `${buildInfo.version}\n`);
|
|
114
|
+
return 0;
|
|
115
|
+
}
|
|
111
116
|
({ command, commandArgs } = resolveCommand(parsed));
|
|
112
117
|
validateFlags(command, commandArgs, parsed);
|
|
113
118
|
}
|
package/dist/linear-oauth.js
CHANGED
|
@@ -96,6 +96,11 @@ export async function fetchLinearViewerIdentity(graphqlUrl, accessToken, logger)
|
|
|
96
96
|
id
|
|
97
97
|
name
|
|
98
98
|
}
|
|
99
|
+
organization {
|
|
100
|
+
id
|
|
101
|
+
name
|
|
102
|
+
urlKey
|
|
103
|
+
}
|
|
99
104
|
teams {
|
|
100
105
|
nodes {
|
|
101
106
|
id
|
|
@@ -111,12 +116,13 @@ export async function fetchLinearViewerIdentity(graphqlUrl, accessToken, logger)
|
|
|
111
116
|
if (!response.ok || !payload?.data) {
|
|
112
117
|
throw new Error(`Linear viewer lookup failed with HTTP ${response.status}`);
|
|
113
118
|
}
|
|
119
|
+
const org = payload.data.organization;
|
|
114
120
|
const teams = payload.data.teams?.nodes ?? [];
|
|
115
121
|
const firstTeam = teams.find((team) => team?.id || team?.name || team?.key);
|
|
116
122
|
const result = {
|
|
117
|
-
...(firstTeam?.id ? { workspaceId: firstTeam.id } : {}),
|
|
118
|
-
...(
|
|
119
|
-
...(firstTeam?.key ? { workspaceKey: firstTeam.key } : {}),
|
|
123
|
+
...(org?.id ? { workspaceId: org.id } : firstTeam?.id ? { workspaceId: firstTeam.id } : {}),
|
|
124
|
+
...(org?.name ? { workspaceName: org.name } : {}),
|
|
125
|
+
...(org?.urlKey ? { workspaceKey: org.urlKey } : firstTeam?.key ? { workspaceKey: firstTeam.key } : {}),
|
|
120
126
|
...(payload.data.viewer?.id ? { actorId: payload.data.viewer.id } : {}),
|
|
121
127
|
...(payload.data.viewer?.name ? { actorName: payload.data.viewer.name } : {}),
|
|
122
128
|
};
|