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 +2 -0
- package/lib/commands/pack/deb.d.ts +1 -0
- package/lib/commands/pack/deb.js +12 -4
- package/oclif.manifest.json +19 -4
- package/package.json +1 -1
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
|
};
|
package/lib/commands/pack/deb.js
CHANGED
|
@@ -48,12 +48,19 @@ APT::FTPArchive::Release {
|
|
|
48
48
|
`,
|
|
49
49
|
};
|
|
50
50
|
class PackDeb extends core_1.Command {
|
|
51
|
-
static description = '
|
|
51
|
+
static description = 'Pack CLI into debian package.';
|
|
52
52
|
static flags = {
|
|
53
|
-
|
|
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: '
|
|
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
|
-
|
|
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));
|
package/oclif.manifest.json
CHANGED
|
@@ -334,11 +334,26 @@
|
|
|
334
334
|
"pack:deb": {
|
|
335
335
|
"aliases": [],
|
|
336
336
|
"args": {},
|
|
337
|
-
"description": "
|
|
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": "
|
|
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": "
|
|
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.
|
|
735
|
+
"version": "4.3.0"
|
|
721
736
|
}
|