From 9c08257a698fa08e07f8b5ab5fc6abdef0380aa1 Mon Sep 17 00:00:00 2001 From: Mihajlo Medjedovic Date: Mon, 24 Aug 2020 17:39:44 +0200 Subject: [PATCH] feat: added sasjs --- .gitignore | 4 ++- package-lock.json | 11 ++++----- package.json | 3 ++- sasjs/macros/.gitkeep | 0 sasjs/sasjsconfig.json | 41 +++++++++++++++++++++++++++++++ sasjs/services/common/appinit.sas | 15 +++++++++++ sasjs/services/common/getdata.sas | 16 ++++++++++++ 7 files changed, 82 insertions(+), 8 deletions(-) create mode 100644 sasjs/macros/.gitkeep create mode 100644 sasjs/sasjsconfig.json create mode 100644 sasjs/services/common/appinit.sas create mode 100644 sasjs/services/common/getdata.sas diff --git a/.gitignore b/.gitignore index 76add87..e35474d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,4 @@ node_modules -dist \ No newline at end of file +dist +sasjsbuild/ +.sasjsrc \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 6b3329d..7b3b5aa 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2886,6 +2886,11 @@ } } }, + "@sasjs/core": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@sasjs/core/-/core-1.4.0.tgz", + "integrity": "sha512-Y5ZKchZn7OTaT6+ed5faVsEJm4rV53K/HEqXZ8CpDDk8H0iNqM5LYccmjie57wQA3ZbO4itiO+VO58CDX2J2gg==" + }, "@schematics/angular": { "version": "9.1.12", "resolved": "https://registry.npmjs.org/@schematics/angular/-/angular-9.1.12.tgz", @@ -4526,12 +4531,6 @@ "simple-swizzle": "^0.2.2" } }, - "colors": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/colors/-/colors-1.1.2.tgz", - "integrity": "sha1-FopHAXVran9RoSzgyXv6KMCE7WM=", - "dev": true - }, "combined-stream": { "version": "1.0.8", "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", diff --git a/package.json b/package.json index 654de81..4ffa467 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,7 @@ "build-watch": "ng build --watch", "sync": "./node_modules/.bin/watch --wait=3 \"echo Account: ${npm_config_account} && npm run ${npm_config_serverType} --account=${npm_config_account} && echo 'App is synced!'\" dist", "sas9": "rsync -avhe ssh ./dist/* --delete ${npm_config_account}@sas.domain.com:/opt/sas/sas9/config/Lev1/Web/WebServer/htdocs/${npm_config_account}/ngseed", - "viya": "rsync -avhe ssh ./dist/* --delete ${npm_config_account}@sas.domain.com:/var/www/html/${npm_config_account}/ngseed" + "viya": "rsync -avhe ssh ./dist/* --delete ${npm_config_account}@sas.analytium.co.uk:/var/www/html/${npm_config_account}/ngseed" }, "private": true, "dependencies": { @@ -29,6 +29,7 @@ "@clr/icons": "4.0.0", "@clr/ui": "4.0.0", "@sasjs/adapter": "^1.3.8", + "@sasjs/core": "^1.3.0", "@webcomponents/webcomponentsjs": "^2.4.4", "moment": "^2.24.0", "rxjs": "~6.6.2", diff --git a/sasjs/macros/.gitkeep b/sasjs/macros/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/sasjs/sasjsconfig.json b/sasjs/sasjsconfig.json new file mode 100644 index 0000000..4cd6df0 --- /dev/null +++ b/sasjs/sasjsconfig.json @@ -0,0 +1,41 @@ +{ + "cmnMacros": [ + "macros" + ], + "cmnServices": [ + "services/common" + ], + "useMacroCore": true, + "targets": [ + { + "name": "viya", + "serverType": "SASVIYA", + "serverUrl": "YOURSASVIYASERVER", + "appLoc": "/Public/app/react-seed-app", + "buildOutputFileName": "myviyadeploy.sas", + "deployServicePack": true, + "tgtDeployScripts": [ + "sasjsbuild/myviyadeploy.sas" + ], + "assetPaths": [], + "streamWeb": false, + "streamWebFolder": "webv", + "webSourcePath": "dist" + }, + { + "name": "sas9", + "serverType": "SAS9", + "serverUrl": "YOURSAS9SERVER", + "appLoc": "/User Folders/&sysuserid/My Folder/react-seed-app", + "buildOutputFileName": "mysas9deploy.sas", + "tgtDeployVars": { + "serverName": "SASApp", + "repositoryName": "Foundation" + }, + "assetPaths": [], + "streamWeb": false, + "streamWebFolder": "web9", + "webSourcePath": "build" + } + ] +} diff --git a/sasjs/services/common/appinit.sas b/sasjs/services/common/appinit.sas new file mode 100644 index 0000000..3d5b67f --- /dev/null +++ b/sasjs/services/common/appinit.sas @@ -0,0 +1,15 @@ +/** + @file appinit.sas + @brief Initialisation service - runs on app startup + @details This is always the first service called when the app is opened. + +

Dependencies

+ +**/ + +proc sql; +create table areas as select distinct area + from sashelp.springs; +%webout(OPEN) +%webout(OBJ,areas) +%webout(CLOSE) diff --git a/sasjs/services/common/getdata.sas b/sasjs/services/common/getdata.sas new file mode 100644 index 0000000..05d540b --- /dev/null +++ b/sasjs/services/common/getdata.sas @@ -0,0 +1,16 @@ +/** + @file getdata.sas + @brief Get Data service - runs on app startup + @details This is always the first service called when the app is opened. + +

Dependencies

+ +**/ + +proc sql; +create table springs as select * from sashelp.springs + where area in (select area from areas); + +%webout(OPEN) +%webout(OBJ,springs) +%webout(CLOSE)