@powerlines/plugin-alloy 0.26.268 → 0.26.269

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.
@@ -19,11 +19,10 @@ var __copyProps = (to, from, except, desc) => {
19
19
  }
20
20
  return to;
21
21
  };
22
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
22
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule || !__hasOwnProp.call(mod, "default") ? __defProp(target, "default", {
23
23
  value: mod,
24
24
  enumerable: true
25
25
  }) : target, mod));
26
26
 
27
27
  //#endregion
28
-
29
28
  exports.__toESM = __toESM;
@@ -28,7 +28,8 @@ function InfrastructureFile(props) {
28
28
  const context = require_core_contexts_context.usePowerlinesSafe();
29
29
  const filetype = (0, _alloy_js_core.computed)(() => _filetype || extension?.replace(/^\.*/, "") || ((0, _stryke_path_file_path_fns.hasFileExtension)(id) ? (0, _stryke_path_file_path_fns.findFileExtensionSafe)(id) : ""));
30
30
  const path = (0, _alloy_js_core.computed)(() => {
31
- return (0, _stryke_path_append.appendExtension)((0, _stryke_path_replace.replaceExtension)(context ? (0, _stryke_path_append.appendPath)(id, (0, _stryke_path_replace.replacePath)(context.infrastructurePath, context.config.cwd)) : id), filetype.value);
31
+ const value = context ? (0, _stryke_path_append.appendPath)(id, (0, _stryke_path_replace.replacePath)(context.infrastructurePath, context.config.cwd)) : id;
32
+ return (0, _stryke_path_append.appendExtension)((0, _stryke_path_replace.replaceExtension)(value), filetype.value);
32
33
  });
33
34
  return (0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_core_components_source_file.SourceFile, (0, _alloy_js_core_jsx_runtime.mergeProps)(rest, {
34
35
  get filetype() {
@@ -25,7 +25,8 @@ function InfrastructureFile(props) {
25
25
  const context = usePowerlinesSafe();
26
26
  const filetype = computed(() => _filetype || extension?.replace(/^\.*/, "") || (hasFileExtension(id) ? findFileExtensionSafe(id) : ""));
27
27
  const path = computed(() => {
28
- return appendExtension(replaceExtension(context ? appendPath(id, replacePath(context.infrastructurePath, context.config.cwd)) : id), filetype.value);
28
+ const value = context ? appendPath(id, replacePath(context.infrastructurePath, context.config.cwd)) : id;
29
+ return appendExtension(replaceExtension(value), filetype.value);
29
30
  });
30
31
  return createComponent(SourceFile, mergeProps(rest, {
31
32
  get filetype() {
@@ -108,7 +108,7 @@ function getCapnpUnionTypes(schema) {
108
108
  function isCapnpStringUnion(schema) {
109
109
  return getCapnpUnionTypes(schema).some((member) => (0, _power_plant_schema.isJsonSchemaString)(member) || (0, _power_plant_schema.isJsonSchemaLiteral)(member) && (0, _stryke_type_checks_is_string.isString)(member.const));
110
110
  }
111
- const LARGE_BUFFER = 1024 * 1e6;
111
+ const LARGE_BUFFER = 1024e6;
112
112
  const execAsync = (0, node_util.promisify)(node_child_process.exec);
113
113
  async function generateCapnpId() {
114
114
  const { stdout } = await execAsync("capnp id", {
@@ -105,7 +105,7 @@ function getCapnpUnionTypes(schema) {
105
105
  function isCapnpStringUnion(schema) {
106
106
  return getCapnpUnionTypes(schema).some((member) => isJsonSchemaString(member) || isJsonSchemaLiteral(member) && isString(member.const));
107
107
  }
108
- const LARGE_BUFFER = 1024 * 1e6;
108
+ const LARGE_BUFFER = 1024e6;
109
109
  const execAsync = promisify(exec);
110
110
  async function generateCapnpId() {
111
111
  const { stdout } = await execAsync("capnp id", {
package/dist/render.cjs CHANGED
@@ -99,7 +99,7 @@ async function render(context, template, spec) {
99
99
  * @returns The rendered output as a string.
100
100
  */
101
101
  function renderString(context, children, options) {
102
- return (0, _alloy_js_core.printTree)((0, _alloy_js_core.renderTree)((0, _alloy_js_core_jsx_runtime.createComponent)(require_core_contexts_context.PowerlinesContext.Provider, {
102
+ const tree = (0, _alloy_js_core.renderTree)((0, _alloy_js_core_jsx_runtime.createComponent)(require_core_contexts_context.PowerlinesContext.Provider, {
103
103
  value: context,
104
104
  get children() {
105
105
  return (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Output, {
@@ -109,7 +109,8 @@ function renderString(context, children, options) {
109
109
  children
110
110
  });
111
111
  }
112
- })), options);
112
+ }));
113
+ return (0, _alloy_js_core.printTree)(tree, options);
113
114
  }
114
115
 
115
116
  //#endregion
package/dist/render.mjs CHANGED
@@ -98,7 +98,7 @@ async function render(context, template, spec) {
98
98
  * @returns The rendered output as a string.
99
99
  */
100
100
  function renderString(context, children, options) {
101
- return printTree(renderTree(createComponent(PowerlinesContext.Provider, {
101
+ const tree = renderTree(createComponent(PowerlinesContext.Provider, {
102
102
  value: context,
103
103
  get children() {
104
104
  return createComponent(Output, {
@@ -108,7 +108,8 @@ function renderString(context, children, options) {
108
108
  children
109
109
  });
110
110
  }
111
- })), options);
111
+ }));
112
+ return printTree(tree, options);
112
113
  }
113
114
 
114
115
  //#endregion
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@powerlines/plugin-alloy",
3
- "version": "0.26.268",
3
+ "version": "0.26.269",
4
4
  "description": "A Powerlines plugin to generate project code using Alloy JS via Power Plant.",
5
5
  "keywords": ["alloy-js", "powerlines", "powerlines-plugin"],
6
6
  "homepage": "https://stormsoftware.com",
@@ -291,8 +291,8 @@
291
291
  "@power-plant/alloy-js": "^0.0.50",
292
292
  "@power-plant/core": "^0.0.53",
293
293
  "@power-plant/schema": "^0.0.51",
294
- "@powerlines/plugin-babel": "^0.13.170",
295
- "@powerlines/plugin-power-plant": "^0.1.29",
294
+ "@powerlines/plugin-babel": "^0.13.171",
295
+ "@powerlines/plugin-power-plant": "^0.1.30",
296
296
  "@storm-software/config-tools": "^1.190.109",
297
297
  "@stryke/capnp": "^0.12.125",
298
298
  "@stryke/convert": "^0.7.29",
@@ -302,15 +302,15 @@
302
302
  "@stryke/string-format": "^0.17.40",
303
303
  "@stryke/type-checks": "^0.6.31",
304
304
  "defu": "^6.1.7",
305
- "powerlines": "^0.47.173"
305
+ "powerlines": "^0.47.174"
306
306
  },
307
307
  "devDependencies": {
308
308
  "@alloy-js/babel-preset": "^0.3.0",
309
- "@powerlines/plugin-plugin": "^0.12.585",
309
+ "@powerlines/plugin-plugin": "^0.12.586",
310
310
  "@types/node": "^25.9.5"
311
311
  },
312
312
  "peerDependencies": { "@alloy-js/babel-preset": ">=0.3.0" },
313
313
  "peerDependenciesMeta": { "@alloy-js/babel-preset": { "optional": false } },
314
314
  "publishConfig": { "access": "public" },
315
- "gitHead": "c545208aff23181510bfb9676e1bedc7e32ed502"
315
+ "gitHead": "1eb8250f091012d9dfc0faa9fc57c3dbb914dc97"
316
316
  }