@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.
@@ -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
- await _fsExtra.default.copyFile(libqueryEngineFile, _nodePath.default.join(distDir, _nodePath.default.basename(libqueryEngineFile)));
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
 
@@ -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) {
@@ -7,6 +7,7 @@ export interface BuildOptions {
7
7
  noInstall?: boolean;
8
8
  channel?: string;
9
9
  excludeFiles?: string[];
10
+ prismaCliBinaryTargets?: string;
10
11
  }
11
12
  export declare class BuildUtil {
12
13
  static build(options: BuildOptions): Promise<void>;
@@ -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
- await fs.copyFile(libqueryEngineFile, path.join(distDir, path.basename(libqueryEngineFile)));
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) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jayfong/x-server",
3
- "version": "2.81.0",
3
+ "version": "2.81.1",
4
4
  "license": "ISC",
5
5
  "sideEffects": false,
6
6
  "main": "lib/_cjs/index.js",