dochub-sdk 0.1.360 → 0.1.361

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