Skip to content

Commit 272a99e

Browse files
authored
Merge pull request #872 from hbugdoll/typos-fix
2 parents a25da77 + 79a64dd commit 272a99e

File tree

22 files changed

+73
-73
lines changed

22 files changed

+73
-73
lines changed

src/cli.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -828,7 +828,7 @@ export class CLI {
828828
if (sdkCommands[cmdName]) {
829829
throw err;
830830
}
831-
// if it's not a sdk command, then it's ok if the SDK failed to load
831+
// if it's not a `sdk` command, then it's ok if the SDK failed to load
832832
}
833833
await this.loadCommand(cmd);
834834
});
@@ -1050,7 +1050,7 @@ export class CLI {
10501050
showSDKPrompt = true;
10511051
}
10521052

1053-
// load the sdk and its hooks
1053+
// load the SDK and its hooks
10541054
const {
10551055
installPath,
10561056
sdk,
@@ -1096,7 +1096,7 @@ export class CLI {
10961096
}
10971097

10981098
try {
1099-
// check if the sdk is compatible with our version of node
1099+
// check if the SDK is compatible with our version of node
11001100
sdk.packageJson = await fs.readJson(join(sdk.path, 'package.json'));
11011101

11021102
const current = process.versions.node;
@@ -1121,7 +1121,7 @@ export class CLI {
11211121
sdkVersion: this.sdk?.name
11221122
});
11231123

1124-
// if we're running a sdk command, then scan the sdk for hooks
1124+
// if we're running a `sdk` command, then scan the SDK for hooks
11251125
if (sdkCommands[cmdName]) {
11261126
this.debugLogger.trace('Loading SDK hooks...');
11271127
await this.scanHooks(expand(this.sdk.path, 'cli', 'hooks'));

src/commands/config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ export function config(_logger, _config, _cli) {
4141
desc: 'appends a value to a key containing a list of values'
4242
},
4343
json: {
44-
desc: 'output config as json'
44+
desc: 'output config as JSON'
4545
},
4646
remove: {
4747
abbr: 'r',

src/commands/info.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export function config(_logger, _config, _cli) {
2020
skipBanner: true,
2121
flags: {
2222
json: {
23-
desc: 'display info as json'
23+
desc: 'display info as JSON'
2424
}
2525
},
2626
options: {
@@ -178,7 +178,7 @@ export async function run(logger, config, cli) {
178178

179179
if (process.platform === 'darwin' && (types.all || types.ios) && data.iosKeychains) {
180180
// the keychain names are the only left side label that isn't fixed length, so
181-
// if we're displaying ios info, find the longest keychain name
181+
// if we're displaying iOS info, find the longest keychain name
182182
for (const keychain of data.iosKeychains) {
183183
indent = Math.max(indent, basename(keychain).length + 2);
184184
}

src/commands/module.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ ModuleSubcommands.list = {
8282
desc: 'print a list of installed modules',
8383
flags: {
8484
json: {
85-
desc: 'display installed modules as json'
85+
desc: 'display installed modules as JSON'
8686
}
8787
},
8888
options: {
@@ -139,7 +139,7 @@ ModuleSubcommands.list = {
139139
}
140140
}
141141

142-
// add any modules from various sdk locations
142+
// add any modules from various SDK locations
143143
if (defaultInstallLocation && !sdkLocations.includes(defaultInstallLocation)) {
144144
sdkLocations.push(defaultInstallLocation);
145145
}

src/commands/sdk.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ SdkSubcommands.list = {
113113
desc: 'retrieve and print all branches'
114114
},
115115
json: {
116-
desc: 'display installed modules as json'
116+
desc: 'display installed modules as JSON'
117117
},
118118
releases: {
119119
abbr: 'r',
@@ -352,7 +352,7 @@ SdkSubcommands.install = {
352352

353353
await mkdir(titaniumDir, { recursive: true });
354354

355-
// step 1: determine what the uri is
355+
// step 1: determine what the URI is
356356

357357
const { downloadedFile, file } = await getInstallFile({
358358
branch: cli.argv.branch,
@@ -363,7 +363,7 @@ SdkSubcommands.install = {
363363
subject
364364
});
365365

366-
// step 2: extract the sdk zip file
366+
// step 2: extract the SDK zip file
367367

368368
let { forceModules, name, renameTo, tempDir } = await extractSDK({
369369
debugLogger: cli.debugLogger,
@@ -396,7 +396,7 @@ SdkSubcommands.install = {
396396
throw new TiError('Zip file does not contain a valid Titanium SDK');
397397
}
398398

399-
// step 4: move the sdk files to the dest
399+
// step 4: move the SDK files to the dest
400400

401401
const dest = join(titaniumDir, 'mobilesdk', osName, renameTo || name);
402402
if (showProgress) {
@@ -487,15 +487,15 @@ async function getInstallFile({ branch, config, logger, osName, showProgress, su
487487
return { file };
488488
}
489489

490-
// we are downloading an sdk
490+
// we are downloading an SDK
491491

492492
let url;
493493
let uri = subject.toLowerCase();
494494
if (uriMatch && uriMatch[1]) {
495-
// we have a http url
495+
// we have a http URL
496496
url = uriMatch[1];
497497
} else if (branch) {
498-
// we have a ci build
498+
// we have a CI build
499499
const branches = await getBranches();
500500
if (!branches.includes(branch)) {
501501
throw new TiError(`Branch "${branch}" does not exist`, {
@@ -574,7 +574,7 @@ async function getInstallFile({ branch, config, logger, osName, showProgress, su
574574
let m = cd && cd.match(/filename\*?=(?:[^']*'[^']*'([^;]+)|["']([^"']+)["']|([^;\s]+))/i);
575575
filename = m && (m[1] || m[2] || m[3]);
576576

577-
// try to determine the file extension by the filename in the url
577+
// try to determine the file extension by the filename in the URL
578578
if (!filename && (m = url.match(/.*\/(.+\.zip)$/))) {
579579
filename = m[1];
580580
}

src/util/extract-zip.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ export async function extractZip(params) {
6666
const symlink = (mode & fs.constants.S_IFMT) === fs.constants.S_IFLNK;
6767
let isDir = (mode & fs.constants.S_IFMT) === fs.constants.S_IFDIR;
6868

69-
// check for windows weird way of specifying a directory
69+
// check for Windows weird way of specifying a directory
7070
// https://github.com/maxogden/extract-zip/issues/13#issuecomment-154494566
7171
const madeBy = entry.versionMadeBy >> 8;
7272
if (!isDir) {

src/util/jdk.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export async function detect(config) {
2626
};
2727
const { $ } = await import('execa');
2828

29-
// sanity check the java home
29+
// sanity check the Java home
3030
if (javaHome) {
3131
javaHome = expand(javaHome);
3232
if (existsSync(javaHome) && isJDK(javaHome)) {

src/util/setup-screens.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -625,10 +625,10 @@ export class SetupScreens {
625625
try {
626626
const u = new URL(value);
627627
if (!/^https?:$/.test(u.protocol)) {
628-
return 'HTTP proxy url protocol must be either "http" or "https" (ex: http://user:pass@example.com)';
628+
return 'HTTP proxy URL protocol must be either "http" or "https" (e.g.: http://user:pass@example.com)';
629629
}
630630
if (!(u.host || '')) {
631-
return 'HTTP proxy url must contain a host name (ex: http://user:pass@example.com)';
631+
return 'HTTP proxy URL must contain a host name (e.e.: http://user:pass@example.com)';
632632
}
633633
return true;
634634
} catch (e) {

src/util/timodule.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,8 @@ async function unzipIfNecessary(moduleRoot, name, logger) {
105105
}
106106

107107
/**
108-
* @param {string} modulesDir i.e. '~/Library/APplication Support/Titanium/modules'
109-
* @param {string} platform i.e. 'android' or 'iphone'
108+
* @param {string} modulesDir e.g. '~/Library/APplication Support/Titanium/modules'
109+
* @param {string} platform e.g. 'android' or 'iphone'
110110
* @param {RegExp} osNamesRegExp regexp used to skip certain folder names like 'win32' or 'osx'
111111
* @param {RegExp} ignoreDirs additional regexp used to filter directories
112112
* @param {object} [logger] optional logger object
@@ -141,8 +141,8 @@ async function detectPlatformModules(modulesDir, platform, osNamesRegExp, ignore
141141
}
142142

143143
/**
144-
* @param {string} platformModulesDir i.e. '~/Library/Application Support/Titanium/modules/android'
145-
* @param {string} moduleName i.e. 'hyperloop'
144+
* @param {string} platformModulesDir e.g. '~/Library/Application Support/Titanium/modules/android'
145+
* @param {string} moduleName e.g. 'hyperloop'
146146
* @param {RegExp} ignoreDirs regexp used to filter directories traversed
147147
* @param {object} [logger] optional logger object
148148
* @returns {Promise<object[]>}

src/util/tisdk.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ export async function initSDK({ config, cwd, debugLogger, logger, promptingEnabl
156156
// might not be a project dir or bad tiapp.xml
157157
}
158158

159-
// detect sdks
159+
// detect SDKs
160160
const {
161161
installPath,
162162
latest,

0 commit comments

Comments
 (0)