@playcademy/vite-plugin 0.2.35-beta.1 → 0.2.35-beta.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/index.js +16 -4
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -25353,7 +25353,7 @@ var package_default;
|
|
|
25353
25353
|
var init_package = __esm(() => {
|
|
25354
25354
|
package_default = {
|
|
25355
25355
|
name: "@playcademy/sandbox",
|
|
25356
|
-
version: "0.3.19-beta.
|
|
25356
|
+
version: "0.3.19-beta.2",
|
|
25357
25357
|
description: "Local development server for Playcademy game development",
|
|
25358
25358
|
type: "module",
|
|
25359
25359
|
exports: {
|
|
@@ -30030,7 +30030,8 @@ var init_schema = __esm(() => {
|
|
|
30030
30030
|
ltiTestMode: exports_external.boolean().default(false),
|
|
30031
30031
|
realtime: realtimeConfigSchema.optional(),
|
|
30032
30032
|
platformServiceJwt: platformServiceJwtConfigSchema.optional(),
|
|
30033
|
-
uploadBucket: exports_external.string().optional()
|
|
30033
|
+
uploadBucket: exports_external.string().optional(),
|
|
30034
|
+
queueIngressSecret: exports_external.string().optional()
|
|
30034
30035
|
});
|
|
30035
30036
|
});
|
|
30036
30037
|
var init_config2 = __esm(() => {
|
|
@@ -50287,6 +50288,14 @@ class DeployService {
|
|
|
50287
50288
|
await cf.setSecrets(deploymentId, { PLAYCADEMY_API_KEY: apiKey });
|
|
50288
50289
|
logger3.info("Set API key on worker", { slug, deploymentId });
|
|
50289
50290
|
}
|
|
50291
|
+
async ensureQueueIngressSecretOnWorker(slug, deploymentId) {
|
|
50292
|
+
const secret = this.deps.config.queueIngressSecret;
|
|
50293
|
+
if (!secret) {
|
|
50294
|
+
return;
|
|
50295
|
+
}
|
|
50296
|
+
const cf = this.getCloudflare();
|
|
50297
|
+
await cf.setSecrets(deploymentId, { QUEUE_INGRESS_SECRET: secret });
|
|
50298
|
+
}
|
|
50290
50299
|
async fetchAndExtractFrontendAssets(slug, gameId, uploadToken, uploadDeps, extractZip) {
|
|
50291
50300
|
const frontendZip = await this.timeStep("Fetch temporary files", () => uploadDeps.getObjectAsByteArray(uploadToken), { slug });
|
|
50292
50301
|
if (!frontendZip || frontendZip.length === 0) {
|
|
@@ -50369,7 +50378,10 @@ class DeployService {
|
|
|
50369
50378
|
const codeHash = hasBackend ? await generateDeploymentHash(request.code) : null;
|
|
50370
50379
|
await this.saveDeployment(game.id, result.deploymentId, result.url, codeHash, result.resources);
|
|
50371
50380
|
if (hasBackend) {
|
|
50372
|
-
await this.timeStep("Configure worker secrets", () =>
|
|
50381
|
+
await this.timeStep("Configure worker secrets", async () => {
|
|
50382
|
+
await this.ensureApiKeyOnWorker(user, slug, result.deploymentId);
|
|
50383
|
+
await this.ensureQueueIngressSecretOnWorker(slug, result.deploymentId);
|
|
50384
|
+
}, { slug, deploymentId: result.deploymentId });
|
|
50373
50385
|
}
|
|
50374
50386
|
if (hasMetadata || hasFrontend) {
|
|
50375
50387
|
await this.applyGameMetadata(game.id, request, hasFrontend, hasMetadata, result.url);
|
|
@@ -128236,7 +128248,7 @@ var import_picocolors12 = __toESM(require_picocolors(), 1);
|
|
|
128236
128248
|
// package.json
|
|
128237
128249
|
var package_default2 = {
|
|
128238
128250
|
name: "@playcademy/vite-plugin",
|
|
128239
|
-
version: "0.2.35-beta.
|
|
128251
|
+
version: "0.2.35-beta.2",
|
|
128240
128252
|
type: "module",
|
|
128241
128253
|
exports: {
|
|
128242
128254
|
".": {
|