@charlescms/astro 0.2.0 → 0.2.1
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/package.json +1 -1
- package/scripts/setup.js +7 -1
package/package.json
CHANGED
package/scripts/setup.js
CHANGED
|
@@ -321,7 +321,13 @@ function renderGitHubManifestPage({ config, state, redirectUrl }) {
|
|
|
321
321
|
const repoOwner = config.repo.split("/")[0];
|
|
322
322
|
const manifest = {
|
|
323
323
|
name: appName,
|
|
324
|
-
url
|
|
324
|
+
// GitHub validates `url` as ONE homepage URL. config.origin can be a
|
|
325
|
+
// comma-separated allow-list (localhost + the live site), which GitHub rejects
|
|
326
|
+
// with "Url must be a valid URL" — so pick a single valid URL: the public site
|
|
327
|
+
// if given, else the first origin, else localhost.
|
|
328
|
+
url: parseOrigins(config.origin).find((origin) => !isLocalOrigin(origin))
|
|
329
|
+
|| parseOrigins(config.origin)[0]
|
|
330
|
+
|| "http://localhost:4321",
|
|
325
331
|
redirect_url: `${redirectUrl}/callback`,
|
|
326
332
|
callback_urls: [`${redirectUrl}/callback`],
|
|
327
333
|
public: false,
|