pmcf 2.36.1 → 2.36.3
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/bin/pmcf-package +15 -7
- package/package.json +3 -3
- package/src/cli.mjs +0 -12
- package/types/cli.d.mts +0 -2
package/bin/pmcf-package
CHANGED
|
@@ -1,19 +1,27 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
import { join } from "node:path";
|
|
3
|
+
import { join, resolve } from "node:path";
|
|
4
4
|
import { readFile, mkdtemp } from "node:fs/promises";
|
|
5
5
|
import { tmpdir } from "node:os";
|
|
6
|
-
import { env } from "node:process";
|
|
6
|
+
import { cwd, env } from "node:process";
|
|
7
7
|
import { packageDirectory } from "pkg-dir";
|
|
8
8
|
import { createPublishingDetails } from "npm-pkgbuild";
|
|
9
9
|
import { prepare } from "../src/cli.mjs";
|
|
10
10
|
import { asArray } from "../src/utils.mjs";
|
|
11
11
|
|
|
12
|
-
const { root, args, options } = await prepare(
|
|
12
|
+
const { root, args, options } = await prepare({
|
|
13
|
+
publish: {
|
|
14
|
+
type: "string"
|
|
15
|
+
},
|
|
16
|
+
output: {
|
|
17
|
+
type: "string",
|
|
18
|
+
short: "o"
|
|
19
|
+
}
|
|
20
|
+
});
|
|
13
21
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
22
|
+
options.output = options.output
|
|
23
|
+
? resolve(cwd(), options.output)
|
|
24
|
+
: await mkdtemp(join(tmpdir(), "pmcf"));
|
|
17
25
|
|
|
18
26
|
const pkgDir = await packageDirectory({ cwd: options.root });
|
|
19
27
|
const pkg = JSON.parse(await readFile(join(pkgDir, "package.json"), "utf8"));
|
|
@@ -43,7 +51,7 @@ for (const name of args) {
|
|
|
43
51
|
const output = new outputFactory(properties);
|
|
44
52
|
|
|
45
53
|
const artifact = await output.create(
|
|
46
|
-
sources.map(source=>source[Symbol.asyncIterator]()),
|
|
54
|
+
sources.map(source => source[Symbol.asyncIterator]()),
|
|
47
55
|
[],
|
|
48
56
|
publishingDetails,
|
|
49
57
|
options
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pmcf",
|
|
3
|
-
"version": "2.36.
|
|
3
|
+
"version": "2.36.3",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -39,8 +39,8 @@
|
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
41
|
"ip-utilties": "^1.3.1",
|
|
42
|
-
"npm-pkgbuild": "^18.1.
|
|
43
|
-
"pacc": "^3.4.
|
|
42
|
+
"npm-pkgbuild": "^18.1.1",
|
|
43
|
+
"pacc": "^3.4.1",
|
|
44
44
|
"pkg-dir": "^8.0.0"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
package/src/cli.mjs
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { parseArgs } from "node:util";
|
|
2
|
-
import { resolve } from "node:path";
|
|
3
2
|
import { argv, cwd, env } from "node:process";
|
|
4
3
|
import { Root } from "./module.mjs";
|
|
5
4
|
|
|
@@ -17,26 +16,15 @@ export async function prepare(options = {}) {
|
|
|
17
16
|
type: "boolean",
|
|
18
17
|
default: false
|
|
19
18
|
},
|
|
20
|
-
publish: {
|
|
21
|
-
type: "string"
|
|
22
|
-
},
|
|
23
19
|
root: {
|
|
24
20
|
type: "string",
|
|
25
21
|
short: "r",
|
|
26
22
|
default: env.PMCF_ROOT || cwd()
|
|
27
|
-
},
|
|
28
|
-
output: {
|
|
29
|
-
type: "string",
|
|
30
|
-
short: "o"
|
|
31
23
|
}
|
|
32
24
|
},
|
|
33
25
|
allowPositionals: true
|
|
34
26
|
});
|
|
35
27
|
|
|
36
|
-
if (values.output) {
|
|
37
|
-
values.output = resolve(cwd(), values.output);
|
|
38
|
-
}
|
|
39
|
-
|
|
40
28
|
const root = new Root(values.root);
|
|
41
29
|
|
|
42
30
|
await root.loadAll();
|