pmcf 1.54.4 → 1.54.6

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 +24 -21
  2. package/package.json +3 -3
package/bin/pmcf-package CHANGED
@@ -12,32 +12,35 @@ import { prepare } from "../src/cmd.mjs";
12
12
 
13
13
  const { root, args, options } = await prepare();
14
14
 
15
- const objectName = args[0];
16
-
17
15
  const pkgDir = await packageDirectory({ cwd: options.root });
18
- const pkg = JSON.parse(await readFile(join(pkgDir,'package.json'), "utf8"));
19
-
20
- const publishingDetails = createPublishingDetails(["somewhere"]);
16
+ const pkg = JSON.parse(await readFile(join(pkgDir, "package.json"), "utf8"));
21
17
 
22
- const object = await root.load(objectName);
18
+ const publishingDetails = createPublishingDetails(options.publish, {
19
+ ...process.env
20
+ });
23
21
 
24
- const { properties } = await object.preparePackage(options.output);
22
+ for (const name of args) {
23
+ const object = await root.load(name);
24
+ const stagingDir = join(options.output, object.fullName);
25
+ const { properties } = await object.preparePackage(stagingDir);
25
26
 
26
- properties.version = pkg.version;
27
- properties.license = pkg.license;
28
- console.log(properties);
27
+ properties.version = pkg.version;
28
+ properties.license = pkg.license;
29
+ console.log(properties);
29
30
 
30
- const sources = [options.output].map(base =>
31
- new FileContentProvider({
32
- base
33
- })[Symbol.asyncIterator]()
34
- );
31
+ const output = new ARCH(properties);
32
+ const sources = new FileContentProvider({ base: stagingDir})[Symbol.asyncIterator]();
35
33
 
36
- const output = new ARCH(properties);
34
+ const artifact = await output.create(sources, [], publishingDetails, {
35
+ ...options,
36
+ destination: "dist"
37
+ });
37
38
 
38
- const fileName = await output.create(sources, [], publishingDetails, {
39
- ...options,
40
- destination: "dist"
41
- });
39
+ await Promise.all(
40
+ publishingDetails.map(publishDetail =>
41
+ output.publish(artifact, publishDetail, output.properties)
42
+ )
43
+ );
42
44
 
43
- console.log(fileName);
45
+ console.log(artifact);
46
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pmcf",
3
- "version": "1.54.4",
3
+ "version": "1.54.6",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -22,9 +22,9 @@
22
22
  ],
23
23
  "license": "0BSD",
24
24
  "bin": {
25
- "pmcf-package": "./bin/pmcf-package",
26
25
  "pmcf-info": "./bin/pmcf-info",
27
- "pmcf-network": "./bin/pmcf-network"
26
+ "pmcf-network": "./bin/pmcf-network",
27
+ "pmcf-package": "./bin/pmcf-package"
28
28
  },
29
29
  "scripts": {
30
30
  "prepare": "node --run prepare:typescript",