playcademy 0.13.19 → 0.13.21
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/constants.d.ts +28 -1
- package/dist/constants.js +18 -0
- package/dist/db.js +9 -2
- package/dist/edge-play/src/entry/middleware.ts +74 -0
- package/dist/edge-play/src/entry/setup.ts +52 -0
- package/dist/edge-play/src/entry/types.ts +30 -0
- package/dist/edge-play/src/entry.ts +20 -71
- package/dist/edge-play/src/routes/health.ts +56 -27
- package/dist/edge-play/src/routes/index.ts +43 -15
- package/dist/edge-play/src/types.ts +8 -1
- package/dist/index.d.ts +51 -1
- package/dist/index.js +792 -241
- package/dist/templates/gitignore.template +3 -0
- package/dist/templates/playcademy-env.d.ts.template +1 -2
- package/dist/utils.d.ts +13 -13
- package/dist/utils.js +1074 -395
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -150,6 +150,25 @@ interface ApiKeyListItem {
|
|
|
150
150
|
requestCount: number;
|
|
151
151
|
}
|
|
152
152
|
|
|
153
|
+
/**
|
|
154
|
+
* Backend-related types
|
|
155
|
+
*/
|
|
156
|
+
/**
|
|
157
|
+
* Detected backend features for type generation
|
|
158
|
+
*/
|
|
159
|
+
interface BackendFeatures {
|
|
160
|
+
/** D1 Database configured */
|
|
161
|
+
hasDB: boolean;
|
|
162
|
+
/** KV Storage configured */
|
|
163
|
+
hasKV: boolean;
|
|
164
|
+
/** R2 Bucket configured */
|
|
165
|
+
hasBucket: boolean;
|
|
166
|
+
/** Custom API routes exist */
|
|
167
|
+
hasRoutes: boolean;
|
|
168
|
+
/** .env files exist */
|
|
169
|
+
hasSecrets: boolean;
|
|
170
|
+
}
|
|
171
|
+
|
|
153
172
|
/**
|
|
154
173
|
* @fileoverview Server SDK Type Definitions
|
|
155
174
|
*
|
|
@@ -251,6 +270,8 @@ interface BackendDeploymentBundle {
|
|
|
251
270
|
bindings?: BackendResourceBindings;
|
|
252
271
|
/** Optional schema information for database setup */
|
|
253
272
|
schema?: SchemaInfo;
|
|
273
|
+
/** Optional game secrets */
|
|
274
|
+
secrets?: Record<string, string>;
|
|
254
275
|
}
|
|
255
276
|
|
|
256
277
|
type GameMetadata = {
|
|
@@ -524,6 +545,7 @@ interface DeployedGameInfo {
|
|
|
524
545
|
schemaSnapshot?: unknown;
|
|
525
546
|
integrationKeys?: string[];
|
|
526
547
|
integrationsHash?: string;
|
|
548
|
+
deployedSecrets?: string[];
|
|
527
549
|
}
|
|
528
550
|
interface GameStore {
|
|
529
551
|
[projectPath: string]: DeployedGameInfo;
|
|
@@ -544,6 +566,8 @@ interface BackendDeploymentWithHash extends BackendDeploymentResponse {
|
|
|
544
566
|
integrationKeys: string[];
|
|
545
567
|
/** Hash of integrations config (for detecting metadata changes) */
|
|
546
568
|
integrationsHash: string | null;
|
|
569
|
+
/** Secret keys that have been deployed */
|
|
570
|
+
deployedSecrets?: string[];
|
|
547
571
|
}
|
|
548
572
|
/**
|
|
549
573
|
* Deployment context containing all information needed for deployment
|
|
@@ -566,6 +590,7 @@ interface DeploymentContext {
|
|
|
566
590
|
previousBackendSize?: number;
|
|
567
591
|
previousIntegrationKeys?: string[];
|
|
568
592
|
previousIntegrationsHash?: string;
|
|
593
|
+
currentSecretKeys?: string[];
|
|
569
594
|
isDryRun: boolean;
|
|
570
595
|
deployBackend: boolean;
|
|
571
596
|
forceBackend: boolean;
|
|
@@ -582,6 +607,7 @@ interface DeploymentChanges {
|
|
|
582
607
|
customRoutes: boolean | undefined;
|
|
583
608
|
integrations: boolean | undefined;
|
|
584
609
|
schema?: boolean;
|
|
610
|
+
secrets?: boolean;
|
|
585
611
|
}
|
|
586
612
|
/**
|
|
587
613
|
* Plan for what needs to be deployed
|
|
@@ -689,6 +715,22 @@ interface EmbeddedSourcePaths {
|
|
|
689
715
|
cliNodeModules: string;
|
|
690
716
|
}
|
|
691
717
|
|
|
718
|
+
interface DevServerOptions {
|
|
719
|
+
port: number;
|
|
720
|
+
/** Playcademy config. If not provided, will attempt to load from playcademy.config.js */
|
|
721
|
+
config?: PlaycademyConfig;
|
|
722
|
+
/** Enable HTTP request logging */
|
|
723
|
+
logger?: boolean;
|
|
724
|
+
/** Suppress verbose internal logging */
|
|
725
|
+
quiet?: boolean;
|
|
726
|
+
/** Enable hot reload on file changes */
|
|
727
|
+
hotReload?: boolean;
|
|
728
|
+
/** Callback to invoke when server needs to reload */
|
|
729
|
+
onReload?: (restart: () => Promise<void>) => void;
|
|
730
|
+
/** URL for Playcademy platform/sandbox API (defaults to localhost:5174 platform) */
|
|
731
|
+
platformUrl?: string;
|
|
732
|
+
}
|
|
733
|
+
|
|
692
734
|
/**
|
|
693
735
|
* Types for the CLI local HTTP server that handles OAuth callbacks
|
|
694
736
|
*/
|
|
@@ -858,6 +900,13 @@ interface IntegrationsDiff {
|
|
|
858
900
|
previousKeys?: string[];
|
|
859
901
|
currentKeys?: string[];
|
|
860
902
|
}
|
|
903
|
+
/**
|
|
904
|
+
* Secret changes
|
|
905
|
+
*/
|
|
906
|
+
interface SecretsDiff {
|
|
907
|
+
previousKeys?: string[];
|
|
908
|
+
currentKeys?: string[];
|
|
909
|
+
}
|
|
861
910
|
/**
|
|
862
911
|
* Options for displaying deployment diff
|
|
863
912
|
*/
|
|
@@ -867,6 +916,7 @@ interface DeploymentDiffOptions {
|
|
|
867
916
|
build?: BuildDiff;
|
|
868
917
|
backend?: BackendDiff;
|
|
869
918
|
integrations?: IntegrationsDiff;
|
|
919
|
+
secrets?: SecretsDiff;
|
|
870
920
|
}
|
|
871
921
|
|
|
872
922
|
/**
|
|
@@ -904,4 +954,4 @@ interface KeyMetadata {
|
|
|
904
954
|
valueType?: 'json' | 'string';
|
|
905
955
|
}
|
|
906
956
|
|
|
907
|
-
export type { ApiConfig, ApiErrorResponse, ApiKeyListItem, ApiKeyWithSecret, ApiRequestOptions, AuthProfile, AuthStore, BackendBundle, BackendDeploymentWithHash, BackendDiff, BuildDiff, BundleOptions, CallbackServerResult, ConfigDiff, CreateApiKeyResponse, CustomRoutesIntegrationOptions, DatabaseIntegrationOptions, DeployConfig, DeployNewGameOptions, DeployedGameInfo, DeploymentChanges, DeploymentContext, DeploymentDiffOptions, DeploymentPlan, DeploymentResult, EmbeddedSourcePaths, EnvironmentAuthProfiles, GameStore, IntegrationChangeDetector, IntegrationChangeDetectors, IntegrationConfigChange, IntegrationsConfig, IntegrationsDiff, KeyMetadata, KeyStats, LoginCredentials, LoginResponse, PlaycademyConfig, PreviewOptions, PreviewResponse, SignInResponse, SsoCallbackData, TimebackIntegrationConfig, TokenType, UpdateExistingGameOptions };
|
|
957
|
+
export type { ApiConfig, ApiErrorResponse, ApiKeyListItem, ApiKeyWithSecret, ApiRequestOptions, AuthProfile, AuthStore, BackendBundle, BackendDeploymentWithHash, BackendDiff, BackendFeatures, BuildDiff, BundleOptions, CallbackServerResult, ConfigDiff, CreateApiKeyResponse, CustomRoutesIntegrationOptions, DatabaseIntegrationOptions, DeployConfig, DeployNewGameOptions, DeployedGameInfo, DeploymentChanges, DeploymentContext, DeploymentDiffOptions, DeploymentPlan, DeploymentResult, DevServerOptions, EmbeddedSourcePaths, EnvironmentAuthProfiles, GameStore, IntegrationChangeDetector, IntegrationChangeDetectors, IntegrationConfigChange, IntegrationsConfig, IntegrationsDiff, KeyMetadata, KeyStats, LoginCredentials, LoginResponse, PlaycademyConfig, PreviewOptions, PreviewResponse, SecretsDiff, SignInResponse, SsoCallbackData, TimebackIntegrationConfig, TokenType, UpdateExistingGameOptions };
|