@diagramers/cli 1.1.34 → 1.1.35
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/services/project-initializer.js +1 -1
- package/package.json +1 -1
- package/dist/commands/admin.d.ts +0 -3
- package/dist/commands/api.d.ts +0 -3
- package/dist/commands/deploy.d.ts +0 -15
- package/dist/commands/extend.d.ts +0 -3
- package/dist/commands/init.d.ts +0 -3
- package/dist/commands/update.d.ts +0 -3
- package/dist/config/template-config.d.ts +0 -21
- package/dist/index.d.ts +0 -3
- package/dist/services/api-generator.d.ts +0 -3
- package/dist/services/naming-utils.d.ts +0 -37
- package/dist/services/project-extender.d.ts +0 -50
- package/dist/services/project-initializer.d.ts +0 -21
- package/dist/services/project-updater.d.ts +0 -18
- package/dist/services/relation-generator.d.ts +0 -3
- package/dist/services/table-generator.d.ts +0 -2
- package/dist/services/template-processor.d.ts +0 -2
- package/dist/services/template-updater.d.ts +0 -24
@@ -60,7 +60,7 @@ class ProjectInitializer {
|
|
60
60
|
async initialize(projectName, options) {
|
61
61
|
const projectPath = path.resolve(process.cwd(), projectName);
|
62
62
|
const templateType = options.template || 'api';
|
63
|
-
const targetVersion = options.version || (templateType === 'admin' ? '3.0.
|
63
|
+
const targetVersion = options.version || (templateType === 'admin' ? '3.0.25' : 'latest');
|
64
64
|
if (templateType === 'admin') {
|
65
65
|
// Handle admin projects differently - let admin CLI handle directory creation
|
66
66
|
await this.initializeAdminProject(projectPath, projectName, targetVersion, options);
|
package/package.json
CHANGED
package/dist/commands/admin.d.ts
DELETED
package/dist/commands/api.d.ts
DELETED
@@ -1,15 +0,0 @@
|
|
1
|
-
import { Command } from 'commander';
|
2
|
-
export declare class DeployCommand {
|
3
|
-
private program;
|
4
|
-
constructor();
|
5
|
-
private setupCommands;
|
6
|
-
private showStatus;
|
7
|
-
private addExternalModule;
|
8
|
-
private generateConfig;
|
9
|
-
private scanModules;
|
10
|
-
private scanProjectModules;
|
11
|
-
private scanModuleDependencies;
|
12
|
-
private extractModuleImports;
|
13
|
-
getCommand(): Command;
|
14
|
-
}
|
15
|
-
//# sourceMappingURL=deploy.d.ts.map
|
package/dist/commands/init.d.ts
DELETED
@@ -1,21 +0,0 @@
|
|
1
|
-
export interface TemplateConfig {
|
2
|
-
name: string;
|
3
|
-
version: string;
|
4
|
-
description: string;
|
5
|
-
files: {
|
6
|
-
include: string[];
|
7
|
-
exclude: string[];
|
8
|
-
updateable: string[];
|
9
|
-
customizable: string[];
|
10
|
-
};
|
11
|
-
features: {
|
12
|
-
[key: string]: {
|
13
|
-
name: string;
|
14
|
-
description: string;
|
15
|
-
dependencies: string[];
|
16
|
-
files: string[];
|
17
|
-
};
|
18
|
-
};
|
19
|
-
}
|
20
|
-
export declare const templateConfig: TemplateConfig;
|
21
|
-
//# sourceMappingURL=template-config.d.ts.map
|
package/dist/index.d.ts
DELETED
@@ -1,37 +0,0 @@
|
|
1
|
-
export declare class NamingUtils {
|
2
|
-
private static irregularPlurals;
|
3
|
-
private static irregularSingulars;
|
4
|
-
/**
|
5
|
-
* Convert singular to plural with proper rules
|
6
|
-
*/
|
7
|
-
static pluralize(word: string): string;
|
8
|
-
/**
|
9
|
-
* Convert plural to singular with proper rules
|
10
|
-
*/
|
11
|
-
static singularize(word: string): string;
|
12
|
-
/**
|
13
|
-
* Convert to camelCase
|
14
|
-
*/
|
15
|
-
static toCamelCase(str: string): string;
|
16
|
-
/**
|
17
|
-
* Convert to PascalCase
|
18
|
-
*/
|
19
|
-
static toPascalCase(str: string): string;
|
20
|
-
/**
|
21
|
-
* Convert to snake_case
|
22
|
-
*/
|
23
|
-
static toSnakeCase(str: string): string;
|
24
|
-
/**
|
25
|
-
* Convert to kebab-case
|
26
|
-
*/
|
27
|
-
static toKebabCase(str: string): string;
|
28
|
-
/**
|
29
|
-
* Check if character is a vowel
|
30
|
-
*/
|
31
|
-
private static isVowel;
|
32
|
-
/**
|
33
|
-
* Preserve the case pattern of the original word
|
34
|
-
*/
|
35
|
-
private static preserveCase;
|
36
|
-
}
|
37
|
-
//# sourceMappingURL=naming-utils.d.ts.map
|
@@ -1,50 +0,0 @@
|
|
1
|
-
export interface Feature {
|
2
|
-
name: string;
|
3
|
-
description: string;
|
4
|
-
files: string[];
|
5
|
-
dependencies?: string[];
|
6
|
-
}
|
7
|
-
export declare class ProjectExtender {
|
8
|
-
private features;
|
9
|
-
listFeatures(): Promise<void>;
|
10
|
-
addFeature(featureName: string): Promise<void>;
|
11
|
-
generateModule(moduleName: string, options?: any): Promise<void>;
|
12
|
-
generateTable(tableName: string, options?: any): Promise<void>;
|
13
|
-
generateRelations(relationName: string, options?: any): Promise<void>;
|
14
|
-
generateEndpoint(moduleName: string, endpointName: string, options?: any): Promise<void>;
|
15
|
-
private addServiceMethod;
|
16
|
-
private addControllerMethod;
|
17
|
-
private addRoute;
|
18
|
-
private createFeatureStructure;
|
19
|
-
private createFeatureCoreFiles;
|
20
|
-
private generateFeatureController;
|
21
|
-
private generateFeatureService;
|
22
|
-
private generateFeatureTypes;
|
23
|
-
private generateFeatureSchemas;
|
24
|
-
private generateFeatureCore;
|
25
|
-
private generateFeatureConfig;
|
26
|
-
private trackPathRefinements;
|
27
|
-
private createModuleStructure;
|
28
|
-
private createEntity;
|
29
|
-
private createSchema;
|
30
|
-
private createService;
|
31
|
-
private createController;
|
32
|
-
private createRoutes;
|
33
|
-
private generateCRUDOperations;
|
34
|
-
private registerModule;
|
35
|
-
private updateDiagramersConfig;
|
36
|
-
private updateSeeder;
|
37
|
-
private createTableSchema;
|
38
|
-
private createMongoDBSchema;
|
39
|
-
private createSQLSchema;
|
40
|
-
private createRelations;
|
41
|
-
private createMongoDBRelations;
|
42
|
-
private createSQLRelations;
|
43
|
-
private addDependencies;
|
44
|
-
private updateMainConfiguration;
|
45
|
-
private updateServerFile;
|
46
|
-
private updateRoutesIndex;
|
47
|
-
private updatePackageJson;
|
48
|
-
private capitalizeFirst;
|
49
|
-
}
|
50
|
-
//# sourceMappingURL=project-extender.d.ts.map
|
@@ -1,21 +0,0 @@
|
|
1
|
-
export interface InitOptions {
|
2
|
-
template?: string;
|
3
|
-
version?: string;
|
4
|
-
yes?: boolean;
|
5
|
-
}
|
6
|
-
export declare class ProjectInitializer {
|
7
|
-
private templateFiles;
|
8
|
-
constructor();
|
9
|
-
initialize(projectName: string, options: InitOptions): Promise<void>;
|
10
|
-
private initializeAdminProject;
|
11
|
-
private initializeApiProject;
|
12
|
-
private installTemplatePackage;
|
13
|
-
private copyTemplateFiles;
|
14
|
-
private cleanup;
|
15
|
-
private updatePackageJson;
|
16
|
-
private createGitignore;
|
17
|
-
private createReadme;
|
18
|
-
private makeScriptsExecutable;
|
19
|
-
private processTemplate;
|
20
|
-
}
|
21
|
-
//# sourceMappingURL=project-initializer.d.ts.map
|
@@ -1,18 +0,0 @@
|
|
1
|
-
export interface UpdateOptions {
|
2
|
-
force?: boolean;
|
3
|
-
backup?: boolean;
|
4
|
-
}
|
5
|
-
export declare class ProjectUpdater {
|
6
|
-
private currentProjectPath;
|
7
|
-
constructor();
|
8
|
-
update(options: UpdateOptions): Promise<void>;
|
9
|
-
private isValidProject;
|
10
|
-
private createBackup;
|
11
|
-
private downloadLatestTemplate;
|
12
|
-
private getUpdateableFiles;
|
13
|
-
private checkConflicts;
|
14
|
-
private performUpdate;
|
15
|
-
private updatePackageJson;
|
16
|
-
private cleanup;
|
17
|
-
}
|
18
|
-
//# sourceMappingURL=project-updater.d.ts.map
|
@@ -1,24 +0,0 @@
|
|
1
|
-
export interface TemplateUpdateOptions {
|
2
|
-
force?: boolean;
|
3
|
-
backup?: boolean;
|
4
|
-
template?: string;
|
5
|
-
version?: string;
|
6
|
-
}
|
7
|
-
export declare class TemplateUpdater {
|
8
|
-
private currentProjectPath;
|
9
|
-
private tempTemplatePath;
|
10
|
-
constructor();
|
11
|
-
update(options: TemplateUpdateOptions): Promise<void>;
|
12
|
-
private isValidProject;
|
13
|
-
private createBackup;
|
14
|
-
private downloadTemplate;
|
15
|
-
private downloadFromNpm;
|
16
|
-
private getUpdateableFiles;
|
17
|
-
private checkConflicts;
|
18
|
-
private performUpdate;
|
19
|
-
private updatePackageJson;
|
20
|
-
private getCurrentProjectVersion;
|
21
|
-
private getTemplateVersion;
|
22
|
-
private cleanup;
|
23
|
-
}
|
24
|
-
//# sourceMappingURL=template-updater.d.ts.map
|