Package com.vaadin.flow.server.frontend
Class TaskUpdateSettingsFile
java.lang.Object
com.vaadin.flow.server.frontend.TaskUpdateSettingsFile
- All Implemented Interfaces:
FallibleCommand,Serializable
Creates a vaadin-dev-server-settings.json file for use with dev server
configuration.
For internal use only. May be renamed or removed in a future release.
- Since:
- 9.0
- See Also:
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoidexecute()Runs the given command.static StringgetOfflinePath(com.vaadin.flow.server.PwaConfiguration pwaConfiguration, File npmFolder) Computes the value for theOFFLINE_PATHconstant that Vite compiles into the service worker.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.vaadin.flow.server.frontend.FallibleCommand
setGeneratedFileSupport
-
Field Details
-
DEV_SETTINGS_FILE
- See Also:
-
-
Method Details
-
execute
public void execute()Description copied from interface:FallibleCommandRuns the given command.If execution fails then the command may throw an exception which may give a message and a cause of the failure.
- Specified by:
executein interfaceFallibleCommand
-
getOfflinePath
public static String getOfflinePath(com.vaadin.flow.server.PwaConfiguration pwaConfiguration, File npmFolder) Computes the value for theOFFLINE_PATHconstant that Vite compiles into the service worker.Vite substitutes the value verbatim, so the path is wrapped in single quotes to make it a JavaScript expression. Bundle validation compares this value against the one recorded in the bundle's
stats.json, so both sides must derive it from this method.For internal use only. May be renamed or removed in a future release.
- Parameters:
pwaConfiguration- the PWA configuration of the application, notnullnpmFolder- the project root, used to relativize an absolute offline path- Returns:
- the offline path wrapped in single quotes
-