@powerlines/plugin-plugin 0.11.27 → 0.11.28
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/src/index.cjs +19 -25
- package/dist/src/index.js +16 -26
- package/dist/src/types/index.cjs +9 -0
- package/dist/src/types/index.js +1 -1
- package/dist/src/types/plugin.cjs +13 -0
- package/dist/src/types/plugin.d.ts +5 -0
- package/dist/src/types/plugin.js +8 -0
- package/package.json +7 -7
package/dist/src/index.cjs
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
+
var src_types_plugin = require('./types/plugin.cjs');
|
|
5
6
|
var alloyBabelPreset = require('@alloy-js/babel-preset');
|
|
6
7
|
var typescriptBabelPreset = require('@babel/preset-typescript');
|
|
7
8
|
var types = require('@storm-software/config-tools/types');
|
|
@@ -13,30 +14,18 @@ var defu = require('defu');
|
|
|
13
14
|
var index = require('../node_modules/.pnpm/esbuild-plugin-babel@0.2.3_@babel_core@7.28.5/node_modules/esbuild-plugin-babel/src/index.cjs');
|
|
14
15
|
var tsup$1 = require('powerlines/lib/build/tsup');
|
|
15
16
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
is maintained by Storm Software under the Apache-2.0 license, and is
|
|
22
|
-
free for commercial and private use. For more information, please visit
|
|
23
|
-
our licensing page at https://stormsoftware.com/licenses/projects/powerlines.
|
|
24
|
-
|
|
25
|
-
Website: https://stormsoftware.com
|
|
26
|
-
Repository: https://github.com/storm-software/powerlines
|
|
27
|
-
Documentation: https://docs.stormsoftware.com/projects/powerlines
|
|
28
|
-
Contact: https://stormsoftware.com/contact
|
|
29
|
-
|
|
30
|
-
SPDX-License-Identifier: Apache-2.0
|
|
31
|
-
|
|
32
|
-
------------------------------------------------------------------- */
|
|
17
|
+
/*@ts-ignore*/
|
|
18
|
+
function __assignType(fn, args) {
|
|
19
|
+
fn.__type = args;
|
|
20
|
+
return fn;
|
|
21
|
+
}
|
|
33
22
|
/**
|
|
34
23
|
* A Powerlines plugin to assist in developing other Powerlines plugins.
|
|
35
24
|
*/
|
|
36
|
-
const plugin = (options = {}) => {
|
|
25
|
+
const plugin = __assignType((options = {}) => {
|
|
37
26
|
return {
|
|
38
27
|
name: "plugin",
|
|
39
|
-
config() {
|
|
28
|
+
config: __assignType(function config() {
|
|
40
29
|
this.log(types.LogLevelLabel.TRACE, "Providing default configuration for the Powerlines plugin.");
|
|
41
30
|
return {
|
|
42
31
|
type: "library",
|
|
@@ -53,8 +42,8 @@ const plugin = (options = {}) => {
|
|
|
53
42
|
platform: "node"
|
|
54
43
|
}
|
|
55
44
|
};
|
|
56
|
-
},
|
|
57
|
-
async configResolved() {
|
|
45
|
+
}, ['config', 'P"/!']),
|
|
46
|
+
configResolved: __assignType(async function configResolved() {
|
|
58
47
|
this.log(types.LogLevelLabel.TRACE, "The Powerlines plugin has resolved the final configuration.");
|
|
59
48
|
if (options.alloy) {
|
|
60
49
|
if (this.tsconfig.tsconfigJson.compilerOptions.jsx !== "preserve") {
|
|
@@ -62,16 +51,16 @@ const plugin = (options = {}) => {
|
|
|
62
51
|
}
|
|
63
52
|
await this.fs.writeFile(this.tsconfig.tsconfigFilePath, stormJson.StormJSON.stringify(this.tsconfig.tsconfigJson), { mode: "fs" });
|
|
64
53
|
}
|
|
65
|
-
},
|
|
54
|
+
}, ['configResolved', 'P"/!']),
|
|
66
55
|
async build() {
|
|
67
56
|
await tsup.build(await tsup.resolveOptions(defu.defu({
|
|
68
57
|
config: false,
|
|
69
|
-
entry: Object.fromEntries(Object.entries(tsup$1.resolveTsupEntry(this, this.entry)).map(([key, value]) => [
|
|
58
|
+
entry: Object.fromEntries(Object.entries(tsup$1.resolveTsupEntry(this, this.entry)).map(__assignType(([key, value]) => [
|
|
70
59
|
key,
|
|
71
60
|
isParentPath.isParentPath(value, this.config.projectRoot)
|
|
72
61
|
? value
|
|
73
62
|
: join.joinPaths(this.config.projectRoot, value)
|
|
74
|
-
]))
|
|
63
|
+
], ['param0', '', 'P"2!"/"'])))
|
|
75
64
|
}, tsup$1.extractTsupConfig(this), {
|
|
76
65
|
esbuildPlugins: options.alloy
|
|
77
66
|
? [
|
|
@@ -95,7 +84,12 @@ const plugin = (options = {}) => {
|
|
|
95
84
|
})));
|
|
96
85
|
}
|
|
97
86
|
};
|
|
98
|
-
};
|
|
87
|
+
}, [() => src_types_plugin.__ΩPluginPluginOptions, 'options', () => ({}), '', 'Pn!2">#!/$']);
|
|
99
88
|
|
|
89
|
+
exports.__ΩPluginPluginAlloyOptions = src_types_plugin.__ΩPluginPluginAlloyOptions;
|
|
90
|
+
exports.__ΩPluginPluginContext = src_types_plugin.__ΩPluginPluginContext;
|
|
91
|
+
exports.__ΩPluginPluginOptions = src_types_plugin.__ΩPluginPluginOptions;
|
|
92
|
+
exports.__ΩPluginPluginResolvedConfig = src_types_plugin.__ΩPluginPluginResolvedConfig;
|
|
93
|
+
exports.__ΩPluginPluginUserConfig = src_types_plugin.__ΩPluginPluginUserConfig;
|
|
100
94
|
exports.default = plugin;
|
|
101
95
|
exports.plugin = plugin;
|
package/dist/src/index.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { __ΩPluginPluginOptions as ___PluginPluginOptions } from './types/plugin.js';
|
|
2
|
+
export { __ΩPluginPluginAlloyOptions, __ΩPluginPluginContext, __ΩPluginPluginResolvedConfig, __ΩPluginPluginUserConfig } from './types/plugin.js';
|
|
1
3
|
import alloyBabelPreset from '@alloy-js/babel-preset';
|
|
2
4
|
import typescriptBabelPreset from '@babel/preset-typescript';
|
|
3
5
|
import { LogLevelLabel } from '@storm-software/config-tools/types';
|
|
@@ -9,30 +11,18 @@ import { defu } from 'defu';
|
|
|
9
11
|
import pluginBabel from '../node_modules/.pnpm/esbuild-plugin-babel@0.2.3_@babel_core@7.28.5/node_modules/esbuild-plugin-babel/src/index.js';
|
|
10
12
|
import { resolveTsupEntry, extractTsupConfig } from 'powerlines/lib/build/tsup';
|
|
11
13
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
is maintained by Storm Software under the Apache-2.0 license, and is
|
|
18
|
-
free for commercial and private use. For more information, please visit
|
|
19
|
-
our licensing page at https://stormsoftware.com/licenses/projects/powerlines.
|
|
20
|
-
|
|
21
|
-
Website: https://stormsoftware.com
|
|
22
|
-
Repository: https://github.com/storm-software/powerlines
|
|
23
|
-
Documentation: https://docs.stormsoftware.com/projects/powerlines
|
|
24
|
-
Contact: https://stormsoftware.com/contact
|
|
25
|
-
|
|
26
|
-
SPDX-License-Identifier: Apache-2.0
|
|
27
|
-
|
|
28
|
-
------------------------------------------------------------------- */
|
|
14
|
+
/*@ts-ignore*/
|
|
15
|
+
function __assignType(fn, args) {
|
|
16
|
+
fn.__type = args;
|
|
17
|
+
return fn;
|
|
18
|
+
}
|
|
29
19
|
/**
|
|
30
20
|
* A Powerlines plugin to assist in developing other Powerlines plugins.
|
|
31
21
|
*/
|
|
32
|
-
const plugin = (options = {}) => {
|
|
22
|
+
const plugin = __assignType((options = {}) => {
|
|
33
23
|
return {
|
|
34
24
|
name: "plugin",
|
|
35
|
-
config() {
|
|
25
|
+
config: __assignType(function config() {
|
|
36
26
|
this.log(LogLevelLabel.TRACE, "Providing default configuration for the Powerlines plugin.");
|
|
37
27
|
return {
|
|
38
28
|
type: "library",
|
|
@@ -49,8 +39,8 @@ const plugin = (options = {}) => {
|
|
|
49
39
|
platform: "node"
|
|
50
40
|
}
|
|
51
41
|
};
|
|
52
|
-
},
|
|
53
|
-
async configResolved() {
|
|
42
|
+
}, ['config', 'P"/!']),
|
|
43
|
+
configResolved: __assignType(async function configResolved() {
|
|
54
44
|
this.log(LogLevelLabel.TRACE, "The Powerlines plugin has resolved the final configuration.");
|
|
55
45
|
if (options.alloy) {
|
|
56
46
|
if (this.tsconfig.tsconfigJson.compilerOptions.jsx !== "preserve") {
|
|
@@ -58,16 +48,16 @@ const plugin = (options = {}) => {
|
|
|
58
48
|
}
|
|
59
49
|
await this.fs.writeFile(this.tsconfig.tsconfigFilePath, StormJSON.stringify(this.tsconfig.tsconfigJson), { mode: "fs" });
|
|
60
50
|
}
|
|
61
|
-
},
|
|
51
|
+
}, ['configResolved', 'P"/!']),
|
|
62
52
|
async build() {
|
|
63
53
|
await build(await resolveOptions(defu({
|
|
64
54
|
config: false,
|
|
65
|
-
entry: Object.fromEntries(Object.entries(resolveTsupEntry(this, this.entry)).map(([key, value]) => [
|
|
55
|
+
entry: Object.fromEntries(Object.entries(resolveTsupEntry(this, this.entry)).map(__assignType(([key, value]) => [
|
|
66
56
|
key,
|
|
67
57
|
isParentPath(value, this.config.projectRoot)
|
|
68
58
|
? value
|
|
69
59
|
: joinPaths(this.config.projectRoot, value)
|
|
70
|
-
]))
|
|
60
|
+
], ['param0', '', 'P"2!"/"'])))
|
|
71
61
|
}, extractTsupConfig(this), {
|
|
72
62
|
esbuildPlugins: options.alloy
|
|
73
63
|
? [
|
|
@@ -91,6 +81,6 @@ const plugin = (options = {}) => {
|
|
|
91
81
|
})));
|
|
92
82
|
}
|
|
93
83
|
};
|
|
94
|
-
};
|
|
84
|
+
}, [() => ___PluginPluginOptions, 'options', () => ({}), '', 'Pn!2">#!/$']);
|
|
95
85
|
|
|
96
|
-
export { plugin as default, plugin };
|
|
86
|
+
export { ___PluginPluginOptions as __ΩPluginPluginOptions, plugin as default, plugin };
|
package/dist/src/types/index.cjs
CHANGED
|
@@ -1,2 +1,11 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
var src_types_plugin = require('./plugin.cjs');
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
exports.__ΩPluginPluginAlloyOptions = src_types_plugin.__ΩPluginPluginAlloyOptions;
|
|
8
|
+
exports.__ΩPluginPluginContext = src_types_plugin.__ΩPluginPluginContext;
|
|
9
|
+
exports.__ΩPluginPluginOptions = src_types_plugin.__ΩPluginPluginOptions;
|
|
10
|
+
exports.__ΩPluginPluginResolvedConfig = src_types_plugin.__ΩPluginPluginResolvedConfig;
|
|
11
|
+
exports.__ΩPluginPluginUserConfig = src_types_plugin.__ΩPluginPluginUserConfig;
|
package/dist/src/types/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
export { __ΩPluginPluginAlloyOptions, __ΩPluginPluginContext, __ΩPluginPluginOptions, __ΩPluginPluginResolvedConfig, __ΩPluginPluginUserConfig } from './plugin.js';
|
|
@@ -1,2 +1,15 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
const __ΩPartial = ['T', 'Partial', 'l+e#!e"!fRb!Pde"!gN#"w"y'];
|
|
4
|
+
const __ΩRequired = ['T', 'Required', 'l+e#!e"!fRb!Pde"!gN##w"y'];
|
|
5
|
+
const __ΩPluginPluginAlloyOptions = [() => __ΩPartial, 'PrintTreeOptions', 'generatesJson', true, 'generatesMarkdown', 'PluginPluginAlloyOptions', 'P"w"o!"P)4#8>$)4%8>$MKw&y'];
|
|
6
|
+
const __ΩPluginPluginOptions = [() => __ΩPluginPluginAlloyOptions, 'alloy', false, 'PluginPluginOptions', 'PPn!)J4"8>#Mw$y'];
|
|
7
|
+
const __ΩPluginPluginUserConfig = [false, () => __ΩPartial, () => __ΩPluginPluginAlloyOptions, 'alloy', 'PluginPluginUserConfig', 'P!PP.!n#o""J4$8MKw%y'];
|
|
8
|
+
const __ΩPluginPluginResolvedConfig = [false, () => __ΩRequired, () => __ΩPluginPluginAlloyOptions, 'alloy', 'PluginPluginResolvedConfig', 'P!PP.!n#o""J4$MKw%y'];
|
|
9
|
+
const __ΩPluginPluginContext = [() => __ΩPluginPluginResolvedConfig, 'TResolvedConfig', 'PluginPluginContext', 'n!c"!w#y'];
|
|
10
|
+
|
|
11
|
+
exports.__ΩPluginPluginAlloyOptions = __ΩPluginPluginAlloyOptions;
|
|
12
|
+
exports.__ΩPluginPluginContext = __ΩPluginPluginContext;
|
|
13
|
+
exports.__ΩPluginPluginOptions = __ΩPluginPluginOptions;
|
|
14
|
+
exports.__ΩPluginPluginResolvedConfig = __ΩPluginPluginResolvedConfig;
|
|
15
|
+
exports.__ΩPluginPluginUserConfig = __ΩPluginPluginUserConfig;
|
|
@@ -35,4 +35,9 @@ export type PluginPluginResolvedConfig = ResolvedConfig<PluginPluginUserConfig>
|
|
|
35
35
|
alloy: false | Required<PluginPluginAlloyOptions>;
|
|
36
36
|
};
|
|
37
37
|
export type PluginPluginContext<TResolvedConfig extends PluginPluginResolvedConfig = PluginPluginResolvedConfig> = PluginContext<TResolvedConfig>;
|
|
38
|
+
export declare type __ΩPluginPluginAlloyOptions = any[];
|
|
39
|
+
export declare type __ΩPluginPluginOptions = any[];
|
|
40
|
+
export declare type __ΩPluginPluginUserConfig = any[];
|
|
41
|
+
export declare type __ΩPluginPluginResolvedConfig = any[];
|
|
42
|
+
export declare type __ΩPluginPluginContext = any[];
|
|
38
43
|
//# sourceMappingURL=plugin.d.ts.map
|
package/dist/src/types/plugin.js
CHANGED
|
@@ -1 +1,9 @@
|
|
|
1
|
+
const __ΩPartial = ['T', 'Partial', 'l+e#!e"!fRb!Pde"!gN#"w"y'];
|
|
2
|
+
const __ΩRequired = ['T', 'Required', 'l+e#!e"!fRb!Pde"!gN##w"y'];
|
|
3
|
+
const __ΩPluginPluginAlloyOptions = [() => __ΩPartial, 'PrintTreeOptions', 'generatesJson', true, 'generatesMarkdown', 'PluginPluginAlloyOptions', 'P"w"o!"P)4#8>$)4%8>$MKw&y'];
|
|
4
|
+
const __ΩPluginPluginOptions = [() => __ΩPluginPluginAlloyOptions, 'alloy', false, 'PluginPluginOptions', 'PPn!)J4"8>#Mw$y'];
|
|
5
|
+
const __ΩPluginPluginUserConfig = [false, () => __ΩPartial, () => __ΩPluginPluginAlloyOptions, 'alloy', 'PluginPluginUserConfig', 'P!PP.!n#o""J4$8MKw%y'];
|
|
6
|
+
const __ΩPluginPluginResolvedConfig = [false, () => __ΩRequired, () => __ΩPluginPluginAlloyOptions, 'alloy', 'PluginPluginResolvedConfig', 'P!PP.!n#o""J4$MKw%y'];
|
|
7
|
+
const __ΩPluginPluginContext = [() => __ΩPluginPluginResolvedConfig, 'TResolvedConfig', 'PluginPluginContext', 'n!c"!w#y'];
|
|
1
8
|
|
|
9
|
+
export { __ΩPluginPluginAlloyOptions, __ΩPluginPluginContext, __ΩPluginPluginOptions, __ΩPluginPluginResolvedConfig, __ΩPluginPluginUserConfig };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@powerlines/plugin-plugin",
|
|
3
|
-
"version": "0.11.
|
|
3
|
+
"version": "0.11.28",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A package containing a Powerlines plugin to assist in developing other Powerlines plugins.",
|
|
6
6
|
"repository": {
|
|
@@ -123,7 +123,7 @@
|
|
|
123
123
|
"@alloy-js/markdown": "^0.20.0",
|
|
124
124
|
"@alloy-js/typescript": "^0.20.0",
|
|
125
125
|
"@babel/preset-typescript": "^7.28.5",
|
|
126
|
-
"@storm-software/tsup": "^0.2.
|
|
126
|
+
"@storm-software/tsup": "^0.2.40",
|
|
127
127
|
"@stryke/fs": "^0.32.13",
|
|
128
128
|
"@stryke/json": "^0.9.5",
|
|
129
129
|
"@stryke/path": "^0.19.2",
|
|
@@ -132,19 +132,19 @@
|
|
|
132
132
|
"defu": "^6.1.4",
|
|
133
133
|
"esbuild-plugin-babel": "^0.2.3",
|
|
134
134
|
"jiti": "^2.6.1",
|
|
135
|
-
"powerlines": "^0.23.
|
|
135
|
+
"powerlines": "^0.23.3"
|
|
136
136
|
},
|
|
137
137
|
"devDependencies": {
|
|
138
138
|
"@alloy-js/rollup-plugin": "^0.1.0",
|
|
139
|
-
"@powerlines/nx": "^0.10.
|
|
139
|
+
"@powerlines/nx": "^0.10.20",
|
|
140
140
|
"@rollup/plugin-commonjs": "^28.0.9",
|
|
141
141
|
"@rollup/plugin-node-resolve": "^16.0.3",
|
|
142
142
|
"@types/babel__helper-plugin-utils": "^7.10.3",
|
|
143
|
-
"@types/node": "^
|
|
143
|
+
"@types/node": "^24.10.1",
|
|
144
144
|
"esbuild": "^0.25.12",
|
|
145
|
-
"rollup": "^4.53.
|
|
145
|
+
"rollup": "^4.53.3",
|
|
146
146
|
"rollup-plugin-typescript2": "^0.36.0"
|
|
147
147
|
},
|
|
148
148
|
"publishConfig": { "access": "public" },
|
|
149
|
-
"gitHead": "
|
|
149
|
+
"gitHead": "6e43200541ace2946694195c092642e7ac2f3098"
|
|
150
150
|
}
|