• 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.8.3.3/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 type {
×
13
} from 'regexp.escape/auto';
×
14

×
15
import {
×
16
        PrefixedString_base,
×
17
} from '../0.3.7.7/PrefixedString.ts';
×
18

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

×
23
import type {
×
24
        PrefixedString_base_schema as PrefixedString_base_schema__update6,
×
25
        PrefixedString_base_type as PrefixedString_base_type__update6,
×
26
} from '../0.6.1.5/PrefixedString.ts';
×
27

×
28
export type system_prefix = (
×
29
        | 'Engine'
×
30
        | 'TemplateSequence'
×
31
        | 'FactoryGame'
×
32
        | 'AkAudio'
×
33
        | 'CoreUObject'
×
34
);
×
35

×
36
type version_specific_prefix<
×
37
        SystemPrefix extends system_prefix = system_prefix,
×
38
> = `/Script/${SystemPrefix}.`;
×
39

×
40
export type PrefixedString_base_type<
×
41
        Mode extends string = string,
×
42
        SystemPrefix extends string = string,
×
43
> = (
×
44
        & PrefixedString_base_type__update6<Mode>
×
45
        & {
×
46
                DocsDotJson_PrefixedString: (
×
47
                        & PrefixedString_base_type__update6<
×
48
                                Mode
×
49
                        >['DocsDotJson_PrefixedString']
×
50
                        & {
×
51
                                system_prefix?: (
×
52
                                        | Exclude<SystemPrefix, 'Engine'>
×
53
                                        | false
×
54
                                ),
×
55
                                root_path?: Exclude<string, ''>,
×
56
                        }
×
57
                ),
×
58
        }
×
59
);
×
60

×
61
export type PrefixedString_type<
×
62
        Mode extends mode = mode,
×
63
        SystemPrefix extends system_prefix = system_prefix,
×
64
> = PrefixedString_base_type<Mode, SystemPrefix>;
×
65

×
66
export type PrefixedString_base_schema<
×
67
        Mode extends string,
×
68
        SystemPrefix extends string = string,
×
69
> = (
×
70
        & PrefixedString_base_schema__update6<Mode>
×
71
        & {
×
72
                properties: (
×
73
                        & PrefixedString_base_schema__update6<Mode>['properties']
×
74
                        & {
×
75
                                DocsDotJson_PrefixedString: (
×
76
                                        & PrefixedString_base_schema__update6<
×
77
                                                Mode
×
78
                                        >['properties']['DocsDotJson_PrefixedString']
×
79
                                        & {
×
80
                                                properties: (
×
81
                                                        & PrefixedString_base_schema__update6<
×
82
                                                                Mode
×
83
                                                        >[
×
84
                                                                'properties'
×
85
                                                        ][
×
86
                                                                'DocsDotJson_PrefixedString'
×
87
                                                        ][
×
88
                                                                'properties'
×
89
                                                        ]
×
90
                                                        & {
×
91
                                                                system_prefix: {
×
92
                                                                        oneOf: [
×
93
                                                                                {
×
94
                                                                                        type: 'string',
×
95
                                                                                        const: SystemPrefix,
×
96
                                                                                },
×
97
                                                                                {
×
98
                                                                                        type: 'boolean',
×
99
                                                                                        const: false,
×
100
                                                                                },
×
101
                                                                        ],
×
102
                                                                },
×
103
                                                                root_path: {
×
104
                                                                        type: 'string',
×
105
                                                                        minLength: 1,
×
106
                                                                },
×
107
                                                        }
×
108
                                                ),
×
109
                                        }
×
110
                                ),
×
111
                        }
×
112
                ),
×
113
        }
×
114
);
×
115

×
116
type PrefixedString_schema<
×
117
        Mode extends mode,
×
118
        SystemPrefix extends system_prefix = system_prefix,
×
119
> = PrefixedString_base_schema<Mode, SystemPrefix>;
×
120

×
121
export type PrefixedString_value_type<
×
122
        Prefix extends Exclude<string, ''>,
×
123
        SystemPrefix extends system_prefix,
×
124
        FirstPath extends Exclude<string, ''>,
×
125
        RootPath extends Exclude<string, ''>,
