powerlines 0.37.36 → 0.37.37
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/api.cjs +2 -2
- package/dist/api.js +1 -1
- package/dist/astro.cjs +4 -4
- package/dist/astro.js +3 -3
- package/dist/chunk-5NWA3EXR.cjs +12 -0
- package/dist/{chunk-DHFLXVK7.js → chunk-CJOKAE34.js} +3 -3
- package/dist/{chunk-SO5T2URL.js → chunk-DL2NGMP6.js} +3 -3
- package/dist/{chunk-FGJ6XPBJ.cjs → chunk-ETKOV3WL.cjs} +5 -5
- package/dist/chunk-JV2XLWGH.cjs +12 -0
- package/dist/{chunk-IG5WPC7V.js → chunk-KVE5X6PI.js} +3 -3
- package/dist/{chunk-7EBAVG2H.js → chunk-RNWZ3DIR.js} +18 -15
- package/dist/{chunk-BVKWNX7Q.js → chunk-SXPN6PKO.js} +3 -3
- package/dist/{chunk-YJV5CG3S.cjs → chunk-TZARLTUL.cjs} +4 -4
- package/dist/{chunk-SRNSE6AK.js → chunk-VJM3ICZE.js} +3 -3
- package/dist/{chunk-DS4NQ6HY.cjs → chunk-YGNMQIR3.cjs} +18 -15
- package/dist/{chunk-R4GXFTWP.cjs → chunk-ZUEB6QPR.cjs} +4 -4
- package/dist/esbuild.cjs +6 -6
- package/dist/esbuild.js +3 -3
- package/dist/farm.cjs +3 -3
- package/dist/farm.js +2 -2
- package/dist/index.cjs +10 -10
- package/dist/index.js +2 -2
- package/dist/lib/{chunk-62FNLA4C.js → chunk-KKAQMDGM.js} +18 -14
- package/dist/lib/chunk-KKAQMDGM.js.map +1 -0
- package/dist/lib/{chunk-BHYCRVQO.cjs → chunk-OKDM4YED.cjs} +18 -14
- package/dist/lib/chunk-OKDM4YED.cjs.map +1 -0
- package/dist/lib/index.cjs +2 -2
- package/dist/lib/index.js +1 -1
- package/dist/lib/unplugin/factory.cjs +2 -2
- package/dist/lib/unplugin/factory.js +1 -1
- package/dist/lib/unplugin/index.cjs +2 -2
- package/dist/lib/unplugin/index.js +1 -1
- package/dist/next.cjs +4 -4
- package/dist/next.js +3 -3
- package/dist/nuxt.cjs +8 -8
- package/dist/nuxt.js +4 -4
- package/dist/rolldown.cjs +6 -6
- package/dist/rolldown.js +3 -3
- package/dist/rollup.cjs +3 -3
- package/dist/rollup.js +2 -2
- package/dist/rspack.cjs +3 -3
- package/dist/rspack.js +2 -2
- package/dist/tsdown.cjs +4 -4
- package/dist/tsdown.js +3 -3
- package/dist/tsup.cjs +4 -4
- package/dist/tsup.js +3 -3
- package/dist/unloader.cjs +3 -3
- package/dist/unloader.js +2 -2
- package/dist/unplugin.cjs +8 -8
- package/dist/unplugin.js +4 -4
- package/dist/vite.cjs +6 -6
- package/dist/vite.js +3 -3
- package/dist/webpack.cjs +6 -6
- package/dist/webpack.js +3 -3
- package/package.json +2 -2
- package/dist/chunk-4ZMXSGTF.cjs +0 -12
- package/dist/chunk-GMA3KYZJ.cjs +0 -12
- package/dist/lib/chunk-62FNLA4C.js.map +0 -1
- package/dist/lib/chunk-BHYCRVQO.cjs.map +0 -1
package/dist/api.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkYGNMQIR3_cjs = require('./chunk-YGNMQIR3.cjs');
|
|
4
4
|
require('./chunk-B6DVCLP5.cjs');
|
|
5
5
|
require('./chunk-V5WOGN7O.cjs');
|
|
6
6
|
require('./chunk-Z6ARQDHR.cjs');
|
|
@@ -10,7 +10,7 @@ require('./chunk-PK6SKIKE.cjs');
|
|
|
10
10
|
|
|
11
11
|
Object.defineProperty(exports, "PowerlinesAPI", {
|
|
12
12
|
enumerable: true,
|
|
13
|
-
get: function () { return
|
|
13
|
+
get: function () { return chunkYGNMQIR3_cjs.PowerlinesAPI; }
|
|
14
14
|
});
|
|
15
15
|
//# sourceMappingURL=api.cjs.map
|
|
16
16
|
//# sourceMappingURL=api.cjs.map
|
package/dist/api.js
CHANGED
package/dist/astro.cjs
CHANGED
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var chunkTZARLTUL_cjs = require('./chunk-TZARLTUL.cjs');
|
|
6
6
|
require('./chunk-VBGDN56Q.cjs');
|
|
7
|
-
require('./chunk-
|
|
8
|
-
require('./chunk-
|
|
7
|
+
require('./chunk-ETKOV3WL.cjs');
|
|
8
|
+
require('./chunk-YGNMQIR3.cjs');
|
|
9
9
|
require('./chunk-B6DVCLP5.cjs');
|
|
10
10
|
require('./chunk-V5WOGN7O.cjs');
|
|
11
11
|
require('./chunk-Z6ARQDHR.cjs');
|
|
@@ -15,7 +15,7 @@ var chunkPK6SKIKE_cjs = require('./chunk-PK6SKIKE.cjs');
|
|
|
15
15
|
var astro = /* @__PURE__ */ chunkPK6SKIKE_cjs.__name((config) => ({
|
|
16
16
|
vite: {
|
|
17
17
|
plugins: [
|
|
18
|
-
|
|
18
|
+
chunkTZARLTUL_cjs.vite_default(config)
|
|
19
19
|
]
|
|
20
20
|
}
|
|
21
21
|
}), "astro");
|
package/dist/astro.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { vite_default } from './chunk-
|
|
1
|
+
import { vite_default } from './chunk-KVE5X6PI.js';
|
|
2
2
|
import './chunk-FJHS7DAU.js';
|
|
3
|
-
import './chunk-
|
|
4
|
-
import './chunk-
|
|
3
|
+
import './chunk-CJOKAE34.js';
|
|
4
|
+
import './chunk-RNWZ3DIR.js';
|
|
5
5
|
import './chunk-PQXP7XQK.js';
|
|
6
6
|
import './chunk-NITQ5IYP.js';
|
|
7
7
|
import './chunk-2MYPFASJ.js';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkETKOV3WL_cjs = require('./chunk-ETKOV3WL.cjs');
|
|
4
|
+
var unplugin = require('unplugin');
|
|
5
|
+
|
|
6
|
+
var rolldown = unplugin.createRolldownPlugin(chunkETKOV3WL_cjs.createUnpluginFactory("rolldown"));
|
|
7
|
+
var rolldown_default = rolldown;
|
|
8
|
+
|
|
9
|
+
exports.rolldown = rolldown;
|
|
10
|
+
exports.rolldown_default = rolldown_default;
|
|
11
|
+
//# sourceMappingURL=chunk-5NWA3EXR.cjs.map
|
|
12
|
+
//# sourceMappingURL=chunk-5NWA3EXR.cjs.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createLog, PowerlinesAPI } from './chunk-
|
|
1
|
+
import { createLog, PowerlinesAPI } from './chunk-RNWZ3DIR.js';
|
|
2
2
|
import { __name } from './chunk-7QVYU63E.js';
|
|
3
3
|
import { LogLevelLabel } from '@storm-software/config-tools/types';
|
|
4
4
|
import { getWorkspaceRoot } from '@stryke/fs/get-workspace-root';
|
|
@@ -134,5 +134,5 @@ function createUnpluginFactory(variant, decorate) {
|
|
|
134
134
|
__name(createUnpluginFactory, "createUnpluginFactory");
|
|
135
135
|
|
|
136
136
|
export { createUnpluginFactory, getString };
|
|
137
|
-
//# sourceMappingURL=chunk-
|
|
138
|
-
//# sourceMappingURL=chunk-
|
|
137
|
+
//# sourceMappingURL=chunk-CJOKAE34.js.map
|
|
138
|
+
//# sourceMappingURL=chunk-CJOKAE34.js.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { createUnpluginFactory } from './chunk-
|
|
1
|
+
import { createUnpluginFactory } from './chunk-CJOKAE34.js';
|
|
2
2
|
import { createRolldownPlugin } from 'unplugin';
|
|
3
3
|
|
|
4
4
|
var rolldown = createRolldownPlugin(createUnpluginFactory("rolldown"));
|
|
5
5
|
var rolldown_default = rolldown;
|
|
6
6
|
|
|
7
7
|
export { rolldown, rolldown_default };
|
|
8
|
-
//# sourceMappingURL=chunk-
|
|
9
|
-
//# sourceMappingURL=chunk-
|
|
8
|
+
//# sourceMappingURL=chunk-DL2NGMP6.js.map
|
|
9
|
+
//# sourceMappingURL=chunk-DL2NGMP6.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkYGNMQIR3_cjs = require('./chunk-YGNMQIR3.cjs');
|
|
4
4
|
var chunkPK6SKIKE_cjs = require('./chunk-PK6SKIKE.cjs');
|
|
5
5
|
var types = require('@storm-software/config-tools/types');
|
|
6
6
|
var getWorkspaceRoot = require('@stryke/fs/get-workspace-root');
|
|
@@ -27,7 +27,7 @@ chunkPK6SKIKE_cjs.__name(getString, "getString");
|
|
|
27
27
|
// src/lib/unplugin/factory.ts
|
|
28
28
|
function createUnpluginFactory(variant, decorate) {
|
|
29
29
|
return (config, meta) => {
|
|
30
|
-
const log =
|
|
30
|
+
const log = chunkYGNMQIR3_cjs.createLog("unplugin", config);
|
|
31
31
|
log(types.LogLevelLabel.DEBUG, "Initializing Unplugin");
|
|
32
32
|
try {
|
|
33
33
|
const userConfig = {
|
|
@@ -38,7 +38,7 @@ function createUnpluginFactory(variant, decorate) {
|
|
|
38
38
|
let api;
|
|
39
39
|
async function buildStart() {
|
|
40
40
|
log(types.LogLevelLabel.DEBUG, "Powerlines build plugin starting...");
|
|
41
|
-
api = await
|
|
41
|
+
api = await chunkYGNMQIR3_cjs.PowerlinesAPI.from(getWorkspaceRoot.getWorkspaceRoot(process.cwd()), userConfig);
|
|
42
42
|
unplugin.setParseImpl(api.context.parse);
|
|
43
43
|
log(types.LogLevelLabel.DEBUG, "Preparing build artifacts for the Powerlines project...");
|
|
44
44
|
await api.prepare({
|
|
@@ -137,5 +137,5 @@ chunkPK6SKIKE_cjs.__name(createUnpluginFactory, "createUnpluginFactory");
|
|
|
137
137
|
|
|
138
138
|
exports.createUnpluginFactory = createUnpluginFactory;
|
|
139
139
|
exports.getString = getString;
|
|
140
|
-
//# sourceMappingURL=chunk-
|
|
141
|
-
//# sourceMappingURL=chunk-
|
|
140
|
+
//# sourceMappingURL=chunk-ETKOV3WL.cjs.map
|
|
141
|
+
//# sourceMappingURL=chunk-ETKOV3WL.cjs.map
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkETKOV3WL_cjs = require('./chunk-ETKOV3WL.cjs');
|
|
4
|
+
var unplugin = require('unplugin');
|
|
5
|
+
|
|
6
|
+
var webpack = unplugin.createWebpackPlugin(chunkETKOV3WL_cjs.createUnpluginFactory("webpack"));
|
|
7
|
+
var webpack_default = webpack;
|
|
8
|
+
|
|
9
|
+
exports.webpack = webpack;
|
|
10
|
+
exports.webpack_default = webpack_default;
|
|
11
|
+
//# sourceMappingURL=chunk-JV2XLWGH.cjs.map
|
|
12
|
+
//# sourceMappingURL=chunk-JV2XLWGH.cjs.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { extractESBuildConfig } from './chunk-FJHS7DAU.js';
|
|
2
|
-
import { createUnpluginFactory } from './chunk-
|
|
2
|
+
import { createUnpluginFactory } from './chunk-CJOKAE34.js';
|
|
3
3
|
import { __name } from './chunk-7QVYU63E.js';
|
|
4
4
|
import { isDevelopmentMode, isTestMode } from '@stryke/env/environment-checks';
|
|
5
5
|
import defu from 'defu';
|
|
@@ -151,5 +151,5 @@ var vite = createVitePlugin(createUnpluginFactory("vite", (api, plugin) => {
|
|
|
151
151
|
var vite_default = vite;
|
|
152
152
|
|
|
153
153
|
export { vite, vite_default };
|
|
154
|
-
//# sourceMappingURL=chunk-
|
|
155
|
-
//# sourceMappingURL=chunk-
|
|
154
|
+
//# sourceMappingURL=chunk-KVE5X6PI.js.map
|
|
155
|
+
//# sourceMappingURL=chunk-KVE5X6PI.js.map
|
|
@@ -25,6 +25,7 @@ import chalk5 from 'chalk';
|
|
|
25
25
|
import Handlebars from 'handlebars';
|
|
26
26
|
import { declare } from '@babel/helper-plugin-utils';
|
|
27
27
|
import * as t from '@babel/types';
|
|
28
|
+
import { isParentPath } from '@stryke/path/is-parent-path';
|
|
28
29
|
import { prettyBytes } from '@stryke/string-format/pretty-bytes';
|
|
29
30
|
import { InMemoryFileSystemHost, Project, DiagnosticCategory } from 'ts-morph';
|
|
30
31
|
import { LogLevelLabel } from '@storm-software/config-tools/types';
|
|
@@ -46,7 +47,6 @@ import { murmurhash } from '@stryke/hash/murmurhash';
|
|
|
46
47
|
import { getUnique, getUniqueBy } from '@stryke/helpers/get-unique';
|
|
47
48
|
import { omit } from '@stryke/helpers/omit';
|
|
48
49
|
import { fetchRequest } from '@stryke/http/fetch';
|
|
49
|
-
import { isParentPath } from '@stryke/path/is-parent-path';
|
|
50
50
|
import { joinPaths } from '@stryke/path/join';
|
|
51
51
|
import { isNull } from '@stryke/type-checks/is-null';
|
|
52
52
|
import { uuid } from '@stryke/unique-id/uuid';
|
|
@@ -80,7 +80,7 @@ import '@stryke/fs/remove-file';
|
|
|
80
80
|
|
|
81
81
|
// package.json
|
|
82
82
|
var name = "powerlines";
|
|
83
|
-
var version = "0.37.
|
|
83
|
+
var version = "0.37.36";
|
|
84
84
|
var package_default = {
|
|
85
85
|
version};
|
|
86
86
|
function resolveModulePath(nodePath, state) {
|
|
@@ -298,8 +298,12 @@ function formatTypes(code) {
|
|
|
298
298
|
).replaceAll("#private;", "").replace(/__Ω/g, "");
|
|
299
299
|
}
|
|
300
300
|
__name(formatTypes, "formatTypes");
|
|
301
|
-
async function
|
|
302
|
-
|
|
301
|
+
async function emitBuiltinTypes(context, files) {
|
|
302
|
+
if (files.length === 0) {
|
|
303
|
+
context.debug("No files provided for TypeScript types generation. Typescript compilation for built-in modules will be skipped.");
|
|
304
|
+
return "";
|
|
305
|
+
}
|
|
306
|
+
context.debug(`Running the TypeScript compiler for ${files.length} generated built-in module files.`);
|
|
303
307
|
const program = createProgram(context, {
|
|
304
308
|
skipAddingFilesFromTsConfig: true
|
|
305
309
|
});
|
|
@@ -324,8 +328,8 @@ async function emitTypes(context, files) {
|
|
|
324
328
|
context.debug(`The TypeScript compiler emitted ${emittedFiles.length} files for built-in types.`);
|
|
325
329
|
let builtinModules = "";
|
|
326
330
|
for (const emittedFile of emittedFiles) {
|
|
327
|
-
|
|
328
|
-
|
|
331
|
+
context.trace(`Processing emitted type declaration file: ${emittedFile.filePath}`);
|
|
332
|
+
if (!emittedFile.filePath.endsWith(".map") && isParentPath(emittedFile.filePath, context.builtinsPath)) {
|
|
329
333
|
builtinModules += `
|
|
330
334
|
declare module "${replaceExtension(replacePath(emittedFile.filePath, context.builtinsPath))}" {
|
|
331
335
|
${emittedFile.text.trim().replace(/^\s*export\s*declare\s*/gm, "export ").replace(/^\s*declare\s*/gm, "")}
|
|
@@ -337,7 +341,7 @@ declare module "${replaceExtension(replacePath(emittedFile.filePath, context.bui
|
|
|
337
341
|
context.debug(`A TypeScript declaration file (size: ${prettyBytes(new Blob(toArray(builtinModules)).size)}) emitted for the built-in modules types.`);
|
|
338
342
|
return builtinModules;
|
|
339
343
|
}
|
|
340
|
-
__name(
|
|
344
|
+
__name(emitBuiltinTypes, "emitBuiltinTypes");
|
|
341
345
|
var mergeResults = createDefu((obj, key, value) => {
|
|
342
346
|
if (isString(obj[key]) && isString(value)) {
|
|
343
347
|
obj[key] = `${obj[key] || ""}
|
|
@@ -4503,7 +4507,8 @@ ${formatLogMessage(context.config)}`);
|
|
|
4503
4507
|
if (!typescriptPath) {
|
|
4504
4508
|
throw new Error("Could not resolve TypeScript package location. Please ensure TypeScript is installed.");
|
|
4505
4509
|
}
|
|
4506
|
-
|
|
4510
|
+
context.debug("Parsing TypeScript configuration for the Powerlines project.");
|
|
4511
|
+
let types = await emitBuiltinTypes(context, builtinFilePaths.reduce(
|
|
4507
4512
|
(ret, fileName) => {
|
|
4508
4513
|
const formatted = replacePath(fileName, context.workspaceConfig.workspaceRoot);
|
|
4509
4514
|
if (!ret.includes(formatted)) {
|
|
@@ -4513,9 +4518,7 @@ ${formatLogMessage(context.config)}`);
|
|
|
4513
4518
|
},
|
|
4514
4519
|
[]
|
|
4515
4520
|
// [joinPaths(typescriptPath, "lib", "lib.esnext.full.d.ts")]
|
|
4516
|
-
);
|
|
4517
|
-
context.debug("Parsing TypeScript configuration for the Powerlines project.");
|
|
4518
|
-
let types = await emitTypes(context, files);
|
|
4521
|
+
));
|
|
4519
4522
|
context.debug(`Generating TypeScript declaration file ${context.dtsPath}.`);
|
|
4520
4523
|
const directives = [];
|
|
4521
4524
|
const asNextParam = /* @__PURE__ */ __name((previousResult) => isObject(previousResult) ? previousResult.code : previousResult, "asNextParam");
|
|
@@ -4570,8 +4573,8 @@ ${formatLogMessage(context.config)}`);
|
|
|
4570
4573
|
types = result;
|
|
4571
4574
|
}
|
|
4572
4575
|
}
|
|
4573
|
-
if (types?.trim() || directives.length > 0) {
|
|
4574
|
-
await context.fs.write(context.dtsPath, `${directives ? `${directives.map((directive) => `/// <reference types="${directive}" />`).join("\n")}
|
|
4576
|
+
if (isSetString(types?.trim()) || directives.length > 0) {
|
|
4577
|
+
await context.fs.write(context.dtsPath, `${directives.length > 0 ? `${directives.map((directive) => `/// <reference types="${directive}" />`).join("\n")}
|
|
4575
4578
|
|
|
4576
4579
|
` : ""}${getFileHeader(context, {
|
|
4577
4580
|
directive: null,
|
|
@@ -5032,5 +5035,5 @@ Note: Please ensure the plugin package's default export is a class that extends
|
|
|
5032
5035
|
};
|
|
5033
5036
|
|
|
5034
5037
|
export { FileId, FileMetadata, FileMetadata_KeyValuePair, FileStorage, FileSystem, PowerlinesAPI, _capnpFileId, combineContexts, createLog, extendLog, isUnpluginBuilderVariant, name, version };
|
|
5035
|
-
//# sourceMappingURL=chunk-
|
|
5036
|
-
//# sourceMappingURL=chunk-
|
|
5038
|
+
//# sourceMappingURL=chunk-RNWZ3DIR.js.map
|
|
5039
|
+
//# sourceMappingURL=chunk-RNWZ3DIR.js.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { createUnpluginFactory } from './chunk-
|
|
1
|
+
import { createUnpluginFactory } from './chunk-CJOKAE34.js';
|
|
2
2
|
import { createWebpackPlugin } from 'unplugin';
|
|
3
3
|
|
|
4
4
|
var webpack = createWebpackPlugin(createUnpluginFactory("webpack"));
|
|
5
5
|
var webpack_default = webpack;
|
|
6
6
|
|
|
7
7
|
export { webpack, webpack_default };
|
|
8
|
-
//# sourceMappingURL=chunk-
|
|
9
|
-
//# sourceMappingURL=chunk-
|
|
8
|
+
//# sourceMappingURL=chunk-SXPN6PKO.js.map
|
|
9
|
+
//# sourceMappingURL=chunk-SXPN6PKO.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var chunkVBGDN56Q_cjs = require('./chunk-VBGDN56Q.cjs');
|
|
4
|
-
var
|
|
4
|
+
var chunkETKOV3WL_cjs = require('./chunk-ETKOV3WL.cjs');
|
|
5
5
|
var chunkPK6SKIKE_cjs = require('./chunk-PK6SKIKE.cjs');
|
|
6
6
|
var environmentChecks = require('@stryke/env/environment-checks');
|
|
7
7
|
var defu = require('defu');
|
|
@@ -97,7 +97,7 @@ function extractViteConfig(context) {
|
|
|
97
97
|
chunkPK6SKIKE_cjs.__name(extractViteConfig, "extractViteConfig");
|
|
98
98
|
|
|
99
99
|
// src/vite.ts
|
|
100
|
-
var vite = unplugin.createVitePlugin(
|
|
100
|
+
var vite = unplugin.createVitePlugin(chunkETKOV3WL_cjs.createUnpluginFactory("vite", (api, plugin) => {
|
|
101
101
|
return {
|
|
102
102
|
...plugin,
|
|
103
103
|
vite: {
|
|
@@ -158,5 +158,5 @@ var vite_default = vite;
|
|
|
158
158
|
|
|
159
159
|
exports.vite = vite;
|
|
160
160
|
exports.vite_default = vite_default;
|
|
161
|
-
//# sourceMappingURL=chunk-
|
|
162
|
-
//# sourceMappingURL=chunk-
|
|
161
|
+
//# sourceMappingURL=chunk-TZARLTUL.cjs.map
|
|
162
|
+
//# sourceMappingURL=chunk-TZARLTUL.cjs.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { extractESBuildConfig } from './chunk-FJHS7DAU.js';
|
|
2
|
-
import { createUnpluginFactory } from './chunk-
|
|
2
|
+
import { createUnpluginFactory } from './chunk-CJOKAE34.js';
|
|
3
3
|
import { __name } from './chunk-7QVYU63E.js';
|
|
4
4
|
import { isUndefined } from '@stryke/type-checks/is-undefined';
|
|
5
5
|
import { createEsbuildPlugin } from 'unplugin';
|
|
@@ -29,5 +29,5 @@ var esbuild = createEsbuildPlugin(createUnpluginFactory("esbuild", (api, plugin)
|
|
|
29
29
|
var esbuild_default = esbuild;
|
|
30
30
|
|
|
31
31
|
export { esbuild, esbuild_default };
|
|
32
|
-
//# sourceMappingURL=chunk-
|
|
33
|
-
//# sourceMappingURL=chunk-
|
|
32
|
+
//# sourceMappingURL=chunk-VJM3ICZE.js.map
|
|
33
|
+
//# sourceMappingURL=chunk-VJM3ICZE.js.map
|
|
@@ -27,6 +27,7 @@ var chalk5 = require('chalk');
|
|
|
27
27
|
var Handlebars = require('handlebars');
|
|
28
28
|
var helperPluginUtils = require('@babel/helper-plugin-utils');
|
|
29
29
|
var t = require('@babel/types');
|
|
30
|
+
var isParentPath = require('@stryke/path/is-parent-path');
|
|
30
31
|
var prettyBytes = require('@stryke/string-format/pretty-bytes');
|
|
31
32
|
var tsMorph = require('ts-morph');
|
|
32
33
|
var types = require('@storm-software/config-tools/types');
|
|
@@ -48,7 +49,6 @@ var murmurhash = require('@stryke/hash/murmurhash');
|
|
|
48
49
|
var getUnique = require('@stryke/helpers/get-unique');
|
|
49
50
|
var omit = require('@stryke/helpers/omit');
|
|
50
51
|
var fetch = require('@stryke/http/fetch');
|
|
51
|
-
var isParentPath = require('@stryke/path/is-parent-path');
|
|
52
52
|
var join = require('@stryke/path/join');
|
|
53
53
|
var isNull = require('@stryke/type-checks/is-null');
|
|
54
54
|
var uuid = require('@stryke/unique-id/uuid');
|
|
@@ -109,7 +109,7 @@ var $__namespace = /*#__PURE__*/_interopNamespace($);
|
|
|
109
109
|
|
|
110
110
|
// package.json
|
|
111
111
|
var name = "powerlines";
|
|
112
|
-
var version = "0.37.
|
|
112
|
+
var version = "0.37.36";
|
|
113
113
|
var package_default = {
|
|
114
114
|
version};
|
|
115
115
|
function resolveModulePath(nodePath, state) {
|
|
@@ -327,8 +327,12 @@ function formatTypes(code) {
|
|
|
327
327
|
).replaceAll("#private;", "").replace(/__Ω/g, "");
|
|
328
328
|
}
|
|
329
329
|
chunkPK6SKIKE_cjs.__name(formatTypes, "formatTypes");
|
|
330
|
-
async function
|
|
331
|
-
|
|
330
|
+
async function emitBuiltinTypes(context, files) {
|
|
331
|
+
if (files.length === 0) {
|
|
332
|
+
context.debug("No files provided for TypeScript types generation. Typescript compilation for built-in modules will be skipped.");
|
|
333
|
+
return "";
|
|
334
|
+
}
|
|
335
|
+
context.debug(`Running the TypeScript compiler for ${files.length} generated built-in module files.`);
|
|
332
336
|
const program = createProgram(context, {
|
|
333
337
|
skipAddingFilesFromTsConfig: true
|
|
334
338
|
});
|
|
@@ -353,8 +357,8 @@ async function emitTypes(context, files) {
|
|
|
353
357
|
context.debug(`The TypeScript compiler emitted ${emittedFiles.length} files for built-in types.`);
|
|
354
358
|
let builtinModules = "";
|
|
355
359
|
for (const emittedFile of emittedFiles) {
|
|
356
|
-
|
|
357
|
-
|
|
360
|
+
context.trace(`Processing emitted type declaration file: ${emittedFile.filePath}`);
|
|
361
|
+
if (!emittedFile.filePath.endsWith(".map") && isParentPath.isParentPath(emittedFile.filePath, context.builtinsPath)) {
|
|
358
362
|
builtinModules += `
|
|
359
363
|
declare module "${replace.replaceExtension(replace.replacePath(emittedFile.filePath, context.builtinsPath))}" {
|
|
360
364
|
${emittedFile.text.trim().replace(/^\s*export\s*declare\s*/gm, "export ").replace(/^\s*declare\s*/gm, "")}
|
|
@@ -366,7 +370,7 @@ declare module "${replace.replaceExtension(replace.replacePath(emittedFile.fileP
|
|
|
366
370
|
context.debug(`A TypeScript declaration file (size: ${prettyBytes.prettyBytes(new Blob(toArray.toArray(builtinModules)).size)}) emitted for the built-in modules types.`);
|
|
367
371
|
return builtinModules;
|
|
368
372
|
}
|
|
369
|
-
chunkPK6SKIKE_cjs.__name(
|
|
373
|
+
chunkPK6SKIKE_cjs.__name(emitBuiltinTypes, "emitBuiltinTypes");
|
|
370
374
|
var mergeResults = defu7.createDefu((obj, key, value) => {
|
|
371
375
|
if (isString.isString(obj[key]) && isString.isString(value)) {
|
|
372
376
|
obj[key] = `${obj[key] || ""}
|
|
@@ -4532,7 +4536,8 @@ ${console.formatLogMessage(context.config)}`);
|
|
|
4532
4536
|
if (!typescriptPath) {
|
|
4533
4537
|
throw new Error("Could not resolve TypeScript package location. Please ensure TypeScript is installed.");
|
|
4534
4538
|
}
|
|
4535
|
-
|
|
4539
|
+
context.debug("Parsing TypeScript configuration for the Powerlines project.");
|
|
4540
|
+
let types = await emitBuiltinTypes(context, builtinFilePaths.reduce(
|
|
4536
4541
|
(ret, fileName) => {
|
|
4537
4542
|
const formatted = replace.replacePath(fileName, context.workspaceConfig.workspaceRoot);
|
|
4538
4543
|
if (!ret.includes(formatted)) {
|
|
@@ -4542,9 +4547,7 @@ ${console.formatLogMessage(context.config)}`);
|
|
|
4542
4547
|
},
|
|
4543
4548
|
[]
|
|
4544
4549
|
// [joinPaths(typescriptPath, "lib", "lib.esnext.full.d.ts")]
|
|
4545
|
-
);
|
|
4546
|
-
context.debug("Parsing TypeScript configuration for the Powerlines project.");
|
|
4547
|
-
let types = await emitTypes(context, files);
|
|
4550
|
+
));
|
|
4548
4551
|
context.debug(`Generating TypeScript declaration file ${context.dtsPath}.`);
|
|
4549
4552
|
const directives = [];
|
|
4550
4553
|
const asNextParam = /* @__PURE__ */ chunkPK6SKIKE_cjs.__name((previousResult) => isObject.isObject(previousResult) ? previousResult.code : previousResult, "asNextParam");
|
|
@@ -4599,8 +4602,8 @@ ${console.formatLogMessage(context.config)}`);
|
|
|
4599
4602
|
types = result;
|
|
4600
4603
|
}
|
|
4601
4604
|
}
|
|
4602
|
-
if (types?.trim() || directives.length > 0) {
|
|
4603
|
-
await context.fs.write(context.dtsPath, `${directives ? `${directives.map((directive) => `/// <reference types="${directive}" />`).join("\n")}
|
|
4605
|
+
if (isSetString.isSetString(types?.trim()) || directives.length > 0) {
|
|
4606
|
+
await context.fs.write(context.dtsPath, `${directives.length > 0 ? `${directives.map((directive) => `/// <reference types="${directive}" />`).join("\n")}
|
|
4604
4607
|
|
|
4605
4608
|
` : ""}${getFileHeader(context, {
|
|
4606
4609
|
directive: null,
|
|
@@ -5073,5 +5076,5 @@ exports.extendLog = extendLog;
|
|
|
5073
5076
|
exports.isUnpluginBuilderVariant = isUnpluginBuilderVariant;
|
|
5074
5077
|
exports.name = name;
|
|
5075
5078
|
exports.version = version;
|
|
5076
|
-
//# sourceMappingURL=chunk-
|
|
5077
|
-
//# sourceMappingURL=chunk-
|
|
5079
|
+
//# sourceMappingURL=chunk-YGNMQIR3.cjs.map
|
|
5080
|
+
//# sourceMappingURL=chunk-YGNMQIR3.cjs.map
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var chunkVBGDN56Q_cjs = require('./chunk-VBGDN56Q.cjs');
|
|
4
|
-
var
|
|
4
|
+
var chunkETKOV3WL_cjs = require('./chunk-ETKOV3WL.cjs');
|
|
5
5
|
var chunkPK6SKIKE_cjs = require('./chunk-PK6SKIKE.cjs');
|
|
6
6
|
var isUndefined = require('@stryke/type-checks/is-undefined');
|
|
7
7
|
var unplugin = require('unplugin');
|
|
8
8
|
|
|
9
|
-
var esbuild = unplugin.createEsbuildPlugin(
|
|
9
|
+
var esbuild = unplugin.createEsbuildPlugin(chunkETKOV3WL_cjs.createUnpluginFactory("esbuild", (api, plugin) => {
|
|
10
10
|
return {
|
|
11
11
|
...plugin,
|
|
12
12
|
esbuild: {
|
|
@@ -32,5 +32,5 @@ var esbuild_default = esbuild;
|
|
|
32
32
|
|
|
33
33
|
exports.esbuild = esbuild;
|
|
34
34
|
exports.esbuild_default = esbuild_default;
|
|
35
|
-
//# sourceMappingURL=chunk-
|
|
36
|
-
//# sourceMappingURL=chunk-
|
|
35
|
+
//# sourceMappingURL=chunk-ZUEB6QPR.cjs.map
|
|
36
|
+
//# sourceMappingURL=chunk-ZUEB6QPR.cjs.map
|
package/dist/esbuild.cjs
CHANGED
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var chunkZUEB6QPR_cjs = require('./chunk-ZUEB6QPR.cjs');
|
|
6
6
|
require('./chunk-VBGDN56Q.cjs');
|
|
7
|
-
require('./chunk-
|
|
8
|
-
require('./chunk-
|
|
7
|
+
require('./chunk-ETKOV3WL.cjs');
|
|
8
|
+
require('./chunk-YGNMQIR3.cjs');
|
|
9
9
|
require('./chunk-B6DVCLP5.cjs');
|
|
10
10
|
require('./chunk-V5WOGN7O.cjs');
|
|
11
11
|
require('./chunk-Z6ARQDHR.cjs');
|
|
@@ -15,15 +15,15 @@ require('./chunk-PK6SKIKE.cjs');
|
|
|
15
15
|
|
|
16
16
|
Object.defineProperty(exports, "default", {
|
|
17
17
|
enumerable: true,
|
|
18
|
-
get: function () { return
|
|
18
|
+
get: function () { return chunkZUEB6QPR_cjs.esbuild_default; }
|
|
19
19
|
});
|
|
20
20
|
Object.defineProperty(exports, "esbuild", {
|
|
21
21
|
enumerable: true,
|
|
22
|
-
get: function () { return
|
|
22
|
+
get: function () { return chunkZUEB6QPR_cjs.esbuild; }
|
|
23
23
|
});
|
|
24
24
|
Object.defineProperty(exports, "module.exports", {
|
|
25
25
|
enumerable: true,
|
|
26
|
-
get: function () { return
|
|
26
|
+
get: function () { return chunkZUEB6QPR_cjs.esbuild; }
|
|
27
27
|
});
|
|
28
28
|
//# sourceMappingURL=esbuild.cjs.map
|
|
29
29
|
//# sourceMappingURL=esbuild.cjs.map
|
package/dist/esbuild.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export { esbuild_default as default, esbuild, esbuild as "module.exports" } from './chunk-
|
|
1
|
+
export { esbuild_default as default, esbuild, esbuild as "module.exports" } from './chunk-VJM3ICZE.js';
|
|
2
2
|
import './chunk-FJHS7DAU.js';
|
|
3
|
-
import './chunk-
|
|
4
|
-
import './chunk-
|
|
3
|
+
import './chunk-CJOKAE34.js';
|
|
4
|
+
import './chunk-RNWZ3DIR.js';
|
|
5
5
|
import './chunk-PQXP7XQK.js';
|
|
6
6
|
import './chunk-NITQ5IYP.js';
|
|
7
7
|
import './chunk-2MYPFASJ.js';
|
package/dist/farm.cjs
CHANGED
|
@@ -2,15 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var
|
|
6
|
-
require('./chunk-
|
|
5
|
+
var chunkETKOV3WL_cjs = require('./chunk-ETKOV3WL.cjs');
|
|
6
|
+
require('./chunk-YGNMQIR3.cjs');
|
|
7
7
|
require('./chunk-B6DVCLP5.cjs');
|
|
8
8
|
require('./chunk-V5WOGN7O.cjs');
|
|
9
9
|
require('./chunk-Z6ARQDHR.cjs');
|
|
10
10
|
require('./chunk-PK6SKIKE.cjs');
|
|
11
11
|
var unplugin = require('unplugin');
|
|
12
12
|
|
|
13
|
-
var farm = unplugin.createFarmPlugin(
|
|
13
|
+
var farm = unplugin.createFarmPlugin(chunkETKOV3WL_cjs.createUnpluginFactory("farm"));
|
|
14
14
|
var farm_default = farm;
|
|
15
15
|
|
|
16
16
|
exports.default = farm_default;
|
package/dist/farm.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { createUnpluginFactory } from './chunk-
|
|
2
|
-
import './chunk-
|
|
1
|
+
import { createUnpluginFactory } from './chunk-CJOKAE34.js';
|
|
2
|
+
import './chunk-RNWZ3DIR.js';
|
|
3
3
|
import './chunk-PQXP7XQK.js';
|
|
4
4
|
import './chunk-NITQ5IYP.js';
|
|
5
5
|
import './chunk-2MYPFASJ.js';
|
package/dist/index.cjs
CHANGED
|
@@ -13,7 +13,7 @@ require('./chunk-4JCNAKOE.cjs');
|
|
|
13
13
|
require('./chunk-D6GGZQLC.cjs');
|
|
14
14
|
var chunkA7AUGAHH_cjs = require('./chunk-A7AUGAHH.cjs');
|
|
15
15
|
var chunk42ZHOCZJ_cjs = require('./chunk-42ZHOCZJ.cjs');
|
|
16
|
-
var
|
|
16
|
+
var chunkYGNMQIR3_cjs = require('./chunk-YGNMQIR3.cjs');
|
|
17
17
|
var chunkB6DVCLP5_cjs = require('./chunk-B6DVCLP5.cjs');
|
|
18
18
|
var chunkV5WOGN7O_cjs = require('./chunk-V5WOGN7O.cjs');
|
|
19
19
|
var chunkZ6ARQDHR_cjs = require('./chunk-Z6ARQDHR.cjs');
|
|
@@ -27,10 +27,10 @@ chunkPK6SKIKE_cjs.__name(defineConfig, "defineConfig");
|
|
|
27
27
|
async function createPowerlines(options = {}) {
|
|
28
28
|
options.root ??= process.cwd();
|
|
29
29
|
const workspaceRoot = getWorkspaceRoot.getWorkspaceRoot(options.root);
|
|
30
|
-
return
|
|
30
|
+
return chunkYGNMQIR3_cjs.PowerlinesAPI.from(workspaceRoot, options);
|
|
31
31
|
}
|
|
32
32
|
chunkPK6SKIKE_cjs.__name(createPowerlines, "createPowerlines");
|
|
33
|
-
var index_default =
|
|
33
|
+
var index_default = chunkYGNMQIR3_cjs.PowerlinesAPI;
|
|
34
34
|
|
|
35
35
|
Object.defineProperty(exports, "STORAGE_PRESETS", {
|
|
36
36
|
enumerable: true,
|
|
@@ -50,31 +50,31 @@ Object.defineProperty(exports, "HOOKS_LIST_ORDERS", {
|
|
|
50
50
|
});
|
|
51
51
|
Object.defineProperty(exports, "FileId", {
|
|
52
52
|
enumerable: true,
|
|
53
|
-
get: function () { return
|
|
53
|
+
get: function () { return chunkYGNMQIR3_cjs.FileId; }
|
|
54
54
|
});
|
|
55
55
|
Object.defineProperty(exports, "FileMetadata", {
|
|
56
56
|
enumerable: true,
|
|
57
|
-
get: function () { return
|
|
57
|
+
get: function () { return chunkYGNMQIR3_cjs.FileMetadata; }
|
|
58
58
|
});
|
|
59
59
|
Object.defineProperty(exports, "FileMetadata_KeyValuePair", {
|
|
60
60
|
enumerable: true,
|
|
61
|
-
get: function () { return
|
|
61
|
+
get: function () { return chunkYGNMQIR3_cjs.FileMetadata_KeyValuePair; }
|
|
62
62
|
});
|
|
63
63
|
Object.defineProperty(exports, "FileStorage", {
|
|
64
64
|
enumerable: true,
|
|
65
|
-
get: function () { return
|
|
65
|
+
get: function () { return chunkYGNMQIR3_cjs.FileStorage; }
|
|
66
66
|
});
|
|
67
67
|
Object.defineProperty(exports, "FileSystem", {
|
|
68
68
|
enumerable: true,
|
|
69
|
-
get: function () { return
|
|
69
|
+
get: function () { return chunkYGNMQIR3_cjs.FileSystem; }
|
|
70
70
|
});
|
|
71
71
|
Object.defineProperty(exports, "PowerlinesAPI", {
|
|
72
72
|
enumerable: true,
|
|
73
|
-
get: function () { return
|
|
73
|
+
get: function () { return chunkYGNMQIR3_cjs.PowerlinesAPI; }
|
|
74
74
|
});
|
|
75
75
|
Object.defineProperty(exports, "_capnpFileId", {
|
|
76
76
|
enumerable: true,
|
|
77
|
-
get: function () { return
|
|
77
|
+
get: function () { return chunkYGNMQIR3_cjs._capnpFileId; }
|
|
78
78
|
});
|
|
79
79
|
Object.defineProperty(exports, "KNOWN_PLUGIN_FIELDS", {
|
|
80
80
|
enumerable: true,
|
package/dist/index.js
CHANGED
|
@@ -9,8 +9,8 @@ import './chunk-OYASPHNL.js';
|
|
|
9
9
|
import './chunk-OD4BINRW.js';
|
|
10
10
|
export { STORAGE_PRESETS, __VFS_PATCH__, __VFS_REVERT__ } from './chunk-KXRVVFNK.js';
|
|
11
11
|
export { HOOKS_LIST_ORDERS } from './chunk-CCJQBJKQ.js';
|
|
12
|
-
import { PowerlinesAPI } from './chunk-
|
|
13
|
-
export { FileId, FileMetadata, FileMetadata_KeyValuePair, FileStorage, FileSystem, PowerlinesAPI, _capnpFileId } from './chunk-
|
|
12
|
+
import { PowerlinesAPI } from './chunk-RNWZ3DIR.js';
|
|
13
|
+
export { FileId, FileMetadata, FileMetadata_KeyValuePair, FileStorage, FileSystem, PowerlinesAPI, _capnpFileId } from './chunk-RNWZ3DIR.js';
|
|
14
14
|
export { KNOWN_PLUGIN_FIELDS, PLUGIN_HOOKS_FIELDS, PLUGIN_NON_HOOK_FIELDS } from './chunk-PQXP7XQK.js';
|
|
15
15
|
export { BUILDER_VARIANTS, UNPLUGIN_BUILDER_VARIANTS } from './chunk-NITQ5IYP.js';
|
|
16
16
|
export { SUPPORTED_COMMANDS } from './chunk-2MYPFASJ.js';
|