@astrojs/db 0.14.0-beta.1 → 0.14.0-beta.2
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.
|
@@ -9,8 +9,8 @@ import {
|
|
|
9
9
|
} from "@astrojs/studio";
|
|
10
10
|
import { slug } from "github-slugger";
|
|
11
11
|
import { bgRed, cyan } from "kleur/colors";
|
|
12
|
-
import ora from "ora";
|
|
13
12
|
import prompts from "prompts";
|
|
13
|
+
import yoctoSpinner from "yocto-spinner";
|
|
14
14
|
import { safeFetch } from "../../../../runtime/utils.js";
|
|
15
15
|
async function cmd() {
|
|
16
16
|
const sessionToken = await getSessionIdFromFile();
|
|
@@ -30,14 +30,14 @@ async function cmd() {
|
|
|
30
30
|
const workspaceId = await promptWorkspace(sessionToken);
|
|
31
31
|
const newProjectName = await promptNewProjectName();
|
|
32
32
|
const newProjectRegion = await promptNewProjectRegion();
|
|
33
|
-
const spinner =
|
|
33
|
+
const spinner = yoctoSpinner({ text: "Creating new project..." }).start();
|
|
34
34
|
const newProjectData = await createNewProject({
|
|
35
35
|
workspaceId,
|
|
36
36
|
name: newProjectName,
|
|
37
37
|
region: newProjectRegion
|
|
38
38
|
});
|
|
39
39
|
await new Promise((r) => setTimeout(r, 4e3));
|
|
40
|
-
spinner.
|
|
40
|
+
spinner.success("Project created!");
|
|
41
41
|
return await linkProject(newProjectData.id);
|
|
42
42
|
}
|
|
43
43
|
}
|
|
@@ -4,8 +4,8 @@ import { SESSION_LOGIN_FILE, getAstroStudioUrl } from "@astrojs/studio";
|
|
|
4
4
|
import { listen } from "async-listen";
|
|
5
5
|
import { cyan } from "kleur/colors";
|
|
6
6
|
import open from "open";
|
|
7
|
-
import ora from "ora";
|
|
8
7
|
import prompt from "prompts";
|
|
8
|
+
import yoctoSpinner from "yocto-spinner";
|
|
9
9
|
const isWebContainer = (
|
|
10
10
|
// Stackblitz heuristic
|
|
11
11
|
process.versions?.webcontainer ?? // GitHub Codespaces heuristic
|
|
@@ -38,9 +38,9 @@ async function cmd({
|
|
|
38
38
|
console.log(cyan(loginUrl.href));
|
|
39
39
|
console.log(`If something goes wrong, copy-and-paste the URL into your browser.`);
|
|
40
40
|
open(loginUrl.href);
|
|
41
|
-
const spinner =
|
|
41
|
+
const spinner = yoctoSpinner({ text: "Waiting for confirmation..." });
|
|
42
42
|
session = await promise;
|
|
43
|
-
spinner.
|
|
43
|
+
spinner.success("Successfully logged in");
|
|
44
44
|
}
|
|
45
45
|
await mkdir(new URL(".", SESSION_LOGIN_FILE), { recursive: true });
|
|
46
46
|
await writeFile(SESSION_LOGIN_FILE, `${session}`);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@astrojs/db",
|
|
3
|
-
"version": "0.14.0-beta.
|
|
3
|
+
"version": "0.14.0-beta.2",
|
|
4
4
|
"description": "Add libSQL and Astro Studio support to your Astro site",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
"astro-integration"
|
|
63
63
|
],
|
|
64
64
|
"dependencies": {
|
|
65
|
-
"@libsql/client": "^0.
|
|
65
|
+
"@libsql/client": "^0.14.0",
|
|
66
66
|
"async-listen": "^3.0.1",
|
|
67
67
|
"deep-diff": "^1.0.2",
|
|
68
68
|
"drizzle-orm": "^0.31.2",
|
|
@@ -70,21 +70,21 @@
|
|
|
70
70
|
"kleur": "^4.1.5",
|
|
71
71
|
"nanoid": "^5.0.7",
|
|
72
72
|
"open": "^10.1.0",
|
|
73
|
-
"ora": "^8.1.0",
|
|
74
73
|
"prompts": "^2.4.2",
|
|
75
74
|
"strip-ansi": "^7.1.0",
|
|
76
75
|
"yargs-parser": "^21.1.1",
|
|
76
|
+
"yocto-spinner": "^0.1.0",
|
|
77
77
|
"zod": "^3.23.8",
|
|
78
|
-
"@astrojs/studio": "0.1.
|
|
78
|
+
"@astrojs/studio": "0.1.2-beta.0"
|
|
79
79
|
},
|
|
80
80
|
"devDependencies": {
|
|
81
81
|
"@types/deep-diff": "^1.0.5",
|
|
82
82
|
"@types/prompts": "^2.4.9",
|
|
83
83
|
"@types/yargs-parser": "^21.0.3",
|
|
84
84
|
"cheerio": "1.0.0",
|
|
85
|
-
"typescript": "^5.
|
|
86
|
-
"vite": "^5.4.
|
|
87
|
-
"astro": "5.0.0-beta.
|
|
85
|
+
"typescript": "^5.6.2",
|
|
86
|
+
"vite": "^5.4.8",
|
|
87
|
+
"astro": "5.0.0-beta.3",
|
|
88
88
|
"astro-scripts": "0.0.14"
|
|
89
89
|
},
|
|
90
90
|
"scripts": {
|