@michijs/dev-server 0.7.23 → 0.7.24
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/bin/{src/actions → actions}/generateAssets.js +2 -2
- package/bin/{src/cli.js → cli.js} +2 -4
- package/bin/utils/packageJson.d.ts +1 -0
- package/bin/utils/packageJson.js +5 -0
- package/package.json +1 -1
- package/bin/package.json +0 -65
- /package/bin/{src/actions → actions}/build.d.ts +0 -0
- /package/bin/{src/actions → actions}/build.js +0 -0
- /package/bin/{src/actions → actions}/dist.d.ts +0 -0
- /package/bin/{src/actions → actions}/dist.js +0 -0
- /package/bin/{src/actions → actions}/generateAssets.d.ts +0 -0
- /package/bin/{src/actions → actions}/minifyAsset.d.ts +0 -0
- /package/bin/{src/actions → actions}/minifyAsset.js +0 -0
- /package/bin/{src/actions → actions}/start/transformers.d.ts +0 -0
- /package/bin/{src/actions → actions}/start/transformers.js +0 -0
- /package/bin/{src/actions → actions}/start.d.ts +0 -0
- /package/bin/{src/actions → actions}/start.js +0 -0
- /package/bin/{src/actions → actions}/testTsc.d.ts +0 -0
- /package/bin/{src/actions → actions}/testTsc.js +0 -0
- /package/bin/{src/classes → classes}/Timer.d.ts +0 -0
- /package/bin/{src/classes → classes}/Timer.js +0 -0
- /package/bin/{src/cli.d.ts → cli.d.ts} +0 -0
- /package/bin/{src/config → config}/config.d.ts +0 -0
- /package/bin/{src/config → config}/config.js +0 -0
- /package/bin/{src/config → config}/getIPAddress.d.ts +0 -0
- /package/bin/{src/config → config}/getIPAddress.js +0 -0
- /package/bin/{src/config → config}/plugins/counter.d.ts +0 -0
- /package/bin/{src/config → config}/plugins/counter.js +0 -0
- /package/bin/{src/config → config}/plugins/publicFolder.d.ts +0 -0
- /package/bin/{src/config → config}/plugins/publicFolder.js +0 -0
- /package/bin/{src/config → config}/public/client.d.ts +0 -0
- /package/bin/{src/config → config}/public/client.js +0 -0
- /package/bin/{src/config → config}/tsconfig.d.ts +0 -0
- /package/bin/{src/config → config}/tsconfig.js +0 -0
- /package/bin/{src/config → config}/userConfig.d.ts +0 -0
- /package/bin/{src/config → config}/userConfig.js +0 -0
- /package/bin/{src/constants.d.ts → constants.d.ts} +0 -0
- /package/bin/{src/constants.js → constants.js} +0 -0
- /package/bin/{src/index.d.ts → index.d.ts} +0 -0
- /package/bin/{src/index.js → index.js} +0 -0
- /package/bin/{src/types.d.ts → types.d.ts} +0 -0
- /package/bin/{src/types.js → types.js} +0 -0
- /package/bin/{src/utils → utils}/coloredString.d.ts +0 -0
- /package/bin/{src/utils → utils}/coloredString.js +0 -0
- /package/bin/{src/utils → utils}/copy.d.ts +0 -0
- /package/bin/{src/utils → utils}/copy.js +0 -0
- /package/bin/{src/utils → utils}/getAllFiles.d.ts +0 -0
- /package/bin/{src/utils → utils}/getAllFiles.js +0 -0
- /package/bin/{src/utils → utils}/getCurrentCommitSha.d.ts +0 -0
- /package/bin/{src/utils → utils}/getCurrentCommitSha.js +0 -0
- /package/bin/{src/utils → utils}/getHostURL.d.ts +0 -0
- /package/bin/{src/utils → utils}/getHostURL.js +0 -0
- /package/bin/{src/utils → utils}/getLocalURL.d.ts +0 -0
- /package/bin/{src/utils → utils}/getLocalURL.js +0 -0
- /package/bin/{src/utils → utils}/getPath.d.ts +0 -0
- /package/bin/{src/utils → utils}/getPath.js +0 -0
- /package/bin/{src/utils → utils}/globToRegex.d.ts +0 -0
- /package/bin/{src/utils → utils}/globToRegex.js +0 -0
- /package/bin/{src/utils → utils}/minify.d.ts +0 -0
- /package/bin/{src/utils → utils}/minify.js +0 -0
- /package/bin/{src/utils → utils}/pngToIco.d.ts +0 -0
- /package/bin/{src/utils → utils}/pngToIco.js +0 -0
- /package/bin/{src/utils → utils}/serviceWorkerTransformer.d.ts +0 -0
- /package/bin/{src/utils → utils}/serviceWorkerTransformer.js +0 -0
- /package/bin/{src/utils → utils}/syncDirs.d.ts +0 -0
- /package/bin/{src/utils → utils}/syncDirs.js +0 -0
|
@@ -9,9 +9,9 @@ import { assetsSizes } from "../constants.js";
|
|
|
9
9
|
import { chromium } from "playwright-core";
|
|
10
10
|
import { exec } from "child_process";
|
|
11
11
|
import { getColor } from "colorthief";
|
|
12
|
-
import
|
|
12
|
+
import { packageJson } from "../utils/packageJson.js";
|
|
13
13
|
export async function installPlaywright() {
|
|
14
|
-
const playwrightVersion = `playwright@${
|
|
14
|
+
const playwrightVersion = `playwright@${packageJson.dependencies["playwright-core"]}`;
|
|
15
15
|
console.log(`Installing ${playwrightVersion}...`);
|
|
16
16
|
return new Promise((resolve, reject) => {
|
|
17
17
|
const runners = ["bunx", "npx"];
|
|
@@ -2,10 +2,8 @@ import coloredString from "./utils/coloredString.js";
|
|
|
2
2
|
import yargs from "yargs";
|
|
3
3
|
import { Timer } from "./classes/Timer.js";
|
|
4
4
|
import { hideBin } from "yargs/helpers";
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
import { fileURLToPath } from "url";
|
|
8
|
-
const version = JSON.parse(readFileSync(resolve(dirname(fileURLToPath(import.meta.url)), "..", "package.json"), { encoding: "utf-8" })).version;
|
|
5
|
+
import { packageJson } from "./utils/packageJson.js";
|
|
6
|
+
const version = packageJson.version;
|
|
9
7
|
export async function cli() {
|
|
10
8
|
console.log(` ${coloredString(`Running dev server version ${version}.`)}`);
|
|
11
9
|
const timer = new Timer();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const packageJson: any;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { readFileSync } from "fs";
|
|
2
|
+
import { dirname, resolve } from "path";
|
|
3
|
+
import { fileURLToPath } from "url";
|
|
4
|
+
// Intentionally not using import because typescript generates a src folder inside bin
|
|
5
|
+
export const packageJson = JSON.parse(readFileSync(resolve(dirname(fileURLToPath(import.meta.url)), "../..", "package.json"), { encoding: "utf-8" }));
|
package/package.json
CHANGED
package/bin/package.json
DELETED
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@michijs/dev-server",
|
|
3
|
-
"license": "MIT",
|
|
4
|
-
"version": "0.7.23",
|
|
5
|
-
"repository": {
|
|
6
|
-
"type": "git",
|
|
7
|
-
"url": "https://github.com/michijs/dev-server.git"
|
|
8
|
-
},
|
|
9
|
-
"main": "bin/index",
|
|
10
|
-
"exports": {
|
|
11
|
-
"types": "./bin/index.d.ts",
|
|
12
|
-
"default": "./bin/index.js",
|
|
13
|
-
"constants": "./bin/constants.js"
|
|
14
|
-
},
|
|
15
|
-
"bin": {
|
|
16
|
-
"michi-server": "bin/index.js"
|
|
17
|
-
},
|
|
18
|
-
"description": "Development server based on esbuild",
|
|
19
|
-
"files": [
|
|
20
|
-
"bin/",
|
|
21
|
-
"feature-image-template.svg"
|
|
22
|
-
],
|
|
23
|
-
"type": "module",
|
|
24
|
-
"baseUrl": "./src",
|
|
25
|
-
"scripts": {
|
|
26
|
-
"dist": "tsc",
|
|
27
|
-
"dist-w": "tsc -w",
|
|
28
|
-
"bun-link": "bun link --force",
|
|
29
|
-
"link": "bunx concurrently bun:dist-w bun:bun-link"
|
|
30
|
-
},
|
|
31
|
-
"devDependencies": {
|
|
32
|
-
"@michijs/tsconfig": "0.0.4",
|
|
33
|
-
"@types/node": "22.9.0",
|
|
34
|
-
"@types/yargs": "17.0.33",
|
|
35
|
-
"typescript": "5.6.3"
|
|
36
|
-
},
|
|
37
|
-
"keywords": [
|
|
38
|
-
"react",
|
|
39
|
-
"javascript",
|
|
40
|
-
"css",
|
|
41
|
-
"bundler",
|
|
42
|
-
"typescript",
|
|
43
|
-
"compiler",
|
|
44
|
-
"jsx",
|
|
45
|
-
"commonjs",
|
|
46
|
-
"minifier",
|
|
47
|
-
"tsx",
|
|
48
|
-
"esm",
|
|
49
|
-
"server",
|
|
50
|
-
"development"
|
|
51
|
-
],
|
|
52
|
-
"engines": {
|
|
53
|
-
"node": ">=14.16"
|
|
54
|
-
},
|
|
55
|
-
"dependencies": {
|
|
56
|
-
"colorthief": "2.6.0",
|
|
57
|
-
"@types/web-app-manifest": "1.0.8",
|
|
58
|
-
"esbuild": "0.24.0",
|
|
59
|
-
"node-watch": "0.7.4",
|
|
60
|
-
"open": "10.1.0",
|
|
61
|
-
"playwright-core": "1.49.0",
|
|
62
|
-
"sharp": "0.33.5",
|
|
63
|
-
"yargs": "17.7.2"
|
|
64
|
-
}
|
|
65
|
-
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|