@powerlines/plugin-tsup 0.5.0 → 0.6.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/package.json +9 -7
- package/dist/chunk-SHUYVCID.js +0 -4
- package/dist/chunk-USNT2KNT.cjs +0 -6
- package/dist/helpers/index.cjs +0 -12
- package/dist/helpers/index.d.cts +0 -7
- package/dist/helpers/index.d.ts +0 -7
- package/dist/helpers/index.js +0 -1
- package/dist/helpers/unplugin.cjs +0 -14
- package/dist/helpers/unplugin.d.cts +0 -10
- package/dist/helpers/unplugin.d.ts +0 -10
- package/dist/helpers/unplugin.js +0 -12
- package/dist/index.cjs +0 -76
- package/dist/index.d.cts +0 -16
- package/dist/index.d.ts +0 -16
- package/dist/index.js +0 -55
- package/dist/types/index.cjs +0 -12
- package/dist/types/index.d.cts +0 -5
- package/dist/types/index.d.ts +0 -5
- package/dist/types/index.js +0 -1
- package/dist/types/plugin.cjs +0 -2
- package/dist/types/plugin.d.cts +0 -11
- package/dist/types/plugin.d.ts +0 -11
- package/dist/types/plugin.js +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@powerlines/plugin-tsup",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A package containing a Powerlines plugin to assist in developing other Powerlines plugins.",
|
|
6
6
|
"repository": {
|
|
@@ -128,15 +128,17 @@
|
|
|
128
128
|
"keywords": ["tsup", "powerlines", "storm-software", "powerlines-plugin"],
|
|
129
129
|
"dependencies": {
|
|
130
130
|
"@storm-software/tsup": "^0.2.4",
|
|
131
|
-
"@stryke/
|
|
132
|
-
"@stryke/path": "^0.15.5",
|
|
131
|
+
"@stryke/path": "^0.16.0",
|
|
133
132
|
"@stryke/type-checks": "^0.3.10",
|
|
134
133
|
"@stryke/types": "^0.10.0",
|
|
135
134
|
"defu": "^6.1.4",
|
|
136
|
-
"
|
|
137
|
-
|
|
135
|
+
"powerlines": "^0.5.0"
|
|
136
|
+
},
|
|
137
|
+
"devDependencies": {
|
|
138
|
+
"@powerlines/nx": "^0.5.0",
|
|
139
|
+
"@powerlines/plugin-plugin": "^0.6.0",
|
|
140
|
+
"@types/node": "^22.18.12"
|
|
138
141
|
},
|
|
139
|
-
"devDependencies": { "@powerlines/nx": "^0.5.0", "@types/node": "^22.18.12" },
|
|
140
142
|
"publishConfig": { "access": "public" },
|
|
141
|
-
"gitHead": "
|
|
143
|
+
"gitHead": "8ec5ff52ffc87cfbf2807e077209ea5745a95d43"
|
|
142
144
|
}
|
package/dist/chunk-SHUYVCID.js
DELETED
package/dist/chunk-USNT2KNT.cjs
DELETED
package/dist/helpers/index.cjs
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var unplugin = require('./unplugin');
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
Object.keys(unplugin).forEach(function (k) {
|
|
8
|
-
if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
9
|
-
enumerable: true,
|
|
10
|
-
get: function () { return unplugin[k]; }
|
|
11
|
-
});
|
|
12
|
-
});
|
package/dist/helpers/index.d.cts
DELETED
package/dist/helpers/index.d.ts
DELETED
package/dist/helpers/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './unplugin';
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var chunkUSNT2KNT_cjs = require('../chunk-USNT2KNT.cjs');
|
|
4
|
-
var unplugin$1 = require('powerlines/lib/unplugin');
|
|
5
|
-
var unplugin = require('unplugin');
|
|
6
|
-
|
|
7
|
-
function createTsupPlugin(context) {
|
|
8
|
-
return unplugin.createEsbuildPlugin(unplugin$1.createUnplugin(context, {
|
|
9
|
-
skipResolve: true
|
|
10
|
-
}))({});
|
|
11
|
-
}
|
|
12
|
-
chunkUSNT2KNT_cjs.__name(createTsupPlugin, "createTsupPlugin");
|
|
13
|
-
|
|
14
|
-
exports.createTsupPlugin = createTsupPlugin;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import * as esbuild from 'esbuild';
|
|
2
|
-
import { TsupPluginContext } from '../types/plugin.cjs';
|
|
3
|
-
import 'powerlines/types/build';
|
|
4
|
-
import 'powerlines/types/config';
|
|
5
|
-
import 'powerlines/types/context';
|
|
6
|
-
import 'powerlines/types/resolved';
|
|
7
|
-
|
|
8
|
-
declare function createTsupPlugin(context: TsupPluginContext): esbuild.Plugin;
|
|
9
|
-
|
|
10
|
-
export { createTsupPlugin };
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import * as esbuild from 'esbuild';
|
|
2
|
-
import { TsupPluginContext } from '../types/plugin.js';
|
|
3
|
-
import 'powerlines/types/build';
|
|
4
|
-
import 'powerlines/types/config';
|
|
5
|
-
import 'powerlines/types/context';
|
|
6
|
-
import 'powerlines/types/resolved';
|
|
7
|
-
|
|
8
|
-
declare function createTsupPlugin(context: TsupPluginContext): esbuild.Plugin;
|
|
9
|
-
|
|
10
|
-
export { createTsupPlugin };
|
package/dist/helpers/unplugin.js
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { __name } from '../chunk-SHUYVCID.js';
|
|
2
|
-
import { createUnplugin } from 'powerlines/lib/unplugin';
|
|
3
|
-
import { createEsbuildPlugin } from 'unplugin';
|
|
4
|
-
|
|
5
|
-
function createTsupPlugin(context) {
|
|
6
|
-
return createEsbuildPlugin(createUnplugin(context, {
|
|
7
|
-
skipResolve: true
|
|
8
|
-
}))({});
|
|
9
|
-
}
|
|
10
|
-
__name(createTsupPlugin, "createTsupPlugin");
|
|
11
|
-
|
|
12
|
-
export { createTsupPlugin };
|
package/dist/index.cjs
DELETED
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
var chunkUSNT2KNT_cjs = require('./chunk-USNT2KNT.cjs');
|
|
6
|
-
var types$1 = require('@storm-software/config-tools/types');
|
|
7
|
-
var tsup = require('@storm-software/tsup');
|
|
8
|
-
var isParentPath = require('@stryke/path/is-parent-path');
|
|
9
|
-
var join = require('@stryke/path/join');
|
|
10
|
-
var isFunction = require('@stryke/type-checks/is-function');
|
|
11
|
-
var defu = require('defu');
|
|
12
|
-
var tsup$1 = require('powerlines/lib/build/tsup');
|
|
13
|
-
var unplugin = require('./helpers/unplugin');
|
|
14
|
-
var helpers = require('./helpers');
|
|
15
|
-
var types = require('./types');
|
|
16
|
-
|
|
17
|
-
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
18
|
-
|
|
19
|
-
var defu__default = /*#__PURE__*/_interopDefault(defu);
|
|
20
|
-
|
|
21
|
-
const plugin = /* @__PURE__ */ chunkUSNT2KNT_cjs.__name((options = {}) => {
|
|
22
|
-
return {
|
|
23
|
-
name: "tsup",
|
|
24
|
-
config() {
|
|
25
|
-
this.log(types$1.LogLevelLabel.TRACE, "Providing default configuration for the Powerlines `tsup` build plugin.");
|
|
26
|
-
return {
|
|
27
|
-
output: {
|
|
28
|
-
format: [
|
|
29
|
-
"cjs",
|
|
30
|
-
"esm"
|
|
31
|
-
]
|
|
32
|
-
},
|
|
33
|
-
build: {
|
|
34
|
-
...options,
|
|
35
|
-
variant: "tsup"
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
},
|
|
39
|
-
async build() {
|
|
40
|
-
this.log(types$1.LogLevelLabel.TRACE, "Building the Powerlines plugin.");
|
|
41
|
-
return tsup.build(await tsup.resolveOptions(defu__default.default({
|
|
42
|
-
config: false,
|
|
43
|
-
esbuildOptions: /* @__PURE__ */ chunkUSNT2KNT_cjs.__name((buildOptions, ctx) => {
|
|
44
|
-
if (isFunction.isFunction(options.esbuildOptions)) {
|
|
45
|
-
options.esbuildOptions(buildOptions, ctx);
|
|
46
|
-
}
|
|
47
|
-
buildOptions.alias = defu__default.default(buildOptions.alias ?? {}, Object.fromEntries(this.fs.builtinIdMap.entries()));
|
|
48
|
-
}, "esbuildOptions"),
|
|
49
|
-
entry: Object.fromEntries(Object.entries(tsup$1.resolveTsupEntry(this, this.entry)).map(([key, value]) => [
|
|
50
|
-
key,
|
|
51
|
-
isParentPath.isParentPath(value, this.config.projectRoot) ? value : join.joinPaths(this.config.projectRoot, value)
|
|
52
|
-
]))
|
|
53
|
-
}, tsup$1.extractTsupConfig(this), {
|
|
54
|
-
esbuildPlugins: [
|
|
55
|
-
unplugin.createTsupPlugin(this)
|
|
56
|
-
]
|
|
57
|
-
})));
|
|
58
|
-
}
|
|
59
|
-
};
|
|
60
|
-
}, "plugin");
|
|
61
|
-
var index_default = plugin;
|
|
62
|
-
|
|
63
|
-
exports.default = index_default;
|
|
64
|
-
exports.plugin = plugin;
|
|
65
|
-
Object.keys(helpers).forEach(function (k) {
|
|
66
|
-
if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
67
|
-
enumerable: true,
|
|
68
|
-
get: function () { return helpers[k]; }
|
|
69
|
-
});
|
|
70
|
-
});
|
|
71
|
-
Object.keys(types).forEach(function (k) {
|
|
72
|
-
if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
73
|
-
enumerable: true,
|
|
74
|
-
get: function () { return types[k]; }
|
|
75
|
-
});
|
|
76
|
-
});
|
package/dist/index.d.cts
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { Plugin } from 'powerlines/types/plugin';
|
|
2
|
-
import { TsupPluginContext, TsupPluginOptions } from './types/plugin.cjs';
|
|
3
|
-
export { TsupPluginResolvedConfig, TsupPluginUserConfig } from './types/plugin.cjs';
|
|
4
|
-
export { createTsupPlugin } from './helpers/unplugin.cjs';
|
|
5
|
-
import 'powerlines/types/build';
|
|
6
|
-
import 'powerlines/types/config';
|
|
7
|
-
import 'powerlines/types/context';
|
|
8
|
-
import 'powerlines/types/resolved';
|
|
9
|
-
import 'esbuild';
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* A Powerlines plugin to assist in developing other Powerlines plugins.
|
|
13
|
-
*/
|
|
14
|
-
declare const plugin: <TContext extends TsupPluginContext = TsupPluginContext>(options?: TsupPluginOptions) => Plugin<TContext>;
|
|
15
|
-
|
|
16
|
-
export { TsupPluginContext, TsupPluginOptions, plugin as default, plugin };
|
package/dist/index.d.ts
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { Plugin } from 'powerlines/types/plugin';
|
|
2
|
-
import { TsupPluginContext, TsupPluginOptions } from './types/plugin.js';
|
|
3
|
-
export { TsupPluginResolvedConfig, TsupPluginUserConfig } from './types/plugin.js';
|
|
4
|
-
export { createTsupPlugin } from './helpers/unplugin.js';
|
|
5
|
-
import 'powerlines/types/build';
|
|
6
|
-
import 'powerlines/types/config';
|
|
7
|
-
import 'powerlines/types/context';
|
|
8
|
-
import 'powerlines/types/resolved';
|
|
9
|
-
import 'esbuild';
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* A Powerlines plugin to assist in developing other Powerlines plugins.
|
|
13
|
-
*/
|
|
14
|
-
declare const plugin: <TContext extends TsupPluginContext = TsupPluginContext>(options?: TsupPluginOptions) => Plugin<TContext>;
|
|
15
|
-
|
|
16
|
-
export { TsupPluginContext, TsupPluginOptions, plugin as default, plugin };
|
package/dist/index.js
DELETED
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import { __name } from './chunk-SHUYVCID.js';
|
|
2
|
-
import { LogLevelLabel } from '@storm-software/config-tools/types';
|
|
3
|
-
import { build, resolveOptions } from '@storm-software/tsup';
|
|
4
|
-
import { isParentPath } from '@stryke/path/is-parent-path';
|
|
5
|
-
import { joinPaths } from '@stryke/path/join';
|
|
6
|
-
import { isFunction } from '@stryke/type-checks/is-function';
|
|
7
|
-
import defu from 'defu';
|
|
8
|
-
import { resolveTsupEntry, extractTsupConfig } from 'powerlines/lib/build/tsup';
|
|
9
|
-
import { createTsupPlugin } from './helpers/unplugin';
|
|
10
|
-
export * from './helpers';
|
|
11
|
-
export * from './types';
|
|
12
|
-
|
|
13
|
-
const plugin = /* @__PURE__ */ __name((options = {}) => {
|
|
14
|
-
return {
|
|
15
|
-
name: "tsup",
|
|
16
|
-
config() {
|
|
17
|
-
this.log(LogLevelLabel.TRACE, "Providing default configuration for the Powerlines `tsup` build plugin.");
|
|
18
|
-
return {
|
|
19
|
-
output: {
|
|
20
|
-
format: [
|
|
21
|
-
"cjs",
|
|
22
|
-
"esm"
|
|
23
|
-
]
|
|
24
|
-
},
|
|
25
|
-
build: {
|
|
26
|
-
...options,
|
|
27
|
-
variant: "tsup"
|
|
28
|
-
}
|
|
29
|
-
};
|
|
30
|
-
},
|
|
31
|
-
async build() {
|
|
32
|
-
this.log(LogLevelLabel.TRACE, "Building the Powerlines plugin.");
|
|
33
|
-
return build(await resolveOptions(defu({
|
|
34
|
-
config: false,
|
|
35
|
-
esbuildOptions: /* @__PURE__ */ __name((buildOptions, ctx) => {
|
|
36
|
-
if (isFunction(options.esbuildOptions)) {
|
|
37
|
-
options.esbuildOptions(buildOptions, ctx);
|
|
38
|
-
}
|
|
39
|
-
buildOptions.alias = defu(buildOptions.alias ?? {}, Object.fromEntries(this.fs.builtinIdMap.entries()));
|
|
40
|
-
}, "esbuildOptions"),
|
|
41
|
-
entry: Object.fromEntries(Object.entries(resolveTsupEntry(this, this.entry)).map(([key, value]) => [
|
|
42
|
-
key,
|
|
43
|
-
isParentPath(value, this.config.projectRoot) ? value : joinPaths(this.config.projectRoot, value)
|
|
44
|
-
]))
|
|
45
|
-
}, extractTsupConfig(this), {
|
|
46
|
-
esbuildPlugins: [
|
|
47
|
-
createTsupPlugin(this)
|
|
48
|
-
]
|
|
49
|
-
})));
|
|
50
|
-
}
|
|
51
|
-
};
|
|
52
|
-
}, "plugin");
|
|
53
|
-
var index_default = plugin;
|
|
54
|
-
|
|
55
|
-
export { index_default as default, plugin };
|
package/dist/types/index.cjs
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var plugin = require('./plugin');
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
Object.keys(plugin).forEach(function (k) {
|
|
8
|
-
if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
9
|
-
enumerable: true,
|
|
10
|
-
get: function () { return plugin[k]; }
|
|
11
|
-
});
|
|
12
|
-
});
|
package/dist/types/index.d.cts
DELETED
package/dist/types/index.d.ts
DELETED
package/dist/types/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './plugin';
|
package/dist/types/plugin.cjs
DELETED
package/dist/types/plugin.d.cts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { TsupBuildConfig } from 'powerlines/types/build';
|
|
2
|
-
import { TsupUserConfig } from 'powerlines/types/config';
|
|
3
|
-
import { PluginContext } from 'powerlines/types/context';
|
|
4
|
-
import { TsupResolvedConfig } from 'powerlines/types/resolved';
|
|
5
|
-
|
|
6
|
-
type TsupPluginOptions = Partial<TsupBuildConfig>;
|
|
7
|
-
type TsupPluginUserConfig = TsupUserConfig;
|
|
8
|
-
type TsupPluginResolvedConfig = TsupResolvedConfig;
|
|
9
|
-
type TsupPluginContext<TResolvedConfig extends TsupPluginResolvedConfig = TsupPluginResolvedConfig> = PluginContext<TResolvedConfig>;
|
|
10
|
-
|
|
11
|
-
export type { TsupPluginContext, TsupPluginOptions, TsupPluginResolvedConfig, TsupPluginUserConfig };
|
package/dist/types/plugin.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { TsupBuildConfig } from 'powerlines/types/build';
|
|
2
|
-
import { TsupUserConfig } from 'powerlines/types/config';
|
|
3
|
-
import { PluginContext } from 'powerlines/types/context';
|
|
4
|
-
import { TsupResolvedConfig } from 'powerlines/types/resolved';
|
|
5
|
-
|
|
6
|
-
type TsupPluginOptions = Partial<TsupBuildConfig>;
|
|
7
|
-
type TsupPluginUserConfig = TsupUserConfig;
|
|
8
|
-
type TsupPluginResolvedConfig = TsupResolvedConfig;
|
|
9
|
-
type TsupPluginContext<TResolvedConfig extends TsupPluginResolvedConfig = TsupPluginResolvedConfig> = PluginContext<TResolvedConfig>;
|
|
10
|
-
|
|
11
|
-
export type { TsupPluginContext, TsupPluginOptions, TsupPluginResolvedConfig, TsupPluginUserConfig };
|
package/dist/types/plugin.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
|