@playdrop/playdrop-cli 0.15.9 → 0.15.14
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/config/client-meta.json +2 -2
- package/dist/apps/index.d.ts +2 -2
- package/dist/apps/index.js +2 -1
- package/dist/apps/loadCheck.d.ts +2 -0
- package/dist/apps/loadCheck.js +49 -0
- package/dist/apps/upload.d.ts +38 -0
- package/dist/apps/upload.js +39 -32
- package/dist/commands/upload.js +1 -0
- package/dist/commands/worker.d.ts +3 -1
- package/dist/commands/worker.js +12 -3
- package/dist/index.js +7 -4
- package/node_modules/@playdrop/api-client/dist/client.d.ts +7 -12
- package/node_modules/@playdrop/api-client/dist/client.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/client.js +11 -0
- package/node_modules/@playdrop/api-client/dist/domains/admin.d.ts +2 -2
- package/node_modules/@playdrop/api-client/dist/domains/admin.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/domains/admin.js +10 -2
- package/node_modules/@playdrop/api-client/dist/domains/payments.d.ts +5 -11
- package/node_modules/@playdrop/api-client/dist/domains/payments.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/domains/payments.js +11 -4
- package/node_modules/@playdrop/api-client/dist/index.d.ts +7 -14
- package/node_modules/@playdrop/api-client/dist/index.d.ts.map +1 -1
- package/node_modules/@playdrop/api-client/dist/index.js +8 -2
- package/node_modules/@playdrop/config/client-meta.json +2 -2
- package/node_modules/@playdrop/config/dist/src/creator-plans.d.ts +13 -0
- package/node_modules/@playdrop/config/dist/src/creator-plans.d.ts.map +1 -1
- package/node_modules/@playdrop/config/dist/src/creator-plans.js +20 -1
- package/node_modules/@playdrop/config/dist/test/creator-plans.test.js +15 -0
- package/node_modules/@playdrop/config/dist/tsconfig.tsbuildinfo +1 -1
- package/node_modules/@playdrop/config/package.json +4 -0
- package/node_modules/@playdrop/types/dist/api.d.ts +52 -4
- package/node_modules/@playdrop/types/dist/api.d.ts.map +1 -1
- package/node_modules/@playdrop/types/dist/api.js +25 -1
- package/node_modules/@playdrop/types/dist/index.d.ts +1 -0
- package/node_modules/@playdrop/types/dist/index.d.ts.map +1 -1
- package/node_modules/@playdrop/types/dist/index.js +3 -1
- package/node_modules/@playdrop/types/dist/locale.d.ts +10 -0
- package/node_modules/@playdrop/types/dist/locale.d.ts.map +1 -0
- package/node_modules/@playdrop/types/dist/locale.js +76 -0
- package/package.json +1 -1
|
@@ -305,6 +305,7 @@ __export(dist_exports, {
|
|
|
305
305
|
updateCreatorGameFeedbackStatus: () => updateCreatorGameFeedbackStatus,
|
|
306
306
|
updateCreatorPlanCreditUsage: () => updateCreatorPlanCreditUsage,
|
|
307
307
|
updateEmailPreferences: () => updateEmailPreferences,
|
|
308
|
+
updatePreferredLocale: () => updatePreferredLocale,
|
|
308
309
|
updateProfile: () => updateProfile,
|
|
309
310
|
updatePublicEmailPreferences: () => updatePublicEmailPreferences,
|
|
310
311
|
uploadAdminGameCollectionIcon: () => uploadAdminGameCollectionIcon,
|
|
@@ -447,12 +448,13 @@ async function attemptMe() {
|
|
|
447
448
|
async function login(username, password) {
|
|
448
449
|
return await getDefaultClient().login({ username, password });
|
|
449
450
|
}
|
|
450
|
-
async function register(username, password, displayName, inviteCode) {
|
|
451
|
+
async function register(username, password, displayName, inviteCode, preferredLocale) {
|
|
451
452
|
return await getDefaultClient().register({
|
|
452
453
|
username,
|
|
453
454
|
password,
|
|
454
455
|
displayName,
|
|
455
|
-
...inviteCode ? { inviteCode } : {}
|
|
456
|
+
...inviteCode ? { inviteCode } : {},
|
|
457
|
+
...preferredLocale ? { preferredLocale } : {}
|
|
456
458
|
});
|
|
457
459
|
}
|
|
458
460
|
async function fetchStarterProfileAssets() {
|
|
@@ -482,6 +484,9 @@ async function logout() {
|
|
|
482
484
|
async function updateProfile(request) {
|
|
483
485
|
return await getDefaultClient().updateProfile(request);
|
|
484
486
|
}
|
|
487
|
+
async function updatePreferredLocale(request) {
|
|
488
|
+
return await getDefaultClient().updatePreferredLocale(request);
|
|
489
|
+
}
|
|
485
490
|
async function changePassword(newPassword, currentPassword) {
|
|
486
491
|
const request = {
|
|
487
492
|
newPassword,
|
|
@@ -1663,6 +1668,7 @@ function getClientVersionLabel() {
|
|
|
1663
1668
|
updateCreatorGameFeedbackStatus,
|
|
1664
1669
|
updateCreatorPlanCreditUsage,
|
|
1665
1670
|
updateEmailPreferences,
|
|
1671
|
+
updatePreferredLocale,
|
|
1666
1672
|
updateProfile,
|
|
1667
1673
|
updatePublicEmailPreferences,
|
|
1668
1674
|
uploadAdminGameCollectionIcon,
|
|
@@ -9,6 +9,19 @@ export type CreatorPlanDefinition = {
|
|
|
9
9
|
maxGames: number;
|
|
10
10
|
maxStoredContentBytes: bigint;
|
|
11
11
|
};
|
|
12
|
+
export declare const CREATOR_REFERRAL_REWARD: {
|
|
13
|
+
readonly credits: 100;
|
|
14
|
+
readonly gameSlots: 1;
|
|
15
|
+
readonly storageBytes: number;
|
|
16
|
+
readonly maxReferrals: 10;
|
|
17
|
+
};
|
|
18
|
+
export type CreatorReferralBonus = {
|
|
19
|
+
successfulReferrals: number;
|
|
20
|
+
rewardedReferrals: number;
|
|
21
|
+
gameSlots: number;
|
|
22
|
+
storageBytes: number;
|
|
23
|
+
};
|
|
24
|
+
export declare function resolveCreatorReferralBonus(successfulReferrals: number): CreatorReferralBonus;
|
|
12
25
|
export declare const CREATOR_PLAN_CATALOG: Record<CreatorPlanTier, CreatorPlanDefinition>;
|
|
13
26
|
export declare const CREATOR_PLAN_RANK: Record<CreatorPlanTier, number>;
|
|
14
27
|
export declare function isCreatorPlanTier(value: unknown): value is CreatorPlanTier;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"creator-plans.d.ts","sourceRoot":"","sources":["../../src/creator-plans.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,wBAAwB,mCAAoC,CAAC;AAE1E,MAAM,MAAM,eAAe,GAAG,OAAO,wBAAwB,CAAC,MA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AuB;;;;;CAK1B,CAAC;AAEX,MAAM,MAAM,oBAAoB,GAAG;IACjC,mBAAmB,EAAE,MAAM,CAAC;IAC5B,iBAAiB,EAAE,MAAM,CAAC;IAC1B,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,wBAAgB,2BAA2B,CAAC,mBAAmB,EAAE,MAAM,GAAG,oBAAoB,CAW7F;AAED,eAAO,MAAM,oBAAoB,EAAE,MAAM,CAAC,eAAe,EAAE,qBAAqB,CA4B/E,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,MAAM,CAAC,eAAe,EAAE,MAAM,CAI7D,CAAC;AAEF,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,eAAe,CAE1E;AAED,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,eAAe,GAAG,qBAAqB,CAErF;AAED,wBAAgB,qBAAqB,CAAC,CAAC,EAAE,eAAe,EAAE,CAAC,EAAE,eAAe,GAAG,eAAe,CAE7F;AAsED,wBAAgB,yBAAyB,CAAC,GAAG,GAAE,IAAiB,GAAG,IAAI,CAsBtE"}
|
|
@@ -1,12 +1,31 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.CREATOR_PLAN_RANK = exports.CREATOR_PLAN_CATALOG = exports.CREATOR_PLAN_TIER_VALUES = void 0;
|
|
3
|
+
exports.CREATOR_PLAN_RANK = exports.CREATOR_PLAN_CATALOG = exports.CREATOR_REFERRAL_REWARD = exports.CREATOR_PLAN_TIER_VALUES = void 0;
|
|
4
|
+
exports.resolveCreatorReferralBonus = resolveCreatorReferralBonus;
|
|
4
5
|
exports.isCreatorPlanTier = isCreatorPlanTier;
|
|
5
6
|
exports.getCreatorPlanDefinition = getCreatorPlanDefinition;
|
|
6
7
|
exports.higherCreatorPlanTier = higherCreatorPlanTier;
|
|
7
8
|
exports.getNextCreatorPlanResetAt = getNextCreatorPlanResetAt;
|
|
8
9
|
exports.CREATOR_PLAN_TIER_VALUES = ['BASIC', 'PLUS', 'PRO'];
|
|
9
10
|
const GIB = 1024n * 1024n * 1024n;
|
|
11
|
+
exports.CREATOR_REFERRAL_REWARD = {
|
|
12
|
+
credits: 100,
|
|
13
|
+
gameSlots: 1,
|
|
14
|
+
storageBytes: 200 * 1024 * 1024,
|
|
15
|
+
maxReferrals: 10,
|
|
16
|
+
};
|
|
17
|
+
function resolveCreatorReferralBonus(successfulReferrals) {
|
|
18
|
+
if (!Number.isInteger(successfulReferrals) || successfulReferrals < 0) {
|
|
19
|
+
throw new Error('invalid_successful_referral_count');
|
|
20
|
+
}
|
|
21
|
+
const rewardedReferrals = Math.min(successfulReferrals, exports.CREATOR_REFERRAL_REWARD.maxReferrals);
|
|
22
|
+
return {
|
|
23
|
+
successfulReferrals,
|
|
24
|
+
rewardedReferrals,
|
|
25
|
+
gameSlots: rewardedReferrals * exports.CREATOR_REFERRAL_REWARD.gameSlots,
|
|
26
|
+
storageBytes: rewardedReferrals * exports.CREATOR_REFERRAL_REWARD.storageBytes,
|
|
27
|
+
};
|
|
28
|
+
}
|
|
10
29
|
exports.CREATOR_PLAN_CATALOG = {
|
|
11
30
|
BASIC: {
|
|
12
31
|
tier: 'BASIC',
|
|
@@ -11,6 +11,21 @@ const creator_plans_1 = require("../src/creator-plans");
|
|
|
11
11
|
strict_1.default.equal(creator_plans_1.CREATOR_PLAN_CATALOG.PLUS.maxConcurrentTasks, 5);
|
|
12
12
|
strict_1.default.equal(creator_plans_1.CREATOR_PLAN_CATALOG.PRO.maxConcurrentTasks, 10);
|
|
13
13
|
});
|
|
14
|
+
(0, node_test_1.default)('creator referrals add one game and 200 MB up to the referral cap', () => {
|
|
15
|
+
strict_1.default.deepEqual((0, creator_plans_1.resolveCreatorReferralBonus)(3), {
|
|
16
|
+
successfulReferrals: 3,
|
|
17
|
+
rewardedReferrals: 3,
|
|
18
|
+
gameSlots: 3,
|
|
19
|
+
storageBytes: 600 * 1024 * 1024,
|
|
20
|
+
});
|
|
21
|
+
strict_1.default.deepEqual((0, creator_plans_1.resolveCreatorReferralBonus)(12), {
|
|
22
|
+
successfulReferrals: 12,
|
|
23
|
+
rewardedReferrals: creator_plans_1.CREATOR_REFERRAL_REWARD.maxReferrals,
|
|
24
|
+
gameSlots: 10,
|
|
25
|
+
storageBytes: 2000 * 1024 * 1024,
|
|
26
|
+
});
|
|
27
|
+
strict_1.default.throws(() => (0, creator_plans_1.resolveCreatorReferralBonus)(-1), /invalid_successful_referral_count/);
|
|
28
|
+
});
|
|
14
29
|
(0, node_test_1.default)('weekly reset is Friday 5 PM ET during standard time', () => {
|
|
15
30
|
strict_1.default.equal((0, creator_plans_1.getNextCreatorPlanResetAt)(new Date('2026-01-12T12:00:00Z')).toISOString(), '2026-01-16T22:00:00.000Z');
|
|
16
31
|
});
|