@acms-subir/core 0.3.23 → 0.3.24
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/CHANGELOG.md +6 -0
- package/cli/preview.mjs +3 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @acms-subir/core
|
|
2
2
|
|
|
3
|
+
## 0.3.24
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- fdab131: `acms check --build`, `acms theme check --build` and `acms theme dev` no longer break a running `npm run dev`. The isolated test project links the project's `node_modules`, so it used to share Vite's dependency cache (`node_modules/.vite`) and Astro's build cache (`node_modules/.astro`) with the dev server. Pre-bundling in the test project replaced the files the dev server was serving, and admin pages went blank with 504 "Outdated Optimize Dep" errors until the dev server restarted. The test project now keeps both caches in its own temporary folder under `.acms/previews/`.
|
|
8
|
+
|
|
3
9
|
## 0.3.23
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
package/cli/preview.mjs
CHANGED
|
@@ -15,7 +15,9 @@ export async function prepareFixture(p,dir,slug){
|
|
|
15
15
|
await mkdir(join(root,'src/pages/acms-theme-preview'),{recursive:true});await mkdir(join(root,'src/actions'),{recursive:true});
|
|
16
16
|
await writeFile(join(root,'src/actions/index.ts'),"export { server } from '@acms-subir/core/actions';\n");
|
|
17
17
|
await writeFile(join(root,'package.json'),JSON.stringify({name:'acms-isolated-preview',type:'module',private:true}));
|
|
18
|
-
|
|
18
|
+
// node_modules is the project's own, so the default caches (node_modules/.vite, node_modules/.astro) would be too:
|
|
19
|
+
// the fixture's dependency pre-bundling would replace the files a running `npm run dev` serves. Keep them in the fixture.
|
|
20
|
+
await writeFile(join(root,'astro.config.mjs'),`import {defineConfig,passthroughImageService} from 'astro/config';\nimport react from '@astrojs/react';\nimport node from '@astrojs/node';\nimport cloudflare from '@astrojs/cloudflare';\nimport acms from '@acms-subir/core';\nexport default defineConfig({output:'server',cacheDir:${JSON.stringify(join(root,'.astro-cache'))},vite:{cacheDir:${JSON.stringify(join(root,'.vite'))},resolve:{preserveSymlinks:true}},integrations:[react(),acms({seed:{siteTitle:'Theme preview — synthetic content'}})],adapter:process.env.DEPLOY_TARGET==='cloudflare'?cloudflare({platformProxy:{enabled:false},imageService:'passthrough'}):node({mode:'standalone'}),image:{service:passthroughImageService()}});\n`);
|
|
19
21
|
await writeFile(join(root,'src/pages/acms-theme-preview/setup.astro'),`---
|
|
20
22
|
import {getRepo} from ${JSON.stringify(join(CORE,'src/lib/repo/index.ts'))};
|
|
21
23
|
const repo=await getRepo(Astro.locals);
|