mirror of
https://github.com/HeyPuter/puter.git
synced 2026-09-17 10:45:44 +00:00
fix: don't load bench.js files (#2207)
Docker Image CI / build-and-push-image (push) Has been cancelled
Maintain Release Merge PR / update-release-pr (push) Has been cancelled
release-please / release-please (push) Has been cancelled
test / test-backend (24.x) (push) Has been cancelled
test / API tests (node env, api-test) (24.x) (push) Has been cancelled
test / puterjs (node env, vitest) (24.x) (push) Has been cancelled
Docker Image CI / build-and-push-image (push) Has been cancelled
Maintain Release Merge PR / update-release-pr (push) Has been cancelled
release-please / release-please (push) Has been cancelled
test / test-backend (24.x) (push) Has been cancelled
test / API tests (node env, api-test) (24.x) (push) Has been cancelled
test / puterjs (node env, vitest) (24.x) (push) Has been cancelled
* fix: autoloader grabbing bench.js files * fix: errors failing * fix: extension cache typ * cache: app icons
This commit is contained in:
Vendored
+2
-1
@@ -14,6 +14,7 @@ import type { RequestHandler } from 'express';
|
||||
import type FSNodeContext from '../src/backend/src/filesystem/FSNodeContext.js';
|
||||
import type helpers from '../src/backend/src/helpers.js';
|
||||
import type * as ExtensionControllerExports from './ExtensionController/src/ExtensionController.ts';
|
||||
import kvjs from '@heyputer/kv.js';
|
||||
declare global {
|
||||
namespace Express {
|
||||
interface Request {
|
||||
@@ -96,7 +97,7 @@ interface Extension extends RouterMethods {
|
||||
on(event: 'create.drivers', listener: (event: { createDriver: (interface: string, service: string, executors: any) => any }) => void),
|
||||
on(event: 'create.permissions', listener: (event: { grant_to_everyone: (permission: string) => void, grant_to_users: (permission: string) => void }) => void)
|
||||
on(event: 'create.interfaces', listener: (event: { createInterface: (interface: string, interfaces: DriverInterface) => void }) => void)
|
||||
import(module: 'data'): { db: BaseDatabaseAccessService, kv: DynamoKVStore, cache: unknown } // TODO DS: type cache better
|
||||
import(module: 'data'): { db: BaseDatabaseAccessService, kv: DynamoKVStore, cache: kvjs }
|
||||
import(module: 'core'): CoreRuntimeModule,
|
||||
import(module: 'fs'): FilesystemModule,
|
||||
import(module: 'query'): typeof query,
|
||||
|
||||
Generated
+12
-4
@@ -68,7 +68,7 @@
|
||||
"yaml": "^2.8.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=20.19.5"
|
||||
"node": ">=24.0.0"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"sharp": "^0.34.4",
|
||||
@@ -5857,10 +5857,12 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@types/node": {
|
||||
"version": "20.19.25",
|
||||
"version": "24.10.4",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-24.10.4.tgz",
|
||||
"integrity": "sha512-vnDVpYPMzs4wunl27jHrfmwojOGKya0xyM3sH+UE5iv5uPS6vX7UIoh6m+vQc5LGBq52HBKPIn/zcSZVzeDEZg==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"undici-types": "~6.21.0"
|
||||
"undici-types": "~7.16.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@types/node-fetch": {
|
||||
@@ -5871,6 +5873,12 @@
|
||||
"form-data": "^4.0.4"
|
||||
}
|
||||
},
|
||||
"node_modules/@types/node/node_modules/undici-types": {
|
||||
"version": "7.16.0",
|
||||
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.16.0.tgz",
|
||||
"integrity": "sha512-Zz+aZWSj8LE6zoxD+xrjh4VfkIG8Ya6LvYkZqtUQGJPZjYl53ypCaUwWqo7eI0x66KBGeRo+mlBEkMSeSZ38Nw==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@types/pg": {
|
||||
"version": "8.6.1",
|
||||
"license": "MIT",
|
||||
@@ -16866,7 +16874,7 @@
|
||||
"yargs": "^17.7.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "^20.5.3",
|
||||
"@types/node": "^24.0.0",
|
||||
"chai": "^4.3.7",
|
||||
"jsdom": "^27.2.0",
|
||||
"mocha": "^10.2.0",
|
||||
|
||||
@@ -516,12 +516,13 @@ class Kernel extends AdvancedBase {
|
||||
const fullpath = path_.join(mod_path, directory);
|
||||
const fsitems = fs.readdirSync(fullpath);
|
||||
for ( const item of fsitems ) {
|
||||
if ( ! item.endsWith('.js') ) {
|
||||
if ( !item.endsWith('.js') && !item.endsWith('.cjs') && !item.endsWith('.mjs') ) {
|
||||
continue;
|
||||
}
|
||||
if ( item.endsWith('.test.js') ) {
|
||||
if ( item.endsWith('.test.js') || item.endsWith('.bench.js') ) {
|
||||
continue;
|
||||
}
|
||||
|
||||
const stat = fs.statSync(path_.join(fullpath, item));
|
||||
if ( ! stat.isFile() ) {
|
||||
continue;
|
||||
|
||||
@@ -79,6 +79,7 @@ class AppIconService extends BaseService {
|
||||
} = await this.get_icon_stream({ app_uid, size });
|
||||
|
||||
res.set('Content-Type', mime);
|
||||
res.set('Cache-Control', 'public, max-age=3600');
|
||||
stream.pipe(res);
|
||||
},
|
||||
}).attach(app);
|
||||
|
||||
+2
-2
@@ -30,7 +30,7 @@ def get_admin_password() -> str:
|
||||
"""
|
||||
Get the admin password from the backend server, throw an error if not found.
|
||||
"""
|
||||
for attempt in range(90): # wait up to 60 seconds (1 minute)
|
||||
for attempt in range(120): # wait up to 60 seconds (1 minute)
|
||||
time.sleep(1)
|
||||
|
||||
# read the log file
|
||||
@@ -43,7 +43,7 @@ def get_admin_password() -> str:
|
||||
print(f"Extracted admin password: {admin_password}")
|
||||
return admin_password
|
||||
|
||||
raise RuntimeError(f"no admin password found after 60 seconds, check {LOG_PATH} for details")
|
||||
raise RuntimeError(f"no admin password found after 120 seconds")
|
||||
|
||||
|
||||
def get_token(admin_password: str) -> str:
|
||||
|
||||
Reference in New Issue
Block a user