@aws-cdk/aws-imagebuilder-alpha 2.224.0-alpha.0

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 (72) hide show
  1. package/.jsii +9476 -0
  2. package/.jsii.tabl.json.gz +0 -0
  3. package/.warnings.jsii.js +71 -0
  4. package/LICENSE +201 -0
  5. package/NOTICE +19 -0
  6. package/README.md +94 -0
  7. package/awslint.json +5 -0
  8. package/lib/index.d.ts +1 -0
  9. package/lib/index.js +19 -0
  10. package/lib/infrastructure-configuration.d.ts +323 -0
  11. package/lib/infrastructure-configuration.js +341 -0
  12. package/node_modules/yaml/LICENSE +13 -0
  13. package/node_modules/yaml/README.md +127 -0
  14. package/node_modules/yaml/browser/dist/PlainValue-b8036b75.js +1275 -0
  15. package/node_modules/yaml/browser/dist/Schema-e94716c8.js +682 -0
  16. package/node_modules/yaml/browser/dist/index.js +1002 -0
  17. package/node_modules/yaml/browser/dist/legacy-exports.js +3 -0
  18. package/node_modules/yaml/browser/dist/package.json +1 -0
  19. package/node_modules/yaml/browser/dist/parse-cst.js +1904 -0
  20. package/node_modules/yaml/browser/dist/resolveSeq-492ab440.js +2419 -0
  21. package/node_modules/yaml/browser/dist/types.js +4 -0
  22. package/node_modules/yaml/browser/dist/util.js +2 -0
  23. package/node_modules/yaml/browser/dist/warnings-df54cb69.js +499 -0
  24. package/node_modules/yaml/browser/index.js +1 -0
  25. package/node_modules/yaml/browser/map.js +2 -0
  26. package/node_modules/yaml/browser/pair.js +2 -0
  27. package/node_modules/yaml/browser/parse-cst.js +1 -0
  28. package/node_modules/yaml/browser/scalar.js +2 -0
  29. package/node_modules/yaml/browser/schema.js +9 -0
  30. package/node_modules/yaml/browser/seq.js +2 -0
  31. package/node_modules/yaml/browser/types/binary.js +8 -0
  32. package/node_modules/yaml/browser/types/omap.js +3 -0
  33. package/node_modules/yaml/browser/types/pairs.js +3 -0
  34. package/node_modules/yaml/browser/types/set.js +3 -0
  35. package/node_modules/yaml/browser/types/timestamp.js +10 -0
  36. package/node_modules/yaml/browser/types.js +1 -0
  37. package/node_modules/yaml/browser/util.js +1 -0
  38. package/node_modules/yaml/dist/Document-9b4560a1.js +757 -0
  39. package/node_modules/yaml/dist/PlainValue-ec8e588e.js +876 -0
  40. package/node_modules/yaml/dist/Schema-88e323a7.js +525 -0
  41. package/node_modules/yaml/dist/index.js +79 -0
  42. package/node_modules/yaml/dist/legacy-exports.js +16 -0
  43. package/node_modules/yaml/dist/parse-cst.js +1753 -0
  44. package/node_modules/yaml/dist/resolveSeq-d03cb037.js +2161 -0
  45. package/node_modules/yaml/dist/test-events.js +162 -0
  46. package/node_modules/yaml/dist/types.js +23 -0
  47. package/node_modules/yaml/dist/util.js +19 -0
  48. package/node_modules/yaml/dist/warnings-1000a372.js +416 -0
  49. package/node_modules/yaml/index.d.ts +372 -0
  50. package/node_modules/yaml/index.js +1 -0
  51. package/node_modules/yaml/map.js +2 -0
  52. package/node_modules/yaml/package.json +106 -0
  53. package/node_modules/yaml/pair.js +2 -0
  54. package/node_modules/yaml/parse-cst.d.ts +191 -0
  55. package/node_modules/yaml/parse-cst.js +1 -0
  56. package/node_modules/yaml/scalar.js +2 -0
  57. package/node_modules/yaml/schema.js +9 -0
  58. package/node_modules/yaml/seq.js +2 -0
  59. package/node_modules/yaml/types/binary.js +8 -0
  60. package/node_modules/yaml/types/omap.js +3 -0
  61. package/node_modules/yaml/types/pairs.js +3 -0
  62. package/node_modules/yaml/types/set.js +3 -0
  63. package/node_modules/yaml/types/timestamp.js +10 -0
  64. package/node_modules/yaml/types.d.ts +407 -0
  65. package/node_modules/yaml/types.js +17 -0
  66. package/node_modules/yaml/types.mjs +17 -0
  67. package/node_modules/yaml/util.d.ts +86 -0
  68. package/node_modules/yaml/util.js +16 -0
  69. package/node_modules/yaml/util.mjs +18 -0
  70. package/package.json +122 -0
  71. package/rosetta/_generated.ts-fixture +6 -0
  72. package/rosetta/default.ts-fixture +25 -0
