@ubiquity-os/plugin-sdk 3.6.0 → 3.6.3
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/README.md +34 -109
- package/dist/configuration.d.mts +5 -1
- package/dist/configuration.d.ts +5 -1
- package/dist/configuration.js +2659 -32
- package/dist/configuration.mjs +2659 -22
- package/dist/index.d.mts +3 -2
- package/dist/index.d.ts +3 -2
- package/dist/index.js +2258 -144
- package/dist/index.mjs +2250 -136
- package/dist/llm.d.mts +6 -43
- package/dist/llm.d.ts +6 -43
- package/dist/llm.js +94 -38
- package/dist/llm.mjs +94 -38
- package/dist/octokit.d.mts +2 -2
- package/dist/octokit.d.ts +2 -2
- package/dist/octokit.js +164 -2
- package/dist/octokit.mjs +163 -1
- package/dist/signature.d.mts +1 -3
- package/dist/signature.d.ts +1 -3
- package/dist/signature.js +1 -4
- package/dist/signature.mjs +1 -4
- package/package.json +43 -41
package/dist/octokit.js
CHANGED
|
@@ -24,7 +24,169 @@ __export(octokit_exports, {
|
|
|
24
24
|
});
|
|
25
25
|
module.exports = __toCommonJS(octokit_exports);
|
|
26
26
|
var import_core = require("@octokit/core");
|
|
27
|
-
|
|
27
|
+
|
|
28
|
+
// ../../node_modules/@octokit/plugin-paginate-graphql/dist-bundle/index.js
|
|
29
|
+
var generateMessage = (path, cursorValue) => `The cursor at "${path.join(
|
|
30
|
+
","
|
|
31
|
+
)}" did not change its value "${cursorValue}" after a page transition. Please make sure your that your query is set up correctly.`;
|
|
32
|
+
var MissingCursorChange = class extends Error {
|
|
33
|
+
constructor(pageInfo, cursorValue) {
|
|
34
|
+
super(generateMessage(pageInfo.pathInQuery, cursorValue));
|
|
35
|
+
this.pageInfo = pageInfo;
|
|
36
|
+
this.cursorValue = cursorValue;
|
|
37
|
+
if (Error.captureStackTrace) {
|
|
38
|
+
Error.captureStackTrace(this, this.constructor);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
name = "MissingCursorChangeError";
|
|
42
|
+
};
|
|
43
|
+
var MissingPageInfo = class extends Error {
|
|
44
|
+
constructor(response) {
|
|
45
|
+
super(
|
|
46
|
+
`No pageInfo property found in response. Please make sure to specify the pageInfo in your query. Response-Data: ${JSON.stringify(
|
|
47
|
+
response,
|
|
48
|
+
null,
|
|
49
|
+
2
|
|
50
|
+
)}`
|
|
51
|
+
);
|
|
52
|
+
this.response = response;
|
|
53
|
+
if (Error.captureStackTrace) {
|
|
54
|
+
Error.captureStackTrace(this, this.constructor);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
name = "MissingPageInfo";
|
|
58
|
+
};
|
|
59
|
+
var isObject = (value) => Object.prototype.toString.call(value) === "[object Object]";
|
|
60
|
+
function findPaginatedResourcePath(responseData) {
|
|
61
|
+
const paginatedResourcePath = deepFindPathToProperty(
|
|
62
|
+
responseData,
|
|
63
|
+
"pageInfo"
|
|
64
|
+
);
|
|
65
|
+
if (paginatedResourcePath.length === 0) {
|
|
66
|
+
throw new MissingPageInfo(responseData);
|
|
67
|
+
}
|
|
68
|
+
return paginatedResourcePath;
|
|
69
|
+
}
|
|
70
|
+
var deepFindPathToProperty = (object, searchProp, path = []) => {
|
|
71
|
+
for (const key of Object.keys(object)) {
|
|
72
|
+
const currentPath = [...path, key];
|
|
73
|
+
const currentValue = object[key];
|
|
74
|
+
if (isObject(currentValue)) {
|
|
75
|
+
if (currentValue.hasOwnProperty(searchProp)) {
|
|
76
|
+
return currentPath;
|
|
77
|
+
}
|
|
78
|
+
const result = deepFindPathToProperty(
|
|
79
|
+
currentValue,
|
|
80
|
+
searchProp,
|
|
81
|
+
currentPath
|
|
82
|
+
);
|
|
83
|
+
if (result.length > 0) {
|
|
84
|
+
return result;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
return [];
|
|
89
|
+
};
|
|
90
|
+
var get = (object, path) => {
|
|
91
|
+
return path.reduce((current, nextProperty) => current[nextProperty], object);
|
|
92
|
+
};
|
|
93
|
+
var set = (object, path, mutator) => {
|
|
94
|
+
const lastProperty = path[path.length - 1];
|
|
95
|
+
const parentPath = [...path].slice(0, -1);
|
|
96
|
+
const parent = get(object, parentPath);
|
|
97
|
+
if (typeof mutator === "function") {
|
|
98
|
+
parent[lastProperty] = mutator(parent[lastProperty]);
|
|
99
|
+
} else {
|
|
100
|
+
parent[lastProperty] = mutator;
|
|
101
|
+
}
|
|
102
|
+
};
|
|
103
|
+
var extractPageInfos = (responseData) => {
|
|
104
|
+
const pageInfoPath = findPaginatedResourcePath(responseData);
|
|
105
|
+
return {
|
|
106
|
+
pathInQuery: pageInfoPath,
|
|
107
|
+
pageInfo: get(responseData, [...pageInfoPath, "pageInfo"])
|
|
108
|
+
};
|
|
109
|
+
};
|
|
110
|
+
var isForwardSearch = (givenPageInfo) => {
|
|
111
|
+
return givenPageInfo.hasOwnProperty("hasNextPage");
|
|
112
|
+
};
|
|
113
|
+
var getCursorFrom = (pageInfo) => isForwardSearch(pageInfo) ? pageInfo.endCursor : pageInfo.startCursor;
|
|
114
|
+
var hasAnotherPage = (pageInfo) => isForwardSearch(pageInfo) ? pageInfo.hasNextPage : pageInfo.hasPreviousPage;
|
|
115
|
+
var createIterator = (octokit) => {
|
|
116
|
+
return (query, initialParameters = {}) => {
|
|
117
|
+
let nextPageExists = true;
|
|
118
|
+
let parameters = { ...initialParameters };
|
|
119
|
+
return {
|
|
120
|
+
[Symbol.asyncIterator]: () => ({
|
|
121
|
+
async next() {
|
|
122
|
+
if (!nextPageExists) return { done: true, value: {} };
|
|
123
|
+
const response = await octokit.graphql(
|
|
124
|
+
query,
|
|
125
|
+
parameters
|
|
126
|
+
);
|
|
127
|
+
const pageInfoContext = extractPageInfos(response);
|
|
128
|
+
const nextCursorValue = getCursorFrom(pageInfoContext.pageInfo);
|
|
129
|
+
nextPageExists = hasAnotherPage(pageInfoContext.pageInfo);
|
|
130
|
+
if (nextPageExists && nextCursorValue === parameters.cursor) {
|
|
131
|
+
throw new MissingCursorChange(pageInfoContext, nextCursorValue);
|
|
132
|
+
}
|
|
133
|
+
parameters = {
|
|
134
|
+
...parameters,
|
|
135
|
+
cursor: nextCursorValue
|
|
136
|
+
};
|
|
137
|
+
return { done: false, value: response };
|
|
138
|
+
}
|
|
139
|
+
})
|
|
140
|
+
};
|
|
141
|
+
};
|
|
142
|
+
};
|
|
143
|
+
var mergeResponses = (response1, response2) => {
|
|
144
|
+
if (Object.keys(response1).length === 0) {
|
|
145
|
+
return Object.assign(response1, response2);
|
|
146
|
+
}
|
|
147
|
+
const path = findPaginatedResourcePath(response1);
|
|
148
|
+
const nodesPath = [...path, "nodes"];
|
|
149
|
+
const newNodes = get(response2, nodesPath);
|
|
150
|
+
if (newNodes) {
|
|
151
|
+
set(response1, nodesPath, (values) => {
|
|
152
|
+
return [...values, ...newNodes];
|
|
153
|
+
});
|
|
154
|
+
}
|
|
155
|
+
const edgesPath = [...path, "edges"];
|
|
156
|
+
const newEdges = get(response2, edgesPath);
|
|
157
|
+
if (newEdges) {
|
|
158
|
+
set(response1, edgesPath, (values) => {
|
|
159
|
+
return [...values, ...newEdges];
|
|
160
|
+
});
|
|
161
|
+
}
|
|
162
|
+
const pageInfoPath = [...path, "pageInfo"];
|
|
163
|
+
set(response1, pageInfoPath, get(response2, pageInfoPath));
|
|
164
|
+
return response1;
|
|
165
|
+
};
|
|
166
|
+
var createPaginate = (octokit) => {
|
|
167
|
+
const iterator = createIterator(octokit);
|
|
168
|
+
return async (query, initialParameters = {}) => {
|
|
169
|
+
let mergedResponse = {};
|
|
170
|
+
for await (const response of iterator(
|
|
171
|
+
query,
|
|
172
|
+
initialParameters
|
|
173
|
+
)) {
|
|
174
|
+
mergedResponse = mergeResponses(mergedResponse, response);
|
|
175
|
+
}
|
|
176
|
+
return mergedResponse;
|
|
177
|
+
};
|
|
178
|
+
};
|
|
179
|
+
function paginateGraphQL(octokit) {
|
|
180
|
+
return {
|
|
181
|
+
graphql: Object.assign(octokit.graphql, {
|
|
182
|
+
paginate: Object.assign(createPaginate(octokit), {
|
|
183
|
+
iterator: createIterator(octokit)
|
|
184
|
+
})
|
|
185
|
+
})
|
|
186
|
+
};
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
// src/octokit.ts
|
|
28
190
|
var import_plugin_paginate_rest = require("@octokit/plugin-paginate-rest");
|
|
29
191
|
var import_plugin_rest_endpoint_methods = require("@octokit/plugin-rest-endpoint-methods");
|
|
30
192
|
var import_plugin_retry = require("@octokit/plugin-retry");
|
|
@@ -45,7 +207,7 @@ var defaultOptions = {
|
|
|
45
207
|
}
|
|
46
208
|
}
|
|
47
209
|
};
|
|
48
|
-
var customOctokit = import_core.Octokit.plugin(import_plugin_throttling.throttling, import_plugin_retry.retry, import_plugin_paginate_rest.paginateRest, import_plugin_rest_endpoint_methods.restEndpointMethods,
|
|
210
|
+
var customOctokit = import_core.Octokit.plugin(import_plugin_throttling.throttling, import_plugin_retry.retry, import_plugin_paginate_rest.paginateRest, import_plugin_rest_endpoint_methods.restEndpointMethods, paginateGraphQL).defaults((instanceOptions) => {
|
|
49
211
|
return { ...defaultOptions, ...instanceOptions };
|
|
50
212
|
});
|
|
51
213
|
// Annotate the CommonJS export names for ESM import in node:
|
package/dist/octokit.mjs
CHANGED
|
@@ -1,6 +1,168 @@
|
|
|
1
1
|
// src/octokit.ts
|
|
2
2
|
import { Octokit } from "@octokit/core";
|
|
3
|
-
|
|
3
|
+
|
|
4
|
+
// ../../node_modules/@octokit/plugin-paginate-graphql/dist-bundle/index.js
|
|
5
|
+
var generateMessage = (path, cursorValue) => `The cursor at "${path.join(
|
|
6
|
+
","
|
|
7
|
+
)}" did not change its value "${cursorValue}" after a page transition. Please make sure your that your query is set up correctly.`;
|
|
8
|
+
var MissingCursorChange = class extends Error {
|
|
9
|
+
constructor(pageInfo, cursorValue) {
|
|
10
|
+
super(generateMessage(pageInfo.pathInQuery, cursorValue));
|
|
11
|
+
this.pageInfo = pageInfo;
|
|
12
|
+
this.cursorValue = cursorValue;
|
|
13
|
+
if (Error.captureStackTrace) {
|
|
14
|
+
Error.captureStackTrace(this, this.constructor);
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
name = "MissingCursorChangeError";
|
|
18
|
+
};
|
|
19
|
+
var MissingPageInfo = class extends Error {
|
|
20
|
+
constructor(response) {
|
|
21
|
+
super(
|
|
22
|
+
`No pageInfo property found in response. Please make sure to specify the pageInfo in your query. Response-Data: ${JSON.stringify(
|
|
23
|
+
response,
|
|
24
|
+
null,
|
|
25
|
+
2
|
|
26
|
+
)}`
|
|
27
|
+
);
|
|
28
|
+
this.response = response;
|
|
29
|
+
if (Error.captureStackTrace) {
|
|
30
|
+
Error.captureStackTrace(this, this.constructor);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
name = "MissingPageInfo";
|
|
34
|
+
};
|
|
35
|
+
var isObject = (value) => Object.prototype.toString.call(value) === "[object Object]";
|
|
36
|
+
function findPaginatedResourcePath(responseData) {
|
|
37
|
+
const paginatedResourcePath = deepFindPathToProperty(
|
|
38
|
+
responseData,
|
|
39
|
+
"pageInfo"
|
|
40
|
+
);
|
|
41
|
+
if (paginatedResourcePath.length === 0) {
|
|
42
|
+
throw new MissingPageInfo(responseData);
|
|
43
|
+
}
|
|
44
|
+
return paginatedResourcePath;
|
|
45
|
+
}
|
|
46
|
+
var deepFindPathToProperty = (object, searchProp, path = []) => {
|
|
47
|
+
for (const key of Object.keys(object)) {
|
|
48
|
+
const currentPath = [...path, key];
|
|
49
|
+
const currentValue = object[key];
|
|
50
|
+
if (isObject(currentValue)) {
|
|
51
|
+
if (currentValue.hasOwnProperty(searchProp)) {
|
|
52
|
+
return currentPath;
|
|
53
|
+
}
|
|
54
|
+
const result = deepFindPathToProperty(
|
|
55
|
+
currentValue,
|
|
56
|
+
searchProp,
|
|
57
|
+
currentPath
|
|
58
|
+
);
|
|
59
|
+
if (result.length > 0) {
|
|
60
|
+
return result;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
return [];
|
|
65
|
+
};
|
|
66
|
+
var get = (object, path) => {
|
|
67
|
+
return path.reduce((current, nextProperty) => current[nextProperty], object);
|
|
68
|
+
};
|
|
69
|
+
var set = (object, path, mutator) => {
|
|
70
|
+
const lastProperty = path[path.length - 1];
|
|
71
|
+
const parentPath = [...path].slice(0, -1);
|
|
72
|
+
const parent = get(object, parentPath);
|
|
73
|
+
if (typeof mutator === "function") {
|
|
74
|
+
parent[lastProperty] = mutator(parent[lastProperty]);
|
|
75
|
+
} else {
|
|
76
|
+
parent[lastProperty] = mutator;
|
|
77
|
+
}
|
|
78
|
+
};
|
|
79
|
+
var extractPageInfos = (responseData) => {
|
|
80
|
+
const pageInfoPath = findPaginatedResourcePath(responseData);
|
|
81
|
+
return {
|
|
82
|
+
pathInQuery: pageInfoPath,
|
|
83
|
+
pageInfo: get(responseData, [...pageInfoPath, "pageInfo"])
|
|
84
|
+
};
|
|
85
|
+
};
|
|
86
|
+
var isForwardSearch = (givenPageInfo) => {
|
|
87
|
+
return givenPageInfo.hasOwnProperty("hasNextPage");
|
|
88
|
+
};
|
|
89
|
+
var getCursorFrom = (pageInfo) => isForwardSearch(pageInfo) ? pageInfo.endCursor : pageInfo.startCursor;
|
|
90
|
+
var hasAnotherPage = (pageInfo) => isForwardSearch(pageInfo) ? pageInfo.hasNextPage : pageInfo.hasPreviousPage;
|
|
91
|
+
var createIterator = (octokit) => {
|
|
92
|
+
return (query, initialParameters = {}) => {
|
|
93
|
+
let nextPageExists = true;
|
|
94
|
+
let parameters = { ...initialParameters };
|
|
95
|
+
return {
|
|
96
|
+
[Symbol.asyncIterator]: () => ({
|
|
97
|
+
async next() {
|
|
98
|
+
if (!nextPageExists) return { done: true, value: {} };
|
|
99
|
+
const response = await octokit.graphql(
|
|
100
|
+
query,
|
|
101
|
+
parameters
|
|
102
|
+
);
|
|
103
|
+
const pageInfoContext = extractPageInfos(response);
|
|
104
|
+
const nextCursorValue = getCursorFrom(pageInfoContext.pageInfo);
|
|
105
|
+
nextPageExists = hasAnotherPage(pageInfoContext.pageInfo);
|
|
106
|
+
if (nextPageExists && nextCursorValue === parameters.cursor) {
|
|
107
|
+
throw new MissingCursorChange(pageInfoContext, nextCursorValue);
|
|
108
|
+
}
|
|
109
|
+
parameters = {
|
|
110
|
+
...parameters,
|
|
111
|
+
cursor: nextCursorValue
|
|
112
|
+
};
|
|
113
|
+
return { done: false, value: response };
|
|
114
|
+
}
|
|
115
|
+
})
|
|
116
|
+
};
|
|
117
|
+
};
|
|
118
|
+
};
|
|
119
|
+
var mergeResponses = (response1, response2) => {
|
|
120
|
+
if (Object.keys(response1).length === 0) {
|
|
121
|
+
return Object.assign(response1, response2);
|
|
122
|
+
}
|
|
123
|
+
const path = findPaginatedResourcePath(response1);
|
|
124
|
+
const nodesPath = [...path, "nodes"];
|
|
125
|
+
const newNodes = get(response2, nodesPath);
|
|
126
|
+
if (newNodes) {
|
|
127
|
+
set(response1, nodesPath, (values) => {
|
|
128
|
+
return [...values, ...newNodes];
|
|
129
|
+
});
|
|
130
|
+
}
|
|
131
|
+
const edgesPath = [...path, "edges"];
|
|
132
|
+
const newEdges = get(response2, edgesPath);
|
|
133
|
+
if (newEdges) {
|
|
134
|
+
set(response1, edgesPath, (values) => {
|
|
135
|
+
return [...values, ...newEdges];
|
|
136
|
+
});
|
|
137
|
+
}
|
|
138
|
+
const pageInfoPath = [...path, "pageInfo"];
|
|
139
|
+
set(response1, pageInfoPath, get(response2, pageInfoPath));
|
|
140
|
+
return response1;
|
|
141
|
+
};
|
|
142
|
+
var createPaginate = (octokit) => {
|
|
143
|
+
const iterator = createIterator(octokit);
|
|
144
|
+
return async (query, initialParameters = {}) => {
|
|
145
|
+
let mergedResponse = {};
|
|
146
|
+
for await (const response of iterator(
|
|
147
|
+
query,
|
|
148
|
+
initialParameters
|
|
149
|
+
)) {
|
|
150
|
+
mergedResponse = mergeResponses(mergedResponse, response);
|
|
151
|
+
}
|
|
152
|
+
return mergedResponse;
|
|
153
|
+
};
|
|
154
|
+
};
|
|
155
|
+
function paginateGraphQL(octokit) {
|
|
156
|
+
return {
|
|
157
|
+
graphql: Object.assign(octokit.graphql, {
|
|
158
|
+
paginate: Object.assign(createPaginate(octokit), {
|
|
159
|
+
iterator: createIterator(octokit)
|
|
160
|
+
})
|
|
161
|
+
})
|
|
162
|
+
};
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
// src/octokit.ts
|
|
4
166
|
import { paginateRest } from "@octokit/plugin-paginate-rest";
|
|
5
167
|
import { restEndpointMethods } from "@octokit/plugin-rest-endpoint-methods";
|
|
6
168
|
import { retry } from "@octokit/plugin-retry";
|
package/dist/signature.d.mts
CHANGED
|
@@ -15,10 +15,9 @@ declare class PluginInput<T extends EmitterWebhookEventName = EmitterWebhookEven
|
|
|
15
15
|
eventPayload: EmitterWebhookEvent<T>["payload"];
|
|
16
16
|
settings: unknown;
|
|
17
17
|
authToken: string;
|
|
18
|
-
ubiquityKernelToken?: string;
|
|
19
18
|
ref: string;
|
|
20
19
|
command: CommandCall;
|
|
21
|
-
constructor(privateKey: string, stateId: string, eventName: T, eventPayload: EmitterWebhookEvent<T>["payload"], settings: unknown, authToken: string, ref: string, command: CommandCall
|
|
20
|
+
constructor(privateKey: string, stateId: string, eventName: T, eventPayload: EmitterWebhookEvent<T>["payload"], settings: unknown, authToken: string, ref: string, command: CommandCall);
|
|
22
21
|
getInputs(): Promise<{
|
|
23
22
|
signature: string;
|
|
24
23
|
stateId: string;
|
|
@@ -26,7 +25,6 @@ declare class PluginInput<T extends EmitterWebhookEventName = EmitterWebhookEven
|
|
|
26
25
|
eventPayload: string;
|
|
27
26
|
settings: string;
|
|
28
27
|
authToken: string;
|
|
29
|
-
ubiquityKernelToken: string | undefined;
|
|
30
28
|
ref: string;
|
|
31
29
|
command: string;
|
|
32
30
|
}>;
|
package/dist/signature.d.ts
CHANGED
|
@@ -15,10 +15,9 @@ declare class PluginInput<T extends EmitterWebhookEventName = EmitterWebhookEven
|
|
|
15
15
|
eventPayload: EmitterWebhookEvent<T>["payload"];
|
|
16
16
|
settings: unknown;
|
|
17
17
|
authToken: string;
|
|
18
|
-
ubiquityKernelToken?: string;
|
|
19
18
|
ref: string;
|
|
20
19
|
command: CommandCall;
|
|
21
|
-
constructor(privateKey: string, stateId: string, eventName: T, eventPayload: EmitterWebhookEvent<T>["payload"], settings: unknown, authToken: string, ref: string, command: CommandCall
|
|
20
|
+
constructor(privateKey: string, stateId: string, eventName: T, eventPayload: EmitterWebhookEvent<T>["payload"], settings: unknown, authToken: string, ref: string, command: CommandCall);
|
|
22
21
|
getInputs(): Promise<{
|
|
23
22
|
signature: string;
|
|
24
23
|
stateId: string;
|
|
@@ -26,7 +25,6 @@ declare class PluginInput<T extends EmitterWebhookEventName = EmitterWebhookEven
|
|
|
26
25
|
eventPayload: string;
|
|
27
26
|
settings: string;
|
|
28
27
|
authToken: string;
|
|
29
|
-
ubiquityKernelToken: string | undefined;
|
|
30
28
|
ref: string;
|
|
31
29
|
command: string;
|
|
32
30
|
}>;
|
package/dist/signature.js
CHANGED
|
@@ -42,10 +42,9 @@ var PluginInput = class {
|
|
|
42
42
|
eventPayload;
|
|
43
43
|
settings;
|
|
44
44
|
authToken;
|
|
45
|
-
ubiquityKernelToken;
|
|
46
45
|
ref;
|
|
47
46
|
command;
|
|
48
|
-
constructor(privateKey, stateId, eventName, eventPayload, settings, authToken, ref, command
|
|
47
|
+
constructor(privateKey, stateId, eventName, eventPayload, settings, authToken, ref, command) {
|
|
49
48
|
this._privateKey = privateKey;
|
|
50
49
|
this.stateId = stateId;
|
|
51
50
|
this.eventName = eventName;
|
|
@@ -54,7 +53,6 @@ var PluginInput = class {
|
|
|
54
53
|
this.authToken = authToken;
|
|
55
54
|
this.ref = ref;
|
|
56
55
|
this.command = command;
|
|
57
|
-
this.ubiquityKernelToken = ubiquityKernelToken;
|
|
58
56
|
}
|
|
59
57
|
async getInputs() {
|
|
60
58
|
const inputs = {
|
|
@@ -63,7 +61,6 @@ var PluginInput = class {
|
|
|
63
61
|
eventPayload: compressString(JSON.stringify(this.eventPayload)),
|
|
64
62
|
settings: JSON.stringify(this.settings),
|
|
65
63
|
authToken: this.authToken,
|
|
66
|
-
ubiquityKernelToken: this.ubiquityKernelToken,
|
|
67
64
|
ref: this.ref,
|
|
68
65
|
command: JSON.stringify(this.command)
|
|
69
66
|
};
|
package/dist/signature.mjs
CHANGED
|
@@ -14,10 +14,9 @@ var PluginInput = class {
|
|
|
14
14
|
eventPayload;
|
|
15
15
|
settings;
|
|
16
16
|
authToken;
|
|
17
|
-
ubiquityKernelToken;
|
|
18
17
|
ref;
|
|
19
18
|
command;
|
|
20
|
-
constructor(privateKey, stateId, eventName, eventPayload, settings, authToken, ref, command
|
|
19
|
+
constructor(privateKey, stateId, eventName, eventPayload, settings, authToken, ref, command) {
|
|
21
20
|
this._privateKey = privateKey;
|
|
22
21
|
this.stateId = stateId;
|
|
23
22
|
this.eventName = eventName;
|
|
@@ -26,7 +25,6 @@ var PluginInput = class {
|
|
|
26
25
|
this.authToken = authToken;
|
|
27
26
|
this.ref = ref;
|
|
28
27
|
this.command = command;
|
|
29
|
-
this.ubiquityKernelToken = ubiquityKernelToken;
|
|
30
28
|
}
|
|
31
29
|
async getInputs() {
|
|
32
30
|
const inputs = {
|
|
@@ -35,7 +33,6 @@ var PluginInput = class {
|
|
|
35
33
|
eventPayload: compressString(JSON.stringify(this.eventPayload)),
|
|
36
34
|
settings: JSON.stringify(this.settings),
|
|
37
35
|
authToken: this.authToken,
|
|
38
|
-
ubiquityKernelToken: this.ubiquityKernelToken,
|
|
39
36
|
ref: this.ref,
|
|
40
37
|
command: JSON.stringify(this.command)
|
|
41
38
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ubiquity-os/plugin-sdk",
|
|
3
|
-
"version": "3.6.
|
|
3
|
+
"version": "3.6.3",
|
|
4
4
|
"description": "SDK for plugin support.",
|
|
5
5
|
"author": "Ubiquity DAO",
|
|
6
6
|
"license": "MIT",
|
|
@@ -42,8 +42,8 @@
|
|
|
42
42
|
"exports": {
|
|
43
43
|
".": {
|
|
44
44
|
"types": "./dist/index.d.ts",
|
|
45
|
-
"
|
|
46
|
-
"
|
|
45
|
+
"import": "./dist/index.mjs",
|
|
46
|
+
"require": "./dist/index.js"
|
|
47
47
|
},
|
|
48
48
|
"./manifest": {
|
|
49
49
|
"types": "./dist/manifest.d.ts",
|
|
@@ -90,15 +90,17 @@
|
|
|
90
90
|
"dist"
|
|
91
91
|
],
|
|
92
92
|
"scripts": {
|
|
93
|
-
"
|
|
94
|
-
"
|
|
93
|
+
"build": "tsup",
|
|
94
|
+
"dev": "run-p worker proxy",
|
|
95
|
+
"format": "run-s format:*",
|
|
95
96
|
"format:lint": "eslint --fix .",
|
|
96
97
|
"format:prettier": "prettier --write .",
|
|
97
98
|
"format:cspell": "cspell **/*",
|
|
99
|
+
"jest:test": "jest --coverage",
|
|
98
100
|
"knip": "knip --config .github/knip.ts",
|
|
99
101
|
"knip-ci": "knip --no-exit-code --reporter json --config .github/knip.ts",
|
|
100
102
|
"prepare": "node .husky/install.mjs",
|
|
101
|
-
"
|
|
103
|
+
"prebuild": "rimraf dist"
|
|
102
104
|
},
|
|
103
105
|
"keywords": [
|
|
104
106
|
"typescript",
|
|
@@ -108,48 +110,48 @@
|
|
|
108
110
|
"open-source"
|
|
109
111
|
],
|
|
110
112
|
"dependencies": {
|
|
111
|
-
"@
|
|
112
|
-
"@
|
|
113
|
-
"@octokit/
|
|
114
|
-
"@octokit/plugin-
|
|
115
|
-
"@octokit/plugin-
|
|
116
|
-
"@octokit/plugin-
|
|
117
|
-
"@octokit/plugin-
|
|
118
|
-
"@octokit/
|
|
119
|
-
"@octokit/types": "^
|
|
120
|
-
"@octokit/webhooks": "^
|
|
121
|
-
"@
|
|
122
|
-
"
|
|
123
|
-
"
|
|
124
|
-
"
|
|
125
|
-
"
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
"@sinclair/typebox": "0.34.41"
|
|
113
|
+
"@octokit/auth-app": "^7.1.1",
|
|
114
|
+
"@octokit/core": "^6.1.3",
|
|
115
|
+
"@octokit/plugin-paginate-rest": "^11.4.2",
|
|
116
|
+
"@octokit/plugin-request-log": "^5.3.1",
|
|
117
|
+
"@octokit/plugin-rest-endpoint-methods": "^13.2.1",
|
|
118
|
+
"@octokit/plugin-retry": "^7.1.2",
|
|
119
|
+
"@octokit/plugin-throttling": "^9.3.2",
|
|
120
|
+
"@octokit/rest": "^21.0.2",
|
|
121
|
+
"@octokit/types": "^13.6.1",
|
|
122
|
+
"@octokit/webhooks": "^13.4.1",
|
|
123
|
+
"@octokit/webhooks-types": "^7.6.1",
|
|
124
|
+
"@sinclair/typebox": "^0.33.17",
|
|
125
|
+
"libsodium-wrappers": "^0.7.15",
|
|
126
|
+
"openai": "^4.70.2",
|
|
127
|
+
"pino": "^9.7.0",
|
|
128
|
+
"typebox-validators": "^0.3.5",
|
|
129
|
+
"yaml": "^2.7.0"
|
|
129
130
|
},
|
|
130
131
|
"devDependencies": {
|
|
131
|
-
"@
|
|
132
|
-
"@commitlint/
|
|
133
|
-
"@
|
|
134
|
-
"@cspell/dict-
|
|
135
|
-
"@cspell/dict-
|
|
136
|
-
"@
|
|
137
|
-
"@
|
|
138
|
-
"@
|
|
139
|
-
"@
|
|
140
|
-
"@swc/jest": "^0.2.
|
|
141
|
-
"@types/
|
|
142
|
-
"@types/
|
|
132
|
+
"@cloudflare/workers-types": "^4.20241224.0",
|
|
133
|
+
"@commitlint/cli": "^19.7.1",
|
|
134
|
+
"@commitlint/config-conventional": "^19.6.0",
|
|
135
|
+
"@cspell/dict-node": "^5.0.8",
|
|
136
|
+
"@cspell/dict-software-terms": "^4.2.1",
|
|
137
|
+
"@cspell/dict-typescript": "^3.1.6",
|
|
138
|
+
"@eslint/js": "^9.17.0",
|
|
139
|
+
"@jest/globals": "^29.7.0",
|
|
140
|
+
"@swc/core": "^1.10.1",
|
|
141
|
+
"@swc/jest": "^0.2.36",
|
|
142
|
+
"@types/jest": "^29.5.14",
|
|
143
|
+
"@types/libsodium-wrappers": "^0.7.14",
|
|
144
|
+
"@types/node": "^22.10.1",
|
|
143
145
|
"@ubiquity-os/eslint-plugin-no-empty-strings": "^1.0.3",
|
|
144
|
-
"
|
|
145
|
-
"
|
|
146
|
-
"eslint": "^9.
|
|
146
|
+
"cspell": "^8.17.0",
|
|
147
|
+
"esbuild": "^0.24.0",
|
|
148
|
+
"eslint": "^9.17.0",
|
|
147
149
|
"eslint-config-prettier": "^9.1.2",
|
|
148
150
|
"eslint-plugin-check-file": "^2.8.0",
|
|
149
|
-
"eslint-plugin-prettier": "^5.
|
|
151
|
+
"eslint-plugin-prettier": "^5.2.1",
|
|
150
152
|
"eslint-plugin-sonarjs": "^3.0.5",
|
|
151
153
|
"husky": "^9.1.7",
|
|
152
|
-
"jest": "^
|
|
154
|
+
"jest": "^29.7.0",
|
|
153
155
|
"jest-junit": "^16.0.0",
|
|
154
156
|
"jest-md-dashboard": "^0.8.1",
|
|
155
157
|
"knip": "^5.69.1",
|