@vornrun/connector-sdk 0.6.1 → 0.7.0-beta.10
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 +150 -2
- package/dist/chunk-XOP6JKBX.js +2220 -0
- package/dist/cli.d.ts +10 -0
- package/dist/cli.js +89 -9
- package/dist/index.d.ts +103 -418
- package/dist/index.js +58 -34
- package/dist/packaging-DFTuP4fr.d.ts +882 -0
- package/package.json +3 -1
- package/dist/chunk-457KOZUU.js +0 -773
package/dist/index.js
CHANGED
|
@@ -1,59 +1,65 @@
|
|
|
1
1
|
import {
|
|
2
|
+
CHECK_OWNERS,
|
|
2
3
|
MANIFEST_TOOL,
|
|
4
|
+
MAX_PACK_BYTES,
|
|
3
5
|
MAX_POLL_PAGES,
|
|
6
|
+
MAX_REQUEST_PAGES,
|
|
7
|
+
MockRouteMissError,
|
|
8
|
+
OPTIONS_TOOL,
|
|
4
9
|
PREFLIGHT_TOOL,
|
|
10
|
+
applyPostReceive,
|
|
11
|
+
asOutput,
|
|
12
|
+
backoffMs,
|
|
13
|
+
bundleDependencyFindings,
|
|
5
14
|
checkConnector,
|
|
6
15
|
connectionSetup,
|
|
7
16
|
connectorManifest,
|
|
17
|
+
createConnectorHarness,
|
|
8
18
|
createConnectorServer,
|
|
9
19
|
defineConnector,
|
|
10
20
|
drainPoll,
|
|
11
21
|
envNameFor,
|
|
22
|
+
esbuildBundle,
|
|
23
|
+
escapedMockHttp,
|
|
24
|
+
executeRequest,
|
|
12
25
|
formatFindings,
|
|
26
|
+
lifecycleScriptFindings,
|
|
27
|
+
nextLink,
|
|
13
28
|
normalizeItem,
|
|
14
29
|
normalizeItems,
|
|
30
|
+
packConnector,
|
|
31
|
+
packFileName,
|
|
15
32
|
pollToolName,
|
|
16
33
|
pollWithDedupe,
|
|
34
|
+
readNearestPackageJson,
|
|
35
|
+
resilientFetch,
|
|
17
36
|
resolveConfig,
|
|
37
|
+
resolveRequest,
|
|
38
|
+
resolveTemplates,
|
|
39
|
+
retryAfterMs,
|
|
18
40
|
runAction,
|
|
41
|
+
runConformance,
|
|
42
|
+
runOptions,
|
|
19
43
|
runPoll,
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
...harnessOptions.config && { config: harnessOptions.config },
|
|
27
|
-
...harnessOptions.now && { now: harnessOptions.now },
|
|
28
|
-
...options
|
|
29
|
-
});
|
|
30
|
-
return {
|
|
31
|
-
poll: (triggerType, options) => runPoll(connector, triggerType, defaults(options)),
|
|
32
|
-
drain: (triggerType, options) => drainPoll(connector, triggerType, defaults(options)),
|
|
33
|
-
execute: (actionType, args = {}) => runAction(connector, actionType, args, {
|
|
34
|
-
...harnessOptions.config && { config: harnessOptions.config },
|
|
35
|
-
...harnessOptions.now && { now: harnessOptions.now }
|
|
36
|
-
}),
|
|
37
|
-
manifest: () => connectorManifest(connector),
|
|
38
|
-
async pollTwice(triggerType, options) {
|
|
39
|
-
const first = await drainPoll(connector, triggerType, defaults(options));
|
|
40
|
-
const watermark = first.reduce(
|
|
41
|
-
(newest, item) => newest === void 0 || item.updatedAt > newest ? item.updatedAt : newest,
|
|
42
|
-
options?.since
|
|
43
|
-
);
|
|
44
|
-
const second = await drainPoll(
|
|
45
|
-
connector,
|
|
46
|
-
triggerType,
|
|
47
|
-
defaults({ ...options, ...watermark !== void 0 && { since: watermark } })
|
|
48
|
-
);
|
|
49
|
-
return watermark === void 0 ? second : second.filter((item) => item.updatedAt > watermark);
|
|
50
|
-
}
|
|
51
|
-
};
|
|
52
|
-
}
|
|
44
|
+
scaffoldFiles,
|
|
45
|
+
serveConnector,
|
|
46
|
+
titleCase,
|
|
47
|
+
valueAt,
|
|
48
|
+
withMockHttp
|
|
49
|
+
} from "./chunk-XOP6JKBX.js";
|
|
53
50
|
export {
|
|
51
|
+
CHECK_OWNERS,
|
|
54
52
|
MANIFEST_TOOL,
|
|
53
|
+
MAX_PACK_BYTES,
|
|
55
54
|
MAX_POLL_PAGES,
|
|
55
|
+
MAX_REQUEST_PAGES,
|
|
56
|
+
MockRouteMissError,
|
|
57
|
+
OPTIONS_TOOL,
|
|
56
58
|
PREFLIGHT_TOOL,
|
|
59
|
+
applyPostReceive,
|
|
60
|
+
asOutput,
|
|
61
|
+
backoffMs,
|
|
62
|
+
bundleDependencyFindings,
|
|
57
63
|
checkConnector,
|
|
58
64
|
connectionSetup,
|
|
59
65
|
connectorManifest,
|
|
@@ -62,13 +68,31 @@ export {
|
|
|
62
68
|
defineConnector,
|
|
63
69
|
drainPoll,
|
|
64
70
|
envNameFor,
|
|
71
|
+
esbuildBundle,
|
|
72
|
+
escapedMockHttp,
|
|
73
|
+
executeRequest,
|
|
65
74
|
formatFindings,
|
|
75
|
+
lifecycleScriptFindings,
|
|
76
|
+
nextLink,
|
|
66
77
|
normalizeItem,
|
|
67
78
|
normalizeItems,
|
|
79
|
+
packConnector,
|
|
80
|
+
packFileName,
|
|
68
81
|
pollToolName,
|
|
69
82
|
pollWithDedupe,
|
|
83
|
+
readNearestPackageJson,
|
|
84
|
+
resilientFetch,
|
|
70
85
|
resolveConfig,
|
|
86
|
+
resolveRequest,
|
|
87
|
+
resolveTemplates,
|
|
88
|
+
retryAfterMs,
|
|
71
89
|
runAction,
|
|
90
|
+
runConformance,
|
|
91
|
+
runOptions,
|
|
72
92
|
runPoll,
|
|
73
|
-
|
|
93
|
+
scaffoldFiles,
|
|
94
|
+
serveConnector,
|
|
95
|
+
titleCase,
|
|
96
|
+
valueAt,
|
|
97
|
+
withMockHttp
|
|
74
98
|
};
|