1.3.115 • Published 7 months ago

@jayree/sfdx-plugin-source v1.3.115

Weekly downloads
-
License
BSD-3-Clause
Repository
github
Last release
7 months ago

@jayree/sfdx-plugin-source

A Salesforce CLI plugin containing commands to generate and compare sfdx source snapshot files.

sfdx NPM test-and-release Downloads/week License

Install

sfdx plugins:install @jayree/sfdx-plugin-source

Commands

sfdx jayree project compare snapshot

Compare sfdx source snapshot files.

USAGE
  $ sfdx jayree project compare snapshot [--json] [--flags-dir <value>] [--filepath <value>]

FLAGS
  --filepath=<value>  [default: ./sfdx-source-snapshot.json] Path of the generated snapshot file.

GLOBAL FLAGS
  --flags-dir=<value>  Import flag values from a directory.
  --json               Format output as json.

ALIASES
  $ sfdx jayree source snapshot compare

See code: src/commands/jayree/project/compare/snapshot.ts

sfdx jayree project fix

Fix retrieved metadata.

USAGE
  $ sfdx jayree project fix [--json] [--flags-dir <value>] [-o <value>] [-t <value>...]

FLAGS
  -o, --target-org=<value>  Username or alias of the target org.
  -t, --task=<value>...     Task name(s) listed in sfdx-project.json.

GLOBAL FLAGS
  --flags-dir=<value>  Import flag values from a directory.
  --json               Format output as json.

ALIASES
  $ sfdx jayree source fix

See code: src/commands/jayree/project/fix.ts

sfdx jayree project generate snapshot

Generate sfdx source snapshot files.

USAGE
  $ sfdx jayree project generate snapshot [--json] [--flags-dir <value>] [--filepath <value>]

FLAGS
  --filepath=<value>  [default: ./sfdx-source-snapshot.json] Path to save the generated snapshot file.

GLOBAL FLAGS
  --flags-dir=<value>  Import flag values from a directory.
  --json               Format output as json.

ALIASES
  $ sfdx jayree source snapshot generate

See code: src/commands/jayree/project/generate/snapshot.ts

sfdx jayree project list tracking

List changes in a scratch org by remote revision counter number.

USAGE
  $ sfdx jayree project list tracking -o <value> [--json] [--flags-dir <value>] [--api-version <value>] [-r <value>]

FLAGS
  -o, --target-org=<value>   (required) Username or alias of the target org. Not required if the `target-org`
                             configuration variable is already set.
  -r, --revision=<value>     Start at a specific revision counter number.
      --api-version=<value>  Override the api version used for api requests made by this command

GLOBAL FLAGS
  --flags-dir=<value>  Import flag values from a directory.
  --json               Format output as json.

ALIASES
  $ sfdx jayree source tracking list

EXAMPLES
  $ sfdx jayree:source:tracking:list
  $ sfdx jayree:source:tracking:list -u me@my.org
  $ sfdx jayree:source:tracking:list -u me@my.org -r 101

See code: src/commands/jayree/project/list/tracking.ts

sfdx jayree project store tracking get

Get stored revision counter number.

USAGE
  $ sfdx jayree project store tracking get -o <value> [--json] [--flags-dir <value>]

FLAGS
  -o, --target-org=<value>  (required) Username or alias of the target org. Not required if the `target-org`
                            configuration variable is already set.

GLOBAL FLAGS
  --flags-dir=<value>  Import flag values from a directory.
  --json               Format output as json.

ALIASES
  $ sfdx jayree source tracking store get

EXAMPLES
  $ sfdx jayree:source:tracking:store:get
  $ sfdx jayree:source:tracking:store:get -u me@my.org

See code: src/commands/jayree/project/store/tracking/get.ts

sfdx jayree project store tracking set

Store revision counter number.

USAGE
  $ sfdx jayree project store tracking set -o <value> [--json] [--flags-dir <value>] [--api-version <value>] [-r
  <value>]

FLAGS
  -o, --target-org=<value>   (required) Username or alias of the target org. Not required if the `target-org`
                             configuration variable is already set.
  -r, --revision=<value>     Revision counter number (default: remote revision counter number).
      --api-version=<value>  Override the api version used for api requests made by this command

GLOBAL FLAGS
  --flags-dir=<value>  Import flag values from a directory.
  --json               Format output as json.

ALIASES
  $ sfdx jayree source tracking store set

EXAMPLES
  $ sfdx jayree:source:tracking:store:set
  $ sfdx jayree:source:tracking:store:set -u me@my.org
  $ sfdx jayree:source:tracking:store:set -u MyTestOrg1 -r 101

See code: src/commands/jayree/project/store/tracking/set.ts

Hooks

prerun

  • Resets source tracking using force:source:tracking:reset before executing force:source:pull or project:retrieve:start.

IMPORTANT: This hook will only run if SFDX_ENABLE_JAYREE_HOOKS_RESET_BEFORE_PULL=true is set. It uses the stored serverMaxRevisionCounter as revision counter number (see: jayree:source:tracking:store:set). If the hook doesn't find a stored value it asks if the current local revision counter number should be stored and used.

