836c232a1c
* feat: add network-switcher lib * feat: add env variables for some deployed app urls * feat: add network processing to environment hoook * refactor: network handling * refactor: remove dialog from provider and add env setter * feat: add network switcher dialog to the trading app * refactor: add network redirect to dialog connect callback * fix: lint * feat: add network configuration files to static app * feat: update environments to use config file instead of static node url * refactor: split out network switcher utils * refactor: split up environment hook * fix: jsonify env variable for possible networks * fix: add formatter file * feat: add network loader component * feat: add network loader to the trading app * fix: assign correct global state to network swicther * feat: add status modal * feat: add network-switcher lib * feat: add env variables for some deployed app urls * feat: add network processing to environment hoook * refactor: network handling * refactor: remove dialog from provider and add env setter * feat: add network switcher dialog to the trading app * refactor: add network redirect to dialog connect callback * fix: lint * fix: jsonify env variable for possible networks * fix: add formatter file * fix: assign correct global state to network swicther * fix: failing tests from UI changes * feat: add environment validation * feat: add runtime validation for network configs * fix: readd node urls to envs to avoid breaking the apps for now * chore: rename network swicther lib to environmnet * fix: lint * feat: add tests for config hook * feat: add environment hook tests * fix: lint * fix: lint * feat: add environment hook tests * feat: add storage tests * fix: formet * feat: improve loading states * fix: format * fix: use router instead of window location * fix: rearrange network loader props and components * fix: remove FC type * fix: env validation * fix: untangle returns in network loader * fix: add teardown for env and localstorage * fix: add custom to env networks * fix: lint * fix: format * fix: lint * fix: remove env provider from simple trading app * fix: remove failing promise hacks * fix: some leftover format files * fix: remove network switcher from tsconf * fix: move Networks to libs/environment * fix: add defaults for ether env vars * feat: add tests for default ether env vars * fix: remove chain id env var from web3 container * fix: remove chain id from the environment * fix: format * fix: lint token * fix: lint env * fix: add comment to callout hack * fix: lint token again * fix: remove skip * fix: move addresses to token app * fix: improve schema validation errors and fix token app * fix: lint * fix: format * fix: format * fix: add network loaders to apps * fix: format * fix: remove logs * fix: cypress process errors * fix: change network loader hierarchy in token * fix: remove stray console.log * fix: revert test changes in simple trading app * fix: prefix env vars with NX Co-authored-by: Dexter Edwards <dexter.edwards93@gmail.com> * fix: improve schema validation errors and fix token app * fix: format * fix: disable lint rules for catch block any types * fix: format again * fix: remove redundant process.platform injections * fix: format * feat: add explorer footer * fix: format * feat: add custom executor for next * feat: adjust footer links and add custom executors * fix: lint and format * fix: format again * fix: add explicit github feedback url * fix: create footer lib * feat: add footer to token app * fix: add compiled file to ignore * fix: make lozenge styling more flexible when no variant specified * fix: remove schema duplication for third party executors * fix: add missing intent variant for the lozenge * fix: move commit hash in footer down two positions * fix: revert breaking schema removals * fix: format * chore: rename footer to network-info * fix: format Co-authored-by: Joe <joe@vega.xyz> Co-authored-by: Matthew Russell <mattrussell36@gmail.com> Co-authored-by: Dexter Edwards <dexter.edwards93@gmail.com>
360 lines
11 KiB
JSON
360 lines
11 KiB
JSON
{
|
|
"cli": "nx",
|
|
"id": "build",
|
|
"description": "Serves an app using @nrwl/web:webpack",
|
|
"type": "object",
|
|
"properties": {
|
|
"env": {
|
|
"type": "string",
|
|
"description": "Target environment to run the application in. This assumes an .env file present in the project's root in the following format: .env.{envName}"
|
|
},
|
|
"crossOrigin": {
|
|
"type": "string",
|
|
"description": "The `crossorigin` attribute to use for generated javascript script tags. One of 'none' | 'anonymous' | 'use-credentials'."
|
|
},
|
|
"main": {
|
|
"type": "string",
|
|
"description": "The name of the main entry-point file."
|
|
},
|
|
"tsConfig": {
|
|
"type": "string",
|
|
"description": "The name of the Typescript configuration file."
|
|
},
|
|
"compiler": {
|
|
"type": "string",
|
|
"description": "The compiler to use.",
|
|
"enum": ["babel", "swc"],
|
|
"default": "babel"
|
|
},
|
|
"outputPath": {
|
|
"type": "string",
|
|
"description": "The output path of the generated files."
|
|
},
|
|
"deleteOutputPath": {
|
|
"type": "boolean",
|
|
"description": "Delete the output path before building.",
|
|
"default": true
|
|
},
|
|
"watch": {
|
|
"type": "boolean",
|
|
"description": "Enable re-building when files change.",
|
|
"default": false
|
|
},
|
|
"baseHref": {
|
|
"type": "string",
|
|
"description": "Base url for the application being built."
|
|
},
|
|
"deployUrl": {
|
|
"type": "string",
|
|
"description": "URL where the application will be deployed."
|
|
},
|
|
"vendorChunk": {
|
|
"type": "boolean",
|
|
"description": "Use a separate bundle containing only vendor libraries.",
|
|
"default": true
|
|
},
|
|
"commonChunk": {
|
|
"type": "boolean",
|
|
"description": "Use a separate bundle containing code used across multiple bundles.",
|
|
"default": true
|
|
},
|
|
"runtimeChunk": {
|
|
"type": "boolean",
|
|
"description": "Use a separate bundle containing the runtime.",
|
|
"default": true
|
|
},
|
|
"sourceMap": {
|
|
"description": "Output sourcemaps. Use 'hidden' for use with error reporting tools without generating sourcemap comment.",
|
|
"default": true,
|
|
"oneOf": [
|
|
{
|
|
"type": "boolean"
|
|
},
|
|
{
|
|
"type": "string"
|
|
}
|
|
]
|
|
},
|
|
"progress": {
|
|
"type": "boolean",
|
|
"description": "Log progress to the console while building.",
|
|
"default": false
|
|
},
|
|
"assets": {
|
|
"type": "array",
|
|
"description": "List of static application assets.",
|
|
"default": [],
|
|
"items": {
|
|
"$ref": "#/definitions/assetPattern"
|
|
}
|
|
},
|
|
"index": {
|
|
"type": "string",
|
|
"description": "HTML File which will be contain the application."
|
|
},
|
|
"scripts": {
|
|
"type": "array",
|
|
"description": "External Scripts which will be included before the main application entry.",
|
|
"items": {
|
|
"$ref": "#/definitions/extraEntryPoint"
|
|
},
|
|
"default": []
|
|
},
|
|
"styles": {
|
|
"type": "array",
|
|
"description": "External Styles which will be included with the application",
|
|
"items": {
|
|
"$ref": "#/definitions/extraEntryPoint"
|
|
},
|
|
"default": []
|
|
},
|
|
"budgets": {
|
|
"description": "Budget thresholds to ensure parts of your application stay within boundaries which you set.",
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/budget"
|
|
},
|
|
"default": []
|
|
},
|
|
"namedChunks": {
|
|
"type": "boolean",
|
|
"description": "Names the produced bundles according to their entry file.",
|
|
"default": true
|
|
},
|
|
"outputHashing": {
|
|
"type": "string",
|
|
"description": "Define the output filename cache-busting hashing mode.",
|
|
"default": "none",
|
|
"enum": ["none", "all", "media", "bundles"]
|
|
},
|
|
"stylePreprocessorOptions": {
|
|
"description": "Options to pass to style preprocessors.",
|
|
"type": "object",
|
|
"properties": {
|
|
"includePaths": {
|
|
"description": "Paths to include. Paths will be resolved to project root.",
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
},
|
|
"default": []
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
},
|
|
"optimization": {
|
|
"description": "Enables optimization of the build output.",
|
|
"oneOf": [
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"scripts": {
|
|
"type": "boolean",
|
|
"description": "Enables optimization of the scripts output.",
|
|
"default": true
|
|
},
|
|
"styles": {
|
|
"type": "boolean",
|
|
"description": "Enables optimization of the styles output.",
|
|
"default": true
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
},
|
|
{
|
|
"type": "boolean"
|
|
}
|
|
]
|
|
},
|
|
"extractCss": {
|
|
"type": "boolean",
|
|
"description": "Extract CSS into a `.css` file.",
|
|
"default": false
|
|
},
|
|
"es2015Polyfills": {
|
|
"description": "Conditional polyfills loaded in browsers which do not support `ES2015`.",
|
|
"type": "string"
|
|
},
|
|
"subresourceIntegrity": {
|
|
"type": "boolean",
|
|
"description": "Enables the use of subresource integrity validation.",
|
|
"default": false
|
|
},
|
|
"polyfills": {
|
|
"type": "string",
|
|
"description": "Polyfills to load before application"
|
|
},
|
|
"verbose": {
|
|
"type": "boolean",
|
|
"description": "Emits verbose output",
|
|
"default": false
|
|
},
|
|
"statsJson": {
|
|
"type": "boolean",
|
|
"description": "Generates a 'stats.json' file which can be analyzed using tools such as: 'webpack-bundle-analyzer' or `<https://webpack.github.io/analyse>`.",
|
|
"default": false
|
|
},
|
|
"extractLicenses": {
|
|
"type": "boolean",
|
|
"description": "Extract all licenses in a separate file, in the case of production builds only.",
|
|
"default": false
|
|
},
|
|
"memoryLimit": {
|
|
"type": "number",
|
|
"description": "Memory limit for type checking service process in `MB`.",
|
|
"default": 2048
|
|
},
|
|
"maxWorkers": {
|
|
"type": "number",
|
|
"description": "Number of workers to use for type checking.",
|
|
"default": 2
|
|
},
|
|
"fileReplacements": {
|
|
"description": "Replace files with other files in the build.",
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"replace": {
|
|
"type": "string",
|
|
"description": "The file to be replaced."
|
|
},
|
|
"with": {
|
|
"type": "string",
|
|
"description": "The file to replace with."
|
|
}
|
|
},
|
|
"additionalProperties": false,
|
|
"required": ["replace", "with"]
|
|
},
|
|
"default": []
|
|
},
|
|
"buildLibsFromSource": {
|
|
"type": "boolean",
|
|
"description": "Read buildable libraries from source instead of building them separately.",
|
|
"default": true
|
|
},
|
|
"generateIndexHtml": {
|
|
"type": "boolean",
|
|
"description": "Generates `index.html` file to the output path. This can be turned off if using a webpack plugin to generate HTML such as `html-webpack-plugin`.",
|
|
"default": true
|
|
},
|
|
"postcssConfig": {
|
|
"type": "string",
|
|
"description": "Set a path to PostCSS config that applies to the app and all libs. Defaults to `undefined`, which auto-detects postcss.config.js files in each `app`/`lib` directory."
|
|
},
|
|
"webpackConfig": {
|
|
"type": "string",
|
|
"description": "Path to a function which takes a webpack config, some context and returns the resulting webpack config. See https://nx.dev/guides/customize-webpack"
|
|
}
|
|
},
|
|
"required": ["tsConfig", "main", "index"],
|
|
"definitions": {
|
|
"assetPattern": {
|
|
"oneOf": [
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"glob": {
|
|
"type": "string",
|
|
"description": "The pattern to match."
|
|
},
|
|
"input": {
|
|
"type": "string",
|
|
"description": "The input directory path in which to apply 'glob'. Defaults to the project root."
|
|
},
|
|
"ignore": {
|
|
"description": "An array of globs to ignore.",
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"output": {
|
|
"type": "string",
|
|
"description": "Absolute path within the output."
|
|
}
|
|
},
|
|
"additionalProperties": false,
|
|
"required": ["glob", "input", "output"]
|
|
},
|
|
{
|
|
"type": "string"
|
|
}
|
|
]
|
|
},
|
|
"budget": {
|
|
"type": "object",
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"description": "The type of budget.",
|
|
"enum": ["all", "allScript", "any", "anyScript", "bundle", "initial"]
|
|
},
|
|
"name": {
|
|
"type": "string",
|
|
"description": "The name of the bundle."
|
|
},
|
|
"baseline": {
|
|
"type": "string",
|
|
"description": "The baseline size for comparison."
|
|
},
|
|
"maximumWarning": {
|
|
"type": "string",
|
|
"description": "The maximum threshold for warning relative to the baseline."
|
|
},
|
|
"maximumError": {
|
|
"type": "string",
|
|
"description": "The maximum threshold for error relative to the baseline."
|
|
},
|
|
"minimumWarning": {
|
|
"type": "string",
|
|
"description": "The minimum threshold for warning relative to the baseline."
|
|
},
|
|
"minimumError": {
|
|
"type": "string",
|
|
"description": "The minimum threshold for error relative to the baseline."
|
|
},
|
|
"warning": {
|
|
"type": "string",
|
|
"description": "The threshold for warning relative to the baseline (min & max)."
|
|
},
|
|
"error": {
|
|
"type": "string",
|
|
"description": "The threshold for error relative to the baseline (min & max)."
|
|
}
|
|
},
|
|
"additionalProperties": false,
|
|
"required": ["type"]
|
|
},
|
|
"extraEntryPoint": {
|
|
"oneOf": [
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"input": {
|
|
"type": "string",
|
|
"description": "The file to include."
|
|
},
|
|
"bundleName": {
|
|
"type": "string",
|
|
"description": "The bundle name for this extra entry point."
|
|
},
|
|
"inject": {
|
|
"type": "boolean",
|
|
"description": "If the bundle will be referenced in the HTML file.",
|
|
"default": true
|
|
}
|
|
},
|
|
"additionalProperties": false,
|
|
"required": ["input"]
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "The file to include."
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|