trimResultTransformer,
  stripIndentTransformer
} from "common-tags";

// $ExpectError
stripIndent();
// $ExpectError
stripIndent(null);
// $ExpectError
stripIndent("bad");
stripIndent`
  Good
`;

// $ExpectError
html();
// $ExpectError
html(null);
// $ExpectError
html(0);
// $ExpectError
html("bad");
html`
  good
`;

// $ExpectError
source();
// $ExpectError
source(null);
// $ExpectError
Beispiel #2
0
 get: function () {
     return ((_a = ["\n      // Relution APIs\n      const pushService = require('relution/push.js');\n      import * as Q from 'q';\n\n      /**\n      * module providing direct access to push.\n      *\n      * registers a push target device.\n      *\n      * <p>\n      * The method attempts fetching an existing device using the metadata\n      * information given. This either works by providing a UUID or using\n      * heuristics based on information typically extracted using Cordova device\n      * plugin. The latter approach solves the potential problem when the client\n      * is uninstalled and reinstalled so that device local information is lost.\n      * </p>\n      * <p>\n      * If it finds one, that device is updated. Otherwise a new\n      * device is created and stored in the database.\n      * </p>\n      * @link [RelutionSDK Push APi](https://relution-io.github.io/relution-sdk/modules/_push_push_.html)\n      * @param app express.js application to hook into.\n      */\n\n      export function init(app: any) {\n        app.post('/api/v1/push/registration',\n          /**\n          * register the device on the push Service\n          *\n          * @param req containing body JSON to pass as input.\n          * @param res result of call is provided as JSON body data.\n          * @param next function to invoke error handling.\n          */\n          function serviceCall(req: any, res: any, next: any) {\n            Q(pushService.registerPushDevice(req.body)).then(res.json.bind(res), next).done();\n          }\n        );\n\n        app.post('/api/v1/push',\n          /**\n          * posts push notification(s).\n          *\n          * @param req containing body JSON to pass as input.\n          * @param res result of call is provided as JSON body data.\n          * @param next function to invoke error handling.\n          */\n          function serviceCall(req: any, res: any, next: any) {\n            Q(pushService.postPushNotification(req.body)).then(res.json.bind(res), next).done();\n          }\n        );\n\n        app.get('/api/v1/push/:uuid',\n          /**\n          * gets push notification status.\n          *\n          * @param req containing body JSON to pass as input.\n          * @param res result of call is provided as JSON body data.\n          * @param next function to invoke error handling.\n          */\n          function serviceCall(req: any, res: any, next: any) {\n            Q(pushService.fetchPushNotification(req.params.uuid)).then(res.json.bind(res), next).done();\n          }\n        );\n      }\n    "], _a.raw = ["\n      // Relution APIs\n      const pushService = require('relution/push.js');\n      import * as Q from 'q';\n\n      /**\n      * module providing direct access to push.\n      *\n      * registers a push target device.\n      *\n      * <p>\n      * The method attempts fetching an existing device using the metadata\n      * information given. This either works by providing a UUID or using\n      * heuristics based on information typically extracted using Cordova device\n      * plugin. The latter approach solves the potential problem when the client\n      * is uninstalled and reinstalled so that device local information is lost.\n      * </p>\n      * <p>\n      * If it finds one, that device is updated. Otherwise a new\n      * device is created and stored in the database.\n      * </p>\n      * @link [RelutionSDK Push APi](https://relution-io.github.io/relution-sdk/modules/_push_push_.html)\n      * @param app express.js application to hook into.\n      */\n\n      export function init(app: any) {\n        app.post('/api/v1/push/registration',\n          /**\n          * register the device on the push Service\n          *\n          * @param req containing body JSON to pass as input.\n          * @param res result of call is provided as JSON body data.\n          * @param next function to invoke error handling.\n          */\n          function serviceCall(req: any, res: any, next: any) {\n            Q(pushService.registerPushDevice(req.body)).then(res.json.bind(res), next).done();\n          }\n        );\n\n        app.post('/api/v1/push',\n          /**\n          * posts push notification(s).\n          *\n          * @param req containing body JSON to pass as input.\n          * @param res result of call is provided as JSON body data.\n          * @param next function to invoke error handling.\n          */\n          function serviceCall(req: any, res: any, next: any) {\n            Q(pushService.postPushNotification(req.body)).then(res.json.bind(res), next).done();\n          }\n        );\n\n        app.get('/api/v1/push/:uuid',\n          /**\n          * gets push notification status.\n          *\n          * @param req containing body JSON to pass as input.\n          * @param res result of call is provided as JSON body data.\n          * @param next function to invoke error handling.\n          */\n          function serviceCall(req: any, res: any, next: any) {\n            Q(pushService.fetchPushNotification(req.params.uuid)).then(res.json.bind(res), next).done();\n          }\n        );\n      }\n    "], html(_a)) + '\n');
     var _a;
 },
