Skip to content

Commit

Permalink
Merge pull request #36 from dherman/neon-dist-output
Browse files Browse the repository at this point in the history
`NEON_DIST_OUTPUT`
  • Loading branch information
dherman authored Dec 30, 2023
2 parents 13d7fec + b27434e commit 599c666
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
8 changes: 5 additions & 3 deletions pkgs/cli/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -44489,7 +44489,7 @@ const OPTIONS = [
{ name: 'log', alias: 'l', type: String, defaultValue: null },
{ name: 'mount', alias: 'm', type: String, defaultValue: null },
{ name: 'manifest-path', type: String, defaultValue: null },
{ name: 'out', alias: 'o', type: String, defaultValue: 'index.node' },
{ name: 'out', alias: 'o', type: String, defaultValue: null },
{ name: 'verbose', alias: 'v', type: Boolean, defaultValue: false }
];
function createInputStream(file) {
Expand Down Expand Up @@ -44517,7 +44517,7 @@ class Dist {
summary: 'Mounted path of target directory in virtual filesystem. This is used to map paths from the log data back to their real paths, needed when tools such as cross-rs report messages from within a mounted Docker filesystem.'
},
{ name: '--manifest-path <path>', summary: 'Real path to Cargo.toml. (Default: cargo behavior)' },
{ name: '-o, --out <dist>', summary: 'Copy output to file <dist>. (Default: index.node)' },
{ name: '-o, --out <dist>', summary: 'Copy output to file <dist>. (Default: $NEON_DIST_OUTPUT or index.node)' },
{ name: '-v, --verbose', summary: 'Enable verbose logging. (Default: false)' }
];
}
Expand Down Expand Up @@ -44552,7 +44552,9 @@ class Dist {
this._manifestPath = options['manifest-path'];
this._crateName = options.name ||
basename(ensureDefined(process.env['npm_package_name'], '$npm_package_name'));
this._out = options.out;
this._out = options.out ||
process.env['NEON_DIST_OUTPUT'] ||
'index.node';
this._verbose = !!options.verbose;
this.log(`crate name = "${this._crateName}"`);
}
Expand Down
8 changes: 5 additions & 3 deletions src/cli/src/commands/dist.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const OPTIONS = [
{ name: 'log', alias: 'l', type: String, defaultValue: null },
{ name: 'mount', alias: 'm', type: String, defaultValue: null },
{ name: 'manifest-path', type: String, defaultValue: null },
{ name: 'out', alias: 'o', type: String, defaultValue: 'index.node' },
{ name: 'out', alias: 'o', type: String, defaultValue: null },
{ name: 'verbose', alias: 'v', type: Boolean, defaultValue: false }
];

Expand Down Expand Up @@ -45,7 +45,7 @@ export default class Dist implements Command {
summary: 'Mounted path of target directory in virtual filesystem. This is used to map paths from the log data back to their real paths, needed when tools such as cross-rs report messages from within a mounted Docker filesystem.'
},
{ name: '--manifest-path <path>', summary: 'Real path to Cargo.toml. (Default: cargo behavior)' },
{ name: '-o, --out <dist>', summary: 'Copy output to file <dist>. (Default: index.node)' },
{ name: '-o, --out <dist>', summary: 'Copy output to file <dist>. (Default: $NEON_DIST_OUTPUT or index.node)' },
{ name: '-v, --verbose', summary: 'Enable verbose logging. (Default: false)' }
];
}
Expand Down Expand Up @@ -86,7 +86,9 @@ export default class Dist implements Command {
this._manifestPath = options['manifest-path'];
this._crateName = options.name ||
basename(ensureDefined(process.env['npm_package_name'], '$npm_package_name'));
this._out = options.out;
this._out = options.out ||
process.env['NEON_DIST_OUTPUT'] ||
'index.node';
this._verbose = !!options.verbose;

this.log(`crate name = "${this._crateName}"`);
Expand Down

0 comments on commit 599c666

Please sign in to comment.