@powerlines/plugin-date 0.12.146 → 0.12.147
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:
|
|
128
|
-
|
|
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:
|
|
127
|
-
|
|
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-date",
|
|
3
|
-
"version": "0.12.
|
|
3
|
+
"version": "0.12.147",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A package containing a Powerlines plugin for injecting static .env configuration values to the code so that they're accessible at runtime.",
|
|
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.
|
|
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
|
"powerlines": "^0.36.29"
|
|
@@ -138,5 +138,5 @@
|
|
|
138
138
|
"@types/node": "^24.10.4"
|
|
139
139
|
},
|
|
140
140
|
"publishConfig": { "access": "public" },
|
|
141
|
-
"gitHead": "
|
|
141
|
+
"gitHead": "8c096ca8c2383603e770532ec0f828761d525947"
|
|
142
142
|
}
|