-
Notifications
You must be signed in to change notification settings - Fork 33
feat: add appConfig value to auditUser cdn deploys #888
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 2 commits
7b544aa
87862aa
160f55e
b6384f9
2d1d3b0
344095d
c4ea3be
e219dc5
cbe32e0
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -26,7 +26,7 @@ const { | |
| const rtLib = require('@adobe/aio-lib-runtime') | ||
| const LogForwarding = require('../../lib/log-forwarding') | ||
| const { sendAppAssetsDeployedAuditLog, sendAppDeployAuditLog } = require('../../lib/audit-logger') | ||
| const { setRuntimeApiHostAndAuthHandler, getAccessToken } = require('../../lib/auth-helper') | ||
| const { setRuntimeApiHostAndAuthHandler, getAccessToken, getTokenData } = require('../../lib/auth-helper') | ||
| const logActions = require('../../lib/log-actions') | ||
|
|
||
| const PRE_DEPLOY_EVENT_REG = 'pre-deploy-event-reg' | ||
|
|
@@ -68,6 +68,8 @@ class Deploy extends BuildCommand { | |
|
|
||
| if (cliDetails?.accessToken) { | ||
| try { | ||
| // store user id from token data for cdn deploy audit metadata | ||
| appInfo.auditUserId = getTokenData(cliDetails.accessToken)?.user_id | ||
| // send audit log at start (don't wait for deployment to finish) | ||
| await sendAppDeployAuditLog({ | ||
| accessToken: cliDetails?.accessToken, | ||
|
|
@@ -131,7 +133,7 @@ class Deploy extends BuildCommand { | |
| for (let i = 0; i < keys.length; ++i) { | ||
| const k = keys[i] | ||
| const v = setRuntimeApiHostAndAuthHandler(values[i]) | ||
|
|
||
| v.auditUserId = appInfo.auditUserId | ||
|
||
| await this.deploySingleConfig({ name: k, config: v, originalConfig: values[i], flags, spinner }) | ||
| if (cliDetails?.accessToken && v.app.hasFrontend && flags['web-assets']) { | ||
| const opItems = getFilesCountWithExtension(v.web.distProd) | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.