@open-mova/cli 0.1.12 → 0.1.13

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/README.md CHANGED
@@ -48,7 +48,10 @@ npm link
48
48
 
49
49
  ### `mova create`
50
50
 
51
- Crea una aplicación completa. Descarga una shell versionada, el core y un MF inicial `home`.
51
+ Crea una aplicación completa. Descarga una shell versionada, el core y un MF
52
+ inicial `home`. Ese MF incluye por defecto el `productionRemoteEntry` de la
53
+ demo oficial de Open Mova, para probar Capacitor sin desplegar un MF propio.
54
+ Sustitúyelo antes de publicar la aplicación.
52
55
 
53
56
  ```bash
54
57
  mova create mi-aplicacion
@@ -1,4 +1,5 @@
1
1
  export declare const SHELL_REPOSITORY = "https://github.com/rgarciadelongoria/open-mova.git";
2
+ export declare const DEMO_MICROFRONTEND_REMOTE_ENTRY = "https://rgarciadelongoria.github.io/open-mova/remoteEntry.json";
2
3
  export interface ShellVersion {
3
4
  readonly repository: string;
4
5
  readonly version: string;
@@ -3,6 +3,8 @@ import { cpSync, existsSync, mkdtempSync, readFileSync, rmSync, writeFileSync, }
3
3
  import { basename, join } from 'node:path';
4
4
  import { tmpdir } from 'node:os';
5
5
  export const SHELL_REPOSITORY = 'https://github.com/rgarciadelongoria/open-mova.git';
6
+ // El demo publicado permite probar una aplicación recién creada sin desplegar un MF propio.
7
+ export const DEMO_MICROFRONTEND_REMOTE_ENTRY = 'https://rgarciadelongoria.github.io/open-mova/remoteEntry.json';
6
8
  const VERSION_PATTERN = /^v(\d+)\.(\d+)\.(\d+)$/;
7
9
  const PUBLISHED_CORE_VERSION = '^0.1.9';
8
10
  const EXCLUDED_ENTRIES = new Set([
@@ -3,8 +3,9 @@ import { dirname, join, resolve } from 'node:path';
3
3
  import { createMicrofrontend } from '../application/microfrontend.js';
4
4
  import { addMicrofrontend, writeApplicationConfiguration, } from '../application/configuration.js';
5
5
  import { synchronizeShellConfiguration } from '../application/shell-configuration.js';
6
- import { configureDownloadedShell, downloadShell, } from '../application/shell-repository.js';
6
+ import { configureDownloadedShell, DEMO_MICROFRONTEND_REMOTE_ENTRY, downloadShell, } from '../application/shell-repository.js';
7
7
  import { normalizeName } from '../utils/names.js';
8
+ import { changeDirectoryCommand } from '../utils/platform.js';
8
9
  export function registerCreateCommand(program) {
9
10
  program
10
11
  .command('create <name>')
@@ -37,6 +38,7 @@ export function registerCreateCommand(program) {
37
38
  directory: join('mfs', 'home'),
38
39
  profile: 'demo',
39
40
  templateVersion: shell.version,
41
+ productionRemoteEntry: DEMO_MICROFRONTEND_REMOTE_ENTRY,
40
42
  });
41
43
  configuration = addMicrofrontend(configuration, starterMicrofrontend);
42
44
  }
@@ -52,7 +54,7 @@ export function registerCreateCommand(program) {
52
54
  }
53
55
  console.log(`Aplicación creada en ${applicationRoot} con shell ${shellVersion}.`);
54
56
  console.log('Instala las dependencias antes de iniciar el desarrollo:');
55
- console.log(` cd ${applicationRoot}`);
57
+ console.log(` ${changeDirectoryCommand(applicationRoot)}`);
56
58
  console.log(' npm install');
57
59
  if (!options.empty) {
58
60
  console.log(' npm --prefix mfs/home install');
@@ -1,3 +1,5 @@
1
1
  export declare function npmCommand(): string;
2
2
  export declare function localBinaryName(name: string): string;
3
3
  export declare function useCommandShell(): boolean;
4
+ /** Genera un comando copiable en PowerShell y en cmd, también con espacios. */
5
+ export declare function changeDirectoryCommand(directory: string): string;
@@ -7,3 +7,7 @@ export function localBinaryName(name) {
7
7
  export function useCommandShell() {
8
8
  return process.platform === 'win32';
9
9
  }
10
+ /** Genera un comando copiable en PowerShell y en cmd, también con espacios. */
11
+ export function changeDirectoryCommand(directory) {
12
+ return `cd "${directory.replaceAll('\\', '/')}"`;
13
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@open-mova/cli",
3
- "version": "0.1.12",
3
+ "version": "0.1.13",
4
4
  "description": "CLI para crear y mantener aplicaciones Open Mova",
5
5
  "license": "MIT",
6
6
  "author": "Open Mova contributors",