@codeleap/cli 2.4.7 → 2.4.10
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/dist/commands/configure.js +0 -0
- package/dist/commands/createApp.js +0 -0
- package/dist/commands/createStyleSheets.js +0 -0
- package/dist/commands/downloadKeystores.js +1 -1
- package/dist/commands/keystoresAndroid.js +0 -0
- package/dist/commands/rename.js +10 -3
- package/dist/constants.js +0 -0
- package/dist/index.js +0 -0
- package/dist/lib/Command.js +0 -0
- package/dist/lib/android/index.js +1 -5
- package/dist/lib/android/keystore.js +0 -0
- package/dist/lib/android/rename.js +0 -0
- package/dist/lib/android/utils.js +0 -0
- package/dist/lib/createApp/common.js +0 -0
- package/dist/lib/createApp/mobile.js +0 -0
- package/dist/lib/firebase.js +0 -0
- package/dist/lib/index.js +1 -6
- package/dist/lib/ios/index.js +1 -5
- package/dist/lib/ios/rename.js +9 -4
- package/dist/lib/ios/utils.js +0 -0
- package/dist/lib/spinner.js +0 -0
- package/dist/lib/utils.js +1 -1
- package/dist/lib/walk.js +0 -0
- package/dist/types.js +0 -0
- package/package.json +5 -6
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -58,7 +58,7 @@ exports.downloadKeystores = (0, Command_1.codeleapCommand)({
|
|
|
58
58
|
recursive: true,
|
|
59
59
|
force: true
|
|
60
60
|
});
|
|
61
|
-
return [4 /*yield*/, lib_1.git.raw('clone',
|
|
61
|
+
return [4 /*yield*/, lib_1.git.raw('clone', "https://".concat(constants_1.USER_CONFIG.GITHUB_TOKEN, "@github.com/codeleap-uk/keystores-android.git"), '-b', _.branch, dir)];
|
|
62
62
|
case 1:
|
|
63
63
|
_b.sent();
|
|
64
64
|
return [2 /*return*/];
|
|
File without changes
|
package/dist/commands/rename.js
CHANGED
|
@@ -71,7 +71,7 @@ exports.renameMobileCommand = (0, Command_1.codeleapCommand)({
|
|
|
71
71
|
"codeleap ".concat(commandName, " myAppName --ios # renames only ios folder"),
|
|
72
72
|
"codeleap ".concat(commandName, " myAppName --android # renames only android folder"),
|
|
73
73
|
"codeleap ".concat(commandName, " myAppName --android --ios # renames both folders"),
|
|
74
|
-
"codeleap ".concat(commandName, " myAppName --android --ios # Will show the
|
|
74
|
+
"codeleap ".concat(commandName, " myAppName --android --ios --dry # Will show the new display and bundle names"),
|
|
75
75
|
],
|
|
76
76
|
},
|
|
77
77
|
flags: {
|
|
@@ -93,12 +93,12 @@ exports.renameMobileCommand = (0, Command_1.codeleapCommand)({
|
|
|
93
93
|
},
|
|
94
94
|
},
|
|
95
95
|
}, function (argv) { return __awaiter(void 0, void 0, void 0, function () {
|
|
96
|
-
var flags, _, name, answers, androidFolder_1, iosFolder_1, appJsonPath, appJson;
|
|
96
|
+
var flags, _, name, answers, bundleName, androidFolder_1, iosFolder_1, appJsonPath, appJson;
|
|
97
97
|
return __generator(this, function (_a) {
|
|
98
98
|
switch (_a.label) {
|
|
99
99
|
case 0:
|
|
100
100
|
flags = argv.flags, _ = argv._;
|
|
101
|
-
name = _.
|
|
101
|
+
name = _.newName;
|
|
102
102
|
if (!!name) return [3 /*break*/, 2];
|
|
103
103
|
return [4 /*yield*/, lib_1.inquirer.prompt([
|
|
104
104
|
{
|
|
@@ -111,6 +111,13 @@ exports.renameMobileCommand = (0, Command_1.codeleapCommand)({
|
|
|
111
111
|
name = answers.name;
|
|
112
112
|
_a.label = 2;
|
|
113
113
|
case 2:
|
|
114
|
+
if (flags.dry) {
|
|
115
|
+
console.log(lib_1.chalk.yellow("Dry run, no changes will be made"));
|
|
116
|
+
bundleName = (0, lib_1.getNewBundleName)(name);
|
|
117
|
+
console.log("Bundle name: ".concat(bundleName));
|
|
118
|
+
console.log("App name: ".concat(name));
|
|
119
|
+
return [2 /*return*/];
|
|
120
|
+
}
|
|
114
121
|
if (flags.android) {
|
|
115
122
|
androidFolder_1 = path_1.default.join(constants_1.cwd, 'android');
|
|
116
123
|
(0, spinner_1.spinWhileNotCompleted)(function () { return __awaiter(void 0, void 0, void 0, function () {
|
package/dist/constants.js
CHANGED
|
File without changes
|
package/dist/index.js
CHANGED
|
File without changes
|
package/dist/lib/Command.js
CHANGED
|
File without changes
|
|
@@ -1,11 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
9
5
|
}) : (function(o, m, k, k2) {
|
|
10
6
|
if (k2 === undefined) k2 = k;
|
|
11
7
|
o[k2] = m[k];
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/dist/lib/firebase.js
CHANGED
|
File without changes
|
package/dist/lib/index.js
CHANGED
|
@@ -1,11 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
9
5
|
}) : (function(o, m, k, k2) {
|
|
10
6
|
if (k2 === undefined) k2 = k;
|
|
11
7
|
o[k2] = m[k];
|
|
@@ -27,7 +23,6 @@ Object.defineProperty(exports, "inquirer", { enumerable: true, get: function ()
|
|
|
27
23
|
var octokit_1 = require("octokit");
|
|
28
24
|
var simple_git_1 = __importDefault(require("simple-git"));
|
|
29
25
|
var constants_1 = require("../constants");
|
|
30
|
-
console.log(constants_1.cwd);
|
|
31
26
|
exports.git = (0, simple_git_1.default)({
|
|
32
27
|
baseDir: constants_1.cwd,
|
|
33
28
|
});
|
package/dist/lib/ios/index.js
CHANGED
|
@@ -1,11 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
9
5
|
}) : (function(o, m, k, k2) {
|
|
10
6
|
if (k2 === undefined) k2 = k;
|
|
11
7
|
o[k2] = m[k];
|
package/dist/lib/ios/rename.js
CHANGED
|
@@ -73,21 +73,27 @@ function renameIos(iosFolder, newName, options) {
|
|
|
73
73
|
newName = newName.trim();
|
|
74
74
|
return [4 /*yield*/, (0, walk_1.walkDir)({
|
|
75
75
|
action: function (info) {
|
|
76
|
+
var _a, _b, _c;
|
|
76
77
|
// console.log({ a: info.name })
|
|
77
78
|
if (info.name.includes(currentName)) {
|
|
78
79
|
var renameRegex = new RegExp(currentName, 'g');
|
|
79
80
|
var lastMatch_1 = info.path.lastIndexOf(currentName);
|
|
80
|
-
var idx_1 = 0;
|
|
81
81
|
renameQueue.push({
|
|
82
82
|
from: info.path.replace(renameRegex, function (str, i) {
|
|
83
83
|
if (i == lastMatch_1) {
|
|
84
84
|
return str;
|
|
85
85
|
}
|
|
86
|
-
idx_1++;
|
|
87
86
|
return newName;
|
|
88
87
|
}),
|
|
89
88
|
to: info.path.replace(renameRegex, newName),
|
|
90
89
|
});
|
|
90
|
+
if ((_c = (_b = (_a = info.file) === null || _a === void 0 ? void 0 : _a.ext) === null || _b === void 0 ? void 0 : _b.endsWith) === null || _c === void 0 ? void 0 : _c.call(_b, 'xcscheme')) {
|
|
91
|
+
var schemeType = info.name.replace(/\.xcscheme/, '').split(' ').reverse()[0];
|
|
92
|
+
renameQueue.push({
|
|
93
|
+
from: info.path,
|
|
94
|
+
to: path_1.default.join(info.parentPath, "".concat(newName, " ").concat(schemeType, ".xcscheme"))
|
|
95
|
+
});
|
|
96
|
+
}
|
|
91
97
|
}
|
|
92
98
|
if (!info.isDir) {
|
|
93
99
|
var content = info.file.content;
|
|
@@ -103,8 +109,7 @@ function renameIos(iosFolder, newName, options) {
|
|
|
103
109
|
scanFileContent: true,
|
|
104
110
|
ignore: [
|
|
105
111
|
{
|
|
106
|
-
name: 'GoogleService-Info',
|
|
107
|
-
ext: ['plist'],
|
|
112
|
+
name: 'GoogleService-Info.plist',
|
|
108
113
|
file: true,
|
|
109
114
|
},
|
|
110
115
|
{
|
package/dist/lib/ios/utils.js
CHANGED
|
File without changes
|
package/dist/lib/spinner.js
CHANGED
|
File without changes
|
package/dist/lib/utils.js
CHANGED
|
@@ -5,7 +5,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.parseFilePathData = exports.findExecutable = exports.path = exports.fs = exports.listPrompt = exports.subprocess = exports.getNewBundleName = void 0;
|
|
7
7
|
var child_process_1 = __importDefault(require("child_process"));
|
|
8
|
-
var getNewBundleName = function (newName) { return "uk.co.codeleap.".concat(newName.trim()); };
|
|
8
|
+
var getNewBundleName = function (newName) { return "uk.co.codeleap.".concat(newName.trim().toLowerCase()); };
|
|
9
9
|
exports.getNewBundleName = getNewBundleName;
|
|
10
10
|
function subprocess(name) {
|
|
11
11
|
var params = [];
|
package/dist/lib/walk.js
CHANGED
|
File without changes
|
package/dist/types.js
CHANGED
|
File without changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codeleap/cli",
|
|
3
|
-
"version": "2.4.
|
|
3
|
+
"version": "2.4.10",
|
|
4
4
|
"main": "./dist/index.js",
|
|
5
5
|
"repository": "git@github.com:codeleap-uk/codeleap-lib.git",
|
|
6
6
|
"author": "Paulo Henrique De Souza <paulosouza300272@gmail.com>",
|
|
@@ -14,11 +14,11 @@
|
|
|
14
14
|
"@types/inquirer": "^8.2.0",
|
|
15
15
|
"@types/libsodium-wrappers": "^0.7.10",
|
|
16
16
|
"cross-env": "^7.0.3",
|
|
17
|
-
"@codeleap/common": "*"
|
|
18
|
-
"typescript": "^4.5.5"
|
|
17
|
+
"@codeleap/common": "*"
|
|
19
18
|
},
|
|
20
19
|
"peerDependencies": {
|
|
21
|
-
"@codeleap/common": ""
|
|
20
|
+
"@codeleap/common": "*",
|
|
21
|
+
"typescript": "4.5.4"
|
|
22
22
|
},
|
|
23
23
|
"scripts": {
|
|
24
24
|
"build": "tsc --build",
|
|
@@ -41,8 +41,7 @@
|
|
|
41
41
|
"nanospinner": "^1.0.0",
|
|
42
42
|
"node-keytool": "^0.0.3",
|
|
43
43
|
"octokit": "^2.0.10",
|
|
44
|
-
"react-icons": "^4.3.1",
|
|
45
44
|
"simple-git": "^3.15.0",
|
|
46
45
|
"yup": "^0.32.11"
|
|
47
46
|
}
|
|
48
|
-
}
|
|
47
|
+
}
|