@git.zone/cli 2.2.2 → 2.6.1

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 (41) hide show
  1. package/assets/templates/npmextra/npmextra.json +4 -2
  2. package/dist_ts/00_commitinfo_data.js +1 -1
  3. package/dist_ts/classes.gitzoneconfig.js +10 -4
  4. package/dist_ts/gitzone.cli.js +8 -1
  5. package/dist_ts/mod_commit/index.js +109 -7
  6. package/dist_ts/mod_commit/mod.ui.d.ts +14 -0
  7. package/dist_ts/mod_commit/mod.ui.js +56 -2
  8. package/dist_ts/mod_config/classes.releaseconfig.d.ts +60 -0
  9. package/dist_ts/mod_config/classes.releaseconfig.js +131 -0
  10. package/dist_ts/mod_config/index.d.ts +3 -0
  11. package/dist_ts/mod_config/index.js +253 -0
  12. package/dist_ts/mod_config/mod.plugins.d.ts +2 -0
  13. package/dist_ts/mod_config/mod.plugins.js +4 -0
  14. package/dist_ts/mod_format/format.npmextra.js +33 -1
  15. package/dist_ts/mod_format/index.d.ts +6 -0
  16. package/dist_ts/mod_format/index.js +34 -1
  17. package/dist_ts/mod_standard/index.d.ts +1 -1
  18. package/dist_ts/mod_standard/index.js +75 -27
  19. package/npmextra.json +12 -5
  20. package/package.json +33 -23
  21. package/ts/00_commitinfo_data.ts +1 -1
  22. package/ts/classes.gitzoneconfig.ts +13 -5
  23. package/ts/gitzone.cli.ts +8 -0
  24. package/ts/mod_commit/index.ts +112 -8
  25. package/ts/mod_commit/mod.ui.ts +69 -1
  26. package/ts/mod_config/classes.releaseconfig.ts +166 -0
  27. package/ts/mod_config/index.ts +282 -0
  28. package/ts/mod_config/mod.plugins.ts +3 -0
  29. package/ts/mod_format/format.npmextra.ts +39 -0
  30. package/ts/mod_format/index.ts +42 -0
  31. package/ts/mod_standard/index.ts +78 -31
  32. package/dist_ts/gitzone.config.d.ts +0 -28
  33. package/dist_ts/gitzone.config.js +0 -21
  34. package/dist_ts/gitzone.monitor.d.ts +0 -1
  35. package/dist_ts/gitzone.monitor.js +0 -2
  36. package/dist_ts/gitzone.paths.d.ts +0 -4
  37. package/dist_ts/gitzone.paths.js +0 -6
  38. package/dist_ts/gitzone.plugins.d.ts +0 -10
  39. package/dist_ts/gitzone.plugins.js +0 -11
  40. package/dist_ts/mod_format/format.classes.project.d.ts +0 -8
  41. package/dist_ts/mod_format/format.classes.project.js +0 -20
