@bluestep-systems/b6p-core 0.1.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/README.md +75 -0
- package/dist/B6PCore.d.ts +109 -0
- package/dist/B6PCore.js +470 -0
- package/dist/B6PCore.js.map +1 -0
- package/dist/B6PUri.d.ts +31 -0
- package/dist/B6PUri.js +110 -0
- package/dist/B6PUri.js.map +1 -0
- package/dist/Err.d.ts +470 -0
- package/dist/Err.js +800 -0
- package/dist/Err.js.map +1 -0
- package/dist/auth/BasicAuthProvider.d.ts +39 -0
- package/dist/auth/BasicAuthProvider.js +106 -0
- package/dist/auth/BasicAuthProvider.js.map +1 -0
- package/dist/cache/OrgCache.d.ts +66 -0
- package/dist/cache/OrgCache.js +220 -0
- package/dist/cache/OrgCache.js.map +1 -0
- package/dist/cache/ScriptMetaDataStore.d.ts +39 -0
- package/dist/cache/ScriptMetaDataStore.js +83 -0
- package/dist/cache/ScriptMetaDataStore.js.map +1 -0
- package/dist/constants/ApiEndpoints.d.ts +13 -0
- package/dist/constants/ApiEndpoints.js +18 -0
- package/dist/constants/ApiEndpoints.js.map +1 -0
- package/dist/constants/AuthTypes.d.ts +9 -0
- package/dist/constants/AuthTypes.js +14 -0
- package/dist/constants/AuthTypes.js.map +1 -0
- package/dist/constants/BlueHQ.d.ts +20 -0
- package/dist/constants/BlueHQ.js +36 -0
- package/dist/constants/BlueHQ.js.map +1 -0
- package/dist/constants/CryptoAlgorithms.d.ts +8 -0
- package/dist/constants/CryptoAlgorithms.js +13 -0
- package/dist/constants/CryptoAlgorithms.js.map +1 -0
- package/dist/constants/ExtensionConfig.d.ts +11 -0
- package/dist/constants/ExtensionConfig.js +16 -0
- package/dist/constants/ExtensionConfig.js.map +1 -0
- package/dist/constants/FileExtensions.d.ts +13 -0
- package/dist/constants/FileExtensions.js +18 -0
- package/dist/constants/FileExtensions.js.map +1 -0
- package/dist/constants/FolderNames.d.ts +12 -0
- package/dist/constants/FolderNames.js +17 -0
- package/dist/constants/FolderNames.js.map +1 -0
- package/dist/constants/GitHubUrls.d.ts +12 -0
- package/dist/constants/GitHubUrls.js +17 -0
- package/dist/constants/GitHubUrls.js.map +1 -0
- package/dist/constants/Http.d.ts +57 -0
- package/dist/constants/Http.js +67 -0
- package/dist/constants/Http.js.map +1 -0
- package/dist/constants/MimeTypes.d.ts +9 -0
- package/dist/constants/MimeTypes.js +14 -0
- package/dist/constants/MimeTypes.js.map +1 -0
- package/dist/constants/Numerical.d.ts +14 -0
- package/dist/constants/Numerical.js +32 -0
- package/dist/constants/Numerical.js.map +1 -0
- package/dist/constants/OutputChannels.d.ts +8 -0
- package/dist/constants/OutputChannels.js +13 -0
- package/dist/constants/OutputChannels.js.map +1 -0
- package/dist/constants/SettingsKeys.d.ts +11 -0
- package/dist/constants/SettingsKeys.js +16 -0
- package/dist/constants/SettingsKeys.js.map +1 -0
- package/dist/constants/SpecialFiles.d.ts +10 -0
- package/dist/constants/SpecialFiles.js +15 -0
- package/dist/constants/SpecialFiles.js.map +1 -0
- package/dist/constants/WebDAVElements.d.ts +10 -0
- package/dist/constants/WebDAVElements.js +15 -0
- package/dist/constants/WebDAVElements.js.map +1 -0
- package/dist/constants/index.d.ts +22 -0
- package/dist/constants/index.js +41 -0
- package/dist/constants/index.js.map +1 -0
- package/dist/data/DownstairsPathParser.d.ts +20 -0
- package/dist/data/DownstairsPathParser.js +132 -0
- package/dist/data/DownstairsPathParser.js.map +1 -0
- package/dist/data/GlobMatcher.d.ts +23 -0
- package/dist/data/GlobMatcher.js +135 -0
- package/dist/data/GlobMatcher.js.map +1 -0
- package/dist/data/IdUtility.d.ts +22 -0
- package/dist/data/IdUtility.js +119 -0
- package/dist/data/IdUtility.js.map +1 -0
- package/dist/data/OrgWorker.d.ts +14 -0
- package/dist/data/OrgWorker.js +54 -0
- package/dist/data/OrgWorker.js.map +1 -0
- package/dist/data/ScriptKey.d.ts +93 -0
- package/dist/data/ScriptKey.js +123 -0
- package/dist/data/ScriptKey.js.map +1 -0
- package/dist/data/ScriptUrlParser.d.ts +42 -0
- package/dist/data/ScriptUrlParser.js +258 -0
- package/dist/data/ScriptUrlParser.js.map +1 -0
- package/dist/data/index.d.ts +5 -0
- package/dist/data/index.js +14 -0
- package/dist/data/index.js.map +1 -0
- package/dist/index.d.ts +32 -0
- package/dist/index.js +88 -0
- package/dist/index.js.map +1 -0
- package/dist/network/HttpClient.d.ts +32 -0
- package/dist/network/HttpClient.js +65 -0
- package/dist/network/HttpClient.js.map +1 -0
- package/dist/network/HttpClientProvider.d.ts +216 -0
- package/dist/network/HttpClientProvider.js +256 -0
- package/dist/network/HttpClientProvider.js.map +1 -0
- package/dist/network/StatusCodes.d.ts +101 -0
- package/dist/network/StatusCodes.js +121 -0
- package/dist/network/StatusCodes.js.map +1 -0
- package/dist/persistence/Persistable.d.ts +9 -0
- package/dist/persistence/Persistable.js +3 -0
- package/dist/persistence/Persistable.js.map +1 -0
- package/dist/persistence/PersistablePseudoMap.d.ts +50 -0
- package/dist/persistence/PersistablePseudoMap.js +62 -0
- package/dist/persistence/PersistablePseudoMap.js.map +1 -0
- package/dist/persistence/PersistenceKeys.d.ts +38 -0
- package/dist/persistence/PersistenceKeys.js +44 -0
- package/dist/persistence/PersistenceKeys.js.map +1 -0
- package/dist/persistence/PrivatePersistanceMap.d.ts +30 -0
- package/dist/persistence/PrivatePersistanceMap.js +67 -0
- package/dist/persistence/PrivatePersistanceMap.js.map +1 -0
- package/dist/persistence/PseudoMap.d.ts +65 -0
- package/dist/persistence/PseudoMap.js +96 -0
- package/dist/persistence/PseudoMap.js.map +1 -0
- package/dist/persistence/PublicPersistanceMap.d.ts +25 -0
- package/dist/persistence/PublicPersistanceMap.js +38 -0
- package/dist/persistence/PublicPersistanceMap.js.map +1 -0
- package/dist/persistence/Serializable.d.ts +40 -0
- package/dist/persistence/Serializable.js +54 -0
- package/dist/persistence/Serializable.js.map +1 -0
- package/dist/persistence/SharedFilePersistence.d.ts +70 -0
- package/dist/persistence/SharedFilePersistence.js +277 -0
- package/dist/persistence/SharedFilePersistence.js.map +1 -0
- package/dist/persistence/TypedMap.d.ts +73 -0
- package/dist/persistence/TypedMap.js +104 -0
- package/dist/persistence/TypedMap.js.map +1 -0
- package/dist/persistence/TypedPersistable.d.ts +36 -0
- package/dist/persistence/TypedPersistable.js +42 -0
- package/dist/persistence/TypedPersistable.js.map +1 -0
- package/dist/persistence/TypedPrivatePersistable.d.ts +124 -0
- package/dist/persistence/TypedPrivatePersistable.js +164 -0
- package/dist/persistence/TypedPrivatePersistable.js.map +1 -0
- package/dist/persistence/dirLockdown.d.ts +12 -0
- package/dist/persistence/dirLockdown.js +73 -0
- package/dist/persistence/dirLockdown.js.map +1 -0
- package/dist/persistence/index.d.ts +11 -0
- package/dist/persistence/index.js +27 -0
- package/dist/persistence/index.js.map +1 -0
- package/dist/providers.d.ts +133 -0
- package/dist/providers.js +3 -0
- package/dist/providers.js.map +1 -0
- package/dist/push.d.ts +20 -0
- package/dist/push.js +245 -0
- package/dist/push.js.map +1 -0
- package/dist/script/ScriptContext.d.ts +24 -0
- package/dist/script/ScriptContext.js +3 -0
- package/dist/script/ScriptContext.js.map +1 -0
- package/dist/script/ScriptFactory.d.ts +44 -0
- package/dist/script/ScriptFactory.js +130 -0
- package/dist/script/ScriptFactory.js.map +1 -0
- package/dist/script/ScriptFile.d.ts +62 -0
- package/dist/script/ScriptFile.js +373 -0
- package/dist/script/ScriptFile.js.map +1 -0
- package/dist/script/ScriptFolder.d.ts +43 -0
- package/dist/script/ScriptFolder.js +109 -0
- package/dist/script/ScriptFolder.js.map +1 -0
- package/dist/script/ScriptNode.d.ts +87 -0
- package/dist/script/ScriptNode.js +273 -0
- package/dist/script/ScriptNode.js.map +1 -0
- package/dist/script/ScriptPathElement.d.ts +30 -0
- package/dist/script/ScriptPathElement.js +3 -0
- package/dist/script/ScriptPathElement.js.map +1 -0
- package/dist/script/ScriptRoot.d.ts +61 -0
- package/dist/script/ScriptRoot.js +331 -0
- package/dist/script/ScriptRoot.js.map +1 -0
- package/dist/script/ScriptTranspiler.d.ts +18 -0
- package/dist/script/ScriptTranspiler.js +122 -0
- package/dist/script/ScriptTranspiler.js.map +1 -0
- package/dist/script/SnapshotHistoryRecorder.d.ts +12 -0
- package/dist/script/SnapshotHistoryRecorder.js +175 -0
- package/dist/script/SnapshotHistoryRecorder.js.map +1 -0
- package/dist/script/TsConfig.d.ts +26 -0
- package/dist/script/TsConfig.js +110 -0
- package/dist/script/TsConfig.js.map +1 -0
- package/dist/session/SessionManager.d.ts +77 -0
- package/dist/session/SessionManager.js +290 -0
- package/dist/session/SessionManager.js.map +1 -0
- package/dist/testing/MockFileSystem.d.ts +37 -0
- package/dist/testing/MockFileSystem.js +249 -0
- package/dist/testing/MockFileSystem.js.map +1 -0
- package/dist/testing/TestableFactory.d.ts +61 -0
- package/dist/testing/TestableFactory.js +3 -0
- package/dist/testing/TestableFactory.js.map +1 -0
- package/dist/types.d.ts +577 -0
- package/dist/types.js +3 -0
- package/dist/types.js.map +1 -0
- package/dist/update/UpdateService.d.ts +126 -0
- package/dist/update/UpdateService.js +351 -0
- package/dist/update/UpdateService.js.map +1 -0
- package/dist/update/index.d.ts +2 -0
- package/dist/update/index.js +6 -0
- package/dist/update/index.js.map +1 -0
- package/dist/update/types.d.ts +96 -0
- package/dist/update/types.js +3 -0
- package/dist/update/types.js.map +1 -0
- package/package.json +43 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TestableFactory.js","sourceRoot":"","sources":["../../src/testing/TestableFactory.ts"],"names":[],"mappings":""}
|
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,577 @@
|
|
|
1
|
+
import type { ScriptKey } from "./data/ScriptKey";
|
|
2
|
+
/**
|
|
3
|
+
* A map-like interface that only allows read operations.
|
|
4
|
+
*/
|
|
5
|
+
export interface ReadOnlyMap<T> {
|
|
6
|
+
get(key: string): T | undefined;
|
|
7
|
+
has(key: string): boolean;
|
|
8
|
+
forEach(callback: (value: T, key: string, map: this) => void): void;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* A JSON-compatible primitive value.
|
|
12
|
+
*/
|
|
13
|
+
export type JsonPrimitive = string | number | boolean | null;
|
|
14
|
+
/**
|
|
15
|
+
* A JSON-compatible array.
|
|
16
|
+
*/
|
|
17
|
+
export type JsonArray = JsonValue[];
|
|
18
|
+
/**
|
|
19
|
+
* A JSON-compatible object.
|
|
20
|
+
*/
|
|
21
|
+
export type JsonObject = {
|
|
22
|
+
[key: string]: JsonValue;
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* A plain JSON-compatible value: a primitive, an array of JSON values, or an object of JSON values.
|
|
26
|
+
*
|
|
27
|
+
* By design, this should be a value such that it can round-trip through JSON without loss:
|
|
28
|
+
* ```typescript
|
|
29
|
+
* Util.deepEquals(JSON.parse(JSON.stringify(obj)), obj) === true
|
|
30
|
+
* ```
|
|
31
|
+
*
|
|
32
|
+
* @example
|
|
33
|
+
* const example1: JsonValue = 42;
|
|
34
|
+
* const example2: JsonValue = [1, "two", false, null];
|
|
35
|
+
* const example3: JsonValue = { k1: "v1", k2: 2, k3: [true, 5], k4: { nestedKey: "something" } };
|
|
36
|
+
*/
|
|
37
|
+
export type JsonValue = JsonPrimitive | JsonArray | JsonObject;
|
|
38
|
+
/**
|
|
39
|
+
* A nested object where all values are primitives or other nested objects.
|
|
40
|
+
*
|
|
41
|
+
* @example
|
|
42
|
+
* const example1: PrimitiveNestedObject = { k1: "value", k2: 42, k3: true };
|
|
43
|
+
* const example2: PrimitiveNestedObject = { nested: { k1: "value" }, k2: 100 };
|
|
44
|
+
* const example3: PrimitiveNestedObject = { k1: null, k2: { k3: false } };
|
|
45
|
+
*/
|
|
46
|
+
export type PrimitiveNestedObject = {
|
|
47
|
+
[key: string]: JsonPrimitive | PrimitiveNestedObject;
|
|
48
|
+
};
|
|
49
|
+
/**
|
|
50
|
+
* The structure of a WebDAV XML response.
|
|
51
|
+
*/
|
|
52
|
+
export type XMLResponse = {
|
|
53
|
+
"?xml": {
|
|
54
|
+
"@version"?: string;
|
|
55
|
+
"@encoding"?: string;
|
|
56
|
+
};
|
|
57
|
+
"D:multistatus": {
|
|
58
|
+
"D:response": {
|
|
59
|
+
"D:href": string;
|
|
60
|
+
"D:propstat": {
|
|
61
|
+
"D:status": string;
|
|
62
|
+
"D:prop": {
|
|
63
|
+
"D:creationdate"?: string;
|
|
64
|
+
"D:displayname"?: string;
|
|
65
|
+
"D:getlastmodified"?: string;
|
|
66
|
+
"D:lockdiscovery"?: unknown;
|
|
67
|
+
"D:resourcetype"?: {
|
|
68
|
+
"D:collection"?: unknown;
|
|
69
|
+
};
|
|
70
|
+
"D:supportedlock"?: {
|
|
71
|
+
"D:lockentry": {
|
|
72
|
+
"D:lockscope": {
|
|
73
|
+
"D:exclusive": string;
|
|
74
|
+
};
|
|
75
|
+
"D:locktype": {
|
|
76
|
+
"D:write": string;
|
|
77
|
+
};
|
|
78
|
+
};
|
|
79
|
+
};
|
|
80
|
+
"D:getcontentlength"?: string;
|
|
81
|
+
};
|
|
82
|
+
};
|
|
83
|
+
}[];
|
|
84
|
+
};
|
|
85
|
+
};
|
|
86
|
+
/**
|
|
87
|
+
* data requisite to manage an individual login session
|
|
88
|
+
*/
|
|
89
|
+
export type SessionData = {
|
|
90
|
+
/**
|
|
91
|
+
* timestamp of the last time this session was used
|
|
92
|
+
*/
|
|
93
|
+
lastTouched: number;
|
|
94
|
+
/**
|
|
95
|
+
* the JSESSIONID cookie value used by tomcat to identify the session
|
|
96
|
+
*/
|
|
97
|
+
JSESSIONID: string | null;
|
|
98
|
+
/**
|
|
99
|
+
* the INGRESSCOOKIE cookie value used by the ingress controller to identify the session
|
|
100
|
+
*/
|
|
101
|
+
INGRESSCOOKIE: string | null;
|
|
102
|
+
/**
|
|
103
|
+
* the last CSRF token received from the server
|
|
104
|
+
*/
|
|
105
|
+
lastCsrfToken: string | null;
|
|
106
|
+
};
|
|
107
|
+
/**
|
|
108
|
+
* Basic auth information.
|
|
109
|
+
*/
|
|
110
|
+
export type BasicAuthParams = {
|
|
111
|
+
username: string;
|
|
112
|
+
password: string;
|
|
113
|
+
};
|
|
114
|
+
/**
|
|
115
|
+
* GQL response for script queries, either "good" or "bad".
|
|
116
|
+
*/
|
|
117
|
+
export type ScriptGqlResp = ScriptGQLGoodResp | ScriptGQLBadResp;
|
|
118
|
+
/**
|
|
119
|
+
* how a GQL response looks when it is "good"
|
|
120
|
+
*
|
|
121
|
+
* //TODO this is incomplete for every GQL query possible. This should be tied to specific queries
|
|
122
|
+
*/
|
|
123
|
+
export type ScriptGQLGoodResp = {
|
|
124
|
+
data: {
|
|
125
|
+
children: [
|
|
126
|
+
{
|
|
127
|
+
children: {
|
|
128
|
+
items: [
|
|
129
|
+
{
|
|
130
|
+
id: string;
|
|
131
|
+
}
|
|
132
|
+
];
|
|
133
|
+
};
|
|
134
|
+
}
|
|
135
|
+
];
|
|
136
|
+
};
|
|
137
|
+
};
|
|
138
|
+
/**
|
|
139
|
+
* how a GQL response looks when there were errors with the query
|
|
140
|
+
*/
|
|
141
|
+
export type ScriptGQLBadResp = {
|
|
142
|
+
errors: [
|
|
143
|
+
{
|
|
144
|
+
message: string;
|
|
145
|
+
}
|
|
146
|
+
];
|
|
147
|
+
};
|
|
148
|
+
/**
|
|
149
|
+
* Options needed to to override the source in a script operation.
|
|
150
|
+
*/
|
|
151
|
+
export type SourceOps = {
|
|
152
|
+
sourceOrigin: string;
|
|
153
|
+
topId: string;
|
|
154
|
+
};
|
|
155
|
+
/**
|
|
156
|
+
* The metadata for the Script objects used locally.
|
|
157
|
+
* //TODO: we should eventually
|
|
158
|
+
*/
|
|
159
|
+
export type ScriptMetaData = {
|
|
160
|
+
/**
|
|
161
|
+
* The WebDAV ID extracted from the file path.
|
|
162
|
+
*/
|
|
163
|
+
webdavId: string;
|
|
164
|
+
/**
|
|
165
|
+
* The name of the script.
|
|
166
|
+
*/
|
|
167
|
+
scriptName: string;
|
|
168
|
+
/**
|
|
169
|
+
* the org's seqnum
|
|
170
|
+
*/
|
|
171
|
+
U: string;
|
|
172
|
+
/**
|
|
173
|
+
* the script's unique key (seqnum and classid pair).
|
|
174
|
+
*
|
|
175
|
+
* Automatically hydrated into a {@link ScriptKey} instance by the persistence layer
|
|
176
|
+
* via the `__storable` tag; serialized back to plain JSON via {@link ScriptKey.toJSON}.
|
|
177
|
+
*/
|
|
178
|
+
scriptKey: ScriptKey;
|
|
179
|
+
/**
|
|
180
|
+
* push/pull records for the script.
|
|
181
|
+
*/
|
|
182
|
+
pushPullRecords: {
|
|
183
|
+
/**
|
|
184
|
+
* actual location of the file locally
|
|
185
|
+
*/
|
|
186
|
+
downstairsPath: string;
|
|
187
|
+
/**
|
|
188
|
+
* the hash of the file when it was last verified (after a push or pull)
|
|
189
|
+
*/
|
|
190
|
+
lastVerifiedHash: string | null;
|
|
191
|
+
}[];
|
|
192
|
+
};
|
|
193
|
+
/**
|
|
194
|
+
* This is the content of a metadata.json found in every script folder.
|
|
195
|
+
*
|
|
196
|
+
* It is used to store various metadata about the script.
|
|
197
|
+
*
|
|
198
|
+
* //TODO this is incomplete and is not correct for all Script types
|
|
199
|
+
*/
|
|
200
|
+
export type MetaDataDotJsonContent = {
|
|
201
|
+
/**
|
|
202
|
+
* //TODO
|
|
203
|
+
*/
|
|
204
|
+
displayName: string;
|
|
205
|
+
/**
|
|
206
|
+
* //TODO
|
|
207
|
+
*/
|
|
208
|
+
description: string;
|
|
209
|
+
/**
|
|
210
|
+
* //TODO
|
|
211
|
+
*/
|
|
212
|
+
_postAncestorId: string;
|
|
213
|
+
/**
|
|
214
|
+
* //TODO
|
|
215
|
+
*/
|
|
216
|
+
disabled: boolean;
|
|
217
|
+
/**
|
|
218
|
+
* //TODO
|
|
219
|
+
*/
|
|
220
|
+
frozen: boolean;
|
|
221
|
+
/**
|
|
222
|
+
* //TODO
|
|
223
|
+
*/
|
|
224
|
+
fixedId: string;
|
|
225
|
+
/**
|
|
226
|
+
* this is a newline separated list of key=value altids
|
|
227
|
+
* @example
|
|
228
|
+
* altIds: "FID=value1\nSID=value2\nGID=value3"
|
|
229
|
+
*/
|
|
230
|
+
altIds: string;
|
|
231
|
+
/**
|
|
232
|
+
* //TODO
|
|
233
|
+
*/
|
|
234
|
+
path: string;
|
|
235
|
+
/**
|
|
236
|
+
* //TODO
|
|
237
|
+
*/
|
|
238
|
+
deniedIPs: string;
|
|
239
|
+
/**
|
|
240
|
+
* //TODO
|
|
241
|
+
*/
|
|
242
|
+
allowedIPs: string;
|
|
243
|
+
/**
|
|
244
|
+
* //TODO
|
|
245
|
+
*/
|
|
246
|
+
IPFilterExemptGroupKey: string;
|
|
247
|
+
/**
|
|
248
|
+
* //TODO
|
|
249
|
+
*/
|
|
250
|
+
IPFilterPermissionOption: "Error";
|
|
251
|
+
/**
|
|
252
|
+
* //TODO
|
|
253
|
+
*/
|
|
254
|
+
basicPermissionOption: "Error";
|
|
255
|
+
/**
|
|
256
|
+
* //TODO
|
|
257
|
+
*/
|
|
258
|
+
httpOption: "HttpsRedirect" | "HttpsOnly" | "HttpAndHttps";
|
|
259
|
+
/**
|
|
260
|
+
* //TODO
|
|
261
|
+
*/
|
|
262
|
+
allowedMethods?: string[];
|
|
263
|
+
};
|
|
264
|
+
/**
|
|
265
|
+
* propagation behavior options for scripts
|
|
266
|
+
*/
|
|
267
|
+
type PropagationBehaviorTypes = "MANDATORY" | "NESTED" | "NEVER" | "NOT_SUPPORTED" | "REQUIRED" | "REQUIRES_NEW" | "SUPPORTS";
|
|
268
|
+
/**
|
|
269
|
+
* sandbox size options for scripts
|
|
270
|
+
*
|
|
271
|
+
* see platform documentation for details
|
|
272
|
+
*/
|
|
273
|
+
type SandboxSizes = "XXX_SMALL" | "XX_SMALL" | "X_SMALL" | "SMALL" | "MEDIUM_SMALL" | "MEDIUM" | "MEDIUM_LARGE" | "LARGE" | "X_LARGE" | "XX_LARGE" | "XXX_LARGE" | "UNLIMITED";
|
|
274
|
+
/**
|
|
275
|
+
* This is the content of a config.json found in every script folder.
|
|
276
|
+
*/
|
|
277
|
+
export type ConfigJsonContent = {
|
|
278
|
+
/**
|
|
279
|
+
* the main script file to execute (relative to the script folder)
|
|
280
|
+
*
|
|
281
|
+
* technically this can be any path but by convention it is always "../scripts/app"
|
|
282
|
+
*/
|
|
283
|
+
main: "../scripts/app";
|
|
284
|
+
/**
|
|
285
|
+
* propagation behavior for this script
|
|
286
|
+
*/
|
|
287
|
+
propagationBehavior: PropagationBehaviorTypes;
|
|
288
|
+
/**
|
|
289
|
+
* //TODO
|
|
290
|
+
*/
|
|
291
|
+
transactionReadonly: boolean;
|
|
292
|
+
/**
|
|
293
|
+
* //TODO
|
|
294
|
+
*/
|
|
295
|
+
transactionTimeout: string | number;
|
|
296
|
+
/**
|
|
297
|
+
* sandbox size
|
|
298
|
+
*/
|
|
299
|
+
sandbox: SandboxSizes;
|
|
300
|
+
/**
|
|
301
|
+
* //TODO
|
|
302
|
+
*/
|
|
303
|
+
expiresBy: string;
|
|
304
|
+
/**
|
|
305
|
+
* "Local external" modules
|
|
306
|
+
*/
|
|
307
|
+
models?: {
|
|
308
|
+
name: string;
|
|
309
|
+
url: string;
|
|
310
|
+
}[];
|
|
311
|
+
/**
|
|
312
|
+
* //TODO
|
|
313
|
+
*/
|
|
314
|
+
language: "mjs";
|
|
315
|
+
/**
|
|
316
|
+
* //TODO
|
|
317
|
+
*/
|
|
318
|
+
scriptlibrary: "private";
|
|
319
|
+
};
|
|
320
|
+
/**
|
|
321
|
+
* The settings used by the extension.
|
|
322
|
+
*/
|
|
323
|
+
export type Settings = {
|
|
324
|
+
/**
|
|
325
|
+
* Whether debug mode is enabled.
|
|
326
|
+
*/
|
|
327
|
+
debugMode: {
|
|
328
|
+
/**
|
|
329
|
+
* Whether debug mode is enabled.
|
|
330
|
+
*/
|
|
331
|
+
enabled: boolean;
|
|
332
|
+
/**
|
|
333
|
+
* If in debug mode, the URLs to use for anyDomain lookups instead of the actual domain.
|
|
334
|
+
*/
|
|
335
|
+
anyDomainOverrideUrl: string;
|
|
336
|
+
/**
|
|
337
|
+
* If set, this version string will override the actual extension version for update checks.
|
|
338
|
+
*/
|
|
339
|
+
versionOverride: string;
|
|
340
|
+
};
|
|
341
|
+
/**
|
|
342
|
+
* Settings related to update checks.
|
|
343
|
+
*/
|
|
344
|
+
updateCheck: {
|
|
345
|
+
/**
|
|
346
|
+
* Whether update checks are enabled.
|
|
347
|
+
*/
|
|
348
|
+
enabled: boolean;
|
|
349
|
+
/**
|
|
350
|
+
* Whether to show notifications about updates.
|
|
351
|
+
*/
|
|
352
|
+
showNotifications: boolean;
|
|
353
|
+
};
|
|
354
|
+
/**
|
|
355
|
+
* Settings for which popups to squelch
|
|
356
|
+
*/
|
|
357
|
+
/**
|
|
358
|
+
* Whether advanced features are shown.
|
|
359
|
+
*/
|
|
360
|
+
advancedMode: {
|
|
361
|
+
/**
|
|
362
|
+
* Whether advanced mode is enabled.
|
|
363
|
+
*/
|
|
364
|
+
enabled: boolean;
|
|
365
|
+
};
|
|
366
|
+
squelch: {
|
|
367
|
+
/**
|
|
368
|
+
* the pull-complete notification
|
|
369
|
+
*/
|
|
370
|
+
pullComplete: boolean;
|
|
371
|
+
/**
|
|
372
|
+
* the push-complete notification
|
|
373
|
+
*/
|
|
374
|
+
pushComplete: boolean;
|
|
375
|
+
};
|
|
376
|
+
/**
|
|
377
|
+
* Settings for the local script root directory.
|
|
378
|
+
*/
|
|
379
|
+
scriptRoot: {
|
|
380
|
+
/**
|
|
381
|
+
* The absolute path to the local folder where scripts are pulled into.
|
|
382
|
+
* If empty, defaults to the first workspace folder.
|
|
383
|
+
*/
|
|
384
|
+
path: string;
|
|
385
|
+
};
|
|
386
|
+
};
|
|
387
|
+
/**
|
|
388
|
+
* TypeScript configuration options (tsconfig.json structure).
|
|
389
|
+
*
|
|
390
|
+
* @see https://www.typescriptlang.org/tsconfig
|
|
391
|
+
*/
|
|
392
|
+
export type TsConfig = {
|
|
393
|
+
/**
|
|
394
|
+
* Compiler options that control how TypeScript compiles your code.
|
|
395
|
+
*/
|
|
396
|
+
compilerOptions: {
|
|
397
|
+
/** Target JavaScript version (ES3, ES5, ES2015, ES2017, ES2018, ES2019, ES2020, ES2021, ES2022, ESNext) */
|
|
398
|
+
target?: string;
|
|
399
|
+
/** Module system (CommonJS, AMD, UMD, System, ES6, ES2015, ES2020, ES2022, ESNext, Node16, NodeNext) */
|
|
400
|
+
module?: string;
|
|
401
|
+
/** Built-in library files to include (ES5, ES2015, DOM, WebWorker, etc.) */
|
|
402
|
+
lib?: string[];
|
|
403
|
+
/** Allow JavaScript files to be compiled */
|
|
404
|
+
allowJs?: boolean;
|
|
405
|
+
/** Report errors in .js files */
|
|
406
|
+
checkJs?: boolean;
|
|
407
|
+
/** Generate .d.ts declaration files */
|
|
408
|
+
declaration?: boolean;
|
|
409
|
+
/** Generate source map files */
|
|
410
|
+
sourceMap?: boolean;
|
|
411
|
+
/** Output directory for compiled files */
|
|
412
|
+
outDir?: string;
|
|
413
|
+
/** Root directory of source files */
|
|
414
|
+
rootDir?: string;
|
|
415
|
+
/** Remove comments from output */
|
|
416
|
+
removeComments?: boolean;
|
|
417
|
+
/** Don't emit files if any type checking errors are reported */
|
|
418
|
+
noEmitOnError?: boolean;
|
|
419
|
+
/** Don't emit any files */
|
|
420
|
+
noEmit?: boolean;
|
|
421
|
+
/** Preserve const enums in generated code */
|
|
422
|
+
preserveConstEnums?: boolean;
|
|
423
|
+
/** Generate .d.ts.map files for declaration files */
|
|
424
|
+
declarationMap?: boolean;
|
|
425
|
+
/** Enable all strict type checking options */
|
|
426
|
+
strict?: boolean;
|
|
427
|
+
/** Raise error on expressions and declarations with an implied 'any' type */
|
|
428
|
+
noImplicitAny?: boolean;
|
|
429
|
+
/** Enable strict null checks */
|
|
430
|
+
strictNullChecks?: boolean;
|
|
431
|
+
/** Enable strict checking of function types */
|
|
432
|
+
strictFunctionTypes?: boolean;
|
|
433
|
+
/** Enable strict 'bind', 'call', and 'apply' methods on functions */
|
|
434
|
+
strictBindCallApply?: boolean;
|
|
435
|
+
/** Enable strict checking of property initialization in classes */
|
|
436
|
+
strictPropertyInitialization?: boolean;
|
|
437
|
+
/** Raise error on 'this' expressions with an implied 'any' type */
|
|
438
|
+
noImplicitThis?: boolean;
|
|
439
|
+
/** Enable error reporting for codepaths that do not explicitly return in a function */
|
|
440
|
+
noImplicitReturns?: boolean;
|
|
441
|
+
/** Enable error reporting for fallthrough cases in switch statements */
|
|
442
|
+
noFallthroughCasesInSwitch?: boolean;
|
|
443
|
+
/** Include 'undefined' in index signature results */
|
|
444
|
+
noUncheckedIndexedAccess?: boolean;
|
|
445
|
+
/** Report errors on unused locals */
|
|
446
|
+
noUnusedLocals?: boolean;
|
|
447
|
+
/** Report errors on unused parameters */
|
|
448
|
+
noUnusedParameters?: boolean;
|
|
449
|
+
/** Disable error reporting for unused labels */
|
|
450
|
+
allowUnusedLabels?: boolean;
|
|
451
|
+
/** Disable error reporting for unreachable code */
|
|
452
|
+
allowUnreachableCode?: boolean;
|
|
453
|
+
/** Allow importing .json files */
|
|
454
|
+
resolveJsonModule?: boolean;
|
|
455
|
+
/** Allow 'import x from y' when a module doesn't have a default export */
|
|
456
|
+
allowSyntheticDefaultImports?: boolean;
|
|
457
|
+
/** Emit additional JavaScript to ease support for importing CommonJS modules */
|
|
458
|
+
esModuleInterop?: boolean;
|
|
459
|
+
/** Ensure each file can be safely transpiled without relying on other imports */
|
|
460
|
+
isolatedModules?: boolean;
|
|
461
|
+
/** Base directory to resolve non-relative module names */
|
|
462
|
+
baseUrl?: string;
|
|
463
|
+
/** Path mapping entries for module resolution */
|
|
464
|
+
paths?: Record<string, string[]>;
|
|
465
|
+
/** List of TypeScript language service plugins to load */
|
|
466
|
+
plugins?: Array<{
|
|
467
|
+
name: string;
|
|
468
|
+
[key: string]: any;
|
|
469
|
+
}>;
|
|
470
|
+
/** Ensure that casing is correct in imports */
|
|
471
|
+
forceConsistentCasingInFileNames?: boolean;
|
|
472
|
+
/** Skip type checking of declaration files */
|
|
473
|
+
skipLibCheck?: boolean;
|
|
474
|
+
/** Allow accessing UMD globals from modules */
|
|
475
|
+
allowUmdGlobalAccess?: boolean;
|
|
476
|
+
/** Use the pre-TypeScript 4.1 behavior for keyof */
|
|
477
|
+
keyofStringsOnly?: boolean;
|
|
478
|
+
/** Suppress excess property errors for object literals */
|
|
479
|
+
suppressExcessPropertyErrors?: boolean;
|
|
480
|
+
/** Suppress noImplicitAny errors for indexing objects lacking index signatures */
|
|
481
|
+
suppressImplicitAnyIndexErrors?: boolean;
|
|
482
|
+
/** Disable watching file/directory changes */
|
|
483
|
+
watchFile?: string;
|
|
484
|
+
/** Disable watching directory changes */
|
|
485
|
+
watchDirectory?: string;
|
|
486
|
+
/** Disable watching of the fallback poll when using file system events */
|
|
487
|
+
fallbackPolling?: string;
|
|
488
|
+
/** Synchronously call callbacks and update the state of directory watchers */
|
|
489
|
+
synchronousWatchDirectory?: boolean;
|
|
490
|
+
/** Print names of files part of the compilation */
|
|
491
|
+
listFiles?: boolean;
|
|
492
|
+
/** Print the compiler's version */
|
|
493
|
+
version?: boolean;
|
|
494
|
+
/** Print help message */
|
|
495
|
+
help?: boolean;
|
|
496
|
+
/** Enable verbose logging */
|
|
497
|
+
verbose?: boolean;
|
|
498
|
+
/** Build all projects in the current directory */
|
|
499
|
+
build?: boolean;
|
|
500
|
+
/** Delete outputs of all projects */
|
|
501
|
+
clean?: boolean;
|
|
502
|
+
/** Enable project compilation */
|
|
503
|
+
composite?: boolean;
|
|
504
|
+
/** Generate .tsbuildinfo files to allow for incremental compilation */
|
|
505
|
+
incremental?: boolean;
|
|
506
|
+
/** File to store incremental compilation information */
|
|
507
|
+
tsBuildInfoFile?: string;
|
|
508
|
+
/** Use color and formatting in output */
|
|
509
|
+
pretty?: boolean;
|
|
510
|
+
/** Do not truncate error messages */
|
|
511
|
+
noErrorTruncation?: boolean;
|
|
512
|
+
/** Report errors if a program tries to include a file twice */
|
|
513
|
+
skipDefaultLibCheck?: boolean;
|
|
514
|
+
};
|
|
515
|
+
/** Files or patterns to include in compilation */
|
|
516
|
+
include?: string[];
|
|
517
|
+
/** Files or patterns to exclude from compilation */
|
|
518
|
+
exclude?: string[];
|
|
519
|
+
/** Specific files to include (overrides include/exclude) */
|
|
520
|
+
files?: string[];
|
|
521
|
+
/** Project references for multi-project builds */
|
|
522
|
+
references?: Array<{
|
|
523
|
+
path: string;
|
|
524
|
+
prepend?: boolean;
|
|
525
|
+
}>;
|
|
526
|
+
/** Extends another configuration file */
|
|
527
|
+
extends?: string | string[];
|
|
528
|
+
/** Options to pass to the TypeScript compiler API */
|
|
529
|
+
compileOnSave?: boolean;
|
|
530
|
+
/** Type acquisition options for JavaScript projects */
|
|
531
|
+
typeAcquisition?: {
|
|
532
|
+
enable?: boolean;
|
|
533
|
+
include?: string[];
|
|
534
|
+
exclude?: string[];
|
|
535
|
+
disableFilenameBasedTypeAcquisition?: boolean;
|
|
536
|
+
};
|
|
537
|
+
/** Watch options for file watching in --watch mode */
|
|
538
|
+
watchOptions?: {
|
|
539
|
+
watchFile?: "fixedPollingInterval" | "priorityPollingInterval" | "dynamicPriorityPolling" | "useFsEvents" | "useFsEventsOnParentDirectory";
|
|
540
|
+
watchDirectory?: "useFsEvents" | "fixedPollingInterval" | "dynamicPriorityPolling";
|
|
541
|
+
fallbackPolling?: "fixedPollingInterval" | "priorityPollingInterval" | "dynamicPriorityPolling" | "synchronousWatchDirectory";
|
|
542
|
+
synchronousWatchDirectory?: boolean;
|
|
543
|
+
excludeDirectories?: string[];
|
|
544
|
+
excludeFiles?: string[];
|
|
545
|
+
};
|
|
546
|
+
};
|
|
547
|
+
/**
|
|
548
|
+
* An element in the OrgCache, representing a known host and the last access time.
|
|
549
|
+
*/
|
|
550
|
+
export type OrgCacheElement = {
|
|
551
|
+
/**
|
|
552
|
+
* a list of known hosts for this org
|
|
553
|
+
*/
|
|
554
|
+
host: string;
|
|
555
|
+
/**
|
|
556
|
+
* the last time this entry was accessed
|
|
557
|
+
*/
|
|
558
|
+
lastAccess: number;
|
|
559
|
+
};
|
|
560
|
+
/**
|
|
561
|
+
* The response from the BlueHQ endpoint when calling for any domain.
|
|
562
|
+
*/
|
|
563
|
+
export type BlueHqAnyUrlResp = {
|
|
564
|
+
orgUrl: string;
|
|
565
|
+
};
|
|
566
|
+
/**
|
|
567
|
+
* The response from the GQL parents query.
|
|
568
|
+
*/
|
|
569
|
+
export type GqlParentNameResp = {
|
|
570
|
+
data: {
|
|
571
|
+
parents: {
|
|
572
|
+
id: string;
|
|
573
|
+
displayName: string | null;
|
|
574
|
+
}[];
|
|
575
|
+
};
|
|
576
|
+
};
|
|
577
|
+
export {};
|
package/dist/types.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":""}
|