@loaders.gl/tile-converter 3.3.0-alpha.6 → 3.3.0-alpha.8

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.
Files changed (41) hide show
  1. package/dist/3d-tiles-attributes-worker.d.ts +2 -2
  2. package/dist/3d-tiles-attributes-worker.d.ts.map +1 -1
  3. package/dist/3d-tiles-attributes-worker.js +2 -2
  4. package/dist/3d-tiles-attributes-worker.js.map +2 -2
  5. package/dist/converter-cli.js +15 -2
  6. package/dist/converter.min.js +20 -20
  7. package/dist/dist.min.js +263 -415
  8. package/dist/es5/3d-tiles-attributes-worker.js +1 -1
  9. package/dist/es5/converter-cli.js +9 -3
  10. package/dist/es5/converter-cli.js.map +1 -1
  11. package/dist/es5/deps-installer/deps-installer.js +1 -1
  12. package/dist/es5/i3s-attributes-worker.js +1 -1
  13. package/dist/es5/i3s-converter/helpers/coordinate-converter.js +7 -6
  14. package/dist/es5/i3s-converter/helpers/coordinate-converter.js.map +1 -1
  15. package/dist/es5/i3s-converter/i3s-converter.js +27 -25
  16. package/dist/es5/i3s-converter/i3s-converter.js.map +1 -1
  17. package/dist/es5/pgm-loader.js +1 -1
  18. package/dist/esm/3d-tiles-attributes-worker.js +1 -1
  19. package/dist/esm/converter-cli.js +9 -3
  20. package/dist/esm/converter-cli.js.map +1 -1
  21. package/dist/esm/deps-installer/deps-installer.js +1 -1
  22. package/dist/esm/i3s-attributes-worker.js +1 -1
  23. package/dist/esm/i3s-converter/helpers/coordinate-converter.js +7 -6
  24. package/dist/esm/i3s-converter/helpers/coordinate-converter.js.map +1 -1
  25. package/dist/esm/i3s-converter/i3s-converter.js +10 -7
  26. package/dist/esm/i3s-converter/i3s-converter.js.map +1 -1
  27. package/dist/esm/pgm-loader.js +1 -1
  28. package/dist/i3s-attributes-worker.d.ts +2 -2
  29. package/dist/i3s-attributes-worker.d.ts.map +1 -1
  30. package/dist/i3s-converter/helpers/coordinate-converter.d.ts.map +1 -1
  31. package/dist/i3s-converter/helpers/coordinate-converter.js +8 -6
  32. package/dist/i3s-converter/i3s-converter.d.ts.map +1 -1
  33. package/dist/i3s-converter/i3s-converter.js +9 -7
  34. package/dist/i3s-converter/types.d.ts +6 -6
  35. package/dist/i3s-converter/types.d.ts.map +1 -1
  36. package/dist/lib/utils/write-queue.d.ts +1 -1
  37. package/dist/lib/utils/write-queue.d.ts.map +1 -1
  38. package/package.json +15 -15
  39. package/src/converter-cli.ts +16 -2
  40. package/src/i3s-converter/helpers/coordinate-converter.ts +8 -6
  41. package/src/i3s-converter/i3s-converter.ts +17 -7
@@ -121,7 +121,7 @@ function validateOptions(options) {
121
121
  }
122
122
  if (exceptions.length) {
123
123
  exceptions.forEach((exeption) => exeption());
124
- process.exit(0); // eslint-disable-line
124
+ process.exit(1);
125
125
  }
126
126
  return options;
127
127
  }
@@ -162,7 +162,7 @@ function parseOptions(args) {
162
162
  opts.inputType = getStringValue(index, args);
163
163
  break;
164
164
  case '--tileset':
165
- opts.tileset = getStringValue(index, args);
165
+ opts.tileset = getURLValue(index, args);
166
166
  break;
167
167
  case '--name':
168
168
  opts.name = getStringValue(index, args);
@@ -228,6 +228,19 @@ function getStringValue(index, args) {
228
228
  }
229
229
  return value;
230
230
  }
231
+ /**
232
+ * Modyfy URL path to be compatible with fetch
233
+ * @param index - option's name index in the argument's array.
234
+ * The value of the option should be next to name of the option.
235
+ * @param args - cli arguments array
236
+ * @returns - string value of the option
237
+ */
238
+ function getURLValue(index, args) {
239
+ const value = getStringValue(index, args);
240
+ console.log(`Input tileset value: ${value}`);
241
+ console.log(`Modified tileset value: ${value.replace(/\\/g, '/')}`);
242
+ return value.replace(/\\/g, '/');
243
+ }
231
244
  /**
232
245
  * Get integer option value from cli arguments
233
246
  * @param index - option's name index in the argument's array