pmcf 1.53.2 → 1.54.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/bin/pmcf-package +12 -6
- package/package.json +3 -2
package/bin/pmcf-package
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
+
import { join } from "node:path";
|
|
4
|
+
import { readFile } from "node:fs/promises";
|
|
5
|
+
import { packageDirectory } from "pkg-dir";
|
|
3
6
|
import {
|
|
4
7
|
FileContentProvider,
|
|
5
8
|
createPublishingDetails,
|
|
@@ -10,15 +13,18 @@ import { prepare } from "../src/cmd.mjs";
|
|
|
10
13
|
const { root, args, options } = await prepare();
|
|
11
14
|
|
|
12
15
|
const objectName = args[0];
|
|
13
|
-
const object = await root.load(objectName);
|
|
14
16
|
|
|
15
|
-
|
|
17
|
+
const pkgDir = await packageDirectory({ cwd: options.root });
|
|
18
|
+
const pkg = JSON.parse(await readFile(join(pkgDir,'package.json'), "utf8"));
|
|
19
|
+
|
|
16
20
|
const publishingDetails = createPublishingDetails(["somewhere"]);
|
|
17
21
|
|
|
18
|
-
const
|
|
22
|
+
const object = await root.load(objectName);
|
|
19
23
|
|
|
20
|
-
properties
|
|
24
|
+
const { properties } = await object.preparePackage(options.output);
|
|
21
25
|
|
|
26
|
+
properties.version = pkg.version;
|
|
27
|
+
properties.license = pkg.license;
|
|
22
28
|
console.log(properties);
|
|
23
29
|
|
|
24
30
|
const sources = [options.output].map(base =>
|
|
@@ -30,8 +36,8 @@ const sources = [options.output].map(base =>
|
|
|
30
36
|
const output = new ARCH(properties);
|
|
31
37
|
|
|
32
38
|
const fileName = await output.create(sources, [], publishingDetails, {
|
|
33
|
-
|
|
34
|
-
|
|
39
|
+
...options,
|
|
40
|
+
destination: "dist"
|
|
35
41
|
});
|
|
36
42
|
|
|
37
43
|
console.log(fileName);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pmcf",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.54.1",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -39,7 +39,8 @@
|
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
41
|
"npm-pkgbuild": "^16.1.1",
|
|
42
|
-
"pacc": "^3.3.0"
|
|
42
|
+
"pacc": "^3.3.0",
|
|
43
|
+
"pkg-dir": "^8.0.0"
|
|
43
44
|
},
|
|
44
45
|
"devDependencies": {
|
|
45
46
|
"@types/node": "^22.13.8",
|