vona-core 5.1.49 → 5.1.51
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.js +247 -13
- package/dist/index.js.map +1 -1
- package/dist/lib/bean/type.d.ts.map +1 -1
- package/dist/lib/core/completedReadiness.d.ts +37 -0
- package/dist/lib/core/completedReadiness.d.ts.map +1 -0
- package/dist/lib/core/completedReadiness.test.d.ts +2 -0
- package/dist/lib/core/completedReadiness.test.d.ts.map +1 -0
- package/dist/lib/core/context.d.ts.map +1 -1
- package/dist/lib/core/index.d.ts +2 -0
- package/dist/lib/core/index.d.ts.map +1 -1
- package/dist/lib/core/meta.d.ts +2 -0
- package/dist/lib/core/meta.d.ts.map +1 -1
- package/dist/lib/core/testClaim.d.ts.map +1 -1
- package/dist/lib/core/testClaimFilesystemWindows.d.ts.map +1 -1
- package/dist/lib/framework/start.d.ts.map +1 -1
- package/dist/lib/utils/index.d.ts +1 -0
- package/dist/lib/utils/index.d.ts.map +1 -1
- package/dist/lib/utils/zod-enhance.d.ts +1 -0
- package/dist/lib/utils/zod-enhance.d.ts.map +1 -1
- package/package.json +3 -3
- package/src/lib/bean/type.ts +3 -3
- package/src/lib/core/completedReadiness.test.ts +558 -0
- package/src/lib/core/completedReadiness.ts +389 -0
- package/src/lib/core/context.ts +3 -0
- package/src/lib/core/index.ts +11 -0
- package/src/lib/core/meta.ts +5 -0
- package/src/lib/core/testClaim.test.ts +294 -1
- package/src/lib/core/testClaim.ts +47 -9
- package/src/lib/core/testClaimFilesystem.test.ts +163 -39
- package/src/lib/core/testClaimFilesystemWindows.cs +16 -6
- package/src/lib/core/testClaimFilesystemWindows.ts +9 -4
- package/src/lib/framework/start.test.ts +10 -0
- package/src/lib/framework/start.ts +8 -0
- package/src/lib/utils/index.ts +1 -0
- package/src/lib/utils/zod-enhance.ts +8 -1
package/dist/index.js
CHANGED
|
@@ -663,6 +663,10 @@ function _resolverAddonFile(addonName, projectPath, resolver) {
|
|
|
663
663
|
}
|
|
664
664
|
}
|
|
665
665
|
|
|
666
|
+
const queryCoercion = new AsyncLocalStorage();
|
|
667
|
+
function runWithZodQueryCoercion(enabled, fn) {
|
|
668
|
+
return queryCoercion.run(enabled, fn);
|
|
669
|
+
}
|
|
666
670
|
function zodEnhance() {
|
|
667
671
|
setLocaleAdapter((text, iss) => {
|
|
668
672
|
const app = useApp();
|
|
@@ -670,7 +674,7 @@ function zodEnhance() {
|
|
|
670
674
|
return app.meta.text(text, ...args);
|
|
671
675
|
}, text, iss);
|
|
672
676
|
});
|
|
673
|
-
setParseAdapter(ZodMetadata);
|
|
677
|
+
setParseAdapter(ZodMetadata, () => queryCoercion.getStore() !== false);
|
|
674
678
|
}
|
|
675
679
|
function zodSetLocaleErrors(app, localeErrors, localeDefault) {
|
|
676
680
|
setLocaleErrors(() => {
|
|
@@ -2700,6 +2704,191 @@ class VonaAsyncLocalStorage extends AsyncLocalStorage {
|
|
|
2700
2704
|
}
|
|
2701
2705
|
}
|
|
2702
2706
|
|
|
2707
|
+
const owners = new WeakMap();
|
|
2708
|
+
const capabilities = new WeakMap();
|
|
2709
|
+
const captures = new WeakSet();
|
|
2710
|
+
const pins = new WeakMap();
|
|
2711
|
+
function createCompletedReadiness(appIdentity) {
|
|
2712
|
+
const state = {
|
|
2713
|
+
app: appIdentity,
|
|
2714
|
+
application: 'starting',
|
|
2715
|
+
applicationAttempt: Object.freeze({}),
|
|
2716
|
+
attempts: new Map(),
|
|
2717
|
+
provisions: new Map(),
|
|
2718
|
+
publications: new Map()
|
|
2719
|
+
};
|
|
2720
|
+
const facade = Object.freeze({
|
|
2721
|
+
snapshot: () => Object.freeze({
|
|
2722
|
+
application: state.application
|
|
2723
|
+
})
|
|
2724
|
+
});
|
|
2725
|
+
owners.set(facade, state);
|
|
2726
|
+
return facade;
|
|
2727
|
+
}
|
|
2728
|
+
|
|
2729
|
+
// Internal framework integration only. None of the issuance/provisioning helpers are barrel exports.
|
|
2730
|
+
function beginCompletedApplication(owner) {
|
|
2731
|
+
const state = owners.get(owner);
|
|
2732
|
+
state.publications.clear();
|
|
2733
|
+
state.attempts.clear();
|
|
2734
|
+
state.applicationAttempt = Object.freeze({});
|
|
2735
|
+
if (state.application !== 'closing') state.application = 'starting';
|
|
2736
|
+
return state.applicationAttempt;
|
|
2737
|
+
}
|
|
2738
|
+
function finishCompletedApplication(owner, attempt, success) {
|
|
2739
|
+
const state = owners.get(owner);
|
|
2740
|
+
if (state.application === 'closing' || state.applicationAttempt !== attempt) return;
|
|
2741
|
+
state.application = success ? 'ready' : 'failed';
|
|
2742
|
+
if (!success) state.publications.clear();
|
|
2743
|
+
}
|
|
2744
|
+
function closeCompletedReadiness(owner) {
|
|
2745
|
+
const state = owners.get(owner);
|
|
2746
|
+
state.application = 'closing';
|
|
2747
|
+
state.publications.clear();
|
|
2748
|
+
state.attempts.clear();
|
|
2749
|
+
}
|
|
2750
|
+
function invalidateCompletedInstance(owner, name) {
|
|
2751
|
+
if (!owner) return;
|
|
2752
|
+
const state = owners.get(owner);
|
|
2753
|
+
state.attempts.set(name, Object.freeze({}));
|
|
2754
|
+
state.publications.delete(name);
|
|
2755
|
+
}
|
|
2756
|
+
function beginCompletedInstance(owner, name) {
|
|
2757
|
+
if (!owner) return;
|
|
2758
|
+
invalidateCompletedInstance(owner, name);
|
|
2759
|
+
return owners.get(owner).attempts.get(name);
|
|
2760
|
+
}
|
|
2761
|
+
function rowCopy(value) {
|
|
2762
|
+
if (!value || typeof value !== 'object') return;
|
|
2763
|
+
const fields = ['id', 'name', 'disabled', 'isolate', 'config'];
|
|
2764
|
+
const data = Object.create(null);
|
|
2765
|
+
for (const key of fields) {
|
|
2766
|
+
const desc = Object.getOwnPropertyDescriptor(value, key);
|
|
2767
|
+
if (!desc || !('value' in desc)) return;
|
|
2768
|
+
data[key] = desc.value;
|
|
2769
|
+
}
|
|
2770
|
+
if (typeof data.id !== 'number' || !Number.isSafeInteger(data.id) || data.id <= 0 || typeof data.name !== 'string' || !data.name.isWellFormed() || data.name.includes('\0') || Buffer.byteLength(data.name) > 256 || data.disabled !== false || typeof data.isolate !== 'boolean' || !(data.config === null || typeof data.config === 'string' && data.config.isWellFormed() && Buffer.byteLength(data.config) <= 65_536)) {
|
|
2771
|
+
return;
|
|
2772
|
+
}
|
|
2773
|
+
return Object.freeze(data);
|
|
2774
|
+
}
|
|
2775
|
+
function detach(value, functions, active = new Set(), depth = 0, budget = {
|
|
2776
|
+
nodes: 0
|
|
2777
|
+
}) {
|
|
2778
|
+
if (++budget.nodes > 100_000 || depth > 64) throw new Error('Unsupported completed configuration');
|
|
2779
|
+
if (value === null || value === undefined || typeof value === 'string' || typeof value === 'boolean' || typeof value === 'number' && Number.isFinite(value)) {
|
|
2780
|
+
return value;
|
|
2781
|
+
}
|
|
2782
|
+
if (typeof value === 'function') {
|
|
2783
|
+
if (!functions.has(value) || !Object.isFrozen(value)) throw new Error('Unsupported completed configuration');
|
|
2784
|
+
for (const key of Reflect.ownKeys(value)) {
|
|
2785
|
+
const desc = Object.getOwnPropertyDescriptor(value, key);
|
|
2786
|
+
if (!('value' in desc) || desc.writable || desc.value && (typeof desc.value === 'object' || typeof desc.value === 'function')) {
|
|
2787
|
+
throw new Error('Unsupported completed configuration');
|
|
2788
|
+
}
|
|
2789
|
+
}
|
|
2790
|
+
return value;
|
|
2791
|
+
}
|
|
2792
|
+
if (typeof value !== 'object' || !value || active.has(value)) throw new Error('Unsupported completed configuration');
|
|
2793
|
+
const array = Array.isArray(value);
|
|
2794
|
+
const proto = Object.getPrototypeOf(value);
|
|
2795
|
+
if (!array && proto !== Object.prototype && proto !== null || array && proto !== Array.prototype) {
|
|
2796
|
+
throw new Error('Unsupported completed configuration');
|
|
2797
|
+
}
|
|
2798
|
+
active.add(value);
|
|
2799
|
+
const result = array ? [] : Object.create(null);
|
|
2800
|
+
for (const key of Reflect.ownKeys(value)) {
|
|
2801
|
+
if (array && key === 'length') continue;
|
|
2802
|
+
if (typeof key !== 'string') throw new Error('Unsupported completed configuration');
|
|
2803
|
+
const desc = Object.getOwnPropertyDescriptor(value, key);
|
|
2804
|
+
if (!('value' in desc)) throw new Error('Unsupported completed configuration');
|
|
2805
|
+
Object.defineProperty(result, key, {
|
|
2806
|
+
value: detach(desc.value, functions, active, depth + 1, budget),
|
|
2807
|
+
enumerable: desc.enumerable,
|
|
2808
|
+
configurable: false,
|
|
2809
|
+
writable: false
|
|
2810
|
+
});
|
|
2811
|
+
}
|
|
2812
|
+
if (array) Object.defineProperty(result, 'length', {
|
|
2813
|
+
value: value.length
|
|
2814
|
+
});
|
|
2815
|
+
active.delete(value);
|
|
2816
|
+
return Object.freeze(result);
|
|
2817
|
+
}
|
|
2818
|
+
function captureCompletedInstance(owner, name, attempt, row, config) {
|
|
2819
|
+
if (!owner || !attempt) return;
|
|
2820
|
+
const state = owners.get(owner);
|
|
2821
|
+
const provision = state.provisions.get(name);
|
|
2822
|
+
if (!provision || state.application === 'closing' || state.attempts.get(name) !== attempt) return;
|
|
2823
|
+
try {
|
|
2824
|
+
const capturedRow = rowCopy(row);
|
|
2825
|
+
if (!capturedRow || capturedRow.name !== name || capturedRow.isolate !== provision.isolate) return;
|
|
2826
|
+
const snapshot = detach(config, provision.functions);
|
|
2827
|
+
if (!snapshot || typeof snapshot !== 'object') return;
|
|
2828
|
+
const captured = Object.freeze({
|
|
2829
|
+
attempt,
|
|
2830
|
+
provision,
|
|
2831
|
+
row: capturedRow,
|
|
2832
|
+
config: snapshot
|
|
2833
|
+
});
|
|
2834
|
+
captures.add(captured);
|
|
2835
|
+
return captured;
|
|
2836
|
+
} catch {
|
|
2837
|
+
// Unsupported snapshots leave admission unavailable without inspecting the failure.
|
|
2838
|
+
}
|
|
2839
|
+
}
|
|
2840
|
+
function finishCompletedInstance(owner, name, attempt, captured) {
|
|
2841
|
+
if (!owner || !attempt || !captured || !captures.has(captured)) return;
|
|
2842
|
+
const state = owners.get(owner);
|
|
2843
|
+
const publication = captured;
|
|
2844
|
+
if (state.application !== 'closing' && state.application !== 'failed' && state.attempts.get(name) === attempt && publication.attempt === attempt && state.provisions.get(name) === publication.provision) {
|
|
2845
|
+
state.publications.set(name, publication);
|
|
2846
|
+
}
|
|
2847
|
+
}
|
|
2848
|
+
function resolveExistingReadyCapability(owner, capability, app) {
|
|
2849
|
+
const issued = capabilities.get(capability),
|
|
2850
|
+
state = owners.get(owner);
|
|
2851
|
+
if (!issued || issued.owner !== owner || !state || state.application !== 'ready' || app && app !== state.app) {
|
|
2852
|
+
return;
|
|
2853
|
+
}
|
|
2854
|
+
try {
|
|
2855
|
+
const current = issued.now();
|
|
2856
|
+
if (!Number.isFinite(current) || current >= issued.deadline) return;
|
|
2857
|
+
} catch {
|
|
2858
|
+
return;
|
|
2859
|
+
}
|
|
2860
|
+
const publication = issued.publication;
|
|
2861
|
+
if (state.publications.get(publication.row.name) !== publication || state.attempts.get(publication.row.name) !== publication.attempt) {
|
|
2862
|
+
return;
|
|
2863
|
+
}
|
|
2864
|
+
return Object.freeze({
|
|
2865
|
+
publication,
|
|
2866
|
+
name: publication.row.name,
|
|
2867
|
+
handle: publication.provision.handle
|
|
2868
|
+
});
|
|
2869
|
+
}
|
|
2870
|
+
function pinExistingReadyContext(owner, capability, app, context) {
|
|
2871
|
+
const resolved = resolveExistingReadyCapability(owner, capability, app);
|
|
2872
|
+
if (!resolved || pins.has(context)) return false;
|
|
2873
|
+
const publication = resolved.publication;
|
|
2874
|
+
pins.set(context, publication);
|
|
2875
|
+
for (const [key, value] of [['config', publication.config], ['instance', publication.row], ['instanceName', publication.row.name], ['innerAccess', false]]) {
|
|
2876
|
+
Object.defineProperty(context, key, {
|
|
2877
|
+
value,
|
|
2878
|
+
enumerable: true,
|
|
2879
|
+
configurable: false,
|
|
2880
|
+
writable: false
|
|
2881
|
+
});
|
|
2882
|
+
}
|
|
2883
|
+
return true;
|
|
2884
|
+
}
|
|
2885
|
+
function getExistingReadyContextConfig(context) {
|
|
2886
|
+
return pins.get(context)?.config;
|
|
2887
|
+
}
|
|
2888
|
+
function isExistingReadyContext(context) {
|
|
2889
|
+
return !!context && pins.has(context);
|
|
2890
|
+
}
|
|
2891
|
+
|
|
2703
2892
|
const BEAN = Symbol.for('Context#__bean');
|
|
2704
2893
|
const INNERACCESS = Symbol.for('Context#__inneraccess');
|
|
2705
2894
|
const CTXCALLER = Symbol.for('Context#__ctxcaller');
|
|
@@ -2738,6 +2927,8 @@ const contextBase = {
|
|
|
2738
2927
|
},
|
|
2739
2928
|
get config() {
|
|
2740
2929
|
const self = cast(this);
|
|
2930
|
+
const pinned = getExistingReadyContextConfig(self);
|
|
2931
|
+
if (pinned) return pinned;
|
|
2741
2932
|
const serviceInstance = cast(self.app.bean._getBean('a-instance.service.instance'));
|
|
2742
2933
|
return serviceInstance.getConfig(self.instanceName) || self.app.config;
|
|
2743
2934
|
},
|
|
@@ -3042,6 +3233,7 @@ class AppMeta extends BeanSimple {
|
|
|
3042
3233
|
this.hmrCacheLocaleModules = void 0;
|
|
3043
3234
|
this.hmrCacheConfigModules = void 0;
|
|
3044
3235
|
//
|
|
3236
|
+
this.completedReadiness = void 0;
|
|
3045
3237
|
this.appReady = void 0;
|
|
3046
3238
|
this.appReadyInstances = void 0;
|
|
3047
3239
|
//
|
|
@@ -3052,6 +3244,7 @@ class AppMeta extends BeanSimple {
|
|
|
3052
3244
|
this.appClosed = void 0;
|
|
3053
3245
|
}
|
|
3054
3246
|
__init__(env) {
|
|
3247
|
+
this.completedReadiness = createCompletedReadiness(this.app);
|
|
3055
3248
|
// env
|
|
3056
3249
|
this.env = env;
|
|
3057
3250
|
this._prepareEnv();
|
|
@@ -3109,6 +3302,7 @@ class AppMeta extends BeanSimple {
|
|
|
3109
3302
|
});
|
|
3110
3303
|
}
|
|
3111
3304
|
async close() {
|
|
3305
|
+
closeCompletedReadiness(this.completedReadiness);
|
|
3112
3306
|
if (!this[SymbolClosePromise]) {
|
|
3113
3307
|
this[SymbolClosePromise] = this._closeInner();
|
|
3114
3308
|
}
|
|
@@ -3468,9 +3662,12 @@ function decode(source) {
|
|
|
3468
3662
|
throw new Error('Windows test claim filesystem helper returned an invalid response');
|
|
3469
3663
|
}
|
|
3470
3664
|
if (!value || value.ok !== true) {
|
|
3471
|
-
const
|
|
3665
|
+
const code = ['EEXIST', 'ENOENT', 'EBUSY', 'EACCES', 'EUNSAFE'].includes(value?.code) ? value.code : 'EUNSAFE';
|
|
3666
|
+
const nativeCode = Number.isInteger(value?.nativeCode) && value.nativeCode >= 0 && value.nativeCode <= 65535 ? value.nativeCode : 0;
|
|
3667
|
+
const error = new Error(`Unsafe Windows test claim filesystem operation (${code}, nativeCode=${nativeCode})`);
|
|
3472
3668
|
Object.assign(error, {
|
|
3473
|
-
code
|
|
3669
|
+
code,
|
|
3670
|
+
nativeCode
|
|
3474
3671
|
});
|
|
3475
3672
|
throw error;
|
|
3476
3673
|
}
|
|
@@ -4160,9 +4357,19 @@ async function startTestClaimBroker(claimPath) {
|
|
|
4160
4357
|
const update = event => {
|
|
4161
4358
|
if (closing) return Promise.reject(new Error('Test claim broker is closed'));
|
|
4162
4359
|
const result = queue.then(async () => {
|
|
4163
|
-
|
|
4164
|
-
|
|
4165
|
-
|
|
4360
|
+
let phase = 'read';
|
|
4361
|
+
try {
|
|
4362
|
+
const manifest = await loadTestClaim(claimPath);
|
|
4363
|
+
phase = 'validate';
|
|
4364
|
+
applyEvent(manifest, event);
|
|
4365
|
+
phase = 'write';
|
|
4366
|
+
await writeTestClaim(claimPath, manifest);
|
|
4367
|
+
} catch (error) {
|
|
4368
|
+
if (error instanceof Error) Object.assign(error, {
|
|
4369
|
+
testClaimPhase: phase
|
|
4370
|
+
});
|
|
4371
|
+
throw error;
|
|
4372
|
+
}
|
|
4166
4373
|
});
|
|
4167
4374
|
queue = result.catch(() => {});
|
|
4168
4375
|
return result;
|
|
@@ -4183,8 +4390,15 @@ async function startTestClaimBroker(claimPath) {
|
|
|
4183
4390
|
}
|
|
4184
4391
|
if (req.url === '/containment') await containment(parseTestClaimJson(body));else await update(parseTestClaimJson(body));
|
|
4185
4392
|
res.writeHead(204).end();
|
|
4186
|
-
} catch {
|
|
4187
|
-
|
|
4393
|
+
} catch (error) {
|
|
4394
|
+
const failure = error;
|
|
4395
|
+
const headers = {};
|
|
4396
|
+
if (['read', 'validate', 'write'].includes(failure?.testClaimPhase)) headers['x-vona-claim-phase'] = failure.testClaimPhase;
|
|
4397
|
+
if (['EEXIST', 'ENOENT', 'EBUSY', 'EACCES', 'EUNSAFE'].includes(failure?.code)) headers['x-vona-claim-code'] = failure.code;
|
|
4398
|
+
if (Number.isInteger(failure?.nativeCode) && failure.nativeCode >= 0 && failure.nativeCode <= 65535) {
|
|
4399
|
+
headers['x-vona-claim-native-code'] = String(failure.nativeCode);
|
|
4400
|
+
}
|
|
4401
|
+
res.writeHead(409, headers).end('Test claim registration rejected');
|
|
4188
4402
|
}
|
|
4189
4403
|
});
|
|
4190
4404
|
server.requestTimeout = 10000;
|
|
@@ -4234,20 +4448,34 @@ function hasTestClaimTransport(env = process.env) {
|
|
|
4234
4448
|
}
|
|
4235
4449
|
async function sendTestClaimEvent(env, event) {
|
|
4236
4450
|
if (!hasTestClaimTransport(env)) return;
|
|
4451
|
+
let response;
|
|
4237
4452
|
try {
|
|
4238
|
-
|
|
4453
|
+
response = await fetch(env[TEST_CLAIM_URL_ENV], {
|
|
4239
4454
|
method: 'POST',
|
|
4240
4455
|
headers: {
|
|
4241
4456
|
'authorization': `Bearer ${env[TEST_CLAIM_TOKEN_ENV]}`,
|
|
4457
|
+
// Startup can block past the broker's idle timeout; never reuse a stale socket.
|
|
4458
|
+
'connection': 'close',
|
|
4242
4459
|
'content-type': 'application/json'
|
|
4243
4460
|
},
|
|
4244
4461
|
body: JSON.stringify(event),
|
|
4245
|
-
|
|
4462
|
+
// Includes the serialized queue and durable Windows filesystem work (30s per operation).
|
|
4463
|
+
signal: AbortSignal.timeout(120000),
|
|
4246
4464
|
redirect: 'error'
|
|
4247
4465
|
});
|
|
4248
|
-
if (response.status !== 204) throw new Error('Registration rejected');
|
|
4249
4466
|
} catch {
|
|
4250
|
-
throw new Error('Managed test allocation registration failed');
|
|
4467
|
+
throw new Error('Managed test allocation registration failed (transport)');
|
|
4468
|
+
}
|
|
4469
|
+
if (response.status !== 204) {
|
|
4470
|
+
const details = [`HTTP ${response.status}`];
|
|
4471
|
+
const phase = response.headers.get('x-vona-claim-phase');
|
|
4472
|
+
const code = response.headers.get('x-vona-claim-code');
|
|
4473
|
+
const nativeCode = response.headers.get('x-vona-claim-native-code');
|
|
4474
|
+
if (['read', 'validate', 'write'].includes(phase)) details.push(phase);
|
|
4475
|
+
if (['EEXIST', 'ENOENT', 'EBUSY', 'EACCES', 'EUNSAFE'].includes(code)) details.push(code);
|
|
4476
|
+
if (nativeCode && /^\d{1,5}$/.test(nativeCode) && Number(nativeCode) <= 65535) details.push(`native ${nativeCode}`);
|
|
4477
|
+
await response.body?.cancel().catch(() => {});
|
|
4478
|
+
throw new Error(`Managed test allocation registration failed (${details.join(', ')})`);
|
|
4251
4479
|
}
|
|
4252
4480
|
}
|
|
4253
4481
|
|
|
@@ -4269,6 +4497,8 @@ async function assertTestClaimWindowsJob(env, identity) {
|
|
|
4269
4497
|
method: 'POST',
|
|
4270
4498
|
headers: {
|
|
4271
4499
|
'authorization': `Bearer ${env[TEST_CLAIM_TOKEN_ENV]}`,
|
|
4500
|
+
// Startup can block past the broker's idle timeout; never reuse a stale socket.
|
|
4501
|
+
'connection': 'close',
|
|
4272
4502
|
'content-type': 'application/json'
|
|
4273
4503
|
},
|
|
4274
4504
|
body: JSON.stringify(query),
|
|
@@ -4865,6 +5095,8 @@ class Start {
|
|
|
4865
5095
|
}
|
|
4866
5096
|
async start() {
|
|
4867
5097
|
const app = this.app;
|
|
5098
|
+
const owner = app.meta.completedReadiness;
|
|
5099
|
+
const attempt = beginCompletedApplication(owner);
|
|
4868
5100
|
try {
|
|
4869
5101
|
await this._start_appConfig();
|
|
4870
5102
|
await assertFreshTestResources(app);
|
|
@@ -4872,7 +5104,9 @@ class Start {
|
|
|
4872
5104
|
await this._start_appStart();
|
|
4873
5105
|
await this._start_appReady();
|
|
4874
5106
|
await this._start_appStarted();
|
|
5107
|
+
finishCompletedApplication(owner, attempt, true);
|
|
4875
5108
|
} catch (err) {
|
|
5109
|
+
finishCompletedApplication(owner, attempt, false);
|
|
4876
5110
|
// record
|
|
4877
5111
|
app.meta.appStartError = err;
|
|
4878
5112
|
// event: appReadyError
|
|
@@ -5257,5 +5491,5 @@ async function retry(options, fn) {
|
|
|
5257
5491
|
|
|
5258
5492
|
zodExtendOpenApi();
|
|
5259
5493
|
|
|
5260
|
-
export { $Class, $localeScope, $makeLocaleMagic, $protocolKey, AppHmr, AppHmrDeps, AppLocale, AppLogger, AppMeta, AppMetadata, AppResource, AppUtil, BeanAopBase, BeanAopMethodBase, BeanBase, BeanBaseSimple, BeanContainer, BeanInfo, BeanScopeBase, BeanScopeContainer, BeanScopeError, BeanScopeErrorImpl, BeanScopeLocale, BeanScopeScene, BeanScopeUtil, BeanSimple, EnumAppEvent, ErrorClass, Global, LocaleModuleNameSeparator, PickClassInner, ProxyDisable, SymbolBeanContainerInstances, SymbolBeanFullName, SymbolBeanInstanceKey, SymbolBeanInstancePropsLazy, SymbolCacheAopChains, SymbolCacheAopChainsKey, SymbolDecoratorBeanFullName, SymbolDecoratorBeanInfo, SymbolDecoratorGlobal, SymbolDecoratorProxyDisable, SymbolDecoratorUse, SymbolDecoratorVirtual, SymbolHmrStateLoad, SymbolHmrStateSave, SymbolMappedClassMetadataKeys, SymbolModuleBelong, SymbolModuleName, TEST_CLAIM_DIRECTORY, TEST_CLAIM_TOKEN_ENV, TEST_CLAIM_URL_ENV, TEST_CLAIM_WINDOWS_GUARDIAN_ENV, TEST_REQUIRE_FRESH_RESOURCES_ENV, TEST_RUN_ID_ENV, TEST_RUN_OWNER_FILE, Use, Virtual, VonaApplication, __prepareInjectSelectorInfo, appHmrDeps, appMetadata, appResource, assertDisposableDatabaseName, assertFreshTestResources, assertFreshTestResourcesReady, assertIsolatedTestConfig, assertIsolatedTestDatabaseClient, assertIsolatedTestPath, assertTestAppIdentity, assertTestClaimDatabaseClient, assertTestClaimRedisClient, assertTestClaimSafePath, assertTestClaimWindowsJob, assertTestRunOwner, beanFullNameFromOnionName, bootstrap, buildTestClaimResourceInventory, captureRequestBoundary, cast, closeApp, closeProcessWorker, combineConfigDefault, combineFilePathSafe, compose, copyAddon, copyMetadataOfClasses, copyProperties, copyPropertiesOfClasses, createApp, createAppMaster, createBeanDecorator, createDiagnosticLogger, createFreshnessDependencies, createGeneralApp, createHash, createRequestBoundary, createTestClaim, deepExtend, disposeInstance, errorsInternal, filterHeaders, formatLoggerAxiosError, formatLoggerBoundary, formatLoggerConsole, formatLoggerCtx, formatLoggerDummy, formatLoggerErrors, formatLoggerFilter, functionNoop, getDatabaseTestPrefix, getHomeVonaAppDir, getLoggerPathPhysicalRoot, getMappedClassMetadataKeys, getPlatformArch, getPublicPathPhysicalRoot, getRequestBoundary, getRuntimePathPhysicalRoot, getSqlite3DatabaseNameDefault, getSuppressedDiagnosticLogger, getTestAppName, getTestClaimCreatedAt, getTestClaimPaths, getTestClaimRedisPrefix, getTestRunIdFromEnv, hasFreshnessDatabase, hasFreshnessRedis, hasTestClaimTransport, instanceDesp, isLocaleMagic, loadJSONFile, loadTestClaim, mergeTestClaimDatabaseOptions, mergeTestClaimRedisOptions, normalizeTestClaimDatabaseEndpoint, normalizeTestClaimRedisEndpoint, onionNameFromBeanFullName, pathToHref, polyfillDispose, prepareEnv, registerMappedClassMetadataKey, registerTestClaimDatabaseCreation, registerTestClaimResourceInventory, registerTestClaimWindowsJobVerifier, requireAddon, requireDynamic, requiresFreshTestResources, resolveAddon, resolveTestRunId, resolveVonaLocalPaths, resolverSharp, resolverSharpLibvips, resolverSqlite3, retry, runWithRequestBoundary, saveJSONFile, sendTestClaimEvent, setMappedClassMetadataKeys, startTestClaimBroker, text$1 as text, useApp, usePrepareArg, usePrepareArgs, uuidv4, validateTestClaim, withIsolatedTestDatabaseDiscovery, writeTestClaim };
|
|
5494
|
+
export { $Class, $localeScope, $makeLocaleMagic, $protocolKey, AppHmr, AppHmrDeps, AppLocale, AppLogger, AppMeta, AppMetadata, AppResource, AppUtil, BeanAopBase, BeanAopMethodBase, BeanBase, BeanBaseSimple, BeanContainer, BeanInfo, BeanScopeBase, BeanScopeContainer, BeanScopeError, BeanScopeErrorImpl, BeanScopeLocale, BeanScopeScene, BeanScopeUtil, BeanSimple, EnumAppEvent, ErrorClass, Global, LocaleModuleNameSeparator, PickClassInner, ProxyDisable, SymbolBeanContainerInstances, SymbolBeanFullName, SymbolBeanInstanceKey, SymbolBeanInstancePropsLazy, SymbolCacheAopChains, SymbolCacheAopChainsKey, SymbolDecoratorBeanFullName, SymbolDecoratorBeanInfo, SymbolDecoratorGlobal, SymbolDecoratorProxyDisable, SymbolDecoratorUse, SymbolDecoratorVirtual, SymbolHmrStateLoad, SymbolHmrStateSave, SymbolMappedClassMetadataKeys, SymbolModuleBelong, SymbolModuleName, TEST_CLAIM_DIRECTORY, TEST_CLAIM_TOKEN_ENV, TEST_CLAIM_URL_ENV, TEST_CLAIM_WINDOWS_GUARDIAN_ENV, TEST_REQUIRE_FRESH_RESOURCES_ENV, TEST_RUN_ID_ENV, TEST_RUN_OWNER_FILE, Use, Virtual, VonaApplication, __prepareInjectSelectorInfo, appHmrDeps, appMetadata, appResource, assertDisposableDatabaseName, assertFreshTestResources, assertFreshTestResourcesReady, assertIsolatedTestConfig, assertIsolatedTestDatabaseClient, assertIsolatedTestPath, assertTestAppIdentity, assertTestClaimDatabaseClient, assertTestClaimRedisClient, assertTestClaimSafePath, assertTestClaimWindowsJob, assertTestRunOwner, beanFullNameFromOnionName, beginCompletedInstance, bootstrap, buildTestClaimResourceInventory, captureCompletedInstance, captureRequestBoundary, cast, closeApp, closeProcessWorker, combineConfigDefault, combineFilePathSafe, compose, copyAddon, copyMetadataOfClasses, copyProperties, copyPropertiesOfClasses, createApp, createAppMaster, createBeanDecorator, createCompletedReadiness, createDiagnosticLogger, createFreshnessDependencies, createGeneralApp, createHash, createRequestBoundary, createTestClaim, deepExtend, disposeInstance, errorsInternal, filterHeaders, finishCompletedInstance, formatLoggerAxiosError, formatLoggerBoundary, formatLoggerConsole, formatLoggerCtx, formatLoggerDummy, formatLoggerErrors, formatLoggerFilter, functionNoop, getDatabaseTestPrefix, getHomeVonaAppDir, getLoggerPathPhysicalRoot, getMappedClassMetadataKeys, getPlatformArch, getPublicPathPhysicalRoot, getRequestBoundary, getRuntimePathPhysicalRoot, getSqlite3DatabaseNameDefault, getSuppressedDiagnosticLogger, getTestAppName, getTestClaimCreatedAt, getTestClaimPaths, getTestClaimRedisPrefix, getTestRunIdFromEnv, hasFreshnessDatabase, hasFreshnessRedis, hasTestClaimTransport, instanceDesp, invalidateCompletedInstance, isExistingReadyContext, isLocaleMagic, loadJSONFile, loadTestClaim, mergeTestClaimDatabaseOptions, mergeTestClaimRedisOptions, normalizeTestClaimDatabaseEndpoint, normalizeTestClaimRedisEndpoint, onionNameFromBeanFullName, pathToHref, pinExistingReadyContext, polyfillDispose, prepareEnv, registerMappedClassMetadataKey, registerTestClaimDatabaseCreation, registerTestClaimResourceInventory, registerTestClaimWindowsJobVerifier, requireAddon, requireDynamic, requiresFreshTestResources, resolveAddon, resolveExistingReadyCapability, resolveTestRunId, resolveVonaLocalPaths, resolverSharp, resolverSharpLibvips, resolverSqlite3, retry, runWithRequestBoundary, runWithZodQueryCoercion, saveJSONFile, sendTestClaimEvent, setMappedClassMetadataKeys, startTestClaimBroker, text$1 as text, useApp, usePrepareArg, usePrepareArgs, uuidv4, validateTestClaim, withIsolatedTestDatabaseDiscovery, writeTestClaim };
|
|
5261
5495
|
//# sourceMappingURL=index.js.map
|