@postonus/cli 0.1.46 → 0.1.47
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/index.js +6 -4
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -12874,7 +12874,7 @@ function formatTable(headers, rows, isTty = process.stdout.isTTY) {
|
|
|
12874
12874
|
}
|
|
12875
12875
|
|
|
12876
12876
|
// src/version.ts
|
|
12877
|
-
var CLI_VERSION = "0.1.
|
|
12877
|
+
var CLI_VERSION = "0.1.47";
|
|
12878
12878
|
|
|
12879
12879
|
// src/client.ts
|
|
12880
12880
|
var DEVICE_CODE_GRANT_TYPE = "urn:ietf:params:oauth:grant-type:device_code";
|
|
@@ -13240,10 +13240,12 @@ async function pollForToken(apiUrl, clientId, device) {
|
|
|
13240
13240
|
}
|
|
13241
13241
|
function LoginPrompt({ device, run }) {
|
|
13242
13242
|
const exit = useExit();
|
|
13243
|
+
const runRef = React2.useRef(run);
|
|
13244
|
+
const exitRef = React2.useRef(exit);
|
|
13243
13245
|
React2.useEffect(() => {
|
|
13244
|
-
|
|
13245
|
-
() =>
|
|
13246
|
-
(cause) =>
|
|
13246
|
+
runRef.current().then(
|
|
13247
|
+
() => exitRef.current(),
|
|
13248
|
+
(cause) => exitRef.current(cause instanceof Error ? cause : new Error(String(cause)))
|
|
13247
13249
|
);
|
|
13248
13250
|
}, []);
|
|
13249
13251
|
return /* @__PURE__ */ jsxs2(Box2, { flexDirection: "column", gap: 1, paddingY: 1, children: [
|