Skip to content

Commit

Permalink
feat(cli)!: Rename --UNSAFE to --UNCONFINED
Browse files Browse the repository at this point in the history
Renames the `UNSAFE` flag to `UNCONFINED`, which is more specific.
  • Loading branch information
rekmarks committed Jan 26, 2024
1 parent fa44a26 commit f9aa898
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
8 changes: 4 additions & 4 deletions packages/cli/src/endo.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ export const main = async rawArgs => {
[],
)
.option('-b,--bundle <bundle>', 'Bundle name for the caplet program')
.option('--UNSAFE <path>', 'Or path of an unsafe plugin to run in Node.js')
.option('--UNCONFINED <path>', 'Or path of an unsafe plugin to run in Node.js')
.option(
'-p,--powers <endowment>',
'Endowment to give the worklet (a name, NONE, HOST, or ENDO)',
Expand All @@ -95,7 +95,7 @@ export const main = async rawArgs => {
const {
as: partyNames,
bundle: bundleName,
UNSAFE: importPath,
UNCONFINED: importPath,
powers: powersName = 'NONE',
} = cmd.opts();
const { run } = await import('./run.js');
Expand All @@ -113,7 +113,7 @@ export const main = async rawArgs => {
.command('make [file]')
.description('make a plugin or a worker caplet (worklet)')
.option('-b,--bundle <bundle>', 'Bundle for a web page to open')
.option('--UNSAFE <file>', 'Path to a Node.js module')
.option('--UNCONFINED <file>', 'Path to a Node.js module')
.option(
'-a,--as <party>',
'Pose as named party (as named by current party)',
Expand All @@ -131,7 +131,7 @@ export const main = async rawArgs => {
)
.action(async (filePath, cmd) => {
const {
UNSAFE: importPath,
UNCONFINED: importPath,
name: resultName,
bundle: bundleName,
worker: workerName = 'NEW',
Expand Down
4 changes: 2 additions & 2 deletions packages/cli/src/make.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export const makeCommand = async ({
powersName,
}) => {
if (filePath !== undefined && importPath !== undefined) {
console.error('Specify only one of [file] or --UNSAFE <file>');
console.error('Specify only one of [file] or --UNCONFINED <file>');
process.exitCode = 1;
return;
}
Expand All @@ -34,7 +34,7 @@ export const makeCommand = async ({
bundleName === undefined
) {
console.error(
'Specify at least one of [file], --bundle <file>, or --UNSAFE <file>',
'Specify at least one of [file], --bundle <file>, or --UNCONFINED <file>',
);
process.exitCode = 1;
return;
Expand Down
6 changes: 3 additions & 3 deletions packages/cli/src/run.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export const run = async ({
importPath === undefined &&
bundleName === undefined
) {
console.error('Specify at least one of --file, --bundle, or --UNSAFE');
console.error('Specify at least one of --file, --bundle, or --UNCONFINED');
process.exitCode = 1;
return;
}
Expand All @@ -51,7 +51,7 @@ export const run = async ({

if (importPath !== undefined) {
if (bundleName !== undefined) {
console.error('Must specify either --bundle or --UNSAFE, not both');
console.error('Must specify either --bundle or --UNCONFINED, not both');
process.exitCode = 1;
return;
}
Expand All @@ -70,7 +70,7 @@ export const run = async ({
let bundle;
if (bundleName !== undefined) {
if (importPath !== undefined) {
console.error('Must specify either --bundle or --UNSAFE, not both');
console.error('Must specify either --bundle or --UNCONFINED, not both');
process.exitCode = 1;
return;
}
Expand Down

0 comments on commit f9aa898

Please sign in to comment.