@astroscope/boot 0.3.3 → 0.3.4

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.cjs CHANGED
@@ -238,7 +238,6 @@ function getBootContext(server, config) {
238
238
  function boot(options = {}) {
239
239
  const entry = resolveEntry(options.entry);
240
240
  const hmr = options.hmr ?? false;
241
- let isBuild = false;
242
241
  let isSSR = false;
243
242
  let bootChunkRef = null;
244
243
  let astroConfig = null;
@@ -247,7 +246,6 @@ function boot(options = {}) {
247
246
  name: "@astroscope/boot",
248
247
  hooks: {
249
248
  "astro:config:setup": ({ command, updateConfig, logger, config }) => {
250
- isBuild = command === "build";
251
249
  astroConfig = config;
252
250
  updateConfig({
253
251
  vite: {
@@ -307,7 +305,7 @@ await __astroscope_bootSetup(__astroscope_boot, ${JSON.stringify({ host, port })
307
305
  name: "@astroscope/boot/startup",
308
306
  enforce: "post",
309
307
  async configureServer(server) {
310
- if (isBuild) return;
308
+ if (command !== "dev") return;
311
309
  try {
312
310
  const bootContext = getBootContext(server, astroConfig);
313
311
  const module2 = await server.ssrLoadModule(`/${entry}`);
package/dist/index.js CHANGED
@@ -168,7 +168,6 @@ function getBootContext(server, config) {
168
168
  function boot(options = {}) {
169
169
  const entry = resolveEntry(options.entry);
170
170
  const hmr = options.hmr ?? false;
171
- let isBuild = false;
172
171
  let isSSR = false;
173
172
  let bootChunkRef = null;
174
173
  let astroConfig = null;
@@ -177,7 +176,6 @@ function boot(options = {}) {
177
176
  name: "@astroscope/boot",
178
177
  hooks: {
179
178
  "astro:config:setup": ({ command, updateConfig, logger, config }) => {
180
- isBuild = command === "build";
181
179
  astroConfig = config;
182
180
  updateConfig({
183
181
  vite: {
@@ -237,7 +235,7 @@ await __astroscope_bootSetup(__astroscope_boot, ${JSON.stringify({ host, port })
237
235
  name: "@astroscope/boot/startup",
238
236
  enforce: "post",
239
237
  async configureServer(server) {
240
- if (isBuild) return;
238
+ if (command !== "dev") return;
241
239
  try {
242
240
  const bootContext = getBootContext(server, astroConfig);
243
241
  const module = await server.ssrLoadModule(`/${entry}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@astroscope/boot",
3
- "version": "0.3.3",
3
+ "version": "0.3.4",
4
4
  "description": "Startup and graceful shutdown hooks for Astro SSR",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -55,8 +55,8 @@
55
55
  "scripts": {
56
56
  "build": "tsup src/index.ts src/warmup.ts src/events.ts src/lifecycle.ts src/setup.ts src/prepend.ts --format esm,cjs --dts",
57
57
  "typecheck": "tsc --noEmit",
58
- "lint": "eslint 'src/**/*.{ts,tsx}'",
59
- "lint:fix": "eslint 'src/**/*.{ts,tsx}' --fix"
58
+ "lint": "eslint src",
59
+ "lint:fix": "eslint src --fix"
60
60
  },
61
61
  "devDependencies": {
62
62
  "astro": "^5.17.1",