playcademy 0.19.1-beta.2 → 0.19.1-beta.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/dist/cli.js +2 -2
- package/dist/constants.js +1 -1
- package/dist/db.js +1 -1
- package/dist/index.d.ts +3 -0
- package/dist/index.js +22 -10
- package/dist/runtime/backend-runtime/index.js +3 -3
- package/dist/runtime/backend-runtime/manifest.json +4 -4
- package/dist/utils.js +6 -3
- package/dist/version.js +1 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -1065,7 +1065,7 @@ var SAMPLE_BUCKET_FILENAME = "bucket.ts";
|
|
|
1065
1065
|
// ../better-auth/package.json
|
|
1066
1066
|
var package_default = {
|
|
1067
1067
|
name: "@playcademy/better-auth",
|
|
1068
|
-
version: "0.0.6-beta.
|
|
1068
|
+
version: "0.0.6-beta.4",
|
|
1069
1069
|
type: "module",
|
|
1070
1070
|
exports: {
|
|
1071
1071
|
"./server": {
|
|
@@ -3016,7 +3016,7 @@ import { existsSync as existsSync11, mkdirSync as mkdirSync5, readFileSync as re
|
|
|
3016
3016
|
import { join as join13 } from "node:path";
|
|
3017
3017
|
|
|
3018
3018
|
// src/version.ts
|
|
3019
|
-
var cliVersion = false ? "0.0.0-dev" : "0.19.1-beta.
|
|
3019
|
+
var cliVersion = false ? "0.0.0-dev" : "0.19.1-beta.4";
|
|
3020
3020
|
|
|
3021
3021
|
// src/lib/init/database.ts
|
|
3022
3022
|
var drizzleConfigTemplate = loadTemplateString("database/drizzle-config.ts");
|
package/dist/constants.js
CHANGED
package/dist/db.js
CHANGED
|
@@ -36,7 +36,7 @@ var DEFAULT_API_ROUTES_DIRECTORY = join2(SERVER_ROOT_DIRECTORY, "api");
|
|
|
36
36
|
// ../better-auth/package.json
|
|
37
37
|
var package_default = {
|
|
38
38
|
name: "@playcademy/better-auth",
|
|
39
|
-
version: "0.0.6-beta.
|
|
39
|
+
version: "0.0.6-beta.4",
|
|
40
40
|
type: "module",
|
|
41
41
|
exports: {
|
|
42
42
|
"./server": {
|
package/dist/index.d.ts
CHANGED
|
@@ -1063,6 +1063,7 @@ interface DeploymentContext {
|
|
|
1063
1063
|
minify: boolean;
|
|
1064
1064
|
verbose: boolean;
|
|
1065
1065
|
debug: boolean;
|
|
1066
|
+
compatibilityDate?: string;
|
|
1066
1067
|
}
|
|
1067
1068
|
/**
|
|
1068
1069
|
* Analysis of what changed in an update
|
|
@@ -1195,6 +1196,8 @@ interface BundleOptions {
|
|
|
1195
1196
|
sourcemap?: boolean;
|
|
1196
1197
|
/** Minify output (default: false) */
|
|
1197
1198
|
minify?: boolean;
|
|
1199
|
+
/** Override the Worker compatibility date used for compat-aware bundling */
|
|
1200
|
+
compatibilityDate?: string;
|
|
1198
1201
|
}
|
|
1199
1202
|
/**
|
|
1200
1203
|
* Metadata describing the sealed backend runtime artifact.
|
package/dist/index.js
CHANGED
|
@@ -326,7 +326,7 @@ var SAMPLE_BUCKET_FILENAME = "bucket.ts";
|
|
|
326
326
|
// ../better-auth/package.json
|
|
327
327
|
var package_default = {
|
|
328
328
|
name: "@playcademy/better-auth",
|
|
329
|
-
version: "0.0.6-beta.
|
|
329
|
+
version: "0.0.6-beta.4",
|
|
330
330
|
type: "module",
|
|
331
331
|
exports: {
|
|
332
332
|
"./server": {
|
|
@@ -4017,7 +4017,7 @@ import { existsSync as existsSync9, mkdirSync as mkdirSync2, readFileSync as rea
|
|
|
4017
4017
|
import { join as join13 } from "node:path";
|
|
4018
4018
|
|
|
4019
4019
|
// src/version.ts
|
|
4020
|
-
var cliVersion = false ? "0.0.0-dev" : "0.19.1-beta.
|
|
4020
|
+
var cliVersion = false ? "0.0.0-dev" : "0.19.1-beta.4";
|
|
4021
4021
|
|
|
4022
4022
|
// src/lib/init/database.ts
|
|
4023
4023
|
var drizzleConfigTemplate = loadTemplateString("database/drizzle-config.ts");
|
|
@@ -9515,7 +9515,10 @@ function createEsbuildConfig(entryCode, paths, bundleConfig, customRoutesDir, op
|
|
|
9515
9515
|
// └─────────────────────────────────────────────────────────────────────┘
|
|
9516
9516
|
"@game-server": join32(workspace, "server")
|
|
9517
9517
|
},
|
|
9518
|
-
plugins: [
|
|
9518
|
+
plugins: [
|
|
9519
|
+
createBackendNodeCompatPlugin({ compatibilityDate: options.compatibilityDate }),
|
|
9520
|
+
createForbiddenRuntimeImportsPlugin(workspace)
|
|
9521
|
+
],
|
|
9519
9522
|
external: []
|
|
9520
9523
|
// Native workerd builtins are externalized via the compat plugin
|
|
9521
9524
|
};
|
|
@@ -10964,7 +10967,7 @@ import {
|
|
|
10964
10967
|
// ../data/src/domains/user/table.ts
|
|
10965
10968
|
import { relations } from "drizzle-orm";
|
|
10966
10969
|
import { boolean, pgEnum, pgTable, text, timestamp, uniqueIndex } from "drizzle-orm/pg-core";
|
|
10967
|
-
var userRoleEnum = pgEnum("user_role", ["admin", "player", "developer"]);
|
|
10970
|
+
var userRoleEnum = pgEnum("user_role", ["admin", "player", "developer", "teacher"]);
|
|
10968
10971
|
var developerStatusEnum = pgEnum("developer_status", ["none", "pending", "approved"]);
|
|
10969
10972
|
var users = pgTable("user", {
|
|
10970
10973
|
id: text("id").primaryKey().$defaultFn(() => crypto.randomUUID()),
|
|
@@ -11504,6 +11507,7 @@ async function prepareDeploymentContext(options) {
|
|
|
11504
11507
|
minify: options.minify ?? true,
|
|
11505
11508
|
verbose: options.verbose ?? false,
|
|
11506
11509
|
debug: options.debug ?? false,
|
|
11510
|
+
compatibilityDate: options.compatibilityDate,
|
|
11507
11511
|
localSecrets,
|
|
11508
11512
|
remoteSecretKeys
|
|
11509
11513
|
};
|
|
@@ -11529,7 +11533,10 @@ async function detectIntegrationMetadataChanges(context2) {
|
|
|
11529
11533
|
async function bundleAndHash(context2) {
|
|
11530
11534
|
try {
|
|
11531
11535
|
await ensurePlaycademyTypes();
|
|
11532
|
-
const bundle = await bundleBackend(context2.fullConfig, {
|
|
11536
|
+
const bundle = await bundleBackend(context2.fullConfig, {
|
|
11537
|
+
minify: context2.minify,
|
|
11538
|
+
compatibilityDate: context2.compatibilityDate
|
|
11539
|
+
});
|
|
11533
11540
|
const bundleHash = hashContent(bundle.code);
|
|
11534
11541
|
const [serverSize, dbSize] = await Promise.all([
|
|
11535
11542
|
getDirectorySize(join37(context2.projectPath, SERVER_ROOT_DIRECTORY)),
|
|
@@ -11644,6 +11651,7 @@ async function calculateDeploymentPlan(context2, changes) {
|
|
|
11644
11651
|
deployBackend,
|
|
11645
11652
|
forceBackend
|
|
11646
11653
|
} = context2;
|
|
11654
|
+
const compatibilityDateOverride = Boolean(context2.compatibilityDate) && deployBackend;
|
|
11647
11655
|
if (!gameAlreadyDeployed) {
|
|
11648
11656
|
const needsBackend3 = hasLocalCustomRoutes(projectPath, context2.fullConfig) || Boolean(context2.fullConfig?.integrations);
|
|
11649
11657
|
const shouldDeployBackend2 = deployBackend && needsBackend3;
|
|
@@ -11660,7 +11668,7 @@ async function calculateDeploymentPlan(context2, changes) {
|
|
|
11660
11668
|
const configHasChanges = changes.config;
|
|
11661
11669
|
const secretsHaveChanges = changes.secrets !== void 0;
|
|
11662
11670
|
const noChanges = !buildHasChanges && !backendHasChanges && !configHasChanges && !secretsHaveChanges;
|
|
11663
|
-
if (noChanges && !forceBackend) {
|
|
11671
|
+
if (noChanges && !forceBackend && !compatibilityDateOverride) {
|
|
11664
11672
|
return {
|
|
11665
11673
|
action: "no-changes",
|
|
11666
11674
|
gameType: config.gameType ?? "hosted",
|
|
@@ -11673,7 +11681,7 @@ async function calculateDeploymentPlan(context2, changes) {
|
|
|
11673
11681
|
const shouldUpdateGame = buildHasChanges || configHasChanges;
|
|
11674
11682
|
const shouldUploadBuild = buildHasChanges;
|
|
11675
11683
|
const needsBackend2 = hasLocalCustomRoutes(projectPath, context2.fullConfig) || Boolean(context2.fullConfig?.integrations);
|
|
11676
|
-
const shouldDeployBackend = deployBackend && (backendHasChanges || forceBackend || shouldUploadBuild && needsBackend2);
|
|
11684
|
+
const shouldDeployBackend = deployBackend && (backendHasChanges || forceBackend || compatibilityDateOverride || shouldUploadBuild && needsBackend2);
|
|
11677
11685
|
return {
|
|
11678
11686
|
action: "update-existing",
|
|
11679
11687
|
gameType: config.gameType ?? "hosted",
|
|
@@ -11854,7 +11862,10 @@ async function deployGame(context2, shouldUploadBuild, shouldDeployBackend) {
|
|
|
11854
11862
|
await ensurePlaycademyTypes();
|
|
11855
11863
|
const bundle = await runStep(
|
|
11856
11864
|
"Bundling backend",
|
|
11857
|
-
async () => context2.currentBackendBundle ?? bundleBackend(fullConfig, {
|
|
11865
|
+
async () => context2.currentBackendBundle ?? bundleBackend(fullConfig, {
|
|
11866
|
+
minify: context2.minify,
|
|
11867
|
+
compatibilityDate: context2.compatibilityDate
|
|
11868
|
+
}),
|
|
11858
11869
|
"Backend bundled"
|
|
11859
11870
|
);
|
|
11860
11871
|
const deploymentPrep = await runStep(
|
|
@@ -11898,7 +11909,7 @@ async function deployGame(context2, shouldUploadBuild, shouldDeployBackend) {
|
|
|
11898
11909
|
...bundle,
|
|
11899
11910
|
bindings: Object.keys(deploymentPrep.bindings).length > 0 ? deploymentPrep.bindings : void 0,
|
|
11900
11911
|
schema: deploymentPrep.schemaInfo || void 0,
|
|
11901
|
-
compatibilityDate: CLOUDFLARE_COMPATIBILITY_DATE,
|
|
11912
|
+
compatibilityDate: context2.compatibilityDate ?? CLOUDFLARE_COMPATIBILITY_DATE,
|
|
11902
11913
|
compatibilityFlags: [...BACKEND_COMPATIBILITY_FLAGS]
|
|
11903
11914
|
};
|
|
11904
11915
|
const [serverSize, dbSize] = await Promise.all([
|
|
@@ -11928,7 +11939,8 @@ async function deployGame(context2, shouldUploadBuild, shouldDeployBackend) {
|
|
|
11928
11939
|
);
|
|
11929
11940
|
backendBundle = {
|
|
11930
11941
|
code: stubCode,
|
|
11931
|
-
config: fullConfig || { name: "stub" }
|
|
11942
|
+
config: fullConfig || { name: "stub" },
|
|
11943
|
+
...context2.compatibilityDate ? { compatibilityDate: context2.compatibilityDate } : {}
|
|
11932
11944
|
};
|
|
11933
11945
|
}
|
|
11934
11946
|
let game;
|
|
@@ -344,9 +344,9 @@ var init_routes = __esm({
|
|
|
344
344
|
// ../edge-play/src/entry/metadata.ts
|
|
345
345
|
function getRuntimeMetadata() {
|
|
346
346
|
return {
|
|
347
|
-
cliVersion: true ? "0.19.1-beta.
|
|
348
|
-
sdkVersion: true ? "0.4.1-beta.
|
|
349
|
-
buildId: true ? "
|
|
347
|
+
cliVersion: true ? "0.19.1-beta.4" : "0.0.0-dev",
|
|
348
|
+
sdkVersion: true ? "0.4.1-beta.4" : "0.0.0-dev",
|
|
349
|
+
buildId: true ? "496079034260" : "dev-source"
|
|
350
350
|
};
|
|
351
351
|
}
|
|
352
352
|
var init_metadata = __esm({
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
|
-
"cliVersion": "0.19.1-beta.
|
|
3
|
-
"sdkVersion": "0.4.1-beta.
|
|
4
|
-
"runtimeBuildId": "
|
|
5
|
-
"inputFingerprint": "
|
|
2
|
+
"cliVersion": "0.19.1-beta.4",
|
|
3
|
+
"sdkVersion": "0.4.1-beta.4",
|
|
4
|
+
"runtimeBuildId": "496079034260",
|
|
5
|
+
"inputFingerprint": "49607903426071782d895256d849a86318572b2a424466ac49b2e56b8bb52cdd",
|
|
6
6
|
"entry": "index.js"
|
|
7
7
|
}
|
package/dist/utils.js
CHANGED
|
@@ -477,7 +477,7 @@ var DEFAULT_API_ROUTES_DIRECTORY = join2(SERVER_ROOT_DIRECTORY, "api");
|
|
|
477
477
|
// ../better-auth/package.json
|
|
478
478
|
var package_default = {
|
|
479
479
|
name: "@playcademy/better-auth",
|
|
480
|
-
version: "0.0.6-beta.
|
|
480
|
+
version: "0.0.6-beta.4",
|
|
481
481
|
type: "module",
|
|
482
482
|
exports: {
|
|
483
483
|
"./server": {
|
|
@@ -2529,7 +2529,7 @@ import { existsSync as existsSync8, mkdirSync as mkdirSync2, writeFileSync as wr
|
|
|
2529
2529
|
import { dirname as dirname4, join as join13 } from "node:path";
|
|
2530
2530
|
|
|
2531
2531
|
// src/version.ts
|
|
2532
|
-
var cliVersion = false ? "0.0.0-dev" : "0.19.1-beta.
|
|
2532
|
+
var cliVersion = false ? "0.0.0-dev" : "0.19.1-beta.4";
|
|
2533
2533
|
|
|
2534
2534
|
// src/lib/build/binary-resource.ts
|
|
2535
2535
|
function writeFileTree(baseDir, files) {
|
|
@@ -5232,7 +5232,10 @@ function createEsbuildConfig(entryCode, paths, bundleConfig, customRoutesDir, op
|
|
|
5232
5232
|
// └─────────────────────────────────────────────────────────────────────┘
|
|
5233
5233
|
"@game-server": join18(workspace, "server")
|
|
5234
5234
|
},
|
|
5235
|
-
plugins: [
|
|
5235
|
+
plugins: [
|
|
5236
|
+
createBackendNodeCompatPlugin({ compatibilityDate: options.compatibilityDate }),
|
|
5237
|
+
createForbiddenRuntimeImportsPlugin(workspace)
|
|
5238
|
+
],
|
|
5236
5239
|
external: []
|
|
5237
5240
|
// Native workerd builtins are externalized via the compat plugin
|
|
5238
5241
|
};
|
package/dist/version.js
CHANGED