Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
c84eb24
1.1.3
raideer Mar 12, 2025
37e44d3
fix: package command
raideer Mar 12, 2025
9bb3ee7
chore: updated changelog
raideer Mar 12, 2025
e7c4d91
1.1.3
raideer Mar 12, 2025
949aa49
feat: added sample layout.xml generator
raideer Mar 13, 2025
c9c4ea5
feat: added file header
raideer Mar 13, 2025
ff880b0
feat: generator for page_types.xml
raideer Mar 13, 2025
f58e09c
fix: added newline
raideer Mar 13, 2025
76c1fdd
chore: run CI on push only
raideer Mar 13, 2025
3e55b7c
chore: removed scope
raideer Mar 13, 2025
c91c622
feat: added generator for sample crontab.xml file
raideer Mar 13, 2025
0005895
feat: generator for sample email_templates.xml file
raideer Mar 13, 2025
1f9f4a3
feat: generator command for sample sections.xml
raideer Mar 13, 2025
ed65729
feat: generator command for sample fieldset.xml file
raideer Mar 13, 2025
98d80b9
feat: generator command for sample view.xml file
raideer Mar 13, 2025
2f11c81
feat: generator command for sample indexer.xml file
raideer Mar 13, 2025
d0ed569
feat: generator for sample mview.xml file
raideer Mar 13, 2025
a962427
feat: generator for sample widget.xml file
raideer Mar 13, 2025
cd346d5
feat: generator for sample extension_attributes.xml file
raideer Mar 13, 2025
fa8e89f
feat: generator for sample system.xml file
raideer Mar 13, 2025
2f3c134
feat: generator for sample config.xml file
raideer Mar 13, 2025
65a56e1
Merge branch 'master' of github-magebit:magebitcom/magento-toolbox in…
raideer Mar 13, 2025
9f2bf91
chore: added auto deploy action
raideer Mar 13, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: Run CI jobs
on: [push, pull_request]
on: [push]

jobs:
lint:
Expand Down
12 changes: 11 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,14 @@ jobs:
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
files: '*.vsix'
files: '*.vsix'
deploy:
runs-on: ubuntu-latest
needs: build
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Publish
run: npm run deploy
env:
VSCE_PAT: ${{ secrets.VSCE_PAT }}
18 changes: 17 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,30 @@ All notable changes to the "magento-toolbox" extension will be documented in thi