Beispiel #3
0
 get: function () {
     return ((_a = ["\n        /**\n        * @file routes.ts\n        */\n        const about = require('../package.json');\n\n        export function init(app: any) {\n          app.get('/index.json',\n            /**\n            * provides an overview of available API, state, etc.\n            *\n            * @param req unused.\n            * @param res body is an informal JSON that can be used for health monitoring, for example.\n            * @return {*} unspecified value.\n            */\n            function getRoutes(req: any, res: any) {\n              const index = {\n                name: about.name,\n                version: about.version,\n                description: about.description,\n                routes: app.routes\n              };\n              return res.json(index);\n          });\n        }\n    "], _a.raw = ["\n        /**\n        * @file routes.ts\n        */\n        const about = require('../package.json');\n\n        export function init(app: any) {\n          app.get('/index.json',\n            /**\n            * provides an overview of available API, state, etc.\n            *\n            * @param req unused.\n            * @param res body is an informal JSON that can be used for health monitoring, for example.\n            * @return {*} unspecified value.\n            */\n            function getRoutes(req: any, res: any) {\n              const index = {\n                name: about.name,\n                version: about.version,\n                description: about.description,\n                routes: app.routes\n              };\n              return res.json(index);\n          });\n        }\n    "], html(_a)) + '\n');
     var _a;
 },
 get: function () {
     return ((_a = ["\n      client/**/*.*\n      /node_modules\n      **/*.ts\n      *.DS_STORE\n      *.git\n    "], _a.raw = ["\n      client/**/*.*\n      /node_modules\n      **/*.ts\n      *.DS_STORE\n      *.git\n    "], html(_a)));
     var _a;
 },
Beispiel #5
0
 get: function () {
     return ((_a = ["\n      # Logs\n      logs\n      *.log\n      npm-debug.log*\n\n      # Runtime data\n      pids\n      *.pid\n      *.seed\n\n      # Directory for instrumented libs generated by jscoverage/JSCover\n      lib-cov\n\n      # Coverage directory used by tools like istanbul\n      coverage\n\n      # nyc test coverage\n      .nyc_output\n\n      # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)\n      .grunt\n\n      # node-waf configuration\n      .lock-wscript\n\n      # Compiled binary addons (http://nodejs.org/api/addons.html)\n      build/Release\n\n      # Dependency directories\n      node_modules\n      jspm_packages\n\n      # Optional npm cache directory\n      .npm\n\n      # Optional REPL history\n      .node_repl_history\n    "], _a.raw = ["\n      # Logs\n      logs\n      *.log\n      npm-debug.log*\n\n      # Runtime data\n      pids\n      *.pid\n      *.seed\n\n      # Directory for instrumented libs generated by jscoverage/JSCover\n      lib-cov\n\n      # Coverage directory used by tools like istanbul\n      coverage\n\n      # nyc test coverage\n      .nyc_output\n\n      # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)\n      .grunt\n\n      # node-waf configuration\n      .lock-wscript\n\n      # Compiled binary addons (http://nodejs.org/api/addons.html)\n      build/Release\n\n      # Dependency directories\n      node_modules\n      jspm_packages\n\n      # Optional npm cache directory\n      .npm\n\n      # Optional REPL history\n      .node_repl_history\n    "], html(_a)));
     var _a;
 },