@powerlines/plugin-date 0.12.8 → 0.12.9
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/chunk-FBBMZ4NC.cjs +7 -0
- package/dist/chunk-UCUR73HG.js +7 -0
- package/dist/components/date-fns.cjs +519 -0
- package/dist/components/date-fns.d.cts +37 -0
- package/dist/components/date-fns.d.ts +37 -0
- package/dist/components/date-fns.js +519 -0
- package/dist/components/dayjs.cjs +464 -0
- package/dist/components/dayjs.d.cts +37 -0
- package/dist/components/dayjs.d.ts +37 -0
- package/dist/components/dayjs.js +464 -0
- package/dist/components/index.cjs +1 -0
- package/dist/components/index.d.cts +31 -0
- package/dist/components/index.d.ts +31 -0
- package/dist/components/index.js +1 -0
- package/dist/components/luxon.cjs +468 -0
- package/dist/components/luxon.d.cts +37 -0
- package/dist/components/luxon.d.ts +37 -0
- package/dist/components/luxon.js +468 -0
- package/dist/components/moment.cjs +454 -0
- package/dist/components/moment.d.cts +37 -0
- package/dist/components/moment.d.ts +37 -0
- package/dist/components/moment.js +454 -0
- package/dist/plugin-BorhYIKk.d.cts +3876 -0
- package/dist/plugin-BorhYIKk.d.ts +3876 -0
- package/dist/src/index.cjs +7 -0
- package/dist/src/index.d.cts +40 -0
- package/dist/src/index.d.ts +40 -0
- package/dist/src/index.js +7 -0
- package/dist/types/index.cjs +1 -0
- package/dist/types/index.d.cts +28 -0
- package/dist/types/index.d.ts +28 -0
- package/dist/types/index.js +1 -0
- package/dist/types/plugin.cjs +1 -0
- package/dist/types/plugin.d.cts +27 -0
- package/dist/types/plugin.d.ts +27 -0
- package/dist/types/plugin.js +0 -0
- package/dist/types/runtime.cjs +1 -0
- package/dist/types/runtime.d.cts +707 -0
- package/dist/types/runtime.d.ts +707 -0
- package/dist/types/runtime.js +0 -0
- package/package.json +9 -9
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
'use strict';Object.defineProperty(exports,'__esModule',{value:true});var chunkFBBMZ4NC_cjs=require('../chunk-FBBMZ4NC.cjs'),n=require('@powerlines/plugin-env'),types$1=require('@storm-software/config-tools/types'),a=require('defu'),dateFns=require('./components/date-fns'),dayjs=require('./components/dayjs'),luxon=require('./components/luxon'),moment=require('./components/moment'),components=require('./components'),types=require('./types');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var n__default=/*#__PURE__*/_interopDefault(n);var a__default=/*#__PURE__*/_interopDefault(a);/*****************************************
|
|
2
|
+
*
|
|
3
|
+
* ⚡ Built by Storm Software
|
|
4
|
+
*
|
|
5
|
+
*****************************************/
|
|
6
|
+
|
|
7
|
+
function f(i={}){return {name:"date",dependsOn:[n__default.default(i.env)],async config(){this.log(types$1.LogLevelLabel.TRACE,"Providing default configuration for the Powerlines `date` build plugin.");const e={date:a__default.default(i,{type:"date-fns"})};return (!e.date.type||!["date-fns","dayjs","luxon","moment"].includes(e.date.type))&&(e.date.type&&this.log(types$1.LogLevelLabel.WARN,`Invalid date library type "${e.date.type}" specified. Defaulting to "date-fns".`),e.date.type="date-fns"),this.log(types$1.LogLevelLabel.DEBUG,`Using date library: ${e.date.type}`),e},async configResolved(){this.log(types$1.LogLevelLabel.TRACE,"Environment plugin configuration has been resolved for the Powerlines project."),this.dependencies[this.config.date.type]="latest";},async prepare(){this.log(types$1.LogLevelLabel.TRACE,"Preparing the Date runtime artifacts for the Powerlines project.");let e;switch(this.config.date.type){case "dayjs":e=dayjs.dayjsModule;break;case "luxon":e=luxon.luxonModule;break;case "moment":e=moment.momentModule;break;case "date-fns":default:e=dateFns.dateFnsModule;break}await this.writeBuiltin(await Promise.resolve(e(this)),"date","date.ts");}}}chunkFBBMZ4NC_cjs.a(f,"plugin");var j=f;exports.default=j;exports.plugin=f;Object.keys(components).forEach(function(k){if(k!=='default'&&!Object.prototype.hasOwnProperty.call(exports,k))Object.defineProperty(exports,k,{enumerable:true,get:function(){return components[k]}})});Object.keys(types).forEach(function(k){if(k!=='default'&&!Object.prototype.hasOwnProperty.call(exports,k))Object.defineProperty(exports,k,{enumerable:true,get:function(){return types[k]}})});
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { a as DatePluginOptions, P as Plugin, d as DatePluginContext } from '../plugin-BorhYIKk.cjs';
|
|
2
|
+
export { D as DateLibraryType, c as DatePluginResolvedConfig, b as DatePluginUserConfig } from '../plugin-BorhYIKk.cjs';
|
|
3
|
+
export { dateFnsModule } from '../components/date-fns.cjs';
|
|
4
|
+
export { dayjsModule } from '../components/dayjs.cjs';
|
|
5
|
+
export { luxonModule } from '../components/luxon.cjs';
|
|
6
|
+
export { momentModule } from '../components/moment.cjs';
|
|
7
|
+
export { DateFormats, StormDateInterface, TimeUnit } from '../types/runtime.cjs';
|
|
8
|
+
import '@alloy-js/core/jsx-runtime';
|
|
9
|
+
import '@deepkit/type';
|
|
10
|
+
import '@stryke/capnp';
|
|
11
|
+
import '@babel/core';
|
|
12
|
+
import '@storm-software/build-tools/types';
|
|
13
|
+
import '@storm-software/config-tools/types';
|
|
14
|
+
import '@storm-software/config/types';
|
|
15
|
+
import '@stryke/types/base';
|
|
16
|
+
import '@stryke/types/configuration';
|
|
17
|
+
import '@stryke/types/file';
|
|
18
|
+
import 'vite';
|
|
19
|
+
import '@babel/helper-plugin-utils';
|
|
20
|
+
import '@stryke/env/get-env-paths';
|
|
21
|
+
import '@stryke/types/package-json';
|
|
22
|
+
import 'jiti';
|
|
23
|
+
import 'oxc-parser';
|
|
24
|
+
import 'semver';
|
|
25
|
+
import 'unplugin';
|
|
26
|
+
import '@stryke/types/tsconfig';
|
|
27
|
+
import 'typescript';
|
|
28
|
+
import '@stryke/json/types';
|
|
29
|
+
import 'memfs';
|
|
30
|
+
import 'node:fs';
|
|
31
|
+
import 'unionfs';
|
|
32
|
+
import '@stryke/types/array';
|
|
33
|
+
import '@stryke/env/types';
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* A Powerlines plugin to assist in developing other Powerlines plugins.
|
|
37
|
+
*/
|
|
38
|
+
declare function plugin(options?: DatePluginOptions): Plugin<DatePluginContext>;
|
|
39
|
+
|
|
40
|
+
export { DatePluginContext, DatePluginOptions, plugin as default, plugin };
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { a as DatePluginOptions, P as Plugin, d as DatePluginContext } from '../plugin-BorhYIKk.js';
|
|
2
|
+
export { D as DateLibraryType, c as DatePluginResolvedConfig, b as DatePluginUserConfig } from '../plugin-BorhYIKk.js';
|
|
3
|
+
export { dateFnsModule } from '../components/date-fns.js';
|
|
4
|
+
export { dayjsModule } from '../components/dayjs.js';
|
|
5
|
+
export { luxonModule } from '../components/luxon.js';
|
|
6
|
+
export { momentModule } from '../components/moment.js';
|
|
7
|
+
export { DateFormats, StormDateInterface, TimeUnit } from '../types/runtime.js';
|
|
8
|
+
import '@alloy-js/core/jsx-runtime';
|
|
9
|
+
import '@deepkit/type';
|
|
10
|
+
import '@stryke/capnp';
|
|
11
|
+
import '@babel/core';
|
|
12
|
+
import '@storm-software/build-tools/types';
|
|
13
|
+
import '@storm-software/config-tools/types';
|
|
14
|
+
import '@storm-software/config/types';
|
|
15
|
+
import '@stryke/types/base';
|
|
16
|
+
import '@stryke/types/configuration';
|
|
17
|
+
import '@stryke/types/file';
|
|
18
|
+
import 'vite';
|
|
19
|
+
import '@babel/helper-plugin-utils';
|
|
20
|
+
import '@stryke/env/get-env-paths';
|
|
21
|
+
import '@stryke/types/package-json';
|
|
22
|
+
import 'jiti';
|
|
23
|
+
import 'oxc-parser';
|
|
24
|
+
import 'semver';
|
|
25
|
+
import 'unplugin';
|
|
26
|
+
import '@stryke/types/tsconfig';
|
|
27
|
+
import 'typescript';
|
|
28
|
+
import '@stryke/json/types';
|
|
29
|
+
import 'memfs';
|
|
30
|
+
import 'node:fs';
|
|
31
|
+
import 'unionfs';
|
|
32
|
+
import '@stryke/types/array';
|
|
33
|
+
import '@stryke/env/types';
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* A Powerlines plugin to assist in developing other Powerlines plugins.
|
|
37
|
+
*/
|
|
38
|
+
declare function plugin(options?: DatePluginOptions): Plugin<DatePluginContext>;
|
|
39
|
+
|
|
40
|
+
export { DatePluginContext, DatePluginOptions, plugin as default, plugin };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import {a}from'../chunk-UCUR73HG.js';import n from'@powerlines/plugin-env';import {LogLevelLabel}from'@storm-software/config-tools/types';import a$1 from'defu';import {dateFnsModule}from'./components/date-fns';import {dayjsModule}from'./components/dayjs';import {luxonModule}from'./components/luxon';import {momentModule}from'./components/moment';export*from'./components';export*from'./types';/*****************************************
|
|
2
|
+
*
|
|
3
|
+
* ⚡ Built by Storm Software
|
|
4
|
+
*
|
|
5
|
+
*****************************************/
|
|
6
|
+
|
|
7
|
+
function f(i={}){return {name:"date",dependsOn:[n(i.env)],async config(){this.log(LogLevelLabel.TRACE,"Providing default configuration for the Powerlines `date` build plugin.");const e={date:a$1(i,{type:"date-fns"})};return (!e.date.type||!["date-fns","dayjs","luxon","moment"].includes(e.date.type))&&(e.date.type&&this.log(LogLevelLabel.WARN,`Invalid date library type "${e.date.type}" specified. Defaulting to "date-fns".`),e.date.type="date-fns"),this.log(LogLevelLabel.DEBUG,`Using date library: ${e.date.type}`),e},async configResolved(){this.log(LogLevelLabel.TRACE,"Environment plugin configuration has been resolved for the Powerlines project."),this.dependencies[this.config.date.type]="latest";},async prepare(){this.log(LogLevelLabel.TRACE,"Preparing the Date runtime artifacts for the Powerlines project.");let e;switch(this.config.date.type){case "dayjs":e=dayjsModule;break;case "luxon":e=luxonModule;break;case "moment":e=momentModule;break;case "date-fns":default:e=dateFnsModule;break}await this.writeBuiltin(await Promise.resolve(e(this)),"date","date.ts");}}}a(f,"plugin");var E=f;export{E as default,f as plugin};
|
|
@@ -0,0 +1 @@
|
|
|
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]}})});
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export { D as DateLibraryType, d as DatePluginContext, a as DatePluginOptions, c as DatePluginResolvedConfig, b as DatePluginUserConfig } from '../plugin-BorhYIKk.cjs';
|
|
2
|
+
export { DateFormats, StormDateInterface, TimeUnit } from './runtime.cjs';
|
|
3
|
+
import '@alloy-js/core/jsx-runtime';
|
|
4
|
+
import '@deepkit/type';
|
|
5
|
+
import '@stryke/capnp';
|
|
6
|
+
import '@babel/core';
|
|
7
|
+
import '@storm-software/build-tools/types';
|
|
8
|
+
import '@storm-software/config-tools/types';
|
|
9
|
+
import '@storm-software/config/types';
|
|
10
|
+
import '@stryke/types/base';
|
|
11
|
+
import '@stryke/types/configuration';
|
|
12
|
+
import '@stryke/types/file';
|
|
13
|
+
import 'vite';
|
|
14
|
+
import '@babel/helper-plugin-utils';
|
|
15
|
+
import '@stryke/env/get-env-paths';
|
|
16
|
+
import '@stryke/types/package-json';
|
|
17
|
+
import 'jiti';
|
|
18
|
+
import 'oxc-parser';
|
|
19
|
+
import 'semver';
|
|
20
|
+
import 'unplugin';
|
|
21
|
+
import '@stryke/types/tsconfig';
|
|
22
|
+
import 'typescript';
|
|
23
|
+
import '@stryke/json/types';
|
|
24
|
+
import 'memfs';
|
|
25
|
+
import 'node:fs';
|
|
26
|
+
import 'unionfs';
|
|
27
|
+
import '@stryke/types/array';
|
|
28
|
+
import '@stryke/env/types';
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export { D as DateLibraryType, d as DatePluginContext, a as DatePluginOptions, c as DatePluginResolvedConfig, b as DatePluginUserConfig } from '../plugin-BorhYIKk.js';
|
|
2
|
+
export { DateFormats, StormDateInterface, TimeUnit } from './runtime.js';
|
|
3
|
+
import '@alloy-js/core/jsx-runtime';
|
|
4
|
+
import '@deepkit/type';
|
|
5
|
+
import '@stryke/capnp';
|
|
6
|
+
import '@babel/core';
|
|
7
|
+
import '@storm-software/build-tools/types';
|
|
8
|
+
import '@storm-software/config-tools/types';
|
|
9
|
+
import '@storm-software/config/types';
|
|
10
|
+
import '@stryke/types/base';
|
|
11
|
+
import '@stryke/types/configuration';
|
|
12
|
+
import '@stryke/types/file';
|
|
13
|
+
import 'vite';
|
|
14
|
+
import '@babel/helper-plugin-utils';
|
|
15
|
+
import '@stryke/env/get-env-paths';
|
|
16
|
+
import '@stryke/types/package-json';
|
|
17
|
+
import 'jiti';
|
|
18
|
+
import 'oxc-parser';
|
|
19
|
+
import 'semver';
|
|
20
|
+
import 'unplugin';
|
|
21
|
+
import '@stryke/types/tsconfig';
|
|
22
|
+
import 'typescript';
|
|
23
|
+
import '@stryke/json/types';
|
|
24
|
+
import 'memfs';
|
|
25
|
+
import 'node:fs';
|
|
26
|
+
import 'unionfs';
|
|
27
|
+
import '@stryke/types/array';
|
|
28
|
+
import '@stryke/env/types';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export*from'./plugin';export*from'./runtime';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export { D as DateLibraryType, d as DatePluginContext, a as DatePluginOptions, c as DatePluginResolvedConfig, b as DatePluginUserConfig } from '../plugin-BorhYIKk.cjs';
|
|
2
|
+
import '@alloy-js/core/jsx-runtime';
|
|
3
|
+
import '@deepkit/type';
|
|
4
|
+
import '@stryke/capnp';
|
|
5
|
+
import '@babel/core';
|
|
6
|
+
import '@storm-software/build-tools/types';
|
|
7
|
+
import '@storm-software/config-tools/types';
|
|
8
|
+
import '@storm-software/config/types';
|
|
9
|
+
import '@stryke/types/base';
|
|
10
|
+
import '@stryke/types/configuration';
|
|
11
|
+
import '@stryke/types/file';
|
|
12
|
+
import 'vite';
|
|
13
|
+
import '@babel/helper-plugin-utils';
|
|
14
|
+
import '@stryke/env/get-env-paths';
|
|
15
|
+
import '@stryke/types/package-json';
|
|
16
|
+
import 'jiti';
|
|
17
|
+
import 'oxc-parser';
|
|
18
|
+
import 'semver';
|
|
19
|
+
import 'unplugin';
|
|
20
|
+
import '@stryke/types/tsconfig';
|
|
21
|
+
import 'typescript';
|
|
22
|
+
import '@stryke/json/types';
|
|
23
|
+
import 'memfs';
|
|
24
|
+
import 'node:fs';
|
|
25
|
+
import 'unionfs';
|
|
26
|
+
import '@stryke/types/array';
|
|
27
|
+
import '@stryke/env/types';
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export { D as DateLibraryType, d as DatePluginContext, a as DatePluginOptions, c as DatePluginResolvedConfig, b as DatePluginUserConfig } from '../plugin-BorhYIKk.js';
|
|
2
|
+
import '@alloy-js/core/jsx-runtime';
|
|
3
|
+
import '@deepkit/type';
|
|
4
|
+
import '@stryke/capnp';
|
|
5
|
+
import '@babel/core';
|
|
6
|
+
import '@storm-software/build-tools/types';
|
|
7
|
+
import '@storm-software/config-tools/types';
|
|
8
|
+
import '@storm-software/config/types';
|
|
9
|
+
import '@stryke/types/base';
|
|
10
|
+
import '@stryke/types/configuration';
|
|
11
|
+
import '@stryke/types/file';
|
|
12
|
+
import 'vite';
|
|
13
|
+
import '@babel/helper-plugin-utils';
|
|
14
|
+
import '@stryke/env/get-env-paths';
|
|
15
|
+
import '@stryke/types/package-json';
|
|
16
|
+
import 'jiti';
|
|
17
|
+
import 'oxc-parser';
|
|
18
|
+
import 'semver';
|
|
19
|
+
import 'unplugin';
|
|
20
|
+
import '@stryke/types/tsconfig';
|
|
21
|
+
import 'typescript';
|
|
22
|
+
import '@stryke/json/types';
|
|
23
|
+
import 'memfs';
|
|
24
|
+
import 'node:fs';
|
|
25
|
+
import 'unionfs';
|
|
26
|
+
import '@stryke/types/array';
|
|
27
|
+
import '@stryke/env/types';
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';
|