Release 1.0.10 with subpath deployment and modal menu invokes.
Add app_base/router_base config, compat path helpers, and scoped service worker registration so apps can mount under a URL prefix. Wire invoke_type modal through a handler registry and open the notification center from the standard menu flow. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -15,6 +15,8 @@ import {
|
||||
isProduction,
|
||||
isServiceWorkerEnabledSync,
|
||||
resolveServiceWorkerEnabled,
|
||||
resolveProfileBases,
|
||||
normalizeRouterBase,
|
||||
CONFIG_KEYS
|
||||
} from '../src/platform/env.js';
|
||||
import { getProvider } from '../src/platform/storage.js';
|
||||
@@ -201,6 +203,33 @@ describe('env.js', () => {
|
||||
});
|
||||
});
|
||||
|
||||
describe('profile base paths', () => {
|
||||
test('resolveProfileBases defaults to root', () => {
|
||||
assert.deepStrictEqual(resolveProfileBases({}), { app_base: '/', router_base: '/' });
|
||||
});
|
||||
|
||||
test('resolveProfileBases mirrors a single configured base', () => {
|
||||
assert.deepStrictEqual(resolveProfileBases({ app_base: '/admin/' }), {
|
||||
app_base: '/admin',
|
||||
router_base: '/admin'
|
||||
});
|
||||
});
|
||||
|
||||
test('resolveProfileBases allows separate router base', () => {
|
||||
assert.deepStrictEqual(resolveProfileBases({ app_base: '/admin', router_base: '/console' }), {
|
||||
app_base: '/admin',
|
||||
router_base: '/console'
|
||||
});
|
||||
});
|
||||
|
||||
test('initEnv seeds APP_BASE and ROUTER_BASE', () => {
|
||||
initEnv({ id: 'demo', router_base: 'ops' });
|
||||
assert.strictEqual(getConfigSync(CONFIG_KEYS.ROUTER_BASE), '/ops');
|
||||
assert.strictEqual(getConfigSync(CONFIG_KEYS.APP_BASE), '/ops');
|
||||
assert.strictEqual(normalizeRouterBase('/ops/'), '/ops');
|
||||
});
|
||||
});
|
||||
|
||||
describe('isDevelopment and isProduction', () => {
|
||||
test('should be functions', () => {
|
||||
assert.strictEqual(typeof isDevelopment, 'function');
|
||||
|
||||
Reference in New Issue
Block a user