cdk8s 2.69.7 → 2.69.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.
- package/.jsii +3 -3
- package/lib/api-object.js +1 -1
- package/lib/app.js +1 -1
- package/lib/chart.js +1 -1
- package/lib/cron.js +1 -1
- package/lib/dependency.js +2 -2
- package/lib/duration.js +1 -1
- package/lib/helm.js +1 -1
- package/lib/include.js +1 -1
- package/lib/json-patch.js +1 -1
- package/lib/lazy.js +1 -1
- package/lib/metadata.js +1 -1
- package/lib/names.js +1 -1
- package/lib/resolve.js +4 -4
- package/lib/size.js +1 -1
- package/lib/testing.js +1 -1
- package/lib/yaml.js +1 -1
- package/node_modules/yaml/README.md +17 -3
- package/node_modules/yaml/browser/dist/compose/compose-doc.js +1 -0
- package/node_modules/yaml/browser/dist/compose/compose-node.js +10 -0
- package/node_modules/yaml/browser/dist/compose/compose-scalar.js +14 -8
- package/node_modules/yaml/browser/dist/compose/resolve-block-map.js +2 -0
- package/node_modules/yaml/browser/dist/compose/resolve-block-seq.js +2 -0
- package/node_modules/yaml/browser/dist/compose/resolve-flow-collection.js +4 -0
- package/node_modules/yaml/browser/dist/compose/util-map-includes.js +1 -5
- package/node_modules/yaml/browser/dist/doc/Document.js +3 -2
- package/node_modules/yaml/browser/dist/nodes/addPairToJSMap.js +7 -49
- package/node_modules/yaml/browser/dist/public-api.js +3 -0
- package/node_modules/yaml/browser/dist/schema/Schema.js +1 -2
- package/node_modules/yaml/browser/dist/schema/tags.js +26 -13
- package/node_modules/yaml/browser/dist/schema/yaml-1.1/merge.js +64 -0
- package/node_modules/yaml/browser/dist/schema/yaml-1.1/schema.js +2 -0
- package/node_modules/yaml/browser/dist/stringify/stringify.js +6 -1
- package/node_modules/yaml/dist/compose/compose-doc.js +1 -0
- package/node_modules/yaml/dist/compose/compose-node.d.ts +1 -0
- package/node_modules/yaml/dist/compose/compose-node.js +10 -0
- package/node_modules/yaml/dist/compose/compose-scalar.js +13 -7
- package/node_modules/yaml/dist/compose/resolve-block-map.js +2 -0
- package/node_modules/yaml/dist/compose/resolve-block-seq.js +2 -0
- package/node_modules/yaml/dist/compose/resolve-flow-collection.js +4 -0
- package/node_modules/yaml/dist/compose/util-map-includes.js +1 -5
- package/node_modules/yaml/dist/doc/Document.js +3 -2
- package/node_modules/yaml/dist/errors.d.ts +1 -1
- package/node_modules/yaml/dist/nodes/Node.d.ts +7 -1
- package/node_modules/yaml/dist/nodes/addPairToJSMap.js +6 -48
- package/node_modules/yaml/dist/options.d.ts +6 -0
- package/node_modules/yaml/dist/parse/lexer.d.ts +1 -1
- package/node_modules/yaml/dist/parse/parser.d.ts +3 -3
- package/node_modules/yaml/dist/public-api.js +3 -0
- package/node_modules/yaml/dist/schema/Schema.d.ts +0 -1
- package/node_modules/yaml/dist/schema/Schema.js +1 -2
- package/node_modules/yaml/dist/schema/tags.d.ts +9 -1
- package/node_modules/yaml/dist/schema/tags.js +26 -13
- package/node_modules/yaml/dist/schema/types.d.ts +6 -4
- package/node_modules/yaml/dist/schema/yaml-1.1/merge.d.ts +9 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/merge.js +68 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/schema.js +2 -0
- package/node_modules/yaml/dist/stringify/stringify.js +6 -1
- package/node_modules/yaml/package.json +1 -1
- package/package.json +6 -6
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { ToJSContext } from '../../nodes/toJS.js';
|
|
2
|
+
import type { MapLike } from '../../nodes/YAMLMap.js';
|
|
3
|
+
import type { ScalarTag } from '../types.js';
|
|
4
|
+
export declare const merge: ScalarTag & {
|
|
5
|
+
identify(value: unknown): boolean;
|
|
6
|
+
test: RegExp;
|
|
7
|
+
};
|
|
8
|
+
export declare const isMergeKey: (ctx: ToJSContext | undefined, key: unknown) => boolean | undefined;
|
|
9
|
+
export declare function addMergeToJSMap(ctx: ToJSContext | undefined, map: MapLike, value: unknown): void;
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var identity = require('../../nodes/identity.js');
|
|
4
|
+
var Scalar = require('../../nodes/Scalar.js');
|
|
5
|
+
|
|
6
|
+
// If the value associated with a merge key is a single mapping node, each of
|
|
7
|
+
// its key/value pairs is inserted into the current mapping, unless the key
|
|
8
|
+
// already exists in it. If the value associated with the merge key is a
|
|
9
|
+
// sequence, then this sequence is expected to contain mapping nodes and each
|
|
10
|
+
// of these nodes is merged in turn according to its order in the sequence.
|
|
11
|
+
// Keys in mapping nodes earlier in the sequence override keys specified in
|
|
12
|
+
// later mapping nodes. -- http://yaml.org/type/merge.html
|
|
13
|
+
const MERGE_KEY = '<<';
|
|
14
|
+
const merge = {
|
|
15
|
+
identify: value => value === MERGE_KEY ||
|
|
16
|
+
(typeof value === 'symbol' && value.description === MERGE_KEY),
|
|
17
|
+
default: 'key',
|
|
18
|
+
tag: 'tag:yaml.org,2002:merge',
|
|
19
|
+
test: /^<<$/,
|
|
20
|
+
resolve: () => Object.assign(new Scalar.Scalar(Symbol(MERGE_KEY)), {
|
|
21
|
+
addToJSMap: addMergeToJSMap
|
|
22
|
+
}),
|
|
23
|
+
stringify: () => MERGE_KEY
|
|
24
|
+
};
|
|
25
|
+
const isMergeKey = (ctx, key) => (merge.identify(key) ||
|
|
26
|
+
(identity.isScalar(key) &&
|
|
27
|
+
(!key.type || key.type === Scalar.Scalar.PLAIN) &&
|
|
28
|
+
merge.identify(key.value))) &&
|
|
29
|
+
ctx?.doc.schema.tags.some(tag => tag.tag === merge.tag && tag.default);
|
|
30
|
+
function addMergeToJSMap(ctx, map, value) {
|
|
31
|
+
value = ctx && identity.isAlias(value) ? value.resolve(ctx.doc) : value;
|
|
32
|
+
if (identity.isSeq(value))
|
|
33
|
+
for (const it of value.items)
|
|
34
|
+
mergeValue(ctx, map, it);
|
|
35
|
+
else if (Array.isArray(value))
|
|
36
|
+
for (const it of value)
|
|
37
|
+
mergeValue(ctx, map, it);
|
|
38
|
+
else
|
|
39
|
+
mergeValue(ctx, map, value);
|
|
40
|
+
}
|
|
41
|
+
function mergeValue(ctx, map, value) {
|
|
42
|
+
const source = ctx && identity.isAlias(value) ? value.resolve(ctx.doc) : value;
|
|
43
|
+
if (!identity.isMap(source))
|
|
44
|
+
throw new Error('Merge sources must be maps or map aliases');
|
|
45
|
+
const srcMap = source.toJSON(null, ctx, Map);
|
|
46
|
+
for (const [key, value] of srcMap) {
|
|
47
|
+
if (map instanceof Map) {
|
|
48
|
+
if (!map.has(key))
|
|
49
|
+
map.set(key, value);
|
|
50
|
+
}
|
|
51
|
+
else if (map instanceof Set) {
|
|
52
|
+
map.add(key);
|
|
53
|
+
}
|
|
54
|
+
else if (!Object.prototype.hasOwnProperty.call(map, key)) {
|
|
55
|
+
Object.defineProperty(map, key, {
|
|
56
|
+
value,
|
|
57
|
+
writable: true,
|
|
58
|
+
enumerable: true,
|
|
59
|
+
configurable: true
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
return map;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
exports.addMergeToJSMap = addMergeToJSMap;
|
|
67
|
+
exports.isMergeKey = isMergeKey;
|
|
68
|
+
exports.merge = merge;
|
|
@@ -8,6 +8,7 @@ var binary = require('./binary.js');
|
|
|
8
8
|
var bool = require('./bool.js');
|
|
9
9
|
var float = require('./float.js');
|
|
10
10
|
var int = require('./int.js');
|
|
11
|
+
var merge = require('./merge.js');
|
|
11
12
|
var omap = require('./omap.js');
|
|
12
13
|
var pairs = require('./pairs.js');
|
|
13
14
|
var set = require('./set.js');
|
|
@@ -28,6 +29,7 @@ const schema = [
|
|
|
28
29
|
float.floatExp,
|
|
29
30
|
float.float,
|
|
30
31
|
binary.binary,
|
|
32
|
+
merge.merge,
|
|
31
33
|
omap.omap,
|
|
32
34
|
pairs.pairs,
|
|
33
35
|
set.set,
|
|
@@ -56,7 +56,12 @@ function getTagObject(tags, item) {
|
|
|
56
56
|
let obj;
|
|
57
57
|
if (identity.isScalar(item)) {
|
|
58
58
|
obj = item.value;
|
|
59
|
-
|
|
59
|
+
let match = tags.filter(t => t.identify?.(obj));
|
|
60
|
+
if (match.length > 1) {
|
|
61
|
+
const testMatch = match.filter(t => t.test);
|
|
62
|
+
if (testMatch.length > 0)
|
|
63
|
+
match = testMatch;
|
|
64
|
+
}
|
|
60
65
|
tagObj =
|
|
61
66
|
match.find(t => t.format === item.format) ?? match.find(t => !t.format);
|
|
62
67
|
}
|
package/package.json
CHANGED
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"organization": false
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
|
-
"@cdk8s/projen-common": "^0.0.
|
|
49
|
+
"@cdk8s/projen-common": "^0.0.551",
|
|
50
50
|
"@types/follow-redirects": "^1.14.4",
|
|
51
51
|
"@types/jest": "^27",
|
|
52
52
|
"@types/node": "16.18.78",
|
|
@@ -61,12 +61,12 @@
|
|
|
61
61
|
"jest": "^27",
|
|
62
62
|
"jest-junit": "^15",
|
|
63
63
|
"jsii": "^5",
|
|
64
|
-
"jsii-diff": "^1.
|
|
64
|
+
"jsii-diff": "^1.104.0",
|
|
65
65
|
"jsii-docgen": "^10.5.0",
|
|
66
|
-
"jsii-pacmak": "^1.
|
|
66
|
+
"jsii-pacmak": "^1.104.0",
|
|
67
67
|
"jsii-rosetta": "^5",
|
|
68
68
|
"json-schema-to-typescript": "^10.1.5",
|
|
69
|
-
"projen": "^0.88.
|
|
69
|
+
"projen": "^0.88.3",
|
|
70
70
|
"ts-jest": "^27",
|
|
71
71
|
"typescript": "~5.6.3"
|
|
72
72
|
},
|
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
"dependencies": {
|
|
77
77
|
"fast-json-patch": "^3.1.1",
|
|
78
78
|
"follow-redirects": "^1.15.9",
|
|
79
|
-
"yaml": "2.
|
|
79
|
+
"yaml": "2.6.0"
|
|
80
80
|
},
|
|
81
81
|
"bundledDependencies": [
|
|
82
82
|
"fast-json-patch",
|
|
@@ -105,7 +105,7 @@
|
|
|
105
105
|
"publishConfig": {
|
|
106
106
|
"access": "public"
|
|
107
107
|
},
|
|
108
|
-
"version": "2.69.
|
|
108
|
+
"version": "2.69.9",
|
|
109
109
|
"jest": {
|
|
110
110
|
"coverageProvider": "v8",
|
|
111
111
|
"testMatch": [
|