@@ -0,0 +1,282 @@
1
+ // gitzone config - manage release registry configuration
2
+
3
+ import * as plugins from './mod.plugins.js';
4
+ import { ReleaseConfig } from './classes.releaseconfig.js';
5
+ import { runFormatter } from '../mod_format/index.js';
6
+
7
+ export { ReleaseConfig };
8
+
9
+ export const run = async (argvArg: any) => {
10
+ const command = argvArg._?.[1];
11
+ const value = argvArg._?.[2];
12
+
13
+ // If no command provided, show interactive menu
14
+ if (!command) {
15
+ await handleInteractiveMenu();
16
+ return;
17
+ }
18
+
19
+ switch (command) {
20
+ case 'show':
21
+ await handleShow();
22
+ break;
23
+ case 'add':
24
+ await handleAdd(value);
25
+ break;
26
+ case 'remove':
27
+ await handleRemove(value);
28
+ break;
29
+ case 'clear':
30
+ await handleClear();
31
+ break;
32
+ case 'access':
33
+ case 'accessLevel':
34
+ await handleAccessLevel(value);
35
+ break;
36
+ case 'help':
37
+ showHelp();
38
+ break;
39
+ default:
40
+ plugins.logger.log('error', `Unknown command: ${command}`);
41
+ showHelp();
42
+ }
43
+ };
44
+
45
+ /**
46
+ * Interactive menu for config command
47
+ */
48
+ async function handleInteractiveMenu(): Promise<void> {
49
+ console.log('');
50
+ console.log('╭─────────────────────────────────────────────────────────────╮');
51
+ console.log('│ gitzone config - Release Configuration │');
52
+ console.log('╰─────────────────────────────────────────────────────────────╯');
53
+ console.log('');
54
+
55
+ const interactInstance = new plugins.smartinteract.SmartInteract();
56
+ const response = await interactInstance.askQuestion({
57
+ type: 'list',
58
+ name: 'action',
59
+ message: 'What would you like to do?',
60
+ default: 'show',
61
+ choices: [
62
+ { name: 'Show current configuration', value: 'show' },
63
+ { name: 'Add a registry', value: 'add' },
64
+ { name: 'Remove a registry', value: 'remove' },
65
+ { name: 'Clear all registries', value: 'clear' },
66
+ { name: 'Set access level (public/private)', value: 'access' },
67
+ { name: 'Show help', value: 'help' },
68
+ ],
69
+ });
70
+
71
+ const action = (response as any).value;
72
+
73
+ switch (action) {
74
+ case 'show':
75
+ await handleShow();
76
+ break;
77
+ case 'add':
78
+ await handleAdd();
79
+ break;
80
+ case 'remove':
81
+ await handleRemove();
82
+ break;
83
+ case 'clear':
84
+ await handleClear();
85
+ break;
86
+ case 'access':
87
+ await handleAccessLevel();
88
+ break;
89
+ case 'help':
90
+ showHelp();
91
+ break;
92
+ }
93
+ }
94
+
95
+ /**
96
+ * Show current registry configuration
97
+ */
98
+ async function handleShow(): Promise<void> {
99
+ const config = await ReleaseConfig.fromCwd();
100
+ const registries = config.getRegistries();
101
+ const accessLevel = config.getAccessLevel();
102
+
103
+ console.log('');
104
+ console.log('╭─────────────────────────────────────────────────────────────╮');
105
+ console.log('│ Release Configuration │');
106
+ console.log('╰─────────────────────────────────────────────────────────────╯');
107
+ console.log('');
108
+
109
+ // Show access level
110
+ plugins.logger.log('info', `Access Level: ${accessLevel}`);
111
+ console.log('');
112
+
113
+ if (registries.length === 0) {
114
+ plugins.logger.log('info', 'No release registries configured.');
115
+ console.log('');
116
+ console.log(' Run `gitzone config add <registry-url>` to add one.');
117
+ console.log('');
118
+ } else {
119
+ plugins.logger.log('info', `Configured registries (${registries.length}):`);
120
+ console.log('');
121
+ registries.forEach((url, index) => {
122
+ console.log(` ${index + 1}. ${url}`);
123
+ });
124
+ console.log('');
125
+ }
126
+ }
127
+
128
+ /**
129
+ * Add a registry URL
130
+ */
131
+ async function handleAdd(url?: string): Promise<void> {
132
+ if (!url) {
133
+ // Interactive mode
134
+ const interactInstance = new plugins.smartinteract.SmartInteract();
135
+ const response = await interactInstance.askQuestion({
136
+ type: 'input',
137
+ name: 'registryUrl',
138
+ message: 'Enter registry URL:',
139
+ default: 'https://registry.npmjs.org',
140
+ validate: (input: string) => {
141
+ return !!(input && input.trim() !== '');
142
+ },
143
+ });
144
+ url = (response as any).value;
145
+ }
146
+
147
+ const config = await ReleaseConfig.fromCwd();
148
+ const added = config.addRegistry(url!);
149
+
150
+ if (added) {
151
+ await config.save();
152
+ await runFormatter('npmextra', { silent: true });
153
+ plugins.logger.log('success', `Added registry: ${url}`);
154
+ } else {
155
+ plugins.logger.log('warn', `Registry already exists: ${url}`);
156
+ }
157
+ }
158
+
159
+ /**
160
+ * Remove a registry URL
161
+ */
162
+ async function handleRemove(url?: string): Promise<void> {
163
+ const config = await ReleaseConfig.fromCwd();
164
+ const registries = config.getRegistries();
165
+
166
+ if (registries.length === 0) {
167
+ plugins.logger.log('warn', 'No registries configured to remove.');
168
+ return;
169
+ }
170
+
171
+ if (!url) {
172
+ // Interactive mode - show list to select from
173
+ const interactInstance = new plugins.smartinteract.SmartInteract();
174
+ const response = await interactInstance.askQuestion({
175
+ type: 'list',
176
+ name: 'registryUrl',
177
+ message: 'Select registry to remove:',
178
+ choices: registries,
179
+ default: registries[0],
180
+ });
181
+ url = (response as any).value;
182
+ }
183
+
184
+ const removed = config.removeRegistry(url!);
185
+
186
+ if (removed) {
187
+ await config.save();
188
+ await runFormatter('npmextra', { silent: true });
189
+ plugins.logger.log('success', `Removed registry: ${url}`);
190
+ } else {
191
+ plugins.logger.log('warn', `Registry not found: ${url}`);
192
+ }
193
+ }
194
+
195
+ /**
196
+ * Clear all registries
197
+ */
198
+ async function handleClear(): Promise<void> {
199
+ const config = await ReleaseConfig.fromCwd();
200
+
201
+ if (!config.hasRegistries()) {
202
+ plugins.logger.log('info', 'No registries to clear.');
203
+ return;
204
+ }
205
+
206
+ // Confirm before clearing
207
+ const confirmed = await plugins.smartinteract.SmartInteract.getCliConfirmation(
208
+ 'Clear all configured registries?',
209
+ false
210
+ );
211
+
212
+ if (confirmed) {
213
+ config.clearRegistries();
214
+ await config.save();
215
+ await runFormatter('npmextra', { silent: true });
216
+ plugins.logger.log('success', 'All registries cleared.');
217
+ } else {
218
+ plugins.logger.log('info', 'Operation cancelled.');
219
+ }
220
+ }
221
+
222
+ /**
223
+ * Set or toggle access level
224
+ */
225
+ async function handleAccessLevel(level?: string): Promise<void> {
226
+ const config = await ReleaseConfig.fromCwd();
227
+ const currentLevel = config.getAccessLevel();
228
+
229
+ if (!level) {
230
+ // Interactive mode - toggle or ask
231
+ const interactInstance = new plugins.smartinteract.SmartInteract();
232
+ const response = await interactInstance.askQuestion({
233
+ type: 'list',
234
+ name: 'accessLevel',
235
+ message: 'Select npm access level for publishing:',
236
+ choices: ['public', 'private'],
237
+ default: currentLevel,
238
+ });
239
+ level = (response as any).value;
240
+ }
241
+
242
+ // Validate the level
243
+ if (level !== 'public' && level !== 'private') {
244
+ plugins.logger.log('error', `Invalid access level: ${level}. Must be 'public' or 'private'.`);
245
+ return;
246
+ }
247
+
248
+ if (level === currentLevel) {
249
+ plugins.logger.log('info', `Access level is already set to: ${level}`);
250
+ return;
251
+ }
252
+
253
+ config.setAccessLevel(level as 'public' | 'private');
254
+ await config.save();
255
+ await runFormatter('npmextra', { silent: true });
256
+ plugins.logger.log('success', `Access level set to: ${level}`);
257
+ }
258
+
259
+ /**
260
+ * Show help for config command
261
+ */
262
+ function showHelp(): void {
263
+ console.log('');
264
+ console.log('Usage: gitzone config <command> [options]');
265
+ console.log('');
266
+ console.log('Commands:');
267
+ console.log(' show Display current release configuration');
268
+ console.log(' add [url] Add a registry URL');
269
+ console.log(' remove [url] Remove a registry URL');
270
+ console.log(' clear Clear all registries');
271
+ console.log(' access [public|private] Set npm access level for publishing');
272
+ console.log('');
273
+ console.log('Examples:');
274
+ console.log(' gitzone config show');
275
+ console.log(' gitzone config add https://registry.npmjs.org');
276
+ console.log(' gitzone config add https://verdaccio.example.com');
277
+ console.log(' gitzone config remove https://registry.npmjs.org');
278
+ console.log(' gitzone config clear');
279
+ console.log(' gitzone config access public');
280
+ console.log(' gitzone config access private');
281
+ console.log('');
282
+ }
@@ -0,0 +1,3 @@
1
+ // mod_config plugins
2
+ export * from '../plugins.js';
3
+ export { logger } from '../gitzone.logging.js';
@@ -26,6 +26,42 @@ const migrateNamespaceKeys = (npmextraJson: any): boolean => {
26
26
  return migrated;
27
27
  };
