underpost 2.8.451 → 2.8.452

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.
@@ -22,7 +22,7 @@ jobs:
22
22
 
23
23
  - uses: actions/setup-node@v4
24
24
  with:
25
- node-version: '22.x'
25
+ node-version: '23.x'
26
26
 
27
27
  - name: Install dependencies
28
28
  run: |
@@ -49,6 +49,11 @@ jobs:
49
49
  git add .
50
50
  git commit -m "ci(package-pwa-microservices-template-ghpkg): ⚙️ Update github repo package"
51
51
  git push https://${{ secrets.GIT_AUTH_TOKEN }}@github.com/underpostnet/pwa-microservices-template.git
52
+ # cd ../engine
53
+ # git commit --allow-empty -m "ci(engine-core-repo-build): ⚙️ Update engine core repository"
54
+ # git commit --allow-empty -m "ci(engine-cyberia-repo-build): ⚙️ Update engine cyberia repository"
55
+ # git commit --allow-empty -m "ci(engine-lampp-repo-build): ⚙️ Update engine lampp repository"
56
+ # git push https://${{ secrets.GIT_AUTH_TOKEN }}@github.com/underpostnet/engine.git
52
57
 
53
58
  pwa-microservices-template-ghpk:
54
59
  if: github.repository == 'underpostnet/pwa-microservices-template' && startsWith(github.event.head_commit.message, 'ci(package-pwa-microservices-template-ghpkg)')
@@ -63,7 +68,7 @@ jobs:
63
68
 
64
69
  - uses: actions/setup-node@v4
65
70
  with:
66
- node-version: '22.x'
71
+ node-version: '23.x'
67
72
 
68
73
  # - name: Get npm root
69
74
  # run: sudo npm root -g
@@ -114,5 +119,11 @@ jobs:
114
119
  git commit -m "ci(package-pwa-microservices-template-ghpkg): ⚙️ Update github repo package"
115
120
  git push https://${{ secrets.GIT_AUTH_TOKEN }}@github.com/underpostnet/pwa-microservices-template-ghpkg.git
116
121
 
122
+ # git clone --bare https://github.com/underpostnet/engine.git
123
+ # mkdir engine
124
+ # mv ./engine.git ./engine/.git
125
+ # cd engine
126
+ # git init
127
+
117
128
  # git push -u origin https://${{ secrets.GIT_AUTH_TOKEN }}@github.com/underpostnet/pwa-microservices-template-ghpkg.git
118
129
  # git push -u origin master
@@ -14,7 +14,7 @@ jobs:
14
14
  - uses: actions/checkout@v4
15
15
  - uses: actions/setup-node@v4
16
16
  with:
17
- node-version: '22.x'
17
+ node-version: '23.x'
18
18
  registry-url: 'https://registry.npmjs.org'
19
19
 
20
20
  - name: Install Dependencies
@@ -25,7 +25,7 @@ jobs:
25
25
  # Publish to npm
26
26
  - uses: actions/setup-node@v4
27
27
  with:
28
- node-version: '22.x'
28
+ node-version: '23.x'
29
29
  registry-url: 'https://registry.npmjs.org'
30
30
  # Defaults to the user or organization that owns the workflow file
31
31
  # scope: '@underpostnet'
@@ -45,7 +45,7 @@ jobs:
45
45
  - uses: actions/checkout@v4
46
46
  - uses: actions/setup-node@v4
47
47
  with:
48
- node-version: '22.x'
48
+ node-version: '23.x'
49
49
  registry-url: 'https://registry.npmjs.org'
50
50
 
51
51
  - name: Install Dependencies
@@ -56,7 +56,7 @@ jobs:
56
56
  # Publish to npm git hub package
57
57
  - uses: actions/setup-node@v4
58
58
  with:
59
- node-version: '22.x'
59
+ node-version: '23.x'
60
60
  registry-url: 'https://registry.npmjs.org'
61
61
  # Defaults to the user or organization that owns the workflow file
62
62
  scope: '@underpostnet'
