rigjs 2.1.7 → 2.1.10
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/built/index.js +3 -3
- package/lib/build/index.ts +2 -2
- package/lib/classes/cicd/Endpoint.ts +1 -0
- package/lib/deploy/index.ts +2 -2
- package/package.json +1 -1
package/lib/build/index.ts
CHANGED
|
@@ -64,7 +64,7 @@ export default async (cmd: any) => {
|
|
|
64
64
|
}
|
|
65
65
|
if (!ep.extra_env) ep.extra_env = {};
|
|
66
66
|
ep.extra_env['PUBLIC_PATH'] = ep.publicPath;
|
|
67
|
-
ep.extra_env['OUTPUT_DIR'] = path.join(cicd.source.root_path, ep.
|
|
67
|
+
ep.extra_env['OUTPUT_DIR'] = path.join(cicd.source.root_path, ep.deployDir);
|
|
68
68
|
|
|
69
69
|
switch (frameworktype) {
|
|
70
70
|
case FrameworkType.vue: {
|
|
@@ -84,7 +84,7 @@ export default async (cmd: any) => {
|
|
|
84
84
|
ep.defines['__DEPLOY_DIR__'] = ep.deployDir;
|
|
85
85
|
ep.defines['__RIG_PUBLIC_PATH__'] = ep.publicPath;
|
|
86
86
|
ep.defines['__RIG_DEPLOY_DIR__'] = ep.publicPath;
|
|
87
|
-
replaceDefine(path.join(cicd.source.root_path, ep.
|
|
87
|
+
replaceDefine(path.join(cicd.source.root_path, ep.deployDir), ep.defines);
|
|
88
88
|
}
|
|
89
89
|
} catch (e) {
|
|
90
90
|
console.error(e.message);
|
|
@@ -42,6 +42,7 @@ class Endpoint {
|
|
|
42
42
|
|
|
43
43
|
static createEndpointArr(cicdConfig: CICDConfig, schema: DirLevel[]) {
|
|
44
44
|
const endpointDict = cicdConfig.endpoints;
|
|
45
|
+
if (!endpointDict) throw new Error('No endpoints found');
|
|
45
46
|
return Object.keys(endpointDict).map((dir) => {
|
|
46
47
|
const info = endpointDict[dir];
|
|
47
48
|
return new Endpoint(dir, info, schema);
|
package/lib/deploy/index.ts
CHANGED
|
@@ -41,13 +41,13 @@ export default async (cmd: any) => {
|
|
|
41
41
|
const distPath = path.join(
|
|
42
42
|
process.cwd(),
|
|
43
43
|
cicd.source.root_path,
|
|
44
|
-
cicdCmd.endpoints[i].
|
|
44
|
+
cicdCmd.endpoints[i].deployDir
|
|
45
45
|
);
|
|
46
46
|
traverseFolder(distPath);
|
|
47
47
|
await aliOss.putStreamFiles(
|
|
48
48
|
filesList,
|
|
49
49
|
cicdCmd.endpoints[i].deployDir.replace(/\\/g, '/'),
|
|
50
|
-
cicdCmd.endpoints[i].
|
|
50
|
+
cicdCmd.endpoints[i].deployDir,
|
|
51
51
|
cicd.source.root_path
|
|
52
52
|
);
|
|
53
53
|
filesList = [];
|
package/package.json
CHANGED