1
0
mirror of https://github.com/sasjs/adapter.git synced 2026-01-14 15:40:06 +00:00

Merge branch 'master' of https://github.com/sasjs/adapter into issue17

This commit is contained in:
Krishna Acondy
2020-07-22 19:57:10 +01:00
30 changed files with 2971 additions and 56 deletions

View File

@@ -6,7 +6,7 @@ name: SASjs Build and Publish
on: on:
push: push:
branches: branches:
- main - master
jobs: jobs:
build: build:

View File

@@ -16,7 +16,7 @@ Tests are run using cypress. Before running tests, you need to define the follow
``` ```
filename mc url "https://raw.githubusercontent.com/macropeople/macrocore/main/mc_all.sas?_=1"; filename mc url "https://raw.githubusercontent.com/sasjs/core/main/all.sas";
%inc mc; %inc mc;
filename ft15f001 temp; filename ft15f001 temp;
parmcards4; parmcards4;
@@ -40,18 +40,13 @@ parmcards4;
# Viya # Viya
``` ```
filename mc url "https://raw.githubusercontent.com/macropeople/macrocore/main/mc_all.sas"; filename mc url "https://raw.githubusercontent.com/sasjs/core/main/all.sas";
%inc mc; %inc mc;
filename ft15f001 temp; filename ft15f001 temp;
parmcards4; parmcards4;
%webout(FETCH)
%webout(OPEN) %webout(OPEN)
%global sasjs_tables;
%let sasjs_tables=&sasjs_tables;
%put &=sasjs_tables;
%let sasjs_tables=&sasjs_tables;
%macro x(); %macro x();
%global sasjs_tables;
%do i=1 %to %sysfunc(countw(&sasjs_tables)); %do i=1 %to %sysfunc(countw(&sasjs_tables));
%let table=%scan(&sasjs_tables,&i); %let table=%scan(&sasjs_tables,&i);
%webout(OBJ,&table) %webout(OBJ,&table)
@@ -60,13 +55,11 @@ parmcards4;
%x() %x()
%webout(CLOSE) %webout(CLOSE)
;;;; ;;;;
%mv_createwebservice(path=/Public/app/common,name=sendObj) %mp_createwebservice(path=/Public/app/common,name=sendObj)
filename ft15f001 temp; filename ft15f001 temp;
parmcards4; parmcards4;
%webout(FETCH)
%webout(OPEN) %webout(OPEN)
%global sasjs_tables;
%let sasjs_tables=&sasjs_tables;
%put &=sasjs_tables;
%macro x(); %macro x();
%do i=1 %to %sysfunc(countw(&sasjs_tables)); %do i=1 %to %sysfunc(countw(&sasjs_tables));
%let table=%scan(&sasjs_tables,&i); %let table=%scan(&sasjs_tables,&i);
@@ -76,7 +69,7 @@ parmcards4;
%x() %x()
%webout(CLOSE) %webout(CLOSE)
;;;; ;;;;
%mv_createwebservice(path=/Public/app/common,name=sendArr) %mp_createwebservice(path=/Public/app/common,name=sendArr)
``` ```
The above services will return anything you send. To run the tests simply launch `npm run cypress`. The above services will return anything you send. To run the tests simply launch `npm run cypress`.

View File

@@ -10,13 +10,13 @@ SASjs is a open-source framework for building Web Apps on SAS® platforms. You c
3 - Reference directly from the CDN - in which case click [here](https://www.jsdelivr.com/package/npm/@sasjs/adapter?tab=collection) and select "SRI" to get the script tag with the integrity hash. 3 - Reference directly from the CDN - in which case click [here](https://www.jsdelivr.com/package/npm/@sasjs/adapter?tab=collection) and select "SRI" to get the script tag with the integrity hash.
If you are short on time and just need to build an app quickly, then check out [this video](https://vimeo.com/393161794) and the [react-seed-app](https://github.com/macropeople/react-seed-app) which provides some boilerplate. If you are short on time and just need to build an app quickly, then check out [this video](https://vimeo.com/393161794) and the [react-seed-app](https://github.com/sasjs/react-seed-app) which provides some boilerplate.
For more information on building web apps with SAS, check out [sasjs.io](https://sasjs.io) For more information on building web apps with SAS, check out [sasjs.io](https://sasjs.io)
## None of this makes sense. How do I build an app with it? ## None of this makes sense. How do I build an app with it?
Ok ok. Deploy this [example.html](https://github.com/sasjs/adapter/blob/main/example.html) file to your web server, and update `servertype` to `SAS9` or `SASVIYA` depending on your backend. Ok ok. Deploy this [example.html](https://raw.githubusercontent.com/sasjs/adapter/master/example.html) file to your web server, and update `servertype` to `SAS9` or `SASVIYA` depending on your backend.
The backend part can be deployed as follows: The backend part can be deployed as follows:

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -1,12 +1,12 @@
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<meta charset="utf-8" http-equiv="X-UA-Compatible" content="IE=edge" /> <script src="https://cdn.jsdelivr.net/combine/npm/chart.js@2.9.3,npm/jquery@3.5.1,npm/@sasjs/adapter@1.0.6"></script>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous">
<script src="https://cdn.jsdelivr.net/combine/npm/chart.js@2.9.3,npm/jquery@3.5.1,npm/@sasjs/adapter@1"></script>
<script> <script>
var sasJs = new SASjs.default({appLoc: "/Products/demo/readme" var sasJs = new SASjs.default({
,serverType:"SAS9", debug: "false" appLoc: "/Public/app/readme"
,serverType:"SAS9"
,debug: false
}); });
function initSasJs() { function initSasJs() {
$('#loading-spinner').show() $('#loading-spinner').show()
@@ -70,6 +70,8 @@
}); });
} }
</script> </script>
<meta charset="utf-8" http-equiv="X-UA-Compatible" content="IE=edge" />
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous">
</head> </head>
<body> <body>
<div class="container-fluid" style="text-align: center; margin-top: 10px;"> <div class="container-fluid" style="text-align: center; margin-top: 10px;">

