Skip to content

Commit e3c27e3

Browse files
authored
fix: support object as action.input type (#36)
1 parent 9a1fcd1 commit e3c27e3

6 files changed

Lines changed: 51 additions & 2 deletions

File tree

schema/app.config.yaml.schema.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@
140140
"type": "object",
141141
"patternProperties": {
142142
"^[^\n]+$": {
143-
"type": ["string", "boolean"]
143+
"type": ["string", "boolean", "object"]
144144
}
145145
},
146146
"additionalProperties": false

test/__fixtures__/app-exc-nui/app.config.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ application:
1313
runtime: 'nodejs:14'
1414
inputs:
1515
LOG_LEVEL: 'debug'
16+
SOMETHING:
17+
type: string
18+
description: this is about something
19+
default: ''
1620
annotations:
1721
'require-adobe-auth': true
1822
final: true

test/__fixtures__/app/app.config.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ application:
1313
runtime: 'nodejs:14'
1414
inputs:
1515
LOG_LEVEL: 'debug'
16+
SOMETHING:
17+
type: string
18+
description: this is about something
19+
default: ''
1620
annotations:
1721
'require-adobe-auth': true
1822
final: true

test/__fixtures__/legacy-app/manifest.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ packages:
88
runtime: 'nodejs:14'
99
inputs:
1010
LOG_LEVEL: 'debug'
11+
SOMETHING:
12+
type: string
13+
description: this is about something
14+
default: ''
1115
annotations:
1216
'require-adobe-auth': true
1317
final: true

test/data-mocks/config-loader-include-index.js

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,22 @@ const appIncludeIndex = {
179179
file: 'app.config.yaml',
180180
key: 'application.runtimeManifest.packages.my-app-package.actions.action.inputs.LOG_LEVEL'
181181
},
182+
'application.runtimeManifest.packages.my-app-package.actions.action.inputs.SOMETHING': {
183+
file: 'app.config.yaml',
184+
key: 'application.runtimeManifest.packages.my-app-package.actions.action.inputs.SOMETHING'
185+
},
186+
'application.runtimeManifest.packages.my-app-package.actions.action.inputs.SOMETHING.default': {
187+
file: 'app.config.yaml',
188+
key: 'application.runtimeManifest.packages.my-app-package.actions.action.inputs.SOMETHING.default'
189+
},
190+
'application.runtimeManifest.packages.my-app-package.actions.action.inputs.SOMETHING.description': {
191+
file: 'app.config.yaml',
192+
key: 'application.runtimeManifest.packages.my-app-package.actions.action.inputs.SOMETHING.description'
193+
},
194+
'application.runtimeManifest.packages.my-app-package.actions.action.inputs.SOMETHING.type': {
195+
file: 'app.config.yaml',
196+
key: 'application.runtimeManifest.packages.my-app-package.actions.action.inputs.SOMETHING.type'
197+
},
182198
'application.runtimeManifest.packages.my-app-package.actions.action.runtime': {
183199
file: 'app.config.yaml',
184200
key: 'application.runtimeManifest.packages.my-app-package.actions.action.runtime'
@@ -622,6 +638,22 @@ const legacyIncludeIndex = {
622638
file: 'manifest.yml',
623639
key: 'packages.__APP_PACKAGE__.actions.action.inputs.LOG_LEVEL'
624640
},
641+
'application.runtimeManifest.packages.__APP_PACKAGE__.actions.action.inputs.SOMETHING': {
642+
file: 'manifest.yml',
643+
key: 'packages.__APP_PACKAGE__.actions.action.inputs.SOMETHING'
644+
},
645+
'application.runtimeManifest.packages.__APP_PACKAGE__.actions.action.inputs.SOMETHING.default': {
646+
file: 'manifest.yml',
647+
key: 'packages.__APP_PACKAGE__.actions.action.inputs.SOMETHING.default'
648+
},
649+
'application.runtimeManifest.packages.__APP_PACKAGE__.actions.action.inputs.SOMETHING.description': {
650+
file: 'manifest.yml',
651+
key: 'packages.__APP_PACKAGE__.actions.action.inputs.SOMETHING.description'
652+
},
653+
'application.runtimeManifest.packages.__APP_PACKAGE__.actions.action.inputs.SOMETHING.type': {
654+
file: 'manifest.yml',
655+
key: 'packages.__APP_PACKAGE__.actions.action.inputs.SOMETHING.type'
656+
},
625657
'application.runtimeManifest.packages.__APP_PACKAGE__.actions.action.runtime': {
626658
file: 'manifest.yml',
627659
key: 'packages.__APP_PACKAGE__.actions.action.runtime'

test/data-mocks/config-loader.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,12 @@ function fullFakeRuntimeManifest (pathToActionFolder, pkgName1) {
4545
web: 'yes',
4646
runtime: 'nodejs:14',
4747
inputs: {
48-
LOG_LEVEL: 'debug'
48+
LOG_LEVEL: 'debug',
49+
SOMETHING: {
50+
type: 'string',
51+
description: 'this is about something',
52+
default: ''
53+
}
4954
},
5055
annotations: {
5156
'require-adobe-auth': true,

0 commit comments

Comments
 (0)