3dviewer-sdk 1.0.6 → 1.0.7
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/dist/index.d.mts +0 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.js +2 -6
- package/dist/index.mjs +2 -6
- package/dist/modules/files.module.d.ts +0 -1
- package/dist/modules/files.module.js +2 -6
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -287,10 +287,6 @@ var FilesModule = class {
|
|
|
287
287
|
const baseUrl = this.resolveBaseUrl();
|
|
288
288
|
return baseUrl.endsWith("/service/conversion") ? baseUrl : `${baseUrl}/service/conversion`;
|
|
289
289
|
}
|
|
290
|
-
// Newer convert endpoint is served from the API root, not /service/conversion.
|
|
291
|
-
resolveApiRoot() {
|
|
292
|
-
return this.resolveBaseUrl();
|
|
293
|
-
}
|
|
294
290
|
// Resolve upload path sent to conversion APIs.
|
|
295
291
|
getUploadPath() {
|
|
296
292
|
return this.config.uploadPath || this.viewer.getOptions().uploadPath || ".";
|
|
@@ -434,7 +430,7 @@ var FilesModule = class {
|
|
|
434
430
|
}
|
|
435
431
|
// Submit conversion request to the newer downloadUrl-based endpoint.
|
|
436
432
|
async cacheFileV2(options) {
|
|
437
|
-
const
|
|
433
|
+
const hostConversion = await this.resolveHostConversion();
|
|
438
434
|
const params = new URLSearchParams();
|
|
439
435
|
if (typeof options.overwrite === "boolean") {
|
|
440
436
|
params.set("overwrite", String(options.overwrite));
|
|
@@ -443,7 +439,7 @@ var FilesModule = class {
|
|
|
443
439
|
params.set("project", options.project);
|
|
444
440
|
}
|
|
445
441
|
const query = params.toString();
|
|
446
|
-
const url = `${
|
|
442
|
+
const url = `${hostConversion}/api/StreamFile/convert${query ? `?${query}` : ""}`;
|
|
447
443
|
const payload = this.buildConvertV2Payload(options);
|
|
448
444
|
const response = await fetch(url, {
|
|
449
445
|
method: "POST",
|
package/dist/index.mjs
CHANGED
|
@@ -261,10 +261,6 @@ var FilesModule = class {
|
|
|
261
261
|
const baseUrl = this.resolveBaseUrl();
|
|
262
262
|
return baseUrl.endsWith("/service/conversion") ? baseUrl : `${baseUrl}/service/conversion`;
|
|
263
263
|
}
|
|
264
|
-
// Newer convert endpoint is served from the API root, not /service/conversion.
|
|
265
|
-
resolveApiRoot() {
|
|
266
|
-
return this.resolveBaseUrl();
|
|
267
|
-
}
|
|
268
264
|
// Resolve upload path sent to conversion APIs.
|
|
269
265
|
getUploadPath() {
|
|
270
266
|
return this.config.uploadPath || this.viewer.getOptions().uploadPath || ".";
|
|
@@ -408,7 +404,7 @@ var FilesModule = class {
|
|
|
408
404
|
}
|
|
409
405
|
// Submit conversion request to the newer downloadUrl-based endpoint.
|
|
410
406
|
async cacheFileV2(options) {
|
|
411
|
-
const
|
|
407
|
+
const hostConversion = await this.resolveHostConversion();
|
|
412
408
|
const params = new URLSearchParams();
|
|
413
409
|
if (typeof options.overwrite === "boolean") {
|
|
414
410
|
params.set("overwrite", String(options.overwrite));
|
|
@@ -417,7 +413,7 @@ var FilesModule = class {
|
|
|
417
413
|
params.set("project", options.project);
|
|
418
414
|
}
|
|
419
415
|
const query = params.toString();
|
|
420
|
-
const url = `${
|
|
416
|
+
const url = `${hostConversion}/api/StreamFile/convert${query ? `?${query}` : ""}`;
|
|
421
417
|
const payload = this.buildConvertV2Payload(options);
|
|
422
418
|
const response = await fetch(url, {
|
|
423
419
|
method: "POST",
|
|
@@ -148,10 +148,6 @@ export class FilesModule {
|
|
|
148
148
|
const baseUrl = this.resolveBaseUrl();
|
|
149
149
|
return baseUrl.endsWith("/service/conversion") ? baseUrl : `${baseUrl}/service/conversion`;
|
|
150
150
|
}
|
|
151
|
-
// Newer convert endpoint is served from the API root, not /service/conversion.
|
|
152
|
-
resolveApiRoot() {
|
|
153
|
-
return this.resolveBaseUrl();
|
|
154
|
-
}
|
|
155
151
|
// Resolve upload path sent to conversion APIs.
|
|
156
152
|
getUploadPath() {
|
|
157
153
|
return this.config.uploadPath || this.viewer.getOptions().uploadPath || ".";
|
|
@@ -298,7 +294,7 @@ export class FilesModule {
|
|
|
298
294
|
}
|
|
299
295
|
// Submit conversion request to the newer downloadUrl-based endpoint.
|
|
300
296
|
async cacheFileV2(options) {
|
|
301
|
-
const
|
|
297
|
+
const hostConversion = await this.resolveHostConversion();
|
|
302
298
|
const params = new URLSearchParams();
|
|
303
299
|
if (typeof options.overwrite === "boolean") {
|
|
304
300
|
params.set("overwrite", String(options.overwrite));
|
|
@@ -307,7 +303,7 @@ export class FilesModule {
|
|
|
307
303
|
params.set("project", options.project);
|
|
308
304
|
}
|
|
309
305
|
const query = params.toString();
|
|
310
|
-
const url = `${
|
|
306
|
+
const url = `${hostConversion}/api/StreamFile/convert${query ? `?${query}` : ""}`;
|
|
311
307
|
const payload = this.buildConvertV2Payload(options);
|
|
312
308
|
const response = await fetch(url, {
|
|
313
309
|
method: "POST",
|