@simplysm/sd-cli 7.0.49 → 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.
Files changed (52) hide show
  1. package/.eslintrc.cjs +7 -0
  2. package/dist/bin/sd-cli.mjs +1 -1
  3. package/dist/build-tool/SdCliCacheCompilerHost.mjs +8 -3
  4. package/dist/build-tool/SdCliNgCacheCompilerHost.mjs +1 -1
  5. package/dist/build-tool/SdCliPackageLinter.mjs +1 -1
  6. package/dist/builder/SdCliClientBuilder.mjs +40 -10
  7. package/dist/builder/SdCliJsLibBuilder.mjs +1 -1
  8. package/dist/builder/SdCliServerBuilder.mjs +33 -22
  9. package/dist/builder/SdCliTsLibBuilder.mjs +1 -1
  10. package/dist/entry-points/SdCliIndexFileGenerator.mjs +62 -0
  11. package/dist/entry-points/SdCliLocalUpdate.mjs +8 -3
  12. package/dist/entry-points/SdCliNpm.mjs +1 -1
  13. package/dist/entry-points/SdCliPrepare.mjs +1 -1
  14. package/dist/entry-points/SdCliWorkspace.mjs +23 -4
  15. package/dist/packages/SdCliPackage.mjs +4 -3
  16. package/dist/utils/SdCliConfigUtil.mjs +2 -2
  17. package/package.json +9 -8
  18. package/src/bin/sd-cli.ts +1 -1
  19. package/src/build-tool/SdCliCacheCompilerHost.ts +8 -2
  20. package/src/build-tool/SdCliNgCacheCompilerHost.ts +1 -1
  21. package/src/build-tool/SdCliPackageLinter.ts +1 -1
  22. package/src/builder/SdCliClientBuilder.ts +52 -11
  23. package/src/builder/SdCliJsLibBuilder.ts +1 -1
  24. package/src/builder/SdCliServerBuilder.ts +34 -21
  25. package/src/builder/SdCliTsLibBuilder.ts +1 -1
  26. package/src/commons.ts +8 -3
  27. package/src/entry-points/SdCliIndexFileGenerator.ts +79 -0
  28. package/src/entry-points/SdCliLocalUpdate.ts +7 -2
  29. package/src/entry-points/SdCliNpm.ts +1 -1
  30. package/src/entry-points/SdCliPrepare.ts +1 -1
  31. package/src/entry-points/SdCliWorkspace.ts +28 -4
  32. package/src/packages/SdCliPackage.ts +4 -2
  33. package/src/utils/SdCliConfigUtil.ts +2 -2
  34. package/tsconfig-build.json +6 -2
  35. package/tsconfig.json +14 -5
  36. package/dist/bin/sd-cli.d.ts +0 -2
  37. package/dist/build-tool/SdCliCacheCompilerHost.d.ts +0 -10
  38. package/dist/build-tool/SdCliNgCacheCompilerHost.d.ts +0 -11
  39. package/dist/build-tool/SdCliPackageLinter.d.ts +0 -8
  40. package/dist/builder/SdCliClientBuilder.d.ts +0 -20
  41. package/dist/builder/SdCliJsLibBuilder.d.ts +0 -14
  42. package/dist/builder/SdCliServerBuilder.d.ts +0 -24
  43. package/dist/builder/SdCliTsLibBuilder.d.ts +0 -29
  44. package/dist/commons.d.ts +0 -58
  45. package/dist/entry-points/SdCliLocalUpdate.d.ts +0 -13
  46. package/dist/entry-points/SdCliNpm.d.ts +0 -6
  47. package/dist/entry-points/SdCliPrepare.d.ts +0 -5
  48. package/dist/entry-points/SdCliWorkspace.d.ts +0 -27
  49. package/dist/packages/SdCliPackage.d.ts +0 -23
  50. package/dist/utils/SdCliBuildResultUtil.d.ts +0 -9
  51. package/dist/utils/SdCliConfigUtil.d.ts +0 -7
  52. package/dist/utils/SdCliNpmConfigUtil.d.ts +0 -7
package/dist/commons.d.ts DELETED
@@ -1,58 +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
- }
28
- export interface ISdCliPackageBuildResult {
29
- filePath: string | undefined;
30
- line: number | undefined;
31
- char: number | undefined;
32
- code: string | undefined;
33
- severity: "error" | "warning";
34
- message: string;
35
- }
36
- export interface ISdCliConfig {
37
- packages: Record<string, TSdCliPackageConfig | undefined>;
38
- localUpdates?: Record<string, string>;
39
- }
40
- export declare type TSdCliPackageConfig = ISdCliLibPackageConfig | ISdCliServerPackageConfig | ISdCliClientPackageConfig;
41
- export interface ISdCliLibPackageConfig {
42
- type: "library";
43
- publish?: "npm";
44
- }
45
- export interface ISdCliServerPackageConfig {
46
- type: "server";
47
- env?: Record<string, string>;
48
- configs?: Record<string, any>;
49
- pm2?: Record<string, any> | boolean;
50
- iis?: {
51
- serverExeFilePath?: string;
52
- } | boolean;
53
- }
54
- export interface ISdCliClientPackageConfig {
55
- type: "client";
56
- server: string;
57
- env?: Record<string, string>;
58
- }
@@ -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,6 +0,0 @@
1
- export declare class SdCliNpm {
2
- private readonly _rootPath;
3
- private readonly _logger;
4
- constructor(_rootPath: string);
5
- updateAsync(): Promise<void>;
6
- }
@@ -1,5 +0,0 @@
1
- export declare class SdCliPrepare {
2
- private readonly _logger;
3
- prepareAsync(): Promise<void>;
4
- private _modifyTypescriptCodeForTypeCheckPerformanceWarning;
5
- }
@@ -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
- }
@@ -1,7 +0,0 @@
1
- import { INpmConfig } from "../commons";
2
- export declare class SdCliNpmConfigUtil {
3
- static getDependencies(npmConfig: INpmConfig): {
4
- defaults: string[];
5
- optionals: string[];
6
- };
7
- }