dotcom-tool-kit 5.1.0 → 5.2.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/rc-file.d.ts.map +1 -1
- package/lib/rc-file.js +12 -1
- package/package.json +2 -2
package/lib/rc-file.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rc-file.d.ts","sourceRoot":"","sources":["../src/rc-file.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAA;AAErD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,SAAS,CAAA;AA0BrC,eAAO,MAAM,kBAAkB,uBAAuB,CAAA;AACtD,eAAO,MAAM,qBAAqB,2BAA2B,CAAA;
|
|
1
|
+
{"version":3,"file":"rc-file.d.ts","sourceRoot":"","sources":["../src/rc-file.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAA;AAErD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,SAAS,CAAA;AA0BrC,eAAO,MAAM,kBAAkB,uBAAuB,CAAA;AACtD,eAAO,MAAM,qBAAqB,2BAA2B,CAAA;AA6B7D,wBAAsB,aAAa,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAwEjF"}
|
package/lib/rc-file.js
CHANGED
|
@@ -36,6 +36,15 @@ const toolKitIfDefined = {
|
|
|
36
36
|
// a YAML.visit later
|
|
37
37
|
resolve: (value) => value
|
|
38
38
|
};
|
|
39
|
+
const toolKitEnv = {
|
|
40
|
+
identify: () => false,
|
|
41
|
+
tag: '!toolkit/env',
|
|
42
|
+
// we return the value of the environment variable here, even if it's
|
|
43
|
+
// undefined. this undefined value will usually be handled during option
|
|
44
|
+
// validation (e.g., converting to a default value if one is specified in
|
|
45
|
+
// the Zod schema.)
|
|
46
|
+
resolve: (envVar) => process.env[envVar]
|
|
47
|
+
};
|
|
39
48
|
async function loadToolKitRC(logger, root) {
|
|
40
49
|
const configPath = path.join(root, '.toolkitrc.yml');
|
|
41
50
|
let rawConfig;
|
|
@@ -50,7 +59,9 @@ async function loadToolKitRC(logger, root) {
|
|
|
50
59
|
throw err;
|
|
51
60
|
}
|
|
52
61
|
}
|
|
53
|
-
const configDoc = YAML.parseDocument(rawConfig, {
|
|
62
|
+
const configDoc = YAML.parseDocument(rawConfig, {
|
|
63
|
+
customTags: [toolKitOption, toolKitIfDefined, toolKitEnv]
|
|
64
|
+
});
|
|
54
65
|
// go back and search for the parsed if-defined tag and include a string
|
|
55
66
|
// identifier so we can resolve all the tags in a JS object once we've loaded
|
|
56
67
|
// plugin options
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dotcom-tool-kit",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.2.0-beta.2",
|
|
4
4
|
"description": "modern, maintainable, modular developer tooling for FT.com projects",
|
|
5
5
|
"author": "FT.com Platforms Team <platforms-team.customer-products@ft.com>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -60,4 +60,4 @@
|
|
|
60
60
|
"volta": {
|
|
61
61
|
"extends": "../../package.json"
|
|
62
62
|
}
|
|
63
|
-
}
|
|
63
|
+
}
|