×
126
> = {
×
127
        quoted: `${
×
128
                version_specific_prefix<SystemPrefix>
×
129
        }${
×
130
                Prefix
×
131
        }'"/${RootPath}/${FirstPath}/${
×
132
                string
×
133
        }"'`,
×
134
        single_quoted: `${
×
135
                version_specific_prefix<SystemPrefix>
×
136
        }${Prefix}'/${RootPath}/${FirstPath}/${
×
137
                string
×
138
        }'`,
×
139
        non_quoted: `${
×
140
                version_specific_prefix<SystemPrefix>
×
141
        }${Prefix} /${RootPath}/${FirstPath}/${
×
142
                string
×
143
        }`,
×
144
};
×
145

×
146
export class PrefixedString<
×
147
        Mode extends mode,
×
148
        Prefix extends Exclude<string, ''>,
×
149
        SystemPrefix extends system_prefix,
×
150
        VersionSpecificDefaultMode extends Exclude<
×
151
                mode,
×
152
                'version_specific_default'
×
153
        >,
×
154
        FirstPath extends Exclude<string, ''> = 'FactoryGame',
×
155
        RootPath extends Exclude<string, ''> = 'Game',
×
156
> extends PrefixedString_base<
×
157
                Mode,
×
158
                (
×
159
                        & PrefixedString_value_type<
×
160
                                Prefix,
×
161
                                SystemPrefix,
×
162
                                FirstPath,
×
163
                                RootPath
×
164
                        >
×
165
                        & {
×
166
                                version_specific_default: PrefixedString_value_type<
×
167
                                        Prefix,
×
168
                                        SystemPrefix,
×
169
                                        FirstPath,
×
170
                                        RootPath
×
171
                                >[VersionSpecificDefaultMode],
×
172
                        }
×
173
                ),
×
174
                {
×
175
                        mode: Mode,
×
176
                        system_prefix: SystemPrefix,
×
177
                },
×
178
                PrefixedString_type<Mode>,
×
179
                PrefixedString_schema<Mode>,
×
180
                VersionSpecificDefaultMode
×
181
        > {
×
182
        constructor(
×
183
                options: SchemalessTypeOptions,
×
184
                mode: Mode,
×
185
                system_prefix: SystemPrefix,
×
186
                version_specific_default: VersionSpecificDefaultMode,
×
187
        ) {
×
188
                super(
×
189
                        options,
×
190
                        {mode, system_prefix},
×
191
                        version_specific_default,
×
192
                        ({
×
193
                                prefix,
×
194
                                value,
×
195
                                mode,
×
196
                                first_path,
×
197
                                root_path,
×
198
                                system_prefix,
×
199
                        }) => {
×
200
                                if (undefined === system_prefix && 'non_quoted' === mode) {
×
201
                                        system_prefix = false;
×
202
                                }
×
203

×
204
                                return PrefixedString.#regex_from_prefix_value_and_mode(
×
205
                                        prefix,
×
206
                                        value,
×
207
                                        mode,
×
208
                                        first_path,
×
209
                                        root_path,
×
210
                                        false === system_prefix
×
211
                                                ? system_prefix
×
212
                                                : (system_prefix || 'Engine'),
×
213
                                        version_specific_default,
×
214
                                );
×
215
                        },
×
216
                );
×
217
        }
×
218

×
219
        protected TemplatedStringParts_by_value({
×
220
                prefix,
×
221
                mode,
×
222
                value,
×
223
                first_path,
×
224
                root_path,
×
225
                system_prefix,
×
226
        }: PrefixedString_type<
×
227
                Mode
×
228
        >['DocsDotJson_PrefixedString']): TemplatedStringParts {
×
229
                let version_specific_prefix = `/Script/${
×
230
                        system_prefix || 'Engine'
×
231
                }.`;
×
232

×
233
                if (false === system_prefix) {
×
234
                        version_specific_prefix = '';
×
235
                }
×
236

×
237
                if (undefined === system_prefix && 'non_quoted' === mode) {
×
238
                        version_specific_prefix = '';
×
239
                }
×
240

×
241
                const head = {
×
242
                        non_quoted: `${
×
243
                                version_specific_prefix
×
244
                        }${prefix} /${
×
245
                                root_path || 'Game'
×
246
                        }/${
×
247
                                first_path || 'FactoryGame'
×
248
                        }`,
×
249
                        quoted: `${
×
250
                                version_specific_prefix
×
251
                        }${prefix}'"/${
×
252
                                root_path || 'Game'
×
253
                        }/${first_path || 'FactoryGame'}`,
×
254
                        single_quoted: `${
×
255
                                version_specific_prefix
×
256
                        }${prefix}'/${
×
257
                                root_path || 'Game'
×
258
                        }/${first_path || 'FactoryGame'}`,
×
259
                        version_specific_default: '',
×
260
                };
×
261

×
262
                const tail = {
×
263
                        non_quoted: '',
×
264
                        quoted: `"'`,
×
265
                        single_quoted: `'`,
×
266
                        version_specific_default: '',
×
267
                };
×
268

×
269
                head[
×
270
                        'version_specific_default'
×
271
                ] = head[this.version_specific_default];
×
272
                tail[
×
273
                        'version_specific_default'
×
274
                ] = tail[this.version_specific_default];
×
275

×
276
                return [
×
277
                        head[mode],
×
278
                        null === value ? {type: 'string', minLength: 1} : value,
×
279
                        tail[mode],
×
280
                ];
×
281
        }
