@bleedingdev/modern-js-app-tools-extensions 3.9.0-ultramodern.4 → 3.9.0-ultramodern.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/cjs/backend-federation-build/codegen.js +256 -0
- package/dist/cjs/backend-federation-build/config.js +204 -0
- package/dist/cjs/backend-federation-build/emit.js +150 -0
- package/dist/cjs/backend-federation-build/index.js +53 -0
- package/dist/cjs/build-config/build-environment.js +268 -0
- package/dist/cjs/build-config/precompress/plugin.js +124 -0
- package/dist/cjs/build-config/precompress/types.js +18 -0
- package/dist/cjs/build-config/public.js +46 -0
- package/dist/cjs/cloudflare/constants.js +1 -1
- package/dist/cjs/cloudflare/delivery-unit.js +9 -9
- package/dist/cjs/cloudflare-output-verifier/identity.js +6 -6
- package/dist/cjs/config.js +29 -1
- package/dist/cjs/deploy-output/npmAliases.js +226 -0
- package/dist/cjs/deploy-output/plugin.js +76 -0
- package/dist/cjs/deploy-output/target.js +48 -0
- package/dist/cjs/native-type-checker.js +6 -3
- package/dist/cjs/release-envelope/framework-output.js +27 -27
- package/dist/cjs/release-envelope/plugin.js +2 -1
- package/dist/esm/backend-federation-build/codegen.mjs +205 -0
- package/dist/esm/backend-federation-build/config.mjs +128 -0
- package/dist/esm/backend-federation-build/emit.mjs +99 -0
- package/dist/esm/backend-federation-build/index.mjs +1 -0
- package/dist/esm/build-config/build-environment.mjs +224 -0
- package/dist/esm/build-config/precompress/plugin.mjs +76 -0
- package/dist/esm/build-config/precompress/types.mjs +0 -0
- package/dist/esm/build-config/public.mjs +1 -0
- package/dist/esm/cloudflare/constants.mjs +1 -1
- package/dist/esm/cloudflare/delivery-unit.mjs +1 -1
- package/dist/esm/cloudflare-output-verifier/identity.mjs +1 -1
- package/dist/esm/config.mjs +1 -0
- package/dist/esm/deploy-output/npmAliases.mjs +174 -0
- package/dist/esm/deploy-output/plugin.mjs +28 -0
- package/dist/esm/deploy-output/target.mjs +10 -0
- package/dist/esm/native-type-checker.mjs +6 -3
- package/dist/esm/release-envelope/framework-output.mjs +1 -1
- package/dist/esm/release-envelope/plugin.mjs +2 -1
- package/dist/esm-node/backend-federation-build/codegen.mjs +206 -0
- package/dist/esm-node/backend-federation-build/config.mjs +129 -0
- package/dist/esm-node/backend-federation-build/emit.mjs +100 -0
- package/dist/esm-node/backend-federation-build/index.mjs +2 -0
- package/dist/esm-node/build-config/build-environment.mjs +225 -0
- package/dist/esm-node/build-config/precompress/plugin.mjs +77 -0
- package/dist/esm-node/build-config/precompress/types.mjs +1 -0
- package/dist/esm-node/build-config/public.mjs +2 -0
- package/dist/esm-node/cloudflare/constants.mjs +1 -1
- package/dist/esm-node/cloudflare/delivery-unit.mjs +1 -1
- package/dist/esm-node/cloudflare-output-verifier/identity.mjs +1 -1
- package/dist/esm-node/config.mjs +1 -0
- package/dist/esm-node/deploy-output/npmAliases.mjs +175 -0
- package/dist/esm-node/deploy-output/plugin.mjs +31 -0
- package/dist/esm-node/deploy-output/target.mjs +11 -0
- package/dist/esm-node/native-type-checker.mjs +6 -3
- package/dist/esm-node/release-envelope/framework-output.mjs +1 -1
- package/dist/esm-node/release-envelope/plugin.mjs +2 -1
- package/dist/types/backend-federation-build/codegen.d.ts +86 -0
- package/dist/types/backend-federation-build/config.d.ts +103 -0
- package/dist/types/backend-federation-build/emit.d.ts +21 -0
- package/dist/types/backend-federation-build/index.d.ts +2 -0
- package/dist/types/build-config/build-environment.d.ts +22 -0
- package/dist/types/build-config/precompress/plugin.d.ts +4 -0
- package/dist/types/build-config/precompress/types.d.ts +19 -0
- package/dist/types/build-config/public.d.ts +2 -0
- package/dist/types/cloudflare/constants.d.ts +1 -1
- package/dist/types/cloudflare/delivery-unit.d.ts +1 -1
- package/dist/types/cloudflare/worker-manifest.d.ts +2 -2
- package/dist/types/cloudflare-output-verifier/identity.d.ts +1 -1
- package/dist/types/config.d.ts +2 -0
- package/dist/types/deploy-output/npmAliases.d.ts +14 -0
- package/dist/types/deploy-output/plugin.d.ts +15 -0
- package/dist/types/deploy-output/target.d.ts +6 -0
- package/dist/types/precompress/LICENSE +20 -0
- package/dist/types/precompress/index.d.ts +76 -0
- package/package.json +50 -8
- package/src/backend-federation-build/codegen.ts +245 -0
- package/src/backend-federation-build/config.ts +376 -0
- package/src/backend-federation-build/emit.ts +205 -0
- package/src/backend-federation-build/index.ts +2 -0
- package/src/build-config/build-environment.ts +404 -0
- package/src/build-config/precompress/plugin.ts +140 -0
- package/src/build-config/precompress/types.ts +26 -0
- package/src/build-config/public.ts +6 -0
- package/src/cloudflare/constants.ts +1 -1
- package/src/cloudflare/delivery-unit.ts +2 -2
- package/src/cloudflare/worker-manifest.ts +1 -0
- package/src/cloudflare-builder.ts +1 -0
- package/src/cloudflare-output-verifier/identity.ts +1 -1
- package/src/config.ts +7 -0
- package/src/deploy-output/npmAliases.ts +333 -0
- package/src/deploy-output/plugin.ts +49 -0
- package/src/deploy-output/target.ts +23 -0
- package/src/native-type-checker.ts +11 -3
- package/src/release-envelope/framework-output.ts +1 -1
- package/src/release-envelope/plugin.ts +5 -1
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
import "node:module";
|
|
2
|
+
import { existsSync } from "node:fs";
|
|
3
|
+
import promises from "node:fs/promises";
|
|
4
|
+
import node_path from "node:path";
|
|
5
|
+
import { resolveUltramodernSourceRevision } from "@modern-js/app-tools-extensions/release-identity";
|
|
6
|
+
import { BACKEND_FEDERATION_MANIFEST_FILE, BACKEND_FEDERATION_REMOTE_ENTRY_FILE, DELIVERY_UNIT_DEPLOY_PROFILE, DELIVERY_UNIT_KIND, DELIVERY_UNIT_SCHEMA_VERSION, ULTRAMODERN_BUILD_ARTIFACT_FILE, ULTRAMODERN_BUILD_ARTIFACT_PATH, ULTRAMODERN_BUILD_MODULE_PATH, deliveryUnitContractBlock, isUltramodernBuildArtifact, validateDeliveryUnitRecord, validateUltramodernBuildArtifact } from "@modern-js/backend-federation-contracts";
|
|
7
|
+
const COMPACT_CONFIG_PATH = '.modernjs/ultramodern.json';
|
|
8
|
+
const normalizeRelativePath = (value)=>value.replace(/\\/gu, '/').replace(/^\.\/+/u, '');
|
|
9
|
+
const isRecord = (value)=>'object' == typeof value && null !== value;
|
|
10
|
+
const readJsonFile = async (filePath)=>JSON.parse(await promises.readFile(filePath, 'utf8'));
|
|
11
|
+
const buildArtifactPathFor = (appDirectory)=>node_path.join(appDirectory, ULTRAMODERN_BUILD_ARTIFACT_PATH);
|
|
12
|
+
const buildModulePathFor = (appDirectory)=>node_path.join(appDirectory, ULTRAMODERN_BUILD_MODULE_PATH);
|
|
13
|
+
const readBuildIdentity = async (appDirectory)=>{
|
|
14
|
+
const buildArtifactPath = buildArtifactPathFor(appDirectory);
|
|
15
|
+
if (existsSync(buildArtifactPath)) {
|
|
16
|
+
const artifact = await readJsonFile(buildArtifactPath);
|
|
17
|
+
const artifactValidation = validateUltramodernBuildArtifact(artifact, buildArtifactPath);
|
|
18
|
+
if (!artifactValidation.ok) throw new Error(`[backend-federation-build] Invalid delivery-unit build artifact at ${buildArtifactPath}.`);
|
|
19
|
+
if (!isUltramodernBuildArtifact(artifact)) throw new Error(`[backend-federation-build] Invalid delivery-unit build artifact at ${buildArtifactPath}.`);
|
|
20
|
+
const deliveryUnit = artifact.deliveryUnit;
|
|
21
|
+
return {
|
|
22
|
+
artifact,
|
|
23
|
+
appId: deliveryUnit.appId,
|
|
24
|
+
buildVersion: deliveryUnit.buildMarker,
|
|
25
|
+
packageName: deliveryUnit.packageName,
|
|
26
|
+
version: deliveryUnit.version,
|
|
27
|
+
unitId: deliveryUnit.unitId,
|
|
28
|
+
sourceRevision: deliveryUnit.sourceRevision
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
const buildModulePath = buildModulePathFor(appDirectory);
|
|
32
|
+
if (!existsSync(buildModulePath)) return {};
|
|
33
|
+
console.warn(`[backend-federation-build] ${buildArtifactPath} missing; falling back to legacy regex parsing of ${buildModulePath}. Regenerate the workspace to emit ${ULTRAMODERN_BUILD_ARTIFACT_FILE}.`);
|
|
34
|
+
const source = await promises.readFile(buildModulePath, 'utf8');
|
|
35
|
+
return {
|
|
36
|
+
appId: source.match(/\bappId:\s*['"]([^'"]+)['"]/u)?.[1],
|
|
37
|
+
buildVersion: source.match(/\bbuild:\s*['"]([^'"]+)['"]/u)?.[1],
|
|
38
|
+
packageName: source.match(/\bpackageName:\s*['"]([^'"]+)['"]/u)?.[1],
|
|
39
|
+
version: source.match(/\bversion:\s*['"]([^'"]+)['"]/u)?.[1],
|
|
40
|
+
unitId: source.match(/\bunitId:\s*['"]([^'"]+)['"]/u)?.[1],
|
|
41
|
+
sourceRevision: source.match(/\bsourceRevision:\s*['"]([^'"]+)['"]/u)?.[1]
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
const toPascalCase = (value)=>value.split(/[^a-zA-Z0-9]+/u).filter(Boolean).map((part)=>part.charAt(0).toUpperCase() + part.slice(1)).join('');
|
|
45
|
+
const stringValue = (value)=>'string' == typeof value && value.length > 0 ? value : void 0;
|
|
46
|
+
const createBackendName = (app, id)=>{
|
|
47
|
+
const configuredName = stringValue(app.backendFederation?.name) ?? stringValue(app.backendFederation?.executionSurfaces?.node?.remoteName) ?? stringValue(app.serverExecution?.node?.remoteName);
|
|
48
|
+
if (configuredName) return configuredName;
|
|
49
|
+
const mfName = stringValue(app.moduleFederation?.name);
|
|
50
|
+
return mfName ? `${mfName}Backend` : `vertical${toPascalCase(id)}Backend`;
|
|
51
|
+
};
|
|
52
|
+
const findWorkspaceRoot = (appDirectory)=>{
|
|
53
|
+
let current = appDirectory;
|
|
54
|
+
while(true){
|
|
55
|
+
if (existsSync(node_path.join(current, COMPACT_CONFIG_PATH))) return current;
|
|
56
|
+
const parent = node_path.dirname(current);
|
|
57
|
+
if (parent === current) return;
|
|
58
|
+
current = parent;
|
|
59
|
+
}
|
|
60
|
+
};
|
|
61
|
+
const resolveWorkspaceSourceRevision = async (workspaceRoot)=>resolveUltramodernSourceRevision(workspaceRoot);
|
|
62
|
+
const createStampedDeliveryUnit = (input)=>{
|
|
63
|
+
if (!input.unitId || !input.buildMarker || !input.packageName || !input.version) return;
|
|
64
|
+
const record = {
|
|
65
|
+
schemaVersion: DELIVERY_UNIT_SCHEMA_VERSION,
|
|
66
|
+
kind: DELIVERY_UNIT_KIND,
|
|
67
|
+
appId: input.appId,
|
|
68
|
+
unitId: input.unitId,
|
|
69
|
+
packageName: input.packageName,
|
|
70
|
+
version: input.version,
|
|
71
|
+
buildMarker: input.buildMarker,
|
|
72
|
+
sourceRevision: input.sourceRevision,
|
|
73
|
+
deployProfile: DELIVERY_UNIT_DEPLOY_PROFILE
|
|
74
|
+
};
|
|
75
|
+
const validation = validateDeliveryUnitRecord(record);
|
|
76
|
+
if (!validation.ok) return;
|
|
77
|
+
return deliveryUnitContractBlock(record);
|
|
78
|
+
};
|
|
79
|
+
const createAppFromCompactMetadata = (workspaceRoot, appDirectory, compactApp)=>{
|
|
80
|
+
const id = stringValue(compactApp.id);
|
|
81
|
+
const appPath = stringValue(compactApp.path);
|
|
82
|
+
if (!id || 'vertical' !== compactApp.kind || !isRecord(compactApp.api)) return;
|
|
83
|
+
const directory = appPath ? normalizeRelativePath(appPath) : `verticals/${id}`;
|
|
84
|
+
if (node_path.resolve(workspaceRoot, directory) !== node_path.resolve(appDirectory)) return;
|
|
85
|
+
const port = 'number' == typeof compactApp.port ? compactApp.port : void 0;
|
|
86
|
+
if (void 0 === port) return;
|
|
87
|
+
const apiPrefix = stringValue(compactApp.api.prefix) ?? `/${id}-api`;
|
|
88
|
+
const apiStem = stringValue(compactApp.api.stem) ?? id;
|
|
89
|
+
const backendName = createBackendName(compactApp, id);
|
|
90
|
+
const manifestUrl = stringValue(compactApp.backendFederation?.executionSurfaces?.node?.manifestUrl) ?? stringValue(compactApp.serverExecution?.node?.manifestUrl) ?? `http://localhost:${port}/${BACKEND_FEDERATION_MANIFEST_FILE}`;
|
|
91
|
+
const containerEntry = stringValue(compactApp.backendFederation?.executionSurfaces?.node?.containerEntry) ?? stringValue(compactApp.serverExecution?.node?.containerEntry) ?? `http://localhost:${port}/${BACKEND_FEDERATION_REMOTE_ENTRY_FILE}`;
|
|
92
|
+
const configuredRemoteType = stringValue(compactApp.backendFederation?.executionSurfaces?.node?.remoteType) ?? stringValue(compactApp.serverExecution?.node?.remoteType);
|
|
93
|
+
if (void 0 !== configuredRemoteType && 'commonjs-module' !== configuredRemoteType) throw new Error(`[backend-federation-build] Node backend federation remoteType must be "commonjs-module"; received "${configuredRemoteType}" for ${id}.`);
|
|
94
|
+
if (!new URL(containerEntry).pathname.endsWith(`/${BACKEND_FEDERATION_REMOTE_ENTRY_FILE}`)) throw new Error(`[backend-federation-build] Node backend federation containerEntry must end with "/${BACKEND_FEDERATION_REMOTE_ENTRY_FILE}"; received "${containerEntry}" for ${id}.`);
|
|
95
|
+
const remoteType = 'commonjs-module';
|
|
96
|
+
const packageName = stringValue(compactApp.package);
|
|
97
|
+
const uiManifestUrl = stringValue(compactApp.backendFederation?.versionBoundary?.ui?.manifestUrl) ?? stringValue(compactApp.moduleFederation?.manifestUrl);
|
|
98
|
+
const compactDeliveryUnit = isRecord(compactApp.deliveryUnit) ? {
|
|
99
|
+
unitId: stringValue(compactApp.deliveryUnit.unitId),
|
|
100
|
+
buildMarker: stringValue(compactApp.deliveryUnit.buildMarker),
|
|
101
|
+
sourceRevision: stringValue(compactApp.deliveryUnit.sourceRevision),
|
|
102
|
+
packageName: stringValue(compactApp.deliveryUnit.packageName),
|
|
103
|
+
version: stringValue(compactApp.deliveryUnit.version)
|
|
104
|
+
} : void 0;
|
|
105
|
+
return {
|
|
106
|
+
id,
|
|
107
|
+
directory,
|
|
108
|
+
packageName,
|
|
109
|
+
port,
|
|
110
|
+
apiPrefix,
|
|
111
|
+
apiStem,
|
|
112
|
+
backendName,
|
|
113
|
+
manifestUrl,
|
|
114
|
+
containerEntry,
|
|
115
|
+
remoteType,
|
|
116
|
+
uiManifestUrl,
|
|
117
|
+
compactDeliveryUnit
|
|
118
|
+
};
|
|
119
|
+
};
|
|
120
|
+
const findBackendFederationApp = async (workspaceRoot, appDirectory)=>{
|
|
121
|
+
const compactConfigPath = node_path.join(workspaceRoot, COMPACT_CONFIG_PATH);
|
|
122
|
+
const compactConfig = await readJsonFile(compactConfigPath);
|
|
123
|
+
const apps = Array.isArray(compactConfig.topology?.apps) ? compactConfig.topology.apps : [];
|
|
124
|
+
for (const app of apps){
|
|
125
|
+
const resolved = createAppFromCompactMetadata(workspaceRoot, appDirectory, app);
|
|
126
|
+
if (resolved) return resolved;
|
|
127
|
+
}
|
|
128
|
+
};
|
|
129
|
+
export { COMPACT_CONFIG_PATH, buildArtifactPathFor, buildModulePathFor, createAppFromCompactMetadata, createStampedDeliveryUnit, findBackendFederationApp, findWorkspaceRoot, normalizeRelativePath, readBuildIdentity, resolveWorkspaceSourceRevision };
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import "node:module";
|
|
2
|
+
import { existsSync } from "node:fs";
|
|
3
|
+
import promises from "node:fs/promises";
|
|
4
|
+
import node_path from "node:path";
|
|
5
|
+
import { resolveUltramodernReleaseIdentity } from "@modern-js/app-tools-extensions/release-identity";
|
|
6
|
+
import { BACKEND_FEDERATION_MANIFEST_FILE, BACKEND_FEDERATION_REMOTE_ENTRY_FILE, ULTRAMODERN_BUILD_ARTIFACT_FILE, stampUltramodernBuildArtifactIdentity } from "@modern-js/backend-federation-contracts";
|
|
7
|
+
import { createBackendFederationEntryIntegrity } from "@modern-js/server-runtime-extensions/backend-federation-security/node";
|
|
8
|
+
import { createBackendManifest, createBackendRemoteEntrySource } from "./codegen.mjs";
|
|
9
|
+
import { COMPACT_CONFIG_PATH, buildArtifactPathFor, buildModulePathFor, createStampedDeliveryUnit, findBackendFederationApp, findWorkspaceRoot, readBuildIdentity, resolveWorkspaceSourceRevision } from "./config.mjs";
|
|
10
|
+
const emitBackendFederationArtifacts = async (appDirectory, distDirectory)=>{
|
|
11
|
+
const workspaceRoot = findWorkspaceRoot(appDirectory);
|
|
12
|
+
if (!workspaceRoot) return;
|
|
13
|
+
const effectApiPath = node_path.join(appDirectory, 'api/effect-api.ts');
|
|
14
|
+
const backendFederationConfigPath = node_path.join(appDirectory, 'backend-federation.config.ts');
|
|
15
|
+
if (!existsSync(effectApiPath) || !existsSync(backendFederationConfigPath)) return;
|
|
16
|
+
const app = await findBackendFederationApp(workspaceRoot, appDirectory);
|
|
17
|
+
if (!app) return;
|
|
18
|
+
const buildIdentity = await readBuildIdentity(appDirectory);
|
|
19
|
+
const compactDeliveryUnit = app.compactDeliveryUnit;
|
|
20
|
+
const hasCompactDeliveryUnit = void 0 !== compactDeliveryUnit && (void 0 !== compactDeliveryUnit.unitId || void 0 !== compactDeliveryUnit.buildMarker || void 0 !== compactDeliveryUnit.packageName || void 0 !== compactDeliveryUnit.version);
|
|
21
|
+
const hasBuildIdentity = void 0 !== buildIdentity.unitId || void 0 !== buildIdentity.buildVersion || void 0 !== buildIdentity.packageName || void 0 !== buildIdentity.version;
|
|
22
|
+
if (hasBuildIdentity) {
|
|
23
|
+
const compactConfigPath = node_path.join(workspaceRoot, COMPACT_CONFIG_PATH);
|
|
24
|
+
const buildIdentityPath = existsSync(buildArtifactPathFor(appDirectory)) ? buildArtifactPathFor(appDirectory) : buildModulePathFor(appDirectory);
|
|
25
|
+
const mismatches = [];
|
|
26
|
+
const compare = (label, a, b, leftLabel = 'deliveryUnit')=>{
|
|
27
|
+
if (void 0 !== a && void 0 !== b && a !== b) mismatches.push(`${label}: ${leftLabel}=${a} vs ultramodern-build=${b}`);
|
|
28
|
+
};
|
|
29
|
+
compare('appId', app.id, buildIdentity.appId, 'topology');
|
|
30
|
+
if (hasCompactDeliveryUnit) {
|
|
31
|
+
compare('unitId', compactDeliveryUnit?.unitId, buildIdentity.unitId);
|
|
32
|
+
compare('buildMarker/build', compactDeliveryUnit?.buildMarker, buildIdentity.buildVersion);
|
|
33
|
+
compare('packageName', compactDeliveryUnit?.packageName, buildIdentity.packageName);
|
|
34
|
+
compare('version', compactDeliveryUnit?.version, buildIdentity.version);
|
|
35
|
+
}
|
|
36
|
+
if (mismatches.length > 0) throw new Error(`[backend-federation-build] Delivery-unit identity drift between ${compactConfigPath} (topology) and ${buildIdentityPath}: ${mismatches.join('; ')}`);
|
|
37
|
+
}
|
|
38
|
+
const unitId = compactDeliveryUnit?.unitId ?? buildIdentity.unitId;
|
|
39
|
+
const generationBuildMarker = compactDeliveryUnit?.buildMarker ?? buildIdentity.buildVersion;
|
|
40
|
+
const sourceRevision = await resolveWorkspaceSourceRevision(workspaceRoot);
|
|
41
|
+
const buildVersion = generationBuildMarker && unitId ? resolveUltramodernReleaseIdentity({
|
|
42
|
+
generationBuildMarker,
|
|
43
|
+
unitId,
|
|
44
|
+
workspaceRoot
|
|
45
|
+
}).buildMarker : void 0;
|
|
46
|
+
const packageName = compactDeliveryUnit?.packageName ?? buildIdentity.packageName ?? app.packageName;
|
|
47
|
+
const version = compactDeliveryUnit?.version ?? buildIdentity.version;
|
|
48
|
+
const deliveryUnit = createStampedDeliveryUnit({
|
|
49
|
+
appId: app.id,
|
|
50
|
+
unitId,
|
|
51
|
+
buildMarker: buildVersion,
|
|
52
|
+
packageName,
|
|
53
|
+
version,
|
|
54
|
+
sourceRevision
|
|
55
|
+
});
|
|
56
|
+
const stampedBuildArtifact = buildIdentity.artifact ? stampUltramodernBuildArtifactIdentity(buildIdentity.artifact, {
|
|
57
|
+
buildMarker: buildVersion ?? buildIdentity.artifact.deliveryUnit.buildMarker,
|
|
58
|
+
sourceRevision
|
|
59
|
+
}) : void 0;
|
|
60
|
+
const resolvedApp = {
|
|
61
|
+
...app,
|
|
62
|
+
packageName,
|
|
63
|
+
version,
|
|
64
|
+
buildVersion,
|
|
65
|
+
unitId,
|
|
66
|
+
sourceRevision,
|
|
67
|
+
deliveryUnit
|
|
68
|
+
};
|
|
69
|
+
const manifestPath = node_path.join(distDirectory, BACKEND_FEDERATION_MANIFEST_FILE);
|
|
70
|
+
const entryPath = node_path.join(distDirectory, BACKEND_FEDERATION_REMOTE_ENTRY_FILE);
|
|
71
|
+
const deliveryUnitArtifactPath = stampedBuildArtifact ? node_path.join(distDirectory, ULTRAMODERN_BUILD_ARTIFACT_FILE) : void 0;
|
|
72
|
+
const entrySource = await createBackendRemoteEntrySource(workspaceRoot, resolvedApp, effectApiPath, entryPath);
|
|
73
|
+
await promises.mkdir(distDirectory, {
|
|
74
|
+
recursive: true
|
|
75
|
+
});
|
|
76
|
+
await promises.writeFile(entryPath, entrySource);
|
|
77
|
+
await promises.writeFile(manifestPath, `${JSON.stringify(createBackendManifest(workspaceRoot, distDirectory, resolvedApp, createBackendFederationEntryIntegrity(entrySource)), null, 2)}\n`);
|
|
78
|
+
if (stampedBuildArtifact && deliveryUnitArtifactPath) await promises.writeFile(deliveryUnitArtifactPath, `${JSON.stringify(stampedBuildArtifact, null, 2)}\n`);
|
|
79
|
+
return {
|
|
80
|
+
appId: resolvedApp.id,
|
|
81
|
+
manifestPath,
|
|
82
|
+
containerPath: entryPath,
|
|
83
|
+
...deliveryUnitArtifactPath ? {
|
|
84
|
+
deliveryUnitArtifactPath
|
|
85
|
+
} : {},
|
|
86
|
+
remoteName: resolvedApp.backendName,
|
|
87
|
+
remoteType: resolvedApp.remoteType
|
|
88
|
+
};
|
|
89
|
+
};
|
|
90
|
+
const emit = ()=>({
|
|
91
|
+
name: '@modern-js/backend-federation-build',
|
|
92
|
+
setup (api) {
|
|
93
|
+
api.onAfterBuild(async ()=>{
|
|
94
|
+
const { appDirectory, distDirectory } = api.getAppContext();
|
|
95
|
+
await emitBackendFederationArtifacts(appDirectory, distDirectory);
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
});
|
|
99
|
+
export default emit;
|
|
100
|
+
export { emitBackendFederationArtifacts };
|
|
@@ -0,0 +1,225 @@
|
|
|
1
|
+
import "node:module";
|
|
2
|
+
import { execFileSync } from "node:child_process";
|
|
3
|
+
import { createHash } from "node:crypto";
|
|
4
|
+
import { accessSync, chmodSync, constants, lstatSync, mkdirSync, readFileSync, realpathSync, renameSync, rmSync, writeFileSync } from "node:fs";
|
|
5
|
+
import { createRequire } from "node:module";
|
|
6
|
+
import { tmpdir } from "node:os";
|
|
7
|
+
import { basename, dirname, join, resolve } from "node:path";
|
|
8
|
+
const EFFECT_TSGO_PACKAGE = '@effect/tsgo';
|
|
9
|
+
const EFFECT_TSGO_BIN = 'effect-tsgo';
|
|
10
|
+
const EFFECT_TSGO_RESOLUTION_ERROR = 'Unable to resolve the Effect TS-Go compiler. Install "@effect/tsgo" and a native TypeScript backend for this build config, or set EFFECT_TSGO_BIN.';
|
|
11
|
+
const executableEffectTsgoCompilers = new Map();
|
|
12
|
+
const BUILD_CONFIG_ENVIRONMENT_PLUGIN = 'ModernJsBuildConfigEnvironmentLeasePlugin';
|
|
13
|
+
const ENVIRONMENT_LEASE_REGISTRY_KEY = Symbol.for('@modern-js/app-tools/build-config-environment-lease-registry/v1');
|
|
14
|
+
const ENVIRONMENT_LEASE_REGISTRY_BRAND = Symbol.for('@modern-js/app-tools/build-config-environment-lease-registry-brand/v1');
|
|
15
|
+
const LIFECYCLE_HOOK_NAMES = [
|
|
16
|
+
'run',
|
|
17
|
+
'watchRun',
|
|
18
|
+
'afterDone',
|
|
19
|
+
'failed',
|
|
20
|
+
'shutdown',
|
|
21
|
+
'watchClose'
|
|
22
|
+
];
|
|
23
|
+
function restoreEnvironment(name, value) {
|
|
24
|
+
if (void 0 === value) delete process.env[name];
|
|
25
|
+
else process.env[name] = value;
|
|
26
|
+
}
|
|
27
|
+
function createEnvironmentLeaseRegistry() {
|
|
28
|
+
const environmentLeases = new Map();
|
|
29
|
+
return Object.freeze({
|
|
30
|
+
acquire (name, value) {
|
|
31
|
+
let lease = environmentLeases.get(name);
|
|
32
|
+
if (lease) {
|
|
33
|
+
if (lease.value !== value) throw new Error(`Build config environment "${name}" already has an active lease for a different value.`);
|
|
34
|
+
if (process.env[name] !== lease.value) throw new Error(`Build config environment lease for "${name}" lost ownership before another lease was acquired.`);
|
|
35
|
+
} else {
|
|
36
|
+
lease = {
|
|
37
|
+
originalValue: process.env[name],
|
|
38
|
+
owners: new Set(),
|
|
39
|
+
value
|
|
40
|
+
};
|
|
41
|
+
process.env[name] = value;
|
|
42
|
+
environmentLeases.set(name, lease);
|
|
43
|
+
}
|
|
44
|
+
const owner = Symbol(name);
|
|
45
|
+
lease.owners.add(owner);
|
|
46
|
+
let released = false;
|
|
47
|
+
return ()=>{
|
|
48
|
+
if (released) return;
|
|
49
|
+
if (environmentLeases.get(name) !== lease || !lease.owners.has(owner)) throw new Error(`Build config environment lease for "${name}" cannot be restored because its ownership record was lost.`);
|
|
50
|
+
released = true;
|
|
51
|
+
const lostOwnership = process.env[name] !== lease.value;
|
|
52
|
+
lease.owners.delete(owner);
|
|
53
|
+
if (0 === lease.owners.size) {
|
|
54
|
+
environmentLeases.delete(name);
|
|
55
|
+
restoreEnvironment(name, lease.originalValue);
|
|
56
|
+
} else if (lostOwnership) process.env[name] = lease.value;
|
|
57
|
+
if (lostOwnership) throw new Error(`Build config environment lease for "${name}" lost ownership before restoration.`);
|
|
58
|
+
};
|
|
59
|
+
},
|
|
60
|
+
brand: ENVIRONMENT_LEASE_REGISTRY_BRAND
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
function getEnvironmentLeaseRegistry() {
|
|
64
|
+
const descriptor = Object.getOwnPropertyDescriptor(process, ENVIRONMENT_LEASE_REGISTRY_KEY);
|
|
65
|
+
if (descriptor) {
|
|
66
|
+
const registry = descriptor.value;
|
|
67
|
+
if (descriptor.configurable || descriptor.enumerable || descriptor.writable || registry?.brand !== ENVIRONMENT_LEASE_REGISTRY_BRAND || 'function' != typeof registry.acquire) throw new Error('The process-global build config environment lease registry is occupied by an incompatible value.');
|
|
68
|
+
return registry;
|
|
69
|
+
}
|
|
70
|
+
const registry = createEnvironmentLeaseRegistry();
|
|
71
|
+
Object.defineProperty(process, ENVIRONMENT_LEASE_REGISTRY_KEY, {
|
|
72
|
+
configurable: false,
|
|
73
|
+
enumerable: false,
|
|
74
|
+
value: registry,
|
|
75
|
+
writable: false
|
|
76
|
+
});
|
|
77
|
+
return registry;
|
|
78
|
+
}
|
|
79
|
+
function acquireEnvironmentLease(name, value) {
|
|
80
|
+
return getEnvironmentLeaseRegistry().acquire(name, value);
|
|
81
|
+
}
|
|
82
|
+
function releaseAfterFailure(release, originalError) {
|
|
83
|
+
try {
|
|
84
|
+
release();
|
|
85
|
+
} catch (restorationError) {
|
|
86
|
+
throw new AggregateError([
|
|
87
|
+
originalError,
|
|
88
|
+
restorationError
|
|
89
|
+
], 'Build config environment setup and restoration both failed.');
|
|
90
|
+
}
|
|
91
|
+
throw originalError;
|
|
92
|
+
}
|
|
93
|
+
class BuildConfigEnvironmentLeasePlugin {
|
|
94
|
+
apply(compiler) {
|
|
95
|
+
const hooks = compiler.hooks;
|
|
96
|
+
try {
|
|
97
|
+
const lifecycleHooks = {};
|
|
98
|
+
for (const hookName of LIFECYCLE_HOOK_NAMES){
|
|
99
|
+
const hook = hooks[hookName];
|
|
100
|
+
if (!hook || 'function' != typeof hook.tap) throw new Error(`Rspack does not expose the "${hookName}" lifecycle hook required to restore build config environment leases.`);
|
|
101
|
+
lifecycleHooks[hookName] = hook;
|
|
102
|
+
}
|
|
103
|
+
let mode = 'pending';
|
|
104
|
+
const modeTap = {
|
|
105
|
+
name: BUILD_CONFIG_ENVIRONMENT_PLUGIN,
|
|
106
|
+
stage: Number.MIN_SAFE_INTEGER
|
|
107
|
+
};
|
|
108
|
+
const releaseTap = {
|
|
109
|
+
name: BUILD_CONFIG_ENVIRONMENT_PLUGIN,
|
|
110
|
+
stage: Number.MAX_SAFE_INTEGER
|
|
111
|
+
};
|
|
112
|
+
const releaseAfterOneShot = ()=>{
|
|
113
|
+
if ('watch' !== mode && true !== compiler.watchMode) this.release();
|
|
114
|
+
};
|
|
115
|
+
lifecycleHooks.run.tap(modeTap, ()=>{
|
|
116
|
+
mode = 'run';
|
|
117
|
+
});
|
|
118
|
+
lifecycleHooks.watchRun.tap(modeTap, ()=>{
|
|
119
|
+
mode = 'watch';
|
|
120
|
+
});
|
|
121
|
+
lifecycleHooks.afterDone.tap(releaseTap, releaseAfterOneShot);
|
|
122
|
+
lifecycleHooks.failed.tap(releaseTap, releaseAfterOneShot);
|
|
123
|
+
lifecycleHooks.shutdown.tap(releaseTap, this.release);
|
|
124
|
+
lifecycleHooks.watchClose.tap(releaseTap, this.release);
|
|
125
|
+
} catch (error) {
|
|
126
|
+
releaseAfterFailure(this.release, error);
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
constructor(release){
|
|
130
|
+
this.release = release;
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
function resolveEffectTsgoCli(from) {
|
|
134
|
+
const projectRequire = createRequire(from);
|
|
135
|
+
const packageJsonPath = projectRequire.resolve(`${EFFECT_TSGO_PACKAGE}/package.json`);
|
|
136
|
+
const packageJson = JSON.parse(readFileSync(packageJsonPath, 'utf-8'));
|
|
137
|
+
const bin = 'string' == typeof packageJson.bin ? packageJson.bin : packageJson.bin?.[EFFECT_TSGO_BIN];
|
|
138
|
+
if (!bin) throw new Error(EFFECT_TSGO_RESOLUTION_ERROR);
|
|
139
|
+
return resolve(dirname(packageJsonPath), bin);
|
|
140
|
+
}
|
|
141
|
+
function resolveExecutableEffectTsgoCompiler(compilerPath) {
|
|
142
|
+
if ('win32' === process.platform) return compilerPath;
|
|
143
|
+
const sourcePath = realpathSync(compilerPath);
|
|
144
|
+
const source = lstatSync(sourcePath);
|
|
145
|
+
if (!source.isFile()) throw new Error(EFFECT_TSGO_RESOLUTION_ERROR);
|
|
146
|
+
try {
|
|
147
|
+
accessSync(sourcePath, constants.X_OK);
|
|
148
|
+
return compilerPath;
|
|
149
|
+
} catch {}
|
|
150
|
+
const cachedCompiler = executableEffectTsgoCompilers.get(sourcePath);
|
|
151
|
+
if (cachedCompiler) try {
|
|
152
|
+
accessSync(cachedCompiler, constants.X_OK);
|
|
153
|
+
return cachedCompiler;
|
|
154
|
+
} catch {
|
|
155
|
+
executableEffectTsgoCompilers.delete(sourcePath);
|
|
156
|
+
}
|
|
157
|
+
const compilerBytes = readFileSync(sourcePath);
|
|
158
|
+
const compilerDigest = createHash('sha256').update(compilerBytes).digest('hex');
|
|
159
|
+
const compilerDirectory = join(tmpdir(), 'modern-js', 'effect-tsgo', compilerDigest);
|
|
160
|
+
mkdirSync(compilerDirectory, {
|
|
161
|
+
recursive: true,
|
|
162
|
+
mode: 448
|
|
163
|
+
});
|
|
164
|
+
const executableCompiler = join(compilerDirectory, basename(sourcePath));
|
|
165
|
+
try {
|
|
166
|
+
accessSync(executableCompiler, constants.X_OK);
|
|
167
|
+
} catch {
|
|
168
|
+
const temporaryCompiler = join(compilerDirectory, `.${basename(sourcePath)}.${process.pid}.tmp`);
|
|
169
|
+
rmSync(temporaryCompiler, {
|
|
170
|
+
force: true
|
|
171
|
+
});
|
|
172
|
+
try {
|
|
173
|
+
writeFileSync(temporaryCompiler, compilerBytes, {
|
|
174
|
+
flag: 'wx',
|
|
175
|
+
mode: 448
|
|
176
|
+
});
|
|
177
|
+
chmodSync(temporaryCompiler, 448);
|
|
178
|
+
renameSync(temporaryCompiler, executableCompiler);
|
|
179
|
+
} finally{
|
|
180
|
+
rmSync(temporaryCompiler, {
|
|
181
|
+
force: true
|
|
182
|
+
});
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
accessSync(executableCompiler, constants.X_OK);
|
|
186
|
+
executableEffectTsgoCompilers.set(sourcePath, executableCompiler);
|
|
187
|
+
return executableCompiler;
|
|
188
|
+
}
|
|
189
|
+
function getBuildConfigEnvironment(name) {
|
|
190
|
+
return process.env[name];
|
|
191
|
+
}
|
|
192
|
+
function withBuildConfigEnvironment(name, value, setup) {
|
|
193
|
+
return async (config, ...args)=>{
|
|
194
|
+
const release = acquireEnvironmentLease(name, value);
|
|
195
|
+
try {
|
|
196
|
+
const configured = await setup(config, ...args) ?? config;
|
|
197
|
+
configured.plugins = [
|
|
198
|
+
...configured.plugins ?? [],
|
|
199
|
+
new BuildConfigEnvironmentLeasePlugin(release)
|
|
200
|
+
];
|
|
201
|
+
return configured;
|
|
202
|
+
} catch (error) {
|
|
203
|
+
releaseAfterFailure(release, error);
|
|
204
|
+
}
|
|
205
|
+
};
|
|
206
|
+
}
|
|
207
|
+
function resolveEffectTsgoCompiler(options) {
|
|
208
|
+
const configuredCompiler = getBuildConfigEnvironment('EFFECT_TSGO_BIN')?.trim();
|
|
209
|
+
if (configuredCompiler) try {
|
|
210
|
+
return resolveExecutableEffectTsgoCompiler(configuredCompiler);
|
|
211
|
+
} catch {
|
|
212
|
+
throw new Error(EFFECT_TSGO_RESOLUTION_ERROR);
|
|
213
|
+
}
|
|
214
|
+
try {
|
|
215
|
+
const compiler = execFileSync(process.execPath, [
|
|
216
|
+
resolveEffectTsgoCli(options.from),
|
|
217
|
+
'get-exe-path'
|
|
218
|
+
], {
|
|
219
|
+
encoding: 'utf-8'
|
|
220
|
+
}).trim();
|
|
221
|
+
if (compiler) return resolveExecutableEffectTsgoCompiler(compiler);
|
|
222
|
+
} catch {}
|
|
223
|
+
throw new Error(EFFECT_TSGO_RESOLUTION_ERROR);
|
|
224
|
+
}
|
|
225
|
+
export { getBuildConfigEnvironment, resolveEffectTsgoCompiler, withBuildConfigEnvironment };
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import "node:module";
|
|
2
|
+
import { constants } from "node:zlib";
|
|
3
|
+
import compression_webpack_plugin from "compression-webpack-plugin";
|
|
4
|
+
const DEFAULT_PRECOMPRESS_TEST = /\.(js|mjs|cjs|css|html|svg|json|map)$/i;
|
|
5
|
+
const DEFAULT_PRECOMPRESS_THRESHOLD = 10240;
|
|
6
|
+
const DEFAULT_PRECOMPRESS_MIN_RATIO = 0.8;
|
|
7
|
+
const createDefaultGzipOptions = ()=>({
|
|
8
|
+
algorithm: 'gzip',
|
|
9
|
+
filename: '[path][base].gz',
|
|
10
|
+
test: DEFAULT_PRECOMPRESS_TEST,
|
|
11
|
+
threshold: DEFAULT_PRECOMPRESS_THRESHOLD,
|
|
12
|
+
minRatio: DEFAULT_PRECOMPRESS_MIN_RATIO,
|
|
13
|
+
compressionOptions: {
|
|
14
|
+
level: 6
|
|
15
|
+
}
|
|
16
|
+
});
|
|
17
|
+
const createDefaultBrotliOptions = ()=>({
|
|
18
|
+
algorithm: 'brotliCompress',
|
|
19
|
+
filename: '[path][base].br',
|
|
20
|
+
test: DEFAULT_PRECOMPRESS_TEST,
|
|
21
|
+
threshold: DEFAULT_PRECOMPRESS_THRESHOLD,
|
|
22
|
+
minRatio: DEFAULT_PRECOMPRESS_MIN_RATIO,
|
|
23
|
+
compressionOptions: {
|
|
24
|
+
params: {
|
|
25
|
+
[constants.BROTLI_PARAM_QUALITY]: 9
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
const mergeCompressionOptions = (base, next)=>{
|
|
30
|
+
const merged = {
|
|
31
|
+
...base,
|
|
32
|
+
...next
|
|
33
|
+
};
|
|
34
|
+
if (base.compressionOptions || next.compressionOptions) {
|
|
35
|
+
const baseCompressionOptions = base.compressionOptions;
|
|
36
|
+
const nextCompressionOptions = next.compressionOptions;
|
|
37
|
+
const mergedCompressionOptions = {
|
|
38
|
+
...baseCompressionOptions,
|
|
39
|
+
...nextCompressionOptions
|
|
40
|
+
};
|
|
41
|
+
if (baseCompressionOptions?.params || nextCompressionOptions?.params) mergedCompressionOptions.params = {
|
|
42
|
+
...baseCompressionOptions?.params,
|
|
43
|
+
...nextCompressionOptions?.params
|
|
44
|
+
};
|
|
45
|
+
merged.compressionOptions = mergedCompressionOptions;
|
|
46
|
+
}
|
|
47
|
+
return merged;
|
|
48
|
+
};
|
|
49
|
+
const resolveCodecOptions = (codecConfig, createDefaultOptions)=>{
|
|
50
|
+
if (false === codecConfig) return null;
|
|
51
|
+
if (void 0 === codecConfig || true === codecConfig) return createDefaultOptions();
|
|
52
|
+
return mergeCompressionOptions(createDefaultOptions(), codecConfig);
|
|
53
|
+
};
|
|
54
|
+
const resolvePrecompressConfig = (precompress)=>{
|
|
55
|
+
if (false === precompress || void 0 === precompress) return false;
|
|
56
|
+
if (true === precompress) return {};
|
|
57
|
+
return precompress;
|
|
58
|
+
};
|
|
59
|
+
const builderPluginAdapterPrecompress = (precompress)=>({
|
|
60
|
+
name: 'builder-plugin-adapter-modern-precompress',
|
|
61
|
+
setup (api) {
|
|
62
|
+
api.modifyBundlerChain((chain, { isProd, target })=>{
|
|
63
|
+
if (!isProd || 'web' !== target) return;
|
|
64
|
+
const precompressConfig = resolvePrecompressConfig(precompress);
|
|
65
|
+
if (false === precompressConfig) return;
|
|
66
|
+
const gzipOptions = resolveCodecOptions(precompressConfig.gzip, createDefaultGzipOptions);
|
|
67
|
+
if (gzipOptions) chain.plugin('modern-precompress-gzip').use(compression_webpack_plugin, [
|
|
68
|
+
gzipOptions
|
|
69
|
+
]);
|
|
70
|
+
const brotliOptions = resolveCodecOptions(precompressConfig.brotli, createDefaultBrotliOptions);
|
|
71
|
+
if (brotliOptions) chain.plugin('modern-precompress-brotli').use(compression_webpack_plugin, [
|
|
72
|
+
brotliOptions
|
|
73
|
+
]);
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
});
|
|
77
|
+
export { builderPluginAdapterPrecompress };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import "node:module";
|
|
@@ -19,7 +19,7 @@ const DEFAULT_SERVER_ONLY_PUBLIC_ASSET_EXCLUDES = [
|
|
|
19
19
|
];
|
|
20
20
|
const BFF_EFFECT_WORKER_ENTRY = `${WORKER_BUNDLE_DIRECTORY}/__modern_bff_effect.js`;
|
|
21
21
|
const BFF_EFFECT_WORKER_DISPATCHER_EXPORT = '__modern_create_effect_bff_dispatcher';
|
|
22
|
-
const EFFECT_BFF_CLOUDFLARE_IMPORT_GUIDANCE = 'Ensure the Effect API entry exists at api/index.ts or bff.effect.entry, and import Cloudflare edge handlers from @modern-js/
|
|
22
|
+
const EFFECT_BFF_CLOUDFLARE_IMPORT_GUIDANCE = 'Ensure the Effect API entry exists at api/index.ts or bff.effect.entry, and import Cloudflare edge handlers from @modern-js/bff-effect/effect-edge instead of lambda/Hono server helpers.';
|
|
23
23
|
const DEFAULT_COMPATIBILITY_DATE = '2026-06-02';
|
|
24
24
|
const COMPATIBILITY_DATE_PATTERN = /^\d{4}-\d{2}-\d{2}$/u;
|
|
25
25
|
const REQUIRED_COMPATIBILITY_FLAGS = CLOUDFLARE_REQUIRED_COMPATIBILITY_FLAGS;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "node:module";
|
|
2
2
|
import node_path from "node:path";
|
|
3
|
+
import { ULTRAMODERN_BUILD_ARTIFACT_PATH, ULTRAMODERN_BUILD_MODULE_PATH, isUltramodernBuildArtifact, nonEmptyString, toDeliveryUnitIdentity } from "@modern-js/backend-federation-contracts";
|
|
3
4
|
import { fs } from "@modern-js/utils";
|
|
4
|
-
import { ULTRAMODERN_BUILD_ARTIFACT_PATH, ULTRAMODERN_BUILD_MODULE_PATH, isUltramodernBuildArtifact, nonEmptyString, toDeliveryUnitIdentity } from "@modern-js/utils/universal";
|
|
5
5
|
import { resolveUltramodernReleaseIdentity } from "../release-identity.mjs";
|
|
6
6
|
import { isRecord } from "./utils.mjs";
|
|
7
7
|
const COMPACT_CONFIG_PATH = '.modernjs/ultramodern.json';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "node:module";
|
|
2
|
-
import { DELIVERY_UNIT_IDENTITY_FIELDS, deliveryUnitIdentityFieldValue } from "@modern-js/
|
|
2
|
+
import { DELIVERY_UNIT_IDENTITY_FIELDS, deliveryUnitIdentityFieldValue } from "@modern-js/backend-federation-contracts";
|
|
3
3
|
import { addIssue, assertEqual } from "./issues.mjs";
|
|
4
4
|
const verifyDeliveryUnitIdentity = (issues, manifest, manifestPath, declared)=>{
|
|
5
5
|
const stamped = manifest?.deliveryUnit;
|
package/dist/esm-node/config.mjs
CHANGED