@codeleap/cli 3.16.2 → 3.18.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 (65) hide show
  1. package/dist/commands/configure.js +0 -0
  2. package/dist/commands/convertorWebp.js +0 -0
  3. package/dist/commands/createApp.js +0 -0
  4. package/dist/commands/createStyleSheets.js +0 -0
  5. package/dist/commands/downloadKeystores.js +0 -0
  6. package/dist/commands/keystoresAndroid.js +0 -0
  7. package/dist/commands/rename.js +0 -0
  8. package/dist/commands/syncIcons.js +0 -0
  9. package/dist/constants.js +0 -0
  10. package/dist/index.js +0 -0
  11. package/dist/lib/Command.js +0 -0
  12. package/dist/lib/android/index.js +0 -0
  13. package/dist/lib/android/keystore.js +0 -0
  14. package/dist/lib/android/rename.js +0 -0
  15. package/dist/lib/android/utils.js +0 -0
  16. package/dist/lib/createApp/common.js +0 -0
  17. package/dist/lib/createApp/mobile.js +0 -0
  18. package/dist/lib/firebase.js +0 -0
  19. package/dist/lib/index.js +0 -0
  20. package/dist/lib/ios/index.js +0 -0
  21. package/dist/lib/ios/rename.js +0 -0
  22. package/dist/lib/ios/utils.js +0 -0
  23. package/dist/lib/spinner.js +0 -0
  24. package/dist/lib/utils.js +0 -0
  25. package/dist/lib/walk.js +0 -0
  26. package/dist/types.js +0 -0
  27. package/package.json +1 -1
  28. package/dist/commands/codepushBootstrap.d.ts +0 -28
  29. package/dist/commands/codepushBootstrap.js +0 -149
  30. package/dist/commands/codepushDeploy.d.ts +0 -28
  31. package/dist/commands/codepushDeploy.js +0 -101
  32. package/dist/commands/configure.d.ts +0 -26
  33. package/dist/commands/convertorWebp.d.ts +0 -29
  34. package/dist/commands/createApp.d.ts +0 -40
  35. package/dist/commands/createStyleSheets.d.ts +0 -0
  36. package/dist/commands/downloadKeystores.d.ts +0 -24
  37. package/dist/commands/keystoresAndroid.d.ts +0 -25
  38. package/dist/commands/rename.d.ts +0 -64
  39. package/dist/commands/syncIcons.d.ts +0 -37
  40. package/dist/constants.d.ts +0 -10
  41. package/dist/index.d.ts +0 -2
  42. package/dist/lib/Command.d.ts +0 -2
  43. package/dist/lib/alterCliSettings.d.ts +0 -2
  44. package/dist/lib/alterCliSettings.js +0 -19
  45. package/dist/lib/android/index.d.ts +0 -2
  46. package/dist/lib/android/keystore.d.ts +0 -14
  47. package/dist/lib/android/rename.d.ts +0 -7
  48. package/dist/lib/android/utils.d.ts +0 -3
  49. package/dist/lib/appcenter.d.ts +0 -21
  50. package/dist/lib/appcenter.js +0 -209
  51. package/dist/lib/createApp/common.d.ts +0 -1
  52. package/dist/lib/createApp/mobile.d.ts +0 -7
  53. package/dist/lib/firebase.d.ts +0 -2
  54. package/dist/lib/getCliSettings.d.ts +0 -4
  55. package/dist/lib/getCliSettings.js +0 -34
  56. package/dist/lib/git.d.ts +0 -2
  57. package/dist/lib/git.js +0 -73
  58. package/dist/lib/index.d.ts +0 -20
  59. package/dist/lib/ios/index.d.ts +0 -2
  60. package/dist/lib/ios/rename.d.ts +0 -7
  61. package/dist/lib/ios/utils.d.ts +0 -2
  62. package/dist/lib/spinner.d.ts +0 -6
  63. package/dist/lib/utils.d.ts +0 -18
  64. package/dist/lib/walk.d.ts +0 -37
  65. package/dist/types.d.ts +0 -28
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
package/dist/constants.js CHANGED
File without changes
package/dist/index.js CHANGED
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
package/dist/lib/index.js CHANGED
File without changes
File without changes
File without changes
File without changes
File without changes
package/dist/lib/utils.js CHANGED
File without changes
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": "3.16.2",
3
+ "version": "3.18.0",
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>",
@@ -1,28 +0,0 @@
1
- export declare const codepushBootstrap: import("cleye").Command<{
2
- name: "codepush-bootstrap";
3
- parameters: "<apiToken>"[];
4
- help: {
5
- description: string;
6
- examples: string[];
7
- };
8
- }, {
9
- command: "codepush-bootstrap";
10
- } & import("type-flag").TypeFlag<{
11
- help: BooleanConstructor;
12
- }> & {
13
- _: {
14
- apiToken: string;
15
- };
16
- showHelp: (options?: {
17
- version?: string;
18
- description?: string;
19
- usage?: string | false | string[];
20
- examples?: string | string[];
21
- render?: (nodes: {
22
- id?: string;
23
- type: keyof import("cleye").Renderers;
24
- data: any;
25
- }[], renderers: import("cleye").Renderers) => string;
26
- }) => void;
27
- showVersion: () => void;
28
- }>;
@@ -1,149 +0,0 @@
1
- "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
- var __generator = (this && this.__generator) || function (thisArg, body) {
12
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
13
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
14
- function verb(n) { return function (v) { return step([n, v]); }; }
15
- function step(op) {
16
- if (f) throw new TypeError("Generator is already executing.");
17
- while (g && (g = 0, op[0] && (_ = 0)), _) try {
18
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
19
- if (y = 0, t) op = [op[0] & 2, t.value];
20
- switch (op[0]) {
21
- case 0: case 1: t = op; break;
22
- case 4: _.label++; return { value: op[1], done: false };
23
- case 5: _.label++; y = op[1]; op = [0]; continue;
24
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
25
- default:
26
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
27
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
28
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
29
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
30
- if (t[2]) _.ops.pop();
31
- _.trys.pop(); continue;
32
- }
33
- op = body.call(thisArg, _);
34
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
35
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
36
- }
37
- };
38
- var __read = (this && this.__read) || function (o, n) {
39
- var m = typeof Symbol === "function" && o[Symbol.iterator];
40
- if (!m) return o;
41
- var i = m.call(o), r, ar = [], e;
42
- try {
43
- while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
44
- }
45
- catch (error) { e = { error: error }; }
46
- finally {
47
- try {
48
- if (r && !r.done && (m = i["return"])) m.call(i);
49
- }
50
- finally { if (e) throw e.error; }
51
- }
52
- return ar;
53
- };
54
- var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
55
- if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
56
- if (ar || !(i in from)) {
57
- if (!ar) ar = Array.prototype.slice.call(from, 0, i);
58
- ar[i] = from[i];
59
- }
60
- }
61
- return to.concat(ar || Array.prototype.slice.call(from));
62
- };
63
- Object.defineProperty(exports, "__esModule", { value: true });
64
- exports.codepushBootstrap = void 0;
65
- var lib_1 = require("../lib");
66
- var Command_1 = require("../lib/Command");
67
- var commandName = 'codepush-bootstrap';
68
- exports.codepushBootstrap = (0, Command_1.codeleapCommand)({
69
- name: commandName,
70
- parameters: [
71
- '<apiToken>',
72
- ],
73
- help: {
74
- description: 'Create a codepush app for iOS and Android, along with necessary tokens. To get the apiToken, go to https://appcenter.ms/settings/',
75
- examples: [
76
- "codeleap ".concat(commandName, " <apiToken>"),
77
- ],
78
- },
79
- }, function (argv) { return __awaiter(void 0, void 0, void 0, function () {
80
- var apiToken, settings, hasAppConfig, defaultBranchName, iosApp_1, e_1, androidApp_1, e_2;
81
- return __generator(this, function (_a) {
82
- switch (_a.label) {
83
- case 0:
84
- apiToken = argv._[0];
85
- settings = (0, lib_1.getCliSettings)();
86
- hasAppConfig = !!settings.codepush.android || !!settings.codepush.ios;
87
- if (hasAppConfig) {
88
- console.log([
89
- 'You already have codepush apps configured',
90
- 'If you want to create new ones, please apply the following changes to codeleapcli.config.json:',
91
- '1. Remove codepush.ios and codepush.android keys',
92
- '2. Change codepush.ApplicationName to a new value',
93
- '3. Run this command again',
94
- ].join('\n'));
95
- return [2 /*return*/];
96
- }
97
- return [4 /*yield*/, (0, lib_1.getDefaultBranchName)()];
98
- case 1:
99
- defaultBranchName = _a.sent();
100
- console.log('Creating applications...');
101
- _a.label = 2;
102
- case 2:
103
- _a.trys.push([2, 5, , 6]);
104
- return [4 /*yield*/, lib_1.Codepush.createApplication('ios', apiToken)];
105
- case 3:
106
- iosApp_1 = _a.sent();
107
- console.log('iOS application created');
108
- (0, lib_1.alterCliSettings)(function (currentSettings) {
109
- currentSettings.codepush.ios = {
110
- ApplicationName: iosApp_1.app.name,
111
- ApiToken: iosApp_1.appToken,
112
- };
113
- return currentSettings;
114
- });
115
- return [4 /*yield*/, lib_1.Codepush.createDeployment(defaultBranchName, 'ios')];
116
- case 4:
117
- _a.sent();
118
- return [3 /*break*/, 6];
119
- case 5:
120
- e_1 = _a.sent();
121
- console.error.apply(console, __spreadArray(['Error creating iOS application'], __read((0, lib_1.formatError)(e_1)), false));
122
- process.exit(1);
123
- return [2 /*return*/];
124
- case 6:
125
- _a.trys.push([6, 9, , 10]);
126
- return [4 /*yield*/, lib_1.Codepush.createApplication('android', apiToken)];
127
- case 7:
128
- androidApp_1 = _a.sent();
129
- console.log('Android application created');
130
- (0, lib_1.alterCliSettings)(function (currentSettings) {
131
- currentSettings.codepush.android = {
132
- ApplicationName: androidApp_1.app.name,
133
- ApiToken: androidApp_1.appToken,
134
- };
135
- return currentSettings;
136
- });
137
- return [4 /*yield*/, lib_1.Codepush.createDeployment(defaultBranchName, 'android')];
138
- case 8:
139
- _a.sent();
140
- return [3 /*break*/, 10];
141
- case 9:
142
- e_2 = _a.sent();
143
- console.error.apply(console, __spreadArray(['Error creating Android application'], __read((0, lib_1.formatError)(e_2)), false));
144
- process.exit(1);
145
- return [2 /*return*/];
146
- case 10: return [2 /*return*/];
147
- }
148
- });
149
- }); });
@@ -1,28 +0,0 @@
1
- export declare const codepushDeploy: import("cleye").Command<{
2
- name: "codepush-deploy";
3
- parameters: undefined[];
4
- help: {
5
- description: string;
6
- examples: string[];
7
- };
8
- }, {
9
- command: "codepush-deploy";
10
- } & import("type-flag").TypeFlag<{
11
- help: BooleanConstructor;
12
- }> & {
13
- _: {
14
- [x: string]: string | string[];
15
- };
16
- showHelp: (options?: {
17
- version?: string;
18
- description?: string;
19
- usage?: string | false | string[];
20
- examples?: string | string[];
21
- render?: (nodes: {
22
- id?: string;
23
- type: keyof import("cleye").Renderers;
24
- data: any;
25
- }[], renderers: import("cleye").Renderers) => string;
26
- }) => void;
27
- showVersion: () => void;
28
- }>;
@@ -1,101 +0,0 @@
1
- "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
- var __generator = (this && this.__generator) || function (thisArg, body) {
12
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
13
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
14
- function verb(n) { return function (v) { return step([n, v]); }; }
15
- function step(op) {
16
- if (f) throw new TypeError("Generator is already executing.");
17
- while (g && (g = 0, op[0] && (_ = 0)), _) try {
18
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
19
- if (y = 0, t) op = [op[0] & 2, t.value];
20
- switch (op[0]) {
21
- case 0: case 1: t = op; break;
22
- case 4: _.label++; return { value: op[1], done: false };
23
- case 5: _.label++; y = op[1]; op = [0]; continue;
24
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
25
- default:
26
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
27
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
28
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
29
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
30
- if (t[2]) _.ops.pop();
31
- _.trys.pop(); continue;
32
- }
33
- op = body.call(thisArg, _);
34
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
35
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
36
- }
37
- };
38
- var __importDefault = (this && this.__importDefault) || function (mod) {
39
- return (mod && mod.__esModule) ? mod : { "default": mod };
40
- };
41
- Object.defineProperty(exports, "__esModule", { value: true });
42
- exports.codepushDeploy = void 0;
43
- var lib_1 = require("../lib");
44
- var Command_1 = require("../lib/Command");
45
- var os_1 = __importDefault(require("os"));
46
- var commandName = 'codepush-deploy';
47
- exports.codepushDeploy = (0, Command_1.codeleapCommand)({
48
- name: commandName,
49
- parameters: [],
50
- help: {
51
- description: 'Update the codepush deployment from the current branch, creating it if it does not exist',
52
- examples: [
53
- "codeleap ".concat(commandName),
54
- ],
55
- },
56
- }, function (argv) { return __awaiter(void 0, void 0, void 0, function () {
57
- var androidApp, iosApp, branch, androidDeploymentExists, iosDeploymentExists;
58
- return __generator(this, function (_a) {
59
- switch (_a.label) {
60
- case 0: return [4 /*yield*/, lib_1.Codepush.getApplication('android')];
61
- case 1:
62
- androidApp = _a.sent();
63
- return [4 /*yield*/, lib_1.Codepush.getApplication('ios')];
64
- case 2:
65
- iosApp = _a.sent();
66
- return [4 /*yield*/, (0, lib_1.getCurrentBranch)()];
67
- case 3:
68
- branch = _a.sent();
69
- return [4 /*yield*/, lib_1.Codepush.deploymentExists(branch, 'android')];
70
- case 4:
71
- androidDeploymentExists = _a.sent();
72
- if (!!androidDeploymentExists) return [3 /*break*/, 6];
73
- return [4 /*yield*/, lib_1.Codepush.addDeployment(branch, androidApp)];
74
- case 5:
75
- _a.sent();
76
- _a.label = 6;
77
- case 6: return [4 /*yield*/, lib_1.Codepush.updateDeployment(branch, androidApp)];
78
- case 7:
79
- _a.sent();
80
- if (!(os_1.default.platform() === 'darwin')) return [3 /*break*/, 12];
81
- return [4 /*yield*/, lib_1.Codepush.deploymentExists(branch, 'ios')];
82
- case 8:
83
- iosDeploymentExists = _a.sent();
84
- if (!!iosDeploymentExists) return [3 /*break*/, 10];
85
- return [4 /*yield*/, lib_1.Codepush.addDeployment(branch, iosApp)];
86
- case 9:
87
- _a.sent();
88
- _a.label = 10;
89
- case 10: return [4 /*yield*/, lib_1.Codepush.updateDeployment(branch, iosApp)];
90
- case 11:
91
- _a.sent();
92
- return [3 /*break*/, 13];
93
- case 12:
94
- console.log('Skipping iOS deployment as it is not supported on this platform');
95
- _a.label = 13;
96
- case 13:
97
- console.log('Deployment updated');
98
- return [2 /*return*/];
99
- }
100
- });
101
- }); });
@@ -1,26 +0,0 @@
1
- import '../lib/firebase';
2
- export declare const configureCommand: import("cleye").Command<{
3
- name: "configure";
4
- help: {
5
- description: string;
6
- examples: string[];
7
- };
8
- }, {
9
- command: "configure";
10
- } & import("type-flag").TypeFlag<{
11
- help: BooleanConstructor;
12
- }> & {
13
- _: {};
14
- showHelp: (options?: {
15
- version?: string;
16
- description?: string;
17
- usage?: string | false | string[];
18
- examples?: string | string[];
19
- render?: (nodes: {
20
- id?: string;
21
- type: keyof import("cleye").Renderers;
22
- data: any;
23
- }[], renderers: import("cleye").Renderers) => string;
24
- }) => void;
25
- showVersion: () => void;
26
- }>;
@@ -1,29 +0,0 @@
1
- import '../lib/firebase';
2
- export declare const convertorWebpCommand: import("cleye").Command<{
3
- name: "convertor-webp";
4
- parameters: undefined[];
5
- help: {
6
- description: string;
7
- examples: string[];
8
- };
9
- }, {
10
- command: "convertor-webp";
11
- } & import("type-flag").TypeFlag<{
12
- help: BooleanConstructor;
13
- }> & {
14
- _: {
15
- [x: string]: string | string[];
16
- };
17
- showHelp: (options?: {
18
- version?: string;
19
- description?: string;
20
- usage?: string | false | string[];
21
- examples?: string | string[];
22
- render?: (nodes: {
23
- id?: string;
24
- type: keyof import("cleye").Renderers;
25
- data: any;
26
- }[], renderers: import("cleye").Renderers) => string;
27
- }) => void;
28
- showVersion: () => void;
29
- }>;
@@ -1,40 +0,0 @@
1
- import '../lib/firebase';
2
- export declare const createAppCommand: import("cleye").Command<{
3
- name: "create";
4
- parameters: "[name]"[];
5
- help: {
6
- description: string;
7
- examples: string[];
8
- };
9
- flags: {
10
- initFirebase: {
11
- type: BooleanConstructor;
12
- default: boolean;
13
- };
14
- };
15
- }, {
16
- command: "create";
17
- } & import("type-flag").TypeFlag<{
18
- initFirebase: {
19
- type: BooleanConstructor;
20
- default: boolean;
21
- };
22
- } & {
23
- help: BooleanConstructor;
24
- }> & {
25
- _: {
26
- name: string;
27
- };
28
- showHelp: (options?: {
29
- version?: string;
30
- description?: string;
31
- usage?: string | false | string[];
32
- examples?: string | string[];
33
- render?: (nodes: {
34
- id?: string;
35
- type: keyof import("cleye").Renderers;
36
- data: any;
37
- }[], renderers: import("cleye").Renderers) => string;
38
- }) => void;
39
- showVersion: () => void;
40
- }>;
File without changes
@@ -1,24 +0,0 @@
1
- export declare const downloadKeystores: import("cleye").Command<{
2
- name: "download-keystores";
3
- parameters: "[branch]"[];
4
- }, {
5
- command: "download-keystores";
6
- } & import("type-flag").TypeFlag<{
7
- help: BooleanConstructor;
8
- }> & {
9
- _: {
10
- branch: string;
11
- };
12
- showHelp: (options?: {
13
- version?: string;
14
- description?: string;
15
- usage?: string | false | string[];
16
- examples?: string | string[];
17
- render?: (nodes: {
18
- id?: string;
19
- type: keyof import("cleye").Renderers;
20
- data: any;
21
- }[], renderers: import("cleye").Renderers) => string;
22
- }) => void;
23
- showVersion: () => void;
24
- }>;
@@ -1,25 +0,0 @@
1
- export declare const generateReleaseKey: import("cleye").Command<{
2
- name: "keystores-android";
3
- parameters: undefined[];
4
- alias: "i";
5
- }, {
6
- command: "keystores-android";
7
- } & import("type-flag").TypeFlag<{
8
- help: BooleanConstructor;
9
- }> & {
10
- _: {
11
- [x: string]: string | string[];
12
- };
13
- showHelp: (options?: {
14
- version?: string;
15
- description?: string;
16
- usage?: string | false | string[];
17
- examples?: string | string[];
18
- render?: (nodes: {
19
- id?: string;
20
- type: keyof import("cleye").Renderers;
21
- data: any;
22
- }[], renderers: import("cleye").Renderers) => string;
23
- }) => void;
24
- showVersion: () => void;
25
- }>;
@@ -1,64 +0,0 @@
1
- import '../lib/firebase';
2
- export declare const renameMobileCommand: import("cleye").Command<{
3
- name: "rename-mobile";
4
- parameters: "[new_name]"[];
5
- help: {
6
- description: string;
7
- examples: string[];
8
- };
9
- flags: {
10
- ios: {
11
- type: BooleanConstructor;
12
- description: string;
13
- };
14
- android: {
15
- type: BooleanConstructor;
16
- description: string;
17
- };
18
- dry: {
19
- type: BooleanConstructor;
20
- description: string;
21
- };
22
- displayOnly: {
23
- type: BooleanConstructor;
24
- description: string;
25
- };
26
- };
27
- }, {
28
- command: "rename-mobile";
29
- } & import("type-flag").TypeFlag<{
30
- ios: {
31
- type: BooleanConstructor;
32
- description: string;
33
- };
34
- android: {
35
- type: BooleanConstructor;
36
- description: string;
37
- };
38
- dry: {
39
- type: BooleanConstructor;
40
- description: string;
41
- };
42
- displayOnly: {
43
- type: BooleanConstructor;
44
- description: string;
45
- };
46
- } & {
47
- help: BooleanConstructor;
48
- }> & {
49
- _: {
50
- newName: string;
51
- };
52
- showHelp: (options?: {
53
- version?: string;
54
- description?: string;
55
- usage?: string | false | string[];
56
- examples?: string | string[];
57
- render?: (nodes: {
58
- id?: string;
59
- type: keyof import("cleye").Renderers;
60
- data: any;
61
- }[], renderers: import("cleye").Renderers) => string;
62
- }) => void;
63
- showVersion: () => void;
64
- }>;
@@ -1,37 +0,0 @@
1
- import '../lib/firebase';
2
- export declare const syncIconsCommand: import("cleye").Command<{
3
- name: "syncIcons";
4
- help: {
5
- description: string;
6
- examples: string[];
7
- };
8
- flags: {
9
- logdiff: {
10
- type: BooleanConstructor;
11
- default: boolean;
12
- };
13
- };
14
- }, {
15
- command: "syncIcons";
16
- } & import("type-flag").TypeFlag<{
17
- logdiff: {
18
- type: BooleanConstructor;
19
- default: boolean;
20
- };
21
- } & {
22
- help: BooleanConstructor;
23
- }> & {
24
- _: {};
25
- showHelp: (options?: {
26
- version?: string;
27
- description?: string;
28
- usage?: string | false | string[];
29
- examples?: string | string[];
30
- render?: (nodes: {
31
- id?: string;
32
- type: keyof import("cleye").Renderers;
33
- data: any;
34
- }[], renderers: import("cleye").Renderers) => string;
35
- }) => void;
36
- showVersion: () => void;
37
- }>;
@@ -1,10 +0,0 @@
1
- export declare const isDev: boolean;
2
- export declare const cwd: string;
3
- export declare const cliConfigPath: string;
4
- export declare const orgName = "codeleap-uk";
5
- export declare const USER_CONFIG: {
6
- GITHUB_TOKEN: string;
7
- SHELL: string | boolean;
8
- };
9
- export declare const MOBILE_TEMPLATE_URL: string;
10
- export declare const CODELEAP_CLI_SETTINGS_PATH = "./codeleapcli.config.json";
package/dist/index.d.ts DELETED
@@ -1,2 +0,0 @@
1
- #!/usr/bin/env node
2
- export type * from './types';
@@ -1,2 +0,0 @@
1
- import { command } from 'cleye';
2
- export declare const codeleapCommand: typeof command;
@@ -1,2 +0,0 @@
1
- import { CodeleapCLISettings } from '../types';
2
- export declare function alterCliSettings(updater: (settings: CodeleapCLISettings) => CodeleapCLISettings): void;
@@ -1,19 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.alterCliSettings = void 0;
4
- var constants_1 = require("../constants");
5
- var utils_1 = require("./utils");
6
- var getCliSettings_1 = require("./getCliSettings");
7
- function alterCliSettings(updater) {
8
- var settingsPath = constants_1.CODELEAP_CLI_SETTINGS_PATH;
9
- if (!utils_1.fs.existsSync(settingsPath)) {
10
- console.error('Settings not found, check path:', settingsPath);
11
- process.exit(1);
12
- return;
13
- }
14
- var settingsJSON = JSON.parse(utils_1.fs.readFileSync(settingsPath).toString());
15
- settingsJSON = updater(settingsJSON);
16
- utils_1.fs.writeFileSync(settingsPath, JSON.stringify(settingsJSON, null, 2));
17
- (0, getCliSettings_1.invalidateSettingsCache)(settingsJSON);
18
- }
19
- exports.alterCliSettings = alterCliSettings;
@@ -1,2 +0,0 @@
1
- export * from './rename';
2
- export * from './utils';
@@ -1,14 +0,0 @@
1
- type KeystoreCredentials = {
2
- 'storePassword': string;
3
- 'keyAlias': string;
4
- 'keyPassword': string;
5
- };
6
- export declare class AndroidConfigFile {
7
- path?: string;
8
- data: {};
9
- constructor(path?: string);
10
- setKey(key: string, value: KeystoreCredentials): void;
11
- save(): void;
12
- }
13
- export declare const generateReleaseKeystore: (androidFolder?: string) => Promise<void>;
14
- export {};
@@ -1,7 +0,0 @@
1
- import firebase from 'firebase-admin';
2
- type RenameAndroidOptions = {
3
- changeBundle?: boolean;
4
- firebase?: firebase.app.App;
5
- };
6
- export declare function renameAndroid(androidFolder: string, newName: string, options?: RenameAndroidOptions): Promise<void>;
7
- export {};
@@ -1,3 +0,0 @@
1
- export declare const getAndroidBundleId: (androidManifestContent: string) => string;
2
- export declare const getAndroidAppName: (stringsXmlContent: string) => string;
3
- export declare const readGradleProperties: (androidFolder: string) => {};
@@ -1,21 +0,0 @@
1
- type ApplicationPlatform = 'ios' | 'android';
2
- declare function addDeployment(name: string, application: string): Promise<void>;
3
- declare function getApplication(platform: ApplicationPlatform): Promise<string>;
4
- export declare function updateDeployment(name: string, application: string): Promise<void>;
5
- export declare function deploymentExists(name: string, platform: ApplicationPlatform): Promise<boolean>;
6
- export declare const createApplication: (platform: ApplicationPlatform, token: string) => Promise<{
7
- app: any;
8
- appToken: any;
9
- }>;
10
- export declare const Codepush: {
11
- getApplication: typeof getApplication;
12
- addDeployment: typeof addDeployment;
13
- updateDeployment: typeof updateDeployment;
14
- createApplication: (platform: ApplicationPlatform, token: string) => Promise<{
15
- app: any;
16
- appToken: any;
17
- }>;
18
- deploymentExists: typeof deploymentExists;
19
- createDeployment: (name: string, platform: ApplicationPlatform) => Promise<any>;
20
- };
21
- export {};
@@ -1,209 +0,0 @@
1
- "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
- var __generator = (this && this.__generator) || function (thisArg, body) {
12
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
13
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
14
- function verb(n) { return function (v) { return step([n, v]); }; }
15
- function step(op) {
16
- if (f) throw new TypeError("Generator is already executing.");
17
- while (g && (g = 0, op[0] && (_ = 0)), _) try {
18
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
19
- if (y = 0, t) op = [op[0] & 2, t.value];
20
- switch (op[0]) {
21
- case 0: case 1: t = op; break;
22
- case 4: _.label++; return { value: op[1], done: false };
23
- case 5: _.label++; y = op[1]; op = [0]; continue;
24
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
25
- default:
26
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
27
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
28
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
29
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
30
- if (t[2]) _.ops.pop();
31
- _.trys.pop(); continue;
32
- }
33
- op = body.call(thisArg, _);
34
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
35
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
36
- }
37
- };
38
- var __importDefault = (this && this.__importDefault) || function (mod) {
39
- return (mod && mod.__esModule) ? mod : { "default": mod };
40
- };
41
- Object.defineProperty(exports, "__esModule", { value: true });
42
- exports.Codepush = exports.createApplication = exports.deploymentExists = exports.updateDeployment = void 0;
43
- var getCliSettings_1 = require("./getCliSettings");
44
- var utils_1 = require("./utils");
45
- var axios_1 = __importDefault(require("axios"));
46
- function addDeployment(name, application) {
47
- return __awaiter(this, void 0, void 0, function () {
48
- return __generator(this, function (_a) {
49
- switch (_a.label) {
50
- case 0: return [4 /*yield*/, (0, utils_1.subprocess)('Create deployment', 'appcenter', ['codepush', 'deployment', 'add', name, '-a', application], {})];
51
- case 1:
52
- _a.sent();
53
- return [2 /*return*/];
54
- }
55
- });
56
- });
57
- }
58
- function getApplication(platform) {
59
- return __awaiter(this, void 0, void 0, function () {
60
- var settings, platformSettings, predictedName;
61
- return __generator(this, function (_a) {
62
- settings = (0, getCliSettings_1.getCliSettings)().codepush;
63
- platformSettings = settings[platform];
64
- if (!platformSettings) {
65
- predictedName = "".concat(settings.ApplicationName, "-").concat(platform);
66
- return [2 /*return*/, "".concat(settings.OwnerName, "/").concat(predictedName)];
67
- }
68
- return [2 /*return*/, "".concat(settings.OwnerName, "/").concat(platformSettings.ApplicationName)];
69
- });
70
- });
71
- }
72
- function getAPI(token, platform) {
73
- var _a, _b;
74
- if (!token && !!platform) {
75
- token = (_b = (_a = (0, getCliSettings_1.getCliSettings)().codepush) === null || _a === void 0 ? void 0 : _a[platform]) === null || _b === void 0 ? void 0 : _b.ApiToken;
76
- }
77
- return axios_1.default.create({
78
- baseURL: 'https://api.appcenter.ms/v0.1',
79
- headers: {
80
- 'Content-Type': 'application/json',
81
- 'X-API-Token': token,
82
- 'Accept': 'application/json',
83
- },
84
- });
85
- }
86
- function updateDeployment(name, application) {
87
- return __awaiter(this, void 0, void 0, function () {
88
- return __generator(this, function (_a) {
89
- switch (_a.label) {
90
- case 0: return [4 /*yield*/, (0, utils_1.subprocess)('Create deployment', 'appcenter', [
91
- 'codepush',
92
- 'release-react',
93
- '-a',
94
- application,
95
- '-d',
96
- name,
97
- '-t',
98
- '1.0.0',
99
- ], {})];
100
- case 1:
101
- _a.sent();
102
- return [2 /*return*/];
103
- }
104
- });
105
- });
106
- }
107
- exports.updateDeployment = updateDeployment;
108
- function deploymentExists(name, platform) {
109
- return __awaiter(this, void 0, void 0, function () {
110
- var application, api, response, e_1;
111
- return __generator(this, function (_a) {
112
- switch (_a.label) {
113
- case 0: return [4 /*yield*/, getApplication(platform)];
114
- case 1:
115
- application = _a.sent();
116
- api = getAPI(undefined, platform);
117
- _a.label = 2;
118
- case 2:
119
- _a.trys.push([2, 4, , 5]);
120
- return [4 /*yield*/, api.get("/apps/".concat(application, "/deployments/").concat(name), {
121
- validateStatus: function () { return true; },
122
- })];
123
- case 3:
124
- response = _a.sent();
125
- return [2 /*return*/, response.status === 200];
126
- case 4:
127
- e_1 = _a.sent();
128
- console.error('Error checking deployment', e_1);
129
- process.exit(1);
130
- return [3 /*break*/, 5];
131
- case 5: return [2 /*return*/, false];
132
- }
133
- });
134
- });
135
- }
136
- exports.deploymentExists = deploymentExists;
137
- var createApplication = function (platform, token) { return __awaiter(void 0, void 0, void 0, function () {
138
- var settings, name, api, platformName, appName, createAppResponse, createTokenResponse, appToken, app;
139
- return __generator(this, function (_a) {
140
- switch (_a.label) {
141
- case 0:
142
- settings = (0, getCliSettings_1.getCliSettings)().codepush;
143
- return [4 /*yield*/, getApplication(platform)];
144
- case 1:
145
- name = _a.sent();
146
- api = getAPI(token, platform);
147
- platformName = {
148
- ios: 'iOS',
149
- android: 'Android',
150
- }[platform];
151
- appName = "".concat(settings.ApplicationName, "-").concat(platformName);
152
- return [4 /*yield*/, api.post("/orgs/".concat(settings.OwnerName, "/apps"), {
153
- 'description': appName,
154
- 'release_type': "Beta",
155
- 'display_name': appName,
156
- 'name': appName,
157
- 'os': platformName,
158
- 'platform': 'React-Native',
159
- })];
160
- case 2:
161
- createAppResponse = _a.sent();
162
- return [4 /*yield*/, (0, utils_1.waitFor)(3000)];
163
- case 3:
164
- _a.sent();
165
- return [4 /*yield*/, api.post("/apps/".concat(settings.OwnerName, "/").concat(appName, "/api_tokens"), {
166
- description: 'Automation token',
167
- scope: [
168
- 'all',
169
- ],
170
- })];
171
- case 4:
172
- createTokenResponse = _a.sent();
173
- appToken = createTokenResponse.data.api_token;
174
- app = createAppResponse.data;
175
- return [2 /*return*/, {
176
- app: app,
177
- appToken: appToken,
178
- }];
179
- }
180
- });
181
- }); };
182
- exports.createApplication = createApplication;
183
- var createDeployment = function (name, platform) { return __awaiter(void 0, void 0, void 0, function () {
184
- var application, api, response;
185
- return __generator(this, function (_a) {
186
- switch (_a.label) {
187
- case 0: return [4 /*yield*/, getApplication(platform)];
188
- case 1:
189
- application = _a.sent();
190
- return [4 /*yield*/, getAPI(undefined, platform)];
191
- case 2:
192
- api = _a.sent();
193
- return [4 /*yield*/, api.post("/apps/".concat(application, "/deployments"), {
194
- name: name,
195
- })];
196
- case 3:
197
- response = _a.sent();
198
- return [2 /*return*/, response.data];
199
- }
200
- });
201
- }); };
202
- exports.Codepush = {
203
- getApplication: getApplication,
204
- addDeployment: addDeployment,
205
- updateDeployment: updateDeployment,
206
- createApplication: exports.createApplication,
207
- deploymentExists: deploymentExists,
208
- createDeployment: createDeployment,
209
- };
@@ -1 +0,0 @@
1
- export declare function initRepoFromTemplate(templateUrl: string, location: string): Promise<void>;
@@ -1,7 +0,0 @@
1
- type CreateMobileAppParams = {
2
- name: string;
3
- location?: string;
4
- client?: boolean;
5
- };
6
- export declare function createMobileApp(params: CreateMobileAppParams): Promise<void>;
7
- export {};
@@ -1,2 +0,0 @@
1
- import firebase from 'firebase-admin';
2
- export declare function loadFirebaseAdmin(credentialPath: string): Promise<firebase.app.App>;
@@ -1,4 +0,0 @@
1
- import { CodeleapCLISettings } from '../types';
2
- export declare let cachedSettings: CodeleapCLISettings;
3
- export declare function getCliSettings(required?: boolean): CodeleapCLISettings;
4
- export declare function invalidateSettingsCache(withValue?: CodeleapCLISettings): void;
@@ -1,34 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.invalidateSettingsCache = exports.getCliSettings = exports.cachedSettings = void 0;
4
- var constants_1 = require("../constants");
5
- var utils_1 = require("./utils");
6
- exports.cachedSettings = null;
7
- function getCliSettings(required) {
8
- if (required === void 0) { required = true; }
9
- if (exports.cachedSettings) {
10
- return exports.cachedSettings;
11
- }
12
- var settingsPath = constants_1.CODELEAP_CLI_SETTINGS_PATH;
13
- if (!utils_1.fs.existsSync(settingsPath) && required) {
14
- console.error('Settings not found, check path:', settingsPath);
15
- process.exit(1);
16
- return;
17
- }
18
- var settingsJSON = utils_1.fs.readFileSync(settingsPath).toString();
19
- try {
20
- var settings = JSON.parse(settingsJSON);
21
- exports.cachedSettings = settings;
22
- return settings;
23
- }
24
- catch (e) {
25
- console.error('Error parsing settings, check path:', settingsPath);
26
- process.exit(1);
27
- }
28
- }
29
- exports.getCliSettings = getCliSettings;
30
- function invalidateSettingsCache(withValue) {
31
- if (withValue === void 0) { withValue = null; }
32
- exports.cachedSettings = withValue;
33
- }
34
- exports.invalidateSettingsCache = invalidateSettingsCache;
package/dist/lib/git.d.ts DELETED
@@ -1,2 +0,0 @@
1
- export declare function getCurrentBranch(): Promise<string>;
2
- export declare function getDefaultBranchName(): Promise<string>;
package/dist/lib/git.js DELETED
@@ -1,73 +0,0 @@
1
- "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
- var __generator = (this && this.__generator) || function (thisArg, body) {
12
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
13
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
14
- function verb(n) { return function (v) { return step([n, v]); }; }
15
- function step(op) {
16
- if (f) throw new TypeError("Generator is already executing.");
17
- while (g && (g = 0, op[0] && (_ = 0)), _) try {
18
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
19
- if (y = 0, t) op = [op[0] & 2, t.value];
20
- switch (op[0]) {
21
- case 0: case 1: t = op; break;
22
- case 4: _.label++; return { value: op[1], done: false };
23
- case 5: _.label++; y = op[1]; op = [0]; continue;
24
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
25
- default:
26
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
27
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
28
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
29
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
30
- if (t[2]) _.ops.pop();
31
- _.trys.pop(); continue;
32
- }
33
- op = body.call(thisArg, _);
34
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
35
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
36
- }
37
- };
38
- Object.defineProperty(exports, "__esModule", { value: true });
39
- exports.getDefaultBranchName = exports.getCurrentBranch = void 0;
40
- var utils_1 = require("./utils");
41
- function getCurrentBranch() {
42
- return __awaiter(this, void 0, void 0, function () {
43
- var stdout, branchName;
44
- return __generator(this, function (_a) {
45
- switch (_a.label) {
46
- case 0: return [4 /*yield*/, (0, utils_1.subprocess)('Get current branch', 'git', ['rev-parse', '--abbrev-ref', 'HEAD'], {})];
47
- case 1:
48
- stdout = (_a.sent()).stdout;
49
- branchName = stdout.join('').trim();
50
- return [2 /*return*/, branchName];
51
- }
52
- });
53
- });
54
- }
55
- exports.getCurrentBranch = getCurrentBranch;
56
- function getDefaultBranchName() {
57
- return __awaiter(this, void 0, void 0, function () {
58
- var stdout, branchName;
59
- return __generator(this, function (_a) {
60
- switch (_a.label) {
61
- case 0: return [4 /*yield*/, (0, utils_1.subprocess)('Get default branch', 'git', ['symbolic-ref', '--short', 'refs/remotes/origin/HEAD'], {})];
62
- case 1:
63
- stdout = (_a.sent()).stdout;
64
- branchName = stdout.join('').trim();
65
- if (branchName.startsWith('origin/')) {
66
- branchName = branchName.replace('origin/', '');
67
- }
68
- return [2 /*return*/, branchName];
69
- }
70
- });
71
- });
72
- }
73
- exports.getDefaultBranchName = getDefaultBranchName;
@@ -1,20 +0,0 @@
1
- export { default as figlet } from 'figlet';
2
- export { default as chalk } from 'chalk';
3
- export { default as inquirer } from 'inquirer';
4
- export declare const git: import("simple-git").SimpleGit;
5
- export declare const octokit: import("@octokit/core").Octokit & {
6
- paginate: import("@octokit/plugin-paginate-rest").PaginateInterface;
7
- } & import("@octokit/plugin-rest-endpoint-methods/dist-types/types").Api & {
8
- retry: {
9
- retryRequest: (error: import("@octokit/request-error").RequestError, retries: number, retryAfter: number) => import("@octokit/request-error").RequestError;
10
- };
11
- };
12
- export * from './utils';
13
- export * from './walk';
14
- export * from './android';
15
- export * from './getCliSettings';
16
- export * from './git';
17
- export * from './alterCliSettings';
18
- export * from './appcenter';
19
- export * from './ios';
20
- export { createMobileApp } from './createApp/mobile';
@@ -1,2 +0,0 @@
1
- export * from './rename';
2
- export * from './utils';
@@ -1,7 +0,0 @@
1
- import _firebase from 'firebase-admin';
2
- type RenameiosOptions = {
3
- changeBundle?: boolean;
4
- firebase?: _firebase.app.App;
5
- };
6
- export declare function renameIos(iosFolder: string, newName: string, options?: RenameiosOptions): Promise<void>;
7
- export {};
@@ -1,2 +0,0 @@
1
- export declare const getIosBundleId: (pbxProjectContent: string) => string;
2
- export declare const getIosAppName: (pbxProjectContent: string) => string;
@@ -1,6 +0,0 @@
1
- import { Options } from 'nanospinner';
2
- type SpinWhileNotCompletedOpts = Options & {
3
- name: string;
4
- };
5
- export declare function spinWhileNotCompleted(operation: () => Promise<any>, opts: SpinWhileNotCompletedOpts): Promise<any>;
6
- export {};
@@ -1,18 +0,0 @@
1
- import cp from 'child_process';
2
- export declare const getNewBundleName: (newName: string) => string;
3
- export declare function subprocess(name: string, ...params: Parameters<typeof cp.spawn>): Promise<{
4
- stdout: string[];
5
- stderr: string[];
6
- }>;
7
- export declare function listPrompt(items: string[], numbered?: boolean): string;
8
- import path from 'path';
9
- import fs from 'fs';
10
- export { fs, path, };
11
- export declare function findExecutable(exec: string): string;
12
- export declare function parseFilePathData(path: string): {
13
- path: string;
14
- extension: string;
15
- name: string;
16
- };
17
- export declare function formatError(err: any): any[];
18
- export declare function waitFor(ms?: number): Promise<unknown>;
@@ -1,37 +0,0 @@
1
- /// <reference types="node" />
2
- import fs from 'fs';
3
- type WalkDirInfo = {
4
- parentPath: string;
5
- name: string;
6
- file?: {
7
- content?: string;
8
- ext: string;
9
- };
10
- dir?: {
11
- contents: string[];
12
- };
13
- stat: fs.Stats;
14
- err?: any;
15
- path: string;
16
- isDir: boolean;
17
- };
18
- type FileMatch = {
19
- name?: string | RegExp;
20
- dir?: boolean;
21
- file?: boolean;
22
- ext?: string[];
23
- };
24
- type WalkDirConfig = {
25
- action: (info: WalkDirInfo) => string | void;
26
- path: string;
27
- options?: {
28
- recursive?: boolean;
29
- all?: boolean;
30
- directories?: boolean;
31
- files?: boolean;
32
- scanFileContent?: boolean;
33
- ignore?: FileMatch[];
34
- };
35
- };
36
- export declare function walkDir(config: WalkDirConfig): Promise<void>;
37
- export {};
package/dist/types.d.ts DELETED
@@ -1,28 +0,0 @@
1
- export type CodeleapCLIUserConfig = {
2
- GITHUB_TOKEN: string;
3
- SHELL?: string;
4
- };
5
- export type CodepushAppConfig = {
6
- ApplicationName: string;
7
- ApiToken: string;
8
- };
9
- export type CodeleapCLISettings = {
10
- 'convertor-webp': {
11
- input: string;
12
- output: string;
13
- convertor: {
14
- compressionQuality: number;
15
- resizeWidth: number;
16
- processColorChannels: boolean;
17
- inputFormats: string[];
18
- ignoreFiles: string[];
19
- };
20
- mode: 'multi' | 'single';
21
- };
22
- 'codepush': {
23
- ApplicationName: string;
24
- OwnerName: string;
25
- ios?: CodepushAppConfig;
26
- android?: CodepushAppConfig;
27
- };
28
- };