projen 0.61.13 → 0.61.16

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 (151) hide show
  1. package/.jsii +325 -33
  2. package/docs/api/API.md +166 -0
  3. package/docs/escape-hatches.md +3 -3
  4. package/lib/awscdk/auto-discover.js +5 -5
  5. package/lib/awscdk/awscdk-app-java.js +1 -1
  6. package/lib/awscdk/awscdk-app-py.js +1 -1
  7. package/lib/awscdk/awscdk-app-ts.js +1 -1
  8. package/lib/awscdk/awscdk-construct.js +2 -2
  9. package/lib/awscdk/awscdk-deps-java.js +1 -1
  10. package/lib/awscdk/awscdk-deps-js.js +1 -1
  11. package/lib/awscdk/awscdk-deps.js +1 -1
  12. package/lib/awscdk/cdk-config.js +1 -1
  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-docgen.js +1 -1
  22. package/lib/cdk/jsii-project.d.ts +1 -0
  23. package/lib/cdk/jsii-project.js +3 -2
  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/component.js +1 -1
  34. package/lib/dependencies.js +1 -1
  35. package/lib/dev-env.js +1 -1
  36. package/lib/docker-compose.js +2 -2
  37. package/lib/file.js +1 -1
  38. package/lib/gitattributes.js +1 -1
  39. package/lib/github/auto-approve.js +1 -1
  40. package/lib/github/auto-merge.js +1 -1
  41. package/lib/github/dependabot.js +1 -1
  42. package/lib/github/github-credentials.js +1 -1
  43. package/lib/github/github-project.js +1 -1
  44. package/lib/github/github.js +1 -1
  45. package/lib/github/mergify.js +1 -1
  46. package/lib/github/pr-template.js +1 -1
  47. package/lib/github/pull-request-lint.js +1 -1
  48. package/lib/github/stale.js +1 -1
  49. package/lib/github/task-workflow.js +1 -1
  50. package/lib/github/workflows.js +1 -1
  51. package/lib/gitlab/configuration.js +1 -1
  52. package/lib/gitlab/gitlab-configuration.js +1 -1
  53. package/lib/gitlab/nested-configuration.js +1 -1
  54. package/lib/gitpod.js +1 -1
  55. package/lib/ignore-file.js +1 -1
  56. package/lib/index.d.ts +1 -0
  57. package/lib/index.js +2 -1
  58. package/lib/ini.js +1 -1
  59. package/lib/java/java-project.js +1 -1
  60. package/lib/java/junit.js +1 -1
  61. package/lib/java/maven-compile.js +1 -1
  62. package/lib/java/maven-packaging.js +1 -1
  63. package/lib/java/maven-sample.js +1 -1
  64. package/lib/java/pom.js +1 -1
  65. package/lib/java/projenrc.js +1 -1
  66. package/lib/javascript/bundler.js +1 -1
  67. package/lib/javascript/eslint.js +1 -1
  68. package/lib/javascript/jest.js +1 -1
  69. package/lib/javascript/node-package.js +1 -1
  70. package/lib/javascript/node-project.js +1 -1
  71. package/lib/javascript/npm-config.js +1 -1
  72. package/lib/javascript/prettier.js +1 -1
  73. package/lib/javascript/projenrc.js +1 -1
  74. package/lib/javascript/typescript-config.js +1 -1
  75. package/lib/javascript/upgrade-dependencies.js +2 -2
  76. package/lib/json-patch.d.ts +75 -0
  77. package/lib/json-patch.js +105 -0
  78. package/lib/json.js +1 -1
  79. package/lib/license.js +1 -1
  80. package/lib/logger.js +1 -1
  81. package/lib/makefile.js +1 -1
  82. package/lib/object-file.d.ts +36 -0
  83. package/lib/object-file.js +39 -3
  84. package/lib/project-build.js +1 -1
  85. package/lib/project.js +1 -1
  86. package/lib/projects.js +1 -1
  87. package/lib/projenrc-json.js +1 -1
  88. package/lib/python/pip.js +1 -1
  89. package/lib/python/poetry.js +2 -2
  90. package/lib/python/projenrc.js +1 -1
  91. package/lib/python/pytest-sample.js +1 -1
  92. package/lib/python/pytest.js +1 -1
  93. package/lib/python/python-project.js +1 -1
  94. package/lib/python/python-sample.js +1 -1
  95. package/lib/python/requirements-file.js +1 -1
  96. package/lib/python/setuppy.js +1 -1
  97. package/lib/python/setuptools.js +1 -1
  98. package/lib/python/venv.js +1 -1
  99. package/lib/readme.js +1 -1
  100. package/lib/release/publisher.js +1 -1
  101. package/lib/release/release-trigger.js +1 -1
  102. package/lib/release/release.js +1 -1
  103. package/lib/renovatebot.js +1 -1
  104. package/lib/run-task.js +1833 -0
  105. package/lib/sample-file.js +2 -2
  106. package/lib/semver.js +1 -1
  107. package/lib/source-code.js +1 -1
  108. package/lib/task-runtime.js +1 -1
  109. package/lib/task.js +1 -1
  110. package/lib/tasks.js +1 -1
  111. package/lib/testing.js +1 -1
  112. package/lib/textfile.js +1 -1
  113. package/lib/toml.js +1 -1
  114. package/lib/typescript/projenrc.js +1 -1
  115. package/lib/typescript/typescript-typedoc.js +1 -1
  116. package/lib/typescript/typescript.js +3 -3
  117. package/lib/version.js +1 -1
  118. package/lib/vscode/devcontainer.js +1 -1
  119. package/lib/vscode/launch-config.js +1 -1
  120. package/lib/vscode/vscode.js +1 -1
  121. package/lib/web/next.js +3 -3
  122. package/lib/web/postcss.js +1 -1
  123. package/lib/web/react.js +4 -4
  124. package/lib/web/tailwind.js +1 -1
  125. package/lib/xmlfile.js +1 -1
  126. package/lib/yaml.js +1 -1
  127. package/node_modules/fast-json-patch/LICENSE.txt +22 -0
  128. package/node_modules/fast-json-patch/README.md +428 -0
  129. package/node_modules/fast-json-patch/commonjs/core.d.ts +111 -0
  130. package/node_modules/fast-json-patch/commonjs/core.js +441 -0
  131. package/node_modules/fast-json-patch/commonjs/duplex.d.ts +23 -0
  132. package/node_modules/fast-json-patch/commonjs/duplex.js +181 -0
  133. package/node_modules/fast-json-patch/commonjs/helpers.d.ts +41 -0
  134. package/node_modules/fast-json-patch/commonjs/helpers.js +181 -0
  135. package/node_modules/fast-json-patch/dist/fast-json-patch.js +928 -0
  136. package/node_modules/fast-json-patch/dist/fast-json-patch.min.js +14 -0
  137. package/node_modules/fast-json-patch/index.d.ts +34 -0
  138. package/node_modules/fast-json-patch/index.js +11 -0
  139. package/node_modules/fast-json-patch/index.mjs +29 -0
  140. package/node_modules/fast-json-patch/index.ts +31 -0
  141. package/node_modules/fast-json-patch/jasmine-run.mjs +23 -0
  142. package/node_modules/fast-json-patch/module/core.d.ts +111 -0
  143. package/node_modules/fast-json-patch/module/core.mjs +433 -0
  144. package/node_modules/fast-json-patch/module/duplex.d.ts +23 -0
  145. package/node_modules/fast-json-patch/module/duplex.mjs +176 -0
  146. package/node_modules/fast-json-patch/module/helpers.d.ts +41 -0
  147. package/node_modules/fast-json-patch/module/helpers.mjs +171 -0
  148. package/node_modules/fast-json-patch/package.json +65 -0
  149. package/node_modules/fast-json-patch/tsc-to-mjs.sh +10 -0
  150. package/node_modules/fast-json-patch/webpack.config.js +63 -0
  151. package/package.json +3 -1
