@xfe-repo/web-app 1.2.7 → 1.2.9
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/deploy/Dockerfile +1 -1
- package/deploy/helm/values.yaml +3 -3
- package/dist/chunk-EQD7HO6T.mjs +39 -0
- package/dist/cli.d.mts +2 -0
- package/dist/cli.mjs +66 -0
- package/dist/config.d.mts +3 -0
- package/dist/config.mjs +2 -0
- package/package.json +3 -3
package/deploy/Dockerfile
CHANGED
package/deploy/helm/values.yaml
CHANGED
|
@@ -10,11 +10,11 @@ virtualService:
|
|
|
10
10
|
enabled: true
|
|
11
11
|
hosts:
|
|
12
12
|
test:
|
|
13
|
-
- '<<HOST_PREFIX>>.
|
|
13
|
+
- '<<HOST_PREFIX>>.platform.t.eshetang.com'
|
|
14
14
|
stage:
|
|
15
|
-
- 'stage.
|
|
15
|
+
- 'stage.platform.t.eshetang.com'
|
|
16
16
|
prod:
|
|
17
|
-
- '
|
|
17
|
+
- 'platform.eshetang.com'
|
|
18
18
|
gateways:
|
|
19
19
|
- 'common-gateway-eshetang'
|
|
20
20
|
targetK8s: 'saas'
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
// src/config.ts
|
|
2
|
+
import path from "path";
|
|
3
|
+
import fs from "fs";
|
|
4
|
+
import yaml from "yaml";
|
|
5
|
+
var configDeploy = function() {
|
|
6
|
+
var xfeConfig = JSON.parse(fs.readFileSync("./xfe.json", "utf8"));
|
|
7
|
+
if (!(xfeConfig === null || xfeConfig === void 0 ? void 0 : xfeConfig.deploy)) return;
|
|
8
|
+
var droneConfigFilePath = path.resolve(__dirname, "../deploy/.drone.yml");
|
|
9
|
+
fs.cpSync(droneConfigFilePath, xfeConfig.deploy.droneConfigPath || "./.drone.yml");
|
|
10
|
+
var valuesYamlFilePath = path.resolve(__dirname, "../deploy/helm/values.yaml");
|
|
11
|
+
var valuesYamlFile = fs.readFileSync(valuesYamlFilePath, "utf8");
|
|
12
|
+
var valuesYaml = yaml.parse(valuesYamlFile);
|
|
13
|
+
if (!valuesYaml.virtualService) valuesYaml.virtualService = {};
|
|
14
|
+
if (!valuesYaml.virtualService.hosts) valuesYaml.virtualService.hosts = {
|
|
15
|
+
test: [],
|
|
16
|
+
stage: [],
|
|
17
|
+
prod: []
|
|
18
|
+
};
|
|
19
|
+
var _xfeConfig_deploy = xfeConfig.deploy, _xfeConfig_deploy_virtualServiceEnabled = _xfeConfig_deploy.virtualServiceEnabled, virtualServiceEnabled = _xfeConfig_deploy_virtualServiceEnabled === void 0 ? true : _xfeConfig_deploy_virtualServiceEnabled, _xfeConfig_deploy_hostsProd = _xfeConfig_deploy.hostsProd, hostsProd = _xfeConfig_deploy_hostsProd === void 0 ? [] : _xfeConfig_deploy_hostsProd, _xfeConfig_deploy_hostsStage = _xfeConfig_deploy.hostsStage, hostsStage = _xfeConfig_deploy_hostsStage === void 0 ? [] : _xfeConfig_deploy_hostsStage, _xfeConfig_deploy_hostsTest = _xfeConfig_deploy.hostsTest, hostsTest = _xfeConfig_deploy_hostsTest === void 0 ? [] : _xfeConfig_deploy_hostsTest, _xfeConfig_deploy_gateways = _xfeConfig_deploy.gateways, gateways = _xfeConfig_deploy_gateways === void 0 ? [
|
|
20
|
+
"common-gateway-eshetang"
|
|
21
|
+
] : _xfeConfig_deploy_gateways;
|
|
22
|
+
var _xfeConfig_deploy1 = xfeConfig.deploy, _xfeConfig_deploy_targetK8s = _xfeConfig_deploy1.targetK8s, targetK8s = _xfeConfig_deploy_targetK8s === void 0 ? "saas" : _xfeConfig_deploy_targetK8s, _xfeConfig_deploy_targetNamespace = _xfeConfig_deploy1.targetNamespace, targetNamespace = _xfeConfig_deploy_targetNamespace === void 0 ? "" : _xfeConfig_deploy_targetNamespace;
|
|
23
|
+
valuesYaml.virtualService.enabled = virtualServiceEnabled;
|
|
24
|
+
valuesYaml.virtualService.gateways = gateways;
|
|
25
|
+
valuesYaml.virtualService.hosts.prod = hostsProd;
|
|
26
|
+
valuesYaml.virtualService.hosts.stage = hostsStage;
|
|
27
|
+
valuesYaml.virtualService.hosts.test = hostsTest;
|
|
28
|
+
valuesYaml.targetK8s = targetK8s;
|
|
29
|
+
valuesYaml.namespace = targetNamespace;
|
|
30
|
+
var valuesYamlStr = yaml.stringify(valuesYaml, {
|
|
31
|
+
defaultStringType: "QUOTE_SINGLE",
|
|
32
|
+
defaultKeyType: "PLAIN"
|
|
33
|
+
});
|
|
34
|
+
fs.writeFileSync(valuesYamlFilePath, valuesYamlStr, "utf8");
|
|
35
|
+
};
|
|
36
|
+
var config = function() {
|
|
37
|
+
configDeploy();
|
|
38
|
+
};
|
|
39
|
+
export { config };
|
package/dist/cli.d.mts
ADDED
package/dist/cli.mjs
ADDED
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
function _array_like_to_array(arr, len) {
|
|
2
|
+
if (len == null || len > arr.length) len = arr.length;
|
|
3
|
+
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
4
|
+
return arr2;
|
|
5
|
+
}
|
|
6
|
+
function _array_with_holes(arr) {
|
|
7
|
+
if (Array.isArray(arr)) return arr;
|
|
8
|
+
}
|
|
9
|
+
function _iterable_to_array_limit(arr, i) {
|
|
10
|
+
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
11
|
+
if (_i == null) return;
|
|
12
|
+
var _arr = [];
|
|
13
|
+
var _n = true;
|
|
14
|
+
var _d = false;
|
|
15
|
+
var _s, _e;
|
|
16
|
+
try {
|
|
17
|
+
for(_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true){
|
|
18
|
+
_arr.push(_s.value);
|
|
19
|
+
if (i && _arr.length === i) break;
|
|
20
|
+
}
|
|
21
|
+
} catch (err) {
|
|
22
|
+
_d = true;
|
|
23
|
+
_e = err;
|
|
24
|
+
} finally{
|
|
25
|
+
try {
|
|
26
|
+
if (!_n && _i["return"] != null) _i["return"]();
|
|
27
|
+
} finally{
|
|
28
|
+
if (_d) throw _e;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
return _arr;
|
|
32
|
+
}
|
|
33
|
+
function _non_iterable_rest() {
|
|
34
|
+
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
35
|
+
}
|
|
36
|
+
function _sliced_to_array(arr, i) {
|
|
37
|
+
return _array_with_holes(arr) || _iterable_to_array_limit(arr, i) || _unsupported_iterable_to_array(arr, i) || _non_iterable_rest();
|
|
38
|
+
}
|
|
39
|
+
function _unsupported_iterable_to_array(o, minLen) {
|
|
40
|
+
if (!o) return;
|
|
41
|
+
if (typeof o === "string") return _array_like_to_array(o, minLen);
|
|
42
|
+
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
43
|
+
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
44
|
+
if (n === "Map" || n === "Set") return Array.from(n);
|
|
45
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
|
|
46
|
+
}
|
|
47
|
+
import { config } from "./chunk-EQD7HO6T.mjs";
|
|
48
|
+
// src/cli.ts
|
|
49
|
+
import minimist from "minimist";
|
|
50
|
+
import { execSync } from "child_process";
|
|
51
|
+
import path from "path";
|
|
52
|
+
var argv = minimist(process.argv.slice(2));
|
|
53
|
+
var commands = argv._;
|
|
54
|
+
var _commands = _sliced_to_array(commands, 1), command = _commands[0];
|
|
55
|
+
var appPackageRoot = path.resolve(__dirname, "../");
|
|
56
|
+
if (command === "dev") {
|
|
57
|
+
execSync("node ".concat(path.join(appPackageRoot, "scripts/dev.js")), {
|
|
58
|
+
stdio: "inherit"
|
|
59
|
+
});
|
|
60
|
+
} else if (command === "build") {
|
|
61
|
+
execSync("node ".concat(path.join(appPackageRoot, "scripts/build.js")), {
|
|
62
|
+
stdio: "inherit"
|
|
63
|
+
});
|
|
64
|
+
} else if (command === "config") {
|
|
65
|
+
config();
|
|
66
|
+
}
|
package/dist/config.mjs
ADDED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xfe-repo/web-app",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.9",
|
|
4
4
|
"bin": {
|
|
5
5
|
"xfe-web": "./bin/index.js"
|
|
6
6
|
},
|
|
@@ -78,8 +78,8 @@
|
|
|
78
78
|
"webpack-manifest-plugin": "^4.0.2",
|
|
79
79
|
"workbox-webpack-plugin": "^7.0.0",
|
|
80
80
|
"yaml": "^2.3.4",
|
|
81
|
-
"@xfe-repo/
|
|
82
|
-
"@xfe-repo/
|
|
81
|
+
"@xfe-repo/eslint-config": "0.0.5",
|
|
82
|
+
"@xfe-repo/typescript-config": "0.0.6"
|
|
83
83
|
},
|
|
84
84
|
"peerDependencies": {
|
|
85
85
|
"react": "18.2.0",
|