Skip to content

Commit

Permalink
Merge pull request #82 from nvuillam/features/doc
Browse files Browse the repository at this point in the history
Automate documentation generation
  • Loading branch information
FabienTaillon authored Nov 19, 2021
2 parents 631261a + abc8610 commit 01f042f
Show file tree
Hide file tree
Showing 26 changed files with 747 additions and 1 deletion.
28 changes: 28 additions & 0 deletions .github/workflows/build-deploy-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: "DOC - Build and deploy with sfdx-hardis"
on:
push:
branches:
- main
- master

jobs:
# Build & deploy docs
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
# Build doc with sfdx-hardis
- uses: actions/setup-node@v1
with:
node-version: "12.x"
- run: yarn
- run: yarn prepack
- run: npm i sfdx-cli -g
- run: echo y|sfdx plugins:install sfdx-hardis
- run: sfdx hardis:doc:plugin:generate
# Deploy docs with mkdocs-material
- uses: actions/setup-python@v2
with:
python-version: 3.x
- run: pip install mkdocs-material mdx_truly_sane_lists json-schema-for-humans
- run: mkdocs gh-deploy --force
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,5 @@ node_modules
.vscode
.DS_Store
.nyc_output
project-scratch-def.json
project-scratch-def.json
hardis-report/
67 changes: 67 additions & 0 deletions docs/commands.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# Commands

## texei:contractstatus

|Command|Title|
|:------|:----------|
|[**texei:contractstatus:value:add**](texei/contractstatus/value/add.md)|add a value to Contract Status picklist|

## texei:data

|Command|Title|
|:------|:----------|
|[**texei:data:export**](texei/data/export.md)|export objects' data from org|
|[**texei:data:import**](texei/data/import.md)|import objects' data to org|
|[**texei:data:plan:generate**](texei/data/plan/generate.md)|generate a data plan used to export objects' data from org|

## texei:org

|Command|Title|
|:------|:----------|
|[**texei:org:contractfieldhistory:fix**](texei/org/contractfieldhistory/fix.md)|fix Contract Field History Tracking that can't be deployed|
|[**texei:org:shape:extract**](texei/org/shape/extract.md)|[BETA] Extract Org Shape for an org|

## texei:package

|Command|Title|
|:------|:----------|
|[**texei:package:dependencies:install**](texei/package/dependencies/install.md)|install dependent Packages for a sfdx project|

## texei:profile

|Command|Title|
|:------|:----------|
|[**texei:profile:clean**](texei/profile/clean.md)|clean Profile by removing permissions stored on Permission Set|

## texei:sharedactivities

|Command|Title|
|:------|:----------|
|[**texei:sharedactivities:enable**](texei/sharedactivities/enable.md)|Enable Shared Activities|

## texei:sharingcalc

|Command|Title|
|:------|:----------|
|[**texei:sharingcalc:recalculate**](texei/sharingcalc/recalculate.md)|recalculate sharing rules|
|[**texei:sharingcalc:resume**](texei/sharingcalc/resume.md)|resumed sharing calculation|
|[**texei:sharingcalc:suspend**](texei/sharingcalc/suspend.md)|suspend sharing calculation|

## texei:skinnyprofile

|Command|Title|
|:------|:----------|
|[**texei:skinnyprofile:retrieve**](texei/skinnyprofile/retrieve.md)|export a skinny profile with just package-specific metadata|

## texei:source

|Command|Title|
|:------|:----------|
|[**texei:source:customlabel:replace**](texei/source/customlabel/replace.md)|replace custom label value|
|[**texei:source:layouts:cleanorg**](texei/source/layouts/cleanorg.md)|delete unused standard layouts from scratch org|

## texei:user

|Command|Title|
|:------|:----------|
|[**texei:user:update**](texei/user/update.md)|updates the current user of a scratch org|
91 changes: 91 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
<!-- This file has been generated with command 'sfdx hardis:doc:plugin:generate'. Please do not update it manually or it may be overwritten -->
texei-sfdx-plugin
=================

Texeï&#39;s plugin for sfdx

## Install Plugin

### Install as plugin

Install plugin: sfdx plugins:install texei-sfdx-plugin

### Install from source

Install the SDFX CLI.

Clone the repository: git clone https://github.com/texei/texei-sfdx-plugin.git

Install npm modules: npm install

Link the plugin: sfdx plugins:link .



## Commands

### texei:contractstatus

|Command|Title|
|:------|:----------|
|[**texei:contractstatus:value:add**](texei/contractstatus/value/add.md)|add a value to Contract Status picklist|