Check [Keep a Changelog](http://keepachangelog.com/) for recommendations on how to structure this file.

## [1.2.0]

- Added: Generator command for sample Layout XML file
- Added: Generator command for sample page_types.xml file
- Added: Generator command for sample crontab.xml file
- Added: Generator command for sample email_templates.xml file
- Added: Generator command for sample sections.xml file
- Added: Generator command for sample fieldset.xml file
- Added: Generator command for sample view.xml file
- Added: Generator command for sample indexer.xml file
- Added: Generator command for sample mview.xml file
- Added: Generator command for sample widget.xml file
- Added: Generator command for sample extension_attributes.xml file
- Added: Generator command for sample system.xml file
- Added: Generator command for sample config.xml file

## [1.1.3] - 3/12/2025

- Fixed: Block, observer, plugin and preference class generation fails if class name includes backslashes
- Fixed: Composer.json license is not capitalized
- Fixed: Module generation module.xml sequence elements are not added
- Fixed: Observer XML generation fails if file header comment is not configured
- Fixed: Preference type attribute does not include full class namespace
- Chore: added unit tests for generator commands
- Chore: Added unit tests for generator commands

## [1.1.2] - 2/27/2025

Expand Down
107 changes: 106 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,58 @@
{
"command": "magento-toolbox.generatePreference",
"title": "Magento Toolbox: Generate Preference"
},
{
"command": "magento-toolbox.generateLayoutXmlFile",
"title": "Magento Toolbox: Generate Layout XML"
},
{
"command": "magento-toolbox.generatePageTypesXmlFile",
"title": "Magento Toolbox: Generate Page Types XML"
},
{
"command": "magento-toolbox.generateCrontabXmlFile",
"title": "Magento Toolbox: Generate Crontab XML"
},
{
"command": "magento-toolbox.generateEmailTemplatesXmlFile",
"title": "Magento Toolbox: Generate Email Templates XML"
},
{
"command": "magento-toolbox.generateSectionsXmlFile",
"title": "Magento Toolbox: Generate Sections XML"
},
{
"command": "magento-toolbox.generateFieldsetXmlFile",
"title": "Magento Toolbox: Generate Fieldset XML"
},
{
"command": "magento-toolbox.generateViewXmlFile",
"title": "Magento Toolbox: Generate View XML"
},
{
"command": "magento-toolbox.generateIndexerXmlFile",
"title": "Magento Toolbox: Generate Indexer XML"
},
{
"command": "magento-toolbox.generateMviewXmlFile",
"title": "Magento Toolbox: Generate MVIEW XML"
},
{
"command": "magento-toolbox.generateWidgetXmlFile",
"title": "Magento Toolbox: Generate Widget XML"
},
{
"command": "magento-toolbox.generateExtensionAttributesXmlFile",
"title": "Magento Toolbox: Generate Extension Attributes XML"
},
{
"command": "magento-toolbox.generateSystemXmlFile",
"title": "Magento Toolbox: Generate System XML"
},
{
"command": "magento-toolbox.generateConfigXmlFile",
"title": "Magento Toolbox: Generate Config XML"
}
],
"menus": {
Expand Down Expand Up @@ -183,6 +235,58 @@
{
"command": "magento-toolbox.generateWebapiXmlFile",
"when": "resourcePath =~ /app\\/code\\/.+\\/.+/i"
},
{
"command": "magento-toolbox.generateLayoutXmlFile",
"when": "resourcePath =~ /app\\/code\\/.+\\/.+/i"
},
{
"command": "magento-toolbox.generatePageTypesXmlFile",
"when": "resourcePath =~ /app\\/code\\/.+\\/.+/i"
},
{
"command": "magento-toolbox.generateCrontabXmlFile",
"when": "resourcePath =~ /app\\/code\\/.+\\/.+/i"
},
{
"command": "magento-toolbox.generateEmailTemplatesXmlFile",
"when": "resourcePath =~ /app\\/code\\/.+\\/.+/i"
},
{
"command": "magento-toolbox.generateSectionsXmlFile",
"when": "resourcePath =~ /app\\/code\\/.+\\/.+/i"
},
{
"command": "magento-toolbox.generateFieldsetXmlFile",
"when": "resourcePath =~ /app\\/code\\/.+\\/.+/i"
},
{
"command": "magento-toolbox.generateViewXmlFile",
"when": "resourcePath =~ /app\\/code\\/.+\\/.+/i"
},
{
"command": "magento-toolbox.generateIndexerXmlFile",
"when": "resourcePath =~ /app\\/code\\/.+\\/.+/i"
},
{
"command": "magento-toolbox.generateMviewXmlFile",
"when": "resourcePath =~ /app\\/code\\/.+\\/.+/i"
},
{
"command": "magento-toolbox.generateWidgetXmlFile",
"when": "resourcePath =~ /app\\/code\\/.+\\/.+/i"
},
{
"command": "magento-toolbox.generateExtensionAttributesXmlFile",
"when": "resourcePath =~ /app\\/code\\/.+\\/.+/i"
},
{
"command": "magento-toolbox.generateSystemXmlFile",
"when": "resourcePath =~ /app\\/code\\/.+\\/.+/i"
},
{
"command": "magento-toolbox.generateConfigXmlFile",
"when": "resourcePath =~ /app\\/code\\/.+\\/.+/i"
}
]
}
Expand All @@ -201,7 +305,8 @@
"test": "vscode-test",
"format": "prettier --write \"src/**/*.{ts,tsx,js,jsx,json,css,scss,md}\"",
"format:check": "prettier --check \"src/**/*.{ts,tsx,js,jsx,json,css,scss,md}\"",
"package-vsix": "vsce package"
"package-vsix": "vsce package",
"deploy": "vsce publish"
},
"devDependencies": {
"@types/ejs": "^3.1.5",
Expand Down
2 changes: 1 addition & 1 deletion src/command/GenerateAclXmlFileCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export default class GenerateAclXmlFileCommand extends SimpleTemplateGeneratorCo
return 'ACL XML File';
}

