@powerlines/plugin-crypto 0.10.103 → 0.10.105

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.
@@ -116,6 +116,7 @@ function TypescriptFileHeader(props) {
116
116
  */
117
117
  function TypescriptFileHeaderImports(props) {
118
118
  const { imports } = props;
119
+ const context = require_context.usePowerlines();
119
120
  const sourceFile = (0, __alloy_js_typescript.useSourceFile)();
120
121
  const scope = props.scope ?? sourceFile.scope;
121
122
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(__alloy_js_core.Show, {
@@ -123,7 +124,7 @@ function TypescriptFileHeaderImports(props) {
123
124
  children: [
124
125
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__alloy_js_core.Show, {
125
126
  when: !!imports && Object.keys(imports).length > 0,
126
- children: Object.entries(imports ?? {}).map(([module$1, imported]) => {
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]) => {
127
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}";`;
128
129
  })
129
130
  }),
@@ -115,6 +115,7 @@ function TypescriptFileHeader(props) {
115
115
  */
116
116
  function TypescriptFileHeaderImports(props) {
117
117
  const { imports } = props;
118
+ const context = usePowerlines();
118
119
  const sourceFile = useSourceFile();
119
120
  const scope = props.scope ?? sourceFile.scope;
120
121
  return /* @__PURE__ */ jsxs(Show, {
@@ -122,7 +123,7 @@ function TypescriptFileHeaderImports(props) {
122
123
  children: [
123
124
  /* @__PURE__ */ jsx(Show, {
124
125
  when: !!imports && Object.keys(imports).length > 0,
125
- children: Object.entries(imports ?? {}).map(([module, imported]) => {
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]) => {
126
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}";`;
127
128
  })
128
129
  }),
@@ -143,7 +143,7 @@ const envSerializerRefkey = require_refkey.refkey("EnvSerializer");
143
143
  * Generates the environment configuration module for the Powerlines project.
144
144
  */
145
145
  function EnvBuiltin(props) {
146
- const [{ defaultConfig }, rest] = (0, __alloy_js_core.splitProps)(props, ["defaultConfig"]);
146
+ const [{ defaultConfig, children }, rest] = (0, __alloy_js_core.splitProps)(props, ["defaultConfig", "children"]);
147
147
  const context = require_context.usePowerlines();
148
148
  const defaultValue = (0, __alloy_js_core.computed)(() => context && require_load.loadEnvFromContext(context, process.env));
149
149
  const reflection = require_create_reflection_resource.createReflectionResource(context);
@@ -157,9 +157,9 @@ function EnvBuiltin(props) {
157
157
  const reflectionGetProperties = (0, __alloy_js_core.computed)(() => reflection.data?.getProperties().filter((property) => !property.isIgnored()).sort((a, b) => a.getNameAsString().localeCompare(b.getNameAsString())) ?? []);
158
158
  const reflectionSetProperties = (0, __alloy_js_core.computed)(() => reflection.data?.getProperties().filter((property) => !property.isIgnored() && !property.isReadonly()).sort((a, b) => a.getNameAsString().localeCompare(b.getNameAsString())) ?? []);
159
159
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_builtin_file.BuiltinFile, {
160
- ...rest,
161
160
  id: "env",
162
161
  description: "The Powerlines environment configuration module provides an interface to define environment configuration parameters.",
162
+ ...rest,
163
163
  imports: (0, defu.default)({
164
164
  "@powerlines/deepkit/vendor/type": [
165
165
  "Type",
@@ -473,7 +473,11 @@ function EnvBuiltin(props) {
473
473
  initializer: __alloy_js_core.code`Boolean(isDevelopment && env.DEBUG); `
474
474
  }),
475
475
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)("hbr", {}),
476
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("hbr", {})
476
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("hbr", {}),
477
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__alloy_js_core.Show, {
478
+ when: Boolean(children),
479
+ children
480
+ })
477
481
  ]
478
482
  });
479
483
  }
@@ -141,7 +141,7 @@ const envSerializerRefkey = refkey$1("EnvSerializer");
141
141
  * Generates the environment configuration module for the Powerlines project.
142
142
  */
143
143
  function EnvBuiltin(props) {
144
- const [{ defaultConfig }, rest] = splitProps(props, ["defaultConfig"]);
144
+ const [{ defaultConfig, children }, rest] = splitProps(props, ["defaultConfig", "children"]);
145
145
  const context = usePowerlines();
146
146
  const defaultValue = computed(() => context && loadEnvFromContext(context, process.env));
147
147
  const reflection = createReflectionResource(context);
@@ -155,9 +155,9 @@ function EnvBuiltin(props) {
155
155
  const reflectionGetProperties = computed(() => reflection.data?.getProperties().filter((property) => !property.isIgnored()).sort((a, b) => a.getNameAsString().localeCompare(b.getNameAsString())) ?? []);
156
156
  const reflectionSetProperties = computed(() => reflection.data?.getProperties().filter((property) => !property.isIgnored() && !property.isReadonly()).sort((a, b) => a.getNameAsString().localeCompare(b.getNameAsString())) ?? []);
157
157
  return /* @__PURE__ */ jsxs(BuiltinFile, {
158
- ...rest,
159
158
  id: "env",
160
159
  description: "The Powerlines environment configuration module provides an interface to define environment configuration parameters.",
160
+ ...rest,
161
161
  imports: defu({
162
162
  "@powerlines/deepkit/vendor/type": [
163
163
  "Type",
@@ -471,7 +471,11 @@ function EnvBuiltin(props) {
471
471
  initializer: code`Boolean(isDevelopment && env.DEBUG); `
472
472
  }),
473
473
  /* @__PURE__ */ jsx("hbr", {}),
474
- /* @__PURE__ */ jsx("hbr", {})
474
+ /* @__PURE__ */ jsx("hbr", {}),
475
+ /* @__PURE__ */ jsx(Show, {
476
+ when: Boolean(children),
477
+ children
478
+ })
475
479
  ]
476
480
  });
477
481
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@powerlines/plugin-crypto",
3
- "version": "0.10.103",
3
+ "version": "0.10.105",
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,7 +128,7 @@
128
128
  "files": ["dist/**/*"],
129
129
  "keywords": ["powerlines", "storm-software", "powerlines-plugin"],
130
130
  "dependencies": {
131
- "@powerlines/plugin-env": "^0.15.0",
131
+ "@powerlines/plugin-env": "^0.15.2",
132
132
  "@storm-software/config-tools": "^1.188.75",
133
133
  "@stryke/path": "^0.24.1",
134
134
  "defu": "^6.1.4",
@@ -140,5 +140,5 @@
140
140
  "@types/node": "^24.10.4"
141
141
  },
142
142
  "publishConfig": { "access": "public" },
143
- "gitHead": "41988f81e266a609148fcac22a535e5f12bbeb5f"
143
+ "gitHead": "936b3cc1d4bba49e2ddfa38662e37868d0a30fd6"
144
144
  }