@@ -0,0 +1,181 @@
1
+ /*!
2
+ * https://github.com/Starcounter-Jack/JSON-Patch
3
+ * (c) 2017-2022 Joachim Wester
4
+ * MIT licensed
5
+ */
6
+ var __extends = (this && this.__extends) || (function () {
7
+ var extendStatics = function (d, b) {
8
+ extendStatics = Object.setPrototypeOf ||
9
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
10
+ function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
11
+ return extendStatics(d, b);
12
+ };
13
+ return function (d, b) {
14
+ extendStatics(d, b);
15
+ function __() { this.constructor = d; }
16
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
17
+ };
18
+ })();
19
+ Object.defineProperty(exports, "__esModule", { value: true });
20
+ var _hasOwnProperty = Object.prototype.hasOwnProperty;
21
+ function hasOwnProperty(obj, key) {
22
+ return _hasOwnProperty.call(obj, key);
23
+ }
24
+ exports.hasOwnProperty = hasOwnProperty;
25
+ function _objectKeys(obj) {
26
+ if (Array.isArray(obj)) {
27
+ var keys_1 = new Array(obj.length);
28
+ for (var k = 0; k < keys_1.length; k++) {
29
+ keys_1[k] = "" + k;
30
+ }
31
+ return keys_1;
32
+ }
33
+ if (Object.keys) {
34
+ return Object.keys(obj);
35
+ }
36
+ var keys = [];
37
+ for (var i in obj) {
38
+ if (hasOwnProperty(obj, i)) {
39
+ keys.push(i);
40
+ }
41
+ }
42
+ return keys;
43
+ }
44
+ exports._objectKeys = _objectKeys;
45
+ ;
46
+ /**
47
+ * Deeply clone the object.
48
+ * https://jsperf.com/deep-copy-vs-json-stringify-json-parse/25 (recursiveDeepCopy)
49
+ * @param {any} obj value to clone
50
+ * @return {any} cloned obj
51
+ */
52
+ function _deepClone(obj) {
53
+ switch (typeof obj) {
54
+ case "object":
55
+ return JSON.parse(JSON.stringify(obj)); //Faster than ES5 clone - http://jsperf.com/deep-cloning-of-objects/5
56
+ case "undefined":
57
+ return null; //this is how JSON.stringify behaves for array items
58
+ default:
59
+ return obj; //no need to clone primitives
60
+ }
61
+ }
62
+ exports._deepClone = _deepClone;
63
+ //3x faster than cached /^\d+$/.test(str)
64
+ function isInteger(str) {
65
+ var i = 0;
66
+ var len = str.length;
67
+ var charCode;
68
+ while (i < len) {
69
+ charCode = str.charCodeAt(i);
70
+ if (charCode >= 48 && charCode <= 57) {
71
+ i++;
72
+ continue;
73
+ }
74
+ return false;
75
+ }
76
+ return true;
77
+ }
78
+ exports.isInteger = isInteger;
79
+ /**
80
+ * Escapes a json pointer path
81
+ * @param path The raw pointer
82
+ * @return the Escaped path
83
+ */
84
+ function escapePathComponent(path) {
85
+ if (path.indexOf('/') === -1 && path.indexOf('~') === -1)
86
+ return path;
87
+ return path.replace(/~/g, '~0').replace(/\//g, '~1');
88
+ }
89
+ exports.escapePathComponent = escapePathComponent;
90
+ /**
91
+ * Unescapes a json pointer path
92
+ * @param path The escaped pointer
93
+ * @return The unescaped path
94
+ */
95
+ function unescapePathComponent(path) {
96
+ return path.replace(/~1/g, '/').replace(/~0/g, '~');
97
+ }
98
+ exports.unescapePathComponent = unescapePathComponent;
99
+ function _getPathRecursive(root, obj) {
100
+ var found;
101
+ for (var key in root) {
102
+ if (hasOwnProperty(root, key)) {
103
+ if (root[key] === obj) {
104
+ return escapePathComponent(key) + '/';
105
+ }
106
+ else if (typeof root[key] === 'object') {
107
+ found = _getPathRecursive(root[key], obj);
108
+ if (found != '') {
109
+ return escapePathComponent(key) + '/' + found;
110
+ }
111
+ }
112
+ }
113
+ }
114
+ return '';
115
+ }
116
+ exports._getPathRecursive = _getPathRecursive;
117
+ function getPath(root, obj) {
118
+ if (root === obj) {
119
+ return '/';
120
+ }
121
+ var path = _getPathRecursive(root, obj);
122
+ if (path === '') {
123
+ throw new Error("Object not found in root");
124
+ }
125
+ return "/" + path;
126
+ }
127
+ exports.getPath = getPath;
128
+ /**
129
+ * Recursively checks whether an object has any undefined values inside.
130
+ */
131
+ function hasUndefined(obj) {
132
+ if (obj === undefined) {
133
+ return true;
134
+ }
135
+ if (obj) {
136
+ if (Array.isArray(obj)) {
137
+ for (var i_1 = 0, len = obj.length; i_1 < len; i_1++) {
138
+ if (hasUndefined(obj[i_1])) {
139
+ return true;
140
+ }
141
+ }
142
+ }
143
+ else if (typeof obj === "object") {
144
+ var objKeys = _objectKeys(obj);
145
+ var objKeysLength = objKeys.length;
146
+ for (var i = 0; i < objKeysLength; i++) {
147
+ if (hasUndefined(obj[objKeys[i]])) {
148
+ return true;
149
+ }
150
+ }
151
+ }
152
+ }
153
+ return false;
154
+ }
155
+ exports.hasUndefined = hasUndefined;
156
+ function patchErrorMessageFormatter(message, args) {
157
+ var messageParts = [message];
158
+ for (var key in args) {
159
+ var value = typeof args[key] === 'object' ? JSON.stringify(args[key], null, 2) : args[key]; // pretty print
160
+ if (typeof value !== 'undefined') {
161
+ messageParts.push(key + ": " + value);
162
+ }
163
+ }
164
+ return messageParts.join('\n');
165
+ }
166
+ var PatchError = /** @class */ (function (_super) {
167
+ __extends(PatchError, _super);
168
+ function PatchError(message, name, index, operation, tree) {
169
+ var _newTarget = this.constructor;
170
+ var _this = _super.call(this, patchErrorMessageFormatter(message, { name: name, index: index, operation: operation, tree: tree })) || this;
171
+ _this.name = name;
172
+ _this.index = index;
173
+ _this.operation = operation;
174
+ _this.tree = tree;
175
+ Object.setPrototypeOf(_this, _newTarget.prototype); // restore prototype chain, see https://stackoverflow.com/a/48342359
176
+ _this.message = patchErrorMessageFormatter(message, { name: name, index: index, operation: operation, tree: tree });
177
+ return _this;
178
+ }
179
+ return PatchError;
180
+ }(Error));
181
+ exports.PatchError = PatchError;