tinacms-gitprovider-github 3.0.2 → 4.0.0
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.
- package/dist/index.js +6 -30
- package/package.json +4 -4
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
|
-
|
|
21
|
-
|
|
22
|
-
GitHubProvider: () => GitHubProvider
|
|
23
|
-
});
|
|
24
|
-
module.exports = __toCommonJS(index_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
|
|
11
|
+
this.octokit = new Octokit({
|
|
35
12
|
auth: args.token,
|
|
36
13
|
...args.octokitOptions || {}
|
|
37
14
|
});
|
|
@@ -57,7 +34,7 @@ var GitHubProvider = class {
|
|
|
57
34
|
repo: this.repo,
|
|
58
35
|
path,
|
|
59
36
|
message: this.commitMessage || "Edited with TinaCMS",
|
|
60
|
-
content:
|
|
37
|
+
content: Base64.encode(value),
|
|
61
38
|
branch: this.branch,
|
|
62
39
|
sha
|
|
63
40
|
});
|
|
@@ -94,7 +71,6 @@ var GitHubProvider = class {
|
|
|
94
71
|
}
|
|
95
72
|
}
|
|
96
73
|
};
|
|
97
|
-
|
|
98
|
-
0 && (module.exports = {
|
|
74
|
+
export {
|
|
99
75
|
GitHubProvider
|
|
100
|
-
}
|
|
76
|
+
};
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tinacms-gitprovider-github",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "4.0.0",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
|
-
"module": "dist/index.
|
|
5
|
+
"module": "./dist/index.js",
|
|
6
6
|
"files": [
|
|
7
7
|
"dist"
|
|
8
8
|
],
|
|
@@ -23,11 +23,11 @@
|
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
25
|
"@types/node": "^22.13.1",
|
|
26
|
-
"@tinacms/datalayer": "
|
|
26
|
+
"@tinacms/datalayer": "2.0.0",
|
|
27
27
|
"@tinacms/scripts": "1.4.1"
|
|
28
28
|
},
|
|
29
29
|
"peerDependencies": {
|
|
30
|
-
"@tinacms/datalayer": "
|
|
30
|
+
"@tinacms/datalayer": "2.0.0"
|
|
31
31
|
},
|
|
32
32
|
"publishConfig": {
|
|
33
33
|
"registry": "https://registry.npmjs.org"
|