@powerlines/plugin-nitro 0.1.144 → 0.1.146
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/_virtual/rolldown_runtime.cjs +29 -0
- package/dist/index.cjs +2 -30
- package/dist/index.d.cts +2 -2
- package/dist/index.d.mts +2 -2
- package/dist/index.mjs +0 -2
- package/dist/index.mjs.map +1 -1
- package/dist/types/index.cjs +0 -2
- package/dist/types/index.d.cts +1 -2
- package/dist/types/index.d.mts +1 -2
- package/dist/types/index.mjs +0 -3
- package/dist/types/plugin.cjs +0 -1
- package/dist/types/plugin.d.cts +46 -2
- package/dist/types/plugin.d.cts.map +1 -0
- package/dist/types/plugin.d.mts +46 -2
- package/dist/types/plugin.d.mts.map +1 -0
- package/dist/types/plugin.mjs +0 -2
- package/package.json +8 -8
- package/dist/index-BgAdqTbb.d.mts +0 -1
- package/dist/index-CEgs-Dz2.d.cts +0 -1
- package/dist/plugin-BOAyUg-_.d.mts +0 -46
- package/dist/plugin-BOAyUg-_.d.mts.map +0 -1
- package/dist/plugin-C3MaN5jp.mjs +0 -1
- package/dist/plugin-DHXHjv16.cjs +0 -0
- package/dist/plugin-DpbzWQcL.d.cts +0 -46
- package/dist/plugin-DpbzWQcL.d.cts.map +0 -1
- package/dist/types-CTUnla4x.mjs +0 -1
- package/dist/types-DHkg7xmX.cjs +0 -0
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
//#region rolldown:runtime
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __copyProps = (to, from, except, desc) => {
|
|
9
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
10
|
+
for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
11
|
+
key = keys[i];
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except) {
|
|
13
|
+
__defProp(to, key, {
|
|
14
|
+
get: ((k) => from[k]).bind(null, key),
|
|
15
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
return to;
|
|
21
|
+
};
|
|
22
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
23
|
+
value: mod,
|
|
24
|
+
enumerable: true
|
|
25
|
+
}) : target, mod));
|
|
26
|
+
|
|
27
|
+
//#endregion
|
|
28
|
+
|
|
29
|
+
exports.__toESM = __toESM;
|
package/dist/index.cjs
CHANGED
|
@@ -1,36 +1,8 @@
|
|
|
1
1
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
2
|
-
|
|
3
|
-
var __create = Object.create;
|
|
4
|
-
var __defProp = Object.defineProperty;
|
|
5
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
8
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
|
-
var __copyProps = (to, from, except, desc) => {
|
|
10
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
-
for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
12
|
-
key = keys[i];
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except) {
|
|
14
|
-
__defProp(to, key, {
|
|
15
|
-
get: ((k) => from[k]).bind(null, key),
|
|
16
|
-
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
17
|
-
});
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
return to;
|
|
22
|
-
};
|
|
23
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
24
|
-
value: mod,
|
|
25
|
-
enumerable: true
|
|
26
|
-
}) : target, mod));
|
|
27
|
-
|
|
28
|
-
//#endregion
|
|
29
|
-
require('./plugin-DHXHjv16.cjs');
|
|
30
|
-
require('./types-DHkg7xmX.cjs');
|
|
2
|
+
const require_rolldown_runtime = require('./_virtual/rolldown_runtime.cjs');
|
|
31
3
|
let __stryke_path_append = require("@stryke/path/append");
|
|
32
4
|
let defu = require("defu");
|
|
33
|
-
defu = __toESM(defu);
|
|
5
|
+
defu = require_rolldown_runtime.__toESM(defu);
|
|
34
6
|
let nitro_builder = require("nitro/builder");
|
|
35
7
|
let powerlines_plugin_utils_get_config_path = require("powerlines/plugin-utils/get-config-path");
|
|
36
8
|
|
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "./index
|
|
1
|
+
import { NitroContext, NitroPluginContext, NitroPluginOptions, NitroPluginResolvedConfig, NitroPluginUserConfig, __ΩNitroContext, __ΩNitroPluginContext, __ΩNitroPluginOptions, __ΩNitroPluginResolvedConfig, __ΩNitroPluginUserConfig } from "./types/plugin.cjs";
|
|
2
|
+
import "./types/index.cjs";
|
|
3
3
|
import { Plugin } from "powerlines/types/plugin";
|
|
4
4
|
|
|
5
5
|
//#region src/index.d.ts
|
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "./index
|
|
1
|
+
import { NitroContext, NitroPluginContext, NitroPluginOptions, NitroPluginResolvedConfig, NitroPluginUserConfig, __ΩNitroContext, __ΩNitroPluginContext, __ΩNitroPluginOptions, __ΩNitroPluginResolvedConfig, __ΩNitroPluginUserConfig } from "./types/plugin.mjs";
|
|
2
|
+
import "./types/index.mjs";
|
|
3
3
|
import { Plugin } from "powerlines/types/plugin";
|
|
4
4
|
|
|
5
5
|
//#region src/index.d.ts
|
package/dist/index.mjs
CHANGED
package/dist/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","names":[],"sources":["../src/index.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 { appendPath } from \"@stryke/path/append\";\nimport defu from \"defu\";\nimport { createNitro } from \"nitro/builder\";\nimport { NitroConfig } from \"nitro/types\";\nimport { getConfigPath } from \"powerlines/plugin-utils/get-config-path\";\nimport { Plugin } from \"powerlines/types/plugin\";\nimport {\n NitroContext,\n NitroPluginContext,\n NitroPluginOptions,\n NitroPluginUserConfig\n} from \"./types/plugin\";\n\nexport * from \"./types\";\n\n/**\n * A Powerlines plugin to integrate with Nitro.\n */\nexport const plugin = <\n TContext extends NitroPluginContext = NitroPluginContext\n>(\n options: NitroPluginOptions = {}\n) => {\n return [\n // nitroInit(options),\n // nitroEnv(options),\n // nitroMain(options),\n // nitroPrepare(options),\n // nitroService(options),\n // nitroPreviewPlugin(options),\n {\n name: \"nitro:config\",\n async config() {\n this.debug(\n \"Providing default configuration for the Powerlines `nitro` plugin.\"\n );\n\n let configFile = options.configFile;\n if (!configFile) {\n configFile = getConfigPath(this, \"nitro\");\n }\n\n return {\n nitro: {\n configFile: configFile\n ? appendPath(configFile, this.workspaceConfig.workspaceRoot)\n : undefined,\n ...options\n }\n } as NitroPluginUserConfig;\n },\n configResolved() {\n this.config.nitro.compatibilityDate = this.config.compatibilityDate;\n this.config.nitro.workspaceDir = this.workspaceConfig.workspaceRoot;\n\n this.config.nitro.alias = this.config.build\n .alias as NitroConfig[\"alias\"];\n\n switch (this.config.logLevel) {\n case \"error\":\n this.config.nitro.logLevel = 1;\n break;\n case \"warn\":\n this.config.nitro.logLevel = 2;\n break;\n case \"info\":\n this.config.nitro.logLevel = 3;\n break;\n case \"debug\":\n this.config.nitro.logLevel = 4;\n break;\n case \"trace\":\n this.config.nitro.logLevel = 5;\n break;\n case null:\n this.config.nitro.logLevel = 0;\n break;\n default:\n this.config.nitro.logLevel = 2;\n break;\n }\n }\n },\n {\n name: \"nitro:init\",\n configResolved: {\n order: \"post\",\n async handler() {\n this.nitro ??= {} as NitroContext;\n this.nitro.nitro = await createNitro(this.config.nitro);\n }\n }\n },\n {\n name: \"nitro:vite\",\n vite: {\n config(_, configEnv) {\n this.config.nitro.dev = configEnv.command === \"serve\";\n this.config.nitro.builder = \"vite\";\n this.config.nitro.rootDir = this.config.projectRoot;\n this.config.nitro = defu(\n this.config.nitro,\n this.config\n ) as NitroConfig;\n }\n }\n }\n ] as Plugin<TContext>[];\n};\n\nexport default plugin;\n\n// function nitroInit(\n// options: NitroPluginOptions = {}\n// ): Plugin<NitroPluginContext> {\n// return {\n// name: \"nitro:init\",\n// sharedDuringBuild: true,\n\n// async config(config, configEnv) {\n// this.isRolldown = !!(this.meta as Record<string, string>).rolldownVersion;\n// if (!this.isInitialized) {\n// debug(\"[init] Initializing nitro\");\n// this.isInitialized = true;\n// await setupNitroContext(this, configEnv, config);\n// }\n// },\n\n// applyToEnvironment(env) {\n// if (env.name === \"nitro\" && ctx.nitro?.options.dev) {\n// debug(\"[init] Adding rollup plugins for dev\");\n// return [...((ctx.rollupConfig?.config.plugins as VitePlugin[]) || [])];\n// }\n// },\n// vite: {\n// apply: (_, configEnv) => !configEnv.isPreview\n// }\n// };\n// }\n\n// function nitroEnv(ctx: NitroPluginContext): VitePlugin {\n// return {\n// name: \"nitro:env\",\n// sharedDuringBuild: true,\n// apply: (_config, configEnv) => !configEnv.isPreview,\n\n// async config(userConfig, _configEnv) {\n// debug(\"[env] Extending config (environments)\");\n// const environments: Record<string, EnvironmentOptions> = {\n// ...createServiceEnvironments(ctx),\n// nitro: createNitroEnvironment(ctx)\n// };\n// environments.client = {\n// consumer: userConfig.environments?.client?.consumer ?? \"client\",\n// build: {\n// rollupOptions: {\n// input:\n// userConfig.environments?.client?.build?.rollupOptions?.input ??\n// useNitro(ctx).options.renderer?.template\n// }\n// }\n// };\n// debug(\"[env] Environments:\", Object.keys(environments).join(\", \"));\n// return {\n// environments\n// };\n// },\n\n// configEnvironment(name, config) {\n// if (config.consumer === \"client\") {\n// debug(\n// \"[env] Configuring client environment\",\n// name === \"client\" ? \"\" : ` (${name})`\n// );\n// config.build!.emptyOutDir = false;\n// config.build!.outDir = useNitro(ctx).options.output.publicDir;\n// }\n// }\n// };\n// }\n\n// function nitroMain(ctx: NitroPluginContext): VitePlugin {\n// return {\n// name: \"nitro:main\",\n// sharedDuringBuild: true,\n// apply: (_config, configEnv) => !configEnv.isPreview,\n\n// async config(userConfig, _configEnv) {\n// debug(\"[main] Extending config (appType, resolve, server)\");\n// if (!ctx.rollupConfig) {\n// throw new Error(\"Nitro rollup config is not initialized yet.\");\n// }\n// return {\n// appType: userConfig.appType || \"custom\",\n// resolve: {\n// // TODO: environment specific aliases not working\n// // https://github.com/vitejs/vite/pull/17583 (seems not effective)\n// alias: ctx.rollupConfig.base.aliases\n// },\n// builder: {\n// sharedConfigBuild: true\n// },\n// server: {\n// port:\n// Number.parseInt(process.env.PORT || \"\") ||\n// userConfig.server?.port ||\n// useNitro(ctx).options.devServer?.port ||\n// 3000,\n// // #3673, disable Vite's `cors` by default as Nitro handles all requests\n// cors: false\n// }\n// };\n// },\n\n// buildApp: {\n// order: \"post\",\n// handler(builder) {\n// debug(\"[main] Building environments\");\n// return buildEnvironments(ctx, builder);\n// }\n// },\n\n// generateBundle: {\n// handler(_options, bundle) {\n// const environment = this.environment;\n// debug(\n// \"[main] Generating manifest and entry points for environment:\",\n// environment.name\n// );\n// const serviceNames = Object.keys(ctx.services);\n// const isRegisteredService = serviceNames.includes(environment.name);\n\n// // Find entry point of this service\n// let entryFile: string | undefined;\n// for (const [_name, file] of Object.entries(bundle)) {\n// if (file.type === \"chunk\" && isRegisteredService && file.isEntry) {\n// if (entryFile === undefined) {\n// entryFile = file.fileName;\n// } else {\n// this.warn(\n// `Multiple entry points found for service \"${environment.name}\"`\n// );\n// }\n// }\n// }\n// if (isRegisteredService) {\n// if (entryFile === undefined) {\n// this.error(\n// `No entry point found for service \"${this.environment.name}\".`\n// );\n// }\n// ctx._entryPoints![this.environment.name] = entryFile!;\n// }\n// }\n// },\n\n// configureServer: server => {\n// debug(\"[main] Configuring dev server\");\n// return configureViteDevServer(ctx, server);\n// },\n\n// // Automatically reload the client when a server module is updated\n// // see: https://github.com/vitejs/vite/issues/19114\n// async hotUpdate({ server, modules, timestamp }) {\n// const env = this.environment;\n// if (\n// ctx.pluginConfig.experimental?.vite.serverReload === false ||\n// env.config.consumer === \"client\"\n// ) {\n// return;\n// }\n// const clientEnvs = Object.values(server.environments).filter(\n// env => env.config.consumer === \"client\"\n// );\n// let hasServerOnlyModule = false;\n// const invalidated = new Set<EnvironmentModuleNode>();\n// for (const mod of modules) {\n// if (\n// mod.id &&\n// !clientEnvs.some(env => env.moduleGraph.getModuleById(mod.id))\n// ) {\n// hasServerOnlyModule = true;\n// env.moduleGraph.invalidateModule(mod, invalidated, timestamp, false);\n// }\n// }\n// if (hasServerOnlyModule) {\n// env.hot.send({ type: \"full-reload\" });\n// server.ws.send({ type: \"full-reload\" });\n// return [];\n// }\n// }\n// };\n// }\n\n// function nitroPrepare(ctx: NitroPluginContext): VitePlugin {\n// return {\n// name: \"nitro:prepare\",\n// sharedDuringBuild: true,\n// applyToEnvironment: env => env.name === \"nitro\",\n\n// buildApp: {\n// // Clean the output directory before any environment is built\n// order: \"pre\",\n// async handler() {\n// debug(\"[prepare] Preparing output directory\");\n// const nitro = ctx.nitro;\n// await prepare(nitro);\n// }\n// }\n// };\n// }\n\n// function nitroService(ctx: NitroPluginContext): VitePlugin {\n// return {\n// name: \"nitro:service\",\n// enforce: \"pre\",\n// sharedDuringBuild: true,\n// applyToEnvironment: env => env.name === \"nitro\",\n\n// resolveId: {\n// filter: { id: /^#nitro-vite-setup$/ },\n// async handler(id) {\n// // Virtual modules\n// if (id === \"#nitro-vite-setup\") {\n// return { id, moduleSideEffects: true };\n// }\n// }\n// },\n\n// load: {\n// filter: { id: /^#nitro-vite-setup$/ },\n// async handler(id) {\n// // Virtual modules\n// if (id === \"#nitro-vite-setup\") {\n// return prodSetup(ctx);\n// }\n// }\n// }\n// };\n// }\n"],"mappings":";;;;;;;;;;;AAoCA,MAAa,UAGX,UAA8B,EAAE,KAC7B;AACH,QAAO;EAOL;GACE,MAAM;GACN,MAAM,SAAS;AACb,SAAK,MACH,qEACD;IAED,IAAI,aAAa,QAAQ;AACzB,QAAI,CAAC,WACH,cAAa,cAAc,MAAM,QAAQ;AAG3C,WAAO,EACL,OAAO;KACL,YAAY,aACR,WAAW,YAAY,KAAK,gBAAgB,cAAc,GAC1D;KACJ,GAAG;KACJ,EACF;;GAEH,iBAAiB;AACf,SAAK,OAAO,MAAM,oBAAoB,KAAK,OAAO;AAClD,SAAK,OAAO,MAAM,eAAe,KAAK,gBAAgB;AAEtD,SAAK,OAAO,MAAM,QAAQ,KAAK,OAAO,MACnC;AAEH,YAAQ,KAAK,OAAO,UAApB;KACE,KAAK;AACH,WAAK,OAAO,MAAM,WAAW;AAC7B;KACF,KAAK;AACH,WAAK,OAAO,MAAM,WAAW;AAC7B;KACF,KAAK;AACH,WAAK,OAAO,MAAM,WAAW;AAC7B;KACF,KAAK;AACH,WAAK,OAAO,MAAM,WAAW;AAC7B;KACF,KAAK;AACH,WAAK,OAAO,MAAM,WAAW;AAC7B;KACF,KAAK;AACH,WAAK,OAAO,MAAM,WAAW;AAC7B;KACF;AACE,WAAK,OAAO,MAAM,WAAW;AAC7B;;;GAGP;EACD;GACE,MAAM;GACN,gBAAgB;IACd,OAAO;IACP,MAAM,UAAU;AACd,UAAK,UAAU,EAAE;AACjB,UAAK,MAAM,QAAQ,MAAM,YAAY,KAAK,OAAO,MAAM;;IAE1D;GACF;EACD;GACE,MAAM;GACN,MAAM,EACJ,OAAO,GAAG,WAAW;AACnB,SAAK,OAAO,MAAM,MAAM,UAAU,YAAY;AAC9C,SAAK,OAAO,MAAM,UAAU;AAC5B,SAAK,OAAO,MAAM,UAAU,KAAK,OAAO;AACxC,SAAK,OAAO,QAAQ,KAClB,KAAK,OAAO,OACZ,KAAK,OACN;MAEJ;GACF;EACF;;AAGH,kBAAe"}
|
|
1
|
+
{"version":3,"file":"index.mjs","names":[],"sources":["../src/index.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 { appendPath } from \"@stryke/path/append\";\nimport defu from \"defu\";\nimport { createNitro } from \"nitro/builder\";\nimport { NitroConfig } from \"nitro/types\";\nimport { getConfigPath } from \"powerlines/plugin-utils/get-config-path\";\nimport { Plugin } from \"powerlines/types/plugin\";\nimport {\n NitroContext,\n NitroPluginContext,\n NitroPluginOptions,\n NitroPluginUserConfig\n} from \"./types/plugin\";\n\nexport * from \"./types\";\n\n/**\n * A Powerlines plugin to integrate with Nitro.\n */\nexport const plugin = <\n TContext extends NitroPluginContext = NitroPluginContext\n>(\n options: NitroPluginOptions = {}\n) => {\n return [\n // nitroInit(options),\n // nitroEnv(options),\n // nitroMain(options),\n // nitroPrepare(options),\n // nitroService(options),\n // nitroPreviewPlugin(options),\n {\n name: \"nitro:config\",\n async config() {\n this.debug(\n \"Providing default configuration for the Powerlines `nitro` plugin.\"\n );\n\n let configFile = options.configFile;\n if (!configFile) {\n configFile = getConfigPath(this, \"nitro\");\n }\n\n return {\n nitro: {\n configFile: configFile\n ? appendPath(configFile, this.workspaceConfig.workspaceRoot)\n : undefined,\n ...options\n }\n } as NitroPluginUserConfig;\n },\n configResolved() {\n this.config.nitro.compatibilityDate = this.config.compatibilityDate;\n this.config.nitro.workspaceDir = this.workspaceConfig.workspaceRoot;\n\n this.config.nitro.alias = this.config.build\n .alias as NitroConfig[\"alias\"];\n\n switch (this.config.logLevel) {\n case \"error\":\n this.config.nitro.logLevel = 1;\n break;\n case \"warn\":\n this.config.nitro.logLevel = 2;\n break;\n case \"info\":\n this.config.nitro.logLevel = 3;\n break;\n case \"debug\":\n this.config.nitro.logLevel = 4;\n break;\n case \"trace\":\n this.config.nitro.logLevel = 5;\n break;\n case null:\n this.config.nitro.logLevel = 0;\n break;\n default:\n this.config.nitro.logLevel = 2;\n break;\n }\n }\n },\n {\n name: \"nitro:init\",\n configResolved: {\n order: \"post\",\n async handler() {\n this.nitro ??= {} as NitroContext;\n this.nitro.nitro = await createNitro(this.config.nitro);\n }\n }\n },\n {\n name: \"nitro:vite\",\n vite: {\n config(_, configEnv) {\n this.config.nitro.dev = configEnv.command === \"serve\";\n this.config.nitro.builder = \"vite\";\n this.config.nitro.rootDir = this.config.projectRoot;\n this.config.nitro = defu(\n this.config.nitro,\n this.config\n ) as NitroConfig;\n }\n }\n }\n ] as Plugin<TContext>[];\n};\n\nexport default plugin;\n\n// function nitroInit(\n// options: NitroPluginOptions = {}\n// ): Plugin<NitroPluginContext> {\n// return {\n// name: \"nitro:init\",\n// sharedDuringBuild: true,\n\n// async config(config, configEnv) {\n// this.isRolldown = !!(this.meta as Record<string, string>).rolldownVersion;\n// if (!this.isInitialized) {\n// debug(\"[init] Initializing nitro\");\n// this.isInitialized = true;\n// await setupNitroContext(this, configEnv, config);\n// }\n// },\n\n// applyToEnvironment(env) {\n// if (env.name === \"nitro\" && ctx.nitro?.options.dev) {\n// debug(\"[init] Adding rollup plugins for dev\");\n// return [...((ctx.rollupConfig?.config.plugins as VitePlugin[]) || [])];\n// }\n// },\n// vite: {\n// apply: (_, configEnv) => !configEnv.isPreview\n// }\n// };\n// }\n\n// function nitroEnv(ctx: NitroPluginContext): VitePlugin {\n// return {\n// name: \"nitro:env\",\n// sharedDuringBuild: true,\n// apply: (_config, configEnv) => !configEnv.isPreview,\n\n// async config(userConfig, _configEnv) {\n// debug(\"[env] Extending config (environments)\");\n// const environments: Record<string, EnvironmentOptions> = {\n// ...createServiceEnvironments(ctx),\n// nitro: createNitroEnvironment(ctx)\n// };\n// environments.client = {\n// consumer: userConfig.environments?.client?.consumer ?? \"client\",\n// build: {\n// rollupOptions: {\n// input:\n// userConfig.environments?.client?.build?.rollupOptions?.input ??\n// useNitro(ctx).options.renderer?.template\n// }\n// }\n// };\n// debug(\"[env] Environments:\", Object.keys(environments).join(\", \"));\n// return {\n// environments\n// };\n// },\n\n// configEnvironment(name, config) {\n// if (config.consumer === \"client\") {\n// debug(\n// \"[env] Configuring client environment\",\n// name === \"client\" ? \"\" : ` (${name})`\n// );\n// config.build!.emptyOutDir = false;\n// config.build!.outDir = useNitro(ctx).options.output.publicDir;\n// }\n// }\n// };\n// }\n\n// function nitroMain(ctx: NitroPluginContext): VitePlugin {\n// return {\n// name: \"nitro:main\",\n// sharedDuringBuild: true,\n// apply: (_config, configEnv) => !configEnv.isPreview,\n\n// async config(userConfig, _configEnv) {\n// debug(\"[main] Extending config (appType, resolve, server)\");\n// if (!ctx.rollupConfig) {\n// throw new Error(\"Nitro rollup config is not initialized yet.\");\n// }\n// return {\n// appType: userConfig.appType || \"custom\",\n// resolve: {\n// // TODO: environment specific aliases not working\n// // https://github.com/vitejs/vite/pull/17583 (seems not effective)\n// alias: ctx.rollupConfig.base.aliases\n// },\n// builder: {\n// sharedConfigBuild: true\n// },\n// server: {\n// port:\n// Number.parseInt(process.env.PORT || \"\") ||\n// userConfig.server?.port ||\n// useNitro(ctx).options.devServer?.port ||\n// 3000,\n// // #3673, disable Vite's `cors` by default as Nitro handles all requests\n// cors: false\n// }\n// };\n// },\n\n// buildApp: {\n// order: \"post\",\n// handler(builder) {\n// debug(\"[main] Building environments\");\n// return buildEnvironments(ctx, builder);\n// }\n// },\n\n// generateBundle: {\n// handler(_options, bundle) {\n// const environment = this.environment;\n// debug(\n// \"[main] Generating manifest and entry points for environment:\",\n// environment.name\n// );\n// const serviceNames = Object.keys(ctx.services);\n// const isRegisteredService = serviceNames.includes(environment.name);\n\n// // Find entry point of this service\n// let entryFile: string | undefined;\n// for (const [_name, file] of Object.entries(bundle)) {\n// if (file.type === \"chunk\" && isRegisteredService && file.isEntry) {\n// if (entryFile === undefined) {\n// entryFile = file.fileName;\n// } else {\n// this.warn(\n// `Multiple entry points found for service \"${environment.name}\"`\n// );\n// }\n// }\n// }\n// if (isRegisteredService) {\n// if (entryFile === undefined) {\n// this.error(\n// `No entry point found for service \"${this.environment.name}\".`\n// );\n// }\n// ctx._entryPoints![this.environment.name] = entryFile!;\n// }\n// }\n// },\n\n// configureServer: server => {\n// debug(\"[main] Configuring dev server\");\n// return configureViteDevServer(ctx, server);\n// },\n\n// // Automatically reload the client when a server module is updated\n// // see: https://github.com/vitejs/vite/issues/19114\n// async hotUpdate({ server, modules, timestamp }) {\n// const env = this.environment;\n// if (\n// ctx.pluginConfig.experimental?.vite.serverReload === false ||\n// env.config.consumer === \"client\"\n// ) {\n// return;\n// }\n// const clientEnvs = Object.values(server.environments).filter(\n// env => env.config.consumer === \"client\"\n// );\n// let hasServerOnlyModule = false;\n// const invalidated = new Set<EnvironmentModuleNode>();\n// for (const mod of modules) {\n// if (\n// mod.id &&\n// !clientEnvs.some(env => env.moduleGraph.getModuleById(mod.id))\n// ) {\n// hasServerOnlyModule = true;\n// env.moduleGraph.invalidateModule(mod, invalidated, timestamp, false);\n// }\n// }\n// if (hasServerOnlyModule) {\n// env.hot.send({ type: \"full-reload\" });\n// server.ws.send({ type: \"full-reload\" });\n// return [];\n// }\n// }\n// };\n// }\n\n// function nitroPrepare(ctx: NitroPluginContext): VitePlugin {\n// return {\n// name: \"nitro:prepare\",\n// sharedDuringBuild: true,\n// applyToEnvironment: env => env.name === \"nitro\",\n\n// buildApp: {\n// // Clean the output directory before any environment is built\n// order: \"pre\",\n// async handler() {\n// debug(\"[prepare] Preparing output directory\");\n// const nitro = ctx.nitro;\n// await prepare(nitro);\n// }\n// }\n// };\n// }\n\n// function nitroService(ctx: NitroPluginContext): VitePlugin {\n// return {\n// name: \"nitro:service\",\n// enforce: \"pre\",\n// sharedDuringBuild: true,\n// applyToEnvironment: env => env.name === \"nitro\",\n\n// resolveId: {\n// filter: { id: /^#nitro-vite-setup$/ },\n// async handler(id) {\n// // Virtual modules\n// if (id === \"#nitro-vite-setup\") {\n// return { id, moduleSideEffects: true };\n// }\n// }\n// },\n\n// load: {\n// filter: { id: /^#nitro-vite-setup$/ },\n// async handler(id) {\n// // Virtual modules\n// if (id === \"#nitro-vite-setup\") {\n// return prodSetup(ctx);\n// }\n// }\n// }\n// };\n// }\n"],"mappings":";;;;;;;;;AAoCA,MAAa,UAGX,UAA8B,EAAE,KAC7B;AACH,QAAO;EAOL;GACE,MAAM;GACN,MAAM,SAAS;AACb,SAAK,MACH,qEACD;IAED,IAAI,aAAa,QAAQ;AACzB,QAAI,CAAC,WACH,cAAa,cAAc,MAAM,QAAQ;AAG3C,WAAO,EACL,OAAO;KACL,YAAY,aACR,WAAW,YAAY,KAAK,gBAAgB,cAAc,GAC1D;KACJ,GAAG;KACJ,EACF;;GAEH,iBAAiB;AACf,SAAK,OAAO,MAAM,oBAAoB,KAAK,OAAO;AAClD,SAAK,OAAO,MAAM,eAAe,KAAK,gBAAgB;AAEtD,SAAK,OAAO,MAAM,QAAQ,KAAK,OAAO,MACnC;AAEH,YAAQ,KAAK,OAAO,UAApB;KACE,KAAK;AACH,WAAK,OAAO,MAAM,WAAW;AAC7B;KACF,KAAK;AACH,WAAK,OAAO,MAAM,WAAW;AAC7B;KACF,KAAK;AACH,WAAK,OAAO,MAAM,WAAW;AAC7B;KACF,KAAK;AACH,WAAK,OAAO,MAAM,WAAW;AAC7B;KACF,KAAK;AACH,WAAK,OAAO,MAAM,WAAW;AAC7B;KACF,KAAK;AACH,WAAK,OAAO,MAAM,WAAW;AAC7B;KACF;AACE,WAAK,OAAO,MAAM,WAAW;AAC7B;;;GAGP;EACD;GACE,MAAM;GACN,gBAAgB;IACd,OAAO;IACP,MAAM,UAAU;AACd,UAAK,UAAU,EAAE;AACjB,UAAK,MAAM,QAAQ,MAAM,YAAY,KAAK,OAAO,MAAM;;IAE1D;GACF;EACD;GACE,MAAM;GACN,MAAM,EACJ,OAAO,GAAG,WAAW;AACnB,SAAK,OAAO,MAAM,MAAM,UAAU,YAAY;AAC9C,SAAK,OAAO,MAAM,UAAU;AAC5B,SAAK,OAAO,MAAM,UAAU,KAAK,OAAO;AACxC,SAAK,OAAO,QAAQ,KAClB,KAAK,OAAO,OACZ,KAAK,OACN;MAEJ;GACF;EACF;;AAGH,kBAAe"}
|
package/dist/types/index.cjs
CHANGED
package/dist/types/index.d.cts
CHANGED
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "../index-CEgs-Dz2.cjs";
|
|
1
|
+
import { NitroContext, NitroPluginContext, NitroPluginOptions, NitroPluginResolvedConfig, NitroPluginUserConfig, __ΩNitroContext, __ΩNitroPluginContext, __ΩNitroPluginOptions, __ΩNitroPluginResolvedConfig, __ΩNitroPluginUserConfig } from "./plugin.cjs";
|
|
3
2
|
export { NitroContext, NitroPluginContext, NitroPluginOptions, NitroPluginResolvedConfig, NitroPluginUserConfig, __ΩNitroContext, __ΩNitroPluginContext, __ΩNitroPluginOptions, __ΩNitroPluginResolvedConfig, __ΩNitroPluginUserConfig };
|
package/dist/types/index.d.mts
CHANGED
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "../index-BgAdqTbb.mjs";
|
|
1
|
+
import { NitroContext, NitroPluginContext, NitroPluginOptions, NitroPluginResolvedConfig, NitroPluginUserConfig, __ΩNitroContext, __ΩNitroPluginContext, __ΩNitroPluginOptions, __ΩNitroPluginResolvedConfig, __ΩNitroPluginUserConfig } from "./plugin.mjs";
|
|
3
2
|
export { NitroContext, NitroPluginContext, NitroPluginOptions, NitroPluginResolvedConfig, NitroPluginUserConfig, __ΩNitroContext, __ΩNitroPluginContext, __ΩNitroPluginOptions, __ΩNitroPluginResolvedConfig, __ΩNitroPluginUserConfig };
|
package/dist/types/index.mjs
CHANGED
package/dist/types/plugin.cjs
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
require('../plugin-DHXHjv16.cjs');
|
package/dist/types/plugin.d.cts
CHANGED
|
@@ -1,2 +1,46 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { createDevServer } from "nitro/builder";
|
|
2
|
+
import { Nitro, NitroConfig } from "nitro/types";
|
|
3
|
+
import { NitroPluginConfig, ServiceConfig } from "nitro/vite";
|
|
4
|
+
import { UserConfig } from "powerlines/types/config";
|
|
5
|
+
import { PluginContext } from "powerlines/types/context";
|
|
6
|
+
import { ResolvedConfig } from "powerlines/types/resolved";
|
|
7
|
+
|
|
8
|
+
//#region src/types/plugin.d.ts
|
|
9
|
+
interface NitroPluginOptions extends Omit<NitroConfig, "root" | "compatibilityDate" | "logLevel" | "sourcemap" | "minify"> {
|
|
10
|
+
/**
|
|
11
|
+
* The path to a separate Nitro configuration file.
|
|
12
|
+
*/
|
|
13
|
+
configFile?: string;
|
|
14
|
+
}
|
|
15
|
+
interface NitroPluginUserConfig extends UserConfig {
|
|
16
|
+
/**
|
|
17
|
+
* Options for the Nitro plugin.
|
|
18
|
+
*/
|
|
19
|
+
nitro?: NitroPluginOptions;
|
|
20
|
+
}
|
|
21
|
+
interface NitroPluginResolvedConfig extends ResolvedConfig {
|
|
22
|
+
/**
|
|
23
|
+
* Options for the Nitro plugin.
|
|
24
|
+
*/
|
|
25
|
+
nitro: NitroConfig;
|
|
26
|
+
}
|
|
27
|
+
interface NitroContext {
|
|
28
|
+
nitro?: Nitro;
|
|
29
|
+
pluginConfig: NitroPluginConfig;
|
|
30
|
+
dev?: ReturnType<typeof createDevServer>;
|
|
31
|
+
services: Record<string, ServiceConfig>;
|
|
32
|
+
isRolldown?: boolean;
|
|
33
|
+
isInitialized?: boolean;
|
|
34
|
+
publicDistDir?: string;
|
|
35
|
+
}
|
|
36
|
+
type NitroPluginContext<TResolvedConfig extends NitroPluginResolvedConfig = NitroPluginResolvedConfig> = PluginContext<TResolvedConfig> & {
|
|
37
|
+
nitro: NitroContext;
|
|
38
|
+
};
|
|
39
|
+
declare type __ΩNitroPluginOptions = any[];
|
|
40
|
+
declare type __ΩNitroPluginUserConfig = any[];
|
|
41
|
+
declare type __ΩNitroPluginResolvedConfig = any[];
|
|
42
|
+
declare type __ΩNitroContext = any[];
|
|
43
|
+
declare type __ΩNitroPluginContext = any[];
|
|
44
|
+
//#endregion
|
|
45
|
+
export { NitroContext, NitroPluginContext, NitroPluginOptions, NitroPluginResolvedConfig, NitroPluginUserConfig, __ΩNitroContext, __ΩNitroPluginContext, __ΩNitroPluginOptions, __ΩNitroPluginResolvedConfig, __ΩNitroPluginUserConfig };
|
|
46
|
+
//# sourceMappingURL=plugin.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin.d.cts","names":[],"sources":["../../src/types/plugin.ts"],"sourcesContent":[],"mappings":";;;;;;;;UAyBiB,kBAAA,SAA2B,KAC1C;;AADF;AAUA;EAOiB,UAAA,CAAA,EAAA,MAAA;AAOjB;AACU,UAfO,qBAAA,SAA8B,UAerC,CAAA;EACM;;;EAEW,KAAA,CAAA,EAdjB,kBAciB;;AAAT,UAXD,yBAAA,SAAkC,cAWjC,CAAA;EAMN;;;EAEM,KAAA,EAfT,WAeS;;AACT,UAbQ,YAAA,CAaR;EAAY,KAAA,CAAA,EAZX,KAYW;gBAXL;QACR,kBAAkB;YACd,eAAe;;;;;KAMf,2CACc,4BAA4B,6BAClD,cAAc;SACT"}
|
package/dist/types/plugin.d.mts
CHANGED
|
@@ -1,2 +1,46 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { createDevServer } from "nitro/builder";
|
|
2
|
+
import { Nitro, NitroConfig } from "nitro/types";
|
|
3
|
+
import { NitroPluginConfig, ServiceConfig } from "nitro/vite";
|
|
4
|
+
import { UserConfig } from "powerlines/types/config";
|
|
5
|
+
import { PluginContext } from "powerlines/types/context";
|
|
6
|
+
import { ResolvedConfig } from "powerlines/types/resolved";
|
|
7
|
+
|
|
8
|
+
//#region src/types/plugin.d.ts
|
|
9
|
+
interface NitroPluginOptions extends Omit<NitroConfig, "root" | "compatibilityDate" | "logLevel" | "sourcemap" | "minify"> {
|
|
10
|
+
/**
|
|
11
|
+
* The path to a separate Nitro configuration file.
|
|
12
|
+
*/
|
|
13
|
+
configFile?: string;
|
|
14
|
+
}
|
|
15
|
+
interface NitroPluginUserConfig extends UserConfig {
|
|
16
|
+
/**
|
|
17
|
+
* Options for the Nitro plugin.
|
|
18
|
+
*/
|
|
19
|
+
nitro?: NitroPluginOptions;
|
|
20
|
+
}
|
|
21
|
+
interface NitroPluginResolvedConfig extends ResolvedConfig {
|
|
22
|
+
/**
|
|
23
|
+
* Options for the Nitro plugin.
|
|
24
|
+
*/
|
|
25
|
+
nitro: NitroConfig;
|
|
26
|
+
}
|
|
27
|
+
interface NitroContext {
|
|
28
|
+
nitro?: Nitro;
|
|
29
|
+
pluginConfig: NitroPluginConfig;
|
|
30
|
+
dev?: ReturnType<typeof createDevServer>;
|
|
31
|
+
services: Record<string, ServiceConfig>;
|
|
32
|
+
isRolldown?: boolean;
|
|
33
|
+
isInitialized?: boolean;
|
|
34
|
+
publicDistDir?: string;
|
|
35
|
+
}
|
|
36
|
+
type NitroPluginContext<TResolvedConfig extends NitroPluginResolvedConfig = NitroPluginResolvedConfig> = PluginContext<TResolvedConfig> & {
|
|
37
|
+
nitro: NitroContext;
|
|
38
|
+
};
|
|
39
|
+
declare type __ΩNitroPluginOptions = any[];
|
|
40
|
+
declare type __ΩNitroPluginUserConfig = any[];
|
|
41
|
+
declare type __ΩNitroPluginResolvedConfig = any[];
|
|
42
|
+
declare type __ΩNitroContext = any[];
|
|
43
|
+
declare type __ΩNitroPluginContext = any[];
|
|
44
|
+
//#endregion
|
|
45
|
+
export { NitroContext, NitroPluginContext, NitroPluginOptions, NitroPluginResolvedConfig, NitroPluginUserConfig, __ΩNitroContext, __ΩNitroPluginContext, __ΩNitroPluginOptions, __ΩNitroPluginResolvedConfig, __ΩNitroPluginUserConfig };
|
|
46
|
+
//# sourceMappingURL=plugin.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin.d.mts","names":[],"sources":["../../src/types/plugin.ts"],"sourcesContent":[],"mappings":";;;;;;;;UAyBiB,kBAAA,SAA2B,KAC1C;;AADF;AAUA;EAOiB,UAAA,CAAA,EAAA,MAAA;AAOjB;AACU,UAfO,qBAAA,SAA8B,UAerC,CAAA;EACM;;;EAEW,KAAA,CAAA,EAdjB,kBAciB;;AAAT,UAXD,yBAAA,SAAkC,cAWjC,CAAA;EAMN;;;EAEM,KAAA,EAfT,WAeS;;AACT,UAbQ,YAAA,CAaR;EAAY,KAAA,CAAA,EAZX,KAYW;gBAXL;QACR,kBAAkB;YACd,eAAe;;;;;KAMf,2CACc,4BAA4B,6BAClD,cAAc;SACT"}
|
package/dist/types/plugin.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@powerlines/plugin-nitro",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.146",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A package containing a Powerlines plugin for creating a server application that runs on Nitro.",
|
|
6
6
|
"repository": {
|
|
@@ -87,21 +87,21 @@
|
|
|
87
87
|
"keywords": ["nitro", "powerlines", "storm-software", "powerlines-plugin"],
|
|
88
88
|
"dependencies": {
|
|
89
89
|
"@storm-software/config-tools": "^1.189.0",
|
|
90
|
-
"@stryke/cli": "^0.13.
|
|
91
|
-
"@stryke/convert": "^0.6.
|
|
92
|
-
"@stryke/fs": "^0.33.
|
|
93
|
-
"@stryke/path": "^0.26.
|
|
90
|
+
"@stryke/cli": "^0.13.12",
|
|
91
|
+
"@stryke/convert": "^0.6.38",
|
|
92
|
+
"@stryke/fs": "^0.33.40",
|
|
93
|
+
"@stryke/path": "^0.26.4",
|
|
94
94
|
"defu": "^6.1.4",
|
|
95
95
|
"nitro": "3.0.1-alpha.1",
|
|
96
|
-
"powerlines": "^0.38.
|
|
96
|
+
"powerlines": "^0.38.21"
|
|
97
97
|
},
|
|
98
98
|
"devDependencies": {
|
|
99
|
-
"@powerlines/plugin-plugin": "^0.12.
|
|
99
|
+
"@powerlines/plugin-plugin": "^0.12.205",
|
|
100
100
|
"@types/node": "^24.10.9"
|
|
101
101
|
},
|
|
102
102
|
"publishConfig": { "access": "public" },
|
|
103
103
|
"main": "./dist/index.cjs",
|
|
104
104
|
"module": "./dist/index.mjs",
|
|
105
105
|
"types": "./dist/index.d.cts",
|
|
106
|
-
"gitHead": "
|
|
106
|
+
"gitHead": "6000a15bf3fbc1b7eaaf967088c68eef9949786a"
|
|
107
107
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { };
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import { createDevServer } from "nitro/builder";
|
|
2
|
-
import { Nitro, NitroConfig } from "nitro/types";
|
|
3
|
-
import { NitroPluginConfig, ServiceConfig } from "nitro/vite";
|
|
4
|
-
import { UserConfig } from "powerlines/types/config";
|
|
5
|
-
import { PluginContext } from "powerlines/types/context";
|
|
6
|
-
import { ResolvedConfig } from "powerlines/types/resolved";
|
|
7
|
-
|
|
8
|
-
//#region src/types/plugin.d.ts
|
|
9
|
-
interface NitroPluginOptions extends Omit<NitroConfig, "root" | "compatibilityDate" | "logLevel" | "sourcemap" | "minify"> {
|
|
10
|
-
/**
|
|
11
|
-
* The path to a separate Nitro configuration file.
|
|
12
|
-
*/
|
|
13
|
-
configFile?: string;
|
|
14
|
-
}
|
|
15
|
-
interface NitroPluginUserConfig extends UserConfig {
|
|
16
|
-
/**
|
|
17
|
-
* Options for the Nitro plugin.
|
|
18
|
-
*/
|
|
19
|
-
nitro?: NitroPluginOptions;
|
|
20
|
-
}
|
|
21
|
-
interface NitroPluginResolvedConfig extends ResolvedConfig {
|
|
22
|
-
/**
|
|
23
|
-
* Options for the Nitro plugin.
|
|
24
|
-
*/
|
|
25
|
-
nitro: NitroConfig;
|
|
26
|
-
}
|
|
27
|
-
interface NitroContext {
|
|
28
|
-
nitro?: Nitro;
|
|
29
|
-
pluginConfig: NitroPluginConfig;
|
|
30
|
-
dev?: ReturnType<typeof createDevServer>;
|
|
31
|
-
services: Record<string, ServiceConfig>;
|
|
32
|
-
isRolldown?: boolean;
|
|
33
|
-
isInitialized?: boolean;
|
|
34
|
-
publicDistDir?: string;
|
|
35
|
-
}
|
|
36
|
-
type NitroPluginContext<TResolvedConfig extends NitroPluginResolvedConfig = NitroPluginResolvedConfig> = PluginContext<TResolvedConfig> & {
|
|
37
|
-
nitro: NitroContext;
|
|
38
|
-
};
|
|
39
|
-
declare type __ΩNitroPluginOptions = any[];
|
|
40
|
-
declare type __ΩNitroPluginUserConfig = any[];
|
|
41
|
-
declare type __ΩNitroPluginResolvedConfig = any[];
|
|
42
|
-
declare type __ΩNitroContext = any[];
|
|
43
|
-
declare type __ΩNitroPluginContext = any[];
|
|
44
|
-
//#endregion
|
|
45
|
-
export { NitroPluginUserConfig as a, __ΩNitroPluginOptions as c, NitroPluginResolvedConfig as i, __ΩNitroPluginResolvedConfig as l, NitroPluginContext as n, __ΩNitroContext as o, NitroPluginOptions as r, __ΩNitroPluginContext as s, NitroContext as t, __ΩNitroPluginUserConfig as u };
|
|
46
|
-
//# sourceMappingURL=plugin-BOAyUg-_.d.mts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"plugin-BOAyUg-_.d.mts","names":[],"sources":["../src/types/plugin.ts"],"sourcesContent":[],"mappings":";;;;;;;;UAyBiB,kBAAA,SAA2B,KAC1C;;AADF;AAUA;EAOiB,UAAA,CAAA,EAAA,MAAA;AAOjB;AACU,UAfO,qBAAA,SAA8B,UAerC,CAAA;EACM;;;EAEW,KAAA,CAAA,EAdjB,kBAciB;;AAAT,UAXD,yBAAA,SAAkC,cAWjC,CAAA;EAMN;;;EAEM,KAAA,EAfT,WAeS;;AACT,UAbQ,YAAA,CAaR;EAAY,KAAA,CAAA,EAZX,KAYW;gBAXL;QACR,kBAAkB;YACd,eAAe;;;;;KAMf,2CACc,4BAA4B,6BAClD,cAAc;SACT"}
|
package/dist/plugin-C3MaN5jp.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { };
|
package/dist/plugin-DHXHjv16.cjs
DELETED
|
File without changes
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import { createDevServer } from "nitro/builder";
|
|
2
|
-
import { Nitro, NitroConfig } from "nitro/types";
|
|
3
|
-
import { NitroPluginConfig, ServiceConfig } from "nitro/vite";
|
|
4
|
-
import { UserConfig } from "powerlines/types/config";
|
|
5
|
-
import { PluginContext } from "powerlines/types/context";
|
|
6
|
-
import { ResolvedConfig } from "powerlines/types/resolved";
|
|
7
|
-
|
|
8
|
-
//#region src/types/plugin.d.ts
|
|
9
|
-
interface NitroPluginOptions extends Omit<NitroConfig, "root" | "compatibilityDate" | "logLevel" | "sourcemap" | "minify"> {
|
|
10
|
-
/**
|
|
11
|
-
* The path to a separate Nitro configuration file.
|
|
12
|
-
*/
|
|
13
|
-
configFile?: string;
|
|
14
|
-
}
|
|
15
|
-
interface NitroPluginUserConfig extends UserConfig {
|
|
16
|
-
/**
|
|
17
|
-
* Options for the Nitro plugin.
|
|
18
|
-
*/
|
|
19
|
-
nitro?: NitroPluginOptions;
|
|
20
|
-
}
|
|
21
|
-
interface NitroPluginResolvedConfig extends ResolvedConfig {
|
|
22
|
-
/**
|
|
23
|
-
* Options for the Nitro plugin.
|
|
24
|
-
*/
|
|
25
|
-
nitro: NitroConfig;
|
|
26
|
-
}
|
|
27
|
-
interface NitroContext {
|
|
28
|
-
nitro?: Nitro;
|
|
29
|
-
pluginConfig: NitroPluginConfig;
|
|
30
|
-
dev?: ReturnType<typeof createDevServer>;
|
|
31
|
-
services: Record<string, ServiceConfig>;
|
|
32
|
-
isRolldown?: boolean;
|
|
33
|
-
isInitialized?: boolean;
|
|
34
|
-
publicDistDir?: string;
|
|
35
|
-
}
|
|
36
|
-
type NitroPluginContext<TResolvedConfig extends NitroPluginResolvedConfig = NitroPluginResolvedConfig> = PluginContext<TResolvedConfig> & {
|
|
37
|
-
nitro: NitroContext;
|
|
38
|
-
};
|
|
39
|
-
declare type __ΩNitroPluginOptions = any[];
|
|
40
|
-
declare type __ΩNitroPluginUserConfig = any[];
|
|
41
|
-
declare type __ΩNitroPluginResolvedConfig = any[];
|
|
42
|
-
declare type __ΩNitroContext = any[];
|
|
43
|
-
declare type __ΩNitroPluginContext = any[];
|
|
44
|
-
//#endregion
|
|
45
|
-
export { NitroPluginUserConfig as a, __ΩNitroPluginOptions as c, NitroPluginResolvedConfig as i, __ΩNitroPluginResolvedConfig as l, NitroPluginContext as n, __ΩNitroContext as o, NitroPluginOptions as r, __ΩNitroPluginContext as s, NitroContext as t, __ΩNitroPluginUserConfig as u };
|
|
46
|
-
//# sourceMappingURL=plugin-DpbzWQcL.d.cts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"plugin-DpbzWQcL.d.cts","names":[],"sources":["../src/types/plugin.ts"],"sourcesContent":[],"mappings":";;;;;;;;UAyBiB,kBAAA,SAA2B,KAC1C;;AADF;AAUA;EAOiB,UAAA,CAAA,EAAA,MAAA;AAOjB;AACU,UAfO,qBAAA,SAA8B,UAerC,CAAA;EACM;;;EAEW,KAAA,CAAA,EAdjB,kBAciB;;AAAT,UAXD,yBAAA,SAAkC,cAWjC,CAAA;EAMN;;;EAEM,KAAA,EAfT,WAeS;;AACT,UAbQ,YAAA,CAaR;EAAY,KAAA,CAAA,EAZX,KAYW;gBAXL;QACR,kBAAkB;YACd,eAAe;;;;;KAMf,2CACc,4BAA4B,6BAClD,cAAc;SACT"}
|
package/dist/types-CTUnla4x.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { };
|
package/dist/types-DHkg7xmX.cjs
DELETED
|
File without changes
|