oclif 4.1.5-dev.0 → 4.3.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.
package/README.md CHANGED
@@ -232,6 +232,8 @@ USAGE
232
232
  FLAGS
233
233
  -r, --root=<value> (required) [default: .] path to oclif CLI root
234
234
  -t, --tarball=<value> optionally specify a path to a tarball already generated by NPM
235
+ -Z, --compression=<value> optionally override compression, see output of
236
+ 'dpkg-deb --help' in the -Z description for valid options.
235
237
 
236
238
  DESCRIPTION
237
239
  pack CLI into debian package
@@ -2,6 +2,7 @@ import { Command, Interfaces } from '@oclif/core';
2
2
  export default class PackDeb extends Command {
3
3
  static description: string;
4
4
  static flags: {
5
+ compression: Interfaces.OptionFlag<"xz" | "gzip" | "none" | "zstd" | undefined, Interfaces.CustomOptions>;
5
6
  root: Interfaces.OptionFlag<string, Interfaces.CustomOptions>;
6
7
  tarball: Interfaces.OptionFlag<string | undefined, Interfaces.CustomOptions>;
7
8
  };
@@ -48,12 +48,19 @@ APT::FTPArchive::Release {
48
48
  `,
49
49
  };
50
50
  class PackDeb extends core_1.Command {
51
- static description = 'pack CLI into debian package';
51
+ static description = 'Pack CLI into debian package.';
52
52
  static flags = {
53
- root: core_1.Flags.string({ char: 'r', default: '.', description: 'path to oclif CLI root', required: true }),
53
+ compression: core_1.Flags.option({
54
+ options: ['gzip', 'none', 'xz', 'zstd'],
55
+ })({
56
+ char: 'z',
57
+ description: 'For more details see the `-Zcompress-type` section at https://man7.org/linux/man-pages/man1/dpkg-deb.1.html',
58
+ summary: 'Override the default compression used by dpkg-deb.',
59
+ }),
60
+ root: core_1.Flags.string({ char: 'r', default: '.', description: 'Path to oclif CLI root.', required: true }),
54
61
  tarball: core_1.Flags.string({
55
62
  char: 't',
56
- description: 'optionally specify a path to a tarball already generated by NPM',
63
+ description: 'Optionally specify a path to a tarball already generated by NPM.',
57
64
  required: false,
58
65
  }),
59
66
  };
@@ -95,7 +102,8 @@ class PackDeb extends core_1.Command {
95
102
  }));
96
103
  await exec(`sudo chown -R root "${workspace}"`);
97
104
  await exec(`sudo chgrp -R root "${workspace}"`);
98
- await exec(`dpkg --build "${workspace}" "${path.join(dist, versionedDebBase)}"`);
105
+ const dpkgDeb = flags.compression ? `dpkg-deb --build "-Z${flags.compression}"` : 'dpkg-deb --build';
106
+ await exec(`${dpkgDeb} "${workspace}" "${path.join(dist, versionedDebBase)}"`);
99
107
  this.log(`finished building debian / ${arch}`);
100
108
  };
101
109
  const arches = (0, util_1.uniq)(buildConfig.targets.filter((t) => t.platform === 'linux').map((t) => t.arch));
@@ -334,11 +334,26 @@
334
334
  "pack:deb": {
335
335
  "aliases": [],
336
336
  "args": {},
337
- "description": "pack CLI into debian package",
337
+ "description": "Pack CLI into debian package.",
338
338
  "flags": {
339
+ "compression": {
340
+ "char": "z",
341
+ "description": "For more details see the `-Zcompress-type` section at https://man7.org/linux/man-pages/man1/dpkg-deb.1.html",
342
+ "name": "compression",
343
+ "summary": "Override the default compression used by dpkg-deb.",
344
+ "hasDynamicHelp": false,
345
+ "multiple": false,
346
+ "options": [
347
+ "gzip",
348
+ "none",
349
+ "xz",
350
+ "zstd"
351
+ ],
352
+ "type": "option"
353
+ },
339
354
  "root": {
340
355
  "char": "r",
341
- "description": "path to oclif CLI root",
356
+ "description": "Path to oclif CLI root.",
342
357
  "name": "root",
343
358
  "required": true,
344
359
  "default": ".",
@@ -348,7 +363,7 @@
348
363
  },
349
364
  "tarball": {
350
365
  "char": "t",
351
- "description": "optionally specify a path to a tarball already generated by NPM",
366
+ "description": "Optionally specify a path to a tarball already generated by NPM.",
352
367
  "name": "tarball",
353
368
  "required": false,
354
369
  "hasDynamicHelp": false,
@@ -717,5 +732,5 @@
717
732
  ]
718
733
  }
719
734
  },
720
- "version": "4.1.5-dev.0"
735
+ "version": "4.3.0"
721
736
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "oclif",
3
3
  "description": "oclif: create your own CLI",
4
- "version": "4.1.5-dev.0",
4
+ "version": "4.3.0",
5
5
  "author": "Salesforce",
6
6
  "bin": {
7
7
  "oclif": "bin/run.js"