zmp-cli 3.15.5 → 3.15.6

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/deploy/index.js CHANGED
@@ -139,6 +139,7 @@ module.exports = async (
139
139
  `${logSymbols.info} View app at:\n${qrcode}`
140
140
  )}`;
141
141
  logger.statusDone(`${chalk.bold.green('Deploy Done!')} 💪`);
142
+ logger.statusDone(`${chalk.bold.green('Version:')} ${nextVersion}`);
142
143
  logger.text(qrCode);
143
144
  });
144
145
  } catch (err) {
package/dist/bundle.js ADDED
@@ -0,0 +1 @@
1
+ const e=require("chalk"),o=require("clear"),t=require("figlet"),i=require("commander"),r=require("log-symbols"),s=require("./utils/fs-extra"),n=require("./utils/check-update"),a=require("./utils/spinner"),c=require("./utils/log"),p=require("./utils/get-current-project"),u=require("./create/utils/get-options"),d=require("./login/utils/get-options"),l=require("./deploy/utils/get-options"),m=require("./migrate/utils/get-options"),g=require("./login/index"),w=require("./create/index"),x=require("./start/index"),y=require("./build/index"),v=require("./deploy/index"),f=require("./sync/index"),q=require("./migrate/index"),h=require("os"),M=require("./package.json"),P=require("./config"),{versionStatus:j}=require("./utils/constants"),Z=process.cwd(),S={statusStart:e=>a.start(e),statusDone:e=>a.done(e),statusText:e=>a.text(e),statusError:e=>a.error(e),text:e=>c.text(e),error:e=>c.error(e),showOnUI:()=>{}};o(),s.existsSync(P.root_env())||s.writeFileSync(P.root_env()),console.log(e.cyan(t.textSync("ZMP CLI",{horizontalLayout:"full",verticalLayout:"full"})),e.cyan(`Version: ${M.version}\n`)),i.version(M.version).usage("<command> [options]").command("init").option("--skipUpdate","Skip checking for update of zmp-cli").description("Init ZMP project").action((async e=>{e.skipUpdate||await n();p(Z)&&(c.text(`${r.error} ZMP project already set up in current directory`),process.exit(1));const o=await d();await g({cwd:Z,...o},S);const t=await u();await w({cwd:Z,...t},S),process.exit(0)})),i.usage("<command> [options]").command("login").description("Login ZMP").action((async()=>{const e=await d();await g({cwd:Z,...e},S),process.exit(0)})),i.usage("<command> [options]").command("start").option("-iosH, --ios-host-name <n>","Specify server hostname. By default it is os.hostname").option("-P, --port <n>","Specify server port. By default it is 3000",parseInt).option("-Z, --zalo-app","Preview on Zalo").option("-ios, --ios","Run on ios").option("-nF, --no-frame","Run without Zalo frame").option("-D, --device","Device mode").option("-M, --mode <m>","Env mode").description("Start a ZMP project").action((async e=>{if(p(Z)||(c.text(`${r.error} This is not ZMP project`),process.exit(1)),e&&e.showMobileUi)try{console.log(require.resolve("nw"))}catch(e){console.error('NW.js module is not found. Please run "npm install -g nw@sdk"'),process.exit(e.code)}let o=h.hostname();o.includes(".local")||(o=`${o}.local`),await x({cwd:Z,port:e&&e.port||3e3,iosHostName:e&&e.iosHostName||o,showMobileUI:e&&e.showMobileUi||!1,previewOnZalo:e&&e.zaloApp||!1,ios:e&&e.ios||!1,mode:e&&e.mode,frame:!(!e||void 0!==e.frame&&null!==e.frame)||e.frame,deviceMode:e&&e.device||!1},S),process.exit(0)})),i.usage("<command> [options]").command("build").description("Build a ZMP project").action((async()=>{p(Z)||(c.text(`${r.error} This is not ZMP project`),process.exit(1)),await y({cwd:Z},S),process.exit(0)})),i.usage("<command> [options]").command("deploy").option("-D, --dev","Deploy in Development server").option("-M, --mode <m>","Env mode").option("-p, --passive","Passive mode (non-interactive)").option("-e, --existing","Deploy existing project").option("-t, --testing","Deploy testing version").option("-m, --desc <message>","Version description").option("-o, --outputDir <output>","Output folder. Default www").option("-P, --port <n>","Specify UI server port. By default it is 3001",parseInt).description("Deploy a ZMP project").action((async e=>{const o=p(Z);let t=e;e.existing?t.customProject=!0:e.passive||(t=await l(o)),e.testing&&(t.versionStatus=j.TESTING),t.quit&&process.exit(1),await v({cwd:Z,dev:e&&e.dev,mode:e&&e.mode,...t},S),process.exit(0)})),i.usage("<command> [options]").command("sync-config <source>").option("-r, --root-element <selector>","Custom entry point, default is #app").description("Automatically update app-config.json resources list based on index.html").action((async(e,o)=>{await f({source:e,...o},S),process.exit(0)})),i.usage("<command> [options]").command("migrate").action((async function(){const e=p(Z);e||(S.text(`${r.error} This is not ZMP project`),process.exit(1));const o=await m();await q({cwd:Z,...o,...e},S),process.exit(0)})),i.on("command:*",(e=>{i.outputHelp(),c.text(`\n Unknown command ${e}`)})),i.parse(process.argv),i.args.length||i.outputHelp();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zmp-cli",
3
- "version": "3.15.5",
3
+ "version": "3.15.6",
4
4
  "description": "ZMP command line utility (CLI)",
5
5
  "main": "index.js",
6
6
  "bin": {