Linux v69820.1blu.de 4.15.0 #1 SMP Mon Sep 30 15:36:27 MSK 2024 x86_64
Apache/2.4.58
Server IP : 195.90.215.149 & Your IP : 216.73.217.80
Domains :
Cant Read [ /etc/named.conf ]
User : www-data
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
usr /
share /
nodejs /
yaml /
browser /
dist /
compose /
Delete
Unzip
Name
Size
Permission
Date
Action
compose-collection.js
2.94
KB
-rw-r--r--
2024-02-26 08:46
compose-doc.js
1.47
KB
-rw-r--r--
2024-02-26 08:46
compose-node.js
3.34
KB
-rw-r--r--
2024-02-26 08:46
compose-scalar.js
3.09
KB
-rw-r--r--
2024-02-26 08:46
composer.js
8.2
KB
-rw-r--r--
2024-02-26 08:46
resolve-block-map.js
4.68
KB
-rw-r--r--
2024-02-26 08:46
resolve-block-scalar.js
7.06
KB
-rw-r--r--
2024-02-26 08:46
resolve-block-seq.js
1.63
KB
-rw-r--r--
2024-02-26 08:46
resolve-end.js
1.21
KB
-rw-r--r--
2024-02-26 08:46
resolve-flow-collection.js
8.28
KB
-rw-r--r--
2024-02-26 08:46
resolve-flow-scalar.js
6.88
KB
-rw-r--r--
2024-02-26 08:46
resolve-props.js
4.9
KB
-rw-r--r--
2024-02-26 08:46
util-contains-newline.js
1.03
KB
-rw-r--r--
2024-02-26 08:46
util-empty-scalar-position.js
837
B
-rw-r--r--
2024-02-26 08:46
util-flow-indent-check.js
494
B
-rw-r--r--
2024-02-26 08:46
util-map-includes.js
531
B
-rw-r--r--
2024-02-26 08:46
Save
Rename
import { SCALAR, isScalar } from '../nodes/identity.js'; import { Scalar } from '../nodes/Scalar.js'; import { resolveBlockScalar } from './resolve-block-scalar.js'; import { resolveFlowScalar } from './resolve-flow-scalar.js'; function composeScalar(ctx, token, tagToken, onError) { const { value, type, comment, range } = token.type === 'block-scalar' ? resolveBlockScalar(token, ctx.options.strict, onError) : resolveFlowScalar(token, ctx.options.strict, onError); const tagName = tagToken ? ctx.directives.tagName(tagToken.source, msg => onError(tagToken, 'TAG_RESOLVE_FAILED', msg)) : null; const tag = tagToken && tagName ? findScalarTagByName(ctx.schema, value, tagName, tagToken, onError) : token.type === 'scalar' ? findScalarTagByTest(ctx, value, token, onError) : ctx.schema[SCALAR]; let scalar; try { const res = tag.resolve(value, msg => onError(tagToken ?? token, 'TAG_RESOLVE_FAILED', msg), ctx.options); scalar = isScalar(res) ? res : new Scalar(res); } catch (error) { const msg = error instanceof Error ? error.message : String(error); onError(tagToken ?? token, 'TAG_RESOLVE_FAILED', msg); scalar = new Scalar(value); } scalar.range = range; scalar.source = value; if (type) scalar.type = type; if (tagName) scalar.tag = tagName; if (tag.format) scalar.format = tag.format; if (comment) scalar.comment = comment; return scalar; } function findScalarTagByName(schema, value, tagName, tagToken, onError) { if (tagName === '!') return schema[SCALAR]; // non-specific tag const matchWithTest = []; for (const tag of schema.tags) { if (!tag.collection && tag.tag === tagName) { if (tag.default && tag.test) matchWithTest.push(tag); else return tag; } } for (const tag of matchWithTest) if (tag.test?.test(value)) return tag; const kt = schema.knownTags[tagName]; if (kt && !kt.collection) { // Ensure that the known tag is available for stringifying, // but does not get used by default. schema.tags.push(Object.assign({}, kt, { default: false, test: undefined })); return kt; } onError(tagToken, 'TAG_RESOLVE_FAILED', `Unresolved tag: ${tagName}`, tagName !== 'tag:yaml.org,2002:str'); return schema[SCALAR]; } function findScalarTagByTest({ directives, schema }, value, token, onError) { const tag = schema.tags.find(tag => tag.default && tag.test?.test(value)) || schema[SCALAR]; if (schema.compat) { const compat = schema.compat.find(tag => tag.default && tag.test?.test(value)) ?? schema[SCALAR]; if (tag.tag !== compat.tag) { const ts = directives.tagString(tag.tag); const cs = directives.tagString(compat.tag); const msg = `Value may be parsed as either ${ts} or ${cs}`; onError(token, 'TAG_RESOLVE_FAILED', msg, true); } } return tag; } export { composeScalar };