npm-pkgbuild 11.9.1 → 11.10.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/package.json +3 -2
- package/src/npm-pkgbuild-cli.mjs +8 -16
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "npm-pkgbuild",
|
|
3
|
-
"version": "11.
|
|
3
|
+
"version": "11.10.1",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -61,7 +61,8 @@
|
|
|
61
61
|
"npm-packlist": "^7.0.4",
|
|
62
62
|
"pacote": "^15.2.0",
|
|
63
63
|
"pkg-dir": "^7.0.0",
|
|
64
|
-
"tar-stream": "^3.1.6"
|
|
64
|
+
"tar-stream": "^3.1.6",
|
|
65
|
+
"uti": "^7.3.0"
|
|
65
66
|
},
|
|
66
67
|
"devDependencies": {
|
|
67
68
|
"@types/node": "^20.4.2",
|
package/src/npm-pkgbuild-cli.mjs
CHANGED
|
@@ -4,9 +4,9 @@ import { readFileSync } from "node:fs";
|
|
|
4
4
|
import { fileURLToPath } from "node:url";
|
|
5
5
|
import { program } from "commander";
|
|
6
6
|
import {
|
|
7
|
-
createExpressionTransformer
|
|
8
|
-
nameExtensionMatcher
|
|
7
|
+
createExpressionTransformer
|
|
9
8
|
} from "content-entry-transform";
|
|
9
|
+
import { UTIController } from "uti";
|
|
10
10
|
import { utf8StreamOptions } from "./util.mjs";
|
|
11
11
|
import {
|
|
12
12
|
FileContentProvider,
|
|
@@ -57,6 +57,8 @@ program
|
|
|
57
57
|
)
|
|
58
58
|
.action(async options => {
|
|
59
59
|
try {
|
|
60
|
+
const uc = new UTIController();
|
|
61
|
+
|
|
60
62
|
options.publish = preparePublish(options.publish, process.env);
|
|
61
63
|
|
|
62
64
|
for await (const {
|
|
@@ -116,20 +118,10 @@ program
|
|
|
116
118
|
const o = new outputFactory(properties);
|
|
117
119
|
const transformer = [
|
|
118
120
|
createExpressionTransformer(
|
|
119
|
-
|
|
120
|
-
".
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
".css",
|
|
124
|
-
".txt",
|
|
125
|
-
".webmanifest",
|
|
126
|
-
".service",
|
|
127
|
-
".socket",
|
|
128
|
-
".path",
|
|
129
|
-
".timer",
|
|
130
|
-
".rules",
|
|
131
|
-
".backup"
|
|
132
|
-
]),
|
|
121
|
+
(entry) => {
|
|
122
|
+
const flag = uc.fileNameConformsTo(entry.name, "public.text");
|
|
123
|
+
console.log("UTI", entry.name, flag);
|
|
124
|
+
return flag; },
|
|
133
125
|
properties
|
|
134
126
|
)
|
|
135
127
|
];
|