@mastra/deployer-cloudflare 0.0.1-alpha.34 → 0.0.1-alpha.4
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/CHANGELOG.md +0 -250
- package/dist/deployer-cloudflare.cjs.development.js +458 -0
- package/dist/deployer-cloudflare.cjs.development.js.map +1 -0
- package/dist/deployer-cloudflare.cjs.production.min.js +2 -0
- package/dist/deployer-cloudflare.cjs.production.min.js.map +1 -0
- package/dist/deployer-cloudflare.esm.js +435 -0
- package/dist/deployer-cloudflare.esm.js.map +1 -0
- package/dist/index.d.ts +15 -26
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +5 -148
- package/dist/secrets-manager/index.d.ts +2 -3
- package/dist/secrets-manager/index.d.ts.map +1 -0
- package/package.json +18 -17
- package/src/index.ts +35 -131
- package/src/secrets-manager/index.ts +3 -3
- package/tsconfig.json +7 -2
- package/vitest.config.ts +1 -1
- package/README.md +0 -99
- package/dist/secrets-manager/index.js +0 -87
- package/global.d.ts +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,255 +1,5 @@
|
|
|
1
1
|
# @mastra/deployer-cloudflare
|
|
2
2
|
|
|
3
|
-
## 0.0.1-alpha.34
|
|
4
|
-
|
|
5
|
-
### Patch Changes
|
|
6
|
-
|
|
7
|
-
- 32d15ec: Fix cloudflareDeployer build
|
|
8
|
-
|
|
9
|
-
## 0.0.1-alpha.33
|
|
10
|
-
|
|
11
|
-
### Patch Changes
|
|
12
|
-
|
|
13
|
-
- e27fe69: Add dir to deployer
|
|
14
|
-
- Updated dependencies [e27fe69]
|
|
15
|
-
- @mastra/deployer@0.0.1-alpha.30
|
|
16
|
-
|
|
17
|
-
## 0.0.1-alpha.32
|
|
18
|
-
|
|
19
|
-
### Patch Changes
|
|
20
|
-
|
|
21
|
-
- 38b7f66: Update deployer logic
|
|
22
|
-
- Updated dependencies [2f17a5f]
|
|
23
|
-
- Updated dependencies [0696eeb]
|
|
24
|
-
- Updated dependencies [cb290ee]
|
|
25
|
-
- Updated dependencies [b4d7416]
|
|
26
|
-
- Updated dependencies [38b7f66]
|
|
27
|
-
- @mastra/core@0.2.0-alpha.84
|
|
28
|
-
- @mastra/deployer@0.0.1-alpha.29
|
|
29
|
-
|
|
30
|
-
## 0.0.1-alpha.31
|
|
31
|
-
|
|
32
|
-
### Patch Changes
|
|
33
|
-
|
|
34
|
-
- 9625602: Use mastra core splitted bundles in other packages
|
|
35
|
-
- Updated dependencies [2ab57d6]
|
|
36
|
-
- Updated dependencies [30322ce]
|
|
37
|
-
- Updated dependencies [78eec7c]
|
|
38
|
-
- Updated dependencies [9625602]
|
|
39
|
-
- Updated dependencies [8769a62]
|
|
40
|
-
- @mastra/deployer@0.0.1-alpha.28
|
|
41
|
-
- @mastra/core@0.2.0-alpha.83
|
|
42
|
-
|
|
43
|
-
## 0.0.1-alpha.30
|
|
44
|
-
|
|
45
|
-
### Patch Changes
|
|
46
|
-
|
|
47
|
-
- Updated dependencies [73d112c]
|
|
48
|
-
- Updated dependencies [ac8c61a]
|
|
49
|
-
- @mastra/deployer@0.0.1-alpha.27
|
|
50
|
-
- @mastra/core@0.1.27-alpha.82
|
|
51
|
-
|
|
52
|
-
## 0.0.1-alpha.29
|
|
53
|
-
|
|
54
|
-
### Patch Changes
|
|
55
|
-
|
|
56
|
-
- Updated dependencies [9fb3039]
|
|
57
|
-
- @mastra/core@0.1.27-alpha.81
|
|
58
|
-
- @mastra/deployer@0.0.1-alpha.26
|
|
59
|
-
|
|
60
|
-
## 0.0.1-alpha.28
|
|
61
|
-
|
|
62
|
-
### Patch Changes
|
|
63
|
-
|
|
64
|
-
- Updated dependencies [327ece7]
|
|
65
|
-
- @mastra/core@0.1.27-alpha.80
|
|
66
|
-
- @mastra/deployer@0.0.1-alpha.25
|
|
67
|
-
|
|
68
|
-
## 0.0.1-alpha.27
|
|
69
|
-
|
|
70
|
-
### Patch Changes
|
|
71
|
-
|
|
72
|
-
- Updated dependencies [21fe536]
|
|
73
|
-
- @mastra/core@0.1.27-alpha.79
|
|
74
|
-
- @mastra/deployer@0.0.1-alpha.24
|
|
75
|
-
|
|
76
|
-
## 0.0.1-alpha.26
|
|
77
|
-
|
|
78
|
-
### Patch Changes
|
|
79
|
-
|
|
80
|
-
- Updated dependencies [88f18d7]
|
|
81
|
-
- @mastra/deployer@0.0.1-alpha.23
|
|
82
|
-
|
|
83
|
-
## 0.0.1-alpha.25
|
|
84
|
-
|
|
85
|
-
### Patch Changes
|
|
86
|
-
|
|
87
|
-
- 44c7c26: Rebuild
|
|
88
|
-
|
|
89
|
-
## 0.0.1-alpha.24
|
|
90
|
-
|
|
91
|
-
### Patch Changes
|
|
92
|
-
|
|
93
|
-
- Updated dependencies [685108a]
|
|
94
|
-
- Updated dependencies [685108a]
|
|
95
|
-
- @mastra/deployer@0.0.1-alpha.22
|
|
96
|
-
- @mastra/core@0.1.27-alpha.78
|
|
97
|
-
|
|
98
|
-
## 0.0.1-alpha.23
|
|
99
|
-
|
|
100
|
-
### Patch Changes
|
|
101
|
-
|
|
102
|
-
- 2b75edf: mastra deployers tsup bundling
|
|
103
|
-
- Updated dependencies [8105fae]
|
|
104
|
-
- Updated dependencies [cfb966f]
|
|
105
|
-
- @mastra/core@0.1.27-alpha.77
|
|
106
|
-
- @mastra/deployer@0.0.1-alpha.21
|
|
107
|
-
|
|
108
|
-
## 0.0.1-alpha.22
|
|
109
|
-
|
|
110
|
-
### Patch Changes
|
|
111
|
-
|
|
112
|
-
- Updated dependencies [ae7bf94]
|
|
113
|
-
- Updated dependencies [ae7bf94]
|
|
114
|
-
- @mastra/deployer@0.0.1-alpha.20
|
|
115
|
-
- @mastra/core@0.1.27-alpha.76
|
|
116
|
-
|
|
117
|
-
## 0.0.1-alpha.21
|
|
118
|
-
|
|
119
|
-
### Patch Changes
|
|
120
|
-
|
|
121
|
-
- Updated dependencies [23dcb23]
|
|
122
|
-
- Updated dependencies [7064554]
|
|
123
|
-
- @mastra/core@0.1.27-alpha.75
|
|
124
|
-
- @mastra/deployer@0.0.1-alpha.19
|
|
125
|
-
|
|
126
|
-
## 0.0.1-alpha.20
|
|
127
|
-
|
|
128
|
-
### Patch Changes
|
|
129
|
-
|
|
130
|
-
- Updated dependencies [7b87567]
|
|
131
|
-
- @mastra/core@0.1.27-alpha.74
|
|
132
|
-
- @mastra/deployer@0.0.1-alpha.18
|
|
133
|
-
|
|
134
|
-
## 0.0.1-alpha.19
|
|
135
|
-
|
|
136
|
-
### Patch Changes
|
|
137
|
-
|
|
138
|
-
- Updated dependencies [3427b95]
|
|
139
|
-
- @mastra/core@0.1.27-alpha.73
|
|
140
|
-
- @mastra/deployer@0.0.1-alpha.17
|
|
141
|
-
|
|
142
|
-
## 0.0.1-alpha.18
|
|
143
|
-
|
|
144
|
-
### Patch Changes
|
|
145
|
-
|
|
146
|
-
- Updated dependencies [e4d4ede]
|
|
147
|
-
- Updated dependencies [06b2c0a]
|
|
148
|
-
- @mastra/core@0.1.27-alpha.72
|
|
149
|
-
- @mastra/deployer@0.0.1-alpha.16
|
|
150
|
-
|
|
151
|
-
## 0.0.1-alpha.17
|
|
152
|
-
|
|
153
|
-
### Patch Changes
|
|
154
|
-
|
|
155
|
-
- Updated dependencies [d9c8dd0]
|
|
156
|
-
- @mastra/deployer@0.0.1-alpha.15
|
|
157
|
-
- @mastra/core@0.1.27-alpha.71
|
|
158
|
-
|
|
159
|
-
## 0.0.1-alpha.16
|
|
160
|
-
|
|
161
|
-
### Patch Changes
|
|
162
|
-
|
|
163
|
-
- Updated dependencies [ad2cd74]
|
|
164
|
-
- @mastra/deployer@0.0.1-alpha.14
|
|
165
|
-
|
|
166
|
-
## 0.0.1-alpha.15
|
|
167
|
-
|
|
168
|
-
### Patch Changes
|
|
169
|
-
|
|
170
|
-
- Updated dependencies [a1774e7]
|
|
171
|
-
- @mastra/deployer@0.0.1-alpha.13
|
|
172
|
-
|
|
173
|
-
## 0.0.1-alpha.14
|
|
174
|
-
|
|
175
|
-
### Patch Changes
|
|
176
|
-
|
|
177
|
-
- Updated dependencies [28dceab]
|
|
178
|
-
- @mastra/deployer@0.0.1-alpha.12
|
|
179
|
-
|
|
180
|
-
## 0.0.1-alpha.13
|
|
181
|
-
|
|
182
|
-
### Patch Changes
|
|
183
|
-
|
|
184
|
-
- bdaf834: publish packages
|
|
185
|
-
- Updated dependencies [bdaf834]
|
|
186
|
-
- @mastra/deployer@0.0.1-alpha.11
|
|
187
|
-
|
|
188
|
-
## 0.0.1-alpha.12
|
|
189
|
-
|
|
190
|
-
### Patch Changes
|
|
191
|
-
|
|
192
|
-
- Updated dependencies [dd6d87f]
|
|
193
|
-
- Updated dependencies [04434b6]
|
|
194
|
-
- @mastra/core@0.1.27-alpha.70
|
|
195
|
-
- @mastra/deployer@0.0.1-alpha.10
|
|
196
|
-
|
|
197
|
-
## 0.0.1-alpha.11
|
|
198
|
-
|
|
199
|
-
### Patch Changes
|
|
200
|
-
|
|
201
|
-
- 9066f95: CF deployer fixes
|
|
202
|
-
- Updated dependencies [9066f95]
|
|
203
|
-
- @mastra/deployer@0.0.1-alpha.9
|
|
204
|
-
|
|
205
|
-
## 0.0.1-alpha.10
|
|
206
|
-
|
|
207
|
-
### Patch Changes
|
|
208
|
-
|
|
209
|
-
- 0d5a03d: Vector store modules
|
|
210
|
-
|
|
211
|
-
## 0.0.1-alpha.9
|
|
212
|
-
|
|
213
|
-
### Patch Changes
|
|
214
|
-
|
|
215
|
-
- Updated dependencies [b425845]
|
|
216
|
-
- @mastra/deployer@0.0.1-alpha.8
|
|
217
|
-
|
|
218
|
-
## 0.0.1-alpha.8
|
|
219
|
-
|
|
220
|
-
### Patch Changes
|
|
221
|
-
|
|
222
|
-
- 1944807: Unified logger and major step in better logs
|
|
223
|
-
- c7abf8e: Optional CF worker tagging
|
|
224
|
-
- Updated dependencies [1944807]
|
|
225
|
-
- Updated dependencies [9ade36e]
|
|
226
|
-
- @mastra/deployer@0.0.1-alpha.7
|
|
227
|
-
- @mastra/core@0.1.27-alpha.69
|
|
228
|
-
|
|
229
|
-
## 0.0.1-alpha.7
|
|
230
|
-
|
|
231
|
-
### Patch Changes
|
|
232
|
-
|
|
233
|
-
- Updated dependencies [291fe57]
|
|
234
|
-
- Updated dependencies [1a41fbf]
|
|
235
|
-
- @mastra/deployer@0.0.1-alpha.6
|
|
236
|
-
|
|
237
|
-
## 0.0.1-alpha.6
|
|
238
|
-
|
|
239
|
-
### Patch Changes
|
|
240
|
-
|
|
241
|
-
- Updated dependencies [0be7181]
|
|
242
|
-
- Updated dependencies [0be7181]
|
|
243
|
-
- @mastra/core@0.1.27-alpha.68
|
|
244
|
-
- @mastra/deployer@0.0.1-alpha.5
|
|
245
|
-
|
|
246
|
-
## 0.0.1-alpha.5
|
|
247
|
-
|
|
248
|
-
### Patch Changes
|
|
249
|
-
|
|
250
|
-
- Updated dependencies [7babd5c]
|
|
251
|
-
- @mastra/deployer@0.0.1-alpha.4
|
|
252
|
-
|
|
253
3
|
## 0.0.1-alpha.4
|
|
254
4
|
|
|
255
5
|
### Patch Changes
|
|
@@ -0,0 +1,458 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var core = require('@mastra/core');
|
|
6
|
+
var child_process = require('child_process');
|
|
7
|
+
var fs = require('fs');
|
|
8
|
+
var path = require('path');
|
|
9
|
+
|
|
10
|
+
function _interopNamespaceDefault(e) {
|
|
11
|
+
var n = Object.create(null);
|
|
12
|
+
if (e) {
|
|
13
|
+
Object.keys(e).forEach(function (k) {
|
|
14
|
+
if (k !== 'default') {
|
|
15
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
16
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
17
|
+
enumerable: true,
|
|
18
|
+
get: function () { return e[k]; }
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
n.default = e;
|
|
24
|
+
return n;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
var child_process__namespace = /*#__PURE__*/_interopNamespaceDefault(child_process);
|
|
28
|
+
|
|
29
|
+
function asyncGeneratorStep(n, t, e, r, o, a, c) {
|
|
30
|
+
try {
|
|
31
|
+
var i = n[a](c),
|
|
32
|
+
u = i.value;
|
|
33
|
+
} catch (n) {
|
|
34
|
+
return void e(n);
|
|
35
|
+
}
|
|
36
|
+
i.done ? t(u) : Promise.resolve(u).then(r, o);
|
|
37
|
+
}
|
|
38
|
+
function _asyncToGenerator(n) {
|
|
39
|
+
return function () {
|
|
40
|
+
var t = this,
|
|
41
|
+
e = arguments;
|
|
42
|
+
return new Promise(function (r, o) {
|
|
43
|
+
var a = n.apply(t, e);
|
|
44
|
+
function _next(n) {
|
|
45
|
+
asyncGeneratorStep(a, r, o, _next, _throw, "next", n);
|
|
46
|
+
}
|
|
47
|
+
function _throw(n) {
|
|
48
|
+
asyncGeneratorStep(a, r, o, _next, _throw, "throw", n);
|
|
49
|
+
}
|
|
50
|
+
_next(void 0);
|
|
51
|
+
});
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
function _extends() {
|
|
55
|
+
return _extends = Object.assign ? Object.assign.bind() : function (n) {
|
|
56
|
+
for (var e = 1; e < arguments.length; e++) {
|
|
57
|
+
var t = arguments[e];
|
|
58
|
+
for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
|
|
59
|
+
}
|
|
60
|
+
return n;
|
|
61
|
+
}, _extends.apply(null, arguments);
|
|
62
|
+
}
|
|
63
|
+
function _inheritsLoose(t, o) {
|
|
64
|
+
t.prototype = Object.create(o.prototype), t.prototype.constructor = t, _setPrototypeOf(t, o);
|
|
65
|
+
}
|
|
66
|
+
function _regeneratorRuntime() {
|
|
67
|
+
_regeneratorRuntime = function () {
|
|
68
|
+
return e;
|
|
69
|
+
};
|
|
70
|
+
var t,
|
|
71
|
+
e = {},
|
|
72
|
+
r = Object.prototype,
|
|
73
|
+
n = r.hasOwnProperty,
|
|
74
|
+
o = Object.defineProperty || function (t, e, r) {
|
|
75
|
+
t[e] = r.value;
|
|
76
|
+
},
|
|
77
|
+
i = "function" == typeof Symbol ? Symbol : {},
|
|
78
|
+
a = i.iterator || "@@iterator",
|
|
79
|
+
c = i.asyncIterator || "@@asyncIterator",
|
|
80
|
+
u = i.toStringTag || "@@toStringTag";
|
|
81
|
+
function define(t, e, r) {
|
|
82
|
+
return Object.defineProperty(t, e, {
|
|
83
|
+
value: r,
|
|
84
|
+
enumerable: !0,
|
|
85
|
+
configurable: !0,
|
|
86
|
+
writable: !0
|
|
87
|
+
}), t[e];
|
|
88
|
+
}
|
|
89
|
+
try {
|
|
90
|
+
define({}, "");
|
|
91
|
+
} catch (t) {
|
|
92
|
+
define = function (t, e, r) {
|
|
93
|
+
return t[e] = r;
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
function wrap(t, e, r, n) {
|
|
97
|
+
var i = e && e.prototype instanceof Generator ? e : Generator,
|
|
98
|
+
a = Object.create(i.prototype),
|
|
99
|
+
c = new Context(n || []);
|
|
100
|
+
return o(a, "_invoke", {
|
|
101
|
+
value: makeInvokeMethod(t, r, c)
|
|
102
|
+
}), a;
|
|
103
|
+
}
|
|
104
|
+
function tryCatch(t, e, r) {
|
|
105
|
+
try {
|
|
106
|
+
return {
|
|
107
|
+
type: "normal",
|
|
108
|
+
arg: t.call(e, r)
|
|
109
|
+
};
|
|
110
|
+
} catch (t) {
|
|
111
|
+
return {
|
|
112
|
+
type: "throw",
|
|
113
|
+
arg: t
|
|
114
|
+
};
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
e.wrap = wrap;
|
|
118
|
+
var h = "suspendedStart",
|
|
119
|
+
l = "suspendedYield",
|
|
120
|
+
f = "executing",
|
|
121
|
+
s = "completed",
|
|
122
|
+
y = {};
|
|
123
|
+
function Generator() {}
|
|
124
|
+
function GeneratorFunction() {}
|
|
125
|
+
function GeneratorFunctionPrototype() {}
|
|
126
|
+
var p = {};
|
|
127
|
+
define(p, a, function () {
|
|
128
|
+
return this;
|
|
129
|
+
});
|
|
130
|
+
var d = Object.getPrototypeOf,
|
|
131
|
+
v = d && d(d(values([])));
|
|
132
|
+
v && v !== r && n.call(v, a) && (p = v);
|
|
133
|
+
var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p);
|
|
134
|
+
function defineIteratorMethods(t) {
|
|
135
|
+
["next", "throw", "return"].forEach(function (e) {
|
|
136
|
+
define(t, e, function (t) {
|
|
137
|
+
return this._invoke(e, t);
|
|
138
|
+
});
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
function AsyncIterator(t, e) {
|
|
142
|
+
function invoke(r, o, i, a) {
|
|
143
|
+
var c = tryCatch(t[r], t, o);
|
|
144
|
+
if ("throw" !== c.type) {
|
|
145
|
+
var u = c.arg,
|
|
146
|
+
h = u.value;
|
|
147
|
+
return h && "object" == typeof h && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) {
|
|
148
|
+
invoke("next", t, i, a);
|
|
149
|
+
}, function (t) {
|
|
150
|
+
invoke("throw", t, i, a);
|
|
151
|
+
}) : e.resolve(h).then(function (t) {
|
|
152
|
+
u.value = t, i(u);
|
|
153
|
+
}, function (t) {
|
|
154
|
+
return invoke("throw", t, i, a);
|
|
155
|
+
});
|
|
156
|
+
}
|
|
157
|
+
a(c.arg);
|
|
158
|
+
}
|
|
159
|
+
var r;
|
|
160
|
+
o(this, "_invoke", {
|
|
161
|
+
value: function (t, n) {
|
|
162
|
+
function callInvokeWithMethodAndArg() {
|
|
163
|
+
return new e(function (e, r) {
|
|
164
|
+
invoke(t, n, e, r);
|
|
165
|
+
});
|
|
166
|
+
}
|
|
167
|
+
return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
|
|
168
|
+
}
|
|
169
|
+
});
|
|
170
|
+
}
|
|
171
|
+
function makeInvokeMethod(e, r, n) {
|
|
172
|
+
var o = h;
|
|
173
|
+
return function (i, a) {
|
|
174
|
+
if (o === f) throw Error("Generator is already running");
|
|
175
|
+
if (o === s) {
|
|
176
|
+
if ("throw" === i) throw a;
|
|
177
|
+
return {
|
|
178
|
+
value: t,
|
|
179
|
+
done: !0
|
|
180
|
+
};
|
|
181
|
+
}
|
|
182
|
+
for (n.method = i, n.arg = a;;) {
|
|
183
|
+
var c = n.delegate;
|
|
184
|
+
if (c) {
|
|
185
|
+
var u = maybeInvokeDelegate(c, n);
|
|
186
|
+
if (u) {
|
|
187
|
+
if (u === y) continue;
|
|
188
|
+
return u;
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) {
|
|
192
|
+
if (o === h) throw o = s, n.arg;
|
|
193
|
+
n.dispatchException(n.arg);
|
|
194
|
+
} else "return" === n.method && n.abrupt("return", n.arg);
|
|
195
|
+
o = f;
|
|
196
|
+
var p = tryCatch(e, r, n);
|
|
197
|
+
if ("normal" === p.type) {
|
|
198
|
+
if (o = n.done ? s : l, p.arg === y) continue;
|
|
199
|
+
return {
|
|
200
|
+
value: p.arg,
|
|
201
|
+
done: n.done
|
|
202
|
+
};
|
|
203
|
+
}
|
|
204
|
+
"throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg);
|
|
205
|
+
}
|
|
206
|
+
};
|
|
207
|
+
}
|
|
208
|
+
function maybeInvokeDelegate(e, r) {
|
|
209
|
+
var n = r.method,
|
|
210
|
+
o = e.iterator[n];
|
|
211
|
+
if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y;
|
|
212
|
+
var i = tryCatch(o, e.iterator, r.arg);
|
|
213
|
+
if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y;
|
|
214
|
+
var a = i.arg;
|
|
215
|
+
return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y);
|
|
216
|
+
}
|
|
217
|
+
function pushTryEntry(t) {
|
|
218
|
+
var e = {
|
|
219
|
+
tryLoc: t[0]
|
|
220
|
+
};
|
|
221
|
+
1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e);
|
|
222
|
+
}
|
|
223
|
+
function resetTryEntry(t) {
|
|
224
|
+
var e = t.completion || {};
|
|
225
|
+
e.type = "normal", delete e.arg, t.completion = e;
|
|
226
|
+
}
|
|
227
|
+
function Context(t) {
|
|
228
|
+
this.tryEntries = [{
|
|
229
|
+
tryLoc: "root"
|
|
230
|
+
}], t.forEach(pushTryEntry, this), this.reset(!0);
|
|
231
|
+
}
|
|
232
|
+
function values(e) {
|
|
233
|
+
if (e || "" === e) {
|
|
234
|
+
var r = e[a];
|
|
235
|
+
if (r) return r.call(e);
|
|
236
|
+
if ("function" == typeof e.next) return e;
|
|
237
|
+
if (!isNaN(e.length)) {
|
|
238
|
+
var o = -1,
|
|
239
|
+
i = function next() {
|
|
240
|
+
for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next;
|
|
241
|
+
return next.value = t, next.done = !0, next;
|
|
242
|
+
};
|
|
243
|
+
return i.next = i;
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
throw new TypeError(typeof e + " is not iterable");
|
|
247
|
+
}
|
|
248
|
+
return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", {
|
|
249
|
+
value: GeneratorFunctionPrototype,
|
|
250
|
+
configurable: !0
|
|
251
|
+
}), o(GeneratorFunctionPrototype, "constructor", {
|
|
252
|
+
value: GeneratorFunction,
|
|
253
|
+
configurable: !0
|
|
254
|
+
}), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) {
|
|
255
|
+
var e = "function" == typeof t && t.constructor;
|
|
256
|
+
return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name));
|
|
257
|
+
}, e.mark = function (t) {
|
|
258
|
+
return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t;
|
|
259
|
+
}, e.awrap = function (t) {
|
|
260
|
+
return {
|
|
261
|
+
__await: t
|
|
262
|
+
};
|
|
263
|
+
}, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () {
|
|
264
|
+
return this;
|
|
265
|
+
}), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) {
|
|
266
|
+
void 0 === i && (i = Promise);
|
|
267
|
+
var a = new AsyncIterator(wrap(t, r, n, o), i);
|
|
268
|
+
return e.isGeneratorFunction(r) ? a : a.next().then(function (t) {
|
|
269
|
+
return t.done ? t.value : a.next();
|
|
270
|
+
});
|
|
271
|
+
}, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () {
|
|
272
|
+
return this;
|
|
273
|
+
}), define(g, "toString", function () {
|
|
274
|
+
return "[object Generator]";
|
|
275
|
+
}), e.keys = function (t) {
|
|
276
|
+
var e = Object(t),
|
|
277
|
+
r = [];
|
|
278
|
+
for (var n in e) r.push(n);
|
|
279
|
+
return r.reverse(), function next() {
|
|
280
|
+
for (; r.length;) {
|
|
281
|
+
var t = r.pop();
|
|
282
|
+
if (t in e) return next.value = t, next.done = !1, next;
|
|
283
|
+
}
|
|
284
|
+
return next.done = !0, next;
|
|
285
|
+
};
|
|
286
|
+
}, e.values = values, Context.prototype = {
|
|
287
|
+
constructor: Context,
|
|
288
|
+
reset: function (e) {
|
|
289
|
+
if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t);
|
|
290
|
+
},
|
|
291
|
+
stop: function () {
|
|
292
|
+
this.done = !0;
|
|
293
|
+
var t = this.tryEntries[0].completion;
|
|
294
|
+
if ("throw" === t.type) throw t.arg;
|
|
295
|
+
return this.rval;
|
|
296
|
+
},
|
|
297
|
+
dispatchException: function (e) {
|
|
298
|
+
if (this.done) throw e;
|
|
299
|
+
var r = this;
|
|
300
|
+
function handle(n, o) {
|
|
301
|
+
return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o;
|
|
302
|
+
}
|
|
303
|
+
for (var o = this.tryEntries.length - 1; o >= 0; --o) {
|
|
304
|
+
var i = this.tryEntries[o],
|
|
305
|
+
a = i.completion;
|
|
306
|
+
if ("root" === i.tryLoc) return handle("end");
|
|
307
|
+
if (i.tryLoc <= this.prev) {
|
|
308
|
+
var c = n.call(i, "catchLoc"),
|
|
309
|
+
u = n.call(i, "finallyLoc");
|
|
310
|
+
if (c && u) {
|
|
311
|
+
if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);
|
|
312
|
+
if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
|
|
313
|
+
} else if (c) {
|
|
314
|
+
if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);
|
|
315
|
+
} else {
|
|
316
|
+
if (!u) throw Error("try statement without catch or finally");
|
|
317
|
+
if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
},
|
|
322
|
+
abrupt: function (t, e) {
|
|
323
|
+
for (var r = this.tryEntries.length - 1; r >= 0; --r) {
|
|
324
|
+
var o = this.tryEntries[r];
|
|
325
|
+
if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) {
|
|
326
|
+
var i = o;
|
|
327
|
+
break;
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null);
|
|
331
|
+
var a = i ? i.completion : {};
|
|
332
|
+
return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a);
|
|
333
|
+
},
|
|
334
|
+
complete: function (t, e) {
|
|
335
|
+
if ("throw" === t.type) throw t.arg;
|
|
336
|
+
return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y;
|
|
337
|
+
},
|
|
338
|
+
finish: function (t) {
|
|
339
|
+
for (var e = this.tryEntries.length - 1; e >= 0; --e) {
|
|
340
|
+
var r = this.tryEntries[e];
|
|
341
|
+
if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y;
|
|
342
|
+
}
|
|
343
|
+
},
|
|
344
|
+
catch: function (t) {
|
|
345
|
+
for (var e = this.tryEntries.length - 1; e >= 0; --e) {
|
|
346
|
+
var r = this.tryEntries[e];
|
|
347
|
+
if (r.tryLoc === t) {
|
|
348
|
+
var n = r.completion;
|
|
349
|
+
if ("throw" === n.type) {
|
|
350
|
+
var o = n.arg;
|
|
351
|
+
resetTryEntry(r);
|
|
352
|
+
}
|
|
353
|
+
return o;
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
throw Error("illegal catch attempt");
|
|
357
|
+
},
|
|
358
|
+
delegateYield: function (e, r, n) {
|
|
359
|
+
return this.delegate = {
|
|
360
|
+
iterator: values(e),
|
|
361
|
+
resultName: r,
|
|
362
|
+
nextLoc: n
|
|
363
|
+
}, "next" === this.method && (this.arg = t), y;
|
|
364
|
+
}
|
|
365
|
+
}, e;
|
|
366
|
+
}
|
|
367
|
+
function _setPrototypeOf(t, e) {
|
|
368
|
+
return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) {
|
|
369
|
+
return t.__proto__ = e, t;
|
|
370
|
+
}, _setPrototypeOf(t, e);
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
var CloudflareDeployer = /*#__PURE__*/function (_MastraDeployer) {
|
|
374
|
+
function CloudflareDeployer(_ref) {
|
|
375
|
+
var _this;
|
|
376
|
+
var scope = _ref.scope,
|
|
377
|
+
env = _ref.env,
|
|
378
|
+
projectName = _ref.projectName,
|
|
379
|
+
routes = _ref.routes,
|
|
380
|
+
workerNamespace = _ref.workerNamespace;
|
|
381
|
+
_this = _MastraDeployer.call(this, {
|
|
382
|
+
scope: scope,
|
|
383
|
+
env: env,
|
|
384
|
+
projectName: projectName
|
|
385
|
+
}) || this;
|
|
386
|
+
_this.routes = [];
|
|
387
|
+
_this.workerNamespace = void 0;
|
|
388
|
+
_this.routes = routes;
|
|
389
|
+
_this.workerNamespace = workerNamespace;
|
|
390
|
+
return _this;
|
|
391
|
+
}
|
|
392
|
+
_inheritsLoose(CloudflareDeployer, _MastraDeployer);
|
|
393
|
+
var _proto = CloudflareDeployer.prototype;
|
|
394
|
+
_proto.writeFiles = function writeFiles(_ref2) {
|
|
395
|
+
var dir = _ref2.dir;
|
|
396
|
+
this.loadEnvVars();
|
|
397
|
+
this.writeIndex({
|
|
398
|
+
dir: dir
|
|
399
|
+
});
|
|
400
|
+
var cfWorkerName = this.projectName || 'mastra';
|
|
401
|
+
var wranglerConfig = {
|
|
402
|
+
name: cfWorkerName,
|
|
403
|
+
main: 'index.mjs',
|
|
404
|
+
compatibility_date: '2024-12-02',
|
|
405
|
+
compatibility_flags: ['nodejs_compat'],
|
|
406
|
+
build: {
|
|
407
|
+
command: 'npm install'
|
|
408
|
+
},
|
|
409
|
+
observability: {
|
|
410
|
+
logs: {
|
|
411
|
+
enabled: true
|
|
412
|
+
}
|
|
413
|
+
},
|
|
414
|
+
vars: this.env
|
|
415
|
+
};
|
|
416
|
+
if (!this.workerNamespace && this.routes) {
|
|
417
|
+
wranglerConfig.routes = this.routes;
|
|
418
|
+
}
|
|
419
|
+
fs.writeFileSync(path.join(dir, 'wrangler.json'), JSON.stringify(wranglerConfig));
|
|
420
|
+
};
|
|
421
|
+
_proto.writeIndex = function writeIndex(_ref3) {
|
|
422
|
+
var dir = _ref3.dir;
|
|
423
|
+
fs.writeFileSync(path.join(dir, './index.mjs'), "\n export default {\n fetch: async (request, env, context) => {\n Object.keys(env).forEach(key => {\n process.env[key] = env[key]\n })\n const { app } = await import('./hono.mjs');\n return app.fetch(request, env, context);\n }\n }\n ");
|
|
424
|
+
};
|
|
425
|
+
_proto.deploy = /*#__PURE__*/function () {
|
|
426
|
+
var _deploy = /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(_ref4) {
|
|
427
|
+
var dir, token, cmd;
|
|
428
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
429
|
+
while (1) switch (_context.prev = _context.next) {
|
|
430
|
+
case 0:
|
|
431
|
+
dir = _ref4.dir, token = _ref4.token;
|
|
432
|
+
cmd = this.workerNamespace ? "npm exec -- wrangler deploy --dispatch-namespace " + this.workerNamespace : 'npm exec -- wrangler deploy';
|
|
433
|
+
child_process__namespace.execSync(cmd, {
|
|
434
|
+
cwd: dir,
|
|
435
|
+
stdio: 'inherit',
|
|
436
|
+
env: _extends({
|
|
437
|
+
CLOUDFLARE_API_TOKEN: token,
|
|
438
|
+
CLOUDFLARE_ACCOUNT_ID: this.scope
|
|
439
|
+
}, this.env, {
|
|
440
|
+
PATH: process.env.PATH
|
|
441
|
+
})
|
|
442
|
+
});
|
|
443
|
+
case 3:
|
|
444
|
+
case "end":
|
|
445
|
+
return _context.stop();
|
|
446
|
+
}
|
|
447
|
+
}, _callee, this);
|
|
448
|
+
}));
|
|
449
|
+
function deploy(_x) {
|
|
450
|
+
return _deploy.apply(this, arguments);
|
|
451
|
+
}
|
|
452
|
+
return deploy;
|
|
453
|
+
}();
|
|
454
|
+
return CloudflareDeployer;
|
|
455
|
+
}(core.MastraDeployer);
|
|
456
|
+
|
|
457
|
+
exports.CloudflareDeployer = CloudflareDeployer;
|
|
458
|
+
//# sourceMappingURL=deployer-cloudflare.cjs.development.js.map
|