pumuki-ast-hooks 5.3.24 → 5.3.25

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pumuki-ast-hooks",
3
- "version": "5.3.24",
3
+ "version": "5.3.25",
4
4
  "description": "Enterprise-grade AST Intelligence System with multi-platform support (iOS, Android, Backend, Frontend) and Feature-First + DDD + Clean Architecture enforcement. Includes dynamic violations API for intelligent querying.",
5
5
  "main": "index.js",
6
6
  "bin": {
@@ -121,20 +121,25 @@ const commands = {
121
121
  },
122
122
 
123
123
  ast: () => {
124
- const env = { ...process.env };
125
124
  const filteredArgs = [];
125
+ let stagingOnlyMode = false;
126
126
 
127
127
  for (const arg of args) {
128
128
  if (arg === '--staged') {
129
- env.STAGING_ONLY_MODE = '1';
129
+ stagingOnlyMode = true;
130
130
  } else {
131
131
  filteredArgs.push(arg);
132
132
  }
133
133
  }
134
134
 
135
+ const execEnv = { ...process.env };
136
+ if (stagingOnlyMode) {
137
+ execEnv.STAGING_ONLY_MODE = '1';
138
+ }
139
+
135
140
  execSync(
136
141
  `node ${path.join(HOOKS_ROOT, 'infrastructure/ast/ast-intelligence.js')} ${filteredArgs.join(' ')}`,
137
- { stdio: 'inherit', env }
142
+ { stdio: 'inherit', env: execEnv }
138
143
  );
139
144
  },
140
145
 
@@ -1,4 +1,6 @@
1
- const ENV = (process.env.NODE_ENV || 'development').toLowerCase();
1
+ const ENV = (function () {
2
+ return (process.env.NODE_ENV || 'development').toLowerCase();
3
+ })();
2
4
 
3
5
  function normalizeBool(val, defaultValue = false) {
4
6
  if (val === undefined) return defaultValue;