mirror of
https://github.com/sasjs/core.git
synced 2025-12-24 19:51:19 +00:00
Compare commits
39 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
73f8cd8894 | ||
|
|
2808145302 | ||
|
|
815e5f3e0e | ||
|
|
843d6e5c2d | ||
|
|
b084f4e84b | ||
|
|
5b5116070e | ||
|
|
a2002db838 | ||
|
|
dc6bcdd69e | ||
|
|
c97dc9a16d | ||
|
|
ef669db622 | ||
|
|
26499d2058 | ||
|
|
17e5d0f0e0 | ||
|
|
fc9205e355 | ||
|
|
ce344fc8e2 | ||
|
|
40239c53d8 | ||
|
|
814ecec94f | ||
|
|
934c501fec | ||
|
|
091b2e28be | ||
|
|
d8ea29bf8c | ||
|
|
993dec4610 | ||
|
|
f905387d66 | ||
|
|
7512423b04 | ||
|
|
50e6d416a4 | ||
|
|
18b6cadce6 | ||
|
|
413743bbe6 | ||
|
|
fcafb1026e | ||
|
|
b8f24264d4 | ||
|
|
5eb87a754e | ||
|
|
3a5fd4bfc5 | ||
|
|
b7ae9a2737 | ||
|
|
4057ac4b2e | ||
|
|
fa0a6ab22d | ||
|
|
2ae7a60be5 | ||
|
|
0a24f3ff7b | ||
|
|
592f477063 | ||
|
|
a91db81894 | ||
|
|
236e7cc4c0 | ||
|
|
2b6882cb9c | ||
|
|
2a3071708a |
@@ -144,8 +144,18 @@
|
||||
"contributions": [
|
||||
"doc"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "rudvfaden",
|
||||
"name": "Rud Faden",
|
||||
"avatar_url": "https://avatars.githubusercontent.com/u/2445577?v=4",
|
||||
"profile": "http://rudvfaden.github.io/",
|
||||
"contributions": [
|
||||
"code"
|
||||
]
|
||||
}
|
||||
],
|
||||
"contributorsPerLine": 7,
|
||||
"skipCi": true
|
||||
"skipCi": true,
|
||||
"commitType": "docs"
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
# Ensure lint is passing
|
||||
LINT=`sasjs lint`
|
||||
if [[ "$LINT" != *"✔ All matched files use @sasjs/lint code style!" ]]; then
|
||||
if [[ "$LINT" != *"All matched files use @sasjs/lint code style!" ]]; then
|
||||
echo "$LINT"
|
||||
echo "To commit in spite of these warnings, use the -n parameter."
|
||||
exit 1
|
||||
|
||||
1
.gitattributes
vendored
Normal file
1
.gitattributes
vendored
Normal file
@@ -0,0 +1 @@
|
||||
* text=auto eol=lf
|
||||
3
.github/CONTRIBUTING.md
vendored
3
.github/CONTRIBUTING.md
vendored
@@ -27,5 +27,6 @@ To contribute:
|
||||
1. Create your feature branch (`git checkout -b myfeature`)
|
||||
2. Make your change
|
||||
3. Update the `all.sas` file (`python3 build.py`)
|
||||
4. Push and make a PR
|
||||
4. Commit using a [Conventional Commit](https://www.conventionalcommits.org)
|
||||
5. Push and make a PR
|
||||
|
||||
|
||||
22
.github/workflows/main.yml
vendored
22
.github/workflows/main.yml
vendored
@@ -13,10 +13,11 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm ci
|
||||
run: |
|
||||
npm ci
|
||||
|
||||
- name: Check code style (aborts if errors found)
|
||||
run: npx @sasjs/cli lint
|
||||
@@ -36,14 +37,15 @@ jobs:
|
||||
|
||||
- name: Install Open VPN
|
||||
run: |
|
||||
sudo apt install apt-transport-https
|
||||
sudo wget https://swupdate.openvpn.net/repos/openvpn-repo-pkg-key.pub
|
||||
sudo apt-key add openvpn-repo-pkg-key.pub
|
||||
sudo wget -O /etc/apt/sources.list.d/openvpn3.list https://swupdate.openvpn.net/community/openvpn3/repos/openvpn3-jammy.list
|
||||
sudo apt update
|
||||
sudo apt install openvpn3=17~betaUb22042+jammy
|
||||
#sudo apt install apt-transport-https
|
||||
#sudo wget https://swupdate.openvpn.net/repos/openvpn-repo-pkg-key.pub
|
||||
#sudo apt-key add openvpn-repo-pkg-key.pub
|
||||
#sudo wget -O /etc/apt/sources.list.d/openvpn3.list https://swupdate.openvpn.net/community/openvpn3/repos/openvpn3-jammy.list
|
||||
#sudo apt update
|
||||
#sudo apt install openvpn3=17~betaUb22042+jammy
|
||||
- name: Start Open VPN 3
|
||||
run: openvpn3 session-start --config .github/vpn/config.ovpn
|
||||
run: |
|
||||
# openvpn3 session-start --config .github/vpn/config.ovpn
|
||||
|
||||
- name: Add credentials
|
||||
run: |
|
||||
@@ -52,7 +54,7 @@ jobs:
|
||||
echo "REFRESH_TOKEN=${{secrets.SAS9_4GL_IO_REFRESH_TOKEN}}" >> .env.server
|
||||
|
||||
- name: Semantic Release
|
||||
uses: cycjimmy/semantic-release-action@v3
|
||||
uses: cycjimmy/semantic-release-action@v4
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
||||
|
||||
32
.github/workflows/notmain.yml
vendored
Normal file
32
.github/workflows/notmain.yml
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
|
||||
# For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages
|
||||
|
||||
name: SASjs Core - Update all.sas
|
||||
|
||||
on:
|
||||
push:
|
||||
branches-ignore:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
release:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
npm ci
|
||||
npm i -g @sasjs/cli@latest
|
||||
|
||||
- name: Ensure all.sas is always up to date
|
||||
run: |
|
||||
git config user.name github-actions
|
||||
git config user.email github-actions@github.com
|
||||
python3 build.py
|
||||
git add all.sas
|
||||
git commit -m "chore: updating all.sas" --allow-empty
|
||||
git push
|
||||
|
||||
|
||||
1
.gitignore
vendored
1
.gitignore
vendored
@@ -13,3 +13,4 @@ mc_*
|
||||
*.env*
|
||||
|
||||
~
|
||||
|
||||
|
||||
@@ -212,7 +212,8 @@ When contributing to this library, it is therefore important to ensure that all
|
||||
|
||||
## General Notes
|
||||
|
||||
- All macros should be compatible with SAS versions from support level B and above (so currently 9.2 and later). If an earlier version is not supported, then the macro should say as such in the header documentation, and exit gracefully (eg `%if %sysevalf(&sysver<9.3) %then %return`).
|
||||
- All macros should be compatible with SAS versions from support level B and above (so currently 9.3 and later). If an earlier version is not supported, then the macro should say as such in the header documentation, and exit gracefully.
|
||||
- It's [best to avoid](https://git.datacontroller.io/dc/dc/issues/50) special / non-ASCII characters for compatibility with the widest variety of SAS installations.
|
||||
|
||||
## Breaking Changes
|
||||
|
||||
@@ -247,7 +248,7 @@ The following repositories are also worth checking out:
|
||||
|
||||
## Contributors ✨
|
||||
<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
|
||||
[](#contributors-)
|
||||
[](#contributors-)
|
||||
<!-- ALL-CONTRIBUTORS-BADGE:END -->
|
||||
Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):
|
||||
|
||||
@@ -272,6 +273,7 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/yabwon"><img src="https://avatars.githubusercontent.com/u/9314894?v=4?s=100" width="100px;" alt="Bart Jablonski"/><br /><sub><b>Bart Jablonski</b></sub></a><br /><a href="https://github.com/sasjs/core/commits?author=yabwon" title="Code">💻</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://bandism.net/"><img src="https://avatars.githubusercontent.com/u/22633385?v=4?s=100" width="100px;" alt="Ikko Ashimine"/><br /><sub><b>Ikko Ashimine</b></sub></a><br /><a href="https://github.com/sasjs/core/commits?author=eltociear" title="Code">💻</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/henrik-forsell"><img src="https://avatars.githubusercontent.com/u/109935936?v=4?s=100" width="100px;" alt="Henrik Forsell"/><br /><sub><b>Henrik Forsell</b></sub></a><br /><a href="https://github.com/sasjs/core/commits?author=henrik-forsell" title="Documentation">📖</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="http://rudvfaden.github.io/"><img src="https://avatars.githubusercontent.com/u/2445577?v=4?s=100" width="100px;" alt="Rud Faden"/><br /><sub><b>Rud Faden</b></sub></a><br /><a href="https://github.com/sasjs/core/commits?author=rudvfaden" title="Code">💻</a></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
35
all.sas
35
all.sas
@@ -13766,7 +13766,7 @@ alter table &libds modify &var char(&len);
|
||||
%end;
|
||||
%else %if &rule=ISNUM %then %do;
|
||||
/*
|
||||
credit SØREN LASSEN
|
||||
credit SOREN LASSEN
|
||||
https://sasmacro.blogspot.com/2009/06/welcome-isnum-macro.html
|
||||
*/
|
||||
&tempcol=input(&incol,?? best32.);
|
||||
@@ -14552,7 +14552,7 @@ run;
|
||||
%else %if &engine=ODBC %then %do;
|
||||
&mD.%put NOTE: Retrieving ODBC connection details;
|
||||
data _null_;
|
||||
length connx_uri conprop_uri value datasource up_uri schema $256.;
|
||||
length connx_uri conprop_uri value datasource up_uri schema domprop_uri authdomain $256.;
|
||||
call missing (of _all_);
|
||||
/* get source connection ID */
|
||||
rc=metadata_getnasn("&liburi",'LibraryConnection',1,connx_uri);
|
||||
@@ -14567,6 +14567,13 @@ run;
|
||||
rc2=-1;
|
||||
end;
|
||||
end;
|
||||
|
||||
/* get auth domain */
|
||||
autrc=metadata_getnasn(connx_uri,"Domain",1,domprop_uri);
|
||||
arc=metadata_getattr(domprop_uri,"Name",authdomain);
|
||||
if not missing(authdomain) then authdomain=cats('AUTHDOMAIN=',authdomain);
|
||||
call symputx('authdomain',authdomain,'l');
|
||||
|
||||
/* get SCHEMA */
|
||||
rc6=metadata_getnasn("&liburi",'UsingPackages',1,up_uri);
|
||||
rc7=metadata_getattr(up_uri,'SchemaName',schema);
|
||||
@@ -14583,7 +14590,7 @@ run;
|
||||
(INSERT_SQL=YES DATASRC=&sql_dsn. CONNECTION=global);
|
||||
%end;
|
||||
%else %do;
|
||||
libname &libref ODBC DATASRC=&sql_dsn SCHEMA=&sql_schema;
|
||||
libname &libref ODBC DATASRC=&sql_dsn SCHEMA=&sql_schema &authdomain;
|
||||
%end;
|
||||
%end;
|
||||
%else %if &engine=POSTGRES %then %do;
|
||||
@@ -15828,6 +15835,11 @@ filename &frefout temp;
|
||||
a conflict)
|
||||
@param [in] repo= ServerContext is tied to a repo, if you are not using the
|
||||
foundation repo then select a different one here
|
||||
@param [in] LogicalServerType= (Sps) Server Type to use. Valid options:
|
||||
@li Any - Uses the default server.
|
||||
@li Sps - Stored Process Server, best choice for web app development. Runs
|
||||
under a system account identity (eg sassrv).
|
||||
@li Wks - Workspace Server. Runs under the end user identity.
|
||||
|
||||
@returns outds dataset containing the following columns:
|
||||
- stpuri
|
||||
@@ -15867,6 +15879,7 @@ filename &frefout temp;
|
||||
,minify=NO
|
||||
,frefin=mm_in
|
||||
,frefout=mm_out
|
||||
,LogicalServerType=Sps
|
||||
)/*/STORE SOURCE*/;
|
||||
|
||||
%local mD;
|
||||
@@ -15883,6 +15896,17 @@ filename &frefout temp;
|
||||
|
||||
%mp_dropmembers(%scan(&outds,2,.))
|
||||
|
||||
/* check LogicalServerType validity */
|
||||
%mp_abort(
|
||||
iftrue=(
|
||||
&LogicalServerType ne Sps
|
||||
and &LogicalServerType ne Wks
|
||||
and &LogicalServerType ne Any
|
||||
)
|
||||
,mac=&sysmacroname
|
||||
,msg=%str(Invalid value for LogicalServerType (&LogicalServerType))
|
||||
)
|
||||
|
||||
/**
|
||||
* check tree exists
|
||||
*/
|
||||
@@ -16115,8 +16139,9 @@ run;
|
||||
' <TextStore IsHidden="0" Name="Stored Process" UsageVersion="0" '/
|
||||
' TextRole="StoredProcessConfiguration" TextType="XML" '/
|
||||
' StoredText="<?xml version="1.0" encoding="UTF-8&qu'@@
|
||||
'ot;?><StoredProcess><ServerContext LogicalServerType="S'@@
|
||||
'ps" OtherAllowed="false"/><ResultCapabilities Packa'@@
|
||||
'ot;?><StoredProcess><ServerContext LogicalServerType="'@@
|
||||
"&LogicalServerType"@@
|
||||
'" OtherAllowed="false"/><ResultCapabilities Packa'@@
|
||||
'ge="' @@ "&package" @@ '" Streaming="' @@ "&streaming" @@
|
||||
'"/><OutputParameters/></StoredProcess>" />' /
|
||||
" </Notes> "/
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
%end;
|
||||
%else %if &rule=ISNUM %then %do;
|
||||
/*
|
||||
credit SØREN LASSEN
|
||||
credit SOREN LASSEN
|
||||
https://sasmacro.blogspot.com/2009/06/welcome-isnum-macro.html
|
||||
*/
|
||||
&tempcol=input(&incol,?? best32.);
|
||||
|
||||
@@ -212,7 +212,7 @@ run;
|
||||
%else %if &engine=ODBC %then %do;
|
||||
&mD.%put NOTE: Retrieving ODBC connection details;
|
||||
data _null_;
|
||||
length connx_uri conprop_uri value datasource up_uri schema $256.;
|
||||
length connx_uri conprop_uri value datasource up_uri schema domprop_uri authdomain $256.;
|
||||
call missing (of _all_);
|
||||
/* get source connection ID */
|
||||
rc=metadata_getnasn("&liburi",'LibraryConnection',1,connx_uri);
|
||||
@@ -227,6 +227,13 @@ run;
|
||||
rc2=-1;
|
||||
end;
|
||||
end;
|
||||
|
||||
/* get auth domain */
|
||||
autrc=metadata_getnasn(connx_uri,"Domain",1,domprop_uri);
|
||||
arc=metadata_getattr(domprop_uri,"Name",authdomain);
|
||||
if not missing(authdomain) then authdomain=cats('AUTHDOMAIN=',authdomain);
|
||||
call symputx('authdomain',authdomain,'l');
|
||||
|
||||
/* get SCHEMA */
|
||||
rc6=metadata_getnasn("&liburi",'UsingPackages',1,up_uri);
|
||||
rc7=metadata_getattr(up_uri,'SchemaName',schema);
|
||||
@@ -243,7 +250,7 @@ run;
|
||||
(INSERT_SQL=YES DATASRC=&sql_dsn. CONNECTION=global);
|
||||
%end;
|
||||
%else %do;
|
||||
libname &libref ODBC DATASRC=&sql_dsn SCHEMA=&sql_schema;
|
||||
libname &libref ODBC DATASRC=&sql_dsn SCHEMA=&sql_schema &authdomain;
|
||||
%end;
|
||||
%end;
|
||||
%else %if &engine=POSTGRES %then %do;
|
||||
|
||||
@@ -67,6 +67,11 @@
|
||||
a conflict)
|
||||
@param [in] repo= ServerContext is tied to a repo, if you are not using the
|
||||
foundation repo then select a different one here
|
||||
@param [in] LogicalServerType= (Sps) Server Type to use. Valid options:
|
||||
@li Any - Uses the default server.
|
||||
@li Sps - Stored Process Server, best choice for web app development. Runs
|
||||
under a system account identity (eg sassrv).
|
||||
@li Wks - Workspace Server. Runs under the end user identity.
|
||||
|
||||
@returns outds dataset containing the following columns:
|
||||
- stpuri
|
||||
@@ -106,6 +111,7 @@
|
||||
,minify=NO
|
||||
,frefin=mm_in
|
||||
,frefout=mm_out
|
||||
,LogicalServerType=Sps
|
||||
)/*/STORE SOURCE*/;
|
||||
|
||||
%local mD;
|
||||
@@ -122,6 +128,17 @@
|
||||
|
||||
%mp_dropmembers(%scan(&outds,2,.))
|
||||
|
||||
/* check LogicalServerType validity */
|
||||
%mp_abort(
|
||||
iftrue=(
|
||||
&LogicalServerType ne Sps
|
||||
and &LogicalServerType ne Wks
|
||||
and &LogicalServerType ne Any
|
||||
)
|
||||
,mac=&sysmacroname
|
||||
,msg=%str(Invalid value for LogicalServerType (&LogicalServerType))
|
||||
)
|
||||
|
||||
/**
|
||||
* check tree exists
|
||||
*/
|
||||
@@ -354,8 +371,9 @@ run;
|
||||
' <TextStore IsHidden="0" Name="Stored Process" UsageVersion="0" '/
|
||||
' TextRole="StoredProcessConfiguration" TextType="XML" '/
|
||||
' StoredText="<?xml version="1.0" encoding="UTF-8&qu'@@
|
||||
'ot;?><StoredProcess><ServerContext LogicalServerType="S'@@
|
||||
'ps" OtherAllowed="false"/><ResultCapabilities Packa'@@
|
||||
'ot;?><StoredProcess><ServerContext LogicalServerType="'@@
|
||||
"&LogicalServerType"@@
|
||||
'" OtherAllowed="false"/><ResultCapabilities Packa'@@
|
||||
'ge="' @@ "&package" @@ '" Streaming="' @@ "&streaming" @@
|
||||
'"/><OutputParameters/></StoredProcess>" />' /
|
||||
" </Notes> "/
|
||||
|
||||
Reference in New Issue
Block a user