Skip to content

Commit

Permalink
Merge pull request #492 from Accenture/develop
Browse files Browse the repository at this point in the history
4.1.2
  • Loading branch information
JoernBerkefeld authored Oct 31, 2022
2 parents 7f3e152 + 74cb27d commit db211c7
Show file tree
Hide file tree
Showing 8 changed files with 34 additions and 28 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:
- 4.1.2
- 4.1.1
- 4.1.0
- 4.0.2
Expand Down
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[markdown]": {
"editor.defaultFormatter": "yzhang.markdown-all-in-one"
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[typescript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
Expand Down
37 changes: 18 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ If you experience issues installing Accenture SFMC DevTools, please check out th
1. Install Accenture SFMC DevTools by running `npm install -g mcdev` (prefix with `sudo` on MacOS)
- If you get an error, please see the below troubleshooting section.

When completed run `mcdev --version` and it will show you which version you installed (e.g. `4.1.1`).
When completed run `mcdev --version` and it will show you which version you installed (e.g. `4.1.2`).

> **_Side note for proud nerds_:**
>
Expand All @@ -146,7 +146,7 @@ After the successful installation, you will now need to setup the connection to
5. Make sure you grant all available rights.
6. Go to the access tab and grant it access to all Business Units that you want to use it for, but ensure that the Parent/Global Business Unit is among these.
- _Why?_ Shared Data Extensions, roles, users, Business Unit info and some other metadata is internally stored solely on the parent Business Unit and hence can only be retrieved and updated via that BU.
7. Note down _EID_ (Parent MID), _Client Id_, _Client Secret_ and _Authentication Base URI_.
7. Note down _EID_ (Parent MID), _Client Id_, _Client Secret_ and _Authentication Base URI_.
2. In your project folder
1. Open a CLI in your project folder (e.g. `C:\repos\MyProject\` on Windows or `~/repos/MyProject/` on Mac)
2. Run `mcdev init` to start the interactive setup wizard.
Expand Down Expand Up @@ -277,10 +277,10 @@ _Note: Regardless of which tag or branch you install_
**Install specific version (using a version tag on npm):**

```bash
npm install -g mcdev@4.1.1
npm install -g mcdev@4.1.2
```

**Warning**: When you used the above method to install Accenture SFMC DevTools for a specific version or tag, trying to [update Accenture SFMC DevTools](#updating-mcdev) might not download the most recently published official version but instead stay on the version or branch you previously selected (in the above examples: develop, 4.1.1)!
**Warning**: When you used the above method to install Accenture SFMC DevTools for a specific version or tag, trying to [update Accenture SFMC DevTools](#updating-mcdev) might not download the most recently published official version but instead stay on the version or branch you previously selected (in the above examples: develop, 4.1.2)!

> **Note**: The version is currently _not_ updated on the developer branch until a new release is published. Hence, you will not see a change if you run `mcdev --version`.
Expand Down Expand Up @@ -407,7 +407,7 @@ The following metadata types are currently supported:
| List | `list` | Yes | in backlog | - | Yes | Old way of storing data. Still used for central Email Subscriber DB. |
| Mobile Connect Code | `mobileCode` | Yes | No | No | - | Mobile Connect Shore or Long Codes used for sending. First 50 per BU are retrieved |
| Mobile Connect Keyword | `mobileKeyword` | Yes | Yes | Yes | - | Mobile Connect keywords configured within the Business UNit. First 50 per BU are retrieved |
| Role | `role` | Yes | Yes | yes (`bt`) | Yes | User Roles define groups that are used to grant users access to SFMC systems. |
| Role | `role` | Yes | Yes | yes (`bt`) | Yes | User Roles define groups that are used to grant users access to SFMC systems. |
| Triggered Send | `triggeredSendDefinition` | Yes | Yes | - | Yes | **DEPRECATED**: Sends emails via API or DataExtension Event. |
| User | `accountUser` | Yes | in backlog | - | - | Users and Installed Packages including their assigned Roles, BUs and personal permissions |

Expand Down Expand Up @@ -478,7 +478,6 @@ Example url: `https://mcg123abcysykllg-0321cbs8bbt64.auth.marketingcloudapis.com
> ```bash
> mcdev init --y.credentialsName "yourCustomCredentialName" --y.client_id "yourClientIdHere" --y.client_secret "yourClientSecretHere" --y.auth_url "https://yourTenantSubdomainHere.auth.marketingcloudapis.com/" --y.gitRemoteUrl "https://my.git.server.com/myrepo.git" --y.account_id 00000000
> ```
>
#### 6.1.2. upgrade
Expand Down Expand Up @@ -753,13 +752,13 @@ Deletes the given metadata from your server. This needs to be run with care as a
Currently supported types:
| Name | CLI Argument |
| -------------- | --------------- |
| Data Extension | `dataExtension` |
| Data Extension Field | `dataExtensionField` |
| Email Send Definition | `Email Send Definition` |
| List | `list` |
| Triggered Send | `triggeredSendDefinition` |
| Name | CLI Argument |
| --------------------- | ------------------------- |
| Data Extension | `dataExtension` |
| Data Extension Field | `dataExtensionField` |
| Email Send Definition | `Email Send Definition` |
| List | `list` |
| Triggered Send | `triggeredSendDefinition` |
_Example:_
Expand Down Expand Up @@ -1103,13 +1102,13 @@ The central config in `.mcdevrc.json` holds multiple adjustable settings:
| options.deployment.sourceTargetMapping | `{"deployment-source": "deployment-target"}` | Configuration of 1 or many source-target marketList combos for `mcdev createDeltaPkg` |
| options.deployment.targetBranchBuMapping | `{"release/*": "...","master": ["..."]}` | Can be used by CI/CD pipelines to know what BUs shall be deployed to upon a merge into one of the specified branches |
| options.documentType | 'md' | Defines the format for documentation ('md', 'html', 'both') |
| options.documentStandardRoles | false | Optionally skip standard role documentation by setting to false |
| options.documentStandardRoles | false | Optionally skip standard role documentation by setting to false |
| options.exclude.`type`.`field` | [] | Allows you to filter out metadata on retrieve based on their field values, e.g. CustomerKey (previously `options.filter`) |
| options.include.`type`.`field` | [] | Allows you to filter out metadata on retrieve based on their field values, e.g. CustomerKey |
| options.serverTimeOffset | -6 | Used to work around quirks in how SFMC handles timezones; For stack4: set to -7 (US Mountain time); others: -6 (US Central) |
| directories.businessUnits | 'businessUnits/' | Directory to save BU base details in |
| directories.deploy | 'deploy/' | Where `deploy` searches for files to deploy |
| directories.docs | 'docs/' | Directory for `document` output |
| directories.docs | 'docs/' | Directory for `document` output |
| directories.retrieve | 'retrieve/' | Where `retrieve` stores downloaded files |
| directories.template | 'template/' | Where `rt` stores downloaded templates & `bd` retrieves them from |
| directories.templateBuilds | ['retrieve/','deploy/'] | Where `bd` saves final deployment versions in. This can hold multiple directories, e.g. ['retrieve/','deploy/'] |
Expand All @@ -1126,8 +1125,8 @@ The central config in `.mcdevrc.json` holds multiple adjustable settings:
The way retention policy is saved is a bit misleading and hence we wanted to provide a bit of guidance if you ever need to do a deep dive here.
| Field | Description | Values |
| ------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------- |
| Field | Description | Values |
| ------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------- | ------------ |
| **DataRetentionPeriod** | this field should print the value of the unit of measure but it unfortunately is off by one (e.g. showing "weeks" instead of "months"). Also, it seems to have no impact on what's stored.<br> We therefore excluded it from retrieve/deploy | - |
| **DataRetentionPeriodUnitOfMeasure** | represents drop down for "period after" selection | 6: years<br>5: months<br>4: weeks<br>2: days |
| **DataRetentionPeriodLength** | represents number field for "period after" selection | min: 1<br>max: 999 |
Expand Down Expand Up @@ -1494,7 +1493,7 @@ Assuming you cloned Accenture SFMC DevTools into `C:\repos\sfmc-devtools\` (or `
This should tell npm to create a symlink to your cloned local directoty, allowing you to see updates you make in your mcdev repo instantly.
To test your new **global** developer setup, run `mcdev --version` in CLI which should return the current version (e.g. `4.1.1`). Then, go into your mcdev repo and update the version with the suffix `-dev`, e.g. to `4.1.1-dev` and then run `mcdev --version` again to verify that your change propagates instantly.
To test your new **global** developer setup, run `mcdev --version` in CLI which should return the current version (e.g. `4.1.2`). Then, go into your mcdev repo and update the version with the suffix `-dev`, e.g. to `4.1.2-dev` and then run `mcdev --version` again to verify that your change propagates instantly.
> **Not recommended:** Alternatively, you can install it locally only by opening a terminal in your project directory and executing `npm install --save-dev "C:\repos\sfmc-devtools"`
> To run the local version you need to prepend "npx" before your commands, e.g. `npx mcdev --version`
Expand Down Expand Up @@ -1532,7 +1531,7 @@ The following explains how you _could_ install it locally for certain edge cases
4. Afterwards, install Accenture SFMC DevTools by running `npm install --save-dev mcdev`
- If you get an error, please see the below troubleshooting section.
When completed run `mcdev --version` and it will show you which version you installed (e.g. `4.1.1`).
When completed run `mcdev --version` and it will show you which version you installed (e.g. `4.1.2`).
### 9.3. NPM Scripts
Expand Down
7 changes: 5 additions & 2 deletions lib/metadataTypes/Query.js
Original file line number Diff line number Diff line change
Expand Up @@ -260,17 +260,20 @@ class Query extends MetadataType {
const targetDirArr = Array.isArray(targetDir) ? targetDir : [targetDir];
const nestedFilePaths = [];

// keep old name if creating templates, otherwise use new name
const fileName = mode === 'definition' ? metadata[this.definition.keyField] : templateName;

for (const targetDir of targetDirArr) {
File.writeToFile(
[targetDir, this.definition.type],
templateName + '.' + this.definition.type + '-meta',
fileName + '.' + this.definition.type + '-meta',
'sql',
code
);
nestedFilePaths.push([
targetDir,
this.definition.type,
templateName + '.' + this.definition.type + '-meta.sql',
fileName + '.' + this.definition.type + '-meta.sql',
]);
}
return nestedFilePaths;
Expand Down
7 changes: 5 additions & 2 deletions lib/metadataTypes/Script.js
Original file line number Diff line number Diff line change
Expand Up @@ -234,17 +234,20 @@ class Script extends MetadataType {
const targetDirArr = Array.isArray(targetDir) ? targetDir : [targetDir];
const nestedFilePaths = [];

// keep old name if creating templates, otherwise use new name
const fileName = mode === 'definition' ? metadata[this.definition.keyField] : templateName;

for (const targetDir of targetDirArr) {
File.writeToFile(
[targetDir, this.definition.type],
templateName + '.' + this.definition.type + '-meta',
fileName + '.' + this.definition.type + '-meta',
'ssjs',
code
);
nestedFilePaths.push([
targetDir,
this.definition.type,
templateName + '.' + this.definition.type + '-meta.ssjs',
fileName + '.' + this.definition.type + '-meta.ssjs',
]);
}
return nestedFilePaths;
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "mcdev",
"version": "4.1.1",
"version": "4.1.2",
"description": "Accenture Salesforce Marketing Cloud DevTools",
"author": "joern.berkefeld, douglas.midgley, robert.zimmermann, maciej.barnas",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion test/mockRoot/.mcdevrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,5 +63,5 @@
"triggeredSendDefinition"
]
},
"version": "4.1.1"
"version": "4.1.2"
}

0 comments on commit db211c7

Please sign in to comment.