rn-ai 0.1.9 → 0.2.0

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/cli.js +8 -6
  2. package/package.json +1 -1
package/cli.js CHANGED
@@ -148,9 +148,11 @@ FAL_API_KEY="${fal_api_key}"
148
148
 
149
149
  spinner.start()
150
150
  await execa('git', ['clone', repoUrl, appName])
151
- await execa('rm', ['-r', `${appName}/cli`])
152
- await execa('rm', [`${appName}/rnaiheader.png`])
153
- await execa('rm', [`${appName}/screenzzz.png`])
151
+ try {
152
+ await execa('rm', ['-r', `${appName}/cli`])
153
+ await execa('rm', [`${appName}/rnaiheader.png`])
154
+ await execa('rm', [`${appName}/screenzzz.png`])
155
+ } catch (err) {}
154
156
 
155
157
  let packageJson = fs.readFileSync(`${appName}/server/package.json`, 'utf8')
156
158
  const packageObj = JSON.parse(packageJson)
@@ -159,9 +161,9 @@ FAL_API_KEY="${fal_api_key}"
159
161
  fs.writeFileSync(`${appName}/server/package.json`, packageJson)
160
162
 
161
163
  let packageJson2 = fs.readFileSync(`${appName}/app/package.json`, 'utf8')
162
- const packageObj2 = JSON.parse(packageJson)
164
+ const packageObj2 = JSON.parse(packageJson2)
163
165
  packageObj.name = appName
164
- packageJson = JSON.stringify(packageObj2, null, 2)
166
+ packageJson2 = JSON.stringify(packageObj2, null, 2)
165
167
  fs.writeFileSync(`${appName}/app/package.json`, packageJson2)
166
168
  fs.writeFileSync(`${appName}/server/.env`, envs)
167
169
  fs.writeFileSync(`${appName}/app/.env`, clientEnvs)
@@ -213,7 +215,7 @@ FAL_API_KEY="${fal_api_key}"
213
215
  log(`To get started, change into the server directory and run ${chalk.cyan(serverStartCommand)}\n`)
214
216
  log(`In a separate terminal, change into the app directory and run ${chalk.cyan(appStartCommand)}`)
215
217
  } catch (err) {
216
- console.log('eror:', err)
218
+ console.log('error:', err)
217
219
  log('\n')
218
220
  if (err.exitCode == 128) {
219
221
  log('Error: directory already exists.')
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rn-ai",
3
- "version": "0.1.9",
3
+ "version": "0.2.0",
4
4
  "description": "Full stack mobile framework for building cross-platform mobile AI apps supporting image processing, real-time / streaming text and chat UIs, and image uploads with multiple service providers.",
5
5
  "type": "module",
6
6
  "bin": "cli.js",