28
28
 
29
+ /**
30
+ * Migrates npmAccessLevel from @ship.zone/szci to @git.zone/cli.release.accessLevel
31
+ * This is a one-time migration for projects using the old location
32
+ */
33
+ const migrateAccessLevel = (npmextraJson: any): boolean => {
34
+ const szciConfig = npmextraJson['@ship.zone/szci'];
35
+
36
+ // Check if szci has npmAccessLevel that needs to be migrated
37
+ if (!szciConfig?.npmAccessLevel) {
38
+ return false;
39
+ }
40
+
41
+ // Check if we already have the new location
42
+ const gitzoneConfig = npmextraJson['@git.zone/cli'] || {};
43
+ if (gitzoneConfig?.release?.accessLevel) {
44
+ // Already migrated, just remove from szci
45
+ delete szciConfig.npmAccessLevel;
46
+ return true;
47
+ }
48
+
49
+ // Ensure @git.zone/cli and release exist
50
+ if (!npmextraJson['@git.zone/cli']) {
51
+ npmextraJson['@git.zone/cli'] = {};
52
+ }
53
+ if (!npmextraJson['@git.zone/cli'].release) {
54
+ npmextraJson['@git.zone/cli'].release = {};
55
+ }
56
+
57
+ // Migrate the value
58
+ npmextraJson['@git.zone/cli'].release.accessLevel = szciConfig.npmAccessLevel;
59
+ delete szciConfig.npmAccessLevel;
60
+
61
+ console.log(`Migrated npmAccessLevel to @git.zone/cli.release.accessLevel`);
62
+ return true;
63
+ };
64
+
29
65
  /**
30
66
  * runs the npmextra file checking
31
67
  */
