@powerlines/plugin-date 0.1.1 → 0.3.0
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/dist/components/date-fns.cjs +3 -3
- package/dist/components/date-fns.js +3 -3
- package/dist/components/dayjs.cjs +4 -4
- package/dist/components/dayjs.js +4 -4
- package/dist/components/luxon.cjs +4 -4
- package/dist/components/luxon.js +4 -4
- package/dist/components/moment.cjs +4 -4
- package/dist/components/moment.js +4 -4
- package/dist/types/plugin.d.cts +32 -23
- package/dist/types/plugin.d.ts +32 -23
- package/package.json +6 -7
|
@@ -6,12 +6,12 @@
|
|
|
6
6
|
|
|
7
7
|
function d(e){return `
|
|
8
8
|
/**
|
|
9
|
-
* The
|
|
9
|
+
* The Date module provides utility functions for date manipulation and formatting
|
|
10
10
|
*
|
|
11
|
-
* @module ${e.config.builtinPrefix}:date
|
|
11
|
+
* @module ${e.config.output.builtinPrefix}:date
|
|
12
12
|
*/
|
|
13
13
|
|
|
14
|
-
${fileHeader.getFileHeader()}
|
|
14
|
+
${fileHeader.getFileHeader(e)}
|
|
15
15
|
|
|
16
16
|
import { DateFormats, TimeUnit } from "@powerlines/plugin-date/types/runtime";
|
|
17
17
|
import { addDays as dateFnsAddDays } from "date-fns/addDays";
|
|
@@ -6,12 +6,12 @@ import {a}from'../chunk-UCUR73HG.js';import {getFileHeader}from'powerlines/lib/u
|
|
|
6
6
|
|
|
7
7
|
function u(e){return `
|
|
8
8
|
/**
|
|
9
|
-
* The
|
|
9
|
+
* The Date module provides utility functions for date manipulation and formatting
|
|
10
10
|
*
|
|
11
|
-
* @module ${e.config.builtinPrefix}:date
|
|
11
|
+
* @module ${e.config.output.builtinPrefix}:date
|
|
12
12
|
*/
|
|
13
13
|
|
|
14
|
-
${getFileHeader()}
|
|
14
|
+
${getFileHeader(e)}
|
|
15
15
|
|
|
16
16
|
import { DateFormats, TimeUnit } from "@powerlines/plugin-date/types/runtime";
|
|
17
17
|
import { addDays as dateFnsAddDays } from "date-fns/addDays";
|
|
@@ -4,14 +4,14 @@
|
|
|
4
4
|
*
|
|
5
5
|
*****************************************/
|
|
6
6
|
|
|
7
|
-
function u(
|
|
7
|
+
function u(t){return `
|
|
8
8
|
/**
|
|
9
|
-
* The
|
|
9
|
+
* The Date module provides utility functions for date manipulation and formatting
|
|
10
10
|
*
|
|
11
|
-
* @module ${
|
|
11
|
+
* @module ${t.config.output.builtinPrefix}:date
|
|
12
12
|
*/
|
|
13
13
|
|
|
14
|
-
${fileHeader.getFileHeader()}
|
|
14
|
+
${fileHeader.getFileHeader(t)}
|
|
15
15
|
|
|
16
16
|
import defaultDayjs, { QUnitType } from "dayjs";
|
|
17
17
|
import customParseFormatPlugin from "dayjs/plugin/customParseFormat";
|
package/dist/components/dayjs.js
CHANGED
|
@@ -4,14 +4,14 @@ import {a}from'../chunk-UCUR73HG.js';import {getFileHeader}from'powerlines/lib/u
|
|
|
4
4
|
*
|
|
5
5
|
*****************************************/
|
|
6
6
|
|
|
7
|
-
function d(
|
|
7
|
+
function d(t){return `
|
|
8
8
|
/**
|
|
9
|
-
* The
|
|
9
|
+
* The Date module provides utility functions for date manipulation and formatting
|
|
10
10
|
*
|
|
11
|
-
* @module ${
|
|
11
|
+
* @module ${t.config.output.builtinPrefix}:date
|
|
12
12
|
*/
|
|
13
13
|
|
|
14
|
-
${getFileHeader()}
|
|
14
|
+
${getFileHeader(t)}
|
|
15
15
|
|
|
16
16
|
import defaultDayjs, { QUnitType } from "dayjs";
|
|
17
17
|
import customParseFormatPlugin from "dayjs/plugin/customParseFormat";
|
|
@@ -4,14 +4,14 @@
|
|
|
4
4
|
*
|
|
5
5
|
*****************************************/
|
|
6
6
|
|
|
7
|
-
function i(
|
|
7
|
+
function i(e){return `
|
|
8
8
|
/**
|
|
9
|
-
* The
|
|
9
|
+
* The Date module provides utility functions for date manipulation and formatting
|
|
10
10
|
*
|
|
11
|
-
* @module ${
|
|
11
|
+
* @module ${e.config.output.builtinPrefix}:date
|
|
12
12
|
*/
|
|
13
13
|
|
|
14
|
-
${fileHeader.getFileHeader()}
|
|
14
|
+
${fileHeader.getFileHeader(e)}
|
|
15
15
|
|
|
16
16
|
import { DateTime, Settings, Info } from "luxon";
|
|
17
17
|
import {
|
package/dist/components/luxon.js
CHANGED
|
@@ -4,14 +4,14 @@ import {a}from'../chunk-UCUR73HG.js';import {getFileHeader}from'powerlines/lib/u
|
|
|
4
4
|
*
|
|
5
5
|
*****************************************/
|
|
6
6
|
|
|
7
|
-
function m(
|
|
7
|
+
function m(e){return `
|
|
8
8
|
/**
|
|
9
|
-
* The
|
|
9
|
+
* The Date module provides utility functions for date manipulation and formatting
|
|
10
10
|
*
|
|
11
|
-
* @module ${
|
|
11
|
+
* @module ${e.config.output.builtinPrefix}:date
|
|
12
12
|
*/
|
|
13
13
|
|
|
14
|
-
${getFileHeader()}
|
|
14
|
+
${getFileHeader(e)}
|
|
15
15
|
|
|
16
16
|
import { DateTime, Settings, Info } from "luxon";
|
|
17
17
|
import {
|
|
@@ -4,14 +4,14 @@
|
|
|
4
4
|
*
|
|
5
5
|
*****************************************/
|
|
6
6
|
|
|
7
|
-
function m(
|
|
7
|
+
function m(e){return `
|
|
8
8
|
/**
|
|
9
|
-
* The
|
|
9
|
+
* The Date module provides utility functions for date manipulation and formatting
|
|
10
10
|
*
|
|
11
|
-
* @module ${
|
|
11
|
+
* @module ${e.config.output.builtinPrefix}:date
|
|
12
12
|
*/
|
|
13
13
|
|
|
14
|
-
${fileHeader.getFileHeader()}
|
|
14
|
+
${fileHeader.getFileHeader(e)}
|
|
15
15
|
|
|
16
16
|
import defaultMoment, { LongDateFormatKey } from "moment";
|
|
17
17
|
import {
|
|
@@ -4,14 +4,14 @@ import {a}from'../chunk-UCUR73HG.js';import {getFileHeader}from'powerlines/lib/u
|
|
|
4
4
|
*
|
|
5
5
|
*****************************************/
|
|
6
6
|
|
|
7
|
-
function d(
|
|
7
|
+
function d(e){return `
|
|
8
8
|
/**
|
|
9
|
-
* The
|
|
9
|
+
* The Date module provides utility functions for date manipulation and formatting
|
|
10
10
|
*
|
|
11
|
-
* @module ${
|
|
11
|
+
* @module ${e.config.output.builtinPrefix}:date
|
|
12
12
|
*/
|
|
13
13
|
|
|
14
|
-
${getFileHeader()}
|
|
14
|
+
${getFileHeader(e)}
|
|
15
15
|
|
|
16
16
|
import defaultMoment, { LongDateFormatKey } from "moment";
|
|
17
17
|
import {
|
package/dist/types/plugin.d.cts
CHANGED
|
@@ -1651,13 +1651,13 @@ type EnvironmentResolvedConfig = Omit<EnvironmentConfig, "consumer" | "mode" | "
|
|
|
1651
1651
|
};
|
|
1652
1652
|
type LintResolvedConfig = Required<LintConfig>;
|
|
1653
1653
|
type ResolvedAssetGlob = AssetGlob & Required<Pick<AssetGlob, "input">>;
|
|
1654
|
-
type OutputResolvedConfig = Required<Omit<OutputConfig, "assets"
|
|
1654
|
+
type OutputResolvedConfig = Required<Omit<OutputConfig, "assets"> & {
|
|
1655
1655
|
assets: ResolvedAssetGlob[];
|
|
1656
|
-
}
|
|
1656
|
+
}>;
|
|
1657
1657
|
/**
|
|
1658
1658
|
* The resolved options for the Powerlines project configuration.
|
|
1659
1659
|
*/
|
|
1660
|
-
type ResolvedConfig<TUserConfig extends UserConfig = UserConfig> = Omit<TUserConfig, "name" | "title" | "plugins" | "mode" | "environments" | "platform" | "tsconfig" | "lint" | "build" | "transform" | "override" | "root" | "variant" | "type" | "
|
|
1660
|
+
type ResolvedConfig<TUserConfig extends UserConfig = UserConfig> = Omit<TUserConfig, "name" | "title" | "plugins" | "mode" | "environments" | "platform" | "tsconfig" | "lint" | "build" | "transform" | "override" | "root" | "variant" | "type" | "output" | "logLevel" | "framework"> & Required<Pick<TUserConfig, "name" | "title" | "plugins" | "mode" | "environments" | "tsconfig" | "build" | "transform" | "override" | "framework">> & {
|
|
1661
1661
|
/**
|
|
1662
1662
|
* The configuration options that were provided inline to the Powerlines CLI.
|
|
1663
1663
|
*/
|
|
@@ -2613,9 +2613,27 @@ interface OutputConfig {
|
|
|
2613
2613
|
/**
|
|
2614
2614
|
* The path of the generated runtime declaration file relative to the workspace root.
|
|
2615
2615
|
*
|
|
2616
|
-
* @defaultValue "\{projectRoot\}/
|
|
2616
|
+
* @defaultValue "\{projectRoot\}/powerlines.d.ts"
|
|
2617
2617
|
*/
|
|
2618
2618
|
dts?: string | false;
|
|
2619
|
+
/**
|
|
2620
|
+
* A prefix to use for identifying builtin modules
|
|
2621
|
+
*
|
|
2622
|
+
* @remarks
|
|
2623
|
+
* This prefix will be used to identify all builtin modules generated during the "prepare" phase. An example builtin ID for a module called `"utils"` would be `"{builtinPrefix}:utils"`.
|
|
2624
|
+
*
|
|
2625
|
+
* @defaultValue "powerlines"
|
|
2626
|
+
*/
|
|
2627
|
+
builtinPrefix?: string;
|
|
2628
|
+
/**
|
|
2629
|
+
* The folder where the generated runtime modules/builtins will be located
|
|
2630
|
+
*
|
|
2631
|
+
* @remarks
|
|
2632
|
+
* This folder will contain all runtime modules and builtins generated during the "prepare" phase.
|
|
2633
|
+
*
|
|
2634
|
+
* @defaultValue "\{projectRoot\}/.powerlines"
|
|
2635
|
+
*/
|
|
2636
|
+
runtimeFolder?: string;
|
|
2619
2637
|
/**
|
|
2620
2638
|
* The module format of the output files
|
|
2621
2639
|
*
|
|
@@ -2633,19 +2651,6 @@ interface OutputConfig {
|
|
|
2633
2651
|
*/
|
|
2634
2652
|
assets?: Array<string | AssetGlob>;
|
|
2635
2653
|
}
|
|
2636
|
-
interface TransformConfig {
|
|
2637
|
-
/**
|
|
2638
|
-
* The Babel configuration options to use for the build process
|
|
2639
|
-
*/
|
|
2640
|
-
babel?: BabelUserConfig;
|
|
2641
|
-
/**
|
|
2642
|
-
* Reflection configuration options for the Deepkit TSC custom transformers
|
|
2643
|
-
*
|
|
2644
|
-
* @remarks
|
|
2645
|
-
* These options will be merged with the `tsconfig.json` file and the `tsconfigRaw` options.
|
|
2646
|
-
*/
|
|
2647
|
-
deepkit?: DeepkitOptions;
|
|
2648
|
-
}
|
|
2649
2654
|
interface BaseConfig {
|
|
2650
2655
|
/**
|
|
2651
2656
|
* The name of the project
|
|
@@ -2696,20 +2701,18 @@ interface BaseConfig {
|
|
|
2696
2701
|
/**
|
|
2697
2702
|
* Configuration for the transformation of the source code
|
|
2698
2703
|
*/
|
|
2699
|
-
transform?:
|
|
2704
|
+
transform?: Record<string, any>;
|
|
2700
2705
|
/**
|
|
2701
2706
|
* Options to to provide to the build process
|
|
2702
2707
|
*/
|
|
2703
2708
|
build?: BuildConfig;
|
|
2704
2709
|
/**
|
|
2705
|
-
*
|
|
2710
|
+
* Configuration for documentation generation
|
|
2706
2711
|
*
|
|
2707
2712
|
* @remarks
|
|
2708
|
-
* This
|
|
2709
|
-
*
|
|
2710
|
-
* @defaultValue "storm"
|
|
2713
|
+
* This configuration will be used by the documentation generation plugins during the `docs` command.
|
|
2711
2714
|
*/
|
|
2712
|
-
|
|
2715
|
+
docs?: Record<string, any>;
|
|
2713
2716
|
/**
|
|
2714
2717
|
* The path to the tsconfig file to be used by the compiler
|
|
2715
2718
|
*
|
|
@@ -2823,6 +2826,12 @@ interface CommonUserConfig extends BaseConfig {
|
|
|
2823
2826
|
* Environment-specific configurations
|
|
2824
2827
|
*/
|
|
2825
2828
|
environments?: Record<string, EnvironmentConfig>;
|
|
2829
|
+
/**
|
|
2830
|
+
* A string identifier that allows a child framework or tool to identify itself when using Powerlines.
|
|
2831
|
+
*
|
|
2832
|
+
* @defaultValue "powerlines"
|
|
2833
|
+
*/
|
|
2834
|
+
framework?: string;
|
|
2826
2835
|
}
|
|
2827
2836
|
type UserConfig<TBuildConfig extends BuildConfig = BuildConfig, TBuildResolvedConfig extends BuildResolvedConfig = BuildResolvedConfig, TBuildVariant extends string = any> = CommonUserConfig & {
|
|
2828
2837
|
build?: TBuildConfig & {
|
package/dist/types/plugin.d.ts
CHANGED
|
@@ -1651,13 +1651,13 @@ type EnvironmentResolvedConfig = Omit<EnvironmentConfig, "consumer" | "mode" | "
|
|
|
1651
1651
|
};
|
|
1652
1652
|
type LintResolvedConfig = Required<LintConfig>;
|
|
1653
1653
|
type ResolvedAssetGlob = AssetGlob & Required<Pick<AssetGlob, "input">>;
|
|
1654
|
-
type OutputResolvedConfig = Required<Omit<OutputConfig, "assets"
|
|
1654
|
+
type OutputResolvedConfig = Required<Omit<OutputConfig, "assets"> & {
|
|
1655
1655
|
assets: ResolvedAssetGlob[];
|
|
1656
|
-
}
|
|
1656
|
+
}>;
|
|
1657
1657
|
/**
|
|
1658
1658
|
* The resolved options for the Powerlines project configuration.
|
|
1659
1659
|
*/
|
|
1660
|
-
type ResolvedConfig<TUserConfig extends UserConfig = UserConfig> = Omit<TUserConfig, "name" | "title" | "plugins" | "mode" | "environments" | "platform" | "tsconfig" | "lint" | "build" | "transform" | "override" | "root" | "variant" | "type" | "
|
|
1660
|
+
type ResolvedConfig<TUserConfig extends UserConfig = UserConfig> = Omit<TUserConfig, "name" | "title" | "plugins" | "mode" | "environments" | "platform" | "tsconfig" | "lint" | "build" | "transform" | "override" | "root" | "variant" | "type" | "output" | "logLevel" | "framework"> & Required<Pick<TUserConfig, "name" | "title" | "plugins" | "mode" | "environments" | "tsconfig" | "build" | "transform" | "override" | "framework">> & {
|
|
1661
1661
|
/**
|
|
1662
1662
|
* The configuration options that were provided inline to the Powerlines CLI.
|
|
1663
1663
|
*/
|
|
@@ -2613,9 +2613,27 @@ interface OutputConfig {
|
|
|
2613
2613
|
/**
|
|
2614
2614
|
* The path of the generated runtime declaration file relative to the workspace root.
|
|
2615
2615
|
*
|
|
2616
|
-
* @defaultValue "\{projectRoot\}/
|
|
2616
|
+
* @defaultValue "\{projectRoot\}/powerlines.d.ts"
|
|
2617
2617
|
*/
|
|
2618
2618
|
dts?: string | false;
|
|
2619
|
+
/**
|
|
2620
|
+
* A prefix to use for identifying builtin modules
|
|
2621
|
+
*
|
|
2622
|
+
* @remarks
|
|
2623
|
+
* This prefix will be used to identify all builtin modules generated during the "prepare" phase. An example builtin ID for a module called `"utils"` would be `"{builtinPrefix}:utils"`.
|
|
2624
|
+
*
|
|
2625
|
+
* @defaultValue "powerlines"
|
|
2626
|
+
*/
|
|
2627
|
+
builtinPrefix?: string;
|
|
2628
|
+
/**
|
|
2629
|
+
* The folder where the generated runtime modules/builtins will be located
|
|
2630
|
+
*
|
|
2631
|
+
* @remarks
|
|
2632
|
+
* This folder will contain all runtime modules and builtins generated during the "prepare" phase.
|
|
2633
|
+
*
|
|
2634
|
+
* @defaultValue "\{projectRoot\}/.powerlines"
|
|
2635
|
+
*/
|
|
2636
|
+
runtimeFolder?: string;
|
|
2619
2637
|
/**
|
|
2620
2638
|
* The module format of the output files
|
|
2621
2639
|
*
|
|
@@ -2633,19 +2651,6 @@ interface OutputConfig {
|
|
|
2633
2651
|
*/
|
|
2634
2652
|
assets?: Array<string | AssetGlob>;
|
|
2635
2653
|
}
|
|
2636
|
-
interface TransformConfig {
|
|
2637
|
-
/**
|
|
2638
|
-
* The Babel configuration options to use for the build process
|
|
2639
|
-
*/
|
|
2640
|
-
babel?: BabelUserConfig;
|
|
2641
|
-
/**
|
|
2642
|
-
* Reflection configuration options for the Deepkit TSC custom transformers
|
|
2643
|
-
*
|
|
2644
|
-
* @remarks
|
|
2645
|
-
* These options will be merged with the `tsconfig.json` file and the `tsconfigRaw` options.
|
|
2646
|
-
*/
|
|
2647
|
-
deepkit?: DeepkitOptions;
|
|
2648
|
-
}
|
|
2649
2654
|
interface BaseConfig {
|
|
2650
2655
|
/**
|
|
2651
2656
|
* The name of the project
|
|
@@ -2696,20 +2701,18 @@ interface BaseConfig {
|
|
|
2696
2701
|
/**
|
|
2697
2702
|
* Configuration for the transformation of the source code
|
|
2698
2703
|
*/
|
|
2699
|
-
transform?:
|
|
2704
|
+
transform?: Record<string, any>;
|
|
2700
2705
|
/**
|
|
2701
2706
|
* Options to to provide to the build process
|
|
2702
2707
|
*/
|
|
2703
2708
|
build?: BuildConfig;
|
|
2704
2709
|
/**
|
|
2705
|
-
*
|
|
2710
|
+
* Configuration for documentation generation
|
|
2706
2711
|
*
|
|
2707
2712
|
* @remarks
|
|
2708
|
-
* This
|
|
2709
|
-
*
|
|
2710
|
-
* @defaultValue "storm"
|
|
2713
|
+
* This configuration will be used by the documentation generation plugins during the `docs` command.
|
|
2711
2714
|
*/
|
|
2712
|
-
|
|
2715
|
+
docs?: Record<string, any>;
|
|
2713
2716
|
/**
|
|
2714
2717
|
* The path to the tsconfig file to be used by the compiler
|
|
2715
2718
|
*
|
|
@@ -2823,6 +2826,12 @@ interface CommonUserConfig extends BaseConfig {
|
|
|
2823
2826
|
* Environment-specific configurations
|
|
2824
2827
|
*/
|
|
2825
2828
|
environments?: Record<string, EnvironmentConfig>;
|
|
2829
|
+
/**
|
|
2830
|
+
* A string identifier that allows a child framework or tool to identify itself when using Powerlines.
|
|
2831
|
+
*
|
|
2832
|
+
* @defaultValue "powerlines"
|
|
2833
|
+
*/
|
|
2834
|
+
framework?: string;
|
|
2826
2835
|
}
|
|
2827
2836
|
type UserConfig<TBuildConfig extends BuildConfig = BuildConfig, TBuildResolvedConfig extends BuildResolvedConfig = BuildResolvedConfig, TBuildVariant extends string = any> = CommonUserConfig & {
|
|
2828
2837
|
build?: TBuildConfig & {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@powerlines/plugin-date",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
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": {
|
|
@@ -116,17 +116,16 @@
|
|
|
116
116
|
"files": ["dist/**/*"],
|
|
117
117
|
"keywords": ["powerlines", "storm-software", "powerlines-plugin"],
|
|
118
118
|
"dependencies": {
|
|
119
|
-
"@powerlines/plugin-env": "^0.
|
|
119
|
+
"@powerlines/plugin-env": "^0.2.0",
|
|
120
120
|
"@storm-software/config-tools": "^1.188.6",
|
|
121
121
|
"@stryke/path": "^0.15.5",
|
|
122
|
-
"powerlines": "^0.
|
|
122
|
+
"powerlines": "^0.3.0"
|
|
123
123
|
},
|
|
124
124
|
"devDependencies": {
|
|
125
|
-
"@powerlines/nx": "^0.
|
|
125
|
+
"@powerlines/nx": "^0.3.0",
|
|
126
126
|
"@storm-software/tsup": "^0.2.4",
|
|
127
|
-
"@types/node": "^22.18.11"
|
|
128
|
-
"tsup": "8.4.0"
|
|
127
|
+
"@types/node": "^22.18.11"
|
|
129
128
|
},
|
|
130
129
|
"publishConfig": { "access": "public" },
|
|
131
|
-
"gitHead": "
|
|
130
|
+
"gitHead": "fe5e201169810dd966ee328fa3dabf57077eea36"
|
|
132
131
|
}
|