@sealcode/jdd 0.8.0 → 0.8.2
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/.nyc_output/84cd24f4-cbad-45b4-a856-e203891ea18f.json +1 -0
- package/.nyc_output/processinfo/84cd24f4-cbad-45b4-a856-e203891ea18f.json +1 -0
- package/.nyc_output/processinfo/index.json +1 -1
- package/.xunit +20 -16
- package/@types/component-arguments/code.d.ts +14 -0
- package/@types/component-arguments/color.d.ts +1 -1
- package/@types/component-arguments/component-arguments.d.ts +3 -0
- package/coverage/clover.xml +106 -49
- package/lib/component-arguments/code.js +43 -0
- package/lib/component-arguments/code.js.map +1 -0
- package/lib/component-arguments/color.js +1 -1
- package/lib/component-arguments/color.js.map +1 -1
- package/lib/component-arguments/component-arguments.js +3 -0
- package/lib/component-arguments/component-arguments.js.map +1 -1
- package/package.json +1 -1
- package/.nyc_output/6ab070a1-a0bc-4366-9217-9549668af832.json +0 -1
- package/.nyc_output/processinfo/6ab070a1-a0bc-4366-9217-9549668af832.json +0 -1
- package/@types/component-arguments/component.d.ts +0 -15
- package/@types/component-arguments/newFile.d.ts +0 -1
- package/@types/component-arguments.d.ts +0 -68
- package/@types/h-test.d.ts +0 -1
- package/hint-report/http-localhost-8080.html +0 -11153
- package/lib/component-arguments/component.js +0 -111
- package/lib/component-arguments/component.js.map +0 -1
- package/lib/component-arguments/newFile.js +0 -2
- package/lib/component-arguments/newFile.js.map +0 -1
- package/lib/h-test.js +0 -13
- package/lib/h-test.js.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"parent":null,"pid":462274,"argv":["/home/kuba/.nvm/versions/node/v21.7.3/bin/node","/home/kuba/projects/sealcode/jdd/node_modules/.bin/mocha","--recursive","--timeout=10000","--require","source-map-support/register","--reporter","xunit","--reporter-option","output=.xunit","lib-instrumented/**/*.test.js"],"execArgv":[],"cwd":"/home/kuba/projects/sealcode/jdd","time":1743863846962,"ppid":462263,"coverageFilename":"/home/kuba/projects/sealcode/jdd/.nyc_output/6ab070a1-a0bc-4366-9217-9549668af832.json","externalId":"","uuid":"6ab070a1-a0bc-4366-9217-9549668af832","files":["/home/kuba/projects/sealcode/jdd/lib/api.test.js","/home/kuba/projects/sealcode/jdd/lib/component-arguments/component-argument.js","/home/kuba/projects/sealcode/jdd/lib/component-arguments/container-argument.js","/home/kuba/projects/sealcode/jdd/lib/component-arguments/list.js","/home/kuba/projects/sealcode/jdd/lib/component-arguments/file.js","/home/kuba/projects/sealcode/jdd/lib/utils/module-dirname.js","/home/kuba/projects/sealcode/jdd/lib/component-arguments/image.js","/home/kuba/projects/sealcode/jdd/lib/component-arguments/string-based-argument.js","/home/kuba/projects/sealcode/jdd/lib/component-arguments/short-text.js","/home/kuba/projects/sealcode/jdd/lib/component-arguments/structured.js","/home/kuba/projects/sealcode/jdd/lib/component-arguments/number.js","/home/kuba/projects/sealcode/jdd/lib/component-arguments/enum.js","/home/kuba/projects/sealcode/jdd/lib/component-arguments/markdown.js","/home/kuba/projects/sealcode/jdd/lib/component.js","/home/kuba/projects/sealcode/jdd/lib/component-arguments/url.js","/home/kuba/projects/sealcode/jdd/lib/utils/insert_nbsp.js","/home/kuba/projects/sealcode/jdd/lib/hyphenation.js","/home/kuba/projects/sealcode/jdd/lib/registry.js","/home/kuba/projects/sealcode/jdd/lib/jdd-context.js","/home/kuba/projects/sealcode/jdd/lib/component-arguments/component-arguments.test.js","/home/kuba/projects/sealcode/jdd/lib/component-arguments/enum.test.js","/home/kuba/projects/sealcode/jdd/lib/component-arguments/file.test.js","/home/kuba/projects/sealcode/jdd/lib/component-arguments/list.test.js","/home/kuba/projects/sealcode/jdd/lib/component-arguments/structured.test.js","/home/kuba/projects/sealcode/jdd/lib/component-arguments/table.js","/home/kuba/projects/sealcode/jdd/lib/component-arguments/table.test.js","/home/kuba/projects/sealcode/jdd/lib/component-arguments/single-reference.js","/home/kuba/projects/sealcode/jdd/lib/clumps.js","/home/kuba/projects/sealcode/jdd/lib/component-arguments/nested-component.js","/home/kuba/projects/sealcode/jdd/lib/component-arguments/component-arguments.js","/home/kuba/projects/sealcode/jdd/lib/document.js","/home/kuba/projects/sealcode/jdd/lib/jdd.js","/home/kuba/projects/sealcode/jdd/lib/index.js","/home/kuba/projects/sealcode/jdd/lib/component.test.js","/home/kuba/projects/sealcode/jdd/lib/components/markdown.js","/home/kuba/projects/sealcode/jdd/lib/test-utils/prettier.js","/home/kuba/projects/sealcode/jdd/lib/test-utils/simplest-context.js","/home/kuba/projects/sealcode/jdd/lib/components/markdown.test.js","/home/kuba/projects/sealcode/jdd/lib/document.test.js","/home/kuba/projects/sealcode/jdd/lib/jdd.test.js","/home/kuba/projects/sealcode/jdd/lib/markdown.test.js","/home/kuba/projects/sealcode/jdd/lib/render.test.js","/home/kuba/projects/sealcode/jdd/lib/utils/insert_nbsp.test.js"]}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { ComponentArgument } from "./component-argument.js";
|
|
2
|
-
import { ContainerArgument } from "./container-argument.js";
|
|
3
|
-
import { Registry } from "../registry.js";
|
|
4
|
-
import { JDDContext } from "../jdd-context.js";
|
|
5
|
-
export declare class Component extends ContainerArgument<Record<string, unknown>, Record<string, unknown>> {
|
|
6
|
-
registry: Registry;
|
|
7
|
-
constructor(registry: Registry);
|
|
8
|
-
getTypeName(): string;
|
|
9
|
-
getStructure(component_name: string): Record<string, ComponentArgument<unknown>>;
|
|
10
|
-
getSubArgument([key, ...rest]: string[], value: Record<string, unknown>): readonly [ComponentArgument<any> | null, string[], unknown];
|
|
11
|
-
countWords(value: Record<string, unknown>): number;
|
|
12
|
-
getEmptyValue(context: JDDContext): Promise<Record<string, unknown>>;
|
|
13
|
-
getExampleValue(context: JDDContext): Promise<Record<string, unknown>>;
|
|
14
|
-
processAllSubarguments(_context: JDDContext, input: unknown, processing_function: (argument: ComponentArgument<unknown>, value: unknown) => Promise<unknown>): Promise<Record<string, unknown> | Record<string, unknown>[]>;
|
|
15
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
export type ExtractComponentArgumentValue<C> = C extends ComponentArgument<infer T> ? T : never;
|
|
2
|
-
export type ExtractStructuredComponentArgumentsValues<C> = {
|
|
3
|
-
[property in keyof C]: ExtractComponentArgumentValue<C[property]>;
|
|
4
|
-
};
|
|
5
|
-
export type T = ExtractComponentArgumentValue<Structured<any>>;
|
|
6
|
-
export declare abstract class ComponentArgument<ARG> {
|
|
7
|
-
example_values: ARG[];
|
|
8
|
-
abstract getTypeName(): string;
|
|
9
|
-
abstract getEmptyValue(): ARG;
|
|
10
|
-
getExampleValue(): ARG;
|
|
11
|
-
setExampleValues(values: ARG[]): this;
|
|
12
|
-
}
|
|
13
|
-
export declare class ShortText extends ComponentArgument<string> {
|
|
14
|
-
example_values: string[];
|
|
15
|
-
getTypeName(): string;
|
|
16
|
-
getEmptyValue(): string;
|
|
17
|
-
}
|
|
18
|
-
export declare class MarkdownArgument extends ComponentArgument<string> {
|
|
19
|
-
getTypeName(): string;
|
|
20
|
-
getEmptyValue(): string;
|
|
21
|
-
example_values: string[];
|
|
22
|
-
}
|
|
23
|
-
export declare class List<T extends ComponentArgument<unknown>> extends ComponentArgument<Array<ExtractComponentArgumentValue<T>>> {
|
|
24
|
-
item_type: T;
|
|
25
|
-
constructor(item_type: T);
|
|
26
|
-
getTypeName(): string;
|
|
27
|
-
getEmptyValue(): never[];
|
|
28
|
-
getExampleValue(): ExtractComponentArgumentValue<T>[];
|
|
29
|
-
}
|
|
30
|
-
export declare class Structured<T extends Record<string, ComponentArgument<unknown>>> extends ComponentArgument<{
|
|
31
|
-
[property in keyof T]: ExtractComponentArgumentValue<T[property]>;
|
|
32
|
-
}> {
|
|
33
|
-
structure: T;
|
|
34
|
-
constructor(structure: T);
|
|
35
|
-
getTypeName(): string;
|
|
36
|
-
getEmptyValue(): { [property in keyof T]: ExtractComponentArgumentValue<T[property]>; };
|
|
37
|
-
getExampleValue(): { [property in keyof T]: ExtractComponentArgumentValue<T[property]>; };
|
|
38
|
-
}
|
|
39
|
-
export declare class Enum<T extends string> extends ComponentArgument<T> {
|
|
40
|
-
readonly values: Readonly<T[]>;
|
|
41
|
-
constructor(values: Readonly<T[]>);
|
|
42
|
-
getTypeName(): string;
|
|
43
|
-
getEmptyValue(): T;
|
|
44
|
-
getExampleValue(): T;
|
|
45
|
-
}
|
|
46
|
-
export declare class Image extends ComponentArgument<string> {
|
|
47
|
-
path_to_image_on_fs: string;
|
|
48
|
-
constructor(path_to_image_on_fs: string);
|
|
49
|
-
getTypeName(): string;
|
|
50
|
-
getEmptyValue(): string;
|
|
51
|
-
getExampleValue(): string;
|
|
52
|
-
}
|
|
53
|
-
export declare class URL extends ComponentArgument<string> {
|
|
54
|
-
readonly urlType: Readonly<"relative" | "absolute">;
|
|
55
|
-
constructor(urlType: Readonly<"relative" | "absolute">);
|
|
56
|
-
getTypeName(): string;
|
|
57
|
-
getEmptyValue(): string;
|
|
58
|
-
getExampleValue(): "/example" | "https://example.com";
|
|
59
|
-
}
|
|
60
|
-
export declare const ComponentArguments: {
|
|
61
|
-
Image: typeof Image;
|
|
62
|
-
Structured: typeof Structured;
|
|
63
|
-
List: typeof List;
|
|
64
|
-
Markdown: typeof MarkdownArgument;
|
|
65
|
-
ShortText: typeof ShortText;
|
|
66
|
-
Enum: typeof Enum;
|
|
67
|
-
URL: typeof URL;
|
|
68
|
-
};
|
package/@types/h-test.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|