cdk8s-plus-33 2.5.2 → 2.5.3
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/.jsii +2 -2
- package/lib/api-resource.js +2 -2
- package/lib/base.js +2 -2
- package/lib/config-map.js +1 -1
- package/lib/container.js +6 -6
- package/lib/cron-job.js +1 -1
- package/lib/daemon-set.js +1 -1
- package/lib/deployment.js +3 -3
- package/lib/handler.js +1 -1
- package/lib/horizontal-pod-autoscaler.js +4 -4
- package/lib/imports/k8s.js +173 -173
- package/lib/ingress.js +2 -2
- package/lib/job.js +1 -1
- package/lib/namespace.js +2 -2
- package/lib/network-policy.js +3 -3
- package/lib/pod.js +16 -16
- package/lib/probe.js +1 -1
- package/lib/pv.js +4 -4
- package/lib/pvc.js +1 -1
- package/lib/role-binding.js +4 -4
- package/lib/role.js +2 -2
- package/lib/secret.js +6 -6
- package/lib/service-account.js +1 -1
- package/lib/service.js +1 -1
- package/lib/stateful-set.js +2 -2
- package/lib/volume.js +1 -1
- package/lib/workload.js +2 -2
- package/node_modules/brace-expansion/index.js +12 -9
- package/node_modules/brace-expansion/package.json +1 -1
- package/package.json +1 -1
|
@@ -61,10 +61,13 @@ function parseCommaParts(str) {
|
|
|
61
61
|
return parts;
|
|
62
62
|
}
|
|
63
63
|
|
|
64
|
-
function expandTop(str) {
|
|
64
|
+
function expandTop(str, options) {
|
|
65
65
|
if (!str)
|
|
66
66
|
return [];
|
|
67
67
|
|
|
68
|
+
options = options || {};
|
|
69
|
+
var max = options.max == null ? Infinity : options.max;
|
|
70
|
+
|
|
68
71
|
// I don't know why Bash 4.3 does this, but it does.
|
|
69
72
|
// Anything starting with {} will have the first two bytes preserved
|
|
70
73
|
// but *only* at the top level, so {},a}b will not expand to anything,
|
|
@@ -75,7 +78,7 @@ function expandTop(str) {
|
|
|
75
78
|
str = '\\{\\}' + str.substr(2);
|
|
76
79
|
}
|
|
77
80
|
|
|
78
|
-
return expand(escapeBraces(str), true).map(unescapeBraces);
|
|
81
|
+
return expand(escapeBraces(str), max, true).map(unescapeBraces);
|
|
79
82
|
}
|
|
80
83
|
|
|
81
84
|
function embrace(str) {
|
|
@@ -92,7 +95,7 @@ function gte(i, y) {
|
|
|
92
95
|
return i >= y;
|
|
93
96
|
}
|
|
94
97
|
|
|
95
|
-
function expand(str, isTop) {
|
|
98
|
+
function expand(str, max, isTop) {
|
|
96
99
|
var expansions = [];
|
|
97
100
|
|
|
98
101
|
var m = balanced('{', '}', str);
|
|
@@ -101,11 +104,11 @@ function expand(str, isTop) {
|
|
|
101
104
|
// no need to expand pre, since it is guaranteed to be free of brace-sets
|
|
102
105
|
var pre = m.pre;
|
|
103
106
|
var post = m.post.length
|
|
104
|
-
? expand(m.post, false)
|
|
107
|
+
? expand(m.post, max, false)
|
|
105
108
|
: [''];
|
|
106
109
|
|
|
107
110
|
if (/\$$/.test(m.pre)) {
|
|
108
|
-
for (var k = 0; k < post.length; k++) {
|
|
111
|
+
for (var k = 0; k < post.length && k < max; k++) {
|
|
109
112
|
var expansion = pre+ '{' + m.body + '}' + post[k];
|
|
110
113
|
expansions.push(expansion);
|
|
111
114
|
}
|
|
@@ -118,7 +121,7 @@ function expand(str, isTop) {
|
|
|
118
121
|
// {a},b}
|
|
119
122
|
if (m.post.match(/,(?!,).*\}/)) {
|
|
120
123
|
str = m.pre + '{' + m.body + escClose + m.post;
|
|
121
|
-
return expand(str);
|
|
124
|
+
return expand(str, max, true);
|
|
122
125
|
}
|
|
123
126
|
return [str];
|
|
124
127
|
}
|
|
@@ -130,7 +133,7 @@ function expand(str, isTop) {
|
|
|
130
133
|
n = parseCommaParts(m.body);
|
|
131
134
|
if (n.length === 1) {
|
|
132
135
|
// x{{a,b}}y ==> x{a}y x{b}y
|
|
133
|
-
n = expand(n[0], false).map(embrace);
|
|
136
|
+
n = expand(n[0], max, false).map(embrace);
|
|
134
137
|
if (n.length === 1) {
|
|
135
138
|
return post.map(function(p) {
|
|
136
139
|
return m.pre + n[0] + p;
|
|
@@ -185,12 +188,12 @@ function expand(str, isTop) {
|
|
|
185
188
|
N = [];
|
|
186
189
|
|
|
187
190
|
for (var j = 0; j < n.length; j++) {
|
|
188
|
-
N.push.apply(N, expand(n[j], false));
|
|
191
|
+
N.push.apply(N, expand(n[j], max, false));
|
|
189
192
|
}
|
|
190
193
|
}
|
|
191
194
|
|
|
192
195
|
for (var j = 0; j < N.length; j++) {
|
|
193
|
-
for (var k = 0; k < post.length; k++) {
|
|
196
|
+
for (var k = 0; k < post.length && expansions.length < max; k++) {
|
|
194
197
|
var expansion = pre + N[j] + post[k];
|
|
195
198
|
if (!isTop || isSequence || expansion)
|
|
196
199
|
expansions.push(expansion);
|