This repository was archived by the owner on Feb 28, 2022. It is now read-only.

Description
the example on how to build the pipeline shows that the defaults
source file location is exposed:
// the pipeline itself
const pipeline = require("@adobe/hypermedia-pipeline");
// helper functions and log
const { adaptOWRequest, adaptOWResponse, log } = require('@adobe/hypermedia-pipeline/src/defaults/default.js');
suggestion
exports the defaults
- move the pipeline code to own file. eg:
src/pipeline.js
- export pipeline and defaults in
index.js
:
index.js
(draft):
const defaults = require('./src/defaults/defaults.js')
const pipeline = require('./src/pipeline.js')
module.exports = {
pipeline,
defaults
}
usage:
// the pipeline itself
const { pipeline } = require("@adobe/hypermedia-pipeline");
// helper functions and log
const { adaptOWRequest, adaptOWResponse, log } = require('@adobe/hypermedia-pipeline').defaults;
or:
const {pipeline,
defaults: {
adaptOWRequest,
adaptOWResponse,
log
} = require("@adobe/hypermedia-pipeline");