pmcf 1.53.2 → 1.54.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.
Files changed (2) hide show
  1. package/bin/pmcf-package +12 -3
  2. package/package.json +3 -2
package/bin/pmcf-package CHANGED
@@ -1,5 +1,9 @@
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";
6
+
3
7
  import {
4
8
  FileContentProvider,
5
9
  createPublishingDetails,
@@ -12,12 +16,17 @@ const { root, args, options } = await prepare();
12
16
  const objectName = args[0];
13
17
  const object = await root.load(objectName);
14
18
 
19
+ const pkgDir = await packageDirectory({ cwd: options.root });
20
+
21
+ const pkg = JSON.parse(await readFile(join(pkgDir,'package.json'), "utf8"));
22
+
23
+
15
24
  console.log(object);
16
25
  const publishingDetails = createPublishingDetails(["somewhere"]);
17
26
 
18
27
  const { properties } = await object.preparePackage(options.output);
19
28
 
20
- properties.version = "0.0.0";
29
+ properties.version = pkg.version;
21
30
 
22
31
  console.log(properties);
23
32
 
@@ -30,8 +39,8 @@ const sources = [options.output].map(base =>
30
39
  const output = new ARCH(properties);
31
40
 
32
41
  const fileName = await output.create(sources, [], publishingDetails, {
33
- destination: "dist",
34
- verbose: true
42
+ ...options,
43
+ destination: "dist"
35
44
  });
36
45
 
37
46
  console.log(fileName);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pmcf",
3
- "version": "1.53.2",
3
+ "version": "1.54.0",
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",