@powerlines/plugin-date 0.2.0 → 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.
@@ -6,12 +6,12 @@
6
6
 
7
7
  function d(e){return `
8
8
  /**
9
- * The Powerlines date module provides utility functions for date manipulation and formatting
9
+ * The Date module provides utility functions for date manipulation and formatting
10
10
  *
11
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 Powerlines date module provides utility functions for date manipulation and formatting
9
+ * The Date module provides utility functions for date manipulation and formatting
10
10
  *
11
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(e){return `
7
+ function u(t){return `
8
8
  /**
9
- * The Powerlines date module provides utility functions for date manipulation and formatting
9
+ * The Date module provides utility functions for date manipulation and formatting
10
10
  *
11
- * @module ${e.config.output.builtinPrefix}:date
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";
@@ -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(e){return `
7
+ function d(t){return `
8
8
  /**
9
- * The Powerlines date module provides utility functions for date manipulation and formatting
9
+ * The Date module provides utility functions for date manipulation and formatting
10
10
  *
11
- * @module ${e.config.output.builtinPrefix}:date
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(t){return `
7
+ function i(e){return `
8
8
  /**
9
- * The Powerlines date module provides utility functions for date manipulation and formatting
9
+ * The Date module provides utility functions for date manipulation and formatting
10
10
  *
11
- * @module ${t.config.output.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 { DateTime, Settings, Info } from "luxon";
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 m(t){return `
7
+ function m(e){return `
8
8
  /**
9
- * The Powerlines date module provides utility functions for date manipulation and formatting
9
+ * The Date module provides utility functions for date manipulation and formatting
10
10
  *
11
- * @module ${t.config.output.builtinPrefix}:date
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(t){return `
7
+ function m(e){return `
8
8
  /**
9
- * The Powerlines date module provides utility functions for date manipulation and formatting
9
+ * The Date module provides utility functions for date manipulation and formatting
10
10
  *
11
- * @module ${t.config.output.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 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(t){return `
7
+ function d(e){return `
8
8
  /**
9
- * The Powerlines date module provides utility functions for date manipulation and formatting
9
+ * The Date module provides utility functions for date manipulation and formatting
10
10
  *
11
- * @module ${t.config.output.builtinPrefix}:date
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 {
@@ -1657,7 +1657,7 @@ type OutputResolvedConfig = Required<Omit<OutputConfig, "assets"> & {
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" | "output" | "logLevel"> & Required<Pick<TUserConfig, "name" | "title" | "plugins" | "mode" | "environments" | "tsconfig" | "build" | "transform" | "override">> & {
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
  */
@@ -2651,19 +2651,6 @@ interface OutputConfig {
2651
2651
  */
2652
2652
  assets?: Array<string | AssetGlob>;
2653
2653
  }
2654
- interface TransformConfig {
2655
- /**
2656
- * The Babel configuration options to use for the build process
2657
- */
2658
- babel?: BabelUserConfig;
2659
- /**
2660
- * Reflection configuration options for the Deepkit TSC custom transformers
2661
- *
2662
- * @remarks
2663
- * These options will be merged with the `tsconfig.json` file and the `tsconfigRaw` options.
2664
- */
2665
- deepkit?: DeepkitOptions;
2666
- }
2667
2654
  interface BaseConfig {
2668
2655
  /**
2669
2656
  * The name of the project
@@ -2714,7 +2701,7 @@ interface BaseConfig {
2714
2701
  /**
2715
2702
  * Configuration for the transformation of the source code
2716
2703
  */
2717
- transform?: TransformConfig;
2704
+ transform?: Record<string, any>;
2718
2705
  /**
2719
2706
  * Options to to provide to the build process
2720
2707
  */
@@ -2839,6 +2826,12 @@ interface CommonUserConfig extends BaseConfig {
2839
2826
  * Environment-specific configurations
2840
2827
  */
2841
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;
2842
2835
  }
2843
2836
  type UserConfig<TBuildConfig extends BuildConfig = BuildConfig, TBuildResolvedConfig extends BuildResolvedConfig = BuildResolvedConfig, TBuildVariant extends string = any> = CommonUserConfig & {
2844
2837
  build?: TBuildConfig & {
@@ -1657,7 +1657,7 @@ type OutputResolvedConfig = Required<Omit<OutputConfig, "assets"> & {
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" | "output" | "logLevel"> & Required<Pick<TUserConfig, "name" | "title" | "plugins" | "mode" | "environments" | "tsconfig" | "build" | "transform" | "override">> & {
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
  */
@@ -2651,19 +2651,6 @@ interface OutputConfig {
2651
2651
  */
2652
2652
  assets?: Array<string | AssetGlob>;
2653
2653
  }
2654
- interface TransformConfig {
2655
- /**
2656
- * The Babel configuration options to use for the build process
2657
- */
2658
- babel?: BabelUserConfig;
2659
- /**
2660
- * Reflection configuration options for the Deepkit TSC custom transformers
2661
- *
2662
- * @remarks
2663
- * These options will be merged with the `tsconfig.json` file and the `tsconfigRaw` options.
2664
- */
2665
- deepkit?: DeepkitOptions;
2666
- }
2667
2654
  interface BaseConfig {
2668
2655
  /**
2669
2656
  * The name of the project
@@ -2714,7 +2701,7 @@ interface BaseConfig {
2714
2701
  /**
2715
2702
  * Configuration for the transformation of the source code
2716
2703
  */
2717
- transform?: TransformConfig;
2704
+ transform?: Record<string, any>;
2718
2705
  /**
2719
2706
  * Options to to provide to the build process
2720
2707
  */
@@ -2839,6 +2826,12 @@ interface CommonUserConfig extends BaseConfig {
2839
2826
  * Environment-specific configurations
2840
2827
  */
2841
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;
2842
2835
  }
2843
2836
  type UserConfig<TBuildConfig extends BuildConfig = BuildConfig, TBuildResolvedConfig extends BuildResolvedConfig = BuildResolvedConfig, TBuildVariant extends string = any> = CommonUserConfig & {
2844
2837
  build?: TBuildConfig & {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@powerlines/plugin-date",
3
- "version": "0.2.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.1.1",
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.2.0"
122
+ "powerlines": "^0.3.0"
123
123
  },
124
124
  "devDependencies": {
125
- "@powerlines/nx": "^0.2.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": "319be4880b93666a6dafe38d60278a8cad920f0b"
130
+ "gitHead": "fe5e201169810dd966ee328fa3dabf57077eea36"
132
131
  }