donebear 0.5.0 → 0.5.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/cli.mjs +5 -5
- package/dist/cli.mjs.map +1 -1
- package/dist/context-store-CG0wdjGM.mjs +2 -0
- package/dist/{context-store-ByUXl7Cn.mjs → context-store-CdRuvvVL.mjs} +2 -2
- package/dist/context-store-CdRuvvVL.mjs.map +1 -0
- package/package.json +1 -1
- package/dist/context-store-BuhPB0I9.mjs +0 -2
- package/dist/context-store-ByUXl7Cn.mjs.map +0 -1
package/dist/cli.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { S as DONEBEAR_TOKEN_ENV, _ as DONEBEAR_API_URL_ENV, a as SyncMutationRejectedError, c as CLI_NAME, f as DEFAULT_APP_URL, i as EXIT_CODES, m as DEFAULT_OAUTH_CALLBACK_PORT, n as setCurrentWorkspace, o as toCliError, p as DEFAULT_OAUTH_CALLBACK_PATH, r as CliError, s as AUTH_FILE_PATH, t as ensureLocalContext, u as CONFIG_DIR } from "./context-store-
|
|
2
|
+
import { S as DONEBEAR_TOKEN_ENV, _ as DONEBEAR_API_URL_ENV, a as SyncMutationRejectedError, c as CLI_NAME, f as DEFAULT_APP_URL, i as EXIT_CODES, m as DEFAULT_OAUTH_CALLBACK_PORT, n as setCurrentWorkspace, o as toCliError, p as DEFAULT_OAUTH_CALLBACK_PATH, r as CliError, s as AUTH_FILE_PATH, t as ensureLocalContext, u as CONFIG_DIR } from "./context-store-CdRuvvVL.mjs";
|
|
3
3
|
import { n as readStdin, t as promptForValue } from "./prompt-Bv9qkjNw.mjs";
|
|
4
4
|
import { createRequire } from "node:module";
|
|
5
5
|
import { mkdir, readFile, rm, writeFile } from "node:fs/promises";
|
|
@@ -393,7 +393,7 @@ const clearStoredAuthSession = async () => {
|
|
|
393
393
|
//#endregion
|
|
394
394
|
//#region src/supabase.ts
|
|
395
395
|
const resolveSupabaseConfig = () => {
|
|
396
|
-
const url = readEnvValue("DONEBEAR_SUPABASE_URL") ?? "https://
|
|
396
|
+
const url = readEnvValue("DONEBEAR_SUPABASE_URL") ?? "https://auth.donebear.com";
|
|
397
397
|
return {
|
|
398
398
|
publishableKey: readEnvValue("DONEBEAR_SUPABASE_PUBLISHABLE_KEY") ?? "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImtkYXJ2cHV0eG1seHFlbWlzbmJoIiwicm9sZSI6ImFub24iLCJpYXQiOjE3NzIzNTcyNjcsImV4cCI6MjA4NzkzMzI2N30.A8sDPWNe_1EcCy0-GsUw4h1icxSGz_VDc9E9tPTYEU8",
|
|
399
399
|
url
|
|
@@ -2304,8 +2304,8 @@ const openUrl = async (url) => {
|
|
|
2304
2304
|
//#endregion
|
|
2305
2305
|
//#region src/command-parsers.ts
|
|
2306
2306
|
const parsePositiveInteger = (value, label) => {
|
|
2307
|
-
const parsed = Number
|
|
2308
|
-
if (!Number.
|
|
2307
|
+
const parsed = Number(value);
|
|
2308
|
+
if (!/^\d+$/u.test(value) || !Number.isSafeInteger(parsed) || parsed <= 0) throw new Error(`${label} must be a positive integer`);
|
|
2309
2309
|
return parsed;
|
|
2310
2310
|
};
|
|
2311
2311
|
//#endregion
|
|
@@ -4391,7 +4391,7 @@ const checkAuth = async (context) => {
|
|
|
4391
4391
|
};
|
|
4392
4392
|
const checkWorkspace = async () => {
|
|
4393
4393
|
try {
|
|
4394
|
-
const { ensureLocalContext } = await import("./context-store-
|
|
4394
|
+
const { ensureLocalContext } = await import("./context-store-CG0wdjGM.mjs");
|
|
4395
4395
|
const localContext = await ensureLocalContext();
|
|
4396
4396
|
if (!localContext.workspaceId) return {
|
|
4397
4397
|
message: "No workspace selected (run `donebear workspace use`)",
|