@simplysm/sd-cli 7.0.53 → 7.0.54
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/build-tool/SdCliCacheCompilerHost.mjs +7 -2
- package/dist/builder/SdCliClientBuilder.mjs +39 -9
- package/dist/builder/SdCliServerBuilder.mjs +31 -20
- package/dist/entry-points/SdCliIndexFileGenerator.mjs +11 -7
- package/dist/entry-points/SdCliLocalUpdate.mjs +7 -2
- package/dist/entry-points/SdCliWorkspace.mjs +8 -2
- package/dist/packages/SdCliPackage.mjs +2 -1
- package/package.json +7 -6
- package/src/build-tool/SdCliCacheCompilerHost.ts +7 -1
- package/src/builder/SdCliClientBuilder.ts +51 -10
- package/src/builder/SdCliServerBuilder.ts +32 -19
- package/src/commons.ts +4 -3
- package/src/entry-points/SdCliIndexFileGenerator.ts +10 -6
- package/src/entry-points/SdCliLocalUpdate.ts +6 -1
- package/src/entry-points/SdCliWorkspace.ts +10 -1
- package/src/packages/SdCliPackage.ts +2 -0
- package/tsconfig-build.json +6 -2
- package/tsconfig.json +4 -1
- package/dist/bin/sd-cli.d.ts +0 -2
- package/dist/build-tool/SdCliCacheCompilerHost.d.ts +0 -10
- package/dist/build-tool/SdCliNgCacheCompilerHost.d.ts +0 -11
- package/dist/build-tool/SdCliPackageLinter.d.ts +0 -8
- package/dist/builder/SdCliClientBuilder.d.ts +0 -20
- package/dist/builder/SdCliJsLibBuilder.d.ts +0 -14
- package/dist/builder/SdCliServerBuilder.d.ts +0 -24
- package/dist/builder/SdCliTsLibBuilder.d.ts +0 -29
- package/dist/commons.d.ts +0 -62
- package/dist/entry-points/SdCliIndexFileGenerator.d.ts +0 -13
- package/dist/entry-points/SdCliLocalUpdate.d.ts +0 -13
- package/dist/entry-points/SdCliNpm.d.ts +0 -6
- package/dist/entry-points/SdCliPrepare.d.ts +0 -5
- package/dist/entry-points/SdCliWorkspace.d.ts +0 -27
- package/dist/packages/SdCliPackage.d.ts +0 -23
- package/dist/utils/SdCliBuildResultUtil.d.ts +0 -9
- package/dist/utils/SdCliConfigUtil.d.ts +0 -7
- package/dist/utils/SdCliNpmConfigUtil.d.ts +0 -7
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import ts from "typescript";
|
|
2
|
-
export declare class SdCliCacheCompilerHost {
|
|
3
|
-
static create(parsedTsconfig: ts.ParsedCommandLine, moduleResolutionCache: ts.ModuleResolutionCache, sourceFileCache: Map<string, IFileCache>, outputFileCache: Map<string, string>): ts.CompilerHost;
|
|
4
|
-
}
|
|
5
|
-
interface IFileCache {
|
|
6
|
-
exists?: boolean;
|
|
7
|
-
sourceFile?: ts.SourceFile;
|
|
8
|
-
content?: string;
|
|
9
|
-
}
|
|
10
|
-
export {};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import ts from "typescript";
|
|
2
|
-
export declare class SdCliNgCacheCompilerHost {
|
|
3
|
-
static wrap(compilerHost: ts.CompilerHost, sourceFileCache: Map<string, IFileCache>): ts.CompilerHost;
|
|
4
|
-
}
|
|
5
|
-
interface IFileCache {
|
|
6
|
-
exists?: boolean;
|
|
7
|
-
sourceFile?: ts.SourceFile;
|
|
8
|
-
content?: string;
|
|
9
|
-
styleContent?: string;
|
|
10
|
-
}
|
|
11
|
-
export {};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { ISdCliPackageBuildResult } from "../commons";
|
|
2
|
-
import ts from "typescript";
|
|
3
|
-
export declare class SdCliPackageLinter {
|
|
4
|
-
private readonly _rootPath;
|
|
5
|
-
private readonly _lintResultCache;
|
|
6
|
-
constructor(_rootPath: string);
|
|
7
|
-
lintAsync(filePaths: string[], program?: ts.Program): Promise<ISdCliPackageBuildResult[]>;
|
|
8
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
import { ISdCliClientPackageConfig, ISdCliPackageBuildResult } from "../commons";
|
|
3
|
-
import { EventEmitter } from "events";
|
|
4
|
-
import { NextHandleFunction } from "connect";
|
|
5
|
-
export declare class SdCliClientBuilder extends EventEmitter {
|
|
6
|
-
private readonly _rootPath;
|
|
7
|
-
private readonly _config;
|
|
8
|
-
private readonly _workspaceRootPath;
|
|
9
|
-
private readonly _logger;
|
|
10
|
-
private readonly _tsconfigFilePath;
|
|
11
|
-
private readonly _parsedTsconfig;
|
|
12
|
-
private readonly _npmConfigMap;
|
|
13
|
-
constructor(_rootPath: string, _config: ISdCliClientPackageConfig, _workspaceRootPath: string);
|
|
14
|
-
on(event: "change", listener: () => void): this;
|
|
15
|
-
on(event: "complete", listener: (results: ISdCliPackageBuildResult[]) => void): this;
|
|
16
|
-
watchAsync(): Promise<NextHandleFunction[]>;
|
|
17
|
-
buildAsync(): Promise<ISdCliPackageBuildResult[]>;
|
|
18
|
-
private _getWebpackConfig;
|
|
19
|
-
private _getNpmConfig;
|
|
20
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
import { ISdCliPackageBuildResult } from "../commons";
|
|
3
|
-
import { EventEmitter } from "events";
|
|
4
|
-
export declare class SdCliJsLibBuilder extends EventEmitter {
|
|
5
|
-
private readonly _rootPath;
|
|
6
|
-
private readonly _logger;
|
|
7
|
-
private readonly _linter;
|
|
8
|
-
constructor(_rootPath: string);
|
|
9
|
-
on(event: "change", listener: () => void): this;
|
|
10
|
-
on(event: "complete", listener: (results: ISdCliPackageBuildResult[]) => void): this;
|
|
11
|
-
watchAsync(): Promise<void>;
|
|
12
|
-
buildAsync(): Promise<ISdCliPackageBuildResult[]>;
|
|
13
|
-
private getRelatedPathsAsync;
|
|
14
|
-
}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
import { ISdCliPackageBuildResult, ISdCliServerPackageConfig } from "../commons";
|
|
3
|
-
import { EventEmitter } from "events";
|
|
4
|
-
export declare class SdCliServerBuilder extends EventEmitter {
|
|
5
|
-
private readonly _rootPath;
|
|
6
|
-
private readonly _config;
|
|
7
|
-
private readonly _workspaceRootPath;
|
|
8
|
-
private readonly _logger;
|
|
9
|
-
private readonly _tsconfigFilePath;
|
|
10
|
-
private readonly _parsedTsconfig;
|
|
11
|
-
private readonly _npmConfigMap;
|
|
12
|
-
constructor(_rootPath: string, _config: ISdCliServerPackageConfig, _workspaceRootPath: string);
|
|
13
|
-
on(event: "change", listener: () => void): this;
|
|
14
|
-
on(event: "complete", listener: (results: ISdCliPackageBuildResult[]) => void): this;
|
|
15
|
-
watchAsync(): Promise<void>;
|
|
16
|
-
buildAsync(): Promise<ISdCliPackageBuildResult[]>;
|
|
17
|
-
private _writeDistConfigFileAsync;
|
|
18
|
-
private _writeDistPm2ConfigFileAsync;
|
|
19
|
-
private _writeDistIisConfigFileAsync;
|
|
20
|
-
private _writeDistNpmConfigFileAsync;
|
|
21
|
-
private _getWebpackConfig;
|
|
22
|
-
private _getExternalModuleNames;
|
|
23
|
-
private _getNpmConfig;
|
|
24
|
-
}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
import { ISdCliPackageBuildResult } from "../commons";
|
|
3
|
-
import { EventEmitter } from "events";
|
|
4
|
-
export declare class SdCliTsLibBuilder extends EventEmitter {
|
|
5
|
-
private readonly _rootPath;
|
|
6
|
-
private readonly _logger;
|
|
7
|
-
private _moduleResolutionCache?;
|
|
8
|
-
private readonly _linter;
|
|
9
|
-
private readonly _fileCache;
|
|
10
|
-
private readonly _writeFileCache;
|
|
11
|
-
private _program?;
|
|
12
|
-
private _ngProgram?;
|
|
13
|
-
private _builder?;
|
|
14
|
-
private readonly _tsconfigFilePath;
|
|
15
|
-
private readonly _parsedTsconfig;
|
|
16
|
-
private readonly _npmConfig;
|
|
17
|
-
private readonly _isAngular;
|
|
18
|
-
constructor(_rootPath: string);
|
|
19
|
-
on(event: "change", listener: () => void): this;
|
|
20
|
-
on(event: "complete", listener: (results: ISdCliPackageBuildResult[]) => void): this;
|
|
21
|
-
watchAsync(): Promise<void>;
|
|
22
|
-
buildAsync(): Promise<ISdCliPackageBuildResult[]>;
|
|
23
|
-
private getAllRelatedPathsAsync;
|
|
24
|
-
private _runBuilderAsync;
|
|
25
|
-
private _createSdBuildPack;
|
|
26
|
-
private _createProgram;
|
|
27
|
-
private _configProgramSourceFileVersions;
|
|
28
|
-
private _createCacheCompilerHost;
|
|
29
|
-
}
|
package/dist/commons.d.ts
DELETED
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
export interface INpmConfig {
|
|
2
|
-
name: string;
|
|
3
|
-
version: string;
|
|
4
|
-
workspaces?: string[];
|
|
5
|
-
es2020?: string;
|
|
6
|
-
browser?: string;
|
|
7
|
-
module?: string;
|
|
8
|
-
main?: string;
|
|
9
|
-
exports?: Record<string, {
|
|
10
|
-
types?: string;
|
|
11
|
-
}>;
|
|
12
|
-
scripts?: Record<string, string>;
|
|
13
|
-
dependencies?: Record<string, string>;
|
|
14
|
-
optionalDependencies?: Record<string, string>;
|
|
15
|
-
devDependencies?: Record<string, string>;
|
|
16
|
-
peerDependencies?: Record<string, string>;
|
|
17
|
-
peerDependenciesMeta?: Record<string, {
|
|
18
|
-
optional?: boolean;
|
|
19
|
-
}>;
|
|
20
|
-
}
|
|
21
|
-
export interface ITsconfig {
|
|
22
|
-
compilerOptions?: {
|
|
23
|
-
outDir?: string;
|
|
24
|
-
baseUrl?: string;
|
|
25
|
-
paths?: Record<string, string[]>;
|
|
26
|
-
};
|
|
27
|
-
files?: string[];
|
|
28
|
-
}
|
|
29
|
-
export interface ISdCliPackageBuildResult {
|
|
30
|
-
filePath: string | undefined;
|
|
31
|
-
line: number | undefined;
|
|
32
|
-
char: number | undefined;
|
|
33
|
-
code: string | undefined;
|
|
34
|
-
severity: "error" | "warning";
|
|
35
|
-
message: string;
|
|
36
|
-
}
|
|
37
|
-
export interface ISdCliConfig {
|
|
38
|
-
packages: Record<string, TSdCliPackageConfig | undefined>;
|
|
39
|
-
localUpdates?: Record<string, string>;
|
|
40
|
-
}
|
|
41
|
-
export declare type TSdCliPackageConfig = ISdCliLibPackageConfig | ISdCliServerPackageConfig | ISdCliClientPackageConfig;
|
|
42
|
-
export interface ISdCliLibPackageConfig {
|
|
43
|
-
type: "library";
|
|
44
|
-
autoIndex?: {
|
|
45
|
-
polyfills?: string[];
|
|
46
|
-
};
|
|
47
|
-
publish?: "npm";
|
|
48
|
-
}
|
|
49
|
-
export interface ISdCliServerPackageConfig {
|
|
50
|
-
type: "server";
|
|
51
|
-
env?: Record<string, string>;
|
|
52
|
-
configs?: Record<string, any>;
|
|
53
|
-
pm2?: Record<string, any> | boolean;
|
|
54
|
-
iis?: {
|
|
55
|
-
serverExeFilePath?: string;
|
|
56
|
-
} | boolean;
|
|
57
|
-
}
|
|
58
|
-
export interface ISdCliClientPackageConfig {
|
|
59
|
-
type: "client";
|
|
60
|
-
server: string;
|
|
61
|
-
env?: Record<string, string>;
|
|
62
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
export declare class SdCliIndexFileGenerator {
|
|
2
|
-
readonly rootPath: string;
|
|
3
|
-
readonly config: ISdAutoIndexConfig;
|
|
4
|
-
private readonly _indexFilePath;
|
|
5
|
-
private _contentCache;
|
|
6
|
-
constructor(rootPath: string, config: ISdAutoIndexConfig);
|
|
7
|
-
watchAsync(): Promise<void>;
|
|
8
|
-
runAsync(): Promise<void>;
|
|
9
|
-
private _getFilePathsAsync;
|
|
10
|
-
}
|
|
11
|
-
export interface ISdAutoIndexConfig {
|
|
12
|
-
polyfills?: string[];
|
|
13
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
export declare class SdCliLocalUpdate {
|
|
2
|
-
private readonly _rootPath;
|
|
3
|
-
private readonly _logger;
|
|
4
|
-
constructor(_rootPath: string);
|
|
5
|
-
runAsync(opt: {
|
|
6
|
-
confFileRelPath: string;
|
|
7
|
-
}): Promise<void>;
|
|
8
|
-
watchAsync(opt: {
|
|
9
|
-
confFileRelPath: string;
|
|
10
|
-
}): Promise<void>;
|
|
11
|
-
private _getUpdatePathInfosAsync;
|
|
12
|
-
protected _getWatchPathsAsync(sourcePath: string): Promise<string[]>;
|
|
13
|
-
}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
export declare class SdCliWorkspace {
|
|
2
|
-
private readonly _rootPath;
|
|
3
|
-
private readonly _logger;
|
|
4
|
-
private readonly _npmConfig;
|
|
5
|
-
private readonly _serverInfoMap;
|
|
6
|
-
constructor(_rootPath: string);
|
|
7
|
-
watchAsync(opt: {
|
|
8
|
-
confFileRelPath: string;
|
|
9
|
-
optNames: string[];
|
|
10
|
-
}): Promise<void>;
|
|
11
|
-
private _restartServerAsync;
|
|
12
|
-
buildAsync(opt: {
|
|
13
|
-
confFileRelPath: string;
|
|
14
|
-
optNames: string[];
|
|
15
|
-
}): Promise<void>;
|
|
16
|
-
private _buildPkgsAsync;
|
|
17
|
-
publishAsync(opt: {
|
|
18
|
-
noBuild: boolean;
|
|
19
|
-
confFileRelPath: string;
|
|
20
|
-
optNames: string[];
|
|
21
|
-
}): Promise<void>;
|
|
22
|
-
private _upgradeVersionAsync;
|
|
23
|
-
private _waitSecMessageAsync;
|
|
24
|
-
private _getPackagesAsync;
|
|
25
|
-
private _loggingResults;
|
|
26
|
-
private _loggingOpenClientHrefs;
|
|
27
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
import { ISdCliPackageBuildResult, TSdCliPackageConfig } from "../commons";
|
|
3
|
-
import { EventEmitter } from "events";
|
|
4
|
-
import { NextHandleFunction } from "connect";
|
|
5
|
-
export declare class SdCliPackage extends EventEmitter {
|
|
6
|
-
private readonly _workspaceRootPath;
|
|
7
|
-
readonly rootPath: string;
|
|
8
|
-
readonly config: TSdCliPackageConfig;
|
|
9
|
-
private readonly _npmConfig;
|
|
10
|
-
get basename(): string;
|
|
11
|
-
get name(): string;
|
|
12
|
-
get main(): string | undefined;
|
|
13
|
-
get allDependencies(): string[];
|
|
14
|
-
constructor(_workspaceRootPath: string, rootPath: string, config: TSdCliPackageConfig);
|
|
15
|
-
on(event: "change", listener: () => void): this;
|
|
16
|
-
on(event: "complete", listener: (results: ISdCliPackageBuildResult[]) => void): this;
|
|
17
|
-
setNewVersionAsync(newVersion: string, pkgNames: string[]): Promise<void>;
|
|
18
|
-
watchAsync(): Promise<NextHandleFunction[] | void>;
|
|
19
|
-
buildAsync(): Promise<ISdCliPackageBuildResult[]>;
|
|
20
|
-
publishAsync(): Promise<void>;
|
|
21
|
-
private _createBuilderAsync;
|
|
22
|
-
private _genBuildTsconfigAsync;
|
|
23
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import ts from "typescript";
|
|
2
|
-
import { ISdCliPackageBuildResult } from "../commons";
|
|
3
|
-
import webpack from "webpack";
|
|
4
|
-
export declare class SdCliBuildResultUtil {
|
|
5
|
-
static convertFromTsDiag(diag: ts.Diagnostic): ISdCliPackageBuildResult | undefined;
|
|
6
|
-
static convertFromWebpackStats(stats: webpack.Stats): ISdCliPackageBuildResult[];
|
|
7
|
-
private static _convertFromWebpackError;
|
|
8
|
-
static getMessage(result: ISdCliPackageBuildResult): string;
|
|
9
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { ISdCliConfig } from "../commons";
|
|
2
|
-
export declare class SdCliConfigUtil {
|
|
3
|
-
static loadConfigAsync(confFilePath: string, isDev: boolean, opts?: string[]): Promise<ISdCliConfig>;
|
|
4
|
-
private static _getConfigFromFileContent;
|
|
5
|
-
private static _getPkgConfigFromFileContent;
|
|
6
|
-
private static _mergeObj;
|
|
7
|
-
}
|