rigjs 2.1.11 → 2.1.15
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 +4 -4
- package/lib/preinstall/index.js +3 -4
- package/lib/publish/index.ts +3 -3
- package/package.json +1 -1
package/lib/preinstall/index.js
CHANGED
|
@@ -135,8 +135,8 @@ const checkDepsValid = (rigJson5) => {
|
|
|
135
135
|
print.error(`checkDepsValid failed:${e.message}`);
|
|
136
136
|
valid = false;
|
|
137
137
|
}
|
|
138
|
-
return valid;
|
|
139
138
|
}
|
|
139
|
+
return valid;
|
|
140
140
|
}
|
|
141
141
|
//加载命令控制器
|
|
142
142
|
const load = async (cmd) => {
|
|
@@ -145,9 +145,8 @@ const load = async (cmd) => {
|
|
|
145
145
|
//读取package.rig.json5
|
|
146
146
|
let rigJson5Str = fs.readFileSync(path.join(process.cwd(), 'package.rig.json5'));
|
|
147
147
|
let rigJson5 = json5.parse(rigJson5Str);
|
|
148
|
-
if (!validate(rigJson5)) process.exit(1)
|
|
149
|
-
if (!checkDepsValid(rigJson5)) process.exit(1)
|
|
150
|
-
//重置rigs
|
|
148
|
+
if (!validate(rigJson5)) setTimeout(()=>{process.exit(1)},200)
|
|
149
|
+
if (!checkDepsValid(rigJson5)) setTimeout(()=>{process.exit(1)},200)
|
|
151
150
|
if (!(fs.existsSync('./rigs') && fs.lstatSync('./rigs').isDirectory())) {
|
|
152
151
|
print.info('create folder rigs');
|
|
153
152
|
fs.mkdirSync('rigs');
|
package/lib/publish/index.ts
CHANGED
|
@@ -95,7 +95,7 @@ export default async (cmd: any) => {
|
|
|
95
95
|
setRewriteUriPromises.push(
|
|
96
96
|
setRewriteUri(
|
|
97
97
|
domain,
|
|
98
|
-
'^\\/(
|
|
98
|
+
'^\\/([\\w-/%]*\\.[a-zA-Z0-9]+)($|\\?)',
|
|
99
99
|
`/${endpoint.deployDir.replace(/\\/g, '/')}/$1`,
|
|
100
100
|
cdn
|
|
101
101
|
)
|
|
@@ -103,7 +103,7 @@ export default async (cmd: any) => {
|
|
|
103
103
|
setRewriteUriPromises.push(
|
|
104
104
|
setRewriteUri(
|
|
105
105
|
domain,
|
|
106
|
-
'^\\/([\\w
|
|
106
|
+
'^\\/([\\w-/]+\\w+)([/?#]*)',
|
|
107
107
|
`/${endpoint.deployDir.replace(/\\/g, '/')}/$1.html`,
|
|
108
108
|
cdn
|
|
109
109
|
)
|
|
@@ -112,7 +112,7 @@ export default async (cmd: any) => {
|
|
|
112
112
|
setRewriteUriPromises.push(
|
|
113
113
|
setRewriteUri(
|
|
114
114
|
domain,
|
|
115
|
-
'^\\/(
|
|
115
|
+
'^\\/([\\w-/%]*\\.[a-zA-Z0-9]+)($|\\?)',
|
|
116
116
|
`/$1`,
|
|
117
117
|
cdn
|
|
118
118
|
)
|
package/package.json
CHANGED