×
282

×
283
        static generate_schema_definition<
×
284
                Mode extends mode,
×
285
                SystemPrefix extends system_prefix,
×
286
        >({
×
287
                mode,
×
288
                system_prefix,
×
289
        }: {
×
290
                mode: Mode,
×
291
                system_prefix: SystemPrefix,
×
292
        }): Readonly<PrefixedString_schema<Mode, SystemPrefix>> {
×
293
                const result: PrefixedString_schema<Mode, SystemPrefix> = {
×
294
                        type: 'object',
×
295
                        additionalProperties: false,
×
296
                        required: [
×
297
                                'type',
×
298
                                'DocsDotJson_PrefixedString',
×
299
                        ],
×
300
                        properties: {
×
301
                                $defs: $defs_schema.properties.$defs,
×
302
                                type: {
×
303
                                        type: 'string',
×
304
                                        const: 'string',
×
305
                                },
×
306
                                DocsDotJson_PrefixedString: {
×
307
                                        type: 'object',
×
308
                                        additionalProperties: false,
×
309
                                        required: ['prefix', 'mode', 'value'],
×
310
                                        properties: {
×
311
                                                prefix: {
×
312
                                                        type: 'string',
×
313
                                                        minLength: 1,
×
314
                                                },
×
315
                                                mode: {
×
316
                                                        type: 'string',
×
317
                                                        const: mode,
×
318
                                                },
×
319
                                                value: {
×
320
                                                        oneOf: [
×
321
                                                                {
×
322
                                                                        type: 'string',
×
323
                                                                        minLength: 1,
×
324
                                                                },
×
325
                                                                {
×
326
                                                                        type: 'null',
×
327
                                                                },
×
328
                                                        ],
×
329
                                                },
×
330
                                                first_path: {
×
331
                                                        type: 'string',
×
332
                                                        minLength: 1,
×
333
                                                },
×
334
                                                root_path: {
×
335
                                                        type: 'string',
×
336
                                                        minLength: 1,
×
337
                                                },
×
338
                                                system_prefix: {
×
339
                                                        oneOf: [
×
340
                                                                {
×
341
                                                                        type: 'string',
×
342
                                                                        const: system_prefix,
×
343
                                                                },
×
344
                                                                {
×
345
                                                                        type: 'boolean',
×
346
                                                                        const: false,
×
347
                                                                },
×
348
                                                        ],
×
349
                                                },
×
350
                                        },
×
351
                                },
×
352
                        },
×
353
                };
×
354

×
355
                return Object.freeze(result);
×
356
        }
×
357

×
358
        static generate_type_definition<
×
359
                Mode extends mode,
×
360
        >({
×
361
                prefix,
×
362
                mode,
×
363
        }: {
×
364
                prefix: Exclude<string, ''>,
×
365
                mode: Mode,
×
366
        }): Readonly<PrefixedString_type> {
×
367
                const result: PrefixedString_type<Mode> = {
×
368
                        type: 'string',
×
369
                        DocsDotJson_PrefixedString: {
×
370
                                prefix,
×
371
                                mode,
×
372
                                value: null,
×
373
                        },
×
374
                };
×
375

×
376
                return Object.freeze(result);
×
377
        }
×
378

