odant-work 1.0.68 → 1.0.69
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.
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"packageName": "odant-work",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.69",
|
|
4
4
|
"createdAt": 1795100682741,
|
|
5
|
-
"updatedAt":
|
|
5
|
+
"updatedAt": 1795531799936,
|
|
6
6
|
"files": {
|
|
7
7
|
"run.mjs": "f8918c612e8641e9beee06221be6680aa6fd21f25468451f2ac857fd51772266",
|
|
8
|
-
"package.json": "
|
|
9
|
-
"package-lock.json": "
|
|
8
|
+
"package.json": "f8cc866fdf19cc60af10f67331d4f64d5781933bdbca4fa576e6b7e41d338e91",
|
|
9
|
+
"package-lock.json": "974c12e461c03b97c923460cec355b3b7dac2ba4a80b9fdbda140df7b1855964",
|
|
10
10
|
"sources/client/class.js": "c3fb8f143fc83aaa2df1ddeddd412d2d4dfe88656578095babe2df34fb3b3922",
|
|
11
11
|
"sources/client/field.js": "ffdd50fa8b6ec515cc42da5fca96658ff2b20e274601a1f926e0031372467a19",
|
|
12
12
|
"sources/client/file.js": "667101d75fa30840370d5be232e518aaac7c1fd52ca05a12da560eef6c0848b0",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"sources/data/time.js": "cb34c1137685e83265938bb007859dfc1fca3548588d1663ee01e1affc87a09a",
|
|
37
37
|
"sources/data/workspace.js": "afbc007c16a26e86de2753794e0e7387218e97aba378047a5f37ea7961e3e921",
|
|
38
38
|
"sources/host/auth-methods.js": "d3373f072a0b31f1c689beffba144c334c848cb4a0a0a3a74f6146ff8e1292d0",
|
|
39
|
-
"sources/host/auto-updater.js": "
|
|
39
|
+
"sources/host/auto-updater.js": "fbab9f06c508e079a8c055a1ca7a9fd61bba22ba396f5f85204883cbe19b79e9",
|
|
40
40
|
"sources/host/babel-merge.js": "11d5b65cae03aeabd09f06f65bee78f6fd0131eab125cc87c0dcaaf2d10e08a5",
|
|
41
41
|
"sources/host/config.js": "f41058d2ef46afc0ac5e262a0f31064d3288ab3794c4d45c0761498e775f60ae",
|
|
42
42
|
"sources/host/email-utils.js": "618f474b92c85675aeeb7584c1ef7d73441b9efc1463b9b836e7facb86e5d558",
|
|
@@ -777,7 +777,7 @@
|
|
|
777
777
|
"$server/$folder/handlers/methods/help/$handler/class.js": "ff54bf976cbdc846d7c1b46ff12b111e99a3f4831240a4e420b73c98c0355a5c",
|
|
778
778
|
"$server/$folder/handlers/methods/info/$handler/class.js": "8752efb28abdcfad4e8ce56cfebcd8bb09ec0735cba7b84156d248bfcb0f9db0",
|
|
779
779
|
"$server/$folder/handlers/pages/form/$handler/class.js": "3902d3e1a8742afa2625410f97c68a3afac2559bd3d8f37044338edf7386d4df",
|
|
780
|
-
"$server/$folder/handlers/pages/form/$handler/form.js": "
|
|
780
|
+
"$server/$folder/handlers/pages/form/$handler/form.js": "8f179f5828e0ccbed6ce7f32500638d51cb04e11c9ac02d817117486b6ad92a2",
|
|
781
781
|
"$server/$folder/handlers/readme.md": "1167594c32f46323d229098a72e80a9865005c347373fdacef5af69838a0f8eb",
|
|
782
782
|
"$server/$folder/lib/calendar-form/calendar-form.js": "3035cab0a489c891d7dd7ed52ae5c475068b97361a1f7c855d500a0823614d1c",
|
|
783
783
|
"$server/$folder/lib/chat-item/chat-item.js": "6af09b84e5ef31c7e22007ba763bccf874d642afeff359414400ec36d4d5c560",
|
|
@@ -184,8 +184,7 @@ ODA({is: 'work-form',
|
|
|
184
184
|
<div :flex="ODA.states?.mobileMode"></div>
|
|
185
185
|
<item-node-explorer no-flex :$item="rootItem"></item-node-explorer>
|
|
186
186
|
<div flex></div>
|
|
187
|
-
<oda-button ~if="
|
|
188
|
-
<oda-button id="consultantBtn" shadow icon="bootstrap:robot" @tap="askConsultant" title="Спросить ИИ-консультанта по текущей форме" :icon-size info-invert style="border-radius: 50%; margin-right: 8px; flex-shrink: 0;"></oda-button>
|
|
187
|
+
<oda-button ~if="showConsultantBtn" id="consultantBtn" shadow icon="bootstrap:robot" @tap="askConsultant" title="Спросить ИИ-консультанта по текущей форме" :icon-size info-invert style="border-radius: 50%; margin-right: 8px; flex-shrink: 0;"></oda-button>
|
|
189
188
|
<oda-button shadow icon="communication:call" @tap="call" title="Call..." :icon-size success style="border-radius: 50%;margin-right:32px;"></oda-button>
|
|
190
189
|
<slot name="top-panel"></slot>
|
|
191
190
|
<div class="view-selector" no-flex horizontal style="justify-content: space-between; overflow: hidden;">
|
|
@@ -907,16 +906,9 @@ ODA({is: 'work-form',
|
|
|
907
906
|
_syncingClassTreeFocus: false,
|
|
908
907
|
view_control: null,
|
|
909
908
|
_noClassTreeFlag: false,
|
|
910
|
-
get
|
|
909
|
+
get showConsultantBtn() {
|
|
911
910
|
const t = this.currentItem?.type;
|
|
912
|
-
return t
|
|
913
|
-
},
|
|
914
|
-
openDataPage() {
|
|
915
|
-
const target = this.currentItem;
|
|
916
|
-
if (!target)
|
|
917
|
-
return;
|
|
918
|
-
const short = target.short || target.path || '';
|
|
919
|
-
window.open(encodeURI(`${short}/~/handlers/pages/data/index.html`), '_blank');
|
|
911
|
+
return Boolean(t) && !['$server', '$base', '$project', '$structure', '$user'].includes(t);
|
|
920
912
|
},
|
|
921
913
|
get hasClassTree() {
|
|
922
914
|
if (this._noClassTreeFlag)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "odant-work",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.69",
|
|
4
4
|
"description": "ODANT-WORK — платформа цифровой организации (встроенная система учёта, документооборот, управление процессами и приватный мультимодальный ИИ)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "sources/work.js",
|
|
@@ -430,6 +430,46 @@ export function extractTgzBufferToDir(tgzBuffer, targetDir) {
|
|
|
430
430
|
}
|
|
431
431
|
}
|
|
432
432
|
|
|
433
|
+
const LEGACY_REMOVED_SYSTEM_PATHS = [
|
|
434
|
+
'$server/$folder/$class/handlers/pages/form/builder',
|
|
435
|
+
'$server/$folder/$class/$structure/handlers/pages/form/data',
|
|
436
|
+
'$server/$folder/$class/$structure/handlers/pages/form/database',
|
|
437
|
+
'$server/$folder/$class/$structure/handlers/pages/form/gantt',
|
|
438
|
+
'$server/$folder/$class/$structure/handlers/pages/form/messengers',
|
|
439
|
+
'$server/$folder/$class/$structure/handlers/pages/form/scheduler',
|
|
440
|
+
'$server/$folder/$class/$structure/handlers/pages/form/search',
|
|
441
|
+
'$server/$folder/$class/$structure/handlers/pages/form/staff',
|
|
442
|
+
'$server/$folder/$class/$structure/$server/handlers/pages/form/license',
|
|
443
|
+
'$server/$folder/$class/$structure/$base/handlers/methods/archive',
|
|
444
|
+
'$server/$folder/$class/$structure/$project/handlers/methods/archive',
|
|
445
|
+
'$server/$folder/$class/$structure/$server/handlers/methods/npm',
|
|
446
|
+
'ORGANIZATIONS/$domain/handlers/methods/restore',
|
|
447
|
+
'PROJECTS/$domain/handlers/methods/restore',
|
|
448
|
+
];
|
|
449
|
+
|
|
450
|
+
function pruneEmptyParents(targetPath, absRoot) {
|
|
451
|
+
let cur = path.dirname(targetPath);
|
|
452
|
+
const rootWithSep = absRoot.endsWith(path.sep) ? absRoot : absRoot + path.sep;
|
|
453
|
+
while (cur !== absRoot && cur.startsWith(rootWithSep)) {
|
|
454
|
+
try {
|
|
455
|
+
if (!fs.existsSync(cur)) {
|
|
456
|
+
cur = path.dirname(cur);
|
|
457
|
+
continue;
|
|
458
|
+
}
|
|
459
|
+
if (fs.readdirSync(cur).length === 0) {
|
|
460
|
+
fs.rmdirSync(cur);
|
|
461
|
+
cur = path.dirname(cur);
|
|
462
|
+
}
|
|
463
|
+
else {
|
|
464
|
+
break;
|
|
465
|
+
}
|
|
466
|
+
}
|
|
467
|
+
catch {
|
|
468
|
+
break;
|
|
469
|
+
}
|
|
470
|
+
}
|
|
471
|
+
}
|
|
472
|
+
|
|
433
473
|
/**
|
|
434
474
|
* Применить новую версию пакета из распакованной директории `sourceDir` к рабочей директории `rootDir`,
|
|
435
475
|
* гарантируя полное сохранение пользовательских баз, настроек, файлов и изменённых пользователем классов.
|
|
@@ -455,13 +495,18 @@ export function applyUpdateFromDirectory({
|
|
|
455
495
|
updatedCore: [],
|
|
456
496
|
updatedClean: [],
|
|
457
497
|
added: [],
|
|
498
|
+
removedObsolete: [],
|
|
499
|
+
removedLegacy: [],
|
|
458
500
|
preservedUserModified: [],
|
|
459
501
|
skippedProtected: [],
|
|
460
502
|
dependenciesChanged: false,
|
|
461
503
|
};
|
|
462
504
|
|
|
463
|
-
const newManifestFiles = {
|
|
505
|
+
const newManifestFiles = {};
|
|
506
|
+
const seenInSource = new Set();
|
|
507
|
+
const seenInSourceLower = new Set();
|
|
464
508
|
const upstreamBackupRoot = path.join(absRoot, '#system', 'updates', `upstream-${targetVersion}`);
|
|
509
|
+
const removedBackupRoot = path.join(absRoot, '#system', 'updates', `removed-${targetVersion}`);
|
|
465
510
|
|
|
466
511
|
// Проверим, изменились ли dependencies в package.json
|
|
467
512
|
let oldPkg = null;
|
|
@@ -498,6 +543,9 @@ export function applyUpdateFromDirectory({
|
|
|
498
543
|
if (!stat.isFile())
|
|
499
544
|
continue;
|
|
500
545
|
|
|
546
|
+
seenInSource.add(rel);
|
|
547
|
+
seenInSourceLower.add(rel.toLowerCase());
|
|
548
|
+
|
|
501
549
|
const dstFile = path.join(absRoot, rel);
|
|
502
550
|
let newBuf = fs.readFileSync(srcFile);
|
|
503
551
|
if (rel === 'package.json' && isHostWrapperPkg && newPkg) {
|
|
@@ -583,6 +631,66 @@ export function applyUpdateFromDirectory({
|
|
|
583
631
|
|
|
584
632
|
walkSource(absSource);
|
|
585
633
|
|
|
634
|
+
// Удаляем устаревшие файлы прошлой поставки, исчезнувшие из нового релиза
|
|
635
|
+
// (только если файл не защищён и не был изменён пользователем, либо относится к системному ядру)
|
|
636
|
+
for (const [rawOldRel, oldHash] of Object.entries(oldManifest.files || {})) {
|
|
637
|
+
const rel = normalizeRelPath(rawOldRel);
|
|
638
|
+
if (!rel)
|
|
639
|
+
continue;
|
|
640
|
+
const stillInSource = seenInSource.has(rel)
|
|
641
|
+
|| (process.platform === 'win32' && seenInSourceLower.has(rel.toLowerCase()));
|
|
642
|
+
if (stillInSource || isProtectedUserPath(rel))
|
|
643
|
+
continue;
|
|
644
|
+
const dstFile = path.join(absRoot, rel);
|
|
645
|
+
if (!fs.existsSync(dstFile))
|
|
646
|
+
continue;
|
|
647
|
+
try {
|
|
648
|
+
const stat = fs.statSync(dstFile);
|
|
649
|
+
if (!stat.isFile())
|
|
650
|
+
continue;
|
|
651
|
+
const diskHash = sha256File(dstFile);
|
|
652
|
+
if (isCoreEnginePath(rel) || (oldHash && diskHash === oldHash)) {
|
|
653
|
+
fs.rmSync(dstFile, { force: true });
|
|
654
|
+
pruneEmptyParents(dstFile, absRoot);
|
|
655
|
+
report.removedObsolete.push(rel);
|
|
656
|
+
}
|
|
657
|
+
else {
|
|
658
|
+
// Пользователь менял удалённый из поставки файл — сохраняем на диске и в манифесте
|
|
659
|
+
if (oldHash)
|
|
660
|
+
newManifestFiles[rel] = oldHash;
|
|
661
|
+
report.preservedUserModified.push(rel);
|
|
662
|
+
}
|
|
663
|
+
}
|
|
664
|
+
catch { /* ignore */ }
|
|
665
|
+
}
|
|
666
|
+
|
|
667
|
+
// Разовая зачистка известных упразднённых системных папок (для серверов, обновившихся до появления удаления устаревших файлов)
|
|
668
|
+
for (const legacyRel of LEGACY_REMOVED_SYSTEM_PATHS) {
|
|
669
|
+
const rel = normalizeRelPath(legacyRel);
|
|
670
|
+
if (!rel || isProtectedUserPath(rel))
|
|
671
|
+
continue;
|
|
672
|
+
const legacyAbs = path.join(absRoot, rel);
|
|
673
|
+
const inSourceAbs = path.join(absSource, rel);
|
|
674
|
+
if (!fs.existsSync(legacyAbs) || fs.existsSync(inSourceAbs))
|
|
675
|
+
continue;
|
|
676
|
+
try {
|
|
677
|
+
const backupAbs = path.join(removedBackupRoot, rel);
|
|
678
|
+
fs.mkdirSync(path.dirname(backupAbs), { recursive: true });
|
|
679
|
+
fs.cpSync(legacyAbs, backupAbs, { recursive: true });
|
|
680
|
+
fs.rmSync(legacyAbs, { recursive: true, force: true });
|
|
681
|
+
pruneEmptyParents(legacyAbs, absRoot);
|
|
682
|
+
report.removedLegacy.push(rel);
|
|
683
|
+
const relLow = rel.toLowerCase();
|
|
684
|
+
const prefix = relLow + '/';
|
|
685
|
+
for (const k of Object.keys(newManifestFiles)) {
|
|
686
|
+
const kl = normalizeRelPath(k).toLowerCase();
|
|
687
|
+
if (kl === relLow || kl.startsWith(prefix))
|
|
688
|
+
delete newManifestFiles[k];
|
|
689
|
+
}
|
|
690
|
+
}
|
|
691
|
+
catch { /* ignore */ }
|
|
692
|
+
}
|
|
693
|
+
|
|
586
694
|
// Очистка устаревшей дублирующей ветки MODELS/Halogen (объединена с MODELS/Local) с сохранением скачанных весов
|
|
587
695
|
try {
|
|
588
696
|
const legacyHalogen = path.join(absRoot, 'MODELS', 'Halogen');
|