@powerlines/plugin-alloy 0.18.106 → 0.18.107

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/dist/index.cjs CHANGED
@@ -58,41 +58,41 @@ const plugin = (options = {}) => {
58
58
  configResolved: {
59
59
  order: "pre",
60
60
  async handler() {
61
- async function render(children) {
62
- const _self$ = this;
61
+ const context = this;
62
+ const render = async (children) => {
63
63
  const meta = {};
64
64
  await (0, __alloy_js_core.traverseOutput)(await (0, __alloy_js_core.renderAsync)((0, __alloy_js_core_jsx_runtime.createComponent)(require_core_components_output.Output, {
65
- context: _self$,
65
+ context,
66
66
  meta,
67
67
  get basePath() {
68
- return _self$.workspaceConfig.workspaceRoot;
68
+ return context.workspaceConfig.workspaceRoot;
69
69
  },
70
70
  children
71
71
  })), {
72
72
  visitDirectory: (directory) => {
73
- if (this.fs.existsSync(directory.path)) return;
74
- this.fs.mkdirSync(directory.path);
73
+ if (context.fs.existsSync(directory.path)) return;
74
+ context.fs.mkdirSync(directory.path);
75
75
  },
76
76
  visitFile: (file) => {
77
77
  if ("contents" in file) {
78
78
  const metadata = meta[file.path] ?? {};
79
79
  if (metadata.kind === "builtin") {
80
80
  if (!metadata.id) throw new Error(`Built-in file "${file.path}" is missing its ID in the render metadata.`);
81
- this.emitBuiltinSync(file.contents, metadata.id, {
81
+ context.emitBuiltinSync(file.contents, metadata.id, {
82
82
  skipFormat: metadata.skipFormat,
83
83
  storage: metadata.storage,
84
84
  extension: (0, __stryke_path_file_path_fns.findFileExtension)(file.path)
85
85
  });
86
- } else if (metadata.kind === "entry") this.emitEntrySync(file.contents, file.path, {
86
+ } else if (metadata.kind === "entry") context.emitEntrySync(file.contents, file.path, {
87
87
  skipFormat: metadata.skipFormat,
88
88
  storage: metadata.storage,
89
89
  ...metadata.typeDefinition ?? {}
90
90
  });
91
- else this.emitSync(file.contents, file.path, metadata);
92
- } else this.fs.copySync(file.sourcePath, file.path);
91
+ else context.emitSync(file.contents, file.path, metadata);
92
+ } else context.fs.copySync(file.sourcePath, file.path);
93
93
  }
94
94
  });
95
- }
95
+ };
96
96
  this.render = render.bind(this);
97
97
  }
98
98
  }
package/dist/index.mjs CHANGED
@@ -54,41 +54,41 @@ const plugin = (options = {}) => {
54
54
  configResolved: {
55
55
  order: "pre",
56
56
  async handler() {
57
- async function render(children) {
58
- const _self$ = this;
57
+ const context = this;
58
+ const render = async (children) => {
59
59
  const meta = {};
60
60
  await traverseOutput(await renderAsync(createComponent(Output$1, {
61
- context: _self$,
61
+ context,
62
62
  meta,
63
63
  get basePath() {
64
- return _self$.workspaceConfig.workspaceRoot;
64
+ return context.workspaceConfig.workspaceRoot;
65
65
  },
66
66
  children
67
67
  })), {
68
68
  visitDirectory: (directory) => {
69
- if (this.fs.existsSync(directory.path)) return;
70
- this.fs.mkdirSync(directory.path);
69
+ if (context.fs.existsSync(directory.path)) return;
70
+ context.fs.mkdirSync(directory.path);
71
71
  },
72
72
  visitFile: (file) => {
73
73
  if ("contents" in file) {
74
74
  const metadata = meta[file.path] ?? {};
75
75
  if (metadata.kind === "builtin") {
76
76
  if (!metadata.id) throw new Error(`Built-in file "${file.path}" is missing its ID in the render metadata.`);
77
- this.emitBuiltinSync(file.contents, metadata.id, {
77
+ context.emitBuiltinSync(file.contents, metadata.id, {
78
78
  skipFormat: metadata.skipFormat,
79
79
  storage: metadata.storage,
80
80
  extension: findFileExtension(file.path)
81
81
  });
82
- } else if (metadata.kind === "entry") this.emitEntrySync(file.contents, file.path, {
82
+ } else if (metadata.kind === "entry") context.emitEntrySync(file.contents, file.path, {
83
83
  skipFormat: metadata.skipFormat,
84
84
  storage: metadata.storage,
85
85
  ...metadata.typeDefinition ?? {}
86
86
  });
87
- else this.emitSync(file.contents, file.path, metadata);
88
- } else this.fs.copySync(file.sourcePath, file.path);
87
+ else context.emitSync(file.contents, file.path, metadata);
88
+ } else context.fs.copySync(file.sourcePath, file.path);
89
89
  }
90
90
  });
91
- }
91
+ };
92
92
  this.render = render.bind(this);
93
93
  }
94
94
  }
@@ -1,6 +1,6 @@
1
1
  import { ComponentProps, SourceFileHeaderProps } from "../../types/components.cjs";
2
2
  import { SourceFileProps as SourceFileProps$1 } from "../../core/components/source-file.cjs";
3
- import * as _alloy_js_core11 from "@alloy-js/core";
3
+ import * as _alloy_js_core8 from "@alloy-js/core";
4
4
 
5
5
  //#region src/markdown/components/markdown-file.d.ts
6
6
  type MarkdownFileProps = Omit<SourceFileProps$1, "filetype"> & ComponentProps;
@@ -10,14 +10,14 @@ type MarkdownFileProps = Omit<SourceFileProps$1, "filetype"> & ComponentProps;
10
10
  * @param props - The properties for the source file.
11
11
  * @returns The rendered source file component.
12
12
  */
13
- declare function MarkdownFile(props: MarkdownFileProps): _alloy_js_core11.Children;
13
+ declare function MarkdownFile(props: MarkdownFileProps): _alloy_js_core8.Children;
14
14
  /**
15
15
  * Renders the header for a Powerlines Typescript source file.
16
16
  *
17
17
  * @param props - The properties for the source file header.
18
18
  * @returns The rendered source file header.
19
19
  */
20
- declare function MarkdownFileHeader(props: SourceFileHeaderProps): _alloy_js_core11.Children;
20
+ declare function MarkdownFileHeader(props: SourceFileHeaderProps): _alloy_js_core8.Children;
21
21
  declare type __ΩMarkdownFileProps = any[];
22
22
  //#endregion
23
23
  export { MarkdownFile, MarkdownFileHeader, MarkdownFileProps, __ΩMarkdownFileProps };
@@ -1,6 +1,6 @@
1
1
  import { ComponentProps } from "../../types/components.cjs";
2
2
  import { MarkdownTableColumnContextInterface } from "../contexts/markdown-table.cjs";
3
- import * as _alloy_js_core0 from "@alloy-js/core";
3
+ import * as _alloy_js_core10 from "@alloy-js/core";
4
4
 
5
5
  //#region src/markdown/components/markdown-table.d.ts
6
6
  interface MarkdownTableProps<T extends Record<string, any> = Record<string, any>> extends ComponentProps {
@@ -9,18 +9,18 @@ interface MarkdownTableProps<T extends Record<string, any> = Record<string, any>
9
9
  /**
10
10
  * Component that provides a context for rendering markdown tables.
11
11
  */
12
- declare function MarkdownTable<T extends Record<string, any> = Record<string, any>>(props: MarkdownTableProps<T>): _alloy_js_core0.Children;
12
+ declare function MarkdownTable<T extends Record<string, any> = Record<string, any>>(props: MarkdownTableProps<T>): _alloy_js_core10.Children;
13
13
  type MarkdownTableColumnProps = ComponentProps & Partial<Pick<MarkdownTableColumnContextInterface, "align">> & Required<Pick<MarkdownTableColumnContextInterface, "name">> & {
14
14
  width?: number;
15
15
  };
16
16
  /**
17
17
  * Component that provides a context for rendering markdown tables.
18
18
  */
19
- declare function MarkdownTableColumn(props: MarkdownTableColumnProps): _alloy_js_core0.Children;
19
+ declare function MarkdownTableColumn(props: MarkdownTableColumnProps): _alloy_js_core10.Children;
20
20
  /**
21
21
  * Component that provides a context for rendering markdown tables.
22
22
  */
23
- declare function MarkdownTableColumnHeader(props: MarkdownTableColumnProps): _alloy_js_core0.Children;
23
+ declare function MarkdownTableColumnHeader(props: MarkdownTableColumnProps): _alloy_js_core10.Children;
24
24
  declare type __ΩMarkdownTableProps = any[];
25
25
  declare type __ΩMarkdownTableColumnProps = any[];
26
26
  //#endregion
@@ -30,7 +30,7 @@ type AlloyPluginResolvedConfig = BabelPluginResolvedConfig & {
30
30
  alloy: AlloyPluginOptions;
31
31
  };
32
32
  type AlloyPluginContext<TResolvedConfig extends AlloyPluginResolvedConfig = AlloyPluginResolvedConfig> = PluginContext<TResolvedConfig> & {
33
- render: <TContext extends AlloyPluginContext>(this: TContext, children: Children) => Promise<void>;
33
+ render: (children: Children) => Promise<void>;
34
34
  };
35
35
  declare type __ΩAlloyPluginOptions = any[];
36
36
  declare type __ΩAlloyPluginUserConfig = any[];
@@ -30,7 +30,7 @@ type AlloyPluginResolvedConfig = BabelPluginResolvedConfig & {
30
30
  alloy: AlloyPluginOptions;
31
31
  };
32
32
  type AlloyPluginContext<TResolvedConfig extends AlloyPluginResolvedConfig = AlloyPluginResolvedConfig> = PluginContext<TResolvedConfig> & {
33
- render: <TContext extends AlloyPluginContext>(this: TContext, children: Children) => Promise<void>;
33
+ render: (children: Children) => Promise<void>;
34
34
  };
35
35
  declare type __ΩAlloyPluginOptions = any[];
36
36
  declare type __ΩAlloyPluginUserConfig = any[];
@@ -1,6 +1,6 @@
1
1
  import { TSDocModuleProps } from "./tsdoc.cjs";
2
2
  import { TypescriptFileProps } from "./typescript-file.cjs";
3
- import * as _alloy_js_core0 from "@alloy-js/core";
3
+ import * as _alloy_js_core7 from "@alloy-js/core";
4
4
 
5
5
  //#region src/typescript/components/builtin-file.d.ts
6
6
  type BuiltinFileProps = Omit<TypescriptFileProps, "path"> & Omit<TSDocModuleProps, "name"> & {
@@ -28,7 +28,7 @@ type BuiltinFileProps = Omit<TypescriptFileProps, "path"> & Omit<TSDocModuleProp
28
28
  * @param props - The properties for the source file.
29
29
  * @returns The rendered source file component.
30
30
  */
31
- declare function BuiltinFile(props: BuiltinFileProps): _alloy_js_core0.Children;
31
+ declare function BuiltinFile(props: BuiltinFileProps): _alloy_js_core7.Children;
32
32
  declare type __ΩBuiltinFileProps = any[];
33
33
  //#endregion
34
34
  export { BuiltinFile, BuiltinFileProps, __ΩBuiltinFileProps };
@@ -1,4 +1,4 @@
1
- import * as _alloy_js_core16 from "@alloy-js/core";
1
+ import * as _alloy_js_core1 from "@alloy-js/core";
2
2
  import { VarDeclarationProps } from "@alloy-js/typescript";
3
3
 
4
4
  //#region src/typescript/components/dynamic-import-statement.d.ts
@@ -26,7 +26,7 @@ interface DynamicImportStatementProps extends Omit<VarDeclarationProps, "initial
26
26
  * @param props - The properties for the dynamic import statement.
27
27
  * @returns A `VarDeclaration` component representing the dynamic import statement.
28
28
  */
29
- declare function DynamicImportStatement(props: DynamicImportStatementProps): _alloy_js_core16.Children;
29
+ declare function DynamicImportStatement(props: DynamicImportStatementProps): _alloy_js_core1.Children;
30
30
  declare type __ΩDynamicImportStatementProps = any[];
31
31
  //#endregion
32
32
  export { DynamicImportStatement, DynamicImportStatementProps, __ΩDynamicImportStatementProps };
@@ -1,6 +1,6 @@
1
1
  import { ResolvedEntryTypeDefinition } from "../../powerlines/src/types/resolved.cjs";
2
2
  import { TypescriptFileProps } from "./typescript-file.cjs";
3
- import * as _alloy_js_core10 from "@alloy-js/core";
3
+ import * as _alloy_js_core16 from "@alloy-js/core";
4
4
 
5
5
  //#region src/typescript/components/entry-file.d.ts
6
6
  type EntryFileProps = TypescriptFileProps & {
@@ -21,7 +21,7 @@ type EntryFileProps = TypescriptFileProps & {
21
21
  * @param props - The properties for the source file.
22
22
  * @returns The rendered source file component.
23
23
  */
24
- declare function EntryFile(props: EntryFileProps): _alloy_js_core10.Children;
24
+ declare function EntryFile(props: EntryFileProps): _alloy_js_core16.Children;
25
25
  declare type __ΩEntryFileProps = any[];
26
26
  //#endregion
27
27
  export { EntryFile, EntryFileProps, __ΩEntryFileProps };
@@ -1,6 +1,6 @@
1
1
  import { ResolvedEntryTypeDefinition } from "../../powerlines/src/types/resolved.mjs";
2
2
  import { TypescriptFileProps } from "./typescript-file.mjs";
3
- import * as _alloy_js_core6 from "@alloy-js/core";
3
+ import * as _alloy_js_core3 from "@alloy-js/core";
4
4
 
5
5
  //#region src/typescript/components/entry-file.d.ts
6
6
  type EntryFileProps = TypescriptFileProps & {
@@ -21,7 +21,7 @@ type EntryFileProps = TypescriptFileProps & {
21
21
  * @param props - The properties for the source file.
22
22
  * @returns The rendered source file component.
23
23
  */
24
- declare function EntryFile(props: EntryFileProps): _alloy_js_core6.Children;
24
+ declare function EntryFile(props: EntryFileProps): _alloy_js_core3.Children;
25
25
  declare type __ΩEntryFileProps = any[];
26
26
  //#endregion
27
27
  export { EntryFile, EntryFileProps, __ΩEntryFileProps };
@@ -1,18 +1,18 @@
1
1
  import { TSDocProps } from "./tsdoc.cjs";
2
- import * as _alloy_js_core5 from "@alloy-js/core";
2
+ import * as _alloy_js_core4 from "@alloy-js/core";
3
3
 
4
4
  //#region src/typescript/components/tsdoc-reflection.d.ts
5
5
  /**
6
6
  * Generates a TypeScript interface property for the given reflection class.
7
7
  */
8
- declare function TSDocReflectionClass<T extends Record<string, any> = Record<string, any>>(props: TSDocProps): _alloy_js_core5.Children;
8
+ declare function TSDocReflectionClass<T extends Record<string, any> = Record<string, any>>(props: TSDocProps): _alloy_js_core4.Children;
9
9
  /**
10
10
  * Generates a TypeScript interface property for the given reflection class.
11
11
  */
12
- declare function TSDocReflectionProperty(props: TSDocProps): _alloy_js_core5.Children;
12
+ declare function TSDocReflectionProperty(props: TSDocProps): _alloy_js_core4.Children;
13
13
  /**
14
14
  * Generates a TypeScript interface property for the given reflection class.
15
15
  */
16
- declare function TSDocReflectionMethod(props: TSDocProps): _alloy_js_core5.Children;
16
+ declare function TSDocReflectionMethod(props: TSDocProps): _alloy_js_core4.Children;
17
17
  //#endregion
18
18
  export { TSDocReflectionClass, TSDocReflectionMethod, TSDocReflectionProperty };
@@ -1,18 +1,18 @@
1
1
  import { TSDocProps } from "./tsdoc.mjs";
2
- import * as _alloy_js_core3 from "@alloy-js/core";
2
+ import * as _alloy_js_core4 from "@alloy-js/core";
3
3
 
4
4
  //#region src/typescript/components/tsdoc-reflection.d.ts
5
5
  /**
6
6
  * Generates a TypeScript interface property for the given reflection class.
7
7
  */
8
- declare function TSDocReflectionClass<T extends Record<string, any> = Record<string, any>>(props: TSDocProps): _alloy_js_core3.Children;
8
+ declare function TSDocReflectionClass<T extends Record<string, any> = Record<string, any>>(props: TSDocProps): _alloy_js_core4.Children;
9
9
  /**
10
10
  * Generates a TypeScript interface property for the given reflection class.
11
11
  */
12
- declare function TSDocReflectionProperty(props: TSDocProps): _alloy_js_core3.Children;
12
+ declare function TSDocReflectionProperty(props: TSDocProps): _alloy_js_core4.Children;
13
13
  /**
14
14
  * Generates a TypeScript interface property for the given reflection class.
15
15
  */
16
- declare function TSDocReflectionMethod(props: TSDocProps): _alloy_js_core3.Children;
16
+ declare function TSDocReflectionMethod(props: TSDocProps): _alloy_js_core4.Children;
17
17
  //#endregion
18
18
  export { TSDocReflectionClass, TSDocReflectionMethod, TSDocReflectionProperty };
@@ -1,5 +1,5 @@
1
1
  import { ComponentProps } from "../../types/components.cjs";
2
- import * as _alloy_js_core3 from "@alloy-js/core";
2
+ import * as _alloy_js_core2 from "@alloy-js/core";
3
3
  import { InterfaceDeclarationProps, InterfaceMemberProps } from "@alloy-js/typescript";
4
4
  import { ReflectionClass, ReflectionProperty } from "@powerlines/deepkit/vendor/type";
5
5
 
@@ -14,11 +14,11 @@ interface TypescriptInterfacePropertyProps extends Omit<InterfaceMemberProps, "n
14
14
  /**
15
15
  * Generates a TypeScript interface for the given reflection class.
16
16
  */
17
- declare function TypeScriptInterface<T extends Record<string, any> = Record<string, any>>(props: TypeScriptInterfaceProps<T>): _alloy_js_core3.Children;
17
+ declare function TypeScriptInterface<T extends Record<string, any> = Record<string, any>>(props: TypeScriptInterfaceProps<T>): _alloy_js_core2.Children;
18
18
  /**
19
19
  * Generates a TypeScript interface property for the given reflection class.
20
20
  */
21
- declare function TypescriptInterfaceProperty(props: TypescriptInterfacePropertyProps): _alloy_js_core3.Children;
21
+ declare function TypescriptInterfaceProperty(props: TypescriptInterfacePropertyProps): _alloy_js_core2.Children;
22
22
  declare type __ΩTypeScriptInterfaceProps = any[];
23
23
  declare type __ΩTypescriptInterfacePropertyProps = any[];
24
24
  //#endregion
@@ -1,5 +1,5 @@
1
1
  import { ComponentProps } from "../../types/components.cjs";
2
- import * as _alloy_js_core8 from "@alloy-js/core";
2
+ import * as _alloy_js_core0 from "@alloy-js/core";
3
3
  import { VarDeclarationProps } from "@alloy-js/typescript";
4
4
  import { ReflectionClass, ReflectionProperty } from "@powerlines/deepkit/vendor/type";
5
5
  import { ComputedRef } from "@vue/reactivity";
@@ -15,11 +15,11 @@ interface TypescriptObjectPropertyProps extends ComponentProps {
15
15
  /**
16
16
  * Generates a TypeScript object for the given reflection class.
17
17
  */
18
- declare function TypescriptObject<T extends Record<string, any> = Record<string, any>>(props: TypescriptObjectProps<T>): _alloy_js_core8.Children;
18
+ declare function TypescriptObject<T extends Record<string, any> = Record<string, any>>(props: TypescriptObjectProps<T>): _alloy_js_core0.Children;
19
19
  /**
20
20
  * Generates a TypeScript object property for the given reflection class.
21
21
  */
22
- declare function TypescriptObjectProperty(props: TypescriptObjectPropertyProps): _alloy_js_core8.Children;
22
+ declare function TypescriptObjectProperty(props: TypescriptObjectPropertyProps): _alloy_js_core0.Children;
23
23
  declare type __ΩTypescriptObjectProps = any[];
24
24
  declare type __ΩTypescriptObjectPropertyProps = any[];
25
25
  //#endregion
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@powerlines/plugin-alloy",
3
- "version": "0.18.106",
3
+ "version": "0.18.107",
4
4
  "type": "module",
5
5
  "description": "A package containing various Alloy framework components and helper utilities.",
6
6
  "repository": {
@@ -360,8 +360,8 @@
360
360
  "@alloy-js/json": "^0.22.0",
361
361
  "@alloy-js/markdown": "^0.22.0",
362
362
  "@alloy-js/typescript": "^0.22.0",
363
- "@powerlines/deepkit": "^0.5.133",
364
- "@powerlines/plugin-babel": "^0.12.225",
363
+ "@powerlines/deepkit": "^0.6.0",
364
+ "@powerlines/plugin-babel": "^0.12.226",
365
365
  "@storm-software/config-tools": "^1.189.0",
366
366
  "@stryke/capnp": "^0.12.61",
367
367
  "@stryke/convert": "^0.6.35",
@@ -374,13 +374,13 @@
374
374
  "@stryke/types": "^0.10.34",
375
375
  "@stryke/unique-id": "^0.3.47",
376
376
  "defu": "^6.1.4",
377
- "powerlines": "^0.37.89",
377
+ "powerlines": "^0.37.90",
378
378
  "prettier": "^3.8.1"
379
379
  },
380
380
  "devDependencies": {
381
- "@powerlines/plugin-plugin": "^0.12.167",
381
+ "@powerlines/plugin-plugin": "^0.12.168",
382
382
  "@types/node": "^24.10.9"
383
383
  },
384
384
  "publishConfig": { "access": "public" },
385
- "gitHead": "fb3079ccb0361ffe89bb357f7a526b6281f8bf71"
385
+ "gitHead": "46c3cac0ba2106aab00122b1b92c4e8f477592c4"
386
386
  }