cyberia 2.98.3 → 2.99.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.
Files changed (55) hide show
  1. package/.env.development +1 -0
  2. package/.env.production +1 -0
  3. package/.env.test +1 -0
  4. package/.github/workflows/engine-cyberia.cd.yml +30 -1
  5. package/bin/cyberia.js +1 -0
  6. package/bin/deploy.js +1 -1
  7. package/bin/index.js +1 -0
  8. package/cli.md +113 -110
  9. package/deployment.yaml +4 -4
  10. package/manifests/deployment/dd-default-development/deployment.yaml +2 -2
  11. package/manifests/deployment/dd-test-development/deployment.yaml +4 -4
  12. package/package.json +1 -2
  13. package/src/api/atlas-sprite-sheet/atlas-sprite-sheet.controller.js +30 -0
  14. package/src/api/atlas-sprite-sheet/atlas-sprite-sheet.model.js +15 -1
  15. package/src/api/atlas-sprite-sheet/atlas-sprite-sheet.router.js +16 -6
  16. package/src/api/atlas-sprite-sheet/atlas-sprite-sheet.service.js +94 -2
  17. package/src/api/object-layer/object-layer.service.js +116 -7
  18. package/src/api/user/user.router.js +7 -40
  19. package/src/cli/baremetal.js +67 -71
  20. package/src/cli/cloud-init.js +11 -12
  21. package/src/cli/cluster.js +22 -24
  22. package/src/cli/db.js +43 -50
  23. package/src/cli/deploy.js +163 -61
  24. package/src/cli/env.js +20 -5
  25. package/src/cli/fs.js +19 -21
  26. package/src/cli/index.js +38 -32
  27. package/src/cli/lxd.js +5 -5
  28. package/src/cli/monitor.js +83 -88
  29. package/src/cli/repository.js +7 -6
  30. package/src/cli/run.js +498 -288
  31. package/src/cli/secrets.js +3 -3
  32. package/src/cli/ssh.js +80 -32
  33. package/src/cli/static.js +1 -1
  34. package/src/cli/test.js +6 -7
  35. package/src/client/components/cyberia/ObjectLayerEngine.js +4 -2
  36. package/src/client/components/cyberia/ObjectLayerEngineModal.js +6 -1
  37. package/src/client/components/cyberia/ObjectLayerEngineViewer.js +585 -233
  38. package/src/client/services/atlas-sprite-sheet/atlas-sprite-sheet.service.js +38 -0
  39. package/src/index.js +49 -32
  40. package/src/runtime/express/Express.js +7 -6
  41. package/src/server/auth.js +6 -1
  42. package/src/server/backup.js +11 -1
  43. package/src/server/conf.js +4 -4
  44. package/src/{cli → server}/cron.js +56 -29
  45. package/src/server/dns.js +39 -31
  46. package/src/server/object-layer.js +1 -8
  47. package/src/server/peer.js +2 -2
  48. package/src/server/process.js +2 -2
  49. package/src/server/proxy.js +8 -7
  50. package/src/server/runtime.js +4 -7
  51. package/src/server/start.js +28 -15
  52. package/src/ws/IoServer.js +2 -3
  53. package/scripts/ssh-cluster-info.sh +0 -15
  54. package/src/cli/script.js +0 -85
  55. package/src/monitor.js +0 -34
package/.env.development CHANGED
@@ -41,5 +41,6 @@ NFS_EXPORT_PATH=changethis
41
41
  NVIDIA_API_KEY=changethis
42
42
  DEFAULT_ADMIN_EMAIL=admin@default.net
43
43
  DEFAULT_ADMIN_PASSWORD=changethis
44
+ DEFAULT_SSH_PORT=22
44
45
  BASE_API=api
45
46
  DEV_PROXY_PORT_OFFSET=200
package/.env.production CHANGED
@@ -50,6 +50,7 @@ NPM_USER=changethis
50
50
  NPM_PASSWORD=changethis
51
51
  POSTMAN_EMAIL=admin@default.net
52
52
  POSTMAN_PASSWORD=changethis
