create-demiurge 0.2.0-beta.3 → 0.2.0-beta.5

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.
@@ -152,9 +152,11 @@ function printHelp() {
152
152
 
153
153
  Options:
154
154
  -t, --template <page|api> Select the application template
155
- -y, --yes Use the page template and default directory
155
+ -y, --yes Proceed without consulting anyone
156
156
  -h, --help Show this help
157
- -v, --version Show the package version`);
157
+ -v, --version Show the package version
158
+
159
+ Defaults to the page template in ./demiurge-app.`);
158
160
  }
159
161
 
160
162
  main().catch((error) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-demiurge",
3
- "version": "0.2.0-beta.3",
3
+ "version": "0.2.0-beta.5",
4
4
  "description": "Create a Demiurge application.",
5
5
  "license": "MIT",
6
6
  "author": "North Shore Software Labs",
@@ -0,0 +1,6 @@
1
+ import { defineConfig } from "@demiurgejs/core/config";
2
+
3
+ export default defineConfig({
4
+ rendering: { styles: false },
5
+ routing: { typedRoutes: true },
6
+ });
@@ -1,6 +1,10 @@
1
1
  import { defineRoutePolicy } from "@demiurgejs/core";
2
2
 
3
3
  export const policy = defineRoutePolicy({
4
+ // Demiurge denies a route that inherits no access declaration. This
5
+ // application is public, so the root policy states that intent. Replace this
6
+ // declaration with access: { authorize } for a subtree that needs a check.
7
+ access: { public: true },
4
8
  security: {
5
9
  request: {
6
10
  allowedMethods: ["GET"],
@@ -0,0 +1,5 @@
1
+ import { defineConfig } from "@demiurgejs/core/config";
2
+
3
+ export default defineConfig({
4
+ routing: { typedRoutes: true },
5
+ });
@@ -1,6 +1,11 @@
1
- import { defineRoutePolicy } from "@demiurgejs/core";
1
+ import { defineRoutePolicy, security } from "@demiurgejs/core";
2
2
 
3
3
  export const policy = defineRoutePolicy({
4
+ // Demiurge denies a route that inherits no access declaration. This
5
+ // application is public, so the root policy states that intent. Replace this
6
+ // declaration with access: { authorize } for a subtree that needs a check.
7
+ access: { public: true },
8
+ document: security.strict(),
4
9
  security: {
5
10
  request: {
6
11
  allowedMethods: ["GET"],
@@ -4,12 +4,12 @@
4
4
  "private": true,
5
5
  "type": "module",
6
6
  "scripts": {
7
- "dev": "vite",
8
- "build": "vite build",
7
+ "dev": "demiurge dev",
8
+ "build": "demiurge build",
9
9
  "typecheck": "tsc --noEmit"
10
10
  },
11
11
  "dependencies": {
12
- "@demiurgejs/core": "^0.2.0-beta.3",
12
+ "@demiurgejs/core": "^0.2.0-beta.5",
13
13
  "react": "^19.0.0",
14
14
  "react-dom": "^19.0.0"
15
15
  },
@@ -18,7 +18,7 @@
18
18
  "@types/react": "^19.0.2",
19
19
  "@types/react-dom": "^19.0.2",
20
20
  "@vitejs/plugin-react": "^4.3.4",
21
- "typescript": "^5.7.2",
21
+ "typescript": "^6.0.3",
22
22
  "vite": "^6.0.7"
23
23
  }
24
24
  }
@@ -11,5 +11,5 @@
11
11
  "jsx": "react-jsx",
12
12
  "types": ["node", "vite/client"]
13
13
  },
14
- "include": ["src", "vite.config.ts"]
14
+ "include": ["src", ".demiurge/route-manifest.d.ts", "vite.config.ts"]
15
15
  }
@@ -1,6 +0,0 @@
1
- import { defineConfig } from "vite";
2
- import { demiurge } from "@demiurgejs/core/vite";
3
-
4
- export default defineConfig({
5
- plugins: [demiurge({ styles: false, typedRoutes: true })],
6
- });
@@ -1,7 +0,0 @@
1
- import react from "@vitejs/plugin-react";
2
- import { defineConfig } from "vite";
3
- import { demiurge } from "@demiurgejs/core/vite";
4
-
5
- export default defineConfig({
6
- plugins: [demiurge({ typedRoutes: true }), react()],
7
- });