@powerlines/plugin-date 0.12.229 → 0.12.231
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/index.cjs +5 -6
- package/dist/index.mjs +5 -6
- package/dist/packages/plugin-automd/src/types/plugin.d.mts +1 -3
- package/dist/packages/plugin-env/src/types/plugin.d.mts +0 -2
- package/dist/packages/powerlines/src/internal/helpers/hooks.d.mts +0 -2
- package/dist/packages/powerlines/src/types/commands.d.mts +0 -1
- package/dist/packages/powerlines/src/types/config.d.mts +4 -3
- package/dist/packages/powerlines/src/types/resolved.d.mts +2 -2
- package/dist/packages/powerlines/src/types/unplugin.d.mts +0 -1
- package/dist/powerlines/src/types/config.d.cts +3 -2
- package/dist/powerlines/src/types/resolved.d.cts +2 -2
- package/package.json +5 -5
- package/dist/packages/plugin-alloy/src/types/components.d.mts +0 -2
- package/dist/packages/plugin-alloy/src/types/index.d.mts +0 -2
- package/dist/packages/plugin-babel/src/types/index.d.mts +0 -1
package/dist/index.cjs
CHANGED
|
@@ -8,7 +8,6 @@ const require_moment = require('./components/moment.cjs');
|
|
|
8
8
|
require('./components/index.cjs');
|
|
9
9
|
let __powerlines_plugin_env = require("@powerlines/plugin-env");
|
|
10
10
|
__powerlines_plugin_env = require_rolldown_runtime.__toESM(__powerlines_plugin_env);
|
|
11
|
-
let __storm_software_config_tools_types = require("@storm-software/config-tools/types");
|
|
12
11
|
|
|
13
12
|
//#region src/index.ts
|
|
14
13
|
/**
|
|
@@ -18,7 +17,7 @@ function plugin(options = {}) {
|
|
|
18
17
|
return [(0, __powerlines_plugin_env.default)(options.env), {
|
|
19
18
|
name: "date",
|
|
20
19
|
async config() {
|
|
21
|
-
this.
|
|
20
|
+
this.debug("Providing default configuration for the Powerlines `date` build plugin.");
|
|
22
21
|
const config = { date: require_defu.defu(options, { type: "date-fns" }) };
|
|
23
22
|
if (!config.date.type || ![
|
|
24
23
|
"date-fns",
|
|
@@ -26,18 +25,18 @@ function plugin(options = {}) {
|
|
|
26
25
|
"luxon",
|
|
27
26
|
"moment"
|
|
28
27
|
].includes(config.date.type)) {
|
|
29
|
-
if (config.date.type) this.
|
|
28
|
+
if (config.date.type) this.warn(`Invalid date library type "${config.date.type}" specified. Defaulting to "date-fns".`);
|
|
30
29
|
config.date.type = "date-fns";
|
|
31
30
|
}
|
|
32
|
-
this.
|
|
31
|
+
this.debug(`Using date library: ${config.date.type}`);
|
|
33
32
|
return config;
|
|
34
33
|
},
|
|
35
34
|
async configResolved() {
|
|
36
|
-
this.
|
|
35
|
+
this.debug(`Environment plugin configuration has been resolved for the Powerlines project.`);
|
|
37
36
|
this.dependencies[this.config.date.type] = "latest";
|
|
38
37
|
},
|
|
39
38
|
async prepare() {
|
|
40
|
-
this.
|
|
39
|
+
this.debug(`Preparing the Date runtime artifacts for the Powerlines project.`);
|
|
41
40
|
let dateModule;
|
|
42
41
|
switch (this.config.date.type) {
|
|
43
42
|
case "dayjs":
|
package/dist/index.mjs
CHANGED
|
@@ -5,7 +5,6 @@ import { luxonModule } from "./components/luxon.mjs";
|
|
|
5
5
|
import { momentModule } from "./components/moment.mjs";
|
|
6
6
|
import "./components/index.mjs";
|
|
7
7
|
import env from "@powerlines/plugin-env";
|
|
8
|
-
import { LogLevelLabel } from "@storm-software/config-tools/types";
|
|
9
8
|
|
|
10
9
|
//#region src/index.ts
|
|
11
10
|
/**
|
|
@@ -15,7 +14,7 @@ function plugin(options = {}) {
|
|
|
15
14
|
return [env(options.env), {
|
|
16
15
|
name: "date",
|
|
17
16
|
async config() {
|
|
18
|
-
this.
|
|
17
|
+
this.debug("Providing default configuration for the Powerlines `date` build plugin.");
|
|
19
18
|
const config = { date: defu(options, { type: "date-fns" }) };
|
|
20
19
|
if (!config.date.type || ![
|
|
21
20
|
"date-fns",
|
|
@@ -23,18 +22,18 @@ function plugin(options = {}) {
|
|
|
23
22
|
"luxon",
|
|
24
23
|
"moment"
|
|
25
24
|
].includes(config.date.type)) {
|
|
26
|
-
if (config.date.type) this.
|
|
25
|
+
if (config.date.type) this.warn(`Invalid date library type "${config.date.type}" specified. Defaulting to "date-fns".`);
|
|
27
26
|
config.date.type = "date-fns";
|
|
28
27
|
}
|
|
29
|
-
this.
|
|
28
|
+
this.debug(`Using date library: ${config.date.type}`);
|
|
30
29
|
return config;
|
|
31
30
|
},
|
|
32
31
|
async configResolved() {
|
|
33
|
-
this.
|
|
32
|
+
this.debug(`Environment plugin configuration has been resolved for the Powerlines project.`);
|
|
34
33
|
this.dependencies[this.config.date.type] = "latest";
|
|
35
34
|
},
|
|
36
35
|
async prepare() {
|
|
37
|
-
this.
|
|
36
|
+
this.debug(`Preparing the Date runtime artifacts for the Powerlines project.`);
|
|
38
37
|
let dateModule;
|
|
39
38
|
switch (this.config.date.type) {
|
|
40
39
|
case "dayjs":
|
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
import "../../../powerlines/src/types/config.mjs";
|
|
2
|
-
import "../../../powerlines/src/types/resolved.mjs";
|
|
3
|
-
import "../../../powerlines/src/types/context.mjs";
|
|
4
1
|
import { TOCOptions } from "./toc.mjs";
|
|
5
2
|
import { Config } from "automd";
|
|
6
3
|
|
|
7
4
|
//#region ../plugin-automd/src/types/plugin.d.ts
|
|
5
|
+
|
|
8
6
|
type AutoMDPluginOptions = Omit<Config, "dir" | "watch" | "onWatch" | "prefix"> & {
|
|
9
7
|
/**
|
|
10
8
|
* Path to the AutoMD configuration file.
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import { Reflection } from "../../../deepkit/src/types.mjs";
|
|
2
2
|
import { AlloyPluginContext, AlloyPluginOptions, AlloyPluginResolvedConfig, AlloyPluginUserConfig } from "../../../plugin-alloy/src/types/plugin.mjs";
|
|
3
|
-
import "../../../plugin-alloy/src/types/index.mjs";
|
|
4
3
|
import { AutoMDPluginOptions } from "../../../plugin-automd/src/types/plugin.mjs";
|
|
5
4
|
import { BabelPluginContext, BabelPluginOptions, BabelPluginResolvedConfig, BabelPluginUserConfig } from "../../../plugin-babel/src/types/plugin.mjs";
|
|
6
|
-
import "../../../plugin-babel/src/types/index.mjs";
|
|
7
5
|
import { EnvInterface, SecretsInterface } from "./runtime.mjs";
|
|
8
6
|
import { DotenvConfiguration, TypeDefinition, TypeDefinitionParameter } from "@stryke/types/configuration";
|
|
9
7
|
import { Children } from "@alloy-js/core";
|
|
@@ -4,17 +4,18 @@ import { StoragePort, StoragePreset } from "./fs.mjs";
|
|
|
4
4
|
import { TSConfig } from "./tsconfig.mjs";
|
|
5
5
|
import { PluginContext } from "./context.mjs";
|
|
6
6
|
import { Plugin } from "./plugin.mjs";
|
|
7
|
-
import { LogLevelLabel } from "@storm-software/config-tools/types";
|
|
8
7
|
import { MaybePromise } from "@stryke/types/base";
|
|
9
8
|
import { PreviewOptions } from "vite";
|
|
10
9
|
import { transformAsync } from "@babel/core";
|
|
11
10
|
import { Format } from "@storm-software/build-tools/types";
|
|
11
|
+
import { LogLevelLabel } from "@storm-software/config-tools/types";
|
|
12
12
|
import { StormWorkspaceConfig } from "@storm-software/config/types";
|
|
13
13
|
import { TypeDefinitionParameter } from "@stryke/types/configuration";
|
|
14
14
|
import { AssetGlob } from "@stryke/types/file";
|
|
15
15
|
import { DateString } from "compatx";
|
|
16
16
|
|
|
17
17
|
//#region ../powerlines/src/types/config.d.ts
|
|
18
|
+
type LogLevel = "error" | "warn" | "info" | "debug" | "trace";
|
|
18
19
|
type LogFn = (type: LogLevelLabel, ...args: string[]) => void;
|
|
19
20
|
/**
|
|
20
21
|
* The {@link StormWorkspaceConfig | configuration} object for an entire Powerlines workspace
|
|
@@ -264,7 +265,7 @@ interface CommonUserConfig extends BaseConfig {
|
|
|
264
265
|
*
|
|
265
266
|
* @defaultValue "info"
|
|
266
267
|
*/
|
|
267
|
-
logLevel?:
|
|
268
|
+
logLevel?: LogLevel | null;
|
|
268
269
|
/**
|
|
269
270
|
* A custom logger function to use for logging messages
|
|
270
271
|
*/
|
|
@@ -431,4 +432,4 @@ type DeployInlineConfig<TUserConfig extends UserConfig$1 = UserConfig$1> = Inlin
|
|
|
431
432
|
command: "deploy";
|
|
432
433
|
};
|
|
433
434
|
//#endregion
|
|
434
|
-
export { BabelUserConfig, BuildInlineConfig, CleanInlineConfig, DeployInlineConfig, DocsInlineConfig, ESBuildUserConfig, EnvironmentConfig, FarmUserConfig, InlineConfig, LintInlineConfig, LogFn, NewInlineConfig, OutputConfig, PluginConfig, PrepareInlineConfig, RolldownUserConfig, RollupUserConfig, RspackUserConfig, TsdownUserConfig, TsupUserConfig, UnbuildUserConfig, UserConfig$1 as UserConfig, ViteUserConfig, WebpackUserConfig, WorkspaceConfig };
|
|
435
|
+
export { BabelUserConfig, BuildInlineConfig, CleanInlineConfig, DeployInlineConfig, DocsInlineConfig, ESBuildUserConfig, EnvironmentConfig, FarmUserConfig, InlineConfig, LintInlineConfig, LogFn, LogLevel, NewInlineConfig, OutputConfig, PluginConfig, PrepareInlineConfig, RolldownUserConfig, RollupUserConfig, RspackUserConfig, TsdownUserConfig, TsupUserConfig, UnbuildUserConfig, UserConfig$1 as UserConfig, ViteUserConfig, WebpackUserConfig, WorkspaceConfig };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BuilderVariant } from "./build.mjs";
|
|
2
|
-
import { BabelUserConfig, ESBuildUserConfig, EnvironmentConfig, FarmUserConfig, InlineConfig, OutputConfig, RolldownUserConfig, RollupUserConfig, RspackUserConfig, TsdownUserConfig, TsupUserConfig, UnbuildUserConfig, UserConfig as UserConfig$1, ViteUserConfig, WebpackUserConfig } from "./config.mjs";
|
|
2
|
+
import { BabelUserConfig, ESBuildUserConfig, EnvironmentConfig, FarmUserConfig, InlineConfig, LogLevel, OutputConfig, RolldownUserConfig, RollupUserConfig, RspackUserConfig, TsdownUserConfig, TsupUserConfig, UnbuildUserConfig, UserConfig as UserConfig$1, ViteUserConfig, WebpackUserConfig } from "./config.mjs";
|
|
3
3
|
import { NonUndefined } from "@stryke/types/base";
|
|
4
4
|
import { ResolvedPreviewOptions } from "vite";
|
|
5
5
|
import { TypeDefinition } from "@stryke/types/configuration";
|
|
@@ -77,7 +77,7 @@ type ResolvedConfig<TUserConfig extends UserConfig$1 = UserConfig$1> = Omit<TUse
|
|
|
77
77
|
*
|
|
78
78
|
* @defaultValue "info"
|
|
79
79
|
*/
|
|
80
|
-
logLevel:
|
|
80
|
+
logLevel: LogLevel | null;
|
|
81
81
|
};
|
|
82
82
|
type ViteResolvedConfig = ResolvedConfig<ViteUserConfig>;
|
|
83
83
|
type WebpackResolvedConfig = ResolvedConfig<WebpackUserConfig>;
|
|
@@ -15,6 +15,7 @@ import { AssetGlob } from "@stryke/types/file";
|
|
|
15
15
|
import { DateString } from "compatx";
|
|
16
16
|
|
|
17
17
|
//#region ../powerlines/src/types/config.d.ts
|
|
18
|
+
type LogLevel = "error" | "warn" | "info" | "debug" | "trace";
|
|
18
19
|
type LogFn = (type: LogLevelLabel, ...args: string[]) => void;
|
|
19
20
|
/**
|
|
20
21
|
* The {@link StormWorkspaceConfig | configuration} object for an entire Powerlines workspace
|
|
@@ -264,7 +265,7 @@ interface CommonUserConfig extends BaseConfig {
|
|
|
264
265
|
*
|
|
265
266
|
* @defaultValue "info"
|
|
266
267
|
*/
|
|
267
|
-
logLevel?:
|
|
268
|
+
logLevel?: LogLevel | null;
|
|
268
269
|
/**
|
|
269
270
|
* A custom logger function to use for logging messages
|
|
270
271
|
*/
|
|
@@ -431,4 +432,4 @@ type DeployInlineConfig<TUserConfig extends UserConfig$1 = UserConfig$1> = Inlin
|
|
|
431
432
|
command: "deploy";
|
|
432
433
|
};
|
|
433
434
|
//#endregion
|
|
434
|
-
export { BabelUserConfig, BuildInlineConfig, CleanInlineConfig, DeployInlineConfig, DocsInlineConfig, ESBuildUserConfig, EnvironmentConfig, FarmUserConfig, InlineConfig, LintInlineConfig, LogFn, NewInlineConfig, OutputConfig, PluginConfig, PrepareInlineConfig, RolldownUserConfig, RollupUserConfig, RspackUserConfig, TsdownUserConfig, TsupUserConfig, UnbuildUserConfig, UserConfig$1 as UserConfig, ViteUserConfig, WebpackUserConfig, WorkspaceConfig };
|
|
435
|
+
export { BabelUserConfig, BuildInlineConfig, CleanInlineConfig, DeployInlineConfig, DocsInlineConfig, ESBuildUserConfig, EnvironmentConfig, FarmUserConfig, InlineConfig, LintInlineConfig, LogFn, LogLevel, NewInlineConfig, OutputConfig, PluginConfig, PrepareInlineConfig, RolldownUserConfig, RollupUserConfig, RspackUserConfig, TsdownUserConfig, TsupUserConfig, UnbuildUserConfig, UserConfig$1 as UserConfig, ViteUserConfig, WebpackUserConfig, WorkspaceConfig };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BuilderVariant } from "./build.cjs";
|
|
2
|
-
import { BabelUserConfig, ESBuildUserConfig, EnvironmentConfig, FarmUserConfig, InlineConfig, OutputConfig, RolldownUserConfig, RollupUserConfig, RspackUserConfig, TsdownUserConfig, TsupUserConfig, UnbuildUserConfig, UserConfig as UserConfig$1, ViteUserConfig, WebpackUserConfig } from "./config.cjs";
|
|
2
|
+
import { BabelUserConfig, ESBuildUserConfig, EnvironmentConfig, FarmUserConfig, InlineConfig, LogLevel, OutputConfig, RolldownUserConfig, RollupUserConfig, RspackUserConfig, TsdownUserConfig, TsupUserConfig, UnbuildUserConfig, UserConfig as UserConfig$1, ViteUserConfig, WebpackUserConfig } from "./config.cjs";
|
|
3
3
|
import { NonUndefined } from "@stryke/types/base";
|
|
4
4
|
import { ResolvedPreviewOptions } from "vite";
|
|
5
5
|
import { TypeDefinition } from "@stryke/types/configuration";
|
|
@@ -77,7 +77,7 @@ type ResolvedConfig<TUserConfig extends UserConfig$1 = UserConfig$1> = Omit<TUse
|
|
|
77
77
|
*
|
|
78
78
|
* @defaultValue "info"
|
|
79
79
|
*/
|
|
80
|
-
logLevel:
|
|
80
|
+
logLevel: LogLevel | null;
|
|
81
81
|
};
|
|
82
82
|
type ViteResolvedConfig = ResolvedConfig<ViteUserConfig>;
|
|
83
83
|
type WebpackResolvedConfig = ResolvedConfig<WebpackUserConfig>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@powerlines/plugin-date",
|
|
3
|
-
"version": "0.12.
|
|
3
|
+
"version": "0.12.231",
|
|
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,15 +128,15 @@
|
|
|
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.93",
|
|
132
132
|
"@storm-software/config-tools": "^1.188.80",
|
|
133
133
|
"@stryke/path": "^0.26.0",
|
|
134
|
-
"powerlines": "^0.37.
|
|
134
|
+
"powerlines": "^0.37.73"
|
|
135
135
|
},
|
|
136
136
|
"devDependencies": {
|
|
137
|
-
"@powerlines/plugin-plugin": "^0.12.
|
|
137
|
+
"@powerlines/plugin-plugin": "^0.12.151",
|
|
138
138
|
"@types/node": "^24.10.9"
|
|
139
139
|
},
|
|
140
140
|
"publishConfig": { "access": "public" },
|
|
141
|
-
"gitHead": "
|
|
141
|
+
"gitHead": "07df17214a141836c6cc1740071e30acf8e6029c"
|
|
142
142
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import { BabelPluginContext, BabelPluginOptions, BabelPluginResolvedConfig, BabelPluginUserConfig } from "./plugin.mjs";
|