react-native-update-cli 2.10.2 → 2.11.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 (52) hide show
  1. package/lib/app.d.ts +1 -1
  2. package/lib/app.js +42 -45
  3. package/lib/bin.d.ts +2 -0
  4. package/lib/bin.js +70 -0
  5. package/lib/bundle-runner.d.ts +1 -0
  6. package/lib/bundle-runner.js +46 -10
  7. package/lib/exports.d.ts +2 -9
  8. package/lib/exports.js +0 -31
  9. package/lib/index.d.ts +1 -4
  10. package/lib/index.js +12 -80
  11. package/lib/package.js +44 -4
  12. package/lib/provider.js +4 -4
  13. package/lib/types.d.ts +0 -17
  14. package/lib/utils/app-info-parser/aab.js +45 -4
  15. package/lib/utils/index.d.ts +0 -1
  16. package/lib/utils/index.js +0 -13
  17. package/lib/utils/plugin-config.js +42 -6
  18. package/lib/versions.js +0 -2
  19. package/package.json +8 -10
  20. package/src/app.ts +40 -40
  21. package/src/bin.ts +86 -0
  22. package/src/bundle-runner.ts +70 -12
  23. package/src/exports.ts +1 -10
  24. package/src/index.ts +1 -94
  25. package/src/package.ts +1 -3
  26. package/src/provider.ts +6 -4
  27. package/src/types.ts +0 -22
  28. package/src/utils/app-info-parser/aab.ts +1 -1
  29. package/src/utils/index.ts +1 -12
  30. package/src/utils/plugin-config.ts +1 -1
  31. package/src/versions.ts +1 -3
  32. package/lib/module-manager.d.ts +0 -16
  33. package/lib/module-manager.js +0 -90
  34. package/lib/modules/app-module.d.ts +0 -2
  35. package/lib/modules/app-module.js +0 -15
  36. package/lib/modules/bundle-module.d.ts +0 -2
  37. package/lib/modules/bundle-module.js +0 -15
  38. package/lib/modules/index.d.ts +0 -6
  39. package/lib/modules/index.js +0 -42
  40. package/lib/modules/package-module.d.ts +0 -2
  41. package/lib/modules/package-module.js +0 -15
  42. package/lib/modules/user-module.d.ts +0 -2
  43. package/lib/modules/user-module.js +0 -15
  44. package/lib/modules/version-module.d.ts +0 -2
  45. package/lib/modules/version-module.js +0 -15
  46. package/src/module-manager.ts +0 -105
  47. package/src/modules/app-module.ts +0 -7
  48. package/src/modules/bundle-module.ts +0 -7
  49. package/src/modules/index.ts +0 -19
  50. package/src/modules/package-module.ts +0 -7
  51. package/src/modules/user-module.ts +0 -7
  52. package/src/modules/version-module.ts +0 -7
@@ -1,4 +1,4 @@
1
- import fs from 'fs-extra';
1
+ import * as fs from 'fs-extra';
2
2
 
3
3
  interface PluginConfig {
4
4
  name: string;
package/src/versions.ts CHANGED
@@ -5,7 +5,7 @@ import { doDelete, get, getAllPackages, post, put, uploadFile } from './api';
5
5
  import { getPlatform, getSelectedApp } from './app';
6
6
  import { choosePackage } from './package';
7
7
  import type { Package, Platform, Version } from './types';
8
- import { question, saveToLocal } from './utils';
8
+ import { question } from './utils';
9
9
  import { depVersions } from './utils/dep-versions';
10
10
  import { getCommitInfo } from './utils/git';
11
11
  import { t } from './utils/i18n';
@@ -433,8 +433,6 @@ export const versionCommands = {
433
433
  deps: depVersions,
434
434
  commit: await getCommitInfo(),
435
435
  });
436
- // TODO local diff
437
- saveToLocal(fn, `${appId}/ppk/${id}.ppk`);
438
436
  console.log(t('packageUploadSuccess', { id }));
439
437
 
