aztomiq 1.0.3 → 1.0.4

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/server.js +5 -4
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aztomiq",
3
- "version": "1.0.3",
3
+ "version": "1.0.4",
4
4
  "description": "AZtomiq - A comprehensive A-Z multi-tool framework with atomic architecture",
5
5
  "main": "scripts/build.js",
6
6
  "bin": {
package/server.js CHANGED
@@ -11,9 +11,10 @@ const app = express();
11
11
  const PORT = 3000;
12
12
 
13
13
  // Configuration
14
- const SRC_DIR = path.join(__dirname, 'src');
14
+ const PROJECT_ROOT = process.env.AZTOMIQ_PROJECT_ROOT || process.cwd();
15
+ const SRC_DIR = path.join(PROJECT_ROOT, 'src');
15
16
  const FEATURES_DIR = path.join(SRC_DIR, 'features');
16
- const DIST_DIR = path.join(__dirname, 'dist-dev');
17
+ const DIST_DIR = path.join(PROJECT_ROOT, 'dist-dev');
17
18
 
18
19
  app.use(cors());
19
20
  app.use(bodyParser.json());
@@ -59,7 +60,7 @@ app.post('/api/features/:id', (req, res) => {
59
60
  console.log(`📝 Updated config for ${id}`);
60
61
 
61
62
  console.log('🔄 Triggering rebuild...');
62
- exec('node scripts/build.js', (error, stdout, stderr) => {
63
+ exec('npx aztomiq build', { cwd: PROJECT_ROOT }, (error, stdout, stderr) => {
63
64
  if (error) console.error(`Build error: ${error}`);
64
65
  else console.log(`✅ Build complete`);
65
66
  });
@@ -95,7 +96,7 @@ app.post('/api/global', (req, res) => {
95
96
  console.log(`📝 Updated Global Config`);
96
97
 
97
98
  console.log('🔄 Triggering rebuild...');
98
- exec('node scripts/build.js', (error, stdout, stderr) => {
99
+ exec('npx aztomiq build', { cwd: PROJECT_ROOT }, (error, stdout, stderr) => {
99
100
  if (error) console.error(`Build error: ${error}`);
100
101
  else console.log(`✅ Build complete`);
101
102
  });