Skip to content

Commit 459536d

Browse files
authored
Merge pull request #17 from vajahath/v2.5.0-security
v2.5.0 security update
2 parents 7b46a84 + 668fd0b commit 459536d

File tree

9 files changed

+5276
-2501
lines changed

9 files changed

+5276
-2501
lines changed

.github/workflows/Build.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Build
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
Build:
7+
strategy:
8+
matrix:
9+
os: [ubuntu-latest]
10+
node: ['8', '10', '12', '13']
11+
runs-on: ${{ matrix.os }}
12+
name: build and test (${{ matrix.os }}|node-${{ matrix.node }})
13+
14+
steps:
15+
- uses: actions/checkout@v1
16+
- uses: actions/setup-node@v1.2.0
17+
with:
18+
node-version: ${{ matrix.node }}
19+
- run: node --version
20+
- run: npm ci
21+
- run: npm run lint
22+
- run: npm run build
23+
- run: npm test

.github/workflows/Deploy.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Deploy
2+
3+
on:
4+
release:
5+
types: published
6+
7+
jobs:
8+
Deploy-To-NPM:
9+
runs-on: ubuntu-latest
10+
name: Deploy to NPM
11+
12+
steps:
13+
- uses: actions/checkout@v1
14+
- uses: actions/setup-node@v1.2.0
15+
with:
16+
node-version: '12'
17+
registry-url: 'https://registry.npmjs.org'
18+
- run: node --version
19+
- run: npm ci
20+
- run: npm run lint
21+
- run: ls && npm publish --access=public
22+
env:
23+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
24+
25+
Deploy-To-GitHub-Package-Registry:
26+
runs-on: ubuntu-latest
27+
name: Deploy to GPR
28+
steps:
29+
- uses: actions/checkout@v1
30+
- uses: actions/setup-node@v1.2.0
31+
with:
32+
node-version: '12'
33+
registry-url: 'https://npm.pkg.github.com'
34+
- run: node --version
35+
- run: npm ci
36+
- run: npm run lint
37+
- run: npm run rescope vajahath
38+
- run: ls && npm publish
39+
env:
40+
NODE_AUTH_TOKEN: ${{ secrets.GH_TOKEN }}

.travis.yml

Lines changed: 0 additions & 20 deletions
This file was deleted.

README.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,8 @@
33
Yet another SQL query builder.
44

55
[![npm](https://img.shields.io/npm/v/sqlify.svg)](https://www.npmjs.com/package/sqlify)
6-
[![Build Status](https://travis-ci.org/vajahath/sqlify.svg?branch=master)](https://travis-ci.org/vajahath/sqlify)
6+
![Build Status](https://github.com/vajahath/sqlify/workflows/Build/badge.svg)
77
[![T](https://img.shields.io/badge/TypeScript%20Ready-.d.ts%20included-blue.svg)]()
8-
[![Gitter chat](https://badges.gitter.im/npm-sqlify/gitter.png)](https://gitter.im/npm-sqlify/Lobby)
98
[![npm](https://img.shields.io/npm/dt/sqlify.svg)](https://www.npmjs.com/package/sqlify)
109

1110
> There are many sql query builders out there. But this one makes more sense to me :wink:.
@@ -20,7 +19,7 @@ npm install --save sqlify
2019

2120
## Why
2221

23-
* This package is a wrapper around [squel](https://hiddentao.com/squel) module to make it more friendly.
22+
* This package is a wrapper around [squel](https://hiddentao.com/squel) module to make it more friendly. (Check that package to know its maintenance status)
2423
* Helps you to build dynamic sql queries.
2524
* **Example use case:** suppose, you are getting a POST request to insert some data to your SQL database.
2625
You'll get the data in `req.body` as `{name: "Swat", age: 22, address: "ND"}`.
@@ -37,6 +36,8 @@ npm install --save sqlify
3736
sqlify(chain, resource); // done!
3837
```
3938

39+
> Warning ⚠️: Do not ever pass queries generated on the client side to your web server for execution. The above example is only a use case. Do NOT copy paste as such.
40+
4041
## Examples
4142

4243
#### SELECT
@@ -267,6 +268,8 @@ The following fields can be used inside the `resource` object. Logic behind the
267268
268269
## Change log
269270
271+
* v2.5.0
272+
* Security Update
270273
* v2.4.0
271274
* TypeScript support and definitions
272275
* Better docs

gulpfile.ts

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
import * as del from 'del';
22
import * as gulp from 'gulp';
33

4-
// copy assets files from src to dist
5-
gulp.task('copy-assets', () => {
4+
async function cleanBuild() {
5+
return await del(['dist/**/*', 'dist/**/.*']);
6+
}
7+
8+
function copyAssets() {
69
return gulp.src(['src/**/*', '!src/**/*.ts']).pipe(gulp.dest('dist/'));
7-
});
10+
}
811

9-
gulp.task('clean-build', () => {
10-
return del.sync(['dist/**/*', 'dist/**/.*']);
11-
});
12+
exports['clean-build'] = cleanBuild;
13+
exports['copy-assets'] = copyAssets;

0 commit comments

Comments
 (0)