@powerlines/plugin-date 0.12.138 → 0.12.139
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
|
}),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@powerlines/plugin-date",
|
|
3
|
-
"version": "0.12.
|
|
3
|
+
"version": "0.12.139",
|
|
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.1",
|
|
132
132
|
"@storm-software/config-tools": "^1.188.75",
|
|
133
133
|
"@stryke/path": "^0.24.1",
|
|
134
134
|
"powerlines": "^0.36.26"
|
|
@@ -138,5 +138,5 @@
|
|
|
138
138
|
"@types/node": "^24.10.4"
|
|
139
139
|
},
|
|
140
140
|
"publishConfig": { "access": "public" },
|
|
141
|
-
"gitHead": "
|
|
141
|
+
"gitHead": "b9a0574767447bffa6549e0492812dfe64e879e3"
|
|
142
142
|
}
|