projen 0.101.7 → 0.101.9

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.
Files changed (163) hide show
  1. package/.jsii +439 -88
  2. package/lib/ai-instructions.js +2 -2
  3. package/lib/awscdk/auto-discover.js +6 -6
  4. package/lib/awscdk/awscdk-app-java.js +1 -1
  5. package/lib/awscdk/awscdk-app-py.js +1 -1
  6. package/lib/awscdk/awscdk-app-ts.js +1 -1
  7. package/lib/awscdk/awscdk-construct.js +1 -1
  8. package/lib/awscdk/awscdk-deps-java.js +1 -1
  9. package/lib/awscdk/awscdk-deps-js.js +1 -1
  10. package/lib/awscdk/awscdk-deps-py.js +1 -1
  11. package/lib/awscdk/awscdk-deps.js +1 -1
  12. package/lib/awscdk/cdk-config.js +3 -3
  13. package/lib/awscdk/cdk-tasks.js +1 -1
  14. package/lib/awscdk/integration-test.js +1 -1
  15. package/lib/awscdk/lambda-extension.js +1 -1
  16. package/lib/awscdk/lambda-function.js +2 -2
  17. package/lib/build/build-workflow.js +1 -1
  18. package/lib/cdk/auto-discover-base.js +2 -2
  19. package/lib/cdk/construct-lib.js +1 -1
  20. package/lib/cdk/integration-test-base.js +1 -1
  21. package/lib/cdk/jsii-build.js +1 -1
  22. package/lib/cdk/jsii-docgen.js +1 -1
  23. package/lib/cdk/jsii-project.js +1 -1
  24. package/lib/cdk8s/auto-discover.js +2 -2
  25. package/lib/cdk8s/cdk8s-app-py.js +1 -1
  26. package/lib/cdk8s/cdk8s-app-ts.js +1 -1
  27. package/lib/cdk8s/cdk8s-construct.js +1 -1
  28. package/lib/cdk8s/cdk8s-deps-py.js +1 -1
  29. package/lib/cdk8s/cdk8s-deps.js +1 -1
  30. package/lib/cdk8s/integration-test.js +1 -1
  31. package/lib/cdktf/cdktf-construct.js +1 -1
  32. package/lib/circleci/circleci.js +1 -1
  33. package/lib/cli/cmds/new.js +1 -8
  34. package/lib/component.d.ts +21 -1
  35. package/lib/component.js +27 -3
  36. package/lib/dependencies.js +1 -1
  37. package/lib/dev-env.js +1 -1
  38. package/lib/docker-compose/docker-compose-service.js +1 -1
  39. package/lib/docker-compose/docker-compose.js +1 -1
  40. package/lib/file.js +1 -1
  41. package/lib/gitattributes.js +1 -1
  42. package/lib/github/actions-provider.js +1 -1
  43. package/lib/github/auto-approve.js +1 -1
  44. package/lib/github/auto-merge.js +6 -7
  45. package/lib/github/auto-queue.js +1 -1
  46. package/lib/github/dependabot.js +1 -1
  47. package/lib/github/dependency-review.js +1 -1
  48. package/lib/github/github-credentials.js +1 -1
  49. package/lib/github/github-project.js +1 -1
  50. package/lib/github/github.js +1 -1
  51. package/lib/github/merge-queue.js +1 -1
  52. package/lib/github/mergify.d.ts +32 -1
  53. package/lib/github/mergify.js +5 -2
  54. package/lib/github/pr-template.js +1 -1
  55. package/lib/github/pull-request-backport.js +1 -1
  56. package/lib/github/pull-request-lint.js +1 -1
  57. package/lib/github/stale.js +1 -1
  58. package/lib/github/task-workflow-job.js +1 -1
  59. package/lib/github/task-workflow.js +1 -1
  60. package/lib/github/workflow-actions.js +1 -1
  61. package/lib/github/workflow-jobs.js +1 -1
  62. package/lib/github/workflow-steps.js +1 -1
  63. package/lib/github/workflows.js +1 -1
  64. package/lib/gitlab/configuration.js +1 -1
  65. package/lib/gitlab/gitlab-configuration.js +1 -1
  66. package/lib/gitlab/nested-configuration.js +1 -1
  67. package/lib/gitpod.js +1 -1
  68. package/lib/ignore-file.js +1 -1
  69. package/lib/ini.js +1 -1
  70. package/lib/java/java-project.js +1 -1
  71. package/lib/java/junit.js +1 -1
  72. package/lib/java/maven-compile.js +1 -1
  73. package/lib/java/maven-packaging.js +1 -1
  74. package/lib/java/maven-sample.js +1 -1
  75. package/lib/java/pom.js +2 -2
  76. package/lib/java/projenrc.d.ts +2 -1
  77. package/lib/java/projenrc.js +6 -9
  78. package/lib/javascript/biome/biome.d.ts +5 -1
  79. package/lib/javascript/biome/biome.js +8 -2
  80. package/lib/javascript/bundler.js +1 -1
  81. package/lib/javascript/eslint.d.ts +5 -1
  82. package/lib/javascript/eslint.js +8 -2
  83. package/lib/javascript/jest.js +4 -4
  84. package/lib/javascript/license-checker.js +1 -1
  85. package/lib/javascript/node-package.js +1 -1
  86. package/lib/javascript/node-project.js +1 -1
  87. package/lib/javascript/npm-config.js +1 -1
  88. package/lib/javascript/pnpm-workspace-config.js +2 -2
  89. package/lib/javascript/pnpm-workspace.js +1 -1
  90. package/lib/javascript/prettier.js +1 -1
  91. package/lib/javascript/projenrc.d.ts +2 -1
  92. package/lib/javascript/projenrc.js +6 -8
  93. package/lib/javascript/render-options.d.ts +15 -1
  94. package/lib/javascript/render-options.js +7 -3
  95. package/lib/javascript/typescript-config.js +2 -2
  96. package/lib/javascript/upgrade-dependencies.js +2 -2
  97. package/lib/javascript/yarnrc.js +1 -1
  98. package/lib/json-patch.js +1 -1
  99. package/lib/json.js +1 -1
  100. package/lib/license.js +1 -1
  101. package/lib/logger.js +1 -1
  102. package/lib/logging.js +3 -2
  103. package/lib/makefile.js +1 -1
  104. package/lib/object-file.js +1 -1
  105. package/lib/project-build.js +1 -1
  106. package/lib/project-tree.js +1 -1
  107. package/lib/project.d.ts +19 -5
  108. package/lib/project.js +34 -11
  109. package/lib/projects.js +7 -5
  110. package/lib/projenrc-json.d.ts +2 -1
  111. package/lib/projenrc-json.js +6 -8
  112. package/lib/projenrc.js +1 -1
  113. package/lib/python/pip.js +1 -1
  114. package/lib/python/poetry.js +2 -2
  115. package/lib/python/projenrc.d.ts +2 -1
  116. package/lib/python/projenrc.js +6 -9
  117. package/lib/python/pyproject-toml-file.js +1 -1
  118. package/lib/python/pytest-sample.js +1 -1
  119. package/lib/python/pytest.js +1 -1
  120. package/lib/python/python-project.js +1 -1
  121. package/lib/python/python-sample.js +1 -1
  122. package/lib/python/requirements-file.js +1 -1
  123. package/lib/python/setuppy.js +1 -1
  124. package/lib/python/setuptools.js +1 -1
  125. package/lib/python/uv.js +1 -1
  126. package/lib/python/venv.js +1 -1
  127. package/lib/readme.js +1 -1
  128. package/lib/release/publisher.js +1 -1
  129. package/lib/release/release-trigger.js +1 -1
  130. package/lib/release/release.js +1 -1
  131. package/lib/renovatebot.js +1 -1
  132. package/lib/run-task.cjs +245 -49
  133. package/lib/sample-file.js +2 -2
  134. package/lib/script-runner.js +1 -1
  135. package/lib/source-code.js +1 -1
  136. package/lib/task-shell.js +1 -1
  137. package/lib/task.js +1 -1
  138. package/lib/tasks.js +1 -1
  139. package/lib/testing.js +1 -1
  140. package/lib/textfile.js +1 -1
  141. package/lib/toml.js +1 -1
  142. package/lib/typescript/projenrc-ts.d.ts +2 -1
  143. package/lib/typescript/projenrc-ts.js +6 -8
  144. package/lib/typescript/projenrc.d.ts +3 -1
  145. package/lib/typescript/projenrc.js +7 -9
  146. package/lib/typescript/typescript-runner.js +1 -1
  147. package/lib/typescript/typescript-typedoc.js +1 -1
  148. package/lib/typescript/typescript.js +5 -5
  149. package/lib/util/exec.d.ts +7 -0
  150. package/lib/util/exec.js +36 -13
  151. package/lib/version.js +2 -2
  152. package/lib/vscode/devcontainer.js +1 -1
  153. package/lib/vscode/extensions.js +1 -1
  154. package/lib/vscode/launch-config.js +1 -1
  155. package/lib/vscode/settings.js +1 -1
  156. package/lib/vscode/vscode.js +1 -1
  157. package/lib/web/next.js +3 -3
  158. package/lib/web/postcss.js +1 -1
  159. package/lib/web/react.js +3 -3
  160. package/lib/web/tailwind.js +1 -1
  161. package/lib/xmlfile.js +1 -1
  162. package/lib/yaml.js +1 -1
  163. package/package.json +1 -1
