@devvit/cli 0.11.4 → 0.11.5-next-2024-12-09-1c29dd3cd.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/commands/create/app-account.js +1 -1
- package/dist/commands/create/icons.js +1 -1
- package/dist/commands/events.d.ts.map +1 -1
- package/dist/commands/events.js +1 -1
- package/dist/commands/install.d.ts.map +1 -1
- package/dist/commands/install.js +5 -4
- package/dist/commands/list/installs.js +1 -1
- package/dist/commands/playtest.d.ts +0 -2
- package/dist/commands/playtest.d.ts.map +1 -1
- package/dist/commands/playtest.js +37 -35
- package/dist/commands/publish.d.ts.map +1 -1
- package/dist/commands/publish.js +10 -8
- package/dist/commands/settings/list.d.ts.map +1 -1
- package/dist/commands/settings/list.js +7 -5
- package/dist/commands/settings/set.d.ts.map +1 -1
- package/dist/commands/settings/set.js +12 -6
- package/dist/commands/uninstall.d.ts.map +1 -1
- package/dist/commands/uninstall.js +6 -4
- package/dist/commands/update/app.d.ts.map +1 -1
- package/dist/commands/update/app.js +4 -5
- package/dist/commands/upload.d.ts.map +1 -1
- package/dist/commands/upload.js +25 -17
- package/dist/lib/hooks/init/check-update.d.ts.map +1 -1
- package/dist/lib/hooks/init/check-update.js +3 -2
- package/dist/templates/app-settings/package.json +3 -3
- package/dist/templates/blocks-post/package.json +2 -2
- package/dist/templates/blocks-post-pro/package.json +2 -2
- package/dist/templates/empty/package.json +2 -2
- package/dist/templates/forms/package.json +2 -2
- package/dist/templates/image-uploads/package.json +2 -2
- package/dist/templates/intro-to-devvit/package.json +2 -2
- package/dist/templates/menu-action/package.json +2 -2
- package/dist/templates/payments/package.json +3 -3
- package/dist/templates/pen/package.json +2 -2
- package/dist/templates/redis/package.json +2 -2
- package/dist/templates/triggers/package.json +2 -2
- package/dist/templates/web-view-post/package.json +2 -2
- package/dist/util/app-logs/app-log-observer.d.ts.map +1 -1
- package/dist/util/app-logs/app-log-observer.js +1 -1
- package/dist/util/clientGenerators.js +1 -1
- package/dist/util/r2Api/user.js +1 -1
- package/dist/util/utils.js +1 -1
- package/package.json +8 -8
|
@@ -23,7 +23,7 @@ class Icons extends ProjectCommand {
|
|
|
23
23
|
this.log('No SVG assets found - add some to your assets directory!');
|
|
24
24
|
return;
|
|
25
25
|
}
|
|
26
|
-
ux.action.start('Creating icons map
|
|
26
|
+
ux.action.start('Creating icons map');
|
|
27
27
|
const iconsMap = __classPrivateFieldGet(this, _Icons_instances, "m", _Icons_createIconsMap).call(this, svgAssets);
|
|
28
28
|
await fsp.writeFile(outputFile, iconsMap);
|
|
29
29
|
ux.action.stop(`Created icons map at ${outputFile}!`);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../src/commands/events.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,aAAa,EAAwB,MAAM,mCAAmC,CAAC;AAwCxF,MAAM,CAAC,OAAO,OAAO,MAAO,SAAQ,aAAa;;IAC/C,OAAgB,WAAW,EAAE,MAAM,CAA4C;IAC/E,OAAgB,MAAM,EAAE,OAAO,CAAQ;IACvC,OAAgB,IAAI;;MAMlB;IACF,OAAgB,KAAK;;MAKnB;IAEI,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../src/commands/events.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,aAAa,EAAwB,MAAM,mCAAmC,CAAC;AAwCxF,MAAM,CAAC,OAAO,OAAO,MAAO,SAAQ,aAAa;;IAC/C,OAAgB,WAAW,EAAE,MAAM,CAA4C;IAC/E,OAAgB,MAAM,EAAE,OAAO,CAAQ;IACvC,OAAgB,IAAI;;MAMlB;IACF,OAAgB,KAAK;;MAKnB;IAEI,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CAqC3B"}
|
package/dist/commands/events.js
CHANGED
|
@@ -76,7 +76,7 @@ _Events_instances = new WeakSet(), _Events_onStreamNext = function _Events_onStr
|
|
|
76
76
|
this.warn(chalk.yellow(`unknown message: ${JSON.stringify(msg)}`));
|
|
77
77
|
}
|
|
78
78
|
}, _Events_onStreamError = function _Events_onStreamError(err) {
|
|
79
|
-
this.error(chalk.red(`error while fetching logs: ${StringUtil.caughtToString(err)}`));
|
|
79
|
+
this.error(chalk.red(`error while fetching logs: ${StringUtil.caughtToString(err, 'message')}`));
|
|
80
80
|
};
|
|
81
81
|
Events.description = 'Streams event logs for an installation';
|
|
82
82
|
Events.hidden = true;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"install.d.ts","sourceRoot":"","sources":["../../src/commands/install.ts"],"names":[],"mappings":"AAkBA,OAAO,EAAE,aAAa,EAAwB,MAAM,mCAAmC,CAAC;AAIxF,MAAM,CAAC,OAAO,OAAO,OAAQ,SAAQ,aAAa;;IAChD,OAAgB,WAAW,SACgH;IAE3I,OAAgB,QAAQ,WAMtB;IAEF,OAAgB,IAAI;;;MAalB;IAMI,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"install.d.ts","sourceRoot":"","sources":["../../src/commands/install.ts"],"names":[],"mappings":"AAkBA,OAAO,EAAE,aAAa,EAAwB,MAAM,mCAAmC,CAAC;AAIxF,MAAM,CAAC,OAAO,OAAO,OAAQ,SAAQ,aAAa;;IAChD,OAAgB,WAAW,SACgH;IAE3I,OAAgB,QAAQ,WAMtB;IAEF,OAAgB,IAAI;;;MAalB;IAMI,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CA4G3B"}
|
package/dist/commands/install.js
CHANGED
|
@@ -43,7 +43,7 @@ class Install extends DevvitCommand {
|
|
|
43
43
|
__classPrivateFieldGet(this, _Install_appVersionClient, "f").GetNutritionByNameVersion({ name, version }),
|
|
44
44
|
]);
|
|
45
45
|
if (existingInstallInfo) {
|
|
46
|
-
ux.action.stop(`Currently on version ${DevvitVersion.fromProtoAppVersionInfo(existingInstallInfo.appVersion).toString()}
|
|
46
|
+
ux.action.stop(`Currently on version ${DevvitVersion.fromProtoAppVersionInfo(existingInstallInfo.appVersion).toString()}`);
|
|
47
47
|
}
|
|
48
48
|
this.log(nutritionCategoriesToString(name, nutrition.categories));
|
|
49
49
|
ux.action.start(`Installing ${name} to r/${subreddit}`);
|
|
@@ -52,7 +52,7 @@ class Install extends DevvitCommand {
|
|
|
52
52
|
if (existingInstallInfo) {
|
|
53
53
|
if (existingInstallInfo.appVersion && appVersion.id === existingInstallInfo.appVersion.id) {
|
|
54
54
|
// exit gracefully if the current app version is already installed
|
|
55
|
-
ux.action.stop(`Version ${DevvitVersion.fromProtoAppVersionInfo(existingInstallInfo.appVersion).toString()} has already been installed
|
|
55
|
+
ux.action.stop(`Version ${DevvitVersion.fromProtoAppVersionInfo(existingInstallInfo.appVersion).toString()} has already been installed.`);
|
|
56
56
|
return;
|
|
57
57
|
}
|
|
58
58
|
else {
|
|
@@ -71,10 +71,11 @@ class Install extends DevvitCommand {
|
|
|
71
71
|
upgradeStrategy: 0,
|
|
72
72
|
});
|
|
73
73
|
}
|
|
74
|
-
ux.action.stop(`Successfully installed version ${DevvitVersion.fromProtoAppVersionInfo(installationInfo.appVersion).toString()}
|
|
74
|
+
ux.action.stop(`Successfully installed version ${DevvitVersion.fromProtoAppVersionInfo(installationInfo.appVersion).toString()}!`);
|
|
75
75
|
}
|
|
76
76
|
catch (err) {
|
|
77
|
-
|
|
77
|
+
ux.action.stop('Error');
|
|
78
|
+
this.error(`An error occurred while installing your app: ${StringUtil.caughtToString(err, 'message')}`);
|
|
78
79
|
}
|
|
79
80
|
}
|
|
80
81
|
}
|
|
@@ -23,7 +23,7 @@ class ListInstalls extends DevvitCommand {
|
|
|
23
23
|
}
|
|
24
24
|
async run() {
|
|
25
25
|
const { args } = await this.parse(ListInstalls);
|
|
26
|
-
ux.action.start('
|
|
26
|
+
ux.action.start('Loading installations');
|
|
27
27
|
const results = await __classPrivateFieldGet(this, _ListInstalls_instances, "m", _ListInstalls_fetchInstalls).call(this, args.subreddit);
|
|
28
28
|
ux.action.stop();
|
|
29
29
|
this.log(); // newline
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type { AppVersionInfo } from '@devvit/protos/community.js';
|
|
2
1
|
import type { Bundle } from '@devvit/protos/types/devvit/plugin/buildpack/buildpack_common.js';
|
|
3
2
|
import type { FlagInput } from '@oclif/core/lib/interfaces/parser.js';
|
|
4
3
|
import Upload from '../commands/upload.js';
|
|
@@ -10,7 +9,6 @@ export default class Playtest extends Upload {
|
|
|
10
9
|
static args: {
|
|
11
10
|
subreddit: import("@oclif/core/lib/interfaces/parser.js").Arg<string, Record<string, unknown>>;
|
|
12
11
|
};
|
|
13
|
-
checkVersionBuildStatus(appVersionInfo: AppVersionInfo): Promise<boolean>;
|
|
14
12
|
run(): Promise<void>;
|
|
15
13
|
}
|
|
16
14
|
export declare function modifyBundleVersions(bundles: Bundle[], version: string): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"playtest.d.ts","sourceRoot":"","sources":["../../src/commands/playtest.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"playtest.d.ts","sourceRoot":"","sources":["../../src/commands/playtest.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,kEAAkE,CAAC;AAW/F,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sCAAsC,CAAC;AAOtE,OAAO,MAAM,MAAM,uBAAuB,CAAC;AAiB3C,MAAM,CAAC,OAAO,OAAO,QAAS,SAAQ,MAAM;;IAC1C,OAAgB,WAAW,SACgK;IAE3L,OAAgB,QAAQ,WAItB;IAEF,WAAoB,KAAK,IAAI,SAAS,CAerC;IAED,OAAgB,IAAI;;MAMlB;IA0Da,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CA+QpC;AAED,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI,CAM7E"}
|
|
@@ -9,7 +9,7 @@ var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (
|
|
|
9
9
|
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
10
10
|
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
11
11
|
};
|
|
12
|
-
var _Playtest_instances, _a, _Playtest_installationsClient, _Playtest_appLogSub, _Playtest_bundler, _Playtest_existingInstallInfo, _Playtest_appInfo, _Playtest_version, _Playtest_lastBundles, _Playtest_lastQueuedBundles, _Playtest_isOnWatchExecuting, _Playtest_server, _Playtest_flags, _Playtest_watchAssets, _Playtest_getExistingInstallInfo, _Playtest_onWatch, _Playtest_onWatchError, _Playtest_onExit;
|
|
12
|
+
var _Playtest_instances, _a, _Playtest_installationsClient, _Playtest_appLogSub, _Playtest_bundler, _Playtest_existingInstallInfo, _Playtest_appInfo, _Playtest_version, _Playtest_lastBundles, _Playtest_lastQueuedBundles, _Playtest_isOnWatchExecuting, _Playtest_server, _Playtest_flags, _Playtest_watchAssets, _Playtest_getExistingInstallInfo, _Playtest_checkVersionBuildStatus, _Playtest_onWatch, _Playtest_onWatchError, _Playtest_onExit;
|
|
13
13
|
import { BuildStatus, InstallationType, VersionVisibility, } from '@devvit/protos/community.js';
|
|
14
14
|
import { ASSET_DIRNAME, WEB_VIEW_ASSET_DIRNAME } from '@devvit/shared-types/Assets.js';
|
|
15
15
|
import { ACTOR_SRC_DIR, ACTOR_SRC_PRIMARY_NAME, MAX_ALLOWED_SUBSCRIBER_COUNT, PRODUCTS_JSON_FILE, } from '@devvit/shared-types/constants.js';
|
|
@@ -96,9 +96,9 @@ class Playtest extends Upload {
|
|
|
96
96
|
appVersionInfo = await this.createVersion(__classPrivateFieldGet(this, _Playtest_appInfo, "f").app, __classPrivateFieldGet(this, _Playtest_version, "f"), __classPrivateFieldGet(this, _Playtest_lastBundles, "f"), VersionVisibility.PRIVATE);
|
|
97
97
|
}
|
|
98
98
|
catch (err) {
|
|
99
|
+
ux.action.stop(chalk.red('Error'));
|
|
99
100
|
if (err instanceof Error) {
|
|
100
|
-
// Don't log as error so we don't exit the process.
|
|
101
|
-
this.log(chalk.red(`\n${err}\n`));
|
|
101
|
+
this.log(chalk.red(`\n${StringUtil.caughtToString(err, 'message')}\n`)); // Don't log as error so we don't exit the process.
|
|
102
102
|
}
|
|
103
103
|
else {
|
|
104
104
|
this.error(`An unknown error occurred when creating the app version.\n${err}`);
|
|
@@ -107,21 +107,22 @@ class Playtest extends Upload {
|
|
|
107
107
|
return;
|
|
108
108
|
}
|
|
109
109
|
// 5. confirm new version has finished building:
|
|
110
|
-
if (!(await this.
|
|
110
|
+
if (!(await __classPrivateFieldGet(this, _Playtest_instances, "m", _Playtest_checkVersionBuildStatus).call(this, appVersionInfo))) {
|
|
111
111
|
this.error('App version did not build successfully.');
|
|
112
112
|
}
|
|
113
113
|
// 6. install playtest version to specified subreddit:
|
|
114
114
|
const appWithVersion = `${__classPrivateFieldGet(this, _Playtest_appInfo, "f").app.slug}@${__classPrivateFieldGet(this, _Playtest_version, "f")}`;
|
|
115
115
|
const appVersionId = await slugVersionStringToUUID(appWithVersion, this.appClient);
|
|
116
116
|
const playtestUrl = chalk.bold.green(`${REDDIT_DESKTOP}/r/${subreddit}${__classPrivateFieldGet(this, _Playtest_flags, "f")?.connect ? `?playtest=${__classPrivateFieldGet(this, _Playtest_appInfo, "f").app.slug}` : ''}`);
|
|
117
|
-
ux.action.start(`Installing playtest version ${__classPrivateFieldGet(this, _Playtest_version, "f")}
|
|
117
|
+
ux.action.start(`Installing playtest version ${__classPrivateFieldGet(this, _Playtest_version, "f")}`);
|
|
118
118
|
await __classPrivateFieldGet(this, _Playtest_installationsClient, "f").Upgrade({
|
|
119
119
|
id: __classPrivateFieldGet(this, _Playtest_existingInstallInfo, "f").installation.id,
|
|
120
120
|
appVersionId,
|
|
121
121
|
});
|
|
122
|
-
if (!__classPrivateFieldGet(this, _Playtest_flags, "f")?.['no-live-reload'])
|
|
122
|
+
if (!__classPrivateFieldGet(this, _Playtest_flags, "f")?.['no-live-reload']) {
|
|
123
123
|
__classPrivateFieldGet(this, _Playtest_server, "f")?.send({ appInstalled: {} });
|
|
124
|
-
|
|
124
|
+
}
|
|
125
|
+
ux.action.stop(`Success! Please visit your test subreddit and refresh to see your latest changes:\n✨ ${playtestUrl}\n`);
|
|
125
126
|
__classPrivateFieldSet(this, _Playtest_isOnWatchExecuting, false, "f");
|
|
126
127
|
// If there's a queued watch, execute it now.
|
|
127
128
|
if (__classPrivateFieldGet(this, _Playtest_lastQueuedBundles, "f")) {
|
|
@@ -131,7 +132,7 @@ class Playtest extends Upload {
|
|
|
131
132
|
}
|
|
132
133
|
});
|
|
133
134
|
_Playtest_onWatchError.set(this, (err) => {
|
|
134
|
-
this.error(`watch error: ${StringUtil.caughtToString(err)}`);
|
|
135
|
+
this.error(`watch error: ${StringUtil.caughtToString(err, 'message')}`);
|
|
135
136
|
});
|
|
136
137
|
}
|
|
137
138
|
static get flags() {
|
|
@@ -149,28 +150,6 @@ class Playtest extends Upload {
|
|
|
149
150
|
}),
|
|
150
151
|
};
|
|
151
152
|
}
|
|
152
|
-
async checkVersionBuildStatus(appVersionInfo) {
|
|
153
|
-
ux.action.start('App is building remotely...');
|
|
154
|
-
for (let i = 0; i < 20 && appVersionInfo.buildStatus === BuildStatus.BUILDING; i++) {
|
|
155
|
-
// version is still building: wait and try again
|
|
156
|
-
await sleep(2000);
|
|
157
|
-
const info = await this.appVersionClient.Get({ id: appVersionInfo.id });
|
|
158
|
-
if (!info.appVersion) {
|
|
159
|
-
this.error('Something went wrong, no app version available.');
|
|
160
|
-
}
|
|
161
|
-
appVersionInfo = info.appVersion;
|
|
162
|
-
if (i === 10) {
|
|
163
|
-
this.log(`Your app's taking a while to build - sorry for the delay!`);
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
if (appVersionInfo.buildStatus === BuildStatus.READY) {
|
|
167
|
-
ux.action.stop(`✅`);
|
|
168
|
-
}
|
|
169
|
-
else {
|
|
170
|
-
this.warn('Something went wrong: the previous version did not build successfully.');
|
|
171
|
-
}
|
|
172
|
-
return appVersionInfo.buildStatus === BuildStatus.READY;
|
|
173
|
-
}
|
|
174
153
|
async run() {
|
|
175
154
|
// Despite the name, finally() is only invoked on successful termination.
|
|
176
155
|
process.on('SIGINT', () => void __classPrivateFieldGet(this, _Playtest_instances, "m", _Playtest_onExit).call(this));
|
|
@@ -202,13 +181,13 @@ class Playtest extends Upload {
|
|
|
202
181
|
this.error(`That app already exists, and you can't playtest someone else's app!`);
|
|
203
182
|
}
|
|
204
183
|
// App doesn't exist - tell the user to run `devvit upload` first
|
|
205
|
-
this.error(
|
|
184
|
+
this.error("Your app doesn't exist yet - you'll need to run 'devvit upload' once before you can playtest your app.");
|
|
206
185
|
}
|
|
207
186
|
}
|
|
208
187
|
const subreddit = getSubredditNameWithoutPrefix(args.subreddit);
|
|
209
188
|
__classPrivateFieldSet(this, _Playtest_appInfo, await getAppBySlug(this.appClient, appName), "f");
|
|
210
189
|
if (!__classPrivateFieldGet(this, _Playtest_appInfo, "f")) {
|
|
211
|
-
this.error(
|
|
190
|
+
this.error("Your app doesn't exist yet - you'll need to run 'devvit upload' before you can playtest your app.");
|
|
212
191
|
}
|
|
213
192
|
// alert user if they're about to run playtest in a large subreddit
|
|
214
193
|
const subscriberCount = await fetchSubredditSubscriberCount(subreddit, token);
|
|
@@ -234,12 +213,12 @@ class Playtest extends Upload {
|
|
|
234
213
|
// before starting playtest session, make sure app has been installed to the test subreddit:
|
|
235
214
|
const appWithVersion = `${appName}@${__classPrivateFieldGet(this, _Playtest_version, "f")}`;
|
|
236
215
|
const appVersionId = await slugVersionStringToUUID(appWithVersion, this.appClient);
|
|
237
|
-
ux.action.start(`Checking for existing installation
|
|
216
|
+
ux.action.start(`Checking for existing installation`);
|
|
238
217
|
__classPrivateFieldSet(this, _Playtest_existingInstallInfo, await __classPrivateFieldGet(this, _Playtest_instances, "m", _Playtest_getExistingInstallInfo).call(this, subreddit), "f");
|
|
239
218
|
if (!__classPrivateFieldGet(this, _Playtest_existingInstallInfo, "f")) {
|
|
240
219
|
ux.action.stop(`No existing installation.`);
|
|
241
220
|
const userT2Id = await this.getUserT2Id(token);
|
|
242
|
-
ux.action.start(`Installing
|
|
221
|
+
ux.action.start(`Installing`);
|
|
243
222
|
try {
|
|
244
223
|
__classPrivateFieldSet(this, _Playtest_existingInstallInfo, await __classPrivateFieldGet(this, _Playtest_installationsClient, "f").Create({
|
|
245
224
|
appVersionId,
|
|
@@ -250,8 +229,10 @@ class Playtest extends Upload {
|
|
|
250
229
|
}), "f");
|
|
251
230
|
}
|
|
252
231
|
catch (err) {
|
|
253
|
-
|
|
232
|
+
ux.action.stop('Error');
|
|
233
|
+
this.error(`An error occurred while installing your app: ${StringUtil.caughtToString(err, 'message')}`);
|
|
254
234
|
}
|
|
235
|
+
ux.action.stop();
|
|
255
236
|
}
|
|
256
237
|
else {
|
|
257
238
|
ux.action.stop(`Found!`);
|
|
@@ -289,6 +270,27 @@ _a = Playtest, _Playtest_installationsClient = new WeakMap(), _Playtest_appLogSu
|
|
|
289
270
|
return fullInstallInfoList.find((install) => {
|
|
290
271
|
return install.app?.id === __classPrivateFieldGet(this, _Playtest_appInfo, "f")?.app?.id;
|
|
291
272
|
});
|
|
273
|
+
}, _Playtest_checkVersionBuildStatus = async function _Playtest_checkVersionBuildStatus(appVersionInfo) {
|
|
274
|
+
ux.action.start('App is building remotely');
|
|
275
|
+
for (let i = 0; i < 20 && appVersionInfo.buildStatus === BuildStatus.BUILDING; i++) {
|
|
276
|
+
// version is still building: wait and try again
|
|
277
|
+
await sleep(2000);
|
|
278
|
+
const info = await this.appVersionClient.Get({ id: appVersionInfo.id });
|
|
279
|
+
if (!info.appVersion) {
|
|
280
|
+
this.error('Something went wrong, no app version available.');
|
|
281
|
+
}
|
|
282
|
+
appVersionInfo = info.appVersion;
|
|
283
|
+
if (i === 10) {
|
|
284
|
+
this.log(`Your app's taking a while to build - sorry for the delay!`);
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
if (appVersionInfo.buildStatus === BuildStatus.READY) {
|
|
288
|
+
ux.action.stop();
|
|
289
|
+
}
|
|
290
|
+
else {
|
|
291
|
+
this.warn('Something went wrong: the previous version did not build successfully.');
|
|
292
|
+
}
|
|
293
|
+
return appVersionInfo.buildStatus === BuildStatus.READY;
|
|
292
294
|
}, _Playtest_onExit = async function _Playtest_onExit() {
|
|
293
295
|
const revertCommand = chalk.blue(`devvit install ${__classPrivateFieldGet(this, _Playtest_existingInstallInfo, "f").installation.location.name} ${__classPrivateFieldGet(this, _Playtest_appInfo, "f").app.slug}@latest`);
|
|
294
296
|
__classPrivateFieldGet(this, _Playtest_appLogSub, "f")?.unsubscribe();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"publish.d.ts","sourceRoot":"","sources":["../../src/commands/publish.ts"],"names":[],"mappings":"AAsBA,OAAO,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AAcpE,MAAM,CAAC,OAAO,OAAO,OAAQ,SAAQ,cAAc;;IACjD,OAAgB,WAAW,SAC8H;IAEzJ,OAAgB,QAAQ,WAKtB;IAEF,OAAgB,IAAI;;MAMlB;IAEF,OAAgB,KAAK;;;MAanB;IAMI,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"publish.d.ts","sourceRoot":"","sources":["../../src/commands/publish.ts"],"names":[],"mappings":"AAsBA,OAAO,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AAcpE,MAAM,CAAC,OAAO,OAAO,OAAQ,SAAQ,cAAc;;IACjD,OAAgB,WAAW,SAC8H;IAEzJ,OAAgB,QAAQ,WAKtB;IAEF,OAAgB,IAAI;;MAMlB;IAEF,OAAgB,KAAK;;;MAanB;IAMI,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CA8L3B"}
|
package/dist/commands/publish.js
CHANGED
|
@@ -35,9 +35,9 @@ class Publish extends ProjectCommand {
|
|
|
35
35
|
const appWithVersion = await this.inferAppNameAndVersion(args.appWithVersion);
|
|
36
36
|
await this.checkIfUserLoggedIn();
|
|
37
37
|
await this.checkDeveloperAccount();
|
|
38
|
-
ux.action.start(`Finding ${appWithVersion}
|
|
38
|
+
ux.action.start(`Finding ${appWithVersion}`);
|
|
39
39
|
const { appInfo, appVersion } = await getInfoForSlugString(appWithVersion, __classPrivateFieldGet(this, _Publish_appClient, "f"));
|
|
40
|
-
ux.action.stop(
|
|
40
|
+
ux.action.stop();
|
|
41
41
|
const devvitVersion = new DevvitVersion(appVersion.majorVersion, appVersion.minorVersion, appVersion.patchVersion, appVersion.prereleaseVersion);
|
|
42
42
|
if (!appInfo.app) {
|
|
43
43
|
this.error('There was an error retrieving the app info.');
|
|
@@ -110,13 +110,14 @@ _Publish_appClient = new WeakMap(), _Publish_appVersionClient = new WeakMap(), _
|
|
|
110
110
|
validInstallTypes: [InstallationType.SUBREDDIT],
|
|
111
111
|
pool: 0, // Don't change the pool
|
|
112
112
|
};
|
|
113
|
-
ux.action.start(`Publishing version "${devvitVersion.toString()}" to Reddit
|
|
113
|
+
ux.action.start(`Publishing version "${devvitVersion.toString()}" to Reddit`);
|
|
114
114
|
try {
|
|
115
115
|
const appVersionInfo = await __classPrivateFieldGet(this, _Publish_appVersionClient, "f").Update(appVersionUpdateRequest);
|
|
116
|
-
ux.action.stop(
|
|
116
|
+
ux.action.stop();
|
|
117
117
|
return appVersionInfo;
|
|
118
118
|
}
|
|
119
119
|
catch (error) {
|
|
120
|
+
ux.action.stop('Error');
|
|
120
121
|
return handleTwirpError(error, (message) => this.error(message));
|
|
121
122
|
}
|
|
122
123
|
}, _Publish_promptOpenURL = async function _Publish_promptOpenURL(url) {
|
|
@@ -129,19 +130,20 @@ _Publish_appClient = new WeakMap(), _Publish_appVersionClient = new WeakMap(), _
|
|
|
129
130
|
this.error(`An error occurred when opening the URL: ${url}`);
|
|
130
131
|
}
|
|
131
132
|
}
|
|
132
|
-
process.exit();
|
|
133
|
+
process.exit(0);
|
|
133
134
|
}, _Publish_submitForReview = async function _Publish_submitForReview(appVersionId, devvitVersion, visibility) {
|
|
134
|
-
ux.action.start(`Submitting version "${devvitVersion.toString()}" for review
|
|
135
|
+
ux.action.start(`Submitting version "${devvitVersion.toString()}" for review`);
|
|
135
136
|
try {
|
|
136
137
|
await __classPrivateFieldGet(this, _Publish_appPRClient, "f").Submit({ appVersionId, visibility });
|
|
137
|
-
ux.action.stop(
|
|
138
|
+
ux.action.stop();
|
|
138
139
|
return;
|
|
139
140
|
}
|
|
140
141
|
catch (err) {
|
|
142
|
+
ux.action.stop('Error');
|
|
141
143
|
if (err && typeof err === 'object' && 'code' in err && err.code === 'already_exists') {
|
|
142
144
|
this.error('This version has already been submitted for review.');
|
|
143
145
|
}
|
|
144
|
-
this.error(StringUtil.caughtToString(err));
|
|
146
|
+
this.error(StringUtil.caughtToString(err, 'message'));
|
|
145
147
|
}
|
|
146
148
|
}, _Publish_promptForVisibility = async function _Publish_promptForVisibility() {
|
|
147
149
|
const res = await inquirer.prompt([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../../src/commands/settings/list.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,cAAc,EAAE,MAAM,uCAAuC,CAAC;AAGvE,MAAM,CAAC,OAAO,OAAO,eAAgB,SAAQ,cAAc;;IACzD,OAAgB,WAAW,SACkG;IAG9G,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../../src/commands/settings/list.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,cAAc,EAAE,MAAM,uCAAuC,CAAC;AAGvE,MAAM,CAAC,OAAO,OAAO,eAAgB,SAAQ,cAAc;;IACzD,OAAgB,WAAW,SACkG;IAG9G,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CAuEpC"}
|
|
@@ -25,7 +25,7 @@ class ListAppSettings extends ProjectCommand {
|
|
|
25
25
|
try {
|
|
26
26
|
const appInfo = await getAppBySlug(__classPrivateFieldGet(this, _ListAppSettings_appService, "f"), appName);
|
|
27
27
|
if (!appInfo?.app?.id) {
|
|
28
|
-
ux.action.stop(
|
|
28
|
+
ux.action.stop("Error: Your app doesn't exist yet - you'll need to run 'devvit upload' before you can list settings.");
|
|
29
29
|
return;
|
|
30
30
|
}
|
|
31
31
|
const response = await __classPrivateFieldGet(this, _ListAppSettings_appSettingsService, "f").GetForm({
|
|
@@ -39,16 +39,18 @@ class ListAppSettings extends ProjectCommand {
|
|
|
39
39
|
catch (err) {
|
|
40
40
|
if (err instanceof TwirpError) {
|
|
41
41
|
if (err.code === TwirpErrorCode.NotFound) {
|
|
42
|
-
ux.action.stop(
|
|
42
|
+
ux.action.stop(`Please install your app before listing settings.`);
|
|
43
43
|
return;
|
|
44
44
|
}
|
|
45
45
|
else if (err.message.includes('does not provide method')) {
|
|
46
|
-
ux.action.stop(
|
|
46
|
+
ux.action.stop(`Unable to fetch settings. Please verify Devvit.addSettings was used in your app.`);
|
|
47
47
|
return;
|
|
48
48
|
}
|
|
49
49
|
}
|
|
50
|
-
|
|
51
|
-
|
|
50
|
+
else {
|
|
51
|
+
ux.action.stop('Error');
|
|
52
|
+
}
|
|
53
|
+
this.error(StringUtil.caughtToString(err, 'message'));
|
|
52
54
|
}
|
|
53
55
|
}
|
|
54
56
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"set.d.ts","sourceRoot":"","sources":["../../../src/commands/settings/set.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,cAAc,EAAE,MAAM,uCAAuC,CAAC;AAGvE,MAAM,CAAC,OAAO,OAAO,cAAe,SAAQ,cAAc;;IACxD,OAAgB,WAAW,SACwE;IAInG,OAAgB,IAAI;;MAKlB;IAca,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"set.d.ts","sourceRoot":"","sources":["../../../src/commands/settings/set.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,cAAc,EAAE,MAAM,uCAAuC,CAAC;AAGvE,MAAM,CAAC,OAAO,OAAO,cAAe,SAAQ,cAAc;;IACxD,OAAgB,WAAW,SACwE;IAInG,OAAgB,IAAI;;MAKlB;IAca,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CAiDpC"}
|
|
@@ -29,7 +29,7 @@ class SetAppSettings extends ProjectCommand {
|
|
|
29
29
|
try {
|
|
30
30
|
const appInfo = await getAppBySlug(__classPrivateFieldGet(this, _SetAppSettings_appService, "f"), appName);
|
|
31
31
|
if (!appInfo?.app?.id) {
|
|
32
|
-
ux.action.stop(
|
|
32
|
+
ux.action.stop("Error: Your app doesn't exist yet - you'll need to run 'devvit upload' before you can set settings.");
|
|
33
33
|
return;
|
|
34
34
|
}
|
|
35
35
|
const response = await __classPrivateFieldGet(this, _SetAppSettings_appSettingsService, "f").UpdateSettings({
|
|
@@ -47,19 +47,25 @@ class SetAppSettings extends ProjectCommand {
|
|
|
47
47
|
if (!response.success) {
|
|
48
48
|
this.error(`${JSON.stringify(response.errors)}`);
|
|
49
49
|
}
|
|
50
|
-
ux.action.stop(
|
|
50
|
+
ux.action.stop(`Successfully added app settings for ${settingsKey}!`);
|
|
51
51
|
}
|
|
52
52
|
catch (err) {
|
|
53
53
|
if (err instanceof TwirpError) {
|
|
54
54
|
if (err.code === TwirpErrorCode.NotFound) {
|
|
55
55
|
const msg = err.message.includes('addSettings')
|
|
56
|
-
? `Unable to lookup the setting key: ${settingsKey}, please verify Devvit.addSettings was used in your app and the setting's scope is set to SettingScope.App.`
|
|
57
|
-
: 'Please install your app before listing settings.';
|
|
58
|
-
ux.action.stop(
|
|
56
|
+
? `Error: Unable to lookup the setting key: ${settingsKey}, please verify Devvit.addSettings was used in your app and the setting's scope is set to SettingScope.App.`
|
|
57
|
+
: 'Error: Please install your app before listing settings.';
|
|
58
|
+
ux.action.stop(msg);
|
|
59
59
|
return;
|
|
60
60
|
}
|
|
61
|
+
else {
|
|
62
|
+
ux.action.stop('Error');
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
else {
|
|
66
|
+
ux.action.stop('Error');
|
|
61
67
|
}
|
|
62
|
-
this.error(StringUtil.caughtToString(err));
|
|
68
|
+
this.error(StringUtil.caughtToString(err, 'message'));
|
|
63
69
|
}
|
|
64
70
|
}
|
|
65
71
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"uninstall.d.ts","sourceRoot":"","sources":["../../src/commands/uninstall.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,aAAa,EAAwB,MAAM,mCAAmC,CAAC;AAUxF,MAAM,CAAC,OAAO,OAAO,SAAU,SAAQ,aAAa;;IAClD,OAAgB,WAAW,SAAmD;IAE9E,OAAgB,QAAQ,WAItB;IAEF,OAAgB,IAAI;;;MAYlB;IAKI,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"uninstall.d.ts","sourceRoot":"","sources":["../../src/commands/uninstall.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,aAAa,EAAwB,MAAM,mCAAmC,CAAC;AAUxF,MAAM,CAAC,OAAO,OAAO,SAAU,SAAQ,aAAa;;IAClD,OAAgB,WAAW,SAAmD;IAE9E,OAAgB,QAAQ,WAItB;IAEF,OAAgB,IAAI;;;MAYlB;IAKI,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CAyD3B"}
|
|
@@ -51,17 +51,19 @@ class Uninstall extends DevvitCommand {
|
|
|
51
51
|
id = installationToRemove.id;
|
|
52
52
|
}
|
|
53
53
|
catch (err) {
|
|
54
|
-
|
|
54
|
+
ux.action.stop('Error');
|
|
55
|
+
this.error(`Error while trying to find installation to remove: ${StringUtil.caughtToString(err, 'message')}`);
|
|
55
56
|
}
|
|
56
|
-
ux.action.stop(
|
|
57
|
+
ux.action.stop();
|
|
57
58
|
ux.action.start(`Uninstalling`);
|
|
58
59
|
try {
|
|
59
60
|
await __classPrivateFieldGet(this, _Uninstall_installationsClient, "f").Remove({ id });
|
|
60
61
|
}
|
|
61
62
|
catch (err) {
|
|
62
|
-
|
|
63
|
+
ux.action.stop('Error');
|
|
64
|
+
this.error(`ERROR: Unable to uninstall app: ${StringUtil.caughtToString(err, 'message')}`);
|
|
63
65
|
}
|
|
64
|
-
ux.action.stop(
|
|
66
|
+
ux.action.stop();
|
|
65
67
|
}
|
|
66
68
|
}
|
|
67
69
|
_Uninstall_installationsClient = new WeakMap(), _Uninstall_appVersionClient = new WeakMap();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app.d.ts","sourceRoot":"","sources":["../../../src/commands/update/app.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AACrC,OAAO,MAAM,MAAM,QAAQ,CAAC;AAG5B,OAAO,EAAE,cAAc,EAAE,MAAM,uCAAuC,CAAC;AAQvE,MAAM,CAAC,OAAO,OAAO,SAAU,SAAQ,cAAc;IACnD,OAAgB,WAAW,SACsD;IAEjF,OAAgB,QAAQ,WAA2B;cAE1B,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"app.d.ts","sourceRoot":"","sources":["../../../src/commands/update/app.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AACrC,OAAO,MAAM,MAAM,QAAQ,CAAC;AAG5B,OAAO,EAAE,cAAc,EAAE,MAAM,uCAAuC,CAAC;AAQvE,MAAM,CAAC,OAAO,OAAO,SAAU,SAAQ,cAAc;IACnD,OAAgB,WAAW,SACsD;IAEjF,OAAgB,QAAQ,WAA2B;cAE1B,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAaxC,cAAc,CAAC,aAAa,EAAE,MAAM,CAAC,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAgC3D,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CAC3B;AA0DD,MAAM,MAAM,oBAAoB,GAC5B;IACE,OAAO,EAAE,KAAK,CAAC;IACf,aAAa,EAAE,SAAS,CAAC;CAC1B,GACD;IACE,OAAO,EAAE,IAAI,CAAC;IACd,aAAa,EAAE,MAAM,CAAC;CACvB,CAAC;AAEN;;;;GAIG;AACH,wBAAsB,0BAA0B,CAC9C,WAAW,EAAE,MAAM,EACnB,aAAa,EAAE,MAAM,EACrB,WAAW,GAAE,OAAe,GAC3B,OAAO,CAAC,oBAAoB,CAAC,CA6F/B"}
|
|
@@ -18,9 +18,7 @@ class UpdateApp extends ProjectCommand {
|
|
|
18
18
|
const devvitVersion = semver.parse(cliPackageJSON.version);
|
|
19
19
|
const result = await matchDevvitPackageVersions(this.projectRoot, devvitVersion, true);
|
|
20
20
|
if (!result.success) {
|
|
21
|
-
|
|
22
|
-
// `this.exit` never returns, but it's typed as `void` not `never`, so we need to return for type safety
|
|
23
|
-
return;
|
|
21
|
+
process.exit(1);
|
|
24
22
|
}
|
|
25
23
|
await this.doUpdatesSince(result.oldestVersion);
|
|
26
24
|
}
|
|
@@ -34,11 +32,12 @@ class UpdateApp extends ProjectCommand {
|
|
|
34
32
|
this.log('Performing update actions:');
|
|
35
33
|
isFirstAction = false;
|
|
36
34
|
}
|
|
37
|
-
ux.action.start(`Attempting to ${action.description}
|
|
35
|
+
ux.action.start(`Attempting to ${action.description}`);
|
|
38
36
|
await action.run(this);
|
|
39
|
-
ux.action.stop(
|
|
37
|
+
ux.action.stop();
|
|
40
38
|
}
|
|
41
39
|
catch (err) {
|
|
40
|
+
ux.action.stop('Error');
|
|
42
41
|
isSuccess = false;
|
|
43
42
|
this.warn(`An error occurred while attempting to ${action.description}:`);
|
|
44
43
|
this.warn(err);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"upload.d.ts","sourceRoot":"","sources":["../../src/commands/upload.ts"],"names":[],"mappings":"AAKA,OAAO,EACL,KAAK,OAAO,EACZ,cAAc,EAEd,WAAW,EAIX,iBAAiB,EAClB,MAAM,6BAA6B,CAAC;AAErC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,kEAAkE,CAAC;AAmB/F,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAEjF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qCAAqC,CAAC;AACxE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sCAAsC,CAAC;AActE,OAAO,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AAEpE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAa5D,MAAM,CAAC,OAAO,OAAO,MAAO,SAAQ,cAAc;;IAChD,OAAgB,WAAW,SAA+M;IAE1O,OAAgB,KAAK,EAAE,SAAS,CAgD9B;IAEF,QAAQ,CAAC,SAAS,kDAAqB;IACvC,QAAQ,CAAC,gBAAgB,yDAA4B;IAe/C,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;IA4JpB,YAAY,CAChB,aAAa,EAAE,YAAY,EAC3B,SAAS,EAAE,OAAO,EAClB,QAAQ,EAAE,OAAO,GAChB,OAAO,CAAC,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"upload.d.ts","sourceRoot":"","sources":["../../src/commands/upload.ts"],"names":[],"mappings":"AAKA,OAAO,EACL,KAAK,OAAO,EACZ,cAAc,EAEd,WAAW,EAIX,iBAAiB,EAClB,MAAM,6BAA6B,CAAC;AAErC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,kEAAkE,CAAC;AAmB/F,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAEjF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qCAAqC,CAAC;AACxE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sCAAsC,CAAC;AActE,OAAO,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AAEpE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAa5D,MAAM,CAAC,OAAO,OAAO,MAAO,SAAQ,cAAc;;IAChD,OAAgB,WAAW,SAA+M;IAE1O,OAAgB,KAAK,EAAE,SAAS,CAgD9B;IAEF,QAAQ,CAAC,SAAS,kDAAqB;IACvC,QAAQ,CAAC,gBAAgB,yDAA4B;IAe/C,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;IA4JpB,YAAY,CAChB,aAAa,EAAE,YAAY,EAC3B,SAAS,EAAE,OAAO,EAClB,QAAQ,EAAE,OAAO,GAChB,OAAO,CAAC,WAAW,CAAC;IAqGjB,cAAc,CAClB,OAAO,EAAE,WAAW,EACpB,IAAI,EAAE,eAAe,GAAG,SAAS,EACjC,MAAM,EAAE,OAAO,GACd,OAAO,CAAC,aAAa,CAAC;IAuBnB,aAAa,CACjB,GAAG,EAAE,OAAO,EACZ,UAAU,EAAE,aAAa,EACzB,OAAO,EAAE,MAAM,EAAE,EACjB,UAAU,EAAE,iBAAiB,GAC5B,OAAO,CAAC,cAAc,CAAC;IA8NX,KAAK,CAAC,GAAG,EAAE,YAAY,GAAG,OAAO,CAAC,OAAO,CAAC;CAuM1D"}
|
package/dist/commands/upload.js
CHANGED
|
@@ -79,7 +79,7 @@ class Upload extends ProjectCommand {
|
|
|
79
79
|
appInfo = await getAppBySlug(this.appClient, appName);
|
|
80
80
|
}
|
|
81
81
|
catch (e) {
|
|
82
|
-
this.error(StringUtil.caughtToString(e));
|
|
82
|
+
this.error(StringUtil.caughtToString(e, 'message'));
|
|
83
83
|
}
|
|
84
84
|
if (!flags.justDoIt) {
|
|
85
85
|
// If we're not just doing it, check and make sure there's a chance our
|
|
@@ -107,9 +107,9 @@ class Upload extends ProjectCommand {
|
|
|
107
107
|
if (shouldCreateNewApp || !appInfo) {
|
|
108
108
|
// If we're creating a new app, or if we couldn't find the app
|
|
109
109
|
// bundle the app now, to ensure it builds before we potentially create an app
|
|
110
|
-
ux.action.start('Verifying app builds
|
|
110
|
+
ux.action.start('Verifying app builds');
|
|
111
111
|
await __classPrivateFieldGet(this, _Upload_instances, "m", _Upload_bundleActors).call(this, username, projectConfig.version, !flags.disableTypecheck);
|
|
112
|
-
ux.action.stop(
|
|
112
|
+
ux.action.stop();
|
|
113
113
|
didVerificationBuild = true;
|
|
114
114
|
appInfo = await this.createNewApp(projectConfig, flags.copyPaste, flags.justDoIt);
|
|
115
115
|
}
|
|
@@ -124,9 +124,9 @@ class Upload extends ProjectCommand {
|
|
|
124
124
|
// Now, create a new version, probably prompting for the new version number
|
|
125
125
|
const version = await this.getNextVersion(appInfo, flags.bump, !flags.justDoIt);
|
|
126
126
|
__classPrivateFieldGet(this, _Upload_event, "f").devplatform.app_version_number = version.toString();
|
|
127
|
-
ux.action.start(didVerificationBuild ? 'Rebuilding for first upload
|
|
127
|
+
ux.action.start(didVerificationBuild ? 'Rebuilding for first upload' : 'Building');
|
|
128
128
|
const bundles = await __classPrivateFieldGet(this, _Upload_instances, "m", _Upload_bundleActors).call(this, username, version.toString(), !flags.disableTypecheck);
|
|
129
|
-
ux.action.stop(
|
|
129
|
+
ux.action.stop();
|
|
130
130
|
try {
|
|
131
131
|
await this.createVersion(appInfo.app, version, bundles, VersionVisibility.PRIVATE);
|
|
132
132
|
}
|
|
@@ -140,7 +140,7 @@ class Upload extends ProjectCommand {
|
|
|
140
140
|
}
|
|
141
141
|
this.log(`\n✨ Visit ${chalk.cyan.bold(`${DEVVIT_PORTAL_URL}/apps/${appInfo.app?.slug}`)} to view your app!`);
|
|
142
142
|
await __classPrivateFieldGet(this, _Upload_instances, "m", _Upload_sendEventIfNotSent).call(this);
|
|
143
|
-
process.exit();
|
|
143
|
+
process.exit(0);
|
|
144
144
|
}
|
|
145
145
|
async createNewApp(projectConfig, copyPaste, justDoIt) {
|
|
146
146
|
projectConfig.name = await __classPrivateFieldGet(this, _Upload_instances, "m", _Upload_promptNameUntilNotTaken).call(this, sluggable(projectConfig.name) ? makeSlug(projectConfig.name) : undefined);
|
|
@@ -185,7 +185,7 @@ class Upload extends ProjectCommand {
|
|
|
185
185
|
__classPrivateFieldGet(this, _Upload_event, "f").devplatform.cli_upload_is_nsfw = isNsfw;
|
|
186
186
|
__classPrivateFieldGet(this, _Upload_event, "f").devplatform.app_name = projectConfig.name;
|
|
187
187
|
try {
|
|
188
|
-
ux.action.start('Creating app
|
|
188
|
+
ux.action.start('Creating app');
|
|
189
189
|
// let's eliminate the "slug" field and just update the "name" directly
|
|
190
190
|
const newApp = await this.appClient.Create(appCreationRequest);
|
|
191
191
|
await updateDevvitConfig(this.projectRoot, this.configFile, {
|
|
@@ -200,11 +200,17 @@ class Upload extends ProjectCommand {
|
|
|
200
200
|
};
|
|
201
201
|
}
|
|
202
202
|
catch (err) {
|
|
203
|
-
|
|
204
|
-
|
|
203
|
+
ux.action.stop('Error');
|
|
204
|
+
if (err instanceof TwirpError) {
|
|
205
|
+
if (err.code === TwirpErrorCode.AlreadyExists) {
|
|
206
|
+
this.error(`An app account with the name "${projectConfig.name}" already exists. Please change the "name" field of devvit.yaml and try again.`);
|
|
207
|
+
}
|
|
208
|
+
else {
|
|
209
|
+
this.error(StringUtil.caughtToString(err, 'message'));
|
|
210
|
+
}
|
|
205
211
|
}
|
|
206
212
|
else {
|
|
207
|
-
this.error(
|
|
213
|
+
this.error('Your app could not be uploaded because we encountered an issue creating your app account. This may happen because of a network issue on our end. Please try again.');
|
|
208
214
|
}
|
|
209
215
|
}
|
|
210
216
|
}
|
|
@@ -259,7 +265,7 @@ class Upload extends ProjectCommand {
|
|
|
259
265
|
}
|
|
260
266
|
}
|
|
261
267
|
}
|
|
262
|
-
ux.action.start(`Uploading new version "${appVersion.toString()}" to Reddit
|
|
268
|
+
ux.action.start(`Uploading new version "${appVersion.toString()}" to Reddit`);
|
|
263
269
|
try {
|
|
264
270
|
// Actually create the app version
|
|
265
271
|
const appVersionInfo = await this.appVersionClient.Create({
|
|
@@ -273,10 +279,11 @@ class Upload extends ProjectCommand {
|
|
|
273
279
|
prereleaseVersion: appVersion.prerelease,
|
|
274
280
|
actorBundles: bundles,
|
|
275
281
|
});
|
|
276
|
-
ux.action.stop(
|
|
282
|
+
ux.action.stop();
|
|
277
283
|
return appVersionInfo;
|
|
278
284
|
}
|
|
279
285
|
catch (error) {
|
|
286
|
+
ux.action.stop('Error');
|
|
280
287
|
return handleTwirpError(error, (message) => this.error(message));
|
|
281
288
|
}
|
|
282
289
|
}
|
|
@@ -357,7 +364,7 @@ _Upload_event = new WeakMap(), _Upload_eventSent = new WeakMap(), _Upload_verbos
|
|
|
357
364
|
return await bundler.bundle(this.projectRoot, actorSpec);
|
|
358
365
|
}
|
|
359
366
|
catch (err) {
|
|
360
|
-
this.error(StringUtil.caughtToString(err));
|
|
367
|
+
this.error(StringUtil.caughtToString(err, 'message'));
|
|
361
368
|
}
|
|
362
369
|
}, _Upload_getLatestPublishedVersion = function _Upload_getLatestPublishedVersion(versions) {
|
|
363
370
|
const versionsSorted = versions
|
|
@@ -457,7 +464,7 @@ async function _Upload_syncAssets() {
|
|
|
457
464
|
this.error(`Asset ${asset.filePath} is too large - images can't be more than ${prettyPrintSize(MAX_ASSET_NON_GIF_SIZE)}.`);
|
|
458
465
|
}
|
|
459
466
|
}
|
|
460
|
-
ux.action.start(`Checking for new assets to upload
|
|
467
|
+
ux.action.start(`Checking for new assets to upload`);
|
|
461
468
|
const assetMap = await __classPrivateFieldGet(this, _Upload_instances, "m", _Upload_uploadNewAssets).call(this, assets);
|
|
462
469
|
ux.action.stop(`Found ${assets.length} new asset${assets.length === 1 ? '' : 's'}.`);
|
|
463
470
|
return assetMap;
|
|
@@ -466,7 +473,7 @@ async function _Upload_syncAssets() {
|
|
|
466
473
|
if (assets.length === 0) {
|
|
467
474
|
return {};
|
|
468
475
|
}
|
|
469
|
-
ux.action.start(`Checking for new WebView assets to upload
|
|
476
|
+
ux.action.start(`Checking for new WebView assets to upload`);
|
|
470
477
|
const assetMap = await __classPrivateFieldGet(this, _Upload_instances, "m", _Upload_uploadNewAssets).call(this, assets, true);
|
|
471
478
|
ux.action.stop(`Found ${assets.length} new WebView asset${assets.length === 1 ? '' : 's'}.`);
|
|
472
479
|
// only return the html files for the WebView assets
|
|
@@ -512,7 +519,7 @@ async function _Upload_syncAssets() {
|
|
|
512
519
|
return assetMap;
|
|
513
520
|
}
|
|
514
521
|
// Upload everything, giving back pairs of the assets & their upload response
|
|
515
|
-
ux.action.start(`Uploading new ${webViewMsg}assets, ${newAssets.length} remaining
|
|
522
|
+
ux.action.start(`Uploading new ${webViewMsg}assets, ${newAssets.length} remaining`);
|
|
516
523
|
let uploadResults = [];
|
|
517
524
|
try {
|
|
518
525
|
// Do this in batches - we don't want to upload everything at once and
|
|
@@ -535,12 +542,13 @@ async function _Upload_syncAssets() {
|
|
|
535
542
|
];
|
|
536
543
|
}))),
|
|
537
544
|
];
|
|
538
|
-
ux.action.start(`Uploading new ${webViewMsg}assets, ${newAssets.length} remaining
|
|
545
|
+
ux.action.start(`Uploading new ${webViewMsg}assets, ${newAssets.length} remaining`);
|
|
539
546
|
}
|
|
540
547
|
}
|
|
541
548
|
catch (err) {
|
|
542
549
|
const error = err;
|
|
543
550
|
const msg = `Failed to upload ${webViewMsg}assets. (${error.message})`;
|
|
551
|
+
ux.action.stop(msg);
|
|
544
552
|
if (webViewAsset) {
|
|
545
553
|
// don't fail on WebView uploads in case we just don't have the feature enabled
|
|
546
554
|
ux.action.stop(msg);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"check-update.d.ts","sourceRoot":"","sources":["../../../../src/lib/hooks/init/check-update.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAExC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAUrC,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"check-update.d.ts","sourceRoot":"","sources":["../../../../src/lib/hooks/init/check-update.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAExC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAUrC,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,MAAM,CAuCtB,CAAC;AAYF,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAEzE;AAGD,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAQ5E;AAID,eAAe,IAAI,CAAC"}
|
|
@@ -16,11 +16,12 @@ const hook = async function (options) {
|
|
|
16
16
|
}
|
|
17
17
|
let latest;
|
|
18
18
|
try {
|
|
19
|
-
ux.action.start('Checking for updates
|
|
19
|
+
ux.action.start('Checking for updates');
|
|
20
20
|
latest = await fetchLatestPublishedVersion();
|
|
21
|
-
ux.action.stop(
|
|
21
|
+
ux.action.stop();
|
|
22
22
|
}
|
|
23
23
|
catch {
|
|
24
|
+
ux.action.stop('Error');
|
|
24
25
|
this.warn('There was an error checking for devvit updates. The command will proceed, but you may be using an outdated version.');
|
|
25
26
|
// don't want to block the user if they are offline
|
|
26
27
|
return;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"private": true,
|
|
3
3
|
"name": "app-settings-template",
|
|
4
|
-
"version": "0.11.
|
|
4
|
+
"version": "0.11.5-dev",
|
|
5
5
|
"license": "BSD-3-Clause",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"dependencies": {
|
|
8
|
-
"@devvit/public-api": "0.11.
|
|
8
|
+
"@devvit/public-api": "0.11.5-dev"
|
|
9
9
|
},
|
|
10
10
|
"devDependencies": {
|
|
11
|
-
"@devvit/tsconfig": "0.11.
|
|
11
|
+
"@devvit/tsconfig": "0.11.5-dev",
|
|
12
12
|
"typescript": "4.9.3"
|
|
13
13
|
}
|
|
14
14
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"private": true,
|
|
3
3
|
"name": "experience-template",
|
|
4
|
-
"version": "0.11.
|
|
4
|
+
"version": "0.11.5-dev",
|
|
5
5
|
"license": "BSD-3-Clause",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"dependencies": {
|
|
8
|
-
"@devvit/public-api": "0.11.
|
|
8
|
+
"@devvit/public-api": "0.11.5-dev"
|
|
9
9
|
},
|
|
10
10
|
"devDependencies": {
|
|
11
11
|
"typescript": "5.3.2"
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"private": true,
|
|
3
3
|
"name": "experience-pro-template",
|
|
4
|
-
"version": "0.11.
|
|
4
|
+
"version": "0.11.5-dev",
|
|
5
5
|
"license": "BSD-3-Clause",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"scripts": {
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"test:unit": "vitest --run"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"@devvit/public-api": "0.11.
|
|
12
|
+
"@devvit/public-api": "0.11.5-dev"
|
|
13
13
|
},
|
|
14
14
|
"devDependencies": {
|
|
15
15
|
"typescript": "5.3.2",
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"private": true,
|
|
3
3
|
"name": "empty-template",
|
|
4
|
-
"version": "0.11.
|
|
4
|
+
"version": "0.11.5-dev",
|
|
5
5
|
"license": "BSD-3-Clause",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"dependencies": {
|
|
8
|
-
"@devvit/public-api": "0.11.
|
|
8
|
+
"@devvit/public-api": "0.11.5-dev"
|
|
9
9
|
},
|
|
10
10
|
"devDependencies": {
|
|
11
11
|
"typescript": "5.3.2"
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"private": true,
|
|
3
3
|
"name": "forms-template",
|
|
4
|
-
"version": "0.11.
|
|
4
|
+
"version": "0.11.5-dev",
|
|
5
5
|
"license": "BSD-3-Clause",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"dependencies": {
|
|
8
|
-
"@devvit/public-api": "0.11.
|
|
8
|
+
"@devvit/public-api": "0.11.5-dev"
|
|
9
9
|
},
|
|
10
10
|
"devDependencies": {
|
|
11
11
|
"typescript": "5.3.2"
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"private": true,
|
|
3
3
|
"name": "image-uploads-template",
|
|
4
|
-
"version": "0.11.
|
|
4
|
+
"version": "0.11.5-dev",
|
|
5
5
|
"license": "BSD-3-Clause",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"dependencies": {
|
|
8
|
-
"@devvit/public-api": "0.11.
|
|
8
|
+
"@devvit/public-api": "0.11.5-dev"
|
|
9
9
|
},
|
|
10
10
|
"devDependencies": {
|
|
11
11
|
"typescript": "5.3.2"
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"private": true,
|
|
3
3
|
"name": "intro-to-devvit",
|
|
4
|
-
"version": "0.11.
|
|
4
|
+
"version": "0.11.5-dev",
|
|
5
5
|
"license": "BSD-3-Clause",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"dependencies": {
|
|
8
|
-
"@devvit/public-api": "0.11.
|
|
8
|
+
"@devvit/public-api": "0.11.5-dev"
|
|
9
9
|
},
|
|
10
10
|
"devDependencies": {
|
|
11
11
|
"typescript": "5.3.2"
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"private": true,
|
|
3
3
|
"name": "menu-action-template",
|
|
4
|
-
"version": "0.11.
|
|
4
|
+
"version": "0.11.5-dev",
|
|
5
5
|
"license": "BSD-3-Clause",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"dependencies": {
|
|
8
|
-
"@devvit/public-api": "0.11.
|
|
8
|
+
"@devvit/public-api": "0.11.5-dev"
|
|
9
9
|
},
|
|
10
10
|
"devDependencies": {
|
|
11
11
|
"typescript": "5.3.2"
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"private": true,
|
|
3
3
|
"name": "payment-template",
|
|
4
|
-
"version": "0.11.
|
|
4
|
+
"version": "0.11.5-dev",
|
|
5
5
|
"license": "BSD-3-Clause",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"dependencies": {
|
|
8
|
-
"@devvit/payments": "0.11.
|
|
9
|
-
"@devvit/public-api": "0.11.
|
|
8
|
+
"@devvit/payments": "0.11.5-dev",
|
|
9
|
+
"@devvit/public-api": "0.11.5-dev"
|
|
10
10
|
},
|
|
11
11
|
"devDependencies": {
|
|
12
12
|
"typescript": "5.3.2"
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"private": true,
|
|
3
3
|
"name": "pen-template",
|
|
4
|
-
"version": "0.11.
|
|
4
|
+
"version": "0.11.5-dev",
|
|
5
5
|
"license": "BSD-3-Clause",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"dependencies": {
|
|
8
|
-
"@devvit/public-api": "0.11.
|
|
8
|
+
"@devvit/public-api": "0.11.5-dev"
|
|
9
9
|
},
|
|
10
10
|
"devDependencies": {
|
|
11
11
|
"typescript": "5.3.2"
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"private": true,
|
|
3
3
|
"name": "redis-template",
|
|
4
|
-
"version": "0.11.
|
|
4
|
+
"version": "0.11.5-dev",
|
|
5
5
|
"license": "BSD-3-Clause",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"dependencies": {
|
|
8
|
-
"@devvit/public-api": "0.11.
|
|
8
|
+
"@devvit/public-api": "0.11.5-dev"
|
|
9
9
|
},
|
|
10
10
|
"devDependencies": {
|
|
11
11
|
"typescript": "5.3.2"
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"private": true,
|
|
3
3
|
"name": "triggers-template",
|
|
4
|
-
"version": "0.11.
|
|
4
|
+
"version": "0.11.5-dev",
|
|
5
5
|
"license": "BSD-3-Clause",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"dependencies": {
|
|
8
|
-
"@devvit/public-api": "0.11.
|
|
8
|
+
"@devvit/public-api": "0.11.5-dev"
|
|
9
9
|
},
|
|
10
10
|
"devDependencies": {
|
|
11
11
|
"typescript": "5.3.2"
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"private": true,
|
|
3
3
|
"name": "web-view-template",
|
|
4
|
-
"version": "0.11.
|
|
4
|
+
"version": "0.11.5-dev",
|
|
5
5
|
"license": "BSD-3-Clause",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"dependencies": {
|
|
8
|
-
"@devvit/public-api": "0.11.
|
|
8
|
+
"@devvit/public-api": "0.11.5-dev"
|
|
9
9
|
},
|
|
10
10
|
"devDependencies": {
|
|
11
11
|
"typescript": "5.3.2"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app-log-observer.d.ts","sourceRoot":"","sources":["../../../src/util/app-logs/app-log-observer.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,4DAA4D,CAAC;AAGnG,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,MAAM,CAAC;AAErC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAQtD,KAAK,OAAO,GAAG;IAAE,KAAK,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,GAAG,IAAI,CAAC;IAAC,GAAG,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,GAAG,IAAI,CAAA;CAAE,CAAC;AAClF,KAAK,oBAAoB,GAAG,YAAY,GAAG;IACzC,IAAI,EAAE,OAAO,CAAC;IACd,aAAa,EAAE,OAAO,CAAC;CACxB,CAAC;AAEF;;;GAGG;AACH,qBAAa,cAAe,YAAW,QAAQ,CAAC,gBAAgB,CAAC;;gBAMnD,MAAM,EAAE,oBAAoB,EAAE,MAAM,EAAE,OAAO;IAKzD,QAAQ,IAAI,IAAI;IAUhB,IAAI,CAAC,GAAG,EAAE,gBAAgB,GAAG,IAAI;IAejC,KAAK,CAAC,GAAG,EAAE,OAAO,GAAG,IAAI;
|
|
1
|
+
{"version":3,"file":"app-log-observer.d.ts","sourceRoot":"","sources":["../../../src/util/app-logs/app-log-observer.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,4DAA4D,CAAC;AAGnG,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,MAAM,CAAC;AAErC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAQtD,KAAK,OAAO,GAAG;IAAE,KAAK,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,GAAG,IAAI,CAAC;IAAC,GAAG,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,GAAG,IAAI,CAAA;CAAE,CAAC;AAClF,KAAK,oBAAoB,GAAG,YAAY,GAAG;IACzC,IAAI,EAAE,OAAO,CAAC;IACd,aAAa,EAAE,OAAO,CAAC;CACxB,CAAC;AAEF;;;GAGG;AACH,qBAAa,cAAe,YAAW,QAAQ,CAAC,gBAAgB,CAAC;;gBAMnD,MAAM,EAAE,oBAAoB,EAAE,MAAM,EAAE,OAAO;IAKzD,QAAQ,IAAI,IAAI;IAUhB,IAAI,CAAC,GAAG,EAAE,gBAAgB,GAAG,IAAI;IAejC,KAAK,CAAC,GAAG,EAAE,OAAO,GAAG,IAAI;CA8C1B"}
|
|
@@ -57,7 +57,7 @@ export class AppLogObserver {
|
|
|
57
57
|
}
|
|
58
58
|
}
|
|
59
59
|
error(err) {
|
|
60
|
-
__classPrivateFieldGet(this, _AppLogObserver_logger, "f").error(chalk.red(`error while fetching logs: ${StringUtil.caughtToString(err)}`));
|
|
60
|
+
__classPrivateFieldGet(this, _AppLogObserver_logger, "f").error(chalk.red(`error while fetching logs: ${StringUtil.caughtToString(err, 'message')}`));
|
|
61
61
|
}
|
|
62
62
|
}
|
|
63
63
|
_AppLogObserver_config = new WeakMap(), _AppLogObserver_logger = new WeakMap(), _AppLogObserver_instances = new WeakSet(), _AppLogObserver_logError = function _AppLogObserver_logError(error) {
|
|
@@ -150,7 +150,7 @@ Last error: ${StringUtil.caughtToString(error, 'message')}`);
|
|
|
150
150
|
retries++;
|
|
151
151
|
}
|
|
152
152
|
}
|
|
153
|
-
throw new Error(`${
|
|
153
|
+
throw new Error(`${JSON.stringify(prop)} failed after ${MAX_RETRIES} attempts.
|
|
154
154
|
First error: ${StringUtil.caughtToString(firstError, 'message')}
|
|
155
155
|
Last error: ${StringUtil.caughtToString(lastError, 'message')}`);
|
|
156
156
|
};
|
package/dist/util/r2Api/user.js
CHANGED
|
@@ -27,7 +27,7 @@ export async function fetchUserT2Id(token) {
|
|
|
27
27
|
return Result.Err(`Failed to fetch user id as string. Got: ${fetchUserRes.value}`);
|
|
28
28
|
}
|
|
29
29
|
if (userId === '') {
|
|
30
|
-
return Result.Err(`Failed to fetch user id - got an empty string somehow
|
|
30
|
+
return Result.Err(`Failed to fetch user id - got an empty string somehow.`);
|
|
31
31
|
}
|
|
32
32
|
if (!userId.startsWith('t2_')) {
|
|
33
33
|
userId = 't2_' + userId;
|
package/dist/util/utils.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@devvit/cli",
|
|
3
|
-
"version": "0.11.
|
|
3
|
+
"version": "0.11.5-next-2024-12-09-1c29dd3cd.0",
|
|
4
4
|
"description": "Reddit's Dev Platform CLI Tool",
|
|
5
5
|
"license": "BSD-3-Clause",
|
|
6
6
|
"author": "@reddit/dev-platform",
|
|
@@ -42,11 +42,11 @@
|
|
|
42
42
|
},
|
|
43
43
|
"types": "dist/index.d.ts",
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"@devvit/build-pack": "0.11.
|
|
45
|
+
"@devvit/build-pack": "0.11.5-next-2024-12-09-1c29dd3cd.0",
|
|
46
46
|
"@devvit/play": "0.0.43",
|
|
47
|
-
"@devvit/protos": "0.11.
|
|
48
|
-
"@devvit/public-api": "0.11.
|
|
49
|
-
"@devvit/shared-types": "0.11.
|
|
47
|
+
"@devvit/protos": "0.11.5-next-2024-12-09-1c29dd3cd.0",
|
|
48
|
+
"@devvit/public-api": "0.11.5-next-2024-12-09-1c29dd3cd.0",
|
|
49
|
+
"@devvit/shared-types": "0.11.5-next-2024-12-09-1c29dd3cd.0",
|
|
50
50
|
"@improbable-eng/grpc-web": "0.15.0",
|
|
51
51
|
"@improbable-eng/grpc-web-node-http-transport": "0.15.0",
|
|
52
52
|
"@oclif/core": "2.9.4",
|
|
@@ -78,8 +78,8 @@
|
|
|
78
78
|
"ws": "8.18.0"
|
|
79
79
|
},
|
|
80
80
|
"devDependencies": {
|
|
81
|
-
"@devvit/repo-tools": "0.11.
|
|
82
|
-
"@devvit/tsconfig": "0.11.
|
|
81
|
+
"@devvit/repo-tools": "0.11.5-next-2024-12-09-1c29dd3cd.0",
|
|
82
|
+
"@devvit/tsconfig": "0.11.5-next-2024-12-09-1c29dd3cd.0",
|
|
83
83
|
"@types/file-type": "10.9.1",
|
|
84
84
|
"@types/inquirer": "9.0.3",
|
|
85
85
|
"@types/js-yaml": "4.0.5",
|
|
@@ -120,5 +120,5 @@
|
|
|
120
120
|
]
|
|
121
121
|
}
|
|
122
122
|
},
|
|
123
|
-
"gitHead": "
|
|
123
|
+
"gitHead": "962a1f3faa8237bc6cd9348dbffb6eda273e1b69"
|
|
124
124
|
}
|