From 3f65a925a02705ec718e52518be0b9359f1c9b18 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Fri, 29 May 2020 21:28:34 +0000 Subject: [PATCH 1/2] chore(deps-dev): bump @blackflux/eslint-plugin-rules Bumps [@blackflux/eslint-plugin-rules](https://github.com/blackflux/eslint-plugin-rules) from 1.3.28 to 1.3.29. - [Release notes](https://github.com/blackflux/eslint-plugin-rules/releases) - [Changelog](https://github.com/blackflux/eslint-plugin-rules/blob/master/.releaserc.json) - [Commits](https://github.com/blackflux/eslint-plugin-rules/compare/v1.3.28...v1.3.29) Signed-off-by: dependabot-preview[bot] --- package.json | 2 +- yarn.lock | 34 +++++++++++++++++++++++++++++----- 2 files changed, 30 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index 1a5c3290..8841a2a9 100644 --- a/package.json +++ b/package.json @@ -40,7 +40,7 @@ "@babel/core": "7.10.1", "@babel/plugin-proposal-object-rest-spread": "7.10.1", "@babel/register": "7.10.1", - "@blackflux/eslint-plugin-rules": "1.3.28", + "@blackflux/eslint-plugin-rules": "1.3.29", "@blackflux/robo-config-plugin": "3.4.1", "babel-eslint": "10.1.0", "chai": "4.2.0", diff --git a/yarn.lock b/yarn.lock index 7a9e652d..7451f447 100644 --- a/yarn.lock +++ b/yarn.lock @@ -240,12 +240,12 @@ lodash "^4.17.13" to-fast-properties "^2.0.0" -"@blackflux/eslint-plugin-rules@1.3.28": - version "1.3.28" - resolved "https://registry.yarnpkg.com/@blackflux/eslint-plugin-rules/-/eslint-plugin-rules-1.3.28.tgz#362442848e57d48852433511aa2eb9cc844c7d94" - integrity sha512-7VsXOB0KX0v4MDobN6C1LQh6SE9cDo8gfX56Jb8TeU3PHXlhc3MUEZExLnDbIIp1Vz2VCewvYsbVveAErNPlvA== +"@blackflux/eslint-plugin-rules@1.3.29": + version "1.3.29" + resolved "https://registry.yarnpkg.com/@blackflux/eslint-plugin-rules/-/eslint-plugin-rules-1.3.29.tgz#9f621a86f58f9da295dcb5441bcbae8acc4c8576" + integrity sha512-scDhFOy4gUfAf5nS6bkcUPThW8cm0oU2eizWvyS9AlNOMFvkq6eP/66rtWiJ4ieYzlJWXfVOWUDhy3iFjwyGgg== dependencies: - smart-fs "1.11.12" + smart-fs "1.11.13" "@blackflux/robo-config-plugin@3.4.1": version "3.4.1" @@ -6706,6 +6706,20 @@ smart-fs@1.11.12: xml-js "1.6.11" yaml-boost "1.9.21" +smart-fs@1.11.13: + version "1.11.13" + resolved "https://registry.yarnpkg.com/smart-fs/-/smart-fs-1.11.13.tgz#afc5a731afc0760305cfc31d3329fc51cc61ea2e" + integrity sha512-2F4bHTZpDgw2DWEjkWT92ySIKTRHMtasEEQBJ0QccpipjhYGDWL+Hmubr0VUxrRcjfpiAwi5pocKJ49mSa4x2Q== + dependencies: + fs-extra "9.0.0" + js-yaml "3.14.0" + json-stringify-pretty-compact "2.0.0" + lodash.clonedeep "4.5.0" + lodash.isequal "4.5.0" + object-align "1.0.11" + xml-js "1.6.11" + yaml-boost "1.9.22" + snapdragon-node@^2.0.1: version "2.1.1" resolved "https://registry.yarnpkg.com/snapdragon-node/-/snapdragon-node-2.1.1.tgz#6c175f86ff14bdb0724563e8f3c1b021a286853b" @@ -7932,6 +7946,16 @@ yaml-boost@1.9.21: lodash.mergewith "4.6.2" lodash.set "4.3.2" +yaml-boost@1.9.22: + version "1.9.22" + resolved "https://registry.yarnpkg.com/yaml-boost/-/yaml-boost-1.9.22.tgz#670bd35221dbc30cdfd448818e3053dcd04e1b6d" + integrity sha512-Wvv22z13NyFcyKLtoPdduC+1QKP2SDm8lZx4uW8dCjheup5ur7TTFtLUwykksWLxRCqqWt8XpUi8/QRkdU2YZA== + dependencies: + js-yaml "3.14.0" + lodash.get "4.4.2" + lodash.mergewith "4.6.2" + lodash.set "4.3.2" + yaml@^1.7.2: version "1.8.3" resolved "https://registry.yarnpkg.com/yaml/-/yaml-1.8.3.tgz#2f420fca58b68ce3a332d0ca64be1d191dd3f87a" From b32318bfb30a1580935e15a70754d7b5a7d7afac Mon Sep 17 00:00:00 2001 From: Lukas Siemon Date: Fri, 29 May 2020 15:26:04 -0700 Subject: [PATCH 2/2] fix: improved variable handling --- src/load.js | 13 +++- src/plugin/docs.js | 4 +- src/plugin/task.js | 2 +- src/plugin/vars.js | 24 +++++-- src/process.js | 6 ++ test/index.spec.js | 50 ++++++++++--- test/load.spec.js | 8 +-- test/mock/plugin/docs/misc/@default.md | 72 ++++++++++++++++--- test/mock/plugin/docs/misc/@other.md | 44 ++++++++++-- .../{${misc}.txt.json => ${misc}.yml.json} | 0 .../plugin/tasks/misc/snippets/snippet.txt | 4 -- .../plugin/tasks/misc/snippets/snippet.yml | 17 +++++ test/mock/plugin/tasks/misc/task.json | 12 +++- test/mock/plugin/vars/array.json | 5 ++ test/mock/plugin/vars/boolean.json | 5 ++ test/mock/plugin/vars/integer.json | 5 ++ test/mock/plugin/vars/number.json | 5 ++ test/mock/plugin/vars/object.json | 5 ++ test/mock/plugin/vars/string.json | 5 ++ test/mock/projects/misc/@default/CONFDOCS.md | 72 ++++++++++++++++--- test/mock/projects/misc/@default/misc.txt | 4 -- test/mock/projects/misc/@default/misc.yml | 17 +++++ test/mock/projects/misc/@other/CONFDOCS.md | 44 ++++++++++-- test/mock/projects/misc/@other/misc.txt | 4 -- test/mock/projects/misc/@other/misc.yml | 17 +++++ 25 files changed, 381 insertions(+), 63 deletions(-) rename test/mock/plugin/targets/{${misc}.txt.json => ${misc}.yml.json} (100%) delete mode 100644 test/mock/plugin/tasks/misc/snippets/snippet.txt create mode 100644 test/mock/plugin/tasks/misc/snippets/snippet.yml create mode 100644 test/mock/plugin/vars/array.json create mode 100644 test/mock/plugin/vars/boolean.json create mode 100644 test/mock/plugin/vars/integer.json create mode 100644 test/mock/plugin/vars/number.json create mode 100644 test/mock/plugin/vars/object.json create mode 100644 test/mock/plugin/vars/string.json delete mode 100644 test/mock/projects/misc/@default/misc.txt create mode 100644 test/mock/projects/misc/@default/misc.yml delete mode 100644 test/mock/projects/misc/@other/misc.txt create mode 100644 test/mock/projects/misc/@other/misc.yml diff --git a/src/load.js b/src/load.js index 72028b47..13d96a14 100644 --- a/src/load.js +++ b/src/load.js @@ -4,7 +4,7 @@ const fs = require('smart-fs'); const Joi = require('joi-strict'); const { syncDocs, generateDocs } = require('./plugin/docs'); const { applyTasksRec, listPublicTasks, extractMeta } = require('./plugin/task'); -const { populateVars } = require('./plugin/vars'); +const { populateVars, varTypes } = require('./plugin/vars'); module.exports = (pl) => { Joi.assert(pl, Joi.object().keys({ @@ -17,6 +17,10 @@ module.exports = (pl) => { exports: Joi.any().optional() }), 'Bad Plugin Definition.'); + const var2Type = fs.walkDir(pl.varDir).reduce((p, f) => Object.assign(p, { + [f.slice(0, -5)]: fs.smartRead(path.join(pl.varDir, f)).type + }), {}); + const applyTasks = (projectRoot, tasks, variables, exclude) => { assert(typeof projectRoot === 'string'); assert( @@ -43,6 +47,13 @@ module.exports = (pl) => { syncDocs: () => syncDocs(pl.name, pl.taskDir, pl.reqDir, pl.varDir, pl.targetDir, pl.docDir), generateDocs: (tasks, exclude) => genDocs(tasks, exclude), apply: applyTasks, + validateVars: (vars) => { + Object.entries(vars).forEach(([k, v]) => { + if (varTypes[var2Type[k]](v) !== true) { + throw new Error(`Invalid variable type for "${k}". Expected "${var2Type[k]}".`); + } + }); + }, test: (testRoot, variables = {}) => { const knownTargets = fs .walkDir(testRoot) diff --git a/src/plugin/docs.js b/src/plugin/docs.js index 8e338a3e..d3ff0e2f 100644 --- a/src/plugin/docs.js +++ b/src/plugin/docs.js @@ -3,7 +3,7 @@ const path = require('path'); const Joi = require('joi-strict'); const sfs = require('smart-fs'); const treeify = require('object-treeify'); -const { determineVars } = require('./vars'); +const { determineVars, varTypes } = require('./vars'); const { listPublicTasks } = require('./task'); const normalizeRef = (input) => input @@ -217,7 +217,7 @@ const generateDocs = (plName, taskDir, reqDir, varDir, targetDir, tasks, exclude schema: Joi.object().keys({ description: Joi.string(), details: Joi.array().items(Joi.string()).optional(), - type: Joi.string().valid('string', 'boolean', 'object', 'array', 'number', 'integer') + type: Joi.string().valid(...Object.keys(varTypes)) }) }, { diff --git a/src/plugin/task.js b/src/plugin/task.js index 4468be8b..9e2ff453 100644 --- a/src/plugin/task.js +++ b/src/plugin/task.js @@ -1,5 +1,5 @@ const assert = require('assert'); -const fs = require('fs'); +const fs = require('smart-fs'); const path = require('path'); const get = require('lodash.get'); const deepmerge = require('deepmerge'); diff --git a/src/plugin/vars.js b/src/plugin/vars.js index 7d180cc9..9569ed4c 100644 --- a/src/plugin/vars.js +++ b/src/plugin/vars.js @@ -5,8 +5,11 @@ const objectScan = require('object-scan'); const modifiers = { UPPER: (input) => input.toUpperCase(), - TITLE: (input) => `${input.slice(0, 1).toUpperCase()}${input.slice(1).toLowerCase()}`, - LOWER: (input) => input.toLowerCase() + TITLE: (input) => input.toLowerCase().replace(/(? m.toUpperCase()), + LOWER: (input) => input.toLowerCase(), + KEBAB: (input) => input.replace(/[^a-zA-Z0-9]+/g, '-'), + SNAKE: (input) => input.replace(/[^a-zA-Z0-9]+/g, '_'), + STRIP: (input) => input.replace(/[^a-zA-Z0-9]+/g, '') }; const applyModifier = (input, modifier) => { if (typeof input !== 'string') { @@ -15,14 +18,14 @@ const applyModifier = (input, modifier) => { if (modifier === undefined) { return input; } - return modifiers[modifier](input); + return modifier.slice(1).split('|').reduce((value, m) => modifiers[m](value), input); }; const varNameGroup = new RegExp([ /(?[-_a-zA-Z0-9]+)/.source, - '(?:\\|(?', + '(?(?:\\|(?:', Object.keys(modifiers).join('|'), - '))?' + '))+)?' ].join(''), 'g'); const varRegex = new RegExp([ @@ -60,7 +63,7 @@ const substituteVariables = (input, variables, allowFullMatch, usedVars) => { const { varName, modifier } = args[args.length - 1]; const r = applyModifier(variables[varName], modifier); assert(r !== undefined, `Unmatched Variable Found: $\{${varName}}`); - assert(typeof r === 'string', `Variable Expected to be String: $\{${varName}}`); + assert(!(r instanceof Object), `Variable Expected to be Primitive: $\{${varName}}`); usedVars.add(varName); return r; }); @@ -138,3 +141,12 @@ module.exports.determineVars = (data) => { })(data); return result; }; + +module.exports.varTypes = { + string: (v) => typeof v === 'string', + boolean: (v) => typeof v === 'boolean', + object: (v) => v instanceof Object && !Array.isArray(v), + array: (v) => Array.isArray(v), + number: (v) => typeof v === 'number', + integer: (v) => Number.isInteger(v) +}; diff --git a/src/process.js b/src/process.js index aa9b0912..9f0b10a9 100644 --- a/src/process.js +++ b/src/process.js @@ -3,6 +3,7 @@ const path = require('path'); const Joi = require('joi-strict'); const appRoot = require('app-root-path'); const sfs = require('smart-fs'); +const objectScan = require('object-scan'); const load = require('./load'); const lockFile = require('./lock-file'); @@ -63,6 +64,11 @@ module.exports = (projectRoot = appRoot.path) => { .forEach(([pluginName, pluginPayload]) => { // eslint-disable-next-line import/no-dynamic-require,global-require const plugin = load(require(pluginName)); + objectScan(['**.variables'], { + filterFn: ({ value }) => { + plugin.validateVars(value); + } + })(pluginPayload); Object.assign(pluginPayload, { plugin }); }); diff --git a/test/index.spec.js b/test/index.spec.js index d634125e..89c75129 100644 --- a/test/index.spec.js +++ b/test/index.spec.js @@ -102,6 +102,31 @@ describe('Robo + Plugin Integration Tests', { useTmpDir: true }, () => { ); }); + it('Testing Bad Variable Format', ({ dir }) => { + sfs.smartWrite(path.join(dir, '.roboconfig.json'), { + [pluginFile]: { + tasks: [ + { + name: 'misc/@default', + variables: { + misc: 'target1' + } + } + ], + variables: { + variable: 123, + string: 'string', + boolean: true, + object: {}, + array: [], + number: 123.1, + integer: 113 + } + } + }); + expect(() => robo(dir)).to.throw('Invalid variable type for "variable". Expected "string".'); + }); + it('Testing Multi Task', ({ dir }) => { sfs.smartWrite(path.join(dir, '.roboconfig.json'), { [pluginFile]: { @@ -120,21 +145,30 @@ describe('Robo + Plugin Integration Tests', { useTmpDir: true }, () => { } ], variables: { - variable: 'var' + variable: 'var', + string: 'string', + boolean: true, + object: {}, + array: [], + number: 123.1, + integer: 113 } } }); expect(robo(dir)).to.deep.equal([ - 'Updated: target1.txt', - 'Updated: target2.txt', + 'Updated: target1.yml', + 'Updated: target2.yml', 'Updated: CONFDOCS.md' ]); expect(robo(dir)).to.deep.equal([]); - expect(sfs.smartRead(path.join(dir, 'target1.txt'))) - .to.deep.equal(['var', 'VAR', 'Var', 'var']); - expect(sfs.smartRead(path.join(dir, 'target2.txt'))) - .to.deep.equal(['var', 'VAR', 'Var', 'var']); + const data = [ + 'var', 'VAR', 'Var', 'var', + 'some-words', 'some_words', 'somewords', 'SomeWords', 'SOME_WORDS', 'some-words', + 'string', true, {}, [], 123.1, 113 + ]; + expect(sfs.smartRead(path.join(dir, 'target1.yml'))).to.deep.equal({ data }); + expect(sfs.smartRead(path.join(dir, 'target2.yml'))).to.deep.equal({ data }); expect(sfs.smartRead(path.join(dir, '.roboconfig.lock'), { treatAs: 'json' })) - .to.deep.equal({ 'mock-plugin': ['target1.txt', 'target2.txt'] }); + .to.deep.equal({ 'mock-plugin': ['target1.yml', 'target2.yml'] }); }); }); diff --git a/test/load.spec.js b/test/load.spec.js index a568b958..2ad164e1 100644 --- a/test/load.spec.js +++ b/test/load.spec.js @@ -51,11 +51,11 @@ describe('Testing Test Plugin', { useTmpDir: true }, () => { 'Updated: CONFDOCS.md' ], 'misc/@other': [ - 'Updated: misc.txt', + 'Updated: misc.yml', 'Updated: CONFDOCS.md' ], 'misc/@default': [ - 'Updated: misc.txt', + 'Updated: misc.yml', 'Updated: CONFDOCS.md' ], 'nested-txt-overwrite/@default': [ @@ -108,10 +108,10 @@ describe('Testing Test Plugin', { useTmpDir: true }, () => { 'txt-overwrite/@default': [], 'txt-merge-below-title/@default': [], 'misc/@other': [ - 'Updated: misc.txt' + 'Updated: misc.yml' ], 'misc/@default': [ - 'Updated: misc.txt' + 'Updated: misc.yml' ], 'nested-txt-overwrite/@default': [], 'txt-create-only/@default': [], diff --git a/test/mock/plugin/docs/misc/@default.md b/test/mock/plugin/docs/misc/@default.md index 4225e41d..822a9e80 100644 --- a/test/mock/plugin/docs/misc/@default.md +++ b/test/mock/plugin/docs/misc/@default.md @@ -19,7 +19,7 @@ Task collection description. @@ -30,6 +30,12 @@ Task collection description. @@ -39,7 +45,7 @@ Task collection description. ## :clipboard: misc/task (`index`) -_Updating ${misc}.txt using overwrite._ +_Updating ${misc}.yml using overwrite._ - Some purpose. @@ -54,7 +60,7 @@ _Updating ${misc}.txt using @@ -65,6 +71,12 @@ _Updating ${misc}.txt using @@ -74,7 +86,7 @@ _Updating ${misc}.txt using misc/task (`index`) -_Updating ${misc}.txt using overwrite._ +_Updating ${misc}.yml using overwrite._ - Some purpose. @@ -89,7 +101,7 @@ _Updating ${misc}.txt using @@ -100,6 +112,12 @@ _Updating ${misc}.txt using @@ -122,7 +140,7 @@ Task collection description. @@ -133,6 +151,12 @@ Task collection description. @@ -142,7 +166,7 @@ Task collection description. ### :clipboard: misc/task (`index`) -_Updating ${misc}.txt using overwrite._ +_Updating ${misc}.yml using overwrite._ - Some purpose. @@ -157,7 +181,7 @@ _Updating ${misc}.txt using @@ -168,6 +192,12 @@ _Updating ${misc}.txt using @@ -195,6 +225,30 @@ Detailed description about this dependency and how it's used. Detailed description of what this variable does. +### integer : `integer` + +*Integer Variable* + +### number : `number` + +*Number Variable* + +### array : `array` + +*Array Variable* + +### object : `object` + +*Object Variable* + +### boolean : `boolean` + +*Boolean Variable* + +### string : `string` + +*String Variable* + ### variable : `string` *Short description of what this variable does.* @@ -205,7 +259,7 @@ Detailed description of what this variable does. ## Targets -### ${misc}.txt ([`link`](https://some.url)) +### ${misc}.yml ([`link`](https://some.url)) :small_red_triangle: dependency diff --git a/test/mock/plugin/docs/misc/@other.md b/test/mock/plugin/docs/misc/@other.md index a501daa6..6da82dc4 100644 --- a/test/mock/plugin/docs/misc/@other.md +++ b/test/mock/plugin/docs/misc/@other.md @@ -16,7 +16,7 @@ Task collection description. @@ -27,6 +27,12 @@ Task collection description. @@ -36,7 +42,7 @@ Task collection description. ## :clipboard: misc/task (`index`) -_Updating ${misc}.txt using overwrite._ +_Updating ${misc}.yml using overwrite._ - Some purpose. @@ -51,7 +57,7 @@ _Updating ${misc}.txt using @@ -62,6 +68,12 @@ _Updating ${misc}.txt using @@ -89,6 +101,30 @@ Detailed description about this dependency and how it's used. Detailed description of what this variable does. +### integer : `integer` + +*Integer Variable* + +### number : `number` + +*Number Variable* + +### array : `array` + +*Array Variable* + +### object : `object` + +*Object Variable* + +### boolean : `boolean` + +*Boolean Variable* + +### string : `string` + +*String Variable* + ### variable : `string` *Short description of what this variable does.* @@ -99,7 +135,7 @@ Detailed description of what this variable does. ## Targets -### ${misc}.txt ([`link`](https://some.url)) +### ${misc}.yml ([`link`](https://some.url)) :small_red_triangle: dependency diff --git a/test/mock/plugin/targets/${misc}.txt.json b/test/mock/plugin/targets/${misc}.yml.json similarity index 100% rename from test/mock/plugin/targets/${misc}.txt.json rename to test/mock/plugin/targets/${misc}.yml.json diff --git a/test/mock/plugin/tasks/misc/snippets/snippet.txt b/test/mock/plugin/tasks/misc/snippets/snippet.txt deleted file mode 100644 index cadcf226..00000000 --- a/test/mock/plugin/tasks/misc/snippets/snippet.txt +++ /dev/null @@ -1,4 +0,0 @@ -${variable} -${variable|UPPER} -${variable|TITLE} -${variable|LOWER} diff --git a/test/mock/plugin/tasks/misc/snippets/snippet.yml b/test/mock/plugin/tasks/misc/snippets/snippet.yml new file mode 100644 index 00000000..985f3cc6 --- /dev/null +++ b/test/mock/plugin/tasks/misc/snippets/snippet.yml @@ -0,0 +1,17 @@ +data: + - ${variable} + - ${variable|UPPER} + - ${variable|TITLE} + - ${variable|LOWER} + - ${words|KEBAB} + - ${words|SNAKE} + - ${words|STRIP} + - ${words|TITLE|STRIP} + - ${words|UPPER|SNAKE} + - ${words|LOWER|KEBAB} + - ${string} + - ${boolean} + - ${object} + - ${array} + - ${number} + - ${integer} diff --git a/test/mock/plugin/tasks/misc/task.json b/test/mock/plugin/tasks/misc/task.json index 0a5db190..fb758cd6 100644 --- a/test/mock/plugin/tasks/misc/task.json +++ b/test/mock/plugin/tasks/misc/task.json @@ -1,12 +1,18 @@ { - - "target": "${misc}.txt", + "target": "${misc}.yml", "strategy": "overwrite", "snippets": [ { "name": "snippet", "variables": { - "variable": "${variable}" + "variable": "${variable}", + "string": "${string}", + "boolean": "${boolean}", + "object": "${object}", + "array": "${array}", + "number": "${number}", + "integer": "${integer}", + "words": "some words" } } ], diff --git a/test/mock/plugin/vars/array.json b/test/mock/plugin/vars/array.json new file mode 100644 index 00000000..371ad417 --- /dev/null +++ b/test/mock/plugin/vars/array.json @@ -0,0 +1,5 @@ +{ + "description": "Array Variable", + "details": [], + "type": "array" +} diff --git a/test/mock/plugin/vars/boolean.json b/test/mock/plugin/vars/boolean.json new file mode 100644 index 00000000..17cba946 --- /dev/null +++ b/test/mock/plugin/vars/boolean.json @@ -0,0 +1,5 @@ +{ + "description": "Boolean Variable", + "details": [], + "type": "boolean" +} diff --git a/test/mock/plugin/vars/integer.json b/test/mock/plugin/vars/integer.json new file mode 100644 index 00000000..005f1a08 --- /dev/null +++ b/test/mock/plugin/vars/integer.json @@ -0,0 +1,5 @@ +{ + "description": "Integer Variable", + "details": [], + "type": "integer" +} diff --git a/test/mock/plugin/vars/number.json b/test/mock/plugin/vars/number.json new file mode 100644 index 00000000..fc983e26 --- /dev/null +++ b/test/mock/plugin/vars/number.json @@ -0,0 +1,5 @@ +{ + "description": "Number Variable", + "details": [], + "type": "number" +} diff --git a/test/mock/plugin/vars/object.json b/test/mock/plugin/vars/object.json new file mode 100644 index 00000000..6590a644 --- /dev/null +++ b/test/mock/plugin/vars/object.json @@ -0,0 +1,5 @@ +{ + "description": "Object Variable", + "details": [], + "type": "object" +} diff --git a/test/mock/plugin/vars/string.json b/test/mock/plugin/vars/string.json new file mode 100644 index 00000000..8bee8b96 --- /dev/null +++ b/test/mock/plugin/vars/string.json @@ -0,0 +1,5 @@ +{ + "description": "String Variable", + "details": [], + "type": "string" +} diff --git a/test/mock/projects/misc/@default/CONFDOCS.md b/test/mock/projects/misc/@default/CONFDOCS.md index b8866531..5487d7de 100644 --- a/test/mock/projects/misc/@default/CONFDOCS.md +++ b/test/mock/projects/misc/@default/CONFDOCS.md @@ -21,7 +21,7 @@ Task collection description. @@ -32,6 +32,12 @@ Task collection description. @@ -41,7 +47,7 @@ Task collection description. #### :clipboard: misc/task (`index`) -_Updating ${misc}.txt using overwrite._ +_Updating ${misc}.yml using overwrite._ - Some purpose. @@ -56,7 +62,7 @@ _Updating ${misc}.txt using @@ -67,6 +73,12 @@ _Updating ${misc}.txt using @@ -76,7 +88,7 @@ _Updating ${misc}.txt using misc/task (`index`) -_Updating ${misc}.txt using overwrite._ +_Updating ${misc}.yml using overwrite._ - Some purpose. @@ -91,7 +103,7 @@ _Updating ${misc}.txt using @@ -102,6 +114,12 @@ _Updating ${misc}.txt using @@ -124,7 +142,7 @@ Task collection description. @@ -135,6 +153,12 @@ Task collection description. @@ -144,7 +168,7 @@ Task collection description. ##### :clipboard: misc/task (`index`) -_Updating ${misc}.txt using overwrite._ +_Updating ${misc}.yml using overwrite._ - Some purpose. @@ -159,7 +183,7 @@ _Updating ${misc}.txt using @@ -170,6 +194,12 @@ _Updating ${misc}.txt using @@ -197,6 +227,30 @@ Detailed description about this dependency and how it's used. Detailed description of what this variable does. +### integer : `integer` + +*Integer Variable* + +### number : `number` + +*Number Variable* + +### array : `array` + +*Array Variable* + +### object : `object` + +*Object Variable* + +### boolean : `boolean` + +*Boolean Variable* + +### string : `string` + +*String Variable* + ### variable : `string` *Short description of what this variable does.* @@ -207,7 +261,7 @@ Detailed description of what this variable does. ## Targets -### ${misc}.txt ([`link`](https://some.url)) +### ${misc}.yml ([`link`](https://some.url)) :small_red_triangle: dependency diff --git a/test/mock/projects/misc/@default/misc.txt b/test/mock/projects/misc/@default/misc.txt deleted file mode 100644 index afedb3ad..00000000 --- a/test/mock/projects/misc/@default/misc.txt +++ /dev/null @@ -1,4 +0,0 @@ -variable -VARIABLE -Variable -variable diff --git a/test/mock/projects/misc/@default/misc.yml b/test/mock/projects/misc/@default/misc.yml new file mode 100644 index 00000000..2b73fa46 --- /dev/null +++ b/test/mock/projects/misc/@default/misc.yml @@ -0,0 +1,17 @@ +data: + - variable + - VARIABLE + - Variable + - variable + - some-words + - some_words + - somewords + - SomeWords + - SOME_WORDS + - some-words + - string + - boolean + - object + - array + - number + - integer diff --git a/test/mock/projects/misc/@other/CONFDOCS.md b/test/mock/projects/misc/@other/CONFDOCS.md index 23809e85..81eaa164 100644 --- a/test/mock/projects/misc/@other/CONFDOCS.md +++ b/test/mock/projects/misc/@other/CONFDOCS.md @@ -18,7 +18,7 @@ Task collection description. @@ -29,6 +29,12 @@ Task collection description. @@ -38,7 +44,7 @@ Task collection description. #### :clipboard: misc/task (`index`) -_Updating ${misc}.txt using overwrite._ +_Updating ${misc}.yml using overwrite._ - Some purpose. @@ -53,7 +59,7 @@ _Updating ${misc}.txt using @@ -64,6 +70,12 @@ _Updating ${misc}.txt using @@ -91,6 +103,30 @@ Detailed description about this dependency and how it's used. Detailed description of what this variable does. +### integer : `integer` + +*Integer Variable* + +### number : `number` + +*Number Variable* + +### array : `array` + +*Array Variable* + +### object : `object` + +*Object Variable* + +### boolean : `boolean` + +*Boolean Variable* + +### string : `string` + +*String Variable* + ### variable : `string` *Short description of what this variable does.* @@ -101,7 +137,7 @@ Detailed description of what this variable does. ## Targets -### ${misc}.txt ([`link`](https://some.url)) +### ${misc}.yml ([`link`](https://some.url)) :small_red_triangle: dependency diff --git a/test/mock/projects/misc/@other/misc.txt b/test/mock/projects/misc/@other/misc.txt deleted file mode 100644 index afedb3ad..00000000 --- a/test/mock/projects/misc/@other/misc.txt +++ /dev/null @@ -1,4 +0,0 @@ -variable -VARIABLE -Variable -variable diff --git a/test/mock/projects/misc/@other/misc.yml b/test/mock/projects/misc/@other/misc.yml new file mode 100644 index 00000000..2b73fa46 --- /dev/null +++ b/test/mock/projects/misc/@other/misc.yml @@ -0,0 +1,17 @@ +data: + - variable + - VARIABLE + - Variable + - variable + - some-words + - some_words + - somewords + - SomeWords + - SOME_WORDS + - some-words + - string + - boolean + - object + - array + - number + - integer