diff --git a/packages/development-edition-engine-twig/.gitignore b/packages/development-edition-engine-twig/.gitignore new file mode 100644 index 000000000..0679bd2b5 --- /dev/null +++ b/packages/development-edition-engine-twig/.gitignore @@ -0,0 +1,9 @@ +node_modules/ +.DS_Store +patternlab.json +.sass-cache/* +/sass-cache +Thumbs.db +.idea/ +public +dependencyGraph.json diff --git a/packages/development-edition-engine-twig/CHANGELOG.md b/packages/development-edition-engine-twig/CHANGELOG.md new file mode 100644 index 000000000..767840ada --- /dev/null +++ b/packages/development-edition-engine-twig/CHANGELOG.md @@ -0,0 +1,5 @@ +# Change Log + +All notable changes to this project will be documented in this file. +See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. + diff --git a/packages/development-edition-engine-twig/README.md b/packages/development-edition-engine-twig/README.md new file mode 100644 index 000000000..5ea6dce7b --- /dev/null +++ b/packages/development-edition-engine-twig/README.md @@ -0,0 +1,25 @@ +![Pattern Lab Logo](/patternlab.png "Pattern Lab Logo") + +# Pattern Lab Node - Development Edition Engine Twig + +_here be dragons_ + +This Development Edition is a variant of [Edition Node](https://github.com/pattern-lab/patternlab-node/tree/master/packages/edition-node) for convience purposes only, loaded with the Twig Engine. The goals of this Development Edition are two-fold: + +* Develop the [Twig Engine](https://github.com/pattern-lab/patternlab-node/tree/master/packages/engine-twig) +* Build and test against Twig pattern tree + +> Development Editions of Pattern Lab provide the ability to work on and commit changes to select packages within the overall Pattern Lab [ecosystem](http://patternlab.io/docs/advanced-ecosystem-overview.html). This Edition is NOT stable. + + +## Working on Pattern Lab's UI Locally + +### Step 1: Install Dependencies +Run the following in the root of the Pattern Lab repo: + +``` +yarn run setup +``` + +### Step 2 +Finally, go back into this folder, `cd packages/development-edition-engine-twig`, and start up the local dev server which watches UIKit and the local Pattern Lab instance for changes, live reloads, etc by running `yarn dev` diff --git a/packages/development-edition-engine-twig/package.json b/packages/development-edition-engine-twig/package.json new file mode 100644 index 000000000..cec62d828 --- /dev/null +++ b/packages/development-edition-engine-twig/package.json @@ -0,0 +1,43 @@ +{ + "name": "@pattern-lab/development-edition-engine-twig", + "private": true, + "version": "0.0.1", + "description": "The tree of components we use to test, develop and validate the twig engine (not engine-twig-php)", + "scripts": { + "postbootstrap": "patternlab install --starterkits @pattern-lab/starterkit-twig-demo", + "pl:build": "patternlab build --config ./patternlab-config.json", + "pl:help": "patternlab --help", + "pl:install": "patternlab install --config ./patternlab-config.json", + "pl:serve": "patternlab serve --config ./patternlab-config.json", + "pl:version": "patternlab --version", + "dev": "node ./node_modules/@pattern-lab/uikit-workshop/build-tools.js" + }, + "keywords": [ + "Pattern Lab", + "Atomic Web Design", + "Node", + "Twig", + "Edition" + ], + "author": "Ringo De Smet", + "license": "MIT", + "repository": { + "type": "git", + "url": "git://github.com/pattern-lab/patternlab-node.git" + }, + "engines": { + "node": ">=10.0" + }, + "dependencies": { + "@pattern-lab/cli": "^5.7.0", + "@pattern-lab/core": "^5.7.0", + "@pattern-lab/engine-twig": "^5.0.0", + "@pattern-lab/starterkit-twig-demo": "^5.0.0", + "@pattern-lab/uikit-workshop": "^5.7.1" + }, + "workspaces": { + "nohoist": [ + "**/@pattern-lab/starterkit-twig-demo" + ] + } +} diff --git a/packages/development-edition-engine-twig/patternlab-config.json b/packages/development-edition-engine-twig/patternlab-config.json new file mode 100644 index 000000000..3c18bd403 --- /dev/null +++ b/packages/development-edition-engine-twig/patternlab-config.json @@ -0,0 +1,114 @@ +{ + "cacheBust": true, + "cleanPublic": true, + "defaultPattern": "pages-homepage", + "defaultShowPatternInfo": false, + "ishControlsHide": { + "s": false, + "m": false, + "l": false, + "full": false, + "random": false, + "disco": false, + "hay": true, + "mqs": false, + "find": false, + "views-all": false, + "views-annotations": false, + "views-code": false, + "views-new": false, + "tools-all": false, + "tools-docs": false + }, + "ishViewportRange": { + "s": [ + 240, + 500 + ], + "m": [ + 500, + 800 + ], + "l": [ + 800, + 2600 + ] + }, + "logLevel": "info", + "outputFileSuffixes": { + "rendered": ".rendered", + "rawTemplate": "", + "markupOnly": ".markup-only" + }, + "paths": { + "source": { + "root": "source/", + "patterns": "source/_patterns/", + "data": "source/_data/", + "meta": "source/_meta/", + "annotations": "source/_annotations/", + "styleguide": "dist/", + "patternlabFiles": { + "general-header": "views/partials/general-header.mustache", + "general-footer": "views/partials/general-footer.mustache", + "patternSection": "views/partials/patternSection.mustache", + "patternSectionSubtype": "views/partials/patternSectionSubtype.mustache", + "viewall": "views/viewall.mustache" + }, + "js": "source/js", + "images": "source/images", + "fonts": "source/fonts", + "css": "source/css" + }, + "public": { + "root": "public/", + "patterns": "public/patterns/", + "data": "public/styleguide/data/", + "annotations": "public/annotations/", + "styleguide": "public/styleguide/", + "js": "public/js", + "images": "public/images", + "fonts": "public/fonts", + "css": "public/css" + } + }, + "patternExtension": "twig", + "patternStateCascade": [ + "inprogress", + "inreview", + "complete" + ], + "patternExportDirectory": "pattern_exports", + "patternExportPatternPartials": [], + "serverOptions": { + "wait": 1000 + }, + "starterkitSubDir": "dist", + "styleGuideExcludes": [], + "theme": { + "color": "dark", + "density": "compact", + "layout": "horizontal" + }, + "uikits": [ + { + "name": "uikit-workshop", + "outputDir": "", + "enabled": true, + "excludedPatternStates": [], + "excludedTags": [] + } + ], + "engines": { + "twig": { + "namespaces": { + "atoms": "source/_patterns/00-atoms/", + "molecules": "source/_patterns/01-molecules/", + "organisms": "source/_patterns/02-organisms/", + "templates": "source/_patterns/03-templates/", + "pages": "source/_patterns/04-pages/", + "macros": "source/_macros/" + } + } + } +} diff --git a/packages/development-edition-engine-twig/source/.gitignore b/packages/development-edition-engine-twig/source/.gitignore new file mode 100644 index 000000000..d6b7ef32c --- /dev/null +++ b/packages/development-edition-engine-twig/source/.gitignore @@ -0,0 +1,2 @@ +* +!.gitignore diff --git a/packages/engine-twig/README.md b/packages/engine-twig/README.md index 194f92e49..9d45fca95 100644 --- a/packages/engine-twig/README.md +++ b/packages/engine-twig/README.md @@ -1,12 +1,16 @@ ## The Twig PatternEngine for Pattern Lab / Node -To install the Twig engine in your edition, `npm install @pattern-lab/engine-twig` should do the trick. +To install the Twig engine in your edition, `npm install @pattern-lab/engine-twig` should do the trick. This pattern engine uses the [`twing`](https://www.npmjs.com/package/twing) library. ## Supported features -Level of support is more or less full. Partial calls and lineage hunting are supported. Twig does not support the mustache-specific syntax extensions, style modifiers and pattern parameters, because their use cases are addressed by the core Twig feature set. +Level of support for Twig constructs is on the level that the `twing` library supports. The following partial resolution schemes (`includes`, `extends`, `import`) are supported: -We are looking for help with the following issues: +* relative file paths: standard by `twing` libary +* namespaces: standard by `twing` library, `engine-twig` only passes the configuration from `patternlab-config.json` +* Patternlab pattern names: integration between Patternlab and `twing` implemented by a custom [`loader`](https://nightlycommit.github.io/twing/api.html#create-your-own-loader) + +Now that this engine uses a better Twig Javascript library, the following issues are resolved: * [Pattern Lab does not support twig extends](https://github.com/pattern-lab/patternlab-node/issues/554) * [Verify maturity of Twig engine](https://github.com/pattern-lab/patternlab-node/issues/285) diff --git a/packages/engine-twig/lib/engine_twig.js b/packages/engine-twig/lib/engine_twig.js index 898a21450..0bfc99363 100644 --- a/packages/engine-twig/lib/engine_twig.js +++ b/packages/engine-twig/lib/engine_twig.js @@ -22,44 +22,126 @@ const fs = require('fs-extra'); const path = require('path'); -const process = require('process'); -const Twig = require('node-twig'); -const twig = Twig.renderFile; +const { + TwingEnvironment, + TwingLoaderFilesystem, + TwingLoaderChain, + TwingSource, +} = require('twing'); + +class TwingLoaderPatternLab { + patterns = new Map(); + + constuctor() {} + + registerPartial(pattern) { + if (pattern.patternPartial) { + this.patterns.set(pattern.patternPartial, pattern); + } + } + + /** + * Returns the source context for a given template logical name. + * + * @param {string} name The template logical name + * @param {TwingSource} from The source that initiated the template loading + * + * @returns {Promise} + * + * @throws TwingErrorLoader When name is not found + */ + getSourceContext(name, from) { + var pattern = this.patterns.get(name); + return Promise.resolve( + new TwingSource(pattern.extendedTemplate, name, pattern.relPath) + ); + } + + /** + * Gets the cache key to use for the cache for a given template name. + * + * @param {string} name The name of the template to load + * @param {TwingSource} from The source that initiated the template loading + * + * @returns {Promise} The cache key + * + * @throws TwingErrorLoader When name is not found + */ + getCacheKey(name, from) { + return Promise.resolve(name); + } + + /** + * Returns true if the template is still fresh. + *l + * @param {string} name The template name + * @param {number} time Timestamp of the last modification time of the cached template + * @param {TwingSource} from The source that initiated the template loading + * + * @returns {Promise} true if the template is fresh, false otherwise + * + * @throws TwingErrorLoader When name is not found + */ + isFresh(name, time, from) { + return Promise.resolve(this.patterns.has(name) ? true : false); + } + + /** + * Check if we have the source code of a template, given its name. + * + * @param {string} name The name of the template to check if we can load + * @param {TwingSource} from The source that initiated the template loading + * + * @returns {Promise} If the template source code is handled by this loader or not + */ + exists(name, from) { + return Promise.resolve(this.patterns.has(name) ? true : false); + } + + /** + * Resolve the path of a template, given its name, whatever it means in the context of the loader. + * + * @param {string} name The name of the template to resolve + * @param {TwingSource} from The source that initiated the template loading + * + * @returns {Promise} The resolved path of the template + */ + resolve(name, from) { + pattern = this.patterns.get(name); + return null; + } +} + +const fileSystemLoader = new TwingLoaderFilesystem(); +const patternLabLoader = new TwingLoaderPatternLab(); +const chainLoader = new TwingLoaderChain([fileSystemLoader, patternLabLoader]); +const twing = new TwingEnvironment(chainLoader); +var metaPath; var engine_twig = { - engine: Twig, + engine: twing, engineName: 'twig', engineFileExtension: '.twig', - //Important! Needed for Twig compilation. Can't resolve paths otherwise. - expandPartials: true, - // regexes, stored here so they're only compiled once findPartialsRE: /{%\s*(?:extends|include|embed)\s+('[^']+'|"[^"]+").*?%}/g, findPartialKeyRE: /"((?:\\.|[^"\\])*)"/, findListItemsRE: /({{#( )?)(list(I|i)tems.)(one|two|three|four|five|six|seven|eight|nine|ten|eleven|twelve|thirteen|fourteen|fifteen|sixteen|seventeen|eighteen|nineteen|twenty)( )?}}/g, // TODO // render it - renderPattern: function renderPattern(pattern, data) { - return Promise.resolve( - twig( - pattern.relPath, - { - root: path.relative( - __dirname, - path.resolve(process.cwd(), 'source', '_patterns') - ), - context: data, - }, - (error, template) => { - if (error) { - console.log(error); - } - console.log(template); - return template; - } - ) + renderPattern: function renderPattern(pattern, data, partials) { + var patternPath = pattern.relPath; + if (patternPath.lastIndexOf(metaPath) === 0) { + patternPath = patternPath.substring(metaPath.length + 1); + } + return Promise.resolve(twing.render(patternPath, data)); + }, + + registerPartial: function registerPartial(pattern) { + console.log( + `registerPartial(${pattern.name} - ${pattern.patternPartial} - ${pattern.patternPath} - ${pattern.relPath})` ); + patternLabLoader.registerPartial(pattern); }, // find and return any {% include 'template-name' %} within pattern @@ -88,7 +170,6 @@ var engine_twig = { // given a pattern, and a partial string, tease out the "pattern key" and // return it. findPartial: function(partialString) { - //var partialKey = partialString.replace(this.findPartialsRE, '$1'); var partial = partialString.match(this.findPartialKeyRE)[0]; partial = partial.replace(/"/g, ''); @@ -121,6 +202,30 @@ var engine_twig = { this.spawnFile(config, '_00-head.twig'); this.spawnFile(config, '_01-foot.twig'); }, + + /** + * Accept a Pattern Lab config object from the core and use the settings to + * load helpers. + * + * @param {object} config - the global config object from core + */ + usePatternLabConfig: function(config) { + metaPath = path.resolve(config.paths.source.meta); + // Global paths + fileSystemLoader.addPath(config.paths.source.meta); + fileSystemLoader.addPath(config.paths.source.patterns); + // Namespaced paths + if ( + config['engines'] && + config['engines']['twig'] && + config['engines']['twig']['namespaces'] + ) { + var namespaces = config['engines']['twig']['namespaces']; + Object.keys(namespaces).forEach(function(key, index) { + fileSystemLoader.addPath(namespaces[key], key); + }); + } + }, }; module.exports = engine_twig; diff --git a/packages/engine-twig/package.json b/packages/engine-twig/package.json index 414778d50..8a669d1f8 100644 --- a/packages/engine-twig/package.json +++ b/packages/engine-twig/package.json @@ -5,7 +5,7 @@ "main": "lib/engine_twig.js", "dependencies": { "fs-extra": "0.30.0", - "node-twig": "1.1.0" + "twing": "4.0.3" }, "keywords": [ "Pattern Lab", diff --git a/packages/starterkit-twig-demo/dist/_macros/forms.twig b/packages/starterkit-twig-demo/dist/_macros/forms.twig index e860bb346..3149edc74 100755 --- a/packages/starterkit-twig-demo/dist/_macros/forms.twig +++ b/packages/starterkit-twig-demo/dist/_macros/forms.twig @@ -13,9 +13,9 @@ {% set show_label = label|default(true) %}
{% if show_label %} -
{% endmacro %} diff --git a/packages/starterkit-twig-demo/dist/_patterns/03-templates/03-article-2col.twig b/packages/starterkit-twig-demo/dist/_patterns/03-templates/03-article-2col.twig index a34f7753a..825ca9471 100755 --- a/packages/starterkit-twig-demo/dist/_patterns/03-templates/03-article-2col.twig +++ b/packages/starterkit-twig-demo/dist/_patterns/03-templates/03-article-2col.twig @@ -1,17 +1,17 @@ -{% extends "@templates/page-2col.twig" %} +{% extends "@templates/00-layouts/01-page-2col.twig" %} {% block main %}

Article Headline Lorem ipsum dolor sit aweofij

{% include "@molecules/00-text/00-byline.twig" %}
- {% include "@organisms/article-body.twig" %} + {% include "@organisms/01-article/00-article-body.twig" %}
- {% include "@molecules/social-share.twig" %} - {% include "@organisms/comment-thread.twig" %} + {% include "@molecules/06-components/00-social-share.twig" %} + {% include "@organisms/02-comments/00-comment-thread.twig" %} {% endblock %} {% block sidebar %} - {% include "@organisms/related-posts.twig" %} - {% include "@organisms/recent-tweets.twig" %} + {% include "@organisms/03-sections/02-related-posts.twig" %} + {% include "@organisms/03-sections/01-recent-tweets.twig" %} {% endblock %} diff --git a/yarn.lock b/yarn.lock index 529c8eccf..3b04ad3d5 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1871,6 +1871,11 @@ "@types/minimatch" "*" "@types/node" "*" +"@types/luxon@^1.4.0": + version "1.21.0" + resolved "https://registry.yarnpkg.com/@types/luxon/-/luxon-1.21.0.tgz#db792d29f535d49522cb6d94dd9da053efc950a1" + integrity sha512-Zhrf65tpjOlVIYrUhX9eu1VzRo8iixQDLFPbfqFxPpG4pBTNNPZ2BFhYE0IAsDfW9GWg+RcrUqiLwrGJH4rq4w== + "@types/minimatch@*": version "3.0.3" resolved "https://registry.yarnpkg.com/@types/minimatch/-/minimatch-3.0.3.tgz#3dca0e3f33b200fc7d1139c0cd96c1268cadfd9d" @@ -1881,6 +1886,11 @@ resolved "https://registry.yarnpkg.com/@types/node/-/node-12.7.12.tgz#7c6c571cc2f3f3ac4a59a5f2bd48f5bdbc8653cc" integrity sha512-KPYGmfD0/b1eXurQ59fXD1GBzhSQfz6/lKBxkaHX9dKTzjXbK68Zt7yGUxUsCS1jeTy/8aL+d9JEr+S54mpkWQ== +"@types/node@^12.0.8": + version "12.12.30" + resolved "https://registry.yarnpkg.com/@types/node/-/node-12.12.30.tgz#3501e6f09b954de9c404671cefdbcc5d9d7c45f6" + integrity sha512-sz9MF/zk6qVr3pAnM0BSQvYIBK44tS75QC5N+VbWSE4DjCV/pJ+UzCW/F+vVnl7TkOPcuwQureKNtSSwjBTaMg== + "@types/prop-types@*": version "15.7.3" resolved "https://registry.yarnpkg.com/@types/prop-types/-/prop-types-15.7.3.tgz#2ab0d5da2e5815f94b0b9d4b95d1e5f243ab2ca7" @@ -3719,6 +3729,11 @@ caniuse-lite@^1.0.30001004, caniuse-lite@^1.0.30001006: resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001010.tgz#397a14034d384260453cc81994f494626d34b938" integrity sha512-RA5GH9YjFNea4ZQszdWgh2SC+dpLiRAg4VDQS2b5JRI45OxmbGrYocYHTa9x0bKMQUE7uvHkNPNffUr+pCxSGw== +capitalize@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/capitalize/-/capitalize-1.0.0.tgz#dc802c580aee101929020d2ca14b4ca8a0ae44be" + integrity sha1-3IAsWAruEBkpAg0soUtMqKCuRL4= + capture-stack-trace@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/capture-stack-trace/-/capture-stack-trace-1.0.1.tgz#a6c0bbe1f38f3aa0b92238ecb6ff42c344d4135d" @@ -4195,11 +4210,6 @@ colors@1.3.0: resolved "https://registry.yarnpkg.com/colors/-/colors-1.3.0.tgz#5f20c9fef6945cb1134260aab33bfbdc8295e04e" integrity sha512-EDpX3a7wHMWFA7PUHWPHNWqOxIIRSJetuwl0AS5Oi/5FMV8kWm69RTlgm00GKjBO1xFHMtBbL49yRtMMdticBw== -colors@^1.1.2: - version "1.4.0" - resolved "https://registry.yarnpkg.com/colors/-/colors-1.4.0.tgz#c50491479d4c1bdaed2c9ced32cf7c7dc2360f78" - integrity sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA== - columnify@^1.5.4: version "1.5.4" resolved "https://registry.yarnpkg.com/columnify/-/columnify-1.5.4.tgz#4737ddf1c7b69a8a7c340570782e947eec8e78bb" @@ -5022,6 +5032,11 @@ crypto-browserify@^3.11.0: randombytes "^2.0.0" randomfill "^1.0.3" +crypto-js@^3.1.9-1: + version "3.3.0" + resolved "https://registry.yarnpkg.com/crypto-js/-/crypto-js-3.3.0.tgz#846dd1cce2f68aacfa156c8578f926a609b7976b" + integrity sha512-DIT51nX0dCfKltpRiXV+/TVZq+Qq2NgF4644+K7Ttnla7zEzqc+kjJyiB96BHNyUTBxyjzRcZYpUdZa+QAqi6Q== + crypto-random-string@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/crypto-random-string/-/crypto-random-string-1.0.0.tgz#a230f64f568310e1498009940790ec99545bca7e" @@ -5961,7 +5976,7 @@ es6-error@^4.0.1: resolved "https://registry.yarnpkg.com/es6-error/-/es6-error-4.1.1.tgz#9e3af407459deed47e9a91f9b885a84eb05c561d" integrity sha512-Um/+FxMr9CISWh0bi5Zv0iOD+4cFh5qLeks1qhAopKVAJw3drgKbKySikp7wGhDL0HPeaja0P5ULZrxLkniUVg== -es6-promise@^4.0.3, es6-promise@^4.2.8: +es6-promise@^4.0.3, es6-promise@^4.2.5, es6-promise@^4.2.8: version "4.2.8" resolved "https://registry.yarnpkg.com/es6-promise/-/es6-promise-4.2.8.tgz#4eb21594c972bc40553d276e510539143db53e0a" integrity sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w== @@ -6235,6 +6250,11 @@ esrecurse@^4.1.0: dependencies: estraverse "^4.1.0" +esrever@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/esrever/-/esrever-0.2.0.tgz#96e9d28f4f1b1a76784cd5d490eaae010e7407b8" + integrity sha1-lunSj08bGnZ4TNXUkOquAQ50B7g= + estraverse@^4.0.0, estraverse@^4.1.0, estraverse@^4.1.1: version "4.3.0" resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.3.0.tgz#398ad3f3c5a24948be7725e83d11a7de28cdbd1d" @@ -6296,13 +6316,6 @@ evp_bytestokey@^1.0.0, evp_bytestokey@^1.0.3: md5.js "^1.3.4" safe-buffer "^5.1.1" -exec-php@0.0.3: - version "0.0.3" - resolved "https://registry.yarnpkg.com/exec-php/-/exec-php-0.0.3.tgz#a0abd0eddf74013af68f07555fd51fa0e522723e" - integrity sha1-oKvQ7d90ATr2jwdVX9UfoOUicj4= - dependencies: - tmp "0.0.24" - execa@0.10.0: version "0.10.0" resolved "https://registry.yarnpkg.com/execa/-/execa-0.10.0.tgz#ff456a8f53f90f8eccc71a96d11bdfc7f082cb50" @@ -7030,7 +7043,7 @@ fs-extra@3.0.1: jsonfile "^3.0.0" universalify "^0.1.0" -fs-extra@5.0.0: +fs-extra@5.0.0, fs-extra@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-5.0.0.tgz#414d0110cdd06705734d055652c5411260c31abd" integrity sha512-66Pm4RYbjzdyeuqudYqhFiNBbCIuI9kgRqLPSHIlXHidW8NIQtVdkM1yeZ4lXwuhbTETv3EUGMNHAAw6hiundQ== @@ -8125,6 +8138,11 @@ htmlparser2@^3.3.0, htmlparser2@^3.8.3, htmlparser2@^3.9.0, htmlparser2@^3.9.1, inherits "^2.0.1" readable-stream "^3.1.1" +htmlspecialchars@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/htmlspecialchars/-/htmlspecialchars-1.0.5.tgz#f430f8c1d5f3709be7bebaea696dc04824306a30" + integrity sha1-9DD4wdXzcJvnvrrqaW3ASCQwajA= + http-auth@3.2.x: version "3.2.4" resolved "https://registry.yarnpkg.com/http-auth/-/http-auth-3.2.4.tgz#285ae2024dc734a729a087508b630fc8f595f711" @@ -8250,7 +8268,7 @@ husky@0.14.3: normalize-path "^1.0.0" strip-indent "^2.0.0" -iconv-lite@0.4.24, iconv-lite@^0.4.17, iconv-lite@^0.4.24, iconv-lite@^0.4.4, iconv-lite@~0.4.13: +iconv-lite@0.4.24, iconv-lite@^0.4.17, iconv-lite@^0.4.19, iconv-lite@^0.4.24, iconv-lite@^0.4.4, iconv-lite@~0.4.13: version "0.4.24" resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b" integrity sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA== @@ -8803,6 +8821,13 @@ is-glob@^4.0.0, is-glob@^4.0.1, is-glob@~4.0.1: dependencies: is-extglob "^2.1.1" +is-integer@^1.0.7: + version "1.0.7" + resolved "https://registry.yarnpkg.com/is-integer/-/is-integer-1.0.7.tgz#6bde81aacddf78b659b6629d629cadc51a886d5c" + integrity sha1-a96Bqs3feLZZtmKdYpytxRqIbVw= + dependencies: + is-finite "^1.0.0" + is-lower-case@^1.1.0: version "1.1.3" resolved "https://registry.yarnpkg.com/is-lower-case/-/is-lower-case-1.1.3.tgz#7e147be4768dc466db3bfb21cc60b31e6ad69393" @@ -8841,6 +8866,11 @@ is-number@^4.0.0: resolved "https://registry.yarnpkg.com/is-number/-/is-number-4.0.0.tgz#0026e37f5454d73e356dfe6564699867c6a7f0ff" integrity sha512-rSklcAIlf1OmFdyAqbnWTLVelsQ58uvZ66S/ZyawjWqIviTWCjg2PzVGw8WUA+nNuPTqb4wgA+NszrJ+08LlgQ== +is-number@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/is-number/-/is-number-5.0.0.tgz#c393bc471e65de1a10a6abcb20efeb12d2b88166" + integrity sha512-LmVHHP5dTJwrwZg2Jjqp7K5jpvcnYvYD1LMpvGadMsMv5+WXoDSLBQ0+zmuBJmuZGh2J2K845ygj/YukxUnr4A== + is-number@^7.0.0: version "7.0.0" resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b" @@ -9563,6 +9593,11 @@ lerna@3.17.0: import-local "^2.0.0" npmlog "^4.1.2" +levenshtein@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/levenshtein/-/levenshtein-1.0.5.tgz#3911737a9cb56da345d008f55782c6f138979ba3" + integrity sha1-ORFzepy1baNF0Aj1V4LG8TiXm6M= + levn@^0.3.0, levn@~0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/levn/-/levn-0.3.0.tgz#3b09924edf9f083c0490fdd4c0bc4421e04764ee" @@ -9735,6 +9770,13 @@ locate-path@^3.0.0: p-locate "^3.0.0" path-exists "^3.0.0" +locutus@^2.0.11: + version "2.0.11" + resolved "https://registry.yarnpkg.com/locutus/-/locutus-2.0.11.tgz#83f85109971fd3dd620482a04381916e4a31d4f0" + integrity sha512-C0q1L38lK5q1t+wE0KY21/9szrBHxye6o2z5EJzU+5B79tubNOC+nLAEzTTn1vPUGoUuehKh8kYKqiVUTWRyaQ== + dependencies: + es6-promise "^4.2.5" + lodash-es@^4.2.1: version "4.17.15" resolved "https://registry.yarnpkg.com/lodash-es/-/lodash-es-4.17.15.tgz#21bd96839354412f23d7a10340e5eac6ee455d78" @@ -10109,6 +10151,11 @@ lru-cache@^5.1.1: dependencies: yallist "^3.0.2" +luxon@^1.19.3: + version "1.22.0" + resolved "https://registry.yarnpkg.com/luxon/-/luxon-1.22.0.tgz#639525c7c69e594953c7b142794466b8ea85b868" + integrity sha512-3sLvlfbFo+AxVEY3IqxymbumtnlgBwjDExxK60W3d+trrUzErNAz/PfvPT+mva+vEUrdIodeCOs7fB6zHtRSrw== + macos-release@^2.2.0: version "2.3.0" resolved "https://registry.yarnpkg.com/macos-release/-/macos-release-2.3.0.tgz#eb1930b036c0800adebccd5f17bc4c12de8bb71f" @@ -10389,6 +10436,11 @@ merge2@^1.2.3: resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.3.0.tgz#5b366ee83b2f1582c48f87e47cf1a9352103ca81" integrity sha512-2j4DAdlBOkiSZIsaXk4mTE3sRS02yBHAtfy127xRV3bQUFqXkjHCHLW6Scv7DwNRbIWNHH8zpnz9zMaKXIdvYw== +merge@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/merge/-/merge-1.2.1.tgz#38bebf80c3220a8a487b6fcfb3941bb11720c145" + integrity sha512-VjFo4P5Whtj4vsLzsYBu5ayHhoHJ0UqNm7ibvShmbmoz7tGi0vXaoJbGdB+GmDMLUdg8DpQXEIeVDAe8MaABvQ== + methods@^1.1.1, methods@~1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/methods/-/methods-1.1.2.tgz#5529a4d67654134edcc5266656835b0f851afcee" @@ -11036,15 +11088,6 @@ node-status-codes@^1.0.0: resolved "https://registry.yarnpkg.com/node-status-codes/-/node-status-codes-1.0.0.tgz#5ae5541d024645d32a58fcddc9ceecea7ae3ac2f" integrity sha1-WuVUHQJGRdMqWPzdyc7s6nrjrC8= -node-twig@1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/node-twig/-/node-twig-1.1.0.tgz#dd921248caf49a8c86768cb1ffafc6f43306d580" - integrity sha1-3ZISSMr0moyGdoyx/6/G9DMG1YA= - dependencies: - colors "^1.1.2" - exec-php "0.0.3" - trim "0.0.1" - nopt@1.0.10: version "1.0.10" resolved "https://registry.yarnpkg.com/nopt/-/nopt-1.0.10.tgz#6ddd21bd2a31417b92727dd585f8a6f37608ebee" @@ -11289,7 +11332,7 @@ object-get@^2.1.0: resolved "https://registry.yarnpkg.com/object-get/-/object-get-2.1.0.tgz#722bbdb60039efa47cad3c6dc2ce51a85c02c5ae" integrity sha1-ciu9tgA576R8rTxtws5RqFwCxa4= -object-hash@^1.3.1: +object-hash@^1.2.0, object-hash@^1.3.1: version "1.3.1" resolved "https://registry.yarnpkg.com/object-hash/-/object-hash-1.3.1.tgz#fde452098a951cb145f039bb7d455449ddc126df" integrity sha512-OSuu/pU4ENM9kmREg0BdNrUDIl1heYa4mBZacJc+vVWz4GtAwu7jO8s4AIt2aGRUTqxykpWzI3Oqnsm13tTMDA== @@ -11717,6 +11760,13 @@ package-json@^4.0.0: registry-url "^3.0.3" semver "^5.1.0" +pad@^2.0.3: + version "2.3.0" + resolved "https://registry.yarnpkg.com/pad/-/pad-2.3.0.tgz#d604f0d5433c3e1500e207279cc5cd0234b1c2aa" + integrity sha512-lxrgnOG5AXmzMRT1O5urWtYFxHnFSE+QntgTHij1nvS4W+ubhQLmQRHmZXDeEvk9I00itAixLqU9Q6fE0gW3sw== + dependencies: + wcwidth "^1.0.1" + pako@~1.0.5: version "1.0.10" resolved "https://registry.yarnpkg.com/pako/-/pako-1.0.10.tgz#4328badb5086a426aa90f541977d4955da5c9732" @@ -13325,6 +13375,11 @@ regex-not@^1.0.0, regex-not@^1.0.2: extend-shallow "^3.0.2" safe-regex "^1.1.0" +regex-parser@^2.2.8: + version "2.2.10" + resolved "https://registry.yarnpkg.com/regex-parser/-/regex-parser-2.2.10.tgz#9e66a8f73d89a107616e63b39d4deddfee912b37" + integrity sha512-8t6074A68gHfU8Neftl0Le6KTDwfGAj7IyjPIMSfikI2wJUTHDMaIq42bUsfVnj8mhx0R+45rdUXHGpN164avA== + regexpp@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-2.0.1.tgz#8d19d31cf632482b589049f8281f93dbcba4d07f" @@ -13625,6 +13680,11 @@ run-queue@^1.0.0, run-queue@^1.0.3: dependencies: aproba "^1.1.1" +runes@^0.4.3: + version "0.4.3" + resolved "https://registry.yarnpkg.com/runes/-/runes-0.4.3.tgz#32f7738844bc767b65cc68171528e3373c7bb355" + integrity sha512-K6p9y4ZyL9wPzA+PMDloNQPfoDGTiFYDvdlXznyGKgD10BJpcAosvATKrExRKOrNLgD8E7Um7WGW0lxsnOuNLg== + rx-lite-aggregates@^4.0.8: version "4.0.8" resolved "https://registry.yarnpkg.com/rx-lite-aggregates/-/rx-lite-aggregates-4.0.8.tgz#753b87a89a11c95467c4ac1626c4efc4e05c67be" @@ -15282,12 +15342,7 @@ title-case@^2.1.0: no-case "^2.2.0" upper-case "^1.0.3" -tmp@0.0.24: - version "0.0.24" - resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.24.tgz#d6a5e198d14a9835cc6f2d7c3d9e302428c8cf12" - integrity sha1-1qXhmNFKmDXMby18PZ4wJCjIzxI= - -tmp@^0.0.33: +tmp@0.0.33, tmp@^0.0.33: version "0.0.33" resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.33.tgz#6d34335889768d21b2bcda0aa277ced3b1bfadf9" integrity sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw== @@ -15423,11 +15478,6 @@ trim-right@^1.0.1: resolved "https://registry.yarnpkg.com/trim-right/-/trim-right-1.0.1.tgz#cb2e1203067e0c8de1f614094b9fe45704ea6003" integrity sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM= -trim@0.0.1: - version "0.0.1" - resolved "https://registry.yarnpkg.com/trim/-/trim-0.0.1.tgz#5858547f6b290757ee95cccc666fb50084c460dd" - integrity sha1-WFhUf2spB1fulczMZm+1AITEYN0= - trivial-deferred@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/trivial-deferred/-/trivial-deferred-1.0.1.tgz#376d4d29d951d6368a6f7a0ae85c2f4d5e0658f3" @@ -15491,6 +15541,44 @@ tweetnacl@^0.14.3, tweetnacl@~0.14.0: resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64" integrity sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q= +twig-lexer@^0.7.0: + version "0.7.0" + resolved "https://registry.yarnpkg.com/twig-lexer/-/twig-lexer-0.7.0.tgz#28e821b108b8db794bc1a120b1295807a4e19e11" + integrity sha512-pSzufXfQV/fbER7QFskpRvLPBoEN5LovDNE9gCo9/kg71II3jWZp5Xtd8MRIW8uU46mq0f7C/2fypdh6z4eguw== + dependencies: + "@types/node" "^12.0.8" + +twing@4.0.3: + version "4.0.3" + resolved "https://registry.yarnpkg.com/twing/-/twing-4.0.3.tgz#8b1df34d9a130320ad4fbe3d0f6eea93c5ecb22a" + integrity sha512-78J7KidaDWFny8a7cfmZhg/KbkYbZkhrOAY3/mDuIOGl4FYR1EixOoxsoLK3JU5HHdJ3ECnnlLE2ruNnOfj7kw== + dependencies: + "@types/luxon" "^1.4.0" + camelcase "^4.1.0" + capitalize "^1.0.0" + crypto-js "^3.1.9-1" + esrever "^0.2.0" + fs-extra "^5.0.0" + htmlspecialchars "^1.0.5" + iconv-lite "^0.4.19" + is-integer "^1.0.7" + is-number "^5.0.0" + is-plain-object "^2.0.4" + isobject "^3.0.1" + levenshtein "^1.0.5" + locutus "^2.0.11" + luxon "^1.19.3" + merge "^1.2.1" + object-hash "^1.2.0" + pad "^2.0.3" + regex-parser "^2.2.8" + runes "^0.4.3" + snake-case "^2.1.0" + source-map "^0.6.1" + tmp "0.0.33" + twig-lexer "^0.7.0" + utf8-binary-cutter "^0.9.2" + type-check@~0.3.2: version "0.3.2" resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.3.2.tgz#5884cab512cf1d355e3fb784f30804b2b520db72" @@ -15879,6 +15967,13 @@ user-home@^2.0.0: dependencies: os-homedir "^1.0.0" +utf8-binary-cutter@^0.9.2: + version "0.9.2" + resolved "https://registry.yarnpkg.com/utf8-binary-cutter/-/utf8-binary-cutter-0.9.2.tgz#c2d28c7f3fd0387e5e162862d32e34090e2b96d9" + integrity sha512-lS/2TaA9idsyafus4+WaB+C/AfL3JD85C/sgMJBpplZay1G5SwTQcxmd4jiJLI1VxSJr6a3yuNicBxD+iU2MKQ== + dependencies: + lodash "^4.17.10" + utf8-byte-length@^1.0.1: version "1.0.4" resolved "https://registry.yarnpkg.com/utf8-byte-length/-/utf8-byte-length-1.0.4.tgz#f45f150c4c66eee968186505ab93fcbb8ad6bf61"