playcademy 0.27.1-beta.8 → 0.28.0
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/bin.js +6 -1
- package/dist/bucket.js +12 -1
- package/dist/cli.js +13 -2
- package/dist/constants.js +1 -1
- package/dist/db.js +12 -1
- package/dist/index.d.ts +26 -9
- package/dist/index.js +815 -81
- package/dist/runtime/dashboard-runtime/manifest.json +4 -4
- package/dist/runtime/game-runtime/index.js +15 -4
- package/dist/runtime/game-runtime/manifest.json +4 -4
- package/dist/utils.js +25 -6
- package/dist/version.js +1 -1
- package/package.json +2 -2
package/dist/bin.js
CHANGED
|
@@ -27,6 +27,10 @@ var CLI_DEFAULT_OUTPUTS = {
|
|
|
27
27
|
WORKER_BUNDLE: join(WORKSPACE_NAME, "worker-bundle.js")
|
|
28
28
|
};
|
|
29
29
|
|
|
30
|
+
// src/lib/upgrade/constants.ts
|
|
31
|
+
var INSTALL_SCRIPT_URL = "https://playcademy.net/cli";
|
|
32
|
+
var INSTALL_SCRIPT_URL_WINDOWS = "https://playcademy.net/cli.ps1";
|
|
33
|
+
|
|
30
34
|
// src/bin.ts
|
|
31
35
|
var exe = process.platform === "win32" ? "playcademy.exe" : "playcademy";
|
|
32
36
|
function findBinary() {
|
|
@@ -57,6 +61,7 @@ if (binary) {
|
|
|
57
61
|
}
|
|
58
62
|
var args = process.argv.slice(2);
|
|
59
63
|
var command = args.length ? `playcademy ${args.join(" ")}` : "playcademy";
|
|
64
|
+
var installCommand = process.platform === "win32" ? `irm ${INSTALL_SCRIPT_URL_WINDOWS} | iex` : `curl -fsSL ${INSTALL_SCRIPT_URL} | bash`;
|
|
60
65
|
var g = red("\u2502");
|
|
61
66
|
console.error(
|
|
62
67
|
[
|
|
@@ -66,7 +71,7 @@ console.error(
|
|
|
66
71
|
g,
|
|
67
72
|
`${g} Install it separately:`,
|
|
68
73
|
g,
|
|
69
|
-
`${g} ${green(
|
|
74
|
+
`${g} ${green(installCommand)}`,
|
|
70
75
|
g,
|
|
71
76
|
`${g} Then re-run your command:`,
|
|
72
77
|
g,
|
package/dist/bucket.js
CHANGED
|
@@ -44,7 +44,7 @@ var GAME_API_ROUTES_DIRECTORY = join2(GAME_SERVER_ROOT_DIRECTORY, "api");
|
|
|
44
44
|
// ../better-auth/package.json
|
|
45
45
|
var package_default = {
|
|
46
46
|
name: "@playcademy/better-auth",
|
|
47
|
-
version: "0.0.20
|
|
47
|
+
version: "0.0.20",
|
|
48
48
|
type: "module",
|
|
49
49
|
exports: {
|
|
50
50
|
"./server": {
|
|
@@ -275,6 +275,17 @@ var TIMEBACK_DISCREPANCY_QUEUE_WINDOWS = [
|
|
|
275
275
|
"custom"
|
|
276
276
|
];
|
|
277
277
|
var TIMEBACK_DISCREPANCY_QUEUE_METRICS = ["xp", "mastery", "time", "score"];
|
|
278
|
+
var PLAYCADEMY_SUPPORTED_QTI_INTERACTION_TYPES = [
|
|
279
|
+
"choice",
|
|
280
|
+
"inline-choice",
|
|
281
|
+
"text-entry",
|
|
282
|
+
"order",
|
|
283
|
+
"match",
|
|
284
|
+
"hottext"
|
|
285
|
+
];
|
|
286
|
+
var PLAYCADEMY_SUPPORTED_QTI_INTERACTION_TYPE_SET = new Set(
|
|
287
|
+
PLAYCADEMY_SUPPORTED_QTI_INTERACTION_TYPES
|
|
288
|
+
);
|
|
278
289
|
var TIMEBACK_DISCREPANCY_QUEUE_WINDOW_VALUES = new Set(TIMEBACK_DISCREPANCY_QUEUE_WINDOWS);
|
|
279
290
|
var TIMEBACK_DISCREPANCY_QUEUE_METRIC_VALUES = new Set(TIMEBACK_DISCREPANCY_QUEUE_METRICS);
|
|
280
291
|
|
package/dist/cli.js
CHANGED
|
@@ -1207,7 +1207,7 @@ var SAMPLE_BUCKET_FILENAME = "bucket.ts";
|
|
|
1207
1207
|
// ../better-auth/package.json
|
|
1208
1208
|
var package_default = {
|
|
1209
1209
|
name: "@playcademy/better-auth",
|
|
1210
|
-
version: "0.0.20
|
|
1210
|
+
version: "0.0.20",
|
|
1211
1211
|
type: "module",
|
|
1212
1212
|
exports: {
|
|
1213
1213
|
"./server": {
|
|
@@ -2115,6 +2115,17 @@ var TIMEBACK_DISCREPANCY_QUEUE_WINDOWS = [
|
|
|
2115
2115
|
"custom"
|
|
2116
2116
|
];
|
|
2117
2117
|
var TIMEBACK_DISCREPANCY_QUEUE_METRICS = ["xp", "mastery", "time", "score"];
|
|
2118
|
+
var PLAYCADEMY_SUPPORTED_QTI_INTERACTION_TYPES = [
|
|
2119
|
+
"choice",
|
|
2120
|
+
"inline-choice",
|
|
2121
|
+
"text-entry",
|
|
2122
|
+
"order",
|
|
2123
|
+
"match",
|
|
2124
|
+
"hottext"
|
|
2125
|
+
];
|
|
2126
|
+
var PLAYCADEMY_SUPPORTED_QTI_INTERACTION_TYPE_SET = new Set(
|
|
2127
|
+
PLAYCADEMY_SUPPORTED_QTI_INTERACTION_TYPES
|
|
2128
|
+
);
|
|
2118
2129
|
var TIMEBACK_DISCREPANCY_QUEUE_WINDOW_VALUES = new Set(TIMEBACK_DISCREPANCY_QUEUE_WINDOWS);
|
|
2119
2130
|
var TIMEBACK_DISCREPANCY_QUEUE_METRIC_VALUES = new Set(TIMEBACK_DISCREPANCY_QUEUE_METRICS);
|
|
2120
2131
|
|
|
@@ -2996,7 +3007,7 @@ import { existsSync as existsSync11, mkdirSync as mkdirSync5, readFileSync as re
|
|
|
2996
3007
|
import { join as join13 } from "node:path";
|
|
2997
3008
|
|
|
2998
3009
|
// src/version.ts
|
|
2999
|
-
var cliVersion = false ? "0.0.0-dev" : "0.
|
|
3010
|
+
var cliVersion = false ? "0.0.0-dev" : "0.28.0";
|
|
3000
3011
|
|
|
3001
3012
|
// src/lib/init/database.ts
|
|
3002
3013
|
var drizzleConfigTemplate = loadTemplateString("database/drizzle-config.ts");
|
package/dist/constants.js
CHANGED
package/dist/db.js
CHANGED
|
@@ -2335,7 +2335,7 @@ var GAME_API_ROUTES_DIRECTORY = join2(GAME_SERVER_ROOT_DIRECTORY, "api");
|
|
|
2335
2335
|
// ../better-auth/package.json
|
|
2336
2336
|
var package_default = {
|
|
2337
2337
|
name: "@playcademy/better-auth",
|
|
2338
|
-
version: "0.0.20
|
|
2338
|
+
version: "0.0.20",
|
|
2339
2339
|
type: "module",
|
|
2340
2340
|
exports: {
|
|
2341
2341
|
"./server": {
|
|
@@ -4201,6 +4201,17 @@ var TIMEBACK_DISCREPANCY_QUEUE_WINDOWS = [
|
|
|
4201
4201
|
"custom"
|
|
4202
4202
|
];
|
|
4203
4203
|
var TIMEBACK_DISCREPANCY_QUEUE_METRICS = ["xp", "mastery", "time", "score"];
|
|
4204
|
+
var PLAYCADEMY_SUPPORTED_QTI_INTERACTION_TYPES = [
|
|
4205
|
+
"choice",
|
|
4206
|
+
"inline-choice",
|
|
4207
|
+
"text-entry",
|
|
4208
|
+
"order",
|
|
4209
|
+
"match",
|
|
4210
|
+
"hottext"
|
|
4211
|
+
];
|
|
4212
|
+
var PLAYCADEMY_SUPPORTED_QTI_INTERACTION_TYPE_SET = new Set(
|
|
4213
|
+
PLAYCADEMY_SUPPORTED_QTI_INTERACTION_TYPES
|
|
4214
|
+
);
|
|
4204
4215
|
var TIMEBACK_DISCREPANCY_QUEUE_WINDOW_VALUES = new Set(TIMEBACK_DISCREPANCY_QUEUE_WINDOWS);
|
|
4205
4216
|
var TIMEBACK_DISCREPANCY_QUEUE_METRIC_VALUES = new Set(TIMEBACK_DISCREPANCY_QUEUE_METRICS);
|
|
4206
4217
|
|
package/dist/index.d.ts
CHANGED
|
@@ -1574,9 +1574,11 @@ interface LoadConfigResult {
|
|
|
1574
1574
|
* Log Streaming Types
|
|
1575
1575
|
*/
|
|
1576
1576
|
interface LogEntry {
|
|
1577
|
+
id?: number;
|
|
1577
1578
|
timestamp: number;
|
|
1578
1579
|
scriptName: string;
|
|
1579
1580
|
outcome: string;
|
|
1581
|
+
rayId?: string;
|
|
1580
1582
|
logs: {
|
|
1581
1583
|
level: string;
|
|
1582
1584
|
message: unknown[];
|
|
@@ -1593,23 +1595,38 @@ interface LogEntry {
|
|
|
1593
1595
|
status: number;
|
|
1594
1596
|
};
|
|
1595
1597
|
}
|
|
1598
|
+
interface LogFilters {
|
|
1599
|
+
status?: {
|
|
1600
|
+
min: number;
|
|
1601
|
+
max: number;
|
|
1602
|
+
};
|
|
1603
|
+
method?: string;
|
|
1604
|
+
path?: string;
|
|
1605
|
+
level?: string;
|
|
1606
|
+
ray?: string;
|
|
1607
|
+
grep?: string;
|
|
1608
|
+
}
|
|
1609
|
+
interface LogHistoryQuery {
|
|
1610
|
+
since?: number;
|
|
1611
|
+
until?: number;
|
|
1612
|
+
limit?: number;
|
|
1613
|
+
filters: LogFilters;
|
|
1614
|
+
}
|
|
1615
|
+
interface LogHistoryResult {
|
|
1616
|
+
entries: LogEntry[];
|
|
1617
|
+
truncated: boolean;
|
|
1618
|
+
}
|
|
1596
1619
|
interface LogStreamUrlOptions {
|
|
1597
|
-
/** Worker ID to stream logs from */
|
|
1598
1620
|
workerId: string;
|
|
1599
|
-
/** Authentication token */
|
|
1600
1621
|
token: string;
|
|
1601
|
-
/** Include recent log history */
|
|
1602
|
-
history?: boolean;
|
|
1603
1622
|
}
|
|
1604
1623
|
interface LogStreamConfig {
|
|
1605
|
-
/** WebSocket URL to connect to */
|
|
1606
1624
|
url: string;
|
|
1607
|
-
/** Game slug (for display purposes) */
|
|
1608
1625
|
slug: string;
|
|
1609
|
-
/** Environment (for display purposes) */
|
|
1610
1626
|
environment: 'local' | 'staging' | 'production';
|
|
1611
|
-
/** Output raw JSON with full timestamps */
|
|
1612
1627
|
json?: boolean;
|
|
1628
|
+
matches?: (entry: LogEntry) => boolean;
|
|
1629
|
+
backfill?: () => Promise<LogHistoryResult>;
|
|
1613
1630
|
}
|
|
1614
1631
|
|
|
1615
1632
|
/** A component with a newer version available than what's installed. */
|
|
@@ -1753,4 +1770,4 @@ interface RunShellOptions {
|
|
|
1753
1770
|
env?: NodeJS.ProcessEnv;
|
|
1754
1771
|
}
|
|
1755
1772
|
|
|
1756
|
-
export type { ApiConfig, ApiErrorResponse, ApiKeyListItem, ApiKeyWithSecret, ApiRequestOptions, ApplySecretsOptions, AssetManifest, AuthProfile, AuthStore, AuthStrategy, AvailableUpdate, BackendDiff, BaseKVOptions, BlockedCode, BucketAdapter, BucketGetOptions, BucketListOptions, BucketMigrateMode, BucketObjectRef, BucketPutOptions, BucketSyncOptions, BuildDiff, BundleOptions, CallbackServerResult, CheckSecretsOptions, CollectedFile, CompatibilityKey, CompatibilityManifest, ConfigDiff, CreateApiKeyResponse, CustomRoutesIntegrationOptions, DashboardConfig, DatabaseIntegrationOptions, DependencyCheck, DeployConfig, DeployNewGameOptions, DeployedGameInfo, DeploymentChanges, DeploymentContext, DeploymentDiffOptions, DeploymentPlan, DeploymentResult, DiscoveredDependency, EngineConfig, EngineType, EnvironmentAuthProfiles, GameBackendBundle, GameBackendDeploymentMetadata, GameBackendFeatures, GameDevServerOptions, GameRuntimePaths, GameStore, HashedFile, InstalledVersions, IntegrationChangeDetector, IntegrationChangeDetectors, IntegrationConfigChange, IntegrationsConfig, IntegrationsDiff, KVClearOptions, KVDeleteOptions, KVDumpOptions, KVGetOptions, KVInspectOptions, KVListOptions, KVSeedOptions, KVSetOptions, KVStatsOptions, KeyMetadata, KeyStats, LoadConfigResult, LogEntry, LogStreamConfig, LogStreamUrlOptions, LoginCredentials, LoginResponse, MissingSecret, PlaycademyConfig, PluginLogger, PreviewOptions, PreviewResponse, ProjectDirectoryInfo, QueueConfig, RunShellOptions, RuntimeManifest, ScaffoldResult, SecretCommandOptions, SecretListOptions, SecretPushOptions, SecretsSyncOptions, SecretsSyncResult, SignInResponse, SsoCallbackData, Template, TemplateFramework, TemplateHook, TemplateHookOptions, TemplateSource, TimebackBaseConfig, TimebackCourseConfigWithOverrides, TimebackIntegrationConfig, TokenType, UpdateCommand, UpdateExistingGameOptions, Violation, WorkspaceDependencies };
|
|
1773
|
+
export type { ApiConfig, ApiErrorResponse, ApiKeyListItem, ApiKeyWithSecret, ApiRequestOptions, ApplySecretsOptions, AssetManifest, AuthProfile, AuthStore, AuthStrategy, AvailableUpdate, BackendDiff, BaseKVOptions, BlockedCode, BucketAdapter, BucketGetOptions, BucketListOptions, BucketMigrateMode, BucketObjectRef, BucketPutOptions, BucketSyncOptions, BuildDiff, BundleOptions, CallbackServerResult, CheckSecretsOptions, CollectedFile, CompatibilityKey, CompatibilityManifest, ConfigDiff, CreateApiKeyResponse, CustomRoutesIntegrationOptions, DashboardConfig, DatabaseIntegrationOptions, DependencyCheck, DeployConfig, DeployNewGameOptions, DeployedGameInfo, DeploymentChanges, DeploymentContext, DeploymentDiffOptions, DeploymentPlan, DeploymentResult, DiscoveredDependency, EngineConfig, EngineType, EnvironmentAuthProfiles, GameBackendBundle, GameBackendDeploymentMetadata, GameBackendFeatures, GameDevServerOptions, GameRuntimePaths, GameStore, HashedFile, InstalledVersions, IntegrationChangeDetector, IntegrationChangeDetectors, IntegrationConfigChange, IntegrationsConfig, IntegrationsDiff, KVClearOptions, KVDeleteOptions, KVDumpOptions, KVGetOptions, KVInspectOptions, KVListOptions, KVSeedOptions, KVSetOptions, KVStatsOptions, KeyMetadata, KeyStats, LoadConfigResult, LogEntry, LogFilters, LogHistoryQuery, LogHistoryResult, LogStreamConfig, LogStreamUrlOptions, LoginCredentials, LoginResponse, MissingSecret, PlaycademyConfig, PluginLogger, PreviewOptions, PreviewResponse, ProjectDirectoryInfo, QueueConfig, RunShellOptions, RuntimeManifest, ScaffoldResult, SecretCommandOptions, SecretListOptions, SecretPushOptions, SecretsSyncOptions, SecretsSyncResult, SignInResponse, SsoCallbackData, Template, TemplateFramework, TemplateHook, TemplateHookOptions, TemplateSource, TimebackBaseConfig, TimebackCourseConfigWithOverrides, TimebackIntegrationConfig, TokenType, UpdateCommand, UpdateExistingGameOptions, Violation, WorkspaceDependencies };
|