uti 7.0.0 → 7.1.0
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 +2 -2
- package/package.json +1 -1
- package/src/uti.mjs +1 -1
- package/src/well-known-utis.mjs +18 -0
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)
|
|
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
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]+)$/);
|
package/src/well-known-utis.mjs
CHANGED
|
@@ -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"
|