@olenbetong/appframe-vite 5.1.33 → 5.1.34
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/lib/build.js +1 -0
- package/lib/devServer.js +1 -1
- package/lib/importJson.d.ts +1 -1
- package/lib/proxy.d.ts +1 -1
- package/package.json +11 -4
package/lib/build.js
CHANGED
|
@@ -28,6 +28,7 @@ export async function addAppframeBuildConfig(config) {
|
|
|
28
28
|
}
|
|
29
29
|
config.build.rollupOptions = {
|
|
30
30
|
input: entry,
|
|
31
|
+
// Cast visualizer plugin to any to avoid Rollup type version clashes
|
|
31
32
|
plugins: [visualizer({ filename: "./dist/stats.html", gzipSize: true })],
|
|
32
33
|
output: {
|
|
33
34
|
globals: appframe.build.externals !== false
|
package/lib/devServer.js
CHANGED
|
@@ -128,7 +128,7 @@ async function getArticleHtml() {
|
|
|
128
128
|
let { hostname, username, password } = await getLoginInfo();
|
|
129
129
|
let article = appframe.article?.id;
|
|
130
130
|
let client = new Client(hostname);
|
|
131
|
-
|
|
131
|
+
await client.login(username, password);
|
|
132
132
|
let response = await client.fetch(`/${article}`, {
|
|
133
133
|
timeout: 30_000,
|
|
134
134
|
method: "GET",
|
package/lib/importJson.d.ts
CHANGED
package/lib/proxy.d.ts
CHANGED
|
@@ -3,6 +3,6 @@ type LoginCacheEntry = {
|
|
|
3
3
|
timestamp: number;
|
|
4
4
|
authCookies: CookieObject;
|
|
5
5
|
};
|
|
6
|
-
export declare function getLastSession(hostname:
|
|
6
|
+
export declare function getLastSession(hostname: string): LoginCacheEntry | undefined;
|
|
7
7
|
export declare function login(hostname: string, username: string, password: string): Promise<CookieObject>;
|
|
8
8
|
export {};
|
package/package.json
CHANGED
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@olenbetong/appframe-vite",
|
|
3
|
-
"version": "5.1.
|
|
3
|
+
"version": "5.1.34",
|
|
4
4
|
"description": "Tools to use and deploy Vite applications to Appframe",
|
|
5
5
|
"main": "./lib/index.js",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"types": "./lib/index.d.ts",
|
|
8
8
|
"exports": {
|
|
9
|
-
"default": "./lib/index.js"
|
|
9
|
+
"default": "./lib/index.js",
|
|
10
|
+
"./proxy": {
|
|
11
|
+
"import": "./lib/proxy.js",
|
|
12
|
+
"types": "./lib/proxy.d.ts"
|
|
13
|
+
}
|
|
10
14
|
},
|
|
11
15
|
"files": [
|
|
12
16
|
"lib"
|
|
@@ -25,7 +29,7 @@
|
|
|
25
29
|
"jsdom": "^26.1.0",
|
|
26
30
|
"rollup-plugin-visualizer": "^5.14.0",
|
|
27
31
|
"vite-plugin-externals": "^0.6.2",
|
|
28
|
-
"@olenbetong/appframe-data": "1.0
|
|
32
|
+
"@olenbetong/appframe-data": "1.1.0"
|
|
29
33
|
},
|
|
30
34
|
"devDependencies": {
|
|
31
35
|
"@types/jsdom": "^21.1.7",
|
|
@@ -42,5 +46,8 @@
|
|
|
42
46
|
"tcp-port-used": "^1.0.2"
|
|
43
47
|
},
|
|
44
48
|
"gitHead": "ef3839cfde6097aa12488f72913680b3ce22706e",
|
|
45
|
-
"scripts": {
|
|
49
|
+
"scripts": {
|
|
50
|
+
"build": "pnpm run build:tsc",
|
|
51
|
+
"build:tsc": "rm -rf ./lib tsconfig.build.tsbuildinfo && tsc -p tsconfig.build.json"
|
|
52
|
+
}
|
|
46
53
|
}
|