@@ -70,7 +70,7 @@ jobs:
70
70
  - name: Setup node to publish to GitHub Packages
71
71
  uses: actions/setup-node@v4
72
72
  with:
73
- node-version: 22.x
73
+ node-version: 23.x
74
74
  registry-url: 'https://npm.pkg.github.com'
75
75
  # Defaults to the user or organization that owns the workflow file
76
76
  scope: '@underpostnet'
@@ -38,7 +38,7 @@ jobs:
38
38
  # run: git lfs checkout
39
39
  - uses: actions/setup-node@v4
40
40
  with:
41
- node-version: '22.x'
41
+ node-version: '23.x'
42
42
 
43
43
  - name: Build the site
44
44
  run: |
package/bin/build.js CHANGED
@@ -292,16 +292,16 @@ const { DefaultConf } = await import(`../conf.${confName}.js`);
292
292
  if (!fs.existsSync(`${basePath}/images`)) fs.mkdirSync(`${basePath}/images`);
293
293
 
294
294
  const env = process.argv.includes('development') ? 'development' : 'production';
295
-
295
+ const deploymentsFiles = ['Dockerfile', 'proxy.yaml', 'deployment.yaml', 'secret.yaml'];
296
296
  // remove engine-private of .dockerignore for local testing
297
297
 
