vitend 0.2.0 → 0.2.1
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/functions/entry.js +3 -3
- package/dist/functions/options.js +1 -1
- package/dist/functions/package-json.js +3 -3
- package/dist/index.js +1 -0
- package/dist/node.js +2 -1
- package/dist/runtime.js +2 -1
- package/dist/vite/build.js +1 -1
- package/dist/vite/dev.js +1 -1
- package/dist/vite/vitend.js +3 -3
- package/dist/vite/vitend.js.map +1 -1
- package/dist/vite/vitend.mjs.map +1 -1
- package/dist/vite.js +1 -0
- package/package.json +2 -2
- /package/dist/_virtual/{rolldown_runtime.js → _rolldown/runtime.js} +0 -0
package/dist/functions/entry.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
const
|
|
1
|
+
const require_runtime = require('../_virtual/_rolldown/runtime.js');
|
|
2
2
|
let node_path = require("node:path");
|
|
3
|
-
node_path =
|
|
3
|
+
node_path = require_runtime.__toESM(node_path);
|
|
4
4
|
let node_fs = require("node:fs");
|
|
5
|
-
node_fs =
|
|
5
|
+
node_fs = require_runtime.__toESM(node_fs);
|
|
6
6
|
|
|
7
7
|
const ENTRY_DEFAULT = ["./src/index.ts", "./src/index.js"];
|
|
8
8
|
const getEntry = (cwd, entry) => {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
const
|
|
1
|
+
const require_runtime = require('../_virtual/_rolldown/runtime.js');
|
|
2
2
|
let node_path = require("node:path");
|
|
3
|
-
node_path =
|
|
3
|
+
node_path = require_runtime.__toESM(node_path);
|
|
4
4
|
let node_fs = require("node:fs");
|
|
5
|
-
node_fs =
|
|
5
|
+
node_fs = require_runtime.__toESM(node_fs);
|
|
6
6
|
|
|
7
7
|
const getPackageJson = (cwd) => {
|
|
8
8
|
const path = node_path.resolve(cwd, "package.json");
|
package/dist/index.js
CHANGED
package/dist/node.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
+
const require_runtime = require('./_virtual/_rolldown/runtime.js');
|
|
2
3
|
let srvx_node = require("srvx/node");
|
|
3
4
|
|
|
4
5
|
Object.defineProperty(exports, 'toFetchHandler', {
|
package/dist/runtime.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
+
const require_runtime = require('./_virtual/_rolldown/runtime.js');
|
|
2
3
|
let srvx = require("srvx");
|
|
3
4
|
|
|
4
5
|
Object.defineProperty(exports, 'serve', {
|
package/dist/vite/build.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const
|
|
1
|
+
const require_runtime = require('../_virtual/_rolldown/runtime.js');
|
|
2
2
|
const require_package_json = require('../functions/package-json.js');
|
|
3
3
|
let es_toolkit = require("es-toolkit");
|
|
4
4
|
let node_module = require("node:module");
|
package/dist/vite/dev.js
CHANGED
package/dist/vite/vitend.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
const
|
|
1
|
+
const require_runtime = require('../_virtual/_rolldown/runtime.js');
|
|
2
2
|
const require_options = require('../functions/options.js');
|
|
3
3
|
const require_build = require('./build.js');
|
|
4
4
|
const require_dev = require('./dev.js');
|
|
5
5
|
let node_path = require("node:path");
|
|
6
|
-
node_path =
|
|
6
|
+
node_path = require_runtime.__toESM(node_path);
|
|
7
7
|
let rollup_plugin_copy = require("rollup-plugin-copy");
|
|
8
|
-
rollup_plugin_copy =
|
|
8
|
+
rollup_plugin_copy = require_runtime.__toESM(rollup_plugin_copy);
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
* The `vitend` plugin.
|
package/dist/vite/vitend.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vitend.js","names":["createOptions","devPlugin","buildPlugin","Path"],"sources":["../../src/vite/vitend.ts"],"sourcesContent":["import type { Plugin } from \"vite\";\n\nimport type { VitendOptions } from \"#/@types/options/default\";\nimport type {\n ResolvedBuildOptions,\n ResolvedVitendOptions,\n} from \"#/@types/options/resolved\";\n\nimport * as Path from \"node:path\";\n\nimport copy from \"rollup-plugin-copy\";\n\nimport { createOptions } from \"#/functions/options\";\nimport { buildPlugin } from \"#/vite/build\";\nimport { devPlugin } from \"#/vite/dev\";\n\n/**\n * The `vitend` plugin.\n *\n * ### Example\n *\n * ```ts\n * // ./vite.config.ts\n *\n * import { defineConfig } from \"vite\";\n * import { vitend } from \"vitend/vite\";\n *\n * export default defineConfig({\n * plugins: [\n * vitend(),\n * ],\n * });\n * ```\n */\nconst vitend = (options?: VitendOptions): Plugin[] => {\n const opts: ResolvedVitendOptions = createOptions(options);\n\n const build: ResolvedBuildOptions = opts.build;\n\n return [\n devPlugin({\n ...opts,\n }),\n buildPlugin({\n ...opts,\n }),\n ...(build.target === \"default\" && build.copyPublicDir\n ? [\n copy({\n hook: \"closeBundle\",\n targets: [\n {\n src: Path.resolve(build.publicDir, \"**\", \"*\"),\n dest: Path.resolve(\n build.outputDir,\n build.publicDir,\n ),\n },\n ],\n }),\n ]\n : []),\n ];\n};\n\nexport { vitend };\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAkCA,MAAM,UAAU,YAAsC;CAClD,MAAM,OAA8BA,8BAAc,QAAQ;CAE1D,MAAM,QAA8B,KAAK;AAEzC,QAAO;EACHC,sBAAU,EACN,GAAG,MACN,CAAC;EACFC,0BAAY,EACR,GAAG,MACN,CAAC;EACF,GAAI,MAAM,WAAW,aAAa,MAAM,
|
|
1
|
+
{"version":3,"file":"vitend.js","names":["createOptions","devPlugin","buildPlugin","Path"],"sources":["../../src/vite/vitend.ts"],"sourcesContent":["import type { Plugin } from \"vite\";\n\nimport type { VitendOptions } from \"#/@types/options/default\";\nimport type {\n ResolvedBuildOptions,\n ResolvedVitendOptions,\n} from \"#/@types/options/resolved\";\n\nimport * as Path from \"node:path\";\n\nimport copy from \"rollup-plugin-copy\";\n\nimport { createOptions } from \"#/functions/options\";\nimport { buildPlugin } from \"#/vite/build\";\nimport { devPlugin } from \"#/vite/dev\";\n\n/**\n * The `vitend` plugin.\n *\n * ### Example\n *\n * ```ts\n * // ./vite.config.ts\n *\n * import { defineConfig } from \"vite\";\n * import { vitend } from \"vitend/vite\";\n *\n * export default defineConfig({\n * plugins: [\n * vitend(),\n * ],\n * });\n * ```\n */\nconst vitend = (options?: VitendOptions): Plugin[] => {\n const opts: ResolvedVitendOptions = createOptions(options);\n\n const build: ResolvedBuildOptions = opts.build;\n\n return [\n devPlugin({\n ...opts,\n }),\n buildPlugin({\n ...opts,\n }),\n ...(build.target === \"default\" && build.copyPublicDir\n ? ([\n copy({\n hook: \"closeBundle\",\n targets: [\n {\n src: Path.resolve(build.publicDir, \"**\", \"*\"),\n dest: Path.resolve(\n build.outputDir,\n build.publicDir,\n ),\n },\n ],\n }),\n ] as Plugin[])\n : []),\n ];\n};\n\nexport { vitend };\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAkCA,MAAM,UAAU,YAAsC;CAClD,MAAM,OAA8BA,8BAAc,QAAQ;CAE1D,MAAM,QAA8B,KAAK;AAEzC,QAAO;EACHC,sBAAU,EACN,GAAG,MACN,CAAC;EACFC,0BAAY,EACR,GAAG,MACN,CAAC;EACF,GAAI,MAAM,WAAW,aAAa,MAAM,gBACjC,iCACQ;GACD,MAAM;GACN,SAAS,CACL;IACI,KAAKC,UAAK,QAAQ,MAAM,WAAW,MAAM,IAAI;IAC7C,MAAMA,UAAK,QACP,MAAM,WACN,MAAM,UACT;IACJ,CACJ;GACJ,CAAC,CACL,GACD,EAAE;EACX"}
|
package/dist/vite/vitend.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vitend.mjs","names":[],"sources":["../../src/vite/vitend.ts"],"sourcesContent":["import type { Plugin } from \"vite\";\n\nimport type { VitendOptions } from \"#/@types/options/default\";\nimport type {\n ResolvedBuildOptions,\n ResolvedVitendOptions,\n} from \"#/@types/options/resolved\";\n\nimport * as Path from \"node:path\";\n\nimport copy from \"rollup-plugin-copy\";\n\nimport { createOptions } from \"#/functions/options\";\nimport { buildPlugin } from \"#/vite/build\";\nimport { devPlugin } from \"#/vite/dev\";\n\n/**\n * The `vitend` plugin.\n *\n * ### Example\n *\n * ```ts\n * // ./vite.config.ts\n *\n * import { defineConfig } from \"vite\";\n * import { vitend } from \"vitend/vite\";\n *\n * export default defineConfig({\n * plugins: [\n * vitend(),\n * ],\n * });\n * ```\n */\nconst vitend = (options?: VitendOptions): Plugin[] => {\n const opts: ResolvedVitendOptions = createOptions(options);\n\n const build: ResolvedBuildOptions = opts.build;\n\n return [\n devPlugin({\n ...opts,\n }),\n buildPlugin({\n ...opts,\n }),\n ...(build.target === \"default\" && build.copyPublicDir\n ? [\n copy({\n hook: \"closeBundle\",\n targets: [\n {\n src: Path.resolve(build.publicDir, \"**\", \"*\"),\n dest: Path.resolve(\n build.outputDir,\n build.publicDir,\n ),\n },\n ],\n }),\n ]\n : []),\n ];\n};\n\nexport { vitend };\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAkCA,MAAM,UAAU,YAAsC;CAClD,MAAM,OAA8B,cAAc,QAAQ;CAE1D,MAAM,QAA8B,KAAK;AAEzC,QAAO;EACH,UAAU,EACN,GAAG,MACN,CAAC;EACF,YAAY,EACR,GAAG,MACN,CAAC;EACF,GAAI,MAAM,WAAW,aAAa,MAAM,
|
|
1
|
+
{"version":3,"file":"vitend.mjs","names":[],"sources":["../../src/vite/vitend.ts"],"sourcesContent":["import type { Plugin } from \"vite\";\n\nimport type { VitendOptions } from \"#/@types/options/default\";\nimport type {\n ResolvedBuildOptions,\n ResolvedVitendOptions,\n} from \"#/@types/options/resolved\";\n\nimport * as Path from \"node:path\";\n\nimport copy from \"rollup-plugin-copy\";\n\nimport { createOptions } from \"#/functions/options\";\nimport { buildPlugin } from \"#/vite/build\";\nimport { devPlugin } from \"#/vite/dev\";\n\n/**\n * The `vitend` plugin.\n *\n * ### Example\n *\n * ```ts\n * // ./vite.config.ts\n *\n * import { defineConfig } from \"vite\";\n * import { vitend } from \"vitend/vite\";\n *\n * export default defineConfig({\n * plugins: [\n * vitend(),\n * ],\n * });\n * ```\n */\nconst vitend = (options?: VitendOptions): Plugin[] => {\n const opts: ResolvedVitendOptions = createOptions(options);\n\n const build: ResolvedBuildOptions = opts.build;\n\n return [\n devPlugin({\n ...opts,\n }),\n buildPlugin({\n ...opts,\n }),\n ...(build.target === \"default\" && build.copyPublicDir\n ? ([\n copy({\n hook: \"closeBundle\",\n targets: [\n {\n src: Path.resolve(build.publicDir, \"**\", \"*\"),\n dest: Path.resolve(\n build.outputDir,\n build.publicDir,\n ),\n },\n ],\n }),\n ] as Plugin[])\n : []),\n ];\n};\n\nexport { vitend };\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAkCA,MAAM,UAAU,YAAsC;CAClD,MAAM,OAA8B,cAAc,QAAQ;CAE1D,MAAM,QAA8B,KAAK;AAEzC,QAAO;EACH,UAAU,EACN,GAAG,MACN,CAAC;EACF,YAAY,EACR,GAAG,MACN,CAAC;EACF,GAAI,MAAM,WAAW,aAAa,MAAM,gBACjC,CACG,KAAK;GACD,MAAM;GACN,SAAS,CACL;IACI,KAAK,KAAK,QAAQ,MAAM,WAAW,MAAM,IAAI;IAC7C,MAAM,KAAK,QACP,MAAM,WACN,MAAM,UACT;IACJ,CACJ;GACJ,CAAC,CACL,GACD,EAAE;EACX"}
|
package/dist/vite.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vitend",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"description": "A library for backend development with Vite",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"vitend",
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
"dependencies": {
|
|
58
58
|
"es-toolkit": "^1.40.0",
|
|
59
59
|
"rollup-plugin-copy": "^3.5.0",
|
|
60
|
-
"srvx": "~0.
|
|
60
|
+
"srvx": "~0.11.0",
|
|
61
61
|
"ts-vista": "~0.2.3"
|
|
62
62
|
},
|
|
63
63
|
"devDependencies": {
|
|
File without changes
|