
Security News
Happy Birthday, Shai-Hulud
It has been one year since Shai-Hulud made its first appearance on npm.
@mj-biz-apps/common-actions
Advanced tools
Generated action subclasses maintained by the CodeGen utility.
This package contains automatically generated BaseAction subclasses for actions defined in the MemberJunction framework outside of the core MJ framework. These classes are maintained by the MemberJunction CodeGen tool and provide a foundation for implementing custom business logic through the MJ Actions system.
The MemberJunction Actions framework provides a flexible system for executing business logic in response to various triggers. This package contains the generated action classes that extend the base BaseAction class from @memberjunction/actions, allowing developers to implement custom behavior while leveraging MJ's metadata-driven architecture.
This package is typically included as part of a MemberJunction server-side application. Since it's marked as private, it's not published to npm and should be used within the MJ monorepo:
# From the MJ monorepo root
npm install
# Build the package
npm run build --filter=mj_generatedactions
Import the generated actions in your server-side code:
import { LoadGeneratedActions } from 'mj_generatedactions';
// Load all generated actions to ensure they're registered with the ClassFactory
LoadGeneratedActions();
While the generated action classes provide the base implementation, you can create custom subclasses to add specific business logic:
import { RegisterClass } from '@memberjunction/global';
import { ActionResultSimple, RunActionParams } from '@memberjunction/actions-base';
import { YourGeneratedAction } from 'mj_generatedactions';
@RegisterClass(YourCustomAction, 'YourActionName')
export class YourCustomAction extends YourGeneratedAction {
protected async InternalRunAction(params: RunActionParams): Promise<ActionResultSimple> {
// Add your custom logic here
const result = await super.InternalRunAction(params);
// Additional processing
console.log('Custom action executed:', params);
return result;
}
}
Actions are typically executed through the MemberJunction ActionEngine:
import { ActionEngine } from '@memberjunction/actions';
const engine = new ActionEngine();
const result = await engine.RunAction({
ActionName: 'YourActionName',
Params: {
// Your action parameters
}
});
if (result.Success) {
console.log('Action completed successfully:', result.ResultCode);
} else {
console.error('Action failed:', result.Message);
}
A utility function that ensures all generated action classes are loaded and registered with the MemberJunction ClassFactory. This prevents tree-shaking from removing the generated classes during bundling.
Usage:
LoadGeneratedActions();
Note: This function should be called during application initialization to ensure all actions are available for use.
@memberjunction/actions: Base action framework and utilities@memberjunction/global: Global utilities including ClassFactory for registration@memberjunction/core: Core MJ functionality@memberjunction/core-entities: Entity definitions and metadata@memberjunction/ai: AI-related functionality@memberjunction/aiengine: AI engine implementationzod: Schema validation libraryThis package integrates seamlessly with other MemberJunction packages:
# Build the package
cd packages/GeneratedActions
npm run build
All generated code is placed in src/generated/ and should not be manually modified. The CodeGen tool will overwrite these files during regeneration.
src/generated/ are automatically maintained and will be overwritten@RegisterClass decoratorIf actions are not being recognized:
LoadGeneratedActions() is called during initializationIf experiencing build problems:
npm run build from the package directoryBusiness Source License 1.1 — see LICENSE for details.
FAQs
Generated action subclasses maintained by the CodeGen utility.
We found that @mj-biz-apps/common-actions demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 10 open source maintainers collaborating on the project.

Security News
It has been one year since Shai-Hulud made its first appearance on npm.

Research
/Security News
Operators behind PolinRider used a compromised GitHub account to plant malware in four development versions of a Packagist package with 700,000+ downloads.

Security News
GitHub Actions now supports cache-mode, a least-privilege control on the Actions cache aimed at the cache poisoning technique behind recent compromises.