pmcf 1.60.0 → 1.61.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-diagram CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- import { prepare } from "../src/cmd.mjs";
3
+ import { prepare } from "../src/cli.mjs";
4
4
 
5
5
  const { root, args } = await prepare();
6
6
 
package/bin/pmcf-info CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { prepare } from "../src/cmd.mjs";
2
+ import { prepare } from "../src/cli.mjs";
3
3
  const { root, args } = await prepare();
4
4
 
5
5
  const objectName = args[0];
package/bin/pmcf-package CHANGED
@@ -6,7 +6,7 @@ import { tmpdir } from "node:os";
6
6
  import { env } from "node:process";
7
7
  import { packageDirectory } from "pkg-dir";
8
8
  import { createPublishingDetails } from "npm-pkgbuild";
9
- import { prepare } from "../src/cmd.mjs";
9
+ import { prepare } from "../src/cli.mjs";
10
10
  import { asArray } from "../src/utils.mjs";
11
11
 
12
12
  const { root, args, options } = await prepare();
@@ -49,11 +49,13 @@ for (const name of args) {
49
49
  options
50
50
  );
51
51
 
52
- await Promise.all(
53
- publishingDetails.map(publishDetail =>
54
- output.publish(artifact, publishDetail)
55
- )
56
- );
52
+ if (!options.dry) {
53
+ await Promise.all(
54
+ publishingDetails.map(publishDetail =>
55
+ output.publish(artifact, publishDetail)
56
+ )
57
+ );
58
+ }
57
59
  }
58
60
  }
59
61
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pmcf",
3
- "version": "1.60.0",
3
+ "version": "1.61.1",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -11,6 +11,10 @@ export async function prepare() {
11
11
  short: "v",
12
12
  default: false
13
13
  },
14
+ dry: {
15
+ type: "boolean",
16
+ default: false
17
+ },
14
18
  publish: {
15
19
  type: "string",
16
20
  },
@@ -21,8 +25,7 @@ export async function prepare() {
21
25
  },
22
26
  output: {
23
27
  type: "string",
24
- short: "o",
25
- // default: cwd()
28
+ short: "o"
26
29
  }
27
30
  },
28
31
  allowPositionals: true
package/src/cluster.mjs CHANGED
@@ -52,10 +52,8 @@ export class Cluster extends Host {
52
52
  }
53
53
 
54
54
  async *preparePackages(stagingDir) {
55
-
56
55
  const result = {
57
56
  sources: [],
58
- outputs: this.outputs,
59
57
  properties: {
60
58
  description: `${this.typeName} definitions for ${this.fullName}`,
61
59
  access: "private"
@@ -69,7 +67,8 @@ export class Cluster extends Host {
69
67
  }
70
68
 
71
69
  for (const ni of interfaces) {
72
- const name = `keepalived-${ni.host.name}`;
70
+ const host = ni.host;
71
+ const name = `keepalived-${host.name}`;
73
72
  const packageStagingDir = join(stagingDir, name);
74
73
 
75
74
  const cfg = [];
@@ -98,9 +97,9 @@ export class Cluster extends Host {
98
97
  cfg
99
98
  );
100
99
 
100
+ result.pitputs = host.outputs,
101
101
  result.properties.name = name;
102
102
  result.properties.dependencies = ["keepalived"];
103
- result.properties.replaces = [`${this.typeName}-${this.owner.name}-${this.name}-${ni.host.name}`];
104
103
 
105
104
  result.sources.push(
106
105
  new FileContentProvider(packageStagingDir + "/")[Symbol.asyncIterator]()
@@ -2,6 +2,7 @@ export function prepare(): Promise<{
2
2
  root: Root;
3
3
  options: {
4
4
  verbose: boolean;
5
+ dry: boolean;
5
6
  publish: string;
6
7
  root: string;
7
8
  output: string;
@@ -381,6 +381,13 @@ export class Cluster extends Host {
381
381
  get masters(): Set<any>;
382
382
  set backups(value: Set<any>);
383
383
  get backups(): Set<any>;
384
+ preparePackages(stagingDir: any): AsyncGenerator<{
385
+ sources: any[];
386
+ properties: {
387
+ description: string;
388
+ access: string;
389
+ };
390
+ }, void, unknown>;
384
391
  #private;
385
392
  }
386
393
  import { Host } from "./host.mjs";