@teams-max/mwsp 1.0.0 → 1.0.1

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/es/cli/build.js CHANGED
@@ -23,7 +23,7 @@ export default function build() {
23
23
  // });
24
24
  function _build() {
25
25
  _build = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
26
- var pnpmVersion, pkg, entryApp, entryEnv, entryJenkinsBuild;
26
+ var pnpmVersion, pkg, entryApp, subApp, versionUrl, entryEnv, entryJenkinsBuild;
27
27
  return _regeneratorRuntime().wrap(function _callee$(_context) {
28
28
  while (1) switch (_context.prev = _context.next) {
29
29
  case 0:
@@ -36,6 +36,8 @@ function _build() {
36
36
  assert(!pnpmVersion.includes('not found'), 'pnpm: command not found please use npm install -g pnpm');
37
37
  pkg = require(join(cwd, 'package.json'));
38
38
  entryApp = args.app || args.App || args.APP || pkg.name;
39
+ subApp = args.subApp || args.SUB_APP || '';
40
+ versionUrl = args.versionUrl || args.RESOURCE_URL || '';
39
41
  entryEnv = args.env || args.ENV || '';
40
42
  entryJenkinsBuild = args.jenkinsBuild || args.JENKINSBUILD || args.jenkins_build || args.JENKINS_BUILD;
41
43
  entryApp = entryApp;
@@ -44,6 +46,8 @@ function _build() {
44
46
  assert(entryEnv, "Build failed, A build environment is a must.");
45
47
  logger.info("Start: APP:".concat(entryApp, " ENV:").concat(entryEnv));
46
48
  process.env.MAX_APP_ENV = entryEnv;
49
+ process.env.MAX_SUB_APP = subApp;
50
+ process.env.RESOURCE_URL = versionUrl;
47
51
  process.env.BABEL_ENV = entryEnv !== 'production' ? 'development' : 'production';
48
52
  process.env.MAX_APP_TYPE = 'max', process.env.MAX_APP_KEY = pkg.appKey || "";
49
53
  entryJenkinsBuild && buildNotify({
@@ -53,18 +57,18 @@ function _build() {
53
57
  });
54
58
  logger.event('max build');
55
59
  if (!(entryEnv === 'development')) {
56
- _context.next = 24;
60
+ _context.next = 28;
57
61
  break;
58
62
  }
59
- _context.next = 22;
60
- return $(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["max build"])));
61
- case 22:
62
63
  _context.next = 26;
64
+ return $(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["max build"])));
65
+ case 26:
66
+ _context.next = 30;
63
67
  break;
64
- case 24:
65
- _context.next = 26;
68
+ case 28:
69
+ _context.next = 30;
66
70
  return $(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["max build && rm -fr ./dist/*.map"])));
67
- case 26:
71
+ case 30:
68
72
  logger.info("Success: APP:".concat(entryApp, " ENV:").concat(entryEnv));
69
73
  entryJenkinsBuild && buildNotify({
70
74
  args: args,
@@ -72,7 +76,7 @@ function _build() {
72
76
  environment: [entryEnv],
73
77
  buildStatus: 'success'
74
78
  });
75
- case 28:
79
+ case 32:
76
80
  case "end":
77
81
  return _context.stop();
78
82
  }
package/lib/cli/build.js CHANGED
@@ -49,6 +49,8 @@ async function build() {
49
49
  );
50
50
  const pkg = require((0, import_path.join)(cwd, "package.json"));
51
51
  let entryApp = args.app || args.App || args.APP || pkg.name;
52
+ let subApp = args.subApp || args.SUB_APP || "";
53
+ let versionUrl = args.versionUrl || args.RESOURCE_URL || "";
52
54
  let entryEnv = args.env || args.ENV || "";
53
55
  let entryJenkinsBuild = args.jenkinsBuild || args.JENKINSBUILD || args.jenkins_build || args.JENKINS_BUILD;
54
56
  entryApp = entryApp;
@@ -63,6 +65,8 @@ async function build() {
63
65
  );
64
66
  logger.info(`Start: APP:${entryApp} ENV:${entryEnv}`);
65
67
  process.env.MAX_APP_ENV = entryEnv;
68
+ process.env.MAX_SUB_APP = subApp;
69
+ process.env.RESOURCE_URL = versionUrl;
66
70
  process.env.BABEL_ENV = entryEnv !== "production" ? "development" : "production";
67
71
  process.env.MAX_APP_TYPE = "max", process.env.MAX_APP_KEY = pkg.appKey || "";
68
72
  entryJenkinsBuild && (0, import_buildNotify.default)({ args, appList: [entryApp], environment: [entryEnv] });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@teams-max/mwsp",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "@teams-max/mwsp",
5
5
  "homepage": "https://gitlab.daikuan.qihoo.net/efficacy-fe/teams-max/-/tree/master/packages/mwsp",
6
6
  "repository": {