Skip to content

Commit

Permalink
Merge pull request #1116 from Accenture/feature/1108-allow-importing-…
Browse files Browse the repository at this point in the history
…certain-parts-of-mcdev-directly

Feature/1108 allow importing certain parts of mcdev directly
  • Loading branch information
JoernBerkefeld authored Sep 29, 2023
2 parents 6fd5b63 + 2b98fe5 commit a7fc973
Show file tree
Hide file tree
Showing 9 changed files with 56 additions and 25 deletions.
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/bug.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ body:
label: Version
description: What version of our software are you running? (mcdev --version)
options:
- 6.0.0
- 5.3.0
- 5.2.0
- 5.1.0
Expand Down
6 changes: 6 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@
"parser": "json"
}
},
{
"files": "package.json",
"options": {
"printWidth": 40
}
},
{
"files": "*.ssjs",
"options": {
Expand Down
15 changes: 6 additions & 9 deletions docs/dist/documentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,9 +137,6 @@ Provides default functionality that can be overwritten by child metadata type cl
## Constants

<dl>
<dt><a href="#MetadataTypeInfo">MetadataTypeInfo</a></dt>
<dd><p>Provides access to all metadataType classes</p>
</dd>
<dt><a href="#BusinessUnit">BusinessUnit</a></dt>
<dd><p>Helper that handles retrieval of BU info</p>
</dd>
Expand Down Expand Up @@ -521,6 +518,7 @@ main class
**Kind**: global class

* [Mcdev](#Mcdev)
* [.version()](#Mcdev.version) ⇒ <code>string</code>
* [.setSkipInteraction([skipInteraction])](#Mcdev.setSkipInteraction) ⇒ <code>void</code>
* [.setLoggingLevel(argv)](#Mcdev.setLoggingLevel) ⇒ <code>void</code>
* [.setOptions(argv)](#Mcdev.setOptions) ⇒ <code>void</code>
Expand All @@ -547,6 +545,11 @@ main class
* [.pause(businessUnit, [selectedType], [keys])](#Mcdev.pause) ⇒ <code>Promise.&lt;Object.&lt;string, Array.&lt;string&gt;&gt;&gt;</code>
* [.fixKeys(businessUnit, selectedType, [keys])](#Mcdev.fixKeys) ⇒ <code>Promise.&lt;Object.&lt;string, Array.&lt;string&gt;&gt;&gt;</code>

<a name="Mcdev.version"></a>

### Mcdev.version() ⇒ <code>string</code>
**Kind**: static method of [<code>Mcdev</code>](#Mcdev)
**Returns**: <code>string</code> - current version of mcdev
<a name="Mcdev.setSkipInteraction"></a>

### Mcdev.setSkipInteraction([skipInteraction]) ⇒ <code>void</code>
Expand Down Expand Up @@ -6284,12 +6287,6 @@ helper for [Retriever.retrieve](Retriever.retrieve) to get all dependencies of t
| --- | --- | --- |
| metadataTypes | <code>Array.&lt;TYPE.SupportedMetadataTypes&gt;</code> | list of metadata types to retrieve; can include subtypes! |

<a name="MetadataTypeInfo"></a>

## MetadataTypeInfo
Provides access to all metadataType classes

**Kind**: global constant
<a name="BusinessUnit"></a>

## BusinessUnit
Expand Down
2 changes: 1 addition & 1 deletion lib/MetadataTypeDefinitions.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ import user from './metadataTypes/definitions/User.definition.js';
import verification from './metadataTypes/definitions/Verification.definition.js';

/**
* Provides access to all metadataType classes
* Provides access to definitions of all metadataType classes
*/
export default {
asset,
Expand Down
4 changes: 1 addition & 3 deletions lib/MetadataTypeInfo.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ import verification from './metadataTypes/Verification.js';
/**
* Provides access to all metadataType classes
*/
const MetadataTypeInfo = {
export default {
asset,
attributeGroup,
attributeSet,
Expand Down Expand Up @@ -76,5 +76,3 @@ const MetadataTypeInfo = {
user,
verification,
};

export default MetadataTypeInfo;
7 changes: 7 additions & 0 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,13 @@ import cache from './util/cache.js';
* main class
*/
class Mcdev {
/**
* @returns {string} current version of mcdev
*/
static version() {
console.log('mcdev v' + Util.packageJsonMcdev.version); // eslint-disable-line no-console
return Util.packageJsonMcdev.version;
}
/**
* helper method to use unattended mode when including mcdev as a package
*
Expand Down
32 changes: 23 additions & 9 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 10 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "mcdev",
"version": "5.3.0",
"version": "6.0.0",
"description": "Accenture Salesforce Marketing Cloud DevTools",
"author": "Accenture: joern.berkefeld, douglas.midgley, robert.zimmermann, maciej.barnas",
"license": "MIT",
Expand Down Expand Up @@ -31,6 +31,12 @@
"rest"
],
"main": "./lib/index.js",
"exports": {
".": {
"default": "./lib/index.js"
},
"./*": "./*.js"
},
"bin": {
"mcdev": "./lib/cli.js"
},
Expand Down Expand Up @@ -104,7 +110,9 @@
"fsevents": "*"
},
"lint-staged": {
"*.{js,jsx,ts,tsx}": ["eslint --fix"]
"*.{js,jsx,ts,tsx}": [
"eslint --fix"
]
},
"type": "module"
}
2 changes: 1 addition & 1 deletion test/mockRoot/.mcdevrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,5 +78,5 @@
"triggeredSend"
]
},
"version": "5.3.0"
"version": "6.0.0"
}

0 comments on commit a7fc973

Please sign in to comment.