18
package-lock.json generated
View File

@@ -1648,9 +1648,9 @@
} }
}, },
"@types/jest": { "@types/jest": {
"version": "26.0.4", "version": "26.0.5",
"resolved": "https://registry.npmjs.org/@types/jest/-/jest-26.0.4.tgz", "resolved": "https://registry.npmjs.org/@types/jest/-/jest-26.0.5.tgz",
"integrity": "sha512-4fQNItvelbNA9+sFgU+fhJo8ZFF+AS4Egk3GWwCW2jFtViukXbnztccafAdLhzE/0EiCogljtQQXP8aQ9J7sFg==", "integrity": "sha512-heU+7w8snfwfjtcj2H458aTx3m5unIToOJhx75ebHilBiiQ39OIdA18WkG4LP08YKeAoWAGvWg8s+22w/PeJ6w==",
"dev": true, "dev": true,
"requires": { "requires": {
"jest-diff": "^25.2.1", "jest-diff": "^25.2.1",
@@ -14874,9 +14874,9 @@
} }
}, },
"ts-loader": { "ts-loader": {
"version": "7.0.5", "version": "8.0.1",
"resolved": "https://registry.npmjs.org/ts-loader/-/ts-loader-7.0.5.tgz", "resolved": "https://registry.npmjs.org/ts-loader/-/ts-loader-8.0.1.tgz",
"integrity": "sha512-zXypEIT6k3oTc+OZNx/cqElrsbBtYqDknf48OZos0NQ3RTt045fBIU8RRSu+suObBzYB355aIPGOe/3kj9h7Ig==", "integrity": "sha512-I9Nmly0ufJoZRMuAT9d5ijsC2B7oSPvUnOJt/GhgoATlPGYfa17VicDKPcqwUCrHpOkCxr/ybLYwbnS4cOxmvQ==",
"dev": true, "dev": true,
"requires": { "requires": {
"chalk": "^2.3.0", "chalk": "^2.3.0",
@@ -15073,9 +15073,9 @@
} }
}, },
"typescript": { "typescript": {
"version": "3.9.6", "version": "3.9.7",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-3.9.6.tgz", "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.9.7.tgz",
"integrity": "sha512-Pspx3oKAPJtjNwE92YS05HQoY7z2SFyOpHo9MqJor3BXAGNaPUs83CuVp9VISFkSjyRfiTpmKuAYGJB7S7hOxw==", "integrity": "sha512-BLbiRkiBzAwsjut4x/dsibSTB6yWpwT5qWmC2OfuCg3GgVQCSgMs4vEctYPhsaGtd0AeuuHMkjZ2h2WG8MSzRw==",
"dev": true "dev": true
}, },
"uglify-js": { "uglify-js": {

View File

@@ -22,9 +22,6 @@
{ {
"pkgRoot": "/build" "pkgRoot": "/build"
} }
],
"branches": [
"main"
] ]
}, },
"keywords": [ "keywords": [
@@ -40,7 +37,7 @@
"license": "ISC", "license": "ISC",
"devDependencies": { "devDependencies": {
"@types/isomorphic-fetch": "0.0.35", "@types/isomorphic-fetch": "0.0.35",
"@types/jest": "^26.0.4", "@types/jest": "^26.0.5",
"cp": "^0.2.0", "cp": "^0.2.0",
"jest": "^25.5.4", "jest": "^25.5.4",
"path": "^0.12.7", "path": "^0.12.7",
@@ -48,13 +45,13 @@
"rimraf": "^3.0.2", "rimraf": "^3.0.2",
"semantic-release": "^17.1.1", "semantic-release": "^17.1.1",
"ts-jest": "^25.5.1", "ts-jest": "^25.5.1",
"ts-loader": "^7.0.5", "ts-loader": "^8.0.1",
"tslint": "^6.1.2", "tslint": "^6.1.2",
"tslint-config-prettier": "^1.18.0", "tslint-config-prettier": "^1.18.0",
"typedoc": "^0.17.8", "typedoc": "^0.17.8",
"typedoc-neo-theme": "^1.0.9", "typedoc-neo-theme": "^1.0.9",
"typedoc-plugin-external-module-name": "^4.0.3", "typedoc-plugin-external-module-name": "^4.0.3",
"typescript": "^3.9.6", "typescript": "^3.9.7",
"uglifyjs-webpack-plugin": "^2.2.0", "uglifyjs-webpack-plugin": "^2.2.0",
"webpack": "^4.43.0", "webpack": "^4.43.0",
"webpack-cli": "^3.3.12" "webpack-cli": "^3.3.12"