package/lib/run-task.cjs CHANGED
@@ -905,15 +905,15 @@ var require_route = __commonJS({
905
905
  };
906
906
  }
907
907
  function wrapConversion(toModel, graph) {
908
- const path7 = [graph[toModel].parent, toModel];
908
+ const path8 = [graph[toModel].parent, toModel];
909
909
  let fn = conversions[graph[toModel].parent][toModel];
910
910
  let cur = graph[toModel].parent;
911
911
  while (graph[cur].parent) {
912
- path7.unshift(graph[cur].parent);
912
+ path8.unshift(graph[cur].parent);
913
913
  fn = link(conversions[graph[cur].parent][cur], fn);
914
914
  cur = graph[cur].parent;
915
915
  }
916
- fn.conversion = path7;
916
+ fn.conversion = path8;
917
917
  return fn;
918
918
  }
919
919
  module2.exports = function(fromModel) {
@@ -1153,7 +1153,7 @@ var require_has_flag = __commonJS({
1153
1153
  var require_supports_color = __commonJS({
1154
1154
  "node_modules/supports-color/index.js"(exports2, module2) {
1155
1155
  "use strict";
1156
- var os = require("os");
1156
+ var os2 = require("os");
1157
1157
  var tty2 = require("tty");
1158
1158
  var hasFlag = require_has_flag();
1159
1159
  var { env } = process;
@@ -1201,7 +1201,7 @@ var require_supports_color = __commonJS({
1201
1201
  return min;
1202
1202
  }
1203
1203
  if (process.platform === "win32") {
1204
- const osRelease = os.release().split(".");
1204
+ const osRelease = os2.release().split(".");
1205
1205
  if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
1206
1206
  return Number(osRelease[2]) >= 14931 ? 3 : 2;
1207
1207
  }
@@ -1740,7 +1740,7 @@ var require_package = __commonJS({
1740
1740
  fsevents: true,
1741
1741
  "unrs-resolver": true
1742
1742
  },
1743
- version: "0.101.7",
1743
+ version: "0.101.9",
1744
1744
  jest: {
1745
1745
  coverageProvider: "v8",
1746
1746
  coverageReporters: [
@@ -1827,6 +1827,168 @@ var require_package = __commonJS({
1827
1827
  }
1828
1828
  });
1829
1829
 
1830
+ // node_modules/case/dist/Case.js
1831
+ var require_Case = __commonJS({
1832
+ "node_modules/case/dist/Case.js"(exports2, module2) {
1833
+ (function() {
1834
+ "use strict";
1835
+ var unicodes = function(s, prefix) {
1836
+ prefix = prefix || "";
1837
+ return s.replace(/(^|-)/g, "$1\\u" + prefix).replace(/,/g, "\\u" + prefix);
1838
+ }, basicSymbols = unicodes("20-26,28-2F,3A-40,5B-60,7B-7E,A0-BF,D7,F7", "00"), baseLowerCase = "a-z" + unicodes("DF-F6,F8-FF", "00"), baseUpperCase = "A-Z" + unicodes("C0-D6,D8-DE", "00"), improperInTitle = "A|An|And|As|At|But|By|En|For|If|In|Of|On|Or|The|To|Vs?\\.?|Via", regexps = function(symbols2, lowers, uppers, impropers) {
1839
+ symbols2 = symbols2 || basicSymbols;
1840
+ lowers = lowers || baseLowerCase;
1841
+ uppers = uppers || baseUpperCase;
1842
+ impropers = impropers || improperInTitle;
1843
+ return {
1844
+ capitalize: new RegExp("(^|[" + symbols2 + "])([" + lowers + "])", "g"),
1845
+ pascal: new RegExp("(^|[" + symbols2 + "])+([" + lowers + uppers + "])", "g"),
1846
+ fill: new RegExp("[" + symbols2 + "]+(.|$)", "g"),
1847
+ sentence: new RegExp('(^\\s*|[\\?\\!\\.]+"?\\s+"?|,\\s+")([' + lowers + "])", "g"),
1848
+ improper: new RegExp("\\b(" + impropers + ")\\b", "g"),
1849
+ relax: new RegExp("([^" + uppers + "])([" + uppers + "]*)([" + uppers + "])(?=[^" + uppers + "]|$)", "g"),
1850
+ upper: new RegExp("^[^" + lowers + "]+$"),
1851
+ hole: /[^\s]\s[^\s]/,
1852
+ apostrophe: /'/g,
1853
+ room: new RegExp("[" + symbols2 + "]")
1854
+ };
1855
+ }, re = regexps(), _ = {
1856
+ re,
1857
+ unicodes,
1858
+ regexps,
1859
+ types: [],
1860
+ up: String.prototype.toUpperCase,
1861
+ low: String.prototype.toLowerCase,
1862
+ cap: function(s) {
1863
+ return _.up.call(s.charAt(0)) + s.slice(1);
1864
+ },
1865
+ decap: function(s) {
1866
+ return _.low.call(s.charAt(0)) + s.slice(1);
1867
+ },
1868
+ deapostrophe: function(s) {
1869
+ return s.replace(re.apostrophe, "");
1870
+ },
1871
+ fill: function(s, fill, deapostrophe) {
1872
+ if (fill != null) {
1873
+ s = s.replace(re.fill, function(m, next) {
1874
+ return next ? fill + next : "";
1875
+ });
1876
+ }
1877
+ if (deapostrophe) {
1878
+ s = _.deapostrophe(s);
1879
+ }
1880
+ return s;
1881
+ },
1882
+ prep: function(s, fill, pascal, upper) {
1883
+ s = s == null ? "" : s + "";
1884
+ if (!upper && re.upper.test(s)) {
1885
+ s = _.low.call(s);
1886
+ }
1887
+ if (!fill && !re.hole.test(s)) {
1888
+ var holey = _.fill(s, " ");
1889
+ if (re.hole.test(holey)) {
1890
+ s = holey;
1891
+ }
1892
+ }
1893
+ if (!pascal && !re.room.test(s)) {
1894
+ s = s.replace(re.relax, _.relax);
1895
+ }
1896
+ return s;
1897
+ },
1898
+ relax: function(m, before, acronym, caps) {
1899
+ return before + " " + (acronym ? acronym + " " : "") + caps;
1900
+ }
1901
+ }, Case2 = {
1902
+ _,
1903
+ of: function(s) {
1904
+ for (var i = 0, m = _.types.length; i < m; i++) {
1905
+ if (Case2[_.types[i]].apply(Case2, arguments) === s) {
1906
+ return _.types[i];
1907
+ }
1908
+ }
1909
+ },
1910
+ flip: function(s) {
1911
+ return s.replace(/\w/g, function(l) {
1912
+ return (l == _.up.call(l) ? _.low : _.up).call(l);
1913
+ });
1914
+ },
1915
+ random: function(s) {
1916
+ return s.replace(/\w/g, function(l) {
1917
+ return (Math.round(Math.random()) ? _.up : _.low).call(l);
1918
+ });
1919
+ },
1920
+ type: function(type2, fn) {
1921
+ Case2[type2] = fn;
1922
+ _.types.push(type2);
1923
+ }
1924
+ }, types = {
1925
+ lower: function(s, fill, deapostrophe) {
1926
+ return _.fill(_.low.call(_.prep(s, fill)), fill, deapostrophe);
1927
+ },
1928
+ snake: function(s) {
1929
+ return Case2.lower(s, "_", true);
1930
+ },
1931
+ constant: function(s) {
1932
+ return Case2.upper(s, "_", true);
1933
+ },
1934
+ camel: function(s) {
1935
+ return _.decap(Case2.pascal(s));
1936
+ },
1937
+ kebab: function(s) {
1938
+ return Case2.lower(s, "-", true);
1939
+ },
1940
+ upper: function(s, fill, deapostrophe) {
1941
+ return _.fill(_.up.call(_.prep(s, fill, false, true)), fill, deapostrophe);
1942
+ },
1943
+ capital: function(s, fill, deapostrophe) {
1944
+ return _.fill(_.prep(s).replace(re.capitalize, function(m, border, letter) {
1945
+ return border + _.up.call(letter);
1946
+ }), fill, deapostrophe);
1947
+ },
1948
+ header: function(s) {
1949
+ return Case2.capital(s, "-", true);
1950
+ },
1951
+ pascal: function(s) {
1952
+ return _.fill(_.prep(s, false, true).replace(re.pascal, function(m, border, letter) {
1953
+ return _.up.call(letter);
1954
+ }), "", true);
1955
+ },
1956
+ title: function(s) {
1957
+ return Case2.capital(s).replace(re.improper, function(small, p, i, s2) {
1958
+ return i > 0 && i < s2.lastIndexOf(" ") ? _.low.call(small) : small;
1959
+ });
1960
+ },
1961
+ sentence: function(s, names, abbreviations) {
1962
+ s = Case2.lower(s).replace(re.sentence, function(m, prelude, letter) {
1963
+ return prelude + _.up.call(letter);
1964
+ });
1965
+ if (names) {
1966
+ names.forEach(function(name) {
1967
+ s = s.replace(new RegExp("\\b" + Case2.lower(name) + "\\b", "g"), _.cap);
1968
+ });
1969
+ }
1970
+ if (abbreviations) {
1971
+ abbreviations.forEach(function(abbr) {
1972
+ s = s.replace(new RegExp("(\\b" + Case2.lower(abbr) + "\\. +)(\\w)"), function(m, abbrAndSpace, letter) {
1973
+ return abbrAndSpace + _.low.call(letter);
1974
+ });
1975
+ });
1976
+ }
1977
+ return s;
1978
+ }
1979
+ };
1980
+ types.squish = types.pascal;
1981
+ Case2.default = Case2;
1982
+ for (var type in types) {
1983
+ Case2.type(type, types[type]);
1984
+ }
1985
+ var define = typeof define === "function" ? define : function() {
1986
+ };
1987
+ define(typeof module2 === "object" && module2.exports ? module2.exports = Case2 : this.Case = Case2);
1988
+ }).call(exports2);
1989
+ }
1990
+ });
1991
+
1830
1992
  // node_modules/json-parse-even-better-errors/lib/index.js
1831
1993
  var require_lib = __commonJS({
1832
1994
  "node_modules/json-parse-even-better-errors/lib/index.js"(exports2, module2) {
@@ -1951,16 +2113,16 @@ var require_just_diff = __commonJS({
1951
2113
  var obj1KeysLength = obj1Keys.length;
1952
2114
  var obj2Keys = Object.keys(obj22);
1953
2115
  var obj2KeysLength = obj2Keys.length;
1954
- var path7;
2116
+ var path8;
1955
2117
  var lengthDelta = obj12.length - obj22.length;
1956
2118
  if (trimFromRight(obj12, obj22)) {
1957
2119
  for (var i = 0; i < obj1KeysLength; i++) {
1958
2120
  var key = Array.isArray(obj12) ? Number(obj1Keys[i]) : obj1Keys[i];
1959
2121
  if (!(key in obj22)) {
1960
- path7 = basePathForRemoves.concat(key);
2122
+ path8 = basePathForRemoves.concat(key);
1961
2123
  diffs2.remove.push({
1962
2124
  op: "remove",
1963
- path: pathConverter(path7)
2125
+ path: pathConverter(path8)
1964
2126
  });
1965
2127
  }
1966
2128
  }
@@ -1977,10 +2139,10 @@ var require_just_diff = __commonJS({
1977
2139
  }
1978
2140
  } else {
1979
2141
  for (var i = 0; i < lengthDelta; i++) {
1980
- path7 = basePathForRemoves.concat(i);
2142
+ path8 = basePathForRemoves.concat(i);
1981
2143
  diffs2.remove.push({
1982
2144
  op: "remove",
1983
- path: pathConverter(path7)
2145
+ path: pathConverter(path8)
1984
2146
  });
1985
2147
  }
1986
2148
  var obj1Trimmed = obj12.slice(lengthDelta);
@@ -2008,27 +2170,27 @@ var require_just_diff = __commonJS({
2008
2170
  diffs
2009
2171
  });
2010
2172
  return diffs.remove.reverse().concat(diffs.replace).concat(diffs.add);
2011
- function pushReplaces({ key, obj1: obj12, obj2: obj22, path: path7, pathForRemoves, diffs: diffs2 }) {
2173
+ function pushReplaces({ key, obj1: obj12, obj2: obj22, path: path8, pathForRemoves, diffs: diffs2 }) {
2012
2174
  var obj1AtKey = obj12[key];
2013
2175
  var obj2AtKey = obj22[key];
2014
2176
  if (!(key in obj12) && key in obj22) {
2015
2177
  var obj2Value = obj2AtKey;
2016
2178
  diffs2.add.push({
2017
2179
  op: "add",
2018
- path: pathConverter(path7),
2180
+ path: pathConverter(path8),
2019
2181
  value: obj2Value
2020
2182
  });
2021
2183
  } else if (obj1AtKey !== obj2AtKey) {
2022
2184
  if (Object(obj1AtKey) !== obj1AtKey || Object(obj2AtKey) !== obj2AtKey || differentTypes(obj1AtKey, obj2AtKey)) {
2023
- pushReplace(path7, diffs2, obj2AtKey);
2185
+ pushReplace(path8, diffs2, obj2AtKey);
2024
2186
  } else {
2025
2187
  if (!Object.keys(obj1AtKey).length && !Object.keys(obj2AtKey).length && String(obj1AtKey) != String(obj2AtKey)) {
2026
- pushReplace(path7, diffs2, obj2AtKey);
2188
+ pushReplace(path8, diffs2, obj2AtKey);
2027
2189
  } else {
2028
2190
  getDiff({
2029
2191
  obj1: obj12[key],
2030
2192
  obj2: obj22[key],
2031
- basePath: path7,
2193
+ basePath: path8,
2032
2194
  basePathForRemoves: pathForRemoves,
2033
2195
  diffs: diffs2
2034
2196
  });
@@ -2036,10 +2198,10 @@ var require_just_diff = __commonJS({
2036
2198
  }
2037
2199
  }
2038
2200
  }
2039
- function pushReplace(path7, diffs2, newValue) {
2201
+ function pushReplace(path8, diffs2, newValue) {
2040
2202
  diffs2.replace.push({
2041
2203
  op: "replace",
2042
- path: pathConverter(path7),
2204
+ path: pathConverter(path8),
2043
2205
  value: newValue
2044
2206
  });
2045
2207
  }
@@ -2135,9 +2297,9 @@ var require_just_diff_apply = __commonJS({
2135
2297
  subObject = subObject[thisProp];
2136
2298
  }
2137
2299
  if (thisOp === REMOVE || thisOp === REPLACE || thisOp === MOVE) {
2138
- var path7 = thisOp === MOVE ? thisDiff.from : thisDiff.path;
2300
+ var path8 = thisOp === MOVE ? thisDiff.from : thisDiff.path;
2139
2301
  if (!subObject.hasOwnProperty(lastProp)) {
2140
- throw new Error(["expected to find property", path7, "in object", obj].join(" "));
2302
+ throw new Error(["expected to find property", path8, "in object", obj].join(" "));
2141
2303
  }
2142
2304
  }
2143
2305
  if (thisOp === REMOVE || thisOp === MOVE) {
@@ -2247,10 +2409,10 @@ var require_lib2 = __commonJS({
2247
2409
  return prefer === "ours" ? resolve7(parent, ours, theirs) : resolve7(parent, theirs, ours);
2248
2410
  };
2249
2411
  var isObj = (obj) => obj && typeof obj === "object";
2250
- var copyPath = (to, from, path7, i) => {
2251
- const p = path7[i];
2412
+ var copyPath = (to, from, path8, i) => {
2413
+ const p = path8[i];
2252
2414
  if (isObj(to[p]) && isObj(from[p]) && Array.isArray(to[p]) === Array.isArray(from[p])) {
2253
- return copyPath(to[p], from[p], path7, i + 1);
2415
+ return copyPath(to[p], from[p], path8, i + 1);
2254
2416
  }
2255
2417
  to[p] = from[p];
2256
2418
  };
@@ -2280,8 +2442,8 @@ __export(task_runtime_exports, {
2280
2442
  module.exports = __toCommonJS(task_runtime_exports);
2281
2443
  var import_fs = require("fs");
2282
2444
  var import_path = require("path");
2283
- var path6 = __toESM(require("path"));
2284
- var import_util = require("util");
2445
+ var path7 = __toESM(require("path"));
2446
+ var import_util2 = require("util");
2285
2447
  var import_chalk2 = __toESM(require_source());
2286
2448
 
2287
2449
  // node_modules/dax/esm/mod.js
@@ -2845,9 +3007,9 @@ function checkWindows() {
2845
3007
  const platform = global.process?.platform;
2846
3008
  if (typeof platform === "string")
2847
3009
  return platform.startsWith("win");
2848
- const os = global.Deno?.build?.os;
2849
- if (typeof os === "string")
2850
- return os === "windows";
3010
+ const os2 = global.Deno?.build?.os;
3011
+ if (typeof os2 === "string")
3012
+ return os2 === "windows";
2851
3013
  return global.navigator?.platform?.startsWith("Win") ?? false;
2852
3014
  }
2853
3015
  var isWindows = checkWindows();
@@ -4330,9 +4492,9 @@ Provide a URL, string, or another Path.`);
4330
4492
  yield path62.#path.substring(last_index, index);
4331
4493
  last_index = index + 1;
4332
4494
  }
4333
- function nextSlash(path7, start) {
4334
- for (let i = start; i < path7.length; i++) {
4335
- const c = path7.charCodeAt(i);
4495
+ function nextSlash(path72, start) {
4496
+ for (let i = start; i < path72.length; i++) {
4497
+ const c = path72.charCodeAt(i);
4336
4498
  if (c === 47 || c === 92) {
4337
4499
  return i;
4338
4500
  }
@@ -4361,9 +4523,9 @@ Provide a URL, string, or another Path.`);
4361
4523
  }
4362
4524
  last_index = index;
4363
4525
  }
4364
- function nextSlash(path7, start) {
4365
- for (let i = start ?? path7.length - 1; i >= 0; i--) {
4366
- const c = path7.charCodeAt(i);
4526
+ function nextSlash(path72, start) {
4527
+ for (let i = start ?? path72.length - 1; i >= 0; i--) {
4528
+ const c = path72.charCodeAt(i);
4367
4529
  if (c === 47 || c === 92) {
4368
4530
  return i;
4369
4531
  }
@@ -4418,11 +4580,11 @@ Provide a URL, string, or another Path.`);
4418
4580
  /** Gets the parent directory or returns undefined if the parent is the root directory. */
4419
4581
  parent() {
4420
4582
  const resolvedPath = this.resolve();
4421
- const dirname6 = resolvedPath.dirname();
4422
- if (dirname6 === resolvedPath.#path) {
4583
+ const dirname62 = resolvedPath.dirname();
4584
+ if (dirname62 === resolvedPath.#path) {
4423
4585
  return void 0;
4424
4586
  } else {
4425
- return new _Path(dirname6);
4587
+ return new _Path(dirname62);
4426
4588
  }
4427
4589
  }
4428
4590
  /** Gets the parent or throws if the current directory was the root. */
@@ -8572,9 +8734,9 @@ function checkWindows2() {
8572
8734
  const platform = global.process?.platform;
8573
8735
  if (typeof platform === "string")
8574
8736
  return platform.startsWith("win");
8575
- const os = global.Deno?.build?.os;
8576
- if (typeof os === "string")
8577
- return os === "windows";
8737
+ const os2 = global.Deno?.build?.os;
8738
+ if (typeof os2 === "string")
8739
+ return os2 === "windows";
8578
8740
  return global.navigator?.platform?.startsWith("Win") ?? false;
8579
8741
  }
8580
8742
  var isWindows4 = checkWindows2();
@@ -14357,8 +14519,16 @@ var packageVersion = require_package().version;
14357
14519
 
14358
14520
  // src/logging.ts
14359
14521
  var import_chalk = __toESM(require_source());
14522
+
14523
+ // src/util.ts
14524
+ var Case = __toESM(require_Case());
14525
+ function isTruthy(value) {
14526
+ return !(value === void 0 || ["null", "undefined", "0", "false", ""].includes(value.toLocaleLowerCase()));
14527
+ }
14528
+
14529
+ // src/logging.ts
14360
14530
  var ICON = "\u{1F47E}";
14361
- var enabled2 = IS_TEST_RUN ? false : true;
14531
+ var enabled2 = IS_TEST_RUN ? isTruthy(process.env.DEBUG) : true;
14362
14532
  function log(isError, color, ...text) {
14363
14533
  if (!enabled2 && !isError) {
14364
14534
  return;
@@ -14382,6 +14552,9 @@ function warn(...text) {
14382
14552
 
14383
14553
  // src/util/exec.ts
14384
14554
  var child_process = __toESM(require("child_process"));
14555
+ var fs11 = __toESM(require("fs"));
14556
+ var os = __toESM(require("os"));
14557
+ var path6 = __toESM(require("path"));
14385
14558
  var MAX_BUFFER = 10 * 1024 * 1024;
14386
14559
  function spawnOpts(options) {
14387
14560
  return {
@@ -14404,6 +14577,28 @@ function run2(file, args, options) {
14404
14577
  }
14405
14578
  function capture(file, args, options) {
14406
14579
  debug(`${file} ${args.join(" ")} (cwd: ${options.cwd})`);
14580
+ if (options.captureStderr) {
14581
+ const combinedFile = path6.join(
14582
+ fs11.mkdtempSync(path6.join(os.tmpdir(), "projen-capture-")),
14583
+ "output"
14584
+ );
14585
+ const fd = fs11.openSync(combinedFile, "w+");
14586
+ try {
14587
+ try {
14588
+ child_process.execFileSync(file, args, {
14589
+ ...spawnOpts(options),
14590
+ stdio: ["inherit", fd, fd]
14591
+ });
14592
+ } catch (e) {
14593
+ e.stdout = fs11.readFileSync(combinedFile);
14594
+ throw e;
14595
+ }
14596
+ return fs11.readFileSync(combinedFile, "utf-8").trim();
14597
+ } finally {
14598
+ fs11.closeSync(fd);
14599
+ fs11.rmSync(path6.dirname(combinedFile), { recursive: true, force: true });
14600
+ }
14601
+ }
14407
14602
  return child_process.execFileSync(file, args, {
14408
14603
  ...spawnOpts(options),
14409
14604
  stdio: ["inherit", "pipe", "pipe"]
@@ -14411,13 +14606,8 @@ function capture(file, args, options) {
14411
14606
  }).toString("utf-8").trim();
14412
14607
  }
14413
14608
  function tryCapture(file, args, options) {
14414
- debug(`${file} ${args.join(" ")} (cwd: ${options.cwd})`);
14415
14609
  try {
14416
- const value = child_process.execFileSync(file, args, {
14417
- ...spawnOpts(options),
14418
- stdio: ["inherit", "pipe", "pipe"]
14419
- // "pipe" for STDERR means it appears in exceptions
14420
- }).toString("utf-8").trim();
14610
+ const value = capture(file, args, options);
14421
14611
  return value || void 0;
14422
14612
  } catch {
14423
14613
  return void 0;
@@ -14507,7 +14697,7 @@ var TaskRuntime = class _TaskRuntime {
14507
14697
  /**
14508
14698
  * The project-relative path of the tasks manifest file.
14509
14699
  */
14510
- static MANIFEST_FILE = path6.posix.join(
14700
+ static MANIFEST_FILE = path7.posix.join(
14511
14701
  PROJEN_DIR,
14512
14702
  "tasks.json"
14513
14703
  );
@@ -14854,7 +15044,7 @@ var RunTask = class {
14854
15044
  debug(this.fmtLog(...args));
14855
15045
  }
14856
15046
  fmtLog(...args) {
14857
- return (0, import_util.format)(`${(0, import_chalk2.underline)(this.fullname)} |`, ...args);
15047
+ return (0, import_util2.format)(`${(0, import_chalk2.underline)(this.fullname)} |`, ...args);
14858
15048
  }
14859
15049
  async shell(options) {
14860
15050
  const quiet = options.quiet ?? false;
@@ -14954,4 +15144,10 @@ var RunTask = class {
14954
15144
  0 && (module.exports = {
14955
15145
  TaskRuntime
14956
15146
  });
15147
+ /*! Bundled license information:
15148
+
15149
+ case/dist/Case.js:
15150
+ (*! Case - v1.6.2 - 2020-03-24
15151
+ * Copyright (c) 2020 Nathan Bubna; Licensed MIT, GPL *)
15152
+ */
14957
15153
  TaskRuntime.main();
@@ -45,7 +45,7 @@ const util_1 = require("./util");
45
45
  * Use this for creating example code files or other resources.
46
46
  */
47
47
  class SampleFile extends component_1.Component {
48
- static [JSII_RTTI_SYMBOL_1] = { fqn: "projen.SampleFile", version: "0.101.7" };
48
+ static [JSII_RTTI_SYMBOL_1] = { fqn: "projen.SampleFile", version: "0.101.9" };
49
49
  filePath;
50
50
  options;
51
51
  /**
@@ -96,7 +96,7 @@ exports.SampleFile = SampleFile;
96
96
  * Renders the given files into the directory if the directory does not exist. Use this to create sample code files
97
97
  */
98
98
  class SampleDir extends component_1.Component {
99
- static [JSII_RTTI_SYMBOL_1] = { fqn: "projen.SampleDir", version: "0.101.7" };
99
+ static [JSII_RTTI_SYMBOL_1] = { fqn: "projen.SampleDir", version: "0.101.9" };
100
100
  dir;
101
101
  options;
102
102
  /**
@@ -10,7 +10,7 @@ const component_1 = require("./component");
10
10
  * `.projenrc.ts`) and is attached to a project by whoever consumes it.
11
11
  */
12
12
  class ScriptRunner extends component_1.FutureComponent {
13
- static [JSII_RTTI_SYMBOL_1] = { fqn: "projen.ScriptRunner", version: "0.101.7" };
13
+ static [JSII_RTTI_SYMBOL_1] = { fqn: "projen.ScriptRunner", version: "0.101.9" };
14
14
  configFor(entrypoint) {
15
15
  return {
16
16
  dependencies: [],
@@ -9,7 +9,7 @@ const textfile_1 = require("./textfile");
9
9
  */
10
10
  class SourceCode extends component_1.Component {
11
11
  filePath;
12
- static [JSII_RTTI_SYMBOL_1] = { fqn: "projen.SourceCode", version: "0.101.7" };
12
+ static [JSII_RTTI_SYMBOL_1] = { fqn: "projen.SourceCode", version: "0.101.9" };
13
13
  file;
14
14
  indentLevel = 0;
15
15
  indent;
package/lib/task-shell.js CHANGED
@@ -19,7 +19,7 @@ const JSII_RTTI_SYMBOL_1 = Symbol.for("jsii.rtti");
19
19
  */
20
20
  class TaskShell {
21
21
  value;
22
- static [JSII_RTTI_SYMBOL_1] = { fqn: "projen.TaskShell", version: "0.101.7" };
22
+ static [JSII_RTTI_SYMBOL_1] = { fqn: "projen.TaskShell", version: "0.101.9" };
23
23
  /**
24
24
  * The built-in cross-platform shell (the default). It interprets POSIX-style
25
25
  * task syntax (`mkdir -p`, `&&`, `$VAR`, ...) identically on every platform,
package/lib/task.js CHANGED
@@ -8,7 +8,7 @@ const logging_1 = require("./logging");
8
8
  * commands and subtasks.
9
9
  */
10
10
  class Task {
11
- static [JSII_RTTI_SYMBOL_1] = { fqn: "projen.Task", version: "0.101.7" };
11
+ static [JSII_RTTI_SYMBOL_1] = { fqn: "projen.Task", version: "0.101.9" };
12
12
  /**
13
13
  * Task name.
14
14
  */
package/lib/tasks.js CHANGED
@@ -48,7 +48,7 @@ const task_runner_1 = require("./task-runner");
48
48
  * synthesized into `.projen/tasks.json`.
49
49
  */
50
50
  class Tasks extends component_1.Component {
51
- static [JSII_RTTI_SYMBOL_1] = { fqn: "projen.Tasks", version: "0.101.7" };
51
+ static [JSII_RTTI_SYMBOL_1] = { fqn: "projen.Tasks", version: "0.101.9" };
52
52
  _tasks;
53
53
  _env;
54
54
  _shell;
package/lib/testing.js CHANGED
@@ -10,7 +10,7 @@ const synth_1 = require("./util/synth");
10
10
  * @example `expect(Testing.synth(someProject)).toMatchSnapshot()`
11
11
  */
12
12
  class Testing {
13
- static [JSII_RTTI_SYMBOL_1] = { fqn: "projen.Testing", version: "0.101.7" };
13
+ static [JSII_RTTI_SYMBOL_1] = { fqn: "projen.Testing", version: "0.101.9" };
14
14
  /**
15
15
  * Produces a simple JS object that represents the contents of the projects with field names being file paths.
16
16
  * @param project the project to produce a snapshot for
package/lib/textfile.js CHANGED
@@ -7,7 +7,7 @@ const file_1 = require("./file");
7
7
  * A text file.
8
8
  */
9
9
  class TextFile extends file_1.FileBase {
10
- static [JSII_RTTI_SYMBOL_1] = { fqn: "projen.TextFile", version: "0.101.7" };
10
+ static [JSII_RTTI_SYMBOL_1] = { fqn: "projen.TextFile", version: "0.101.9" };
11
11
  lines;
12
12
  /**
13
13
  * Defines a text file.
package/lib/toml.js CHANGED
@@ -41,7 +41,7 @@ const object_file_1 = require("./object-file");
41
41
  * Represents a TOML file.
42
42
  */
43
43
  class TomlFile extends object_file_1.ObjectFile {
44
- static [JSII_RTTI_SYMBOL_1] = { fqn: "projen.TomlFile", version: "0.101.7" };
44
+ static [JSII_RTTI_SYMBOL_1] = { fqn: "projen.TomlFile", version: "0.101.9" };
45
45
  constructor(scope, filePath, options) {
46
46
  super(scope, filePath, options);
47
47
  }
@@ -1,6 +1,6 @@
1
1
  import { TypescriptConfig } from "../javascript";
2
2
  import { TypeScriptRunner } from "./typescript-runner";
3
- import type { Project } from "../project";
3
+ import type { InitProject, Project } from "../project";
4
4
  import { ProjenrcFile } from "../projenrc";
5
5
  export interface ProjenrcTsOptions {
6
6
  /**
@@ -45,6 +45,7 @@ export declare class ProjenrcTs extends ProjenrcFile {
45
45
  private readonly _projenCodeDir;
46
46
  private readonly _runner;
47
47
  constructor(project: Project, options?: ProjenrcTsOptions);
48
+ projectCreation(initProject: InitProject): void;
48
49
  private getRunner;
49
50
  preSynthesize(): void;
50
51
  private generateProjenrc;