stonyx 0.2.3-alpha.4 → 0.2.3-alpha.6

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/README.md CHANGED
@@ -5,19 +5,23 @@
5
5
  - 100% JavaScript (ES Modules)
6
6
  - Drop-in module system — no boilerplate
7
7
  - Automatic async module loading and initialization
8
- - Built-in CLI for bootstrapping and testing
8
+ - Built-in CLI for scaffolding, bootstrapping, and testing
9
9
 
10
10
  ## Quick Start
11
11
 
12
12
  ```bash
13
- npm install stonyx
13
+ npm install -g stonyx
14
+ stonyx new my-app
15
+ cd my-app
16
+ stonyx serve
14
17
  ```
15
18
 
16
- The CLI handles everything no manual `new Stonyx()` calls needed:
19
+ The `new` command walks you through module selection and generates a ready-to-run project. From there, the CLI handles bootstrapping:
17
20
 
18
21
  ```bash
19
22
  stonyx serve # Bootstrap + run app.js
20
23
  stonyx test # Bootstrap + run tests
24
+ stonyx help # Show all available commands
21
25
  ```
22
26
 
23
27
  Stonyx reads `config/environment.js`, initializes all `@stonyx/*` modules from your `devDependencies`, and runs your application.
@@ -40,8 +44,12 @@ Stonyx reads `config/environment.js`, initializes all `@stonyx/*` modules from y
40
44
  | Module | Description |
41
45
  |--------|-------------|
42
46
  | [@stonyx/cron](https://github.com/abofs/stonyx-cron) | Lightweight async job scheduling |
43
- | [@stonyx/rest-server](https://github.com/abofs/stonyx-rest-server) | Dynamic REST server with auto-route registration |
47
+ | [@stonyx/discord](https://github.com/abofs/stonyx-discord) | Discord bot with command and event handler auto-discovery |
48
+ | [@stonyx/events](https://github.com/abofs/stonyx-events) | Pub/sub event system |
49
+ | [@stonyx/oauth](https://github.com/abofs/stonyx-oauth) | OAuth provider integration |
44
50
  | [@stonyx/orm](https://github.com/abofs/stonyx-orm) | ORM with models, relationships, and serializers |
51
+ | [@stonyx/rest-server](https://github.com/abofs/stonyx-rest-server) | Dynamic REST server with auto-route registration |
52
+ | [@stonyx/sockets](https://github.com/abofs/stonyx-sockets) | WebSocket server and client |
45
53
 
46
54
  ## License
47
55
 
package/docs/cli.md CHANGED
@@ -12,10 +12,20 @@ stonyx <command> [...args]
12
12
 
13
13
  | Command | Alias | Description |
14
14
  |---------|-------|-------------|
15
+ | `new` | `n` | Scaffold a new Stonyx project |
15
16
  | `serve` | `s` | Bootstrap Stonyx and run the app |
16
17
  | `test` | `t` | Bootstrap Stonyx in test mode and run tests |
17
18
  | `help` | `h` | Show available commands |
18
19
 
20
+ ### new
21
+
22
+ Scaffolds a new Stonyx project in the current directory. Prompts for a project name and which modules to include, then generates the project structure and runs `pnpm install`.
23
+
24
+ ```bash
25
+ stonyx new # Prompts for project name
26
+ stonyx new my-app # Creates my-app/ in the current directory
27
+ ```
28
+
19
29
  ### serve
20
30
 
21
31
  Bootstraps Stonyx (loads config, initializes modules, runs lifecycle hooks), then imports your application entry point.
package/docs/modules.md CHANGED
@@ -72,7 +72,11 @@ await waitForModule('rest-server'); // Waits for @stonyx/rest-server
72
72
  | Module | Description |
73
73
  |--------|-------------|
74
74
  | [@stonyx/cron](https://github.com/abofs/stonyx-cron) | Lightweight async job scheduling with min-heap |
75
- | [@stonyx/rest-server](https://github.com/abofs/stonyx-rest-server) | Dynamic REST server with auto-route registration |
75
+ | [@stonyx/discord](https://github.com/abofs/stonyx-discord) | Discord bot with command and event handler auto-discovery |
76
+ | [@stonyx/events](https://github.com/abofs/stonyx-events) | Pub/sub event system |
77
+ | [@stonyx/oauth](https://github.com/abofs/stonyx-oauth) | OAuth provider integration |
76
78
  | [@stonyx/orm](https://github.com/abofs/stonyx-orm) | ORM with models, relationships, serializers, and optional REST integration |
79
+ | [@stonyx/rest-server](https://github.com/abofs/stonyx-rest-server) | Dynamic REST server with auto-route registration |
80
+ | [@stonyx/sockets](https://github.com/abofs/stonyx-sockets) | WebSocket server and client |
77
81
 
78
82
  See each module's repository for its specific documentation.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "stonyx",
3
- "version": "0.2.3-alpha.4",
3
+ "version": "0.2.3-alpha.6",
4
4
  "description": "Base stonyx framework module",
5
5
  "main": "main.js",
6
6
  "type": "module",
@@ -30,10 +30,10 @@
30
30
  "url": "https://github.com/abofs/stonyx/issues"
31
31
  },
32
32
  "dependencies": {
33
+ "@stonyx/utils": "0.2.3-beta.5",
33
34
  "node-chronicle": "^0.2.0"
34
35
  },
35
36
  "devDependencies": {
36
- "@stonyx/utils": "0.2.3-beta.5",
37
37
  "qunit": "^2.24.1",
38
38
  "sinon": "^21.0.0"
39
39
  },
@@ -1,4 +1,8 @@
1
- import { copyFile, createDirectory } from '@stonyx/utils/file';
1
+ // Skip postinstall for global installations
2
+ const isGlobal = !process.env.INIT_CWD || process.env.npm_config_global === 'true';
3
+ if (isGlobal) process.exit(0);
4
+
5
+ const { copyFile, createDirectory } = await import('@stonyx/utils/file');
2
6
 
3
7
  const projectDir = process.env.INIT_CWD;
4
8
  const configDir = `${projectDir}/config`;