Switch app init template to hosted app when HOSTED_APPS env var is set#7096
Conversation
|
We detected some changes at Caution DO NOT create changesets for features which you do not wish to be included in the public changelog of the next CLI release. |
This stack of pull requests is managed by Graphite. Learn more about stacking. |
Coverage report
Test suite run success3932 tests passing in 1514 suites. Report generated by 🧪jest coverage report action from 6d80d2c |
e53b299 to
65a9531
Compare
8c59c1a to
18a32e8
Compare
18a32e8 to
c886a2a
Compare
c886a2a to
9e4f684
Compare
9e4f684 to
6d80d2c
Compare
6d80d2c to
c5fbc4f
Compare
When HOSTED_APPS=1, the "Build an extension-only app" option in shopify app init is replaced with a hosted app label and points to the shopify-app-template-extension-only repo. Adds isHostedAppsMode() helper to @shopify/cli-kit/node/context/local following the same pattern as isVerbose, isDevelopment, etc. Co-authored-by: Richard Powell <byrichardpowell@users.noreply.github.com> Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
c5fbc4f to
ceb1843
Compare
Differences in type declarationsWe detected differences in the type declarations generated by Typescript for this branch compared to the baseline ('main' branch). Please, review them to ensure they are backward-compatible. Here are some important things to keep in mind:
New type declarationsWe found no new type declarations in this PR Existing type declarationspackages/cli-kit/dist/private/node/constants.d.ts@@ -34,6 +34,7 @@ export declare const environmentVariables: {
skipNetworkLevelRetry: string;
maxRequestTimeForNetworkCalls: string;
disableImportScanning: string;
+ hostedApps: string;
};
export declare const defaultThemeKitAccessDomain = "theme-kit-access.shopifyapps.com";
export declare const systemEnvironmentVariables: {
packages/cli-kit/dist/public/node/context/local.d.ts@@ -25,6 +25,13 @@ export declare function isDevelopment(env?: NodeJS.ProcessEnv): boolean;
* @returns True if SHOPIFY_FLAG_VERBOSE is truthy or the flag --verbose has been passed.
*/
export declare function isVerbose(env?: NodeJS.ProcessEnv): boolean;
+/**
+ * Returns true if the hosted apps mode is enabled.
+ *
+ * @param env - The environment variables from the environment of the current process.
+ * @returns True if HOSTED_APPS is truthy.
+ */
+export declare function isHostedAppsMode(env?: NodeJS.ProcessEnv): boolean;
/**
* Returns true if the environment in which the CLI is running is either
* a local environment (where dev is present).
|
The new shopify-app-template-extension-only template was previously gated behind the HOSTED_APPS env var (PR #7096). This removes the env var entirely and makes the hosted app template the default for the "none" (extension-only) option in `shopify app init`. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This reverts all changes from the hosted app project (Admin Extensibility → 'hosted app' sub-project). The hosted app project is being discontinued. This PR removes: - The admin extension specification (static_root, allowed_domains) - The HOSTED_APPS environment variable and template switching - Web build execution during deploy - Template application_url preservation during app creation - Admin-specific dev server asset serving What's preserved: - Asset upload infrastructure (include_assets client step) - used by other extension types - admin_link specification - separate extension type for admin links with intents - Client steps system - general build pipeline infrastructure - devSessionWatchConfig - general watch path infrastructure Reverted PRs: - #7027 - Add admin hosted app local spec - #7096 - Switch app init template to hosted app when HOSTED_APPS env var is set - #7208 - Run web build commands during deploy for hosted apps - #7225 - Preserve template application_url during app creation - #7227 - notify extension dev server of app assets updates (admin parts only) - #7312 - Default allowed_domains to empty array when not configured
This reverts all changes from the hosted app project (Admin Extensibility → 'hosted app' sub-project). The hosted app project is being discontinued. This PR removes: - The admin extension specification (static_root, allowed_domains) - The HOSTED_APPS environment variable and template switching - Web build execution during deploy - Template application_url preservation during app creation - Admin-specific dev server asset serving What's preserved: - Asset upload infrastructure (include_assets client step) - used by other extension types - admin_link specification - separate extension type for admin links with intents - Client steps system - general build pipeline infrastructure - devSessionWatchConfig - general watch path infrastructure Reverted PRs: - #7027 - Add admin hosted app local spec - #7096 - Switch app init template to hosted app when HOSTED_APPS env var is set - #7208 - Run web build commands during deploy for hosted apps - #7225 - Preserve template application_url during app creation - #7227 - notify extension dev server of app assets updates (admin parts only) - #7312 - Default allowed_domains to empty array when not configured
This reverts all changes from the hosted app project (Admin Extensibility → 'hosted app' sub-project). The hosted app project is being discontinued. This PR removes: - The admin extension specification (static_root, allowed_domains) - The HOSTED_APPS environment variable and template switching - Web build execution during deploy - Template application_url preservation during app creation - Admin-specific dev server asset serving What's preserved: - Asset upload infrastructure (include_assets client step) - used by other extension types - admin_link specification - separate extension type for admin links with intents - Client steps system - general build pipeline infrastructure - devSessionWatchConfig - general watch path infrastructure Reverted PRs: - #7027 - Add admin hosted app local spec - #7096 - Switch app init template to hosted app when HOSTED_APPS env var is set - #7208 - Run web build commands during deploy for hosted apps - #7225 - Preserve template application_url during app creation - #7227 - notify extension dev server of app assets updates (admin parts only) - #7312 - Default allowed_domains to empty array when not configured
This reverts all changes from the hosted app project (Admin Extensibility → 'hosted app' sub-project). The hosted app project is being discontinued. This PR removes: - The admin extension specification (static_root, allowed_domains) - The HOSTED_APPS environment variable and template switching - Web build execution during deploy - Template application_url preservation during app creation - Admin-specific dev server asset serving What's preserved: - Asset upload infrastructure (include_assets client step) - used by other extension types - admin_link specification - separate extension type for admin links with intents - Client steps system - general build pipeline infrastructure - devSessionWatchConfig - general watch path infrastructure Reverted PRs: - #7027 - Add admin hosted app local spec - #7096 - Switch app init template to hosted app when HOSTED_APPS env var is set - #7208 - Run web build commands during deploy for hosted apps - #7225 - Preserve template application_url during app creation - #7227 - notify extension dev server of app assets updates (admin parts only) - #7312 - Default allowed_domains to empty array when not configured
This reverts all changes from the hosted app project (Admin Extensibility → 'hosted app' sub-project). The hosted app project is being discontinued. This PR removes: - The admin extension specification (static_root, allowed_domains) - The HOSTED_APPS environment variable and template switching - Web build execution during deploy - Template application_url preservation during app creation - Admin-specific dev server asset serving What's preserved: - Asset upload infrastructure (include_assets client step) - used by other extension types - admin_link specification - separate extension type for admin links with intents - Client steps system - general build pipeline infrastructure - devSessionWatchConfig - general watch path infrastructure Reverted PRs: - #7027 - Add admin hosted app local spec - #7096 - Switch app init template to hosted app when HOSTED_APPS env var is set - #7208 - Run web build commands during deploy for hosted apps - #7225 - Preserve template application_url during app creation - #7227 - notify extension dev server of app assets updates (admin parts only) - #7312 - Default allowed_domains to empty array when not configured
This reverts all changes from the hosted app project (Admin Extensibility → 'hosted app' sub-project). The hosted app project is being discontinued. This PR removes: - The admin extension specification (static_root, allowed_domains) - The HOSTED_APPS environment variable and template switching - Web build execution during deploy - Template application_url preservation during app creation - Admin-specific dev server asset serving What's preserved: - Asset upload infrastructure (include_assets client step) - used by other extension types - admin_link specification - separate extension type for admin links with intents - Client steps system - general build pipeline infrastructure - devSessionWatchConfig - general watch path infrastructure Reverted PRs: - #7027 - Add admin hosted app local spec - #7096 - Switch app init template to hosted app when HOSTED_APPS env var is set - #7208 - Run web build commands during deploy for hosted apps - #7225 - Preserve template application_url during app creation - #7227 - notify extension dev server of app assets updates (admin parts only) - #7312 - Default allowed_domains to empty array when not configured
This reverts all changes from the hosted app project (Admin Extensibility → 'hosted app' sub-project). The hosted app project is being discontinued. This PR removes: - The admin extension specification (static_root, allowed_domains) - The HOSTED_APPS environment variable and template switching - Web build execution during deploy - Template application_url preservation during app creation - Admin-specific dev server asset serving What's preserved: - Asset upload infrastructure (include_assets client step) - used by other extension types - admin_link specification - separate extension type for admin links with intents - Client steps system - general build pipeline infrastructure - devSessionWatchConfig - general watch path infrastructure Reverted PRs: - #7027 - Add admin hosted app local spec - #7096 - Switch app init template to hosted app when HOSTED_APPS env var is set - #7208 - Run web build commands during deploy for hosted apps - #7225 - Preserve template application_url during app creation - #7227 - notify extension dev server of app assets updates (admin parts only) - #7312 - Default allowed_domains to empty array when not configured
This reverts most changes from the hosted app project (Admin Extensibility → "hosted app" sub-project). The hosted app project is being discontinued. This PR removes: - The `admin` extension specification (`admin.ts` with `static_root`, `allowed_domains`) - Web build execution during deploy - Template `application_url`/`redirect_urls` preservation during app creation - Admin-specific dev server asset serving (`getAppAssets`, `allowedDomains` in payload) What is preserved: - `HOSTED_APPS` environment variable and `isHostedAppsMode()` function - `buildNoneTemplate()` with conditional template selection (uses extension-only template when `HOSTED_APPS=1`) - Asset upload infrastructure (`include_assets` client step) - used by other extension types - `admin_link` specification - separate extension type for admin links with intents - `assetResolvers` in dev server store - per-extension URL→path mapping - Client steps system - general build pipeline infrastructure Reverted PRs: - #7027 - Add admin hosted app local spec - #7096 - Switch app init template (partially - kept template switching, removed other hosted app setup) - #7208 - Run web build commands during deploy for hosted apps - #7225 - Preserve template application_url during app creation - #7227 - Notify extension dev server of app assets updates (admin parts only) - #7312 - Default allowed_domains to empty array when not configured
The new shopify-app-template-extension-only template was previously gated behind the HOSTED_APPS env var (PR #7096). This removes the env var entirely and makes the hosted app template the default for the "none" (extension-only) option in `shopify app init`. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The new shopify-app-template-extension-only template was previously gated behind the HOSTED_APPS env var (PR #7096). This removes the env var entirely and makes the hosted app template the default for the "none" (extension-only) option in `shopify app init`. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The new shopify-app-template-extension-only template was previously gated behind the HOSTED_APPS env var (PR #7096). This removes the env var entirely and makes the hosted app template the default for the "none" (extension-only) option in `shopify app init`. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

🚨 NOTE: do not merge before the repository https://github.com/Shopify/shopify-app-template-extension-only is available 🚨
WHY are these changes introduced?
When
HOSTED_APPS=1is set,shopify app initshould present a hosted app template option instead of the standard extension-only template.This is an internal-only flag (not user-facing) that allows the team to demo and test the hosted app experience end-to-end before it's generally available.
WHAT is this pull request doing?
HOSTED_APPS=1, the"Build an extension-only app"option inshopify app initis replaced with"Build an extension-only app (Shopify-hosted Preact app home and extensions, no back-end)"and points to the newshopify-app-template-extension-onlyrepohostedApps: 'HOSTED_APPS'to the cli-kitenvironmentVariablesconstantsisHostedAppsMode()helper to@shopify/cli-kit/node/context/local, following the same pattern asisVerbose,isDevelopment, etc.How to test your changes?
The second option should read
Build an extension-only app (Shopify-hosted Preact app home and extensions, no back-end)and scaffold fromshopify-app-template-extension-only.Without the env var, the prompt is unchanged.
Measuring impact
Checklist