53
+ DEFAULT_SSH_PORT=22
53
54
  BASE_API=api
54
55
  CERTBOT_LIVE_PATH=changethis
55
56
  CERTBOT_LIVE_PATH_WINDOWS=changethis
package/.env.test CHANGED
@@ -41,5 +41,6 @@ NFS_EXPORT_PATH=changethis
41
41
  NVIDIA_API_KEY=changethis
42
42
  DEFAULT_ADMIN_EMAIL=admin@default.net
43
43
  DEFAULT_ADMIN_PASSWORD=changethis
44
+ DEFAULT_SSH_PORT=22
44
45
  BASE_API=api
45
46
  DEV_PROXY_PORT_OFFSET=200
@@ -59,4 +59,33 @@ jobs:
59
59
  echo "Starting remote sync and deploy"
60
60
  cd /home/dd/engine
61
61
  sudo -n -- /bin/bash -lc "node bin run pull"
62
- sudo -n -- /bin/bash -lc "node bin run sync --cron-jobs none dd-cyberia,1,,localhost/rockylinux9-underpost:v2.8.846"
62
+ sudo -n -- /bin/bash -lc "node bin run sync --cron-jobs none --timeout-response 300000ms dd-cyberia,1,,localhost/rockylinux9-underpost:v2.98.3 --cmd 'npm install -g npm@11.2.0,npm install -g underpost,underpost secret underpost --create-from-file /etc/config/.env.production,underpost start --build --run dd-cyberia production'"
63
+ init:
64
+ if: github.repository == 'underpostnet/engine' && startsWith(github.event.head_commit.message, 'cd(ssh-init-engine-cyberia)')
65
+ name: Remote SSH init deployment
66
+ runs-on: ubuntu-latest
67
+ steps:
68
+ - name: Run remote deploy via SSH
69
+ uses: appleboy/ssh-action@v1.2.2
70
+ with:
71
+ # Remote host (secret)
72
+ host: ${{ secrets.SSH_HOST }}
73
+ # Remote user (secret)
74
+ username: ${{ secrets.SSH_USERNAME }}
75
+ # Private key (secret) — the PEM contents (not a path)
76
+ key: ${{ secrets.SSH_PRIV_KEY }}
77
+ # Remote port (optional)
78
+ port: ${{ secrets.SSH_PORT }}
79
+ # Optional: increase timeout for long-running commands
80
+ command_timeout: 60m
81
+ # Optional: if your private key has a passphrase, add:
82
+ # passphrase: ${{ secrets.SSH_KEY_PASSPHRASE }}
83
+ # Commands to run on the remote VM
84
+ script: |
85
+ set -e
86
+ echo "Starting init deploy"
87
+ cd /home/dd/engine
88
+ sudo -n -- /bin/bash -lc "node bin run pull"
89
+ sudo -n -- /bin/bash -lc "node bin deploy dd-cyberia production --kubeadm --sync --build-manifest --image 'localhost/rockylinux9-underpost:v2.98.3' --timeout-response 300000ms --versions green --replicas 1 --cmd 'npm install -g npm@11.2.0,npm install -g underpost,underpost secret underpost --create-from-file /etc/config/.env.production,underpost start --build --run dd-cyberia production'"
90
+ sudo -n -- /bin/bash -lc "node bin deploy dd-cyberia production --kubeadm --disable-update-proxy"
91
+ sudo -n -- /bin/bash -lc "node bin monitor dd-cyberia production --ready-deployment --promote --timeout-response 300000ms --versions green --replicas 1"
package/bin/cyberia.js CHANGED
@@ -96,6 +96,7 @@ try {
96
96
  if (options.drop) {
97
97
  await ObjectLayer.deleteMany();
98
98
  await ObjectLayerRenderFrames.deleteMany();
99
+ shellExec(`cd src/client/public/cyberia && underpost run clean .`);
99
100
  }
100
101
 
101
102
  const storage = options.storageFilePath ? JSON.parse(fs.readFileSync(options.storageFilePath, 'utf8')) : null;
package/bin/deploy.js CHANGED
@@ -754,7 +754,7 @@ ${shellExec(`git log | grep Author: | sort -u`, { stdout: true }).split(`\n`).jo
754
754
 
755
755
  case 'create-ports': {
756
756
  const cmd = [];
757
- const commissioningDeviceIp = getLocalIPv4Address();
757
+ const commissioningDeviceIp = Underpost.dns.getLocalIPv4Address();
758
758
  for (const port of ['5240']) {
759
759
  const name = 'maas';
760
760
  cmd.push(`${name}:${port}-${port}:${commissioningDeviceIp}`);
package/bin/index.js CHANGED
@@ -96,6 +96,7 @@ try {
96
96
  if (options.drop) {
97
97
  await ObjectLayer.deleteMany();
98
98
  await ObjectLayerRenderFrames.deleteMany();
99
+ shellExec(`cd src/client/public/cyberia && underpost run clean .`);
99
100
  }
100
101
 
101
102
  const storage = options.storageFilePath ? JSON.parse(fs.readFileSync(options.storageFilePath, 'utf8')) : null;
package/cli.md CHANGED
@@ -1,4 +1,4 @@
1
- ## underpost ci/cd cli v2.98.3
1
+ ## underpost ci/cd cli v2.99.1
2
2
 
3
3
  ### Usage: `underpost [options] [command]`
4
4
  ```
@@ -25,7 +25,6 @@ Commands:
25
25
  install Quickly imports Underpost npm dependencies by copying them.
26
26
  db [options] [deploy-list] Manages database operations with support for MariaDB and MongoDB, including import/export, multi-pod targeting, and Git integration.
27
27
  metadata [options] [deploy-id] [host] [path] Manages cluster metadata operations, including import and export.
28
- script [options] <operator> <script-name> [script-value] Supports a variety of built-in Underpost global scripts, their preset lifecycle events, and arbitrary custom scripts.
29
28
  cron [options] [deploy-list] [job-list] Manages cron jobs, including initialization, execution, and configuration updates.
30
29
  fs [options] [path] Manages file storage, defaulting to file upload operations.
31
30
  test [options] [deploy-list] Manages and runs tests, defaulting to the current Underpost default test suite.
@@ -274,16 +273,20 @@ Options:
274
273
  Manages Underpost configurations using various operators.
275
274
 
276
275
  Arguments:
277
- operator The configuration operation to perform. Options: set,
278
- delete, get, list, clean.
279
- key Optional: The specific configuration key to manage.
280
- value Optional: The value to set for the configuration key.
276
+ operator The configuration operation to perform. Options:
277
+ set, delete, get, list, clean.
278
+ key Optional: The specific configuration key to manage.
279
+ value Optional: The value to set for the configuration
280
+ key.
281
281
 
282
282
  Options:
283
- --plain Prints the configuration value in plain text.
284
- --filter <keyword> Filters the list by matching key or value (only for list
285
- operation).
286
- -h, --help display help for command
283
+ --plain Prints the configuration value in plain text.
284
+ --filter <keyword> Filters the list by matching key or value (only for
285
+ list operation).
286
+ --deploy-id <deploy-id> Sets the deployment configuration ID for the
287
+ operation context.
288
+ --build Sets the build context for the operation.
289
+ -h, --help display help for command
287
290
 
288
291
  ```
289
292
 
@@ -417,61 +420,69 @@ Options:
417
420
  Manages application deployments, defaulting to deploying development pods.
418
421
 
419
422
  Arguments:
420
- deploy-list A comma-separated list of deployment IDs
421
- (e.g., "default-a,default-b").
422
- env Optional: The environment for deployment
423
- (e.g., "development", "production").
424
- Defaults to "development".
423
+ deploy-list A comma-separated list of deployment IDs
424
+ (e.g., "default-a,default-b").
425
+ env Optional: The environment for deployment
426
+ (e.g., "development", "production").
427
+ Defaults to "development".
425
428
 
426
429
  Options:
427
- --remove Deletes specified deployments and their
428
- associated services.
429
- --sync Synchronizes deployment environment
430
- variables, ports, and replica counts.
431
- --info-router Displays the current router structure and
432
- configuration.
433
- --expose Exposes services matching the provided
434
- deployment ID list.
435
- --cert Resets TLS/SSL certificate secrets for
436
- deployments.
437
- --cert-hosts <hosts> Resets TLS/SSL certificate secrets for
438
- specified hosts.
439
- --node <node> Sets optional node for deployment
440
- operations.
441
- --build-manifest Builds Kubernetes YAML manifests,
442
- including deployments, services, proxies,
443
- and secrets.
444
- --replicas <replicas> Sets a custom number of replicas for
445
- deployments.
446
- --image <image> Sets a custom image for deployments.
447
- --versions <deployment-versions> A comma-separated list of custom
448
- deployment versions.
449
- --traffic <traffic-versions> A comma-separated list of custom
450
- deployment traffic weights.
451
- --disable-update-deployment Disables updates to deployments.
452
- --disable-update-proxy Disables updates to proxies.
453
- --disable-deployment-proxy Disables proxies of deployments.
454
- --disable-update-volume Disables updates to volume mounts during
455
- deployment.
456
- --status Retrieves current network traffic data
457
- from resource deployments and the host
458
- machine network configuration.
459
- --kubeadm Enables the kubeadm context for deployment
460
- operations.
461
- --etc-hosts Enables the etc-hosts context for
462
- deployment operations.
463
- --restore-hosts Restores default `/etc/hosts` entries.
464
- --disable-update-underpost-config Disables updates to Underpost
465
- configuration during deployment.
466
- --namespace <namespace> Kubernetes namespace for deployment
467
- operations (defaults to "default").
468
- --kind-type <kind-type> Specifies the Kind cluster type for
469
- deployment operations.
470
- --port <port> Sets up port forwarding from local to
471
- remote ports.
472
- --cmd <cmd> Custom initialization command for
473
- deployment (comma-separated commands).
474
- -h, --help display help for command
430
+ --remove Deletes specified deployments and their
431
+ associated services.
432
+ --sync Synchronizes deployment environment
433
+ variables, ports, and replica counts.
434
+ --info-router Displays the current router structure and
435
+ configuration.
436
+ --expose Exposes services matching the provided
437
+ deployment ID list.
438
+ --cert Resets TLS/SSL certificate secrets for
439
+ deployments.
440
+ --cert-hosts <hosts> Resets TLS/SSL certificate secrets for
441
+ specified hosts.
442
+ --node <node> Sets optional node for deployment
443
+ operations.
444
+ --build-manifest Builds Kubernetes YAML manifests,
445
+ including deployments, services, proxies,
446
+ and secrets.
447
+ --replicas <replicas> Sets a custom number of replicas for
448
+ deployments.
449
+ --image <image> Sets a custom image for deployments.
450
+ --versions <deployment-versions> A comma-separated list of custom
451
+ deployment versions.
452
+ --traffic <traffic-versions> A comma-separated list of custom
453
+ deployment traffic weights.
454
+ --timeout-response <duration> Sets HTTPProxy per-route response timeout
455
+ (e.g., "1s", "300ms", "infinity").
456
+ --timeout-idle <duration> Sets HTTPProxy per-route idle timeout
457
+ (e.g., "10s", "infinity").
458
+ --retry-count <count> Sets HTTPProxy per-route retry count
459
+ (e.g., 3).
460
+ --retry-per-try-timeout <duration> Sets HTTPProxy retry per-try timeout
461
+ (e.g., "150ms").
462
+ --disable-update-deployment Disables updates to deployments.
463
+ --disable-update-proxy Disables updates to proxies.
464
+ --disable-deployment-proxy Disables proxies of deployments.
465
+ --disable-update-volume Disables updates to volume mounts during
466
+ deployment.
467
+ --status Retrieves current network traffic data
468
+ from resource deployments and the host
469
+ machine network configuration.
470
+ --kubeadm Enables the kubeadm context for
471
+ deployment operations.
472
+ --etc-hosts Enables the etc-hosts context for
473
+ deployment operations.
474
+ --restore-hosts Restores default `/etc/hosts` entries.
475
+ --disable-update-underpost-config Disables updates to Underpost
476
+ configuration during deployment.
477
+ --namespace <namespace> Kubernetes namespace for deployment
478
+ operations (defaults to "default").
479
+ --kind-type <kind-type> Specifies the Kind cluster type for
480
+ deployment operations.
481
+ --port <port> Sets up port forwarding from local to
482
+ remote ports.
483
+ --cmd <cmd> Custom initialization command for
484
+ deployment (comma-separated commands).
485
+ -h, --help display help for command
475
486
 
476
487
  ```
477
488
 
@@ -623,32 +634,6 @@ Options:
623
634
  ```
624
635
 
625
636
 
626
- ### `script` :
627
- ```
628
- Usage: underpost script [options] <operator> <script-name> [script-value]
629
-
630
- Supports a variety of built-in Underpost global scripts, their preset lifecycle
631
- events, and arbitrary custom scripts.
632
-
633
- Arguments:
634
- operator The script operation to perform. Options: set, run,
635
- get.
636
- script-name The name of the script to execute.
637
- script-value Optional: A literal command or a path to a script
638
- file.
639
-
640
- Options:
641
- --itc Executes the script within the container execution
642
- context.
643
- --itc-path Specifies container path options for script execution.
644
- --ns <ns-name> Optional: Specifies the namespace context for script
645
- execution.
646
- --pod-name <pod-name> Optional: Specifies the pod name for script execution.
647
- -h, --help display help for command
648
-
649
- ```
650
-
651
-
652
637
  ### `cron` :
653
638
  ```
654
639
  Usage: underpost cron [options] [deploy-list] [job-list]
@@ -660,9 +645,7 @@ Arguments:
660
645
  deploy-list A comma-separated list of deployment IDs (e.g.,
661
646
  "default-a,default-b").
662
647
  job-list A comma-separated list of job IDs. Options:
663
- callback, initCronJobs, updatePackageScripts,
664
- getRelatedDeployIdList. Defaults to all available
665
- jobs.
648
+ dns,backup. Defaults to all available jobs.
666
649
 
667
650
  Options:
668
651
  --init-pm2-cronjobs Initializes PM2 cron jobs from configuration for
@@ -730,25 +713,40 @@ Options:
730
713
  Manages health server monitoring for specified deployments.
731
714
 
732
715
  Arguments:
733
- deploy-id The deployment configuration ID to monitor.
734
- env Optional: The environment to monitor (e.g.,
735
- "development", "production"). Defaults to
736
- "development".
716
+ deploy-id The deployment configuration ID to
717
+ monitor.
718
+ env Optional: The environment to monitor
719
+ (e.g., "development", "production").
720
+ Defaults to "development".
737
721
 
738
722
  Options:
739
- --ms-interval <ms-interval> Sets a custom millisecond interval for
740
- monitoring checks.
741
- --now Executes the monitor script immediately.
742
- --single Disables recurrence, running the monitor script
743
- only once.
744
- --replicas <replicas> Sets a custom number of replicas for monitoring.
745
- Defaults to 1.
746
- --type <type> Sets a custom monitor type.
747
- --sync Synchronizes with current proxy deployments and
748
- traffic configurations.
749
- --namespace <namespace> Sets the Kubernetes namespace for the
750
- deployment. Defaults to "default".
751
- -h, --help display help for command
723
+ --ms-interval <ms-interval> Sets a custom millisecond interval for
724
+ monitoring checks.
725
+ --now Executes the monitor script immediately.
726
+ --single Disables recurrence, running the monitor
727
+ script only once.
728
+ --replicas <replicas> Sets a custom number of replicas for
729
+ monitoring. Defaults to 1.
730
+ --type <type> Sets a custom monitor type.
731
+ --sync Synchronizes with current proxy
732
+ deployments and traffic configurations.
733
+ --namespace <namespace> Sets the Kubernetes namespace for the
734
+ deployment. Defaults to "default".
735
+ --timeout-response <duration> Sets HTTPProxy per-route response timeout
736
+ (e.g., "5s").
737
+ --timeout-idle <duration> Sets HTTPProxy per-route idle timeout
738
+ (e.g., "10s", "infinity").
739
+ --retry-count <count> Sets HTTPProxy per-route retry count
740
+ (e.g., 3).
741
+ --retry-per-try-timeout <duration> Sets HTTPProxy retry per-try timeout
742
+ (e.g., "150ms").
743
+ --disable-private-conf-update Disables updates to private configuration
744
+ during execution.
745
+ --versions <deployment-versions> Specifies the deployment versions to
746
+ monitor. eg. "blue,green", "green"
747
+ --ready-deployment Run in ready deployment monitor mode.
748
+ --promote Promotes the deployment after monitoring.
749
+ -h, --help display help for command
752
750
 
753
751
  ```
754
752
 
@@ -802,7 +800,7 @@ Options:
802
800
  Runs specified scripts using various runners.
803
801
 
804
802
  Arguments:
805
- runner-id The runner ID to run. Options: dev-cluster, metadata, svc-ls, svc-rm, ssh-cluster-info, dev-hosts-expose, dev-hosts-restore, cluster-build, template-deploy, template-deploy-image, clean, pull, release-deploy, ssh-deploy, ide, sync, stop, ssh-deploy-stop, tz, cron, get-proxy, instance-promote, instance, ls-deployments, host-update, dd-container, ip-info, monitor, db-client, git-conf, promote, metrics, cluster, deploy, disk-clean, disk-usage, dev, service, 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.
803
+ 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,cron,get-proxy,instance-promote,instance,ls-deployments,host-update,dd-container,ip-info,monitor,db-client,git-conf,promote,metrics,cluster,deploy,disk-clean,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.
806
804
  path The input value, identifier, or path for the operation.
807
805
 
808
806
  Options:
@@ -855,6 +853,11 @@ Options:
855
853
  --hosts <hosts> Comma-separated list of hosts for the runner execution.
856
854
  --instance-id <instance-id> Sets instance id context for the runner execution.
857
855
  --pid <process-id> Sets process id context for the runner execution.
856
+ --timeout-response <duration> Sets HTTPProxy per-route response timeout (e.g., "1s", "300ms", "infinity").
857
+ --timeout-idle <duration> Sets HTTPProxy per-route idle timeout (e.g., "10s", "infinity").
858
+ --retry-count <count> Sets HTTPProxy per-route retry count (e.g., 3).
859
+ --retry-per-try-timeout <duration> Sets HTTPProxy retry per-try timeout (e.g., "150ms").
860
+ --disable-private-conf-update Disables updates to private configuration during execution.
858
861
  -h, --help display help for command
859
862
 
860
863
  ```
package/deployment.yaml CHANGED
@@ -18,13 +18,13 @@ spec:
18
18
  spec:
19
19
  containers:
20
20
  - name: dd-cyberia-development-blue
21
- image: localhost/rockylinux9-underpost:v2.98.3
21
+ image: localhost/rockylinux9-underpost:v2.99.1
22
22
 
23
23
  command:
24
24
  - /bin/sh
25
25
  - -c
26
26
  - >
27
- npm install -g npm@11.2.0 && npm install -g underpost && node bin secret underpost --create-from-file /etc/config/.env.development && node bin start --build --run dd-cyberia development
27
+ npm install -g npm@11.2.0 && npm install -g underpost && underpost secret underpost --create-from-file /etc/config/.env.development && underpost start --build --run --underpost-quickly-install dd-cyberia development
28
28
 
29
29
 
30
30
  volumeMounts:
@@ -156,13 +156,13 @@ spec:
156
156
  spec:
157
157
  containers:
158
158
  - name: dd-cyberia-development-green
159
- image: localhost/rockylinux9-underpost:v2.98.3
159
+ image: localhost/rockylinux9-underpost:v2.99.1
160
160
 
161
161
  command:
162
162
  - /bin/sh
163
163
  - -c
164
164
  - >
165
- npm install -g npm@11.2.0 && npm install -g underpost && node bin secret underpost --create-from-file /etc/config/.env.development && node bin start --build --run dd-cyberia development
165
+ npm install -g npm@11.2.0 && npm install -g underpost && underpost secret underpost --create-from-file /etc/config/.env.development && underpost start --build --run --underpost-quickly-install dd-cyberia development
166
166
 
167
167
 
168
168
  volumeMounts:
@@ -17,7 +17,7 @@ spec:
17
17
  spec:
18
18
  containers:
19
19
  - name: dd-default-development-blue
20
- image: localhost/rockylinux9-underpost:v2.98.3
20
+ image: localhost/rockylinux9-underpost:v2.99.1
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:v2.98.3
103
+ image: localhost/rockylinux9-underpost:v2.99.1
104
104
  # resources:
105
105
  # requests:
106
106
  # memory: "124Ki"
@@ -18,13 +18,13 @@ spec:
18
18
  spec:
19
19
  containers:
20
20
  - name: dd-test-development-blue
21
- image: localhost/rockylinux9-underpost:v2.98.3
21
+ image: localhost/rockylinux9-underpost:v2.99.1
22
22
 
23
23
  command:
24
24
  - /bin/sh
25
25
  - -c
26
26
  - >
27
- npm install -g npm@11.2.0 && npm install -g underpost && node bin secret underpost --create-from-file /etc/config/.env.development && node bin start --build --run dd-test development
27
+ npm install -g npm@11.2.0 && npm install -g underpost && underpost secret underpost --create-from-file /etc/config/.env.development && underpost start --build --run --underpost-quickly-install dd-test development
28
28
 
29
29
 
30
30
  volumeMounts:
@@ -103,13 +103,13 @@ spec:
103
103
  spec:
104
104
  containers:
105
105
  - name: dd-test-development-green
106
- image: localhost/rockylinux9-underpost:v2.98.3
106
+ image: localhost/rockylinux9-underpost:v2.99.1
107
107
 
108
108
  command:
109
109
  - /bin/sh
110
110
  - -c
111
111
  - >
112
- npm install -g npm@11.2.0 && npm install -g underpost && node bin secret underpost --create-from-file /etc/config/.env.development && node bin start --build --run dd-test development
112
+ npm install -g npm@11.2.0 && npm install -g underpost && underpost secret underpost --create-from-file /etc/config/.env.development && underpost start --build --run --underpost-quickly-install dd-test development
113
113
 
114
114
 
115
115
  volumeMounts:
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "type": "module",
3
3
  "main": "src/index.js",
4
4
  "name": "cyberia",
5
- "version": "2.98.3",
5
+ "version": "2.99.1",
6
6
  "description": "Cyberia Engine - Object Layer and Assets Management Microservice",
7
7
  "scripts": {
8
8
  "start": "env-cmd -f .env.production node --max-old-space-size=8192 src/server",
@@ -12,7 +12,6 @@
12
12
  "dev": "env-cmd -f .env.development nodemon src/server",
13
13
  "dev-img": "env-cmd -f .env.development node src/server",
14
14
  "prod-img": "env-cmd -f .env.production node src/server",
15
- "monitor": "pm2 start src/monitor.js --name monitor -- dd production",
16
15
  "dev-api": "env-cmd -f .env.development nodemon --watch src --ignore src/client src/api",
17
16
  "dev-client": "env-cmd -f .env.development node src/client.dev",
18
17
  "dev-proxy": "env-cmd -f .env.development node src/proxy proxy",
@@ -4,6 +4,36 @@ import { AtlasSpriteSheetService } from './atlas-sprite-sheet.service.js';
4
4
  const logger = loggerFactory(import.meta);
5
5
 
6
6
  const AtlasSpriteSheetController = {
7
+ generate: async (req, res, options) => {
8
+ try {
9
+ const result = await AtlasSpriteSheetService.generate(req, res, options);
10
+ return res.status(200).json({
11
+ status: 'success',
12
+ data: result,
13
+ });
14
+ } catch (error) {
15
+ logger.error('AtlasSpriteSheetController.generate error:', error);
16
+ return res.status(500).json({
17
+ status: 'error',
18
+ message: error.message,
19
+ });
20
+ }
21
+ },
22
+ deleteByObjectLayerId: async (req, res, options) => {
23
+ try {
24
+ const result = await AtlasSpriteSheetService.deleteByObjectLayerId(req, res, options);
25
+ return res.status(200).json({
26
+ status: 'success',
27
+ data: result,
28
+ });
29
+ } catch (error) {
30
+ logger.error('AtlasSpriteSheetController.deleteByObjectLayerId error:', error);
31
+ return res.status(500).json({
32
+ status: 'error',
33
+ message: error.message,
34
+ });
35
+ }
36
+ },
7
37
  post: async (req, res, options) => {
8
38
  try {
9
39
  const result = await AtlasSpriteSheetService.post(req, res, options);
@@ -123,4 +123,18 @@ const AtlasSpriteSheetModel = model('AtlasSpriteSheet', AtlasSpriteSheetSchema);
123
123
 
124
124
  const ProviderSchema = AtlasSpriteSheetSchema;
125
125
 
126
- export { AtlasSpriteSheetSchema, AtlasSpriteSheetModel, ProviderSchema };
126
+ const AtlasSpriteSheetDto = {
127
+ select: {
128
+ get: () => {
129
+ return {
130
+ _id: 1,
131
+ fileId: 1,
132
+ metadata: 1,
133
+ createdAt: 1,
134
+ updatedAt: 1,
135
+ };
136
+ },
137
+ },
138
+ };
139
+
140
+ export { AtlasSpriteSheetSchema, AtlasSpriteSheetModel, ProviderSchema, AtlasSpriteSheetDto };
@@ -7,18 +7,28 @@ const logger = loggerFactory(import.meta);
7
7
  const AtlasSpriteSheetRouter = (options) => {
8
8
  const router = express.Router();
9
9
  const authMiddleware = options.authMiddleware;
10
- router.post(`/:id`, async (req, res) => await AtlasSpriteSheetController.post(req, res, options));
11
- router.post(`/`, async (req, res) => await AtlasSpriteSheetController.post(req, res, options));
10
+ router.post(
11
+ `/generate/:id`,
12
+ authMiddleware,
13
+ async (req, res) => await AtlasSpriteSheetController.generate(req, res, options),
14
+ );
15
+ router.delete(
16
+ `/object-layer/:id`,
17
+ authMiddleware,
18
+ async (req, res) => await AtlasSpriteSheetController.deleteByObjectLayerId(req, res, options),
19
+ );
20
+ router.post(`/:id`, authMiddleware, async (req, res) => await AtlasSpriteSheetController.post(req, res, options));
21
+ router.post(`/`, authMiddleware, async (req, res) => await AtlasSpriteSheetController.post(req, res, options));
12
22
  router.get(
13
23
  `/:id`,
14
24
  // authMiddleware,
15
25
  async (req, res) => await AtlasSpriteSheetController.get(req, res, options),
16
26
  );
17
27
  router.get(`/`, async (req, res) => await AtlasSpriteSheetController.get(req, res, options));
18
- router.put(`/:id`, async (req, res) => await AtlasSpriteSheetController.put(req, res, options));
19
- router.put(`/`, async (req, res) => await AtlasSpriteSheetController.put(req, res, options));
20
- router.delete(`/:id`, async (req, res) => await AtlasSpriteSheetController.delete(req, res, options));
21
- router.delete(`/`, async (req, res) => await AtlasSpriteSheetController.delete(req, res, options));
28
+ router.put(`/:id`, authMiddleware, async (req, res) => await AtlasSpriteSheetController.put(req, res, options));
29
+ router.put(`/`, authMiddleware, async (req, res) => await AtlasSpriteSheetController.put(req, res, options));
30
+ router.delete(`/:id`, authMiddleware, async (req, res) => await AtlasSpriteSheetController.delete(req, res, options));
31
+ router.delete(`/`, authMiddleware, async (req, res) => await AtlasSpriteSheetController.delete(req, res, options));
22
32
  return router;
23
33
  };
24
34