cyberia 3.0.3 → 3.1.3
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.production → .env.example} +20 -2
- package/.github/workflows/engine-cyberia.cd.yml +41 -10
- package/.github/workflows/engine-cyberia.ci.yml +53 -14
- package/.github/workflows/ghpkg.ci.yml +1 -1
- package/.github/workflows/gitlab.ci.yml +1 -1
- package/.github/workflows/hardhat.ci.yml +82 -0
- package/.github/workflows/npmpkg.ci.yml +37 -8
- package/.github/workflows/publish.ci.yml +5 -5
- package/.github/workflows/publish.cyberia.ci.yml +5 -5
- package/.github/workflows/pwa-microservices-template-page.cd.yml +3 -3
- package/.github/workflows/pwa-microservices-template-test.ci.yml +1 -1
- package/.github/workflows/release.cd.yml +3 -2
- package/.vscode/extensions.json +9 -8
- package/.vscode/settings.json +3 -2
- package/CHANGELOG.md +211 -1
- package/CLI-HELP.md +78 -53
- package/WHITE-PAPER.md +1540 -0
- package/bin/build.js +16 -10
- package/bin/cyberia.js +861 -4
- package/bin/deploy.js +103 -270
- package/bin/file.js +2 -1
- package/bin/index.js +861 -4
- package/bin/vs.js +3 -3
- package/conf.js +105 -97
- package/deployment.yaml +148 -4
- package/hardhat/.env.example +31 -0
- package/hardhat/README.md +531 -0
- package/hardhat/WHITE-PAPER.md +1540 -0
- package/hardhat/contracts/ObjectLayerToken.sol +391 -0
- package/hardhat/deployments/.gitkeep +0 -0
- package/hardhat/deployments/hardhat-ObjectLayerToken.json +11 -0
- package/hardhat/hardhat.config.js +136 -0
- package/hardhat/ignition/modules/ObjectLayerToken.js +21 -0
- package/hardhat/networks/besu-object-layer.network.json +138 -0
- package/hardhat/package-lock.json +7628 -0
- package/hardhat/package.json +45 -0
- package/hardhat/scripts/deployObjectLayerToken.js +98 -0
- package/hardhat/test/ObjectLayerToken.js +590 -0
- package/jsdoc.dd-cyberia.json +59 -0
- package/jsdoc.json +20 -13
- 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-cyberia-development/deployment.yaml +490 -0
- package/manifests/deployment/dd-cyberia-development/proxy.yaml +261 -0
- package/manifests/deployment/dd-cyberia-development/pv-pvc.yaml +132 -0
- package/manifests/deployment/dd-default-development/deployment.yaml +2 -2
- package/manifests/deployment/dd-test-development/deployment.yaml +52 -52
- package/manifests/deployment/dd-test-development/proxy.yaml +4 -4
- package/manifests/pv-pvc-dd.yaml +1 -1
- package/package.json +50 -44
- package/proxy.yaml +79 -7
- package/pv-pvc.yaml +132 -0
- package/scripts/k3s-node-setup.sh +1 -1
- package/scripts/ports-ls.sh +2 -0
- package/src/api/atlas-sprite-sheet/atlas-sprite-sheet.controller.js +3 -1
- package/src/api/atlas-sprite-sheet/atlas-sprite-sheet.model.js +1 -2
- package/src/api/document/document.service.js +1 -1
- package/src/api/file/file.controller.js +3 -1
- package/src/api/file/file.service.js +28 -5
- package/src/api/ipfs/ipfs.service.js +2 -2
- package/src/api/object-layer/object-layer.controller.js +6 -2
- package/src/api/object-layer/object-layer.model.js +12 -8
- package/src/api/object-layer/object-layer.router.js +668 -42
- package/src/api/object-layer/object-layer.service.js +6 -7
- package/src/api/object-layer-render-frames/object-layer-render-frames.model.js +1 -2
- package/src/api/user/user.router.js +10 -5
- package/src/api/user/user.service.js +7 -7
- package/src/cli/baremetal.js +6 -10
- package/src/cli/cloud-init.js +0 -3
- package/src/cli/db.js +54 -71
- package/src/cli/deploy.js +64 -12
- package/src/cli/env.js +5 -5
- package/src/cli/fs.js +0 -2
- package/src/cli/image.js +0 -3
- package/src/cli/index.js +35 -13
- package/src/cli/monitor.js +5 -6
- package/src/cli/repository.js +329 -46
- package/src/cli/run.js +180 -120
- package/src/cli/secrets.js +1 -3
- package/src/cli/ssh.js +1 -1
- package/src/client/Itemledger.index.js +1 -959
- package/src/client/components/core/AgGrid.js +20 -5
- package/src/client/components/core/Alert.js +2 -2
- package/src/client/components/core/Content.js +22 -3
- package/src/client/components/core/Docs.js +30 -6
- package/src/client/components/core/FileExplorer.js +71 -4
- package/src/client/components/core/Input.js +1 -1
- package/src/client/components/core/Modal.js +20 -6
- package/src/client/components/core/RichText.js +1 -2
- package/src/client/components/cyberia-portal/CommonCyberiaPortal.js +1 -0
- package/src/client/components/cyberia-portal/CssCyberiaPortal.js +44 -2
- package/src/client/components/cyberia-portal/LogInCyberiaPortal.js +0 -1
- package/src/client/components/cyberia-portal/MenuCyberiaPortal.js +64 -2
- package/src/client/components/cyberia-portal/RoutesCyberiaPortal.js +1 -0
- package/src/client/components/underpost/CssUnderpost.js +59 -0
- package/src/client/components/underpost/LogInUnderpost.js +3 -0
- package/src/client/components/underpost/LogOutUnderpost.js +2 -0
- package/src/client/components/underpost/MenuUnderpost.js +99 -13
- package/src/client/components/underpost/RoutesUnderpost.js +2 -0
- package/src/client/public/cryptokoyn/assets/logo/base-icon.png +0 -0
- package/src/client/public/cryptokoyn/browserconfig.xml +12 -0
- package/src/client/public/cryptokoyn/microdata.json +85 -0
- package/src/client/public/cryptokoyn/site.webmanifest +57 -0
- package/src/client/public/cryptokoyn/sitemap +3 -3
- package/src/client/public/default/sitemap +3 -3
- package/src/client/public/itemledger/browserconfig.xml +2 -2
- package/src/client/public/itemledger/manifest.webmanifest +4 -4
- package/src/client/public/itemledger/microdata.json +71 -0
- package/src/client/public/itemledger/sitemap +3 -3
- package/src/client/public/itemledger/yandex-browser-manifest.json +2 -2
- package/src/client/public/test/sitemap +3 -3
- package/src/client/ssr/body/404.js +15 -11
- package/src/client/ssr/body/500.js +15 -11
- package/src/client/ssr/body/SwaggerDarkMode.js +285 -0
- package/src/client/ssr/head/PwaItemledger.js +60 -0
- package/src/client/ssr/offline/NoNetworkConnection.js +11 -10
- package/src/client/ssr/pages/Test.js +11 -10
- package/src/client.build.js +0 -3
- package/src/client.dev.js +0 -3
- package/src/db/DataBaseProvider.js +17 -2
- package/src/db/mariadb/MariaDB.js +14 -9
- package/src/db/mongo/MongooseDB.js +17 -1
- package/src/index.js +1 -1
- package/src/proxy.js +0 -3
- package/src/runtime/express/Express.js +15 -9
- package/src/runtime/lampp/Lampp.js +6 -13
- package/src/server/auth.js +12 -14
- package/src/server/backup.js +2 -3
- package/src/server/besu-genesis-generator.js +1630 -0
- package/src/server/client-build-docs.js +126 -17
- package/src/server/client-build-live.js +9 -18
- package/src/server/client-build.js +203 -75
- package/src/server/client-dev-server.js +14 -13
- package/src/server/conf.js +376 -164
- package/src/server/cron.js +2 -1
- package/src/server/dns.js +28 -12
- package/src/server/downloader.js +0 -2
- package/src/server/logger.js +27 -9
- package/src/server/object-layer.js +79 -6
- package/src/server/peer.js +0 -2
- package/src/server/process.js +1 -50
- package/src/server/proxy.js +4 -8
- package/src/server/runtime.js +5 -8
- package/src/server/ssr.js +0 -3
- package/src/server/start.js +19 -12
- package/src/server/tls.js +0 -2
- package/src/server.js +0 -4
- package/.env.development +0 -43
- package/.env.test +0 -43
- package/hardhat/contracts/CryptoKoyn.sol +0 -59
- package/hardhat/contracts/ItemLedger.sol +0 -73
- package/hardhat/contracts/Lock.sol +0 -34
- package/hardhat/hardhat.config.cjs +0 -45
- package/hardhat/ignition/modules/Lock.js +0 -18
- package/hardhat/networks/cryptokoyn-itemledger.network.json +0 -29
- package/hardhat/scripts/deployCryptokoyn.cjs +0 -25
- package/hardhat/scripts/deployItemledger.cjs +0 -25
- package/hardhat/test/Lock.js +0 -126
- package/hardhat/white-paper.md +0 -581
- package/white-paper.md +0 -581
|
@@ -59,6 +59,10 @@ const buildApiDocs = async ({
|
|
|
59
59
|
name: 'user',
|
|
60
60
|
description: 'User API operations',
|
|
61
61
|
},
|
|
62
|
+
{
|
|
63
|
+
name: 'object-layer',
|
|
64
|
+
description: 'Object Layer API operations',
|
|
65
|
+
},
|
|
62
66
|
],
|
|
63
67
|
components: {
|
|
64
68
|
schemas: {
|
|
@@ -150,6 +154,70 @@ const buildApiDocs = async ({
|
|
|
150
154
|
},
|
|
151
155
|
},
|
|
152
156
|
},
|
|
157
|
+
objectLayerResponse: {
|
|
158
|
+
type: 'object',
|
|
159
|
+
properties: {
|
|
160
|
+
status: { type: 'string', example: 'success' },
|
|
161
|
+
data: {
|
|
162
|
+
type: 'object',
|
|
163
|
+
properties: {
|
|
164
|
+
_id: { type: 'string', example: '66c377f57f99e5969b81de89' },
|
|
165
|
+
data: {
|
|
166
|
+
type: 'object',
|
|
167
|
+
properties: {
|
|
168
|
+
stats: {
|
|
169
|
+
type: 'object',
|
|
170
|
+
properties: {
|
|
171
|
+
effect: { type: 'number', example: 0 },
|
|
172
|
+
resistance: { type: 'number', example: 0 },
|
|
173
|
+
agility: { type: 'number', example: 0 },
|
|
174
|
+
range: { type: 'number', example: 0 },
|
|
175
|
+
intelligence: { type: 'number', example: 0 },
|
|
176
|
+
utility: { type: 'number', example: 0 },
|
|
177
|
+
},
|
|
178
|
+
},
|
|
179
|
+
item: {
|
|
180
|
+
type: 'object',
|
|
181
|
+
properties: {
|
|
182
|
+
id: { type: 'string', example: 'skin-default' },
|
|
183
|
+
type: { type: 'string', example: 'skin' },
|
|
184
|
+
description: { type: 'string', example: 'Default skin layer' },
|
|
185
|
+
activable: { type: 'boolean', example: false },
|
|
186
|
+
},
|
|
187
|
+
},
|
|
188
|
+
ledger: {
|
|
189
|
+
type: 'object',
|
|
190
|
+
properties: {
|
|
191
|
+
type: { type: 'string', example: 'semi-fungible' },
|
|
192
|
+
address: { type: 'string', example: '0x0000000000000000000000000000000000000000' },
|
|
193
|
+
tokenId: { type: 'string', example: '' },
|
|
194
|
+
},
|
|
195
|
+
},
|
|
196
|
+
render: {
|
|
197
|
+
type: 'object',
|
|
198
|
+
properties: {
|
|
199
|
+
cid: { type: 'string', example: '' },
|
|
200
|
+
metadataCid: { type: 'string', example: '' },
|
|
201
|
+
},
|
|
202
|
+
},
|
|
203
|
+
},
|
|
204
|
+
},
|
|
205
|
+
cid: { type: 'string', example: '' },
|
|
206
|
+
sha256: { type: 'string', example: 'abc123def456...' },
|
|
207
|
+
},
|
|
208
|
+
},
|
|
209
|
+
},
|
|
210
|
+
},
|
|
211
|
+
objectLayerBadRequestResponse: {
|
|
212
|
+
type: 'object',
|
|
213
|
+
properties: {
|
|
214
|
+
status: { type: 'string', example: 'error' },
|
|
215
|
+
message: {
|
|
216
|
+
type: 'string',
|
|
217
|
+
example: 'Bad request. Please check your inputs, and try again',
|
|
218
|
+
},
|
|
219
|
+
},
|
|
220
|
+
},
|
|
153
221
|
securitySchemes: {
|
|
154
222
|
bearerAuth: {
|
|
155
223
|
type: 'http',
|
|
@@ -221,7 +289,7 @@ const buildApiDocs = async ({
|
|
|
221
289
|
const outputFile = `./public/${host}${path === '/' ? path : `${path}/`}swagger-output.json`;
|
|
222
290
|
const routes = [];
|
|
223
291
|
for (const api of apis) {
|
|
224
|
-
if (['user'].includes(api)) routes.push(`./src/api/${api}/${api}.router.js`);
|
|
292
|
+
if (['user', 'object-layer'].includes(api)) routes.push(`./src/api/${api}/${api}.router.js`);
|
|
225
293
|
}
|
|
226
294
|
|
|
227
295
|
await swaggerAutoGen({ openapi: '3.0.0' })(outputFile, routes, doc);
|
|
@@ -264,17 +332,38 @@ const buildApiDocs = async ({
|
|
|
264
332
|
* @param {string} options.path - The base path for the documentation
|
|
265
333
|
* @param {Object} options.metadata - Metadata for the documentation
|
|
266
334
|
* @param {string} options.publicClientId - Client ID used to resolve the tutorials/references directory
|
|
335
|
+
* @param {Object} options.docs - Documentation config from server conf
|
|
336
|
+
* @param {string} options.docs.jsJsonPath - Path to the JSDoc JSON config file
|
|
267
337
|
*/
|
|
268
|
-
const buildJsDocs = async ({ host, path, metadata = {}, publicClientId }) => {
|
|
338
|
+
const buildJsDocs = async ({ host, path, metadata = {}, publicClientId, docs }) => {
|
|
269
339
|
const logger = loggerFactory(import.meta);
|
|
270
|
-
|
|
340
|
+
|
|
341
|
+
const jsDocSourcePath = docs.jsJsonPath;
|
|
342
|
+
if (!fs.existsSync(jsDocSourcePath)) {
|
|
343
|
+
logger.warn('jsdoc config not found, skipping', jsDocSourcePath);
|
|
344
|
+
return;
|
|
345
|
+
}
|
|
346
|
+
const jsDocsConfig = JSON.parse(fs.readFileSync(jsDocSourcePath, 'utf8'));
|
|
347
|
+
logger.info('using jsdoc config', jsDocSourcePath);
|
|
271
348
|
|
|
272
349
|
jsDocsConfig.opts.destination = `./public/${host}${path === '/' ? path : `${path}/`}docs/`;
|
|
273
350
|
jsDocsConfig.opts.theme_opts.title = metadata?.title ? metadata.title : undefined;
|
|
274
351
|
jsDocsConfig.opts.theme_opts.favicon = `./public/${host}${path === '/' ? '/' : `${path}/`}favicon.ico`;
|
|
275
352
|
|
|
276
353
|
const tutorialsPath = `./src/client/public/${publicClientId}/docs/references`;
|
|
277
|
-
|
|
354
|
+
|
|
355
|
+
if (Array.isArray(docs.references) && docs.references.length > 0) {
|
|
356
|
+
fs.mkdirSync(tutorialsPath, { recursive: true });
|
|
357
|
+
for (const refPath of docs.references) {
|
|
358
|
+
if (fs.existsSync(refPath)) {
|
|
359
|
+
const fileName = refPath.split('/').pop();
|
|
360
|
+
fs.copySync(refPath, `${tutorialsPath}/${fileName}`);
|
|
361
|
+
logger.info('copied reference to tutorials', refPath);
|
|
362
|
+
}
|
|
363
|
+
}
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
if (fs.existsSync(tutorialsPath) && fs.readdirSync(tutorialsPath).length > 0) {
|
|
278
367
|
jsDocsConfig.opts.tutorials = tutorialsPath;
|
|
279
368
|
if (jsDocsConfig.opts.theme_opts.sections && !jsDocsConfig.opts.theme_opts.sections.includes('Tutorials')) {
|
|
280
369
|
jsDocsConfig.opts.theme_opts.sections.push('Tutorials');
|
|
@@ -284,10 +373,10 @@ const buildJsDocs = async ({ host, path, metadata = {}, publicClientId }) => {
|
|
|
284
373
|
delete jsDocsConfig.opts.tutorials;
|
|
285
374
|
}
|
|
286
375
|
|
|
287
|
-
fs.writeFileSync(
|
|
376
|
+
fs.writeFileSync(jsDocSourcePath, JSON.stringify(jsDocsConfig, null, 4), 'utf8');
|
|
288
377
|
logger.warn('build jsdoc view', jsDocsConfig.opts.destination);
|
|
289
378
|
|
|
290
|
-
shellExec(`
|
|
379
|
+
shellExec(`npx jsdoc -c ${jsDocSourcePath}`, { silent: true });
|
|
291
380
|
};
|
|
292
381
|
|
|
293
382
|
/**
|
|
@@ -297,20 +386,38 @@ const buildJsDocs = async ({ host, path, metadata = {}, publicClientId }) => {
|
|
|
297
386
|
* @param {Object} options - Coverage build options
|
|
298
387
|
* @param {string} options.host - The hostname for the coverage
|
|
299
388
|
* @param {string} options.path - The base path for the coverage
|
|
389
|
+
* @param {Object} options.docs - Documentation config from server conf
|
|
390
|
+
* @param {string} options.docs.coveragePath - Directory where to run npm run coverage
|
|
300
391
|
*/
|
|
301
|
-
const buildCoverage = async ({ host, path }) => {
|
|
392
|
+
const buildCoverage = async ({ host, path, docs }) => {
|
|
302
393
|
const logger = loggerFactory(import.meta);
|
|
303
|
-
const
|
|
394
|
+
const jsDocSourcePath = docs.jsJsonPath;
|
|
395
|
+
const jsDocsConfig = JSON.parse(fs.readFileSync(jsDocSourcePath, 'utf8'));
|
|
396
|
+
const coveragePath = docs.coveragePath;
|
|
304
397
|
|
|
305
|
-
|
|
306
|
-
|
|
398
|
+
const coverageOutputPath = `${coveragePath}/coverage`;
|
|
399
|
+
if (!fs.existsSync(coverageOutputPath)) {
|
|
400
|
+
const pkgPath = `${coveragePath}/package.json`;
|
|
401
|
+
if (fs.existsSync(pkgPath)) {
|
|
402
|
+
const pkg = JSON.parse(fs.readFileSync(pkgPath, 'utf8'));
|
|
403
|
+
if (pkg.scripts && pkg.scripts.coverage) {
|
|
404
|
+
logger.info('generating coverage report', coveragePath);
|
|
405
|
+
shellExec(`cd ${coveragePath} && npm run coverage`, { silent: true });
|
|
406
|
+
} else if (pkg.scripts && pkg.scripts.test) {
|
|
407
|
+
logger.info('generating coverage via test', coveragePath);
|
|
408
|
+
shellExec(`cd ${coveragePath} && npm test`, { silent: true });
|
|
409
|
+
}
|
|
410
|
+
}
|
|
307
411
|
}
|
|
308
412
|
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
413
|
+
if (fs.existsSync(coverageOutputPath) && fs.readdirSync(coverageOutputPath).length > 0) {
|
|
414
|
+
const coverageBuildPath = `${jsDocsConfig.opts.destination}coverage`;
|
|
415
|
+
fs.mkdirSync(coverageBuildPath, { recursive: true });
|
|
416
|
+
fs.copySync(coverageOutputPath, coverageBuildPath);
|
|
417
|
+
logger.warn('build coverage', coverageBuildPath);
|
|
418
|
+
} else {
|
|
419
|
+
logger.warn('no coverage output found, skipping', coverageOutputPath);
|
|
420
|
+
}
|
|
314
421
|
};
|
|
315
422
|
|
|
316
423
|
/**
|
|
@@ -326,6 +433,7 @@ const buildCoverage = async ({ host, path }) => {
|
|
|
326
433
|
* @param {string} options.publicClientId - Client ID for the public documentation
|
|
327
434
|
* @param {string} options.rootClientPath - Root path for client files
|
|
328
435
|
* @param {Object} options.packageData - Package.json data
|
|
436
|
+
* @param {Object} options.docs - Documentation config from server conf
|
|
329
437
|
*/
|
|
330
438
|
const buildDocs = async ({
|
|
331
439
|
host,
|
|
@@ -336,9 +444,10 @@ const buildDocs = async ({
|
|
|
336
444
|
publicClientId,
|
|
337
445
|
rootClientPath,
|
|
338
446
|
packageData,
|
|
447
|
+
docs,
|
|
339
448
|
}) => {
|
|
340
|
-
await buildJsDocs({ host, path, metadata, publicClientId });
|
|
341
|
-
await buildCoverage({ host, path });
|
|
449
|
+
await buildJsDocs({ host, path, metadata, publicClientId, docs });
|
|
450
|
+
await buildCoverage({ host, path, docs });
|
|
342
451
|
await buildApiDocs({
|
|
343
452
|
host,
|
|
344
453
|
path,
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
import fs from 'fs-extra';
|
|
8
|
-
import { Config, loadConf } from './conf.js';
|
|
8
|
+
import { Config, loadConf, readConfJson } from './conf.js';
|
|
9
9
|
import { loggerFactory } from './logger.js';
|
|
10
10
|
import { buildClient } from './client-build.js';
|
|
11
11
|
|
|
@@ -17,14 +17,14 @@ const logger = loggerFactory(import.meta);
|
|
|
17
17
|
* @memberof clientLiveBuild
|
|
18
18
|
*/
|
|
19
19
|
const clientLiveBuild = async () => {
|
|
20
|
-
if (fs.existsSync(
|
|
20
|
+
if (fs.existsSync(`/tmp/client.build.json`)) {
|
|
21
21
|
const deployId = process.argv[2];
|
|
22
22
|
const subConf = process.argv[3];
|
|
23
23
|
let clientId = 'default';
|
|
24
24
|
let host = 'default.net';
|
|
25
25
|
let path = '/';
|
|
26
26
|
let baseHost = `${host}${path === '/' ? '' : path}`;
|
|
27
|
-
let views
|
|
27
|
+
let views;
|
|
28
28
|
let apiBaseHost;
|
|
29
29
|
let apiBaseProxyPath;
|
|
30
30
|
|
|
@@ -33,19 +33,8 @@ const clientLiveBuild = async () => {
|
|
|
33
33
|
(fs.existsSync(`./engine-private/conf/${deployId}`) || fs.existsSync(`./engine-private/replica/${deployId}`))
|
|
34
34
|
) {
|
|
35
35
|
loadConf(deployId, subConf);
|
|
36
|
-
const confClient =
|
|
37
|
-
|
|
38
|
-
fs.existsSync(`./engine-private/replica/${deployId}`)
|
|
39
|
-
? `./engine-private/replica/${deployId}/conf.client.json`
|
|
40
|
-
: fs.existsSync(`./engine-private/conf/${deployId}/conf.client.json`)
|
|
41
|
-
? `./engine-private/conf/${deployId}/conf.client.json`
|
|
42
|
-
: `./conf/conf.client.json`,
|
|
43
|
-
'utf8',
|
|
44
|
-
),
|
|
45
|
-
);
|
|
46
|
-
const confServer = JSON.parse(
|
|
47
|
-
fs.readFileSync(`./engine-private/conf/${deployId}/conf.server.dev.${subConf}.json`, 'utf8'),
|
|
48
|
-
);
|
|
36
|
+
const confClient = readConfJson(deployId, 'client');
|
|
37
|
+
const confServer = readConfJson(deployId, 'server');
|
|
49
38
|
host = process.argv[4];
|
|
50
39
|
path = process.argv[5];
|
|
51
40
|
clientId = confServer[host][path].client;
|
|
@@ -53,6 +42,8 @@ const clientLiveBuild = async () => {
|
|
|
53
42
|
baseHost = `${host}${path === '/' ? '' : path}`;
|
|
54
43
|
apiBaseHost = confServer[host][path].apiBaseHost;
|
|
55
44
|
apiBaseProxyPath = confServer[host][path].apiBaseProxyPath;
|
|
45
|
+
} else {
|
|
46
|
+
views = Config.default.client[clientId].views;
|
|
56
47
|
}
|
|
57
48
|
|
|
58
49
|
logger.info('Live build config', {
|
|
@@ -67,7 +58,7 @@ const clientLiveBuild = async () => {
|
|
|
67
58
|
apiBaseProxyPath,
|
|
68
59
|
});
|
|
69
60
|
|
|
70
|
-
const updates = JSON.parse(fs.readFileSync(
|
|
61
|
+
const updates = JSON.parse(fs.readFileSync(`/tmp/client.build.json`, 'utf8'));
|
|
71
62
|
const liveClientBuildPaths = [];
|
|
72
63
|
for (let srcPath of updates) {
|
|
73
64
|
srcPath = srcPath.replaceAll('/', `\\`);
|
|
@@ -102,7 +93,7 @@ const clientLiveBuild = async () => {
|
|
|
102
93
|
}
|
|
103
94
|
logger.info('liveClientBuildPaths', liveClientBuildPaths);
|
|
104
95
|
await buildClient({ liveClientBuildPaths, instances: [{ host, path }] });
|
|
105
|
-
fs.removeSync(
|
|
96
|
+
fs.removeSync(`/tmp/client.build.json`);
|
|
106
97
|
}
|
|
107
98
|
};
|
|
108
99
|
|