@powerlines/plugin-alloy 0.26.227 → 0.26.229
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/README.md +16 -8
- package/dist/core/components/infrastructure-file.cjs +1 -1
- package/dist/core/components/source-file.cjs +1 -1
- package/dist/helpers/capnp.cjs +141 -87
- package/dist/helpers/capnp.d.cts +20 -15
- package/dist/helpers/capnp.d.cts.map +1 -1
- package/dist/helpers/capnp.d.mts +20 -15
- package/dist/helpers/capnp.mjs +142 -87
- package/dist/helpers/index.cjs +0 -3
- package/dist/helpers/index.d.cts +2 -3
- package/dist/helpers/index.d.mts +2 -3
- package/dist/helpers/index.mjs +2 -3
- package/dist/index.cjs +1 -1
- package/dist/markdown/components/alert.cjs +74 -0
- package/dist/markdown/components/alert.d.cts +53 -0
- package/dist/markdown/components/alert.d.cts.map +1 -0
- package/dist/markdown/components/alert.d.mts +53 -0
- package/dist/markdown/components/alert.d.mts.map +1 -0
- package/dist/markdown/components/alert.mjs +69 -0
- package/dist/markdown/components/alert.mjs.map +1 -0
- package/dist/markdown/components/index.cjs +8 -1
- package/dist/markdown/components/index.d.cts +2 -1
- package/dist/markdown/components/index.d.mts +2 -1
- package/dist/markdown/components/index.mjs +2 -1
- package/dist/markdown/index.cjs +7 -0
- package/dist/markdown/index.d.cts +2 -1
- package/dist/markdown/index.d.mts +2 -1
- package/dist/markdown/index.mjs +2 -1
- package/dist/typescript/components/builtin-file.cjs +5 -3
- package/dist/typescript/components/builtin-file.d.cts +6 -0
- package/dist/typescript/components/builtin-file.d.cts.map +1 -1
- package/dist/typescript/components/builtin-file.d.mts +6 -0
- package/dist/typescript/components/builtin-file.mjs +5 -3
- package/dist/typescript/components/entry-file.cjs +1 -1
- package/dist/typescript/components/interface-declaration.cjs +1 -1
- package/dist/typescript/components/interface-declaration.d.mts +1 -1
- package/dist/typescript/components/interface-declaration.mjs +1 -1
- package/dist/typescript/components/object-declaration.cjs +2 -2
- package/dist/typescript/components/object-declaration.d.mts +1 -1
- package/dist/typescript/components/object-declaration.mjs +2 -2
- package/dist/typescript/components/tsdoc-schema.cjs +2 -2
- package/dist/typescript/components/tsdoc-schema.mjs +2 -2
- package/dist/typescript/components/tsdoc.cjs +1 -1
- package/dist/typescript/components/tsdoc.d.mts +1 -1
- package/dist/typescript/components/tsdoc.mjs +1 -1
- package/package.json +23 -22
- package/dist/helpers/typescript.cjs +0 -47
- package/dist/helpers/typescript.d.cts +0 -24
- package/dist/helpers/typescript.d.cts.map +0 -1
- package/dist/helpers/typescript.d.mts +0 -24
- package/dist/helpers/typescript.d.mts.map +0 -1
- package/dist/helpers/typescript.mjs +0 -47
- package/dist/helpers/typescript.mjs.map +0 -1
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
-
let _stryke_string_format_title_case = require("@stryke/string-format/title-case");
|
|
3
|
-
let _powerlines_deepkit_utilities = require("@powerlines/deepkit/utilities");
|
|
4
|
-
let _stryke_string_format_camel_case = require("@stryke/string-format/camel-case");
|
|
5
|
-
let _stryke_type_checks_is_undefined = require("@stryke/type-checks/is-undefined");
|
|
6
|
-
|
|
7
|
-
//#region src/helpers/typescript.ts
|
|
8
|
-
/**
|
|
9
|
-
* Generates a TypeScript object for the given reflection class.
|
|
10
|
-
*
|
|
11
|
-
* @param reflection - The reflection class to generate the object for.
|
|
12
|
-
* @param options - Options for generating the object.
|
|
13
|
-
* @returns A string containing the TypeScript object definition.
|
|
14
|
-
*/
|
|
15
|
-
function generateObjectDeclaration(reflection, options = {}) {
|
|
16
|
-
if (!reflection) return "";
|
|
17
|
-
return `
|
|
18
|
-
/**
|
|
19
|
-
* ${reflection.getDescription() || `${(0, _stryke_string_format_title_case.titleCase)(options.overrideName || reflection.getClassName() || reflection.getName())} object instance`}.
|
|
20
|
-
*/
|
|
21
|
-
export const ${(0, _stryke_string_format_camel_case.camelCase)(options.overrideName || reflection.getName())}${options.overrideExtends !== false && (options.overrideExtends || reflection.getSuperReflectionClass()?.getName()) ? `: ${options.overrideExtends || reflection.getSuperReflectionClass()?.getName()}` : ""} = {
|
|
22
|
-
${reflection.getProperties().filter((item) => !item.isIgnored() && !(0, _stryke_type_checks_is_undefined.isUndefined)(options.defaultValues?.[item.getNameAsString()] ?? item.getAlias().reduce((ret, alias) => {
|
|
23
|
-
if ((0, _stryke_type_checks_is_undefined.isUndefined)(ret) && !(0, _stryke_type_checks_is_undefined.isUndefined)(options.defaultValues?.[alias])) return options.defaultValues?.[alias];
|
|
24
|
-
return ret;
|
|
25
|
-
}, void 0) ?? item.getDefaultValue())).sort((a, b) => a.isReadonly() && b.isReadonly() || !a.isReadonly() && !b.isReadonly() ? a.getNameAsString().localeCompare(b.getNameAsString()) : a.isReadonly() ? 1 : -1).map((item) => ` /**
|
|
26
|
-
* ${item.getDescription() || item.getTitle() || (0, _stryke_string_format_title_case.titleCase)(item.getNameAsString())}
|
|
27
|
-
*
|
|
28
|
-
* @title ${item.getTitle() || (0, _stryke_string_format_title_case.titleCase)(item.getNameAsString())}${item.getAlias().length ? `
|
|
29
|
-
${item.getAlias().map((alias) => ` * @alias ${alias}`).join("\n")}` : ""}${item.getDomain() ? `
|
|
30
|
-
* @domain ${item.getDomain()}` : ""}${item.getPermission().length ? `
|
|
31
|
-
${item.getPermission().map((permission) => ` * @permission ${permission}`).join("\n")}` : ""}${item.isInternal() ? `
|
|
32
|
-
* @internal` : ""}${item.isRuntime() ? `
|
|
33
|
-
* @runtime` : ""}${item.isReadonly() ? `
|
|
34
|
-
* @readonly` : ""}${item.isIgnored() ? `
|
|
35
|
-
* @ignored` : ""}${item.isHidden() ? `
|
|
36
|
-
* @hidden` : ""}
|
|
37
|
-
*/
|
|
38
|
-
${item.getNameAsString()}: ${(0, _powerlines_deepkit_utilities.stringifyValue)(item.getType(), options.defaultValues?.[item.getNameAsString()] ?? item.getAlias().reduce((ret, alias) => {
|
|
39
|
-
if ((0, _stryke_type_checks_is_undefined.isUndefined)(ret) && !(0, _stryke_type_checks_is_undefined.isUndefined)(options.defaultValues?.[alias])) return options.defaultValues?.[alias];
|
|
40
|
-
return ret;
|
|
41
|
-
}, void 0) ?? item.getDefaultValue())}`).join(", \n")}
|
|
42
|
-
};
|
|
43
|
-
`;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
//#endregion
|
|
47
|
-
exports.generateObjectDeclaration = generateObjectDeclaration;
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { ReflectionClass } from "@powerlines/deepkit/vendor/type";
|
|
2
|
-
|
|
3
|
-
//#region src/helpers/typescript.d.ts
|
|
4
|
-
interface GenerateInterfaceDeclarationOptions<T> {
|
|
5
|
-
overrideName?: string;
|
|
6
|
-
overrideExtends?: string | false;
|
|
7
|
-
defaultValues?: Partial<T>;
|
|
8
|
-
}
|
|
9
|
-
interface GenerateObjectDeclarationOptions<T> {
|
|
10
|
-
overrideName?: string;
|
|
11
|
-
overrideExtends?: string | false;
|
|
12
|
-
defaultValues?: Partial<T>;
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* Generates a TypeScript object for the given reflection class.
|
|
16
|
-
*
|
|
17
|
-
* @param reflection - The reflection class to generate the object for.
|
|
18
|
-
* @param options - Options for generating the object.
|
|
19
|
-
* @returns A string containing the TypeScript object definition.
|
|
20
|
-
*/
|
|
21
|
-
declare function generateObjectDeclaration<T extends Record<string, any>>(reflection: ReflectionClass<T>, options?: GenerateObjectDeclarationOptions<T>): string;
|
|
22
|
-
//#endregion
|
|
23
|
-
export { GenerateInterfaceDeclarationOptions, GenerateObjectDeclarationOptions, generateObjectDeclaration };
|
|
24
|
-
//# sourceMappingURL=typescript.d.cts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"typescript.d.cts","names":[],"sources":["../../src/helpers/typescript.ts"],"mappings":";;;UAwBiB,mCAAA;EACf,YAAA;EACA,eAAA;EACA,aAAA,GAAgB,OAAO,CAAC,CAAA;AAAA;AAAA,UAqJT,gCAAA;EACf,YAAA;EACA,eAAA;EACA,aAAA,GAAgB,OAAO,CAAC,CAAA;AAAA;;;;AAxJC;AAqJ3B;;;iBAagB,yBAAA,WAAoC,MAAA,eAClD,UAAA,EAAY,eAAA,CAAgB,CAAA,GAC5B,OAAA,GAAS,gCAAA,CAAiC,CAAA"}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { ReflectionClass } from "@powerlines/deepkit/vendor/type";
|
|
2
|
-
|
|
3
|
-
//#region src/helpers/typescript.d.ts
|
|
4
|
-
interface GenerateInterfaceDeclarationOptions<T> {
|
|
5
|
-
overrideName?: string;
|
|
6
|
-
overrideExtends?: string | false;
|
|
7
|
-
defaultValues?: Partial<T>;
|
|
8
|
-
}
|
|
9
|
-
interface GenerateObjectDeclarationOptions<T> {
|
|
10
|
-
overrideName?: string;
|
|
11
|
-
overrideExtends?: string | false;
|
|
12
|
-
defaultValues?: Partial<T>;
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* Generates a TypeScript object for the given reflection class.
|
|
16
|
-
*
|
|
17
|
-
* @param reflection - The reflection class to generate the object for.
|
|
18
|
-
* @param options - Options for generating the object.
|
|
19
|
-
* @returns A string containing the TypeScript object definition.
|
|
20
|
-
*/
|
|
21
|
-
declare function generateObjectDeclaration<T extends Record<string, any>>(reflection: ReflectionClass<T>, options?: GenerateObjectDeclarationOptions<T>): string;
|
|
22
|
-
//#endregion
|
|
23
|
-
export { GenerateInterfaceDeclarationOptions, GenerateObjectDeclarationOptions, generateObjectDeclaration };
|
|
24
|
-
//# sourceMappingURL=typescript.d.mts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"typescript.d.mts","names":[],"sources":["../../src/helpers/typescript.ts"],"mappings":""}
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import { titleCase } from "@stryke/string-format/title-case";
|
|
2
|
-
import { stringifyValue } from "@powerlines/deepkit/utilities";
|
|
3
|
-
import { camelCase } from "@stryke/string-format/camel-case";
|
|
4
|
-
import { isUndefined } from "@stryke/type-checks/is-undefined";
|
|
5
|
-
|
|
6
|
-
//#region src/helpers/typescript.ts
|
|
7
|
-
/**
|
|
8
|
-
* Generates a TypeScript object for the given reflection class.
|
|
9
|
-
*
|
|
10
|
-
* @param reflection - The reflection class to generate the object for.
|
|
11
|
-
* @param options - Options for generating the object.
|
|
12
|
-
* @returns A string containing the TypeScript object definition.
|
|
13
|
-
*/
|
|
14
|
-
function generateObjectDeclaration(reflection, options = {}) {
|
|
15
|
-
if (!reflection) return "";
|
|
16
|
-
return `
|
|
17
|
-
/**
|
|
18
|
-
* ${reflection.getDescription() || `${titleCase(options.overrideName || reflection.getClassName() || reflection.getName())} object instance`}.
|
|
19
|
-
*/
|
|
20
|
-
export const ${camelCase(options.overrideName || reflection.getName())}${options.overrideExtends !== false && (options.overrideExtends || reflection.getSuperReflectionClass()?.getName()) ? `: ${options.overrideExtends || reflection.getSuperReflectionClass()?.getName()}` : ""} = {
|
|
21
|
-
${reflection.getProperties().filter((item) => !item.isIgnored() && !isUndefined(options.defaultValues?.[item.getNameAsString()] ?? item.getAlias().reduce((ret, alias) => {
|
|
22
|
-
if (isUndefined(ret) && !isUndefined(options.defaultValues?.[alias])) return options.defaultValues?.[alias];
|
|
23
|
-
return ret;
|
|
24
|
-
}, void 0) ?? item.getDefaultValue())).sort((a, b) => a.isReadonly() && b.isReadonly() || !a.isReadonly() && !b.isReadonly() ? a.getNameAsString().localeCompare(b.getNameAsString()) : a.isReadonly() ? 1 : -1).map((item) => ` /**
|
|
25
|
-
* ${item.getDescription() || item.getTitle() || titleCase(item.getNameAsString())}
|
|
26
|
-
*
|
|
27
|
-
* @title ${item.getTitle() || titleCase(item.getNameAsString())}${item.getAlias().length ? `
|
|
28
|
-
${item.getAlias().map((alias) => ` * @alias ${alias}`).join("\n")}` : ""}${item.getDomain() ? `
|
|
29
|
-
* @domain ${item.getDomain()}` : ""}${item.getPermission().length ? `
|
|
30
|
-
${item.getPermission().map((permission) => ` * @permission ${permission}`).join("\n")}` : ""}${item.isInternal() ? `
|
|
31
|
-
* @internal` : ""}${item.isRuntime() ? `
|
|
32
|
-
* @runtime` : ""}${item.isReadonly() ? `
|
|
33
|
-
* @readonly` : ""}${item.isIgnored() ? `
|
|
34
|
-
* @ignored` : ""}${item.isHidden() ? `
|
|
35
|
-
* @hidden` : ""}
|
|
36
|
-
*/
|
|
37
|
-
${item.getNameAsString()}: ${stringifyValue(item.getType(), options.defaultValues?.[item.getNameAsString()] ?? item.getAlias().reduce((ret, alias) => {
|
|
38
|
-
if (isUndefined(ret) && !isUndefined(options.defaultValues?.[alias])) return options.defaultValues?.[alias];
|
|
39
|
-
return ret;
|
|
40
|
-
}, void 0) ?? item.getDefaultValue())}`).join(", \n")}
|
|
41
|
-
};
|
|
42
|
-
`;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
//#endregion
|
|
46
|
-
export { generateObjectDeclaration };
|
|
47
|
-
//# sourceMappingURL=typescript.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"typescript.mjs","names":[],"sources":[],"mappings":""}
|