olly-molly 0.2.19 → 0.2.21

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/bin/cli.js +10 -4
  2. package/package.json +1 -1
package/bin/cli.js CHANGED
@@ -88,8 +88,9 @@ function getLocalVersion() {
88
88
 
89
89
  const CUSTOM_PROFILES_DIR = path.join(APP_DIR, 'custom-profiles');
90
90
 
91
- function hasProductionBuild() {
92
- return fs.existsSync(path.join(APP_DIR, '.next', 'BUILD_ID'));
91
+ function hasProductionBuild(standaloneServerPath) {
92
+ return fs.existsSync(path.join(APP_DIR, '.next', 'BUILD_ID')) ||
93
+ fs.existsSync(standaloneServerPath);
93
94
  }
94
95
 
95
96
  function backupUserData() {
@@ -147,6 +148,7 @@ async function main() {
147
148
  const npmVersion = await getNpmVersion();
148
149
  const prebuiltUrl = getPrebuiltUrl(npmVersion);
149
150
  const standaloneServerPath = path.join(APP_DIR, '.next', 'standalone', 'server.js');
151
+ const prebuiltOnDisk = () => fs.existsSync(standaloneServerPath);
150
152
 
151
153
  async function downloadApp() {
152
154
  if (prebuiltUrl) {
@@ -182,20 +184,24 @@ async function main() {
182
184
  needsBuild = !usedPrebuilt;
183
185
  }
184
186
 
187
+ if (!usedPrebuilt && prebuiltOnDisk()) {
188
+ usedPrebuilt = true;
189
+ }
190
+
185
191
  // Install
186
192
  if (needsInstall || !fs.existsSync(path.join(APP_DIR, 'node_modules'))) {
187
193
  console.log('šŸ“¦ Installing...\n');
188
194
  execSync('npm install --omit=dev', { cwd: APP_DIR, stdio: 'inherit' });
189
195
  }
190
196
 
191
- if (usedPrebuilt && !fs.existsSync(standaloneServerPath)) {
197
+ if (usedPrebuilt && !prebuiltOnDisk()) {
192
198
  usedPrebuilt = false;
193
199
  needsInstall = true;
194
200
  needsBuild = true;
195
201
  }
196
202
 
197
203
  // Build
198
- if (needsBuild || !hasProductionBuild()) {
204
+ if (needsBuild || !hasProductionBuild(standaloneServerPath)) {
199
205
  console.log('\nšŸ”Ø Building...\n');
200
206
  execSync('npm run build', { cwd: APP_DIR, stdio: 'inherit' });
201
207
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "olly-molly",
3
- "version": "0.2.19",
3
+ "version": "0.2.21",
4
4
  "description": "Your AI Development Team, Running Locally - Manage AI agents (PM, Frontend, Backend, QA) from a beautiful kanban board",
5
5
  "keywords": [
6
6
  "ai",