@jayfong/x-server 2.81.0 → 2.81.1
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/_cjs/cli/build_util.js +6 -1
- package/lib/_cjs/cli/cli.js +2 -1
- package/lib/cli/build_util.d.ts +1 -0
- package/lib/cli/build_util.js +6 -1
- package/lib/cli/cli.js +2 -1
- package/package.json +1 -1
|
@@ -186,8 +186,13 @@ class BuildUtil {
|
|
|
186
186
|
onlyFiles: true,
|
|
187
187
|
absolute: true
|
|
188
188
|
});
|
|
189
|
+
const prismaCliBinaryTargets = options.prismaCliBinaryTargets?.split(',') || [];
|
|
189
190
|
for (const libqueryEngineFile of libqueryEngineFiles) {
|
|
190
|
-
|
|
191
|
+
const libqueryEngineFileBaseName = _nodePath.default.basename(libqueryEngineFile);
|
|
192
|
+
if (prismaCliBinaryTargets.length && prismaCliBinaryTargets.every(prismaCliBinaryTarget => !libqueryEngineFile.includes(prismaCliBinaryTarget))) {
|
|
193
|
+
break;
|
|
194
|
+
}
|
|
195
|
+
await _fsExtra.default.copyFile(libqueryEngineFile, _nodePath.default.join(distDir, libqueryEngineFileBaseName));
|
|
191
196
|
}
|
|
192
197
|
}
|
|
193
198
|
|
package/lib/_cjs/cli/cli.js
CHANGED
|
@@ -201,7 +201,8 @@ _yargs.default.command('dev', '开始开发', _ => _.positional('index', {
|
|
|
201
201
|
onlyCode: true,
|
|
202
202
|
beforeReplace: v => (0, _vtils.escapeRegExp)(v)
|
|
203
203
|
});
|
|
204
|
-
})
|
|
204
|
+
}),
|
|
205
|
+
prismaCliBinaryTargets: envMap.PRISMA_CLI_BINARY_TARGETS
|
|
205
206
|
});
|
|
206
207
|
console.log('构建成功');
|
|
207
208
|
if (argv.deploy) {
|
package/lib/cli/build_util.d.ts
CHANGED
package/lib/cli/build_util.js
CHANGED
|
@@ -180,8 +180,13 @@ export class BuildUtil {
|
|
|
180
180
|
onlyFiles: true,
|
|
181
181
|
absolute: true
|
|
182
182
|
});
|
|
183
|
+
const prismaCliBinaryTargets = options.prismaCliBinaryTargets?.split(',') || [];
|
|
183
184
|
for (const libqueryEngineFile of libqueryEngineFiles) {
|
|
184
|
-
|
|
185
|
+
const libqueryEngineFileBaseName = path.basename(libqueryEngineFile);
|
|
186
|
+
if (prismaCliBinaryTargets.length && prismaCliBinaryTargets.every(prismaCliBinaryTarget => !libqueryEngineFile.includes(prismaCliBinaryTarget))) {
|
|
187
|
+
break;
|
|
188
|
+
}
|
|
189
|
+
await fs.copyFile(libqueryEngineFile, path.join(distDir, libqueryEngineFileBaseName));
|
|
185
190
|
}
|
|
186
191
|
}
|
|
187
192
|
|
package/lib/cli/cli.js
CHANGED
|
@@ -199,7 +199,8 @@ yargs.command('dev', '开始开发', _ => _.positional('index', {
|
|
|
199
199
|
onlyCode: true,
|
|
200
200
|
beforeReplace: v => escapeRegExp(v)
|
|
201
201
|
});
|
|
202
|
-
})
|
|
202
|
+
}),
|
|
203
|
+
prismaCliBinaryTargets: envMap.PRISMA_CLI_BINARY_TARGETS
|
|
203
204
|
});
|
|
204
205
|
console.log('构建成功');
|
|
205
206
|
if (argv.deploy) {
|