• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

satisfactory-dev / Docs.json.ts / 20385899622

20 Dec 2025 12:10AM UTC coverage: 0.0%. Remained the same
20385899622

push

github

SignpostMarv
adjusting indentation

0 of 53 branches covered (0.0%)

Branch coverage included in aggregate %.

0 of 11 new or added lines in 1 file covered. (0.0%)

230 existing lines in 15 files now uncovered.

0 of 9104 relevant lines covered (0.0%)

0.0 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/src/version-specific/0.6.1.5/PrefixedString.ts
1
import type {
×
2
        SchemalessTypeOptions,
×
3
} from '@signpostmarv/json-schema-typescript-codegen';
×
4
import {
×
5
        $defs_schema,
×
6
} from '@signpostmarv/json-schema-typescript-codegen';
×
7

×
8
import type {
×
9
        TemplatedStringParts,
×
10
} from '@signpostmarv/json-schema-typescript-codegen/ajv';
×
11

×
12
import {
×
13
        PrefixedString_base,
×
14
        type PrefixedString_base_schema as PrefixedString_base_schema__update3,
×
15
        type PrefixedString_base_type as PrefixedString_base_type__update3,
×
16
} from '../0.3.7.7/PrefixedString.ts';
×
17

×
18
import type {
×
19
        mode,
×
20
} from '../0.3.7.7/PrefixedString.ts';
×
21

×
22
export type PrefixedString_base_type<
×
23
        Mode extends string = string,
×
24
> = (
×
25
        & PrefixedString_base_type__update3<Mode>
×
26
        & {
×
27
                DocsDotJson_PrefixedString: (
×
28
                        & PrefixedString_base_type__update3<
×
29
                                Mode
×
30
                        >['DocsDotJson_PrefixedString']
×
31
                        & {
×
32
                                first_path?: Exclude<string, ''>,
×
33
                        }
×
34
                ),
×
35
        }
×
36
);
×
37

×
38
export type PrefixedString_type<
×
39
        Mode extends mode = mode,
×
40
> = PrefixedString_base_type<Mode>;
×
41

×
42
export type PrefixedString_base_schema<
×
43
        Mode extends string,
×
44
> = (
×
45
        & PrefixedString_base_schema__update3<Mode>
×
46
        & {
×
47
                properties: (
×
48
                        & PrefixedString_base_schema__update3<Mode>['properties']
×
49
                        & {
×
50
                                DocsDotJson_PrefixedString: (
×
51
                                        & PrefixedString_base_schema__update3<
×
52
                                                Mode
×
53
                                        >['properties']['DocsDotJson_PrefixedString']
×
54
                                        & {
×
55
                                                properties: (
×
56
                                                        & PrefixedString_base_schema__update3<
×
57
                                                                Mode
×
58
                                                        >[
×
59
                                                                'properties'
×
60
                                                        ][
×
61
                                                                'DocsDotJson_PrefixedString'
×
62
                                                        ][
×
63
                                                                'properties'
×
64
                                                        ]
×
65
                                                        & {
×
66
                                                                first_path: {
×
67
                                                                        type: 'string',
×
68
                                                                        minLength: 1,
×
69
                                                                },
×
70
                                                        }
×
71
                                                ),
×
72
                                        }
×
73
                                ),
×
74
                        }
×
75
                ),
×
76
        }
×
77
);
×
78

×
79
type PrefixedString_schema<
×
80
        Mode extends mode,
×
81
> = PrefixedString_base_schema<Mode>;
×
82

×
83
export type PrefixedString_value_type<
×
84
        Prefix extends Exclude<string, ''>,
×
85
        FirstPath extends Exclude<string, ''>,
×
86
> = {
×
87
        quoted: `${Prefix}'"/Game/${FirstPath}/${
×
88
                string
×
89
        }"'`,
×
90
        single_quoted: `${Prefix}'/Game/${FirstPath}/${
×
91
                string
×
92
        }'`,
×
93
        non_quoted: `${Prefix} /Game/${FirstPath}/${
×
94
                string
×
95
        }`,
×
96
};
×
97

×
98
export class PrefixedString<
×
99
        Mode extends mode,
×
100
        Prefix extends Exclude<string, ''>,
×
101
        VersionSpecificDefaultMode extends Exclude<
×
102
                mode,
×
103
                'version_specific_default'
×
104
        >,
