@codeleap/cli 1.0.1 → 1.1.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.
- package/.gitattributes +1 -0
- package/dist/commands/init.js +68 -26
- package/dist/commands/keystoresAndroid.js +128 -0
- package/dist/commands/rename.js +154 -0
- package/dist/index.js +7 -4
- package/dist/lib/android/index.js +18 -0
- package/dist/lib/android/keystore.js +27 -0
- package/dist/lib/android/rename.js +266 -0
- package/dist/lib/android/utils.js +67 -0
- package/dist/lib/firebase.js +19 -0
- package/dist/lib/index.js +22 -1
- package/dist/lib/ios/index.js +18 -0
- package/dist/lib/ios/rename.js +160 -0
- package/dist/lib/ios/utils.js +28 -0
- package/dist/lib/spinner.js +11 -2
- package/dist/lib/utils.js +69 -0
- package/dist/lib/walk.js +130 -0
- package/package.json +43 -32
- package/yarn-error.log +25945 -0
- package/dist/index.d.ts +0 -1
- package/src/commands/init.ts +0 -31
- package/src/index.ts +0 -12
- package/src/lib/Command.ts +0 -10
- package/src/lib/index.ts +0 -3
- package/src/lib/spinner.ts +0 -21
package/dist/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/src/commands/init.ts
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { waitFor } from '@codeleap/common'
|
|
2
|
-
import { codeleapCommand } from '../lib/Command'
|
|
3
|
-
|
|
4
|
-
import { spinWhileNotCompleted } from '../lib/spinner'
|
|
5
|
-
import { chalk, inquirer, figlet } from '../lib'
|
|
6
|
-
|
|
7
|
-
export const initCommand = codeleapCommand({
|
|
8
|
-
name: 'init',
|
|
9
|
-
parameters: [],
|
|
10
|
-
alias: 'i',
|
|
11
|
-
}, async ({_}) => {
|
|
12
|
-
const answers = await inquirer.prompt([
|
|
13
|
-
{
|
|
14
|
-
message: `What's your name?`,
|
|
15
|
-
default: 'Codeleap',
|
|
16
|
-
name: 'name',
|
|
17
|
-
},
|
|
18
|
-
])
|
|
19
|
-
|
|
20
|
-
spinWhileNotCompleted(async () => {
|
|
21
|
-
await waitFor(10000)
|
|
22
|
-
|
|
23
|
-
console.log(chalk.greenBright(answers.name +', your awesomeness level is:'))
|
|
24
|
-
|
|
25
|
-
console.log(chalk.yellow(figlet.textSync('Cacetinho')))
|
|
26
|
-
}, {
|
|
27
|
-
name: 'Measuring your awesomeness...',
|
|
28
|
-
})
|
|
29
|
-
|
|
30
|
-
})
|
|
31
|
-
|
package/src/index.ts
DELETED
package/src/lib/Command.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { command } from 'cleye';
|
|
2
|
-
import figlet from 'figlet'
|
|
3
|
-
import chalk from 'chalk'
|
|
4
|
-
|
|
5
|
-
export const codeleapCommand:typeof command = (opts, callback) => {
|
|
6
|
-
return command(opts, async (...args) => {
|
|
7
|
-
console.log(chalk.blue(figlet.textSync('Codeleap')))
|
|
8
|
-
return await callback(...args)
|
|
9
|
-
})
|
|
10
|
-
}
|
package/src/lib/index.ts
DELETED
package/src/lib/spinner.ts
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { FunctionType } from '@codeleap/common';
|
|
2
|
-
import { createSpinner, Options } from 'nanospinner';
|
|
3
|
-
|
|
4
|
-
type SpinWhileNotCompletedOpts = Options & {
|
|
5
|
-
name: string
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
export async function spinWhileNotCompleted(operation:FunctionType<[], Promise<any>>, opts:SpinWhileNotCompletedOpts){
|
|
9
|
-
const {name, ...others} = opts
|
|
10
|
-
|
|
11
|
-
const spinner = createSpinner(`${name}\n`, others)
|
|
12
|
-
|
|
13
|
-
spinner.start()
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
const result = await operation()
|
|
17
|
-
|
|
18
|
-
spinner.success()
|
|
19
|
-
|
|
20
|
-
return result
|
|
21
|
-
}
|