feat: Step Function + small fixes + more services + color matching the services
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
import {describe, expect, test} from 'bun:test'
|
||||
import {awsWorkflowsSchema} from './workflowsSchema'
|
||||
|
||||
describe('awsWorkflowsSchema', () => {
|
||||
test('requires a name and truthfully exposes the optional ASL definition', () => {
|
||||
const schema = awsWorkflowsSchema()
|
||||
|
||||
expect(schema.fields.map((field) => field.name)).toEqual(['name', 'definition'])
|
||||
expect(schema.fields[0]?.required).toBe(true)
|
||||
expect(schema.fields[1]).toMatchObject({
|
||||
name: 'definition',
|
||||
type: 'textarea',
|
||||
required: false,
|
||||
span: true,
|
||||
})
|
||||
})
|
||||
})
|
||||
@@ -40,29 +40,17 @@ export function awsWorkflowsSchema(): ServiceSchema {
|
||||
message: 'Up to 80 characters: letters, digits, hyphens and underscores.',
|
||||
},
|
||||
},
|
||||
{
|
||||
name: 'roleArn',
|
||||
label: 'Execution Role ARN',
|
||||
type: 'text',
|
||||
required: true,
|
||||
group: 'Required',
|
||||
description: 'The IAM role the state machine assumes when it runs.',
|
||||
validation: {
|
||||
pattern: '^arn:aws[a-z-]*:iam::\\d{12}:role/.+$',
|
||||
message: 'Must be an IAM role ARN, e.g. arn:aws:iam::000000000000:role/my-role.',
|
||||
},
|
||||
},
|
||||
{
|
||||
name: 'definition',
|
||||
label: 'Definition (Amazon States Language)',
|
||||
label: 'ASL Definition',
|
||||
type: 'textarea',
|
||||
required: true,
|
||||
required: false,
|
||||
group: 'Optional',
|
||||
span: true,
|
||||
group: 'Required',
|
||||
description: 'JSON with StartAt and States, e.g. {"StartAt":"Done","States":{"Done":{"Type":"Succeed"}}}',
|
||||
description: 'Complete Amazon States Language JSON. When omitted, a valid starter workflow is created.',
|
||||
},
|
||||
],
|
||||
actions: ['list', 'create', 'delete', 'inspect'],
|
||||
actions: ['list', 'create', 'update', 'delete', 'inspect'],
|
||||
capabilities: {
|
||||
resourceActions: [
|
||||
{name: 'list', label: 'List state machines', enabled: true, status: 'available', runtimeRequired: true},
|
||||
@@ -74,6 +62,7 @@ export function awsWorkflowsSchema(): ServiceSchema {
|
||||
status: 'available',
|
||||
runtimeRequired: true,
|
||||
},
|
||||
{name: 'update', label: 'Update definition', enabled: true, status: 'available', runtimeRequired: true},
|
||||
{name: 'delete', label: 'Delete', enabled: true, status: 'available', runtimeRequired: true},
|
||||
],
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user