@neon-rs/cli 0.0.4 → 0.0.5
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/index.js +15381 -0
- package/package.json +7 -33
- package/data/llvm.json +0 -42
- package/data/node.json +0 -281
- package/dist/cargo.js +0 -154
- package/dist/command.js +0 -39
- package/dist/commands/dist.js +0 -75
- package/dist/commands/help.js +0 -26
- package/dist/commands/install-builds.js +0 -65
- package/dist/commands/pack-build.js +0 -108
- package/dist/index.js +0 -33
- package/dist/print.js +0 -69
- package/types/cargo.d.ts +0 -43
- package/types/command.d.ts +0 -24
- package/types/commands/cross-dist.d.ts +0 -14
- package/types/commands/cross-install.d.ts +0 -10
- package/types/commands/cross-pack.d.ts +0 -12
- package/types/commands/dist.d.ts +0 -16
- package/types/commands/help.d.ts +0 -10
- package/types/commands/install-builds.d.ts +0 -10
- package/types/commands/pack-build.d.ts +0 -13
- package/types/index.d.ts +0 -2
- package/types/print.d.ts +0 -5
- package/types/usage.d.ts +0 -2
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
import { execa } from 'execa';
|
|
2
|
-
import commandLineArgs from 'command-line-args';
|
|
3
|
-
import * as fs from 'node:fs/promises';
|
|
4
|
-
import * as path from 'node:path';
|
|
5
|
-
const OPTIONS = [
|
|
6
|
-
{ name: 'bundle', alias: 'b', type: String, defaultValue: null },
|
|
7
|
-
{ name: 'no-bundle', alias: 'B', type: String, defaultValue: null }
|
|
8
|
-
];
|
|
9
|
-
export default class InstallBuilds {
|
|
10
|
-
static summary() { return 'Install dependencies on prebuilds in package.json.'; }
|
|
11
|
-
static syntax() { return 'neon install-builds [-b <file>|-B]'; }
|
|
12
|
-
static options() {
|
|
13
|
-
return [
|
|
14
|
-
{ name: '-b, --bundle <file>', summary: 'File to generate bundling metadata. (Default: .targets)' },
|
|
15
|
-
{
|
|
16
|
-
name: '',
|
|
17
|
-
summary: 'This generated file ensures support for bundlers (e.g. @vercel/ncc), which rely on static analysis to detect and enable any addons used by the library.'
|
|
18
|
-
},
|
|
19
|
-
{ name: '-B, --no-bundle', summary: 'Do not generate bundling metadata.' }
|
|
20
|
-
];
|
|
21
|
-
}
|
|
22
|
-
static seeAlso() {
|
|
23
|
-
return [
|
|
24
|
-
{ name: 'ncc', summary: '<https://github.com/vercel/ncc>' }
|
|
25
|
-
];
|
|
26
|
-
}
|
|
27
|
-
constructor(argv) {
|
|
28
|
-
const options = commandLineArgs(OPTIONS, { argv });
|
|
29
|
-
if (options.bundle && options['no-bundle']) {
|
|
30
|
-
throw new Error("Options --bundle and --no-bundle cannot both be enabled.");
|
|
31
|
-
}
|
|
32
|
-
this._bundle = options['no-bundle']
|
|
33
|
-
? null
|
|
34
|
-
: !options.bundle
|
|
35
|
-
? '.targets'
|
|
36
|
-
: options.bundle;
|
|
37
|
-
}
|
|
38
|
-
async run() {
|
|
39
|
-
const manifest = JSON.parse(await fs.readFile(path.join(process.cwd(), 'package.json'), { encoding: 'utf8' }));
|
|
40
|
-
const version = manifest.version;
|
|
41
|
-
const targets = Object.values(manifest.neon.targets);
|
|
42
|
-
const specs = targets.map(name => `${name}@${version}`);
|
|
43
|
-
const result = await execa('npm', ['install', '--save-exact', '-O', ...specs], { shell: true });
|
|
44
|
-
if (result.exitCode !== 0) {
|
|
45
|
-
console.error(result.stderr);
|
|
46
|
-
process.exit(result.exitCode);
|
|
47
|
-
}
|
|
48
|
-
if (!this._bundle) {
|
|
49
|
-
return;
|
|
50
|
-
}
|
|
51
|
-
const PREAMBLE = `// AUTOMATICALLY GENERATED FILE. DO NOT EDIT.
|
|
52
|
-
//
|
|
53
|
-
// This code is never executed but is detected by the static analysis of
|
|
54
|
-
// bundlers such as \`@vercel/ncc\`. The require() expression that selects
|
|
55
|
-
// the right binary module for the current platform is too dynamic to be
|
|
56
|
-
// analyzable by bundler analyses, so this module provides an exhaustive
|
|
57
|
-
// static list for those analyses.
|
|
58
|
-
|
|
59
|
-
return;
|
|
60
|
-
|
|
61
|
-
`;
|
|
62
|
-
const requires = targets.map(name => `require('${name}');`).join('\n');
|
|
63
|
-
await fs.writeFile(this._bundle, PREAMBLE + requires + '\n');
|
|
64
|
-
}
|
|
65
|
-
}
|
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
import * as fs from 'node:fs/promises';
|
|
2
|
-
import * as path from 'node:path';
|
|
3
|
-
import { createRequire } from 'node:module';
|
|
4
|
-
import * as temp from 'temp';
|
|
5
|
-
import commandLineArgs from 'command-line-args';
|
|
6
|
-
import { execa } from 'execa';
|
|
7
|
-
const mktemp = temp.track().mkdir;
|
|
8
|
-
const OPTIONS = [
|
|
9
|
-
{ name: 'file', alias: 'f', type: String, defaultValue: 'index.node' },
|
|
10
|
-
{ name: 'target', alias: 't', type: String, defaultValue: null },
|
|
11
|
-
{ name: 'out-dir', alias: 'd', type: String, defaultValue: null }
|
|
12
|
-
];
|
|
13
|
-
const require = createRequire(import.meta.url);
|
|
14
|
-
const LLVM = require('../../data/llvm.json');
|
|
15
|
-
const NODE = require('../../data/node.json');
|
|
16
|
-
function lookup(target) {
|
|
17
|
-
const path = LLVM[target];
|
|
18
|
-
if (!path) {
|
|
19
|
-
throw new Error(`Rust target ${target} not supported`);
|
|
20
|
-
}
|
|
21
|
-
const [platform, arch, abi] = path;
|
|
22
|
-
return NODE[platform][arch][abi];
|
|
23
|
-
}
|
|
24
|
-
export default class PackBuild {
|
|
25
|
-
static summary() { return 'Create an npm tarball from a prebuild.'; }
|
|
26
|
-
static syntax() { return 'neon pack-build [-f <addon>] [-t <target>] [-d <dir>]'; }
|
|
27
|
-
static options() {
|
|
28
|
-
return [
|
|
29
|
-
{ name: '-f, --file <addon>', summary: 'Prebuilt .node file to pack. (Default: index.node)' },
|
|
30
|
-
{ name: '-t, --target <target>', summary: 'Rust target triple the addon was built for. (Default: rustc default host)' },
|
|
31
|
-
{ name: '-d, --out-dir <path>', summary: 'Output directory, recursively created if needed. (Default: ./dist)' }
|
|
32
|
-
];
|
|
33
|
-
}
|
|
34
|
-
static seeAlso() {
|
|
35
|
-
return [
|
|
36
|
-
{ name: 'Rust platform support', summary: '<https://doc.rust-lang.org/rustc/platform-support.html>' },
|
|
37
|
-
{ name: 'npm pack', summary: '<https://docs.npmjs.com/cli/commands/npm-pack>' },
|
|
38
|
-
{ name: 'cross-rs', summary: '<https://github.com/cross-rs/cross>' }
|
|
39
|
-
];
|
|
40
|
-
}
|
|
41
|
-
constructor(argv) {
|
|
42
|
-
const options = commandLineArgs(OPTIONS, { argv });
|
|
43
|
-
this._target = options.target || null;
|
|
44
|
-
this._addon = options.file;
|
|
45
|
-
this._outDir = options['out-dir'] || path.join(process.cwd(), 'dist');
|
|
46
|
-
}
|
|
47
|
-
async currentTarget() {
|
|
48
|
-
const result = await execa("rustc", ["-vV"], { shell: true });
|
|
49
|
-
if (result.exitCode !== 0) {
|
|
50
|
-
throw new Error(`Could not determine current Rust target: ${result.stderr}`);
|
|
51
|
-
}
|
|
52
|
-
const hostLine = result.stdout.split(/\n/).find(line => line.startsWith('host:'));
|
|
53
|
-
if (!hostLine) {
|
|
54
|
-
throw new Error("Could not determine current Rust target (unexpected rustc output)");
|
|
55
|
-
}
|
|
56
|
-
return hostLine.replace(/^host:\s+/, '');
|
|
57
|
-
}
|
|
58
|
-
async run() {
|
|
59
|
-
await fs.mkdir(this._outDir, { recursive: true });
|
|
60
|
-
const manifest = JSON.parse(await fs.readFile('package.json', { encoding: 'utf8' }));
|
|
61
|
-
const version = manifest.version;
|
|
62
|
-
const targets = manifest.neon.targets;
|
|
63
|
-
const target = this._target || await this.currentTarget();
|
|
64
|
-
const name = targets[target];
|
|
65
|
-
if (!name) {
|
|
66
|
-
throw new Error(`Rust target ${target} not found in package.json.`);
|
|
67
|
-
}
|
|
68
|
-
const targetInfo = lookup(target);
|
|
69
|
-
const description = `Prebuilt binary package for \`${manifest.name}\` on \`${targetInfo.node}\`.`;
|
|
70
|
-
let prebuildManifest = {
|
|
71
|
-
name,
|
|
72
|
-
description,
|
|
73
|
-
version,
|
|
74
|
-
os: [targetInfo.platform],
|
|
75
|
-
cpu: [targetInfo.arch],
|
|
76
|
-
main: "index.node",
|
|
77
|
-
files: ["README.md", "index.node"]
|
|
78
|
-
};
|
|
79
|
-
const OPTIONAL_KEYS = [
|
|
80
|
-
'author', 'repository', 'keywords', 'bugs', 'homepage', 'license', 'engines'
|
|
81
|
-
];
|
|
82
|
-
for (const key of OPTIONAL_KEYS) {
|
|
83
|
-
if (manifest[key]) {
|
|
84
|
-
prebuildManifest[key] = manifest[key];
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
const tmpdir = await mktemp('neon-');
|
|
88
|
-
await fs.writeFile(path.join(tmpdir, "package.json"), JSON.stringify(prebuildManifest, null, 2));
|
|
89
|
-
await fs.copyFile(this._addon, path.join(tmpdir, "index.node"));
|
|
90
|
-
await fs.writeFile(path.join(tmpdir, "README.md"), `# \`${name}\`\n\n${description}\n`);
|
|
91
|
-
const result = await execa("npm", ["pack", "--json"], {
|
|
92
|
-
shell: true,
|
|
93
|
-
cwd: tmpdir,
|
|
94
|
-
stdio: ['pipe', 'pipe', 'inherit']
|
|
95
|
-
});
|
|
96
|
-
if (result.exitCode !== 0) {
|
|
97
|
-
process.exit(result.exitCode);
|
|
98
|
-
}
|
|
99
|
-
// FIXME: comment linking to the npm issue this fixes
|
|
100
|
-
const tarball = JSON.parse(result.stdout)[0].filename.replace('@', '').replace('/', '-');
|
|
101
|
-
const dest = path.join(this._outDir, tarball);
|
|
102
|
-
// Copy instead of move since e.g. GitHub Actions Windows runners host temp directories
|
|
103
|
-
// on a different device (which causes fs.renameSync to fail).
|
|
104
|
-
await fs.copyFile(path.join(tmpdir, tarball), dest);
|
|
105
|
-
console.log(dest);
|
|
106
|
-
}
|
|
107
|
-
;
|
|
108
|
-
}
|
package/dist/index.js
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import commandLineCommands from 'command-line-commands';
|
|
3
|
-
import { printErrorWithUsage, printError, printMainUsage } from './print.js';
|
|
4
|
-
import { CommandName, asCommandName, commandFor } from './command.js';
|
|
5
|
-
class Cli {
|
|
6
|
-
parse() {
|
|
7
|
-
try {
|
|
8
|
-
const { command, argv } = commandLineCommands([null, ...Object.values(CommandName)]);
|
|
9
|
-
if (!command) {
|
|
10
|
-
printMainUsage();
|
|
11
|
-
process.exit(0);
|
|
12
|
-
}
|
|
13
|
-
const ctor = commandFor(asCommandName(command));
|
|
14
|
-
return new ctor(argv);
|
|
15
|
-
}
|
|
16
|
-
catch (e) {
|
|
17
|
-
printErrorWithUsage(e);
|
|
18
|
-
process.exit(1);
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
async function main() {
|
|
23
|
-
const cli = new Cli();
|
|
24
|
-
const command = cli.parse();
|
|
25
|
-
try {
|
|
26
|
-
await command.run();
|
|
27
|
-
}
|
|
28
|
-
catch (e) {
|
|
29
|
-
printError(e);
|
|
30
|
-
process.exit(1);
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
main();
|
package/dist/print.js
DELETED
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
import commandLineUsage from 'command-line-usage';
|
|
2
|
-
import chalk from 'chalk';
|
|
3
|
-
import { commandFor, summaries } from './command.js';
|
|
4
|
-
function pink(text) {
|
|
5
|
-
return chalk.bold.hex('#e75480')(text);
|
|
6
|
-
}
|
|
7
|
-
function blue(text) {
|
|
8
|
-
return chalk.bold.cyanBright(text);
|
|
9
|
-
}
|
|
10
|
-
function yellow(text) {
|
|
11
|
-
return chalk.bold.yellowBright(text);
|
|
12
|
-
}
|
|
13
|
-
function green(text) {
|
|
14
|
-
return chalk.bold.greenBright(text);
|
|
15
|
-
}
|
|
16
|
-
function commandUsage(name, command) {
|
|
17
|
-
const sections = [
|
|
18
|
-
{
|
|
19
|
-
content: `${pink('Neon:')} ${name} - ${command.summary()}`,
|
|
20
|
-
raw: true
|
|
21
|
-
},
|
|
22
|
-
{
|
|
23
|
-
header: blue('Usage:'),
|
|
24
|
-
content: `${blue('$')} ${command.syntax()}`
|
|
25
|
-
},
|
|
26
|
-
{
|
|
27
|
-
header: yellow('Options:'),
|
|
28
|
-
content: command.options()
|
|
29
|
-
}
|
|
30
|
-
];
|
|
31
|
-
const seeAlso = command.seeAlso();
|
|
32
|
-
if (seeAlso) {
|
|
33
|
-
sections.push({ header: green('See Also:'), content: seeAlso });
|
|
34
|
-
}
|
|
35
|
-
return commandLineUsage(sections).trimStart();
|
|
36
|
-
}
|
|
37
|
-
function mainUsage() {
|
|
38
|
-
const sections = [
|
|
39
|
-
{
|
|
40
|
-
content: `${pink('Neon:')} the npm packaging tool for Rust addons`,
|
|
41
|
-
raw: true
|
|
42
|
-
},
|
|
43
|
-
{
|
|
44
|
-
header: blue('Usage:'),
|
|
45
|
-
content: `${blue('$')} neon <command> <options>`
|
|
46
|
-
},
|
|
47
|
-
{
|
|
48
|
-
header: yellow('Commands:'),
|
|
49
|
-
content: summaries()
|
|
50
|
-
}
|
|
51
|
-
];
|
|
52
|
-
return commandLineUsage(sections).trim();
|
|
53
|
-
}
|
|
54
|
-
export function printCommandUsage(name) {
|
|
55
|
-
console.error(commandUsage(name, commandFor(name)));
|
|
56
|
-
}
|
|
57
|
-
export function printMainUsage() {
|
|
58
|
-
console.error(mainUsage());
|
|
59
|
-
console.error();
|
|
60
|
-
console.error("See 'neon help <command>' for more information on a specific command.");
|
|
61
|
-
}
|
|
62
|
-
export function printErrorWithUsage(e) {
|
|
63
|
-
console.error(mainUsage());
|
|
64
|
-
console.error();
|
|
65
|
-
printError(e);
|
|
66
|
-
}
|
|
67
|
-
export function printError(e) {
|
|
68
|
-
console.error(chalk.bold.red("error:") + " " + ((e instanceof Error) ? e.message : String(e)));
|
|
69
|
-
}
|
package/types/cargo.d.ts
DELETED
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
export type MessageReason = 'compiler-artifact' | 'compiler-message' | 'build-script-executed' | 'build-finished';
|
|
2
|
-
export type CompilerMessage = {
|
|
3
|
-
reason: 'compiler-message';
|
|
4
|
-
};
|
|
5
|
-
export type BuildScriptExecuted = {
|
|
6
|
-
reason: 'build-script-executed';
|
|
7
|
-
};
|
|
8
|
-
export type CompilerTarget = {
|
|
9
|
-
kind: string[];
|
|
10
|
-
crate_types: string[];
|
|
11
|
-
name: string;
|
|
12
|
-
};
|
|
13
|
-
export type CompilerArtifact = {
|
|
14
|
-
reason: 'compiler-artifact';
|
|
15
|
-
package_id: string;
|
|
16
|
-
manifest_path: string;
|
|
17
|
-
target: CompilerTarget;
|
|
18
|
-
filenames: string[];
|
|
19
|
-
};
|
|
20
|
-
export type BuildFinished = {
|
|
21
|
-
reason: 'build-finished';
|
|
22
|
-
success: boolean;
|
|
23
|
-
};
|
|
24
|
-
export type CargoMessage = CompilerMessage | BuildScriptExecuted | CompilerArtifact | BuildFinished;
|
|
25
|
-
export declare function messageReason(message: CargoMessage): MessageReason;
|
|
26
|
-
export declare function isCompilerMessage(json: unknown): json is CompilerMessage;
|
|
27
|
-
export declare function isBuildScriptExecuted(json: unknown): json is BuildScriptExecuted;
|
|
28
|
-
export declare function isCompilerTarget(json: unknown): json is CompilerTarget;
|
|
29
|
-
export declare function isCompilerArtifact(json: unknown): json is CompilerArtifact;
|
|
30
|
-
export declare function isBuildFinished(json: unknown): json is BuildFinished;
|
|
31
|
-
export declare function parseMessage(line: string): CargoMessage | null;
|
|
32
|
-
export type MessageFilter<T> = (msg: CargoMessage) => T | null;
|
|
33
|
-
export declare class MessageStream {
|
|
34
|
-
private _stream;
|
|
35
|
-
constructor(file?: string | null);
|
|
36
|
-
findPath(pred: MessageFilter<string>): Promise<string | null>;
|
|
37
|
-
}
|
|
38
|
-
export declare class UnmountMessageStream extends MessageStream {
|
|
39
|
-
private _mount;
|
|
40
|
-
private _manifestPath;
|
|
41
|
-
constructor(mount: string, manifestPath: string | null, file?: string | null);
|
|
42
|
-
findPath(pred: MessageFilter<string>): Promise<string | null>;
|
|
43
|
-
}
|
package/types/command.d.ts
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
export interface Command {
|
|
2
|
-
run(): Promise<void>;
|
|
3
|
-
}
|
|
4
|
-
export interface CommandStatics {
|
|
5
|
-
summary(): string;
|
|
6
|
-
syntax(): string;
|
|
7
|
-
options(): CommandDetail[];
|
|
8
|
-
seeAlso(): CommandDetail[] | void;
|
|
9
|
-
}
|
|
10
|
-
export type CommandClass = (new (argv: string[]) => Command) & CommandStatics;
|
|
11
|
-
export type CommandDetail = {
|
|
12
|
-
name: string;
|
|
13
|
-
summary: string;
|
|
14
|
-
};
|
|
15
|
-
export declare enum CommandName {
|
|
16
|
-
Help = "help",
|
|
17
|
-
Dist = "dist",
|
|
18
|
-
PackBuild = "pack-build",
|
|
19
|
-
InstallBuilds = "install-builds"
|
|
20
|
-
}
|
|
21
|
-
export declare function isCommandName(s: string): s is CommandName;
|
|
22
|
-
export declare function asCommandName(name: string): CommandName;
|
|
23
|
-
export declare function commandFor(name: CommandName): CommandClass;
|
|
24
|
-
export declare function summaries(): CommandDetail[];
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { Command, CommandDetail } from '../command.js';
|
|
2
|
-
export default class CrossDist implements Command {
|
|
3
|
-
static summary(): string;
|
|
4
|
-
static syntax(): string;
|
|
5
|
-
static options(): CommandDetail[];
|
|
6
|
-
static seeAlso(): CommandDetail[] | void;
|
|
7
|
-
private _file;
|
|
8
|
-
private _log;
|
|
9
|
-
private _crateName;
|
|
10
|
-
private _dir;
|
|
11
|
-
private _out;
|
|
12
|
-
constructor(argv: string[]);
|
|
13
|
-
run(): Promise<void>;
|
|
14
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { Command, CommandDetail } from '../command.js';
|
|
2
|
-
export default class CrossInstall implements Command {
|
|
3
|
-
static summary(): string;
|
|
4
|
-
static syntax(): string;
|
|
5
|
-
static options(): CommandDetail[];
|
|
6
|
-
static seeAlso(): CommandDetail[] | void;
|
|
7
|
-
private _bundle;
|
|
8
|
-
constructor(argv: string[]);
|
|
9
|
-
run(): Promise<void>;
|
|
10
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { Command, CommandDetail } from '../command.js';
|
|
2
|
-
export default class CrossPack implements Command {
|
|
3
|
-
static summary(): string;
|
|
4
|
-
static syntax(): string;
|
|
5
|
-
static options(): CommandDetail[];
|
|
6
|
-
static seeAlso(): CommandDetail[] | void;
|
|
7
|
-
private _target;
|
|
8
|
-
private _addon;
|
|
9
|
-
private _outDir;
|
|
10
|
-
constructor(argv: string[]);
|
|
11
|
-
run(): Promise<void>;
|
|
12
|
-
}
|
package/types/commands/dist.d.ts
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { Command, CommandDetail } from '../command.js';
|
|
2
|
-
export default class Dist implements Command {
|
|
3
|
-
static summary(): string;
|
|
4
|
-
static syntax(): string;
|
|
5
|
-
static options(): CommandDetail[];
|
|
6
|
-
static seeAlso(): CommandDetail[] | void;
|
|
7
|
-
private _log;
|
|
8
|
-
private _file;
|
|
9
|
-
private _mount;
|
|
10
|
-
private _manifestPath;
|
|
11
|
-
private _crateName;
|
|
12
|
-
private _out;
|
|
13
|
-
constructor(argv: string[]);
|
|
14
|
-
findArtifact(): Promise<string | null>;
|
|
15
|
-
run(): Promise<void>;
|
|
16
|
-
}
|
package/types/commands/help.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { Command, CommandDetail } from '../command.js';
|
|
2
|
-
export default class Help implements Command {
|
|
3
|
-
static summary(): string;
|
|
4
|
-
static syntax(): string;
|
|
5
|
-
static options(): CommandDetail[];
|
|
6
|
-
static seeAlso(): CommandDetail[] | void;
|
|
7
|
-
private _name?;
|
|
8
|
-
constructor(argv: string[]);
|
|
9
|
-
run(): Promise<void>;
|
|
10
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { Command, CommandDetail } from '../command.js';
|
|
2
|
-
export default class InstallBuilds implements Command {
|
|
3
|
-
static summary(): string;
|
|
4
|
-
static syntax(): string;
|
|
5
|
-
static options(): CommandDetail[];
|
|
6
|
-
static seeAlso(): CommandDetail[] | void;
|
|
7
|
-
private _bundle;
|
|
8
|
-
constructor(argv: string[]);
|
|
9
|
-
run(): Promise<void>;
|
|
10
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { Command, CommandDetail } from '../command.js';
|
|
2
|
-
export default class PackBuild implements Command {
|
|
3
|
-
static summary(): string;
|
|
4
|
-
static syntax(): string;
|
|
5
|
-
static options(): CommandDetail[];
|
|
6
|
-
static seeAlso(): CommandDetail[] | void;
|
|
7
|
-
private _target;
|
|
8
|
-
private _addon;
|
|
9
|
-
private _outDir;
|
|
10
|
-
constructor(argv: string[]);
|
|
11
|
-
currentTarget(): Promise<string>;
|
|
12
|
-
run(): Promise<void>;
|
|
13
|
-
}
|
package/types/index.d.ts
DELETED
package/types/print.d.ts
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { CommandName } from './command.js';
|
|
2
|
-
export declare function printCommandUsage(name: CommandName): void;
|
|
3
|
-
export declare function printMainUsage(): void;
|
|
4
|
-
export declare function printErrorWithUsage(e: any): void;
|
|
5
|
-
export declare function printError(e: any): void;
|
package/types/usage.d.ts
DELETED