uti 7.0.0 → 7.1.1

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/README.md CHANGED
@@ -153,7 +153,7 @@ Then a lookup in the reistered UTIs for file name extions is executed.
153
153
 
154
154
  * `fileName` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** file to detect UTI for
155
155
 
156
- Returns **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** UTI for the given fileName or undefined if no UTI is registerd for the file names extension
156
+ Returns **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)<[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)>** UTI for the given fileName or undefined if no UTI is registerd for the file names extension
157
157
 
158
158
  ### conformsTo
159
159
 
@@ -169,7 +169,7 @@ Returns **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/
169
169
 
170
170
  ### fileNameConformsTo
171
171
 
172
- Lookup a UTI for a file name and check conformance
172
+ Lookup a UTI for a file name and check conformance.
173
173
 
174
174
  #### Parameters
175
175
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "uti",
3
- "version": "7.0.0",
3
+ "version": "7.1.1",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -30,11 +30,11 @@
30
30
  "lint:docs": "documentation lint ./src/**/*.mjs"
31
31
  },
32
32
  "devDependencies": {
33
- "ava": "^5.1.1",
34
- "browser-ava": "^1.3.19",
35
- "c8": "^7.12.0",
33
+ "ava": "^5.2.0",
34
+ "browser-ava": "^1.3.30",
35
+ "c8": "^7.13.0",
36
36
  "documentation": "^14.0.1",
37
- "semantic-release": "^20.0.4"
37
+ "semantic-release": "^21.0.0"
38
38
  },
39
39
  "engines": {
40
40
  "node": ">=14.18.3"
package/src/uti.mjs CHANGED
@@ -142,7 +142,7 @@ export class UTIController {
142
142
  * First the file name extension is extracted.
143
143
  * Then a lookup in the reistered UTIs for file name extions is executed.
144
144
  * @param {string} fileName file to detect UTI for
145
- * @return {string} UTI for the given fileName or undefined if no UTI is registerd for the file names extension
145
+ * @return {string[]} UTI for the given fileName or undefined if no UTI is registerd for the file names extension
146
146
  */
147
147
  getUTIsForFileName(fileName) {
148
148
  const m = fileName.match(/(\.[a-zA-Z_0-9]+)$/);
@@ -1,4 +1,4 @@
1
- const types = [
1
+ export default [
2
2
  {
3
3
  name: "public.item"
4
4
  },
@@ -439,6 +439,24 @@ const types = [
439
439
  fileNameExtension: [".dmg", ".smi", ".img"],
440
440
  mimeType: "application/x-apple-diskimage"
441
441
  },
442
+ { name: "public.oci.image.layer.v1",
443
+ conformsTo: ["public.data"],
444
+ },
445
+ { name: "public.oci.image.layer.v1.tar",
446
+ conformsTo: ["public.oci.image.layer.v1"],
447
+ filNameExtension: [".tar"],
448
+ mimeType: "application/vnd.oci.image.layer.v1.tar"
449
+ },
450
+ { name: "public.oci.image.layer.v1.tar.gzip",
451
+ conformsTo: ["public.oci.image.layer.v1"],
452
+ filNameExtension: [".tar.gz"],
453
+ mimeType: "application/vnd.oci.image.layer.v1.tar+gzip"
454
+ },
455
+ { name: "public.oci.image.layer.v1.tar.zstd",
456
+ conformsTo: ["public.oci.image.layer.v1"],
457
+ filNameExtension: [".tar.zstd"],
458
+ mimeType: "application/vnd.oci.image.layer.v1.tar+zstd"
459
+ },
442
460
  {
443
461
  name: "public.security.private-key",
444
462
  conformsTo: "public.data"
@@ -589,5 +607,3 @@ const types = [
589
607
  fileNameExtension: ".rules"
590
608
  },
591
609
  ];
592
-
593
- export default types;