@stacksjs/cms 0.74.51 → 0.74.52

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.
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ import process from"node:process";const[root,portArg,publicDir,siteJson]=process.argv.slice(2),port=Number(portArg),dbPath=process.env.DB_DATABASE_PATH;if(!root||!Number.isInteger(port)||port<=0||!publicDir||!siteJson)throw Error("usage: stx-cms-server.ts <root> <port> <publicDir> <siteJson>");if(process.env.DB_CONNECTION!=="sqlite"||!dbPath)throw Error("stx-cms-server.ts needs DB_CONNECTION=sqlite and DB_DATABASE_PATH");const site=JSON.parse(siteJson);(async()=>{const reader=Bun.stdin.stream().getReader();while(!(await reader.read()).done);process.exit(0)})();process.chdir(root);const{ensureDatabaseConfigLoaded,initializeDbConfig}=await import("@stacksjs/database");await ensureDatabaseConfigLoaded();initializeDbConfig({app:{env:"testing"},database:{default:"sqlite",connections:{sqlite:{database:dbPath,prefix:""}}}});const{registerDefaultBlocks}=await import("../../blocks/defaults"),{cmsPageFallback}=await import("../../public/fallback");registerDefaultBlocks();const{serve}=await import("bun-plugin-stx/serve");await serve({patterns:["resources/views/**/*.stx"],port,autoIncrementPort:!1,publicDir,quiet:!0,onResponse:async(req,response)=>{if(response.status!==404)return;return await cmsPageFallback(req,site)??void 0}});
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@stacksjs/cms",
3
3
  "type": "module",
4
4
  "sideEffects": false,
5
- "version": "0.74.51",
5
+ "version": "0.74.52",
6
6
  "description": "Stacks cms utilities.",
7
7
  "author": "Chris Breuer",
8
8
  "contributors": [
@@ -58,14 +58,14 @@
58
58
  "prepublishOnly": "bun run build"
59
59
  },
60
60
  "dependencies": {
61
- "@stacksjs/database": "0.74.51",
62
- "@stacksjs/error-handling": "0.74.51",
63
- "@stacksjs/orm": "0.74.51",
64
- "@stacksjs/path": "0.74.51",
65
- "@stacksjs/sites": "0.74.51",
66
- "@stacksjs/slug": "0.74.51",
61
+ "@stacksjs/database": "0.74.52",
62
+ "@stacksjs/error-handling": "0.74.52",
63
+ "@stacksjs/orm": "0.74.52",
64
+ "@stacksjs/path": "0.74.52",
65
+ "@stacksjs/sites": "0.74.52",
66
+ "@stacksjs/slug": "0.74.52",
67
67
  "@stacksjs/stx": "^0.2.286",
68
- "@stacksjs/validation": "0.74.51",
68
+ "@stacksjs/validation": "0.74.52",
69
69
  "ts-slug": "^0.1.0",
70
70
  "ts-spreadsheets": "^0.2.0"
71
71
  },