### texei:data

|Command|Title|
|:------|:----------|
|[**texei:data:export**](texei/data/export.md)|export objects' data from org|
|[**texei:data:import**](texei/data/import.md)|import objects' data to org|
|[**texei:data:plan:generate**](texei/data/plan/generate.md)|generate a data plan used to export objects' data from org|

### texei:org

|Command|Title|
|:------|:----------|
|[**texei:org:contractfieldhistory:fix**](texei/org/contractfieldhistory/fix.md)|fix Contract Field History Tracking that can't be deployed|
|[**texei:org:shape:extract**](texei/org/shape/extract.md)|[BETA] Extract Org Shape for an org|

### texei:package

|Command|Title|
|:------|:----------|
|[**texei:package:dependencies:install**](texei/package/dependencies/install.md)|install dependent Packages for a sfdx project|

### texei:profile

|Command|Title|
|:------|:----------|
|[**texei:profile:clean**](texei/profile/clean.md)|clean Profile by removing permissions stored on Permission Set|

### texei:sharedactivities

|Command|Title|
|:------|:----------|
|[**texei:sharedactivities:enable**](texei/sharedactivities/enable.md)|Enable Shared Activities|

### texei:sharingcalc

|Command|Title|
|:------|:----------|
|[**texei:sharingcalc:recalculate**](texei/sharingcalc/recalculate.md)|recalculate sharing rules|
|[**texei:sharingcalc:resume**](texei/sharingcalc/resume.md)|resumed sharing calculation|
|[**texei:sharingcalc:suspend**](texei/sharingcalc/suspend.md)|suspend sharing calculation|

### texei:skinnyprofile

|Command|Title|
|:------|:----------|
|[**texei:skinnyprofile:retrieve**](texei/skinnyprofile/retrieve.md)|export a skinny profile with just package-specific metadata|

### texei:source

|Command|Title|
|:------|:----------|
|[**texei:source:customlabel:replace**](texei/source/customlabel/replace.md)|replace custom label value|
|[**texei:source:layouts:cleanorg**](texei/source/layouts/cleanorg.md)|delete unused standard layouts from scratch org|

### texei:user

|Command|Title|
|:------|:----------|
|[**texei:user:update**](texei/user/update.md)|updates the current user of a scratch org|
27 changes: 27 additions & 0 deletions docs/javascripts/gtag.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
/*
location$.subscribe(function(url) {
window.dataLayer = window.dataLayer || [];
function gtag() {
dataLayer.push(arguments);
}
gtag("js", new Date());
gtag("config", "G-3DM50255LC");
});
*/
var gtag_id = "G-XXXXXXXXXX";

var script = document.createElement("script");
script.src = "https://www.googletagmanager.com/gtag/js?id=" + gtag_id;
document.head.appendChild(script);

location$.subscribe(function (url) {
window.dataLayer = window.dataLayer || [];

function gtag() {
dataLayer.push(arguments);
}

gtag("js", new Date());
gtag("config", gtag_id);
});
6 changes: 6 additions & 0 deletions docs/javascripts/tables.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
document$.subscribe(function () {
var tables = document.querySelectorAll("article table")
tables.forEach(function (table) {
new Tablesort(table)
})
})
1 change: 1 addition & 0 deletions docs/license.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
--8<-- "../LICENSE"
4 changes: 4 additions & 0 deletions docs/overrides/main.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{% extends "base.html" %}

<!-- Global site tag (gtag.js) - Google Analytics -->
<!-- <script async src="https://www.googletagmanager.com/gtag/js?id=G-3DM50255LC"></script> MOVED TO gtag.js -->
8 changes: 8 additions & 0 deletions docs/stylesheets/extra.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/* stylelint-disable SelectorFormat */
.md-typeset__table {
min-width: 100%;
}

.md-typeset table:not([class]) {
display: table;
}
26 changes: 26 additions & 0 deletions docs/texei/contractstatus/value/add.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<!-- This file has been generated with command 'sfdx hardis:doc:plugin:generate'. Please do not update it manually or it may be overwritten -->
# texei:contractstatus:value:add

## Description

add a value to Contract Status picklist

## Parameters

