Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
25e42582da | ||
|
|
721009bec8 |
@@ -4,8 +4,6 @@
|
||||
/dist
|
||||
/tmp
|
||||
/out-tsc
|
||||
/tools/executors/**/*.js
|
||||
/tools/utils/*.js
|
||||
|
||||
# dependencies
|
||||
/node_modules
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
{
|
||||
"name": "explorer-e2e",
|
||||
"$schema": "../../node_modules/nx/schemas/project-schema.json",
|
||||
"sourceRoot": "apps/explorer-e2e/src",
|
||||
"projectType": "application",
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
{
|
||||
"name": "explorer",
|
||||
"$schema": "../../node_modules/nx/schemas/project-schema.json",
|
||||
"sourceRoot": "apps/explorer/src",
|
||||
"projectType": "application",
|
||||
"targets": {
|
||||
"build": {
|
||||
"executor": "./tools/executors/webpack:build",
|
||||
"outputs": ["{options.outputPath}"],
|
||||
"defaultConfiguration": "production",
|
||||
"options": {
|
||||
@@ -38,7 +38,6 @@
|
||||
}
|
||||
},
|
||||
"serve": {
|
||||
"executor": "./tools/executors/webpack:serve",
|
||||
"options": {
|
||||
"port": 3000,
|
||||
"buildTarget": "explorer:build:development",
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
{
|
||||
"name": "governance-e2e",
|
||||
"$schema": "../../node_modules/nx/schemas/project-schema.json",
|
||||
"sourceRoot": "apps/governance-e2e/src",
|
||||
"projectType": "application",
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
{
|
||||
"name": "governance",
|
||||
"$schema": "../../node_modules/nx/schemas/project-schema.json",
|
||||
"sourceRoot": "apps/governance/src",
|
||||
"projectType": "application",
|
||||
"targets": {
|
||||
"build": {
|
||||
"executor": "./tools/executors/webpack:build",
|
||||
"outputs": ["{options.outputPath}"],
|
||||
"defaultConfiguration": "production",
|
||||
"options": {
|
||||
@@ -41,7 +41,6 @@
|
||||
}
|
||||
},
|
||||
"serve": {
|
||||
"executor": "./tools/executors/webpack:serve",
|
||||
"options": {
|
||||
"port": 4210,
|
||||
"buildTarget": "governance:build:development",
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
{
|
||||
"name": "liquidity-provision-dashboard",
|
||||
"$schema": "../../node_modules/nx/schemas/project-schema.json",
|
||||
"sourceRoot": "apps/liquidity-provision-dashboard/src",
|
||||
"projectType": "application",
|
||||
@@ -47,7 +48,6 @@
|
||||
}
|
||||
},
|
||||
"serve": {
|
||||
"executor": "./tools/executors/webpack:serve",
|
||||
"options": {
|
||||
"buildTarget": "liquidity-provision-dashboard:build",
|
||||
"hmr": true,
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
{
|
||||
"name": "multisig-signer",
|
||||
"$schema": "../../node_modules/nx/schemas/project-schema.json",
|
||||
"sourceRoot": "apps/multisig-signer/src",
|
||||
"projectType": "application",
|
||||
"targets": {
|
||||
"build": {
|
||||
"executor": "./tools/executors/webpack:build",
|
||||
"outputs": ["{options.outputPath}"],
|
||||
"defaultConfiguration": "production",
|
||||
"options": {
|
||||
@@ -38,7 +38,6 @@
|
||||
}
|
||||
},
|
||||
"serve": {
|
||||
"executor": "./tools/executors/webpack:serve",
|
||||
"options": {
|
||||
"port": 3000,
|
||||
"buildTarget": "multisig-signer:build:development",
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
{
|
||||
"name": "static",
|
||||
"$schema": "../../node_modules/nx/schemas/project-schema.json",
|
||||
"projectType": "application",
|
||||
"sourceRoot": "apps/static/src",
|
||||
"tags": [],
|
||||
"targets": {
|
||||
"build": {
|
||||
"executor": "./tools/executors/webpack:build",
|
||||
"outputs": ["{options.outputPath}"],
|
||||
"defaultConfiguration": "production",
|
||||
"options": {
|
||||
@@ -36,7 +36,6 @@
|
||||
}
|
||||
},
|
||||
"serve": {
|
||||
"executor": "./tools/executors/webpack:serve",
|
||||
"options": {
|
||||
"buildTarget": "static:build"
|
||||
},
|
||||
|
||||
+1
@@ -0,0 +1 @@
|
||||
apps/trading-e2e/.env.capsule
|
||||
+1
@@ -0,0 +1 @@
|
||||
apps/trading-e2e/.env.stagnet3
|
||||
@@ -1,4 +1,5 @@
|
||||
{
|
||||
"name": "trading-e2e",
|
||||
"$schema": "../../node_modules/nx/schemas/project-schema.json",
|
||||
"sourceRoot": "apps/trading-e2e/src",
|
||||
"projectType": "application",
|
||||
@@ -15,7 +16,9 @@
|
||||
},
|
||||
"live": {
|
||||
"devServerTarget": ""
|
||||
}
|
||||
},
|
||||
"capsule": {},
|
||||
"stagnet3": {}
|
||||
}
|
||||
},
|
||||
"lint": {
|
||||
|
||||
@@ -1,17 +1,6 @@
|
||||
NX_ETHEREUM_PROVIDER_URL=https://sepolia.infura.io/v3/4f846e79e13f44d1b51bbd7ed9edefb8
|
||||
NX_ETHERSCAN_URL=https://sepolia.etherscan.io
|
||||
NX_GITHUB_FEEDBACK_URL=https://github.com/vegaprotocol/feedback/discussions
|
||||
NX_HOSTED_WALLET_URL=https://wallet.testnet.vega.xyz
|
||||
NX_VEGA_CONFIG_URL=''
|
||||
NX_VEGA_ENV=CUSTOM
|
||||
NX_VEGA_EXPLORER_URL=https://stagnet3.explorer.vega.xyz
|
||||
NX_VEGA_NETWORKS={\"TESTNET\":\"https://console.fairground.wtf\",\"STAGNET1\":\"https://stagnet1.console.vega.xyz\",\"STAGNET3\":\"https://stagnet3.console.vega.xyz\"}
|
||||
NX_VEGA_TOKEN_URL=https://token.fairground.wtf
|
||||
NX_VEGA_URL=http://localhost:3028/query
|
||||
NX_VEGA_WALLET_URL=http://localhost:1789
|
||||
NX_VEGA_DOCS_URL=https://docs.vega.xyz/testnet
|
||||
NX_VEGA_REPO_URL=https://github.com/vegaprotocol/vega/releases
|
||||
NX_ANNOUNCEMENTS_CONFIG_URL=https://raw.githubusercontent.com/vegaprotocol/announcements/fairground/announcements.json
|
||||
|
||||
NX_ETH_LOCAL_PROVIDER_URL=http://localhost:8545/
|
||||
NX_ETH_WALLET_MNEMONIC="ozone access unlock valid olympic save include omit supply green clown session"
|
||||
@@ -1,14 +1,4 @@
|
||||
NX_ETHEREUM_PROVIDER_URL=https://sepolia.infura.io/v3/4f846e79e13f44d1b51bbd7ed9edefb8
|
||||
NX_ETHERSCAN_URL=https://sepolia.etherscan.io
|
||||
NX_GITHUB_FEEDBACK_URL=https://github.com/vegaprotocol/feedback/discussions
|
||||
NX_HOSTED_WALLET_URL=https://wallet.testnet.vega.xyz
|
||||
NX_VEGA_CONFIG_URL=https://raw.githubusercontent.com/vegaprotocol/networks-internal/main/devnet1/vegawallet-devnet1.toml
|
||||
NX_VEGA_ENV=DEVNET
|
||||
NX_VEGA_EXPLORER_URL=https://dev.explorer.vega.xyz
|
||||
NX_VEGA_NETWORKS={\"TESTNET\":\"https://console.fairground.wtf\",\"STAGNET1\":\"https://stagnet1.console.vega.xyz\",\"STAGNET3\":\"https://stagnet3.console.vega.xyz\"}
|
||||
NX_VEGA_TOKEN_URL=https://token.fairground.wtf
|
||||
NX_VEGA_WALLET_URL=http://localhost:1789
|
||||
NX_VEGA_DOCS_URL=https://docs.vega.xyz/testnet
|
||||
NX_VEGA_REPO_URL=https://github.com/vegaprotocol/vega-dev-releases/releases
|
||||
NX_ANNOUNCEMENTS_CONFIG_URL=https://raw.githubusercontent.com/vegaprotocol/announcements/fairground/announcements.json
|
||||
NX_VEGA_INCIDENT_URL=https://blog.vega.xyz/tagged/vega-incident-reports
|
||||
|
||||
Symlink
+1
@@ -0,0 +1 @@
|
||||
.env.capsule
|
||||
Symlink
+1
@@ -0,0 +1 @@
|
||||
.env.devnet
|
||||
Symlink
+1
@@ -0,0 +1 @@
|
||||
.env.mainnet
|
||||
+1
@@ -0,0 +1 @@
|
||||
.env.stagnet1
|
||||
+1
@@ -0,0 +1 @@
|
||||
.env.stagnet3
|
||||
Symlink
+1
@@ -0,0 +1 @@
|
||||
.env.testnet
|
||||
@@ -0,0 +1 @@
|
||||
.env.validator-testnet
|
||||
@@ -1,13 +1,8 @@
|
||||
NX_ETHEREUM_PROVIDER_URL=https://mainnet.infura.io/v3/4f846e79e13f44d1b51bbd7ed9edefb8
|
||||
NX_ETHERSCAN_URL=https://etherscan.io
|
||||
NX_GITHUB_FEEDBACK_URL=https://github.com/vegaprotocol/feedback/discussions
|
||||
NX_VEGA_CONFIG_URL=https://raw.githubusercontent.com/vegaprotocol/networks/master/mainnet1/mainnet1.toml
|
||||
NX_VEGA_ENV=MAINNET
|
||||
NX_VEGA_EXPLORER_URL=https://explorer.vega.xyz
|
||||
NX_VEGA_NETWORKS={\"MAINNET\":\"https://alpha.console.vega.xyz\",\"TESTNET\":\"https://console.fairground.wtf\",\"STAGNET1\":\"https://stagnet1.console.vega.xyz\",\"STAGNET3\":\"https://stagnet3.console.vega.xyz\"}
|
||||
NX_VEGA_TOKEN_URL=https://token.vega.xyz
|
||||
NX_VEGA_WALLET_URL=http://localhost:1789
|
||||
NX_VEGA_DOCS_URL=https://docs.vega.xyz/mainnet
|
||||
NX_VEGA_REPO_URL=https://github.com/vegaprotocol/vega/releases
|
||||
NX_ANNOUNCEMENTS_CONFIG_URL=https://raw.githubusercontent.com/vegaprotocol/announcements/mainnet/announcements.json
|
||||
NX_VEGA_INCIDENT_URL=https://blog.vega.xyz/tagged/vega-incident-reports
|
||||
|
||||
Symlink
+1
@@ -0,0 +1 @@
|
||||
.env.capsule
|
||||
Symlink
+1
@@ -0,0 +1 @@
|
||||
.env.devnet
|
||||
Symlink
+1
@@ -0,0 +1 @@
|
||||
.env.mainnet
|
||||
Symlink
+1
@@ -0,0 +1 @@
|
||||
.env.stagnet1
|
||||
Symlink
+1
@@ -0,0 +1 @@
|
||||
.env.stagnet3
|
||||
Symlink
+1
@@ -0,0 +1 @@
|
||||
.env.testnet
|
||||
@@ -0,0 +1 @@
|
||||
.env.validator-testnet
|
||||
@@ -1,14 +1,4 @@
|
||||
NX_ETHEREUM_PROVIDER_URL=https://sepolia.infura.io/v3/4f846e79e13f44d1b51bbd7ed9edefb8
|
||||
NX_ETHERSCAN_URL=https://sepolia.etherscan.io
|
||||
NX_GITHUB_FEEDBACK_URL=https://github.com/vegaprotocol/feedback/discussions
|
||||
NX_HOSTED_WALLET_URL=https://wallet.testnet.vega.xyz
|
||||
NX_VEGA_CONFIG_URL=https://raw.githubusercontent.com/vegaprotocol/networks-internal/main/stagnet1/vegawallet-stagnet1.toml
|
||||
NX_VEGA_ENV=STAGNET1
|
||||
NX_VEGA_EXPLORER_URL=https://stagnet1.explorer.vega.xyz
|
||||
NX_VEGA_NETWORKS={\"TESTNET\":\"https://console.fairground.wtf\",\"STAGNET1\":\"https://stagnet1.console.vega.xyz\",\"STAGNET3\":\"https://stagnet3.console.vega.xyz\"}
|
||||
NX_VEGA_TOKEN_URL=https://stagnet1.token.vega.xyz
|
||||
NX_VEGA_WALLET_URL=http://localhost:1789
|
||||
NX_VEGA_DOCS_URL=https://docs.vega.xyz/testnet
|
||||
NX_VEGA_REPO_URL=https://github.com/vegaprotocol/vega/releases
|
||||
NX_ANNOUNCEMENTS_CONFIG_URL=https://raw.githubusercontent.com/vegaprotocol/announcements/fairground/announcements.json
|
||||
NX_VEGA_INCIDENT_URL=https://blog.vega.xyz/tagged/vega-incident-reports
|
||||
@@ -1,14 +1,4 @@
|
||||
NX_ETHEREUM_PROVIDER_URL=https://sepolia.infura.io/v3/4f846e79e13f44d1b51bbd7ed9edefb8
|
||||
NX_ETHERSCAN_URL=https://sepolia.etherscan.io
|
||||
NX_GITHUB_FEEDBACK_URL=https://github.com/vegaprotocol/feedback/discussions
|
||||
NX_HOSTED_WALLET_URL=https://wallet.testnet.vega.xyz
|
||||
NX_VEGA_CONFIG_URL=https://raw.githubusercontent.com/vegaprotocol/networks-internal/main/stagnet3/vegawallet-stagnet3.toml
|
||||
NX_VEGA_ENV=STAGNET3
|
||||
NX_VEGA_EXPLORER_URL=https://stagnet3.explorer.vega.xyz
|
||||
NX_VEGA_NETWORKS={\"TESTNET\":\"https://console.fairground.wtf\",\"STAGNET1\":\"https://stagnet1.console.vega.xyz\",\"STAGNET3\":\"https://stagnet3.console.vega.xyz\"}
|
||||
NX_VEGA_TOKEN_URL=https://token.fairground.wtf
|
||||
NX_VEGA_WALLET_URL=http://localhost:1789
|
||||
NX_VEGA_DOCS_URL=https://docs.vega.xyz/testnet
|
||||
NX_VEGA_REPO_URL=https://github.com/vegaprotocol/vega-dev-releases/releases
|
||||
NX_ANNOUNCEMENTS_CONFIG_URL=https://raw.githubusercontent.com/vegaprotocol/announcements/fairground/announcements.json
|
||||
NX_VEGA_INCIDENT_URL=https://blog.vega.xyz/tagged/vega-incident-reports
|
||||
@@ -1,14 +1,3 @@
|
||||
NX_ETHEREUM_PROVIDER_URL=https://sepolia.infura.io/v3/4f846e79e13f44d1b51bbd7ed9edefb8
|
||||
NX_ETHERSCAN_URL=https://sepolia.etherscan.io
|
||||
NX_GITHUB_FEEDBACK_URL=https://github.com/vegaprotocol/feedback/discussions
|
||||
NX_HOSTED_WALLET_URL=https://wallet.testnet.vega.xyz
|
||||
NX_VEGA_CONFIG_URL=https://raw.githubusercontent.com/vegaprotocol/networks-internal/main/fairground/vegawallet-fairground.toml
|
||||
NX_VEGA_ENV=TESTNET
|
||||
NX_VEGA_EXPLORER_URL=https://explorer.fairground.wtf
|
||||
NX_VEGA_NETWORKS={\"TESTNET\":\"https://console.fairground.wtf\",\"STAGNET1\":\"https://stagnet1.console.vega.xyz\",\"STAGNET3\":\"https://stagnet3.console.vega.xyz\"}
|
||||
NX_VEGA_TOKEN_URL=https://token.fairground.wtf
|
||||
NX_VEGA_WALLET_URL=http://localhost:1789
|
||||
NX_VEGA_DOCS_URL=https://docs.vega.xyz/testnet
|
||||
NX_VEGA_REPO_URL=https://github.com/vegaprotocol/vega/releases
|
||||
NX_ANNOUNCEMENTS_CONFIG_URL=https://raw.githubusercontent.com/vegaprotocol/announcements/fairground/announcements.json
|
||||
NX_VEGA_INCIDENT_URL=https://blog.vega.xyz/tagged/vega-incident-reports
|
||||
@@ -1,14 +1,4 @@
|
||||
NX_ETHEREUM_PROVIDER_URL=https://sepolia.infura.io/v3/4f846e79e13f44d1b51bbd7ed9edefb8
|
||||
NX_ETHERSCAN_URL=https://sepolia.etherscan.io
|
||||
NX_GITHUB_FEEDBACK_URL=https://github.com/vegaprotocol/feedback/discussions
|
||||
NX_HOSTED_WALLET_URL=https://wallet.testnet.vega.xyz
|
||||
NX_VEGA_CONFIG_URL=https://raw.githubusercontent.com/vegaprotocol/networks/master/testnet2/testnet2.toml
|
||||
NX_VEGA_ENV=VALIDATOR_TESTNET
|
||||
NX_VEGA_EXPLORER_URL=https://validator-testnet.explorer.vega.xyz
|
||||
NX_VEGA_NETWORKS={\"STAGNET3\":\"https://stagnet3.console.vega.xyz\",\"STAGNET1\":\"https://stagnet1.console.vega.xyz\",\"TESTNET\":\"https://console.fairground.wtf\"}
|
||||
NX_VEGA_TOKEN_URL=https://validator-testnet.governance.fairground.wtf
|
||||
NX_VEGA_WALLET_URL=http://localhost:1789
|
||||
NX_VEGA_DOCS_URL=https://docs.vega.xyz/testnet
|
||||
NX_VEGA_REPO_URL=https://github.com/vegaprotocol/vega/releases
|
||||
NX_ANNOUNCEMENTS_CONFIG_URL=https://raw.githubusercontent.com/vegaprotocol/announcements/fairground/announcements.json
|
||||
NX_VEGA_INCIDENT_URL=https://blog.vega.xyz/tagged/vega-incident-reports
|
||||
@@ -1,10 +1,11 @@
|
||||
{
|
||||
"name": "trading",
|
||||
"$schema": "../../node_modules/nx/schemas/project-schema.json",
|
||||
"sourceRoot": "apps/trading",
|
||||
"projectType": "application",
|
||||
"targets": {
|
||||
"build": {
|
||||
"executor": "./tools/executors/next:build",
|
||||
"executor": "@nrwl/next:build",
|
||||
"outputs": ["{options.outputPath}"],
|
||||
"defaultConfiguration": "production",
|
||||
"options": {
|
||||
@@ -15,11 +16,18 @@
|
||||
"production": {
|
||||
"optimization": true,
|
||||
"sourceMap": true
|
||||
}
|
||||
},
|
||||
"capsule": {},
|
||||
"devnet": {},
|
||||
"mainnet": {},
|
||||
"stagnet1": {},
|
||||
"stagnet3": {},
|
||||
"testnet": {},
|
||||
"validator-testnet": {}
|
||||
}
|
||||
},
|
||||
"serve": {
|
||||
"executor": "./tools/executors/next:serve",
|
||||
"executor": "@nrwl/next:server",
|
||||
"options": {
|
||||
"buildTarget": "trading:build",
|
||||
"dev": true
|
||||
@@ -28,13 +36,29 @@
|
||||
"production": {
|
||||
"buildTarget": "trading:build:production",
|
||||
"dev": false
|
||||
}
|
||||
},
|
||||
"capsule": {},
|
||||
"devnet": {},
|
||||
"mainnet": {},
|
||||
"stagnet1": {},
|
||||
"stagnet3": {},
|
||||
"testnet": {},
|
||||
"validator-testnet": {}
|
||||
}
|
||||
},
|
||||
"export": {
|
||||
"executor": "./tools/executors/next:export",
|
||||
"executor": "@nrwl/next:export",
|
||||
"options": {
|
||||
"buildTarget": "trading:build:production"
|
||||
},
|
||||
"configurations": {
|
||||
"capsule": {},
|
||||
"devnet": {},
|
||||
"mainnet": {},
|
||||
"stagnet1": {},
|
||||
"stagnet3": {},
|
||||
"testnet": {},
|
||||
"validator-testnet": {}
|
||||
}
|
||||
},
|
||||
"test": {
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
{
|
||||
"name": "accounts",
|
||||
"$schema": "../../node_modules/nx/schemas/project-schema.json",
|
||||
"sourceRoot": "libs/accounts/src",
|
||||
"projectType": "library",
|
||||
"tags": [],
|
||||
"targets": {
|
||||
"build": {
|
||||
"executor": "@nrwl/web:rollup",
|
||||
"executor": "@nrwl/rollup:rollup",
|
||||
"outputs": ["{options.outputPath}"],
|
||||
"options": {
|
||||
"outputPath": "dist/libs/accounts",
|
||||
|
||||
@@ -1,123 +0,0 @@
|
||||
import type { Story, Meta } from '@storybook/react';
|
||||
import { AccountType } from '@vegaprotocol/types';
|
||||
import { getAccountData } from './accounts-data-provider';
|
||||
import { AccountTable } from './accounts-table';
|
||||
|
||||
export default {
|
||||
component: AccountTable,
|
||||
title: 'AccountsTable',
|
||||
} as Meta;
|
||||
|
||||
const Template: Story = (args) => (
|
||||
<AccountTable data={args.data} onClickAsset={() => null} />
|
||||
);
|
||||
|
||||
export const Primary = Template.bind({});
|
||||
Primary.args = {
|
||||
data: getAccountData([
|
||||
{
|
||||
__typename: 'AccountBalance',
|
||||
type: AccountType.ACCOUNT_TYPE_MARGIN,
|
||||
balance: '2781397',
|
||||
market: {
|
||||
__typename: 'Market',
|
||||
id: 'd90fd7c746286625504d7a3f5f420a280875acd3cd611676d9e70acc675f4540',
|
||||
tradableInstrument: {
|
||||
__typename: 'TradableInstrument',
|
||||
instrument: {
|
||||
__typename: 'Instrument',
|
||||
name: 'Tesla Quarterly (30 Jun 2022)',
|
||||
},
|
||||
},
|
||||
},
|
||||
asset: {
|
||||
__typename: 'Asset',
|
||||
id: '8b52d4a3a4b0ffe733cddbc2b67be273816cfeb6ca4c8b339bac03ffba08e4e4',
|
||||
symbol: 'tEURO',
|
||||
decimals: 5,
|
||||
},
|
||||
},
|
||||
{
|
||||
__typename: 'AccountBalance',
|
||||
type: AccountType.ACCOUNT_TYPE_MARGIN,
|
||||
balance: '406922',
|
||||
market: {
|
||||
__typename: 'Market',
|
||||
id: '9c1ee71959e566c484fcea796513137f8a02219cca2e973b7ae72dc29d099581',
|
||||
tradableInstrument: {
|
||||
__typename: 'TradableInstrument',
|
||||
instrument: {
|
||||
__typename: 'Instrument',
|
||||
name: 'AAVEDAI Monthly (30 Jun 2022)',
|
||||
},
|
||||
},
|
||||
},
|
||||
asset: {
|
||||
__typename: 'Asset',
|
||||
id: '6d9d35f657589e40ddfb448b7ad4a7463b66efb307527fedd2aa7df1bbd5ea61',
|
||||
symbol: 'tDAI',
|
||||
decimals: 5,
|
||||
},
|
||||
},
|
||||
{
|
||||
__typename: 'AccountBalance',
|
||||
type: AccountType.ACCOUNT_TYPE_GENERAL,
|
||||
balance: '10001000000',
|
||||
market: null,
|
||||
asset: {
|
||||
__typename: 'Asset',
|
||||
id: 'XYZalpha',
|
||||
symbol: 'XYZalpha',
|
||||
decimals: 5,
|
||||
},
|
||||
},
|
||||
{
|
||||
__typename: 'AccountBalance',
|
||||
type: AccountType.ACCOUNT_TYPE_GENERAL,
|
||||
balance: '1990351587',
|
||||
market: null,
|
||||
asset: {
|
||||
__typename: 'Asset',
|
||||
id: '993ed98f4f770d91a796faab1738551193ba45c62341d20597df70fea6704ede',
|
||||
symbol: 'tUSDC',
|
||||
decimals: 5,
|
||||
},
|
||||
},
|
||||
{
|
||||
__typename: 'AccountBalance',
|
||||
type: AccountType.ACCOUNT_TYPE_GENERAL,
|
||||
balance: '2996218603',
|
||||
market: null,
|
||||
asset: {
|
||||
__typename: 'Asset',
|
||||
id: '8b52d4a3a4b0ffe733cddbc2b67be273816cfeb6ca4c8b339bac03ffba08e4e4',
|
||||
symbol: 'tEURO',
|
||||
decimals: 5,
|
||||
},
|
||||
},
|
||||
{
|
||||
__typename: 'AccountBalance',
|
||||
type: AccountType.ACCOUNT_TYPE_GENERAL,
|
||||
balance: '5000593078',
|
||||
market: null,
|
||||
asset: {
|
||||
__typename: 'Asset',
|
||||
id: '6d9d35f657589e40ddfb448b7ad4a7463b66efb307527fedd2aa7df1bbd5ea61',
|
||||
symbol: 'tDAI',
|
||||
decimals: 5,
|
||||
},
|
||||
},
|
||||
{
|
||||
__typename: 'AccountBalance',
|
||||
type: AccountType.ACCOUNT_TYPE_GENERAL,
|
||||
balance: '4000000000000001006031',
|
||||
market: null,
|
||||
asset: {
|
||||
__typename: 'Asset',
|
||||
id: '5cfa87844724df6069b94e4c8a6f03af21907d7bc251593d08e4251043ee9f7c',
|
||||
symbol: 'tBTC',
|
||||
decimals: 5,
|
||||
},
|
||||
},
|
||||
]),
|
||||
};
|
||||
@@ -1,11 +1,12 @@
|
||||
{
|
||||
"name": "announcements",
|
||||
"$schema": "../../node_modules/nx/schemas/project-schema.json",
|
||||
"sourceRoot": "libs/announcements/src",
|
||||
"projectType": "library",
|
||||
"tags": [],
|
||||
"targets": {
|
||||
"build": {
|
||||
"executor": "@nrwl/web:rollup",
|
||||
"executor": "@nrwl/rollup:rollup",
|
||||
"outputs": ["{options.outputPath}"],
|
||||
"options": {
|
||||
"outputPath": "dist/libs/accounts",
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
{
|
||||
"name": "apollo-client",
|
||||
"$schema": "../../node_modules/nx/schemas/project-schema.json",
|
||||
"sourceRoot": "libs/apollo-client/src",
|
||||
"projectType": "library",
|
||||
"targets": {
|
||||
"build": {
|
||||
"executor": "@nrwl/web:rollup",
|
||||
"executor": "@nrwl/rollup:rollup",
|
||||
"outputs": ["{options.outputPath}"],
|
||||
"options": {
|
||||
"outputPath": "dist/libs/apollo-client",
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
{
|
||||
"name": "assets",
|
||||
"$schema": "../../node_modules/nx/schemas/project-schema.json",
|
||||
"sourceRoot": "libs/assets/src",
|
||||
"projectType": "library",
|
||||
"tags": [],
|
||||
"targets": {
|
||||
"build": {
|
||||
"executor": "@nrwl/web:rollup",
|
||||
"executor": "@nrwl/rollup:rollup",
|
||||
"outputs": ["{options.outputPath}"],
|
||||
"options": {
|
||||
"outputPath": "dist/libs/assets",
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
{
|
||||
"name": "candles-chart",
|
||||
"$schema": "../../node_modules/nx/schemas/project-schema.json",
|
||||
"sourceRoot": "libs/candles-chart/src",
|
||||
"projectType": "library",
|
||||
"tags": [],
|
||||
"targets": {
|
||||
"build": {
|
||||
"executor": "@nrwl/web:rollup",
|
||||
"executor": "@nrwl/rollup:rollup",
|
||||
"outputs": ["{options.outputPath}"],
|
||||
"options": {
|
||||
"outputPath": "dist/libs/candles-chart",
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
{
|
||||
"name": "cypress",
|
||||
"$schema": "../../node_modules/nx/schemas/project-schema.json",
|
||||
"sourceRoot": "libs/cypress/src",
|
||||
"projectType": "library",
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
{
|
||||
"name": "datagrid",
|
||||
"$schema": "../../node_modules/nx/schemas/project-schema.json",
|
||||
"sourceRoot": "libs/datagrid/src",
|
||||
"projectType": "library",
|
||||
"tags": [],
|
||||
"targets": {
|
||||
"build": {
|
||||
"executor": "@nrwl/web:rollup",
|
||||
"executor": "@nrwl/rollup:rollup",
|
||||
"outputs": ["{options.outputPath}"],
|
||||
"options": {
|
||||
"outputPath": "dist/libs/datagrid",
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
{
|
||||
"name": "deal-ticket",
|
||||
"$schema": "../../node_modules/nx/schemas/project-schema.json",
|
||||
"sourceRoot": "libs/deal-ticket/src",
|
||||
"projectType": "library",
|
||||
"tags": [],
|
||||
"targets": {
|
||||
"build": {
|
||||
"executor": "@nrwl/web:rollup",
|
||||
"executor": "@nrwl/rollup:rollup",
|
||||
"outputs": ["{options.outputPath}"],
|
||||
"options": {
|
||||
"outputPath": "dist/libs/deal-ticket",
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
{
|
||||
"name": "deposits",
|
||||
"$schema": "../../node_modules/nx/schemas/project-schema.json",
|
||||
"sourceRoot": "libs/deposits/src",
|
||||
"projectType": "library",
|
||||
"tags": [],
|
||||
"targets": {
|
||||
"build": {
|
||||
"executor": "@nrwl/web:rollup",
|
||||
"executor": "@nrwl/rollup:rollup",
|
||||
"outputs": ["{options.outputPath}"],
|
||||
"options": {
|
||||
"outputPath": "dist/libs/deposits",
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
{
|
||||
"name": "environment",
|
||||
"$schema": "../../node_modules/nx/schemas/project-schema.json",
|
||||
"sourceRoot": "libs/environment/src",
|
||||
"projectType": "library",
|
||||
"tags": [],
|
||||
"targets": {
|
||||
"build": {
|
||||
"executor": "@nrwl/web:rollup",
|
||||
"executor": "@nrwl/rollup:rollup",
|
||||
"outputs": ["{options.outputPath}"],
|
||||
"options": {
|
||||
"outputPath": "dist/libs/environment",
|
||||
|
||||
@@ -37,6 +37,7 @@ export const getMockStatisticsResult = (
|
||||
__typename: 'Statistics',
|
||||
chainId: `${env.toLowerCase()}-0123`,
|
||||
blockHeight: '11',
|
||||
vegaTime: '',
|
||||
},
|
||||
});
|
||||
|
||||
@@ -45,6 +46,7 @@ export const getMockQueryResult = (env: Networks): StatisticsQuery => ({
|
||||
__typename: 'Statistics',
|
||||
chainId: `${env.toLowerCase()}-0123`,
|
||||
blockHeight: '11',
|
||||
vegaTime: '',
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
{
|
||||
"name": "fills",
|
||||
"$schema": "../../node_modules/nx/schemas/project-schema.json",
|
||||
"sourceRoot": "libs/fills/src",
|
||||
"projectType": "library",
|
||||
"tags": [],
|
||||
"targets": {
|
||||
"build": {
|
||||
"executor": "@nrwl/web:rollup",
|
||||
"executor": "@nrwl/rollup:rollup",
|
||||
"outputs": ["{options.outputPath}"],
|
||||
"options": {
|
||||
"outputPath": "dist/libs/fills",
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
{
|
||||
"name": "i18n",
|
||||
"$schema": "../../node_modules/nx/schemas/project-schema.json",
|
||||
"sourceRoot": "libs/i18n/src",
|
||||
"projectType": "library",
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
{
|
||||
"name": "ledger",
|
||||
"$schema": "../../node_modules/nx/schemas/project-schema.json",
|
||||
"sourceRoot": "libs/ledger/src",
|
||||
"projectType": "library",
|
||||
"targets": {
|
||||
"build": {
|
||||
"executor": "@nrwl/web:rollup",
|
||||
"executor": "@nrwl/rollup:rollup",
|
||||
"outputs": ["{options.outputPath}"],
|
||||
"options": {
|
||||
"outputPath": "dist/libs/ledger",
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
{
|
||||
"name": "liquidity",
|
||||
"$schema": "../../node_modules/nx/schemas/project-schema.json",
|
||||
"sourceRoot": "libs/liquidity/src",
|
||||
"projectType": "library",
|
||||
"tags": [],
|
||||
"targets": {
|
||||
"build": {
|
||||
"executor": "@nrwl/web:rollup",
|
||||
"executor": "@nrwl/rollup:rollup",
|
||||
"outputs": ["{options.outputPath}"],
|
||||
"options": {
|
||||
"outputPath": "dist/libs/liquidity",
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
{
|
||||
"name": "market-depth",
|
||||
"$schema": "../../node_modules/nx/schemas/project-schema.json",
|
||||
"sourceRoot": "libs/market-depth/src",
|
||||
"projectType": "library",
|
||||
"tags": [],
|
||||
"targets": {
|
||||
"build": {
|
||||
"executor": "@nrwl/web:rollup",
|
||||
"executor": "@nrwl/rollup:rollup",
|
||||
"outputs": ["{options.outputPath}"],
|
||||
"options": {
|
||||
"outputPath": "dist/libs/market-depth",
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
{
|
||||
"name": "market-info",
|
||||
"$schema": "../../node_modules/nx/schemas/project-schema.json",
|
||||
"sourceRoot": "libs/market-info/src",
|
||||
"projectType": "library",
|
||||
"tags": [],
|
||||
"targets": {
|
||||
"build": {
|
||||
"executor": "@nrwl/web:rollup",
|
||||
"executor": "@nrwl/rollup:rollup",
|
||||
"outputs": ["{options.outputPath}"],
|
||||
"options": {
|
||||
"outputPath": "dist/libs/market-info",
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
{
|
||||
"name": "market-list",
|
||||
"$schema": "../../node_modules/nx/schemas/project-schema.json",
|
||||
"sourceRoot": "libs/market-list/src",
|
||||
"projectType": "library",
|
||||
"tags": [],
|
||||
"targets": {
|
||||
"build": {
|
||||
"executor": "@nrwl/web:rollup",
|
||||
"executor": "@nrwl/rollup:rollup",
|
||||
"outputs": ["{options.outputPath}"],
|
||||
"options": {
|
||||
"outputPath": "dist/libs/market-list",
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
{
|
||||
"name": "network-info",
|
||||
"$schema": "../../node_modules/nx/schemas/project-schema.json",
|
||||
"sourceRoot": "libs/network-info/src",
|
||||
"projectType": "library",
|
||||
"tags": [],
|
||||
"targets": {
|
||||
"build": {
|
||||
"executor": "@nrwl/web:rollup",
|
||||
"executor": "@nrwl/rollup:rollup",
|
||||
"outputs": ["{options.outputPath}"],
|
||||
"options": {
|
||||
"outputPath": "dist/libs/network-info",
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
{
|
||||
"name": "network-stats",
|
||||
"$schema": "../../node_modules/nx/schemas/project-schema.json",
|
||||
"sourceRoot": "libs/network-stats/src",
|
||||
"projectType": "library",
|
||||
"tags": [],
|
||||
"targets": {
|
||||
"build": {
|
||||
"executor": "@nrwl/web:rollup",
|
||||
"executor": "@nrwl/rollup:rollup",
|
||||
"outputs": ["{options.outputPath}"],
|
||||
"options": {
|
||||
"outputPath": "dist/libs/network-stats",
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
{
|
||||
"name": "oracles",
|
||||
"$schema": "../../node_modules/nx/schemas/project-schema.json",
|
||||
"sourceRoot": "libs/oracles/src",
|
||||
"projectType": "library",
|
||||
"tags": [],
|
||||
"targets": {
|
||||
"build": {
|
||||
"executor": "@nrwl/web:rollup",
|
||||
"executor": "@nrwl/rollup:rollup",
|
||||
"outputs": ["{options.outputPath}"],
|
||||
"options": {
|
||||
"outputPath": "dist/libs/oracles",
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
{
|
||||
"name": "orders",
|
||||
"$schema": "../../node_modules/nx/schemas/project-schema.json",
|
||||
"sourceRoot": "libs/orders/src",
|
||||
"projectType": "library",
|
||||
"tags": [],
|
||||
"targets": {
|
||||
"build": {
|
||||
"executor": "@nrwl/web:rollup",
|
||||
"executor": "@nrwl/rollup:rollup",
|
||||
"outputs": ["{options.outputPath}"],
|
||||
"options": {
|
||||
"outputPath": "dist/libs/orders",
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
{
|
||||
"name": "positions",
|
||||
"$schema": "../../node_modules/nx/schemas/project-schema.json",
|
||||
"sourceRoot": "libs/positions/src",
|
||||
"projectType": "library",
|
||||
"tags": [],
|
||||
"targets": {
|
||||
"build": {
|
||||
"executor": "@nrwl/web:rollup",
|
||||
"executor": "@nrwl/rollup:rollup",
|
||||
"outputs": ["{options.outputPath}"],
|
||||
"options": {
|
||||
"outputPath": "dist/libs/positions",
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
{
|
||||
"name": "proposals",
|
||||
"$schema": "../../node_modules/nx/schemas/project-schema.json",
|
||||
"sourceRoot": "libs/proposals/src",
|
||||
"projectType": "library",
|
||||
"tags": [],
|
||||
"targets": {
|
||||
"build": {
|
||||
"executor": "@nrwl/web:rollup",
|
||||
"executor": "@nrwl/rollup:rollup",
|
||||
"outputs": ["{options.outputPath}"],
|
||||
"options": {
|
||||
"outputPath": "dist/libs/proposals",
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
{
|
||||
"name": "react-helpers",
|
||||
"$schema": "../../node_modules/nx/schemas/project-schema.json",
|
||||
"sourceRoot": "libs/react-helpers/src",
|
||||
"projectType": "library",
|
||||
"tags": [],
|
||||
"targets": {
|
||||
"build": {
|
||||
"executor": "@nrwl/web:rollup",
|
||||
"executor": "@nrwl/rollup:rollup",
|
||||
"outputs": ["{options.outputPath}"],
|
||||
"options": {
|
||||
"buildableProjectDepsInPackageJsonType": "dependencies",
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
{
|
||||
"name": "smart-contracts",
|
||||
"$schema": "../../node_modules/nx/schemas/project-schema.json",
|
||||
"sourceRoot": "libs/smart-contracts/src",
|
||||
"targets": {
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
{
|
||||
"root": "libs/tailwindcss-config",
|
||||
"name": "tailwindcss-config",
|
||||
"$schema": "../../node_modules/nx/schemas/project-schema.json",
|
||||
"sourceRoot": "libs/tailwindcss-config/src",
|
||||
"projectType": "library",
|
||||
"targets": {
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
{
|
||||
"name": "trades",
|
||||
"$schema": "../../node_modules/nx/schemas/project-schema.json",
|
||||
"sourceRoot": "libs/trades/src",
|
||||
"projectType": "library",
|
||||
"tags": [],
|
||||
"targets": {
|
||||
"build": {
|
||||
"executor": "@nrwl/web:rollup",
|
||||
"executor": "@nrwl/rollup:rollup",
|
||||
"outputs": ["{options.outputPath}"],
|
||||
"options": {
|
||||
"outputPath": "dist/libs/trades",
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
{
|
||||
"name": "types",
|
||||
"$schema": "../../node_modules/nx/schemas/project-schema.json",
|
||||
"sourceRoot": "libs/types/src",
|
||||
"projectType": "library",
|
||||
"tags": [],
|
||||
"targets": {
|
||||
"build": {
|
||||
"executor": "@nrwl/web:rollup",
|
||||
"executor": "@nrwl/rollup:rollup",
|
||||
"outputs": ["{options.outputPath}"],
|
||||
"options": {
|
||||
"outputPath": "dist/libs/types",
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
{
|
||||
"name": "ui-toolkit",
|
||||
"$schema": "../../node_modules/nx/schemas/project-schema.json",
|
||||
"sourceRoot": "libs/ui-toolkit/src",
|
||||
"projectType": "library",
|
||||
"tags": [],
|
||||
"targets": {
|
||||
"build": {
|
||||
"executor": "@nrwl/web:rollup",
|
||||
"executor": "@nrwl/rollup:rollup",
|
||||
"outputs": ["{options.outputPath}"],
|
||||
"options": {
|
||||
"buildableProjectDepsInPackageJsonType": "dependencies",
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
{
|
||||
"name": "utils",
|
||||
"$schema": "../../node_modules/nx/schemas/project-schema.json",
|
||||
"sourceRoot": "libs/utils/src",
|
||||
"projectType": "library",
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
{
|
||||
"name": "wallet",
|
||||
"$schema": "../../node_modules/nx/schemas/project-schema.json",
|
||||
"sourceRoot": "libs/wallet/src",
|
||||
"projectType": "library",
|
||||
"tags": [],
|
||||
"targets": {
|
||||
"build": {
|
||||
"executor": "@nrwl/web:rollup",
|
||||
"executor": "@nrwl/rollup:rollup",
|
||||
"outputs": ["{options.outputPath}"],
|
||||
"options": {
|
||||
"outputPath": "dist/libs/wallet",
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
{
|
||||
"name": "web3",
|
||||
"$schema": "../../node_modules/nx/schemas/project-schema.json",
|
||||
"sourceRoot": "libs/web3/src",
|
||||
"projectType": "library",
|
||||
"tags": [],
|
||||
"targets": {
|
||||
"build": {
|
||||
"executor": "@nrwl/web:rollup",
|
||||
"executor": "@nrwl/rollup:rollup",
|
||||
"outputs": ["{options.outputPath}"],
|
||||
"options": {
|
||||
"outputPath": "dist/libs/web3",
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
{
|
||||
"name": "withdraws",
|
||||
"$schema": "../../node_modules/nx/schemas/project-schema.json",
|
||||
"sourceRoot": "libs/withdraws/src",
|
||||
"projectType": "library",
|
||||
"tags": [],
|
||||
"targets": {
|
||||
"build": {
|
||||
"executor": "@nrwl/web:rollup",
|
||||
"executor": "@nrwl/rollup:rollup",
|
||||
"outputs": ["{options.outputPath}"],
|
||||
"options": {
|
||||
"outputPath": "dist/libs/withdraws",
|
||||
|
||||
+15
-14
@@ -6,7 +6,7 @@
|
||||
"start": "nx serve",
|
||||
"build": "nx build",
|
||||
"test": "nx test",
|
||||
"postinstall": "husky install && yarn tsc -b tools/executors/next && yarn tsc -b tools/executors/webpack",
|
||||
"postinstall": "husky install",
|
||||
"test:all": "nx run-many --all --target=test",
|
||||
"build:all": "nx run-many --all --target=build",
|
||||
"lint:all": "nx run-many --all --target=lint",
|
||||
@@ -105,18 +105,19 @@
|
||||
"@graphql-codegen/typescript-react-apollo": "^3.3.3",
|
||||
"@graphql-inspector/cli": "^3.3.0",
|
||||
"@graphql-inspector/validate-command": "^3.3.0",
|
||||
"@nrwl/cli": "14.5.10",
|
||||
"@nrwl/cypress": "14.5.10",
|
||||
"@nrwl/eslint-plugin-nx": "14.5.10",
|
||||
"@nrwl/jest": "14.5.10",
|
||||
"@nrwl/linter": "14.5.10",
|
||||
"@nrwl/next": "14.5.10",
|
||||
"@nrwl/nx-cloud": "14.5.4",
|
||||
"@nrwl/react": "14.5.10",
|
||||
"@nrwl/storybook": "14.5.10",
|
||||
"@nrwl/tao": "14.5.10",
|
||||
"@nrwl/web": "14.5.10",
|
||||
"@nrwl/workspace": "14.5.10",
|
||||
"@nrwl/cli": "15.9.2",
|
||||
"@nrwl/cypress": "15.9.2",
|
||||
"@nrwl/eslint-plugin-nx": "15.9.2",
|
||||
"@nrwl/jest": "15.9.2",
|
||||
"@nrwl/linter": "15.9.2",
|
||||
"@nrwl/next": "15.9.2",
|
||||
"@nrwl/nx-cloud": "15.3.5",
|
||||
"@nrwl/react": "15.9.2",
|
||||
"@nrwl/rollup": "^15.9.2",
|
||||
"@nrwl/storybook": "15.9.2",
|
||||
"@nrwl/tao": "15.9.2",
|
||||
"@nrwl/web": "15.9.2",
|
||||
"@nrwl/workspace": "15.9.2",
|
||||
"@sentry/webpack-plugin": "^1.18.8",
|
||||
"@storybook/addon-a11y": "^6.4.19",
|
||||
"@storybook/addon-docs": "^6.5.13",
|
||||
@@ -175,7 +176,7 @@
|
||||
"mock-apollo-client": "^1.2.0",
|
||||
"mock-socket": "^9.1.5",
|
||||
"npmlog": "^6.0.2",
|
||||
"nx": "14.5.10",
|
||||
"nx": "15.9.2",
|
||||
"postcss": "8.4.16",
|
||||
"prettier": "2.7.1",
|
||||
"react-test-renderer": "18.2.0",
|
||||
|
||||
@@ -1,22 +0,0 @@
|
||||
import type { ExecutorContext } from '@nrwl/devkit';
|
||||
import setup from '../../../utils/setup-environment';
|
||||
import nextBuildExecutor from '@nrwl/next/src/executors/build/build.impl';
|
||||
import { NextBuildBuilderOptions } from '@nrwl/next/src/utils/types';
|
||||
|
||||
type Schema = NextBuildBuilderOptions & {
|
||||
env?: string;
|
||||
};
|
||||
|
||||
export default async function build(
|
||||
options: Schema,
|
||||
context: ExecutorContext
|
||||
): Promise<ReturnType<typeof nextBuildExecutor>> {
|
||||
const { env, ...nextOptions } = options;
|
||||
await setup(env, context, 'tools/executors/next/build');
|
||||
|
||||
try {
|
||||
return await nextBuildExecutor(nextOptions, context);
|
||||
} catch (err) {
|
||||
console.error(err);
|
||||
}
|
||||
}
|
||||
@@ -1,50 +0,0 @@
|
||||
{
|
||||
"cli": "nx",
|
||||
"id": "build",
|
||||
"description": "Serves an app using @nrwl/next:build",
|
||||
"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}"
|
||||
},
|
||||
"root": {
|
||||
"description": "The source root",
|
||||
"type": "string"
|
||||
},
|
||||
"outputPath": {
|
||||
"type": "string",
|
||||
"description": "The output path of the generated files."
|
||||
},
|
||||
"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": []
|
||||
},
|
||||
"nextConfig": {
|
||||
"description": "Path (relative to workspace root) to a function which takes phase, config, and builder options, and returns the resulting config. This is an advanced option and should not be used with a normal Next.js config file (i.e. `next.config.js`).",
|
||||
"type": "string"
|
||||
},
|
||||
"buildLibsFromSource": {
|
||||
"type": "boolean",
|
||||
"description": "Read buildable libraries from source instead of building them separately.",
|
||||
"default": true
|
||||
}
|
||||
},
|
||||
"required": ["root", "outputPath"]
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
{
|
||||
"executors": {
|
||||
"serve": {
|
||||
"implementation": "./serve/impl",
|
||||
"schema": "./serve/schema.json",
|
||||
"description": "Starts a next server with an optional explicit environment."
|
||||
},
|
||||
"build": {
|
||||
"implementation": "./build/impl",
|
||||
"schema": "./build/schema.json",
|
||||
"description": "Builds a next app with an optional explicit environment."
|
||||
},
|
||||
"export": {
|
||||
"implementation": "./export/impl",
|
||||
"schema": "./serve/schema.json",
|
||||
"description": "Exports a next app with an optional explicit environment."
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
import type { ExecutorContext } from '@nrwl/devkit';
|
||||
import setup from '../../../utils/setup-environment';
|
||||
import nextExportExecutor from '@nrwl/next/src/executors/export/export.impl';
|
||||
import { NextExportBuilderOptions } from '@nrwl/next/src/utils/types';
|
||||
|
||||
type Schema = NextExportBuilderOptions & {
|
||||
env: string;
|
||||
};
|
||||
|
||||
export default async function exportWithEnv(
|
||||
options: Schema,
|
||||
context: ExecutorContext
|
||||
) {
|
||||
const { env, ...nextOptions } = options;
|
||||
await setup(env, context, 'tools/executors/next/export');
|
||||
|
||||
try {
|
||||
return await nextExportExecutor(nextOptions, context);
|
||||
} catch (err) {
|
||||
console.error(err);
|
||||
}
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
{
|
||||
"cli": "nx",
|
||||
"id": "export",
|
||||
"description": "Exports a next app app using @nrwl/next:export with an optional explicit environment",
|
||||
"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}"
|
||||
},
|
||||
"buildLibsFromSource": {
|
||||
"type": "boolean",
|
||||
"description": "Read buildable libraries from source instead of building them separately.",
|
||||
"default": true
|
||||
}
|
||||
},
|
||||
"required": ["root", "outputPath"]
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
{
|
||||
"executors": "./executor.json"
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
import type { ExecutorContext } from '@nrwl/devkit';
|
||||
import setup from '../../../utils/setup-environment';
|
||||
import nextServerExecutor from '@nrwl/next/src/executors/server/server.impl';
|
||||
import { NextServeBuilderOptions } from '@nrwl/next/src/utils/types';
|
||||
|
||||
type Schema = NextServeBuilderOptions & {
|
||||
env?: string;
|
||||
};
|
||||
|
||||
export default async function* serve(
|
||||
options: Schema,
|
||||
context: ExecutorContext
|
||||
): ReturnType<typeof nextServerExecutor> {
|
||||
const { env, ...nextOptions } = options;
|
||||
await setup(env, context, 'tools/executors/next/serve');
|
||||
|
||||
return yield* nextServerExecutor(nextOptions, context);
|
||||
}
|
||||
@@ -1,54 +0,0 @@
|
||||
{
|
||||
"cli": "nx",
|
||||
"id": "serve",
|
||||
"description": "Serves an app using @nrwl/next:server",
|
||||
"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}"
|
||||
},
|
||||
"dev": {
|
||||
"type": "boolean",
|
||||
"description": "Serve the application in the dev mode.",
|
||||
"default": true
|
||||
},
|
||||
"buildTarget": {
|
||||
"type": "string",
|
||||
"description": "Target which builds the application."
|
||||
},
|
||||
"port": {
|
||||
"type": "number",
|
||||
"description": "Port to listen on.",
|
||||
"default": 4200
|
||||
},
|
||||
"staticMarkup": {
|
||||
"type": "boolean",
|
||||
"description": "Static markup.",
|
||||
"default": false
|
||||
},
|
||||
"quiet": {
|
||||
"type": "boolean",
|
||||
"description": "Hide error messages containing server information.",
|
||||
"default": false
|
||||
},
|
||||
"customServerPath": {
|
||||
"type": "string",
|
||||
"description": "Use a custom server script."
|
||||
},
|
||||
"hostname": {
|
||||
"type": "string",
|
||||
"description": "Hostname on which the application is served."
|
||||
},
|
||||
"proxyConfig": {
|
||||
"type": "string",
|
||||
"description": "Path to the proxy configuration file."
|
||||
},
|
||||
"buildLibsFromSource": {
|
||||
"type": "boolean",
|
||||
"description": "Read buildable libraries from source instead of building them separately.",
|
||||
"default": true
|
||||
}
|
||||
},
|
||||
"required": ["buildTarget"]
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
{
|
||||
"extends": "../../../tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"target": "es5",
|
||||
"types": ["node"],
|
||||
"importHelpers": false,
|
||||
"sourceMap": false,
|
||||
"inlineSourceMap": true
|
||||
},
|
||||
"include": ["build/impl.ts", "serve/impl.ts", "export/impl.ts"],
|
||||
"exclude": ["node_modules"]
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
import type { ExecutorContext } from '@nrwl/devkit';
|
||||
import setup from '../../../utils/setup-environment';
|
||||
import webpackBuildExecutor, {
|
||||
WebWebpackExecutorOptions,
|
||||
} from '@nrwl/web/src/executors/webpack/webpack.impl';
|
||||
|
||||
type Schema = WebWebpackExecutorOptions & {
|
||||
env?: string;
|
||||
};
|
||||
|
||||
export default async function* build(
|
||||
options: Schema,
|
||||
context: ExecutorContext
|
||||
): ReturnType<typeof webpackBuildExecutor> {
|
||||
const { env, ...buildOptions } = options;
|
||||
await setup(env, context, 'tools/executors/webpack/build');
|
||||
|
||||
return yield* webpackBuildExecutor(buildOptions, context);
|
||||
}
|
||||
@@ -1,359 +0,0 @@
|
||||
{
|
||||
"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."
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
{
|
||||
"executors": {
|
||||
"serve": {
|
||||
"implementation": "./serve/impl",
|
||||
"schema": "./serve/schema.json",
|
||||
"description": "Starts a dev-server with an optional explicit environment."
|
||||
},
|
||||
"build": {
|
||||
"implementation": "./build/impl",
|
||||
"schema": "./build/schema.json",
|
||||
"description": "Starts a dev-server with an optional explicit environment."
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
{
|
||||
"executors": "./executor.json"
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
import type { ExecutorContext } from '@nrwl/devkit';
|
||||
import setup from '../../../utils/setup-environment';
|
||||
import devServerExecutor, {
|
||||
WebDevServerOptions,
|
||||
} from '@nrwl/web/src/executors/dev-server/dev-server.impl';
|
||||
|
||||
type Schema = WebDevServerOptions & {
|
||||
env?: string;
|
||||
};
|
||||
|
||||
export default async function* serve(
|
||||
options: Schema,
|
||||
context: ExecutorContext
|
||||
): ReturnType<typeof devServerExecutor> {
|
||||
const { env, ...serverOptions } = options;
|
||||
await setup(env, context, 'tools/executors/webpack/serve');
|
||||
|
||||
return yield* devServerExecutor(serverOptions, context);
|
||||
}
|
||||
@@ -1,79 +0,0 @@
|
||||
{
|
||||
"cli": "nx",
|
||||
"id": "serve",
|
||||
"description": "Serves an app using @nrwl/web:dev-server",
|
||||
"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}"
|
||||
},
|
||||
"buildTarget": {
|
||||
"type": "string",
|
||||
"description": "Target which builds the application."
|
||||
},
|
||||
"port": {
|
||||
"type": "number",
|
||||
"description": "Port to listen on.",
|
||||
"default": 4200
|
||||
},
|
||||
"host": {
|
||||
"type": "string",
|
||||
"description": "Host to listen on.",
|
||||
"default": "localhost"
|
||||
},
|
||||
"ssl": {
|
||||
"type": "boolean",
|
||||
"description": "Serve using `HTTPS`.",
|
||||
"default": false
|
||||
},
|
||||
"sslKey": {
|
||||
"type": "string",
|
||||
"description": "SSL key to use for serving `HTTPS`."
|
||||
},
|
||||
"sslCert": {
|
||||
"type": "string",
|
||||
"description": "SSL certificate to use for serving `HTTPS`."
|
||||
},
|
||||
"watch": {
|
||||
"type": "boolean",
|
||||
"description": "Watches for changes and rebuilds application.",
|
||||
"default": true
|
||||
},
|
||||
"liveReload": {
|
||||
"type": "boolean",
|
||||
"description": "Whether to reload the page on change, using live-reload.",
|
||||
"default": true
|
||||
},
|
||||
"hmr": {
|
||||
"type": "boolean",
|
||||
"description": "Enable hot module replacement.",
|
||||
"default": false
|
||||
},
|
||||
"publicHost": {
|
||||
"type": "string",
|
||||
"description": "Public URL where the application will be served."
|
||||
},
|
||||
"open": {
|
||||
"type": "boolean",
|
||||
"description": "Open the application in the browser.",
|
||||
"default": false
|
||||
},
|
||||
"allowedHosts": {
|
||||
"type": "string",
|
||||
"description": "This option allows you to whitelist services that are allowed to access the dev server."
|
||||
},
|
||||
"memoryLimit": {
|
||||
"type": "number",
|
||||
"description": "Memory limit for type checking service process in `MB`."
|
||||
},
|
||||
"maxWorkers": {
|
||||
"type": "number",
|
||||
"description": "Number of workers to use for type checking."
|
||||
},
|
||||
"baseHref": {
|
||||
"type": "string",
|
||||
"description": "Base url for the application being built."
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
{
|
||||
"extends": "../../../tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"target": "es5",
|
||||
"types": ["node"],
|
||||
"importHelpers": false,
|
||||
"sourceMap": false,
|
||||
"inlineSourceMap": true
|
||||
},
|
||||
"include": ["build/impl.ts", "serve/impl.ts"],
|
||||
"exclude": ["node_modules"]
|
||||
}
|
||||
@@ -1,146 +0,0 @@
|
||||
#!/usr/bin/env node
|
||||
|
||||
/**
|
||||
* Run on Github by commits to master, this script:
|
||||
* 1. Gets all projects with a fleek configuration file
|
||||
* 2. Gets the last commit for the relevant site id
|
||||
* 3. Runs nx:affected for that commit ID and checks if the site has changed
|
||||
* 4. Calls deploy if it has
|
||||
*
|
||||
* This would probably be best as an NX task, but the circular nature of getting
|
||||
* the fleek ID for the project, then checking if it was affected didn't fit within the
|
||||
* build-only-affected cycle, and as each fleek deploy will have been triggered by
|
||||
* a different commit, it seemed best to do this outwith nx. Feel free to re-implement
|
||||
* this if the assumptions are wrong.
|
||||
*
|
||||
* It has also been written to skip external dependencies.
|
||||
*/
|
||||
const { existsSync, readdirSync, readFileSync } = require('fs');
|
||||
const { execSync } = require('child_process');
|
||||
|
||||
/**
|
||||
* Parses the last commit hash out of the Fleek API response
|
||||
* @param {String} siteId
|
||||
* @returns string Last commit that triggered a build
|
||||
*/
|
||||
function getFleekLastBuildCommit(siteId) {
|
||||
const curl = `curl 'https://api.fleek.co/graphql' --silent -X POST -H 'Accept: */*' -H 'Accept-Encoding: gzip, deflate, br' -H 'Content-Type: application/json' -H 'Authorization: ${process.env['FLEEK_API_KEY']}' --data-raw '{"query":"{getSiteById(siteId: \\"${siteId}\\"){publishedDeploy{repository{commit}}}}","variables":null}'`;
|
||||
const fleekRes = execSync(curl);
|
||||
|
||||
const res = JSON.parse(fleekRes.toString());
|
||||
let commit = res.data.getSiteById.publishedDeploy.repository.commit;
|
||||
|
||||
return commit;
|
||||
}
|
||||
|
||||
/**
|
||||
* Triggers a Fleek build of the latest code via GraphQL
|
||||
* @param {String} siteId
|
||||
* @returns
|
||||
*/
|
||||
function triggerDeploy(siteId) {
|
||||
const curl = `curl 'https://api.fleek.co/graphql' --silent -X POST -H 'Accept: */*' -H 'Accept-Encoding: gzip, deflate, br' -H 'Content-Type: application/json' -H 'Authorization: ${process.env['FLEEK_API_KEY']}' --data-raw '{"query":"mutation {triggerDeploy(commit: \\"HEAD\\", siteId: \\"${siteId}\\"){status}}","variables":null}'`;
|
||||
const fleekRes = execSync(curl);
|
||||
|
||||
JSON.parse(fleekRes.toString());
|
||||
|
||||
// Will have thrown if it failed
|
||||
return true;
|
||||
}
|
||||
|
||||
// The folder containing NX projects
|
||||
const projectPath = './apps/';
|
||||
// The Fleek project file, the existence indicates a deployed app
|
||||
const fleekFile = '.fleek.json';
|
||||
// Some simple stats for the end
|
||||
let fleekProjects = 0;
|
||||
let deployedProjects = 0;
|
||||
|
||||
// Fleek CLI requires this variable to be set
|
||||
if (!process.env['FLEEK_API_KEY']) {
|
||||
console.error('Error: FLEEK_API_KEY must be set');
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
readdirSync(projectPath).forEach((proj) => {
|
||||
try {
|
||||
const config = `${projectPath}${proj}/${fleekFile}`;
|
||||
if (!existsSync(config)) {
|
||||
// No fleek file, skip it
|
||||
return;
|
||||
}
|
||||
|
||||
fleekProjects++;
|
||||
|
||||
console.group(proj);
|
||||
|
||||
// The UID for the site according to the config
|
||||
let siteId;
|
||||
|
||||
try {
|
||||
const fleekConfig = JSON.parse(readFileSync(config));
|
||||
siteId = fleekConfig.site.id;
|
||||
|
||||
console.log(`Fleek site ID: ${siteId}`);
|
||||
} catch (e) {
|
||||
console.error(`Failed to read Fleek site id for ${proj}`);
|
||||
return;
|
||||
}
|
||||
|
||||
// The last commit that triggered a build
|
||||
let baseCommit;
|
||||
|
||||
try {
|
||||
baseCommit = getFleekLastBuildCommit(siteId);
|
||||
|
||||
console.log(`Last deploy: ${baseCommit}`);
|
||||
} catch (e) {
|
||||
console.error(`Failed to fetch last deploy for ${proj}`);
|
||||
return;
|
||||
}
|
||||
|
||||
// Now run nx affected
|
||||
let isAffected;
|
||||
|
||||
try {
|
||||
const affectedSinceCommit = execSync(
|
||||
`yarn nx print-affected --base=${baseCommit} --head=HEAD --select=projects`
|
||||
);
|
||||
|
||||
// Detect if this project name is in output, taking care not to match names that are
|
||||
// included in other projects - `trading`, `trading-e2e` is a current example
|
||||
isAffected = affectedSinceCommit
|
||||
.toString()
|
||||
.split(',')
|
||||
.map((v) => v.trim())
|
||||
.includes(proj);
|
||||
} catch (e) {
|
||||
console.error(`Failed to run nx:affected for ${baseCommit}:master`);
|
||||
return;
|
||||
}
|
||||
|
||||
if (isAffected) {
|
||||
console.log(`Triggering deploy for: ${siteId}`);
|
||||
deployedProjects++;
|
||||
|
||||
try {
|
||||
triggerDeploy(siteId);
|
||||
} catch (e) {
|
||||
console.error(`Failed to trigger deploy for ${proj}`);
|
||||
process.exit(1);
|
||||
}
|
||||
} else {
|
||||
console.log(`Has not changed since last build, skipping...`);
|
||||
}
|
||||
|
||||
console.groupEnd();
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
process.exit(1);
|
||||
}
|
||||
});
|
||||
|
||||
console.log(`Fleek projects: ${fleekProjects}`);
|
||||
console.log(`Deploys triggered: ${deployedProjects}`);
|
||||
|
||||
process.exit(0);
|
||||
@@ -1,61 +0,0 @@
|
||||
/**
|
||||
* This is a minimal script to publish your package to "npm".
|
||||
* This is meant to be used as-is or customize as you see fit.
|
||||
*
|
||||
* This script is executed on "dist/path/to/library" as "cwd" by default.
|
||||
*
|
||||
* You might need to authenticate with NPM before running this script.
|
||||
*/
|
||||
|
||||
import { readCachedProjectGraph } from '@nrwl/devkit';
|
||||
import { execSync } from 'child_process';
|
||||
import { readFileSync, writeFileSync } from 'fs';
|
||||
import chalk from 'chalk';
|
||||
|
||||
function invariant(condition, message) {
|
||||
if (!condition) {
|
||||
console.error(chalk.bold.red(message));
|
||||
process.exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
// Executing publish script: node path/to/publish.mjs {name} --version {version} --tag {tag}
|
||||
// Default "tag" to "next" so we won't publish the "latest" tag by accident.
|
||||
const [, , name, version, tag = 'next'] = process.argv;
|
||||
|
||||
// A simple SemVer validation to validate the version
|
||||
const validVersion = /^\d+\.\d+\.\d+(-\w+\.\d+)?/;
|
||||
invariant(
|
||||
version && validVersion.test(version),
|
||||
`No version provided or version did not match Semantic Versioning, expected: #.#.#-tag.# or #.#.#, got ${version}.`
|
||||
);
|
||||
|
||||
const graph = readCachedProjectGraph();
|
||||
const project = graph.nodes[name];
|
||||
|
||||
invariant(
|
||||
project,
|
||||
`Could not find project "${name}" in the workspace. Is the project.json configured correctly?`
|
||||
);
|
||||
|
||||
const outputPath = project.data?.targets?.build?.options?.outputPath;
|
||||
invariant(
|
||||
outputPath,
|
||||
`Could not find "build.options.outputPath" of project "${name}". Is project.json configured correctly?`
|
||||
);
|
||||
|
||||
process.chdir(outputPath);
|
||||
|
||||
// Updating the version in "package.json" before publishing
|
||||
try {
|
||||
const json = JSON.parse(readFileSync(`package.json`).toString());
|
||||
json.version = version;
|
||||
writeFileSync(`package.json`, JSON.stringify(json, null, 2));
|
||||
} catch (e) {
|
||||
console.error(
|
||||
chalk.bold.red(`Error reading package.json file from library build output.`)
|
||||
);
|
||||
}
|
||||
|
||||
// Execute "npm publish" to publish
|
||||
execSync(`npm publish --access public --tag ${tag}`);
|
||||
@@ -1,12 +0,0 @@
|
||||
{
|
||||
"extends": "../tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "../dist/out-tsc/tools",
|
||||
"rootDir": ".",
|
||||
"module": "commonjs",
|
||||
"target": "es5",
|
||||
"types": ["node"],
|
||||
"importHelpers": false
|
||||
},
|
||||
"include": ["**/*.ts"]
|
||||
}
|
||||
@@ -1,85 +0,0 @@
|
||||
import * as fs from 'fs';
|
||||
import * as path from 'path';
|
||||
import * as log from 'npmlog';
|
||||
import * as dotenv from 'dotenv';
|
||||
import type { ExecutorContext } from '@nrwl/devkit';
|
||||
|
||||
process.env['NX_GIT_COMMIT_HASH'] = process.env['COMMIT_REF'] ?? 'dev';
|
||||
process.env['NX_GIT_BRANCH'] = process.env['BRANCH'] ?? 'dev';
|
||||
process.env['NX_GIT_ORIGIN_URL'] = process.env['REPOSITORY_URL'] ?? '';
|
||||
|
||||
const logEnvData = (
|
||||
envMap: Record<string, string>,
|
||||
envFiles: string[],
|
||||
env?: string,
|
||||
defaultEnvFile?: string,
|
||||
loggerScope?: string
|
||||
) => {
|
||||
if (env && !envMap[env]) {
|
||||
log.warn(loggerScope, `No environment called "${env}" found.`);
|
||||
log.info(
|
||||
loggerScope,
|
||||
envFiles.length > 0
|
||||
? `You can create a new environment by putting an ".env.${env}" file in your project root, or you can use the following available ones: ${envFiles.join(
|
||||
', '
|
||||
)}.`
|
||||
: 'To get started with environments, you can create an ".env" file in your project root with the desired variables.'
|
||||
);
|
||||
}
|
||||
|
||||
if (!envMap[env]) {
|
||||
log.info(
|
||||
loggerScope,
|
||||
defaultEnvFile
|
||||
? `Using "${defaultEnvFile}" as the default project environment.`
|
||||
: 'Serving the project only using the environment variables scoped to your CLI.'
|
||||
);
|
||||
} else {
|
||||
log.info(
|
||||
loggerScope,
|
||||
`Using "${envMap[env]}" as the default project environment.`
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
const filenameToEnv = (filename: string) => filename.replace('.env.', '');
|
||||
|
||||
const getDefaultEnvFile = (envMap: Record<string, string>) => {
|
||||
return envMap['local'] || envMap['.env'];
|
||||
};
|
||||
|
||||
const getEnvFile = (env: string, envFiles: string[], loggerScope?: string) => {
|
||||
const envMap = envFiles.reduce(
|
||||
(acc, filename) => ({
|
||||
...acc,
|
||||
[filenameToEnv(filename)]: filename,
|
||||
}),
|
||||
{}
|
||||
);
|
||||
|
||||
const defaultEnvFile = getDefaultEnvFile(envMap);
|
||||
logEnvData(envMap, envFiles, env, defaultEnvFile, loggerScope);
|
||||
|
||||
return envMap[env] || defaultEnvFile;
|
||||
};
|
||||
|
||||
export default async function setup(
|
||||
env: string,
|
||||
context: ExecutorContext,
|
||||
loggerScope?: string
|
||||
) {
|
||||
const { root } = context.workspace.projects[context.projectName];
|
||||
const workspacePath = path.join(context.cwd, root);
|
||||
|
||||
const files = await fs.promises.readdir(workspacePath);
|
||||
|
||||
const envFile = getEnvFile(
|
||||
env,
|
||||
files.filter((f) => f.startsWith('.env')),
|
||||
loggerScope
|
||||
);
|
||||
|
||||
if (env && envFile) {
|
||||
dotenv.config({ path: path.join(workspacePath, envFile), override: true });
|
||||
}
|
||||
}
|
||||
@@ -1,48 +0,0 @@
|
||||
{
|
||||
"version": 2,
|
||||
"projects": {
|
||||
"accounts": "libs/accounts",
|
||||
"announcements": "libs/announcements",
|
||||
"apollo-client": "libs/apollo-client",
|
||||
"assets": "libs/assets",
|
||||
"candles-chart": "libs/candles-chart",
|
||||
"cypress": "libs/cypress",
|
||||
"datagrid": "libs/datagrid",
|
||||
"deal-ticket": "libs/deal-ticket",
|
||||
"deposits": "libs/deposits",
|
||||
"environment": "libs/environment",
|
||||
"explorer": "apps/explorer",
|
||||
"explorer-e2e": "apps/explorer-e2e",
|
||||
"fills": "libs/fills",
|
||||
"governance": "apps/governance",
|
||||
"governance-e2e": "apps/governance-e2e",
|
||||
"i18n": "libs/i18n",
|
||||
"ledger": "libs/ledger",
|
||||
"liquidity": "libs/liquidity",
|
||||
"liquidity-provision-dashboard": "apps/liquidity-provision-dashboard",
|
||||
"market-depth": "libs/market-depth",
|
||||
"market-info": "libs/market-info",
|
||||
"market-list": "libs/market-list",
|
||||
"multisig-signer": "apps/multisig-signer",
|
||||
"network-info": "libs/network-info",
|
||||
"network-stats": "libs/network-stats",
|
||||
"oracles": "libs/oracles",
|
||||
"orders": "libs/orders",
|
||||
"positions": "libs/positions",
|
||||
"proposals": "libs/proposals",
|
||||
"react-helpers": "libs/react-helpers",
|
||||
"smart-contracts": "libs/smart-contracts",
|
||||
"static": "apps/static",
|
||||
"tailwindcss-config": "libs/tailwindcss-config",
|
||||
"trades": "libs/trades",
|
||||
"trading": "apps/trading",
|
||||
"trading-e2e": "apps/trading-e2e",
|
||||
"types": "libs/types",
|
||||
"ui-toolkit": "libs/ui-toolkit",
|
||||
"utils": "libs/utils",
|
||||
"wallet": "libs/wallet",
|
||||
"web3": "libs/web3",
|
||||
"withdraws": "libs/withdraws"
|
||||
},
|
||||
"$schema": "./node_modules/nx/schemas/workspace-schema.json"
|
||||
}
|
||||
Reference in New Issue
Block a user