@haibun/domain-webpage
Advanced tools
Comparing version 1.8.1 to 1.8.2
@@ -30,3 +30,3 @@ "use strict"; | ||
const page = vstep.source.name; | ||
const webserver = util_1.getFromRuntime(this.getWorld().runtime, defs_2.WEBSERVER); | ||
const webserver = (0, util_1.getFromRuntime)(this.getWorld().runtime, defs_2.WEBSERVER); | ||
webserver.addStaticFolder(page); | ||
@@ -42,3 +42,3 @@ console.debug('added page', page); | ||
const page = vsteps.source.name; | ||
const webserver = util_1.getFromRuntime(this.getWorld().runtime, defs_2.WEBSERVER); | ||
const webserver = (0, util_1.getFromRuntime)(this.getWorld().runtime, defs_2.WEBSERVER); | ||
// TODO mount the page | ||
@@ -78,3 +78,3 @@ return defs_1.OK; | ||
const shared = builder.finalize(); | ||
const domain = domain_1.getDomain(exports.WEB_PAGE, this.getWorld()).shared.get(builder.name); | ||
const domain = (0, domain_1.getDomain)(exports.WEB_PAGE, this.getWorld()).shared.get(builder.name); | ||
for (const [name, val] of shared) { | ||
@@ -81,0 +81,0 @@ domain.set(name, val); |
"use strict"; | ||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); | ||
var desc = Object.getOwnPropertyDescriptor(m, k); | ||
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { | ||
desc = { enumerable: true, get: function() { return m[k]; } }; | ||
} | ||
Object.defineProperty(o, k2, desc); | ||
}) : (function(o, m, k, k2) { | ||
@@ -36,4 +40,4 @@ if (k2 === undefined) k2 = k; | ||
action: async ({ name, type }) => { | ||
const location = vars_1.onCurrentTypeForDomain({ name, type: domain_webpage_1.WEB_PAGE }, this.getWorld()); | ||
return util_1.actionOK(location); | ||
const location = (0, vars_1.onCurrentTypeForDomain)({ name, type: domain_webpage_1.WEB_PAGE }, this.getWorld()); | ||
return (0, util_1.actionOK)(location); | ||
}, | ||
@@ -44,3 +48,3 @@ }, | ||
action: async (named) => { | ||
return util_1.actionOK(); | ||
return (0, util_1.actionOK)(); | ||
}, | ||
@@ -53,8 +57,8 @@ }, | ||
it('domain object from background', async () => { | ||
const specl = util_1.getDefaultOptions(); | ||
const specl = (0, util_1.getDefaultOptions)(); | ||
const key = '/backgrounds/p1'; | ||
const { world } = lib_1.getDefaultWorld(0); | ||
const features = lib_1.asFeatures([{ path: '/features/test.feature', content: `Backgrounds: p1.${domain_webpage_1.WEB_PAGE}\n\nOn the ${key} ${domain_webpage_1.WEB_PAGE}\nPress the submit button` }]); | ||
const backgrounds = lib_1.asFeatures([{ path: `/backgrounds/p1.${domain_webpage_1.WEB_PAGE}.feature`, content: '' }]); | ||
const result = await run_1.runWith({ specl, features, backgrounds, addSteppers: [TestStepsRequiresDomain, domain_webpage_1.default], world }); | ||
const { world } = (0, lib_1.getDefaultWorld)(0); | ||
const features = (0, lib_1.asFeatures)([{ path: '/features/test.feature', content: `Backgrounds: p1.${domain_webpage_1.WEB_PAGE}\n\nOn the ${key} ${domain_webpage_1.WEB_PAGE}\nPress the submit button` }]); | ||
const backgrounds = (0, lib_1.asFeatures)([{ path: `/backgrounds/p1.${domain_webpage_1.WEB_PAGE}.feature`, content: '' }]); | ||
const result = await (0, run_1.runWith)({ specl, features, backgrounds, addSteppers: [TestStepsRequiresDomain, domain_webpage_1.default], world }); | ||
expect(result.ok).toBe(true); | ||
@@ -61,0 +65,0 @@ // FIXME wrong result |
@@ -24,3 +24,3 @@ "use strict"; | ||
this.logger.log(`writing to ${dest}`); | ||
fs_1.writeFileSync(dest, this.controls.join('<br />\n')); | ||
(0, fs_1.writeFileSync)(dest, this.controls.join('<br />\n')); | ||
return this.building; | ||
@@ -27,0 +27,0 @@ } |
{ | ||
"name": "@haibun/domain-webpage", | ||
"version": "1.8.1", | ||
"version": "1.8.2", | ||
"description": "", | ||
@@ -23,3 +23,2 @@ "author": "", | ||
"prettier": "^2.3.1", | ||
"ts-jest": "^27.0.3", | ||
"ts-node": "^10.0.0", | ||
@@ -26,0 +25,0 @@ "tslint": "^6.1.3" |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
18967
14
233