underpost 2.7.3 → 2.7.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/.env.development +0 -2
- package/.env.production +0 -2
- package/.env.test +0 -2
- package/.github/workflows/publish.yml +29 -2
- package/CHANGELOG.md +19 -57
- package/Dockerfile +1 -1
- package/README.md +1 -1
- package/bin/deploy.js +60 -0
- package/bin/index.js +7 -1
- package/docker-compose.yml +1 -1
- package/package.json +133 -137
- package/src/api/file/file.service.js +4 -0
- package/src/client/components/core/CommonJs.js +7 -0
- package/src/client/components/core/Docs.js +9 -7
- package/src/client/components/core/LoadingAnimation.js +1 -1
- package/src/client/ssr/body-components/CacheControl.js +1 -1
- package/src/index.js +1 -0
- package/src/server/client-icons.js +4 -2
- package/src/server/conf.js +29 -0
- package/startup.js +1 -1
- package/setup.sh +0 -25
package/.env.development
CHANGED
package/.env.production
CHANGED
package/.env.test
CHANGED
|
@@ -14,13 +14,40 @@ jobs:
|
|
|
14
14
|
- uses: actions/checkout@v4
|
|
15
15
|
- uses: actions/setup-node@v4
|
|
16
16
|
with:
|
|
17
|
-
node-version: '
|
|
17
|
+
node-version: '22.x'
|
|
18
18
|
registry-url: 'https://registry.npmjs.org'
|
|
19
19
|
|
|
20
20
|
- name: Install Dependencies
|
|
21
21
|
run: npm install
|
|
22
22
|
|
|
23
23
|
- run: npm ci
|
|
24
|
-
|
|
24
|
+
|
|
25
|
+
# Publish to npm
|
|
26
|
+
- uses: actions/setup-node@v4
|
|
27
|
+
with:
|
|
28
|
+
node-version: '22.x'
|
|
29
|
+
registry-url: 'https://registry.npmjs.org'
|
|
30
|
+
# Defaults to the user or organization that owns the workflow file
|
|
31
|
+
# scope: '@underpostnet'
|
|
32
|
+
- env:
|
|
33
|
+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
34
|
+
name: Publish to npm
|
|
35
|
+
run: npm publish --provenance --access public
|
|
36
|
+
|
|
37
|
+
# Publish to GitHub Packages
|
|
38
|
+
- name: Setup node to publish to GitHub Packages
|
|
39
|
+
uses: actions/setup-node@v4
|
|
40
|
+
with:
|
|
41
|
+
node-version: 22.x
|
|
42
|
+
registry-url: 'https://npm.pkg.github.com'
|
|
43
|
+
# Defaults to the user or organization that owns the workflow file
|
|
44
|
+
scope: '@underpostnet'
|
|
45
|
+
|
|
46
|
+
- run: |
|
|
47
|
+
node ./bin/deploy rename-package @underpostnet/underpost
|
|
48
|
+
npm config set //npm.pkg.github.com/:_authToken=${{ secrets.GIT_AUTH_TOKEN }}
|
|
49
|
+
echo "//npm.pkg.github.com/:_authToken=${{ secrets.GIT_AUTH_TOKEN }}" > ~/.npmrc
|
|
50
|
+
echo "@underposnet:registry=https://npm.pkg.github.com" >> ~/.npmrc
|
|
51
|
+
npm publish
|
|
25
52
|
env:
|
|
26
53
|
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,22 @@ All notable changes to this project will be documented in this file. Dates are d
|
|
|
4
4
|
|
|
5
5
|
Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
6
6
|
|
|
7
|
+
#### [v2.7.2](https://github.com/underpostnet/engine/compare/v2.7.1...v2.7.2)
|
|
8
|
+
|
|
9
|
+
> 8 October 2024
|
|
10
|
+
|
|
11
|
+
- underpost panel advance [`60087d5`](https://github.com/underpostnet/engine/commit/60087d55920ae9ddf7d7a3396606088d028cc996)
|
|
12
|
+
- file explorer content ui ux refactor [`38e87a0`](https://github.com/underpostnet/engine/commit/38e87a0f0bd222e1d8c9d76904d086aa9d2125ea)
|
|
13
|
+
- add macro db restore logic [`9cfd41c`](https://github.com/underpostnet/engine/commit/9cfd41c5d7adcd309976e7d327af800ffcf92dac)
|
|
14
|
+
|
|
15
|
+
#### [v2.7.1](https://github.com/underpostnet/engine/compare/v2.6.3...v2.7.1)
|
|
16
|
+
|
|
17
|
+
> 19 September 2024
|
|
18
|
+
|
|
19
|
+
- update version 2.7.0 [`03c5c35`](https://github.com/underpostnet/engine/commit/03c5c35a71e7ffb35203a668bfa2f8e2f86125e0)
|
|
20
|
+
- update [`d410da6`](https://github.com/underpostnet/engine/commit/d410da62fadbbb841eb9dcfa5922f105d35ad81d)
|
|
21
|
+
- add changelog generator [`28b3256`](https://github.com/underpostnet/engine/commit/28b3256ab9cebaa9caf2b52426e48f0b3105c8b7)
|
|
22
|
+
|
|
7
23
|
#### [v2.6.3](https://github.com/underpostnet/engine/compare/v2.6.2...v2.6.3)
|
|
8
24
|
|
|
9
25
|
> 14 September 2024
|
|
@@ -12,80 +28,26 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
12
28
|
- update refactor docs and coverage [`b455016`](https://github.com/underpostnet/engine/commit/b455016f5f2b2bdc142aacb4dfd66ab890125662)
|
|
13
29
|
- update [`b8f01f2`](https://github.com/underpostnet/engine/commit/b8f01f258999c9ebc1173b0616f0f7b8f7171048)
|
|
14
30
|
|
|
15
|
-
#### [v2.6.2](https://github.com/underpostnet/engine/compare/v2.5.
|
|
31
|
+
#### [v2.6.2](https://github.com/underpostnet/engine/compare/v2.5.1...v2.6.2)
|
|
16
32
|
|
|
17
33
|
> 13 September 2024
|
|
18
34
|
|
|
19
35
|
- update version 2.6.2 [`0895afb`](https://github.com/underpostnet/engine/commit/0895afbde42dd5a573507ccfcb07c328648b4eb0)
|
|
20
|
-
- update [`344d303`](https://github.com/underpostnet/engine/commit/344d303702ebce22dff50d8c0f8d8d870a2860ee)
|
|
21
|
-
|
|
22
|
-
#### [v2.5.6](https://github.com/underpostnet/engine/compare/v2.5.2...v2.5.6)
|
|
23
|
-
|
|
24
|
-
> 13 September 2024
|
|
25
|
-
|
|
26
36
|
- update version 2.5.6 [`ca57b87`](https://github.com/underpostnet/engine/commit/ca57b87c56a544e7b7e53baa5a6e15415e16b99b)
|
|
27
37
|
- update [`eec4943`](https://github.com/underpostnet/engine/commit/eec49433f50b4dfa7b7bbff48891a60f5be25545)
|
|
28
|
-
- update [`5f0a6ac`](https://github.com/underpostnet/engine/commit/5f0a6aca1ae971bc42f654cf3f2bf7ace7fe613d)
|
|
29
|
-
|
|
30
|
-
#### [v2.5.2](https://github.com/underpostnet/engine/compare/v2.5.1...v2.5.2)
|
|
31
38
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
- update dependebot security [`1289b96`](https://github.com/underpostnet/engine/commit/1289b9627dc59bf08e66edbef1bf7bf08e53984c)
|
|
35
|
-
- update [`ec11af8`](https://github.com/underpostnet/engine/commit/ec11af86e884ca3eeaeaa12695edddaa8b46492d)
|
|
36
|
-
- remove toast-ui [`40c207f`](https://github.com/underpostnet/engine/commit/40c207f13f3e6d7ab71fc4cc203ce6ff02101bb5)
|
|
37
|
-
|
|
38
|
-
#### [v2.5.1](https://github.com/underpostnet/engine/compare/v2.5.0...v2.5.1)
|
|
39
|
+
#### [v2.5.1](https://github.com/underpostnet/engine/compare/v2.0.0...v2.5.1)
|
|
39
40
|
|
|
40
41
|
> 27 August 2024
|
|
41
42
|
|
|
42
|
-
- refactor ssr [`4fa5d24`](https://github.com/underpostnet/engine/commit/4fa5d24531f791fa860a4ba38b9784491f084a68)
|
|
43
|
-
- bucket to document [`747cb0b`](https://github.com/underpostnet/engine/commit/747cb0bf5198e4b97df186e642413fa49ed9383f)
|
|
44
|
-
- add user control table managements [`2cfb710`](https://github.com/underpostnet/engine/commit/2cfb7103a591b941897ff3834ad5874565cba6b4)
|
|
45
|
-
|
|
46
|
-
#### [v2.5.0](https://github.com/underpostnet/engine/compare/v2.0.0...v2.5.0)
|
|
47
|
-
|
|
48
|
-
> 23 August 2024
|
|
49
|
-
|
|
50
43
|
- css refactor [`49b1904`](https://github.com/underpostnet/engine/commit/49b1904e83162f9066fbf843ced37d4e87db5581)
|
|
51
44
|
- refactor [`dad4f95`](https://github.com/underpostnet/engine/commit/dad4f9567629b737254702ce8be6b243e68fb01e)
|
|
52
45
|
- add sitemap builder [`53d05a6`](https://github.com/underpostnet/engine/commit/53d05a62d03ea327df3d37181a4b5c272d417289)
|
|
53
46
|
|
|
54
|
-
|
|
47
|
+
#### v2.0.0
|
|
55
48
|
|
|
56
49
|
> 30 March 2024
|
|
57
50
|
|
|
58
51
|
- seed-city assets [`6d9decb`](https://github.com/underpostnet/engine/commit/6d9decbae96b828aa001777f96dd75aab3fc71d1)
|
|
59
52
|
- update [`1069fc5`](https://github.com/underpostnet/engine/commit/1069fc5268aa5ef7c101695393de59edfc14daf8)
|
|
60
53
|
- update [`41ae7d4`](https://github.com/underpostnet/engine/commit/41ae7d4c969cce0608171c820e05ebab42610a7f)
|
|
61
|
-
|
|
62
|
-
#### [v1.0.4](https://github.com/underpostnet/engine/compare/v1.0.3...v1.0.4)
|
|
63
|
-
|
|
64
|
-
> 14 January 2023
|
|
65
|
-
|
|
66
|
-
- update [`8109700`](https://github.com/underpostnet/engine/commit/81097008baa95ac50efb760b228dc4abae63c379)
|
|
67
|
-
- update [`b6bb47f`](https://github.com/underpostnet/engine/commit/b6bb47f95bd56c0062066ecae5f03813cf1ed6f8)
|
|
68
|
-
- update [`15c0ca9`](https://github.com/underpostnet/engine/commit/15c0ca9f9a8203bec53a9677d5a8edcd04a7f1df)
|
|
69
|
-
|
|
70
|
-
#### [v1.0.3](https://github.com/underpostnet/engine/compare/v1.0.2...v1.0.3)
|
|
71
|
-
|
|
72
|
-
> 21 December 2022
|
|
73
|
-
|
|
74
|
-
- update [`69418ba`](https://github.com/underpostnet/engine/commit/69418ba34831983e07aa458d1ea4a742c7b66096)
|
|
75
|
-
- update [`003412f`](https://github.com/underpostnet/engine/commit/003412fadf3efe6b819f037e99855192f13ccd7e)
|
|
76
|
-
|
|
77
|
-
#### [v1.0.2](https://github.com/underpostnet/engine/compare/v1.0.1...v1.0.2)
|
|
78
|
-
|
|
79
|
-
> 21 December 2022
|
|
80
|
-
|
|
81
|
-
- update [`470f07a`](https://github.com/underpostnet/engine/commit/470f07a72398792ac9ecf07bf1ba5170bc427dc5)
|
|
82
|
-
- update [`dacc20a`](https://github.com/underpostnet/engine/commit/dacc20a14971388bcf2a5077286989a77197aadc)
|
|
83
|
-
- update [`d2efee0`](https://github.com/underpostnet/engine/commit/d2efee08f9b31dd9fca31a3b1b15bdaa0e75faea)
|
|
84
|
-
|
|
85
|
-
#### v1.0.1
|
|
86
|
-
|
|
87
|
-
> 11 October 2022
|
|
88
|
-
|
|
89
|
-
- update [`bd40237`](https://github.com/underpostnet/engine/commit/bd402372513151a15a972a7727f7d77d014739f1)
|
|
90
|
-
- update [`39dd3b9`](https://github.com/underpostnet/engine/commit/39dd3b9a5a6b4292b899840dd5cd333cc80410d1)
|
|
91
|
-
- First Commit [`ad7b2a3`](https://github.com/underpostnet/engine/commit/ad7b2a3be0746b34fa19ba896d3faa7f1b4f40dc)
|
package/Dockerfile
CHANGED
|
@@ -37,7 +37,7 @@ RUN apt-get install -yq --no-install-recommends \
|
|
|
37
37
|
gnupg
|
|
38
38
|
|
|
39
39
|
# install nodejs https://github.com/nodesource/distributions/blob/master/README.md#deb
|
|
40
|
-
RUN curl -fsSL https://deb.nodesource.com/
|
|
40
|
+
RUN curl -fsSL https://deb.nodesource.com/setup_22.x | bash - && \
|
|
41
41
|
apt-get install -y nodejs \
|
|
42
42
|
build-essential && \
|
|
43
43
|
node --version && \
|
package/README.md
CHANGED
|
@@ -16,7 +16,7 @@ template
|
|
|
16
16
|
|
|
17
17
|
<div align="center">
|
|
18
18
|
|
|
19
|
-
<a target="_top" href='https://www.npmjs.com/package/npm/v/10.2.3' ><img alt='npm' src='https://img.shields.io/badge/npm v10.2.3-100000?style=flat&logo=npm&logoColor=white&labelColor=CB3837&color=727273'/></a> <a target="_top" href='https://nodejs.org/download/release/
|
|
19
|
+
<a target="_top" href='https://www.npmjs.com/package/npm/v/10.2.3' ><img alt='npm' src='https://img.shields.io/badge/npm v10.2.3-100000?style=flat&logo=npm&logoColor=white&labelColor=CB3837&color=727273'/></a> <a target="_top" href='https://nodejs.org/download/release/v22.9.0/' ><img alt='nodedotjs' src='https://img.shields.io/badge/node v22.9.0-100000?style=flat&logo=nodedotjs&logoColor=white&labelColor=5FA04E&color=727273'/></a> <a target="_top" href='https://pgp.mongodb.com/' ><img alt='mongodb' src='https://img.shields.io/badge/mongodb_server v7.0-100000?style=flat&logo=mongodb&logoColor=white&labelColor=47A248&color=727273'/></a>
|
|
20
20
|
|
|
21
21
|
</div>
|
|
22
22
|
|
package/bin/deploy.js
CHANGED
|
@@ -25,6 +25,7 @@ import {
|
|
|
25
25
|
buildReplicaId,
|
|
26
26
|
Cmd,
|
|
27
27
|
restoreMacroDb,
|
|
28
|
+
fixDependencies,
|
|
28
29
|
} from '../src/server/conf.js';
|
|
29
30
|
import { buildClient } from '../src/server/client-build.js';
|
|
30
31
|
import { range, setPad, timer, uniqueArray } from '../src/client/components/core/CommonJs.js';
|
|
@@ -490,6 +491,21 @@ try {
|
|
|
490
491
|
case 'build-macro-replica':
|
|
491
492
|
getDataDeploy({ deployGroupId: process.argv[3], buildSingleReplica: true });
|
|
492
493
|
break;
|
|
494
|
+
|
|
495
|
+
case 'rename-package': {
|
|
496
|
+
const name = process.argv[3];
|
|
497
|
+
const originPackage = JSON.parse(fs.readFileSync(`./package.json`, 'utf8'));
|
|
498
|
+
originPackage.name = name;
|
|
499
|
+
fs.writeFileSync(`./package.json`, JSON.stringify(originPackage, null, 4), 'utf8');
|
|
500
|
+
|
|
501
|
+
const originPackageLockJson = JSON.parse(fs.readFileSync(`./package-lock.json`, 'utf8'));
|
|
502
|
+
originPackageLockJson.name = name;
|
|
503
|
+
originPackageLockJson.packages[''].name = name;
|
|
504
|
+
fs.writeFileSync(`./package-lock.json`, JSON.stringify(originPackageLockJson, null, 4), 'utf8');
|
|
505
|
+
|
|
506
|
+
break;
|
|
507
|
+
}
|
|
508
|
+
|
|
493
509
|
case 'update-version':
|
|
494
510
|
{
|
|
495
511
|
const newVersion = process.argv[3];
|
|
@@ -553,6 +569,9 @@ try {
|
|
|
553
569
|
fs.readFileSync(`./bin/index.js`, 'utf8').replaceAll(`${version}`, `${newVersion}`),
|
|
554
570
|
'utf8',
|
|
555
571
|
);
|
|
572
|
+
|
|
573
|
+
// only engine
|
|
574
|
+
// shellExec(`node bin/deploy update-package`);
|
|
556
575
|
}
|
|
557
576
|
break;
|
|
558
577
|
|
|
@@ -597,6 +616,47 @@ ${uniqueArray(logs.all.map((log) => `- ${log.author_name} ([${log.author_email}]
|
|
|
597
616
|
|
|
598
617
|
case 'lampp': {
|
|
599
618
|
await Lampp.install();
|
|
619
|
+
break;
|
|
620
|
+
}
|
|
621
|
+
|
|
622
|
+
case 'heb': {
|
|
623
|
+
// https://besu.hyperledger.org/
|
|
624
|
+
// https://github.com/hyperledger/besu/archive/refs/tags/24.9.1.tar.gz
|
|
625
|
+
|
|
626
|
+
switch (process.platform) {
|
|
627
|
+
case 'linux':
|
|
628
|
+
{
|
|
629
|
+
shellCd(`..`);
|
|
630
|
+
|
|
631
|
+
// Download the Linux binary
|
|
632
|
+
shellExec(`wget https://github.com/hyperledger/besu/releases/download/24.9.1/besu-24.9.1.tar.gz`);
|
|
633
|
+
|
|
634
|
+
// Unzip the file:
|
|
635
|
+
shellExec(`tar -xvzf besu-24.9.1.tar.gz`);
|
|
636
|
+
|
|
637
|
+
shellCd(`besu-24.9.1`);
|
|
638
|
+
|
|
639
|
+
shellExec(`bin/besu --help`);
|
|
640
|
+
|
|
641
|
+
// Set env path
|
|
642
|
+
// export PATH=$PATH:/dd/besu-24.9.1/bin
|
|
643
|
+
|
|
644
|
+
// Open src
|
|
645
|
+
// shellExec(`sudo code /dd/besu-24.9.1 --user-data-dir="/root/.vscode-root" --no-sandbox`);
|
|
646
|
+
}
|
|
647
|
+
|
|
648
|
+
break;
|
|
649
|
+
|
|
650
|
+
default:
|
|
651
|
+
break;
|
|
652
|
+
}
|
|
653
|
+
|
|
654
|
+
break;
|
|
655
|
+
}
|
|
656
|
+
|
|
657
|
+
case 'fix-deps': {
|
|
658
|
+
await fixDependencies();
|
|
659
|
+
break;
|
|
600
660
|
}
|
|
601
661
|
|
|
602
662
|
default:
|
package/bin/index.js
CHANGED
|
@@ -19,7 +19,7 @@ const globalBinFolder = `${shellExec(`npm root -g`, {
|
|
|
19
19
|
|
|
20
20
|
const program = new Command();
|
|
21
21
|
|
|
22
|
-
const version = '2.7.
|
|
22
|
+
const version = '2.7.6';
|
|
23
23
|
|
|
24
24
|
program.name('underpost').description(`underpost.net ci/cd cli ${version}`).version(version);
|
|
25
25
|
|
|
@@ -62,6 +62,12 @@ program
|
|
|
62
62
|
.command('test')
|
|
63
63
|
.description('Run tests')
|
|
64
64
|
.action(() => {
|
|
65
|
+
console.log(
|
|
66
|
+
underpostASCI() +
|
|
67
|
+
`
|
|
68
|
+
v${version} https://www.nexodev.org/docs
|
|
69
|
+
`,
|
|
70
|
+
);
|
|
65
71
|
shellCd(`${globalBinFolder}`);
|
|
66
72
|
shellExec(`npm run test`);
|
|
67
73
|
});
|
package/docker-compose.yml
CHANGED
package/package.json
CHANGED
|
@@ -1,138 +1,134 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
"
|
|
48
|
-
"
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
"
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
"
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
"
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
"provenance": true,
|
|
136
|
-
"access": "public"
|
|
137
|
-
}
|
|
138
|
-
}
|
|
2
|
+
"type": "module",
|
|
3
|
+
"main": "src/index.js",
|
|
4
|
+
"name": "underpost",
|
|
5
|
+
"version": "2.7.6",
|
|
6
|
+
"description": "pwa api rest template",
|
|
7
|
+
"scripts": {
|
|
8
|
+
"start": "env-cmd -f .env.production node --max-old-space-size=8192 src/server",
|
|
9
|
+
"pm2": "env-cmd -f .env.production pm2 start src/server.js --node-args=\"--max-old-space-size=8192\" --name engine && pm2 logs",
|
|
10
|
+
"ssl": "env-cmd -f .env.production node bin/ssl",
|
|
11
|
+
"pm2-delete": "pm2 delete engine",
|
|
12
|
+
"build": "node bin/deploy build-full-client --no-warnings",
|
|
13
|
+
"dev": "env-cmd -f .env.development node src/client.dev --no-warnings",
|
|
14
|
+
"dev-api": "env-cmd -f .env.development nodemon --watch src --ignore src/client src/api",
|
|
15
|
+
"docs": "jsdoc -c jsdoc.json",
|
|
16
|
+
"backup": "node bin/db default.net/ export",
|
|
17
|
+
"install-template": "npm install && npm run build",
|
|
18
|
+
"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",
|
|
19
|
+
"install-test": "npm install -g mocha && npm install -g c8 && npm install -g nyc && npm install -g coveralls",
|
|
20
|
+
"install-vs-extensions": "node bin/vs import",
|
|
21
|
+
"preinstall": "npm config set audit false && npm config set loglevel error",
|
|
22
|
+
"restore-preinstall": "npm config set audit true && npm config set loglevel notice",
|
|
23
|
+
"install": "npm run install-global && npm run install-test && npm run restore-preinstall --no-audit --no-warnings",
|
|
24
|
+
"docker:start": "docker-compose up",
|
|
25
|
+
"prettier": "prettier --write .",
|
|
26
|
+
"coveralls": "nyc npm run test --reporter=text-lcov | coveralls -v",
|
|
27
|
+
"test": "env-cmd -f .env.test c8 mocha",
|
|
28
|
+
"update": "npm update -g && npm update && npm audit fix --force && npm audit fix --force",
|
|
29
|
+
"underpost-publish": "npm publish --provenance --access public",
|
|
30
|
+
"underpost-unpublish": "npm unpublish underpost@2.5.x",
|
|
31
|
+
"login": "npm adduser",
|
|
32
|
+
"bin": "npm link --force"
|
|
33
|
+
},
|
|
34
|
+
"bin": {
|
|
35
|
+
"underpost": "bin/index.js"
|
|
36
|
+
},
|
|
37
|
+
"repository": {
|
|
38
|
+
"type": "git",
|
|
39
|
+
"url": "git+https://github.com/underpostnet/pwa-microservices-template.git"
|
|
40
|
+
},
|
|
41
|
+
"keywords": [
|
|
42
|
+
"engine",
|
|
43
|
+
"server",
|
|
44
|
+
"proxy",
|
|
45
|
+
"client"
|
|
46
|
+
],
|
|
47
|
+
"author": "https://github.com/underpostnet",
|
|
48
|
+
"license": "MIT",
|
|
49
|
+
"bugs": {
|
|
50
|
+
"url": "https://github.com/underpostnet/pwa-microservices-template/issues"
|
|
51
|
+
},
|
|
52
|
+
"homepage": "https://github.com/underpostnet/pwa-microservices-template#readme",
|
|
53
|
+
"dependencies": {
|
|
54
|
+
"@fortawesome/fontawesome-free": "^6.4.2",
|
|
55
|
+
"@loadingio/css-spinner": "^2.0.2",
|
|
56
|
+
"@neodrag/vanilla": "^2.0.3",
|
|
57
|
+
"@xenova/transformers": "^2.17.2",
|
|
58
|
+
"adm-zip": "^0.5.10",
|
|
59
|
+
"ag-grid-community": "31.0.0",
|
|
60
|
+
"axios": "^1.5.1",
|
|
61
|
+
"chai": "^5.1.0",
|
|
62
|
+
"cli-progress": "^3.12.0",
|
|
63
|
+
"cli-spinners": "^3.0.0",
|
|
64
|
+
"color": "^4.2.3",
|
|
65
|
+
"colors": "^1.4.0",
|
|
66
|
+
"commander": "^12.1.0",
|
|
67
|
+
"compression": "^1.7.4",
|
|
68
|
+
"copy-paste": "^1.5.3",
|
|
69
|
+
"cors": "^2.8.5",
|
|
70
|
+
"d3": "^7.9.0",
|
|
71
|
+
"deepmerge": "^4.3.1",
|
|
72
|
+
"detect-port": "^1.5.1",
|
|
73
|
+
"dotenv": "^16.3.1",
|
|
74
|
+
"easymde": "^2.18.0",
|
|
75
|
+
"env-cmd": "^10.1.0",
|
|
76
|
+
"eventemitter3": "^5.0.1",
|
|
77
|
+
"express": "^4.18.2",
|
|
78
|
+
"express-fileupload": "^1.4.3",
|
|
79
|
+
"favicons": "^7.2.0",
|
|
80
|
+
"font-awesome-assets": "^0.0.9",
|
|
81
|
+
"fs-extra": "^11.1.1",
|
|
82
|
+
"fullcalendar": "^6.1.15",
|
|
83
|
+
"html-minifier-terser": "^7.2.0",
|
|
84
|
+
"http-proxy-middleware": "^2.0.6",
|
|
85
|
+
"ignore-walk": "^6.0.4",
|
|
86
|
+
"is-admin": "^4.0.0",
|
|
87
|
+
"is-ip": "^5.0.1",
|
|
88
|
+
"jimp": "^0.22.12",
|
|
89
|
+
"joystick-controller": "^1.0.15",
|
|
90
|
+
"json-colorizer": "^2.2.2",
|
|
91
|
+
"jsonwebtoken": "^9.0.2",
|
|
92
|
+
"kill-port-process": "^3.2.0",
|
|
93
|
+
"log-update": "^6.0.0",
|
|
94
|
+
"mariadb": "^3.2.2",
|
|
95
|
+
"marked": "^12.0.2",
|
|
96
|
+
"mongoose": "^8.0.1",
|
|
97
|
+
"morgan": "^1.10.0",
|
|
98
|
+
"node-cron": "^3.0.3",
|
|
99
|
+
"nodemailer": "^6.9.9",
|
|
100
|
+
"nodemon": "^3.0.1",
|
|
101
|
+
"pathfinding": "^0.4.18",
|
|
102
|
+
"peer": "^1.0.2",
|
|
103
|
+
"peerjs": "^1.5.2",
|
|
104
|
+
"pixi.js": "7.4.0",
|
|
105
|
+
"prom-client": "^15.1.2",
|
|
106
|
+
"public-ip": "^6.0.1",
|
|
107
|
+
"read": "^2.1.0",
|
|
108
|
+
"sharp": "^0.32.5",
|
|
109
|
+
"shelljs": "^0.8.5",
|
|
110
|
+
"simple-git": "^3.26.0",
|
|
111
|
+
"simple-icons": "^13.9.0",
|
|
112
|
+
"sitemap": "^7.1.1",
|
|
113
|
+
"socket.io": "^4.8.0",
|
|
114
|
+
"sortablejs": "^1.15.0",
|
|
115
|
+
"split-file": "^2.3.0",
|
|
116
|
+
"swagger-ui-express": "^5.0.0",
|
|
117
|
+
"systeminformation": "^5.21.17",
|
|
118
|
+
"uglify-js": "^3.17.4",
|
|
119
|
+
"validator": "^13.11.0",
|
|
120
|
+
"winston": "^3.11.0"
|
|
121
|
+
},
|
|
122
|
+
"devDependencies": {
|
|
123
|
+
"clean-jsdoc-theme": "^4.3.0",
|
|
124
|
+
"mocha": "^10.4.0",
|
|
125
|
+
"plantuml": "^0.0.2",
|
|
126
|
+
"swagger-autogen": "^2.23.7",
|
|
127
|
+
"to-json-schema": "^0.2.5"
|
|
128
|
+
},
|
|
129
|
+
"publishConfig": {
|
|
130
|
+
"provenance": true,
|
|
131
|
+
"access": "public",
|
|
132
|
+
"registry": "https://registry.npmjs.org/"
|
|
133
|
+
}
|
|
134
|
+
}
|
|
@@ -681,6 +681,12 @@ function rgbToHex(rgb) {
|
|
|
681
681
|
|
|
682
682
|
const getCapVariableName = (value = 'default') => cap(value.replaceAll('-', ' ')).replaceAll(' ', '');
|
|
683
683
|
|
|
684
|
+
const hexToNumber = (hex = 0xdc) => Number(hex) || parseFloat(hex, 16);
|
|
685
|
+
|
|
686
|
+
// 0x = Hexadecimal
|
|
687
|
+
// 0b = Binary
|
|
688
|
+
// 0o = Octal
|
|
689
|
+
|
|
684
690
|
export {
|
|
685
691
|
s4,
|
|
686
692
|
range,
|
|
@@ -732,4 +738,5 @@ export {
|
|
|
732
738
|
componentFromStr,
|
|
733
739
|
rgbToHex,
|
|
734
740
|
getCapVariableName,
|
|
741
|
+
hexToNumber,
|
|
735
742
|
};
|
|
@@ -63,7 +63,7 @@ const Docs = {
|
|
|
63
63
|
icon: html`<i class="fa-brands fa-osi"></i>`,
|
|
64
64
|
text: 'Source Docs',
|
|
65
65
|
url: function () {
|
|
66
|
-
return `${getProxyPath()}docs/engine/2.7.
|
|
66
|
+
return `${getProxyPath()}docs/engine/2.7.6`;
|
|
67
67
|
},
|
|
68
68
|
},
|
|
69
69
|
{
|
|
@@ -82,9 +82,10 @@ const Docs = {
|
|
|
82
82
|
return `${getProxyPath()}docs/coverage`;
|
|
83
83
|
},
|
|
84
84
|
themeEvent: () => {
|
|
85
|
-
s(`.doc-icon-coverage`)
|
|
86
|
-
|
|
87
|
-
|
|
85
|
+
if (s(`.doc-icon-coverage`))
|
|
86
|
+
s(`.doc-icon-coverage`).src = `https://cdn.simpleicons.org/coveralls/${rgbToHex(
|
|
87
|
+
window.getComputedStyle(s('html')).color,
|
|
88
|
+
)}`;
|
|
88
89
|
},
|
|
89
90
|
},
|
|
90
91
|
{
|
|
@@ -95,9 +96,10 @@ const Docs = {
|
|
|
95
96
|
return `https://coveralls.io/github/underpostnet/engine`;
|
|
96
97
|
},
|
|
97
98
|
themeEvent: () => {
|
|
98
|
-
s(`.doc-icon-coverage-link`)
|
|
99
|
-
|
|
100
|
-
|
|
99
|
+
if (s(`.doc-icon-coverage-link`))
|
|
100
|
+
s(`.doc-icon-coverage-link`).src = `https://cdn.simpleicons.org/coveralls/${rgbToHex(
|
|
101
|
+
window.getComputedStyle(s('html')).color,
|
|
102
|
+
)}`;
|
|
101
103
|
},
|
|
102
104
|
},
|
|
103
105
|
].concat(
|
|
@@ -109,6 +109,6 @@ SrrComponent = ({ ttiLoadTimeLimit }) => {
|
|
|
109
109
|
const CacheControl = ${CacheControl};
|
|
110
110
|
CacheControl({ ttiLoadTimeLimit: ${ttiLoadTimeLimit ? ttiLoadTimeLimit : 1000 * 70 * 1} });
|
|
111
111
|
</script>
|
|
112
|
-
<div class="clean-cache-container">v2.7.
|
|
112
|
+
<div class="clean-cache-container">v2.7.6</div>
|
|
113
113
|
`;
|
|
114
114
|
};
|
package/src/index.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { favicons } from 'favicons';
|
|
2
|
-
|
|
2
|
+
// TODO: search alternatives
|
|
3
|
+
// import textToImage from 'text-to-image';
|
|
3
4
|
import { loggerFactory } from './logger.js';
|
|
4
5
|
import fs from 'fs-extra';
|
|
5
6
|
import { png3x } from 'font-awesome-assets';
|
|
@@ -52,7 +53,7 @@ const defaultBaseTextImgOptionsSizes = {
|
|
|
52
53
|
|
|
53
54
|
const buildTextImg = async (text = 'APP', options, size = '1200x1200') => {
|
|
54
55
|
options = { ...defaultBaseTextImgOptions, ...defaultBaseTextImgOptionsSizes[size], ...options };
|
|
55
|
-
await textToImage.generate(text, options);
|
|
56
|
+
// await textToImage.generate(text, options);
|
|
56
57
|
};
|
|
57
58
|
|
|
58
59
|
const getBufferPngText = async ({ text, textColor, bgColor, size, debugFilename }) => {
|
|
@@ -62,6 +63,7 @@ const getBufferPngText = async ({ text, textColor, bgColor, size, debugFilename
|
|
|
62
63
|
if (!size) size = '100x300';
|
|
63
64
|
if (!debugFilename) debugFilename = `./${s4()}${s4()}${s4()}.png`;
|
|
64
65
|
await buildTextImg(text, { textColor, bgColor, size, debugFilename }, size);
|
|
66
|
+
if (!fs.existsSync(debugFilename)) return Buffer.alloc(0); // Return empty buffer if file not found
|
|
65
67
|
const bufferImage = fs.readFileSync(debugFilename);
|
|
66
68
|
fs.removeSync(debugFilename);
|
|
67
69
|
return bufferImage;
|
package/src/server/conf.js
CHANGED
|
@@ -12,6 +12,16 @@ import { DefaultConf } from '../../conf.js';
|
|
|
12
12
|
import ncp from 'copy-paste';
|
|
13
13
|
import read from 'read';
|
|
14
14
|
import splitFile from 'split-file';
|
|
15
|
+
import axios from 'axios';
|
|
16
|
+
import https from 'https';
|
|
17
|
+
|
|
18
|
+
// axios.defaults.baseURL = BASE_URL;
|
|
19
|
+
|
|
20
|
+
const httpsAgent = new https.Agent({
|
|
21
|
+
rejectUnauthorized: false,
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
axios.defaults.httpsAgent = httpsAgent;
|
|
15
25
|
|
|
16
26
|
colors.enable();
|
|
17
27
|
dotenv.config();
|
|
@@ -585,6 +595,7 @@ const validateTemplatePath = (absolutePath = '') => {
|
|
|
585
595
|
) {
|
|
586
596
|
return false;
|
|
587
597
|
}
|
|
598
|
+
if (absolutePath.match('hardhat/')) return false;
|
|
588
599
|
if (
|
|
589
600
|
absolutePath.match('/client') &&
|
|
590
601
|
absolutePath.match('.index.js') &&
|
|
@@ -829,6 +840,23 @@ const Cmd = {
|
|
|
829
840
|
syncPorts: (deployGroupId) => `node bin/deploy sync-env-port ${deployGroupId}`,
|
|
830
841
|
};
|
|
831
842
|
|
|
843
|
+
const fixDependencies = async () => {
|
|
844
|
+
// sed -i "$line_number s,.*,$new_text," "$file"
|
|
845
|
+
// sed -i "$line_number c \\$new_text" "$file"
|
|
846
|
+
const dep = fs.readFileSync(`./node_modules/peer/dist/module.mjs`, 'utf8');
|
|
847
|
+
const errorLine = `import {WebSocketServer as $hSjDC$WebSocketServer} from "ws";`;
|
|
848
|
+
|
|
849
|
+
fs.writeFileSync(
|
|
850
|
+
`./node_modules/peer/dist/module.mjs`,
|
|
851
|
+
dep.replaceAll(
|
|
852
|
+
errorLine,
|
|
853
|
+
`import WebSocketServer from "ws";
|
|
854
|
+
let $hSjDC$WebSocketServer = WebSocketServer.Server;`,
|
|
855
|
+
),
|
|
856
|
+
'utf8',
|
|
857
|
+
);
|
|
858
|
+
};
|
|
859
|
+
|
|
832
860
|
export {
|
|
833
861
|
Cmd,
|
|
834
862
|
Config,
|
|
@@ -857,4 +885,5 @@ export {
|
|
|
857
885
|
getCronBackUpFolder,
|
|
858
886
|
getRestoreCronCmd,
|
|
859
887
|
mergeBackUp,
|
|
888
|
+
fixDependencies,
|
|
860
889
|
};
|
package/startup.js
CHANGED
package/setup.sh
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
sudo apt update
|
|
2
|
-
sudo apt upgrade
|
|
3
|
-
|
|
4
|
-
# Install the MongoDB 4.4 GPG key:
|
|
5
|
-
wget -qO - https://www.mongodb.org/static/pgp/server-4.4.asc | sudo apt-key add -
|
|
6
|
-
|
|
7
|
-
# Add the source location for the MongoDB packages:
|
|
8
|
-
# echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/4.4 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-4.4.list
|
|
9
|
-
echo "deb [ arch=arm64 ] https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/4.2 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-4.2.list
|
|
10
|
-
|
|
11
|
-
# Download the package details for the MongoDB packages:
|
|
12
|
-
sudo apt-get update
|
|
13
|
-
|
|
14
|
-
# Install MongoDB:
|
|
15
|
-
sudo apt-get install -y mongodb-org
|
|
16
|
-
# sudo apt-get install mongodb
|
|
17
|
-
|
|
18
|
-
# Ensure mongod config is picked up:
|
|
19
|
-
sudo systemctl daemon-reload
|
|
20
|
-
|
|
21
|
-
# Tell systemd to run mongod on reboot:
|
|
22
|
-
sudo systemctl enable mongod
|
|
23
|
-
|
|
24
|
-
# Start up mongod!
|
|
25
|
-
sudo systemctl start mongod
|