@equinor/echo-cli 1.0.0-beta-0 → 1.0.0-beta-2
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/lib/config/common/initOptions.js +1 -1
- package/lib/config/common/initOptions.js.map +1 -1
- package/lib/echo-build-client.js +23 -5
- package/lib/echo-build-client.js.map +1 -1
- package/lib/echo-client/build/env-config.js +1 -0
- package/lib/echo-client/build/index.css +60 -0
- package/lib/echo-client/package-lock.json +52 -11
- package/lib/echo-client/package.json +1 -0
- package/lib/echo-client/src/index.tsx +2 -22
- package/lib/echo-client/{webpack.config.ts → webpack.config.js} +3 -7
- package/package.json +1 -1
|
@@ -18,7 +18,7 @@ export async function defineInitOptions(echoBundleOptions, isDevelopment) {
|
|
|
18
18
|
peerDependencies: pkj.peerDependencies,
|
|
19
19
|
dependencies: pkj.dependencies,
|
|
20
20
|
devDependencies: pkj.devDependencies,
|
|
21
|
-
wwwRoot: path.resolve(
|
|
21
|
+
wwwRoot: path.resolve(process.cwd(), 'node_modules', '@equinor', 'echo-cli', 'client'),
|
|
22
22
|
adminModulePath: path.resolve(__dirname, '../../../', 'admin'),
|
|
23
23
|
requireRef: REQUIRED_REF,
|
|
24
24
|
envPath: await getFilePath(currentDir, '/.env'),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"initOptions.js","sourceRoot":"","sources":["../../../src/config/common/initOptions.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,aAAa,EAAE,MAAM,KAAK,CAAC;AAEpC,OAAO,EAAE,uBAAuB,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAC9E,OAAO,WAAW,EAAE,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AAE9D,OAAO,cAAc,MAAM,qBAAqB,CAAC;AAGjD,MAAM,UAAU,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAA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AEvB,MAAM,UAAU,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC;IACjC,MAAM,gBAAgB,GAAqB,MAAM,OAAO,CAAmB,UAAU,EAAE,uBAAuB,CAAC,CAAC;IAChH,MAAM,GAAG,GAAG,MAAM,cAAc,CAAC,UAAU,CAAC,CAAC;IAE7C,OAAO;QACH,GAAG,iBAAiB;QACpB,YAAY,EAAE,aAAa,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI;QAC1C,UAAU;QACV,MAAM,EAAE,GAAG,CAAC,MAAM;QAClB,IAAI,EAAE,GAAG,CAAC,IAAI;QACd,gBAAgB,EAAE,GAAG,CAAC,gBAAgB;QACtC,YAAY,EAAE,GAAG,CAAC,YAAY;QAC9B,eAAe,EAAE,GAAG,CAAC,eAAe;QACpC,OAAO,EAAE,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,cAAc,EAAE,UAAU,EAAE,UAAU,EAAE,QAAQ,CAAC;QACtF,eAAe,EAAE,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,WAAW,EAAE,OAAO,CAAC;QAC9D,UAAU,EAAE,YAAY;QACxB,OAAO,EAAE,MAAM,WAAW,CAAC,UAAU,EAAE,OAAO,CAAC;QAC/C,gBAAgB;KACnB,CAAC;AACN,CAAC"}
|
package/lib/echo-build-client.js
CHANGED
|
@@ -1,17 +1,35 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { Command } from '@oclif/command';
|
|
3
3
|
import { execSync } from 'child_process';
|
|
4
|
+
import fs from 'fs-extra';
|
|
4
5
|
import path from 'path';
|
|
5
6
|
import { fileURLToPath } from 'url';
|
|
6
7
|
const __filename = fileURLToPath(import.meta.url);
|
|
7
|
-
const __dirname = path.dirname(__filename);
|
|
8
8
|
export default class BuildClient extends Command {
|
|
9
9
|
static description = 'Build echo-client locally with current echo lib versions';
|
|
10
10
|
async run() {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
11
|
+
// Paths
|
|
12
|
+
const cliNodeModules = path.resolve(process.cwd(), 'node_modules', '@equinor', 'echo-cli');
|
|
13
|
+
const clientSrc = path.join(cliNodeModules, './lib/echo-client');
|
|
14
|
+
const tmpClient = path.resolve(process.cwd(), 'echo-client-tmp');
|
|
15
|
+
const buildOutput = path.join(tmpClient, 'client'); // adjust if your build output is different
|
|
16
|
+
const finalOutput = path.join(cliNodeModules, 'client');
|
|
17
|
+
// 1. Prepare echo-client-tmp
|
|
18
|
+
if (!fs.existsSync(tmpClient)) {
|
|
19
|
+
this.log(`echo-client-tmp does not exist. Copying echo-client to ${tmpClient}...`);
|
|
20
|
+
fs.copySync(clientSrc, tmpClient);
|
|
21
|
+
}
|
|
22
|
+
else {
|
|
23
|
+
this.log(`echo-client-tmp exists. Reusing it.`);
|
|
24
|
+
}
|
|
25
|
+
// 2. Run npm install and build in temp folder
|
|
26
|
+
this.log('Installing dependencies and building echo-client...');
|
|
27
|
+
execSync('npm install', { cwd: tmpClient, stdio: 'inherit' });
|
|
28
|
+
execSync('npm run build', { cwd: tmpClient, stdio: 'inherit' });
|
|
29
|
+
// 3. Copy build output back to echo-cli's client folder
|
|
30
|
+
this.log(`Copying build output to ${finalOutput}...`);
|
|
31
|
+
fs.removeSync(finalOutput);
|
|
32
|
+
fs.copySync(buildOutput, finalOutput);
|
|
15
33
|
this.log('echo-client build complete.');
|
|
16
34
|
}
|
|
17
35
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"echo-build-client.js","sourceRoot":"","sources":["../src/echo-build-client.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AACzC,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,aAAa,EAAE,MAAM,KAAK,CAAC;AAEpC,MAAM,UAAU,GAAG,aAAa,CAAC,MAAM,C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tC,CAAC;aAAM,CAAC;YACJ,IAAI,CAAC,GAAG,CAAC,qCAAqC,CAAC,CAAC;QACpD,CAAC;QAED,8CAA8C;QAC9C,IAAI,CAAC,GAAG,CAAC,qDAAqD,CAAC,CAAC;QAChE,QAAQ,CAAC,aAAa,EAAE,EAAE,GAAG,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,CAAC;QAC9D,QAAQ,CAAC,eAAe,EAAE,EAAE,GAAG,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,CAAC;QAEhE,wDAAwD;QACxD,IAAI,CAAC,GAAG,CAAC,2BAA2B,WAAW,KAAK,CAAC,CAAC;QACtD,EAAE,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC;QAC3B,EAAE,CAAC,QAAQ,CAAC,WAAW,EAAE,WAAW,CAAC,CAAC;QAEtC,IAAI,CAAC,GAAG,CAAC,6BAA6B,CAAC,CAAC;IAC5C,CAAC;;AAGL,WAAW,CAAC,GAAG,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
window._env_={HTTPS:"true",GENERATE_SOURCEMAP:"true",INLINE_RUNTIME_CHUNK:"false",WEBSITE_HOSTNAME:"localhost:3000;",REACT_APP_DEFAULT_CACHE_LOCATION:"localstorage",REACT_APP_API_URL:"https://dt-echopedia-api-dev.azurewebsites.net",REACT_APP_WEB_URL:"https://dt-echopedia-web-dev.azurewebsites.net",REACT_APP_WEB_PROD_URL:"https://echo.equinor.com",REACT_APP_AZURE_AD_TENNANT:"StatoilSRM.onmicrosoft.com",REACT_APP_AZURE_AD_TENNANT_ID:"3aa4a235-b6e2-48d5-9195-7fcf05b459b0",REACT_APP_AZURE_AD_CLIENT_ID:"751d2504-0b66-4b78-9807-4b60525a14c6",REACT_APP_API_CLIENT_ID:"aef35d97-53d4-4fd0-adaf-c5a514b38436",REACT_APP_APPINSIGHTS_CONNECTION_STRING:"InstrumentationKey=e5299075-a00d-4012-96f9-42861e8d8a9e;IngestionEndpoint=https://northeurope-3.in.applicationinsights.azure.com/;LiveEndpoint=https://northeurope.livediagnostics.monitor.azure.com/;ApplicationId=a9b64222-d4a9-42e6-a615-7428fe1a26af",REACT_APP_AZURE_BUILD_NUMBER:"0.8.dev.9",REACT_APP_LOGGER_ACTIVE:"false"};
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
body {
|
|
2
|
+
overflow: hidden;
|
|
3
|
+
margin: 0;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
.highlightedText {
|
|
7
|
+
background: yellow;
|
|
8
|
+
color: black;
|
|
9
|
+
padding: 0;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
#rootloading {
|
|
13
|
+
display: flex;
|
|
14
|
+
flex-direction: column;
|
|
15
|
+
color: #ff1243;
|
|
16
|
+
justify-content: center;
|
|
17
|
+
align-items: center;
|
|
18
|
+
text-align: center;
|
|
19
|
+
position: absolute;
|
|
20
|
+
width: 100%;
|
|
21
|
+
height: 100%;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.loaderContainer {
|
|
25
|
+
margin: 8px auto;
|
|
26
|
+
display: flex;
|
|
27
|
+
flex-direction: column;
|
|
28
|
+
padding-top: 0;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.productLogo {
|
|
32
|
+
flex: 1;
|
|
33
|
+
margin-bottom: 4rem;
|
|
34
|
+
text-align: left;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.productLogoImg {
|
|
38
|
+
display: inline-block;
|
|
39
|
+
vertical-align: baseline;
|
|
40
|
+
width: 122px;
|
|
41
|
+
animation: fadeIn 0.5s;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.equinorLogo {
|
|
45
|
+
margin: 0 auto;
|
|
46
|
+
display: inline-block;
|
|
47
|
+
vertical-align: baseline;
|
|
48
|
+
width: 64px;
|
|
49
|
+
height: 64px;
|
|
50
|
+
animation: fadeIn 0.5s;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
@keyframes fadeIn {
|
|
54
|
+
0% {
|
|
55
|
+
opacity: 0;
|
|
56
|
+
}
|
|
57
|
+
100% {
|
|
58
|
+
opacity: 1;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
@@ -23,6 +23,7 @@
|
|
|
23
23
|
"@svgr/webpack": "8.1.0",
|
|
24
24
|
"@tanstack/react-query": "5.80.10",
|
|
25
25
|
"classnames": "2.5.1",
|
|
26
|
+
"fs-extra": "^11.3.0",
|
|
26
27
|
"history": "5.3.0",
|
|
27
28
|
"immer": "10.1.1",
|
|
28
29
|
"lodash": "4.17.21",
|
|
@@ -2908,6 +2909,41 @@
|
|
|
2908
2909
|
"node": ">=8.0.0"
|
|
2909
2910
|
}
|
|
2910
2911
|
},
|
|
2912
|
+
"node_modules/@oclif/errors/node_modules/fs-extra": {
|
|
2913
|
+
"version": "8.1.0",
|
|
2914
|
+
"resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz",
|
|
2915
|
+
"integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==",
|
|
2916
|
+
"dev": true,
|
|
2917
|
+
"license": "MIT",
|
|
2918
|
+
"dependencies": {
|
|
2919
|
+
"graceful-fs": "^4.2.0",
|
|
2920
|
+
"jsonfile": "^4.0.0",
|
|
2921
|
+
"universalify": "^0.1.0"
|
|
2922
|
+
},
|
|
2923
|
+
"engines": {
|
|
2924
|
+
"node": ">=6 <7 || >=8"
|
|
2925
|
+
}
|
|
2926
|
+
},
|
|
2927
|
+
"node_modules/@oclif/errors/node_modules/jsonfile": {
|
|
2928
|
+
"version": "4.0.0",
|
|
2929
|
+
"resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz",
|
|
2930
|
+
"integrity": "sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==",
|
|
2931
|
+
"dev": true,
|
|
2932
|
+
"license": "MIT",
|
|
2933
|
+
"optionalDependencies": {
|
|
2934
|
+
"graceful-fs": "^4.1.6"
|
|
2935
|
+
}
|
|
2936
|
+
},
|
|
2937
|
+
"node_modules/@oclif/errors/node_modules/universalify": {
|
|
2938
|
+
"version": "0.1.2",
|
|
2939
|
+
"resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz",
|
|
2940
|
+
"integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==",
|
|
2941
|
+
"dev": true,
|
|
2942
|
+
"license": "MIT",
|
|
2943
|
+
"engines": {
|
|
2944
|
+
"node": ">= 4.0.0"
|
|
2945
|
+
}
|
|
2946
|
+
},
|
|
2911
2947
|
"node_modules/@oclif/help": {
|
|
2912
2948
|
"version": "1.0.15",
|
|
2913
2949
|
"dev": true,
|
|
@@ -7556,16 +7592,17 @@
|
|
|
7556
7592
|
}
|
|
7557
7593
|
},
|
|
7558
7594
|
"node_modules/fs-extra": {
|
|
7559
|
-
"version": "
|
|
7560
|
-
"
|
|
7595
|
+
"version": "11.3.0",
|
|
7596
|
+
"resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.3.0.tgz",
|
|
7597
|
+
"integrity": "sha512-Z4XaCL6dUDHfP/jT25jJKMmtxvuwbkrD1vNSMFlo9lNLY2c5FHYSQgHPRZUjAB26TpDEoW9HCOgplrdbaPV/ew==",
|
|
7561
7598
|
"license": "MIT",
|
|
7562
7599
|
"dependencies": {
|
|
7563
7600
|
"graceful-fs": "^4.2.0",
|
|
7564
|
-
"jsonfile": "^
|
|
7565
|
-
"universalify": "^0.
|
|
7601
|
+
"jsonfile": "^6.0.1",
|
|
7602
|
+
"universalify": "^2.0.0"
|
|
7566
7603
|
},
|
|
7567
7604
|
"engines": {
|
|
7568
|
-
"node": ">=
|
|
7605
|
+
"node": ">=14.14"
|
|
7569
7606
|
}
|
|
7570
7607
|
},
|
|
7571
7608
|
"node_modules/fs.realpath": {
|
|
@@ -7720,7 +7757,6 @@
|
|
|
7720
7757
|
},
|
|
7721
7758
|
"node_modules/graceful-fs": {
|
|
7722
7759
|
"version": "4.2.11",
|
|
7723
|
-
"dev": true,
|
|
7724
7760
|
"license": "ISC"
|
|
7725
7761
|
},
|
|
7726
7762
|
"node_modules/handle-thing": {
|
|
@@ -9040,9 +9076,13 @@
|
|
|
9040
9076
|
}
|
|
9041
9077
|
},
|
|
9042
9078
|
"node_modules/jsonfile": {
|
|
9043
|
-
"version": "
|
|
9044
|
-
"
|
|
9079
|
+
"version": "6.1.0",
|
|
9080
|
+
"resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz",
|
|
9081
|
+
"integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==",
|
|
9045
9082
|
"license": "MIT",
|
|
9083
|
+
"dependencies": {
|
|
9084
|
+
"universalify": "^2.0.0"
|
|
9085
|
+
},
|
|
9046
9086
|
"optionalDependencies": {
|
|
9047
9087
|
"graceful-fs": "^4.1.6"
|
|
9048
9088
|
}
|
|
@@ -11805,11 +11845,12 @@
|
|
|
11805
11845
|
}
|
|
11806
11846
|
},
|
|
11807
11847
|
"node_modules/universalify": {
|
|
11808
|
-
"version": "0.1
|
|
11809
|
-
"
|
|
11848
|
+
"version": "2.0.1",
|
|
11849
|
+
"resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz",
|
|
11850
|
+
"integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==",
|
|
11810
11851
|
"license": "MIT",
|
|
11811
11852
|
"engines": {
|
|
11812
|
-
"node": ">=
|
|
11853
|
+
"node": ">= 10.0.0"
|
|
11813
11854
|
}
|
|
11814
11855
|
},
|
|
11815
11856
|
"node_modules/unpipe": {
|
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
import { LoadingModuleOptions } from '@equinor/echo-base';
|
|
2
2
|
import '@equinor/echo-components/style-reset.css';
|
|
3
|
-
import EchoCore, {
|
|
4
|
-
createEchoAppModuleApi,
|
|
5
|
-
queryClient,
|
|
6
|
-
EventHubProvider as TypedEventHubProvider
|
|
7
|
-
} from '@equinor/echo-core';
|
|
3
|
+
import EchoCore, { createEchoAppModuleApi, EventHubProvider, queryClient } from '@equinor/echo-core';
|
|
8
4
|
import { mainMenu, Mediator, searchPanel } from '@equinor/echo-framework';
|
|
9
5
|
import { Icon } from '@equinor/eds-core-react';
|
|
10
6
|
import * as Icons from '@equinor/eds-icons';
|
|
@@ -13,25 +9,9 @@ import { initForE2ETests } from './utils/setupSkipAuth';
|
|
|
13
9
|
|
|
14
10
|
import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
|
|
15
11
|
import { createRoot } from 'react-dom/client';
|
|
16
|
-
import { BrowserRouter
|
|
12
|
+
import { BrowserRouter } from 'react-router-dom';
|
|
17
13
|
import { EchoApp } from './app';
|
|
18
14
|
|
|
19
|
-
/**
|
|
20
|
-
* TODO: further investigation needed.
|
|
21
|
-
* Getting these type errors for React components, which have children.
|
|
22
|
-
* Same setup works in echopediaWeb. Maybe it will be resolved with a next version bump?
|
|
23
|
-
* Doing a workaround now: setting them to 'any' type.
|
|
24
|
-
*
|
|
25
|
-
* TS2786: 'BrowserRouter' cannot be used as a JSX component.
|
|
26
|
-
Its type 'typeof BrowserRouter' is not a valid JSX element type.
|
|
27
|
-
Type 'typeof BrowserRouter' is not assignable to type 'new (props: any, deprecatedLegacyContext?: any) => Component<any,
|
|
28
|
-
any, any>'.
|
|
29
|
-
Construct signature return types 'BrowserRouter' and 'Component<any, any, any>' are incompatible.
|
|
30
|
-
The types returned by 'render()' are incompatible between these types.
|
|
31
|
-
*/
|
|
32
|
-
const BrowserRouter = TypedBrowserRouter as any;
|
|
33
|
-
const EventHubProvider = TypedEventHubProvider as any;
|
|
34
|
-
|
|
35
15
|
const useEdsIcon = (): void => {
|
|
36
16
|
Icon.add({
|
|
37
17
|
...Icons
|
|
@@ -5,18 +5,14 @@ import path from 'path';
|
|
|
5
5
|
import WebpackBar from 'webpackbar';
|
|
6
6
|
|
|
7
7
|
const webpackConfig = (env) => {
|
|
8
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-expressions
|
|
9
|
-
// env.cli && console.log('Building the client for EchoCli.');
|
|
10
8
|
console.log('Building the client for EchoCli.');
|
|
11
|
-
// const outputDirName = env.cli ? '../echo-cli' : import.meta.dirname;
|
|
12
|
-
const outputDirName = '..';
|
|
13
9
|
return {
|
|
14
10
|
entry: ['@babel/polyfill', './src/index.tsx'],
|
|
15
11
|
mode: 'production',
|
|
16
12
|
devtool: 'source-map',
|
|
17
13
|
output: {
|
|
18
14
|
clean: true,
|
|
19
|
-
path: path.resolve(
|
|
15
|
+
path: path.resolve(process.cwd(), 'client'),
|
|
20
16
|
filename: '[name].echo.bundle.js',
|
|
21
17
|
chunkFilename: 'assets/[name].[contenthash].chunk.js',
|
|
22
18
|
publicPath: '/'
|
|
@@ -121,11 +117,11 @@ const webpackConfig = (env) => {
|
|
|
121
117
|
patterns: [
|
|
122
118
|
{
|
|
123
119
|
from: path.resolve(import.meta.dirname, './public/index.css'),
|
|
124
|
-
to: path.resolve(
|
|
120
|
+
to: path.resolve(process.cwd(), 'client', 'index.css')
|
|
125
121
|
},
|
|
126
122
|
{
|
|
127
123
|
from: path.resolve(import.meta.dirname, './public/env-config.js'),
|
|
128
|
-
to: path.resolve(
|
|
124
|
+
to: path.resolve(process.cwd(), 'client', 'env-config.js')
|
|
129
125
|
}
|
|
130
126
|
]
|
|
131
127
|
})
|