thinkwork-cli 0.13.1 → 0.13.2
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/{api-client-4DZ266J5.js → api-client-JYZXYQJR.js} +3 -1
- package/dist/bowser-6Z6JFAIR.js +2822 -0
- package/dist/chunk-DV3MRBR5.js +43 -0
- package/dist/chunk-DVPBI5HM.js +1728 -0
- package/dist/chunk-EI5ZX7CN.js +522 -0
- package/dist/chunk-EUJ7X6YD.js +126 -0
- package/dist/chunk-GG5WKBOX.js +436 -0
- package/dist/chunk-I64EZSU5.js +358 -0
- package/dist/chunk-ILZKG5WV.js +6151 -0
- package/dist/chunk-KMIJ5KGT.js +128 -0
- package/dist/chunk-OCPHU34C.js +996 -0
- package/dist/chunk-QOERT44A.js +3286 -0
- package/dist/chunk-XYM7PE2A.js +2264 -0
- package/dist/{chunk-Y2WHJECR.js → chunk-Z2F6RJFR.js} +1 -39
- package/dist/cli.js +43080 -13150
- package/dist/dist-es-CRV46D5B.js +315 -0
- package/dist/dist-es-DCY4IC3Y.js +2000 -0
- package/dist/dist-es-ENBUC3JP.js +14726 -0
- package/dist/dist-es-G54LBMRN.js +48 -0
- package/dist/dist-es-G7PTG75M.js +176 -0
- package/dist/dist-es-GKDBE7E6.js +88 -0
- package/dist/dist-es-HY3535OI.js +70 -0
- package/dist/dist-es-KL7Y5NB2.js +377 -0
- package/dist/dist-es-LDE437AM.js +170 -0
- package/dist/dist-es-P26FWFLT.js +485 -0
- package/dist/dist-es-Q57SZXZ7.js +70 -0
- package/dist/dist-es-R7FGL2IB.js +88 -0
- package/dist/dist-es-USORBXZ5.js +318 -0
- package/dist/dist-es-ZKC2QKD2.js +377 -0
- package/dist/drizzle/0076_scheduled_jobs_marco_backfill.sql +2 -1
- package/dist/drizzle/0079_seed_tenant_customize_catalog.sql +1 -0
- package/dist/drizzle/0090_brain_schema_extraction.sql +10 -0
- package/dist/drizzle/0132_drop_computer_tables.sql +3 -0
- package/dist/drizzle/0160_compliance_event_types_plugins.sql +2 -0
- package/dist/drizzle/0214_think137_drop_judge_evidence_roi.sql +1 -0
- package/dist/drizzle/0216_drop_agent_loop_versions_goal_worker_policy.sql +1 -0
- package/dist/drizzle/0227_analyst_reader_role.sql +6 -0
- package/dist/drizzle/0230_analyst_rls.sql +9 -0
- package/dist/drizzle/0250_kg_schema_extraction.sql +27 -0
- package/dist/drizzle/0251_brain_stragglers.sql +21 -0
- package/dist/drizzle/0253_drop_brain_substrate.sql +2 -0
- package/dist/drizzle/0257_agents_runtime_allow_harness.sql +24 -0
- package/dist/drizzle/0261_managed_harness_multiplayer.sql +313 -0
- package/dist/drizzle/0261_native_auth_control_plane.sql +328 -0
- package/dist/drizzle/0262_auth_subscription_tickets.sql +59 -0
- package/dist/drizzle/0262_parallel_harness_threads.sql +9 -0
- package/dist/drizzle/0263_agentcore_runtime_identifier.sql +69 -0
- package/dist/drizzle/0263_drop_workos_auth_runtime.sql +236 -0
- package/dist/drizzle/0264_auth_enrollment_attempt_limits.sql +15 -0
- package/dist/drizzle/0264_harness_tool_execution_ledger.sql +113 -0
- package/dist/drizzle/0265_eval_runs_requester_identity.sql +28 -0
- package/dist/drizzle/0265_require_fully_valid_auth_publication.sql +27 -0
- package/dist/drizzle/0266_auth_identity_recovery_grants.sql +9 -0
- package/dist/drizzle/0266_eval_profiles_runtime_type.sql +12 -0
- package/dist/drizzle/0267_ontology_candidate_rejections.sql +53 -0
- package/dist/drizzle/0268_identity_crosswalk_routing.sql +182 -0
- package/dist/drizzle/0269_ontology_system_map.sql +31 -0
- package/dist/event-streams-7JNLJEEL.js +894 -0
- package/dist/event-streams-KDF5RWR6.js +1515 -0
- package/dist/loadSso-DJVB7BXE.js +576 -0
- package/dist/loadSso-JAMNA3WY.js +583 -0
- package/dist/plugins/catalog/package.json +1 -2
- package/dist/plugins/catalog/src/__tests__/build-catalog.test.ts +0 -1
- package/dist/plugins/catalog/src/__tests__/contracts.test.ts +0 -69
- package/dist/plugins/catalog/src/__tests__/plugin-package.test.ts +0 -2
- package/dist/plugins/catalog/src/__tests__/plugin-registry.test.ts +0 -5
- package/dist/plugins/catalog/src/contracts.ts +2 -179
- package/dist/plugins/catalog/src/registry/generated-first-party.ts +0 -6
- package/dist/signin-UGDWTGS4.js +821 -0
- package/dist/sso-oidc-Q4VXANXY.js +837 -0
- package/dist/sts-CWLSE3GH.js +1241 -0
- package/dist/sts-DNZLNVOV.js +1245 -0
- package/dist/terraform/examples/greenfield/main.tf +223 -66
- package/dist/terraform/examples/greenfield/terraform.tfvars.example +15 -1
- package/dist/terraform/modules/app/agentcore-gateway/main.tf +305 -0
- package/dist/terraform/modules/app/agentcore-gateway/outputs.tf +44 -0
- package/dist/terraform/modules/app/agentcore-gateway/scripts/delete_gateway.sh +93 -0
- package/dist/terraform/modules/app/agentcore-gateway/scripts/read_gateway.sh +33 -0
- package/dist/terraform/modules/app/agentcore-gateway/scripts/reconcile_gateway.sh +543 -0
- package/dist/terraform/modules/app/agentcore-gateway/variables.tf +70 -0
- package/dist/terraform/modules/app/agentcore-harness/main.tf +237 -8
- package/dist/terraform/modules/app/agentcore-harness/outputs.tf +63 -0
- package/dist/terraform/modules/app/agentcore-harness/scripts/delete_harness.sh +5 -0
- package/dist/terraform/modules/app/agentcore-harness/scripts/harness-lifecycle.mjs +430 -0
- package/dist/terraform/modules/app/agentcore-harness/scripts/harness-readback.mjs +180 -0
- package/dist/terraform/modules/app/agentcore-harness/scripts/harness-tool-contract.mjs +193 -0
- package/dist/terraform/modules/app/agentcore-harness/scripts/prune_harness.sh +5 -0
- package/dist/terraform/modules/app/agentcore-harness/scripts/read_harness.sh +5 -0
- package/dist/terraform/modules/app/agentcore-harness/scripts/reconcile_harness.sh +5 -0
- package/dist/terraform/modules/app/agentcore-harness/variables.tf +72 -1
- package/dist/terraform/modules/app/agentcore-identity/main.tf +173 -0
- package/dist/terraform/modules/app/agentcore-identity/outputs.tf +51 -0
- package/dist/terraform/modules/app/agentcore-identity/scripts/bootstrap_twenty_oauth_client.sh +122 -0
- package/dist/terraform/modules/app/agentcore-identity/scripts/delete_identity.sh +25 -0
- package/dist/terraform/modules/app/agentcore-identity/scripts/delete_twenty_identity.sh +16 -0
- package/dist/terraform/modules/app/agentcore-identity/scripts/read_identity.sh +40 -0
- package/dist/terraform/modules/app/agentcore-identity/scripts/reconcile_identity.sh +73 -0
- package/dist/terraform/modules/app/agentcore-identity/scripts/reconcile_twenty_identity.sh +74 -0
- package/dist/terraform/modules/app/agentcore-identity/scripts/reconcile_twenty_provider.mjs +61 -0
- package/dist/terraform/modules/app/agentcore-identity/variables.tf +54 -0
- package/dist/terraform/modules/app/appsync-subscriptions/main.tf +127 -21
- package/dist/terraform/modules/app/appsync-subscriptions/outputs.tf +0 -6
- package/dist/terraform/modules/app/appsync-subscriptions/variables.tf +5 -0
- package/dist/terraform/modules/app/deployment-control-plane/runner.py +966 -27
- package/dist/terraform/modules/app/deployment-control-plane/test_runner_bundle.py +581 -22
- package/dist/terraform/modules/app/lambda-api/agentcore-harness-alarms.tf +88 -0
- package/dist/terraform/modules/app/lambda-api/agentcore-identity-alarms.tf +91 -0
- package/dist/terraform/modules/app/lambda-api/handlers.tf +298 -74
- package/dist/terraform/modules/app/lambda-api/iam-grouped.tf +99 -54
- package/dist/terraform/modules/app/lambda-api/main.tf +24 -0
- package/dist/terraform/modules/app/lambda-api/mcp-oauth.tf +181 -4
- package/dist/terraform/modules/app/lambda-api/outputs.tf +35 -0
- package/dist/terraform/modules/app/lambda-api/runtime-config.tf +3 -21
- package/dist/terraform/modules/app/lambda-api/variables.tf +109 -16
- package/dist/terraform/modules/foundation/cognito/main.tf +294 -72
- package/dist/terraform/modules/foundation/cognito/outputs.tf +42 -0
- package/dist/terraform/modules/foundation/cognito/variables.tf +114 -4
- package/dist/terraform/modules/thinkwork/main.tf +269 -46
- package/dist/terraform/modules/thinkwork/outputs.tf +136 -8
- package/dist/terraform/modules/thinkwork/variables.tf +124 -17
- package/dist/terraform/schema.graphql +69 -36
- package/dist/workspace-defaults/files/USER.md +1 -0
- package/package.json +3 -2
- package/dist/drizzle/0261_thread_turns_origin_turn_index.sql +0 -11
- package/dist/plugins/workos-auth/package.json +0 -22
- package/dist/plugins/workos-auth/src/index.ts +0 -30
- package/dist/plugins/workos-auth/src/manifest.ts +0 -40
- package/dist/plugins/workos-auth/src/provider-contract.ts +0 -39
- package/dist/plugins/workos-auth/test/manifest.test.ts +0 -94
- package/dist/plugins/workos-auth/tsconfig.json +0 -8
|
@@ -0,0 +1,358 @@
|
|
|
1
|
+
import { createRequire as __createRequire } from "node:module"; const require = __createRequire(import.meta.url);
|
|
2
|
+
import {
|
|
3
|
+
toUint8Array
|
|
4
|
+
} from "./chunk-OCPHU34C.js";
|
|
5
|
+
|
|
6
|
+
// ../../node_modules/.pnpm/@smithy+core@3.29.5/node_modules/@smithy/core/dist-es/submodules/checksum/crc32/Crc32Node.js
|
|
7
|
+
import * as zlib from "zlib";
|
|
8
|
+
|
|
9
|
+
// ../../node_modules/.pnpm/@smithy+core@3.29.5/node_modules/@smithy/core/dist-es/submodules/checksum/crc32/Crc32Js.js
|
|
10
|
+
var CRC32_TABLE = new Uint32Array(256);
|
|
11
|
+
for (let i = 0; i < 256; ++i) {
|
|
12
|
+
let c = i;
|
|
13
|
+
for (let j = 0; j < 8; ++j) {
|
|
14
|
+
c = c & 1 ? 3988292384 ^ c >>> 1 : c >>> 1;
|
|
15
|
+
}
|
|
16
|
+
CRC32_TABLE[i] = c >>> 0;
|
|
17
|
+
}
|
|
18
|
+
var ONES = 4294967295;
|
|
19
|
+
var Crc32Js = class {
|
|
20
|
+
digestLength = 4;
|
|
21
|
+
checksum = ONES;
|
|
22
|
+
update(data) {
|
|
23
|
+
for (let i = 0; i < data.length; ++i) {
|
|
24
|
+
this.checksum = this.checksum >>> 8 ^ CRC32_TABLE[(this.checksum ^ data[i]) & 255];
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
digestSync() {
|
|
28
|
+
return (this.checksum ^ ONES) >>> 0;
|
|
29
|
+
}
|
|
30
|
+
async digest() {
|
|
31
|
+
const value = this.digestSync();
|
|
32
|
+
const out = new Uint8Array(4);
|
|
33
|
+
new DataView(out.buffer).setUint32(0, value, false);
|
|
34
|
+
return out;
|
|
35
|
+
}
|
|
36
|
+
reset() {
|
|
37
|
+
this.checksum = ONES;
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
// ../../node_modules/.pnpm/@smithy+core@3.29.5/node_modules/@smithy/core/dist-es/submodules/checksum/crc32/Crc32Node.js
|
|
42
|
+
var zlibCrc32 = typeof zlib.crc32 === "function" ? zlib.crc32 : void 0;
|
|
43
|
+
var Crc32Node = zlibCrc32 ? buildNativeClass(zlibCrc32) : Crc32Js;
|
|
44
|
+
function buildNativeClass(nativeCrc32) {
|
|
45
|
+
return class Crc32Node {
|
|
46
|
+
digestLength = 4;
|
|
47
|
+
value = 0;
|
|
48
|
+
update(data) {
|
|
49
|
+
this.value = nativeCrc32(data, this.value);
|
|
50
|
+
}
|
|
51
|
+
digestSync() {
|
|
52
|
+
return this.value >>> 0;
|
|
53
|
+
}
|
|
54
|
+
async digest() {
|
|
55
|
+
const out = new Uint8Array(4);
|
|
56
|
+
new DataView(out.buffer).setUint32(0, this.digestSync(), false);
|
|
57
|
+
return out;
|
|
58
|
+
}
|
|
59
|
+
reset() {
|
|
60
|
+
this.value = 0;
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
// ../../node_modules/.pnpm/@smithy+core@3.29.5/node_modules/@smithy/core/dist-es/submodules/checksum/sha256/Sha256Js.js
|
|
66
|
+
var BLOCK = 64;
|
|
67
|
+
var DIGEST_LENGTH = 32;
|
|
68
|
+
var MAX_HASHABLE_LENGTH = 2 ** 53 - 1;
|
|
69
|
+
var Sha256Js = class _Sha256Js {
|
|
70
|
+
digestLength = DIGEST_LENGTH;
|
|
71
|
+
state = Int32Array.from(INIT);
|
|
72
|
+
w;
|
|
73
|
+
buffer = new Uint8Array(64);
|
|
74
|
+
bufferLength = 0;
|
|
75
|
+
bytesHashed = 0;
|
|
76
|
+
finished = false;
|
|
77
|
+
inner;
|
|
78
|
+
outer;
|
|
79
|
+
constructor(secret) {
|
|
80
|
+
if (secret) {
|
|
81
|
+
const key = _Sha256Js.normalizeKey(secret);
|
|
82
|
+
this.inner = new _Sha256Js();
|
|
83
|
+
this.outer = new _Sha256Js();
|
|
84
|
+
const { inner, outer } = this;
|
|
85
|
+
const pad = new Uint8Array(BLOCK * 2);
|
|
86
|
+
for (let i = 0; i < BLOCK; ++i) {
|
|
87
|
+
pad[i] = 54 ^ key[i];
|
|
88
|
+
pad[i + BLOCK] = 92 ^ key[i];
|
|
89
|
+
}
|
|
90
|
+
inner.update(pad.subarray(0, BLOCK));
|
|
91
|
+
outer.update(pad.subarray(BLOCK));
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
update(data) {
|
|
95
|
+
if (this.finished) {
|
|
96
|
+
throw new Error("Attempted to update an already finished HMAC.");
|
|
97
|
+
}
|
|
98
|
+
if (this.inner) {
|
|
99
|
+
this.inner.update(data);
|
|
100
|
+
return;
|
|
101
|
+
}
|
|
102
|
+
const chunk = toUint8Array(data);
|
|
103
|
+
let position = 0;
|
|
104
|
+
let { byteLength } = chunk;
|
|
105
|
+
this.bytesHashed += byteLength;
|
|
106
|
+
if (this.bytesHashed * 8 > MAX_HASHABLE_LENGTH) {
|
|
107
|
+
throw new Error("Cannot hash more than 2^53 - 1 bits");
|
|
108
|
+
}
|
|
109
|
+
while (byteLength > 0) {
|
|
110
|
+
this.buffer[this.bufferLength++] = chunk[position++];
|
|
111
|
+
byteLength--;
|
|
112
|
+
if (this.bufferLength === BLOCK) {
|
|
113
|
+
this.hashBuffer();
|
|
114
|
+
this.bufferLength = 0;
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
async digest() {
|
|
119
|
+
const { inner, outer } = this;
|
|
120
|
+
if (inner && outer) {
|
|
121
|
+
if (this.finished) {
|
|
122
|
+
throw new Error("Attempted to digest an already finished HMAC.");
|
|
123
|
+
}
|
|
124
|
+
this.finished = true;
|
|
125
|
+
const innerDigest = inner.digestSync();
|
|
126
|
+
outer.update(innerDigest);
|
|
127
|
+
return outer.digestSync();
|
|
128
|
+
}
|
|
129
|
+
return this.digestSync();
|
|
130
|
+
}
|
|
131
|
+
reset() {
|
|
132
|
+
this.state = Int32Array.from(INIT);
|
|
133
|
+
this.buffer = new Uint8Array(64);
|
|
134
|
+
this.bufferLength = 0;
|
|
135
|
+
this.bytesHashed = 0;
|
|
136
|
+
}
|
|
137
|
+
digestSync() {
|
|
138
|
+
const state = this.state.slice();
|
|
139
|
+
const buffer = this.buffer.slice();
|
|
140
|
+
let bufferLength = this.bufferLength;
|
|
141
|
+
const bitsHashed = this.bytesHashed * 8;
|
|
142
|
+
const bufferView = new DataView(buffer.buffer, buffer.byteOffset, buffer.byteLength);
|
|
143
|
+
bufferView.setUint8(bufferLength++, 128);
|
|
144
|
+
if ((bufferLength - 1) % BLOCK >= BLOCK - 8) {
|
|
145
|
+
for (let i = bufferLength; i < BLOCK; ++i) {
|
|
146
|
+
bufferView.setUint8(i, 0);
|
|
147
|
+
}
|
|
148
|
+
this.hashBufferWith(state, buffer);
|
|
149
|
+
bufferLength = 0;
|
|
150
|
+
}
|
|
151
|
+
for (let i = bufferLength; i < BLOCK - 8; ++i) {
|
|
152
|
+
bufferView.setUint8(i, 0);
|
|
153
|
+
}
|
|
154
|
+
bufferView.setUint32(BLOCK - 8, Math.floor(bitsHashed / 4294967296), false);
|
|
155
|
+
bufferView.setUint32(BLOCK - 4, bitsHashed, false);
|
|
156
|
+
this.hashBufferWith(state, buffer);
|
|
157
|
+
const out = new Uint8Array(DIGEST_LENGTH);
|
|
158
|
+
for (let i = 0; i < 8; ++i) {
|
|
159
|
+
out[i * 4] = state[i] >>> 24 & 255;
|
|
160
|
+
out[i * 4 + 1] = state[i] >>> 16 & 255;
|
|
161
|
+
out[i * 4 + 2] = state[i] >>> 8 & 255;
|
|
162
|
+
out[i * 4 + 3] = state[i] >>> 0 & 255;
|
|
163
|
+
}
|
|
164
|
+
return out;
|
|
165
|
+
}
|
|
166
|
+
static normalizeKey(secret) {
|
|
167
|
+
const key = toUint8Array(secret);
|
|
168
|
+
if (key.byteLength > BLOCK) {
|
|
169
|
+
const h = new _Sha256Js();
|
|
170
|
+
h.update(key);
|
|
171
|
+
const out = h.digestSync();
|
|
172
|
+
const padded = new Uint8Array(BLOCK);
|
|
173
|
+
padded.set(out);
|
|
174
|
+
return padded;
|
|
175
|
+
}
|
|
176
|
+
if (key.byteLength < BLOCK) {
|
|
177
|
+
const padded = new Uint8Array(BLOCK);
|
|
178
|
+
padded.set(key);
|
|
179
|
+
return padded;
|
|
180
|
+
}
|
|
181
|
+
return key;
|
|
182
|
+
}
|
|
183
|
+
hashBuffer() {
|
|
184
|
+
this.hashBufferWith(this.state, this.buffer);
|
|
185
|
+
}
|
|
186
|
+
hashBufferWith(state, buffer) {
|
|
187
|
+
const w = this.w ??= new Int32Array(64);
|
|
188
|
+
let s0 = state[0], s1 = state[1], s2 = state[2], s3 = state[3], s4 = state[4], s5 = state[5], s6 = state[6], s7 = state[7];
|
|
189
|
+
for (let i = 0; i < BLOCK; ++i) {
|
|
190
|
+
if (i < 16) {
|
|
191
|
+
w[i] = (buffer[i * 4] & 255) << 24 | (buffer[i * 4 + 1] & 255) << 16 | (buffer[i * 4 + 2] & 255) << 8 | buffer[i * 4 + 3] & 255;
|
|
192
|
+
} else {
|
|
193
|
+
let u = w[i - 2];
|
|
194
|
+
const t12 = (u >>> 17 | u << 15) ^ (u >>> 19 | u << 13) ^ u >>> 10;
|
|
195
|
+
u = w[i - 15];
|
|
196
|
+
const t22 = (u >>> 7 | u << 25) ^ (u >>> 18 | u << 14) ^ u >>> 3;
|
|
197
|
+
w[i] = (t12 + w[i - 7] | 0) + (t22 + w[i - 16] | 0);
|
|
198
|
+
}
|
|
199
|
+
const t1 = (((s4 >>> 6 | s4 << 26) ^ (s4 >>> 11 | s4 << 21) ^ (s4 >>> 25 | s4 << 7)) + (s4 & s5 ^ ~s4 & s6) | 0) + (s7 + (K[i] + w[i] | 0) | 0) | 0;
|
|
200
|
+
const t2 = ((s0 >>> 2 | s0 << 30) ^ (s0 >>> 13 | s0 << 19) ^ (s0 >>> 22 | s0 << 10)) + (s0 & s1 ^ s0 & s2 ^ s1 & s2) | 0;
|
|
201
|
+
s7 = s6;
|
|
202
|
+
s6 = s5;
|
|
203
|
+
s5 = s4;
|
|
204
|
+
s4 = s3 + t1 | 0;
|
|
205
|
+
s3 = s2;
|
|
206
|
+
s2 = s1;
|
|
207
|
+
s1 = s0;
|
|
208
|
+
s0 = t1 + t2 | 0;
|
|
209
|
+
}
|
|
210
|
+
state[0] += s0;
|
|
211
|
+
state[1] += s1;
|
|
212
|
+
state[2] += s2;
|
|
213
|
+
state[3] += s3;
|
|
214
|
+
state[4] += s4;
|
|
215
|
+
state[5] += s5;
|
|
216
|
+
state[6] += s6;
|
|
217
|
+
state[7] += s7;
|
|
218
|
+
}
|
|
219
|
+
};
|
|
220
|
+
var INIT = new Int32Array([
|
|
221
|
+
1779033703,
|
|
222
|
+
3144134277,
|
|
223
|
+
1013904242,
|
|
224
|
+
2773480762,
|
|
225
|
+
1359893119,
|
|
226
|
+
2600822924,
|
|
227
|
+
528734635,
|
|
228
|
+
1541459225
|
|
229
|
+
]);
|
|
230
|
+
var K = new Int32Array([
|
|
231
|
+
1116352408,
|
|
232
|
+
1899447441,
|
|
233
|
+
3049323471,
|
|
234
|
+
3921009573,
|
|
235
|
+
961987163,
|
|
236
|
+
1508970993,
|
|
237
|
+
2453635748,
|
|
238
|
+
2870763221,
|
|
239
|
+
3624381080,
|
|
240
|
+
310598401,
|
|
241
|
+
607225278,
|
|
242
|
+
1426881987,
|
|
243
|
+
1925078388,
|
|
244
|
+
2162078206,
|
|
245
|
+
2614888103,
|
|
246
|
+
3248222580,
|
|
247
|
+
3835390401,
|
|
248
|
+
4022224774,
|
|
249
|
+
264347078,
|
|
250
|
+
604807628,
|
|
251
|
+
770255983,
|
|
252
|
+
1249150122,
|
|
253
|
+
1555081692,
|
|
254
|
+
1996064986,
|
|
255
|
+
2554220882,
|
|
256
|
+
2821834349,
|
|
257
|
+
2952996808,
|
|
258
|
+
3210313671,
|
|
259
|
+
3336571891,
|
|
260
|
+
3584528711,
|
|
261
|
+
113926993,
|
|
262
|
+
338241895,
|
|
263
|
+
666307205,
|
|
264
|
+
773529912,
|
|
265
|
+
1294757372,
|
|
266
|
+
1396182291,
|
|
267
|
+
1695183700,
|
|
268
|
+
1986661051,
|
|
269
|
+
2177026350,
|
|
270
|
+
2456956037,
|
|
271
|
+
2730485921,
|
|
272
|
+
2820302411,
|
|
273
|
+
3259730800,
|
|
274
|
+
3345764771,
|
|
275
|
+
3516065817,
|
|
276
|
+
3600352804,
|
|
277
|
+
4094571909,
|
|
278
|
+
275423344,
|
|
279
|
+
430227734,
|
|
280
|
+
506948616,
|
|
281
|
+
659060556,
|
|
282
|
+
883997877,
|
|
283
|
+
958139571,
|
|
284
|
+
1322822218,
|
|
285
|
+
1537002063,
|
|
286
|
+
1747873779,
|
|
287
|
+
1955562222,
|
|
288
|
+
2024104815,
|
|
289
|
+
2227730452,
|
|
290
|
+
2361852424,
|
|
291
|
+
2428436474,
|
|
292
|
+
2756734187,
|
|
293
|
+
3204031479,
|
|
294
|
+
3329325298
|
|
295
|
+
]);
|
|
296
|
+
|
|
297
|
+
// ../../node_modules/.pnpm/@smithy+core@3.29.5/node_modules/@smithy/core/dist-es/submodules/checksum/sha256/Sha256Node.js
|
|
298
|
+
import { createHash, createHmac } from "crypto";
|
|
299
|
+
var hasNativeCrypto = (() => {
|
|
300
|
+
try {
|
|
301
|
+
createHash("sha256");
|
|
302
|
+
return true;
|
|
303
|
+
} catch {
|
|
304
|
+
return false;
|
|
305
|
+
}
|
|
306
|
+
})();
|
|
307
|
+
var Sha256Node = hasNativeCrypto ? buildNativeClass2() : Sha256Js;
|
|
308
|
+
function buildNativeClass2() {
|
|
309
|
+
return class Sha256Node {
|
|
310
|
+
digestLength = 32;
|
|
311
|
+
secret;
|
|
312
|
+
hash;
|
|
313
|
+
isHmac;
|
|
314
|
+
finished = false;
|
|
315
|
+
constructor(secret) {
|
|
316
|
+
this.secret = secret;
|
|
317
|
+
this.isHmac = !!secret;
|
|
318
|
+
this.hash = this.createHash();
|
|
319
|
+
}
|
|
320
|
+
update(data) {
|
|
321
|
+
if (this.finished) {
|
|
322
|
+
throw new Error("Attempted to update an already finished hash.");
|
|
323
|
+
}
|
|
324
|
+
this.hash.update(data);
|
|
325
|
+
}
|
|
326
|
+
async digest() {
|
|
327
|
+
let buf;
|
|
328
|
+
if (this.isHmac) {
|
|
329
|
+
this.finished = true;
|
|
330
|
+
buf = this.hash.digest();
|
|
331
|
+
} else {
|
|
332
|
+
buf = this.hash.copy().digest();
|
|
333
|
+
}
|
|
334
|
+
return new Uint8Array(buf.buffer, buf.byteOffset, buf.byteLength);
|
|
335
|
+
}
|
|
336
|
+
reset() {
|
|
337
|
+
this.hash = this.createHash();
|
|
338
|
+
this.finished = false;
|
|
339
|
+
}
|
|
340
|
+
createHash() {
|
|
341
|
+
return this.secret ? createHmac("sha256", toBuffer(this.secret)) : createHash("sha256");
|
|
342
|
+
}
|
|
343
|
+
};
|
|
344
|
+
}
|
|
345
|
+
function toBuffer(data) {
|
|
346
|
+
if (typeof data === "string") {
|
|
347
|
+
return data;
|
|
348
|
+
}
|
|
349
|
+
if (ArrayBuffer.isView(data)) {
|
|
350
|
+
return Buffer.from(data.buffer, data.byteOffset, data.byteLength);
|
|
351
|
+
}
|
|
352
|
+
return Buffer.from(data);
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
export {
|
|
356
|
+
Crc32Node,
|
|
357
|
+
Sha256Node
|
|
358
|
+
};
|