@deot/dev-dever 2.9.9 → 2.9.10
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/index.cjs +132 -138
- package/dist/index.js +103 -114
- package/package.json +7 -7
package/dist/index.cjs
CHANGED
|
@@ -1,144 +1,138 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
var _documentCurrentScript = typeof document !== 'undefined' ? document.currentScript : null;
|
|
17
|
-
function _interopNamespaceDefault(e) {
|
|
18
|
-
const n = Object.create(null, { [Symbol.toStringTag]: { value: 'Module' } });
|
|
19
|
-
if (e) {
|
|
20
|
-
for (const k in e) {
|
|
21
|
-
if (k !== 'default') {
|
|
22
|
-
const d = Object.getOwnPropertyDescriptor(e, k);
|
|
23
|
-
Object.defineProperty(n, k, d.get ? d : {
|
|
24
|
-
enumerable: true,
|
|
25
|
-
get: () => e[k]
|
|
26
|
-
});
|
|
27
|
-
}
|
|
28
|
-
}
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
//#region \0rolldown/runtime.js
|
|
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") 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) __defProp(to, key, {
|
|
13
|
+
get: ((k) => from[k]).bind(null, key),
|
|
14
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
15
|
+
});
|
|
29
16
|
}
|
|
30
|
-
|
|
31
|
-
return Object.freeze(n);
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
const path__namespace = /*#__PURE__*/_interopNamespaceDefault(path);
|
|
35
|
-
const fs__namespace = /*#__PURE__*/_interopNamespaceDefault(fs);
|
|
36
|
-
|
|
37
|
-
const dirname$1 = path__namespace.dirname(node_url.fileURLToPath((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('index.cjs', document.baseURI).href))));
|
|
38
|
-
const target = {
|
|
39
|
-
entries: [],
|
|
40
|
-
html: ""
|
|
17
|
+
return to;
|
|
41
18
|
};
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
20
|
+
value: mod,
|
|
21
|
+
enumerable: true
|
|
22
|
+
}) : target, mod));
|
|
23
|
+
//#endregion
|
|
24
|
+
let node_path = require("node:path");
|
|
25
|
+
node_path = __toESM(node_path);
|
|
26
|
+
let node_url = require("node:url");
|
|
27
|
+
let _deot_dev_shared = require("@deot/dev-shared");
|
|
28
|
+
let fs_extra = require("fs-extra");
|
|
29
|
+
fs_extra = __toESM(fs_extra);
|
|
30
|
+
let vite = require("vite");
|
|
31
|
+
let chalk = require("chalk");
|
|
32
|
+
chalk = __toESM(chalk);
|
|
33
|
+
let _deot_dev_vue = require("@deot/dev-vue");
|
|
34
|
+
_deot_dev_vue = __toESM(_deot_dev_vue);
|
|
35
|
+
let _deot_dev_react = require("@deot/dev-react");
|
|
36
|
+
_deot_dev_react = __toESM(_deot_dev_react);
|
|
37
|
+
let node_fs = require("node:fs");
|
|
38
|
+
node_fs = __toESM(node_fs);
|
|
39
|
+
let ejs = require("ejs");
|
|
40
|
+
ejs = __toESM(ejs);
|
|
41
|
+
//#region packages/dever/src/entries.ts
|
|
42
|
+
var dirname$1 = node_path.dirname((0, node_url.fileURLToPath)({}.url));
|
|
43
|
+
var target = {
|
|
44
|
+
entries: [],
|
|
45
|
+
html: ""
|
|
64
46
|
};
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
47
|
+
var excludes = [
|
|
48
|
+
"tpl",
|
|
49
|
+
"_",
|
|
50
|
+
"dist",
|
|
51
|
+
"node_modules",
|
|
52
|
+
"__tests__"
|
|
53
|
+
];
|
|
54
|
+
var walk = (dir, playDir) => {
|
|
55
|
+
const { cwd, workspace } = _deot_dev_shared.Locals.impl();
|
|
56
|
+
const directory = node_path.join(cwd, workspace, dir);
|
|
57
|
+
node_fs.readdirSync(directory).forEach((file) => {
|
|
58
|
+
const fullpath = node_path.join(directory, file);
|
|
59
|
+
const paths = fullpath.split("/") || [];
|
|
60
|
+
const stat = node_fs.statSync(fullpath);
|
|
61
|
+
const extname = node_path.extname(fullpath);
|
|
62
|
+
if (stat.isFile() && /\.((t|j)sx?|vue|html)$/.test(extname) && paths.length >= 2 && playDir.includes(paths[paths.length - 2])) {
|
|
63
|
+
const basename = node_path.basename(file, extname);
|
|
64
|
+
const name = node_path.join(dir, basename).split("/");
|
|
65
|
+
playDir.length === 1 && name.splice(name.length - 2, 1);
|
|
66
|
+
const name$ = name.join("/");
|
|
67
|
+
if (!target.entries.includes(name$)) target.entries.push(name$);
|
|
68
|
+
} else if (stat.isDirectory() && !excludes.includes(file)) walk(node_path.join(dir, file), playDir);
|
|
69
|
+
});
|
|
75
70
|
};
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
server.bindCLIShortcuts({ print: true });
|
|
71
|
+
var get = (playDir) => {
|
|
72
|
+
if (target.html) return target;
|
|
73
|
+
walk(".", playDir.split(","));
|
|
74
|
+
const tpl = node_fs.readFileSync(node_path.resolve(dirname$1, "../index.ejs"));
|
|
75
|
+
target.html = ejs.default.render(tpl.toString(), {
|
|
76
|
+
title: "demo",
|
|
77
|
+
base: "/",
|
|
78
|
+
pages: target.entries
|
|
79
|
+
});
|
|
80
|
+
return target;
|
|
81
|
+
};
|
|
82
|
+
//#endregion
|
|
83
|
+
//#region packages/dever/src/index.ts
|
|
84
|
+
var dirname = node_path.dirname((0, node_url.fileURLToPath)({}.url));
|
|
85
|
+
var run = (options) => _deot_dev_shared.Utils.autoCatch(async () => {
|
|
86
|
+
const locals = _deot_dev_shared.Locals.impl();
|
|
87
|
+
options.packageName = _deot_dev_shared.Locals.getRealPackageName(options.packageName);
|
|
88
|
+
options.vuePackage = _deot_dev_shared.Locals.getRealPackageName(options.vuePackage);
|
|
89
|
+
options.reactPackage = _deot_dev_shared.Locals.getRealPackageName(options.reactPackage);
|
|
90
|
+
if (typeof options.dryRun === "undefined") options.dryRun = process.env.NODE_ENV === "UNIT";
|
|
91
|
+
if (options.dryRun) return _deot_dev_shared.Shell.spawn(`echo development`);
|
|
92
|
+
const { cwd, workspace, packageOptionsMap, packageDirsMap, subpackagesMap } = locals;
|
|
93
|
+
const packageFolderName = _deot_dev_shared.Locals.getPackageFolderName(options.packageName);
|
|
94
|
+
const packageOptions = packageOptionsMap[packageFolderName];
|
|
95
|
+
const packageDir = packageDirsMap[packageFolderName];
|
|
96
|
+
options.watch = true;
|
|
97
|
+
if (workspace && cwd !== packageDir && packageOptions?.scripts?.["dev"]) {
|
|
98
|
+
await _deot_dev_shared.Shell.spawn(`npm`, ["run", "dev"], { cwd: packageDir });
|
|
99
|
+
return;
|
|
100
|
+
}
|
|
101
|
+
if (!options.packageFolderName) delete options.packageFolderName;
|
|
102
|
+
if (!options.workspace) delete options.workspace;
|
|
103
|
+
delete options.packageName;
|
|
104
|
+
const { entries, html } = get(options.playDir);
|
|
105
|
+
if (!entries.length) return _deot_dev_shared.Shell.spawn(`echo no entry file found!`);
|
|
106
|
+
let options$ = { server: { host: true } };
|
|
107
|
+
const devOptions = {
|
|
108
|
+
...options,
|
|
109
|
+
workspace,
|
|
110
|
+
entries,
|
|
111
|
+
html,
|
|
112
|
+
subpackagesMap,
|
|
113
|
+
useVue: false,
|
|
114
|
+
useReact: false
|
|
115
|
+
};
|
|
116
|
+
const { vuePackage: isVuePackage, reactPackage: isReactPackage } = options;
|
|
117
|
+
devOptions.useVue = !!isVuePackage;
|
|
118
|
+
devOptions.useReact = !!isReactPackage;
|
|
119
|
+
if (fs_extra.default.existsSync(`${cwd}/z.dev.config.ts`)) options$.configFile = node_path.relative(cwd, node_path.resolve(cwd, "./z.dev.config.ts"));
|
|
120
|
+
else if (fs_extra.default.existsSync(`${cwd}/dev.config.ts`)) options$.configFile = node_path.relative(cwd, node_path.resolve(cwd, "./dev.config.ts"));
|
|
121
|
+
else {
|
|
122
|
+
process.env.USE_VUE = isVuePackage ? "1" : "";
|
|
123
|
+
process.env.USE_REACT = isReactPackage ? "1" : "";
|
|
124
|
+
options$.configFile = node_path.relative(cwd, node_path.resolve(dirname, "../shared.config.ts"));
|
|
125
|
+
if (isVuePackage) options$ = (0, vite.mergeConfig)(_deot_dev_vue.default, options$);
|
|
126
|
+
if (isReactPackage) options$ = (0, vite.mergeConfig)(_deot_dev_react.default, options$);
|
|
127
|
+
}
|
|
128
|
+
process.env.DEV_OPTIONS = encodeURIComponent(JSON.stringify(devOptions));
|
|
129
|
+
const server = await (0, vite.createServer)(options$);
|
|
130
|
+
await server.listen();
|
|
131
|
+
const { local = [], network = [] } = server.resolvedUrls || {};
|
|
132
|
+
const url = network[0] || local[0] || `http://localhost:${server.config.server.port}`;
|
|
133
|
+
entries.forEach((item) => _deot_dev_shared.Logger.log(` > ${item}: ${chalk.default.cyan(`${url}${item}.html`)}`));
|
|
134
|
+
server.printUrls();
|
|
135
|
+
server.bindCLIShortcuts({ print: true });
|
|
142
136
|
});
|
|
143
|
-
|
|
137
|
+
//#endregion
|
|
144
138
|
exports.run = run;
|
package/dist/index.js
CHANGED
|
@@ -1,119 +1,108 @@
|
|
|
1
|
-
import * as path from
|
|
2
|
-
import { fileURLToPath } from
|
|
3
|
-
import { Locals,
|
|
4
|
-
import fs
|
|
5
|
-
import {
|
|
6
|
-
import chalk from
|
|
7
|
-
import sharedVueConfig from
|
|
8
|
-
import sharedReactConfig from
|
|
9
|
-
import * as fs from
|
|
10
|
-
import
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
1
|
+
import * as path from "node:path";
|
|
2
|
+
import { fileURLToPath } from "node:url";
|
|
3
|
+
import { Locals, Logger, Shell, Utils } from "@deot/dev-shared";
|
|
4
|
+
import fs from "fs-extra";
|
|
5
|
+
import { createServer, mergeConfig } from "vite";
|
|
6
|
+
import chalk from "chalk";
|
|
7
|
+
import sharedVueConfig from "@deot/dev-vue";
|
|
8
|
+
import sharedReactConfig from "@deot/dev-react";
|
|
9
|
+
import * as fs$1 from "node:fs";
|
|
10
|
+
import ejs from "ejs";
|
|
11
|
+
//#region packages/dever/src/entries.ts
|
|
12
|
+
var dirname$1 = path.dirname(fileURLToPath(import.meta.url));
|
|
13
|
+
var target = {
|
|
14
|
+
entries: [],
|
|
15
|
+
html: ""
|
|
16
16
|
};
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
17
|
+
var excludes = [
|
|
18
|
+
"tpl",
|
|
19
|
+
"_",
|
|
20
|
+
"dist",
|
|
21
|
+
"node_modules",
|
|
22
|
+
"__tests__"
|
|
23
|
+
];
|
|
24
|
+
var walk = (dir, playDir) => {
|
|
25
|
+
const { cwd, workspace } = Locals.impl();
|
|
26
|
+
const directory = path.join(cwd, workspace, dir);
|
|
27
|
+
fs$1.readdirSync(directory).forEach((file) => {
|
|
28
|
+
const fullpath = path.join(directory, file);
|
|
29
|
+
const paths = fullpath.split("/") || [];
|
|
30
|
+
const stat = fs$1.statSync(fullpath);
|
|
31
|
+
const extname = path.extname(fullpath);
|
|
32
|
+
if (stat.isFile() && /\.((t|j)sx?|vue|html)$/.test(extname) && paths.length >= 2 && playDir.includes(paths[paths.length - 2])) {
|
|
33
|
+
const basename = path.basename(file, extname);
|
|
34
|
+
const name = path.join(dir, basename).split("/");
|
|
35
|
+
playDir.length === 1 && name.splice(name.length - 2, 1);
|
|
36
|
+
const name$ = name.join("/");
|
|
37
|
+
if (!target.entries.includes(name$)) target.entries.push(name$);
|
|
38
|
+
} else if (stat.isDirectory() && !excludes.includes(file)) walk(path.join(dir, file), playDir);
|
|
39
|
+
});
|
|
39
40
|
};
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
41
|
+
var get = (playDir) => {
|
|
42
|
+
if (target.html) return target;
|
|
43
|
+
walk(".", playDir.split(","));
|
|
44
|
+
const tpl = fs$1.readFileSync(path.resolve(dirname$1, "../index.ejs"));
|
|
45
|
+
target.html = ejs.render(tpl.toString(), {
|
|
46
|
+
title: "demo",
|
|
47
|
+
base: "/",
|
|
48
|
+
pages: target.entries
|
|
49
|
+
});
|
|
50
|
+
return target;
|
|
50
51
|
};
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
if (isReactPackage) {
|
|
106
|
-
options$ = mergeConfig(sharedReactConfig, options$);
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
process.env.DEV_OPTIONS = encodeURIComponent(JSON.stringify(devOptions));
|
|
110
|
-
const server = await createServer(options$);
|
|
111
|
-
await server.listen();
|
|
112
|
-
const { local = [], network = [] } = server.resolvedUrls || {};
|
|
113
|
-
const url = network[0] || local[0] || `http://localhost:${server.config.server.port}`;
|
|
114
|
-
entries.forEach((item) => Logger.log(` > ${item}: ${chalk.cyan(`${url}${item}.html`)}`));
|
|
115
|
-
server.printUrls();
|
|
116
|
-
server.bindCLIShortcuts({ print: true });
|
|
52
|
+
//#endregion
|
|
53
|
+
//#region packages/dever/src/index.ts
|
|
54
|
+
var dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
55
|
+
var run = (options) => Utils.autoCatch(async () => {
|
|
56
|
+
const locals = Locals.impl();
|
|
57
|
+
options.packageName = Locals.getRealPackageName(options.packageName);
|
|
58
|
+
options.vuePackage = Locals.getRealPackageName(options.vuePackage);
|
|
59
|
+
options.reactPackage = Locals.getRealPackageName(options.reactPackage);
|
|
60
|
+
if (typeof options.dryRun === "undefined") options.dryRun = process.env.NODE_ENV === "UNIT";
|
|
61
|
+
if (options.dryRun) return Shell.spawn(`echo development`);
|
|
62
|
+
const { cwd, workspace, packageOptionsMap, packageDirsMap, subpackagesMap } = locals;
|
|
63
|
+
const packageFolderName = Locals.getPackageFolderName(options.packageName);
|
|
64
|
+
const packageOptions = packageOptionsMap[packageFolderName];
|
|
65
|
+
const packageDir = packageDirsMap[packageFolderName];
|
|
66
|
+
options.watch = true;
|
|
67
|
+
if (workspace && cwd !== packageDir && packageOptions?.scripts?.["dev"]) {
|
|
68
|
+
await Shell.spawn(`npm`, ["run", "dev"], { cwd: packageDir });
|
|
69
|
+
return;
|
|
70
|
+
}
|
|
71
|
+
if (!options.packageFolderName) delete options.packageFolderName;
|
|
72
|
+
if (!options.workspace) delete options.workspace;
|
|
73
|
+
delete options.packageName;
|
|
74
|
+
const { entries, html } = get(options.playDir);
|
|
75
|
+
if (!entries.length) return Shell.spawn(`echo no entry file found!`);
|
|
76
|
+
let options$ = { server: { host: true } };
|
|
77
|
+
const devOptions = {
|
|
78
|
+
...options,
|
|
79
|
+
workspace,
|
|
80
|
+
entries,
|
|
81
|
+
html,
|
|
82
|
+
subpackagesMap,
|
|
83
|
+
useVue: false,
|
|
84
|
+
useReact: false
|
|
85
|
+
};
|
|
86
|
+
const { vuePackage: isVuePackage, reactPackage: isReactPackage } = options;
|
|
87
|
+
devOptions.useVue = !!isVuePackage;
|
|
88
|
+
devOptions.useReact = !!isReactPackage;
|
|
89
|
+
if (fs.existsSync(`${cwd}/z.dev.config.ts`)) options$.configFile = path.relative(cwd, path.resolve(cwd, "./z.dev.config.ts"));
|
|
90
|
+
else if (fs.existsSync(`${cwd}/dev.config.ts`)) options$.configFile = path.relative(cwd, path.resolve(cwd, "./dev.config.ts"));
|
|
91
|
+
else {
|
|
92
|
+
process.env.USE_VUE = isVuePackage ? "1" : "";
|
|
93
|
+
process.env.USE_REACT = isReactPackage ? "1" : "";
|
|
94
|
+
options$.configFile = path.relative(cwd, path.resolve(dirname, "../shared.config.ts"));
|
|
95
|
+
if (isVuePackage) options$ = mergeConfig(sharedVueConfig, options$);
|
|
96
|
+
if (isReactPackage) options$ = mergeConfig(sharedReactConfig, options$);
|
|
97
|
+
}
|
|
98
|
+
process.env.DEV_OPTIONS = encodeURIComponent(JSON.stringify(devOptions));
|
|
99
|
+
const server = await createServer(options$);
|
|
100
|
+
await server.listen();
|
|
101
|
+
const { local = [], network = [] } = server.resolvedUrls || {};
|
|
102
|
+
const url = network[0] || local[0] || `http://localhost:${server.config.server.port}`;
|
|
103
|
+
entries.forEach((item) => Logger.log(` > ${item}: ${chalk.cyan(`${url}${item}.html`)}`));
|
|
104
|
+
server.printUrls();
|
|
105
|
+
server.bindCLIShortcuts({ print: true });
|
|
117
106
|
});
|
|
118
|
-
|
|
107
|
+
//#endregion
|
|
119
108
|
export { run };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@deot/dev-dever",
|
|
3
|
-
"version": "2.9.
|
|
3
|
+
"version": "2.9.10",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -21,14 +21,14 @@
|
|
|
21
21
|
"access": "public"
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@deot/dev-react": "^2.9.
|
|
25
|
-
"@deot/dev-shared": "^2.9.
|
|
26
|
-
"@deot/dev-vue": "^2.9.
|
|
27
|
-
"ejs": "^
|
|
28
|
-
"vite": "^
|
|
24
|
+
"@deot/dev-react": "^2.9.10",
|
|
25
|
+
"@deot/dev-shared": "^2.9.10",
|
|
26
|
+
"@deot/dev-vue": "^2.9.10",
|
|
27
|
+
"ejs": "^5.0.1",
|
|
28
|
+
"vite": "^8.0.5"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
|
-
"@deot/dev-test": "^2.9.
|
|
31
|
+
"@deot/dev-test": "^2.9.10",
|
|
32
32
|
"cross-env": "^10.1.0"
|
|
33
33
|
}
|
|
34
34
|
}
|