npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

metadata-xml-tool

v0.1.1

Published

CLI tool for processing Salesforce Metadata XML files

Downloads

1,055

Readme

metadata-xml-tool

CLI tool for processing Salesforce Metadata XML files

Build Status

Installation

$ npm install -g metadata-xml-tool

Usage

metadata-xml-tool.

Usage:
        metadata-xml-tool [options] <command>

Commands:
        remove-element <element> [file]...
        remove-element-matching <element> <expression> [file]...
        replace-tag-value <tag> <expression> <new_value> [file]...

Options:
        -h --help       Show help

Examples

$ metadata-xml-tool remove-element validationRules src/objects/Account.object

diff --git a/src/objects/Account.object b/src/objects/Account.object
index 9324e0b..3b2a9ff 100644
--- a/src/objects/Account.object
+++ b/src/objects/Account.object
@@ -478,23 +478,6 @@
         <searchResultsAdditionalFields>CORE.USERS.ALIAS</searchResultsAdditionalFields>
     </searchLayouts>
     <sharingModel>ReadWrite</sharingModel>
-    <validationRules>
-        <fullName>VAT_Number_10</fullName>
-        <active>true</active>
-        <errorConditionFormula>LEN(VAT_Number__c) &lt; 10</errorConditionFormula>
-        <errorDisplayField>VAT_Number__c</errorDisplayField>
-        <errorMessage>VAT Number must be 10 characters</errorMessage>
-    </validationRules>
-    <validationRules>
-        <fullName>Test_Min_5_Max_10</fullName>
-        <active>true</active>
-        <errorConditionFormula>OR(
-            LEN(Test__c) &lt; 5,
-            LEN(Test__c) &gt; 10
-        )</errorConditionFormula>
-        <errorDisplayField>Test__c</errorDisplayField>
-        <errorMessage>Test__c should be between 5 and 10 characters long</errorMessage>
-    </validationRules>
     <webLinks>
         <fullName>AltavistaNews</fullName>
         <availability>online</availability>

$ metadata-xml-tool remove-element-matching listViews "<fullName>Ideas_Last_7_Days</fullName>" src/objects/Idea.object

diff --git a/src/objects/Idea.object b/src/objects/Idea.object
index 7a272cf..e2c9c0d 100644
--- a/src/objects/Idea.object
+++ b/src/objects/Idea.object
@@ -32,25 +32,6 @@
         </picklist>
         <type>Picklist</type>
     </fields>
-    <listViews>
-        <fullName>Ideas_Last_7_Days</fullName>
-        <columns>IDEA.CREATED_DATE</columns>
-        <columns>IDEA.TITLE</columns>
-        <columns>IDEA.CREATED_BY_NICKNAME</columns>
-        <columns>VOTE_STATS.WEIGHTED_SUM</columns>
-        <columns>IDEA.NUM_COMMENTS</columns>
-        <columns>IDEA.STATUS</columns>
-        <columns>IDEA.CATEGORIES</columns>
-        <columns>COMMUNITY.NAME</columns>
-        <columns>IDEA.IDEA_THEME</columns>
-        <filterScope>Everything</filterScope>
-        <filters>
-            <field>IDEA.CREATED_DATE</field>
-            <operation>equals</operation>
-            <value>LAST_N_DAYS:7</value>
-        </filters>
-        <label>Last 7 Days</label>
-    </listViews>
     <recordTypes>
         <fullName>InternalIdeasIdeaRecordType</fullName>
         <active>true</active>

$ metadata-xml-tool remove-element-matching userPermissions "<name>ManageEncryptionKeys</name>" src/profiles/Admin.profile

diff --git a/src/profiles/Admin.profile b/src/profiles/Admin.profile
index e7939c7..33ca7e1 100644
--- a/src/profiles/Admin.profile
+++ b/src/profiles/Admin.profile
@@ -2596,8 +2596,4 @@
         <enabled>true</enabled>
         <name>ViewSetup</name>
     </userPermissions>
-    <userPermissions>
-        <enabled>true</enabled>
-        <name>ManageEncryptionKeys</name>
-    </userPermissions>
 </Profile>

$ metadata-xml-tool replace-tag-value runningUser ".*" "[email protected]" src/dashboards/CompanyDashboards/AdoptionDashboard.dashboard

diff --git a/src/dashboards/CompanyDashboards/AdoptionDashboard.dashboard b/src/dashboards/CompanyDashboards/AdoptionDashboard.dashboard
index 916f693..7c3c3ef 100644
--- a/src/dashboards/CompanyDashboards/AdoptionDashboard.dashboard
+++ b/src/dashboards/CompanyDashboards/AdoptionDashboard.dashboard
@@ -283,7 +283,7 @@
             <useReportChart>false</useReportChart>
         </components>
     </rightSection>
-    <runningUser>[email protected]</runningUser>
+    <runningUser>[email protected]</runningUser>
     <textColor>#000000</textColor>
     <title>Adoption Dashboard</title>
     <titleColor>#000099</titleColor>

Sponsors

License

MIT © Matthias Rolke