Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
"action" to "Action" in build.mjs
  • Loading branch information
mbg committed May 15, 2026
commit 2320f9d058dc9e523d1bed5c91422017c043c282
10 changes: 5 additions & 5 deletions build.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ const onEndPlugin = {
const SHARED_ENTRYPOINT = "entry-points";

/**
* This plugin finds all source files that contain action entry points.
* This plugin finds all source files that contain Action entry points.
* It then generates the virtual `entry-points` module which imports all identifies files,
Comment thread
mbg marked this conversation as resolved.
Outdated
* and re-exports their `runWrapper` functions with suitable aliases.
* A tiny stub file is emitted for each Action entrypoint. Each stub imports the shared bundle
Expand All @@ -83,7 +83,7 @@ const entryPointsPlugin = {
const toPascal = (s) =>
s.replace(/(^|-)([a-z0-9])/gi, (_, __, c) => c.toUpperCase());

// Find the source files containing action entry points.
// Find the source files containing Action entry points.
build.onStart(() => {
const actionFiles = globSync("src/*-action{,-post}.ts");
for (const actionFile of actionFiles) {
Expand Down Expand Up @@ -112,7 +112,7 @@ const entryPointsPlugin = {
return { path: SHARED_ENTRYPOINT, namespace };
});

// Generate the virtual `entry-points` file based on the actions we discovered.
// Generate the virtual `entry-points` file based on the Actions we discovered.
// Restrict using the namespace. The path filter does not need to discriminate any further.
build.onLoad({ filter: /.*/, namespace }, async () => {
const wrapperTemplatePath = "entry-wrapper.js.tpl";
Expand Down Expand Up @@ -143,7 +143,7 @@ const entryPointsPlugin = {
};
});

// Emit entry point stubs for each action using the entry template.
// Emit entry point stubs for each Action using the entry template.
build.onEnd(async (result) => {
// Read the entry point template.
const templatePath = "action-entry.js.tpl";
Expand All @@ -152,7 +152,7 @@ const entryPointsPlugin = {
const makeHeader = (sourceFile) =>
`// Automatically generated from '${templatePath}' for 'src/${basename(sourceFile)}'.\n\n`;

// Write entry point stubs for each action.
// Write entry point stubs for each Action.
for (const action of actions) {
await writeFile(
join(
Expand Down