Skip to content

Commit 60d50ad

Browse files
Installer won't reset web application when updating
1 parent 175d139 commit 60d50ad

File tree

4 files changed

+10
-8
lines changed

4 files changed

+10
-8
lines changed

import.bat

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
:: Latest NodeJS & Caché 2016.1+ IS REQUIRED TO PROCEED
66
@echo off
77

8-
:: CHANGE THIS PATH TO YOUR CACHÉ INSTALLATION PATH ON WINDOWS
9-
set CACHE_DIR=C:\Program Files\InterSystems\Cache20162
8+
:: CHANGE THIS PATH TO YOUR CACHÉ INSTALLATION PATH ON WINDOWS (folder that contains bin, CSP, mgr and other folders)
9+
set CACHE_DIR=C:\Program Files\InterSystems\Ensemble
1010
:: NAMESPACE TO IMPORT PACKAGE TO
1111
set NAMESPACE=SAMPLES
1212

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "cache-visual-editor",
33
"printableName": "Cache Visual Editor",
44
"packageName": "VisualEditor",
5-
"version": "0.9.8",
5+
"version": "0.9.9",
66
"description": "Visual class editor for InterSystems Caché",
77
"main": "index.js",
88
"keywords": [

source/cache/Installer.cls

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,14 @@ ClassMethod RegisterWebApplication(name As %String, spec) As %Status
3333
$$$log("WEB application """_name_""" is created.")
3434
} else {
3535
$$$log("Unable to create WEB-application """_name_"""!")
36-
set st = $$$ERROR()
36+
set st = $$$ERROR($$$GeneralError, "Unable to create WEB-application """_name_""".")
3737
}
3838
} else {
3939
$$$log("WEB-application """_name_""" already exists, checking it's DispatchClass...")
4040
do ##class(Security.Applications).Get(name, .props)
4141
if (props("DispatchClass") '= ..#DispatchClass) && (name = ..#RESTAppName) {
4242
$$$log("WARNING! WEB application """_name_""" exists but does not refer to " _ ..#DispatchClass _ ". Please, set correct dispatch class for this " _ "application or create the WEB-application manually.")
43-
set st = $$$ERROR()
43+
set st = $$$ERROR($$$GeneralError, "Dispatch class of web application """_name_""" does not refer to " _ ..#DispatchClass)
4444
} else {
4545
$$$log("WEB application """_name_""" already exists, so it should be ready to use.")
4646
}
@@ -94,15 +94,17 @@ ClassMethod CreateProjection() As %Status
9494
}
9595

9696
/// This method is invoked when a class is 'uncompiled'.
97-
ClassMethod RemoveProjection() As %Status
97+
ClassMethod RemoveProjection(cls As %String, ByRef params, recompile As %Boolean) As %Status
9898
{
9999
do ..Init()
100100
#define log(%s) set installLog = installLog _ $case(installLog = "", 1: "", :$C(10)) _ %s write !, %s
101101
#define testError(%e) if ($$$ISERR(%e)) { set errorOccurred = 1 }
102102

103103
$$$log("Uninstalling <!-- @echo package.printableName --> from " _ $Namespace)
104104

105-
do ..DeleteWebApplication(..#RESTAppName)
105+
if ('recompile) {
106+
do ..DeleteWebApplication(..#RESTAppName)
107+
}
106108

107109
$$$log("Uninstalling is complete!")
108110

source/cache/REST/Router.cls

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/// [ <!-- @echo package.printableName --> v<!-- @echo package.version --> ]
22
/// This is a REST WEB application entry point for <!-- @echo package.printableName --> WEB application.
3-
Class VisualEditor.REST.Router Extends VisualEditor.REST.Content [ CompileAfter = VisualEditor.REST.StaticContent ] {
3+
Class VisualEditor.REST.Router Extends VisualEditor.REST.Content [ CompileAfter = VisualEditor.REST.StaticLibJS ] {
44

55
XData UrlMap
66
{

0 commit comments

Comments
 (0)