dochub-sdk 0.1.360 → 0.1.362

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.
@@ -237,17 +237,20 @@ export class DocHubDocumentProto extends DocHubComponentProto implements IDocHub
237
237
  const baseStruct = this.profile.$base.split('/');
238
238
  // Если указан шаблон, добавляем его в отслеживаемые файлы
239
239
  if(this.profile?.template) {
240
- debugger;
241
240
  const templatePath = [...baseStruct, 'template'].join('/');
242
- this.templateURI = (await DocHub.dataLake.getURIForPath(templatePath) || []).pop()
243
- || DocHub.dataLake.resolveURI(this.baseURI, this.profile.template);
241
+ this.templateURI = DocHub.dataLake.resolveURI(
242
+ (await DocHub.dataLake.getURIForPath(templatePath) || []).pop() || this.baseURI,
243
+ this.profile.template
244
+ );
244
245
  if (!this.templateURI) throw new DocHubError(`Can not resolve template URI for path [${templatePath}]`);
245
246
  followFiles.push(this.templateURI);
246
247
  } else if (typeof this.profile?.source === 'string' && this.getType() === DocHubDocumentType.content) {
247
248
  // Если шаблона нет, но документ предполагает работу с содержимым файла, то отслеживаем source
248
249
  const sourcePath = [...baseStruct, 'source'].join('/');
249
- this.sourceURI = (await DocHub.dataLake.getURIForPath(sourcePath) || []).pop()
250
- || DocHub.dataLake.resolveURI(this.baseURI, this.profile.source);
250
+ this.sourceURI = DocHub.dataLake.resolveURI(
251
+ (await DocHub.dataLake.getURIForPath(sourcePath) || []).pop() || this.baseURI,
252
+ this.profile.source
253
+ );
251
254
  if (!this.sourceURI) throw new DocHubError(`Can not resolve source URI for path [${sourcePath}]`);
252
255
  followFiles.push(this.sourceURI);
253
256
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dochub-sdk",
3
- "version": "0.1.360",
3
+ "version": "0.1.362",
4
4
  "description": "The DocHub System Development Kit.",
5
5
  "private": false,
6
6
  "main": "index.ts",