feat: remove licensing system and bump version to 4.0.0-cloudhost

- Remove AS3CF_Pro_Licences_Updates instantiation and all $this->licence
  references from the PHP backend; stub methods return safe defaults
  (is_valid_licence → true, is_licence_over_media_limit → false,
  feature_enabled → true, is_pro_plugin_setup bypasses licence check)
- Remove Licences REST API endpoint from add_api_endpoints()
- Remove 'licence' from allowed settings keys
- Bump version from 3.2.12 to 4.0.0-cloudhost in version.php and plugin header
- Replace licence derived store with hardcoded always-valid writable store
- Simplify enableAssets store to depend only on config.assets_settings
- Remove licence panel row from Nav flyout; remove licence check from
  offload remaining button disabled logic
- Replace Header licence display with "Internal Build" label
- Remove LicencePage route registration from pages.js; drop licence
  import and is_valid guards from all isNextRoute functions
- Rebuild compiled Svelte bundle

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-03 12:57:35 +01:00
parent 3248cbb029
commit dec5ad7f2d
9 changed files with 1275 additions and 2884 deletions

View File

@@ -2,9 +2,8 @@ import {derived, get, writable} from "svelte/store";
import {api, config, state} from "../js/stores";
import {objectsDiffer} from "../js/objectsDiffer";
// Convenience readable store of licence, derived from config.
// We currently have one licence applied to a plugin install.
export const licence = derived( config, $config => $config.hasOwnProperty( "licences" ) ? $config.licences.at( 0 ) : [] );
// Hardcoded always-valid licence for internal build (licensing removed).
export const licence = writable( { is_set: true, is_valid: true, plan_plus_licence: 'Internal Build', customer: '', plan_usage: '', limit_info: { counts_toward_limit: false, total: 0, limit: 0 } } );
// Convenience readable store of offload remaining with count message, derived from config.
export const offloadRemainingWithCount = derived( config, $config => $config.offload_remaining_with_count );
@@ -162,20 +161,8 @@ export const assetsDefinedSettings = derived( config, $config => $config.assets_
// Convenience readable store of assets domain check info, derived from config.
export const assetsDomainCheck = derived( config, $config => $config.assets_domain_check );
// Convenience readable store indicating whether Assets functionality may be used.
export const enableAssets = derived( [licence, config], ( [$licence, $config] ) => {
if (
$licence.hasOwnProperty( "is_set" ) &&
$licence.is_set &&
$licence.hasOwnProperty( "is_valid" ) &&
$licence.is_valid &&
$config.hasOwnProperty( "assets_settings" )
) {
return true;
}
return false;
} );
// Assets functionality always enabled in internal build.
export const enableAssets = derived( config, $config => $config.hasOwnProperty( "assets_settings" ) );
/**
* Creates store of assets settings.