tinacms-gitprovider-github 0.0.0-f696c7d-20241104134240 → 0.0.0-f894432-20251221235528

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/index.js +8 -30
  2. package/package.json +7 -7
package/dist/index.js CHANGED
@@ -1,29 +1,6 @@
1
- var __defProp = Object.defineProperty;
2
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
- var __getOwnPropNames = Object.getOwnPropertyNames;
4
- var __hasOwnProp = Object.prototype.hasOwnProperty;
5
- var __export = (target, all) => {
6
- for (var name in all)
7
- __defProp(target, name, { get: all[name], enumerable: true });
8
- };
9
- var __copyProps = (to, from, except, desc) => {
10
- if (from && typeof from === "object" || typeof from === "function") {
11
- for (let key of __getOwnPropNames(from))
12
- if (!__hasOwnProp.call(to, key) && key !== except)
13
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
- }
15
- return to;
16
- };
17
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
-
19
1
  // src/index.ts
20
- var src_exports = {};
21
- __export(src_exports, {
22
- GitHubProvider: () => GitHubProvider
23
- });
24
- module.exports = __toCommonJS(src_exports);
25
- var import_rest = require("@octokit/rest");
26
- var import_js_base64 = require("js-base64");
2
+ import { Octokit } from "@octokit/rest";
3
+ import { Base64 } from "js-base64";
27
4
  var GitHubProvider = class {
28
5
  constructor(args) {
29
6
  this.owner = args.owner;
@@ -31,7 +8,7 @@ var GitHubProvider = class {
31
8
  this.branch = args.branch;
32
9
  this.commitMessage = args.commitMessage;
33
10
  this.rootPath = args.rootPath;
34
- this.octokit = new import_rest.Octokit({
11
+ this.octokit = new Octokit({
35
12
  auth: args.token,
36
13
  ...args.octokitOptions || {}
37
14
  });
@@ -41,6 +18,7 @@ var GitHubProvider = class {
41
18
  const path = this.rootPath ? `${this.rootPath}/${key}` : key;
42
19
  try {
43
20
  const {
21
+ // @ts-ignore
44
22
  data: { sha: existingSha }
45
23
  } = await this.octokit.repos.getContent({
46
24
  owner: this.owner,
@@ -56,7 +34,7 @@ var GitHubProvider = class {
56
34
  repo: this.repo,
57
35
  path,
58
36
  message: this.commitMessage || "Edited with TinaCMS",
59
- content: import_js_base64.Base64.encode(value),
37
+ content: Base64.encode(value),
60
38
  branch: this.branch,
61
39
  sha
62
40
  });
@@ -66,6 +44,7 @@ var GitHubProvider = class {
66
44
  const path = this.rootPath ? `${this.rootPath}/${key}` : key;
67
45
  try {
68
46
  const {
47
+ // @ts-ignore
69
48
  data: { sha: existingSha }
70
49
  } = await this.octokit.repos.getContent({
71
50
  owner: this.owner,
@@ -92,7 +71,6 @@ var GitHubProvider = class {
92
71
  }
93
72
  }
94
73
  };
95
- // Annotate the CommonJS export names for ESM import in node:
96
- 0 && (module.exports = {
74
+ export {
97
75
  GitHubProvider
98
- });
76
+ };
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "tinacms-gitprovider-github",
3
- "version": "0.0.0-f696c7d-20241104134240",
3
+ "version": "0.0.0-f894432-20251221235528",
4
4
  "main": "dist/index.js",
5
- "module": "dist/index.mjs",
5
+ "module": "./dist/index.js",
6
6
  "files": [
7
7
  "dist"
8
8
  ],
@@ -19,15 +19,15 @@
19
19
  "dependencies": {
20
20
  "@octokit/rest": "^19.0.13",
21
21
  "js-base64": "^3.7.7",
22
- "typescript": "^5.6.2"
22
+ "typescript": "^5.7.3"
23
23
  },
24
24
  "devDependencies": {
25
- "@types/node": "^22.7.4",
26
- "@tinacms/datalayer": "0.0.0-f696c7d-20241104134240",
27
- "@tinacms/scripts": "1.3.0"
25
+ "@types/node": "^22.13.1",
26
+ "@tinacms/datalayer": "0.0.0-f894432-20251221235528",
27
+ "@tinacms/scripts": "1.4.2"
28
28
  },
29
29
  "peerDependencies": {
30
- "@tinacms/datalayer": "0.0.0-f696c7d-20241104134240"
30
+ "@tinacms/datalayer": "0.0.0-f894432-20251221235528"
31
31
  },
32
32
  "publishConfig": {
33
33
  "registry": "https://registry.npmjs.org"