Skip to content

Black Friday

Annual Pro is $90 for the first year, normally $120. Or start monthly at $6 for two months, then $12.

Ends Dec 4, 11:59 PM PT.

Create an account
← Public packages

@brandontroberts/sync-fork

Automatically sync forked Kody community packages with upstream in Kody Cloud using Graft's repo-mode fork mechanism.

FollowFork

Files

package.json

98 lines · 2.8 KB · JSON
{
  "name": "@brandontroberts/sync-fork",
  "version": "0.2.0",
  "private": true,
  "type": "module",
  "description": "Kody package: keep forked Kody community packages in sync with upstream using Graft.",
  "license": "MIT",
  "exports": {
    ".": "./src/index.ts",
    "./on-upstream-updated": "./src/on-upstream-updated.ts",
    "./sync-on-context": "./src/sync-on-context.ts",
    "./emit-sync-completed": "./src/emit-sync-completed.ts"
  },
  "dependencies": {
    "@graftsync/spec": "^0.3.6",
    "diff": "^9.0.0",
    "pako": "^3.0.3",
    "semver": "^7.7.0"
  },
  "kody": {
    "description": "Automatically sync forked Kody community packages with upstream in Kody Cloud using Graft's repo-mode fork mechanism.",
    "capabilities": [
      "packageGet",
      "packageGetGitRemote",
      "packagePublishExternalPush"
    ],
    "subscriptions": {
      "community.fork.upstream_updated": {
        "handler": "./src/on-upstream-updated.ts",
        "description": "Run Graft repo-mode fork sync in Kody Cloud (or delegate to your Execution Context when testCommand/agentCommand is configured) when an upstream community listing republishes."
      }
    },
    "emits": {
      "@brandontroberts/sync-fork.completed": {
        "description": "Emitted after Graft finishes checking or syncing a forked Kody package against a new upstream commit.",
        "payloadSchema": {
          "type": "object",
          "properties": {
            "runId": {
              "type": "string",
              "minLength": 1
            },
            "fork": {
              "type": "string",
              "minLength": 1
            },
            "upstream": {
              "type": "string",
              "minLength": 1
            },
            "fromCommit": {
              "type": "string"
            },
            "toCommit": {
              "type": "string",
              "minLength": 1
            },
            "outcome": {
              "type": "string",
              "enum": [
                "green",
                "needs-agent",
                "skipped-no-graft",
                "error"
              ]
            },
            "branch": {
              "type": "string"
            },
            "conflicts": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "agentRan": {
              "type": "boolean"
            },
            "publishStatus": {
              "type": "string"
            },
            "approvalUrl": {
              "type": "string"
            }
          },
          "required": [
            "runId",
            "fork",
            "upstream",
            "toCommit",
            "outcome"
          ],
          "additionalProperties": false
        }
      }
    }
  }
}