@@ -0,0 +1,8 @@
1
+ 'use strict'
2
+ Object.defineProperty(exports, '__esModule', { value: true })
3
+
4
+ const legacy = require('../dist/legacy-exports')
5
+ exports.binary = legacy.binary
6
+ exports.default = [exports.binary]
7
+
8
+ legacy.warnFileDeprecation(__filename)
@@ -0,0 +1,3 @@
1
+ const legacy = require('../dist/legacy-exports')
2
+ module.exports = legacy.omap
3
+ legacy.warnFileDeprecation(__filename)
@@ -0,0 +1,3 @@
1
+ const legacy = require('../dist/legacy-exports')
2
+ module.exports = legacy.pairs
3
+ legacy.warnFileDeprecation(__filename)
@@ -0,0 +1,3 @@
1
+ const legacy = require('../dist/legacy-exports')
2
+ module.exports = legacy.set
3
+ legacy.warnFileDeprecation(__filename)
@@ -0,0 +1,10 @@
1
+ 'use strict'
2
+ Object.defineProperty(exports, '__esModule', { value: true })
3
+
4
+ const legacy = require('../dist/legacy-exports')
5
+ exports.default = [legacy.intTime, legacy.floatTime, legacy.timestamp]
6
+ exports.floatTime = legacy.floatTime
7
+ exports.intTime = legacy.intTime
8
+ exports.timestamp = legacy.timestamp
9
+
10
+ legacy.warnFileDeprecation(__filename)
@@ -0,0 +1,407 @@
1
+ import { Document, scalarOptions } from './index'
2
+ import { CST } from './parse-cst'
3
+ import { Type } from './util'
4
+
5
+ export const binaryOptions: scalarOptions.Binary
6
+ export const boolOptions: scalarOptions.Bool
7
+ export const intOptions: scalarOptions.Int
8
+ export const nullOptions: scalarOptions.Null
9
+ export const strOptions: scalarOptions.Str
10
+
11
+ export class Schema {
12
+ /** Default: `'tag:yaml.org,2002:'` */
13
+ static defaultPrefix: string
14
+ static defaultTags: {
15
+ /** Default: `'tag:yaml.org,2002:map'` */
16
+ MAP: string
17
+ /** Default: `'tag:yaml.org,2002:seq'` */
18
+ SEQ: string
19
+ /** Default: `'tag:yaml.org,2002:str'` */
20
+ STR: string
21
+ }
22
+ constructor(options: Schema.Options)
23
+ /**
24
+ * Convert any value into a `Node` using this schema, recursively turning
25
+ * objects into collections.
26
+ *
27
+ * @param wrapScalars If `true`, also wraps plain values in `Scalar` objects;
28
+ * if undefined or `false` and `value` is not an object, it will be returned
29
+ * directly.
30
+ * @param tag Use to specify the collection type, e.g. `"!!omap"`. Note that
31
+ * this requires the corresponding tag to be available in this schema.
32
+ */
33
+ createNode(
34
+ value: any,
35
+ wrapScalars?: boolean,
36
+ tag?: string,
37
+ ctx?: Schema.CreateNodeContext
38
+ ): Node
39
+ /**
40
+ * Convert a key and a value into a `Pair` using this schema, recursively
41
+ * wrapping all values as `Scalar` or `Collection` nodes.
42
+ *
43
+ * @param ctx To not wrap scalars, use a context `{ wrapScalars: false }`
44
+ */
45
+ createPair(key: any, value: any, ctx?: Schema.CreateNodeContext): Pair
46
+ merge: boolean
47
+ name: Schema.Name
48
+ sortMapEntries: ((a: Pair, b: Pair) => number) | null
49
+ tags: Schema.Tag[]
50
+ }
51
+
52
+ export namespace Schema {
53
+ type Name = 'core' | 'failsafe' | 'json' | 'yaml-1.1'
54
+
55
+ interface Options {
56
+ /**
57
+ * Array of additional tags to include in the schema, or a function that may
58
+ * modify the schema's base tag array.
59
+ */
60
+ customTags?: (TagId | Tag)[] | ((tags: Tag[]) => Tag[])
61
+ /**
62
+ * Enable support for `<<` merge keys.
63
+ *
64
+ * Default: `false` for YAML 1.2, `true` for earlier versions
65
+ */
66
+ merge?: boolean
67
+ /**
68
+ * The base schema to use.
69
+ *
70
+ * Default: `"core"` for YAML 1.2, `"yaml-1.1"` for earlier versions
71
+ */
72
+ schema?: Name
73
+ /**
74
+ * When stringifying, sort map entries. If `true`, sort by comparing key values with `<`.
75
+ *
76
+ * Default: `false`
77
+ */
78
+ sortMapEntries?: boolean | ((a: Pair, b: Pair) => number)
79
+ /**
80
+ * @deprecated Use `customTags` instead.
81
+ */
82
+ tags?: Options['customTags']
83
+ }
84
+
85
+ interface CreateNodeContext {
86
+ wrapScalars?: boolean
87
+ [key: string]: any
88
+ }
89
+
90
+ interface StringifyContext {
91
+ forceBlockIndent?: boolean
92
+ implicitKey?: boolean
93
+ indent?: string
94
+ indentAtStart?: number
95
+ inFlow?: boolean
96
+ [key: string]: any
97
+ }
98
+
99
+ type TagId =
100
+ | 'binary'
101
+ | 'bool'
102
+ | 'float'
103
+ | 'floatExp'
104
+ | 'floatNaN'
105
+ | 'floatTime'
106
+ | 'int'
107
+ | 'intHex'
108
+ | 'intOct'
109
+ | 'intTime'
110
+ | 'null'
111
+ | 'omap'
112
+ | 'pairs'
113
+ | 'set'
114
+ | 'timestamp'
115
+
116
+ type Tag = CustomTag | DefaultTag
117
+
118
+ interface BaseTag {
119
+ /**
120
+ * An optional factory function, used e.g. by collections when wrapping JS objects as AST nodes.
121
+ */
122
+ createNode?: (
123
+ schema: Schema,
124
+ value: any,
125
+ ctx: Schema.CreateNodeContext
126
+ ) => YAMLMap | YAMLSeq | Scalar
127
+ /**
128
+ * If a tag has multiple forms that should be parsed and/or stringified differently, use `format` to identify them.
129
+ */
130
+ format?: string
131
+ /**
132
+ * Used by `YAML.createNode` to detect your data type, e.g. using `typeof` or
133
+ * `instanceof`.
134
+ */
135
+ identify(value: any): boolean
136
+ /**
137
+ * The `Node` child class that implements this tag. Required for collections and tags that have overlapping JS representations.
138
+ */
139
+ nodeClass?: new () => any
140
+ /**
141
+ * Used by some tags to configure their stringification, where applicable.
142
+ */
143
+ options?: object
144
+ /**
145
+ * Optional function stringifying the AST node in the current context. If your
146
+ * data includes a suitable `.toString()` method, you can probably leave this
147
+ * undefined and use the default stringifier.
148
+ *
149
+ * @param item The node being stringified.
150
+ * @param ctx Contains the stringifying context variables.
151
+ * @param onComment Callback to signal that the stringifier includes the
152
+ * item's comment in its output.
153
+ * @param onChompKeep Callback to signal that the output uses a block scalar
154
+ * type with the `+` chomping indicator.
155
+ */
156
+ stringify?: (
157
+ item: Node,
158
+ ctx: Schema.StringifyContext,
159
+ onComment?: () => void,
160
+ onChompKeep?: () => void
161
+ ) => string
162
+ /**
163
+ * The identifier for your data type, with which its stringified form will be
164
+ * prefixed. Should either be a !-prefixed local `!tag`, or a fully qualified
165
+ * `tag:domain,date:foo`.
166
+ */
167
+ tag: string
168
+ }
169
+
170
+ interface CustomTag extends BaseTag {
171
+ /**
172
+ * A JavaScript class that should be matched to this tag, e.g. `Date` for `!!timestamp`.
173
+ * @deprecated Use `Tag.identify` instead
174
+ */
175
+ class?: new () => any
176
+ /**
177
+ * Turns a CST node into an AST node. If returning a non-`Node` value, the
178
+ * output will be wrapped as a `Scalar`.
179
+ */
180
+ resolve(doc: Document, cstNode: CST.Node): Node | any
181
+ }
182
+
183
+ interface DefaultTag extends BaseTag {
184
+ /**
185
+ * If `true`, together with `test` allows for values to be stringified without
186
+ * an explicit tag. For most cases, it's unlikely that you'll actually want to
187
+ * use this, even if you first think you do.
188
+ */
189
+ default: true
190
+ /**
191
+ * Alternative form used by default tags; called with `test` match results.
192
+ */
193
+ resolve(...match: string[]): Node | any
194
+ /**
195
+ * Together with `default` allows for values to be stringified without an
196
+ * explicit tag and detected using a regular expression. For most cases, it's
197
+ * unlikely that you'll actually want to use these, even if you first think
198
+ * you do.
199
+ */
200
+ test: RegExp
201
+ }
202
+ }
203
+
204
+ export class Node {
205
+ /** A comment on or immediately after this */
206
+ comment?: string | null
207
+ /** A comment before this */
208
+ commentBefore?: string | null
209
+ /** Only available when `keepCstNodes` is set to `true` */
210
+ cstNode?: CST.Node
211
+ /**
212
+ * The [start, end] range of characters of the source parsed
213
+ * into this node (undefined for pairs or if not parsed)
214
+ */
215
+ range?: [number, number] | null
216
+ /** A blank line before this node and its commentBefore */
217
+ spaceBefore?: boolean
218
+ /** A fully qualified tag, if required */
219
+ tag?: string
220
+ /** A plain JS representation of this node */
221
+ toJSON(arg?: any): any
222
+ /** The type of this node */
223
+ type?: Type | Pair.Type
224
+ }
225
+
226
+ export class Scalar extends Node {
227
+ constructor(value: any)
228
+ type?: Scalar.Type
229
+ /**
230
+ * By default (undefined), numbers use decimal notation.
231
+ * The YAML 1.2 core schema only supports 'HEX' and 'OCT'.
232
+ */
233
+ format?: 'BIN' | 'HEX' | 'OCT' | 'TIME'
234
+ value: any
235
+ toJSON(arg?: any, ctx?: AST.NodeToJsonContext): any
236
+ toString(): string
237
+ }
238
+ export namespace Scalar {
239
+ type Type =
240
+ | Type.BLOCK_FOLDED
241
+ | Type.BLOCK_LITERAL
242
+ | Type.PLAIN
243
+ | Type.QUOTE_DOUBLE
244
+ | Type.QUOTE_SINGLE
245
+ }
246
+
247
+ export class Alias extends Node {
248
+ type: Type.ALIAS
249
+ source: Node
250
+ cstNode?: CST.Alias
251
+ toString(ctx: Schema.StringifyContext): string
252
+ }
253
+
254
+ export class Pair extends Node {
255
+ constructor(key: any, value?: any)
256
+ type: Pair.Type.PAIR | Pair.Type.MERGE_PAIR
257
+ /** Always Node or null when parsed, but can be set to anything. */
258
+ key: any
259
+ /** Always Node or null when parsed, but can be set to anything. */
260
+ value: any
261
+ cstNode?: never // no corresponding cstNode
262
+ toJSON(arg?: any, ctx?: AST.NodeToJsonContext): object | Map<any, any>
263
+ toString(
264
+ ctx?: Schema.StringifyContext,
265
+ onComment?: () => void,
266
+ onChompKeep?: () => void
267
+ ): string
268
+ }
269
+ export namespace Pair {
270
+ enum Type {
271
+ PAIR = 'PAIR',
272
+ MERGE_PAIR = 'MERGE_PAIR'
273
+ }
274
+ }
275
+
276
+ export class Merge extends Pair {
277
+ type: Pair.Type.MERGE_PAIR
278
+ /** Always Scalar('<<'), defined by the type specification */
279
+ key: AST.PlainValue
280
+ /** Always YAMLSeq<Alias(Map)>, stringified as *A if length = 1 */
281
+ value: YAMLSeq
282
+ toString(ctx?: Schema.StringifyContext, onComment?: () => void): string
283
+ }
284
+
285
+ export class Collection extends Node {
286
+ type?: Type.MAP | Type.FLOW_MAP | Type.SEQ | Type.FLOW_SEQ | Type.DOCUMENT
287
+ items: any[]
288
+ schema?: Schema
289
+
290
+ /**
291
+ * Adds a value to the collection. For `!!map` and `!!omap` the value must
292
+ * be a Pair instance or a `{ key, value }` object, which may not have a key
293
+ * that already exists in the map.
294
+ */
295
+ add(value: any): void
296
+ addIn(path: Iterable<any>, value: any): void
297
+ /**
298
+ * Removes a value from the collection.
299
+ * @returns `true` if the item was found and removed.
300
+ */
301
+ delete(key: any): boolean
302
+ deleteIn(path: Iterable<any>): boolean
303
+ /**
304
+ * Returns item at `key`, or `undefined` if not found. By default unwraps
305
+ * scalar values from their surrounding node; to disable set `keepScalar` to
306
+ * `true` (collections are always returned intact).
307
+ */
308
+ get(key: any, keepScalar?: boolean): any
309
+ getIn(path: Iterable<any>, keepScalar?: boolean): any
310
+ /**
311
+ * Checks if the collection includes a value with the key `key`.
312
+ */
313
+ has(key: any): boolean
314
+ hasIn(path: Iterable<any>): boolean
315
+ /**
316
+ * Sets a value in this collection. For `!!set`, `value` needs to be a
317
+ * boolean to add/remove the item from the set.
318
+ */
319
+ set(key: any, value: any): void
320
+ setIn(path: Iterable<any>, value: any): void
321
+ }
322
+
323
+ export class YAMLMap extends Collection {
324
+ type?: Type.FLOW_MAP | Type.MAP
325
+ items: Array<Pair>
326
+ hasAllNullValues(): boolean
327
+ toJSON(arg?: any, ctx?: AST.NodeToJsonContext): object | Map<any, any>
328
+ toString(
329
+ ctx?: Schema.StringifyContext,
330
+ onComment?: () => void,
331
+ onChompKeep?: () => void
332
+ ): string
333
+ }
334
+
335
+ export class YAMLSeq extends Collection {
336
+ type?: Type.FLOW_SEQ | Type.SEQ
337
+ delete(key: number | string | Scalar): boolean
338
+ get(key: number | string | Scalar, keepScalar?: boolean): any
339
+ has(key: number | string | Scalar): boolean
340
+ set(key: number | string | Scalar, value: any): void
341
+ hasAllNullValues(): boolean
342
+ toJSON(arg?: any, ctx?: AST.NodeToJsonContext): any[]
343
+ toString(
344
+ ctx?: Schema.StringifyContext,
345
+ onComment?: () => void,
346
+ onChompKeep?: () => void
347
+ ): string
348
+ }
349
+
350
+ export namespace AST {
351
+ interface NodeToJsonContext {
352
+ anchors?: any[]
353
+ doc: Document
354
+ keep?: boolean
355
+ mapAsMap?: boolean
356
+ maxAliasCount?: number
357
+ onCreate?: (node: Node) => void
358
+ [key: string]: any
359
+ }
360
+
361
+ interface BlockFolded extends Scalar {
362
+ type: Type.BLOCK_FOLDED
363
+ cstNode?: CST.BlockFolded
364
+ }
365
+
366
+ interface BlockLiteral extends Scalar {
367
+ type: Type.BLOCK_LITERAL
368
+ cstNode?: CST.BlockLiteral
369
+ }
370
+
371
+ interface PlainValue extends Scalar {
372
+ type: Type.PLAIN
373
+ cstNode?: CST.PlainValue
374
+ }
375
+
376
+ interface QuoteDouble extends Scalar {
377
+ type: Type.QUOTE_DOUBLE
378
+ cstNode?: CST.QuoteDouble
379
+ }
380
+
381
+ interface QuoteSingle extends Scalar {
382
+ type: Type.QUOTE_SINGLE
383
+ cstNode?: CST.QuoteSingle
384
+ }
385
+
386
+ interface FlowMap extends YAMLMap {
387
+ type: Type.FLOW_MAP
388
+ cstNode?: CST.FlowMap
389
+ }
390
+
391
+ interface BlockMap extends YAMLMap {
392
+ type: Type.MAP
393
+ cstNode?: CST.Map
394
+ }
395
+
396
+ interface FlowSeq extends YAMLSeq {
397
+ type: Type.FLOW_SEQ
398
+ items: Array<Node>
399
+ cstNode?: CST.FlowSeq
400
+ }
401
+
402
+ interface BlockSeq extends YAMLSeq {
403
+ type: Type.SEQ
404
+ items: Array<Node | null>
405
+ cstNode?: CST.Seq
406
+ }
407
+ }
@@ -0,0 +1,17 @@
1
+ const types = require('./dist/types')
2
+
3
+ exports.binaryOptions = types.binaryOptions
4
+ exports.boolOptions = types.boolOptions
5
+ exports.intOptions = types.intOptions
6
+ exports.nullOptions = types.nullOptions
7
+ exports.strOptions = types.strOptions
8
+
9
+ exports.Schema = types.Schema
10
+ exports.Alias = types.Alias
11
+ exports.Collection = types.Collection
12
+ exports.Merge = types.Merge
13
+ exports.Node = types.Node
14
+ exports.Pair = types.Pair
15
+ exports.Scalar = types.Scalar
16
+ exports.YAMLMap = types.YAMLMap
17
+ exports.YAMLSeq = types.YAMLSeq
@@ -0,0 +1,17 @@
1
+ import types from './dist/types.js'
2
+
3
+ export const binaryOptions = types.binaryOptions
4
+ export const boolOptions = types.boolOptions
5
+ export const intOptions = types.intOptions
6
+ export const nullOptions = types.nullOptions
7
+ export const strOptions = types.strOptions
8
+
9
+ export const Schema = types.Schema
10
+ export const Alias = types.Alias
11
+ export const Collection = types.Collection
12
+ export const Merge = types.Merge
13
+ export const Node = types.Node
14
+ export const Pair = types.Pair
15
+ export const Scalar = types.Scalar
16
+ export const YAMLMap = types.YAMLMap
17
+ export const YAMLSeq = types.YAMLSeq
@@ -0,0 +1,86 @@
1
+ import { Document } from './index'
2
+ import { CST } from './parse-cst'
3
+ import { AST, Pair, Scalar, Schema } from './types'
4
+
5
+ export function findPair(items: any[], key: Scalar | any): Pair | undefined
6
+
7
+ export function parseMap(doc: Document, cst: CST.Map): AST.BlockMap
8
+ export function parseMap(doc: Document, cst: CST.FlowMap): AST.FlowMap
9
+ export function parseSeq(doc: Document, cst: CST.Seq): AST.BlockSeq
10
+ export function parseSeq(doc: Document, cst: CST.FlowSeq): AST.FlowSeq
11
+
12
+ export function stringifyNumber(item: Scalar): string
13
+ export function stringifyString(
14
+ item: Scalar,
15
+ ctx: Schema.StringifyContext,
16
+ onComment?: () => void,
17
+ onChompKeep?: () => void
18
+ ): string
19
+
20
+ export function toJSON(
21
+ value: any,
22
+ arg?: any,
23
+ ctx?: Schema.CreateNodeContext
24
+ ): any
25
+
26
+ export enum Type {
27
+ ALIAS = 'ALIAS',
28
+ BLANK_LINE = 'BLANK_LINE',
29
+ BLOCK_FOLDED = 'BLOCK_FOLDED',
30
+ BLOCK_LITERAL = 'BLOCK_LITERAL',
31
+ COMMENT = 'COMMENT',
32
+ DIRECTIVE = 'DIRECTIVE',
33
+ DOCUMENT = 'DOCUMENT',
34
+ FLOW_MAP = 'FLOW_MAP',
35
+ FLOW_SEQ = 'FLOW_SEQ',
36
+ MAP = 'MAP',
37
+ MAP_KEY = 'MAP_KEY',
38
+ MAP_VALUE = 'MAP_VALUE',
39
+ PLAIN = 'PLAIN',
40
+ QUOTE_DOUBLE = 'QUOTE_DOUBLE',
41
+ QUOTE_SINGLE = 'QUOTE_SINGLE',
42
+ SEQ = 'SEQ',
43
+ SEQ_ITEM = 'SEQ_ITEM'
44
+ }
45
+
46
+ interface LinePos {
47
+ line: number
48
+ col: number
49
+ }
50
+
51
+ export class YAMLError extends Error {
52
+ name:
53
+ | 'YAMLReferenceError'
54
+ | 'YAMLSemanticError'
55
+ | 'YAMLSyntaxError'
56
+ | 'YAMLWarning'
57
+ message: string
58
+ source?: CST.Node
59
+
60
+ nodeType?: Type
61
+ range?: CST.Range
62
+ linePos?: { start: LinePos; end: LinePos }
63
+
64
+ /**
65
+ * Drops `source` and adds `nodeType`, `range` and `linePos`, as well as
66
+ * adding details to `message`. Run automatically for document errors if
67
+ * the `prettyErrors` option is set.
68
+ */
69
+ makePretty(): void
70
+ }
71
+
72
+ export class YAMLReferenceError extends YAMLError {
73
+ name: 'YAMLReferenceError'
74
+ }
75
+
76
+ export class YAMLSemanticError extends YAMLError {
77
+ name: 'YAMLSemanticError'
78
+ }
79
+
80
+ export class YAMLSyntaxError extends YAMLError {
81
+ name: 'YAMLSyntaxError'
82
+ }
83
+
84
+ export class YAMLWarning extends YAMLError {
85
+ name: 'YAMLWarning'
86
+ }
@@ -0,0 +1,16 @@
1
+ const util = require('./dist/util')
2
+
3
+ exports.findPair = util.findPair
4
+ exports.toJSON = util.toJSON
5
+ exports.parseMap = util.parseMap
6
+ exports.parseSeq = util.parseSeq
7
+
8
+ exports.stringifyNumber = util.stringifyNumber
9
+ exports.stringifyString = util.stringifyString
10
+ exports.Type = util.Type
11
+
12
+ exports.YAMLError = util.YAMLError
13
+ exports.YAMLReferenceError = util.YAMLReferenceError
14
+ exports.YAMLSemanticError = util.YAMLSemanticError
15
+ exports.YAMLSyntaxError = util.YAMLSyntaxError
16
+ exports.YAMLWarning = util.YAMLWarning
@@ -0,0 +1,18 @@
1
+ import util from './dist/util.js'
2
+
3
+ export const findPair = util.findPair
4
+ export const toJSON = util.toJSON
5
+
6
+ export const parseMap = util.parseMap
7
+ export const parseSeq = util.parseSeq
8
+
9
+ export const stringifyNumber = util.stringifyNumber
10
+ export const stringifyString = util.stringifyString
11
+
12
+ export const Type = util.Type
13
+
14
+ export const YAMLError = util.YAMLError
15
+ export const YAMLReferenceError = util.YAMLReferenceError
16
+ export const YAMLSemanticError = util.YAMLSemanticError
17
+ export const YAMLSyntaxError = util.YAMLSyntaxError
18
+ export const YAMLWarning = util.YAMLWarning