cad | ts config base
This commit is contained in:
parent
83332c3cb3
commit
a19de93f0e
6
packages/cad/dist/cad/sw-convert.js
vendored
6
packages/cad/dist/cad/sw-convert.js
vendored
File diff suppressed because one or more lines are too long
@ -3,7 +3,7 @@ import pMap from 'p-map'
|
||||
import pkg from 'which';
|
||||
const { sync: which } = pkg;
|
||||
import { resolve, OSR_CACHE } from '@polymech/commons'
|
||||
import { equalFiles, swProcMessage } from './sw-util.js'
|
||||
import { dirname,equalFiles, swProcMessage } from './sw-util.js'
|
||||
import { reportCSV } from '../report/csv.js'
|
||||
import { logger, substitute } from '../index.js'
|
||||
import { removeEmpty } from '../lib/index.js'
|
||||
@ -210,7 +210,7 @@ export const convertFile = async (
|
||||
const bin = path.resolve(`${cwd}/${exe}`)
|
||||
if (!exists(bin)) {
|
||||
logger.error(`${bin} doesnt exists in ${cwd}`)
|
||||
logger.error('dirname:' + import.meta.dirname)
|
||||
logger.error('__dirname:' + dirname())
|
||||
logger.error('options.sw ' + options.sw)
|
||||
return
|
||||
}
|
||||
|
||||
@ -3,26 +3,11 @@ import { logger } from '../index.js'
|
||||
import { SolidworkOptions } from '../types.js'
|
||||
import { defaultOptions, sanitize } from '../sw_argv.js'
|
||||
import { convert } from '../cad/sw-convert.js'
|
||||
|
||||
export const options = (yargs: CLI.Argv) => defaultOptions(yargs)
|
||||
|
||||
/*
|
||||
export const register = (cli: CLI.Argv) => {
|
||||
return cli.command('sw', 'Convert CAD files via Solidworks Interop API', options, async (argv: CLI.Arguments) => {
|
||||
if (argv.help) { return }
|
||||
const options = sanitize(argv) as SolidworkOptions
|
||||
logger.setSettings({ minLevel: options.logLevel as any })
|
||||
logger.info("options " + argv.dst, options)
|
||||
return convert(options) as any
|
||||
})
|
||||
}
|
||||
*/
|
||||
export const builder = options
|
||||
|
||||
export const handler = (argv) => {
|
||||
if (argv.help) { return }
|
||||
const options = sanitize(argv) as SolidworkOptions
|
||||
logger.setSettings({ minLevel: options.logLevel as any })
|
||||
logger.info("options " + argv.dst, options)
|
||||
return convert(options) as any
|
||||
};
|
||||
const options = sanitize(argv) as SolidworkOptions
|
||||
logger.setSettings({ minLevel: options.logLevel as any })
|
||||
logger.info("options " + argv.dst, options)
|
||||
return convert(options) as any
|
||||
}
|
||||
@ -4,7 +4,7 @@
|
||||
"declaration": true,
|
||||
"strict": false,
|
||||
"moduleResolution": "nodenext",
|
||||
"target": "es2022",
|
||||
"target": "ESNext",
|
||||
"module": "NodeNext",
|
||||
"esModuleInterop": true,
|
||||
"skipLibCheck": true,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user