298
- {
298
+ if (process.argv.includes('engine')) {
299
299
  fs.removeSync(`${basePath}/manifests/deployment`);
300
300
 
301
301
  if (!fs.existsSync(`./manifests/deployment/${confName}-${env}`))
302
302
  fs.mkdirSync(`./manifests/deployment/${confName}-${env}`);
303
303
 
304
- for (const file of ['Dockerfile', 'proxy.yaml', 'deployment.yaml', 'secret.yaml']) {
304
+ for (const file of deploymentsFiles) {
305
305
  if (fs.existsSync(`./engine-private/conf/${confName}/build/${env}/${file}`)) {
306
306
  fs.copyFileSync(`./engine-private/conf/${confName}/build/${env}/${file}`, `${basePath}/${file}`);
307
307
  fs.copyFileSync(
@@ -310,5 +310,11 @@ const { DefaultConf } = await import(`../conf.${confName}.js`);
310
310
  );
311
311
  }
312
312
  }
313
+ } else {
314
+ for (const file of deploymentsFiles) {
315
+ if (fs.existsSync(`./manifests/deployment/${confName}-${env}/${file}`)) {
316
+ fs.copyFileSync(`./manifests/deployment/${confName}-${env}/${file}`, `${basePath}/${file}`);
317
+ }
318
+ }
313
319
  }
314
320
  }
package/bin/deploy.js CHANGED
@@ -2,7 +2,6 @@ import fs from 'fs-extra';
2
2
  import axios from 'axios';
3
3
 
4
4
  import dotenv from 'dotenv';
5
- import plantuml from 'plantuml';
6
5
 
7
6
  import { pbcopy, shellCd, shellExec } from '../src/server/process.js';
8
7
  import { loggerFactory } from '../src/server/logger.js';
@@ -591,6 +590,7 @@ try {
591
590
  }
592
591
  case 'build-uml':
593
592
  {
593
+ const plantuml = await import('plantuml');
594
594
  const folder = process.argv[3] ? process.argv[3] : `./src/client/public/default/plantuml`;
595
595
  const confData = Config.default;
596
596
 
package/bin/file.js CHANGED
@@ -80,6 +80,7 @@ try {
80
80
  '.github/workflows/engine.lampp.ci.yml',
81
81
  '.github/workflows/engine.core.ci.yml',
82
82
  '.github/workflows/engine.cyberia.ci.yml',
83
+ './manifests/deployment/dd-lampp-development',
83
84
  'bin/web3.js',
84
85
  'bin/cyberia.js',
85
86
  ]) {
package/bin/index.js CHANGED
@@ -8,6 +8,7 @@ import { getNpmRootPath, loadConf } from '../src/server/conf.js';
8
8
  import fs from 'fs-extra';
9
9
  import { commitData } from '../src/client/components/core/CommonJs.js';
10
10
  import UnderpostScript from '../src/cli/script.js';
11
+ import { shellExec } from '../src/server/process.js';
11
12
 
12
13
  const npmRoot = getNpmRootPath();
13
14
  const underpostRoot = `${npmRoot}/underpost/.env`;
@@ -28,6 +29,7 @@ program
28
29
  program
29
30
  .command('clone')
30
31
  .argument(`<uri>`, 'e.g. username/repository')
32
+ .option('--bare', 'Clone only .git files')
31
33
  .description('Clone github repository')
32
34
  .action(Underpost.repo.clone);
33
35
 
@@ -130,6 +132,14 @@ program
130
132
  .description('Pull underpost dockerfile images requirements')
131
133
  .action(Underpost.image.dockerfile.pullBaseImages);
132
134
 
135
+ program
136
+ .command('install')
137
+ .description('Fast import npm dependencies')
138
+ .action(() => {
139
+ fs.copySync(`${npmRoot}/underpost/node_modules`, './node_modules');
140
+ shellExec(`npm install --only=dev --ignore-scripts`);
141
+ });
142
+
133
143
  program
134
144
  .command('script')
135
145
  .argument('operator', `Options: ${Object.keys(UnderpostScript.API)}`)
@@ -58,7 +58,7 @@ services:
58
58
  cpus: '0.25'
59
59
  memory: 20M
60
60
  labels: # labels in Compose file instead of Dockerfile
61
- engine.version: '2.8.451'
61
+ engine.version: '2.8.452'
62
62
  networks:
63
63
  - load-balancer
64
64
 
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "type": "module",
3
3
  "main": "src/index.js",
4
4
  "name": "underpost",
5
- "version": "2.8.451",
5
+ "version": "2.8.452",
6
6
  "description": "pwa api rest template",
7
7
  "scripts": {
8
8
  "start": "env-cmd -f .env.production node --max-old-space-size=8192 src/server",
@@ -16,6 +16,7 @@
16
16
  "docs": "jsdoc -c jsdoc.json",
17
17
  "install-global": "npm install -g pm2 && npm install -g jsdoc && npm install -g prettier && npm install -g env-cmd && npm install -g yarn && npm install -g auto-changelog",
18
18
  "install-test": "npm install -g mocha && npm install -g c8 && npm install -g nyc && npm install -g coveralls",
19
+ "install-underpost": "cp -a $(npm root -g)/underpost/node_modules ./node_modules && npm install --only=dev --ignore-scripts",
19
20
  "install": "npm run install-global && npm run install-test",
20
21
  "docker:start": "docker-compose up",
21
22
  "prettier": "prettier --write .",
@@ -11,11 +11,13 @@ const logger = loggerFactory(import.meta);
11
11
 
12
12
  class UnderpostRepository {
13
13
  static API = {
14
- clone(gitUri = 'underpostnet/pwa-microservices-template') {
14
+ clone(gitUri = 'underpostnet/pwa-microservices-template', options = { bare: false }) {
15
15
  const repoName = gitUri.split('/').pop();
16
16
  if (fs.existsSync(`./${repoName}`)) fs.removeSync(`./${repoName}`);
17
17
  return shellExec(
18
- `git clone https://${process.env.GITHUB_TOKEN ? `${process.env.GITHUB_TOKEN}@` : ''}github.com/${gitUri}.git`,
18
+ `git clone ${options?.bare === true ? ` --bare ` : ''}https://${
19
+ process.env.GITHUB_TOKEN ? `${process.env.GITHUB_TOKEN}@` : ''
20
+ }github.com/${gitUri}.git`,
19
21
  {
20
22
  disableLog: true,
21
23
  },
package/src/index.js CHANGED
@@ -24,7 +24,7 @@ class Underpost {
24
24
  * @type {String}
25
25
  * @memberof Underpost
26
26
  */
27
- static version = 'v2.8.451';
27
+ static version = 'v2.8.452';
28
28
  /**
29
29
  * Repository cli API
30
30
  * @static