@specship/specship-win32-arm64 0.13.0 → 0.13.1
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/lib/dist/server/cli.js +1 -1
- package/lib/dist/server/routes/sse.js +1 -1
- package/lib/dist/server/server.js +1 -1
- package/lib/node_modules/.package-lock.json +11 -20
- package/lib/node_modules/ajv/node_modules/fast-uri/index.js +1 -1
- package/lib/node_modules/ajv/node_modules/fast-uri/package.json +1 -1
- package/lib/node_modules/ajv/node_modules/fast-uri/test/security.test.js +28 -0
- package/lib/node_modules/toad-cache/README.md +10 -9
- package/lib/node_modules/toad-cache/dist/toad-cache.cjs +139 -139
- package/lib/node_modules/toad-cache/dist/toad-cache.mjs +136 -140
- package/lib/node_modules/toad-cache/package.json +8 -8
- package/lib/node_modules/toad-cache/toad-cache.d.cts +20 -14
- package/lib/node_modules/toad-cache/toad-cache.d.ts +18 -14
- package/lib/node_modules/yaml/README.md +14 -31
- package/lib/node_modules/yaml/browser/dist/compose/compose-collection.js +3 -3
- package/lib/node_modules/yaml/browser/dist/compose/compose-doc.js +0 -1
- package/lib/node_modules/yaml/browser/dist/compose/compose-node.js +4 -21
- package/lib/node_modules/yaml/browser/dist/compose/compose-scalar.js +8 -14
- package/lib/node_modules/yaml/browser/dist/compose/composer.js +2 -4
- package/lib/node_modules/yaml/browser/dist/compose/resolve-block-map.js +0 -2
- package/lib/node_modules/yaml/browser/dist/compose/resolve-block-seq.js +1 -3
- package/lib/node_modules/yaml/browser/dist/compose/resolve-flow-collection.js +2 -8
- package/lib/node_modules/yaml/browser/dist/compose/resolve-flow-scalar.js +4 -6
- package/lib/node_modules/yaml/browser/dist/compose/resolve-props.js +5 -3
- package/lib/node_modules/yaml/browser/dist/compose/util-empty-scalar-position.js +2 -1
- package/lib/node_modules/yaml/browser/dist/compose/util-map-includes.js +5 -1
- package/lib/node_modules/yaml/browser/dist/doc/Document.js +2 -3
- package/lib/node_modules/yaml/browser/dist/doc/anchors.js +2 -1
- package/lib/node_modules/yaml/browser/dist/doc/applyReviver.js +0 -1
- package/lib/node_modules/yaml/browser/dist/doc/createNode.js +2 -1
- package/lib/node_modules/yaml/browser/dist/errors.js +1 -1
- package/lib/node_modules/yaml/browser/dist/log.js +6 -1
- package/lib/node_modules/yaml/browser/dist/node_modules/tslib/tslib.es6.js +21 -0
- package/lib/node_modules/yaml/browser/dist/nodes/Alias.js +12 -27
- package/lib/node_modules/yaml/browser/dist/nodes/YAMLMap.js +1 -1
- package/lib/node_modules/yaml/browser/dist/nodes/addPairToJSMap.js +49 -8
- package/lib/node_modules/yaml/browser/dist/parse/lexer.js +24 -28
- package/lib/node_modules/yaml/browser/dist/parse/parser.js +8 -31
- package/lib/node_modules/yaml/browser/dist/public-api.js +0 -3
- package/lib/node_modules/yaml/browser/dist/schema/Schema.js +2 -1
- package/lib/node_modules/yaml/browser/dist/schema/json/schema.js +1 -1
- package/lib/node_modules/yaml/browser/dist/schema/tags.js +16 -29
- package/lib/node_modules/yaml/browser/dist/schema/yaml-1.1/binary.js +13 -5
- package/lib/node_modules/yaml/browser/dist/schema/yaml-1.1/pairs.js +1 -1
- package/lib/node_modules/yaml/browser/dist/schema/yaml-1.1/schema.js +0 -2
- package/lib/node_modules/yaml/browser/dist/schema/yaml-1.1/timestamp.js +1 -1
- package/lib/node_modules/yaml/browser/dist/stringify/stringify.js +5 -10
- package/lib/node_modules/yaml/browser/dist/stringify/stringifyCollection.js +3 -13
- package/lib/node_modules/yaml/browser/dist/stringify/stringifyNumber.js +2 -3
- package/lib/node_modules/yaml/browser/dist/stringify/stringifyPair.js +1 -1
- package/lib/node_modules/yaml/browser/dist/stringify/stringifyString.js +16 -24
- package/lib/node_modules/yaml/browser/dist/util.js +1 -1
- package/lib/node_modules/yaml/dist/cli.d.ts +1 -1
- package/lib/node_modules/yaml/dist/cli.mjs +3 -5
- package/lib/node_modules/yaml/dist/compose/compose-collection.d.ts +4 -4
- package/lib/node_modules/yaml/dist/compose/compose-collection.js +3 -3
- package/lib/node_modules/yaml/dist/compose/compose-doc.d.ts +6 -6
- package/lib/node_modules/yaml/dist/compose/compose-doc.js +0 -1
- package/lib/node_modules/yaml/dist/compose/compose-node.d.ts +7 -8
- package/lib/node_modules/yaml/dist/compose/compose-node.js +4 -21
- package/lib/node_modules/yaml/dist/compose/compose-scalar.d.ts +4 -4
- package/lib/node_modules/yaml/dist/compose/compose-scalar.js +7 -13
- package/lib/node_modules/yaml/dist/compose/composer.d.ts +6 -7
- package/lib/node_modules/yaml/dist/compose/composer.js +3 -6
- package/lib/node_modules/yaml/dist/compose/resolve-block-map.d.ts +5 -5
- package/lib/node_modules/yaml/dist/compose/resolve-block-map.js +0 -2
- package/lib/node_modules/yaml/dist/compose/resolve-block-scalar.d.ts +5 -5
- package/lib/node_modules/yaml/dist/compose/resolve-block-seq.d.ts +5 -5
- package/lib/node_modules/yaml/dist/compose/resolve-block-seq.js +1 -3
- package/lib/node_modules/yaml/dist/compose/resolve-end.d.ts +2 -2
- package/lib/node_modules/yaml/dist/compose/resolve-flow-collection.d.ts +7 -7
- package/lib/node_modules/yaml/dist/compose/resolve-flow-collection.js +2 -8
- package/lib/node_modules/yaml/dist/compose/resolve-flow-scalar.d.ts +4 -4
- package/lib/node_modules/yaml/dist/compose/resolve-flow-scalar.js +4 -6
- package/lib/node_modules/yaml/dist/compose/resolve-props.d.ts +2 -2
- package/lib/node_modules/yaml/dist/compose/resolve-props.js +5 -3
- package/lib/node_modules/yaml/dist/compose/util-contains-newline.d.ts +1 -1
- package/lib/node_modules/yaml/dist/compose/util-empty-scalar-position.d.ts +1 -1
- package/lib/node_modules/yaml/dist/compose/util-empty-scalar-position.js +2 -1
- package/lib/node_modules/yaml/dist/compose/util-flow-indent-check.d.ts +2 -2
- package/lib/node_modules/yaml/dist/compose/util-map-includes.d.ts +3 -3
- package/lib/node_modules/yaml/dist/compose/util-map-includes.js +5 -1
- package/lib/node_modules/yaml/dist/doc/Document.d.ts +11 -11
- package/lib/node_modules/yaml/dist/doc/Document.js +2 -3
- package/lib/node_modules/yaml/dist/doc/anchors.d.ts +2 -2
- package/lib/node_modules/yaml/dist/doc/anchors.js +2 -1
- package/lib/node_modules/yaml/dist/doc/applyReviver.js +0 -1
- package/lib/node_modules/yaml/dist/doc/createNode.d.ts +4 -4
- package/lib/node_modules/yaml/dist/doc/createNode.js +2 -1
- package/lib/node_modules/yaml/dist/doc/directives.d.ts +1 -1
- package/lib/node_modules/yaml/dist/errors.d.ts +1 -1
- package/lib/node_modules/yaml/dist/errors.js +1 -1
- package/lib/node_modules/yaml/dist/index.d.ts +18 -21
- package/lib/node_modules/yaml/dist/log.js +4 -4
- package/lib/node_modules/yaml/dist/nodes/Alias.d.ts +9 -10
- package/lib/node_modules/yaml/dist/nodes/Alias.js +11 -26
- package/lib/node_modules/yaml/dist/nodes/Collection.d.ts +4 -4
- package/lib/node_modules/yaml/dist/nodes/Node.d.ts +9 -16
- package/lib/node_modules/yaml/dist/nodes/Pair.d.ts +8 -9
- package/lib/node_modules/yaml/dist/nodes/Scalar.d.ts +4 -9
- package/lib/node_modules/yaml/dist/nodes/YAMLMap.d.ts +10 -10
- package/lib/node_modules/yaml/dist/nodes/YAMLSeq.d.ts +10 -10
- package/lib/node_modules/yaml/dist/nodes/addPairToJSMap.d.ts +3 -3
- package/lib/node_modules/yaml/dist/nodes/addPairToJSMap.js +48 -7
- package/lib/node_modules/yaml/dist/nodes/identity.d.ts +7 -7
- package/lib/node_modules/yaml/dist/nodes/toJS.d.ts +2 -4
- package/lib/node_modules/yaml/dist/options.d.ts +10 -22
- package/lib/node_modules/yaml/dist/parse/cst-scalar.d.ts +4 -4
- package/lib/node_modules/yaml/dist/parse/cst-stringify.d.ts +1 -1
- package/lib/node_modules/yaml/dist/parse/cst-visit.d.ts +2 -2
- package/lib/node_modules/yaml/dist/parse/cst.d.ts +3 -4
- package/lib/node_modules/yaml/dist/parse/lexer.d.ts +1 -1
- package/lib/node_modules/yaml/dist/parse/lexer.js +24 -28
- package/lib/node_modules/yaml/dist/parse/parser.d.ts +4 -4
- package/lib/node_modules/yaml/dist/parse/parser.js +9 -33
- package/lib/node_modules/yaml/dist/public-api.d.ts +5 -6
- package/lib/node_modules/yaml/dist/public-api.js +0 -3
- package/lib/node_modules/yaml/dist/schema/Schema.d.ts +5 -4
- package/lib/node_modules/yaml/dist/schema/Schema.js +2 -1
- package/lib/node_modules/yaml/dist/schema/common/map.d.ts +1 -1
- package/lib/node_modules/yaml/dist/schema/common/null.d.ts +1 -1
- package/lib/node_modules/yaml/dist/schema/common/seq.d.ts +1 -1
- package/lib/node_modules/yaml/dist/schema/common/string.d.ts +1 -1
- package/lib/node_modules/yaml/dist/schema/core/bool.d.ts +1 -1
- package/lib/node_modules/yaml/dist/schema/core/float.d.ts +1 -1
- package/lib/node_modules/yaml/dist/schema/core/int.d.ts +1 -1
- package/lib/node_modules/yaml/dist/schema/core/schema.d.ts +1 -1
- package/lib/node_modules/yaml/dist/schema/json/schema.d.ts +1 -1
- package/lib/node_modules/yaml/dist/schema/json/schema.js +1 -1
- package/lib/node_modules/yaml/dist/schema/tags.d.ts +3 -11
- package/lib/node_modules/yaml/dist/schema/tags.js +13 -26
- package/lib/node_modules/yaml/dist/schema/types.d.ts +12 -14
- package/lib/node_modules/yaml/dist/schema/yaml-1.1/binary.d.ts +1 -1
- package/lib/node_modules/yaml/dist/schema/yaml-1.1/binary.js +7 -9
- package/lib/node_modules/yaml/dist/schema/yaml-1.1/bool.d.ts +1 -1
- package/lib/node_modules/yaml/dist/schema/yaml-1.1/float.d.ts +1 -1
- package/lib/node_modules/yaml/dist/schema/yaml-1.1/int.d.ts +1 -1
- package/lib/node_modules/yaml/dist/schema/yaml-1.1/omap.d.ts +17 -11
- package/lib/node_modules/yaml/dist/schema/yaml-1.1/pairs.d.ts +7 -7
- package/lib/node_modules/yaml/dist/schema/yaml-1.1/schema.d.ts +1 -1
- package/lib/node_modules/yaml/dist/schema/yaml-1.1/schema.js +0 -2
- package/lib/node_modules/yaml/dist/schema/yaml-1.1/set.d.ts +9 -9
- package/lib/node_modules/yaml/dist/schema/yaml-1.1/timestamp.d.ts +1 -1
- package/lib/node_modules/yaml/dist/schema/yaml-1.1/timestamp.js +1 -1
- package/lib/node_modules/yaml/dist/stringify/stringify.d.ts +3 -3
- package/lib/node_modules/yaml/dist/stringify/stringify.js +5 -10
- package/lib/node_modules/yaml/dist/stringify/stringifyCollection.d.ts +2 -2
- package/lib/node_modules/yaml/dist/stringify/stringifyCollection.js +3 -13
- package/lib/node_modules/yaml/dist/stringify/stringifyDocument.d.ts +3 -3
- package/lib/node_modules/yaml/dist/stringify/stringifyNumber.d.ts +1 -1
- package/lib/node_modules/yaml/dist/stringify/stringifyNumber.js +2 -3
- package/lib/node_modules/yaml/dist/stringify/stringifyPair.d.ts +2 -2
- package/lib/node_modules/yaml/dist/stringify/stringifyPair.js +1 -1
- package/lib/node_modules/yaml/dist/stringify/stringifyString.d.ts +2 -2
- package/lib/node_modules/yaml/dist/stringify/stringifyString.js +15 -23
- package/lib/node_modules/yaml/dist/util.d.ts +12 -16
- package/lib/node_modules/yaml/dist/util.js +2 -2
- package/lib/node_modules/yaml/dist/visit.d.ts +7 -7
- package/lib/node_modules/yaml/package.json +14 -13
- package/lib/package.json +5 -6
- package/package.json +1 -1
- package/lib/node_modules/jsonc-parser/CHANGELOG.md +0 -76
- package/lib/node_modules/jsonc-parser/LICENSE.md +0 -21
- package/lib/node_modules/jsonc-parser/README.md +0 -364
- package/lib/node_modules/jsonc-parser/SECURITY.md +0 -41
- package/lib/node_modules/jsonc-parser/lib/esm/impl/edit.js +0 -185
- package/lib/node_modules/jsonc-parser/lib/esm/impl/format.js +0 -261
- package/lib/node_modules/jsonc-parser/lib/esm/impl/parser.js +0 -659
- package/lib/node_modules/jsonc-parser/lib/esm/impl/scanner.js +0 -443
- package/lib/node_modules/jsonc-parser/lib/esm/impl/string-intern.js +0 -29
- package/lib/node_modules/jsonc-parser/lib/esm/main.d.ts +0 -351
- package/lib/node_modules/jsonc-parser/lib/esm/main.js +0 -178
- package/lib/node_modules/jsonc-parser/lib/umd/impl/edit.js +0 -201
- package/lib/node_modules/jsonc-parser/lib/umd/impl/format.js +0 -275
- package/lib/node_modules/jsonc-parser/lib/umd/impl/parser.js +0 -682
- package/lib/node_modules/jsonc-parser/lib/umd/impl/scanner.js +0 -456
- package/lib/node_modules/jsonc-parser/lib/umd/impl/string-intern.js +0 -42
- package/lib/node_modules/jsonc-parser/lib/umd/main.d.ts +0 -351
- package/lib/node_modules/jsonc-parser/lib/umd/main.js +0 -194
- package/lib/node_modules/jsonc-parser/package.json +0 -37
- package/lib/node_modules/yaml/browser/dist/schema/yaml-1.1/merge.js +0 -67
- package/lib/node_modules/yaml/dist/schema/yaml-1.1/merge.d.ts +0 -9
- package/lib/node_modules/yaml/dist/schema/yaml-1.1/merge.js +0 -71
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { Pair } from '../../nodes/Pair';
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import { YAMLMap } from '../../nodes/YAMLMap';
|
|
5
|
-
import type { Schema } from '../../schema/Schema';
|
|
6
|
-
import type { StringifyContext } from '../../stringify/stringify';
|
|
7
|
-
import
|
|
8
|
-
import type { CollectionTag } from '../types';
|
|
1
|
+
import { Pair } from '../../nodes/Pair.js';
|
|
2
|
+
import { Scalar } from '../../nodes/Scalar.js';
|
|
3
|
+
import { ToJSContext } from '../../nodes/toJS.js';
|
|
4
|
+
import { YAMLMap } from '../../nodes/YAMLMap.js';
|
|
5
|
+
import type { Schema } from '../../schema/Schema.js';
|
|
6
|
+
import type { StringifyContext } from '../../stringify/stringify.js';
|
|
7
|
+
import { CreateNodeContext } from '../../util.js';
|
|
8
|
+
import type { CollectionTag } from '../types.js';
|
|
9
9
|
export declare class YAMLSet<T = unknown> extends YAMLMap<T, Scalar<null> | null> {
|
|
10
10
|
static tag: string;
|
|
11
11
|
constructor(schema?: Schema);
|
|
@@ -23,6 +23,6 @@ export declare class YAMLSet<T = unknown> extends YAMLMap<T, Scalar<null> | null
|
|
|
23
23
|
set(key: T, value: null): void;
|
|
24
24
|
toJSON(_?: unknown, ctx?: ToJSContext): any;
|
|
25
25
|
toString(ctx?: StringifyContext, onComment?: () => void, onChompKeep?: () => void): string;
|
|
26
|
-
static from(schema: Schema, iterable: unknown, ctx: CreateNodeContext): YAMLSet
|
|
26
|
+
static from(schema: Schema, iterable: unknown, ctx: CreateNodeContext): YAMLSet<unknown>;
|
|
27
27
|
}
|
|
28
28
|
export declare const set: CollectionTag;
|
|
@@ -97,7 +97,7 @@ const timestamp = {
|
|
|
97
97
|
}
|
|
98
98
|
return new Date(date);
|
|
99
99
|
},
|
|
100
|
-
stringify: ({ value }) => value
|
|
100
|
+
stringify: ({ value }) => value.toISOString().replace(/((T00:00)?:00)?\.000Z$/, '')
|
|
101
101
|
};
|
|
102
102
|
|
|
103
103
|
exports.floatTime = floatTime;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { Document } from '../doc/Document';
|
|
2
|
-
import type { Alias } from '../nodes/Alias';
|
|
3
|
-
import type { ToStringOptions } from '../options';
|
|
1
|
+
import type { Document } from '../doc/Document.js';
|
|
2
|
+
import type { Alias } from '../nodes/Alias.js';
|
|
3
|
+
import type { ToStringOptions } from '../options.js';
|
|
4
4
|
export type StringifyContext = {
|
|
5
5
|
actualString?: boolean;
|
|
6
6
|
allNullValues?: boolean;
|
|
@@ -22,7 +22,6 @@ function createStringifyContext(doc, options) {
|
|
|
22
22
|
nullStr: 'null',
|
|
23
23
|
simpleKeys: false,
|
|
24
24
|
singleQuote: null,
|
|
25
|
-
trailingComma: false,
|
|
26
25
|
trueStr: 'true',
|
|
27
26
|
verifyAliasOrder: true
|
|
28
27
|
}, doc.schema.toStringOptions, options);
|
|
@@ -57,12 +56,7 @@ function getTagObject(tags, item) {
|
|
|
57
56
|
let obj;
|
|
58
57
|
if (identity.isScalar(item)) {
|
|
59
58
|
obj = item.value;
|
|
60
|
-
|
|
61
|
-
if (match.length > 1) {
|
|
62
|
-
const testMatch = match.filter(t => t.test);
|
|
63
|
-
if (testMatch.length > 0)
|
|
64
|
-
match = testMatch;
|
|
65
|
-
}
|
|
59
|
+
const match = tags.filter(t => t.identify?.(obj));
|
|
66
60
|
tagObj =
|
|
67
61
|
match.find(t => t.format === item.format) ?? match.find(t => !t.format);
|
|
68
62
|
}
|
|
@@ -71,7 +65,7 @@ function getTagObject(tags, item) {
|
|
|
71
65
|
tagObj = tags.find(t => t.nodeClass && obj instanceof t.nodeClass);
|
|
72
66
|
}
|
|
73
67
|
if (!tagObj) {
|
|
74
|
-
const name = obj?.constructor?.name ??
|
|
68
|
+
const name = obj?.constructor?.name ?? typeof obj;
|
|
75
69
|
throw new Error(`Tag not resolved for ${name} value`);
|
|
76
70
|
}
|
|
77
71
|
return tagObj;
|
|
@@ -86,7 +80,7 @@ function stringifyProps(node, tagObj, { anchors: anchors$1, doc }) {
|
|
|
86
80
|
anchors$1.add(anchor);
|
|
87
81
|
props.push(`&${anchor}`);
|
|
88
82
|
}
|
|
89
|
-
const tag = node.tag
|
|
83
|
+
const tag = node.tag ? node.tag : tagObj.default ? null : tagObj.tag;
|
|
90
84
|
if (tag)
|
|
91
85
|
props.push(doc.directives.tagString(tag));
|
|
92
86
|
return props.join(' ');
|
|
@@ -112,7 +106,8 @@ function stringify(item, ctx, onComment, onChompKeep) {
|
|
|
112
106
|
const node = identity.isNode(item)
|
|
113
107
|
? item
|
|
114
108
|
: ctx.doc.createNode(item, { onTagObj: o => (tagObj = o) });
|
|
115
|
-
|
|
109
|
+
if (!tagObj)
|
|
110
|
+
tagObj = getTagObject(ctx.doc.schema.tags, node);
|
|
116
111
|
const props = stringifyProps(node, tagObj, ctx);
|
|
117
112
|
if (props.length > 0)
|
|
118
113
|
ctx.indentAtStart = (ctx.indentAtStart ?? 0) + props.length + 1;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import { Collection } from '../nodes/Collection.js';
|
|
2
|
+
import { StringifyContext } from './stringify.js';
|
|
3
3
|
interface StringifyCollectionOptions {
|
|
4
4
|
blockItemPrefix: string;
|
|
5
5
|
flowChars: {
|
|
@@ -104,22 +104,12 @@ function stringifyFlowCollection({ items }, ctx, { flowChars, itemIndent }) {
|
|
|
104
104
|
if (comment)
|
|
105
105
|
reqNewline = true;
|
|
106
106
|
let str = stringify.stringify(item, itemCtx, () => (comment = null));
|
|
107
|
-
|
|
108
|
-
if (i < items.length - 1) {
|
|
107
|
+
if (i < items.length - 1)
|
|
109
108
|
str += ',';
|
|
110
|
-
}
|
|
111
|
-
else if (ctx.options.trailingComma) {
|
|
112
|
-
if (ctx.options.lineWidth > 0) {
|
|
113
|
-
reqNewline || (reqNewline = lines.reduce((sum, line) => sum + line.length + 2, 2) +
|
|
114
|
-
(str.length + 2) >
|
|
115
|
-
ctx.options.lineWidth);
|
|
116
|
-
}
|
|
117
|
-
if (reqNewline) {
|
|
118
|
-
str += ',';
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
109
|
if (comment)
|
|
122
110
|
str += stringifyComment.lineComment(str, itemIndent, commentString(comment));
|
|
111
|
+
if (!reqNewline && (lines.length > linesAtValue || str.includes('\n')))
|
|
112
|
+
reqNewline = true;
|
|
123
113
|
lines.push(str);
|
|
124
114
|
linesAtValue = lines.length;
|
|
125
115
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Document } from '../doc/Document';
|
|
2
|
-
import type { Node } from '../nodes/Node';
|
|
3
|
-
import type { ToStringOptions } from '../options';
|
|
1
|
+
import type { Document } from '../doc/Document.js';
|
|
2
|
+
import type { Node } from '../nodes/Node.js';
|
|
3
|
+
import type { ToStringOptions } from '../options.js';
|
|
4
4
|
export declare function stringifyDocument(doc: Readonly<Document<Node, boolean>>, options: ToStringOptions): string;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { Scalar } from '../nodes/Scalar';
|
|
1
|
+
import type { Scalar } from '../nodes/Scalar.js';
|
|
2
2
|
export declare function stringifyNumber({ format, minFractionDigits, tag, value }: Scalar): string;
|
|
@@ -6,12 +6,11 @@ function stringifyNumber({ format, minFractionDigits, tag, value }) {
|
|
|
6
6
|
const num = typeof value === 'number' ? value : Number(value);
|
|
7
7
|
if (!isFinite(num))
|
|
8
8
|
return isNaN(num) ? '.nan' : num < 0 ? '-.inf' : '.inf';
|
|
9
|
-
let n =
|
|
9
|
+
let n = JSON.stringify(value);
|
|
10
10
|
if (!format &&
|
|
11
11
|
minFractionDigits &&
|
|
12
12
|
(!tag || tag === 'tag:yaml.org,2002:float') &&
|
|
13
|
-
|
|
14
|
-
!n.includes('e')) {
|
|
13
|
+
/^\d/.test(n)) {
|
|
15
14
|
let i = n.indexOf('.');
|
|
16
15
|
if (i < 0) {
|
|
17
16
|
i = n.length;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type { Pair } from '../nodes/Pair';
|
|
2
|
-
import
|
|
1
|
+
import type { Pair } from '../nodes/Pair.js';
|
|
2
|
+
import { StringifyContext } from './stringify.js';
|
|
3
3
|
export declare function stringifyPair({ key, value }: Readonly<Pair>, ctx: StringifyContext, onComment?: () => void, onChompKeep?: () => void): string;
|
|
@@ -103,7 +103,7 @@ function stringifyPair({ key, value }, ctx, onComment, onChompKeep) {
|
|
|
103
103
|
ws += `\n${stringifyComment.indentComment(cs, ctx.indent)}`;
|
|
104
104
|
}
|
|
105
105
|
if (valueStr === '' && !ctx.inFlow) {
|
|
106
|
-
if (ws === '\n'
|
|
106
|
+
if (ws === '\n')
|
|
107
107
|
ws = '\n\n';
|
|
108
108
|
}
|
|
109
109
|
else {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Scalar } from '../nodes/Scalar';
|
|
2
|
-
import type { StringifyContext } from './stringify';
|
|
1
|
+
import { Scalar } from '../nodes/Scalar.js';
|
|
2
|
+
import type { StringifyContext } from './stringify.js';
|
|
3
3
|
interface StringifyScalar {
|
|
4
4
|
value: string;
|
|
5
5
|
comment?: string | null;
|
|
@@ -161,7 +161,7 @@ function blockString({ comment, type, value }, ctx, onComment, onChompKeep) {
|
|
|
161
161
|
const { blockQuote, commentString, lineWidth } = ctx.options;
|
|
162
162
|
// 1. Block can't end in whitespace unless the last line is non-empty.
|
|
163
163
|
// 2. Strings consisting of only whitespace are best rendered explicitly.
|
|
164
|
-
if (!blockQuote || /\n[\t ]+$/.test(value)) {
|
|
164
|
+
if (!blockQuote || /\n[\t ]+$/.test(value) || /^\s*$/.test(value)) {
|
|
165
165
|
return quotedString(value, ctx);
|
|
166
166
|
}
|
|
167
167
|
const indent = ctx.indent ||
|
|
@@ -221,32 +221,23 @@ function blockString({ comment, type, value }, ctx, onComment, onChompKeep) {
|
|
|
221
221
|
start = start.replace(/\n+/g, `$&${indent}`);
|
|
222
222
|
}
|
|
223
223
|
const indentSize = indent ? '2' : '1'; // root is at -1
|
|
224
|
-
|
|
225
|
-
let header = (startWithSpace ? indentSize : '') + chomp;
|
|
224
|
+
let header = (literal ? '|' : '>') + (startWithSpace ? indentSize : '') + chomp;
|
|
226
225
|
if (comment) {
|
|
227
226
|
header += ' ' + commentString(comment.replace(/ ?[\r\n]+/g, ' '));
|
|
228
227
|
if (onComment)
|
|
229
228
|
onComment();
|
|
230
229
|
}
|
|
231
|
-
if (
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
.replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g, '$1$2') // more-indented lines aren't folded
|
|
235
|
-
// ^ more-ind. ^ empty ^ capture next empty lines only at end of indent
|
|
236
|
-
.replace(/\n+/g, `$&${indent}`);
|
|
237
|
-
let literalFallback = false;
|
|
238
|
-
const foldOptions = getFoldOptions(ctx, true);
|
|
239
|
-
if (blockQuote !== 'folded' && type !== Scalar.Scalar.BLOCK_FOLDED) {
|
|
240
|
-
foldOptions.onOverflow = () => {
|
|
241
|
-
literalFallback = true;
|
|
242
|
-
};
|
|
243
|
-
}
|
|
244
|
-
const body = foldFlowLines.foldFlowLines(`${start}${foldedValue}${end}`, indent, foldFlowLines.FOLD_BLOCK, foldOptions);
|
|
245
|
-
if (!literalFallback)
|
|
246
|
-
return `>${header}\n${indent}${body}`;
|
|
230
|
+
if (literal) {
|
|
231
|
+
value = value.replace(/\n+/g, `$&${indent}`);
|
|
232
|
+
return `${header}\n${indent}${start}${value}${end}`;
|
|
247
233
|
}
|
|
248
|
-
value = value
|
|
249
|
-
|
|
234
|
+
value = value
|
|
235
|
+
.replace(/\n+/g, '\n$&')
|
|
236
|
+
.replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g, '$1$2') // more-indented lines aren't folded
|
|
237
|
+
// ^ more-ind. ^ empty ^ capture next empty lines only at end of indent
|
|
238
|
+
.replace(/\n+/g, `$&${indent}`);
|
|
239
|
+
const body = foldFlowLines.foldFlowLines(`${start}${value}${end}`, indent, foldFlowLines.FOLD_BLOCK, getFoldOptions(ctx, true));
|
|
240
|
+
return `${header}\n${indent}${body}`;
|
|
250
241
|
}
|
|
251
242
|
function plainString(item, ctx, onComment, onChompKeep) {
|
|
252
243
|
const { type, value } = item;
|
|
@@ -255,9 +246,10 @@ function plainString(item, ctx, onComment, onChompKeep) {
|
|
|
255
246
|
(inFlow && /[[\]{},]/.test(value))) {
|
|
256
247
|
return quotedString(value, ctx);
|
|
257
248
|
}
|
|
258
|
-
if (
|
|
249
|
+
if (!value ||
|
|
250
|
+
/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(value)) {
|
|
259
251
|
// not allowed:
|
|
260
|
-
// - '-' or '?'
|
|
252
|
+
// - empty string, '-' or '?'
|
|
261
253
|
// - start with an indicator character (except [?:-]) or /[?-] /
|
|
262
254
|
// - '\n ', ': ' or ' \n' anywhere
|
|
263
255
|
// - '#' not preceded by a non-space char
|
|
@@ -1,16 +1,12 @@
|
|
|
1
|
-
export { createNode } from './doc/createNode';
|
|
2
|
-
export
|
|
3
|
-
export {
|
|
4
|
-
export
|
|
5
|
-
export {
|
|
6
|
-
export {
|
|
7
|
-
export
|
|
8
|
-
export {
|
|
9
|
-
export {
|
|
10
|
-
export {
|
|
11
|
-
export {
|
|
12
|
-
export {
|
|
13
|
-
export type { FoldOptions } from './stringify/foldFlowLines';
|
|
14
|
-
export type { StringifyContext } from './stringify/stringify';
|
|
15
|
-
export { stringifyNumber } from './stringify/stringifyNumber';
|
|
16
|
-
export { stringifyString } from './stringify/stringifyString';
|
|
1
|
+
export { createNode, CreateNodeContext } from './doc/createNode.js';
|
|
2
|
+
export { debug, LogLevelId, warn } from './log.js';
|
|
3
|
+
export { createPair } from './nodes/Pair.js';
|
|
4
|
+
export { findPair } from './nodes/YAMLMap.js';
|
|
5
|
+
export { toJS, ToJSContext } from './nodes/toJS.js';
|
|
6
|
+
export { map as mapTag } from './schema/common/map.js';
|
|
7
|
+
export { seq as seqTag } from './schema/common/seq.js';
|
|
8
|
+
export { string as stringTag } from './schema/common/string.js';
|
|
9
|
+
export { foldFlowLines, FoldOptions } from './stringify/foldFlowLines';
|
|
10
|
+
export { StringifyContext } from './stringify/stringify.js';
|
|
11
|
+
export { stringifyNumber } from './stringify/stringifyNumber.js';
|
|
12
|
+
export { stringifyString } from './stringify/stringifyString.js';
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
var createNode = require('./doc/createNode.js');
|
|
4
4
|
var log = require('./log.js');
|
|
5
5
|
var Pair = require('./nodes/Pair.js');
|
|
6
|
-
var toJS = require('./nodes/toJS.js');
|
|
7
6
|
var YAMLMap = require('./nodes/YAMLMap.js');
|
|
7
|
+
var toJS = require('./nodes/toJS.js');
|
|
8
8
|
var map = require('./schema/common/map.js');
|
|
9
9
|
var seq = require('./schema/common/seq.js');
|
|
10
10
|
var string = require('./schema/common/string.js');
|
|
@@ -18,8 +18,8 @@ exports.createNode = createNode.createNode;
|
|
|
18
18
|
exports.debug = log.debug;
|
|
19
19
|
exports.warn = log.warn;
|
|
20
20
|
exports.createPair = Pair.createPair;
|
|
21
|
-
exports.toJS = toJS.toJS;
|
|
22
21
|
exports.findPair = YAMLMap.findPair;
|
|
22
|
+
exports.toJS = toJS.toJS;
|
|
23
23
|
exports.mapTag = map.map;
|
|
24
24
|
exports.seqTag = seq.seq;
|
|
25
25
|
exports.stringTag = string.string;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import type { Document } from './doc/Document';
|
|
2
|
-
import type { Alias } from './nodes/Alias';
|
|
3
|
-
import
|
|
4
|
-
import type { Pair } from './nodes/Pair';
|
|
5
|
-
import type { Scalar } from './nodes/Scalar';
|
|
6
|
-
import type { YAMLMap } from './nodes/YAMLMap';
|
|
7
|
-
import type { YAMLSeq } from './nodes/YAMLSeq';
|
|
1
|
+
import type { Document } from './doc/Document.js';
|
|
2
|
+
import type { Alias } from './nodes/Alias.js';
|
|
3
|
+
import { Node } from './nodes/Node.js';
|
|
4
|
+
import type { Pair } from './nodes/Pair.js';
|
|
5
|
+
import type { Scalar } from './nodes/Scalar.js';
|
|
6
|
+
import type { YAMLMap } from './nodes/YAMLMap.js';
|
|
7
|
+
import type { YAMLSeq } from './nodes/YAMLSeq.js';
|
|
8
8
|
export type visitorFn<T> = (key: number | 'key' | 'value' | null, node: T, path: readonly (Document | Node | Pair)[]) => void | symbol | number | Node | Pair;
|
|
9
9
|
export type visitor = visitorFn<unknown> | {
|
|
10
10
|
Alias?: visitorFn<Alias>;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "yaml",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.5.0",
|
|
4
4
|
"license": "ISC",
|
|
5
5
|
"author": "Eemeli Aro <eemeli@gmail.com>",
|
|
6
|
-
"funding": "https://github.com/sponsors/eemeli",
|
|
7
6
|
"repository": "github:eemeli/yaml",
|
|
8
7
|
"description": "JavaScript parser and stringifier for YAML",
|
|
9
8
|
"keywords": [
|
|
@@ -43,7 +42,7 @@
|
|
|
43
42
|
"build:browser": "rollup -c config/rollup.browser-config.mjs",
|
|
44
43
|
"build:node": "rollup -c config/rollup.node-config.mjs",
|
|
45
44
|
"clean": "git clean -fdxe node_modules",
|
|
46
|
-
"lint": "eslint
|
|
45
|
+
"lint": "eslint src/",
|
|
47
46
|
"prettier": "prettier --write .",
|
|
48
47
|
"prestart": "rollup --sourcemap -c config/rollup.node-config.mjs",
|
|
49
48
|
"start": "node --enable-source-maps -i -e 'YAML=require(\"./dist/index.js\");const{parse,parseDocument,parseAllDocuments}=YAML'",
|
|
@@ -70,28 +69,30 @@
|
|
|
70
69
|
},
|
|
71
70
|
"devDependencies": {
|
|
72
71
|
"@babel/core": "^7.12.10",
|
|
72
|
+
"@babel/plugin-transform-class-properties": "^7.23.3",
|
|
73
|
+
"@babel/plugin-transform-nullish-coalescing-operator": "^7.23.4",
|
|
73
74
|
"@babel/plugin-transform-typescript": "^7.12.17",
|
|
74
75
|
"@babel/preset-env": "^7.12.11",
|
|
75
|
-
"@eslint/js": "^9.9.1",
|
|
76
76
|
"@rollup/plugin-babel": "^6.0.3",
|
|
77
|
-
"@rollup/plugin-replace": "^
|
|
78
|
-
"@rollup/plugin-typescript": "^
|
|
77
|
+
"@rollup/plugin-replace": "^5.0.2",
|
|
78
|
+
"@rollup/plugin-typescript": "^11.0.0",
|
|
79
79
|
"@types/jest": "^29.2.4",
|
|
80
80
|
"@types/node": "^20.11.20",
|
|
81
|
+
"@typescript-eslint/eslint-plugin": "^7.0.2",
|
|
82
|
+
"@typescript-eslint/parser": "^7.0.2",
|
|
81
83
|
"babel-jest": "^29.0.1",
|
|
82
|
-
"
|
|
83
|
-
"eslint
|
|
84
|
+
"cross-env": "^7.0.3",
|
|
85
|
+
"eslint": "^8.2.0",
|
|
86
|
+
"eslint-config-prettier": "^9.0.0",
|
|
84
87
|
"fast-check": "^2.12.0",
|
|
85
88
|
"jest": "^29.0.1",
|
|
86
|
-
"jest-resolve": "^29.7.0",
|
|
87
89
|
"jest-ts-webcompat-resolver": "^1.0.0",
|
|
88
90
|
"prettier": "^3.0.2",
|
|
89
91
|
"rollup": "^4.12.0",
|
|
90
|
-
"tslib": "^2.
|
|
91
|
-
"typescript": "^5.
|
|
92
|
-
"typescript-eslint": "^8.4.0"
|
|
92
|
+
"tslib": "^2.1.0",
|
|
93
|
+
"typescript": "^5.0.3"
|
|
93
94
|
},
|
|
94
95
|
"engines": {
|
|
95
|
-
"node": ">= 14
|
|
96
|
+
"node": ">= 14"
|
|
96
97
|
}
|
|
97
98
|
}
|
package/lib/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@specship/specship",
|
|
3
|
-
"version": "0.13.
|
|
3
|
+
"version": "0.13.1",
|
|
4
4
|
"description": "Supercharge Claude Code with semantic code intelligence. 94% fewer tool calls • 77% faster exploration • 100% local.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -50,17 +50,13 @@
|
|
|
50
50
|
"@fastify/cors": "^9.0.1",
|
|
51
51
|
"commander": "^14.0.2",
|
|
52
52
|
"cross-spawn": "^7.0.6",
|
|
53
|
-
"fast-string-width": "^3.0.2",
|
|
54
|
-
"fast-wrap-ansi": "^0.2.0",
|
|
55
53
|
"fastify": "^4.28.1",
|
|
56
54
|
"fflate": "^0.8.3",
|
|
57
55
|
"ignore": "^7.0.5",
|
|
58
|
-
"jsonc-parser": "^3.3.1",
|
|
59
56
|
"picomatch": "^4.0.3",
|
|
60
|
-
"sisteransi": "^1.0.5",
|
|
61
57
|
"tree-sitter-wasms": "^0.1.11",
|
|
62
58
|
"web-tree-sitter": "^0.25.3",
|
|
63
|
-
"yaml": "
|
|
59
|
+
"yaml": "2.5.0"
|
|
64
60
|
},
|
|
65
61
|
"devDependencies": {
|
|
66
62
|
"@types/better-sqlite3": "^7.6.0",
|
|
@@ -73,6 +69,9 @@
|
|
|
73
69
|
"optionalDependencies": {
|
|
74
70
|
"better-sqlite3": "^11.10.0"
|
|
75
71
|
},
|
|
72
|
+
"overrides": {
|
|
73
|
+
"rollup": "4.60.1"
|
|
74
|
+
},
|
|
76
75
|
"engines": {
|
|
77
76
|
"node": ">=20.0.0 <25.0.0"
|
|
78
77
|
}
|
package/package.json
CHANGED
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
3.3.0 2022-06-24
|
|
2
|
-
=================
|
|
3
|
-
- `JSONVisitor.onObjectBegin` and `JSONVisitor.onArrayBegin` can now return `false` to instruct the visitor that no children should be visited.
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
3.2.0 2022-08-30
|
|
7
|
-
=================
|
|
8
|
-
- update the version of the bundled Javascript files to `es2020`.
|
|
9
|
-
- include all `const enum` values in the bundled JavaScript files (`ScanError`, `SyntaxKind`, `ParseErrorCode`).
|
|
10
|
-
|
|
11
|
-
3.1.0 2022-07-07
|
|
12
|
-
==================
|
|
13
|
-
* added new API `FormattingOptions.keepLines` : It leaves the initial line positions in the formatting.
|
|
14
|
-
|
|
15
|
-
3.0.0 2020-11-13
|
|
16
|
-
==================
|
|
17
|
-
* fixed API spec for `parseTree`. Can return `undefine` for empty input.
|
|
18
|
-
* added new API `FormattingOptions.insertFinalNewline`.
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
2.3.0 2020-07-03
|
|
22
|
-
==================
|
|
23
|
-
* new API `ModificationOptions.isArrayInsertion`: If `JSONPath` refers to an index of an array and `isArrayInsertion` is `true`, then `modify` will insert a new item at that location instead of overwriting its contents.
|
|
24
|
-
* `ModificationOptions.formattingOptions` is now optional. If not set, newly inserted content will not be formatted.
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
2.2.0 2019-10-25
|
|
28
|
-
==================
|
|
29
|
-
* added `ParseOptions.allowEmptyContent`. Default is `false`.
|
|
30
|
-
* new API `getNodeType`: Returns the type of a value returned by parse.
|
|
31
|
-
* `parse`: Fix issue with empty property name
|
|
32
|
-
|
|
33
|
-
2.1.0 2019-03-29
|
|
34
|
-
==================
|
|
35
|
-
* `JSONScanner` and `JSONVisitor` return lineNumber / character.
|
|
36
|
-
|
|
37
|
-
2.0.0 2018-04-12
|
|
38
|
-
==================
|
|
39
|
-
* renamed `Node.columnOffset` to `Node.colonOffset`
|
|
40
|
-
* new API `getNodePath`: Gets the JSON path of the given JSON DOM node
|
|
41
|
-
* new API `findNodeAtOffset`: Finds the most inner node at the given offset. If `includeRightBound` is set, also finds nodes that end at the given offset.
|
|
42
|
-
|
|
43
|
-
1.0.3 2018-03-07
|
|
44
|
-
==================
|
|
45
|
-
* provide ems modules
|
|
46
|
-
|
|
47
|
-
1.0.2 2018-03-05
|
|
48
|
-
==================
|
|
49
|
-
* added the `visit.onComment` API, reported when comments are allowed.
|
|
50
|
-
* added the `ParseErrorCode.InvalidCommentToken` enum value, reported when comments are disallowed.
|
|
51
|
-
|
|
52
|
-
1.0.1
|
|
53
|
-
==================
|
|
54
|
-
* added the `format` API: computes edits to format a JSON document.
|
|
55
|
-
* added the `modify` API: computes edits to insert, remove or replace a property or value in a JSON document.
|
|
56
|
-
* added the `allyEdits` API: applies edits to a document
|
|
57
|
-
|
|
58
|
-
1.0.0
|
|
59
|
-
==================
|
|
60
|
-
* remove nls dependency (remove `getParseErrorMessage`)
|
|
61
|
-
|
|
62
|
-
0.4.2 / 2017-05-05
|
|
63
|
-
==================
|
|
64
|
-
* added `ParseError.offset` & `ParseError.length`
|
|
65
|
-
|
|
66
|
-
0.4.1 / 2017-04-02
|
|
67
|
-
==================
|
|
68
|
-
* added `ParseOptions.allowTrailingComma`
|
|
69
|
-
|
|
70
|
-
0.4.0 / 2017-02-23
|
|
71
|
-
==================
|
|
72
|
-
* fix for `getLocation`. Now `getLocation` inside an object will always return a property from inside that property. Can be empty string if the object has no properties or if the offset is before a actual property `{ "a": { | }} will return location ['a', ' ']`
|
|
73
|
-
|
|
74
|
-
0.3.0 / 2017-01-17
|
|
75
|
-
==================
|
|
76
|
-
* Updating to typescript 2.0
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
The MIT License (MIT)
|
|
2
|
-
|
|
3
|
-
Copyright (c) Microsoft
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|