×
379
        static regex_from_prefix_value_and_mode(
×
380
                prefix_string: Exclude<string, ''>,
×
381
                value: Exclude<string, ''>|null,
×
382
                mode: mode,
×
383
                first_path: Exclude<string, ''>|undefined,
×
384
                root_path: Exclude<string, ''>|undefined,
×
385
                version_specific_prefix: (
×
386
                        | version_specific_prefix
×
387
                        | false
×
388
                ),
×
389
                version_specific_default: Exclude<mode, 'version_specific_default'>,
×
390
        ): string {
×
391
                const use_mode = mode === 'version_specific_default'
×
392
                        ? version_specific_default
×
393
                        : mode;
×
394

×
395
                let start_parts = [
×
UNCOV
396
                        RegExp.escape({
×
UNCOV
397
                                quoted: `${prefix_string}'"`,
×
UNCOV
398
                                single_quoted: `${prefix_string}'`,
×
UNCOV
399
                                non_quoted: `${prefix_string} `,
×
UNCOV
400
                        }[use_mode]),
×
UNCOV
401
                ];
×
UNCOV
402

×
UNCOV
403
                if (false !== version_specific_prefix) {
×
UNCOV
404
                        start_parts = [
×
UNCOV
405
                                RegExp.escape(`${version_specific_prefix}`),
×
UNCOV
406
                                ...start_parts,
×
UNCOV
407
                        ];
×
UNCOV
408
                }
×
UNCOV
409

×
UNCOV
410
                const start = start_parts.join('');
×
UNCOV
411

×
UNCOV
412
                if (null !== value) {
×
UNCOV
413
                        const escaped = RegExp.escape(value);
×
UNCOV
414
                        if ('quoted' === mode) {
×
UNCOV
415
                                return `${start}${escaped}"'`;
×
UNCOV
416
                        }
×
UNCOV
417

×
UNCOV
418
                        return `${start}${escaped}`;
×
UNCOV
419
                }
×
UNCOV
420

×
UNCOV
421
                const prefix = RegExp.escape(`/${
×
UNCOV
422
                        root_path || 'Game'
×
UNCOV
423
                }/${
×
UNCOV
424
                        first_path || 'FactoryGame'
×
UNCOV
425
                }`);
×
UNCOV
426
                const suffix = RegExp.escape({
×
UNCOV
427
                        quoted: `"'`,
×
UNCOV
428
                        single_quoted: `'`,
×
UNCOV
429
                        non_quoted: '',
×
UNCOV
430
                }[use_mode]);
×
UNCOV
431

×
UNCOV
432
                if ('quoted' === mode) {
×
UNCOV
433
                        return `${
×
UNCOV
434
                                start
×
UNCOV
435
                        }${
×
UNCOV
436
                                prefix
×
UNCOV
437
                        }(?:[^\\/_,]+\\/)*[^.",]*\\.[^.",]+${
×
UNCOV
438
                                suffix
×
UNCOV
439
                        }`;
×
UNCOV
440
                }
×
UNCOV
441

×
UNCOV
442
                return `${
×
UNCOV
443
                        start
×
UNCOV
444
                }${
×
UNCOV
445
                        prefix
×
UNCOV
446
                }(?:[^\\/_,]+\\/)*[^.,]*\\.[^.,]+${
×
UNCOV
447
                        suffix
×
UNCOV
448
                }`;
×
UNCOV
449
        }
×
UNCOV
450

×
UNCOV
451
        static #regex_from_prefix_value_and_mode(
×
UNCOV
452
                prefix: Exclude<string, ''>,
×
UNCOV
453
                value: Exclude<string, ''>|null,
×
UNCOV
454
                mode: mode,
×
UNCOV
455
                first_path: Exclude<string, ''>|undefined,
×
UNCOV
456
                root_path: Exclude<string, ''>|undefined,
×
UNCOV
457
                system_prefix: (
×
UNCOV
458
                        | system_prefix
×
UNCOV
459
                        | false
×
UNCOV
460
                ),
×
UNCOV
461
                version_specific_default: Exclude<mode, 'version_specific_default'>,
×
UNCOV
462
        ): RegExp {
×
UNCOV
463
                return new RegExp(`^${
×
UNCOV
464
                        this.regex_from_prefix_value_and_mode(
×
UNCOV
465
                                prefix,
×
UNCOV
466
                                value,
×
UNCOV
467
                                mode,
×
UNCOV
468
                                first_path,
×
UNCOV
469
                                root_path,
×
UNCOV
470
                                false === system_prefix
×
UNCOV
471
                                        ? system_prefix
×
UNCOV
472
                                        : `/Script/${system_prefix}.`,
×
UNCOV
473
                                version_specific_default,
×
UNCOV
474
                        )
×
UNCOV
475
                }$`);
×
UNCOV
476
        }
×
UNCOV
477
}
×
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

© 2025 Coveralls, Inc