powerlines 0.15.0 → 0.16.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/dist/plugin-utils/chunk-2HFS2OOG.cjs +14 -0
- package/dist/plugin-utils/chunk-CVZA2RT3.js +12 -0
- package/dist/plugin-utils/index.cjs +5 -0
- package/dist/plugin-utils/index.d.cts +1 -0
- package/dist/plugin-utils/index.d.ts +1 -0
- package/dist/plugin-utils/index.js +1 -0
- package/dist/plugin-utils/paths.cjs +11 -0
- package/dist/plugin-utils/paths.d.cts +46 -0
- package/dist/plugin-utils/paths.d.ts +46 -0
- package/dist/plugin-utils/paths.js +2 -0
- package/package.json +2 -2
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkUSNT2KNT_cjs = require('./chunk-USNT2KNT.cjs');
|
|
4
|
+
var replace = require('@stryke/path/replace');
|
|
5
|
+
|
|
6
|
+
function replacePathTokens(context, path) {
|
|
7
|
+
if (!path) {
|
|
8
|
+
return path;
|
|
9
|
+
}
|
|
10
|
+
return path.replaceAll("{workspaceRoot}", context.workspaceConfig.workspaceRoot).replaceAll("{projectRoot}", context.config.projectRoot).replaceAll("{powerlinesPath}", context.powerlinesPath).replaceAll("{cachePath}", context.cachePath).replaceAll("{dataPath}", context.dataPath).replaceAll("{logPath}", context.envPaths.log).replaceAll("{tempPath}", context.envPaths.temp).replaceAll("{configPath}", context.envPaths.config).replaceAll("{artifactsPath}", replace.replacePath(context.artifactsPath, context.workspaceConfig.workspaceRoot)).replaceAll("{builtinPath}", replace.replacePath(context.builtinsPath, context.workspaceConfig.workspaceRoot)).replaceAll("{entryPath}", replace.replacePath(context.entryPath, context.workspaceConfig.workspaceRoot));
|
|
11
|
+
}
|
|
12
|
+
chunkUSNT2KNT_cjs.__name(replacePathTokens, "replacePathTokens");
|
|
13
|
+
|
|
14
|
+
exports.replacePathTokens = replacePathTokens;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { __name } from './chunk-SHUYVCID.js';
|
|
2
|
+
import { replacePath } from '@stryke/path/replace';
|
|
3
|
+
|
|
4
|
+
function replacePathTokens(context, path) {
|
|
5
|
+
if (!path) {
|
|
6
|
+
return path;
|
|
7
|
+
}
|
|
8
|
+
return path.replaceAll("{workspaceRoot}", context.workspaceConfig.workspaceRoot).replaceAll("{projectRoot}", context.config.projectRoot).replaceAll("{powerlinesPath}", context.powerlinesPath).replaceAll("{cachePath}", context.cachePath).replaceAll("{dataPath}", context.dataPath).replaceAll("{logPath}", context.envPaths.log).replaceAll("{tempPath}", context.envPaths.temp).replaceAll("{configPath}", context.envPaths.config).replaceAll("{artifactsPath}", replacePath(context.artifactsPath, context.workspaceConfig.workspaceRoot)).replaceAll("{builtinPath}", replacePath(context.builtinsPath, context.workspaceConfig.workspaceRoot)).replaceAll("{entryPath}", replacePath(context.entryPath, context.workspaceConfig.workspaceRoot));
|
|
9
|
+
}
|
|
10
|
+
__name(replacePathTokens, "replacePathTokens");
|
|
11
|
+
|
|
12
|
+
export { replacePathTokens };
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
var chunkMIKPJJNG_cjs = require('./chunk-MIKPJJNG.cjs');
|
|
4
4
|
var chunkYKIS7BLU_cjs = require('./chunk-YKIS7BLU.cjs');
|
|
5
5
|
var chunkMQOW6ENT_cjs = require('./chunk-MQOW6ENT.cjs');
|
|
6
|
+
var chunk2HFS2OOG_cjs = require('./chunk-2HFS2OOG.cjs');
|
|
6
7
|
require('./chunk-USNT2KNT.cjs');
|
|
7
8
|
|
|
8
9
|
|
|
@@ -67,3 +68,7 @@ Object.defineProperty(exports, "isPluginHookObject", {
|
|
|
67
68
|
enumerable: true,
|
|
68
69
|
get: function () { return chunkMQOW6ENT_cjs.isPluginHookObject; }
|
|
69
70
|
});
|
|
71
|
+
Object.defineProperty(exports, "replacePathTokens", {
|
|
72
|
+
enumerable: true,
|
|
73
|
+
get: function () { return chunk2HFS2OOG_cjs.replacePathTokens; }
|
|
74
|
+
});
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export { extendPlugin } from './extend.cjs';
|
|
2
2
|
export { getConfigPath } from './get-config-path.cjs';
|
|
3
3
|
export { addPluginHook, checkDedupe, extractPluginHook, getHookHandler, isHookExternal, isHookInternal, isPlugin, isPluginConfig, isPluginConfigObject, isPluginConfigTuple, isPluginHook, isPluginHookFunction, isPluginHookObject } from './helpers.cjs';
|
|
4
|
+
export { replacePathTokens } from './paths.cjs';
|
|
4
5
|
import './config-ClPkPCYC.cjs';
|
|
5
6
|
import '@storm-software/build-tools/types';
|
|
6
7
|
import '@storm-software/config-tools/types';
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export { extendPlugin } from './extend.js';
|
|
2
2
|
export { getConfigPath } from './get-config-path.js';
|
|
3
3
|
export { addPluginHook, checkDedupe, extractPluginHook, getHookHandler, isHookExternal, isHookInternal, isPlugin, isPluginConfig, isPluginConfigObject, isPluginConfigTuple, isPluginHook, isPluginHookFunction, isPluginHookObject } from './helpers.js';
|
|
4
|
+
export { replacePathTokens } from './paths.js';
|
|
4
5
|
import './config-ClPkPCYC.js';
|
|
5
6
|
import '@storm-software/build-tools/types';
|
|
6
7
|
import '@storm-software/config-tools/types';
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export { extendPlugin } from './chunk-3G5FJKN2.js';
|
|
2
2
|
export { getConfigPath } from './chunk-HHFA3IEZ.js';
|
|
3
3
|
export { addPluginHook, checkDedupe, extractPluginHook, getHookHandler, isHookExternal, isHookInternal, isPlugin, isPluginConfig, isPluginConfigObject, isPluginConfigTuple, isPluginHook, isPluginHookFunction, isPluginHookObject } from './chunk-PK6PYFWY.js';
|
|
4
|
+
export { replacePathTokens } from './chunk-CVZA2RT3.js';
|
|
4
5
|
import './chunk-SHUYVCID.js';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunk2HFS2OOG_cjs = require('./chunk-2HFS2OOG.cjs');
|
|
4
|
+
require('./chunk-USNT2KNT.cjs');
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
Object.defineProperty(exports, "replacePathTokens", {
|
|
9
|
+
enumerable: true,
|
|
10
|
+
get: function () { return chunk2HFS2OOG_cjs.replacePathTokens; }
|
|
11
|
+
});
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { IsUndefined } from '@stryke/types/base';
|
|
2
|
+
import { C as Context } from './config-ClPkPCYC.cjs';
|
|
3
|
+
import '@storm-software/build-tools/types';
|
|
4
|
+
import '@storm-software/config-tools/types';
|
|
5
|
+
import '@storm-software/config/types';
|
|
6
|
+
import '@stryke/types/configuration';
|
|
7
|
+
import '@stryke/types/file';
|
|
8
|
+
import 'vite';
|
|
9
|
+
import '@stryke/env/get-env-paths';
|
|
10
|
+
import '@stryke/types/package-json';
|
|
11
|
+
import 'jiti';
|
|
12
|
+
import 'oxc-parser';
|
|
13
|
+
import 'semver';
|
|
14
|
+
import 'unplugin';
|
|
15
|
+
import '@stryke/types/array';
|
|
16
|
+
import '@stryke/types/tsconfig';
|
|
17
|
+
import 'typescript';
|
|
18
|
+
import '@stryke/json/types';
|
|
19
|
+
import 'memfs';
|
|
20
|
+
import 'node:fs';
|
|
21
|
+
import 'unionfs';
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Replaces tokens in the given path string with their corresponding values from the context.
|
|
25
|
+
*
|
|
26
|
+
* @remarks
|
|
27
|
+
* The following tokens are supported:
|
|
28
|
+
* - `{workspaceRoot}` - The root directory of the workspace.
|
|
29
|
+
* - `{projectRoot}` - The root directory of the project.
|
|
30
|
+
* - `{powerlinesPath}` - The directory where Powerlines is installed.
|
|
31
|
+
* - `{cachePath}` - The environment's directory for cached files.
|
|
32
|
+
* - `{dataPath}` - The environment's directory for data files.
|
|
33
|
+
* - `{logPath}` - The environment's directory for log files.
|
|
34
|
+
* - `{tempPath}` - The environment's directory for temporary files.
|
|
35
|
+
* - `{configPath}` - The environment's directory for configuration files.
|
|
36
|
+
* - `{artifactsPath}` - The configured directory for build artifacts.
|
|
37
|
+
* - `{builtinPath}` - The configured directory for built-in plugins.
|
|
38
|
+
* - `{entryPath}` - The configured directory for entry files.
|
|
39
|
+
*
|
|
40
|
+
* @param context - The context containing the values for the path tokens.
|
|
41
|
+
* @param path - The path string with tokens to replace.
|
|
42
|
+
* @returns The path string with tokens replaced by their corresponding values from the context.
|
|
43
|
+
*/
|
|
44
|
+
declare function replacePathTokens(context: Context, path?: string): IsUndefined<typeof path> extends true ? undefined : string;
|
|
45
|
+
|
|
46
|
+
export { replacePathTokens };
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { IsUndefined } from '@stryke/types/base';
|
|
2
|
+
import { C as Context } from './config-ClPkPCYC.js';
|
|
3
|
+
import '@storm-software/build-tools/types';
|
|
4
|
+
import '@storm-software/config-tools/types';
|
|
5
|
+
import '@storm-software/config/types';
|
|
6
|
+
import '@stryke/types/configuration';
|
|
7
|
+
import '@stryke/types/file';
|
|
8
|
+
import 'vite';
|
|
9
|
+
import '@stryke/env/get-env-paths';
|
|
10
|
+
import '@stryke/types/package-json';
|
|
11
|
+
import 'jiti';
|
|
12
|
+
import 'oxc-parser';
|
|
13
|
+
import 'semver';
|
|
14
|
+
import 'unplugin';
|
|
15
|
+
import '@stryke/types/array';
|
|
16
|
+
import '@stryke/types/tsconfig';
|
|
17
|
+
import 'typescript';
|
|
18
|
+
import '@stryke/json/types';
|
|
19
|
+
import 'memfs';
|
|
20
|
+
import 'node:fs';
|
|
21
|
+
import 'unionfs';
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Replaces tokens in the given path string with their corresponding values from the context.
|
|
25
|
+
*
|
|
26
|
+
* @remarks
|
|
27
|
+
* The following tokens are supported:
|
|
28
|
+
* - `{workspaceRoot}` - The root directory of the workspace.
|
|
29
|
+
* - `{projectRoot}` - The root directory of the project.
|
|
30
|
+
* - `{powerlinesPath}` - The directory where Powerlines is installed.
|
|
31
|
+
* - `{cachePath}` - The environment's directory for cached files.
|
|
32
|
+
* - `{dataPath}` - The environment's directory for data files.
|
|
33
|
+
* - `{logPath}` - The environment's directory for log files.
|
|
34
|
+
* - `{tempPath}` - The environment's directory for temporary files.
|
|
35
|
+
* - `{configPath}` - The environment's directory for configuration files.
|
|
36
|
+
* - `{artifactsPath}` - The configured directory for build artifacts.
|
|
37
|
+
* - `{builtinPath}` - The configured directory for built-in plugins.
|
|
38
|
+
* - `{entryPath}` - The configured directory for entry files.
|
|
39
|
+
*
|
|
40
|
+
* @param context - The context containing the values for the path tokens.
|
|
41
|
+
* @param path - The path string with tokens to replace.
|
|
42
|
+
* @returns The path string with tokens replaced by their corresponding values from the context.
|
|
43
|
+
*/
|
|
44
|
+
declare function replacePathTokens(context: Context, path?: string): IsUndefined<typeof path> extends true ? undefined : string;
|
|
45
|
+
|
|
46
|
+
export { replacePathTokens };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "powerlines",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.16.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "The \"any framework\" framework that simplifies modern dev tool usage, generates virtual (or actual) code modules, and improves DX across the board.",
|
|
6
6
|
"repository": {
|
|
@@ -535,5 +535,5 @@
|
|
|
535
535
|
"typescript": "^5.9.3"
|
|
536
536
|
},
|
|
537
537
|
"publishConfig": { "access": "public" },
|
|
538
|
-
"gitHead": "
|
|
538
|
+
"gitHead": "097e9f257b733719a3aead815ef79686f4c46f25"
|
|
539
539
|
}
|