Skip to content

Commit

Permalink
fix: support object as action.input type (#36)
Browse files Browse the repository at this point in the history
  • Loading branch information
shazron committed Apr 11, 2024
1 parent 9a1fcd1 commit e3c27e3
Show file tree
Hide file tree
Showing 6 changed files with 51 additions and 2 deletions.
2 changes: 1 addition & 1 deletion schema/app.config.yaml.schema.json
Expand Up @@ -140,7 +140,7 @@
"type": "object",
"patternProperties": {
"^[^\n]+$": {
"type": ["string", "boolean"]
"type": ["string", "boolean", "object"]
}
},
"additionalProperties": false
Expand Down
4 changes: 4 additions & 0 deletions test/__fixtures__/app-exc-nui/app.config.yaml
Expand Up @@ -13,6 +13,10 @@ application:
runtime: 'nodejs:14'
inputs:
LOG_LEVEL: 'debug'
SOMETHING:
type: string
description: this is about something
default: ''
annotations:
'require-adobe-auth': true
final: true
Expand Down
4 changes: 4 additions & 0 deletions test/__fixtures__/app/app.config.yaml
Expand Up @@ -13,6 +13,10 @@ application:
runtime: 'nodejs:14'
inputs:
LOG_LEVEL: 'debug'
SOMETHING:
type: string
description: this is about something
default: ''
annotations:
'require-adobe-auth': true
final: true
Expand Down
4 changes: 4 additions & 0 deletions test/__fixtures__/legacy-app/manifest.yml
Expand Up @@ -8,6 +8,10 @@ packages:
runtime: 'nodejs:14'
inputs:
LOG_LEVEL: 'debug'
SOMETHING:
type: string
description: this is about something
default: ''
annotations:
'require-adobe-auth': true
final: true
Expand Down
32 changes: 32 additions & 0 deletions test/data-mocks/config-loader-include-index.js
Expand Up @@ -179,6 +179,22 @@ const appIncludeIndex = {
file: 'app.config.yaml',
key: 'application.runtimeManifest.packages.my-app-package.actions.action.inputs.LOG_LEVEL'
},
'application.runtimeManifest.packages.my-app-package.actions.action.inputs.SOMETHING': {
file: 'app.config.yaml',
key: 'application.runtimeManifest.packages.my-app-package.actions.action.inputs.SOMETHING'
},
'application.runtimeManifest.packages.my-app-package.actions.action.inputs.SOMETHING.default': {
file: 'app.config.yaml',
key: 'application.runtimeManifest.packages.my-app-package.actions.action.inputs.SOMETHING.default'
},
'application.runtimeManifest.packages.my-app-package.actions.action.inputs.SOMETHING.description': {
file: 'app.config.yaml',
key: 'application.runtimeManifest.packages.my-app-package.actions.action.inputs.SOMETHING.description'
},
'application.runtimeManifest.packages.my-app-package.actions.action.inputs.SOMETHING.type': {
file: 'app.config.yaml',
key: 'application.runtimeManifest.packages.my-app-package.actions.action.inputs.SOMETHING.type'
},
'application.runtimeManifest.packages.my-app-package.actions.action.runtime': {
file: 'app.config.yaml',
key: 'application.runtimeManifest.packages.my-app-package.actions.action.runtime'
Expand Down Expand Up @@ -622,6 +638,22 @@ const legacyIncludeIndex = {
file: 'manifest.yml',
key: 'packages.__APP_PACKAGE__.actions.action.inputs.LOG_LEVEL'
},
'application.runtimeManifest.packages.__APP_PACKAGE__.actions.action.inputs.SOMETHING': {
file: 'manifest.yml',
key: 'packages.__APP_PACKAGE__.actions.action.inputs.SOMETHING'
},
'application.runtimeManifest.packages.__APP_PACKAGE__.actions.action.inputs.SOMETHING.default': {
file: 'manifest.yml',
key: 'packages.__APP_PACKAGE__.actions.action.inputs.SOMETHING.default'
},
'application.runtimeManifest.packages.__APP_PACKAGE__.actions.action.inputs.SOMETHING.description': {
file: 'manifest.yml',
key: 'packages.__APP_PACKAGE__.actions.action.inputs.SOMETHING.description'
},
'application.runtimeManifest.packages.__APP_PACKAGE__.actions.action.inputs.SOMETHING.type': {
file: 'manifest.yml',
key: 'packages.__APP_PACKAGE__.actions.action.inputs.SOMETHING.type'
},
'application.runtimeManifest.packages.__APP_PACKAGE__.actions.action.runtime': {
file: 'manifest.yml',
key: 'packages.__APP_PACKAGE__.actions.action.runtime'
Expand Down
7 changes: 6 additions & 1 deletion test/data-mocks/config-loader.js
Expand Up @@ -45,7 +45,12 @@ function fullFakeRuntimeManifest (pathToActionFolder, pkgName1) {
web: 'yes',
runtime: 'nodejs:14',
inputs: {
LOG_LEVEL: 'debug'
LOG_LEVEL: 'debug',
SOMETHING: {
type: 'string',
description: 'this is about something',
default: ''
}
},
annotations: {
'require-adobe-auth': true,
Expand Down

0 comments on commit e3c27e3

Please sign in to comment.