@powerlines/plugin-date 0.12.767 → 0.12.770
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.
- package/README.md +33 -0
- package/dist/{env-Bufdqf3p.d.cts → env-T8_W2CDj.d.cts} +1 -3
- package/dist/env-T8_W2CDj.d.cts.map +1 -0
- package/dist/{env-Bufdqf3p.d.mts → env-T8_W2CDj.d.mts} +1 -3
- package/dist/env-T8_W2CDj.d.mts.map +1 -0
- package/dist/index.cjs +8 -15
- package/dist/index.d.cts +1 -13
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +1 -13
- package/dist/index.mjs +6 -12
- package/dist/types/env.d.cts +1 -1
- package/dist/types/env.d.mts +1 -1
- package/dist/types/index.d.cts +1 -1
- package/dist/types/index.d.mts +1 -1
- package/dist/types/plugin.d.cts +0 -2
- package/dist/types/plugin.d.cts.map +1 -1
- package/dist/types/plugin.d.mts +0 -2
- package/package.json +7 -7
- package/dist/env-Bufdqf3p.d.cts.map +0 -1
- package/dist/env-Bufdqf3p.d.mts.map +0 -1
package/README.md
CHANGED
|
@@ -78,6 +78,39 @@ Huge thanks to [dmtrKovalenko](https://github.com/dmtrKovalenko) for their work
|
|
|
78
78
|
|
|
79
79
|
<!-- END doctoc -->
|
|
80
80
|
|
|
81
|
+
## Features
|
|
82
|
+
|
|
83
|
+
- Injects a consistent date interface at build time across `date-fns`, `dayjs`, `luxon`, and `moment.js`
|
|
84
|
+
- Emits the matching date module as the `date` builtin during `prepare`
|
|
85
|
+
- Pins the selected date library as a dependency; resolved config requires `type` and `defaultLocale`
|
|
86
|
+
- Composes the `env` plugin for configuration values
|
|
87
|
+
|
|
88
|
+
## Usage
|
|
89
|
+
|
|
90
|
+
Install the plugin:
|
|
91
|
+
|
|
92
|
+
```bash
|
|
93
|
+
pnpm add @powerlines/plugin-date
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
Register it in `powerlines.config.ts`:
|
|
97
|
+
|
|
98
|
+
```ts
|
|
99
|
+
import { defineConfig } from "powerlines";
|
|
100
|
+
import { plugin as date } from "@powerlines/plugin-date";
|
|
101
|
+
|
|
102
|
+
export default defineConfig({
|
|
103
|
+
plugins: [
|
|
104
|
+
date({
|
|
105
|
+
type: "date-fns",
|
|
106
|
+
defaultLocale: "en-US"
|
|
107
|
+
})
|
|
108
|
+
]
|
|
109
|
+
});
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
Run the Powerlines build for your project to activate the plugin.
|
|
113
|
+
|
|
81
114
|
## Installing
|
|
82
115
|
|
|
83
116
|
Using [pnpm](http://pnpm.io):
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
//#region src/types/env.d.ts
|
|
2
1
|
/**
|
|
3
2
|
* The various types of date formats used in Storm Stack applications.
|
|
4
3
|
*/
|
|
@@ -704,6 +703,5 @@ interface PowerlinesDateInterface<TDate, TLocale> {
|
|
|
704
703
|
*/
|
|
705
704
|
getMeridiemText: (meridiem: "am" | "pm") => string;
|
|
706
705
|
}
|
|
707
|
-
//#endregion
|
|
708
706
|
export { PowerlinesDateInterface as n, TimeUnit as r, DateFormats as t };
|
|
709
|
-
//# sourceMappingURL=env-
|
|
707
|
+
//# sourceMappingURL=env-T8_W2CDj.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"env-T8_W2CDj.d.cts","names":[],"sources":["../src/types/env.ts"],"mappings":";;;UAqBiB,YAAY;;;;;;EAM3B,UAAU;;;;;;EAOV,qBAAqB;;;;;;EAOrB,YAAY;;;;;;EAOZ,uBAAuB;;;;;;EAOvB,WAAW;;;;;;EAOX,MAAM;;;;;;EAON,OAAO;;;;;;EAOP,YAAY;;;;;;EAOZ,cAAc;;;;;;EAOd,cAAc;;;;;;EAOd,SAAS;;;;;;EAOT,cAAc;;;;;;EAOd,YAAY;;;;;;EAOZ,UAAU;;;;;;EAOV,UAAU;;;;;;EAOV,SAAS;;;;;;EAOT,SAAS;;;;;;EAOT,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mBAAmB,MAAM,OAAO,MAAM,UAAU;;;;;;EAOhD;;;;;;;EAQA,eAAe,MAAM,UAAU;;;;;;;;EAS/B,eAAe,OAAO,OAAO,KAAK,UAAU;;;;;;;EAQ5C,kBAAkB"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
//#region src/types/env.d.ts
|
|
2
1
|
/**
|
|
3
2
|
* The various types of date formats used in Storm Stack applications.
|
|
4
3
|
*/
|
|
@@ -704,6 +703,5 @@ interface PowerlinesDateInterface<TDate, TLocale> {
|
|
|
704
703
|
*/
|
|
705
704
|
getMeridiemText: (meridiem: "am" | "pm") => string;
|
|
706
705
|
}
|
|
707
|
-
//#endregion
|
|
708
706
|
export { PowerlinesDateInterface as n, TimeUnit as r, DateFormats as t };
|
|
709
|
-
//# sourceMappingURL=env-
|
|
707
|
+
//# sourceMappingURL=env-T8_W2CDj.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"env-T8_W2CDj.d.mts","names":[],"sources":["../src/types/env.ts"],"mappings":""}
|
package/dist/index.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
-
|
|
2
|
+
// \0rolldown/runtime.js
|
|
3
3
|
var __create = Object.create;
|
|
4
4
|
var __defProp = Object.defineProperty;
|
|
5
5
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
@@ -25,15 +25,14 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
25
25
|
enumerable: true
|
|
26
26
|
}) : target, mod));
|
|
27
27
|
|
|
28
|
-
|
|
29
|
-
require('./types/index.cjs');
|
|
28
|
+
require("./types/index.cjs");
|
|
30
29
|
let _powerlines_plugin_env = require("@powerlines/plugin-env");
|
|
31
30
|
let powerlines_utils = require("powerlines/utils");
|
|
32
31
|
let _powerlines_plugin_env_schemas_env = require("@powerlines/plugin-env/schemas/env");
|
|
33
32
|
let zod = require("zod");
|
|
34
33
|
zod = __toESM(zod, 1);
|
|
35
34
|
|
|
36
|
-
|
|
35
|
+
// src/components/date-fns.ts
|
|
37
36
|
/**
|
|
38
37
|
* Generates the Powerlines configuration file.
|
|
39
38
|
*
|
|
@@ -556,8 +555,7 @@ export function getYearRange(start: Date, end: Date) {
|
|
|
556
555
|
`;
|
|
557
556
|
}
|
|
558
557
|
|
|
559
|
-
|
|
560
|
-
//#region src/components/dayjs.ts
|
|
558
|
+
// src/components/dayjs.ts
|
|
561
559
|
/**
|
|
562
560
|
* Generates the Powerlines configuration file.
|
|
563
561
|
*
|
|
@@ -1026,8 +1024,7 @@ export function isWithinRange(date: Dayjs, [start, end]: [Dayjs, Dayjs]) {
|
|
|
1026
1024
|
`;
|
|
1027
1025
|
}
|
|
1028
1026
|
|
|
1029
|
-
|
|
1030
|
-
//#region src/components/luxon.ts
|
|
1027
|
+
// src/components/luxon.ts
|
|
1031
1028
|
/**
|
|
1032
1029
|
* Generates the Powerlines configuration file.
|
|
1033
1030
|
*
|
|
@@ -1500,8 +1497,7 @@ export function isWithinRange(date: DateTime, [start, end]: [DateTime, DateTime]
|
|
|
1500
1497
|
`;
|
|
1501
1498
|
}
|
|
1502
1499
|
|
|
1503
|
-
|
|
1504
|
-
//#region src/components/moment.ts
|
|
1500
|
+
// src/components/moment.ts
|
|
1505
1501
|
/**
|
|
1506
1502
|
* Generates the Powerlines configuration file.
|
|
1507
1503
|
*
|
|
@@ -1960,8 +1956,7 @@ export function isWithinRange(date: Moment, [start, end]: [Moment, Moment]) {
|
|
|
1960
1956
|
`;
|
|
1961
1957
|
}
|
|
1962
1958
|
|
|
1963
|
-
|
|
1964
|
-
//#region src/schemas/env.ts
|
|
1959
|
+
// src/schemas/env.ts
|
|
1965
1960
|
/**
|
|
1966
1961
|
* Zod schema for date plugin environment variables.
|
|
1967
1962
|
*/
|
|
@@ -1970,8 +1965,7 @@ const dateEnvSchema = _powerlines_plugin_env_schemas_env.envSchema.extend({ LOCA
|
|
|
1970
1965
|
runtime: true
|
|
1971
1966
|
}) });
|
|
1972
1967
|
|
|
1973
|
-
|
|
1974
|
-
//#region src/index.ts
|
|
1968
|
+
// src/index.ts
|
|
1975
1969
|
/**
|
|
1976
1970
|
* A Powerlines plugin to assist in developing other Powerlines plugins.
|
|
1977
1971
|
*/
|
|
@@ -2019,7 +2013,6 @@ function plugin(options = {}) {
|
|
|
2019
2013
|
}];
|
|
2020
2014
|
}
|
|
2021
2015
|
|
|
2022
|
-
//#endregion
|
|
2023
2016
|
exports.dateEnvSchema = dateEnvSchema;
|
|
2024
2017
|
exports.dateFnsModule = dateFnsModule;
|
|
2025
2018
|
exports.dayjsModule = dayjsModule;
|
package/dist/index.d.cts
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { DateLibraryType, DatePluginContext, DatePluginOptions, DatePluginResolvedConfig, DatePluginUserConfig } from "./types/plugin.cjs";
|
|
2
|
-
import { n as PowerlinesDateInterface, r as TimeUnit, t as DateFormats } from "./env-
|
|
2
|
+
import { n as PowerlinesDateInterface, r as TimeUnit, t as DateFormats } from "./env-T8_W2CDj.cjs";
|
|
3
3
|
import "./types/index.cjs";
|
|
4
4
|
import { Plugin } from "powerlines";
|
|
5
5
|
import * as z from "zod";
|
|
6
|
-
//#region src/components/date-fns.d.ts
|
|
7
6
|
/**
|
|
8
7
|
* Generates the Powerlines configuration file.
|
|
9
8
|
*
|
|
@@ -11,8 +10,6 @@ import * as z from "zod";
|
|
|
11
10
|
* @returns A string representing the configuration file content.
|
|
12
11
|
*/
|
|
13
12
|
declare function dateFnsModule(context: DatePluginContext): string;
|
|
14
|
-
//#endregion
|
|
15
|
-
//#region src/components/dayjs.d.ts
|
|
16
13
|
/**
|
|
17
14
|
* Generates the Powerlines configuration file.
|
|
18
15
|
*
|
|
@@ -20,8 +17,6 @@ declare function dateFnsModule(context: DatePluginContext): string;
|
|
|
20
17
|
* @returns A string representing the configuration file content.
|
|
21
18
|
*/
|
|
22
19
|
declare function dayjsModule(context: DatePluginContext): string;
|
|
23
|
-
//#endregion
|
|
24
|
-
//#region src/components/luxon.d.ts
|
|
25
20
|
/**
|
|
26
21
|
* Generates the Powerlines configuration file.
|
|
27
22
|
*
|
|
@@ -29,8 +24,6 @@ declare function dayjsModule(context: DatePluginContext): string;
|
|
|
29
24
|
* @returns A string representing the configuration file content.
|
|
30
25
|
*/
|
|
31
26
|
declare function luxonModule(context: DatePluginContext): string;
|
|
32
|
-
//#endregion
|
|
33
|
-
//#region src/components/moment.d.ts
|
|
34
27
|
/**
|
|
35
28
|
* Generates the Powerlines configuration file.
|
|
36
29
|
*
|
|
@@ -38,8 +31,6 @@ declare function luxonModule(context: DatePluginContext): string;
|
|
|
38
31
|
* @returns A string representing the configuration file content.
|
|
39
32
|
*/
|
|
40
33
|
declare function momentModule(context: DatePluginContext): string;
|
|
41
|
-
//#endregion
|
|
42
|
-
//#region src/schemas/env.d.ts
|
|
43
34
|
/**
|
|
44
35
|
* Zod schema for date plugin environment variables.
|
|
45
36
|
*/
|
|
@@ -167,8 +158,6 @@ declare const dateEnvSchema: z.ZodObject<{
|
|
|
167
158
|
* Inferred date environment configuration type from {@link dateEnvSchema}.
|
|
168
159
|
*/
|
|
169
160
|
type DateEnv = z.infer<typeof dateEnvSchema>;
|
|
170
|
-
//#endregion
|
|
171
|
-
//#region src/index.d.ts
|
|
172
161
|
declare module "powerlines" {
|
|
173
162
|
interface Config {
|
|
174
163
|
date?: DatePluginOptions;
|
|
@@ -178,6 +167,5 @@ declare module "powerlines" {
|
|
|
178
167
|
* A Powerlines plugin to assist in developing other Powerlines plugins.
|
|
179
168
|
*/
|
|
180
169
|
declare function plugin<TContext extends DatePluginContext = DatePluginContext>(options?: DatePluginOptions): Plugin<TContext>[];
|
|
181
|
-
//#endregion
|
|
182
170
|
export { DateEnv, DateFormats, DateLibraryType, DatePluginContext, DatePluginOptions, DatePluginResolvedConfig, DatePluginUserConfig, PowerlinesDateInterface, TimeUnit, dateEnvSchema, dateFnsModule, dayjsModule, luxonModule, momentModule, plugin };
|
|
183
171
|
//# sourceMappingURL=index.d.cts.map
|
package/dist/index.d.cts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.cts","names":[],"sources":["../src/components/date-fns.ts","../src/components/dayjs.ts","../src/components/luxon.ts","../src/components/moment.ts","../src/schemas/env.ts","../src/index.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.cts","names":[],"sources":["../src/components/date-fns.ts","../src/components/dayjs.ts","../src/components/luxon.ts","../src/components/moment.ts","../src/schemas/env.ts","../src/index.ts"],"mappings":";;;;;;;;;;;iBA2BgB,cAAc,SAAS;;;;;;;iBCAvB,YAAY,SAAS;;;;;;;iBCArB,YAAY,SAAS;;;;;;;iBCArB,aAAa,SAAS;;;;cCHzB,eAAa,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAMxB,EAAA,KAAA;;;;KAKU,UAAU,EAAE,aAAa;;YCAzB;IACR,OAAO;;;;;;iBAOK,OAAO,iBAAiB,oBAAoB,mBAC1D,UAAS,oBAyEJ,OAAO"}
|
package/dist/index.d.mts
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { DateLibraryType, DatePluginContext, DatePluginOptions, DatePluginResolvedConfig, DatePluginUserConfig } from "./types/plugin.mjs";
|
|
2
|
-
import { n as PowerlinesDateInterface, r as TimeUnit, t as DateFormats } from "./env-
|
|
2
|
+
import { n as PowerlinesDateInterface, r as TimeUnit, t as DateFormats } from "./env-T8_W2CDj.mjs";
|
|
3
3
|
import "./types/index.mjs";
|
|
4
4
|
import * as z from "zod";
|
|
5
5
|
import { Plugin } from "powerlines";
|
|
6
|
-
//#region src/components/date-fns.d.ts
|
|
7
6
|
/**
|
|
8
7
|
* Generates the Powerlines configuration file.
|
|
9
8
|
*
|
|
@@ -11,8 +10,6 @@ import { Plugin } from "powerlines";
|
|
|
11
10
|
* @returns A string representing the configuration file content.
|
|
12
11
|
*/
|
|
13
12
|
declare function dateFnsModule(context: DatePluginContext): string;
|
|
14
|
-
//#endregion
|
|
15
|
-
//#region src/components/dayjs.d.ts
|
|
16
13
|
/**
|
|
17
14
|
* Generates the Powerlines configuration file.
|
|
18
15
|
*
|
|
@@ -20,8 +17,6 @@ declare function dateFnsModule(context: DatePluginContext): string;
|
|
|
20
17
|
* @returns A string representing the configuration file content.
|
|
21
18
|
*/
|
|
22
19
|
declare function dayjsModule(context: DatePluginContext): string;
|
|
23
|
-
//#endregion
|
|
24
|
-
//#region src/components/luxon.d.ts
|
|
25
20
|
/**
|
|
26
21
|
* Generates the Powerlines configuration file.
|
|
27
22
|
*
|
|
@@ -29,8 +24,6 @@ declare function dayjsModule(context: DatePluginContext): string;
|
|
|
29
24
|
* @returns A string representing the configuration file content.
|
|
30
25
|
*/
|
|
31
26
|
declare function luxonModule(context: DatePluginContext): string;
|
|
32
|
-
//#endregion
|
|
33
|
-
//#region src/components/moment.d.ts
|
|
34
27
|
/**
|
|
35
28
|
* Generates the Powerlines configuration file.
|
|
36
29
|
*
|
|
@@ -38,8 +31,6 @@ declare function luxonModule(context: DatePluginContext): string;
|
|
|
38
31
|
* @returns A string representing the configuration file content.
|
|
39
32
|
*/
|
|
40
33
|
declare function momentModule(context: DatePluginContext): string;
|
|
41
|
-
//#endregion
|
|
42
|
-
//#region src/schemas/env.d.ts
|
|
43
34
|
/**
|
|
44
35
|
* Zod schema for date plugin environment variables.
|
|
45
36
|
*/
|
|
@@ -167,8 +158,6 @@ declare const dateEnvSchema: z.ZodObject<{
|
|
|
167
158
|
* Inferred date environment configuration type from {@link dateEnvSchema}.
|
|
168
159
|
*/
|
|
169
160
|
type DateEnv = z.infer<typeof dateEnvSchema>;
|
|
170
|
-
//#endregion
|
|
171
|
-
//#region src/index.d.ts
|
|
172
161
|
declare module "powerlines" {
|
|
173
162
|
interface Config {
|
|
174
163
|
date?: DatePluginOptions;
|
|
@@ -178,6 +167,5 @@ declare module "powerlines" {
|
|
|
178
167
|
* A Powerlines plugin to assist in developing other Powerlines plugins.
|
|
179
168
|
*/
|
|
180
169
|
declare function plugin<TContext extends DatePluginContext = DatePluginContext>(options?: DatePluginOptions): Plugin<TContext>[];
|
|
181
|
-
//#endregion
|
|
182
170
|
export { DateEnv, DateFormats, DateLibraryType, DatePluginContext, DatePluginOptions, DatePluginResolvedConfig, DatePluginUserConfig, PowerlinesDateInterface, TimeUnit, dateEnvSchema, dateFnsModule, dayjsModule, luxonModule, momentModule, plugin };
|
|
183
171
|
//# sourceMappingURL=index.d.mts.map
|
package/dist/index.mjs
CHANGED
|
@@ -4,7 +4,7 @@ import { getTypescriptFileHeader } from "powerlines/utils";
|
|
|
4
4
|
import { envSchema } from "@powerlines/plugin-env/schemas/env";
|
|
5
5
|
import * as z from "zod";
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
// src/components/date-fns.ts
|
|
8
8
|
/**
|
|
9
9
|
* Generates the Powerlines configuration file.
|
|
10
10
|
*
|
|
@@ -527,8 +527,7 @@ export function getYearRange(start: Date, end: Date) {
|
|
|
527
527
|
`;
|
|
528
528
|
}
|
|
529
529
|
|
|
530
|
-
|
|
531
|
-
//#region src/components/dayjs.ts
|
|
530
|
+
// src/components/dayjs.ts
|
|
532
531
|
/**
|
|
533
532
|
* Generates the Powerlines configuration file.
|
|
534
533
|
*
|
|
@@ -997,8 +996,7 @@ export function isWithinRange(date: Dayjs, [start, end]: [Dayjs, Dayjs]) {
|
|
|
997
996
|
`;
|
|
998
997
|
}
|
|
999
998
|
|
|
1000
|
-
|
|
1001
|
-
//#region src/components/luxon.ts
|
|
999
|
+
// src/components/luxon.ts
|
|
1002
1000
|
/**
|
|
1003
1001
|
* Generates the Powerlines configuration file.
|
|
1004
1002
|
*
|
|
@@ -1471,8 +1469,7 @@ export function isWithinRange(date: DateTime, [start, end]: [DateTime, DateTime]
|
|
|
1471
1469
|
`;
|
|
1472
1470
|
}
|
|
1473
1471
|
|
|
1474
|
-
|
|
1475
|
-
//#region src/components/moment.ts
|
|
1472
|
+
// src/components/moment.ts
|
|
1476
1473
|
/**
|
|
1477
1474
|
* Generates the Powerlines configuration file.
|
|
1478
1475
|
*
|
|
@@ -1931,8 +1928,7 @@ export function isWithinRange(date: Moment, [start, end]: [Moment, Moment]) {
|
|
|
1931
1928
|
`;
|
|
1932
1929
|
}
|
|
1933
1930
|
|
|
1934
|
-
|
|
1935
|
-
//#region src/schemas/env.ts
|
|
1931
|
+
// src/schemas/env.ts
|
|
1936
1932
|
/**
|
|
1937
1933
|
* Zod schema for date plugin environment variables.
|
|
1938
1934
|
*/
|
|
@@ -1941,8 +1937,7 @@ const dateEnvSchema = envSchema.extend({ LOCALE: z.string().optional().meta({
|
|
|
1941
1937
|
runtime: true
|
|
1942
1938
|
}) });
|
|
1943
1939
|
|
|
1944
|
-
|
|
1945
|
-
//#region src/index.ts
|
|
1940
|
+
// src/index.ts
|
|
1946
1941
|
/**
|
|
1947
1942
|
* A Powerlines plugin to assist in developing other Powerlines plugins.
|
|
1948
1943
|
*/
|
|
@@ -1990,6 +1985,5 @@ function plugin(options = {}) {
|
|
|
1990
1985
|
}];
|
|
1991
1986
|
}
|
|
1992
1987
|
|
|
1993
|
-
//#endregion
|
|
1994
1988
|
export { dateEnvSchema, dateFnsModule, dayjsModule, luxonModule, momentModule, plugin };
|
|
1995
1989
|
//# sourceMappingURL=index.mjs.map
|
package/dist/types/env.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as PowerlinesDateInterface, r as TimeUnit, t as DateFormats } from "../env-
|
|
1
|
+
import { n as PowerlinesDateInterface, r as TimeUnit, t as DateFormats } from "../env-T8_W2CDj.cjs";
|
|
2
2
|
export { DateFormats, PowerlinesDateInterface, TimeUnit };
|
package/dist/types/env.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as PowerlinesDateInterface, r as TimeUnit, t as DateFormats } from "../env-
|
|
1
|
+
import { n as PowerlinesDateInterface, r as TimeUnit, t as DateFormats } from "../env-T8_W2CDj.mjs";
|
|
2
2
|
export { DateFormats, PowerlinesDateInterface, TimeUnit };
|
package/dist/types/index.d.cts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { DateLibraryType, DatePluginContext, DatePluginOptions, DatePluginResolvedConfig, DatePluginUserConfig } from "./plugin.cjs";
|
|
2
|
-
import { n as PowerlinesDateInterface, r as TimeUnit, t as DateFormats } from "../env-
|
|
2
|
+
import { n as PowerlinesDateInterface, r as TimeUnit, t as DateFormats } from "../env-T8_W2CDj.cjs";
|
|
3
3
|
export { DateFormats, DateLibraryType, DatePluginContext, DatePluginOptions, DatePluginResolvedConfig, DatePluginUserConfig, PowerlinesDateInterface, TimeUnit };
|
package/dist/types/index.d.mts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { DateLibraryType, DatePluginContext, DatePluginOptions, DatePluginResolvedConfig, DatePluginUserConfig } from "./plugin.mjs";
|
|
2
|
-
import { n as PowerlinesDateInterface, r as TimeUnit, t as DateFormats } from "../env-
|
|
2
|
+
import { n as PowerlinesDateInterface, r as TimeUnit, t as DateFormats } from "../env-T8_W2CDj.mjs";
|
|
3
3
|
export { DateFormats, DateLibraryType, DatePluginContext, DatePluginOptions, DatePluginResolvedConfig, DatePluginUserConfig, PowerlinesDateInterface, TimeUnit };
|
package/dist/types/plugin.d.cts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { EnvPluginContext, EnvPluginOptions, EnvPluginResolvedConfig, EnvPluginUserConfig } from "@powerlines/plugin-env/types/plugin";
|
|
2
|
-
//#region src/types/plugin.d.ts
|
|
3
2
|
type DateLibraryType = "date-fns" | "dayjs" | "luxon" | "moment";
|
|
4
3
|
interface DatePluginOptions {
|
|
5
4
|
/**
|
|
@@ -42,6 +41,5 @@ interface DatePluginResolvedConfig extends EnvPluginResolvedConfig {
|
|
|
42
41
|
date: Required<Omit<DatePluginOptions, "env">>;
|
|
43
42
|
}
|
|
44
43
|
type DatePluginContext<TResolvedConfig extends DatePluginResolvedConfig = DatePluginResolvedConfig> = EnvPluginContext<TResolvedConfig>;
|
|
45
|
-
//#endregion
|
|
46
44
|
export { DateLibraryType, DatePluginContext, DatePluginOptions, DatePluginResolvedConfig, DatePluginUserConfig };
|
|
47
45
|
//# sourceMappingURL=plugin.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.d.cts","names":[],"sources":["../../src/types/plugin.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"plugin.d.cts","names":[],"sources":["../../src/types/plugin.ts"],"mappings":";KAyBY;UAEK;;;;;;;;;;;;;EAaf,OAAO;;;;EAKP,MAAM;;;;;;;;;EAUN;;UAGe,6BAA6B;;;;EAI5C,OAAO,KAAK;;UAGG,iCAAiC;;;;EAIhD,MAAM,SAAS,KAAK;;KAGV,kBACV,wBAAwB,2BAA2B,4BACjD,iBAAiB"}
|
package/dist/types/plugin.d.mts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { EnvPluginContext, EnvPluginOptions, EnvPluginResolvedConfig, EnvPluginUserConfig } from "@powerlines/plugin-env/types/plugin";
|
|
2
|
-
//#region src/types/plugin.d.ts
|
|
3
2
|
type DateLibraryType = "date-fns" | "dayjs" | "luxon" | "moment";
|
|
4
3
|
interface DatePluginOptions {
|
|
5
4
|
/**
|
|
@@ -42,6 +41,5 @@ interface DatePluginResolvedConfig extends EnvPluginResolvedConfig {
|
|
|
42
41
|
date: Required<Omit<DatePluginOptions, "env">>;
|
|
43
42
|
}
|
|
44
43
|
type DatePluginContext<TResolvedConfig extends DatePluginResolvedConfig = DatePluginResolvedConfig> = EnvPluginContext<TResolvedConfig>;
|
|
45
|
-
//#endregion
|
|
46
44
|
export { DateLibraryType, DatePluginContext, DatePluginOptions, DatePluginResolvedConfig, DatePluginUserConfig };
|
|
47
45
|
//# sourceMappingURL=plugin.d.mts.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@powerlines/plugin-date",
|
|
3
|
-
"version": "0.12.
|
|
3
|
+
"version": "0.12.770",
|
|
4
4
|
"private": false,
|
|
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
|
"keywords": ["powerlines", "storm-software", "powerlines-plugin"],
|
|
@@ -103,17 +103,17 @@
|
|
|
103
103
|
"types": "./dist/index.d.cts",
|
|
104
104
|
"files": ["dist/**/*"],
|
|
105
105
|
"dependencies": {
|
|
106
|
-
"@powerlines/plugin-env": "^0.16.
|
|
107
|
-
"@storm-software/config-tools": "^1.190.
|
|
106
|
+
"@powerlines/plugin-env": "^0.16.426",
|
|
107
|
+
"@storm-software/config-tools": "^1.190.154",
|
|
108
108
|
"@stryke/path": "^0.29.43",
|
|
109
109
|
"defu": "^6.1.7",
|
|
110
|
-
"powerlines": "^0.47.
|
|
111
|
-
"zod": "^4.6.
|
|
110
|
+
"powerlines": "^0.47.217",
|
|
111
|
+
"zod": "^4.6.7"
|
|
112
112
|
},
|
|
113
113
|
"devDependencies": {
|
|
114
|
-
"@powerlines/plugin-plugin": "^0.12.
|
|
114
|
+
"@powerlines/plugin-plugin": "^0.12.630",
|
|
115
115
|
"@types/node": "^25.9.9"
|
|
116
116
|
},
|
|
117
117
|
"publishConfig": { "access": "public" },
|
|
118
|
-
"gitHead": "
|
|
118
|
+
"gitHead": "bb4e1f2b32a8bb9d20559ca7c3df3a2f30a0d14e"
|
|
119
119
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"env-Bufdqf3p.d.cts","names":[],"sources":["../src/types/env.ts"],"mappings":";;;;UAqBiB,YAAY;;;;;;EAM3B,UAAU;;;;;;EAOV,qBAAqB;;;;;;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