@git.zone/cli 2.13.7 → 2.13.10
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/assets/templates/gitignore/_gitignore +4 -0
- package/dist_ts/00_commitinfo_data.js +2 -2
- package/dist_ts/classes.gitzoneconfig.js +2 -2
- package/dist_ts/mod_commit/index.js +2 -2
- package/dist_ts/mod_config/classes.commitconfig.js +3 -3
- package/dist_ts/mod_config/classes.releaseconfig.js +3 -3
- package/dist_ts/mod_format/format.copy.js +2 -2
- package/dist_ts/mod_format/format.npmextra.js +2 -2
- package/dist_ts/mod_format/format.packagejson.js +3 -3
- package/dist_ts/mod_format/formatters/copy.formatter.js +2 -2
- package/dist_ts/mod_format/formatters/npmextra.formatter.js +2 -2
- package/dist_ts/mod_format/formatters/packagejson.formatter.js +3 -3
- package/dist_ts/mod_format/formatters/prettier.formatter.js +3 -3
- package/dist_ts/mod_format/index.js +2 -2
- package/dist_ts/mod_format/mod.plugins.d.ts +1 -1
- package/dist_ts/mod_format/mod.plugins.js +2 -2
- package/dist_ts/mod_services/classes.servicemanager.js +3 -3
- package/dist_ts/plugins.d.ts +1 -1
- package/dist_ts/plugins.js +2 -2
- package/package.json +16 -16
- package/readme.md +231 -218
- package/ts/00_commitinfo_data.ts +1 -1
- package/ts/classes.gitzoneconfig.ts +1 -1
- package/ts/mod_commit/index.ts +1 -1
- package/ts/mod_config/classes.commitconfig.ts +2 -2
- package/ts/mod_config/classes.releaseconfig.ts +2 -2
- package/ts/mod_format/format.copy.ts +1 -1
- package/ts/mod_format/format.npmextra.ts +1 -1
- package/ts/mod_format/format.packagejson.ts +2 -2
- package/ts/mod_format/formatters/copy.formatter.ts +1 -1
- package/ts/mod_format/formatters/npmextra.formatter.ts +1 -1
- package/ts/mod_format/formatters/packagejson.formatter.ts +2 -2
- package/ts/mod_format/formatters/prettier.formatter.ts +2 -2
- package/ts/mod_format/index.ts +1 -1
- package/ts/mod_format/mod.plugins.ts +1 -1
- package/ts/mod_services/classes.servicemanager.ts +2 -2
- package/ts/plugins.ts +1 -1
package/ts/00_commitinfo_data.ts
CHANGED
|
@@ -3,6 +3,6 @@
|
|
|
3
3
|
*/
|
|
4
4
|
export const commitinfo = {
|
|
5
5
|
name: '@git.zone/cli',
|
|
6
|
-
version: '2.13.
|
|
6
|
+
version: '2.13.10',
|
|
7
7
|
description: 'A comprehensive CLI tool for enhancing and managing local development workflows with gitzone utilities, focusing on project setup, version control, code formatting, and template management.'
|
|
8
8
|
}
|
|
@@ -38,7 +38,7 @@ export class GitzoneConfig {
|
|
|
38
38
|
public data: IGitzoneConfigData;
|
|
39
39
|
|
|
40
40
|
public async readConfigFromCwd() {
|
|
41
|
-
const npmextraInstance = new plugins.npmextra.
|
|
41
|
+
const npmextraInstance = new plugins.npmextra.Smartconfig(paths.cwd);
|
|
42
42
|
this.data = npmextraInstance.dataFor<IGitzoneConfigData>('@git.zone/cli', {});
|
|
43
43
|
|
|
44
44
|
// Read szci config for backward compatibility
|
package/ts/mod_commit/index.ts
CHANGED
|
@@ -9,7 +9,7 @@ import { ReleaseConfig } from '../mod_config/classes.releaseconfig.js';
|
|
|
9
9
|
|
|
10
10
|
export const run = async (argvArg: any) => {
|
|
11
11
|
// Read commit config from npmextra.json
|
|
12
|
-
const npmextraConfig = new plugins.npmextra.
|
|
12
|
+
const npmextraConfig = new plugins.npmextra.Smartconfig();
|
|
13
13
|
const gitzoneConfig = npmextraConfig.dataFor<{
|
|
14
14
|
commit?: {
|
|
15
15
|
alwaysTest?: boolean;
|
|
@@ -31,7 +31,7 @@ export class CommitConfig {
|
|
|
31
31
|
* Load configuration from npmextra.json
|
|
32
32
|
*/
|
|
33
33
|
public async load(): Promise<void> {
|
|
34
|
-
const npmextraInstance = new plugins.npmextra.
|
|
34
|
+
const npmextraInstance = new plugins.npmextra.Smartconfig(this.cwd);
|
|
35
35
|
const gitzoneConfig = npmextraInstance.dataFor<any>('@git.zone/cli', {});
|
|
36
36
|
|
|
37
37
|
this.config = {
|
|
@@ -44,7 +44,7 @@ export class CommitConfig {
|
|
|
44
44
|
* Save configuration to npmextra.json
|
|
45
45
|
*/
|
|
46
46
|
public async save(): Promise<void> {
|
|
47
|
-
const npmextraPath = plugins.path.join(this.cwd, '
|
|
47
|
+
const npmextraPath = plugins.path.join(this.cwd, 'smartconfig.json');
|
|
48
48
|
let npmextraData: any = {};
|
|
49
49
|
|
|
50
50
|
// Read existing npmextra.json
|
|
@@ -33,7 +33,7 @@ export class ReleaseConfig {
|
|
|
33
33
|
* Load configuration from npmextra.json
|
|
34
34
|
*/
|
|
35
35
|
public async load(): Promise<void> {
|
|
36
|
-
const npmextraInstance = new plugins.npmextra.
|
|
36
|
+
const npmextraInstance = new plugins.npmextra.Smartconfig(this.cwd);
|
|
37
37
|
const gitzoneConfig = npmextraInstance.dataFor<any>('@git.zone/cli', {});
|
|
38
38
|
|
|
39
39
|
// Also check szci for backward compatibility
|
|
@@ -49,7 +49,7 @@ export class ReleaseConfig {
|
|
|
49
49
|
* Save configuration to npmextra.json
|
|
50
50
|
*/
|
|
51
51
|
public async save(): Promise<void> {
|
|
52
|
-
const npmextraPath = plugins.path.join(this.cwd, '
|
|
52
|
+
const npmextraPath = plugins.path.join(this.cwd, 'smartconfig.json');
|
|
53
53
|
let npmextraData: any = {};
|
|
54
54
|
|
|
55
55
|
// Read existing npmextra.json
|
|
@@ -6,7 +6,7 @@ export const run = async (projectArg: Project) => {
|
|
|
6
6
|
const gitzoneConfig = await projectArg.gitzoneConfig;
|
|
7
7
|
|
|
8
8
|
// Get copy configuration from npmextra.json
|
|
9
|
-
const npmextraConfig = new plugins.npmextra.
|
|
9
|
+
const npmextraConfig = new plugins.npmextra.Smartconfig();
|
|
10
10
|
const copyConfig = npmextraConfig.dataFor<any>('gitzone.format.copy', {
|
|
11
11
|
patterns: [],
|
|
12
12
|
});
|
|
@@ -76,7 +76,7 @@ const migrateAccessLevel = (npmextraJson: any): boolean => {
|
|
|
76
76
|
*/
|
|
77
77
|
export const run = async (projectArg: Project) => {
|
|
78
78
|
const formatSmartstream = new plugins.smartstream.StreamWrapper([
|
|
79
|
-
plugins.smartgulp.src([`
|
|
79
|
+
plugins.smartgulp.src([`smartconfig.json`]),
|
|
80
80
|
gulpFunction.forEach(async (fileArg: plugins.smartfile.SmartFile) => {
|
|
81
81
|
const fileString = fileArg.contents.toString();
|
|
82
82
|
const npmextraJson = JSON.parse(fileString);
|
|
@@ -73,7 +73,7 @@ export const run = async (projectArg: Project) => {
|
|
|
73
73
|
const formatStreamWrapper = new plugins.smartstream.StreamWrapper([
|
|
74
74
|
plugins.smartgulp.src([`package.json`]),
|
|
75
75
|
gulpFunction.forEach(async (fileArg: plugins.smartfile.SmartFile) => {
|
|
76
|
-
const npmextraConfig = new plugins.npmextra.
|
|
76
|
+
const npmextraConfig = new plugins.npmextra.Smartconfig(paths.cwd);
|
|
77
77
|
const gitzoneData: any = npmextraConfig.dataFor('@git.zone/cli', {});
|
|
78
78
|
const fileString = fileArg.contents.toString();
|
|
79
79
|
const packageJson = JSON.parse(fileString);
|
|
@@ -149,7 +149,7 @@ export const run = async (projectArg: Project) => {
|
|
|
149
149
|
'dist_ts_web/**/*',
|
|
150
150
|
'assets/**/*',
|
|
151
151
|
'cli.js',
|
|
152
|
-
'
|
|
152
|
+
'smartconfig.json',
|
|
153
153
|
'readme.md',
|
|
154
154
|
];
|
|
155
155
|
|
|
@@ -18,7 +18,7 @@ export class CopyFormatter extends BaseFormatter {
|
|
|
18
18
|
const changes: IPlannedChange[] = [];
|
|
19
19
|
|
|
20
20
|
// Get copy configuration from npmextra.json
|
|
21
|
-
const npmextraConfig = new plugins.npmextra.
|
|
21
|
+
const npmextraConfig = new plugins.npmextra.Smartconfig();
|
|
22
22
|
const copyConfig = npmextraConfig.dataFor<{ patterns: ICopyPattern[] }>(
|
|
23
23
|
'gitzone.format.copy',
|
|
24
24
|
{ patterns: [] },
|
|
@@ -70,7 +70,7 @@ export class NpmextraFormatter extends BaseFormatter {
|
|
|
70
70
|
|
|
71
71
|
async analyze(): Promise<IPlannedChange[]> {
|
|
72
72
|
const changes: IPlannedChange[] = [];
|
|
73
|
-
const npmextraPath = '
|
|
73
|
+
const npmextraPath = 'smartconfig.json';
|
|
74
74
|
|
|
75
75
|
// Check if file exists
|
|
76
76
|
const exists = await plugins.smartfs.file(npmextraPath).exists();
|
|
@@ -101,7 +101,7 @@ export class PackageJsonFormatter extends BaseFormatter {
|
|
|
101
101
|
const packageJson = JSON.parse(currentContent);
|
|
102
102
|
|
|
103
103
|
// Get gitzone config from npmextra
|
|
104
|
-
const npmextraConfig = new plugins.npmextra.
|
|
104
|
+
const npmextraConfig = new plugins.npmextra.Smartconfig(paths.cwd);
|
|
105
105
|
const gitzoneData: any = npmextraConfig.dataFor('@git.zone/cli', {});
|
|
106
106
|
|
|
107
107
|
// Set metadata from gitzone config
|
|
@@ -156,7 +156,7 @@ export class PackageJsonFormatter extends BaseFormatter {
|
|
|
156
156
|
'dist_ts_web/**/*',
|
|
157
157
|
'assets/**/*',
|
|
158
158
|
'cli.js',
|
|
159
|
-
'
|
|
159
|
+
'smartconfig.json',
|
|
160
160
|
'readme.md',
|
|
161
161
|
];
|
|
162
162
|
|
|
@@ -21,7 +21,7 @@ export class PrettierFormatter extends BaseFormatter {
|
|
|
21
21
|
const rootConfigFiles = [
|
|
22
22
|
'package.json',
|
|
23
23
|
'tsconfig.json',
|
|
24
|
-
'
|
|
24
|
+
'smartconfig.json',
|
|
25
25
|
'.prettierrc',
|
|
26
26
|
'.prettierrc.json',
|
|
27
27
|
'.prettierrc.js',
|
|
@@ -232,7 +232,7 @@ export class PrettierFormatter extends BaseFormatter {
|
|
|
232
232
|
|
|
233
233
|
private async getPrettierConfig(): Promise<any> {
|
|
234
234
|
// Try to load prettier config from the project
|
|
235
|
-
const prettierConfig = new plugins.npmextra.
|
|
235
|
+
const prettierConfig = new plugins.npmextra.Smartconfig();
|
|
236
236
|
return prettierConfig.dataFor('prettier', {
|
|
237
237
|
// Default prettier config
|
|
238
238
|
singleQuote: true,
|
package/ts/mod_format/index.ts
CHANGED
|
@@ -47,7 +47,7 @@ export let run = async (
|
|
|
47
47
|
const planner = new FormatPlanner();
|
|
48
48
|
|
|
49
49
|
// Get configuration from npmextra
|
|
50
|
-
const npmextraConfig = new plugins.npmextra.
|
|
50
|
+
const npmextraConfig = new plugins.npmextra.Smartconfig();
|
|
51
51
|
const formatConfig = npmextraConfig.dataFor<any>('@git.zone/cli.format', {
|
|
52
52
|
interactive: true,
|
|
53
53
|
showDiffs: false,
|
|
@@ -11,7 +11,7 @@ import * as smartobject from '@push.rocks/smartobject';
|
|
|
11
11
|
import * as smartnpm from '@push.rocks/smartnpm';
|
|
12
12
|
import * as smartstream from '@push.rocks/smartstream';
|
|
13
13
|
import * as through2 from 'through2';
|
|
14
|
-
import * as npmextra from '@push.rocks/
|
|
14
|
+
import * as npmextra from '@push.rocks/smartconfig';
|
|
15
15
|
import * as smartdiff from '@push.rocks/smartdiff';
|
|
16
16
|
|
|
17
17
|
export {
|
|
@@ -42,7 +42,7 @@ export class ServiceManager {
|
|
|
42
42
|
* Load service configuration from npmextra.json
|
|
43
43
|
*/
|
|
44
44
|
private async loadServiceConfiguration(): Promise<void> {
|
|
45
|
-
const npmextraConfig = new plugins.npmextra.
|
|
45
|
+
const npmextraConfig = new plugins.npmextra.Smartconfig(process.cwd());
|
|
46
46
|
const gitzoneConfig = npmextraConfig.dataFor<any>('@git.zone/cli', {});
|
|
47
47
|
|
|
48
48
|
// Check if services array exists
|
|
@@ -75,7 +75,7 @@ export class ServiceManager {
|
|
|
75
75
|
* Save service configuration to npmextra.json
|
|
76
76
|
*/
|
|
77
77
|
private async saveServiceConfiguration(services: string[]): Promise<void> {
|
|
78
|
-
const npmextraPath = plugins.path.join(process.cwd(), '
|
|
78
|
+
const npmextraPath = plugins.path.join(process.cwd(), 'smartconfig.json');
|
|
79
79
|
let npmextraData: any = {};
|
|
80
80
|
|
|
81
81
|
// Read existing npmextra.json if it exists
|
package/ts/plugins.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as smartlog from '@push.rocks/smartlog';
|
|
2
2
|
import * as smartlogDestinationLocal from '@push.rocks/smartlog-destination-local';
|
|
3
|
-
import * as npmextra from '@push.rocks/
|
|
3
|
+
import * as npmextra from '@push.rocks/smartconfig';
|
|
4
4
|
import * as path from 'path';
|
|
5
5
|
import * as projectinfo from '@push.rocks/projectinfo';
|
|
6
6
|
import * as smartcli from '@push.rocks/smartcli';
|