@powerlines/plugin-date 0.1.0 → 0.2.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 +2 -2
- package/dist/components/date-fns.js +2 -2
- package/dist/components/dayjs.cjs +2 -2
- package/dist/components/dayjs.js +2 -2
- package/dist/components/luxon.cjs +2 -2
- package/dist/components/luxon.js +2 -2
- package/dist/components/moment.cjs +2 -2
- package/dist/components/moment.js +2 -2
- package/dist/types/index.cjs +1 -1
- package/dist/types/index.d.cts +1 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.js +1 -1
- package/dist/types/plugin.d.cts +25 -9
- package/dist/types/plugin.d.ts +25 -9
- package/dist/types/runtime.cjs +1 -0
- package/dist/types/runtime.d.cts +710 -0
- package/dist/types/runtime.d.ts +710 -0
- package/dist/types/runtime.js +0 -0
- package/package.json +5 -5
|
@@ -8,12 +8,12 @@ function d(e){return `
|
|
|
8
8
|
/**
|
|
9
9
|
* The Powerlines 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
14
|
${fileHeader.getFileHeader()}
|
|
15
15
|
|
|
16
|
-
import { DateFormats, TimeUnit } from "powerlines/
|
|
16
|
+
import { DateFormats, TimeUnit } from "@powerlines/plugin-date/types/runtime";
|
|
17
17
|
import { addDays as dateFnsAddDays } from "date-fns/addDays";
|
|
18
18
|
import { addHours as dateFnsAddHours } from "date-fns/addHours";
|
|
19
19
|
import { addMinutes as dateFnsAddMinutes } from "date-fns/addMinutes";
|
|
@@ -8,12 +8,12 @@ function u(e){return `
|
|
|
8
8
|
/**
|
|
9
9
|
* The Powerlines 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
14
|
${getFileHeader()}
|
|
15
15
|
|
|
16
|
-
import { DateFormats, TimeUnit } from "powerlines/
|
|
16
|
+
import { DateFormats, TimeUnit } from "@powerlines/plugin-date/types/runtime";
|
|
17
17
|
import { addDays as dateFnsAddDays } from "date-fns/addDays";
|
|
18
18
|
import { addHours as dateFnsAddHours } from "date-fns/addHours";
|
|
19
19
|
import { addMinutes as dateFnsAddMinutes } from "date-fns/addMinutes";
|
|
@@ -8,7 +8,7 @@ function u(e){return `
|
|
|
8
8
|
/**
|
|
9
9
|
* The Powerlines 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
14
|
${fileHeader.getFileHeader()}
|
|
@@ -22,7 +22,7 @@ import {
|
|
|
22
22
|
StormDateInterface,
|
|
23
23
|
DateFormats,
|
|
24
24
|
TimeUnit
|
|
25
|
-
} from "powerlines/
|
|
25
|
+
} from "@powerlines/plugin-date/types/runtime";
|
|
26
26
|
|
|
27
27
|
defaultDayjs.extend(customParseFormatPlugin);
|
|
28
28
|
defaultDayjs.extend(localizedFormatPlugin);
|
package/dist/components/dayjs.js
CHANGED
|
@@ -8,7 +8,7 @@ function d(e){return `
|
|
|
8
8
|
/**
|
|
9
9
|
* The Powerlines 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
14
|
${getFileHeader()}
|
|
@@ -22,7 +22,7 @@ import {
|
|
|
22
22
|
StormDateInterface,
|
|
23
23
|
DateFormats,
|
|
24
24
|
TimeUnit
|
|
25
|
-
} from "powerlines/
|
|
25
|
+
} from "@powerlines/plugin-date/types/runtime";
|
|
26
26
|
|
|
27
27
|
defaultDayjs.extend(customParseFormatPlugin);
|
|
28
28
|
defaultDayjs.extend(localizedFormatPlugin);
|
|
@@ -8,7 +8,7 @@ function i(t){return `
|
|
|
8
8
|
/**
|
|
9
9
|
* The Powerlines date module provides utility functions for date manipulation and formatting
|
|
10
10
|
*
|
|
11
|
-
* @module ${t.config.builtinPrefix}:date
|
|
11
|
+
* @module ${t.config.output.builtinPrefix}:date
|
|
12
12
|
*/
|
|
13
13
|
|
|
14
14
|
${fileHeader.getFileHeader()}
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
StormDateInterface,
|
|
19
19
|
DateFormats,
|
|
20
20
|
TimeUnit
|
|
21
|
-
} from "powerlines/
|
|
21
|
+
} from "@powerlines/plugin-date/types/runtime";
|
|
22
22
|
|
|
23
23
|
export const formats: DateFormats = {
|
|
24
24
|
dayOfMonth: "d",
|
package/dist/components/luxon.js
CHANGED
|
@@ -8,7 +8,7 @@ function m(t){return `
|
|
|
8
8
|
/**
|
|
9
9
|
* The Powerlines date module provides utility functions for date manipulation and formatting
|
|
10
10
|
*
|
|
11
|
-
* @module ${t.config.builtinPrefix}:date
|
|
11
|
+
* @module ${t.config.output.builtinPrefix}:date
|
|
12
12
|
*/
|
|
13
13
|
|
|
14
14
|
${getFileHeader()}
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
StormDateInterface,
|
|
19
19
|
DateFormats,
|
|
20
20
|
TimeUnit
|
|
21
|
-
} from "powerlines/
|
|
21
|
+
} from "@powerlines/plugin-date/types/runtime";
|
|
22
22
|
|
|
23
23
|
export const formats: DateFormats = {
|
|
24
24
|
dayOfMonth: "d",
|
|
@@ -8,7 +8,7 @@ function m(t){return `
|
|
|
8
8
|
/**
|
|
9
9
|
* The Powerlines date module provides utility functions for date manipulation and formatting
|
|
10
10
|
*
|
|
11
|
-
* @module ${t.config.builtinPrefix}:date
|
|
11
|
+
* @module ${t.config.output.builtinPrefix}:date
|
|
12
12
|
*/
|
|
13
13
|
|
|
14
14
|
${fileHeader.getFileHeader()}
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
StormDateInterface,
|
|
19
19
|
DateFormats,
|
|
20
20
|
TimeUnit
|
|
21
|
-
} from "powerlines/
|
|
21
|
+
} from "@powerlines/plugin-date/types/runtime";
|
|
22
22
|
|
|
23
23
|
type Moment = defaultMoment.Moment;
|
|
24
24
|
|
|
@@ -8,7 +8,7 @@ function d(t){return `
|
|
|
8
8
|
/**
|
|
9
9
|
* The Powerlines date module provides utility functions for date manipulation and formatting
|
|
10
10
|
*
|
|
11
|
-
* @module ${t.config.builtinPrefix}:date
|
|
11
|
+
* @module ${t.config.output.builtinPrefix}:date
|
|
12
12
|
*/
|
|
13
13
|
|
|
14
14
|
${getFileHeader()}
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
StormDateInterface,
|
|
19
19
|
DateFormats,
|
|
20
20
|
TimeUnit
|
|
21
|
-
} from "powerlines/
|
|
21
|
+
} from "@powerlines/plugin-date/types/runtime";
|
|
22
22
|
|
|
23
23
|
type Moment = defaultMoment.Moment;
|
|
24
24
|
|
package/dist/types/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var plugin=require('./plugin');Object.keys(plugin).forEach(function(k){if(k!=='default'&&!Object.prototype.hasOwnProperty.call(exports,k))Object.defineProperty(exports,k,{enumerable:true,get:function(){return plugin[k]}})});
|
|
1
|
+
'use strict';var plugin=require('./plugin'),runtime=require('./runtime');Object.keys(plugin).forEach(function(k){if(k!=='default'&&!Object.prototype.hasOwnProperty.call(exports,k))Object.defineProperty(exports,k,{enumerable:true,get:function(){return plugin[k]}})});Object.keys(runtime).forEach(function(k){if(k!=='default'&&!Object.prototype.hasOwnProperty.call(exports,k))Object.defineProperty(exports,k,{enumerable:true,get:function(){return runtime[k]}})});
|
package/dist/types/index.d.cts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export { DateLibraryType, DatePluginContext, DatePluginOptions, DatePluginResolvedConfig, DatePluginUserConfig, __ΩDateLibraryType, __ΩDatePluginContext, __ΩDatePluginOptions, __ΩDatePluginResolvedConfig, __ΩDatePluginUserConfig } from './plugin.cjs';
|
|
2
|
+
export { DateFormats, StormDateInterface, TimeUnit, __ΩDateFormats, __ΩStormDateInterface, __ΩTimeUnit } from './runtime.cjs';
|
|
2
3
|
import '@alloy-js/core/jsx-runtime';
|
|
3
4
|
import '@babel/core';
|
|
4
5
|
import '@storm-software/build-tools/types';
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export { DateLibraryType, DatePluginContext, DatePluginOptions, DatePluginResolvedConfig, DatePluginUserConfig, __ΩDateLibraryType, __ΩDatePluginContext, __ΩDatePluginOptions, __ΩDatePluginResolvedConfig, __ΩDatePluginUserConfig } from './plugin.js';
|
|
2
|
+
export { DateFormats, StormDateInterface, TimeUnit, __ΩDateFormats, __ΩStormDateInterface, __ΩTimeUnit } from './runtime.js';
|
|
2
3
|
import '@alloy-js/core/jsx-runtime';
|
|
3
4
|
import '@babel/core';
|
|
4
5
|
import '@storm-software/build-tools/types';
|
package/dist/types/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export*from'./plugin';
|
|
1
|
+
export*from'./plugin';export*from'./runtime';
|
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"> & Required<Pick<TUserConfig, "name" | "title" | "plugins" | "mode" | "environments" | "tsconfig" | "build" | "transform" | "override">> & {
|
|
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
|
*
|
|
@@ -2702,14 +2720,12 @@ interface BaseConfig {
|
|
|
2702
2720
|
*/
|
|
2703
2721
|
build?: BuildConfig;
|
|
2704
2722
|
/**
|
|
2705
|
-
*
|
|
2723
|
+
* Configuration for documentation generation
|
|
2706
2724
|
*
|
|
2707
2725
|
* @remarks
|
|
2708
|
-
* This
|
|
2709
|
-
*
|
|
2710
|
-
* @defaultValue "storm"
|
|
2726
|
+
* This configuration will be used by the documentation generation plugins during the `docs` command.
|
|
2711
2727
|
*/
|
|
2712
|
-
|
|
2728
|
+
docs?: Record<string, any>;
|
|
2713
2729
|
/**
|
|
2714
2730
|
* The path to the tsconfig file to be used by the compiler
|
|
2715
2731
|
*
|
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"> & Required<Pick<TUserConfig, "name" | "title" | "plugins" | "mode" | "environments" | "tsconfig" | "build" | "transform" | "override">> & {
|
|
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
|
*
|
|
@@ -2702,14 +2720,12 @@ interface BaseConfig {
|
|
|
2702
2720
|
*/
|
|
2703
2721
|
build?: BuildConfig;
|
|
2704
2722
|
/**
|
|
2705
|
-
*
|
|
2723
|
+
* Configuration for documentation generation
|
|
2706
2724
|
*
|
|
2707
2725
|
* @remarks
|
|
2708
|
-
* This
|
|
2709
|
-
*
|
|
2710
|
-
* @defaultValue "storm"
|
|
2726
|
+
* This configuration will be used by the documentation generation plugins during the `docs` command.
|
|
2711
2727
|
*/
|
|
2712
|
-
|
|
2728
|
+
docs?: Record<string, any>;
|
|
2713
2729
|
/**
|
|
2714
2730
|
* The path to the tsconfig file to be used by the compiler
|
|
2715
2731
|
*
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';
|