@astrojs/db 0.13.2-alpha.1 → 0.14.0-beta.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.
@@ -27,7 +27,7 @@ function printHelp({
27
27
  message.push(
28
28
  linebreak(),
29
29
  ` ${bgGreen(black(` ${commandName} `))} ${green(
30
- `v${"0.13.2-alpha.1"}`
30
+ `v${"0.14.0-beta.1"}`
31
31
  )} ${headline}`
32
32
  );
33
33
  }
@@ -45,14 +45,13 @@ function astroDBIntegration() {
45
45
  inProgress: false
46
46
  };
47
47
  let command;
48
- let output = "server";
48
+ let finalBuildOutput;
49
49
  return {
50
50
  name: "astro:db",
51
51
  hooks: {
52
52
  "astro:config:setup": async ({ updateConfig, config, command: _command, logger }) => {
53
53
  command = _command;
54
54
  root = config.root;
55
- output = config.output;
56
55
  if (command === "preview") return;
57
56
  let dbPlugin = void 0;
58
57
  const args = parseArgs(process.argv.slice(3));
@@ -87,8 +86,9 @@ function astroDBIntegration() {
87
86
  }
88
87
  });
89
88
  },
90
- "astro:config:done": async ({ config, injectTypes }) => {
89
+ "astro:config:done": async ({ config, injectTypes, buildOutput }) => {
91
90
  if (command === "preview") return;
91
+ finalBuildOutput = buildOutput;
92
92
  const { dbConfig, dependencies, integrationSeedPaths } = await resolveDbConfig(config);
93
93
  tables.get = () => dbConfig.tables;
94
94
  seedFiles.get = () => integrationSeedPaths;
@@ -133,7 +133,7 @@ function astroDBIntegration() {
133
133
  }, 100);
134
134
  },
135
135
  "astro:build:start": async ({ logger }) => {
136
- if (!connectToRemote && !databaseFileEnvDefined() && (output === "server" || output === "hybrid")) {
136
+ if (!connectToRemote && !databaseFileEnvDefined() && finalBuildOutput === "server") {
137
137
  const message = `Attempting to build without the --remote flag or the ASTRO_DATABASE_FILE environment variable defined. You probably want to pass --remote to astro build.`;
138
138
  const hint = "Learn more connecting to Studio: https://docs.astro.build/en/guides/astro-db/#connect-to-astro-studio";
139
139
  throw new AstroDbError(message, hint);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@astrojs/db",
3
- "version": "0.13.2-alpha.1",
3
+ "version": "0.14.0-beta.1",
4
4
  "description": "Add libSQL and Astro Studio support to your Astro site",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -83,9 +83,9 @@
83
83
  "@types/yargs-parser": "^21.0.3",
84
84
  "cheerio": "1.0.0",
85
85
  "typescript": "^5.5.4",
86
- "vite": "^5.4.2",
87
- "astro-scripts": "0.0.14",
88
- "astro": "5.0.0-alpha.4"
86
+ "vite": "^5.4.3",
87
+ "astro": "5.0.0-beta.1",
88
+ "astro-scripts": "0.0.14"
89
89
  },
90
90
  "scripts": {
91
91
  "types:virtual": "tsc -p ./tsconfig.virtual.json",