@fluojs/testing 1.0.4 → 1.0.5
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/module.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"module.d.ts","sourceRoot":"","sources":["../src/module.ts"],"names":[],"mappings":"AACA,OAAO,EAGL,KAAK,SAAS,
|
|
1
|
+
{"version":3,"file":"module.d.ts","sourceRoot":"","sources":["../src/module.ts"],"names":[],"mappings":"AACA,OAAO,EAGL,KAAK,SAAS,EAKd,KAAK,QAAQ,EAEd,MAAM,YAAY,CAAC;AACpB,OAAO,KAAK,EAAqC,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAMrF,OAAO,KAAK,EAA2B,oBAAoB,EAAE,oBAAoB,EAAoB,MAAM,YAAY,CAAC;AAExH;;;;;GAKG;AACH,wBAAgB,sBAAsB,CAAC,UAAU,EAAE,UAAU,GAAG,QAAQ,EAAE,CAQzE;AAED;;;;;GAKG;AACH,wBAAgB,wBAAwB,CAAC,UAAU,EAAE,UAAU,GAAG,SAAS,EAAE,CAQ5E;AAED;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,UAAU,EAAE,UAAU,GAAG,UAAU,EAAE,CAQzE;AA+vBD;;;;;;;;;;;;GAYG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,oBAAoB,GAAG,oBAAoB,CAEvF;AAED;;GAEG;AACH,eAAO,MAAM,IAAI;;CAEhB,CAAC"}
|
package/dist/module.js
CHANGED
|
@@ -90,20 +90,8 @@ function normalizeOverride(token, value) {
|
|
|
90
90
|
useValue: value
|
|
91
91
|
};
|
|
92
92
|
}
|
|
93
|
-
function isContainerIntrospection(value) {
|
|
94
|
-
if (typeof value !== 'object' || value === null) {
|
|
95
|
-
return false;
|
|
96
|
-
}
|
|
97
|
-
const candidate = value;
|
|
98
|
-
const parentValid = candidate.parent === undefined || isContainerIntrospection(candidate.parent);
|
|
99
|
-
const requestScopeValid = candidate.requestScopeEnabled === undefined || typeof candidate.requestScopeEnabled === 'boolean';
|
|
100
|
-
return candidate.registrations instanceof Map && candidate.multiRegistrations instanceof Map && candidate.multiSingletonCache instanceof Map && candidate.singletonCache instanceof Map && parentValid && requestScopeValid;
|
|
101
|
-
}
|
|
102
93
|
function toContainerIntrospection(container) {
|
|
103
|
-
|
|
104
|
-
throw new Error('Testing container introspection is unavailable for the current container implementation.');
|
|
105
|
-
}
|
|
106
|
-
return container;
|
|
94
|
+
return container.inspectResolutionState();
|
|
107
95
|
}
|
|
108
96
|
function isPromiseLike(value) {
|
|
109
97
|
return (typeof value === 'object' || typeof value === 'function') && value !== null && typeof value.then === 'function';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"http-adapter-portability.d.ts","sourceRoot":"","sources":["../../src/portability/http-adapter-portability.ts"],"names":[],"mappings":"AAGA,OAAO,EAAwC,KAAK,UAAU,EAAE,KAAK,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE3G,OAAO,QAAQ,cAAc,CAAC;IAC5B,UAAU,gBAAgB;QACxB,KAAK,CAAC,EAAE,YAAY,EAAE,CAAC;QACvB,OAAO,CAAC,EAAE,UAAU,CAAC;KACtB;CACF;AAED,KAAK,OAAO,GAAG;IACb,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IACvB,MAAM,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CACzB,CAAC;AAUF;;;;;;GAMG;AACH,MAAM,WAAW,oCAAoC,CACnD,iBAAiB,SAAS,MAAM,EAChC,WAAW,SAAS,MAAM,EAC1B,IAAI,SAAS,OAAO,GAAG,OAAO;IAE9B;;;;;;OAMG;IACH,SAAS,EAAE,CAAC,UAAU,EAAE,UAAU,EAAE,OAAO,EAAE,iBAAiB,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAEjF;;OAEG;IACH,2BAA2B,CAAC,EAAE,MAAM,CAAC;IAErC;;OAEG;IACH,2BAA2B,CAAC,EAAE,CAAC,GAAG,EAAE,IAAI,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAElE;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;;;;;OAMG;IACH,GAAG,EAAE,CAAC,UAAU,EAAE,UAAU,EAAE,OAAO,EAAE,WAAW,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CACtE;
|
|
1
|
+
{"version":3,"file":"http-adapter-portability.d.ts","sourceRoot":"","sources":["../../src/portability/http-adapter-portability.ts"],"names":[],"mappings":"AAGA,OAAO,EAAwC,KAAK,UAAU,EAAE,KAAK,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE3G,OAAO,QAAQ,cAAc,CAAC;IAC5B,UAAU,gBAAgB;QACxB,KAAK,CAAC,EAAE,YAAY,EAAE,CAAC;QACvB,OAAO,CAAC,EAAE,UAAU,CAAC;KACtB;CACF;AAED,KAAK,OAAO,GAAG;IACb,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IACvB,MAAM,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CACzB,CAAC;AAUF;;;;;;GAMG;AACH,MAAM,WAAW,oCAAoC,CACnD,iBAAiB,SAAS,MAAM,EAChC,WAAW,SAAS,MAAM,EAC1B,IAAI,SAAS,OAAO,GAAG,OAAO;IAE9B;;;;;;OAMG;IACH,SAAS,EAAE,CAAC,UAAU,EAAE,UAAU,EAAE,OAAO,EAAE,iBAAiB,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAEjF;;OAEG;IACH,2BAA2B,CAAC,EAAE,MAAM,CAAC;IAErC;;OAEG;IACH,2BAA2B,CAAC,EAAE,CAAC,GAAG,EAAE,IAAI,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAElE;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;;;;;OAMG;IACH,GAAG,EAAE,CAAC,UAAU,EAAE,UAAU,EAAE,OAAO,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
|
});
|
|
52
52
|
}
|
|
53
|
+
function createLogCaptureLogger() {
|
|
54
|
+
const messages = [];
|
|
55
|
+
const capture = (...args) => messages.push(args.map(arg => String(arg)).join(' '));
|
|
56
|
+
return {
|
|
57
|
+
debug: capture,
|
|
58
|
+
error: capture,
|
|
59
|
+
log: capture,
|
|
60
|
+
messages,
|
|
61
|
+
warn: capture
|
|
62
|
+
};
|
|
63
|
+
}
|
|
53
64
|
async function runWithCleanup(app, adapterName, assertion) {
|
|
54
65
|
let hasAssertionError = false;
|
|
55
66
|
let assertionError;
|
|
@@ -522,17 +533,7 @@ export class HttpAdapterPortabilityHarness {
|
|
|
522
533
|
}
|
|
523
534
|
async assertReportsConfiguredHostInStartupLogs() {
|
|
524
535
|
let _initProto8, _initClass8;
|
|
525
|
-
const
|
|
526
|
-
const logger = {
|
|
527
|
-
debug() {},
|
|
528
|
-
error(message, error, context) {
|
|
529
|
-
loggerEvents.push(`error:${context}:${message}:${error instanceof Error ? error.message : 'none'}`);
|
|
530
|
-
},
|
|
531
|
-
log(message, context) {
|
|
532
|
-
loggerEvents.push(`log:${context}:${message}`);
|
|
533
|
-
},
|
|
534
|
-
warn() {}
|
|
535
|
-
};
|
|
536
|
+
const logger = createLogCaptureLogger();
|
|
536
537
|
let _HealthController;
|
|
537
538
|
class HealthController {
|
|
538
539
|
static {
|
|
@@ -574,25 +575,14 @@ export class HttpAdapterPortabilityHarness {
|
|
|
574
575
|
})) {
|
|
575
576
|
throw new Error(`${this.options.name} adapter changed host-bound response payload.`);
|
|
576
577
|
}
|
|
577
|
-
|
|
578
|
-
if (!loggerEvents.includes(expectedLog)) {
|
|
578
|
+
if (!logger.messages.some(message => message.includes(`Listening on ${baseUrl}`))) {
|
|
579
579
|
throw new Error(`${this.options.name} adapter changed startup host logging.`);
|
|
580
580
|
}
|
|
581
581
|
});
|
|
582
582
|
}
|
|
583
583
|
async assertReportsHttpsStartupUrl(https) {
|
|
584
584
|
let _initProto9, _initClass9;
|
|
585
|
-
const
|
|
586
|
-
const logger = {
|
|
587
|
-
debug() {},
|
|
588
|
-
error(message, error, context) {
|
|
589
|
-
loggerEvents.push(`error:${context}:${message}:${error instanceof Error ? error.message : 'none'}`);
|
|
590
|
-
},
|
|
591
|
-
log(message, context) {
|
|
592
|
-
loggerEvents.push(`log:${context}:${message}`);
|
|
593
|
-
},
|
|
594
|
-
warn() {}
|
|
595
|
-
};
|
|
585
|
+
const logger = createLogCaptureLogger();
|
|
596
586
|
let _HealthController2;
|
|
597
587
|
class HealthController {
|
|
598
588
|
static {
|
|
@@ -634,8 +624,7 @@ export class HttpAdapterPortabilityHarness {
|
|
|
634
624
|
})) {
|
|
635
625
|
throw new Error(`${this.options.name} adapter changed HTTPS response payload semantics.`);
|
|
636
626
|
}
|
|
637
|
-
|
|
638
|
-
if (!loggerEvents.includes(expectedLog)) {
|
|
627
|
+
if (!logger.messages.some(message => message.includes(`Listening on ${baseUrl}`))) {
|
|
639
628
|
throw new Error(`${this.options.name} adapter changed HTTPS startup logging.`);
|
|
640
629
|
}
|
|
641
630
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tooling.d.ts","sourceRoot":"","sources":["../../src/vitest/tooling.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"tooling.d.ts","sourceRoot":"","sources":["../../src/vitest/tooling.ts"],"names":[],"mappings":"AA8EA;;;;;GAKG;AACH,wBAAgB,uBAAuB,CAAC,WAAW,EAAE,MAAM,GAAG,GAAG,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAYzF;AAED;;;;;;GAMG;AACH,wBAAgB,+BAA+B,CAAC,WAAW,EAAE,MAAM,GAAG,GAAG,EAAE,SAAS,KAAK,uBAaxF;AAED;;;;GAIG;AACH,wBAAgB,sBAAsB,wBAErC"}
|
package/dist/vitest/tooling.js
CHANGED
|
@@ -3,6 +3,7 @@ import { extname, join, relative, sep } from 'node:path';
|
|
|
3
3
|
import { fileURLToPath } from 'node:url';
|
|
4
4
|
import { defineConfig, mergeConfig } from 'vitest/config';
|
|
5
5
|
import { fluoBabelDecoratorsPlugin } from '../vitest.js';
|
|
6
|
+
const workspaceAliasCache = new Map();
|
|
6
7
|
function collectSourceEntries(sourceRoot) {
|
|
7
8
|
const entries = [];
|
|
8
9
|
for (const directoryEntry of readdirSync(sourceRoot, {
|
|
@@ -58,7 +59,18 @@ function collectWorkspaceAliasesFromRoot(repoRoot) {
|
|
|
58
59
|
* @returns A Vite/Vitest alias map that points public package imports at workspace source files.
|
|
59
60
|
*/
|
|
60
61
|
export function collectWorkspaceAliases(repoRootUrl) {
|
|
61
|
-
|
|
62
|
+
const repoRoot = fileURLToPath(repoRootUrl);
|
|
63
|
+
const cachedAliases = workspaceAliasCache.get(repoRoot);
|
|
64
|
+
if (cachedAliases) {
|
|
65
|
+
return {
|
|
66
|
+
...cachedAliases
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
const aliases = collectWorkspaceAliasesFromRoot(repoRoot);
|
|
70
|
+
workspaceAliasCache.set(repoRoot, aliases);
|
|
71
|
+
return {
|
|
72
|
+
...aliases
|
|
73
|
+
};
|
|
62
74
|
}
|
|
63
75
|
|
|
64
76
|
/**
|
package/package.json
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"override",
|
|
10
10
|
"module-builder"
|
|
11
11
|
],
|
|
12
|
-
"version": "1.0.
|
|
12
|
+
"version": "1.0.5",
|
|
13
13
|
"private": false,
|
|
14
14
|
"license": "MIT",
|
|
15
15
|
"repository": {
|
|
@@ -81,10 +81,10 @@
|
|
|
81
81
|
],
|
|
82
82
|
"dependencies": {
|
|
83
83
|
"@fluojs/config": "^1.0.2",
|
|
84
|
-
"@fluojs/core": "^1.0.3",
|
|
85
84
|
"@fluojs/http": "^1.1.0",
|
|
86
|
-
"@fluojs/di": "^1.0
|
|
87
|
-
"@fluojs/
|
|
85
|
+
"@fluojs/di": "^1.1.0",
|
|
86
|
+
"@fluojs/core": "^1.0.3",
|
|
87
|
+
"@fluojs/runtime": "^1.1.6"
|
|
88
88
|
},
|
|
89
89
|
"peerDependencies": {
|
|
90
90
|
"@babel/core": ">=7.0.0",
|
|
@@ -92,12 +92,12 @@
|
|
|
92
92
|
},
|
|
93
93
|
"devDependencies": {
|
|
94
94
|
"vitest": "^3.2.4",
|
|
95
|
-
"@fluojs/platform-bun": "^1.0.
|
|
95
|
+
"@fluojs/platform-bun": "^1.0.5",
|
|
96
|
+
"@fluojs/platform-deno": "^1.0.6",
|
|
97
|
+
"@fluojs/platform-nodejs": "^1.0.5",
|
|
96
98
|
"@fluojs/platform-cloudflare-workers": "^1.0.3",
|
|
97
|
-
"@fluojs/platform-
|
|
98
|
-
"@fluojs/platform-
|
|
99
|
-
"@fluojs/platform-express": "^1.0.3",
|
|
100
|
-
"@fluojs/platform-fastify": "^1.0.4"
|
|
99
|
+
"@fluojs/platform-express": "^1.0.5",
|
|
100
|
+
"@fluojs/platform-fastify": "^1.0.6"
|
|
101
101
|
},
|
|
102
102
|
"scripts": {
|
|
103
103
|
"prebuild": "node ../../tooling/scripts/clean-dist.mjs",
|