|Name|Type|Description|Default|Required|Options|
|:---|:--:|:----------|:-----:|:------:|:-----:|
|apiname<br/>-a|option|API Name of the Contract Status value to add||||
|apiversion|option|override the api version used for api requests made by this command||||
|json|boolean|format output as json||||
|label<br/>-l|option|label of the Contract Status value to add||||
|loglevel|option|logging level for this command invocation|warn||trace<br/>debug<br/>info<br/>warn<br/>error<br/>fatal|
|statuscategory<br/>-s|option|Status Category of the Contract Status value to add|Draft||Draft<br/>Activated<br/>InApprovalProcess|
|targetusername<br/>-u|option|username or alias for the target org; overrides default target org||||

## Examples

```shell
sfdx texei:contractstatus:value:add --label 'My New Contract Status Label' --apiname 'My New Contract Status API Name' --targetusername texei
```


30 changes: 30 additions & 0 deletions docs/texei/data/export.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<!-- This file has been generated with command 'sfdx hardis:doc:plugin:generate'. Please do not update it manually or it may be overwritten -->
# texei:data:export

## Description

export objects' data from org

## Parameters

|Name|Type|Description|Default|Required|Options|
|:---|:--:|:----------|:-----:|:------:|:-----:|
|apiversion|option|override the api version used for api requests made by this command||||
|dataplan<br/>-p|option|path to data plan file||||
|json|boolean|format output as json||||
|loglevel|option|logging level for this command invocation|warn||trace<br/>debug<br/>info<br/>warn<br/>error<br/>fatal|
|objects<br/>-o|option|comma-separated list of objects to export||||
|outputdir<br/>-d|option|directory where to store files||||
|targetusername<br/>-u|option|username or alias for the target org; overrides default target org||||

## Examples

```shell
sfdx texei:data:export --objects Account,Contact,MyCustomObject__c --outputdir ./data --targetusername texei
```

```shell
sfdx texei:data:export --dataplan ./data/data-plan.json --outputdir ./data --targetusername texei
```


27 changes: 27 additions & 0 deletions docs/texei/data/import.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<!-- This file has been generated with command 'sfdx hardis:doc:plugin:generate'. Please do not update it manually or it may be overwritten -->
# texei:data:import

## Description

import objects' data to org

## Parameters

|Name|Type|Description|Default|Required|Options|
|:---|:--:|:----------|:-----:|:------:|:-----:|
|allornone<br/>-a|boolean|any failed records in a call cause all changes for the call to be rolled back||||
|apiversion|option|override the api version used for api requests made by this command||||
|inputdir<br/>-d|option|directory with files to import||||
|json|boolean|format output as json||||
|loglevel|option|logging level for this command invocation|warn||trace<br/>debug<br/>info<br/>warn<br/>error<br/>fatal|
|targetusername<br/>-u|option|username or alias for the target org; overrides default target org||||

## Examples

```shell
$ sfdx texei:data:import --inputdir ./data --targetusername texei-scratch
Data imported!

```


23 changes: 23 additions & 0 deletions docs/texei/data/plan/generate.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<!-- This file has been generated with command 'sfdx hardis:doc:plugin:generate'. Please do not update it manually or it may be overwritten -->
# texei:data:plan:generate

## Description

generate a data plan used to export objects' data from org

## Parameters

|Name|Type|Description|Default|Required|Options|
|:---|:--:|:----------|:-----:|:------:|:-----:|
|json|boolean|format output as json||||
|loglevel|option|logging level for this command invocation|warn||trace<br/>debug<br/>info<br/>warn<br/>error<br/>fatal|
|objects<br/>-o|option|comma-separated list of objects to add to the data plan||||
|outputdir<br/>-d|option|directory where to store the data plan file||||

## Examples

```shell
$ sfdx texei:data:plan:generate --objects Account,Contact,MyCustomObject__c --outputdir ./data
```


25 changes: 25 additions & 0 deletions docs/texei/org/contractfieldhistory/fix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<!-- This file has been generated with command 'sfdx hardis:doc:plugin:generate'. Please do not update it manually or it may be overwritten -->
# texei:org:contractfieldhistory:fix

## Description

fix Contract Field History Tracking that can't be deployed

## Parameters

|Name|Type|Description|Default|Required|Options|
|:---|:--:|:----------|:-----:|:------:|:-----:|
|apiversion|option|override the api version used for api requests made by this command||||
|json|boolean|format output as json||||
|loglevel|option|logging level for this command invocation|warn||trace<br/>debug<br/>info<br/>warn<br/>error<br/>fatal|
|targetusername<br/>-u|option|username or alias for the target org; overrides default target org||||

## Examples

```shell
$ sfdx texei:org:contractfieldhistory:fix"
History tracking fixed.
```
Loading

0 comments on commit 01f042f

Please sign in to comment.