-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: ACNA-3098 - allow action invocation of ES Modules / Typescript (#…
…87) * use dist folder (webpacked action source) * add ESM action, Typescript action * fix jsdoc * add eslint config * support DUMP_PARAMS input * add comment regarding ts-loader * add source-map output for webpack, add .vscode/launch.json * remove cached webpacked code * use aio-lib-runtime to build the app * add actions watcher * update README * fix unit tests * mock actionsWatcher * completed 100% coverage * specify version of @adobe/aio-lib-runtime for buildActions emptyDist param * run-dev tests code cleanup * fixed actions-watcher tests leaks * fix: require.cache cleanup, always build latest * require aio-lib-runtime with optimized builds --------- Co-authored-by: Jesse MacFadyen <purplecabbage@gmail.com>
- Loading branch information
1 parent
65d1190
commit 98d4e2a
Showing
21 changed files
with
1,087 additions
and
110 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
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,10 @@ | ||
{ | ||
"settings": { | ||
"jsdoc": { | ||
"ignorePrivate": true | ||
} | ||
}, | ||
"parserOptions": { | ||
"ecmaVersion": "latest" | ||
} | ||
} |
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,31 @@ | ||
{ | ||
"version": "0.3.0", | ||
"configurations": [ | ||
{ | ||
"name": "App Builder: debug actions", | ||
"type": "node-terminal", | ||
"request": "launch", | ||
"command": "aio app dev", | ||
"skipFiles": [ | ||
"<node_internals>/**/*.js" | ||
] | ||
}, { | ||
"name": "App Builder: debug full stack", | ||
"type": "node-terminal", | ||
"request": "launch", | ||
"command": "aio app dev", | ||
"sourceMapPathOverrides": { | ||
"/__parcel_source_root/*": "${webRoot}/*" | ||
}, | ||
"skipFiles": [ | ||
"<node_internals>/**/*.js" | ||
], | ||
"serverReadyAction": { | ||
"pattern": "server running on port : ([0-9]+)", | ||
"uriFormat": "https://localhost:%s", | ||
"action": "debugWithChrome", | ||
"webRoot": "${workspaceFolder}" | ||
} | ||
} | ||
] | ||
} |
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
26 changes: 26 additions & 0 deletions
26
e2e/test-project/src/dx-excshell-1/actions/esmAction/index.js
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,26 @@ | ||
/* | ||
Copyright 2024 Adobe. All rights reserved. | ||
This file is licensed to you under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. You may obtain a copy | ||
of the License at http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software distributed under | ||
the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS | ||
OF ANY KIND, either express or implied. See the License for the specific language | ||
governing permissions and limitations under the License. | ||
*/ | ||
|
||
/** | ||
* The main function. | ||
* | ||
* @param {object} params the parameters | ||
* @returns {object} runtime response object | ||
*/ | ||
export async function main (params) { | ||
const response = { | ||
statusCode: 200, | ||
params, | ||
body: 'you were successful with esm' | ||
} | ||
return response | ||
} |
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
25 changes: 25 additions & 0 deletions
25
e2e/test-project/src/dx-excshell-1/actions/tsAction/index.ts
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,25 @@ | ||
/* | ||
Copyright 2024 Adobe. All rights reserved. | ||
This file is licensed to you under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. You may obtain a copy | ||
of the License at http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software distributed under | ||
the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS | ||
OF ANY KIND, either express or implied. See the License for the specific language | ||
governing permissions and limitations under the License. | ||
*/ | ||
|
||
/** | ||
* The main function. | ||
* | ||
* @returns {object} runtime response object | ||
*/ | ||
export function main(params: object) { | ||
const response = { | ||
statusCode: 200, | ||
params, | ||
body: 'you were successful with typescript' | ||
} | ||
return response | ||
} |
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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"include": ["src/dx-excshell-1/actions/tsAction"], | ||
"exclude": ["node_modules", "dist"] | ||
} |
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
Oops, something went wrong.