scopedPreRetrieve

scopedPostRetrieve (plugin-source plugin) / postsourceupdate (legacy salesforce-alm plugin)

  • Applies source fixes of the jayree project fix command, deletes and moves source files to separate package directories. See the configuration file sfdx-project.json for examples. Set "isActive": true,´ to apply this fix duringscopedPostRetrieve` hook.

IMPORTANT: Since the hook is not able to update the (JSON) output of the command, an additional output is generated. Set the environment variable SFDX_ENABLE_JAYREE_HOOKS_JSON_OUTPUT=true and additional comma-separated JSON output will be appended, where the output must be parsed as an array, e.g. JSON.parse(`[${stdout}]`). See an example below:

import execa from "execa";
import { CliUx } from "@oclif/core";

async function run() {
  const { stdout } = await execa("sfdx", [
    "force:source:retrieve",
    "--metadata",
    "Group:*",
    "--json"
  ]);
  const parsedStdout = JSON.parse(`[${stdout}]`);
  CliUx.ux.styledJSON(
    parsedStdout.length > 1
      ? {
          ...parsedStdout[0],
          result: {
            ...parsedStdout[0].result,
            fixedFiles: parsedStdout[1].fixedFiles
          }
        }
      : parsedStdout[0]
  );
}

run();
1.3.102

10 months ago

1.3.101

11 months ago

1.3.100

11 months ago

1.3.106

9 months ago

1.3.105

10 months ago

1.3.104

10 months ago

1.3.103

10 months ago

1.3.109

8 months ago

1.3.108

8 months ago

1.3.107

9 months ago

1.3.113

8 months ago

1.3.112

8 months ago

1.3.111

8 months ago

1.3.110

8 months ago

1.3.115

7 months ago

1.3.114

8 months ago

1.3.90

1 year ago

1.3.93

1 year ago

1.3.94

12 months ago

1.3.91

1 year ago

1.3.92

1 year ago

1.3.97

11 months ago

1.3.98

11 months ago

1.3.95

12 months ago

1.3.96

12 months ago

1.3.99

11 months ago

1.3.86

1 year ago

1.3.87

1 year ago

1.3.84

1 year ago

1.3.85

1 year ago

1.3.88

1 year ago

1.3.89

1 year ago

1.3.83

1 year ago

1.3.82

1 year ago

1.3.81

1 year ago

1.3.79

1 year ago

1.3.78

1 year ago

1.3.80

1 year ago

1.3.75

1 year ago

1.3.76

1 year ago

1.3.74

1 year ago

1.3.77

1 year ago

1.3.58

2 years ago

1.3.59

2 years ago

1.3.60

2 years ago

1.3.61

2 years ago

1.3.64

2 years ago

1.3.65

2 years ago

1.3.62

2 years ago

1.3.63

2 years ago

1.3.68

1 year ago

1.3.69

1 year ago

1.3.66

2 years ago

1.3.67

2 years ago

1.3.71

1 year ago

1.3.72

1 year ago

1.3.70

1 year ago

1.3.73

1 year ago

1.3.57

2 years ago

1.3.56

2 years ago

1.3.55

2 years ago

1.3.54

2 years ago

1.3.53

2 years ago

1.3.52

2 years ago

1.3.51

2 years ago

1.3.50

2 years ago

1.3.49

2 years ago

1.3.48

2 years ago

1.3.47

2 years ago

1.3.46

2 years ago

1.3.45

2 years ago

1.3.44

2 years ago

1.3.43

2 years ago

1.3.42

2 years ago

1.3.41

2 years ago

1.3.40

2 years ago

1.3.39

2 years ago

1.3.38

2 years ago

1.3.37

2 years ago

1.3.36

2 years ago

1.3.35

2 years ago

1.3.34

2 years ago

1.3.33

2 years ago

1.3.32

2 years ago

1.3.31

2 years ago

1.3.30

2 years ago

1.3.7

3 years ago

1.3.10

2 years ago

1.3.13

2 years ago

1.3.14

2 years ago

1.3.11

2 years ago

1.3.12

2 years ago

1.3.17

2 years ago

1.3.18

2 years ago

1.3.15

2 years ago

1.3.16

2 years ago

1.3.19

2 years ago

1.3.20

2 years ago

1.3.21

2 years ago

1.3.9

2 years ago

1.3.8

3 years ago

1.3.24

2 years ago

1.3.25

2 years ago

1.3.22

2 years ago

1.3.23

2 years ago

1.3.28

2 years ago

1.3.29

2 years ago

1.3.26

2 years ago

1.3.27

2 years ago

1.3.6

3 years ago

1.2.0

3 years ago

1.3.5

3 years ago

1.3.4

3 years ago

1.3.3

3 years ago

1.2.4

3 years ago

1.3.2

3 years ago

1.2.3

3 years ago

1.3.1

3 years ago

1.2.2

3 years ago

1.3.0

3 years ago

1.2.1

3 years ago

1.1.2

3 years ago

1.1.1

3 years ago

1.1.0

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago