@factorialco/gat 0.0.17 → 0.0.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/workflow.js +10 -0
  2. package/package.json +1 -1
package/dist/workflow.js CHANGED
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.Workflow = void 0;
7
7
  const js_yaml_1 = require("js-yaml");
8
8
  const kebabCase_1 = __importDefault(require("lodash/kebabCase"));
9
+ const lodash_1 = require("lodash");
9
10
  const DEFAULT_RUNNERS = ["ubuntu-22.04"];
10
11
  class Workflow {
11
12
  constructor(name) {
@@ -95,6 +96,15 @@ class Workflow {
95
96
  noRefs: true,
96
97
  lineWidth: 200,
97
98
  noCompatMode: true,
99
+ replacer: (_, value) => {
100
+ if (typeof value === "string") {
101
+ if (value.startsWith("\n")) {
102
+ return (0, lodash_1.compact)(value.split("\n").map((str) => (0, lodash_1.trim)(str))).join("\n");
103
+ }
104
+ return value;
105
+ }
106
+ return value;
107
+ },
98
108
  })}`;
99
109
  console.log(compiled);
100
110
  return compiled;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@factorialco/gat",
3
- "version": "0.0.17",
3
+ "version": "0.0.18",
4
4
  "description": "TODO",
5
5
  "bin": {
6
6
  "gat": "dist/cli.js"