From 222a162da22bfa3b3189c3153bf16d7b63dc165b Mon Sep 17 00:00:00 2001 From: Mike Wu Date: Fri, 21 Feb 2025 00:02:44 +0900 Subject: [PATCH] fix: add loader (nanospinner) --- lib/interact-for-access-code.ts | 10 +- lib/interact-for-acs-entrance.ts | 6 +- lib/interact-for-acs-system.ts | 6 +- lib/interact-for-acs-user.ts | 10 +- lib/interact-for-action-attempt-poll.ts | 12 +- lib/interact-for-connected-account.ts | 7 +- lib/interact-for-credential-pool.ts | 13 +- lib/interact-for-device.ts | 6 +- lib/interact-for-user-identity.ts | 6 +- lib/interact-for-workspace-id.ts | 6 +- lib/util/request-seam-api.ts | 9 +- lib/util/with-loading.ts | 17 ++ package-lock.json | 264 +++++++++++++++++++++++- package.json | 1 + 14 files changed, 339 insertions(+), 34 deletions(-) create mode 100644 lib/util/with-loading.ts diff --git a/lib/interact-for-access-code.ts b/lib/interact-for-access-code.ts index 04ffa81..22d8a6b 100644 --- a/lib/interact-for-access-code.ts +++ b/lib/interact-for-access-code.ts @@ -1,6 +1,7 @@ import prompts from "prompts" import { getSeam } from "./get-seam" import { interactForDevice } from "./interact-for-device" +import { withLoading } from "./util/with-loading" export const interactForAccessCode = async ({ device_id, @@ -13,10 +14,11 @@ export const interactForAccessCode = async ({ device_id = await interactForDevice() } - const accessCodes = await seam.accessCodes.list({ - device_id, - }) - + const accessCodes = await withLoading("Fetching access codes...", () => + seam.accessCodes.list({ + device_id, + }) + ) const { accessCodeId } = await prompts({ name: "accessCodeId", type: "autocomplete", diff --git a/lib/interact-for-acs-entrance.ts b/lib/interact-for-acs-entrance.ts index 6f54b34..5c2e934 100644 --- a/lib/interact-for-acs-entrance.ts +++ b/lib/interact-for-acs-entrance.ts @@ -1,11 +1,13 @@ import prompts from "prompts" import { getSeam } from "./get-seam" +import { withLoading } from "./util/with-loading" export const interactForAcsEntrance = async () => { const seam = await getSeam() - const entrances = await seam.acs.entrances.list() - + const entrances = await withLoading("Fetching ACS entrances...", () => + seam.acs.entrances.list() + ) const { acsEntranceId } = await prompts({ name: "acsEntranceId", type: "autocomplete", diff --git a/lib/interact-for-acs-system.ts b/lib/interact-for-acs-system.ts index 7decac2..6f6ee2e 100644 --- a/lib/interact-for-acs-system.ts +++ b/lib/interact-for-acs-system.ts @@ -1,11 +1,13 @@ import prompts from "prompts" import { getSeam } from "./get-seam" +import { withLoading } from "./util/with-loading" export const interactForAcsSystem = async (message?: string) => { const seam = await getSeam() - const systems = await seam.acs.systems.list() - + const systems = await withLoading("Fetching ACS systems...", () => + seam.acs.systems.list() + ) const { acsSystemId } = await prompts({ name: "acsSystemId", type: "autocomplete", diff --git a/lib/interact-for-acs-user.ts b/lib/interact-for-acs-user.ts index 1682aa5..3d08739 100644 --- a/lib/interact-for-acs-user.ts +++ b/lib/interact-for-acs-user.ts @@ -1,6 +1,7 @@ import prompts from "prompts" import { getSeam } from "./get-seam" import { interactForAcsSystem } from "./interact-for-acs-system" +import { withLoading } from "./util/with-loading" export const interactForAcsUser = async () => { const seam = await getSeam() @@ -9,10 +10,11 @@ export const interactForAcsUser = async () => { "What acs_system does the acs_user belong to?" ) - const users = await seam.acs.users.list({ - acs_system_id, - }) - + const users = await withLoading("Fetching ACS users...", () => + seam.acs.users.list({ + acs_system_id, + }) + ) const { acsUserId } = await prompts({ name: "acsUserId", type: "autocomplete", diff --git a/lib/interact-for-action-attempt-poll.ts b/lib/interact-for-action-attempt-poll.ts index 339e1bf..c8c1578 100644 --- a/lib/interact-for-action-attempt-poll.ts +++ b/lib/interact-for-action-attempt-poll.ts @@ -1,6 +1,7 @@ import prompts from "prompts" import { getSeam } from "./get-seam" import { ActionAttemptsGetResponse } from "@seamapi/http/connect" +import { withLoading } from "./util/with-loading" export const interactForActionAttemptPoll = async ( action_attempt: ActionAttemptsGetResponse["action_attempt"] @@ -19,11 +20,14 @@ export const interactForActionAttemptPoll = async ( const seam = await getSeam() const { action_attempt_id } = action_attempt - const updated_action_attempt = await seam.actionAttempts.get( - { action_attempt_id }, - { waitForActionAttempt: { pollingInterval: 240, timeout: 10_000 } } + const updated_action_attempt = await withLoading( + "Polling action attempt...", + () => + seam.actionAttempts.get( + { action_attempt_id }, + { waitForActionAttempt: { pollingInterval: 240, timeout: 10_000 } } + ) ) - console.dir(updated_action_attempt, { depth: null }) } } diff --git a/lib/interact-for-connected-account.ts b/lib/interact-for-connected-account.ts index 7005fc7..44c5564 100644 --- a/lib/interact-for-connected-account.ts +++ b/lib/interact-for-connected-account.ts @@ -1,11 +1,14 @@ import prompts from "prompts" import { getSeam } from "./get-seam" import { getConfigStore } from "./get-config-store" +import { withLoading } from "./util/with-loading" export const interactForConnectedAccount = async () => { const seam = await getSeam() - const connected_accounts = await seam.connectedAccounts.list() - + const connected_accounts = await withLoading( + "Fetching connected accounts...", + () => seam.connectedAccounts.list() + ) const { connectedAccountId } = await prompts({ name: "connectedAccountId", type: "autocomplete", diff --git a/lib/interact-for-credential-pool.ts b/lib/interact-for-credential-pool.ts index fbca57f..b9a17fb 100644 --- a/lib/interact-for-credential-pool.ts +++ b/lib/interact-for-credential-pool.ts @@ -1,6 +1,7 @@ import prompts from "prompts" import { getSeam } from "./get-seam" import { interactForAcsSystem } from "./interact-for-acs-system" +import { withLoading } from "./util/with-loading" export const interactForCredentialPool = async () => { const seam = await getSeam() @@ -8,11 +9,13 @@ export const interactForCredentialPool = async () => { const acs_system_id = await interactForAcsSystem( "What acs_system does the credential pool belong to?" ) - - const credentialPools = await seam.acs.credentialPools.list({ - acs_system_id, - }) - + const credentialPools = await withLoading( + "Fetching ACS credential pools...", + () => + seam.acs.credentialPools.list({ + acs_system_id, + }) + ) const { credentialPoolId } = await prompts({ name: "credentialPoolId", type: "autocomplete", diff --git a/lib/interact-for-device.ts b/lib/interact-for-device.ts index 693f502..e585feb 100644 --- a/lib/interact-for-device.ts +++ b/lib/interact-for-device.ts @@ -1,11 +1,13 @@ import prompts from "prompts" import { getSeam } from "./get-seam" import { getConfigStore } from "./get-config-store" +import { withLoading } from "./util/with-loading" export const interactForDevice = async () => { const seam = await getSeam() - const devices = await seam.devices.list() - + const devices = await withLoading("Fetching devices...", () => + seam.devices.list() + ) const { deviceId } = await prompts({ name: "deviceId", type: "autocomplete", diff --git a/lib/interact-for-user-identity.ts b/lib/interact-for-user-identity.ts index 1657496..77ef3a7 100644 --- a/lib/interact-for-user-identity.ts +++ b/lib/interact-for-user-identity.ts @@ -1,11 +1,13 @@ import prompts from "prompts" import { getSeam } from "./get-seam" +import { withLoading } from "./util/with-loading" export const interactForUserIdentity = async () => { const seam = await getSeam() - const uis = await seam.userIdentities.list() - + const uis = await withLoading("Fetching user identities...", () => + seam.userIdentities.list() + ) const { userIdentityId } = await prompts({ name: "userIdentityId", type: "autocomplete", diff --git a/lib/interact-for-workspace-id.ts b/lib/interact-for-workspace-id.ts index 4d4a54c..77e706e 100644 --- a/lib/interact-for-workspace-id.ts +++ b/lib/interact-for-workspace-id.ts @@ -1,13 +1,15 @@ import { getConfigStore } from "./get-config-store" import prompts from "prompts" import { getSeam, getSeamMultiWorkspace } from "./get-seam" +import { withLoading } from "./util/with-loading" export const interactForWorkspaceId = async () => { const config = getConfigStore() const seam = await getSeamMultiWorkspace() - const workspaces = await seam.workspaces.list() - + const workspaces = await withLoading("Fetching workspaces...", () => + seam.workspaces.list() + ) const { workspaceId } = await prompts({ name: "workspaceId", type: "select", diff --git a/lib/util/request-seam-api.ts b/lib/util/request-seam-api.ts index bac76c1..192cfcc 100644 --- a/lib/util/request-seam-api.ts +++ b/lib/util/request-seam-api.ts @@ -1,6 +1,7 @@ import type { AxiosResponse } from "axios" import chalk from "chalk" import { getSeam } from "../get-seam" +import { withLoading } from "./with-loading" export const RequestSeamApi = async ({ path, @@ -13,9 +14,11 @@ export const RequestSeamApi = async ({ logRequest(path, params) - const response = await seam.client.post(path, params, { - validateStatus: () => true, - }) + const response = await withLoading("Making request...", () => + seam.client.post(path, params, { + validateStatus: () => true, + }) + ) logResponse(response) diff --git a/lib/util/with-loading.ts b/lib/util/with-loading.ts new file mode 100644 index 0000000..614ab67 --- /dev/null +++ b/lib/util/with-loading.ts @@ -0,0 +1,17 @@ +import { createSpinner } from "nanospinner" + +export const withLoading = async ( + message: string, + fn: () => Promise +): Promise => { + const spinner = createSpinner(message).start() + try { + await new Promise((resolve) => setTimeout(resolve, 5000)) + const result = await fn() + spinner.success() + return result + } catch (error) { + spinner.error() + throw error + } +} diff --git a/package-lock.json b/package-lock.json index b448982..c37134e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,7 +10,10 @@ "dependencies": { "@seamapi/http": "^0.34.1", "@seamapi/types": "^1.353.2", + "cli-spinners": "^3.2.0", + "nanospinner": "^1.2.2", "open": "^10.0.3", + "ora": "^8.2.0", "swagger-parser": "^10.0.3" }, "bin": { @@ -27,7 +30,7 @@ "@types/prompts": "^2.4.9", "@vercel/ncc": "^0.38.1", "axios": "^1.6.2", - "bun-types": "*", + "bun-types": "latest", "chalk": "^5.3.0", "command-line-usage": "^7.0.1", "configstore": "^6.0.0", @@ -1351,7 +1354,6 @@ "version": "5.3.0", "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.3.0.tgz", "integrity": "sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w==", - "dev": true, "engines": { "node": "^12.17.0 || ^14.13 || >=16.0.0" }, @@ -1423,6 +1425,33 @@ "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==", "dev": true }, + "node_modules/cli-cursor": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-5.0.0.tgz", + "integrity": "sha512-aCj4O5wKyszjMmDT4tZj93kxyydN/K5zPWSCe6/0AV/AA1pqe5ZBIw0a2ZfPQV7lL5/yb5HsUreJ6UFAF1tEQw==", + "license": "MIT", + "dependencies": { + "restore-cursor": "^5.0.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/cli-spinners": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-3.2.0.tgz", + "integrity": "sha512-pXftdQloMZzjCr3pCTIRniDcys6dDzgpgVhAHHk6TKBDbRuP1MkuetTF5KSv4YUutbOPa7+7ZrAJ2kVtbMqyXA==", + "license": "MIT", + "engines": { + "node": ">=18.20" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/cliui": { "version": "7.0.4", "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", @@ -1972,6 +2001,18 @@ "node": "6.* || 8.* || >= 10.*" } }, + "node_modules/get-east-asian-width": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/get-east-asian-width/-/get-east-asian-width-1.3.0.tgz", + "integrity": "sha512-vpeMIQKxczTD/0s2CdEWHcb0eeJe6TFjxb+J5xgX7hScxqrGuyjmv4c1D4A/gelKfyox0gJJwIHF+fLjeaM8kQ==", + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/get-stream": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", @@ -2273,6 +2314,18 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/is-interactive": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-interactive/-/is-interactive-2.0.0.tgz", + "integrity": "sha512-qP1vozQRI+BMOPcjFzrjXuQvdak2pHNUMZoeG2eRbiSqyvbEf/wQtEOTOX1guk6E3t36RkaqiSt8A/6YElNxLQ==", + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/is-number": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", @@ -2320,6 +2373,18 @@ "integrity": "sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA==", "dev": true }, + "node_modules/is-unicode-supported": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-2.1.0.tgz", + "integrity": "sha512-mE00Gnza5EEB3Ds0HfMyllZzbBrmLOX3vfWoj9A9PEnTfratQ/BcaJOuMhnkhjXvb2+FkY3VuHqtAGpTPmglFQ==", + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/is-wsl": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-3.1.0.tgz", @@ -2456,6 +2521,34 @@ "integrity": "sha512-HDWXG8isMntAyRF5vZ7xKuEvOhT4AhlRt/3czTSjvGUxjYCBVRQY48ViDHyfYz9VIoBkW4TMGQNapx+l3RUwdA==", "dev": true }, + "node_modules/log-symbols": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-6.0.0.tgz", + "integrity": "sha512-i24m8rpwhmPIS4zscNzK6MSEhk0DUWa/8iYQWxhffV8jkI4Phvs3F+quL5xvS0gdQR0FyTCMMH33Y78dDTzzIw==", + "license": "MIT", + "dependencies": { + "chalk": "^5.3.0", + "is-unicode-supported": "^1.3.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/log-symbols/node_modules/is-unicode-supported": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-1.3.0.tgz", + "integrity": "sha512-43r2mRvz+8JRIKnWJ+3j8JtjRKZ6GmjzfaE/qiBJnikNnYv/6bagRJ1kUhNk8R5EX/GkobD+r+sfxCPJsiKBLQ==", + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/lru-cache": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", @@ -2524,6 +2617,18 @@ "node": ">=6" } }, + "node_modules/mimic-function": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/mimic-function/-/mimic-function-5.0.1.tgz", + "integrity": "sha512-VP79XUPxV2CigYP3jWwAUFSku2aKqBH7uTAapFWCBqutsbmDo96KY5o8uh6U+/YSIn5OxJnXp73beVkpqMIGhA==", + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/mimic-response": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-3.1.0.tgz", @@ -2612,6 +2717,15 @@ "thenify-all": "^1.0.0" } }, + "node_modules/nanospinner": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/nanospinner/-/nanospinner-1.2.2.tgz", + "integrity": "sha512-Zt/AmG6qRU3e+WnzGGLuMCEAO/dAu45stNbHY223tUxldaDAeE+FxSPsd9Q+j+paejmm0ZbrNVs5Sraqy3dRxA==", + "license": "MIT", + "dependencies": { + "picocolors": "^1.1.1" + } + }, "node_modules/napi-build-utils": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/napi-build-utils/-/napi-build-utils-1.0.2.tgz", @@ -2748,6 +2862,91 @@ "resolved": "https://registry.npmjs.org/openapi-types/-/openapi-types-12.1.3.tgz", "integrity": "sha512-N4YtSYJqghVu4iek2ZUvcN/0aqH1kRDuNqzcycDxhOUpg7GdvLa2F3DgS6yBNhInhv2r/6I0Flkn7CqL8+nIcw==" }, + "node_modules/ora": { + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/ora/-/ora-8.2.0.tgz", + "integrity": "sha512-weP+BZ8MVNnlCm8c0Qdc1WSWq4Qn7I+9CJGm7Qali6g44e/PUzbjNqJX5NJ9ljlNMosfJvg1fKEGILklK9cwnw==", + "license": "MIT", + "dependencies": { + "chalk": "^5.3.0", + "cli-cursor": "^5.0.0", + "cli-spinners": "^2.9.2", + "is-interactive": "^2.0.0", + "is-unicode-supported": "^2.0.0", + "log-symbols": "^6.0.0", + "stdin-discarder": "^0.2.2", + "string-width": "^7.2.0", + "strip-ansi": "^7.1.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ora/node_modules/ansi-regex": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.1.0.tgz", + "integrity": "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==", + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/ora/node_modules/cli-spinners": { + "version": "2.9.2", + "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.9.2.tgz", + "integrity": "sha512-ywqV+5MmyL4E7ybXgKys4DugZbX0FC6LnwrhjuykIjnK9k8OQacQ7axGKnjDXWNhns0xot3bZI5h55H8yo9cJg==", + "license": "MIT", + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ora/node_modules/emoji-regex": { + "version": "10.4.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.4.0.tgz", + "integrity": "sha512-EC+0oUMY1Rqm4O6LLrgjtYDvcVYTy7chDnM4Q7030tP4Kwj3u/pR6gP9ygnp2CJMK5Gq+9Q2oqmrFJAz01DXjw==", + "license": "MIT" + }, + "node_modules/ora/node_modules/string-width": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-7.2.0.tgz", + "integrity": "sha512-tsaTIkKW9b4N+AEj+SVA+WhJzV7/zMhcSu78mLKWSk7cXMOSHsBKFWUs0fWwq8QyK3MgJBQRX6Gbi4kYbdvGkQ==", + "license": "MIT", + "dependencies": { + "emoji-regex": "^10.3.0", + "get-east-asian-width": "^1.0.0", + "strip-ansi": "^7.1.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ora/node_modules/strip-ansi": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", + "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", + "license": "MIT", + "dependencies": { + "ansi-regex": "^6.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, "node_modules/p-is-promise": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/p-is-promise/-/p-is-promise-3.0.0.tgz", @@ -2790,6 +2989,12 @@ "node": ">=8" } }, + "node_modules/picocolors": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", + "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", + "license": "ISC" + }, "node_modules/picomatch": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", @@ -3140,6 +3345,49 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/restore-cursor": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-5.1.0.tgz", + "integrity": "sha512-oMA2dcrw6u0YfxJQXm342bFKX/E4sG9rbTzO9ptUcR/e8A33cHuvStiYOwH7fszkZlZ1z/ta9AAoPk2F4qIOHA==", + "license": "MIT", + "dependencies": { + "onetime": "^7.0.0", + "signal-exit": "^4.1.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/restore-cursor/node_modules/onetime": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-7.0.0.tgz", + "integrity": "sha512-VXJjc87FScF88uafS3JllDgvAm+c/Slfz06lorj2uAY34rlUu0Nt+v8wreiImcrgAjjIHp1rXpTDlLOGw29WwQ==", + "license": "MIT", + "dependencies": { + "mimic-function": "^5.0.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/restore-cursor/node_modules/signal-exit": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", + "license": "ISC", + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/reusify": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", @@ -3332,6 +3580,18 @@ "node": ">= 8" } }, + "node_modules/stdin-discarder": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/stdin-discarder/-/stdin-discarder-0.2.2.tgz", + "integrity": "sha512-UhDfHmA92YAlNnCfhmq0VeNL5bDbiZGg7sZ2IvPsXubGkiNa9EC+tUTsjBRsYUAz87btI6/1wf4XoVvQ3uRnmQ==", + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/stream-meter": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/stream-meter/-/stream-meter-1.0.4.tgz", diff --git a/package.json b/package.json index eeda7c2..8656917 100644 --- a/package.json +++ b/package.json @@ -55,6 +55,7 @@ "dependencies": { "@seamapi/http": "^0.34.1", "@seamapi/types": "^1.353.2", + "nanospinner": "^1.2.2", "open": "^10.0.3", "swagger-parser": "^10.0.3" }