pmcf 1.54.7 → 1.54.8

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 CHANGED
@@ -2,6 +2,7 @@
2
2
 
3
3
  import { join } from "node:path";
4
4
  import { readFile, mkdtemp } from "node:fs/promises";
5
+ import { tmpdir } from "node:os";
5
6
  import { packageDirectory } from "pkg-dir";
6
7
  import {
7
8
  FileContentProvider,
@@ -12,6 +13,10 @@ import { prepare } from "../src/cmd.mjs";
12
13
 
13
14
  const { root, args, options } = await prepare();
14
15
 
16
+ if (!options.output) {
17
+ options.output = await mkdtemp(tmpdir());
18
+ }
19
+
15
20
  const pkgDir = await packageDirectory({ cwd: options.root });
16
21
  const pkg = JSON.parse(await readFile(join(pkgDir, "package.json"), "utf8"));
17
22
 
@@ -22,6 +27,7 @@ for (const name of args) {
22
27
  const stagingDir = join(options.output, object.fullName);
23
28
  const { properties } = await object.preparePackage(stagingDir);
24
29
 
30
+ //properties.verbose = true;
25
31
  properties.version = pkg.version;
26
32
  properties.license = pkg.license;
27
33
  console.log(properties);
@@ -31,7 +37,9 @@ for (const name of args) {
31
37
  Symbol.asyncIterator
32
38
  ]();
33
39
 
34
- const destination = await mkdtemp(output.constructor.name);
40
+ const destination = await mkdtemp(
41
+ join(options.output, output.constructor.name)
42
+ );
35
43
  console.log(destination);
36
44
 
37
45
  const artifact = await output.create(sources, [], publishingDetails, {
@@ -41,9 +49,11 @@ for (const name of args) {
41
49
 
42
50
  console.log(artifact);
43
51
 
52
+ /*
44
53
  await Promise.all(
45
54
  publishingDetails.map(publishDetail =>
46
55
  output.publish(artifact, publishDetail, output.properties)
47
56
  )
48
57
  );
58
+ */
49
59
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pmcf",
3
- "version": "1.54.7",
3
+ "version": "1.54.8",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -43,7 +43,7 @@
43
43
  "pkg-dir": "^8.0.0"
44
44
  },
45
45
  "devDependencies": {
46
- "@types/node": "^22.13.8",
46
+ "@types/node": "^22.13.9",
47
47
  "ava": "^6.2.0",
48
48
  "c8": "^10.1.3",
49
49
  "documentation": "^14.0.3",
package/src/cmd.mjs CHANGED
@@ -6,6 +6,11 @@ export async function prepare() {
6
6
  const { values, positionals } = parseArgs({
7
7
  args: argv.slice(2),
8
8
  options: {
9
+ verbose: {
10
+ type: "boolean",
11
+ short: "v",
12
+ default: false
13
+ },
9
14
  root: {
10
15
  type: "string",
11
16
  short: "r",
@@ -14,7 +19,7 @@ export async function prepare() {
14
19
  output: {
15
20
  type: "string",
16
21
  short: "o",
17
- default: cwd()
22
+ // default: cwd()
18
23
  }
19
24
  },
20
25
  allowPositionals: true
package/types/cmd.d.mts CHANGED
@@ -1,6 +1,7 @@
1
1
  export function prepare(): Promise<{
2
2
  root: Root;
3
3
  options: {
4
+ verbose: boolean;
4
5
  root: string;
5
6
  output: string;
6
7
  };