-
Notifications
You must be signed in to change notification settings - Fork 141
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
quick POC of an extension workflow registry
- Loading branch information
1 parent
18a42fe
commit a0bf7e3
Showing
3 changed files
with
35 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
packages/app/src/cli/services/generate/workflows/editor-extension-collection.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import {Workflow} from './registry.js' | ||
|
||
export const editorExtensionCollection: Workflow = { | ||
afterGenerate: async (options) => { | ||
Check failure on line 4 in packages/app/src/cli/services/generate/workflows/editor-extension-collection.ts GitHub Actions / ESLint Report Analysispackages/app/src/cli/services/generate/workflows/editor-extension-collection.ts#L4
|
||
console.log('hello world') | ||
Check failure on line 5 in packages/app/src/cli/services/generate/workflows/editor-extension-collection.ts GitHub Actions / ESLint Report Analysispackages/app/src/cli/services/generate/workflows/editor-extension-collection.ts#L5
|
||
}, | ||
} |
20 changes: 20 additions & 0 deletions
20
packages/app/src/cli/services/generate/workflows/registry.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import {editorExtensionCollection} from './editor-extension-collection.js' | ||
import {GenerateOptions} from '../../generate.js' | ||
import {GenerateExtensionTemplateOptions} from '../../generate/extension.js' | ||
|
||
interface AfterGenerateOptions { | ||
generateOptions: GenerateOptions | ||
extensionTemplateOptions: GenerateExtensionTemplateOptions | ||
} | ||
|
||
export interface Workflow { | ||
afterGenerate: (options: AfterGenerateOptions) => Promise<void> | ||
} | ||
|
||
interface WorkflowRegistry { | ||
[key: string]: Workflow | ||
} | ||
|
||
export const workflowRegistry: WorkflowRegistry = { | ||
editor_extension_collection: editorExtensionCollection, | ||
} |