generated from maximegris/angular-electron
-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #533 from negue/merge/release-into-develop
Merge release into develop
- Loading branch information
Showing
25 changed files
with
473 additions
and
153 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
| Method | Endpoint | Class method | | ||
|--------|------------------------------------------------|-----------------------------------------------------------| | ||
| GET | /api/action/simpleList | ActionController.getList() | | ||
| GET | /api/action/last_actions | ActionController.getLast20Events() | | ||
| GET | /api/action/lastOverrides/:actionId | ActionController.getLastActionOverrides() | | ||
| POST | /api/action/trigger/:actionId | ActionController.triggerAction() | | ||
| GET | /api/actionActivity/current | ActionActivityController.getCurrentState() | | ||
| GET | /api/config/ | ConfigController.getConfig() | | ||
| PUT | /api/config/twitch | ConfigController.updateTwitchConfig() | | ||
| PUT | /api/config/obs | ConfigController.updateObsConfig() | | ||
| PUT | /api/config/ | ConfigController.updateConfig() | | ||
| PUT | /api/config/customPort | ConfigController.updatePort() | | ||
| DELETE | /api/config/twitchRevoke/:authType | ConfigController.revokeToken() | | ||
| GET | /api/file/ | FileController.getList() | | ||
| GET | /api/file/fileById/:mediaId | FileController.getById() | | ||
| GET | /api/file/preview/:mediaId | FileController.getPreviewById() | | ||
| GET | /api/screen/ | ScreenController.listAllScreens() | | ||
| POST | /api/screen/ | ScreenController.addScreen() | | ||
| PUT | /api/screen/:screenId | ScreenController.updateScreen() | | ||
| DELETE | /api/screen/:screenId | ScreenController.deleteScreen() | | ||
| PUT | /api/screen/:screenId/clips/bulk | ScreenController.updateScreenMediaBulk() | | ||
| PUT | /api/screen/:screenId/clips/:mediaId | ScreenController.updateScreenMedia() | | ||
| DELETE | /api/screen/:screenId/clips/:mediaId | ScreenController.deleteScreenMedia() | | ||
| GET | /api/widget-state/:mediaId | WidgetStateController.getWidgetState() | | ||
| PUT | /api/widget-state/:mediaId/:widgetInstance | WidgetStateController.updateScreen() | | ||
| GET | /api/open/config | OpenController.openConfigPath() | | ||
| GET | /api/open/files | OpenController.openFilePath() | | ||
| GET | /api/twitchData/helix/* | TwitchDataController.getHelixData() | | ||
| GET | /api/twitchData/authInformations | TwitchDataController.getTwitchAuthInformations() | | ||
| GET | /api/twitchData/currentChannelPointRedemptions | TwitchDataController.listCurrentChannelPointRedemptions() | | ||
| GET | /api/twitch_events/ | TwitchEventsController.getTwitchEvents() | | ||
| POST | /api/twitch_events/ | TwitchEventsController.addTwitchEvent() | | ||
| PUT | /api/twitch_events/:eventId | TwitchEventsController.updateTwitchEvent() | | ||
| DELETE | /api/twitch_events/:eventId | TwitchEventsController.deleteTwitchEvent() | | ||
| POST | /api/twitch_events/trigger_config_example | TwitchEventsController.triggerConfigExample() | | ||
| POST | /api/twitch_events/trigger_event | TwitchEventsController.triggerEvent() | | ||
| GET | /api/twitch_events/last_events | TwitchEventsController.getLast20Events() | | ||
| GET | /api/obsData/currentBrowserSources | ObsDataController.listBrowserSources() | | ||
| POST | /api/obsData/refreshBrowserSource/:sourceName | ObsDataController.refreshBrowserSource() | | ||
| GET | /api/obsData/sceneList | ObsDataController.getSceneList() | | ||
| GET | /api/obsData/sourceList | ObsDataController.getSourceList() | | ||
| GET | /api/obsData/sourceFilters/:sourceName | ObsDataController.getSourceFilterList() | |
File renamed without changes.
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
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
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 |
---|---|---|
@@ -1,3 +1,6 @@ | ||
export * from './lib/recipe.types'; | ||
export * from './lib/utils'; | ||
export * from './lib/generateCodeByRecipe'; | ||
export {RecipeCommandBlockGroups} from "./lib/recipeCommandBlockGroups"; | ||
export {RecipeCommandRegistry} from "./lib/recipeCommandRegistry"; | ||
export * from "./lib/recipeStepConfigArgument"; |
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,111 @@ | ||
import {generateCodeByStep, RecipeCommandBlockRegistry} from "./recipe.types"; | ||
import {generateRandomCharacters} from "./utils"; | ||
|
||
export function registerGenericCommandBlocks( | ||
registry: RecipeCommandBlockRegistry, | ||
generateCodeByStep: generateCodeByStep | ||
): void { | ||
registry["sleepSeconds"] = { | ||
pickerLabel: "Wait for Seconds", | ||
commandGroup: "generic", | ||
configArguments: [ | ||
{ | ||
name: "seconds", | ||
label: "Seconds", | ||
type: "number" | ||
} | ||
], | ||
toScriptCode: (step, context) => `sleep.secondsAsync(${step.payload.seconds});`, | ||
commandEntryLabelAsync: (queries, payload, parentStep) => { | ||
return Promise.resolve(`sleep: ${payload.seconds} seconds`); | ||
}, | ||
entryIcon: () => 'hourglass_top' | ||
}; | ||
|
||
|
||
registry["sleepMs"] = { | ||
pickerLabel: "Wait for Milliseconds", | ||
commandGroup: "generic", | ||
configArguments: [ | ||
{ | ||
name: "ms", | ||
label: "Milliseconds", | ||
type: "number" | ||
} | ||
], | ||
toScriptCode: (step, context) => `sleep.msAsync(${step.payload.ms});`, | ||
commandEntryLabelAsync: (queries, payload, parentStep) => { | ||
return Promise.resolve(`sleep: ${payload.ms}ms`); | ||
}, | ||
entryIcon: () => 'hourglass_top' | ||
}; | ||
|
||
registry["randomCommandGroup"] = { | ||
pickerLabel: "Random Command Group", | ||
commandGroup: "generic", | ||
configArguments: [ | ||
{ | ||
name: 'amountOfGroups', | ||
label: 'Amount of Groups', | ||
type: "number" | ||
} | ||
], | ||
extendCommandBlockOnEdit: true, | ||
extendCommandBlock: (step) => { | ||
const amountOfGroups = step.payload.amountOfGroups as number; | ||
|
||
if (step.subCommandBlocks.length === amountOfGroups) { | ||
return; | ||
} | ||
|
||
if (amountOfGroups < step.subCommandBlocks.length) { | ||
step.subCommandBlocks.length = amountOfGroups; | ||
return; | ||
} | ||
|
||
|
||
const newSubCommandBlockArray = [...step.subCommandBlocks]; | ||
|
||
for (let i = step.subCommandBlocks.length; i < amountOfGroups; i++) { | ||
newSubCommandBlockArray.push({ | ||
labelId: generateRandomCharacters(5), | ||
entries: [] | ||
}); | ||
} | ||
|
||
step.subCommandBlocks = newSubCommandBlockArray | ||
}, | ||
subCommandBlockLabelAsync: (queries, commandBlock, labelId) => { | ||
return Promise.resolve(''); | ||
}, | ||
awaitCodeHandledInternally: true, | ||
toScriptCode: (step, context, userData) => { | ||
const awaitCode = step.awaited ? 'await ' : ''; | ||
|
||
const functionNames: string[] = []; | ||
|
||
const generatedFunctions = generateCodeByStep(step, context, userData).map(g => { | ||
|
||
const functionName = `randomGroup_${g.subCommand.labelId}`; | ||
|
||
functionNames.push(functionName); | ||
|
||
return `async function ${functionName}() { | ||
${g.generatedScript} | ||
}`; | ||
}).join('\r\n'); | ||
|
||
return ` | ||
${awaitCode} (() => { | ||
${generatedFunctions} | ||
const functionsToChoose = [${functionNames.join(',')}]; | ||
return utils.randomElement(functionsToChoose)(); | ||
})();`; | ||
}, | ||
commandEntryLabelAsync: (queries, payload, parentStep) => { | ||
return 'trigger any of these command groups randomly'; | ||
} | ||
}; | ||
} |
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
Oops, something went wrong.
a1df1cb
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
meme-box – ./
meme-box.vercel.app
meme-box-negu3.vercel.app
meme-box-git-develop-negu3.vercel.app