@@ -39,6 +75,9 @@ export const run = async (projectArg: Project) => {
39
75
  // Migrate old namespace keys to new package-scoped keys
40
76
  migrateNamespaceKeys(npmextraJson);
41
77
 
78
+ // Migrate npmAccessLevel from szci to @git.zone/cli.release.accessLevel
79
+ migrateAccessLevel(npmextraJson);
80
+
42
81
  if (!npmextraJson['@git.zone/cli']) {
43
82
  npmextraJson['@git.zone/cli'] = {};
44
83
  }
@@ -2,6 +2,7 @@ import * as plugins from './mod.plugins.js';
2
2
  import { Project } from '../classes.project.js';
3
3
  import { FormatContext } from './classes.formatcontext.js';
4
4
  import { FormatPlanner } from './classes.formatplanner.js';
5
+ import { BaseFormatter } from './classes.baseformatter.js';
5
6
  import { logger, setVerboseMode } from '../gitzone.logging.js';
6
7
 
7
8
  // Import wrapper classes for formatters
@@ -195,3 +196,44 @@ export const handleCleanBackups = async (): Promise<void> => {
195
196
  'Backup cleaning has been disabled - backup system removed',
196
197
  );
197
198
  };
199
+
200
+ /**
201
+ * Run a single formatter by name (for use by other modules)
202
+ */
203
+ export const runFormatter = async (
204
+ formatterName: string,
205
+ options: { silent?: boolean } = {}
206
+ ): Promise<void> => {
207
+ const project = await Project.fromCwd();
208
+ const context = new FormatContext();
209
+
210
+ // Map formatter names to classes
211
+ const formatterMap: Record<string, new (ctx: FormatContext, proj: Project) => BaseFormatter> = {
212
+ cleanup: CleanupFormatter,
213
+ npmextra: NpmextraFormatter,
214
+ license: LicenseFormatter,
215
+ packagejson: PackageJsonFormatter,
216
+ templates: TemplatesFormatter,
217
+ gitignore: GitignoreFormatter,
218
+ tsconfig: TsconfigFormatter,
219
+ prettier: PrettierFormatter,
220
+ readme: ReadmeFormatter,
221
+ copy: CopyFormatter,
222
+ };
223
+
224
+ const FormatterClass = formatterMap[formatterName];
225
+ if (!FormatterClass) {
226
+ throw new Error(`Unknown formatter: ${formatterName}`);
227
+ }
228
+
229
+ const formatter = new FormatterClass(context, project);
230
+ const changes = await formatter.analyze();
231
+
232
+ for (const change of changes) {
233
+ await formatter.applyChange(change);
234
+ }
235
+
236
+ if (!options.silent) {
237
+ logger.log('success', `Formatter '${formatterName}' completed`);
238
+ }
239
+ };
@@ -7,38 +7,85 @@ import * as paths from '../paths.js';
7
7
  import { logger } from '../gitzone.logging.js';
