@powerlines/plugin-crypto 0.10.110 → 0.10.112

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.
@@ -124,8 +124,16 @@ function TypescriptFileHeaderImports(props) {
124
124
  children: [
125
125
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__alloy_js_core.Show, {
126
126
  when: !!imports && Object.keys(imports).length > 0,
127
- children: Object.entries(imports ?? {}).filter(([key]) => key !== "$builtins").concat(imports && imports.$builtins ? Object.entries(imports.$builtins).map(([key, entry]) => [key.includes(":") ? key : `${context.config.output.builtinPrefix}:${key}`, entry]) : []).map(([module$1, imported]) => {
128
- return __alloy_js_core.code`import ${imported === null ? "" : imported.filter((i) => !(0, __stryke_type_checks_is_string.isString)(i) && i.default).map((i) => i.alias ? i.alias : i.name).join(", ") + (imported.filter((i) => !(0, __stryke_type_checks_is_string.isString)(i) && i.default).length > 0 && imported.filter((i) => (0, __stryke_type_checks_is_string.isString)(i) || !i.default).length > 0 ? ", " : "") + (imported.filter((i) => (0, __stryke_type_checks_is_string.isString)(i) || !i.default).length > 0 ? `{ ${imported.map((i) => (0, __stryke_type_checks_is_string.isString)(i) ? i : i.alias ? `${i.name} as ${i.alias}` : i.name).join(", ")} }` : "")} from "${module$1}";`;
127
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__alloy_js_core.For, {
128
+ each: Object.entries(imports ?? {}),
129
+ children: ([module$1, imported]) => {
130
+ if (module$1 === "$builtins") return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__alloy_js_core.For, {
131
+ each: Object.entries(imported ?? {}),
132
+ children: ([builtinModule, builtinImports]) => __alloy_js_core.code`import ${builtinImports === null ? "" : ` from ${builtinImports.filter((i) => !(0, __stryke_type_checks_is_string.isString)(i) && i.default).map((i) => i.alias ? i.alias : i.name).join(", ") + (builtinImports.filter((i) => !(0, __stryke_type_checks_is_string.isString)(i) && i.default).length > 0 && builtinImports.filter((i) => (0, __stryke_type_checks_is_string.isString)(i) || !i.default).length > 0 ? ", " : "") + (builtinImports.filter((i) => (0, __stryke_type_checks_is_string.isString)(i) || !i.default).length > 0 ? `{ ${builtinImports.map((i) => (0, __stryke_type_checks_is_string.isString)(i) ? i : i.alias ? `${i.name} as ${i.alias}` : i.name).join(", ")} }` : "")} `} "${builtinModule.includes(":") ? builtinModule : `${context.config.output.builtinPrefix}:${builtinModule}`}";`
133
+ });
134
+ const normalImports = imported;
135
+ return __alloy_js_core.code`import ${normalImports === null ? "" : ` from ${normalImports.filter((i) => !(0, __stryke_type_checks_is_string.isString)(i) && i.default).map((i) => i.alias ? i.alias : i.name).join(", ") + (normalImports.filter((i) => !(0, __stryke_type_checks_is_string.isString)(i) && i.default).length > 0 && normalImports.filter((i) => (0, __stryke_type_checks_is_string.isString)(i) || !i.default).length > 0 ? ", " : "") + (normalImports.filter((i) => (0, __stryke_type_checks_is_string.isString)(i) || !i.default).length > 0 ? `{ ${normalImports.map((i) => (0, __stryke_type_checks_is_string.isString)(i) ? i : i.alias ? `${i.name} as ${i.alias}` : i.name).join(", ")} }` : "")} `} "${module$1}";`;
136
+ }
129
137
  })
130
138
  }),
131
139
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__alloy_js_core.Show, {
@@ -1,7 +1,7 @@
1
1
  import { usePowerlines } from "../../core/contexts/context.mjs";
2
2
  import { SingleLineComment } from "../../core/components/single-line-comment.mjs";
3
3
  import { SourceFile } from "../../core/components/source-file.mjs";
4
- import { Scope, Show, SourceDirectoryContext, code, splitProps, useContext, useScope } from "@alloy-js/core";
4
+ import { For, Scope, Show, SourceDirectoryContext, code, splitProps, useContext, useScope } from "@alloy-js/core";
5
5
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
6
6
  import { appendPath } from "@stryke/path/append";
7
7
  import { titleCase } from "@stryke/string-format/title-case";
@@ -123,8 +123,16 @@ function TypescriptFileHeaderImports(props) {
123
123
  children: [
124
124
  /* @__PURE__ */ jsx(Show, {
125
125
  when: !!imports && Object.keys(imports).length > 0,
126
- children: Object.entries(imports ?? {}).filter(([key]) => key !== "$builtins").concat(imports && imports.$builtins ? Object.entries(imports.$builtins).map(([key, entry]) => [key.includes(":") ? key : `${context.config.output.builtinPrefix}:${key}`, entry]) : []).map(([module, imported]) => {
127
- return code`import ${imported === null ? "" : imported.filter((i) => !isString(i) && i.default).map((i) => i.alias ? i.alias : i.name).join(", ") + (imported.filter((i) => !isString(i) && i.default).length > 0 && imported.filter((i) => isString(i) || !i.default).length > 0 ? ", " : "") + (imported.filter((i) => isString(i) || !i.default).length > 0 ? `{ ${imported.map((i) => isString(i) ? i : i.alias ? `${i.name} as ${i.alias}` : i.name).join(", ")} }` : "")} from "${module}";`;
126
+ children: /* @__PURE__ */ jsx(For, {
127
+ each: Object.entries(imports ?? {}),
128
+ children: ([module, imported]) => {
129
+ if (module === "$builtins") return /* @__PURE__ */ jsx(For, {
130
+ each: Object.entries(imported ?? {}),
131
+ children: ([builtinModule, builtinImports]) => code`import ${builtinImports === null ? "" : ` from ${builtinImports.filter((i) => !isString(i) && i.default).map((i) => i.alias ? i.alias : i.name).join(", ") + (builtinImports.filter((i) => !isString(i) && i.default).length > 0 && builtinImports.filter((i) => isString(i) || !i.default).length > 0 ? ", " : "") + (builtinImports.filter((i) => isString(i) || !i.default).length > 0 ? `{ ${builtinImports.map((i) => isString(i) ? i : i.alias ? `${i.name} as ${i.alias}` : i.name).join(", ")} }` : "")} `} "${builtinModule.includes(":") ? builtinModule : `${context.config.output.builtinPrefix}:${builtinModule}`}";`
132
+ });
133
+ const normalImports = imported;
134
+ return code`import ${normalImports === null ? "" : ` from ${normalImports.filter((i) => !isString(i) && i.default).map((i) => i.alias ? i.alias : i.name).join(", ") + (normalImports.filter((i) => !isString(i) && i.default).length > 0 && normalImports.filter((i) => isString(i) || !i.default).length > 0 ? ", " : "") + (normalImports.filter((i) => isString(i) || !i.default).length > 0 ? `{ ${normalImports.map((i) => isString(i) ? i : i.alias ? `${i.name} as ${i.alias}` : i.name).join(", ")} }` : "")} `} "${module}";`;
135
+ }
128
136
  })
129
137
  }),
130
138
  /* @__PURE__ */ jsx(Show, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@powerlines/plugin-crypto",
3
- "version": "0.10.110",
3
+ "version": "0.10.112",
4
4
  "type": "module",
5
5
  "description": "A Powerlines plugin that provides unique identifier generation capabilities at runtime by adding the `id` builtin module.",
6
6
  "repository": {
@@ -128,17 +128,17 @@
128
128
  "files": ["dist/**/*"],
129
129
  "keywords": ["powerlines", "storm-software", "powerlines-plugin"],
130
130
  "dependencies": {
131
- "@powerlines/plugin-env": "^0.15.7",
131
+ "@powerlines/plugin-env": "^0.15.9",
132
132
  "@storm-software/config-tools": "^1.188.75",
133
133
  "@stryke/path": "^0.24.1",
134
134
  "defu": "^6.1.4",
135
- "powerlines": "^0.36.28",
135
+ "powerlines": "^0.36.29",
136
136
  "@noble/ciphers": "^2.1.1"
137
137
  },
138
138
  "devDependencies": {
139
- "@powerlines/nx": "^0.11.54",
139
+ "@powerlines/nx": "^0.11.55",
140
140
  "@types/node": "^24.10.4"
141
141
  },
142
142
  "publishConfig": { "access": "public" },
143
- "gitHead": "5508777068c1287271c2943364aa9c86c56c5ff0"
143
+ "gitHead": "8c096ca8c2383603e770532ec0f828761d525947"
144
144
  }