getTemplatePath(data: TemplateWizardData): string {
getFilePath(data: TemplateWizardData): string {
const [vendor, module] = data.module.split('_');

return `app/code/${vendor}/${module}/etc/acl.xml`;
Expand Down
27 changes: 27 additions & 0 deletions src/command/GenerateConfigXmlFileCommand.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import { SimpleTemplateGeneratorCommand } from './SimpleTemplateGeneratorCommand';
import { TemplateWizardData } from 'wizard/SimpleTemplateWizard';
import FileHeader from 'common/xml/FileHeader';

export default class GenerateConfigXmlFileCommand extends SimpleTemplateGeneratorCommand {
constructor() {
super('magento-toolbox.generateConfigXmlFile');
}

getWizardTitle(): string {
return 'Config XML File';
}

getFileHeader(data: TemplateWizardData): string | undefined {
return FileHeader.getHeader(data.module);
}

getFilePath(data: TemplateWizardData): string {
const [vendor, module] = data.module.split('_');

return `app/code/${vendor}/${module}/etc/config.xml`;
}

getTemplateName(data: TemplateWizardData): string {
return 'xml/blank-config';
}
}
27 changes: 27 additions & 0 deletions src/command/GenerateCrontabXmlCommand.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import { SimpleTemplateGeneratorCommand } from './SimpleTemplateGeneratorCommand';
import { TemplateWizardData } from 'wizard/SimpleTemplateWizard';
import FileHeader from 'common/xml/FileHeader';

export default class GenerateCrontabXmlCommand extends SimpleTemplateGeneratorCommand {
constructor() {
super('magento-toolbox.generateCrontabXmlFile');
}

getWizardTitle(): string {
return 'Crontab XML File';
}

getFileHeader(data: TemplateWizardData): string | undefined {
return FileHeader.getHeader(data.module);
}

getFilePath(data: TemplateWizardData): string {
const [vendor, module] = data.module.split('_');

return `app/code/${vendor}/${module}/etc/crontab.xml`;
}

getTemplateName(data: TemplateWizardData): string {
return 'xml/blank-crontab';
}
}
2 changes: 1 addition & 1 deletion src/command/GenerateDiXmlFileCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export default class GenerateDiXmlFileCommand extends SimpleTemplateGeneratorCom
return 'DI XML File';
}

getTemplatePath(data: TemplateWizardData): string {
getFilePath(data: TemplateWizardData): string {
const [vendor, module] = data.module.split('_');

if (data.area && data.area !== MagentoScope.Global) {
Expand Down
27 changes: 27 additions & 0 deletions src/command/GenerateEmailTemplatesXmlCommand.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import { SimpleTemplateGeneratorCommand } from './SimpleTemplateGeneratorCommand';
import { TemplateWizardData } from 'wizard/SimpleTemplateWizard';
import FileHeader from 'common/xml/FileHeader';

export default class GenerateEmailTemplatesXmlCommand extends SimpleTemplateGeneratorCommand {
constructor() {
super('magento-toolbox.generateEmailTemplatesXmlFile');
}

getWizardTitle(): string {
return 'Email Templates XML File';
}

getFileHeader(data: TemplateWizardData): string | undefined {
return FileHeader.getHeader(data.module);
}

getFilePath(data: TemplateWizardData): string {
const [vendor, module] = data.module.split('_');

return `app/code/${vendor}/${module}/etc/email_templates.xml`;
}

getTemplateName(data: TemplateWizardData): string {
return 'xml/blank-email-templates';
}
}
2 changes: 1 addition & 1 deletion src/command/GenerateEventsXmlCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export default class GenerateEventsXmlCommand extends SimpleTemplateGeneratorCom
return FileHeader.getHeader(data.module);
}

getTemplatePath(data: TemplateWizardData): string {
getFilePath(data: TemplateWizardData): string {
const [vendor, module] = data.module.split('_');

if (data.area && data.area !== MagentoScope.Global) {
Expand Down
27 changes: 27 additions & 0 deletions src/command/GenerateExtensionAttributesXmlFileCommand.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import { SimpleTemplateGeneratorCommand } from './SimpleTemplateGeneratorCommand';
import { TemplateWizardData } from 'wizard/SimpleTemplateWizard';
import FileHeader from 'common/xml/FileHeader';

export default class GenerateExtensionAttributesXmlFileCommand extends SimpleTemplateGeneratorCommand {
constructor() {
super('magento-toolbox.generateExtensionAttributesXmlFile');
}

getWizardTitle(): string {
return 'Extension Attributes XML File';
}

getFileHeader(data: TemplateWizardData): string | undefined {
return FileHeader.getHeader(data.module);
}

getFilePath(data: TemplateWizardData): string {
const [vendor, module] = data.module.split('_');

return `app/code/${vendor}/${module}/etc/extension_attributes.xml`;
}

getTemplateName(data: TemplateWizardData): string {
return 'xml/blank-extension-attributes';
}
}
27 changes: 27 additions & 0 deletions src/command/GenerateFieldsetXmlCommand.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import { SimpleTemplateGeneratorCommand } from './SimpleTemplateGeneratorCommand';
import { TemplateWizardData } from 'wizard/SimpleTemplateWizard';
import FileHeader from 'common/xml/FileHeader';

export default class GenerateFieldsetXmlCommand extends SimpleTemplateGeneratorCommand {
constructor() {
super('magento-toolbox.generateFieldsetXmlFile');
}

getWizardTitle(): string {
return 'Fieldset XML File';
}

getFileHeader(data: TemplateWizardData): string | undefined {
return FileHeader.getHeader(data.module);
}

getFilePath(data: TemplateWizardData): string {
const [vendor, module] = data.module.split('_');

return `app/code/${vendor}/${module}/etc/fieldset.xml`;
}

getTemplateName(data: TemplateWizardData): string {
return 'xml/blank-fieldset';
}
}
2 changes: 1 addition & 1 deletion src/command/GenerateGraphqlSchemaFile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export default class GenerateGraphqlSchemaFileCommand extends SimpleTemplateGene
return 'GraphQL Schema File';
}

getTemplatePath(data: TemplateWizardData): string {
getFilePath(data: TemplateWizardData): string {
const [vendor, module] = data.module.split('_');

return `app/code/${vendor}/${module}/etc/schema.graphqls`;
Expand Down
27 changes: 27 additions & 0 deletions src/command/GenerateIndexerXmlFileCommand.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import { SimpleTemplateGeneratorCommand } from './SimpleTemplateGeneratorCommand';
import { TemplateWizardData } from 'wizard/SimpleTemplateWizard';
import FileHeader from 'common/xml/FileHeader';

export default class GenerateIndexerXmlFileCommand extends SimpleTemplateGeneratorCommand {
constructor() {
super('magento-toolbox.generateIndexerXmlFile');
}

getWizardTitle(): string {
return 'Indexer XML File';
}

getFileHeader(data: TemplateWizardData): string | undefined {
return FileHeader.getHeader(data.module);
}

getFilePath(data: TemplateWizardData): string {
const [vendor, module] = data.module.split('_');

return `app/code/${vendor}/${module}/etc/indexer.xml`;
}

getTemplateName(data: TemplateWizardData): string {
return 'xml/blank-indexer';
}
}
Loading