yakuza0 2.22.40-beta.0 → 2.22.40-beta.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/cli/index.js CHANGED
@@ -139,7 +139,6 @@ var gi = function () {
139
139
  _paths2.default.interfereFile.forEach(function (p) {
140
140
  _rimraf2.default.sync(p);
141
141
  });
142
-
143
142
  _context.next = 11;
144
143
  return (0, _inclusive2.default)({
145
144
  apps: apps,
@@ -368,7 +367,7 @@ var run = exports.run = function () {
368
367
  })));
369
368
 
370
369
  _commander2.default.command('image').description('Build image.').option('-nc, --no-cache', 'Do not use cache when building the image').action((0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee6() {
371
- var isTestInner, res, inner, CS, isInner, CLNENV, CLNBUILD, CLNPACK, noCache, CLNWORKERS, TRY_TIMES, CLNVERSION, pkg, NMCI, projectName, obj, imageReleaseName, imageReleaseNameSave, BI, DEP, EXPORT, Dockerfile, prefixCmd, loop;
370
+ var isTestInner, res, inner, CS, isInner, CLNENV, CLNBUILD, CLNPACK, noCache, CLNWORKERS, TRY_TIMES, CLNVERSION, pkg, NMCI, projectName, obj, imageReleaseName, imageReleaseNameSave, BI, preLoad, DEP, EXPORT, DKY, Dockerfile, buildkit, prefixCmd, suffixCmd, fileStr, loop;
372
371
  return _regenerator2.default.wrap(function _callee6$(_context6) {
373
372
  while (1) {
374
373
  switch (_context6.prev = _context6.next) {
@@ -408,18 +407,47 @@ var run = exports.run = function () {
408
407
  projectName = process.env.CLN_IMAGE_NAME || projectName;
409
408
  imageReleaseName = projectName + ':' + CLNVERSION;
410
409
  imageReleaseNameSave = projectName + '_' + CLNVERSION;
411
- BI = process.env.CLN_IMAGE_BI || isInner ? 'fe-repo.inner.px.nfjbill.ren:5000/cln-server:0.6.2' : 'nfjbill/cln-server:0.6.2';
412
- DEP = process.env.CLN_IMAGE_DEP !== "false" ? process.env.CLN_IMAGE_DEP : false;
410
+ BI = process.env.CLN_IMAGE_BI || (isInner ? 'fe-repo.inner.px.nfjbill.ren:5000/cln-server:0.6.2' : 'nfjbill/cln-server:0.6.2');
411
+ preLoad = (process.env.CLN_IMAGE_LOAD || '').split(',');
412
+ // let BI = process.env.CLN_IMAGE_BI
413
+
414
+ DEP = process.env.CLN_IMAGE_DEP === undefined ? false : process.env.CLN_IMAGE_DEP;
413
415
  EXPORT = process.env.CLN_IMAGE_EXPORT !== "false";
416
+ DKY = process.env.CLN_IMAGE_DKY === "true";
414
417
  Dockerfile = "Dockerfile";
418
+ buildkit = "DOCKER_BUILDKIT=1";
419
+ prefixCmd = "";
420
+ suffixCmd = process.env.CLN_IMAGE_SUFFIX !== undefined ? process.env.CLN_IMAGE_SUFFIX : " >/dev/null 2>&1";
415
421
 
422
+ if (_os2.default.platform() === 'win32') {
423
+ prefixCmd = "cross-env ";
424
+ suffixCmd = "";
425
+ }
416
426
 
417
427
  if (DEP) {
418
428
  Dockerfile = "Dockerfile_DEP";
429
+ BI = BI || "fe-repo.inner.px.nfjbill.ren:5000/cln-server:0.6.2";
430
+ }
431
+
432
+ if (preLoad.length > 0) {
433
+ preLoad.forEach(function (p) {
434
+ execCmd('docker load < ' + p);
435
+ });
436
+ }
437
+
438
+ fileStr = '-f ' + _paths2.default.ykRootImage + Dockerfile;
439
+
440
+
441
+ if (DKY) {
442
+ buildkit = '';
443
+ fileStr = '';
444
+ EXPORT = false;
445
+ execCmd('cp -rfp ' + _paths2.default.ykRootImage + Dockerfile + ' ./Dockerfile');
446
+ execCmd('cp -rfp ' + _paths2.default.ykRootImage + '.dockerignore ./');
419
447
  }
420
448
 
421
449
  if ((0, _commandExists.sync)('docker')) {
422
- _context6.next = 27;
450
+ _context6.next = 36;
423
451
  break;
424
452
  }
425
453
 
@@ -427,7 +455,7 @@ var run = exports.run = function () {
427
455
  process.exit(1);
428
456
  return _context6.abrupt('return');
429
457
 
430
- case 27:
458
+ case 36:
431
459
  if (!(0, _commandExists.sync)('pxnpm') && !DEP) {
432
460
  execCmd(isInner ? 'npm i -g pxnpm --registry=http://fe-repo.inner.px.nfjbill.ren:5507' : 'npm i -g pxnpm');
433
461
  }
@@ -435,20 +463,14 @@ var run = exports.run = function () {
435
463
  execCmd('pxnpm i -g cross-env');
436
464
  }
437
465
 
438
- prefixCmd = "cross-env ";
439
-
440
- if (!DEP) {
441
- prefixCmd = "";
442
- }
443
-
444
466
  if (CLNBUILD) {
445
- execCmd(prefixCmd + ' YK0_server__yk4Addr=http://1.1.1.1 YK0_server__orbAddr=http://1.1.1.1 YK_ENV=' + CLNENV + ' YK_SERVER_ENV=' + CLNENV + ' YK_VERSIONSHA=' + CS + ' YK_DOCKERNAME=' + CS + ' YK_MACHINE_TYPE=workstation YK0_env=docker YK0_CONFIG_WORKERS=' + CLNWORKERS + ' pxnpm run build');
467
+ execCmd(prefixCmd + ' YK0_server__yk4Addr=http://1.1.1.1 YK0_server__orbAddr=http://1.1.1.1 YK_ENV=' + CLNENV + ' YK_SERVER_ENV=' + CLNENV + ' YK_VERSIONSHA=' + CS + ' YK_DOCKERNAME=' + CS + ' YK_MACHINE_TYPE=workstation YK0_env=docker YK0_CONFIG_WORKERS=' + CLNWORKERS + ' npm run build');
446
468
  }
447
469
 
448
470
  loop = function loop(i) {
449
471
  try {
450
472
  if (i < parseInt(TRY_TIMES)) {
451
- execCmd(prefixCmd + ' DOCKER_BUILDKIT=1 docker build ' + (noCache ? '--no-cache' : '') + ' -f ' + _paths2.default.ykRootImage + Dockerfile + ' --build-arg BASE_IMAGE=' + BI + ' --build-arg YK_VERSIONSHA=' + CS + ' --build-arg YK_ENV=' + CLNENV + ' --build-arg DEP=' + DEP + ' --build-arg NPM_MODULES_CACHE_ID=' + NMCI + ' -t ' + imageReleaseName + ' .');
473
+ execCmd(prefixCmd + ' ' + buildkit + ' docker build ' + (noCache ? '--no-cache' : '') + ' ' + fileStr + ' --build-arg BASE_IMAGE=' + BI + ' --build-arg YK_VERSIONSHA=' + CS + ' --build-arg YK_ENV=' + CLNENV + ' --build-arg DEP=' + DEP + ' --build-arg NPM_MODULES_CACHE_ID=' + NMCI + ' -t ' + imageReleaseName + ' . ' + suffixCmd);
452
474
  } else {
453
475
  _consola2.default.error('Image build failure!');
454
476
  process.exit(0);
@@ -460,10 +482,10 @@ var run = exports.run = function () {
460
482
 
461
483
  loop(0);
462
484
 
463
- _context6.next = 36;
485
+ _context6.next = 43;
464
486
  return (0, _server.delay)(1000);
465
487
 
466
- case 36:
488
+ case 43:
467
489
 
468
490
  if (CLNPACK && EXPORT) {
469
491
  if (!(0, _commandExists.sync)('gzip')) {
@@ -476,7 +498,7 @@ var run = exports.run = function () {
476
498
  _consola2.default.success('Image tar: ' + imageReleaseNameSave + '.tar');
477
499
  _consola2.default.success('Image name: ' + imageReleaseName);
478
500
 
479
- case 39:
501
+ case 46:
480
502
  case 'end':
481
503
  return _context6.stop();
482
504
  }
@@ -8,11 +8,8 @@ ENV YK_ENV $YK_ENV
8
8
  ARG YK_ENV
9
9
  ENV YK_SERVER_ENV $YK_ENV
10
10
 
11
- RUN rm -rf /root/.npm
12
- RUN rm -rf /root/.npminstall_tarball
13
-
14
11
  ARG DEP
15
- ADD ./$DEP ./
12
+ ADD $DEP ./
16
13
  ADD ./.ykServer ./.ykServer
17
14
  ADD ./config ./config
18
15
  ADD ./common.static ./common.static
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "yakuza0",
3
- "version": "2.22.40-beta.0",
3
+ "version": "2.22.40-beta.1",
4
4
  "description": "yakuza0 with nuxt",
5
5
  "main": "index.js",
6
6
  "scripts": {