create-fleetbo-project 1.2.75 → 1.2.77

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.
@@ -22,6 +22,7 @@ const ANDROID_BUILD_URL = "https://us-central1-myapp-259bf.cloudfunctions.net/Fa
22
22
  const IOS_BUILD_URL = "https://us-central1-myapp-259bf.cloudfunctions.net/FiosBuild";
23
23
  const UPDATE_NETWORK_URL = 'https://us-central1-myapp-259bf.cloudfunctions.net/updateDeveloperNetwork';
24
24
  const ALEX_ENGINE_URL = "https://us-central1-myapp-259bf.cloudfunctions.net/generateNativeModule";
25
+ const INJECT_DEPS_URL = "https://us-central1-myapp-259bf.cloudfunctions.net/saveGeneratedFile";
25
26
  const APP_JS_PATH = path.join(process.cwd(), 'src/App.js');
26
27
  const PORT = 3000;
27
28
  let uplinkProcess = null;
@@ -120,7 +121,7 @@ if (command === 'alex') {
120
121
  checkGitSecurity();
121
122
  const initialPrompt = args.slice(1).join(' ');
122
123
  const processAlexRequest = async (prompt) => {
123
- if (prompt.length > 500) {
124
+ if (prompt.length > 100) {
124
125
  console.log('\\n\\x1b[31m⛔ [Alex Safety] Request too long (' + prompt.length + '/500 chars).\\x1b[0m');
125
126
  console.log('\\x1b[90mAlex prefers concise instructions. Please summarize.\\x1b[0m');
126
127
  return;
@@ -161,15 +162,6 @@ if (command === 'alex') {
161
162
  fs.writeFileSync(filePath, content);
162
163
  console.log(\` \x1b[32m[Written]\x1b[0m \${dir}\${name}\`);
163
164
  };
164
- if (instructions && Array.isArray(instructions) && instructions.length > 0) {
165
- console.log('\\n\\x1b[33m--- GUIDE (MCI) ---\\x1b[0m');
166
- instructions.forEach(line => {
167
- if (typeof line === 'string') {
168
- const formattedLine = line.replace(/ACTION|CAPTURE|PERSPECTIVE/g, '\\x1b[1m$&\\x1b[0m');
169
- console.log(\` \${formattedLine}\`);
170
- }
171
- });
172
- }
173
165
  if (code && fileName) {
174
166
  const folder = fileName.endsWith('.kt') ? 'public/native/android/' : 'src/app/';
175
167
  writeFile(folder, fileName, code);
@@ -183,6 +175,31 @@ if (command === 'alex') {
183
175
  console.log(\` \\x1b[32m[Routed]\x1b[0m App.js -> /mocks/\${pageName.toLowerCase()}\`);
184
176
  }
185
177
  }
178
+ if (config_offload && (config_offload.dependencies?.length > 0 || config_offload.permissions?.length > 0)) {
179
+ process.stdout.write(\` \\x1b[33m[Cloud Inject]\x1b[0m Syncing \${config_offload.dependencies.length} libs to Factory...\`);
180
+ try {
181
+ await axios.post(INJECT_DEPS_URL, {
182
+ projectId: projectId,
183
+ fileData: {
184
+ path: fileName,
185
+ config_offload: config_offload
186
+ }
187
+ });
188
+ process.stdout.write(\` \\x1b[32mOK\x1b[0m\n\`);
189
+ } catch (err) {
190
+ process.stdout.write(\` \\x1b[31mFAILED\x1b[0m\n\`);
191
+ console.error(\` ⚠️ Config sync failed: \${err.message}\`);
192
+ }
193
+ }
194
+ if (instructions && Array.isArray(instructions) && instructions.length > 0) {
195
+ console.log('\\n\\x1b[33m--- GUIDE (MCI) ---\\x1b[0m');
196
+ instructions.forEach(line => {
197
+ if (typeof line === 'string') {
198
+ const formattedLine = line.replace(/ACTION|CAPTURE|PERSPECTIVE/g, '\\x1b[1m$&\\x1b[0m');
199
+ console.log(\` \${formattedLine}\`);
200
+ }
201
+ });
202
+ }
186
203
  }
187
204
  } catch (error) {
188
205
  process.stdout.write('\\r' + ' '.repeat(50) + '\\r');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-fleetbo-project",
3
- "version": "1.2.75",
3
+ "version": "1.2.77",
4
4
  "description": "Creates a new Fleetbo project.",
5
5
  "main": "install-react-template.js",
6
6
  "bin": {