@xylabs/ts-scripts-yarn3 4.0.0-rc.9 → 4.0.0
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/dist/actions/build.mjs.map +1 -1
- package/dist/actions/clean-docs.mjs +14 -4
- package/dist/actions/clean-docs.mjs.map +1 -1
- package/dist/actions/clean-eslint.mjs +16 -4
- package/dist/actions/clean-eslint.mjs.map +1 -1
- package/dist/actions/clean-jest.mjs.map +1 -1
- package/dist/actions/clean.mjs.map +1 -1
- package/dist/actions/compile.mjs +3 -2
- package/dist/actions/compile.mjs.map +1 -1
- package/dist/actions/copy-assets.mjs.map +1 -1
- package/dist/actions/cycle.mjs +25 -110
- package/dist/actions/cycle.mjs.map +1 -1
- package/dist/actions/dead.mjs.map +1 -1
- package/dist/actions/deploy-major.mjs.map +1 -1
- package/dist/actions/deploy-minor.mjs.map +1 -1
- package/dist/actions/deploy-next.mjs.map +1 -1
- package/dist/actions/deploy.mjs.map +1 -1
- package/dist/actions/deps.mjs.map +1 -1
- package/dist/actions/dupdeps.mjs +3 -2
- package/dist/actions/dupdeps.mjs.map +1 -1
- package/dist/actions/fix.mjs.map +1 -1
- package/dist/actions/gen-docs.mjs.map +1 -1
- package/dist/actions/gitignore-gen.mjs.map +1 -1
- package/dist/actions/index.mjs +213 -55
- package/dist/actions/index.mjs.map +1 -1
- package/dist/actions/license.mjs.map +1 -1
- package/dist/actions/lint-clean.mjs.map +1 -1
- package/dist/actions/lint-profile.mjs.map +1 -1
- package/dist/actions/lint.mjs.map +1 -1
- package/dist/actions/npmignore-gen.mjs.map +1 -1
- package/dist/actions/package/clean-outputs.mjs +16 -2
- package/dist/actions/package/clean-outputs.mjs.map +1 -1
- package/dist/actions/package/clean-typescript.mjs +16 -2
- package/dist/actions/package/clean-typescript.mjs.map +1 -1
- package/dist/actions/package/clean.mjs +17 -4
- package/dist/actions/package/clean.mjs.map +1 -1
- package/dist/actions/package/compile/buildEntries.mjs.map +1 -1
- package/dist/actions/package/compile/compile.mjs +151 -11
- package/dist/actions/package/compile/compile.mjs.map +1 -1
- package/dist/actions/package/compile/copyTypeFiles.mjs.map +1 -1
- package/dist/actions/package/compile/getCompilerOptions.mjs +145 -8
- package/dist/actions/package/compile/getCompilerOptions.mjs.map +1 -1
- package/dist/actions/package/compile/index.mjs +151 -11
- package/dist/actions/package/compile/index.mjs.map +1 -1
- package/dist/actions/package/compile/packageCompileTsc.mjs +148 -8
- package/dist/actions/package/compile/packageCompileTsc.mjs.map +1 -1
- package/dist/actions/package/compile/packageCompileTscTypes.mjs +145 -8
- package/dist/actions/package/compile/packageCompileTscTypes.mjs.map +1 -1
- package/dist/actions/package/compile/packageCompileTsup.mjs +3 -0
- package/dist/actions/package/compile/packageCompileTsup.mjs.map +1 -1
- package/dist/actions/package/copy-assets.mjs.map +1 -1
- package/dist/actions/package/deps.mjs.map +1 -1
- package/dist/actions/package/gen-docs.mjs.map +1 -1
- package/dist/actions/package/index.mjs +205 -52
- package/dist/actions/package/index.mjs.map +1 -1
- package/dist/actions/package/publint.mjs +3 -0
- package/dist/actions/package/publint.mjs.map +1 -1
- package/dist/actions/package/recompile.mjs +192 -39
- package/dist/actions/package/recompile.mjs.map +1 -1
- package/dist/actions/publint.mjs.map +1 -1
- package/dist/actions/rebuild.mjs.map +1 -1
- package/dist/actions/recompile.mjs.map +1 -1
- package/dist/actions/reinstall.mjs.map +1 -1
- package/dist/actions/relint.mjs.map +1 -1
- package/dist/actions/retest.mjs.map +1 -1
- package/dist/actions/sonar.mjs.map +1 -1
- package/dist/actions/statics.mjs +3 -2
- package/dist/actions/statics.mjs.map +1 -1
- package/dist/actions/test.mjs.map +1 -1
- package/dist/actions/up.mjs.map +1 -1
- package/dist/actions/updo.mjs.map +1 -1
- package/dist/actions/upplug.mjs.map +1 -1
- package/dist/actions/upyarn.mjs.map +1 -1
- package/dist/actions/yarn3only.mjs.map +1 -1
- package/dist/bin/package/clean-outputs.mjs +14 -2
- package/dist/bin/package/clean-outputs.mjs.map +1 -1
- package/dist/bin/package/clean-typescript.mjs +14 -2
- package/dist/bin/package/clean-typescript.mjs.map +1 -1
- package/dist/bin/package/clean.mjs +15 -4
- package/dist/bin/package/clean.mjs.map +1 -1
- package/dist/bin/package/compile-only.mjs +151 -11
- package/dist/bin/package/compile-only.mjs.map +1 -1
- package/dist/bin/package/compile-tsup.mjs +3 -0
- package/dist/bin/package/compile-tsup.mjs.map +1 -1
- package/dist/bin/package/compile.mjs +151 -11
- package/dist/bin/package/compile.mjs.map +1 -1
- package/dist/bin/package/copy-assets-cjs.mjs.map +1 -1
- package/dist/bin/package/copy-assets-esm.mjs.map +1 -1
- package/dist/bin/package/deps.mjs.map +1 -1
- package/dist/bin/package/gen-docs.mjs.map +1 -1
- package/dist/bin/package/publint.mjs +3 -0
- package/dist/bin/package/publint.mjs.map +1 -1
- package/dist/bin/package/recompile.mjs +170 -19
- package/dist/bin/package/recompile.mjs.map +1 -1
- package/dist/bin/xy-ts.mjs +52 -32
- package/dist/bin/xy-ts.mjs.map +1 -1
- package/dist/bin/xy.mjs +52 -32
- package/dist/bin/xy.mjs.map +1 -1
- package/dist/index.d.ts +11 -9
- package/dist/index.mjs +216 -57
- package/dist/index.mjs.map +1 -1
- package/dist/lib/createBuildConfig.mjs.map +1 -1
- package/dist/lib/defaultBuildConfig.mjs.map +1 -1
- package/dist/lib/deleteGlob.mjs +19 -0
- package/dist/lib/deleteGlob.mjs.map +1 -0
- package/dist/lib/dependencies/DuplicateDetector.mjs +3 -2
- package/dist/lib/dependencies/DuplicateDetector.mjs.map +1 -1
- package/dist/lib/dependencies/detectDuplicateDependencies.mjs +3 -2
- package/dist/lib/dependencies/detectDuplicateDependencies.mjs.map +1 -1
- package/dist/lib/dependencies/index.mjs +3 -2
- package/dist/lib/dependencies/index.mjs.map +1 -1
- package/dist/lib/file/ReadFileSyncOptions.mjs.map +1 -1
- package/dist/lib/file/fileLines.mjs.map +1 -1
- package/dist/lib/file/index.mjs.map +1 -1
- package/dist/lib/file/tryReadFileSync.mjs.map +1 -1
- package/dist/lib/generateIgnoreFiles.mjs.map +1 -1
- package/dist/lib/index.mjs +160 -5
- package/dist/lib/index.mjs.map +1 -1
- package/dist/lib/loadConfig.mjs +143 -3
- package/dist/lib/loadConfig.mjs.map +1 -1
- package/dist/lib/processEx.mjs.map +1 -1
- package/dist/lib/runSteps.mjs.map +1 -1
- package/dist/lib/runStepsAsync.mjs.map +1 -1
- package/dist/lib/runXy.mjs.map +1 -1
- package/dist/lib/safeExit.mjs.map +1 -1
- package/dist/lib/withErrnoException.mjs.map +1 -1
- package/dist/lib/yarn/index.mjs.map +1 -1
- package/dist/lib/yarn/workspace/index.mjs.map +1 -1
- package/dist/lib/yarn/workspace/yarnWorkspace.mjs.map +1 -1
- package/dist/lib/yarn/workspace/yarnWorkspaces.mjs.map +1 -1
- package/dist/loadPackageConfig.mjs.map +1 -1
- package/dist/xy/index.mjs +52 -32
- package/dist/xy/index.mjs.map +1 -1
- package/dist/xy/param.mjs.map +1 -1
- package/dist/xy/xy.mjs +52 -32
- package/dist/xy/xy.mjs.map +1 -1
- package/dist/xy/xyBuildCommands.mjs +3 -2
- package/dist/xy/xyBuildCommands.mjs.map +1 -1
- package/dist/xy/xyCommonCommands.mjs +14 -4
- package/dist/xy/xyCommonCommands.mjs.map +1 -1
- package/dist/xy/xyDeployCommands.mjs.map +1 -1
- package/dist/xy/xyInstallCommands.mjs +3 -2
- package/dist/xy/xyInstallCommands.mjs.map +1 -1
- package/dist/xy/xyLintCommands.mjs +30 -22
- package/dist/xy/xyLintCommands.mjs.map +1 -1
- package/dist/xy/xyParseOptions.mjs.map +1 -1
- package/package.json +53 -55
- package/src/actions/build.ts +3 -1
- package/src/actions/clean-docs.ts +2 -3
- package/src/actions/clean-eslint.ts +3 -2
- package/src/actions/clean.ts +3 -1
- package/src/actions/compile.ts +13 -3
- package/src/actions/cycle.ts +15 -4
- package/src/actions/deps.ts +6 -5
- package/src/actions/gen-docs.ts +3 -4
- package/src/actions/package/clean-outputs.ts +3 -2
- package/src/actions/package/clean-typescript.ts +3 -2
- package/src/actions/package/compile/XyConfig.ts +5 -13
- package/src/actions/package/compile/buildEntries.ts +1 -1
- package/src/actions/package/compile/compile.ts +3 -1
- package/src/actions/package/compile/copyTypeFiles.ts +1 -1
- package/src/actions/package/compile/getCompilerOptions.ts +10 -8
- package/src/actions/package/compile/packageCompileTsc.ts +11 -6
- package/src/actions/package/compile/packageCompileTscTypes.ts +5 -3
- package/src/actions/package/compile/packageCompileTsup.ts +6 -3
- package/src/actions/package/copy-assets.ts +1 -3
- package/src/actions/package/deps.ts +6 -2
- package/src/actions/package/gen-docs.ts +3 -1
- package/src/actions/package/publint.ts +8 -5
- package/src/actions/publint.ts +3 -1
- package/src/actions/recompile.ts +47 -9
- package/src/actions/reinstall.ts +3 -1
- package/src/lib/defaultBuildConfig.ts +11 -1
- package/src/lib/deleteGlob.ts +13 -0
- package/src/lib/dependencies/DuplicateDetector.ts +4 -4
- package/src/lib/file/ReadFileSyncOptions.ts +4 -1
- package/src/lib/file/fileLines.ts +9 -3
- package/src/lib/file/tryReadFileSync.ts +4 -2
- package/src/lib/generateIgnoreFiles.ts +3 -1
- package/src/lib/index.ts +1 -0
- package/src/lib/loadConfig.ts +3 -4
- package/src/lib/runSteps.ts +2 -1
- package/src/lib/runStepsAsync.ts +1 -1
- package/src/lib/runXy.ts +4 -1
- package/src/lib/withErrnoException.ts +3 -1
- package/src/lib/yarn/workspace/yarnWorkspace.ts +1 -1
- package/src/lib/yarn/workspace/yarnWorkspaces.ts +1 -1
- package/src/loadPackageConfig.ts +1 -1
- package/src/types.d.ts +23 -0
- package/src/xy/param.ts +2 -4
- package/src/xy/xyBuildCommands.ts +10 -20
- package/src/xy/xyCommonCommands.ts +4 -2
- package/src/xy/xyDeployCommands.ts +4 -2
- package/src/xy/xyInstallCommands.ts +5 -5
- package/src/xy/xyLintCommands.ts +6 -4
- package/src/xy/xyParseOptions.ts +3 -2
- package/tsup.config.ts +2 -6
- package/xy.config.ts +1 -5
package/src/lib/index.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export * from './checkResult.ts'
|
|
2
2
|
export * from './createBuildConfig.ts'
|
|
3
3
|
export * from './defaultBuildConfig.ts'
|
|
4
|
+
export * from './deleteGlob.ts'
|
|
4
5
|
export * from './dependencies/index.ts'
|
|
5
6
|
export * from './file/index.ts'
|
|
6
7
|
export * from './generateIgnoreFiles.ts'
|
package/src/lib/loadConfig.ts
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import chalk from 'chalk'
|
|
2
2
|
import { cosmiconfig } from 'cosmiconfig'
|
|
3
|
-
|
|
4
|
-
import merge from 'lodash/merge.js'
|
|
3
|
+
import deepmerge from 'deepmerge'
|
|
5
4
|
|
|
6
5
|
let config: Record<string, unknown>
|
|
7
6
|
|
|
8
7
|
export const loadConfig = async <T extends object>(params?: T): Promise<T> => {
|
|
9
8
|
if (config) {
|
|
10
|
-
return
|
|
9
|
+
return deepmerge(config, params ?? {}) as T
|
|
11
10
|
}
|
|
12
11
|
|
|
13
12
|
const cosmicConfigResult = await cosmiconfig('xy', { cache: true }).search()
|
|
@@ -16,5 +15,5 @@ export const loadConfig = async <T extends object>(params?: T): Promise<T> => {
|
|
|
16
15
|
if (configFilePath) {
|
|
17
16
|
console.log(chalk.gray(`Loading config from ${configFilePath}`))
|
|
18
17
|
}
|
|
19
|
-
return
|
|
18
|
+
return deepmerge(config, params ?? {}) as T
|
|
20
19
|
}
|
package/src/lib/runSteps.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { SpawnSyncOptionsWithBufferEncoding } from 'node:child_process'
|
|
2
|
+
import { spawnSync } from 'node:child_process'
|
|
2
3
|
import { existsSync } from 'node:fs'
|
|
3
4
|
|
|
4
5
|
import chalk from 'chalk'
|
package/src/lib/runStepsAsync.ts
CHANGED
|
@@ -4,7 +4,7 @@ import { existsSync } from 'node:fs'
|
|
|
4
4
|
import chalk from 'chalk'
|
|
5
5
|
|
|
6
6
|
import { checkResult } from './checkResult.ts'
|
|
7
|
-
import { ScriptStep } from './runSteps.ts'
|
|
7
|
+
import type { ScriptStep } from './runSteps.ts'
|
|
8
8
|
import { safeExitAsync } from './safeExit.ts'
|
|
9
9
|
|
|
10
10
|
export const runStepAsync = (name: string, step: ScriptStep, exitOnFail = true, message?: string) => {
|
package/src/lib/runXy.ts
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { runSteps } from './runSteps.ts'
|
|
2
2
|
|
|
3
3
|
export const runXy = (command: string) => {
|
|
4
|
-
return runSteps(
|
|
4
|
+
return runSteps(
|
|
5
|
+
`XY [${command}]`,
|
|
6
|
+
[['yarn', ['xy', command, ...process.argv.filter((value, index) => (index > 1 ? value : undefined))]]],
|
|
7
|
+
)
|
|
5
8
|
}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { withError } from './withError.ts'
|
|
2
2
|
|
|
3
|
-
export const withErrnoException = <T extends NodeJS.ErrnoException = NodeJS.ErrnoException>(
|
|
3
|
+
export const withErrnoException = <T extends NodeJS.ErrnoException = NodeJS.ErrnoException>(
|
|
4
|
+
ex: unknown, closure: (error: T) => number,
|
|
5
|
+
) => {
|
|
4
6
|
return withError<T>(ex, closure, (ex: unknown) => (ex as NodeJS.ErrnoException).errno !== undefined)
|
|
5
7
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { spawnSync } from 'node:child_process'
|
|
2
2
|
|
|
3
|
-
import { Workspace } from './Workspace.ts'
|
|
3
|
+
import type { Workspace } from './Workspace.ts'
|
|
4
4
|
|
|
5
5
|
export const yarnWorkspaces = (): Workspace[] => {
|
|
6
6
|
const result = spawnSync('yarn', ['workspaces', 'list', '--json', '--recursive'], { encoding: 'utf8', shell: true })
|
package/src/loadPackageConfig.ts
CHANGED
package/src/types.d.ts
CHANGED
|
@@ -1,3 +1,26 @@
|
|
|
1
1
|
declare module 'rollup-plugin-exclude-dependencies-from-bundle'
|
|
2
2
|
declare module '@haensl/rollup-plugin-local-resolve'
|
|
3
3
|
declare module 'rollup-plugin-progress'
|
|
4
|
+
|
|
5
|
+
declare module 'eslint-plugin-import' {
|
|
6
|
+
const configs: Linter.Plugin
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
declare module 'eslint-plugin-workspaces' {
|
|
10
|
+
const configs: Linter.Plugin
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
declare module 'eslint-plugin-unicorn' {
|
|
14
|
+
const configs: {
|
|
15
|
+
'all': unknown
|
|
16
|
+
'flat/all': unknown
|
|
17
|
+
'flat/recommended': unknown
|
|
18
|
+
'recommended': unknown
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
declare module 'markdown-eslint-parser' {}
|
|
23
|
+
|
|
24
|
+
declare module 'eslint-plugin-md' {
|
|
25
|
+
const configs: Linter.Plugin
|
|
26
|
+
}
|
package/src/xy/param.ts
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import { Argv } from 'yargs'
|
|
1
|
+
import type { Argv } from 'yargs'
|
|
2
2
|
|
|
3
3
|
export const packagePositionalParam = (yargs: Argv<unknown>) => {
|
|
4
|
-
return yargs.positional('package', {
|
|
5
|
-
describe: 'Specific package to target',
|
|
6
|
-
})
|
|
4
|
+
return yargs.positional('package', { describe: 'Specific package to target' })
|
|
7
5
|
}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import { Argv } from 'yargs'
|
|
1
|
+
import type { Argv } from 'yargs'
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import {
|
|
4
|
+
build, compile, copyAssets, rebuild, recompile,
|
|
5
|
+
} from '../actions/index.ts'
|
|
4
6
|
|
|
5
7
|
export const xyBuildCommands = (args: Argv) => {
|
|
6
8
|
return args
|
|
@@ -8,9 +10,7 @@ export const xyBuildCommands = (args: Argv) => {
|
|
|
8
10
|
'build [package]',
|
|
9
11
|
'Build - Compile & Lint',
|
|
10
12
|
(yargs) => {
|
|
11
|
-
return yargs.positional('package', {
|
|
12
|
-
describe: 'Specific package to build',
|
|
13
|
-
})
|
|
13
|
+
return yargs.positional('package', { describe: 'Specific package to build' })
|
|
14
14
|
},
|
|
15
15
|
async (argv) => {
|
|
16
16
|
if (argv.verbose) {
|
|
@@ -30,9 +30,7 @@ export const xyBuildCommands = (args: Argv) => {
|
|
|
30
30
|
'compile [package]',
|
|
31
31
|
'Compile with Typescript & Copy Images',
|
|
32
32
|
(yargs) => {
|
|
33
|
-
return yargs.positional('package', {
|
|
34
|
-
describe: 'Specific package to compile',
|
|
35
|
-
})
|
|
33
|
+
return yargs.positional('package', { describe: 'Specific package to compile' })
|
|
36
34
|
},
|
|
37
35
|
async (argv) => {
|
|
38
36
|
if (argv.verbose) {
|
|
@@ -51,9 +49,7 @@ export const xyBuildCommands = (args: Argv) => {
|
|
|
51
49
|
'compile-only [package]',
|
|
52
50
|
'Compile with Typescript & Copy Images (No Publint)',
|
|
53
51
|
(yargs) => {
|
|
54
|
-
return yargs.positional('package', {
|
|
55
|
-
describe: 'Specific package to compile',
|
|
56
|
-
})
|
|
52
|
+
return yargs.positional('package', { describe: 'Specific package to compile' })
|
|
57
53
|
},
|
|
58
54
|
async (argv) => {
|
|
59
55
|
if (argv.verbose) {
|
|
@@ -73,9 +69,7 @@ export const xyBuildCommands = (args: Argv) => {
|
|
|
73
69
|
'recompile [package]',
|
|
74
70
|
'Re-compile with Typescript & Copy Images',
|
|
75
71
|
(yargs) => {
|
|
76
|
-
return yargs.positional('package', {
|
|
77
|
-
describe: 'Specific package to re-compile',
|
|
78
|
-
})
|
|
72
|
+
return yargs.positional('package', { describe: 'Specific package to re-compile' })
|
|
79
73
|
},
|
|
80
74
|
async (argv) => {
|
|
81
75
|
if (argv.verbose) {
|
|
@@ -94,9 +88,7 @@ export const xyBuildCommands = (args: Argv) => {
|
|
|
94
88
|
'rebuild [package]',
|
|
95
89
|
'Rebuild - Clean, Compile & Lint',
|
|
96
90
|
(yargs) => {
|
|
97
|
-
return yargs.positional('package', {
|
|
98
|
-
describe: 'Specific package to rebuild',
|
|
99
|
-
})
|
|
91
|
+
return yargs.positional('package', { describe: 'Specific package to rebuild' })
|
|
100
92
|
},
|
|
101
93
|
(argv) => {
|
|
102
94
|
if (argv.verbose) console.log(`Rebuilding: ${argv.package ?? 'all'}`)
|
|
@@ -107,9 +99,7 @@ export const xyBuildCommands = (args: Argv) => {
|
|
|
107
99
|
'copy-assets [package]',
|
|
108
100
|
'Copy Assets - Copy the assets from src to dist',
|
|
109
101
|
(yargs) => {
|
|
110
|
-
return yargs.positional('package', {
|
|
111
|
-
describe: 'Specific package to copy assets',
|
|
112
|
-
})
|
|
102
|
+
return yargs.positional('package', { describe: 'Specific package to copy assets' })
|
|
113
103
|
},
|
|
114
104
|
async (argv) => {
|
|
115
105
|
if (argv.verbose) console.log(`Copying Assets: ${argv.package ?? 'all'}`)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Argv } from 'yargs'
|
|
1
|
+
import type { Argv } from 'yargs'
|
|
2
2
|
|
|
3
3
|
import {
|
|
4
4
|
cleanDocs,
|
|
@@ -51,7 +51,9 @@ export const xyCommonCommands = (args: Argv) => {
|
|
|
51
51
|
},
|
|
52
52
|
(argv) => {
|
|
53
53
|
if (argv.verbose) console.log(`Checking Dependencies: ${argv.package ?? 'all'}`)
|
|
54
|
-
process.exitCode = deps({
|
|
54
|
+
process.exitCode = deps({
|
|
55
|
+
incremental: !!argv.incremental, jobs: argv.jobs as number, pkg: argv.package as string,
|
|
56
|
+
})
|
|
55
57
|
},
|
|
56
58
|
)
|
|
57
59
|
.command(
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import { Argv } from 'yargs'
|
|
1
|
+
import type { Argv } from 'yargs'
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import {
|
|
4
|
+
deploy, deployMajor, deployMinor, deployNext,
|
|
5
|
+
} from '../actions/index.ts'
|
|
4
6
|
|
|
5
7
|
export const xyDeployCommands = (args: Argv) => {
|
|
6
8
|
return args
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import { Argv } from 'yargs'
|
|
1
|
+
import type { Argv } from 'yargs'
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import {
|
|
4
|
+
clean, dupdeps, reinstall, statics, up, updo,
|
|
5
|
+
} from '../actions/index.ts'
|
|
4
6
|
|
|
5
7
|
export const xyInstallCommands = (args: Argv) => {
|
|
6
8
|
return args
|
|
@@ -8,9 +10,7 @@ export const xyInstallCommands = (args: Argv) => {
|
|
|
8
10
|
'clean [package]',
|
|
9
11
|
'Clean',
|
|
10
12
|
(yargs) => {
|
|
11
|
-
return yargs.positional('package', {
|
|
12
|
-
describe: 'Specific package to clean',
|
|
13
|
-
})
|
|
13
|
+
return yargs.positional('package', { describe: 'Specific package to clean' })
|
|
14
14
|
},
|
|
15
15
|
async (argv) => {
|
|
16
16
|
if (argv.verbose) {
|
package/src/xy/xyLintCommands.ts
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import chalk from 'chalk'
|
|
2
|
-
import { Argv } from 'yargs'
|
|
2
|
+
import type { Argv } from 'yargs'
|
|
3
3
|
|
|
4
|
-
import {
|
|
4
|
+
import {
|
|
5
|
+
cycle, fix, lint, lintProfile, publint, relint, sonar,
|
|
6
|
+
} from '../actions/index.ts'
|
|
5
7
|
import { packagePositionalParam } from './param.ts'
|
|
6
8
|
|
|
7
9
|
export const xyLintCommands = (args: Argv) => {
|
|
@@ -12,10 +14,10 @@ export const xyLintCommands = (args: Argv) => {
|
|
|
12
14
|
(yargs) => {
|
|
13
15
|
return packagePositionalParam(yargs)
|
|
14
16
|
},
|
|
15
|
-
(argv) => {
|
|
17
|
+
async (argv) => {
|
|
16
18
|
const start = Date.now()
|
|
17
19
|
if (argv.verbose) console.log('Cycle')
|
|
18
|
-
process.exitCode = cycle()
|
|
20
|
+
process.exitCode = await cycle()
|
|
19
21
|
console.log(chalk.blue(`Finished in ${Date.now() - start}ms`))
|
|
20
22
|
},
|
|
21
23
|
)
|
package/src/xy/xyParseOptions.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
1
|
+
import type { Argv } from 'yargs'
|
|
2
|
+
import yargs from 'yargs'
|
|
3
|
+
// eslint-disable-next-line import-x/no-internal-modules
|
|
3
4
|
import { hideBin } from 'yargs/helpers'
|
|
4
5
|
|
|
5
6
|
export const xyParseOptions = (): Argv => {
|
package/tsup.config.ts
CHANGED
|
@@ -4,12 +4,8 @@ export default defineConfig({
|
|
|
4
4
|
bundle: true,
|
|
5
5
|
cjsInterop: true,
|
|
6
6
|
clean: false,
|
|
7
|
-
dts: {
|
|
8
|
-
|
|
9
|
-
},
|
|
10
|
-
outExtension: ({ format }) => ({
|
|
11
|
-
js: format === 'cjs' ? '.cjs' : '.mjs',
|
|
12
|
-
}),
|
|
7
|
+
dts: { entry: ['src/index.ts'] },
|
|
8
|
+
outExtension: ({ format }) => ({ js: format === 'cjs' ? '.cjs' : '.mjs' }),
|
|
13
9
|
entry: ['src'],
|
|
14
10
|
format: ['esm'],
|
|
15
11
|
outDir: 'dist',
|