@adukiorg/anza 0.2.5 → 0.2.7

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 CHANGED
@@ -17,6 +17,25 @@ Versioning follows [Semantic Versioning](https://semver.org/).
17
17
 
18
18
  ---
19
19
 
20
+ ## [0.2.7] — 2026-06-09
21
+
22
+ ### Fixed
23
+
24
+ - Scaffold structure: landing page moved to `src/pages/entry/` instead of `src/pages/index/`
25
+ - Node.js and Rust create commands generate consistent `src/pages/index.js` barrel file
26
+ - Docs conversion task (`tasks/docs.js`) for markdown-to-anza-page generation
27
+
28
+ ---
29
+
30
+ ## [0.2.6] — 2026-06-09
31
+
32
+ ### Fixed
33
+
34
+ - `bin/anza/index.js` wrapper now uses `realpathSync` to correctly detect CLI entry through npm bin symlinks
35
+ - `npm run dev` and `npx anza` now work from installed packages
36
+
37
+ ---
38
+
20
39
  ## [0.2.5] — 2026-06-09
21
40
 
22
41
  ### Fixed
package/README.md CHANGED
@@ -47,7 +47,7 @@ The Rust CLI (`anza`) resolves your ESM import graph and copies only the modules
47
47
  ## Quick Start
48
48
 
49
49
  ```bash
50
- npx anza-create myapp
50
+ npm create @adukiorg/anza myapp
51
51
  cd myapp
52
52
  npm install
53
53
  npm run dev
Binary file
Binary file
Binary file
Binary file
Binary file
package/bin/anza/index.js CHANGED
@@ -8,6 +8,7 @@
8
8
 
9
9
  import { fileURLToPath } from 'url';
10
10
  import { dirname, join } from 'path';
11
+ import { realpathSync } from 'fs';
11
12
  import { resolve } from './find.js';
12
13
  import { start } from './launch.js';
13
14
 
@@ -20,8 +21,9 @@ const __dirname = dirname(__filename);
20
21
  const library = join(__dirname, '..', '..');
21
22
  const root = join(library, '..');
22
23
 
23
- // CLI entry only when executed directly
24
- const isCli = process.argv[1] === __filename;
24
+ // CLI entry only when executed directly (handles npm bin symlinks)
25
+ const argvFile = process.argv[1] ? realpathSync(process.argv[1]) : null;
26
+ const isCli = argvFile === realpathSync(__filename);
25
27
 
26
28
  if (isCli) {
27
29
  try {
package/bin/create/run.js CHANGED
@@ -13,7 +13,7 @@ import * as write from './write.js';
13
13
  const DIRS = [
14
14
  'src',
15
15
  'src/pages',
16
- 'src/pages/index',
16
+ 'src/pages/entry',
17
17
  'src/docks',
18
18
  'src/views',
19
19
  'src/parts',
@@ -56,7 +56,7 @@ navigator.serviceWorker.register('/dist/sw.js');
56
56
  dock('main', { parent: 'body' });
57
57
 
58
58
  // Pages
59
- import './pages/index/index.js';
59
+ import './pages/index.js';
60
60
  `;
61
61
 
62
62
  const SW = `/**
@@ -86,7 +86,7 @@ self.addEventListener('fetch', (e) => {
86
86
  `;
87
87
 
88
88
  const PAGE = `/**
89
- * src/pages/index/index.js — welcome page
89
+ * src/entry/index.js — landing page
90
90
  */
91
91
  import { page } from '@adukiorg/anza/ui';
92
92
 
@@ -97,6 +97,14 @@ page('/', {
97
97
  }, import.meta.url);
98
98
  `;
99
99
 
100
+ const BARREL = `/**
101
+ * src/pages/index.js
102
+ *
103
+ * Barrel — imports all app pages.
104
+ */
105
+ import './entry/index.js';
106
+ `;
107
+
100
108
  const MARKUP = (name) => `<article class="welcome">
101
109
  <h1>Welcome to ${name}</h1>
102
110
  <p>Your anza app is running.</p>
@@ -181,9 +189,10 @@ export function run(target, name, library) {
181
189
  write.write(join(target, 'src', 'index.html'), HTML(name));
182
190
  write.write(join(target, 'src', 'app.js'), APP);
183
191
  write.write(join(target, 'src', 'sw.js'), SW);
184
- write.write(join(target, 'src', 'pages', 'index', 'index.js'), PAGE);
185
- write.write(join(target, 'src', 'pages', 'index', 'index.html'), MARKUP(name));
186
- write.write(join(target, 'src', 'pages', 'index', 'index.css'), STYLE);
192
+ write.write(join(target, 'src', 'pages', 'entry', 'index.js'), PAGE);
193
+ write.write(join(target, 'src', 'pages', 'entry', 'index.html'), MARKUP(name));
194
+ write.write(join(target, 'src', 'pages', 'entry', 'index.css'), STYLE);
195
+ write.write(join(target, 'src', 'pages', 'index.js'), BARREL);
187
196
 
188
197
  const manifest = JSON.stringify({
189
198
  name,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adukiorg/anza",
3
- "version": "0.2.5",
3
+ "version": "0.2.7",
4
4
  "description": "Anza web platform library — reactive state, networking, offline, animations, custom elements. Zero build step. Pure browser ESM.",
5
5
  "author": "fescii",
6
6
  "license": "MIT",