×
105
        FirstPath extends Exclude<string, ''> = 'FactoryGame',
×
106
> extends PrefixedString_base<
×
107
                Mode,
×
108
                (
×
109
                        & PrefixedString_value_type<Prefix, FirstPath>
×
110
                        & {
×
111
                                version_specific_default: PrefixedString_value_type<
×
112
                                        Prefix,
×
113
                                        FirstPath
×
114
                                >[VersionSpecificDefaultMode],
×
115
                        }
×
116
                ),
×
117
                {mode: Mode},
×
118
                PrefixedString_type<Mode>,
×
119
                PrefixedString_schema<Mode>,
×
120
                VersionSpecificDefaultMode
×
121
        > {
×
122
        constructor(
×
123
                options: SchemalessTypeOptions,
×
124
                mode: Mode,
×
125
                version_specific_default: VersionSpecificDefaultMode,
×
126
        ) {
×
127
                super(
×
128
                        options,
×
129
                        {mode},
×
130
                        version_specific_default,
×
131
                        ({
×
132
                                prefix,
×
133
                                value,
×
134
                                mode,
×
135
                                first_path,
×
136
                        }) => PrefixedString.#regex_from_prefix_value_and_mode(
×
137
                                prefix,
×
138
                                value,
×
139
                                mode,
×
140
                                version_specific_default,
×
141
                                first_path,
×
142
                        ),
×
143
                );
×
144
        }
×
145

×
146
        protected TemplatedStringParts_by_value({
×
147
                prefix,
×
148
                mode,
×
149
                value,
×
150
                first_path,
×
151
        }: PrefixedString_type<
×
152
                Mode
×
153
        >['DocsDotJson_PrefixedString']): TemplatedStringParts {
×
154
                const head = {
×
NEW
155
                        non_quoted: `${prefix} /Game/${first_path || 'FactoryGame'}/`,
×
NEW
156
                        quoted: `${prefix}'"/Game/${first_path || 'FactoryGame'}/`,
×
NEW
157
                        single_quoted: `${
×
NEW
158
                                prefix
×
NEW
159
                        }'/Game/${
×
NEW
160
                                first_path
×
NEW
161
                                || 'FactoryGame'
×
NEW
162
                        }/`,
×
163
                        version_specific_default: '',
×
164
                };
×
165

×
166
                const tail = {
×
NEW
167
                        non_quoted: '',
×
NEW
168
                        quoted: `"'`,
×
NEW
169
                        single_quoted: `'`,
×
170
                        version_specific_default: '',
×
171
                };
×
172

×
173
                head[
×
174
                        'version_specific_default'
×
175
                ] = head[this.version_specific_default];
×
176
                tail[
×
177
                        'version_specific_default'
×
178
                ] = tail[this.version_specific_default];
×
179

×
180
                return [
×
181
                        head[mode],
×
182
                        null === value ? {type: 'string', minLength: 1} : value,
×
183
                        tail[mode],
×
184
                ];
×
185
        }
×
186

×
187
        static generate_schema_definition<
×
188
                Mode extends mode,
×
189
        >({
×
190
                mode,
×
191
        }: {
×
192
                mode: Mode,
×
193
        }): Readonly<PrefixedString_schema<Mode>> {
×
194
                const result: PrefixedString_schema<Mode> = {
×
195
                        type: 'object',
×
196
                        additionalProperties: false,
×
197
                        required: [
×
198
                                'type',
×
199
                                'DocsDotJson_PrefixedString',
×
200
                        ],
×
201
                        properties: {
×
202
                                $defs: $defs_schema.properties.$defs,
×
203
                                type: {
×
204
                                        type: 'string',
×
205
                                        const: 'string',
×
206
                                },
×
207
                                DocsDotJson_PrefixedString: {
×
208
                                        type: 'object',
×
209
                                        additionalProperties: false,
×
210
                                        required: ['prefix', 'mode', 'value'],
×
211
                                        properties: {
×
212
                                                prefix: {
×
213
                                                        type: 'string',
×
214
                                                        minLength: 1,
×
215
                                                },
×
216
                                                mode: {
×
217
                                                        type: 'string',
×
218
                                                        const: mode,
×
219
                                                },
×
220
                                                value: {
×
221
                                                        oneOf: [
×
222
                                                                {
×
223
                                                                        type: 'string',
×
224
                                                                        minLength: 1,
×
225
                                                                },
×
226
                                                                {
×
227
                                                                        type: 'null',
×
228
                                                                },
×
229
                                                        ],
×
230
                                                },
×
231
                                                first_path: {
×
232
                                                        type: 'string',
×
233
                                                        minLength: 1,
×
234
                                                },
×
235
                                        },
×
236
                                },
×
237
                        },
×
238
                };
×
239

×
240
                return Object.freeze(result);
×
241
        }