8
8
 
9
9
  export let run = async () => {
10
- const done = plugins.smartpromise.defer();
11
- logger.log('warn', 'no action specified');
10
+ console.log('');
11
+ console.log('╭─────────────────────────────────────────────────────────────╮');
12
+ console.log('│ gitzone - Development Workflow CLI │');
13
+ console.log('╰─────────────────────────────────────────────────────────────╯');
14
+ console.log('');
12
15
 
13
- const dirEntries = await plugins.smartfs.directory(paths.templatesDir).list();
14
- const templates: string[] = [];
15
- for (const entry of dirEntries) {
16
- try {
17
- const stats = await plugins.smartfs
18
- .file(plugins.path.join(paths.templatesDir, entry.path))
19
- .stat();
20
- if (stats.isDirectory) {
21
- templates.push(entry.name);
22
- }
23
- } catch {
24
- // Skip entries that can't be accessed
25
- }
26
- }
16
+ const interactInstance = new plugins.smartinteract.SmartInteract();
17
+ const response = await interactInstance.askQuestion({
18
+ type: 'list',
19
+ name: 'action',
20
+ message: 'What would you like to do?',
21
+ default: 'commit',
22
+ choices: [
23
+ { name: 'Commit changes (semantic versioning)', value: 'commit' },
24
+ { name: 'Format project files', value: 'format' },
25
+ { name: 'Configure release settings', value: 'config' },
26
+ { name: 'Create from template', value: 'template' },
27
+ { name: 'Manage dev services (MongoDB, S3)', value: 'services' },
28
+ { name: 'Open project assets', value: 'open' },
29
+ { name: 'Show help', value: 'help' },
30
+ ],
31
+ });
27
32
 
28
- let projects = `\n`;
29
- for (const template of templates) {
30
- projects += ` - ${template}\n`;
31
- }
33
+ const action = (response as any).value;
32
34
 
33
- logger.log(
34
- 'info',
35
- `
36
- You can do one of the following things:
37
- * create a new project with 'gitzone template [template]'
38
- the following templates exist: ${projects}
39
- * format a project with 'gitzone format'
40
- `,
41
- );
42
- done.resolve();
43
- return done.promise;
35
+ switch (action) {
36
+ case 'commit': {
37
+ const modCommit = await import('../mod_commit/index.js');
38
+ await modCommit.run({ _: ['commit'] });
39
+ break;
40
+ }
41
+ case 'format': {
42
+ const modFormat = await import('../mod_format/index.js');
43
+ await modFormat.run({ interactive: true });
44
+ break;
45
+ }
46
+ case 'config': {
47
+ const modConfig = await import('../mod_config/index.js');
48
+ await modConfig.run({ _: ['config'] });
49
+ break;
50
+ }
51
+ case 'template': {
52
+ const modTemplate = await import('../mod_template/index.js');
53
+ await modTemplate.run({ _: ['template'] });
54
+ break;
55
+ }
56
+ case 'services': {
57
+ const modServices = await import('../mod_services/index.js');
58
+ await modServices.run({ _: ['services'] });
59
+ break;
60
+ }
61
+ case 'open': {
62
+ const modOpen = await import('../mod_open/index.js');
63
+ await modOpen.run({ _: ['open'] });
64
+ break;
65
+ }
66
+ case 'help':
67
+ showHelp();
68
+ break;
69
+ }
44
70
  };