440
438
  const {
@@ -1,16 +0,0 @@
1
- import type { CLIModule, CLIProvider, CommandContext, CommandDefinition, CommandResult } from './types';
2
- export declare class ModuleManager {
3
- private modules;
4
- private provider;
5
- private commands;
6
- constructor();
7
- registerModule(module: CLIModule): void;
8
- unregisterModule(moduleName: string): void;
9
- registerCommand(command: CommandDefinition): void;
10
- executeCommand(commandName: string, context: CommandContext): Promise<CommandResult>;
11
- getProvider(): CLIProvider;
12
- listCommands(): CommandDefinition[];
13
- listModules(): CLIModule[];
14
- listAll(): void;
15
- }
16
- export declare const moduleManager: ModuleManager;
@@ -1,90 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", {
3
- value: true
4
- });
5
- function _export(target, all) {
6
- for(var name in all)Object.defineProperty(target, name, {
7
- enumerable: true,
8
- get: Object.getOwnPropertyDescriptor(all, name).get
9
- });
10
- }
11
- _export(exports, {
12
- get ModuleManager () {
13
- return ModuleManager;
14
- },
15
- get moduleManager () {
16
- return moduleManager;
17
- }
18
- });
19
- const _provider = require("./provider");
20
- class ModuleManager {
21
- registerModule(module) {
22
- if (this.modules.has(module.name)) {
23
- throw new Error(`Module '${module.name}' is already registered`);
24
- }
25
- this.modules.set(module.name, module);
26
- if (module.commands) {
27
- for (const command of module.commands){
28
- this.registerCommand(command);
29
- }
30
- }
31
- if (module.init) {
32
- module.init(this.provider);
33
- }
34
- }
35
- unregisterModule(moduleName) {
36
- const module = this.modules.get(moduleName);
37
- if (!module) {
38
- throw new Error(`Module '${moduleName}' is not registered`);
39
- }
40
- if (module.commands) {
41
- for (const command of module.commands){
42
- this.commands.delete(command.name);
43
- }
44
- }
45
- if (module.cleanup) {
46
- module.cleanup();
47
- }
48
- this.modules.delete(moduleName);
49
- console.log(`Module '${moduleName}' unregistered successfully`);
50
- }
51
- registerCommand(command) {
52
- if (this.commands.has(command.name)) {
53
- throw new Error(`Command '${command.name}' is already registered`);
54
- }
55
- this.commands.set(command.name, command);
56
- }
57
- async executeCommand(commandName, context) {
58
- const command = this.commands.get(commandName);
59
- if (!command) {
60
- throw new Error(`Command '${commandName}' not found`);
61
- }
62
- return await command.handler(context);
63
- }
64
- getProvider() {
65
- return this.provider;
66
- }
67
- listCommands() {
68
- return Array.from(this.commands.values());
69
- }
70
- listModules() {
71
- return Array.from(this.modules.values());
72
- }
73
- listAll() {
74
- console.log('\n=== Registered Commands ===');
75
- for (const command of this.commands.values()){
76
- console.log(` ${command.name}: ${command.description || 'No description'}`);
77
- }
78
- console.log('\n=== Registered Modules ===');
79
- for (const module of this.modules.values()){
80
- var _module_commands;
81
- console.log(` ${module.name} (v${module.version}): ${((_module_commands = module.commands) == null ? void 0 : _module_commands.length) || 0} commands`);
82
- }
83
- }
84
- constructor(){
85
- this.modules = new Map();
86
- this.commands = new Map();
87
- this.provider = new _provider.CLIProviderImpl();
88
- }
89
- }
90
- const moduleManager = new ModuleManager();
@@ -1,2 +0,0 @@
1
- import type { CLIModule } from '../types';
2
- export declare const appModule: CLIModule;
@@ -1,15 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", {
3
- value: true
4
- });
5
- Object.defineProperty(exports, "appModule", {
6
- enumerable: true,
7
- get: function() {
8
- return appModule;
9
- }
10
- });
11
- const appModule = {
12
- name: 'app',
13
- version: '1.0.0',
14
- commands: []
15
- };
@@ -1,2 +0,0 @@
1
- import type { CLIModule } from '../types';
2
- export declare const bundleModule: CLIModule;
@@ -1,15 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", {
3
- value: true
4
- });
5
- Object.defineProperty(exports, "bundleModule", {
6
- enumerable: true,
7
- get: function() {
8
- return bundleModule;
9
- }
10
- });
11
- const bundleModule = {
12
- name: 'bundle',
13
- version: '1.0.0',
14
- commands: []
15
- };
@@ -1,6 +0,0 @@
1
- export { appModule } from './app-module';
2
- export { bundleModule } from './bundle-module';
3
- export { packageModule } from './package-module';
4
- export { userModule } from './user-module';
5
- export { versionModule } from './version-module';
6
- export declare const builtinModules: import("..").CLIModule[];
@@ -1,42 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", {
3
- value: true
4
- });
5
- function _export(target, all) {
6
- for(var name in all)Object.defineProperty(target, name, {
7
- enumerable: true,
8
- get: Object.getOwnPropertyDescriptor(all, name).get
9
- });
10
- }
11
- _export(exports, {
12
- get appModule () {
13
- return _appmodule.appModule;
14
- },
15
- get builtinModules () {
16
- return builtinModules;
17
- },
18
- get bundleModule () {
19
- return _bundlemodule.bundleModule;
20
- },
21
- get packageModule () {
22
- return _packagemodule.packageModule;
23
- },
24
- get userModule () {
25
- return _usermodule.userModule;
26
- },
27
- get versionModule () {
28
- return _versionmodule.versionModule;
29
- }
30
- });
31
- const _appmodule = require("./app-module");
32
- const _bundlemodule = require("./bundle-module");
33
- const _packagemodule = require("./package-module");
34
- const _usermodule = require("./user-module");
35
- const _versionmodule = require("./version-module");
36
- const builtinModules = [
37
- _bundlemodule.bundleModule,
38
- _versionmodule.versionModule,
39
- _appmodule.appModule,
40
- _usermodule.userModule,
41
- _packagemodule.packageModule
42
- ];
@@ -1,2 +0,0 @@
1
- import type { CLIModule } from '../types';
2
- export declare const packageModule: CLIModule;
@@ -1,15 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", {
3
- value: true
4
- });
5
- Object.defineProperty(exports, "packageModule", {
6
- enumerable: true,
7
- get: function() {
8
- return packageModule;
9
- }
10
- });
11
- const packageModule = {
12
- name: 'package',
13
- version: '1.0.0',
14
- commands: []
15
- };
@@ -1,2 +0,0 @@
1
- import type { CLIModule } from '../types';
2
- export declare const userModule: CLIModule;
@@ -1,15 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", {
3
- value: true
4
- });
5
- Object.defineProperty(exports, "userModule", {
6
- enumerable: true,
7
- get: function() {
8
- return userModule;
9
- }
10
- });
11
- const userModule = {
12
- name: 'user',
13
- version: '1.0.0',
14
- commands: []
15
- };
@@ -1,2 +0,0 @@
1
- import type { CLIModule } from '../types';
2
- export declare const versionModule: CLIModule;
@@ -1,15 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", {
3
- value: true
4
- });
5
- Object.defineProperty(exports, "versionModule", {
6
- enumerable: true,
7
- get: function() {
8
- return versionModule;
9
- }
10
- });
11
- const versionModule = {
12
- name: 'version',
13
- version: '1.0.0',
14
- commands: []
15
- };
@@ -1,105 +0,0 @@
1
- import { CLIProviderImpl } from './provider';
2
- import type {
3
- CLIModule,
4
- CLIProvider,
5
- CommandContext,
6
- CommandDefinition,
7
- CommandResult,
8
- } from './types';
9
-
10
- export class ModuleManager {
11
- private modules: Map<string, CLIModule> = new Map();
12
- private provider: CLIProvider;
13
- private commands: Map<string, CommandDefinition> = new Map();
14
-
15
- constructor() {
16
- this.provider = new CLIProviderImpl();
17
- }
18
-
19
- registerModule(module: CLIModule): void {
20
- if (this.modules.has(module.name)) {
21
- throw new Error(`Module '${module.name}' is already registered`);
22
- }
23
-
24
- this.modules.set(module.name, module);
25
-
26
- if (module.commands) {
27
- for (const command of module.commands) {
28
- this.registerCommand(command);
29
- }
30
- }
31
-
32
- if (module.init) {
33
- module.init(this.provider);
34
- }
35
- }
36
-
37
- unregisterModule(moduleName: string): void {
38
- const module = this.modules.get(moduleName);
39
- if (!module) {
40
- throw new Error(`Module '${moduleName}' is not registered`);
41
- }
42
-
43
- if (module.commands) {
44
- for (const command of module.commands) {
45
- this.commands.delete(command.name);
46
- }
47
- }
48
-
49
- if (module.cleanup) {
50
- module.cleanup();
51
- }
52
-
53
- this.modules.delete(moduleName);
54
- console.log(`Module '${moduleName}' unregistered successfully`);
55
- }
56
-
57
- registerCommand(command: CommandDefinition): void {
58
- if (this.commands.has(command.name)) {
59
- throw new Error(`Command '${command.name}' is already registered`);
60
- }
61
- this.commands.set(command.name, command);
62
- }
63
-
64
- async executeCommand(
65
- commandName: string,
66
- context: CommandContext,
67
- ): Promise<CommandResult> {
68
- const command = this.commands.get(commandName);
69
- if (!command) {
70
- throw new Error(`Command '${commandName}' not found`);
71
- }
72
-
73
- return await command.handler(context);
74
- }
75
-
76
- getProvider(): CLIProvider {
77
- return this.provider;
78
- }
79
-
80
- listCommands(): CommandDefinition[] {
81
- return Array.from(this.commands.values());
82
- }
83
-
84
- listModules(): CLIModule[] {
85
- return Array.from(this.modules.values());
86
- }
87
-
88
- listAll(): void {
89
- console.log('\n=== Registered Commands ===');
90
- for (const command of this.commands.values()) {
91
- console.log(
92
- ` ${command.name}: ${command.description || 'No description'}`,
93
- );
94
- }
95
-
96
- console.log('\n=== Registered Modules ===');
97
- for (const module of this.modules.values()) {
98
- console.log(
99
- ` ${module.name} (v${module.version}): ${module.commands?.length || 0} commands`,
100
- );
101
- }
102
- }
103
- }
104
-
105
- export const moduleManager = new ModuleManager();
@@ -1,7 +0,0 @@
1
- import type { CLIModule } from '../types';
2
-
3
- export const appModule: CLIModule = {
4
- name: 'app',
5
- version: '1.0.0',
6
- commands: [],
7
- };
@@ -1,7 +0,0 @@
1
- import type { CLIModule } from '../types';
2
-
3
- export const bundleModule: CLIModule = {
4
- name: 'bundle',
5
- version: '1.0.0',
6
- commands: [],
7
- };
@@ -1,19 +0,0 @@
1
- import { appModule } from './app-module';
2
- import { bundleModule } from './bundle-module';
3
- import { packageModule } from './package-module';
4
- import { userModule } from './user-module';
5
- import { versionModule } from './version-module';
6
-
7
- export { appModule } from './app-module';
8
- export { bundleModule } from './bundle-module';
9
- export { packageModule } from './package-module';
10
- export { userModule } from './user-module';
11
- export { versionModule } from './version-module';
12
-
13
- export const builtinModules = [
14
- bundleModule,
15
- versionModule,
16
- appModule,
17
- userModule,
18
- packageModule,
19
- ];
@@ -1,7 +0,0 @@
1
- import type { CLIModule } from '../types';
2
-
3
- export const packageModule: CLIModule = {
4
- name: 'package',
5
- version: '1.0.0',
6
- commands: [],
7
- };
@@ -1,7 +0,0 @@
1
- import type { CLIModule } from '../types';
2
-
3
- export const userModule: CLIModule = {
4
- name: 'user',
5
- version: '1.0.0',
6
- commands: [],
7
- };
@@ -1,7 +0,0 @@
1
- import type { CLIModule } from '../types';
2
-
3
- export const versionModule: CLIModule = {
4
- name: 'version',
5
- version: '1.0.0',
6
- commands: [],
7
- };