Skip to content

Commit

Permalink
- Added the configuration open "errorStyle" that can be set to "basic…
Browse files Browse the repository at this point in the history
…" or "debug".

- The current web_plsql version is now a string property "version" in the middleware object.
- Added the express status monitor to the sample. (http://localhost:8000/status)

- When downloading a file, first send any eventual "other headers" like "Content-Disposition".
- Changed x-db-xontent-length to x-db-content-length.
- Updated all dependencies.
  • Loading branch information
doberkofler committed Sep 3, 2018
1 parent 30b3696 commit 8b07b1d
Show file tree
Hide file tree
Showing 29 changed files with 3,874 additions and 3,994 deletions.
14 changes: 9 additions & 5 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
{
"plugins": [
"transform-flow-strip-types"
"@babel/plugin-transform-flow-strip-types"
],
"presets": [
["env", {
"targets": {
"node": "8.0"
[
"@babel/preset-env",
{
"targets": {
"node": "8.0"
}
}
}]
],
"@babel/preset-flow"
],
"ignore": []
}
2 changes: 1 addition & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@
"no-lonely-if": "off",
"no-mixed-spaces-and-tabs": "warn",
"no-multiple-empty-lines": "off",
"no-multi-assign": "error",
"no-multi-assign": "off",
"no-negated-condition": "off",
"no-nested-ternary": "warn",
"no-new-object": "warn",
Expand Down
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,19 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
### Fixed


## [0.1.0] - 2018-09-03

### Added
- Added the configuration open "errorStyle" that can be set to "basic" or "debug".
- The current web_plsql version is now a string property "version" in the middleware object.
- Added the express status monitor to the sample. (http://localhost:8000/status)

### Fixed
- When downloading a file, first send any eventual "other headers" like "Content-Disposition".
- Changed x-db-xontent-length to x-db-content-length.
- Updated all dependencies.


## [0.0.3] - 2018-03-20

### Added
Expand Down
13 changes: 7 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,8 @@ const PORT = 8000;
const PATH = '/pls/sample';
const OPTIONS = {
defaultPage: 'sample.pageIndex',
doctable: 'docTable'
doctable: 'docTable',
errorStyle: 'debug'
};

// create express app
Expand Down Expand Up @@ -126,12 +127,13 @@ app.listen(PORT);
- PlsqlDatabaseConnectString -> specified when creating the oracledb connection pool
- PlsqlDatabaseUserName -> specified when creating the oracledb connection pool
- PlsqlDatabasePassword -> specified when creating the oracledb connection pool
- PlsqlDefaultPage -> use the "doctable" property in the configuration of the web_plsql middleware
- PlsqlDocumentTablename -> use the "defaultPage" property in the configuration of the web_plsql middleware
- PlsqlDefaultPage -> use the "doctable" configuration option
- PlsqlDocumentTablename -> use the "defaultPage" configuration option
- PlsqlErrorStyle -> use the "errorStyle" configuration option
- PlsqlLogEnable -> use a HTTP request logger middleware for node.js like morgan
- PlsqlLogDirectory -> use a HTTP request logger middleware for node.js like morgan
- PlsqlPathAlias -> use the "pathAlias.alias" property in the configuration of the web_plsql middleware
- PlsqlPathAliasProcedure -> use the "pathAlias.procedure" property in the configuration of the web_plsql middleware
- PlsqlPathAlias -> use the "pathAlias.alias" configuration option
- PlsqlPathAliasProcedure -> use the "pathAlias.procedure" configuration option

## Configuration options that are not (yet) supported:
- PlsqlIdleSessionCleanupInterval
Expand All @@ -141,7 +143,6 @@ app.listen(PORT);
- PlsqlCGIEnvironmentList
- PlsqlDocumentPath
- PlsqlDocumentProcedure
- PlsqlErrorStyle
- PlsqlExclusionList
- PlsqlRequestValidationFunction
- PlsqlSessionCookieName
Expand Down
9 changes: 8 additions & 1 deletion examples/LJ_UNITTEST.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ process.on('unhandledRejection', (reason, p) => {
*/

const PASSWORD = process.env.LJ_UNITTEST_PASSWORD || '';
if (PASSWORD === '') {
console.error('You must set the password for user LJ_UNITTEST using the environment variable LJ_UNITTEST_PASSWORD');
process.exit(1);
}

const connectionPool = oracledb.createPool({
user: 'LJ_UNITTEST', // The database user name.
password: PASSWORD, // The password of the database user.
Expand Down Expand Up @@ -50,7 +55,8 @@ const STATIC_PATH = process.env.PERISCOPE_DEPLOY_DIR || '';
const OPTIONS = {
trace: 'on',
defaultPage: 'LAS_DLG_Startup.GO',
doctable: 'ljp_documents'
doctable: 'ljp_documents',
errorStyle: 'debug'
};

// create express app
Expand All @@ -63,6 +69,7 @@ app.use(bodyParser.urlencoded({extended: true}));
app.use(cookieParser());
app.use(compression());
app.use(morgan('combined', {stream: fs.createWriteStream(path.join(process.cwd(), 'access.log'), {flags: 'a'})}));
app.use(require('express-status-monitor')());

// add the oracle pl/sql express middleware
app.use(ROOT + '/:name?', webplsql(connectionPool, OPTIONS));
Expand Down
3 changes: 2 additions & 1 deletion examples/apex.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ const OPTIONS = {
pathAlias: {
alias: 'r',
procedure: 'wwv_flow.resolve_friendly_url'
}
},
errorStyle: 'debug'
};

// create express app
Expand Down
12 changes: 10 additions & 2 deletions examples/sample.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,13 @@ const OPTIONS = {
pathAlias: {
alias: 'myalias',
procedure: 'sample.pagePathAlias'
}
},
errorStyle: 'debug'
};

// Welcome message
console.log(`Welcome to web_plsql version ${webplsql.version}!`);

// create express app
const app = express();

Expand All @@ -57,12 +61,16 @@ app.use(cookieParser());
app.use(compression());
app.use(morgan('combined', {stream: fs.createWriteStream(path.join(process.cwd(), 'access.log'), {flags: 'a'})}));

// add express status monitor
app.use(require('express-status-monitor')());
console.log(`Express status monitor is listening on http://localhost:${PORT}/status`);

// add the oracle pl/sql express middleware
app.use(PATH + '/:name?', webplsql(connectionPool, OPTIONS));

// serving static files
app.use('/static', express.static(path.join(process.cwd(), 'examples/static')));

// listen on port
console.log(`Listening on http://localhost:${PORT}${PATH}`);
console.log(`Sample app is listening on http://localhost:${PORT}${PATH}`);
app.listen(PORT);
4 changes: 2 additions & 2 deletions flow-typed/npm/babel-eslint_vx.x.x.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// flow-typed signature: d7ee538b2f8f84031dddac928498db22
// flow-typed version: <<STUB>>/babel-eslint_v^8.2.2/flow_v0.68.0
// flow-typed signature: 5454b4b2383aacfc357f78dd3176ffff
// flow-typed version: <<STUB>>/babel-eslint_v^9.0.0/flow_v0.80.0

/**
* This is an autogenerated libdef stub for:
Expand Down
94 changes: 54 additions & 40 deletions flow-typed/npm/chai_v4.x.x.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// flow-typed signature: 796fb655e355782c793f63ad8c09c4a3
// flow-typed version: 37b0393aaf/chai_v4.x.x/flow_>=v0.25.0
// flow-typed signature: b91bbe7f844163c944206cda326d98f9
// flow-typed version: 64da3eb66a/chai_v4.x.x/flow_>=v0.25.0

declare module "chai" {
declare type ExpectChain<T> = {
Expand All @@ -22,41 +22,42 @@ declare module "chai" {
any: ExpectChain<T>,
all: ExpectChain<T>,

a: ExpectChain<T> & ((type: string) => ExpectChain<T>),
an: ExpectChain<T> & ((type: string) => ExpectChain<T>),

include: ExpectChain<T> & ((value: mixed) => ExpectChain<T>),
includes: ExpectChain<T> & ((value: mixed) => ExpectChain<T>),
contain: ExpectChain<T> & ((value: mixed) => ExpectChain<T>),
contains: ExpectChain<T> & ((value: mixed) => ExpectChain<T>),

eq: (value: T) => ExpectChain<T>,
eql: (value: T) => ExpectChain<T>,
equal: (value: T) => ExpectChain<T>,
equals: (value: T) => ExpectChain<T>,

above: (value: T & number) => ExpectChain<T>,
gt: (value: T & number) => ExpectChain<T>,
greaterThan: (value: T & number) => ExpectChain<T>,
least: (value: T & number) => ExpectChain<T>,
below: (value: T & number) => ExpectChain<T>,
lessThan: (value: T & number) => ExpectChain<T>,
lt: (value: T & number) => ExpectChain<T>,
most: (value: T & number) => ExpectChain<T>,
within: (start: T & number, finish: T & number) => ExpectChain<T>,

instanceof: (constructor: mixed) => ExpectChain<T>,
a: ExpectChain<T> & ((type: string, message?: string) => ExpectChain<T>),
an: ExpectChain<T> & ((type: string, message?: string) => ExpectChain<T>),

include: ExpectChain<T> & ((value: mixed, message?: string) => ExpectChain<T>),
includes: ExpectChain<T> & ((value: mixed, message?: string) => ExpectChain<T>),
contain: ExpectChain<T> & ((value: mixed, message?: string) => ExpectChain<T>),
contains: ExpectChain<T> & ((value: mixed, message?: string) => ExpectChain<T>),

eq: (value: T, message?: string) => ExpectChain<T>,
eql: (value: T, message?: string) => ExpectChain<T>,
equal: (value: T, message?: string) => ExpectChain<T>,
equals: (value: T, message?: string) => ExpectChain<T>,

above: (value: T & number, message?: string) => ExpectChain<T>,
gt: (value: T & number, message?: string) => ExpectChain<T>,
greaterThan: (value: T & number, message?: string) => ExpectChain<T>,
least: (value: T & number, message?: string) => ExpectChain<T>,
below: (value: T & number, message?: string) => ExpectChain<T>,
lessThan: (value: T & number, message?: string) => ExpectChain<T>,
lt: (value: T & number, message?: string) => ExpectChain<T>,
most: (value: T & number, message?: string) => ExpectChain<T>,
within: (start: T & number, finish: T & number, message?: string) => ExpectChain<T>,

instanceof: (constructor: mixed, message?: string) => ExpectChain<T>,
nested: ExpectChain<T>,
property: <P>(
name: string,
value?: P
value?: P,
message?: string
) => ExpectChain<P> & ((name: string) => ExpectChain<mixed>),

length: (value: number) => ExpectChain<T> | ExpectChain<number>,
lengthOf: (value: number) => ExpectChain<T>,
length: (value: number, message?: string) => ExpectChain<T> | ExpectChain<number>,
lengthOf: (value: number, message?: string) => ExpectChain<T>,

match: (regex: RegExp) => ExpectChain<T>,
string: (string: string) => ExpectChain<T>,
match: (regex: RegExp, message?: string) => ExpectChain<T>,
string: (string: string, message?: string) => ExpectChain<T>,

key: (key: string) => ExpectChain<T>,
keys: (
Expand All @@ -70,19 +71,22 @@ declare module "chai" {
msg?: string
) => ExpectChain<T>,

respondTo: (method: string) => ExpectChain<T>,
respondTo: (method: string, message?: string) => ExpectChain<T>,
itself: ExpectChain<T>,

satisfy: (method: (value: T) => boolean) => ExpectChain<T>,
satisfy: (method: (value: T) => boolean, message?: string) => ExpectChain<T>,

closeTo: (expected: T & number, delta: number) => ExpectChain<T>,
closeTo: (expected: T & number, delta: number, message?: string) => ExpectChain<T>,

members: (set: mixed) => ExpectChain<T>,
oneOf: (list: Array<T>) => ExpectChain<T>,
members: (set: mixed, message?: string) => ExpectChain<T>,
oneOf: (list: Array<T>, message?: string) => ExpectChain<T>,

change: (obj: mixed, key: string) => ExpectChain<T>,
increase: (obj: mixed, key: string) => ExpectChain<T>,
decrease: (obj: mixed, key: string) => ExpectChain<T>,
change: (obj: mixed, key: string, message?: string) => ExpectChain<T>,
increase: (obj: mixed, key: string, message?: string) => ExpectChain<T>,
decrease: (obj: mixed, key: string, message?: string) => ExpectChain<T>,

by: (delta: number, message?: string) => ExpectChain<T>,
ordered: ExpectChain<T>,

// dirty-chai
ok: () => ExpectChain<T>,
Expand Down Expand Up @@ -136,7 +140,12 @@ declare module "chai" {
data: (key: string, val?: any) => ExpectChain<T>,
prop: (key: string, val?: any) => ExpectChain<T>,
state: (key: string, val?: any) => ExpectChain<T>,
value: (val: string) => ExpectChain<T>
value: (val: string) => ExpectChain<T>,
className: (val: string) => ExpectChain<T>,
text: (val: string) => ExpectChain<T>,

// chai-karma-snapshot
matchSnapshot: (lang?: any, update?: boolean, msg?: any) => ExpectChain<T>
};

declare function expect<T>(actual: T, message?: string): ExpectChain<T>;
Expand All @@ -155,6 +164,11 @@ declare module "chai" {
static isOk(object: mixed, message?: string): void;
static isNotOk(object: mixed, message?: string): void;

static empty(object: mixed, message?: string): void;
static isEmpty(object: mixed, message?: string): void;
static notEmpty(object: mixed, message?: string): void;
static isNotEmpty(object: mixed, message?: string): void;

static equal(actual: mixed, expected: mixed, message?: string): void;
static notEqual(actual: mixed, expected: mixed, message?: string): void;

Expand Down
4 changes: 2 additions & 2 deletions flow-typed/npm/compression_vx.x.x.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// flow-typed signature: be57337e55bebb3b12dfa62bcdbdbeaa
// flow-typed version: <<STUB>>/compression_v^1.7.2/flow_v0.68.0
// flow-typed signature: a9e24f3a96519ff67aa92c6918b8d0b5
// flow-typed version: <<STUB>>/compression_v^1.7.3/flow_v0.80.0

/**
* This is an autogenerated libdef stub for:
Expand Down
4 changes: 2 additions & 2 deletions flow-typed/npm/connect-multiparty_vx.x.x.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// flow-typed signature: 6a825d95d7e3cede347173dba2027021
// flow-typed version: <<STUB>>/connect-multiparty_v^2.1.0/flow_v0.68.0
// flow-typed signature: 45df983be47fd5ef25e8449dc2e4435e
// flow-typed version: <<STUB>>/connect-multiparty_v^2.1.1/flow_v0.80.0

/**
* This is an autogenerated libdef stub for:
Expand Down
4 changes: 2 additions & 2 deletions flow-typed/npm/cookie-parser_vx.x.x.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// flow-typed signature: 0246822bdc17628bcad4156e7d16b2da
// flow-typed version: <<STUB>>/cookie-parser_v^1.4.1/flow_v0.68.0
// flow-typed signature: 619e3a180f0bded6badf912305a57d8e
// flow-typed version: <<STUB>>/cookie-parser_v^1.4.1/flow_v0.80.0

/**
* This is an autogenerated libdef stub for:
Expand Down
Loading

0 comments on commit 8b07b1d

Please sign in to comment.