@playcademy/vite-plugin 0.0.1-beta.7 → 0.0.1-beta.8
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 +22 -15
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -566,7 +566,7 @@ globstar while`, file, fr, pattern, pr3, swallowee);
|
|
|
566
566
|
}
|
|
567
567
|
};
|
|
568
568
|
for (let i3 = 0, c2;i3 < pattern.length && (c2 = pattern.charAt(i3)); i3++) {
|
|
569
|
-
this.debug("%s
|
|
569
|
+
this.debug("%s %s %s %j", pattern, i3, re3, c2);
|
|
570
570
|
if (escaping) {
|
|
571
571
|
if (c2 === "/") {
|
|
572
572
|
return false;
|
|
@@ -56378,7 +56378,7 @@ globstar while`, file, fr, pattern, pr3, swallowee);
|
|
|
56378
56378
|
}
|
|
56379
56379
|
};
|
|
56380
56380
|
for (let i3 = 0, c2;i3 < pattern.length && (c2 = pattern.charAt(i3)); i3++) {
|
|
56381
|
-
this.debug("%s
|
|
56381
|
+
this.debug("%s %s %s %j", pattern, i3, re3, c2);
|
|
56382
56382
|
if (escaping) {
|
|
56383
56383
|
if (c2 === "/") {
|
|
56384
56384
|
return false;
|
|
@@ -64901,7 +64901,7 @@ Is ${source_default.bold.blue(this.base.name)} schema created or renamed from an
|
|
|
64901
64901
|
IS_LINE_JUNK = function(line22, pat = /^\s*#?\s*$/) {
|
|
64902
64902
|
return pat.test(line22);
|
|
64903
64903
|
};
|
|
64904
|
-
IS_CHARACTER_JUNK = function(ch, ws = "
|
|
64904
|
+
IS_CHARACTER_JUNK = function(ch, ws = " ") {
|
|
64905
64905
|
return indexOf.call(ws, ch) >= 0;
|
|
64906
64906
|
};
|
|
64907
64907
|
_formatRangeUnified = function(start2, stop2) {
|
|
@@ -74491,7 +74491,7 @@ globstar while`, file, fr, pattern, pr3, swallowee);
|
|
|
74491
74491
|
}
|
|
74492
74492
|
};
|
|
74493
74493
|
for (let i3 = 0, c2;i3 < pattern.length && (c2 = pattern.charAt(i3)); i3++) {
|
|
74494
|
-
this.debug("%s
|
|
74494
|
+
this.debug("%s %s %s %j", pattern, i3, re3, c2);
|
|
74495
74495
|
if (escaping) {
|
|
74496
74496
|
if (c2 === "/") {
|
|
74497
74497
|
return false;
|
|
@@ -118885,7 +118885,7 @@ async function seedCurrentProjectGame(db, project) {
|
|
|
118885
118885
|
}
|
|
118886
118886
|
var package_default = {
|
|
118887
118887
|
name: "@playcademy/sandbox",
|
|
118888
|
-
version: "0.1.0-beta.
|
|
118888
|
+
version: "0.1.0-beta.3",
|
|
118889
118889
|
description: "Local development server for Playcademy game development",
|
|
118890
118890
|
type: "module",
|
|
118891
118891
|
exports: {
|
|
@@ -123400,7 +123400,7 @@ var shell_default = `<!doctype html>
|
|
|
123400
123400
|
</div>
|
|
123401
123401
|
|
|
123402
123402
|
<script type="module">
|
|
123403
|
-
import {
|
|
123403
|
+
import { messaging, MessageEvents } from '@playcademy/sdk'
|
|
123404
123404
|
|
|
123405
123405
|
const status = document.getElementById('status')
|
|
123406
123406
|
const loading = document.getElementById('loading')
|
|
@@ -123446,16 +123446,17 @@ var shell_default = `<!doctype html>
|
|
|
123446
123446
|
'Game iframe loaded, sending PLAYCADEMY_INIT message',
|
|
123447
123447
|
)
|
|
123448
123448
|
|
|
123449
|
-
|
|
123449
|
+
messaging.send(
|
|
123450
|
+
MessageEvents.INIT,
|
|
123450
123451
|
{
|
|
123451
|
-
|
|
123452
|
-
|
|
123453
|
-
|
|
123454
|
-
|
|
123455
|
-
|
|
123456
|
-
|
|
123452
|
+
baseUrl: '{{SANDBOX_URL}}',
|
|
123453
|
+
token: 'dev-token',
|
|
123454
|
+
gameId: '{{GAME_ID}}',
|
|
123455
|
+
},
|
|
123456
|
+
{
|
|
123457
|
+
target: gameFrame.contentWindow,
|
|
123458
|
+
origin: '*',
|
|
123457
123459
|
},
|
|
123458
|
-
'*',
|
|
123459
123460
|
)
|
|
123460
123461
|
}
|
|
123461
123462
|
|
|
@@ -123474,7 +123475,8 @@ var shell_default = `<!doctype html>
|
|
|
123474
123475
|
const { type, ...payload } = event.data || {}
|
|
123475
123476
|
if (type && type.startsWith('PLAYCADEMY_')) {
|
|
123476
123477
|
logIfDebug('Received message from game:', type, payload)
|
|
123477
|
-
|
|
123478
|
+
// Bridge the message to the local context using CustomEvent
|
|
123479
|
+
messaging.send(type, payload)
|
|
123478
123480
|
}
|
|
123479
123481
|
}
|
|
123480
123482
|
})
|
|
@@ -123499,6 +123501,11 @@ function devServerMiddleware(server, sandboxUrl, project) {
|
|
|
123499
123501
|
res.end(generateLoaderHTML(sandboxUrl, gameId));
|
|
123500
123502
|
return;
|
|
123501
123503
|
}
|
|
123504
|
+
if (req.url === "/game" && req.method === "GET") {
|
|
123505
|
+
req.url = "/index.html";
|
|
123506
|
+
next();
|
|
123507
|
+
return;
|
|
123508
|
+
}
|
|
123502
123509
|
next();
|
|
123503
123510
|
});
|
|
123504
123511
|
}
|