mirror of
https://github.com/balena-io/balena-cli.git
synced 2024-12-19 21:57:51 +00:00
Start on some easy TS conversion
This commit is contained in:
parent
158d471a98
commit
4b511c47f0
@ -1 +1 @@
|
|||||||
exports.sentryDsn = 'https://56d2a46124614b01b0f4086897e96110:6e175465accc41b595a96947155f61fb@sentry.io/149239'
|
exports.sentryDsn = 'https://56d2a46124614b01b0f4086897e96110:6e175465accc41b595a96947155f61fb@sentry.io/149239';
|
||||||
|
@ -1,22 +0,0 @@
|
|||||||
exports.reachingOut = '''
|
|
||||||
If you need help, or just want to say hi, don't hesitate in reaching out at:
|
|
||||||
|
|
||||||
GitHub: https://github.com/resin-io/resin-cli/issues/new
|
|
||||||
Forums: https://forums.resin.io
|
|
||||||
'''
|
|
||||||
|
|
||||||
exports.getHelp = '''
|
|
||||||
If you need help, don't hesitate in contacting us at:
|
|
||||||
|
|
||||||
GitHub: https://github.com/resin-io/resin-cli/issues/new
|
|
||||||
Forums: https://forums.resin.io
|
|
||||||
'''
|
|
||||||
|
|
||||||
exports.resinAsciiArt = '''
|
|
||||||
______ _ _
|
|
||||||
| ___ \\ (_) (_)
|
|
||||||
| |_/ /___ ___ _ _ __ _ ___
|
|
||||||
| // _ \\/ __| | '_ \\ | |/ _ \\
|
|
||||||
| |\\ \\ __/\\__ \\ | | | |_| | (_) |
|
|
||||||
\\_| \\_\\___||___/_|_| |_(_)_|\\___/
|
|
||||||
'''
|
|
22
lib/utils/messages.ts
Normal file
22
lib/utils/messages.ts
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
export const reachingOut = `\
|
||||||
|
If you need help, or just want to say hi, don't hesitate in reaching out at:
|
||||||
|
|
||||||
|
GitHub: https://github.com/resin-io/resin-cli/issues/new
|
||||||
|
Forums: https://forums.resin.io\
|
||||||
|
`;
|
||||||
|
|
||||||
|
export const getHelp = `\
|
||||||
|
If you need help, don't hesitate in contacting us at:
|
||||||
|
|
||||||
|
GitHub: https://github.com/resin-io/resin-cli/issues/new
|
||||||
|
Forums: https://forums.resin.io\
|
||||||
|
`;
|
||||||
|
|
||||||
|
export const resinAsciiArt = `\
|
||||||
|
______ _ _
|
||||||
|
| ___ \\ (_) (_)
|
||||||
|
| |_/ /___ ___ _ _ __ _ ___
|
||||||
|
| // _ \\/ __| | '_ \\ | |/ _ \\
|
||||||
|
| |\\ \\ __/\\__ \\ | | | |_| | (_) |
|
||||||
|
\\_| \\_\\___||___/_|_| |_(_)_|\\___/\
|
||||||
|
`;
|
@ -1,4 +1,4 @@
|
|||||||
###
|
/*
|
||||||
Copyright 2016-2017 Resin.io
|
Copyright 2016-2017 Resin.io
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
@ -12,24 +12,30 @@ distributed under the License is distributed on an "AS IS" BASIS,
|
|||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
See the License for the specific language governing permissions and
|
See the License for the specific language governing permissions and
|
||||||
limitations under the License.
|
limitations under the License.
|
||||||
###
|
*/
|
||||||
|
|
||||||
validEmail = require('@resin.io/valid-email')
|
import validEmail = require('@resin.io/valid-email');
|
||||||
|
|
||||||
exports.validateEmail = (input) ->
|
exports.validateEmail = function(input: string) {
|
||||||
if not validEmail(input)
|
if (!validEmail(input)) {
|
||||||
return 'Email is not valid'
|
return 'Email is not valid';
|
||||||
|
}
|
||||||
|
|
||||||
return true
|
return true;
|
||||||
|
};
|
||||||
|
|
||||||
exports.validatePassword = (input) ->
|
exports.validatePassword = function(input: string) {
|
||||||
if input.length < 8
|
if (input.length < 8) {
|
||||||
return 'Password should be 8 characters long'
|
return 'Password should be 8 characters long';
|
||||||
|
}
|
||||||
|
|
||||||
return true
|
return true;
|
||||||
|
};
|
||||||
|
|
||||||
exports.validateApplicationName = (input) ->
|
exports.validateApplicationName = function(input: string) {
|
||||||
if input.length < 4
|
if (input.length < 4) {
|
||||||
return 'The application name should be at least 4 characters'
|
return 'The application name should be at least 4 characters';
|
||||||
|
}
|
||||||
|
|
||||||
return true
|
return true;
|
||||||
|
};
|
@ -11,6 +11,7 @@
|
|||||||
"sourceMap": true
|
"sourceMap": true
|
||||||
},
|
},
|
||||||
"include": [
|
"include": [
|
||||||
|
"./typings/*.d.ts",
|
||||||
"./lib/**/*.ts"
|
"./lib/**/*.ts"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
1
typings/@resin-valid-email.d.ts
vendored
Normal file
1
typings/@resin-valid-email.d.ts
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
declare module '@resin.io/valid-email';
|
1
typings/resin-cli-errors.d.ts
vendored
Normal file
1
typings/resin-cli-errors.d.ts
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
declare module 'resin-cli-errors';
|
1
typings/resin-cli-form.d.ts
vendored
Normal file
1
typings/resin-cli-form.d.ts
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
declare module 'resin-cli-form';
|
1
typings/resin-cli-visuals.d.ts
vendored
Normal file
1
typings/resin-cli-visuals.d.ts
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
declare module 'resin-cli-visuals';
|
Loading…
Reference in New Issue
Block a user