powerlines 0.44.6 → 0.44.7
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/package.cjs +1 -1
- package/dist/package.mjs +1 -1
- package/dist/unplugin.cjs +2 -2
- package/dist/unplugin.mjs +2 -2
- package/dist/unplugin.mjs.map +1 -1
- package/package.json +7 -7
package/dist/package.cjs
CHANGED
package/dist/package.mjs
CHANGED
package/dist/unplugin.cjs
CHANGED
|
@@ -17,7 +17,7 @@ let _powerlines_engine_api = require("@powerlines/engine/api");
|
|
|
17
17
|
*/
|
|
18
18
|
function createUnpluginFactory(variant, decorate) {
|
|
19
19
|
return (config, meta) => {
|
|
20
|
-
let logger = (0, _powerlines_core_plugin_utils_logging.createLogger)(config.name || "powerlines", {
|
|
20
|
+
let logger = (0, _powerlines_core_plugin_utils_logging.createLogger)(config.name || "powerlines", {});
|
|
21
21
|
logger.debug("Initializing Unplugin");
|
|
22
22
|
try {
|
|
23
23
|
const userConfig = {
|
|
@@ -35,7 +35,7 @@ function createUnpluginFactory(variant, decorate) {
|
|
|
35
35
|
command: "build",
|
|
36
36
|
...userConfig
|
|
37
37
|
});
|
|
38
|
-
logger = api.context.
|
|
38
|
+
logger = api.context.logger;
|
|
39
39
|
logger.debug("Powerlines build plugin starting...");
|
|
40
40
|
await api.context.setup();
|
|
41
41
|
(0, unplugin.setParseImpl)(api.context.parse);
|
package/dist/unplugin.mjs
CHANGED
|
@@ -16,7 +16,7 @@ export * from "@powerlines/core/lib/unplugin"
|
|
|
16
16
|
*/
|
|
17
17
|
function createUnpluginFactory(variant, decorate) {
|
|
18
18
|
return (config, meta) => {
|
|
19
|
-
let logger = createLogger(config.name || "powerlines", {
|
|
19
|
+
let logger = createLogger(config.name || "powerlines", {});
|
|
20
20
|
logger.debug("Initializing Unplugin");
|
|
21
21
|
try {
|
|
22
22
|
const userConfig = {
|
|
@@ -34,7 +34,7 @@ function createUnpluginFactory(variant, decorate) {
|
|
|
34
34
|
command: "build",
|
|
35
35
|
...userConfig
|
|
36
36
|
});
|
|
37
|
-
logger = api.context.
|
|
37
|
+
logger = api.context.logger;
|
|
38
38
|
logger.debug("Powerlines build plugin starting...");
|
|
39
39
|
await api.context.setup();
|
|
40
40
|
setParseImpl(api.context.parse);
|
package/dist/unplugin.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"unplugin.mjs","names":[],"sources":["../src/unplugin.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport type {\n Context,\n UnpluginBuilderVariant,\n UnpluginFactory,\n UnpluginOptions\n} from \"@powerlines/core\";\nimport { getString } from \"@powerlines/core/lib/utilities/source-file\";\nimport { createLogger } from \"@powerlines/core/plugin-utils/logging\";\nimport { getWorkspaceRoot } from \"@stryke/fs/get-workspace-root\";\nimport { LoadResult } from \"rolldown\";\nimport type {\n UnpluginOptions as BaseUnpluginOptions,\n TransformResult,\n UnpluginBuildContext,\n UnpluginContext\n} from \"unplugin\";\nimport { setParseImpl } from \"unplugin\";\nimport { PowerlinesAPI } from \"./api\";\n\nexport * from \"@powerlines/core/lib/unplugin\";\n\n/**\n * Creates a Powerlines unplugin factory that generates a plugin instance.\n *\n * @param variant - The build variant for which to create the unplugin.\n * @param decorate - An optional function to decorate the unplugin options.\n * @returns The unplugin factory that generates a plugin instance.\n */\nexport function createUnpluginFactory<\n TContext extends Context,\n TUnpluginBuilderVariant extends UnpluginBuilderVariant =\n UnpluginBuilderVariant\n>(\n variant: TUnpluginBuilderVariant,\n decorate?: (\n api: PowerlinesAPI<TContext[\"config\"]>,\n plugin: UnpluginOptions<TContext>\n ) => BaseUnpluginOptions\n): UnpluginFactory<TContext> {\n return (config, meta): UnpluginOptions<TContext> => {\n let logger = createLogger(config.name || \"powerlines\", {
|
|
1
|
+
{"version":3,"file":"unplugin.mjs","names":[],"sources":["../src/unplugin.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport type {\n Context,\n UnpluginBuilderVariant,\n UnpluginFactory,\n UnpluginOptions\n} from \"@powerlines/core\";\nimport { getString } from \"@powerlines/core/lib/utilities/source-file\";\nimport { createLogger } from \"@powerlines/core/plugin-utils/logging\";\nimport { getWorkspaceRoot } from \"@stryke/fs/get-workspace-root\";\nimport { LoadResult } from \"rolldown\";\nimport type {\n UnpluginOptions as BaseUnpluginOptions,\n TransformResult,\n UnpluginBuildContext,\n UnpluginContext\n} from \"unplugin\";\nimport { setParseImpl } from \"unplugin\";\nimport { PowerlinesAPI } from \"./api\";\n\nexport * from \"@powerlines/core/lib/unplugin\";\n\n/**\n * Creates a Powerlines unplugin factory that generates a plugin instance.\n *\n * @param variant - The build variant for which to create the unplugin.\n * @param decorate - An optional function to decorate the unplugin options.\n * @returns The unplugin factory that generates a plugin instance.\n */\nexport function createUnpluginFactory<\n TContext extends Context,\n TUnpluginBuilderVariant extends UnpluginBuilderVariant =\n UnpluginBuilderVariant\n>(\n variant: TUnpluginBuilderVariant,\n decorate?: (\n api: PowerlinesAPI<TContext[\"config\"]>,\n plugin: UnpluginOptions<TContext>\n ) => BaseUnpluginOptions\n): UnpluginFactory<TContext> {\n return (config, meta): UnpluginOptions<TContext> => {\n let logger = createLogger(config.name || \"powerlines\", {});\n logger.debug(\"Initializing Unplugin\");\n\n try {\n const userConfig = {\n ...config,\n variant,\n unplugin: meta\n } as TContext[\"config\"][\"userConfig\"];\n\n let api!: PowerlinesAPI<TContext[\"config\"]>;\n\n async function buildStart(this: UnpluginBuildContext): Promise<void> {\n api = await PowerlinesAPI.fromOptions(\n {\n cwd: getWorkspaceRoot(process.cwd()),\n root: userConfig.root,\n mode: userConfig.mode\n },\n { command: \"build\", ...userConfig }\n );\n\n logger = api.context.logger;\n logger.debug(\"Powerlines build plugin starting...\");\n\n await api.context.setup();\n\n setParseImpl(api.context.parse);\n\n logger.debug(\"Preparing build artifacts for the Powerlines project...\");\n\n await api.prepare({\n command: \"build\"\n });\n }\n\n async function resolveId(\n this: UnpluginBuildContext & UnpluginContext,\n id: string,\n importer?: string,\n options: {\n isEntry: boolean;\n } = { isEntry: false }\n ) {\n return api.context.resolve(id, importer, options);\n }\n\n async function load(\n this: UnpluginBuildContext & UnpluginContext,\n id: string\n ): Promise<LoadResult> {\n const environment = await api.context.getEnvironment();\n\n let result = await api.callHook(\n \"load\",\n { environment, order: \"pre\" },\n id\n );\n if (result) {\n return result;\n }\n\n result = await api.callHook(\n \"load\",\n { environment, order: \"normal\" },\n id\n );\n if (result) {\n return result;\n }\n\n result = await environment.load(id);\n if (result) {\n return result;\n }\n\n return api.callHook(\"load\", { environment, order: \"post\" }, id);\n }\n\n async function transform(\n code: string,\n id: string\n ): Promise<TransformResult> {\n return api.callHook(\n \"transform\",\n {\n environment: await api.context.getEnvironment(),\n result: \"merge\",\n asNextParam: previousResult => getString(previousResult)\n },\n getString(code),\n id\n );\n }\n\n async function writeBundle(): Promise<void> {\n logger.debug(\"Finalizing Powerlines project output...\");\n\n await api.callHook(\"writeBundle\", {\n environment: await api.context.getEnvironment()\n });\n }\n\n const options = {\n name: \"powerlines\",\n api,\n resolveId,\n load,\n transform,\n buildStart,\n writeBundle\n } as UnpluginOptions<TContext>;\n\n const result = decorate ? decorate(api, options) : options;\n\n logger.debug(\"Unplugin initialized successfully.\");\n\n return { api, ...result };\n } catch (error) {\n logger.error((error as Error)?.message);\n\n throw error;\n }\n };\n}\n"],"mappings":";;;;;;;;;;;;;;;;AA8CA,SAAgB,sBAKd,SACA,UAI2B;AAC3B,SAAQ,QAAQ,SAAoC;EAClD,IAAI,SAAS,aAAa,OAAO,QAAQ,cAAc,EAAE,CAAC;AAC1D,SAAO,MAAM,wBAAwB;AAErC,MAAI;GACF,MAAM,aAAa;IACjB,GAAG;IACH;IACA,UAAU;IACX;GAED,IAAI;GAEJ,eAAe,aAAsD;AACnE,UAAM,MAAM,cAAc,YACxB;KACE,KAAK,iBAAiB,QAAQ,KAAK,CAAC;KACpC,MAAM,WAAW;KACjB,MAAM,WAAW;KAClB,EACD;KAAE,SAAS;KAAS,GAAG;KAAY,CACpC;AAED,aAAS,IAAI,QAAQ;AACrB,WAAO,MAAM,sCAAsC;AAEnD,UAAM,IAAI,QAAQ,OAAO;AAEzB,iBAAa,IAAI,QAAQ,MAAM;AAE/B,WAAO,MAAM,0DAA0D;AAEvE,UAAM,IAAI,QAAQ,EAChB,SAAS,SACV,CAAC;;GAGJ,eAAe,UAEb,IACA,UACA,UAEI,EAAE,SAAS,OAAO,EACtB;AACA,WAAO,IAAI,QAAQ,QAAQ,IAAI,UAAU,QAAQ;;GAGnD,eAAe,KAEb,IACqB;IACrB,MAAM,cAAc,MAAM,IAAI,QAAQ,gBAAgB;IAEtD,IAAI,SAAS,MAAM,IAAI,SACrB,QACA;KAAE;KAAa,OAAO;KAAO,EAC7B,GACD;AACD,QAAI,OACF,QAAO;AAGT,aAAS,MAAM,IAAI,SACjB,QACA;KAAE;KAAa,OAAO;KAAU,EAChC,GACD;AACD,QAAI,OACF,QAAO;AAGT,aAAS,MAAM,YAAY,KAAK,GAAG;AACnC,QAAI,OACF,QAAO;AAGT,WAAO,IAAI,SAAS,QAAQ;KAAE;KAAa,OAAO;KAAQ,EAAE,GAAG;;GAGjE,eAAe,UACb,MACA,IAC0B;AAC1B,WAAO,IAAI,SACT,aACA;KACE,aAAa,MAAM,IAAI,QAAQ,gBAAgB;KAC/C,QAAQ;KACR,cAAa,mBAAkB,UAAU,eAAe;KACzD,EACD,UAAU,KAAK,EACf,GACD;;GAGH,eAAe,cAA6B;AAC1C,WAAO,MAAM,0CAA0C;AAEvD,UAAM,IAAI,SAAS,eAAe,EAChC,aAAa,MAAM,IAAI,QAAQ,gBAAgB,EAChD,CAAC;;GAGJ,MAAM,UAAU;IACd,MAAM;IACN;IACA;IACA;IACA;IACA;IACA;IACD;GAED,MAAM,SAAS,WAAW,SAAS,KAAK,QAAQ,GAAG;AAEnD,UAAO,MAAM,qCAAqC;AAElD,UAAO;IAAE;IAAK,GAAG;IAAQ;WAClB,OAAO;AACd,UAAO,MAAO,OAAiB,QAAQ;AAEvC,SAAM"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "powerlines",
|
|
3
|
-
"version": "0.44.
|
|
3
|
+
"version": "0.44.7",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "The \"framework framework\" that simplifies modern dev tool usage, generates virtual (or actual) code modules, and improves DX across the board.",
|
|
6
6
|
"keywords": [
|
|
@@ -373,10 +373,10 @@
|
|
|
373
373
|
"files": ["dist/**/*", "files/**/*", "schemas/**/*"],
|
|
374
374
|
"dependencies": {
|
|
375
375
|
"@babel/types": "8.0.0-rc.3",
|
|
376
|
-
"@powerlines/core": "^0.44.
|
|
377
|
-
"@powerlines/engine": "^0.44.
|
|
378
|
-
"@storm-software/config": "^1.137.
|
|
379
|
-
"@storm-software/config-tools": "^1.190.
|
|
376
|
+
"@powerlines/core": "^0.44.7",
|
|
377
|
+
"@powerlines/engine": "^0.44.7",
|
|
378
|
+
"@storm-software/config": "^1.137.34",
|
|
379
|
+
"@storm-software/config-tools": "^1.190.1",
|
|
380
380
|
"@stryke/fs": "^0.33.69",
|
|
381
381
|
"@stryke/convert": "^0.7.2",
|
|
382
382
|
"@stryke/env": "^0.20.86",
|
|
@@ -384,7 +384,7 @@
|
|
|
384
384
|
"unplugin": "^3.0.0"
|
|
385
385
|
},
|
|
386
386
|
"devDependencies": {
|
|
387
|
-
"@storm-software/testing-tools": "^1.119.
|
|
387
|
+
"@storm-software/testing-tools": "^1.119.155",
|
|
388
388
|
"@stryke/types": "^0.11.6",
|
|
389
389
|
"@types/node": "^25.6.0",
|
|
390
390
|
"typescript": "^6.0.3",
|
|
@@ -441,5 +441,5 @@
|
|
|
441
441
|
},
|
|
442
442
|
"publishConfig": { "access": "public" },
|
|
443
443
|
"bin": { "powerlines": "./bin/bin.mjs" },
|
|
444
|
-
"gitHead": "
|
|
444
|
+
"gitHead": "81813b5033a0de08888d653195e4f97deb3897fc"
|
|
445
445
|
}
|