@granite-js/pulumi-aws 0.1.34 → 1.0.1

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.
Files changed (82) hide show
  1. package/CHANGELOG.md +4 -116
  2. package/dist/chunk-23MVQUOJ.js +1630 -0
  3. package/dist/chunk-24XYHOWM.js +171 -0
  4. package/dist/chunk-3AVBP57V.js +1598 -0
  5. package/dist/chunk-3JKQPIJ2.js +460 -0
  6. package/dist/{chunk-ITI6QA2Q.js → chunk-3OYGHA4S.js} +1 -1
  7. package/dist/{chunk-IEZY5C3G.js → chunk-46DIC54Q.js} +49 -37
  8. package/dist/chunk-57WYIP4I.js +808 -0
  9. package/dist/{chunk-WCHHWTND.js → chunk-63Q3RLAK.js} +93 -59
  10. package/dist/chunk-6KRYZP6R.js +28 -0
  11. package/dist/{chunk-QAE2S7MG.js → chunk-7NN7DVGK.js} +2050 -552
  12. package/dist/{chunk-5W7B34BN.js → chunk-ASGFIK4A.js} +2231 -464
  13. package/dist/chunk-BTBQTDRJ.js +174 -0
  14. package/dist/chunk-DDZTWBHZ.js +154 -0
  15. package/dist/chunk-G3FWLTNJ.js +10 -0
  16. package/dist/{chunk-TJ744C2T.js → chunk-GJFKL6XM.js} +43 -38
  17. package/dist/chunk-H4QJ5O4E.js +36 -0
  18. package/dist/{chunk-X6XO7USX.js → chunk-LCO5F3JB.js} +109 -56
  19. package/dist/chunk-NDDYFDCU.js +60 -0
  20. package/dist/chunk-OCHPLE5N.js +28 -0
  21. package/dist/chunk-OSJA4YYQ.js +846 -0
  22. package/dist/chunk-PIT3K3NC.js +464 -0
  23. package/dist/chunk-QCKAO4UT.js +476 -0
  24. package/dist/{chunk-64IS37V6.js → chunk-RYIGWCGK.js} +1 -6
  25. package/dist/chunk-S4LJWEXU.js +37 -0
  26. package/dist/chunk-SJ26Y3GW.js +472 -0
  27. package/dist/chunk-TDZTH7TL.js +60 -0
  28. package/dist/chunk-THUA35UY.js +35 -0
  29. package/dist/{chunk-IUKLHJNE.js → chunk-V7TRGEV6.js} +4 -7
  30. package/dist/{chunk-KGNTV362.js → chunk-WDFKVCPC.js} +66 -34
  31. package/dist/{chunk-B7OAPHPY.js → chunk-YWWEFWFD.js} +3 -3
  32. package/dist/chunk-Z4UYYQ4J.js +42 -0
  33. package/dist/chunk-ZBT5SDIQ.js +16528 -0
  34. package/dist/chunk-ZIHRRTTA.js +24 -0
  35. package/dist/{dist-es-CDFIYJVE.js → dist-es-3VZ2IGGJ.js} +18 -15
  36. package/dist/{dist-es-SUPEA6VE-3B5JSW5C.js → dist-es-BQW4ETQH-C7ZSD5EG.js} +8 -25
  37. package/dist/{dist-es-GHYMLBON.js → dist-es-HSWXMGNC.js} +21 -21
  38. package/dist/{dist-es-OCQVKISC-TNAJ62WG.js → dist-es-IDBNBAO5-H3TO63FG.js} +15 -18
  39. package/dist/{dist-es-S75EKWRJ.js → dist-es-KPJNIAPT.js} +9 -10
  40. package/dist/{dist-es-PRWCVZGQ-HTTVI42T.js → dist-es-LZDRG6RP-SP2FWWEO.js} +3 -4
  41. package/dist/{dist-es-OZGLUDWT.js → dist-es-PIWY5TOR.js} +49 -26
  42. package/dist/{dist-es-ADTONJUN-RVFWNZHO.js → dist-es-R4LD2OHZ-B5MB6BR2.js} +11 -13
  43. package/dist/dist-es-S2KJK4L2-5GDBXJIO.js +470 -0
  44. package/dist/{dist-es-XQME5F6W.js → dist-es-THYWPEKB.js} +12 -10
  45. package/dist/{dist-es-HJVOMDYC-PIAMWMAL.js → dist-es-TIYLKN6W-BAHZRZH5.js} +7 -13
  46. package/dist/{dist-es-IDBDK36G-Y6TQMRO5.js → dist-es-VORPMM2F-WOMP2FYQ.js} +37 -30
  47. package/dist/{dist-es-WQHDOVD7.js → dist-es-WESJCADT.js} +3 -4
  48. package/dist/dist-es-XMOG24OT.js +490 -0
  49. package/dist/event-streams-L7RH32OW-AFMBEYJJ.js +237 -0
  50. package/dist/event-streams-NGUY2RWE.js +237 -0
  51. package/dist/index.cjs +2 -2
  52. package/dist/index.js +2 -2
  53. package/dist/lambda/auto-cache-removal.cjs +28894 -16488
  54. package/dist/lambda/auto-cache-removal.js +11574 -2713
  55. package/dist/lambda/origin-request.cjs +22351 -17619
  56. package/dist/lambda/origin-request.js +21 -17
  57. package/dist/lambda/origin-response.cjs +22219 -17387
  58. package/dist/lambda/origin-response.js +17 -13
  59. package/dist/{loadSso-CZSSLFH6-SA5HOQAX.js → loadSso-F4PTCHDN-YR3RRUYW.js} +330 -227
  60. package/dist/{loadSso-T7GJVVO2.js → loadSso-LG7MFP7N.js} +344 -223
  61. package/dist/signin-P7DNG43W.js +658 -0
  62. package/dist/signin-XWTOVLF3-4ENWNEF7.js +630 -0
  63. package/dist/{sso-oidc-PKO5GYK5-LC65L46O.js → sso-oidc-FQQGUOJL.js} +293 -332
  64. package/dist/{sso-oidc-55SJ27II.js → sso-oidc-RRDYLOJY-FK3AUTOI.js} +263 -337
  65. package/dist/{sts-OPF4H3GL.js → sts-7FBOVTCN.js} +674 -601
  66. package/dist/{sts-P7Q3MYTS-BKGWHQE4.js → sts-TBWJ374A-DHXXCVJJ.js} +651 -608
  67. package/package.json +5 -5
  68. package/dist/chunk-AEOST5WF.js +0 -63
  69. package/dist/chunk-FO7L563E.js +0 -13695
  70. package/dist/chunk-FRWSD3YQ.js +0 -1722
  71. package/dist/chunk-JBVMOFGH.js +0 -152
  72. package/dist/chunk-JSBRDJBE.js +0 -30
  73. package/dist/chunk-KRJS4RAS.js +0 -1732
  74. package/dist/chunk-M5GUUX64.js +0 -63
  75. package/dist/chunk-SX6SVQKS.js +0 -67
  76. package/dist/chunk-UNXXS5FM.js +0 -120
  77. package/dist/chunk-UT2RMOJS.js +0 -2447
  78. package/dist/chunk-VOTRVWIB.js +0 -1965
  79. package/dist/chunk-W3VXP3A3.js +0 -119
  80. package/dist/chunk-XLUI7RQ4.js +0 -115
  81. package/dist/dist-es-2M7RLZ5O.js +0 -200
  82. package/dist/dist-es-Y7VN37H5-WQ3GYROF.js +0 -196
