Summary
clasp deploy does not set WebAppConfig (access permission, executeAs) even though the Google Apps Script API supports it. This forces users to manually configure access permissions via the Script Editor UI for every new deployment.
Current Behavior
clasp deploy -d "My deployment"
# Creates deployment but access = MYSELF (default)
# User must open Script Editor > Deploy > Manage > Edit access
Expected Behavior
clasp deploy -d "My deployment" --access ANYONE --executeAs USER_DEPLOYING
# Creates deployment with specified access permission
Or via appsscript.json:
{
"webapp": {
"access": "ANYONE",
"executeAs": "USER_DEPLOYING"
}
}
Technical Analysis
The Apps Script API supports WebAppConfig in entryPoints:
// API supports this
{
deploymentConfig: { versionNumber, manifestFileName },
entryPoints: [{
entryPointType: 'WEB_APP',
webApp: {
entryPointConfig: {
access: 'ANYONE_ANONYMOUS',
executeAs: 'USER_DEPLOYING'
}
}
}]
}
However, clasp's implementation only sends:
// What clasp currently sends
{
description,
versionNumber,
manifestFileName: 'appsscript'
// entryPoints is missing
}
Related Issues
Proposed Solution
- Read
webapp config from appsscript.json
- Add CLI options:
--access and --executeAs
- Pass
entryPoints to script.projects.deployments.create()
I'm willing to submit a PR if this approach is acceptable.
Environment
- clasp version: latest
- Discovered while building a CI/CD pipeline for GAS Web Apps
Summary
clasp deploydoes not setWebAppConfig(access permission, executeAs) even though the Google Apps Script API supports it. This forces users to manually configure access permissions via the Script Editor UI for every new deployment.Current Behavior
Expected Behavior
Or via
appsscript.json:{ "webapp": { "access": "ANYONE", "executeAs": "USER_DEPLOYING" } }Technical Analysis
The Apps Script API supports
WebAppConfiginentryPoints:However, clasp's implementation only sends:
Related Issues
Proposed Solution
webappconfig fromappsscript.json--accessand--executeAsentryPointstoscript.projects.deployments.create()I'm willing to submit a PR if this approach is acceptable.
Environment