powerplatform-vscode
powerplatform-vscode copied to clipboard
NPS Survey Form
This pull request includes changes primarily aimed at refactoring the handling of web extension scripts and the addition of a new dependency. The changes can be grouped into two main categories:
- Refactoring of the script fetching and handling mechanism in the web extension context.
- Addition of new dependencies and configuration changes in the package and build setup.
The most important changes include:
Refactoring of script handling:
-
src/web/client/WebExtensionContext.ts: The methodgetWorkerScriptis renamed tofetchLocalScriptContentand all references toworkerUrlare changed toscriptUrl. The telemetry event names are also updated accordingly. -
src/web/client/common/constants.ts: The constantWEB_EXTENSION_FETCH_WORKER_SCRIPT_FAILEDis replaced byWEB_EXTENSION_FETCH_LOCAL_SCRIPT_CONTENT_FAILED. -
src/web/client/extension.ts: The call togetWorkerScriptis replaced withfetchLocalScriptContent. -
src/web/client/telemetry/constants.ts: New telemetry event names related to fetching local script content are added. -
src/web/client/webViews/NPSWebView.ts: The method_getHtmlis replaced byinitializeWebViewwhich handles errors and disposes the webview panel if necessary. The HTML content is updated to use the new script handling method and the survey SDK. [1] [2]
Addition of new dependencies and configuration changes:
-
.npmrc: A new npm registry is added. -
package.json: Thecopy-webpack-pluginand@gia/survey-sdkdependencies are added. [1] [2] -
webpack.config.js: Thecopy-webpack-pluginis required and used in thewebConfigto copy the survey SDK fromnode_modulesto thedist/mediadirectory. [1] [2]