odant-work 1.0.68 → 1.0.70
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.70",
|
|
4
4
|
"createdAt": 1795100682741,
|
|
5
|
-
"updatedAt":
|
|
5
|
+
"updatedAt": 1795532974507,
|
|
6
6
|
"files": {
|
|
7
7
|
"run.mjs": "f8918c612e8641e9beee06221be6680aa6fd21f25468451f2ac857fd51772266",
|
|
8
|
-
"package.json": "
|
|
9
|
-
"package-lock.json": "
|
|
8
|
+
"package.json": "d474240937e62e4f126dc8895724343f15ef92e54045a63da4395e67d40aecf6",
|
|
9
|
+
"package-lock.json": "64eefd413a1a163d21fd3c78e78b86d698b1c2c1b1de260c3fcc73ca871475d9",
|
|
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",
|
|
@@ -595,7 +595,7 @@
|
|
|
595
595
|
"$server/$folder/$class/$structure/class.js": "c6c7cf786d2fc60673ade3d4606fef904d48fde270d625574f626897a8a2c9a7",
|
|
596
596
|
"$server/$folder/$class/$structure/handlers/methods/archive/$handler/class.js": "cbbe4b9edaaf6f737c7ffded57267bcf1c945a1b9195459c68cd2f20f42058eb",
|
|
597
597
|
"$server/$folder/$class/$structure/handlers/pages/data/$handler/class.js": "323d34fb44be111818183df77348ed89ad36d97c000e248adf9f15c94b788737",
|
|
598
|
-
"$server/$folder/$class/$structure/handlers/pages/data/$handler/data.js": "
|
|
598
|
+
"$server/$folder/$class/$structure/handlers/pages/data/$handler/data.js": "e9f85021ae35f4c6ee3dc159ae51de1181b57ab47cc18fffe3d30319a0df0684",
|
|
599
599
|
"$server/$folder/$class/$structure/handlers/pages/explorer/$handler/class.js": "18dde9964e08b916083778faa704f0a8f6ac912017cf2efbe5abf947f33a2458",
|
|
600
600
|
"$server/$folder/$class/$structure/handlers/pages/explorer/$handler/explorer.js": "149c17936697ae3e3e9d874b3b8da21eea2642062056f9e0a4546bfbd66b43ec",
|
|
601
601
|
"$server/$folder/$class/$structure/handlers/pages/form/calendar/$handler/calendar.js": "b11d1b4f57f4259c177b0da5b3576237e4cf9b3f664022d67c8c3f4d81e5bbf8",
|
|
@@ -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": "8f9fbf6ff7668ba71dc7192c58f5184d5625b238c7866fe6efcad17cf335441a",
|
|
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",
|
|
@@ -120,8 +120,8 @@ export default {
|
|
|
120
120
|
}
|
|
121
121
|
</style>
|
|
122
122
|
|
|
123
|
-
<oda-app-layout flex>
|
|
124
|
-
<div slot="left-panel" class="left-wrap">
|
|
123
|
+
<oda-app-layout flex :hide-left-tabs="true">
|
|
124
|
+
<div slot="left-panel" label="Классы" icon="icons:tree-structure" class="left-wrap">
|
|
125
125
|
<div class="search-box">
|
|
126
126
|
<input class="search-input" type="search" placeholder="Поиск класса, модуля, счёта…" :value="filter" @input="filter = $event.target.value">
|
|
127
127
|
<oda-button icon="icons:refresh" title="Обновить дерево классов" @tap="reload()"></oda-button>
|
|
@@ -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;">
|
|
@@ -235,7 +234,7 @@ ODA({is: 'work-form',
|
|
|
235
234
|
</div>
|
|
236
235
|
</div>
|
|
237
236
|
<oda-button @tap="toggleFullscreen" ~if="currentItem?.type === '$file'" :icon-size content icon="icons:fullscreen" style="border-radius: 50%;"></oda-button>
|
|
238
|
-
<oda-button @tap="close" error :icon-size content-invert icon="icons:close" style="border-radius: 50%; margin: 4px;"></oda-button>
|
|
237
|
+
<oda-button ~if="!isEmbeddedNoTree" @tap="close" error :icon-size content-invert icon="icons:close" style="border-radius: 50%; margin: 4px;"></oda-button>
|
|
239
238
|
</div>
|
|
240
239
|
<div id="formTabsBar" slot="top" class="form-tabs-bar" accent-invert horizontal-center no-flex :hidden="!showTabsBar" ~show="showTabsBar" style="width: 100%; padding: 0 4px 0 8px; gap: 6px; box-sizing: border-box; min-height: 38px;">
|
|
241
240
|
<oda-button id="classTreeToggleBtn" ~if="hasClassTree" no-flex allow-toggle
|
|
@@ -907,16 +906,12 @@ ODA({is: 'work-form',
|
|
|
907
906
|
_syncingClassTreeFocus: false,
|
|
908
907
|
view_control: null,
|
|
909
908
|
_noClassTreeFlag: false,
|
|
910
|
-
get
|
|
911
|
-
|
|
912
|
-
return t === '$base' || t === '$project' || t === '$structure';
|
|
909
|
+
get isEmbeddedNoTree() {
|
|
910
|
+
return typeof location !== 'undefined' && new URLSearchParams(location.search).get('noTree') === '1';
|
|
913
911
|
},
|
|
914
|
-
|
|
915
|
-
const
|
|
916
|
-
|
|
917
|
-
return;
|
|
918
|
-
const short = target.short || target.path || '';
|
|
919
|
-
window.open(encodeURI(`${short}/~/handlers/pages/data/index.html`), '_blank');
|
|
912
|
+
get showConsultantBtn() {
|
|
913
|
+
const t = this.currentItem?.type;
|
|
914
|
+
return Boolean(t) && !['$server', '$base', '$project', '$structure', '$user'].includes(t);
|
|
920
915
|
},
|
|
921
916
|
get hasClassTree() {
|
|
922
917
|
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.70",
|
|
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');
|