
Security News
The Changelog Podcast: Practical Steps to Stay Safe on npm
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.
@adminide-stack/form-builder-core
Advanced tools
Complete integration of intelligent JavaScript autocompletion in step function editors.
This integration connects Monaco Editor with the js-autocomplete-extension to provide:
βββββββββββββββββββββββββββββββββββββββββββββββββββ
β CodeEditor Component β
β (Monaco Editor Instance) β
ββββββββββββββββββββ¬βββββββββββββββββββββββββββββββ
β
β User types code
β
ββββββββββββββββββββΌβββββββββββββββββββββββββββββββ
β monacoAutocompleteIntegration.ts β
β - setupMonacoAutocomplete() β
β - setupStepAutocomplete() β
ββββββββββββββββββββ¬βββββββββββββββββββββββββββββββ
β
β services.commands.executeCommand()
β
ββββββββββββββββββββΌβββββββββββββββββββββββββββββββ
β js-autocomplete-extension β
β - jsAutocomplete.getCompletions β
β - jsAutocomplete.getTypeInfo β
β - jsAutocomplete.installLibrary β
ββββββββββββββββββββ¬βββββββββββββββββββββββββββββββ
β
β code.javascript.* API
β
ββββββββββββββββββββΌβββββββββββββββββββββββββββββββ
β JavaScript Worker (Tern.js) β
β - Type inference β
β - Library definitions β
β - Scope analysis β
ββββββββββββββββββββββββββββββββββββββββββββββββββββ
stepGenerator.ts (Updated)Added completion support functions:
getStepCompletionScope() - Returns available scope variablesgetStepTypeDefinitions() - Returns TypeScript definitions for Inngest APIgetStepTypeCompletions() - Returns step-type-specific completionsextractVariablesFromCode() - Extracts variables from code for contextgetStepCompletionContext() - Gets complete completion context for a stepmonacoAutocompleteIntegration.ts (New)Monaco Editor integration layer:
setupMonacoAutocomplete() - Setup general JS/TS autocompletesetupStepAutocomplete() - Setup step-specific autocompleteinstallLibraryForAutocomplete() - Install library definitionsupdateAutocompleteConfig() - Update autocomplete settingsgetAvailableDefinitions() - Get loaded type definitionsUses your command execution pattern:
await services.commands.executeCommand({
command: 'jsAutocomplete.getCompletions',
arguments: [text, position, scope],
});
import { setupMonacoAutocomplete } from '@form-builder/core/inngest/monacoAutocompleteIntegration';
const CodeEditor: React.FC<CodeEditorProps> = ({ value, onChange, services }) => {
const handleEditorWillMount = async (monaco: any) => {
// Setup autocomplete
if (services?.commands) {
await setupMonacoAutocomplete(
monaco,
{
enableInngestContext: true,
customScope: ['step', 'event'],
enableHoverInfo: true,
commandService: services.commands,
},
services.commands,
);
}
// Rest of your setup...
};
return <Editor beforeMount={handleEditorWillMount} />;
};
import { setupStepAutocomplete } from '@form-builder/core/inngest/monacoAutocompleteIntegration';
const handleEditorWillMount = async (monaco: any) => {
if (services?.commands && currentStep) {
// Provides step-type-specific completions
await setupStepAutocomplete(monaco, currentStep, code, services.commands);
}
};
All extension commands follow your command execution pattern:
const result = await services.commands.executeCommand({
command: 'jsAutocomplete.getCompletions',
arguments: [
text, // Full source code
position, // Cursor offset
['step', 'event', 'myVar'], // Optional scope
],
});
// Returns:
// {
// completions: [
// { name: 'run', type: 'fn(id: string, fn: function): Promise', doc: '...' },
// { name: 'sleep', type: 'fn(id: string, duration: string): Promise', doc: '...' }
// ],
// isIncomplete: false
// }
const typeInfo = await services.commands.executeCommand({
command: 'jsAutocomplete.getTypeInfo',
arguments: ['step', ['event', 'step']],
});
// Returns:
// {
// type: 'object with methods run, sleep, sendEvent, waitForEvent',
// doc: 'Inngest step API for workflow orchestration',
// url: 'https://docs.inngest.com'
// }
await services.commands.executeCommand({
command: 'jsAutocomplete.installLibrary',
arguments: ['https://cdn.jsdelivr.net/npm/@types/lodash/index.d.ts', ['_', 'lodash']],
});
await services.commands.executeCommand({
command: 'jsAutocomplete.updateConfig',
arguments: [
{
includeDefaults: true,
includeLibraries: true,
enableDynamicLibraries: true,
customDefinitions: ['lodash', 'moment'],
},
],
});
The integration provides context-aware completions based on step type:
step.sleep('step-id', '5s'); // Completions show duration formats: "5s", "1m", "1h"
step.sendEvent('step-id', {
name: 'my.event', // Completions suggest event patterns
data: {}, // Type-aware data completions
});
step.waitForEvent('step-id', {
event: '', // Event name completions
timeout: '', // Duration completions
});
step.run('step-id', async (event, step) => {
event. // Completions for event properties
step. // Completions for step methods
})
The integration includes comprehensive type definitions:
declare const step: {
run<T>(id: string, fn: (event: any, step: any) => Promise<T> | T): Promise<T>;
sendEvent(id: string, input: { name: string; data?: any }): Promise<void>;
waitForEvent<T = any>(id: string, opts: { event: string; timeout?: string | number }): Promise<T>;
sleep(id: string, ms: string | number): Promise<void>;
};
declare const event: {
data: any;
id: string;
name: string;
ts: number;
};
step, event, and local variablesUsers can configure autocomplete behavior:
{
"jsAutocomplete.includeDefaults": true, // ECMAScript definitions
"jsAutocomplete.includeLibraries": true, // Installed libraries
"jsAutocomplete.enableDynamicLibraries": true, // Runtime detection
"jsAutocomplete.customDefinitions": [] // Custom type defs
}
React.useEffect(() => {
if (services?.commands) {
services.commands
.executeCommand({
command: 'jsAutocomplete.getAvailableDefinitions',
arguments: [],
})
.then((defs) => {
console.log('Extension loaded, definitions:', defs);
})
.catch((err) => {
console.error('Extension not available:', err);
});
}
}, [services]);
const testCompletions = async () => {
const result = await services.commands.executeCommand({
command: 'jsAutocomplete.getCompletions',
arguments: ['step.', 5, ['step', 'event']],
});
console.log('Completions:', result.completions);
// Should show: run, sleep, sendEvent, waitForEvent
};
services.commands is availablejsAutocomplete.resetContextenableHoverInfo: truegetTypeInfo command manuallyβ
Intelligent Completions - Context-aware suggestions using Tern.js
β
Type Information - Hover to see types and documentation
β
Library Support - Completions for installed libraries
β
Step-Specific - Tailored completions for each step type
β
Works with Existing Code - Integrates with your snippets
β
Command Pattern - Uses your existing command execution
β
Performance - Worker-based, doesn't block UI
MIT
FAQs
Unknown package
We found that @adminide-stack/form-builder-core demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago.Β It has 16 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.

Security News
Experts push back on new claims about AI-driven ransomware, warning that hype and sponsored research are distorting how the threat is understood.

Security News
Ruby's creator Matz assumes control of RubyGems and Bundler repositories while former maintainers agree to step back and transfer all rights to end the dispute.