@@ -0,0 +1,171 @@
1
+ import {
2
+ fromBase64,
3
+ streamCollector,
4
+ toBase64,
5
+ toHex
6
+ } from "./chunk-57WYIP4I.js";
7
+ import {
8
+ fromArrayBuffer,
9
+ toUtf8
10
+ } from "./chunk-H4QJ5O4E.js";
11
+
12
+ // ../deployment-manager/dist/chunk-4XO6O3WV.js
13
+ import { Readable } from "stream";
14
+ var streamCollector2 = async (stream) => {
15
+ if (typeof Blob === "function" && stream instanceof Blob || stream.constructor?.name === "Blob") {
16
+ if (Blob.prototype.arrayBuffer !== void 0) {
17
+ return new Uint8Array(await stream.arrayBuffer());
18
+ }
19
+ return collectBlob(stream);
20
+ }
21
+ return collectStream(stream);
22
+ };
23
+ async function collectBlob(blob) {
24
+ const base64 = await readToBase64(blob);
25
+ const arrayBuffer = fromBase64(base64);
26
+ return new Uint8Array(arrayBuffer);
27
+ }
28
+ async function collectStream(stream) {
29
+ const chunks = [];
30
+ const reader = stream.getReader();
31
+ let isDone = false;
32
+ let length = 0;
33
+ while (!isDone) {
34
+ const { done, value } = await reader.read();
35
+ if (value) {
36
+ chunks.push(value);
37
+ length += value.length;
38
+ }
39
+ isDone = done;
40
+ }
41
+ const collected = new Uint8Array(length);
42
+ let offset = 0;
43
+ for (const chunk of chunks) {
44
+ collected.set(chunk, offset);
45
+ offset += chunk.length;
46
+ }
47
+ return collected;
48
+ }
49
+ function readToBase64(blob) {
50
+ return new Promise((resolve, reject) => {
51
+ const reader = new FileReader();
52
+ reader.onloadend = () => {
53
+ if (reader.readyState !== 2) {
54
+ return reject(new Error("Reader aborted too early"));
55
+ }
56
+ const result = reader.result ?? "";
57
+ const commaIndex = result.indexOf(",");
58
+ const dataOffset = commaIndex > -1 ? commaIndex + 1 : result.length;
59
+ resolve(result.substring(dataOffset));
60
+ };
61
+ reader.onabort = () => reject(new Error("Read aborted"));
62
+ reader.onerror = () => reject(reader.error);
63
+ reader.readAsDataURL(blob);
64
+ });
65
+ }
66
+ var isReadableStream = (stream) => typeof ReadableStream === "function" && (stream?.constructor?.name === ReadableStream.name || stream instanceof ReadableStream);
67
+ var isBlob = (blob) => {
68
+ return typeof Blob === "function" && (blob?.constructor?.name === Blob.name || blob instanceof Blob);
69
+ };
70
+ var ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED = "The stream has already been transformed.";
71
+ var sdkStreamMixin = (stream) => {
72
+ if (!isBlobInstance(stream) && !isReadableStream(stream)) {
73
+ const name = stream?.__proto__?.constructor?.name || stream;
74
+ throw new Error(`Unexpected stream implementation, expect Blob or ReadableStream, got ${name}`);
75
+ }
76
+ let transformed = false;
77
+ const transformToByteArray = async () => {
78
+ if (transformed) {
79
+ throw new Error(ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED);
80
+ }
81
+ transformed = true;
82
+ return await streamCollector2(stream);
83
+ };
84
+ const blobToWebStream = (blob) => {
85
+ if (typeof blob.stream !== "function") {
86
+ throw new Error("Cannot transform payload Blob to web stream. Please make sure the Blob.stream() is polyfilled.\nIf you are using React Native, this API is not yet supported, see: https://react-native.canny.io/feature-requests/p/fetch-streaming-body");
87
+ }
88
+ return blob.stream();
89
+ };
90
+ return Object.assign(stream, {
91
+ transformToByteArray,
92
+ transformToString: async (encoding) => {
93
+ const buf = await transformToByteArray();
94
+ if (encoding === "base64") {
95
+ return toBase64(buf);
96
+ } else if (encoding === "hex") {
97
+ return toHex(buf);
98
+ } else if (encoding === void 0 || encoding === "utf8" || encoding === "utf-8") {
99
+ return toUtf8(buf);
100
+ } else if (typeof TextDecoder === "function") {
101
+ return new TextDecoder(encoding).decode(buf);
102
+ } else {
103
+ throw new Error("TextDecoder is not available, please make sure polyfill is provided.");
104
+ }
105
+ },
106
+ transformToWebStream: () => {
107
+ if (transformed) {
108
+ throw new Error(ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED);
109
+ }
110
+ transformed = true;
111
+ if (isBlobInstance(stream)) {
112
+ return blobToWebStream(stream);
113
+ } else if (isReadableStream(stream)) {
114
+ return stream;
115
+ } else {
116
+ throw new Error(`Cannot transform payload to web stream, got ${stream}`);
117
+ }
118
+ }
119
+ });
120
+ };
121
+ var isBlobInstance = (stream) => typeof Blob === "function" && stream instanceof Blob;
122
+ var ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED2 = "The stream has already been transformed.";
123
+ var sdkStreamMixin2 = (stream) => {
124
+ if (!(stream instanceof Readable)) {
125
+ try {
126
+ return sdkStreamMixin(stream);
127
+ } catch (e) {
128
+ const name = stream?.__proto__?.constructor?.name || stream;
129
+ throw new Error(`Unexpected stream implementation, expect Stream.Readable instance, got ${name}`);
130
+ }
131
+ }
132
+ let transformed = false;
133
+ const transformToByteArray = async () => {
134
+ if (transformed) {
135
+ throw new Error(ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED2);
136
+ }
137
+ transformed = true;
138
+ return await streamCollector(stream);
139
+ };
140
+ return Object.assign(stream, {
141
+ transformToByteArray,
142
+ transformToString: async (encoding) => {
143
+ const buf = await transformToByteArray();
144
+ if (encoding === void 0 || Buffer.isEncoding(encoding)) {
145
+ return fromArrayBuffer(buf.buffer, buf.byteOffset, buf.byteLength).toString(encoding);
146
+ } else {
147
+ const decoder = new TextDecoder(encoding);
148
+ return decoder.decode(buf);
149
+ }
150
+ },
151
+ transformToWebStream: () => {
152
+ if (transformed) {
153
+ throw new Error(ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED2);
154
+ }
155
+ if (stream.readableFlowing !== null) {
156
+ throw new Error("The stream has been consumed by other callbacks.");
157
+ }
158
+ if (typeof Readable.toWeb !== "function") {
159
+ throw new Error("Readable.toWeb() is not supported. Please ensure a polyfill is available.");
160
+ }
161
+ transformed = true;
162
+ return Readable.toWeb(stream);
163
+ }
164
+ });
165
+ };
166
+
167
+ export {
168
+ isReadableStream,
169
+ isBlob,
170
+ sdkStreamMixin2
171
+ };