@powerlines/plugin-date 0.12.131 → 0.12.133
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/_virtual/rolldown_runtime.cjs +37 -1
- package/dist/_virtual/rolldown_runtime.mjs +29 -1
- package/dist/components/date-fns.cjs +19 -5
- package/dist/components/date-fns.mjs +19 -5
- package/dist/components/dayjs.cjs +19 -5
- package/dist/components/dayjs.mjs +19 -5
- package/dist/components/index.cjs +4 -1
- package/dist/components/index.mjs +6 -1
- package/dist/components/luxon.cjs +19 -5
- package/dist/components/luxon.mjs +19 -5
- package/dist/components/moment.cjs +19 -5
- package/dist/components/moment.mjs +19 -5
- package/dist/deepkit/schemas/reflection.cjs +3998 -1
- package/dist/deepkit/schemas/reflection.mjs +3996 -1
- package/dist/deepkit/schemas/reflection2.cjs +4112 -1
- package/dist/deepkit/schemas/reflection2.mjs +4110 -1
- package/dist/deepkit/src/capnp.cjs +913 -1
- package/dist/deepkit/src/capnp.mjs +911 -1
- package/dist/deepkit/src/esbuild-plugin.cjs +47 -4
- package/dist/deepkit/src/esbuild-plugin.mjs +46 -4
- package/dist/deepkit/src/reflect-type.cjs +22 -1
- package/dist/deepkit/src/reflect-type.mjs +20 -1
- package/dist/deepkit/src/resolve-reflections.cjs +16 -1
- package/dist/deepkit/src/resolve-reflections.mjs +15 -1
- package/dist/deepkit/src/transformer.cjs +52 -1
- package/dist/deepkit/src/transformer.mjs +49 -1
- package/dist/deepkit/src/transpile.cjs +29 -1
- package/dist/deepkit/src/transpile.mjs +27 -1
- package/dist/deepkit/src/utilities.cjs +66 -1
- package/dist/deepkit/src/utilities.mjs +65 -1
- package/dist/deepkit/src/vendor/type-compiler/index.cjs +38 -1
- package/dist/deepkit/src/vendor/type-compiler/index.mjs +19 -1
- package/dist/deepkit/src/vendor/type.cjs +20 -1
- package/dist/deepkit/src/vendor/type.mjs +11 -1
- package/dist/index.cjs +69 -1
- package/dist/index.mjs +61 -1
- package/dist/plugin-alloy/src/core/components/output.cjs +38 -1
- package/dist/plugin-alloy/src/core/components/output.mjs +37 -1
- package/dist/plugin-alloy/src/core/contexts/context.cjs +11 -1
- package/dist/plugin-alloy/src/core/contexts/context.mjs +10 -1
- package/dist/plugin-alloy/src/index.cjs +90 -1
- package/dist/plugin-alloy/src/index.mjs +88 -1
- package/dist/plugin-automd/src/index.cjs +101 -1
- package/dist/plugin-automd/src/index.mjs +98 -1
- package/dist/plugin-babel/src/helpers/ast-utils.cjs +10 -1
- package/dist/plugin-babel/src/helpers/ast-utils.mjs +9 -1
- package/dist/plugin-babel/src/helpers/create-plugin.cjs +41 -1
- package/dist/plugin-babel/src/helpers/create-plugin.mjs +39 -1
- package/dist/plugin-babel/src/helpers/filters.cjs +23 -1
- package/dist/plugin-babel/src/helpers/filters.mjs +21 -1
- package/dist/plugin-babel/src/helpers/index.cjs +5 -1
- package/dist/plugin-babel/src/helpers/index.mjs +7 -1
- package/dist/plugin-babel/src/helpers/module-helpers.cjs +38 -1
- package/dist/plugin-babel/src/helpers/module-helpers.mjs +35 -1
- package/dist/plugin-babel/src/helpers/options.cjs +50 -1
- package/dist/plugin-babel/src/helpers/options.mjs +47 -1
- package/dist/plugin-babel/src/index.cjs +91 -1
- package/dist/plugin-babel/src/index.mjs +89 -1
- package/dist/plugin-env/src/babel/index.cjs +1 -1
- package/dist/plugin-env/src/babel/index.mjs +3 -1
- package/dist/plugin-env/src/babel/plugin.cjs +120 -4
- package/dist/plugin-env/src/babel/plugin.mjs +118 -4
- package/dist/plugin-env/src/components/docs.cjs +9 -1
- package/dist/plugin-env/src/components/docs.mjs +11 -1
- package/dist/plugin-env/src/components/env.cjs +349 -11
- package/dist/plugin-env/src/components/env.mjs +347 -9
- package/dist/plugin-env/src/components/index.cjs +2 -1
- package/dist/plugin-env/src/components/index.mjs +4 -1
- package/dist/plugin-env/src/helpers/automd-generator.cjs +22 -1
- package/dist/plugin-env/src/helpers/automd-generator.mjs +21 -1
- package/dist/plugin-env/src/helpers/create-reflection-resource.cjs +55 -1
- package/dist/plugin-env/src/helpers/create-reflection-resource.mjs +54 -1
- package/dist/plugin-env/src/helpers/index.cjs +6 -1
- package/dist/plugin-env/src/helpers/index.mjs +8 -1
- package/dist/plugin-env/src/helpers/load.cjs +83 -1
- package/dist/plugin-env/src/helpers/load.mjs +80 -1
- package/dist/plugin-env/src/helpers/persistence.cjs +200 -1
- package/dist/plugin-env/src/helpers/persistence.mjs +189 -1
- package/dist/plugin-env/src/helpers/reflect.cjs +125 -1
- package/dist/plugin-env/src/helpers/reflect.mjs +117 -1
- package/dist/plugin-env/src/helpers/source-file-env.cjs +24 -1
- package/dist/plugin-env/src/helpers/source-file-env.mjs +23 -1
- package/dist/plugin-env/src/helpers/template-helpers.cjs +2 -1
- package/dist/plugin-env/src/helpers/template-helpers.mjs +4 -1
- package/dist/plugin-env/src/index.cjs +167 -5
- package/dist/plugin-env/src/index.mjs +165 -5
- package/dist/powerlines/src/lib/build/esbuild.cjs +102 -14
- package/dist/powerlines/src/lib/build/esbuild.mjs +100 -14
- package/dist/powerlines/src/lib/entry.cjs +12 -1
- package/dist/powerlines/src/lib/entry.mjs +14 -1
- package/dist/powerlines/src/lib/logger.cjs +41 -1
- package/dist/powerlines/src/lib/logger.mjs +39 -1
- package/dist/powerlines/src/lib/utilities/bundle.cjs +35 -1
- package/dist/powerlines/src/lib/utilities/bundle.mjs +34 -1
- package/dist/powerlines/src/lib/utilities/file-header.cjs +19 -7
- package/dist/powerlines/src/lib/utilities/file-header.mjs +18 -7
- package/dist/powerlines/src/lib/utilities/resolve.cjs +30 -1
- package/dist/powerlines/src/lib/utilities/resolve.mjs +29 -1
- package/dist/powerlines/src/plugin-utils/paths.cjs +1 -1
- package/dist/powerlines/src/plugin-utils/paths.mjs +3 -1
- package/dist/powerlines/src/types/build.d.mts +2 -0
- package/dist/powerlines/src/types/context.d.cts +27 -3
- package/dist/powerlines/src/types/context.d.mts +27 -3
- package/dist/powerlines/src/types/resolved.d.mts +1 -0
- package/dist/types/index.mjs +1 -1
- package/dist/types/plugin.mjs +1 -1
- package/dist/types/runtime.mjs +1 -1
- package/package.json +7 -7
|
@@ -1 +1,37 @@
|
|
|
1
|
-
|
|
1
|
+
//#region rolldown:runtime
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __copyProps = (to, from, except, desc) => {
|
|
9
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
10
|
+
for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
11
|
+
key = keys[i];
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except) {
|
|
13
|
+
__defProp(to, key, {
|
|
14
|
+
get: ((k) => from[k]).bind(null, key),
|
|
15
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
return to;
|
|
21
|
+
};
|
|
22
|
+
var __reExport = (target, mod, secondTarget, symbols) => {
|
|
23
|
+
if (symbols) {
|
|
24
|
+
__defProp(target, Symbol.toStringTag, { value: "Module" });
|
|
25
|
+
secondTarget && __defProp(secondTarget, Symbol.toStringTag, { value: "Module" });
|
|
26
|
+
}
|
|
27
|
+
__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default");
|
|
28
|
+
};
|
|
29
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
30
|
+
value: mod,
|
|
31
|
+
enumerable: true
|
|
32
|
+
}) : target, mod));
|
|
33
|
+
|
|
34
|
+
//#endregion
|
|
35
|
+
|
|
36
|
+
exports.__reExport = __reExport;
|
|
37
|
+
exports.__toESM = __toESM;
|
|
@@ -1 +1,29 @@
|
|
|
1
|
-
|
|
1
|
+
//#region rolldown:runtime
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __copyProps = (to, from, except, desc) => {
|
|
7
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
8
|
+
for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
9
|
+
key = keys[i];
|
|
10
|
+
if (!__hasOwnProp.call(to, key) && key !== except) {
|
|
11
|
+
__defProp(to, key, {
|
|
12
|
+
get: ((k) => from[k]).bind(null, key),
|
|
13
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __reExport = (target, mod, secondTarget, symbols) => {
|
|
21
|
+
if (symbols) {
|
|
22
|
+
__defProp(target, Symbol.toStringTag, { value: "Module" });
|
|
23
|
+
secondTarget && __defProp(secondTarget, Symbol.toStringTag, { value: "Module" });
|
|
24
|
+
}
|
|
25
|
+
__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default");
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
//#endregion
|
|
29
|
+
export { __reExport };
|
|
@@ -1,11 +1,21 @@
|
|
|
1
|
-
const
|
|
1
|
+
const require_file_header = require('../powerlines/src/lib/utilities/file-header.cjs');
|
|
2
|
+
|
|
3
|
+
//#region src/components/date-fns.ts
|
|
4
|
+
/**
|
|
5
|
+
* Generates the Powerlines configuration file.
|
|
6
|
+
*
|
|
7
|
+
* @param context - The build context containing runtime information.
|
|
8
|
+
* @returns A string representing the configuration file content.
|
|
9
|
+
*/
|
|
10
|
+
function dateFnsModule(context) {
|
|
11
|
+
return `
|
|
2
12
|
/**
|
|
3
13
|
* The Date module provides utility functions for date manipulation and formatting
|
|
4
14
|
*
|
|
5
|
-
* @module ${
|
|
15
|
+
* @module ${context.config.output.builtinPrefix}:date
|
|
6
16
|
*/
|
|
7
17
|
|
|
8
|
-
${
|
|
18
|
+
${require_file_header.getFileHeader(context)}
|
|
9
19
|
|
|
10
20
|
import { DateFormats, TimeUnit } from "@powerlines/plugin-date/types/runtime";
|
|
11
21
|
import { addDays as dateFnsAddDays } from "date-fns/addDays";
|
|
@@ -50,7 +60,7 @@ import { isSameYear as dateFnsIsSameYear } from "date-fns/isSameYear";
|
|
|
50
60
|
import { isValid as dateFnsIsValid } from "date-fns/isValid";
|
|
51
61
|
import { isWithinInterval } from "date-fns/isWithinInterval";
|
|
52
62
|
import { Locale } from "date-fns/locale";
|
|
53
|
-
import { ${
|
|
63
|
+
import { ${context.env.parsed.DEFAULT_LOCALE?.replaceAll("-", "") || "enUS"} as defaultLocale } from "date-fns/locale/${context.env.parsed.DEFAULT_LOCALE || "en-US"}";
|
|
54
64
|
import { parse as dateFnsParse } from "date-fns/parse";
|
|
55
65
|
import { parseISO as dateFnsParseISO } from "date-fns/parseISO";
|
|
56
66
|
import { setDate as dateFnsSetDate } from "date-fns/setDate";
|
|
@@ -510,4 +520,8 @@ export function getYearRange(start: Date, end: Date) {
|
|
|
510
520
|
}
|
|
511
521
|
|
|
512
522
|
|
|
513
|
-
|
|
523
|
+
`;
|
|
524
|
+
}
|
|
525
|
+
|
|
526
|
+
//#endregion
|
|
527
|
+
exports.dateFnsModule = dateFnsModule;
|
|
@@ -1,11 +1,21 @@
|
|
|
1
|
-
import{getFileHeader
|
|
1
|
+
import { getFileHeader } from "../powerlines/src/lib/utilities/file-header.mjs";
|
|
2
|
+
|
|
3
|
+
//#region src/components/date-fns.ts
|
|
4
|
+
/**
|
|
5
|
+
* Generates the Powerlines configuration file.
|
|
6
|
+
*
|
|
7
|
+
* @param context - The build context containing runtime information.
|
|
8
|
+
* @returns A string representing the configuration file content.
|
|
9
|
+
*/
|
|
10
|
+
function dateFnsModule(context) {
|
|
11
|
+
return `
|
|
2
12
|
/**
|
|
3
13
|
* The Date module provides utility functions for date manipulation and formatting
|
|
4
14
|
*
|
|
5
|
-
* @module ${
|
|
15
|
+
* @module ${context.config.output.builtinPrefix}:date
|
|
6
16
|
*/
|
|
7
17
|
|
|
8
|
-
${
|
|
18
|
+
${getFileHeader(context)}
|
|
9
19
|
|
|
10
20
|
import { DateFormats, TimeUnit } from "@powerlines/plugin-date/types/runtime";
|
|
11
21
|
import { addDays as dateFnsAddDays } from "date-fns/addDays";
|
|
@@ -50,7 +60,7 @@ import { isSameYear as dateFnsIsSameYear } from "date-fns/isSameYear";
|
|
|
50
60
|
import { isValid as dateFnsIsValid } from "date-fns/isValid";
|
|
51
61
|
import { isWithinInterval } from "date-fns/isWithinInterval";
|
|
52
62
|
import { Locale } from "date-fns/locale";
|
|
53
|
-
import { ${
|
|
63
|
+
import { ${context.env.parsed.DEFAULT_LOCALE?.replaceAll("-", "") || "enUS"} as defaultLocale } from "date-fns/locale/${context.env.parsed.DEFAULT_LOCALE || "en-US"}";
|
|
54
64
|
import { parse as dateFnsParse } from "date-fns/parse";
|
|
55
65
|
import { parseISO as dateFnsParseISO } from "date-fns/parseISO";
|
|
56
66
|
import { setDate as dateFnsSetDate } from "date-fns/setDate";
|
|
@@ -510,4 +520,8 @@ export function getYearRange(start: Date, end: Date) {
|
|
|
510
520
|
}
|
|
511
521
|
|
|
512
522
|
|
|
513
|
-
|
|
523
|
+
`;
|
|
524
|
+
}
|
|
525
|
+
|
|
526
|
+
//#endregion
|
|
527
|
+
export { dateFnsModule };
|
|
@@ -1,11 +1,21 @@
|
|
|
1
|
-
const
|
|
1
|
+
const require_file_header = require('../powerlines/src/lib/utilities/file-header.cjs');
|
|
2
|
+
|
|
3
|
+
//#region src/components/dayjs.ts
|
|
4
|
+
/**
|
|
5
|
+
* Generates the Powerlines configuration file.
|
|
6
|
+
*
|
|
7
|
+
* @param context - The build context containing runtime information.
|
|
8
|
+
* @returns A string representing the configuration file content.
|
|
9
|
+
*/
|
|
10
|
+
function dayjsModule(context) {
|
|
11
|
+
return `
|
|
2
12
|
/**
|
|
3
13
|
* The Date module provides utility functions for date manipulation and formatting
|
|
4
14
|
*
|
|
5
|
-
* @module ${
|
|
15
|
+
* @module ${context.config.output.builtinPrefix}:date
|
|
6
16
|
*/
|
|
7
17
|
|
|
8
|
-
${
|
|
18
|
+
${require_file_header.getFileHeader(context)}
|
|
9
19
|
|
|
10
20
|
import defaultDayjs, { QUnitType } from "dayjs";
|
|
11
21
|
import customParseFormatPlugin from "dayjs/plugin/customParseFormat";
|
|
@@ -71,7 +81,7 @@ export const formats: DateFormats = {
|
|
|
71
81
|
filePathDateTime: "L_HH-mm-ss-SSS"
|
|
72
82
|
};
|
|
73
83
|
|
|
74
|
-
export let locale = "${
|
|
84
|
+
export let locale = "${context.env.parsed.DEFAULT_LOCALE || context.workspaceConfig.locale ? `${context.env.parsed.DEFAULT_LOCALE || context.workspaceConfig.locale}` : "en-US"}";
|
|
75
85
|
|
|
76
86
|
export const dayjs = withLocale(defaultDayjs, locale);
|
|
77
87
|
|
|
@@ -455,4 +465,8 @@ export function isWithinRange(date: Dayjs, [start, end]: [Dayjs, Dayjs]) {
|
|
|
455
465
|
};
|
|
456
466
|
|
|
457
467
|
|
|
458
|
-
|
|
468
|
+
`;
|
|
469
|
+
}
|
|
470
|
+
|
|
471
|
+
//#endregion
|
|
472
|
+
exports.dayjsModule = dayjsModule;
|
|
@@ -1,11 +1,21 @@
|
|
|
1
|
-
import{getFileHeader
|
|
1
|
+
import { getFileHeader } from "../powerlines/src/lib/utilities/file-header.mjs";
|
|
2
|
+
|
|
3
|
+
//#region src/components/dayjs.ts
|
|
4
|
+
/**
|
|
5
|
+
* Generates the Powerlines configuration file.
|
|
6
|
+
*
|
|
7
|
+
* @param context - The build context containing runtime information.
|
|
8
|
+
* @returns A string representing the configuration file content.
|
|
9
|
+
*/
|
|
10
|
+
function dayjsModule(context) {
|
|
11
|
+
return `
|
|
2
12
|
/**
|
|
3
13
|
* The Date module provides utility functions for date manipulation and formatting
|
|
4
14
|
*
|
|
5
|
-
* @module ${
|
|
15
|
+
* @module ${context.config.output.builtinPrefix}:date
|
|
6
16
|
*/
|
|
7
17
|
|
|
8
|
-
${
|
|
18
|
+
${getFileHeader(context)}
|
|
9
19
|
|
|
10
20
|
import defaultDayjs, { QUnitType } from "dayjs";
|
|
11
21
|
import customParseFormatPlugin from "dayjs/plugin/customParseFormat";
|
|
@@ -71,7 +81,7 @@ export const formats: DateFormats = {
|
|
|
71
81
|
filePathDateTime: "L_HH-mm-ss-SSS"
|
|
72
82
|
};
|
|
73
83
|
|
|
74
|
-
export let locale = "${
|
|
84
|
+
export let locale = "${context.env.parsed.DEFAULT_LOCALE || context.workspaceConfig.locale ? `${context.env.parsed.DEFAULT_LOCALE || context.workspaceConfig.locale}` : "en-US"}";
|
|
75
85
|
|
|
76
86
|
export const dayjs = withLocale(defaultDayjs, locale);
|
|
77
87
|
|
|
@@ -455,4 +465,8 @@ export function isWithinRange(date: Dayjs, [start, end]: [Dayjs, Dayjs]) {
|
|
|
455
465
|
};
|
|
456
466
|
|
|
457
467
|
|
|
458
|
-
|
|
468
|
+
`;
|
|
469
|
+
}
|
|
470
|
+
|
|
471
|
+
//#endregion
|
|
472
|
+
export { dayjsModule };
|
|
@@ -1 +1,4 @@
|
|
|
1
|
-
const
|
|
1
|
+
const require_date_fns = require('./date-fns.cjs');
|
|
2
|
+
const require_dayjs = require('./dayjs.cjs');
|
|
3
|
+
const require_luxon = require('./luxon.cjs');
|
|
4
|
+
const require_moment = require('./moment.cjs');
|
|
@@ -1 +1,6 @@
|
|
|
1
|
-
import{dateFnsModule
|
|
1
|
+
import { dateFnsModule } from "./date-fns.mjs";
|
|
2
|
+
import { dayjsModule } from "./dayjs.mjs";
|
|
3
|
+
import { luxonModule } from "./luxon.mjs";
|
|
4
|
+
import { momentModule } from "./moment.mjs";
|
|
5
|
+
|
|
6
|
+
export { };
|
|
@@ -1,11 +1,21 @@
|
|
|
1
|
-
const
|
|
1
|
+
const require_file_header = require('../powerlines/src/lib/utilities/file-header.cjs');
|
|
2
|
+
|
|
3
|
+
//#region src/components/luxon.ts
|
|
4
|
+
/**
|
|
5
|
+
* Generates the Powerlines configuration file.
|
|
6
|
+
*
|
|
7
|
+
* @param context - The build context containing runtime information.
|
|
8
|
+
* @returns A string representing the configuration file content.
|
|
9
|
+
*/
|
|
10
|
+
function luxonModule(context) {
|
|
11
|
+
return `
|
|
2
12
|
/**
|
|
3
13
|
* The Date module provides utility functions for date manipulation and formatting
|
|
4
14
|
*
|
|
5
|
-
* @module ${
|
|
15
|
+
* @module ${context.config.output.builtinPrefix}:date
|
|
6
16
|
*/
|
|
7
17
|
|
|
8
|
-
${
|
|
18
|
+
${require_file_header.getFileHeader(context)}
|
|
9
19
|
|
|
10
20
|
import { DateTime, Settings, Info } from "luxon";
|
|
11
21
|
import {
|
|
@@ -46,7 +56,7 @@ export const formats: DateFormats = {
|
|
|
46
56
|
year: "yyyy",
|
|
47
57
|
};
|
|
48
58
|
|
|
49
|
-
export let locale = "${
|
|
59
|
+
export let locale = "${context.env.parsed.DEFAULT_LOCALE || context.workspaceConfig.locale ? `${context.env.parsed.DEFAULT_LOCALE || context.workspaceConfig.locale}` : "en-US"}";
|
|
50
60
|
|
|
51
61
|
export const type = "luxon";
|
|
52
62
|
|
|
@@ -459,4 +469,8 @@ export function isWithinRange(date: DateTime, [start, end]: [DateTime, DateTime]
|
|
|
459
469
|
};
|
|
460
470
|
|
|
461
471
|
|
|
462
|
-
|
|
472
|
+
`;
|
|
473
|
+
}
|
|
474
|
+
|
|
475
|
+
//#endregion
|
|
476
|
+
exports.luxonModule = luxonModule;
|
|
@@ -1,11 +1,21 @@
|
|
|
1
|
-
import{getFileHeader
|
|
1
|
+
import { getFileHeader } from "../powerlines/src/lib/utilities/file-header.mjs";
|
|
2
|
+
|
|
3
|
+
//#region src/components/luxon.ts
|
|
4
|
+
/**
|
|
5
|
+
* Generates the Powerlines configuration file.
|
|
6
|
+
*
|
|
7
|
+
* @param context - The build context containing runtime information.
|
|
8
|
+
* @returns A string representing the configuration file content.
|
|
9
|
+
*/
|
|
10
|
+
function luxonModule(context) {
|
|
11
|
+
return `
|
|
2
12
|
/**
|
|
3
13
|
* The Date module provides utility functions for date manipulation and formatting
|
|
4
14
|
*
|
|
5
|
-
* @module ${
|
|
15
|
+
* @module ${context.config.output.builtinPrefix}:date
|
|
6
16
|
*/
|
|
7
17
|
|
|
8
|
-
${
|
|
18
|
+
${getFileHeader(context)}
|
|
9
19
|
|
|
10
20
|
import { DateTime, Settings, Info } from "luxon";
|
|
11
21
|
import {
|
|
@@ -46,7 +56,7 @@ export const formats: DateFormats = {
|
|
|
46
56
|
year: "yyyy",
|
|
47
57
|
};
|
|
48
58
|
|
|
49
|
-
export let locale = "${
|
|
59
|
+
export let locale = "${context.env.parsed.DEFAULT_LOCALE || context.workspaceConfig.locale ? `${context.env.parsed.DEFAULT_LOCALE || context.workspaceConfig.locale}` : "en-US"}";
|
|
50
60
|
|
|
51
61
|
export const type = "luxon";
|
|
52
62
|
|
|
@@ -459,4 +469,8 @@ export function isWithinRange(date: DateTime, [start, end]: [DateTime, DateTime]
|
|
|
459
469
|
};
|
|
460
470
|
|
|
461
471
|
|
|
462
|
-
|
|
472
|
+
`;
|
|
473
|
+
}
|
|
474
|
+
|
|
475
|
+
//#endregion
|
|
476
|
+
export { luxonModule };
|
|
@@ -1,11 +1,21 @@
|
|
|
1
|
-
const
|
|
1
|
+
const require_file_header = require('../powerlines/src/lib/utilities/file-header.cjs');
|
|
2
|
+
|
|
3
|
+
//#region src/components/moment.ts
|
|
4
|
+
/**
|
|
5
|
+
* Generates the Powerlines configuration file.
|
|
6
|
+
*
|
|
7
|
+
* @param context - The build context containing runtime information.
|
|
8
|
+
* @returns A string representing the configuration file content.
|
|
9
|
+
*/
|
|
10
|
+
function momentModule(context) {
|
|
11
|
+
return `
|
|
2
12
|
/**
|
|
3
13
|
* The Date module provides utility functions for date manipulation and formatting
|
|
4
14
|
*
|
|
5
|
-
* @module ${
|
|
15
|
+
* @module ${context.config.output.builtinPrefix}:date
|
|
6
16
|
*/
|
|
7
17
|
|
|
8
|
-
${
|
|
18
|
+
${require_file_header.getFileHeader(context)}
|
|
9
19
|
|
|
10
20
|
import defaultMoment, { LongDateFormatKey } from "moment";
|
|
11
21
|
import {
|
|
@@ -48,7 +58,7 @@ export const formats: DateFormats = {
|
|
|
48
58
|
filePathDateTime: "L_HH-mm-ss-SSS"
|
|
49
59
|
};
|
|
50
60
|
|
|
51
|
-
export let locale = "${
|
|
61
|
+
export let locale = "${context.env.parsed.DEFAULT_LOCALE || context.workspaceConfig.locale ? `${context.env.parsed.DEFAULT_LOCALE || context.workspaceConfig.locale}` : "en-US"}";
|
|
52
62
|
|
|
53
63
|
export const type = "moment";
|
|
54
64
|
|
|
@@ -445,4 +455,8 @@ export function isWithinRange(date: Moment, [start, end]: [Moment, Moment]) {
|
|
|
445
455
|
};
|
|
446
456
|
|
|
447
457
|
|
|
448
|
-
|
|
458
|
+
`;
|
|
459
|
+
}
|
|
460
|
+
|
|
461
|
+
//#endregion
|
|
462
|
+
exports.momentModule = momentModule;
|
|
@@ -1,11 +1,21 @@
|
|
|
1
|
-
import{getFileHeader
|
|
1
|
+
import { getFileHeader } from "../powerlines/src/lib/utilities/file-header.mjs";
|
|
2
|
+
|
|
3
|
+
//#region src/components/moment.ts
|
|
4
|
+
/**
|
|
5
|
+
* Generates the Powerlines configuration file.
|
|
6
|
+
*
|
|
7
|
+
* @param context - The build context containing runtime information.
|
|
8
|
+
* @returns A string representing the configuration file content.
|
|
9
|
+
*/
|
|
10
|
+
function momentModule(context) {
|
|
11
|
+
return `
|
|
2
12
|
/**
|
|
3
13
|
* The Date module provides utility functions for date manipulation and formatting
|
|
4
14
|
*
|
|
5
|
-
* @module ${
|
|
15
|
+
* @module ${context.config.output.builtinPrefix}:date
|
|
6
16
|
*/
|
|
7
17
|
|
|
8
|
-
${
|
|
18
|
+
${getFileHeader(context)}
|
|
9
19
|
|
|
10
20
|
import defaultMoment, { LongDateFormatKey } from "moment";
|
|
11
21
|
import {
|
|
@@ -48,7 +58,7 @@ export const formats: DateFormats = {
|
|
|
48
58
|
filePathDateTime: "L_HH-mm-ss-SSS"
|
|
49
59
|
};
|
|
50
60
|
|
|
51
|
-
export let locale = "${
|
|
61
|
+
export let locale = "${context.env.parsed.DEFAULT_LOCALE || context.workspaceConfig.locale ? `${context.env.parsed.DEFAULT_LOCALE || context.workspaceConfig.locale}` : "en-US"}";
|
|
52
62
|
|
|
53
63
|
export const type = "moment";
|
|
54
64
|
|
|
@@ -445,4 +455,8 @@ export function isWithinRange(date: Moment, [start, end]: [Moment, Moment]) {
|
|
|
445
455
|
};
|
|
446
456
|
|
|
447
457
|
|
|
448
|
-
|
|
458
|
+
`;
|
|
459
|
+
}
|
|
460
|
+
|
|
461
|
+
//#endregion
|
|
462
|
+
export { momentModule };
|