71
+
72
+ function showHelp(): void {
73
+ console.log('');
74
+ console.log('Usage: gitzone <command> [options]');
75
+ console.log('');
76
+ console.log('Commands:');
77
+ console.log(' commit Create a semantic commit with versioning');
78
+ console.log(' format Format and standardize project files');
79
+ console.log(' config Manage release registry configuration');
80
+ console.log(' template Create a new project from template');
81
+ console.log(' services Manage dev services (MongoDB, S3/MinIO)');
82
+ console.log(' open Open project assets (GitLab, npm, etc.)');
83
+ console.log(' docker Docker-related operations');
84
+ console.log(' deprecate Deprecate a package on npm');
85
+ console.log(' meta Run meta commands');
86
+ console.log(' start Start working on a project');
87
+ console.log(' helpers Run helper utilities');
88
+ console.log('');
89
+ console.log('Run gitzone <command> --help for more information on a command.');
90
+ console.log('');
91
+ }
@@ -1,28 +0,0 @@
1
- export type TGitzoneProjectType = 'npm' | 'service' | 'wcc' | 'website';
2
- /**
3
- * type of the actual gitzone data
4
- */
5
- export interface IGitzoneConfigData {
6
- projectType: TGitzoneProjectType;
7
- module: {
8
- githost: string;
9
- gitscope: string;
10
- gitrepo: string;
11
- description: string;
12
- npmPackageName: string;
13
- license: string;
14
- projectDomain: string;
15
- };
16
- npmciOptions: {
17
- npmAccessLevel: 'public' | 'private';
18
- };
19
- }
20
- /**
21
- * gitzone config
22
- */
23
- export declare class GitzoneConfig {
24
- static fromCwd(): Promise<GitzoneConfig>;
25
- data: IGitzoneConfigData;
26
- readConfigFromCwd(): Promise<void>;
27
- constructor();
28
- }
@@ -1,21 +0,0 @@
1
- import * as plugins from './gitzone.plugins.js';
2
- import * as paths from './gitzone.paths.js';
3
- /**
4
- * gitzone config
5
- */
6
- export class GitzoneConfig {
7
- static async fromCwd() {
8
- const gitzoneConfig = new GitzoneConfig();
9
- await gitzoneConfig.readConfigFromCwd();
10
- return gitzoneConfig;
11
- }
12
- async readConfigFromCwd() {
13
- const npmextraInstance = new plugins.npmextra.Npmextra(paths.cwd);
14
- this.data = npmextraInstance.dataFor('gitzone', {});
15
- this.data.npmciOptions = npmextraInstance.dataFor('npmci', {
16
- npmAccessLevel: 'public',
17
- });
18
- }
19
- constructor() { }
20
- }
21
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ2l0em9uZS5jb25maWcuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi90cy9naXR6b25lLmNvbmZpZy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEtBQUssT0FBTyxNQUFNLHNCQUFzQixDQUFDO0FBQ2hELE9BQU8sS0FBSyxLQUFLLE1BQU0sb0JBQW9CLENBQUM7QUF1QjVDOztHQUVHO0FBQ0gsTUFBTSxPQUFPLGFBQWE7SUFDakIsTUFBTSxDQUFDLEtBQUssQ0FBQyxPQUFPO1FBQ3pCLE1BQU0sYUFBYSxHQUFHLElBQUksYUFBYSxFQUFFLENBQUM7UUFDMUMsTUFBTSxhQUFhLENBQUMsaUJBQWlCLEVBQUUsQ0FBQztRQUN4QyxPQUFPLGFBQWEsQ0FBQztJQUN2QixDQUFDO0lBSU0sS0FBSyxDQUFDLGlCQUFpQjtRQUM1QixNQUFNLGdCQUFnQixHQUFHLElBQUksT0FBTyxDQUFDLFFBQVEsQ0FBQyxRQUFRLENBQUMsS0FBSyxDQUFDLEdBQUcsQ0FBQyxDQUFDO1FBQ2xFLElBQUksQ0FBQyxJQUFJLEdBQUcsZ0JBQWdCLENBQUMsT0FBTyxDQUFxQixTQUFTLEVBQUUsRUFBRSxDQUFDLENBQUM7UUFDeEUsSUFBSSxDQUFDLElBQUksQ0FBQyxZQUFZLEdBQUcsZ0JBQWdCLENBQUMsT0FBTyxDQUFxQyxPQUFPLEVBQUU7WUFDN0YsY0FBYyxFQUFFLFFBQVE7U0FDekIsQ0FBQyxDQUFDO0lBQ0wsQ0FBQztJQUVELGdCQUFlLENBQUM7Q0FDakIifQ==
@@ -1 +0,0 @@
1
- export {};
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ2l0em9uZS5tb25pdG9yLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vdHMvZ2l0em9uZS5tb25pdG9yLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiIifQ==
@@ -1,4 +0,0 @@
1
- export declare let packageDir: string;
2
- export declare let assetsDir: string;
3
- export declare let templatesDir: string;
4
- export declare let cwd: string;
@@ -1,6 +0,0 @@
1
- import * as plugins from './gitzone.plugins.js';
2
- export let packageDir = plugins.path.join(plugins.smartpath.get.dirnameFromImportMetaUrl(import.meta.url), '../');
3
- export let assetsDir = plugins.path.join(packageDir, './assets');
4
- export let templatesDir = plugins.path.join(assetsDir, 'templates');
5
- export let cwd = process.cwd();
6
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ2l0em9uZS5wYXRocy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3RzL2dpdHpvbmUucGF0aHMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxLQUFLLE9BQU8sTUFBTSxzQkFBc0IsQ0FBQztBQUVoRCxNQUFNLENBQUMsSUFBSSxVQUFVLEdBQUcsT0FBTyxDQUFDLElBQUksQ0FBQyxJQUFJLENBQ3ZDLE9BQU8sQ0FBQyxTQUFTLENBQUMsR0FBRyxDQUFDLHdCQUF3QixDQUFDLE1BQU0sQ0FBQyxJQUFJLENBQUMsR0FBRyxDQUFDLEVBQy9ELEtBQUssQ0FDTixDQUFDO0FBQ0YsTUFBTSxDQUFDLElBQUksU0FBUyxHQUFHLE9BQU8sQ0FBQyxJQUFJLENBQUMsSUFBSSxDQUFDLFVBQVUsRUFBRSxVQUFVLENBQUMsQ0FBQztBQUNqRSxNQUFNLENBQUMsSUFBSSxZQUFZLEdBQUcsT0FBTyxDQUFDLElBQUksQ0FBQyxJQUFJLENBQUMsU0FBUyxFQUFFLFdBQVcsQ0FBQyxDQUFDO0FBQ3BFLE1BQU0sQ0FBQyxJQUFJLEdBQUcsR0FBRyxPQUFPLENBQUMsR0FBRyxFQUFFLENBQUMifQ==
@@ -1,10 +0,0 @@
1
- import * as smartlog from '@push.rocks/smartlog';
2
- import * as smartlogDestinationLocal from '@push.rocks/smartlog-destination-local';
3
- import * as npmextra from '@push.rocks/npmextra';
4
- import * as path from 'path';
5
- import * as projectinfo from '@push.rocks/projectinfo';
6
- import * as smartcli from '@push.rocks/smartcli';
7
- import * as smartpath from '@push.rocks/smartpath';
8
- import * as smartpromise from '@push.rocks/smartpromise';
9
- import * as smartupdate from '@push.rocks/smartupdate';
10
- export { smartlog, smartlogDestinationLocal, npmextra, path, projectinfo, smartcli, smartpath, smartpromise, smartupdate, };
@@ -1,11 +0,0 @@
1
- import * as smartlog from '@push.rocks/smartlog';
2
- import * as smartlogDestinationLocal from '@push.rocks/smartlog-destination-local';
3
- import * as npmextra from '@push.rocks/npmextra';
4
- import * as path from 'path';
5
- import * as projectinfo from '@push.rocks/projectinfo';
6
- import * as smartcli from '@push.rocks/smartcli';
7
- import * as smartpath from '@push.rocks/smartpath';
8
- import * as smartpromise from '@push.rocks/smartpromise';
9
- import * as smartupdate from '@push.rocks/smartupdate';
10
- export { smartlog, smartlogDestinationLocal, npmextra, path, projectinfo, smartcli, smartpath, smartpromise, smartupdate, };
11
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ2l0em9uZS5wbHVnaW5zLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vdHMvZ2l0em9uZS5wbHVnaW5zLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sS0FBSyxRQUFRLE1BQU0sc0JBQXNCLENBQUM7QUFDakQsT0FBTyxLQUFLLHdCQUF3QixNQUFNLHdDQUF3QyxDQUFDO0FBQ25GLE9BQU8sS0FBSyxRQUFRLE1BQU0sc0JBQXNCLENBQUM7QUFDakQsT0FBTyxLQUFLLElBQUksTUFBTSxNQUFNLENBQUM7QUFDN0IsT0FBTyxLQUFLLFdBQVcsTUFBTSx5QkFBeUIsQ0FBQztBQUN2RCxPQUFPLEtBQUssUUFBUSxNQUFNLHNCQUFzQixDQUFDO0FBQ2pELE9BQU8sS0FBSyxTQUFTLE1BQU0sdUJBQXVCLENBQUM7QUFDbkQsT0FBTyxLQUFLLFlBQVksTUFBTSwwQkFBMEIsQ0FBQztBQUN6RCxPQUFPLEtBQUssV0FBVyxNQUFNLHlCQUF5QixDQUFDO0FBRXZELE9BQU8sRUFDTCxRQUFRLEVBQ1Isd0JBQXdCLEVBQ3hCLFFBQVEsRUFDUixJQUFJLEVBQ0osV0FBVyxFQUNYLFFBQVEsRUFDUixTQUFTLEVBQ1QsWUFBWSxFQUNaLFdBQVcsR0FDWixDQUFDIn0=
@@ -1,8 +0,0 @@
1
- import { GitzoneConfig } from '../gitzone.config.js';
2
- import type { TGitzoneProjectType } from '../gitzone.config.js';
3
- export declare class Project {
4
- static fromCwd(): Promise<Project>;
5
- gitzoneConfig: GitzoneConfig;
6
- get type(): TGitzoneProjectType;
7
- constructor(gitzoneConfigArg: GitzoneConfig);
8
- }
@@ -1,20 +0,0 @@
1
- import * as plugins from './mod.plugins.js';
2
- import * as paths from '../gitzone.paths.js';
3
- import { GitzoneConfig } from '../gitzone.config.js';
4
- export class Project {
5
- static async fromCwd() {
6
- const gitzoneConfig = await GitzoneConfig.fromCwd();
7
- const project = new Project(gitzoneConfig);
8
- if (!project.gitzoneConfig.data.projectType) {
9
- throw new Error('Please define a project type');
10
- }
11
- return project;
12
- }
13
- get type() {
14
- return this.gitzoneConfig.data.projectType;
15
- }
16
- constructor(gitzoneConfigArg) {
17
- this.gitzoneConfig = gitzoneConfigArg;
18
- }
19
- }
20
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZm9ybWF0LmNsYXNzZXMucHJvamVjdC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3RzL21vZF9mb3JtYXQvZm9ybWF0LmNsYXNzZXMucHJvamVjdC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEtBQUssT0FBTyxNQUFNLGtCQUFrQixDQUFDO0FBQzVDLE9BQU8sS0FBSyxLQUFLLE1BQU0scUJBQXFCLENBQUM7QUFFN0MsT0FBTyxFQUFFLGFBQWEsRUFBRSxNQUFNLHNCQUFzQixDQUFDO0FBR3JELE1BQU0sT0FBTyxPQUFPO0lBQ1gsTUFBTSxDQUFDLEtBQUssQ0FBQyxPQUFPO1FBQ3pCLE1BQU0sYUFBYSxHQUFHLE1BQU0sYUFBYSxDQUFDLE9BQU8sRUFBRSxDQUFDO1FBQ3BELE1BQU0sT0FBTyxHQUFHLElBQUksT0FBTyxDQUFDLGFBQWEsQ0FBQyxDQUFDO1FBQzNDLElBQUksQ0FBQyxPQUFPLENBQUMsYUFBYSxDQUFDLElBQUksQ0FBQyxXQUFXLEVBQUU7WUFDM0MsTUFBTSxJQUFJLEtBQUssQ0FBQyw4QkFBOEIsQ0FBQyxDQUFDO1NBQ2pEO1FBQ0QsT0FBTyxPQUFPLENBQUM7SUFDakIsQ0FBQztJQUdELElBQVcsSUFBSTtRQUNiLE9BQU8sSUFBSSxDQUFDLGFBQWEsQ0FBQyxJQUFJLENBQUMsV0FBVyxDQUFDO0lBQzdDLENBQUM7SUFFRCxZQUFZLGdCQUErQjtRQUN6QyxJQUFJLENBQUMsYUFBYSxHQUFHLGdCQUFnQixDQUFDO0lBQ3hDLENBQUM7Q0FDRiJ9