percher 0.5.18 → 0.5.19
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/percher.js +107 -64
- package/dist/package.json +2 -2
- package/package.json +2 -2
package/dist/bin/percher.js
CHANGED
|
@@ -106338,6 +106338,9 @@ class AppsResource {
|
|
|
106338
106338
|
importFromGithub(appRef, input) {
|
|
106339
106339
|
return this.http.post(`/apps/${encodeURIComponent(appRef)}/import/github`, input);
|
|
106340
106340
|
}
|
|
106341
|
+
importGithub(input) {
|
|
106342
|
+
return this.http.post("/apps/import-github", input);
|
|
106343
|
+
}
|
|
106341
106344
|
setupWebhook(appRef) {
|
|
106342
106345
|
return this.http.post(`/apps/${encodeURIComponent(appRef)}/webhook/setup`, {});
|
|
106343
106346
|
}
|
|
@@ -110237,6 +110240,89 @@ function configFromDetection(name, detected, dataMode) {
|
|
|
110237
110240
|
};
|
|
110238
110241
|
}
|
|
110239
110242
|
|
|
110243
|
+
// ../core/dist/validation/blocked-names.js
|
|
110244
|
+
var BLOCKED_APP_NAMES = new Set([
|
|
110245
|
+
"api",
|
|
110246
|
+
"app",
|
|
110247
|
+
"admin",
|
|
110248
|
+
"dashboard",
|
|
110249
|
+
"www",
|
|
110250
|
+
"mail",
|
|
110251
|
+
"smtp",
|
|
110252
|
+
"ftp",
|
|
110253
|
+
"ssh",
|
|
110254
|
+
"root",
|
|
110255
|
+
"system",
|
|
110256
|
+
"internal",
|
|
110257
|
+
"auth",
|
|
110258
|
+
"oauth",
|
|
110259
|
+
"billing",
|
|
110260
|
+
"help",
|
|
110261
|
+
"status",
|
|
110262
|
+
"cdn",
|
|
110263
|
+
"assets",
|
|
110264
|
+
"static",
|
|
110265
|
+
"pb",
|
|
110266
|
+
"pocketbase",
|
|
110267
|
+
"forgejo",
|
|
110268
|
+
"caddy",
|
|
110269
|
+
"git",
|
|
110270
|
+
"percher",
|
|
110271
|
+
"mcp",
|
|
110272
|
+
"preview",
|
|
110273
|
+
"metrics",
|
|
110274
|
+
"login",
|
|
110275
|
+
"signin",
|
|
110276
|
+
"signup",
|
|
110277
|
+
"register",
|
|
110278
|
+
"account",
|
|
110279
|
+
"paypal",
|
|
110280
|
+
"stripe",
|
|
110281
|
+
"bank",
|
|
110282
|
+
"apple",
|
|
110283
|
+
"microsoft",
|
|
110284
|
+
"google",
|
|
110285
|
+
"amazon",
|
|
110286
|
+
"facebook",
|
|
110287
|
+
"meta",
|
|
110288
|
+
"instagram",
|
|
110289
|
+
"twitter",
|
|
110290
|
+
"tiktok",
|
|
110291
|
+
"netflix",
|
|
110292
|
+
"spotify",
|
|
110293
|
+
"support",
|
|
110294
|
+
"security",
|
|
110295
|
+
"verify",
|
|
110296
|
+
"update",
|
|
110297
|
+
"confirm",
|
|
110298
|
+
"recovery"
|
|
110299
|
+
]);
|
|
110300
|
+
function isBlockedName(name) {
|
|
110301
|
+
if (BLOCKED_APP_NAMES.has(name))
|
|
110302
|
+
return true;
|
|
110303
|
+
const prefixes = [
|
|
110304
|
+
"login-",
|
|
110305
|
+
"signin-",
|
|
110306
|
+
"signup-",
|
|
110307
|
+
"paypal-",
|
|
110308
|
+
"bank-",
|
|
110309
|
+
"apple-",
|
|
110310
|
+
"microsoft-",
|
|
110311
|
+
"google-",
|
|
110312
|
+
"amazon-",
|
|
110313
|
+
"support-",
|
|
110314
|
+
"admin-",
|
|
110315
|
+
"pb-",
|
|
110316
|
+
"percher-",
|
|
110317
|
+
"security-",
|
|
110318
|
+
"verify-",
|
|
110319
|
+
"update-",
|
|
110320
|
+
"confirm-",
|
|
110321
|
+
"recovery-"
|
|
110322
|
+
];
|
|
110323
|
+
return prefixes.some((p) => name.startsWith(p));
|
|
110324
|
+
}
|
|
110325
|
+
|
|
110240
110326
|
// ../core/dist/commands/init.js
|
|
110241
110327
|
function isSuspiciousAutoName(name) {
|
|
110242
110328
|
if (/-\d{8,}$/.test(name))
|
|
@@ -110247,6 +110333,12 @@ function isSuspiciousAutoName(name) {
|
|
|
110247
110333
|
return true;
|
|
110248
110334
|
return false;
|
|
110249
110335
|
}
|
|
110336
|
+
function adjustReservedName(name) {
|
|
110337
|
+
let adjusted = `app-${name}`;
|
|
110338
|
+
if (adjusted.length > 40)
|
|
110339
|
+
adjusted = adjusted.slice(0, 40).replace(/-+$/g, "");
|
|
110340
|
+
return adjusted;
|
|
110341
|
+
}
|
|
110250
110342
|
function detectInteractive() {
|
|
110251
110343
|
return process.stdin?.isTTY === true && process.stdout?.isTTY === true;
|
|
110252
110344
|
}
|
|
@@ -110274,16 +110366,24 @@ async function init(ctx, input = {}) {
|
|
|
110274
110366
|
if (input.name) {
|
|
110275
110367
|
name = input.name;
|
|
110276
110368
|
} else {
|
|
110277
|
-
|
|
110369
|
+
let suggestion = generateName(basename3(ctx.cwd));
|
|
110370
|
+
const reserved = isBlockedName(suggestion);
|
|
110371
|
+
if (reserved)
|
|
110372
|
+
suggestion = adjustReservedName(suggestion);
|
|
110278
110373
|
const interactive = input.interactive ?? detectInteractive();
|
|
110279
|
-
|
|
110280
|
-
|
|
110374
|
+
const flagged = reserved || isSuspiciousAutoName(suggestion);
|
|
110375
|
+
if (flagged && interactive) {
|
|
110376
|
+
const lead = reserved ? `'${basename3(ctx.cwd)}' maps to a reserved app name; suggested '${suggestion}'` : `Suggested app name: '${suggestion}'`;
|
|
110377
|
+
const answer = (await ctx.prompt(`${lead}. Press Enter to accept, or type a different name: `, {
|
|
110378
|
+
default: suggestion
|
|
110379
|
+
})).trim();
|
|
110281
110380
|
name = answer.length > 0 ? answer : suggestion;
|
|
110282
110381
|
} else {
|
|
110283
|
-
if (
|
|
110382
|
+
if (flagged) {
|
|
110383
|
+
const reason = reserved ? `auto-generated app name was reserved — using '${suggestion}'.` : `auto-generated app name '${suggestion}' looks like a temp-dir slug.`;
|
|
110284
110384
|
const writer = ctx.stderr.getWriter();
|
|
110285
110385
|
try {
|
|
110286
|
-
await writer.write(new TextEncoder().encode(`warning:
|
|
110386
|
+
await writer.write(new TextEncoder().encode(`warning: ${reason} Set [app].name in percher.toml or pass --name to override.
|
|
110287
110387
|
`));
|
|
110288
110388
|
} finally {
|
|
110289
110389
|
writer.releaseLock();
|
|
@@ -117467,63 +117567,6 @@ var PLAN_IDS = Object.entries(PLAN_CATALOG).filter(([, info]) => !info.hidden).m
|
|
|
117467
117567
|
// ../core/dist/index.js
|
|
117468
117568
|
init_qr();
|
|
117469
117569
|
|
|
117470
|
-
// ../core/dist/validation/blocked-names.js
|
|
117471
|
-
var BLOCKED_APP_NAMES = new Set([
|
|
117472
|
-
"api",
|
|
117473
|
-
"app",
|
|
117474
|
-
"admin",
|
|
117475
|
-
"dashboard",
|
|
117476
|
-
"www",
|
|
117477
|
-
"mail",
|
|
117478
|
-
"smtp",
|
|
117479
|
-
"ftp",
|
|
117480
|
-
"ssh",
|
|
117481
|
-
"root",
|
|
117482
|
-
"system",
|
|
117483
|
-
"internal",
|
|
117484
|
-
"auth",
|
|
117485
|
-
"oauth",
|
|
117486
|
-
"billing",
|
|
117487
|
-
"help",
|
|
117488
|
-
"status",
|
|
117489
|
-
"cdn",
|
|
117490
|
-
"assets",
|
|
117491
|
-
"static",
|
|
117492
|
-
"pb",
|
|
117493
|
-
"pocketbase",
|
|
117494
|
-
"forgejo",
|
|
117495
|
-
"caddy",
|
|
117496
|
-
"git",
|
|
117497
|
-
"percher",
|
|
117498
|
-
"mcp",
|
|
117499
|
-
"preview",
|
|
117500
|
-
"metrics",
|
|
117501
|
-
"login",
|
|
117502
|
-
"signin",
|
|
117503
|
-
"signup",
|
|
117504
|
-
"register",
|
|
117505
|
-
"account",
|
|
117506
|
-
"paypal",
|
|
117507
|
-
"stripe",
|
|
117508
|
-
"bank",
|
|
117509
|
-
"apple",
|
|
117510
|
-
"microsoft",
|
|
117511
|
-
"google",
|
|
117512
|
-
"amazon",
|
|
117513
|
-
"facebook",
|
|
117514
|
-
"meta",
|
|
117515
|
-
"instagram",
|
|
117516
|
-
"twitter",
|
|
117517
|
-
"tiktok",
|
|
117518
|
-
"netflix",
|
|
117519
|
-
"spotify",
|
|
117520
|
-
"support",
|
|
117521
|
-
"security",
|
|
117522
|
-
"verify",
|
|
117523
|
-
"update",
|
|
117524
|
-
"confirm",
|
|
117525
|
-
"recovery"
|
|
117526
|
-
]);
|
|
117527
117570
|
// src/cli-utils.ts
|
|
117528
117571
|
var import_picocolors = __toESM(require_picocolors(), 1);
|
|
117529
117572
|
|
|
@@ -119599,7 +119642,7 @@ async function renderError(stderr, error48) {
|
|
|
119599
119642
|
// package.json
|
|
119600
119643
|
var package_default = {
|
|
119601
119644
|
name: "percher",
|
|
119602
|
-
version: "0.5.
|
|
119645
|
+
version: "0.5.19",
|
|
119603
119646
|
description: "CLI for the Percher hosting platform — publish apps with one command",
|
|
119604
119647
|
type: "module",
|
|
119605
119648
|
bin: {
|
|
@@ -119624,7 +119667,7 @@ var package_default = {
|
|
|
119624
119667
|
},
|
|
119625
119668
|
dependencies: {
|
|
119626
119669
|
"@percher/client": "^0.2.18",
|
|
119627
|
-
"@percher/core": "^0.4.
|
|
119670
|
+
"@percher/core": "^0.4.22",
|
|
119628
119671
|
"@percher/toml": "^0.1.7",
|
|
119629
119672
|
cac: "^7.0.0",
|
|
119630
119673
|
picocolors: "^1.1.1"
|
package/dist/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "percher",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.19",
|
|
4
4
|
"description": "CLI for the Percher hosting platform — publish apps with one command",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"@percher/client": "^0.2.18",
|
|
28
|
-
"@percher/core": "^0.4.
|
|
28
|
+
"@percher/core": "^0.4.22",
|
|
29
29
|
"@percher/toml": "^0.1.7",
|
|
30
30
|
"cac": "^7.0.0",
|
|
31
31
|
"picocolors": "^1.1.1"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "percher",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.19",
|
|
4
4
|
"description": "CLI for the Percher hosting platform — publish apps with one command",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"@percher/client": "^0.2.18",
|
|
28
|
-
"@percher/core": "^0.4.
|
|
28
|
+
"@percher/core": "^0.4.22",
|
|
29
29
|
"@percher/toml": "^0.1.7",
|
|
30
30
|
"cac": "^7.0.0",
|
|
31
31
|
"picocolors": "^1.1.1"
|