-
Notifications
You must be signed in to change notification settings - Fork 4.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0c25851
commit 55edc8b
Showing
38 changed files
with
731 additions
and
706 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import type { DotnetModuleInternal, MonoConfigInternal } from "./types"; | ||
import { DotnetModuleConfig } from "./types-api"; | ||
|
||
export function deep_merge_config(target: MonoConfigInternal, source: MonoConfigInternal): MonoConfigInternal { | ||
const providedConfig: MonoConfigInternal = { ...source }; | ||
if (providedConfig.assets) { | ||
providedConfig.assets = [...(target.assets || []), ...(providedConfig.assets || [])]; | ||
} | ||
if (providedConfig.environmentVariables) { | ||
providedConfig.environmentVariables = { ...(target.environmentVariables || {}), ...(providedConfig.environmentVariables || {}) }; | ||
} | ||
if (providedConfig.startupOptions) { | ||
providedConfig.startupOptions = { ...(target.startupOptions || {}), ...(providedConfig.startupOptions || {}) }; | ||
} | ||
if (providedConfig.runtimeOptions) { | ||
providedConfig.runtimeOptions = [...(target.runtimeOptions || []), ...(providedConfig.runtimeOptions || [])]; | ||
} | ||
return Object.assign(target, providedConfig); | ||
} | ||
|
||
export function deep_merge_module(target: DotnetModuleInternal, source: DotnetModuleConfig): DotnetModuleInternal { | ||
const providedConfig: DotnetModuleConfig = { ...source }; | ||
if (providedConfig.config) { | ||
if (!target.config) target.config = {}; | ||
providedConfig.config = deep_merge_config(target.config, providedConfig.config); | ||
} | ||
return Object.assign(target, providedConfig); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,7 @@ | ||
const ENVIRONMENT_IS_WEB = typeof window == "object"; | ||
const ENVIRONMENT_IS_NODE = typeof process == "object" && typeof process.versions == "object" && typeof process.versions.node == "string"; | ||
const MONO = {}, BINDING = {}, INTERNAL = {}, IMPORTS = {}; | ||
|
||
var fetch = fetch || undefined; var require = require || undefined; var __dirname = __dirname || ''; | ||
__dotnet_runtime.__setEmscriptenEntrypoint(createDotnetRuntime); | ||
const __initializeImportsAndExports = __dotnet_runtime.__initializeImportsAndExports; | ||
const __requirePromise = ENVIRONMENT_IS_NODE ? import(/* webpackIgnore: true */'module').then(mod => mod.createRequire(import.meta.url)) : undefined; | ||
const dotnet = __dotnet_runtime.moduleExports.dotnet; | ||
const exit = __dotnet_runtime.moduleExports.exit; | ||
export { dotnet, exit, INTERNAL }; | ||
var createEmscripten = createDotnetRuntime; | ||
var unifyModuleConfig = __dotnet_runtime.unifyModuleConfig; | ||
var earlyExports = __dotnet_runtime.earlyExports; | ||
export const dotnet = __dotnet_runtime.dotnet; | ||
export const exit = __dotnet_runtime.exit; |
Oops, something went wrong.