Skip to content

Commit

Permalink
refactor(daemon): Rename additional "unsafe" internals
Browse files Browse the repository at this point in the history
  • Loading branch information
rekmarks committed Jan 26, 2024
1 parent 5623d60 commit 5ca7331
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion packages/cli/src/endo.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ export const main = async rawArgs => {
.option('-b,--bundle <bundle>', 'Bundle name for the caplet program')
.option(
'--UNCONFINED <path>',
'Or path of an unsafe plugin to run in Node.js',
'Or path of an unconfined plugin to run in Node.js',
)
.option(
'-p,--powers <endowment>',
Expand Down
4 changes: 2 additions & 2 deletions packages/daemon/src/daemon.js
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ const makeEndoBootstrap = (
* @param {string} importPath
* @param {import('./types.js').Terminator} terminator
*/
const makeControllerForUnsafePlugin = async (
const makeControllerForUnconfinedPlugin = async (
workerFormulaIdentifier,
guestFormulaIdentifier,
importPath,
Expand Down Expand Up @@ -307,7 +307,7 @@ const makeEndoBootstrap = (
terminator,
);
} else if (formula.type === 'make-unconfined') {
return makeControllerForUnsafePlugin(
return makeControllerForUnconfinedPlugin(
formula.worker,
formula.powers,
formula.importPath,
Expand Down
8 changes: 4 additions & 4 deletions packages/daemon/src/types.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,15 +72,15 @@ type EvalFormula = {
// TODO formula slots
};

type ImportUnsafeFormula = {
type MakeUnconfinedFormula = {
type: 'make-unconfined';
worker: string;
powers: string;
importPath: string;
// TODO formula slots
};

type ImportBundleFormula = {
type MakeBundleFormula = {
type: 'make-bundle';
worker: string;
powers: string;
Expand All @@ -97,8 +97,8 @@ type WebBundleFormula = {
export type Formula =
| GuestFormula
| EvalFormula
| ImportUnsafeFormula
| ImportBundleFormula
| MakeUnconfinedFormula
| MakeBundleFormula
| WebBundleFormula;

export type Label = {
Expand Down
2 changes: 1 addition & 1 deletion packages/daemon/src/web-page-bundler.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// @ts-check

// This is a built-in unsafe plugin for lazily constructing the web-page.js
// This is a built-in unconfined plugin for lazily constructing the web-page.js
// bundle for booting up web caplets.
// The hard-coded 'web-page-js' formula is a hard-coded 'make-unconfined' formula
// that runs this program in worker 0.
Expand Down
2 changes: 1 addition & 1 deletion packages/daemon/test/test-endo.js
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ test('closure state lost by restart', async t => {
await stop(locator);
});

test('persist unsafe services and their requests', async t => {
test('persist unconfined services and their requests', async t => {
const { promise: cancelled, reject: cancel } = makePromiseKit();
t.teardown(() => cancel(Error('teardown')));
const locator = makeLocator('tmp', 'make-unconfined');
Expand Down

0 comments on commit 5ca7331

Please sign in to comment.