×
242

×
243
        static generate_type_definition<
×
244
                Mode extends mode,
×
245
        >({
×
246
                prefix,
×
247
                mode,
×
248
        }: {
×
249
                prefix: Exclude<string, ''>,
×
250
                mode: Mode,
×
251
        }): Readonly<PrefixedString_type> {
×
252
                const result: PrefixedString_type<Mode> = {
×
253
                        type: 'string',
×
254
                        DocsDotJson_PrefixedString: {
×
255
                                prefix,
×
256
                                mode,
×
257
                                value: null,
×
258
                        },
×
259
                };
×
260

×
261
                return Object.freeze(result);
×
262
        }
×
263

×
264
        static regex_from_prefix_value_and_mode(
×
265
                prefix_string: Exclude<string, ''>,
×
266
                value: Exclude<string, ''>|null,
×
267
                mode: mode,
×
268
                version_specific_default: Exclude<mode, 'version_specific_default'>,
×
269
                first_path?: Exclude<string, ''>,
×
270
        ): string {
×
271
                const start = RegExp.escape({
×
272
                        quoted: `${prefix_string}'"`,
×
273
                        single_quoted: `${prefix_string}'`,
×
274
                        non_quoted: `${prefix_string} `,
×
275
                }[
×
276
                        mode === 'version_specific_default'
×
277
                                ? version_specific_default
×
278
                                : mode
×
279
                ]);
×
280

×
281

×
UNCOV
282
                if (null !== value) {
×
UNCOV
283
                        const escaped = RegExp.escape(value);
×
UNCOV
284
                        if ('quoted' === mode) {
×
UNCOV
285
                                return `${start}${escaped}"'`;
×
UNCOV
286
                        }
×
UNCOV
287

×
UNCOV
288
                        return `${start}${escaped}`;
×
UNCOV
289
                }
×
UNCOV
290

×
UNCOV
291
                const prefix = RegExp.escape(`/Game/${first_path || 'FactoryGame'}/`);
×
UNCOV
292
                const suffix = RegExp.escape({
×
UNCOV
293
                        quoted: `"'`,
×
UNCOV
294
                        single_quoted: `'`,
×
UNCOV
295
                        non_quoted: '',
×
UNCOV
296
                }[
×
UNCOV
297
                        mode === 'version_specific_default'
×
UNCOV
298
                                ? version_specific_default
×
UNCOV
299
                                : mode
×
UNCOV
300
                ]);
×
UNCOV
301

×
UNCOV
302
                if ('quoted' === mode) {
×
UNCOV
303
                        return `${start}${prefix}(?:[^\\/_]+\\/)*[^."]+\\.[^."]+${suffix}`;
×
UNCOV
304
                }
×
UNCOV
305

×
UNCOV
306
                return `${start}${prefix}(?:[^\\/_]+\\/)*[^.]+\\.[^.]+${suffix}`;
×
UNCOV
307
        }
×
UNCOV
308

×
UNCOV
309
        static #regex_from_prefix_value_and_mode(
×
UNCOV
310
                prefix: Exclude<string, ''>,
×
UNCOV
311
                value: Exclude<string, ''>|null,
×
UNCOV
312
                mode: mode,
×
UNCOV
313
                version_specific_default: Exclude<mode, 'version_specific_default'>,
×
UNCOV
314
                first_path?: Exclude<string, ''>,
×
UNCOV
315
        ): RegExp {
×
UNCOV
316
                return new RegExp(`^${
×
UNCOV
317
                        this.regex_from_prefix_value_and_mode(
×
UNCOV
318
                                prefix,
×
UNCOV
319
                                value,
×
UNCOV
320
                                mode,
×
UNCOV
321
                                version_specific_default,
×
UNCOV
322
                                first_path,
×
UNCOV
323
                        )
×
UNCOV
324
                }$`);
×
UNCOV
325
        }
×
UNCOV
326
}
×
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc