underpost 3.0.0 → 3.0.2
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 +1 -2
- package/.env.test +1 -2
- package/.github/workflows/gitlab.ci.yml +20 -0
- package/CHANGELOG.md +105 -1
- package/CLI-HELP.md +2 -4
- package/README.md +2 -2
- package/bin/build.js +6 -3
- package/bin/deploy.js +18 -26
- package/bin/file.js +31 -2
- package/manifests/cronjobs/dd-cron/dd-cron-backup.yaml +1 -1
- package/manifests/cronjobs/dd-cron/dd-cron-dns.yaml +1 -1
- package/manifests/deployment/dd-default-development/deployment.yaml +2 -2
- package/manifests/deployment/dd-test-development/deployment.yaml +2 -2
- package/manifests/ipfs/configmap.yaml +7 -0
- package/package.json +5 -1
- package/src/api/file/file.controller.js +3 -13
- package/src/api/file/file.ref.json +0 -21
- package/src/api/user/user.router.js +0 -47
- package/src/cli/cluster.js +30 -38
- package/src/cli/index.js +0 -1
- package/src/cli/lxd.js +1 -1
- package/src/cli/run.js +17 -2
- package/src/client/components/core/Docs.js +92 -6
- package/src/client/components/core/LoadingAnimation.js +2 -3
- package/src/client/components/core/Modal.js +1 -1
- package/src/client/components/core/VanillaJs.js +36 -0
- package/src/index.js +1 -1
- package/src/runtime/express/Express.js +4 -3
- package/src/server/auth.js +18 -18
- package/src/server/client-build-docs.js +152 -34
- package/src/server/ipfs-client.js +433 -0
- package/bin/ssl.js +0 -63
package/.env.development
CHANGED
package/.env.test
CHANGED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
name: CI | Publish gitlab repository package
|
|
2
|
+
on: [push]
|
|
3
|
+
jobs:
|
|
4
|
+
pwa-microservices-template:
|
|
5
|
+
if: github.repository == 'underpostnet/pwa-microservices-template' && startsWith(github.event.head_commit.message, 'ci(package-pwa-microservices-template-ghpkg)')
|
|
6
|
+
name: Update gitlab repo package Jobs
|
|
7
|
+
runs-on: ubuntu-latest
|
|
8
|
+
steps:
|
|
9
|
+
- uses: actions/checkout@v4
|
|
10
|
+
with:
|
|
11
|
+
fetch-depth: 0
|
|
12
|
+
lfs: true
|
|
13
|
+
- name: Push to GitLab
|
|
14
|
+
run: |
|
|
15
|
+
git remote add gitlab https://oauth2:${{ secrets.GITLAB_TOKEN }}@gitlab.com/underpostnet/pwa-microservices-template.git
|
|
16
|
+
git lfs install
|
|
17
|
+
git lfs fetch --all
|
|
18
|
+
git lfs push --all gitlab
|
|
19
|
+
git push gitlab HEAD:main --force
|
|
20
|
+
git push gitlab --force --tags
|
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,110 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
-
## 2026-02
|
|
3
|
+
## 2026-03-02
|
|
4
|
+
|
|
5
|
+
### engine-cyberia
|
|
6
|
+
|
|
7
|
+
- Add test in engine-cyberia cd workflow ([642d7e36](https://github.com/underpostnet/engine/commit/642d7e36155b6db5dbd36e19767dd95f146ceaf5))
|
|
8
|
+
- Add build dd-cyberia shape generator exclusive module files ([188f563a](https://github.com/underpostnet/engine/commit/188f563a61d7f6bf36bef93cdd18d4e1304f9747))
|
|
9
|
+
- Fix ObjectLayerEngineViewer return to list button click ([aeaead6f](https://github.com/underpostnet/engine/commit/aeaead6f5c67a03449c63c584976e9a73ccc953d))
|
|
10
|
+
- Improve static generations assets in object layer generation CLI ([06694d92](https://github.com/underpostnet/engine/commit/06694d92ea1ad849e745f561b8ec9a48bfa66056))
|
|
11
|
+
- Implements deterministic object layer generation CLI ([f70c9841](https://github.com/underpostnet/engine/commit/f70c9841ef2efc9187c87427cc465505487766db))
|
|
12
|
+
- Implement shape generator module ([5741a38b](https://github.com/underpostnet/engine/commit/5741a38bcfb8c1c4e0ef5053a2a6a73ff50a3879))
|
|
13
|
+
- Fix remove of ag grid table delete object layer delete logic ([e98953cd](https://github.com/underpostnet/engine/commit/e98953cd29767ca44c2362997f0af40cd538371b))
|
|
14
|
+
- Centralize Object Layer Logic and add js docs ([ff8eefed](https://github.com/underpostnet/engine/commit/ff8eefed08349a1e3390379f760c0d9eb20aecca))
|
|
15
|
+
- ObjectLayer Engine Viewer Enhancements ([0ee052e5](https://github.com/underpostnet/engine/commit/0ee052e5231f7b55576595a817742970c90cd056))
|
|
16
|
+
- Add metada json editor of object layers ([abe7448f](https://github.com/underpostnet/engine/commit/abe7448f5ed7429ba1f5c5d01ed94c5c70323638))
|
|
17
|
+
- Remove helia pyntype logic ([2b443d1c](https://github.com/underpostnet/engine/commit/2b443d1c0ed2261e27d5be54903c9a37cff29dd5))
|
|
18
|
+
- Object Layer Deletion Cleanup IPFS ([a2dcdf23](https://github.com/underpostnet/engine/commit/a2dcdf238c32d5b5237f0650232aca0c0823f044))
|
|
19
|
+
- Add Public GET Access for File Object Atlas ([826317fe](https://github.com/underpostnet/engine/commit/826317fe21dfd0b77196ef343b31461c45b5eb72))
|
|
20
|
+
- Allow Cross-Origin on GET methods file, object-layer, and atlas-sprite-sheet api. ([6801839c](https://github.com/underpostnet/engine/commit/6801839cc461dbec6ca205b035ea844415779e85))
|
|
21
|
+
- Add DISABLE_API_RATE_LIMIT env option ([ae72885c](https://github.com/underpostnet/engine/commit/ae72885c1178846067db52b62455d804dbe4eeba))
|
|
22
|
+
|
|
23
|
+
### client-core
|
|
24
|
+
|
|
25
|
+
- Fix main-body-btn-container hide logic ([221f8bfc](https://github.com/underpostnet/engine/commit/221f8bfc262048e1ca226f66f0dfab9891db3fd5))
|
|
26
|
+
|
|
27
|
+
### runtime-express
|
|
28
|
+
|
|
29
|
+
- Fix express rate limit trust proxy ([ed19e729](https://github.com/underpostnet/engine/commit/ed19e729eafb59d46504fb1ebe89e4bd91c05d7e))
|
|
30
|
+
|
|
31
|
+
### cli-cluster
|
|
32
|
+
|
|
33
|
+
- Remove unused full flag ([13df39f5](https://github.com/underpostnet/engine/commit/13df39f508d65b61378ccfca4f7bfc427dcf5fa5))
|
|
34
|
+
|
|
35
|
+
### ipfs
|
|
36
|
+
|
|
37
|
+
- Add ipfs client stable json stringify in addJsonToIpfs method ([c2aaf56a](https://github.com/underpostnet/engine/commit/c2aaf56a4bfc4f06147818ec5681567e27967f41))
|
|
38
|
+
- Fix config map IPFS Cluster daemon bind ([7e6df963](https://github.com/underpostnet/engine/commit/7e6df963ba6da1fdc96ac5b6ab844a789901f61b))
|
|
39
|
+
- server ipfs client and object layer atlas sprite sheet ipfs integration ([781e35c4](https://github.com/underpostnet/engine/commit/781e35c4903380df9e7dce7cf5d9275387a46029))
|
|
40
|
+
- Implement ipfs api user-pin and client component service ([1b12e8df](https://github.com/underpostnet/engine/commit/1b12e8df6af21e1dd2edc156e176072f25c9a433))
|
|
41
|
+
|
|
42
|
+
### cli-run
|
|
43
|
+
|
|
44
|
+
- Implements expose-ipfs runner ([765772b8](https://github.com/underpostnet/engine/commit/765772b8fb1e7b397560464d1dc6dea0b70a9b7f))
|
|
45
|
+
|
|
46
|
+
### engine-core
|
|
47
|
+
|
|
48
|
+
- Clean up legacy logic and json file model ref ([b4c62a2c](https://github.com/underpostnet/engine/commit/b4c62a2cfe4fea0212be644ce333464a81056f6f))
|
|
49
|
+
|
|
50
|
+
### bin-build
|
|
51
|
+
|
|
52
|
+
- Add missing packagejson overrides on dd-cyberia build repository workflow ([7ece9ed5](https://github.com/underpostnet/engine/commit/7ece9ed5500e83a1baedc4d78fd889bca6ecac3c))
|
|
53
|
+
|
|
54
|
+
## New release v:3.0.1 (2026-02-22)
|
|
55
|
+
|
|
56
|
+
### engine-core
|
|
57
|
+
|
|
58
|
+
- Remove ENABLE_FILE_LOGS to default dev adn test env ([727486dc](https://github.com/underpostnet/engine/commit/727486dc4030921c9d1f6a7035eb1a240569fa74))
|
|
59
|
+
|
|
60
|
+
### gitlab
|
|
61
|
+
|
|
62
|
+
- Fix package json lock template build ([e674ec6b](https://github.com/underpostnet/engine/commit/e674ec6be61d7a170ab468d473d0e545401b765a))
|
|
63
|
+
- Fix mirror push to GitLab ([9585aa50](https://github.com/underpostnet/engine/commit/9585aa50ee481fa49084c0edd44cc28b4b2561e8))
|
|
64
|
+
|
|
65
|
+
### bin-file
|
|
66
|
+
|
|
67
|
+
- Add missing gitlab.ci.yml build to pwa-microservices-template ([ec49ded0](https://github.com/underpostnet/engine/commit/ec49ded0ac3fbfcba1e7e10b0ed1dcfc13a8da87))
|
|
68
|
+
|
|
69
|
+
### client-core
|
|
70
|
+
|
|
71
|
+
- Add missing keyboard focus search box on iframes docs ([c5b0f86c](https://github.com/underpostnet/engine/commit/c5b0f86c7acc0d2c964cc1ef80625693241e6d62))
|
|
72
|
+
- Add VanillaJs get selector in iframe ([e37fa340](https://github.com/underpostnet/engine/commit/e37fa34037cff9924bc747f1ee11190ee2e1164b))
|
|
73
|
+
|
|
74
|
+
### giblab
|
|
75
|
+
|
|
76
|
+
- Add .gitlab-ci.yml ([a795bd5f](https://github.com/underpostnet/engine/commit/a795bd5f3526257c858ec70ee27feb8bfd793baf))
|
|
77
|
+
|
|
78
|
+
### docs
|
|
79
|
+
|
|
80
|
+
- Add VanillaJs get selector in iframe sync darkTheme in docs component. ([5b2ba08f](https://github.com/underpostnet/engine/commit/5b2ba08f3b0df3a6072aa49ca55efd223f72a95c))
|
|
81
|
+
|
|
82
|
+
### server-client-build-docs
|
|
83
|
+
|
|
84
|
+
- Enable Swagger UI Dark Light Mode ([eaadad70](https://github.com/underpostnet/engine/commit/eaadad70cd74bcd9f7990dd63834bbd69bffcbae))
|
|
85
|
+
|
|
86
|
+
### github-actions
|
|
87
|
+
|
|
88
|
+
- Add gitlab mirror CI repository integration ([3d6acdef](https://github.com/underpostnet/engine/commit/3d6acdefeea72f26a733975e822dbcf2b4e793e3))
|
|
89
|
+
- Fix GitHub Actions npm provenance ([cd31b8f0](https://github.com/underpostnet/engine/commit/cd31b8f0ed202ed376016d3fc4b9fc63152f5186))
|
|
90
|
+
|
|
91
|
+
### cli-run
|
|
92
|
+
|
|
93
|
+
- Fix missing cluster type on runners id cluster and gpu env ([ddd72d2e](https://github.com/underpostnet/engine/commit/ddd72d2e32e448b8956862f0719d5ab2d2ea7606))
|
|
94
|
+
|
|
95
|
+
### package
|
|
96
|
+
|
|
97
|
+
- Resolve npm ci lock mismatch ([357b4e81](https://github.com/underpostnet/engine/commit/357b4e81611541a0d979bc95cb587343bf540604))
|
|
98
|
+
|
|
99
|
+
### cli-repo
|
|
100
|
+
|
|
101
|
+
- Fix Changelog error due to type integration message ([750656e1](https://github.com/underpostnet/engine/commit/750656e1cbee5dbb3e73d9d5cdd4d94ed049a4f1))
|
|
102
|
+
|
|
103
|
+
### cli-ipfs
|
|
104
|
+
|
|
105
|
+
- Fix underpost ipfs syntax import in main src index ([f7bebb65](https://github.com/underpostnet/engine/commit/f7bebb6555a85df35aed3e248dd0b304c00fd008))
|
|
106
|
+
|
|
107
|
+
## New release v:3.0.0 (2026-02-22)
|
|
4
108
|
|
|
5
109
|
### engine-core
|
|
6
110
|
|
package/CLI-HELP.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
## underpost ci/cd cli v3.0.
|
|
1
|
+
## underpost ci/cd cli v3.0.2
|
|
2
2
|
|
|
3
3
|
### Usage: `underpost [options] [command]`
|
|
4
4
|
```
|
|
@@ -379,8 +379,6 @@ Options:
|
|
|
379
379
|
--dedicated-gpu Initializes the cluster with dedicated
|
|
380
380
|
GPU base resources and environment
|
|
381
381
|
settings.
|
|
382
|
-
--full Initializes the cluster with all
|
|
383
|
-
available statefulsets and services.
|
|
384
382
|
--ns-use <ns-name> Switches the current Kubernetes context
|
|
385
383
|
to the specified namespace (creates if
|
|
386
384
|
it doesn't exist).
|
|
@@ -835,7 +833,7 @@ Options:
|
|
|
835
833
|
Runs specified scripts using various runners.
|
|
836
834
|
|
|
837
835
|
Arguments:
|
|
838
|
-
runner-id The runner ID to run. Options: dev-cluster,metadata,svc-ls,svc-rm,ssh-deploy-info,dev-hosts-expose,dev-hosts-restore,cluster-build,template-deploy,template-deploy-image,clean,pull,release-deploy,ssh-deploy,ide,crypto-policy,sync,stop,ssh-deploy-stop,ssh-deploy-db-rollback,ssh-deploy-db,ssh-deploy-db-status,tz,get-proxy,instance-promote,instance,ls-deployments,host-update,dd-container,ip-info,db-client,git-conf,promote,metrics,cluster,deploy,disk-clean,disk-devices,disk-usage,dev,service,etc-hosts,sh,log,ps,ptls,release-cmt,deploy-test,sync-replica,tf-vae-test,spark-template,rmi,kill,secret,underpost-config,gpu-env,tf-gpu-test,deploy-job.
|
|
836
|
+
runner-id The runner ID to run. Options: dev-cluster,ipfs-expose,metadata,svc-ls,svc-rm,ssh-deploy-info,dev-hosts-expose,dev-hosts-restore,cluster-build,template-deploy,template-deploy-image,clean,pull,release-deploy,ssh-deploy,ide,crypto-policy,sync,stop,ssh-deploy-stop,ssh-deploy-db-rollback,ssh-deploy-db,ssh-deploy-db-status,tz,get-proxy,instance-promote,instance,ls-deployments,host-update,dd-container,ip-info,db-client,git-conf,promote,metrics,cluster,deploy,disk-clean,disk-devices,disk-usage,dev,service,etc-hosts,sh,log,ps,ptls,release-cmt,deploy-test,sync-replica,tf-vae-test,spark-template,rmi,kill,secret,underpost-config,gpu-env,tf-gpu-test,deploy-job.
|
|
839
837
|
path The input value, identifier, or path for the operation.
|
|
840
838
|
|
|
841
839
|
Options:
|
package/README.md
CHANGED
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
|
|
17
17
|
<div align="center">
|
|
18
18
|
|
|
19
|
-
[](https://github.com/underpostnet/engine/actions/workflows/docker-image.yml) [](https://github.com/underpostnet/engine/actions/workflows/coverall.ci.yml) [](https://www.npmjs.com/package/underpost) [](https://github.com/underpostnet/engine/actions/workflows/docker-image.yml) [](https://github.com/underpostnet/engine/actions/workflows/coverall.ci.yml) [](https://www.npmjs.com/package/underpost) [](https://socket.dev/npm/package/underpost/overview/3.0.2) [](https://coveralls.io/github/underpostnet/engine?branch=master) [](https://www.npmjs.org/package/underpost) [](https://www.npmjs.com/package/underpost)
|
|
20
20
|
|
|
21
21
|
</div>
|
|
22
22
|
|
|
@@ -60,7 +60,7 @@ npm run dev
|
|
|
60
60
|
|
|
61
61
|
<a target="_top" href="https://www.nexodev.org/docs?cid=src">See Docs here.</a>
|
|
62
62
|
|
|
63
|
-
## underpost ci/cd cli v3.0.
|
|
63
|
+
## underpost ci/cd cli v3.0.2
|
|
64
64
|
|
|
65
65
|
### Usage: `underpost [options] [command]`
|
|
66
66
|
```
|
package/bin/build.js
CHANGED
|
@@ -172,6 +172,7 @@ const { DefaultConf } = await import(`../conf.${confName}.js`);
|
|
|
172
172
|
...packageJson.dependencies,
|
|
173
173
|
...CyberiaDependencies,
|
|
174
174
|
};
|
|
175
|
+
packageJson.overrides = originPackageJson.overrides;
|
|
175
176
|
fs.writeFileSync(`${basePath}/bin/index.js`, fs.readFileSync(`./bin/cyberia.js`, 'utf8'), 'utf8');
|
|
176
177
|
fs.copyFileSync(`./src/api/object-layer/README.md`, `${basePath}/README.md`);
|
|
177
178
|
fs.copySync(`./hardhat`, `${basePath}/hardhat`);
|
|
@@ -180,6 +181,9 @@ const { DefaultConf } = await import(`../conf.${confName}.js`);
|
|
|
180
181
|
'/src/client/ssr/pages/CyberiaServerMetrics.js',
|
|
181
182
|
'/src/server/object-layer.js',
|
|
182
183
|
'/src/server/atlas-sprite-sheet-generator.js',
|
|
184
|
+
'/src/server/shape-generator.js',
|
|
185
|
+
'/src/server/semantic-layer-generator.js',
|
|
186
|
+
'/test/shape-generator.test.js',
|
|
183
187
|
])
|
|
184
188
|
fs.copySync(`.${path}`, `${basePath}${path}`);
|
|
185
189
|
|
|
@@ -193,9 +197,6 @@ const { DefaultConf } = await import(`../conf.${confName}.js`);
|
|
|
193
197
|
'utf8',
|
|
194
198
|
);
|
|
195
199
|
|
|
196
|
-
// Regenerate package-lock.json to match the modified package.json
|
|
197
|
-
shellExec(`cd ${basePath} && npm install --package-lock-only --ignore-scripts`);
|
|
198
|
-
|
|
199
200
|
fs.copySync(`./src/cli`, `${basePath}/src/cli`);
|
|
200
201
|
if (!fs.existsSync(`${basePath}/images`)) fs.mkdirSync(`${basePath}/images`);
|
|
201
202
|
|
|
@@ -219,4 +220,6 @@ const { DefaultConf } = await import(`../conf.${confName}.js`);
|
|
|
219
220
|
if (fs.existsSync(`./src/ws/${confName.split('-')[1]}`)) {
|
|
220
221
|
fs.copySync(`./src/ws/${confName.split('-')[1]}`, `${basePath}/src/ws/${confName.split('-')[1]}`);
|
|
221
222
|
}
|
|
223
|
+
shellExec(`cd ${basePath} && npm install --ignore-scripts`);
|
|
224
|
+
shellExec(`cd ${basePath} && npm run fix`);
|
|
222
225
|
}
|
package/bin/deploy.js
CHANGED
|
@@ -374,7 +374,9 @@ try {
|
|
|
374
374
|
shellExec(`node bin run kill 4002`);
|
|
375
375
|
shellExec(`node bin run kill 4003`);
|
|
376
376
|
shellExec(`npm run update-template`);
|
|
377
|
-
shellExec(
|
|
377
|
+
shellExec(
|
|
378
|
+
`cd ../pwa-microservices-template && npm install && echo "\nENABLE_FILE_LOGS=true" >> .env.development`,
|
|
379
|
+
);
|
|
378
380
|
shellExec(`cd ../pwa-microservices-template && npm run build && timeout 5s npm run dev`, {
|
|
379
381
|
async: true,
|
|
380
382
|
});
|
|
@@ -509,33 +511,23 @@ ${shellExec(`git log | grep Author: | sort -u`, { stdout: true }).split(`\n`).jo
|
|
|
509
511
|
// https://besu.hyperledger.org/
|
|
510
512
|
// https://github.com/hyperledger/besu/archive/refs/tags/24.9.1.tar.gz
|
|
511
513
|
|
|
512
|
-
|
|
513
|
-
case 'linux':
|
|
514
|
-
{
|
|
515
|
-
shellCd(`..`);
|
|
516
|
-
|
|
517
|
-
// Download the Linux binary
|
|
518
|
-
shellExec(`wget https://github.com/hyperledger/besu/releases/download/24.9.1/besu-24.9.1.tar.gz`);
|
|
514
|
+
shellCd(`..`);
|
|
519
515
|
|
|
520
|
-
|
|
521
|
-
|
|
516
|
+
// Download the Linux binary
|
|
517
|
+
shellExec(`wget https://github.com/hyperledger/besu/releases/download/24.9.1/besu-24.9.1.tar.gz`);
|
|
522
518
|
|
|
523
|
-
|
|
519
|
+
// Unzip the file:
|
|
520
|
+
shellExec(`tar -xvzf besu-24.9.1.tar.gz`);
|
|
524
521
|
|
|
525
|
-
|
|
522
|
+
shellCd(`besu-24.9.1`);
|
|
526
523
|
|
|
527
|
-
|
|
528
|
-
// export PATH=$PATH:/home/dd/besu-24.9.1/bin
|
|
524
|
+
shellExec(`bin/besu --help`);
|
|
529
525
|
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
}
|
|
533
|
-
|
|
534
|
-
break;
|
|
526
|
+
// Set env path
|
|
527
|
+
// export PATH=$PATH:/home/dd/besu-24.9.1/bin
|
|
535
528
|
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
}
|
|
529
|
+
// Open src
|
|
530
|
+
// shellExec(`sudo code /home/dd/besu-24.9.1 --user-data-dir="/root/.vscode-root" --no-sandbox`);
|
|
539
531
|
|
|
540
532
|
break;
|
|
541
533
|
}
|
|
@@ -977,10 +969,10 @@ nvidia/gpu-operator \
|
|
|
977
969
|
`${key}`.toUpperCase().match('MAC')
|
|
978
970
|
? 'changethis'
|
|
979
971
|
: isNaN(parseFloat(privateEnv[key]))
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
972
|
+
? `${privateEnv[key]}`.match(`@`)
|
|
973
|
+
? 'admin@default.net'
|
|
974
|
+
: 'changethis'
|
|
975
|
+
: privateEnv[key];
|
|
984
976
|
}
|
|
985
977
|
return env;
|
|
986
978
|
};
|
package/bin/file.js
CHANGED
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
import fs from 'fs-extra';
|
|
2
2
|
|
|
3
3
|
import { loggerFactory } from '../src/server/logger.js';
|
|
4
|
-
import {
|
|
4
|
+
import {
|
|
5
|
+
cap,
|
|
6
|
+
getCapVariableName,
|
|
7
|
+
getDirname,
|
|
8
|
+
newInstance,
|
|
9
|
+
uniqueArray,
|
|
10
|
+
} from '../src/client/components/core/CommonJs.js';
|
|
5
11
|
import { shellCd, shellExec } from '../src/server/process.js';
|
|
6
12
|
import walk from 'ignore-walk';
|
|
7
13
|
import { validateTemplatePath } from '../src/server/conf.js';
|
|
@@ -91,6 +97,9 @@ try {
|
|
|
91
97
|
'./manifests/deployment/dd-template-development',
|
|
92
98
|
'./src/server/object-layer.js',
|
|
93
99
|
'./src/server/atlas-sprite-sheet-generator.js',
|
|
100
|
+
'./src/server/shape-generator.js',
|
|
101
|
+
'./src/server/semantic-layer-generator.js',
|
|
102
|
+
'./test/shape-generator.test.js',
|
|
94
103
|
'bin/cyberia.js',
|
|
95
104
|
]) {
|
|
96
105
|
if (fs.existsSync(deletePath)) fs.removeSync('../pwa-microservices-template/' + deletePath);
|
|
@@ -104,6 +113,7 @@ try {
|
|
|
104
113
|
`./.github/workflows/pwa-microservices-template-test.ci.yml`,
|
|
105
114
|
`./.github/workflows/npmpkg.ci.yml`,
|
|
106
115
|
`./.github/workflows/ghpkg.ci.yml`,
|
|
116
|
+
`./.github/workflows/gitlab.ci.yml`,
|
|
107
117
|
`./.github/workflows/publish.ci.yml`,
|
|
108
118
|
`./.github/workflows/release.cd.yml`,
|
|
109
119
|
'./src/ws/IoInterface.js',
|
|
@@ -123,6 +133,7 @@ try {
|
|
|
123
133
|
templatePackageJson.devDependencies = originPackageJson.devDependencies;
|
|
124
134
|
templatePackageJson.version = originPackageJson.version;
|
|
125
135
|
templatePackageJson.scripts = originPackageJson.scripts;
|
|
136
|
+
templatePackageJson.overrides = originPackageJson.overrides;
|
|
126
137
|
templatePackageJson.name = name;
|
|
127
138
|
templatePackageJson.description = description;
|
|
128
139
|
// templatePackageJson.scripts.dev = dev;
|
|
@@ -136,9 +147,27 @@ try {
|
|
|
136
147
|
JSON.stringify(templatePackageJson, null, 4),
|
|
137
148
|
'utf8',
|
|
138
149
|
);
|
|
150
|
+
const originPackageLockJson = JSON.parse(fs.readFileSync('./package-lock.json', 'utf8'));
|
|
139
151
|
|
|
152
|
+
const templatePackageLockJson = JSON.parse(
|
|
153
|
+
fs.readFileSync('../pwa-microservices-template/package-lock.json', 'utf8'),
|
|
154
|
+
);
|
|
155
|
+
|
|
156
|
+
const originBasePackageLock = newInstance(templatePackageLockJson.packages['']);
|
|
157
|
+
templatePackageLockJson.name = name;
|
|
158
|
+
templatePackageLockJson.version = originPackageLockJson.version;
|
|
159
|
+
templatePackageLockJson.packages = originPackageLockJson.packages;
|
|
160
|
+
templatePackageLockJson.packages[''].name = name;
|
|
161
|
+
templatePackageLockJson.packages[''].version = originPackageLockJson.version;
|
|
162
|
+
templatePackageLockJson.packages[''].hasInstallScript = originBasePackageLock.hasInstallScript;
|
|
163
|
+
templatePackageLockJson.packages[''].license = originBasePackageLock.license;
|
|
164
|
+
fs.writeFileSync(
|
|
165
|
+
'../pwa-microservices-template/package-lock.json',
|
|
166
|
+
JSON.stringify(templatePackageLockJson, null, 4),
|
|
167
|
+
'utf8',
|
|
168
|
+
);
|
|
140
169
|
// Regenerate package-lock.json to match the modified package.json
|
|
141
|
-
shellExec(`cd ../pwa-microservices-template && npm install --package-lock-only --ignore-scripts`);
|
|
170
|
+
// shellExec(`cd ../pwa-microservices-template && npm install --package-lock-only --ignore-scripts`);
|
|
142
171
|
fs.writeFileSync(
|
|
143
172
|
'../pwa-microservices-template/README.md',
|
|
144
173
|
fs
|
|
@@ -17,7 +17,7 @@ spec:
|
|
|
17
17
|
spec:
|
|
18
18
|
containers:
|
|
19
19
|
- name: dd-default-development-blue
|
|
20
|
-
image: localhost/rockylinux9-underpost:v3.0.
|
|
20
|
+
image: localhost/rockylinux9-underpost:v3.0.2
|
|
21
21
|
# resources:
|
|
22
22
|
# requests:
|
|
23
23
|
# memory: "124Ki"
|
|
@@ -100,7 +100,7 @@ spec:
|
|
|
100
100
|
spec:
|
|
101
101
|
containers:
|
|
102
102
|
- name: dd-default-development-green
|
|
103
|
-
image: localhost/rockylinux9-underpost:v3.0.
|
|
103
|
+
image: localhost/rockylinux9-underpost:v3.0.2
|
|
104
104
|
# resources:
|
|
105
105
|
# requests:
|
|
106
106
|
# memory: "124Ki"
|
|
@@ -18,7 +18,7 @@ spec:
|
|
|
18
18
|
spec:
|
|
19
19
|
containers:
|
|
20
20
|
- name: dd-test-development-blue
|
|
21
|
-
image: localhost/rockylinux9-underpost:v3.0.
|
|
21
|
+
image: localhost/rockylinux9-underpost:v3.0.2
|
|
22
22
|
|
|
23
23
|
command:
|
|
24
24
|
- /bin/sh
|
|
@@ -103,7 +103,7 @@ spec:
|
|
|
103
103
|
spec:
|
|
104
104
|
containers:
|
|
105
105
|
- name: dd-test-development-green
|
|
106
|
-
image: localhost/rockylinux9-underpost:v3.0.
|
|
106
|
+
image: localhost/rockylinux9-underpost:v3.0.2
|
|
107
107
|
|
|
108
108
|
command:
|
|
109
109
|
- /bin/sh
|
|
@@ -16,6 +16,13 @@ data:
|
|
|
16
16
|
ipfs-cluster-service init
|
|
17
17
|
fi
|
|
18
18
|
|
|
19
|
+
# Bind cluster APIs to 0.0.0.0 so they are reachable from other pods.
|
|
20
|
+
# By default ipfs-cluster listens on 127.0.0.1 for REST (9094),
|
|
21
|
+
# Proxy (9095) and Pinning Service (9097).
|
|
22
|
+
sed -i 's|/ip4/127\.0\.0\.1/tcp/9094|/ip4/0.0.0.0/tcp/9094|g' /data/ipfs-cluster/service.json
|
|
23
|
+
sed -i 's|/ip4/127\.0\.0\.1/tcp/9095|/ip4/0.0.0.0/tcp/9095|g' /data/ipfs-cluster/service.json
|
|
24
|
+
sed -i 's|/ip4/127\.0\.0\.1/tcp/9097|/ip4/0.0.0.0/tcp/9097|g' /data/ipfs-cluster/service.json
|
|
25
|
+
|
|
19
26
|
PEER_HOSTNAME=$(cat /proc/sys/kernel/hostname)
|
|
20
27
|
|
|
21
28
|
if echo "${PEER_HOSTNAME}" | grep -q "^ipfs-cluster-0"; then
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"type": "module",
|
|
3
3
|
"main": "src/index.js",
|
|
4
4
|
"name": "underpost",
|
|
5
|
-
"version": "3.0.
|
|
5
|
+
"version": "3.0.2",
|
|
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",
|
|
@@ -108,5 +108,9 @@
|
|
|
108
108
|
"provenance": true,
|
|
109
109
|
"access": "public",
|
|
110
110
|
"registry": "https://registry.npmjs.org/"
|
|
111
|
+
},
|
|
112
|
+
"overrides": {
|
|
113
|
+
"minimatch": "^10.2.2",
|
|
114
|
+
"glob": "^11.0.0"
|
|
111
115
|
}
|
|
112
116
|
}
|
|
@@ -19,22 +19,12 @@ const FileController = {
|
|
|
19
19
|
},
|
|
20
20
|
get: async (req, res, options) => {
|
|
21
21
|
try {
|
|
22
|
+
res.setHeader('Access-Control-Allow-Origin', '*');
|
|
23
|
+
res.setHeader('Cross-Origin-Resource-Policy', 'cross-origin');
|
|
22
24
|
const result = await FileService.get(req, res, options);
|
|
23
25
|
if (result instanceof Buffer) {
|
|
24
|
-
|
|
25
|
-
process.env.NODE_ENV === 'development' ||
|
|
26
|
-
req.hostname === options.host ||
|
|
27
|
-
(options.origins && options.origins.find((o) => o.match(req.hostname)))
|
|
28
|
-
) {
|
|
29
|
-
res.set('Cross-Origin-Resource-Policy', 'cross-origin');
|
|
30
|
-
return res.status(200).end(result);
|
|
31
|
-
}
|
|
32
|
-
return res.status(403).json({
|
|
33
|
-
status: 'error',
|
|
34
|
-
message: 'Forbidden',
|
|
35
|
-
});
|
|
26
|
+
return res.status(200).end(result);
|
|
36
27
|
}
|
|
37
|
-
|
|
38
28
|
return res.status(200).json({
|
|
39
29
|
status: 'success',
|
|
40
30
|
data: result,
|
|
@@ -5,27 +5,6 @@
|
|
|
5
5
|
"logo": true
|
|
6
6
|
}
|
|
7
7
|
},
|
|
8
|
-
{
|
|
9
|
-
"api": "cyberia-biome",
|
|
10
|
-
"model": {
|
|
11
|
-
"fileId": true,
|
|
12
|
-
"topLevelColorFileId": true
|
|
13
|
-
}
|
|
14
|
-
},
|
|
15
|
-
{
|
|
16
|
-
"api": "cyberia-tile",
|
|
17
|
-
"model": {
|
|
18
|
-
"fileId": true
|
|
19
|
-
}
|
|
20
|
-
},
|
|
21
|
-
{
|
|
22
|
-
"api": "cyberia-world",
|
|
23
|
-
"model": {
|
|
24
|
-
"adjacentFace": {
|
|
25
|
-
"fileId": true
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
},
|
|
29
8
|
{
|
|
30
9
|
"api": "document",
|
|
31
10
|
"model": {
|
|
@@ -99,22 +99,6 @@ const UserRouter = (options) => {
|
|
|
99
99
|
#swagger.description = 'This endpoint get a JWT for authenticated user'
|
|
100
100
|
#swagger.path = '/user/auth'
|
|
101
101
|
#swagger.method = 'post'
|
|
102
|
-
#swagger.produces = ['application/json']
|
|
103
|
-
#swagger.consumes = ['application/json']
|
|
104
|
-
|
|
105
|
-
#swagger.requestBody = {
|
|
106
|
-
in: 'body',
|
|
107
|
-
description: 'User data',
|
|
108
|
-
required: true,
|
|
109
|
-
content: {
|
|
110
|
-
'application/json': {
|
|
111
|
-
schema: {
|
|
112
|
-
$ref: '#/components/schemas/userLogInRequest'
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
|
|
118
102
|
#swagger.responses[200] = {
|
|
119
103
|
description: 'User created successfully',
|
|
120
104
|
content: {
|
|
@@ -148,22 +132,6 @@ const UserRouter = (options) => {
|
|
|
148
132
|
#swagger.description = 'This endpoint will create a new user account'
|
|
149
133
|
#swagger.path = '/user'
|
|
150
134
|
#swagger.method = 'post'
|
|
151
|
-
#swagger.produces = ['application/json']
|
|
152
|
-
#swagger.consumes = ['application/json']
|
|
153
|
-
|
|
154
|
-
#swagger.requestBody = {
|
|
155
|
-
in: 'body',
|
|
156
|
-
description: 'User data',
|
|
157
|
-
required: true,
|
|
158
|
-
content: {
|
|
159
|
-
'application/json': {
|
|
160
|
-
schema: {
|
|
161
|
-
$ref: '#/components/schemas/userRequest'
|
|
162
|
-
}
|
|
163
|
-
}
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
|
|
167
135
|
#swagger.responses[200] = {
|
|
168
136
|
description: 'User created successfully',
|
|
169
137
|
content: {
|
|
@@ -274,8 +242,6 @@ const UserRouter = (options) => {
|
|
|
274
242
|
#swagger.description = 'This endpoint will update user data by ID'
|
|
275
243
|
#swagger.path = '/user/{id}'
|
|
276
244
|
#swagger.method = 'put'
|
|
277
|
-
#swagger.produces = ['application/json']
|
|
278
|
-
#swagger.consumes = ['application/json']
|
|
279
245
|
#swagger.security = [{
|
|
280
246
|
'bearerAuth': []
|
|
281
247
|
}]
|
|
@@ -287,19 +253,6 @@ const UserRouter = (options) => {
|
|
|
287
253
|
type: 'string'
|
|
288
254
|
}
|
|
289
255
|
|
|
290
|
-
#swagger.requestBody = {
|
|
291
|
-
in: 'body',
|
|
292
|
-
description: 'User data',
|
|
293
|
-
required: true,
|
|
294
|
-
content: {
|
|
295
|
-
'application/json': {
|
|
296
|
-
schema: {
|
|
297
|
-
$ref: '#/components/schemas/userRequest'
|
|
298
|
-
}
|
|
299
|
-
}
|
|
300
|
-
}
|
|
301
|
-
}
|
|
302
|
-
|
|
303
256
|
#swagger.responses[200] = {
|
|
304
257
|
description: 'User updated successfully',
|
|
305
258
|
content: {
|