Skip to content

Commit

Permalink
Revert "fix(automate): drop specklecon function templates (#3503)" (#…
Browse files Browse the repository at this point in the history
…3504)

This reverts commit adeb529.
  • Loading branch information
cdriesler authored Nov 16, 2024
1 parent 423350e commit 566bec5
Show file tree
Hide file tree
Showing 10 changed files with 1,015 additions and 2 deletions.
1 change: 0 additions & 1 deletion packages/frontend-2/lib/common/generated/gql/gql.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import type { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-
* 3. It does not support dead code elimination, so it will add unused operations.
*
* Therefore it is highly recommended to use the babel or swc plugin for production.
* Learn more about it here: https://the-guild.dev/graphql/codegen/plugins/presets/preset-client#reducing-bundle-size
*/
const documents = {
"\n fragment AuthLoginWithEmailBlock_PendingWorkspaceCollaborator on PendingWorkspaceCollaborator {\n id\n email\n user {\n id\n }\n }\n": types.AuthLoginWithEmailBlock_PendingWorkspaceCollaboratorFragmentDoc,
Expand Down
2 changes: 2 additions & 0 deletions packages/frontend-2/lib/common/generated/gql/graphql.ts
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,8 @@ export type AutomateFunctionTemplate = {
};

export enum AutomateFunctionTemplateLanguage {
Demonstration = 'DEMONSTRATION',
Demonstrationpython = 'DEMONSTRATIONPYTHON',
DotNet = 'DOT_NET',
Python = 'PYTHON',
Typescript = 'TYPESCRIPT'
Expand Down
986 changes: 986 additions & 0 deletions packages/frontend-2/public/images/functions/specklecon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions packages/server/assets/automate/typedefs/automate.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,8 @@ enum AutomateFunctionTemplateLanguage {
TYPESCRIPT
PYTHON
DOT_NET
DEMONSTRATION
DEMONSTRATIONPYTHON
}

type AutomateFunctionTemplate {
Expand Down
4 changes: 3 additions & 1 deletion packages/server/modules/automate/clients/executionEngine.ts
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,9 @@ export const triggerAutomationRun = async (params: {
export enum ExecutionEngineFunctionTemplateId {
Python = 'python',
DotNet = '.net',
TypeScript = 'typescript'
TypeScript = 'typescript',
Demonstration = 'demonstration',
DemonstrationPython = 'demonstrationpython'
}

export type CreateFunctionBody<AP extends AuthCodePayload = AuthCodePayloadWithOrigin> =
Expand Down
12 changes: 12 additions & 0 deletions packages/server/modules/automate/helpers/executionEngine.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,18 @@ export const functionTemplateRepos = <const>[
title: '.NET / C#',
url: 'https://github.com/specklesystems/SpeckleAutomateDotnetExample',
logo: '/images/functions/dotnet.svg'
},
{
id: AutomateFunctionTemplateLanguage.Demonstration,
title: 'SpeckleCon 2024 - Thermal',
url: 'https://github.com/specklesystems/Thermal-Resistance-Checker-Template',
logo: '/images/functions/specklecon.svg'
},
{
id: AutomateFunctionTemplateLanguage.Demonstrationpython,
title: 'SpeckleCon 2024 - QAQC',
url: 'https://github.com/specklesystems/SpeckleConWorkshop-QAQC',
logo: '/images/functions/specklecon.svg'
}
]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,10 @@ const mapGqlTemplateIdToExecEngineTemplateId = (
return ExecutionEngineFunctionTemplateId.DotNet
case AutomateFunctionTemplateLanguage.Typescript:
return ExecutionEngineFunctionTemplateId.TypeScript
case AutomateFunctionTemplateLanguage.Demonstration:
return ExecutionEngineFunctionTemplateId.Demonstration
case AutomateFunctionTemplateLanguage.Demonstrationpython:
return ExecutionEngineFunctionTemplateId.DemonstrationPython
default:
throw new Error('Unknown template id')
}
Expand Down
2 changes: 2 additions & 0 deletions packages/server/modules/core/graph/generated/graphql.ts
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,8 @@ export type AutomateFunctionTemplate = {
};

export enum AutomateFunctionTemplateLanguage {
Demonstration = 'DEMONSTRATION',
Demonstrationpython = 'DEMONSTRATIONPYTHON',
DotNet = 'DOT_NET',
Python = 'PYTHON',
Typescript = 'TYPESCRIPT'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,8 @@ export type AutomateFunctionTemplate = {
};

export enum AutomateFunctionTemplateLanguage {
Demonstration = 'DEMONSTRATION',
Demonstrationpython = 'DEMONSTRATIONPYTHON',
DotNet = 'DOT_NET',
Python = 'PYTHON',
Typescript = 'TYPESCRIPT'
Expand Down
2 changes: 2 additions & 0 deletions packages/server/test/graphql/generated/graphql.ts
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,8 @@ export type AutomateFunctionTemplate = {
};

export enum AutomateFunctionTemplateLanguage {
Demonstration = 'DEMONSTRATION',
Demonstrationpython = 'DEMONSTRATIONPYTHON',
DotNet = 'DOT_NET',
Python = 'PYTHON',
Typescript = 'TYPESCRIPT'
Expand Down

0 comments on commit 566bec5

Please sign in to comment.