@stacksjs/buddy 0.75.38 → 0.75.41
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/commerce-import.d.ts +48 -0
- package/dist/commands/commerce-import.js +2 -0
- package/dist/commands/deploy-ssh-target.d.ts +1 -1
- package/dist/commands/desktop-apple.d.ts +70 -0
- package/dist/commands/desktop-apple.js +7 -5
- package/dist/commands/desktop-probe.d.ts +27 -0
- package/dist/commands/desktop-probe.js +2 -0
- package/dist/commands/docs/capabilities.d.ts +7 -0
- package/dist/commands/docs/capabilities.js +2 -2
- package/dist/commands/index.d.ts +1 -0
- package/dist/commands/index.js +1 -1
- package/dist/lazy-commands.js +1 -1
- package/dist/mail-dns-health.d.ts +1 -1
- package/package.json +57 -56
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import type { catalogImport } from '@stacksjs/commerce';
|
|
2
|
+
import type { CLI } from '@stacksjs/types';
|
|
3
|
+
/**
|
|
4
|
+
* Validate the flags, or throw with the message the operator should see.
|
|
5
|
+
*
|
|
6
|
+
* `env` is read for `SHOPWARE_ACCESS_KEY` only, and only for `--from shopware`.
|
|
7
|
+
*/
|
|
8
|
+
export declare function parseImportFlags(flags: CommerceImportFlags, env?: Record<string, string | undefined>): CommerceImportSettings;
|
|
9
|
+
/** One line per product, as the import runs. */
|
|
10
|
+
export declare function formatImportedProduct(product: ImportedProduct, format: (minor: number, currency: string | null) => string, dryRun?: boolean): string;
|
|
11
|
+
/** The closing summary, one fact per line. */
|
|
12
|
+
export declare function formatImportSummary(result: ImportResult): string[];
|
|
13
|
+
/** Why the operator should look twice at the currency, or null if it is fine. */
|
|
14
|
+
export declare function currencyMismatch(result: ImportResult, configured: string | undefined): string | null;
|
|
15
|
+
export declare function commerceImport(buddy: CLI): void;
|
|
16
|
+
export declare const SUPPORTED_SOURCES: readonly ['shopify', 'woocommerce', 'shopware'];
|
|
17
|
+
/** Where to find a Shopware sales channel access key, for the error that asks for one. */
|
|
18
|
+
export declare const SHOPWARE_ACCESS_KEY_HELP: 'It is public by design, not a secret. Find it in the Shopware Administration under Sales Channels: open the storefront or headless sales channel and copy the key from its "API access" card.';
|
|
19
|
+
export declare const OUT_OF_SCOPE_NOTE: 'Catalog only. Customers and orders are not imported: they need the Shopify Admin API, WooCommerce REST API keys or a Shopware Admin API integration.';
|
|
20
|
+
export declare interface CommerceImportFlags {
|
|
21
|
+
from?: string
|
|
22
|
+
limit?: string | number
|
|
23
|
+
currency?: string
|
|
24
|
+
accessKey?: string
|
|
25
|
+
dryRun?: boolean
|
|
26
|
+
}
|
|
27
|
+
export declare interface CommerceImportSettings {
|
|
28
|
+
source: typeof SUPPORTED_SOURCES[number]
|
|
29
|
+
limit?: number
|
|
30
|
+
currency?: string
|
|
31
|
+
accessKey?: string
|
|
32
|
+
dryRun: boolean
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* `buddy commerce:import <store-url> --from shopify|woocommerce|shopware`
|
|
36
|
+
*
|
|
37
|
+
* Moves a store's CATALOG into the built-in commerce tables: products,
|
|
38
|
+
* variants, categories, brands and image URLs (stacksjs/stacks#1319, #1320,
|
|
39
|
+
* #1321). It reads only each platform's public storefront API, so it needs no
|
|
40
|
+
* credentials (Shopware's Store API asks for the sales channel access key,
|
|
41
|
+
* which is public by design), and for the same reason it cannot see customers
|
|
42
|
+
* or orders. Those need the platform's admin API and are not imported.
|
|
43
|
+
*
|
|
44
|
+
* Re-running is safe: rows are matched on a UUID derived from the source
|
|
45
|
+
* product id, so a second run updates what the first one wrote.
|
|
46
|
+
*/
|
|
47
|
+
declare type ImportResult = catalogImport.ImportResult;
|
|
48
|
+
declare type ImportedProduct = catalogImport.ImportedProduct;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import process from"node:process";import{log}from"@stacksjs/cli";import{ExitCode}from"@stacksjs/types";export const SUPPORTED_SOURCES=["shopify","woocommerce","shopware"],SHOPWARE_ACCESS_KEY_HELP='It is public by design, not a secret. Find it in the Shopware Administration under Sales Channels: open the storefront or headless sales channel and copy the key from its "API access" card.';export function parseImportFlags(flags,env=process.env){const source=String(flags.from??"").trim().toLowerCase();if(!source)throw Error(`Say where the catalog comes from: --from ${SUPPORTED_SOURCES.join(" or --from ")}.`);if(!SUPPORTED_SOURCES.includes(source))throw Error(`--from must be one of ${SUPPORTED_SOURCES.join(", ")}; got "${flags.from}".`);let limit;if(flags.limit!==void 0&&flags.limit!==""){limit=Number(flags.limit);if(!Number.isInteger(limit)||limit<=0)throw Error(`--limit must be a whole number above 0; got "${flags.limit}".`)}let currency;if(flags.currency!==void 0&&flags.currency!==""){currency=String(flags.currency).trim().toUpperCase();if(!/^[A-Z]{3}$/.test(currency))throw Error(`--currency must be a three-letter ISO 4217 code such as USD; got "${flags.currency}".`)}const flagKey=flags.accessKey===void 0?"":String(flags.accessKey).trim();let accessKey;if(source==="shopware"){accessKey=flagKey||env.SHOPWARE_ACCESS_KEY?.trim()||void 0;if(!accessKey)throw Error(`Shopware's Store API needs the sales channel access key: pass --access-key <key> or set SHOPWARE_ACCESS_KEY. ${SHOPWARE_ACCESS_KEY_HELP}`);if(/\s/.test(accessKey))throw Error("--access-key must be a single key with no spaces.");if(/^SW(?:IA|UA)/i.test(accessKey))throw Error(`That looks like an Admin API key (it starts with ${accessKey.slice(0,4).toUpperCase()}), not a sales channel access key (SWSC...). ${SHOPWARE_ACCESS_KEY_HELP}`)}else if(flagKey)throw Error(`--access-key only applies to --from shopware; ${source} needs no key.`);return{source,limit,currency,...accessKey?{accessKey}:{},dryRun:flags.dryRun===!0}}function money(minor,currency,format){return minor===null?"unpriced":format(minor,currency)}export function formatImportedProduct(product,format,dryRun=!1){const verb=product.action==="create"?dryRun?"would create":"created":dryRun?"would update":"updated",variantCount=product.variants.create+product.variants.update,details=[money(product.priceMinor,product.currency,format),variantCount>0?`${variantCount} variant${variantCount===1?"":"s"}`:null,product.category?`in ${product.category}`:null,product.vendor?`by ${product.vendor}`:null,product.imageCount===0?"no image":null].filter(Boolean).join(", ");return` ${verb.padEnd(12)} ${product.name} (${product.handle}) ${details}`}export function formatImportSummary(result){const{counts}=result,would=result.dryRun?"would be ":"";return[`Products: ${counts.products.created} ${would}created, ${counts.products.updated} ${would}updated`,`Variants: ${counts.variants.created} ${would}created, ${counts.variants.updated} ${would}updated`,`Categories: ${counts.categories.created} ${would}created. Manufacturers: ${counts.manufacturers.created} ${would}created`,...counts.duplicates>0?[`Duplicates skipped: ${counts.duplicates}`]:[],`Currency: ${result.currencies.length>0?result.currencies.join(", "):"not reported by the store"}`]}export function currencyMismatch(result,configured){if(!configured||result.currencies.length===0)return null;const other=result.currencies.filter((code)=>code!==configured.toUpperCase());if(other.length===0)return null;return`Prices were imported in ${other.join(", ")} minor units, but config/commerce.ts sets currency to ${configured}. products.price has no currency column, so set commerce.currency to match.`}export const OUT_OF_SCOPE_NOTE="Catalog only. Customers and orders are not imported: they need the Shopify Admin API, WooCommerce REST API keys or a Shopware Admin API integration.";async function fail(message){await log.error(message);await log.flush();process.exit(ExitCode.FatalError)}export function commerceImport(buddy){buddy.command("commerce:import <url>","Import a Shopify, WooCommerce or Shopware 6 catalog (products, variants, categories, brands, image URLs)").option("--from <platform>",`Where the catalog comes from: ${SUPPORTED_SOURCES.join(", ")}`).option("--access-key <key>","Shopware only: the sales channel access key (public, from Sales Channels > API access), or set SHOPWARE_ACCESS_KEY").option("--limit <count>","Import at most this many products").option("--currency <code>","ISO 4217 currency, for a store that does not report one (Shopify /meta.json, Shopware /store-api/context)").option("--dry-run","Show what would be created or updated without writing anything",{default:!1}).example("buddy commerce:import https://shop.example.com --from shopify --dry-run").example("buddy commerce:import example.com/shop --from woocommerce --limit 50").example("buddy commerce:import https://shop.example.de --from shopware --access-key SWSC... --dry-run").action(async(url,options)=>{let settings;try{settings=parseImportFlags(options)}catch(error){return fail(error.message)}const{catalogImport}=await import("@stacksjs/commerce"),adapter=catalogImport.catalogAdapter(settings.source);let storeUrl;try{storeUrl=catalogImport.normalizeStoreUrl(url)}catch(error){return fail(error.message)}let repository=catalogImport.createDatabaseRepository();if(settings.dryRun)try{await repository.findProducts(["00000000-0000-0000-0000-000000000000"]);repository=catalogImport.createReadOnlyRepository(repository)}catch(error){log.warn(`No database to compare against (${error.message}). Every product is reported as new.`);repository=catalogImport.createMemoryRepository()}log.info(`${settings.dryRun?"Dry run: reading":"Importing"} the ${settings.source} catalog at ${storeUrl}`);let result;try{result=await catalogImport.importCatalog({adapter,storeUrl,repository,dryRun:settings.dryRun,limit:settings.limit,currency:settings.currency,accessKey:settings.accessKey,onProduct:(product)=>process.stdout.write(`${formatImportedProduct(product,catalogImport.formatMinor,settings.dryRun)}
|
|
2
|
+
`)})}catch(error){return fail(`Import stopped: ${error.message}${settings.dryRun?"":" Products written before this point are kept; re-running resumes safely."}`)}if(result.products.length===0)log.info(`${storeUrl} has no products to import.`);for(const warning of result.warnings)log.warn(warning.externalId?`${warning.externalId}: ${warning.message}`:warning.message);for(const line of formatImportSummary(result))log.info(line);try{const{config}=await import("@stacksjs/config"),mismatch=currencyMismatch(result,config.commerce?.currency);if(mismatch)log.warn(mismatch)}catch{}log.info(OUT_OF_SCOPE_NOTE);if(settings.dryRun)log.info("Dry run complete. Nothing was written.");else log.success(`Imported ${result.products.length} product${result.products.length===1?"":"s"} from ${storeUrl}`);await log.flush();process.exit(ExitCode.Success)})}
|
|
@@ -50,7 +50,7 @@ export declare function isPrivateHost(host: string): boolean;
|
|
|
50
50
|
export declare function dnsPublishingAllowed(input: {
|
|
51
51
|
provider: string
|
|
52
52
|
publicIp?: string
|
|
53
|
-
|
|
53
|
+
|
|
54
54
|
sites?: Record<string, { domain?: string | string[] } | null | undefined>
|
|
55
55
|
env?: NodeJS.ProcessEnv
|
|
56
56
|
}): boolean;
|
|
@@ -47,6 +47,39 @@ export declare function renderAppleWorkflowCaller(): string;
|
|
|
47
47
|
* entitlements, which is why they cannot share one invocation.
|
|
48
48
|
*/
|
|
49
49
|
export declare function signingPlan(input: SigningPlanInput): string[][];
|
|
50
|
+
/** The architectures `lipo -archs` printed, sorted so they compare as a set. */
|
|
51
|
+
export declare function parseLipoArchs(output: string): string[];
|
|
52
|
+
/**
|
|
53
|
+
* Merge a thin arm64 and a thin x86_64 Mach-O into one universal binary, and
|
|
54
|
+
* prove the result holds both (stacksjs/stacks#2199).
|
|
55
|
+
*
|
|
56
|
+
* Each input is checked first. `lipo -create` given two slices of the same
|
|
57
|
+
* architecture fails with "have the same architectures", and given a slice that
|
|
58
|
+
* is already universal it fails the same way - both read as a lipo problem
|
|
59
|
+
* when the real mistake is which file was passed, so the check names the file
|
|
60
|
+
* and what it actually contains.
|
|
61
|
+
*
|
|
62
|
+
* The output is checked last because nothing else would notice a wrong one:
|
|
63
|
+
* the app launches fine on the build machine whichever slice it carries, and
|
|
64
|
+
* the missing architecture only shows up on the other kind of Mac.
|
|
65
|
+
*/
|
|
66
|
+
export declare function mergeUniversalBinary(input: UniversalBinaryInput, run?: CommandRunner): string[];
|
|
67
|
+
/**
|
|
68
|
+
* The two executables a Mac App Store bundle carries, as universal binaries.
|
|
69
|
+
*
|
|
70
|
+
* `build:desktop` emits the build machine's architecture only. The launcher can
|
|
71
|
+
* be cross-compiled - Bun builds any darwin target from any host - so both of
|
|
72
|
+
* its slices come from the same source in one run. Craft cannot be built that
|
|
73
|
+
* way from here, so its slices are inputs: Craft's own releases publish one per
|
|
74
|
+
* architecture, and the reusable workflow cross-compiles the second from the
|
|
75
|
+
* same pinned revision.
|
|
76
|
+
*/
|
|
77
|
+
export declare function buildUniversalPayload(input: UniversalPayloadInput, run?: CommandRunner): UniversalPayload;
|
|
78
|
+
/**
|
|
79
|
+
* The launcher compile command for one darwin architecture: the same arguments
|
|
80
|
+
* `build:desktop` uses, plus the cross-compilation target.
|
|
81
|
+
*/
|
|
82
|
+
export declare function launcherSliceCompileArgs(base: string[], architecture: DarwinArchitecture): string[];
|
|
50
83
|
/**
|
|
51
84
|
* What a failure prints, as a value.
|
|
52
85
|
*
|
|
@@ -57,6 +90,12 @@ export declare function signingPlan(input: SigningPlanInput): string[][];
|
|
|
57
90
|
*/
|
|
58
91
|
export declare function renderFailure(error: unknown): string;
|
|
59
92
|
export declare function desktopApple(buddy: CLI): void;
|
|
93
|
+
export declare const captureCommand: CommandRunner;
|
|
94
|
+
/**
|
|
95
|
+
* Node's architecture names, as Mach-O and `lipo` spell them.
|
|
96
|
+
* @defaultValue `{ arm64: 'arm64', x64: 'x86_64' }`
|
|
97
|
+
*/
|
|
98
|
+
export declare const MACH_O_ARCHITECTURE: Record<DarwinArchitecture, string>;
|
|
60
99
|
declare interface AppleDesktopOptions {
|
|
61
100
|
appName?: string
|
|
62
101
|
bundleId?: string
|
|
@@ -83,6 +122,9 @@ declare interface AppleDesktopOptions {
|
|
|
83
122
|
profileName?: string
|
|
84
123
|
output?: string
|
|
85
124
|
commonName?: string
|
|
125
|
+
universal?: boolean
|
|
126
|
+
craftArm64?: string
|
|
127
|
+
craftX64?: string
|
|
86
128
|
}
|
|
87
129
|
export declare interface AppleDesktopConfig {
|
|
88
130
|
appName: string
|
|
@@ -99,6 +141,9 @@ export declare interface AppleDesktopConfig {
|
|
|
99
141
|
apiIssuerId: string
|
|
100
142
|
apiKeyPath: string
|
|
101
143
|
icon?: string
|
|
144
|
+
universal?: boolean
|
|
145
|
+
craftArm64?: string
|
|
146
|
+
craftX64?: string
|
|
102
147
|
}
|
|
103
148
|
/** What {@link signingPlan} needs to know; paths are absolute. */
|
|
104
149
|
export declare interface SigningPlanInput {
|
|
@@ -108,3 +153,28 @@ export declare interface SigningPlanInput {
|
|
|
108
153
|
appEntitlements: string
|
|
109
154
|
helperEntitlements: string
|
|
110
155
|
}
|
|
156
|
+
export declare interface UniversalBinaryInput {
|
|
157
|
+
name: string
|
|
158
|
+
arm64: string
|
|
159
|
+
x64: string
|
|
160
|
+
output: string
|
|
161
|
+
}
|
|
162
|
+
export declare interface UniversalPayloadInput {
|
|
163
|
+
directory: string
|
|
164
|
+
launcherCompileArgs: (architecture: DarwinArchitecture, outfile: string) => string[]
|
|
165
|
+
craft: Record<DarwinArchitecture, string>
|
|
166
|
+
}
|
|
167
|
+
export declare interface UniversalPayload {
|
|
168
|
+
launcher: string
|
|
169
|
+
runtime: string
|
|
170
|
+
architectures: string[]
|
|
171
|
+
}
|
|
172
|
+
/**
|
|
173
|
+
* Runs one process and returns its stdout, throwing on a non-zero exit.
|
|
174
|
+
*
|
|
175
|
+
* Injected wherever the packager's decisions depend on what a tool reports, so
|
|
176
|
+
* a test can drive the whole sequence without `lipo`, `bun build` or anything
|
|
177
|
+
* Apple installed - and assert the order the commands ran in.
|
|
178
|
+
*/
|
|
179
|
+
export type CommandRunner = (args: string[]) => string;
|
|
180
|
+
export type DarwinArchitecture = 'arm64' | 'x64';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{createHash}from"node:crypto";import{chmodSync,copyFileSync,existsSync,mkdirSync,readdirSync,readFileSync,rmSync,writeFileSync}from"node:fs";import{basename,join,resolve}from"node:path";import process from"node:process";import{log}from"@stacksjs/cli";import{projectPath,storagePath}from"@stacksjs/path";import{resultFailed}from"../result";const REQUIRED_TOOLS=["codesign","security","productbuild","pkgutil","xcrun"];function env(name){return process.env[name]?.trim()||""}function xml(value){return value.replaceAll("&","&").replaceAll("<","<").replaceAll(">",">").replaceAll('"',""").replaceAll("'","'")}function packageMetadata(){const packageJson=JSON.parse(readFileSync(projectPath("package.json"),"utf8"));return{name:packageJson.name||"Stacks",version:packageJson.version||"0.1.0"}}export function resolveAppleDesktopConfig(options={}){const metadata=packageMetadata(),provisioningProfile=options.provisioningProfile||env("APPLE_PROVISIONING_PROFILE"),apiKeyPath=options.apiKeyPath||env("APP_STORE_CONNECT_API_KEY_PATH");return{appName:options.appName||env("APPLE_APP_NAME")||env("APP_NAME")||metadata.name,bundleId:options.bundleId||env("APPLE_BUNDLE_ID"),teamId:options.teamId||env("APPLE_TEAM_ID"),version:options.appVersion||env("APPLE_APP_VERSION")||metadata.version,buildNumber:options.buildNumber||env("APPLE_BUILD_NUMBER")||env("GITHUB_RUN_NUMBER")||String(Math.floor(Date.now()/1000)),minimumMacos:options.minimumMacos||env("APPLE_MINIMUM_MACOS")||"13.0",category:options.category||env("APPLE_APP_CATEGORY")||"public.app-category.productivity",appSigningIdentity:options.appSigningIdentity||env("APPLE_APP_SIGNING_IDENTITY"),installerSigningIdentity:options.installerSigningIdentity||env("APPLE_INSTALLER_SIGNING_IDENTITY"),provisioningProfile:provisioningProfile?resolve(provisioningProfile):"",apiKeyId:options.apiKeyId||env("APP_STORE_CONNECT_API_KEY_ID"),apiIssuerId:options.apiIssuerId||env("APP_STORE_CONNECT_API_ISSUER_ID"),apiKeyPath:apiKeyPath?resolve(apiKeyPath):"",icon:options.icon||env("APPLE_APP_ICON")||void 0}}export function validateAppleDesktopConfig(config,includeApi=!0){const errors=[];if(process.platform!=="darwin")errors.push("Mac App Store packaging must run on macOS");if(!config.appName)errors.push("APPLE_APP_NAME or --app-name is required");if(!/^[A-Za-z0-9][A-Za-z0-9.-]+$/.test(config.bundleId))errors.push("APPLE_BUNDLE_ID must be a reverse-DNS bundle identifier");if(!/^[A-Z0-9]{10}$/.test(config.teamId))errors.push("APPLE_TEAM_ID must be the 10-character Apple Developer team ID");if(!/^\d+(?:\.\d+){0,2}$/.test(config.version))errors.push("The marketing version must contain one to three numeric components");if(!/^[A-Za-z0-9.-]+$/.test(config.buildNumber))errors.push("The build number must contain only letters, numbers, periods, and hyphens");if(!config.appSigningIdentity)errors.push("APPLE_APP_SIGNING_IDENTITY is required");if(!config.installerSigningIdentity)errors.push("APPLE_INSTALLER_SIGNING_IDENTITY is required");if(!config.provisioningProfile||!existsSync(config.provisioningProfile))errors.push("APPLE_PROVISIONING_PROFILE must point to an existing .provisionprofile file");if(config.icon&&!existsSync(resolve(config.icon)))errors.push(`Apple app icon does not exist: ${config.icon}`);if(!/^\d+(?:\.\d+){0,2}$/.test(config.minimumMacos))errors.push("APPLE_MINIMUM_MACOS must be a macOS version such as 13.0");if(!isAppleCategory(config.category))errors.push("APPLE_APP_CATEGORY must be an Apple LSApplicationCategoryType such as public.app-category.productivity");if(includeApi){if(!config.apiKeyId)errors.push("APP_STORE_CONNECT_API_KEY_ID is required");if(!config.apiIssuerId)errors.push("APP_STORE_CONNECT_API_ISSUER_ID is required");if(!config.apiKeyPath||!existsSync(config.apiKeyPath))errors.push("APP_STORE_CONNECT_API_KEY_PATH must point to an existing .p8 file")}for(const tool of REQUIRED_TOOLS)if(!Bun.which(tool))errors.push(`Required Apple command is unavailable: ${tool}`);return errors}function bundleFiles(appPath){const walk=(dir,prefix)=>readdirSync(dir,{withFileTypes:!0}).flatMap((entry)=>{const relative=prefix?`${prefix}/${entry.name}`:entry.name;return entry.isDirectory()?walk(join(dir,entry.name),relative):[relative]});return walk(appPath,"")}export function isAppleCategory(value){return/^public\.app-category\.[a-z][a-z0-9-]*$/.test(value)}export function storeRejectionFindings(paths,executable="stacks-desktop"){const findings=[],has=(path)=>paths.includes(path);for(const required of["Contents/Info.plist",`Contents/MacOS/${executable}`,"Contents/embedded.provisionprofile"])if(!has(required))findings.push(`missing required bundle file: ${required}`);for(const path of paths){const base=path.split("/").pop()??"";if(base===".DS_Store"||path.startsWith("__MACOSX/")||base.startsWith("._"))findings.push(`forbidden file in the bundle: ${path}`);if(/\.(?:dylib|so|framework|app|xpc)$/.test(path)){if(!(path.startsWith("Contents/Frameworks/")||path.startsWith("Contents/MacOS/")||path.startsWith("Contents/XPCServices/")||path.startsWith("Contents/PlugIns/")))findings.push(`nested code outside a signed location: ${path}`)}if(path.startsWith("Contents/Resources/")&&/\.(?:sh|command|dylib|so)$/.test(path))findings.push(`executable content under Resources: ${path}`)}return findings}export function renderInfoPlist(config,executable="stacks-desktop"){const iconEntry=config.icon?`
|
|
1
|
+
import{createHash}from"node:crypto";import{chmodSync,copyFileSync,existsSync,mkdirSync,readdirSync,readFileSync,rmSync,writeFileSync}from"node:fs";import{basename,join,resolve}from"node:path";import process from"node:process";import{log}from"@stacksjs/cli";import{projectPath,storagePath}from"@stacksjs/path";import{resultFailed}from"../result";const REQUIRED_TOOLS=["codesign","security","productbuild","pkgutil","xcrun"];function env(name){return process.env[name]?.trim()||""}function xml(value){return value.replaceAll("&","&").replaceAll("<","<").replaceAll(">",">").replaceAll('"',""").replaceAll("'","'")}function packageMetadata(){const packageJson=JSON.parse(readFileSync(projectPath("package.json"),"utf8"));return{name:packageJson.name||"Stacks",version:packageJson.version||"0.1.0"}}export function resolveAppleDesktopConfig(options={}){const metadata=packageMetadata(),provisioningProfile=options.provisioningProfile||env("APPLE_PROVISIONING_PROFILE"),apiKeyPath=options.apiKeyPath||env("APP_STORE_CONNECT_API_KEY_PATH"),craftArm64=options.craftArm64||env("CRAFT_BIN_ARM64"),craftX64=options.craftX64||env("CRAFT_BIN_X64");return{appName:options.appName||env("APPLE_APP_NAME")||env("APP_NAME")||metadata.name,bundleId:options.bundleId||env("APPLE_BUNDLE_ID"),teamId:options.teamId||env("APPLE_TEAM_ID"),version:options.appVersion||env("APPLE_APP_VERSION")||metadata.version,buildNumber:options.buildNumber||env("APPLE_BUILD_NUMBER")||env("GITHUB_RUN_NUMBER")||String(Math.floor(Date.now()/1000)),minimumMacos:options.minimumMacos||env("APPLE_MINIMUM_MACOS")||"13.0",category:options.category||env("APPLE_APP_CATEGORY")||"public.app-category.productivity",appSigningIdentity:options.appSigningIdentity||env("APPLE_APP_SIGNING_IDENTITY"),installerSigningIdentity:options.installerSigningIdentity||env("APPLE_INSTALLER_SIGNING_IDENTITY"),provisioningProfile:provisioningProfile?resolve(provisioningProfile):"",apiKeyId:options.apiKeyId||env("APP_STORE_CONNECT_API_KEY_ID"),apiIssuerId:options.apiIssuerId||env("APP_STORE_CONNECT_API_ISSUER_ID"),apiKeyPath:apiKeyPath?resolve(apiKeyPath):"",icon:options.icon||env("APPLE_APP_ICON")||void 0,universal:Boolean(options.universal)||env("APPLE_UNIVERSAL")==="true",craftArm64:craftArm64?resolve(craftArm64):void 0,craftX64:craftX64?resolve(craftX64):void 0}}export function validateAppleDesktopConfig(config,includeApi=!0){const errors=[];if(process.platform!=="darwin")errors.push("Mac App Store packaging must run on macOS");if(!config.appName)errors.push("APPLE_APP_NAME or --app-name is required");if(!/^[A-Za-z0-9][A-Za-z0-9.-]+$/.test(config.bundleId))errors.push("APPLE_BUNDLE_ID must be a reverse-DNS bundle identifier");if(!/^[A-Z0-9]{10}$/.test(config.teamId))errors.push("APPLE_TEAM_ID must be the 10-character Apple Developer team ID");if(!/^\d+(?:\.\d+){0,2}$/.test(config.version))errors.push("The marketing version must contain one to three numeric components");if(!/^[A-Za-z0-9.-]+$/.test(config.buildNumber))errors.push("The build number must contain only letters, numbers, periods, and hyphens");if(!config.appSigningIdentity)errors.push("APPLE_APP_SIGNING_IDENTITY is required");if(!config.installerSigningIdentity)errors.push("APPLE_INSTALLER_SIGNING_IDENTITY is required");if(!config.provisioningProfile||!existsSync(config.provisioningProfile))errors.push("APPLE_PROVISIONING_PROFILE must point to an existing .provisionprofile file");if(config.icon&&!existsSync(resolve(config.icon)))errors.push(`Apple app icon does not exist: ${config.icon}`);if(!/^\d+(?:\.\d+){0,2}$/.test(config.minimumMacos))errors.push("APPLE_MINIMUM_MACOS must be a macOS version such as 13.0");if(!isAppleCategory(config.category))errors.push("APPLE_APP_CATEGORY must be an Apple LSApplicationCategoryType such as public.app-category.productivity");if(includeApi){if(!config.apiKeyId)errors.push("APP_STORE_CONNECT_API_KEY_ID is required");if(!config.apiIssuerId)errors.push("APP_STORE_CONNECT_API_ISSUER_ID is required");if(!config.apiKeyPath||!existsSync(config.apiKeyPath))errors.push("APP_STORE_CONNECT_API_KEY_PATH must point to an existing .p8 file")}if(config.universal){for(const[variable,path]of[["CRAFT_BIN_ARM64",config.craftArm64],["CRAFT_BIN_X64",config.craftX64]])if(!path||!existsSync(path))errors.push(`${variable} must point to a native Craft runtime for a universal build`);else if(readFileSync(path).subarray(0,2).toString()==="#!")errors.push(`${variable} points at a script, not a native Craft runtime: ${path}`)}for(const tool of config.universal?[...REQUIRED_TOOLS,"lipo"]:REQUIRED_TOOLS)if(!Bun.which(tool))errors.push(`Required Apple command is unavailable: ${tool}`);return errors}function bundleFiles(appPath){const walk=(dir,prefix)=>readdirSync(dir,{withFileTypes:!0}).flatMap((entry)=>{const relative=prefix?`${prefix}/${entry.name}`:entry.name;return entry.isDirectory()?walk(join(dir,entry.name),relative):[relative]});return walk(appPath,"")}export function isAppleCategory(value){return/^public\.app-category\.[a-z][a-z0-9-]*$/.test(value)}export function storeRejectionFindings(paths,executable="stacks-desktop"){const findings=[],has=(path)=>paths.includes(path);for(const required of["Contents/Info.plist",`Contents/MacOS/${executable}`,"Contents/embedded.provisionprofile"])if(!has(required))findings.push(`missing required bundle file: ${required}`);for(const path of paths){const base=path.split("/").pop()??"";if(base===".DS_Store"||path.startsWith("__MACOSX/")||base.startsWith("._"))findings.push(`forbidden file in the bundle: ${path}`);if(/\.(?:dylib|so|framework|app|xpc)$/.test(path)){if(!(path.startsWith("Contents/Frameworks/")||path.startsWith("Contents/MacOS/")||path.startsWith("Contents/XPCServices/")||path.startsWith("Contents/PlugIns/")))findings.push(`nested code outside a signed location: ${path}`)}if(path.startsWith("Contents/Resources/")&&/\.(?:sh|command|dylib|so)$/.test(path))findings.push(`executable content under Resources: ${path}`)}return findings}export function renderInfoPlist(config,executable="stacks-desktop"){const iconEntry=config.icon?`
|
|
2
2
|
<key>CFBundleIconFile</key>
|
|
3
3
|
<string>AppIcon</string>`:"";return`<?xml version="1.0" encoding="UTF-8"?>
|
|
4
4
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "https://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
@@ -83,6 +83,7 @@ jobs:
|
|
|
83
83
|
app-version: \${{ vars.APPLE_APP_VERSION }}
|
|
84
84
|
app-signing-identity: \${{ vars.APPLE_APP_SIGNING_IDENTITY }}
|
|
85
85
|
installer-signing-identity: \${{ vars.APPLE_INSTALLER_SIGNING_IDENTITY }}
|
|
86
|
+
universal: \${{ vars.APPLE_UNIVERSAL == 'true' }}
|
|
86
87
|
release-tag: \${{ inputs.release-tag }}
|
|
87
88
|
validate-only: \${{ inputs.validate-only }}
|
|
88
89
|
mirror-s3: \${{ inputs.mirror-s3 }}
|
|
@@ -93,13 +94,14 @@ jobs:
|
|
|
93
94
|
s3-prefix: \${{ vars.RELEASE_S3_PREFIX }}
|
|
94
95
|
s3-public-url: \${{ vars.RELEASE_S3_PUBLIC_URL }}
|
|
95
96
|
secrets: inherit
|
|
96
|
-
`}function command(args,cwd=projectPath()){const result=Bun.spawnSync(args,{cwd,stdin:"inherit",stdout:"inherit",stderr:"inherit"});if(result.exitCode!==0)throw Error(`${args[0]} ${args.slice(1).join(" ")} exited with code ${result.exitCode}`)}export function signingPlan(input){const sign=(entitlements,target)=>["codesign","--force","--timestamp","--options","runtime","--entitlements",entitlements,"--sign",input.identity,target];return[sign(input.helperEntitlements,input.helperPath),sign(input.appEntitlements,input.appPath)]}function signingIdentityExists(identity){if(!identity)return!1;const result=Bun.spawnSync(["security","find-identity","-v"],{stdout:"pipe",stderr:"pipe"});return result.exitCode===0&&result.stdout.toString().includes(identity)}function provisioningProfileMatches(config){if(!config.provisioningProfile||!existsSync(config.provisioningProfile))return!1;const result=Bun.spawnSync(["security","cms","-D","-i",config.provisioningProfile],{stdout:"pipe",stderr:"pipe"});if(result.exitCode!==0)return!1;const profile=result.stdout.toString();return profile.includes(config.bundleId)&&profile.includes(config.teamId)}async function buildDesktop(){const{runAction}=await import("@stacksjs/actions"),{Action}=await import("@stacksjs/enums"),result=await runAction(Action.BuildDesktop);if(resultFailed(result))throw result.error}function sha256(path){return createHash("sha256").update(readFileSync(path)).digest("hex")}async function packageAppleDesktop(config,skipBuild=!1){const errors=validateAppleDesktopConfig(config,!1);if(!signingIdentityExists(config.appSigningIdentity))errors.push(`App signing identity is not installed: ${config.appSigningIdentity}`);if(!signingIdentityExists(config.installerSigningIdentity))errors.push(`Installer signing identity is not installed: ${config.installerSigningIdentity}`);if(!provisioningProfileMatches(config))errors.push(`Provisioning profile does not match ${config.teamId}.${config.bundleId}`);if(errors.length)throw Error(errors.join(`
|
|
97
|
-
`));if(!skipBuild)await buildDesktop();const desktopDist=storagePath("framework/desktop-dist")
|
|
97
|
+
`}function command(args,cwd=projectPath()){const result=Bun.spawnSync(args,{cwd,stdin:"inherit",stdout:"inherit",stderr:"inherit"});if(result.exitCode!==0)throw Error(`${args[0]} ${args.slice(1).join(" ")} exited with code ${result.exitCode}`)}export function signingPlan(input){const sign=(entitlements,target)=>["codesign","--force","--timestamp","--options","runtime","--entitlements",entitlements,"--sign",input.identity,target];return[sign(input.helperEntitlements,input.helperPath),sign(input.appEntitlements,input.appPath)]}export const captureCommand=(args)=>{const result=Bun.spawnSync(args,{cwd:projectPath(),stdin:"inherit",stdout:"pipe",stderr:"inherit"});if(result.exitCode!==0)throw Error(`${args[0]} ${args.slice(1).join(" ")} exited with code ${result.exitCode}`);return result.stdout.toString()},MACH_O_ARCHITECTURE={arm64:"arm64",x64:"x86_64"};export function parseLipoArchs(output){return output.trim().split(/\s+/).filter(Boolean).sort()}export function mergeUniversalBinary(input,run=captureCommand){for(const architecture of["arm64","x64"]){const expected=MACH_O_ARCHITECTURE[architecture],found=parseLipoArchs(run(["lipo","-archs",input[architecture]]));if(found.length!==1||found[0]!==expected)throw Error(`${input.name}: the ${architecture} input ${input[architecture]} contains ${found.join(" + ")||"no architectures"}, expected only ${expected}`)}run(["lipo","-create","-output",input.output,input.arm64,input.x64]);const merged=parseLipoArchs(run(["lipo","-archs",input.output])),expected=Object.values(MACH_O_ARCHITECTURE).sort();if(merged.join(" ")!==expected.join(" "))throw Error(`${input.name}: the universal binary ${input.output} contains ${merged.join(" + ")||"no architectures"}, expected ${expected.join(" + ")}`);return merged}export function buildUniversalPayload(input,run=captureCommand){const slice=(architecture)=>join(input.directory,architecture,"stacks-desktop");for(const architecture of["arm64","x64"]){mkdirSync(join(input.directory,architecture),{recursive:!0});run(input.launcherCompileArgs(architecture,slice(architecture)))}const launcher=join(input.directory,"stacks-desktop"),runtime=join(input.directory,"craft-runtime");mergeUniversalBinary({name:"stacks-desktop",arm64:slice("arm64"),x64:slice("x64"),output:launcher},run);const architectures=mergeUniversalBinary({name:"craft-runtime",arm64:input.craft.arm64,x64:input.craft.x64,output:runtime},run);return{launcher,runtime,architectures}}export function launcherSliceCompileArgs(base,architecture){return["bun",...base,`--target=bun-darwin-${architecture}`]}function signingIdentityExists(identity){if(!identity)return!1;const result=Bun.spawnSync(["security","find-identity","-v"],{stdout:"pipe",stderr:"pipe"});return result.exitCode===0&&result.stdout.toString().includes(identity)}function provisioningProfileMatches(config){if(!config.provisioningProfile||!existsSync(config.provisioningProfile))return!1;const result=Bun.spawnSync(["security","cms","-D","-i",config.provisioningProfile],{stdout:"pipe",stderr:"pipe"});if(result.exitCode!==0)return!1;const profile=result.stdout.toString();return profile.includes(config.bundleId)&&profile.includes(config.teamId)}async function buildDesktop(){const{runAction}=await import("@stacksjs/actions"),{Action}=await import("@stacksjs/enums"),result=await runAction(Action.BuildDesktop);if(resultFailed(result))throw result.error}function sha256(path){return createHash("sha256").update(readFileSync(path)).digest("hex")}async function packageAppleDesktop(config,skipBuild=!1){const errors=validateAppleDesktopConfig(config,!1);if(!signingIdentityExists(config.appSigningIdentity))errors.push(`App signing identity is not installed: ${config.appSigningIdentity}`);if(!signingIdentityExists(config.installerSigningIdentity))errors.push(`Installer signing identity is not installed: ${config.installerSigningIdentity}`);if(!provisioningProfileMatches(config))errors.push(`Provisioning profile does not match ${config.teamId}.${config.bundleId}`);if(errors.length)throw Error(errors.join(`
|
|
98
|
+
`));if(!skipBuild)await buildDesktop();const desktopDist=storagePath("framework/desktop-dist");let launcher=join(desktopDist,"stacks-desktop"),runtime=join(desktopDist,"craft-runtime");const manifest=join(desktopDist,"desktop.json");for(const path of[launcher,runtime,manifest])if(!existsSync(path))throw Error(`Desktop build artifact is missing: ${path}`);let architectures=[process.arch==="x64"?"x86_64":process.arch],craftSlices;if(config.universal){const universalDir=join(desktopDist,"universal");if(existsSync(universalDir))rmSync(universalDir,{recursive:!0});const{desktopLauncherCompileArgs,resolveDesktopLauncher}=await import("@stacksjs/desktop-build"),entry=resolveDesktopLauncher(projectPath()),minify=process.env.DESKTOP_MINIFY!=="false",payload=buildUniversalPayload({directory:universalDir,launcherCompileArgs:(architecture,outfile)=>launcherSliceCompileArgs(desktopLauncherCompileArgs({entry,outfile,minify}),architecture),craft:{arm64:config.craftArm64,x64:config.craftX64}});launcher=payload.launcher;runtime=payload.runtime;architectures=payload.architectures;craftSlices={arm64:config.craftArm64,x64:config.craftX64}}const appleDir=join(desktopDist,"apple"),appPath=join(appleDir,`${config.appName}.app`),contents=join(appPath,"Contents"),macosDir=join(contents,"MacOS"),resourcesDir=join(contents,"Resources");if(existsSync(appleDir))rmSync(appleDir,{recursive:!0});mkdirSync(macosDir,{recursive:!0});mkdirSync(resourcesDir,{recursive:!0});copyFileSync(launcher,join(macosDir,"stacks-desktop"));copyFileSync(runtime,join(macosDir,"craft-runtime"));if(config.universal){const parsed=JSON.parse(readFileSync(manifest,"utf8"));writeFileSync(join(resourcesDir,"desktop.json"),`${JSON.stringify({...parsed,architecture:"universal"},null,2)}
|
|
99
|
+
`)}else copyFileSync(manifest,join(resourcesDir,"desktop.json"));copyFileSync(config.provisioningProfile,join(contents,"embedded.provisionprofile"));chmodSync(join(macosDir,"stacks-desktop"),493);chmodSync(join(macosDir,"craft-runtime"),493);if(config.icon)copyFileSync(resolve(config.icon),join(resourcesDir,"AppIcon.icns"));const infoPlist=join(contents,"Info.plist"),appEntitlements=join(appleDir,"app.entitlements"),helperEntitlements=join(appleDir,"helper.entitlements");writeFileSync(infoPlist,renderInfoPlist(config));writeFileSync(appEntitlements,renderAppEntitlements(config));writeFileSync(helperEntitlements,renderHelperEntitlements());command(["plutil","-lint",infoPlist,appEntitlements,helperEntitlements]);for(const args of signingPlan({identity:config.appSigningIdentity,appPath,helperPath:join(macosDir,"craft-runtime"),appEntitlements,helperEntitlements}))command(args);command(["codesign","--verify","--deep","--strict","--verbose=2",appPath]);command(["codesign","-d","--entitlements",":-",appPath]);const findings=storeRejectionFindings(bundleFiles(appPath));if(findings.length>0)throw Error(`The app bundle would be rejected by App Review:
|
|
98
100
|
${findings.map((finding)=>` - ${finding}`).join(`
|
|
99
101
|
`)}`);const packagePath=join(appleDir,`${config.appName}-${config.version}-${config.buildNumber}.pkg`);command(["productbuild","--component",appPath,"/Applications","--sign",config.installerSigningIdentity,packagePath]);command(["pkgutil","--check-signature",packagePath]);const packageHash=sha256(packagePath);writeFileSync(join(appleDir,"checksums.sha256"),`${packageHash} ${basename(packagePath)}
|
|
100
|
-
`);writeFileSync(join(appleDir,"apple-provenance.json"),`${JSON.stringify({schemaVersion:"1.0.0",appName:config.appName,bundleId:config.bundleId,teamId:config.teamId,version:config.version,buildNumber:config.buildNumber,minimumMacos:config.minimumMacos,package:{name:basename(packagePath),sha256:packageHash},sourceRevision:Bun.spawnSync(["git","rev-parse","HEAD"],{cwd:projectPath()}).stdout.toString().trim(),craft:{sha256:sha256(join(macosDir,"craft-runtime"))}},null,2)}
|
|
102
|
+
`);writeFileSync(join(appleDir,"apple-provenance.json"),`${JSON.stringify({schemaVersion:"1.0.0",appName:config.appName,bundleId:config.bundleId,teamId:config.teamId,version:config.version,buildNumber:config.buildNumber,minimumMacos:config.minimumMacos,architectures,package:{name:basename(packagePath),sha256:packageHash},sourceRevision:Bun.spawnSync(["git","rev-parse","HEAD"],{cwd:projectPath()}).stdout.toString().trim(),craft:{sha256:sha256(join(macosDir,"craft-runtime")),...craftSlices&&{slices:{arm64:sha256(craftSlices.arm64),x64:sha256(craftSlices.x64)}}}},null,2)}
|
|
101
103
|
`);return packagePath}function validateOrUpload(packagePath,config,validateOnly){const errors=validateAppleDesktopConfig(config,!0);if(errors.length)throw Error(errors.join(`
|
|
102
104
|
`));const common=["--type","macos","--file",packagePath,"--apiKey",config.apiKeyId,"--apiIssuer",config.apiIssuerId];process.env.API_PRIVATE_KEYS_DIR=resolve(config.apiKeyPath,"..");command(["xcrun","altool","--validate-app",...common]);if(!validateOnly)command(["xcrun","altool","--upload-app",...common])}export function renderFailure(error){return`${error instanceof Error?error.message:String(error)}
|
|
103
105
|
`}function fail(error){process.stderr.write(renderFailure(error));process.exit(1)}export function desktopApple(buddy){buddy.command("desktop:apple:csr","Generate local private keys and CSRs for Mac App Store distribution certificates").option("--common-name <name>","Certificate request common name").option("--output <path>","Directory for private keys and certificate requests").action(async(options)=>{try{const metadata=packageMetadata(),outputDirectory=resolve(options.output||storagePath("framework/desktop-dist/apple/provisioning")),{generateMacCertificateRequests}=await import("ts-pantry");generateMacCertificateRequests({outputDirectory,commonName:options.commonName||metadata.name});log.success(`Generated Apple certificate requests and private keys in ${outputDirectory}`)}catch(error){fail(error)}});buddy.command("desktop:apple:provision","Plan or reconcile Apple Bundle ID, capabilities, certificates, and profile").option("--app-name <name>","Mac App Store display name").option("--bundle-id <id>","Reverse-DNS bundle identifier").option("--api-key-id <id>","App Store Connect API key ID").option("--api-issuer-id <id>","App Store Connect API issuer ID").option("--api-key-path <path>","App Store Connect AuthKey .p8 file").option("--capabilities <types>","Comma-separated Apple capability types").option("--app-certificate-csr <path>","CSR for a missing Mac App Distribution certificate").option("--installer-certificate-csr <path>","CSR for a missing Mac Installer Distribution certificate").option("--profile-name <name>","Provisioning profile name").option("--output <path>","Directory for the plan and downloaded Apple assets").option("--plan","Report the idempotent Apple resource diff without mutating it").option("--apply","Apply the Apple resource diff without revoking existing certificates").action(async(options)=>{try{if(options.plan&&options.apply)throw Error("Choose either --plan or --apply");const config=resolveAppleDesktopConfig(options);if(!config.bundleId)throw Error("APPLE_BUNDLE_ID or --bundle-id is required");if(!config.apiKeyId||!config.apiIssuerId||!config.apiKeyPath||!existsSync(config.apiKeyPath))throw Error("App Store Connect API key ID, issuer ID, and existing .p8 key path are required");const readCsr=(file)=>{if(!file)return;const resolved=resolve(file);if(!existsSync(resolved))throw Error(`Apple certificate CSR does not exist: ${resolved}`);return readFileSync(resolved,"utf8")},{exportAppleCertificateP12,provisionMacApp}=await import("ts-pantry"),result=await provisionMacApp({identifier:config.bundleId,name:config.appName,capabilities:options.capabilities?.split(",").map((value)=>value.trim()).filter(Boolean),appCertificateCsr:readCsr(options.appCertificateCsr),installerCertificateCsr:readCsr(options.installerCertificateCsr),profileName:options.profileName,keyId:config.apiKeyId,issuerId:config.apiIssuerId,keyPath:config.apiKeyPath,checkOnly:!options.apply}),outputDirectory=resolve(options.output||storagePath("framework/desktop-dist/apple/provisioning"));mkdirSync(outputDirectory,{recursive:!0});for(const certificate of result.certificates){if(!certificate.certificateContent)continue;const fileName=certificate.type==="MAC_APP_DISTRIBUTION"?"mac-app-distribution.cer":"mac-installer-distribution.cer";writeFileSync(join(outputDirectory,fileName),Buffer.from(certificate.certificateContent,"base64"),{mode:384})}if(result.profile.profileContent)writeFileSync(join(outputDirectory,"mac-app-store.provisionprofile"),Buffer.from(result.profile.profileContent,"base64"),{mode:384});const certificatePassword=env("APPLE_CERTIFICATE_PASSWORD"),certificateExports=[{type:"MAC_APP_DISTRIBUTION",csr:options.appCertificateCsr,certificate:"mac-app-distribution.cer",output:"mac-app-distribution.p12",name:`${config.appName} Mac App Distribution`},{type:"MAC_INSTALLER_DISTRIBUTION",csr:options.installerCertificateCsr,certificate:"mac-installer-distribution.cer",output:"mac-installer-distribution.p12",name:`${config.appName} Mac Installer Distribution`}];for(const certificateExport of certificateExports){if(!result.certificates.find((item)=>item.type===certificateExport.type)?.certificateContent||!certificateExport.csr||!certificatePassword)continue;exportAppleCertificateP12({certificatePath:join(outputDirectory,certificateExport.certificate),privateKeyPath:resolve(certificateExport.csr.replace(/\.csr$/i,".key")),outputPath:join(outputDirectory,certificateExport.output),password:certificatePassword,name:certificateExport.name})}const certificates=result.certificates.map((item)=>{const certificate={...item};delete certificate.certificateContent;return certificate}),profile={...result.profile};delete profile.profileContent;const report={...result,certificates,profile},reportPath=join(outputDirectory,"provisioning-plan.json");writeFileSync(reportPath,`${JSON.stringify(report,null,2)}
|
|
104
106
|
`,{mode:384});log.success(`${options.apply?"Applied":"Planned"} Apple provisioning: ${reportPath}`);if(!result.appRecord.exists&&result.appRecord.manualAction)log.warn(result.appRecord.manualAction)}catch(error){fail(error)}});buddy.command("desktop:apple:doctor","Validate Mac App Store tooling, credentials, certificates, and project metadata").option("--app-name <name>","Mac App Store display name").option("--bundle-id <id>","Reverse-DNS bundle identifier").option("--team-id <id>","Apple Developer team ID").option("--app-signing-identity <identity>","Mac App Distribution signing identity").option("--installer-signing-identity <identity>","Mac Installer Distribution signing identity").option("--provisioning-profile <path>","Mac App Store provisioning profile").option("--api-key-id <id>","App Store Connect API key ID").option("--api-issuer-id <id>","App Store Connect API issuer ID").option("--api-key-path <path>","App Store Connect AuthKey .p8 file").action((options)=>{try{const config=resolveAppleDesktopConfig(options),errors=validateAppleDesktopConfig(config,!0);if(!signingIdentityExists(config.appSigningIdentity))errors.push(`App signing identity is not installed: ${config.appSigningIdentity}`);if(!signingIdentityExists(config.installerSigningIdentity))errors.push(`Installer signing identity is not installed: ${config.installerSigningIdentity}`);if(!provisioningProfileMatches(config))errors.push(`Provisioning profile does not match ${config.teamId}.${config.bundleId}`);if(errors.length)throw Error(errors.join(`
|
|
105
|
-
`));log.success(`Mac App Store prerequisites are ready for ${config.bundleId}`)}catch(error){fail(error)}});buddy.command("desktop:apple:init","Create a GitHub Actions caller for the reusable Stacks Mac App Store workflow").option("--force","Replace an existing workflow").action((options)=>{try{const workflowPath=projectPath(".github/workflows/apple-app-store.yml");if(existsSync(workflowPath)&&!options.force)throw Error(`${workflowPath} already exists. Use --force to replace it.`);mkdirSync(resolve(workflowPath,".."),{recursive:!0});writeFileSync(workflowPath,renderAppleWorkflowCaller());log.success(`Created ${workflowPath}`)}catch(error){fail(error)}});const addSharedOptions=(commandBuilder)=>commandBuilder.option("--app-name <name>","Mac App Store display name").option("--bundle-id <id>","Reverse-DNS bundle identifier").option("--team-id <id>","Apple Developer team ID").option("--app-version <version>","Marketing version").option("--build-number <number>","Unique App Store build number").option("--minimum-macos <version>","Minimum supported macOS version").option("--category <category>","LSApplicationCategoryType value").option("--app-signing-identity <identity>","Mac App Distribution signing identity").option("--installer-signing-identity <identity>","Mac Installer Distribution signing identity").option("--provisioning-profile <path>","Mac App Store provisioning profile").option("--icon <path>","Optional .icns app icon").option("--skip-build","Package existing storage/framework/desktop-dist artifacts");addSharedOptions(buddy.command("desktop:apple:package","Build, sandbox, sign, and package a Mac App Store desktop app")).action(async(options)=>{try{const packagePath=await packageAppleDesktop(resolveAppleDesktopConfig(options),Boolean(options.skipBuild));log.success(`Created signed Mac App Store package ${packagePath}`)}catch(error){fail(error)}});addSharedOptions(buddy.command("desktop:apple:publish","Build and validate or upload a signed Mac App Store package")).option("--api-key-id <id>","App Store Connect API key ID").option("--api-issuer-id <id>","App Store Connect API issuer ID").option("--api-key-path <path>","App Store Connect AuthKey .p8 file").option("--validate-only","Validate with App Store Connect without uploading").option("--package-only","Create the signed package without contacting App Store Connect").action(async(options)=>{try{const config=resolveAppleDesktopConfig(options),packagePath=await packageAppleDesktop(config,Boolean(options.skipBuild));if(!options.packageOnly)validateOrUpload(packagePath,config,Boolean(options.validateOnly));log.success(options.packageOnly?`Created signed Mac App Store package ${packagePath}`:options.validateOnly?`Validated ${packagePath} with App Store Connect`:`Uploaded ${packagePath} to App Store Connect`)}catch(error){fail(error)}})}
|
|
107
|
+
`));log.success(`Mac App Store prerequisites are ready for ${config.bundleId}`)}catch(error){fail(error)}});buddy.command("desktop:apple:init","Create a GitHub Actions caller for the reusable Stacks Mac App Store workflow").option("--force","Replace an existing workflow").action((options)=>{try{const workflowPath=projectPath(".github/workflows/apple-app-store.yml");if(existsSync(workflowPath)&&!options.force)throw Error(`${workflowPath} already exists. Use --force to replace it.`);mkdirSync(resolve(workflowPath,".."),{recursive:!0});writeFileSync(workflowPath,renderAppleWorkflowCaller());log.success(`Created ${workflowPath}`)}catch(error){fail(error)}});const addSharedOptions=(commandBuilder)=>commandBuilder.option("--app-name <name>","Mac App Store display name").option("--bundle-id <id>","Reverse-DNS bundle identifier").option("--team-id <id>","Apple Developer team ID").option("--app-version <version>","Marketing version").option("--build-number <number>","Unique App Store build number").option("--minimum-macos <version>","Minimum supported macOS version").option("--category <category>","LSApplicationCategoryType value").option("--app-signing-identity <identity>","Mac App Distribution signing identity").option("--installer-signing-identity <identity>","Mac Installer Distribution signing identity").option("--provisioning-profile <path>","Mac App Store provisioning profile").option("--icon <path>","Optional .icns app icon").option("--skip-build","Package existing storage/framework/desktop-dist artifacts").option("--universal","Ship one arm64 + x86_64 binary, merged with lipo").option("--craft-arm64 <path>","Thin arm64 Craft runtime for --universal (or CRAFT_BIN_ARM64)").option("--craft-x64 <path>","Thin x86_64 Craft runtime for --universal (or CRAFT_BIN_X64)");addSharedOptions(buddy.command("desktop:apple:package","Build, sandbox, sign, and package a Mac App Store desktop app")).action(async(options)=>{try{const packagePath=await packageAppleDesktop(resolveAppleDesktopConfig(options),Boolean(options.skipBuild));log.success(`Created signed Mac App Store package ${packagePath}`)}catch(error){fail(error)}});addSharedOptions(buddy.command("desktop:apple:publish","Build and validate or upload a signed Mac App Store package")).option("--api-key-id <id>","App Store Connect API key ID").option("--api-issuer-id <id>","App Store Connect API issuer ID").option("--api-key-path <path>","App Store Connect AuthKey .p8 file").option("--validate-only","Validate with App Store Connect without uploading").option("--package-only","Create the signed package without contacting App Store Connect").action(async(options)=>{try{const config=resolveAppleDesktopConfig(options),packagePath=await packageAppleDesktop(config,Boolean(options.skipBuild));if(!options.packageOnly)validateOrUpload(packagePath,config,Boolean(options.validateOnly));log.success(options.packageOnly?`Created signed Mac App Store package ${packagePath}`:options.validateOnly?`Validated ${packagePath} with App Store Connect`:`Uploaded ${packagePath} to App Store Connect`)}catch(error){fail(error)}})}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { CLI } from '@stacksjs/types';
|
|
2
|
+
/**
|
|
3
|
+
* Translate the parsed options back into the flags the runner reads.
|
|
4
|
+
*
|
|
5
|
+
* The runner is also a plain script (`bun .../desktop/src/probe/runner.ts`),
|
|
6
|
+
* so it owns its flag parsing; this keeps the two spellings identical rather
|
|
7
|
+
* than maintaining a second parser.
|
|
8
|
+
*/
|
|
9
|
+
export declare function desktopProbeFlags(options: DesktopProbeOptions): string[];
|
|
10
|
+
/**
|
|
11
|
+
* `buddy desktop:probe` - measure whether a Craft window can host interactive
|
|
12
|
+
* or game content (stacksjs/stacks#877). See the runner for what it measures.
|
|
13
|
+
*/
|
|
14
|
+
export declare function desktopProbe(buddy: CLI): void;
|
|
15
|
+
declare interface DesktopProbeOptions {
|
|
16
|
+
browser?: boolean | string
|
|
17
|
+
open?: boolean
|
|
18
|
+
record?: boolean
|
|
19
|
+
out?: string
|
|
20
|
+
craftBin?: string
|
|
21
|
+
interactionWindow?: string | number
|
|
22
|
+
idle?: string | number
|
|
23
|
+
load?: string | number
|
|
24
|
+
cpuLoad?: string | number
|
|
25
|
+
instances?: string | number
|
|
26
|
+
timeout?: string | number
|
|
27
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import process from"node:process";import{runTool}from"./run-tool";export function desktopProbeFlags(options){const flags=[];if(options.browser===!0)flags.push("--browser");else if(typeof options.browser==="string"&&options.browser.length>0)flags.push(`--browser=${options.browser}`);if(options.open===!1)flags.push("--no-open");if(options.record)flags.push("--record");const valued=[["out","out"],["craftBin","craft-bin"],["interactionWindow","interaction-window"],["idle","idle"],["load","load"],["cpuLoad","cpu-load"],["instances","instances"],["timeout","timeout"]];for(const[key,flag]of valued){const value=options[key];if(value!==void 0&&value!==""&&typeof value!=="boolean")flags.push(`--${flag}=${value}`)}return flags}export function desktopProbe(buddy){buddy.command("desktop:probe","Measure WebGL2/WebGPU, frame pacing, input and audio latency, gamepad, fullscreen and pointer lock in a Craft window").option("--browser [name]","Run the same page in a browser instead (default browser, or a named one on macOS)").option("--no-open","With --browser, print the URL instead of opening it").option("--record","Write the record into the framework repository's probe results (framework checkout only)").option("--out <file>","Also write the record as JSON to this file").option("--craft-bin <path>","Craft binary to use (defaults to CRAFT_BIN, then craft on PATH)").option("--interaction-window <seconds>","How long to wait for real clicks and key presses; 0 skips them (default 20)").option("--idle <seconds>","Idle frame-pacing sample length (default 3)").option("--load <seconds>","Loaded frame-pacing sample length (default 6)").option("--cpu-load <ms>","Busy-wait added to each loaded frame (default 6)").option("--instances <count>","Instanced cubes drawn per loaded frame, 12 triangles each (default 40000)").option("--timeout <seconds>","Give up after this long").example("buddy desktop:probe --record").example("buddy desktop:probe --browser=Safari --record").action(async(options)=>{try{const{run}=await import("../../../desktop/src/probe/runner");await runTool(run,...desktopProbeFlags(options))}catch(error){process.stderr.write(`${error instanceof Error?error.message:String(error)}
|
|
2
|
+
`);process.exit(1)}})}
|
|
@@ -1,2 +1,9 @@
|
|
|
1
1
|
export declare function render(): string;
|
|
2
2
|
export declare function run(): Promise<void>;
|
|
3
|
+
export declare const blocks: readonly Block[];
|
|
4
|
+
/** A generated block: its markers and how to render it. */
|
|
5
|
+
declare interface Block {
|
|
6
|
+
begin: string
|
|
7
|
+
end: string
|
|
8
|
+
render: () => string
|
|
9
|
+
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{readFileSync,writeFileSync}from"node:fs";import{join}from"node:path";import process from"node:process";import{capabilityRegistry}from"../../../../config/src/capabilities";import{assertFrameworkRepo}from"./framework-repo";const root=new URL("../../../../../../../",import.meta.url).pathname,page=join(root,"docs/features/capabilities.md"),BEGIN="<!-- capability-matrix:begin -->",END="<!-- capability-matrix:end -->",CATEGORIES=[["database","Database"],["queue","Queue"],["cache","Cache"],["storage","Storage"],["mail","Mail"],["realtime","Realtime"],["deploy","Deploy"]],STATUS_NOTE={supported:"Contract evidence runs in CI.",partial:"Works, with the gaps named below.",experimental:"Usable, but without retained evidence.",unsupported:"Cannot be selected; configuring it fails loudly."};function row(driver){const evidence=driver.testEvidence.length===0?"none retained":driver.testEvidence.map((path)=>`\`${path.split("/").pop()}\``).join("<br>"),live=driver.liveServiceContract?`${driver.liveServiceContract.service} ${driver.liveServiceContract.version}`:"-";return`| \`${driver.name}\` | **${driver.status}** | ${driver.topology} | ${live} | ${evidence} |`}function section(category,heading){const drivers=capabilityRegistry.filter((driver)=>driver.category===category);if(drivers.length===0)return[];const limitations=drivers.flatMap((driver)=>driver.limitations.map((limitation)=>`- **\`${driver.name}\`** - ${limitation}`));return[`### ${heading}`,"","| Driver | Status | Topology | Live service | Evidence |","|---|---|---|---|---|",...drivers.map(row),"",...limitations.length>0?["**Limitations**","",...limitations,""]:[]]}function verifiedLine(){return["> **How current is this?** This table is generated from `capabilityRegistry`","> in `@stacksjs/config`, and `docs:capabilities:check` fails CI when the two","> disagree - so it is verified at every commit, not as of some date.",">","> The claims themselves are checked by `capabilities.test.ts`: every cited","> file must exist, anything short of `supported` must give a reason, and a","> `supported` driver on a remote topology must name the provider version it","> was proven against.",""]}export function render(){const statuses=Object.entries(STATUS_NOTE).map(([status,note])=>`- **${status}** - ${note}`);return[BEGIN,"","<!-- Generated by `buddy docs:capabilities` from `@stacksjs/config`'s"," `capabilityRegistry`. Edit that, not this. -->","",...statuses,"",...verifiedLine(),...CATEGORIES.flatMap(([category,heading])=>section(category,heading)),END].join(`
|
|
2
|
-
`)}function current(){let contents;try{contents=readFileSync(page,"utf8")}catch{return null}const start=contents.indexOf(
|
|
1
|
+
import{readFileSync,writeFileSync}from"node:fs";import{join}from"node:path";import process from"node:process";import{capabilityRegistry}from"../../../../config/src/capabilities";import{INTERACTIVE_BEGIN,INTERACTIVE_END,loadProbeRecords,renderInteractiveCapabilities}from"../../../../desktop/src/probe";import{assertFrameworkRepo}from"./framework-repo";const root=new URL("../../../../../../../",import.meta.url).pathname,page=join(root,"docs/features/capabilities.md"),BEGIN="<!-- capability-matrix:begin -->",END="<!-- capability-matrix:end -->",CATEGORIES=[["database","Database"],["queue","Queue"],["cache","Cache"],["storage","Storage"],["mail","Mail"],["realtime","Realtime"],["deploy","Deploy"]],STATUS_NOTE={supported:"Contract evidence runs in CI.",partial:"Works, with the gaps named below.",experimental:"Usable, but without retained evidence.",unsupported:"Cannot be selected; configuring it fails loudly."};function row(driver){const evidence=driver.testEvidence.length===0?"none retained":driver.testEvidence.map((path)=>`\`${path.split("/").pop()}\``).join("<br>"),live=driver.liveServiceContract?`${driver.liveServiceContract.service} ${driver.liveServiceContract.version}`:"-";return`| \`${driver.name}\` | **${driver.status}** | ${driver.topology} | ${live} | ${evidence} |`}function section(category,heading){const drivers=capabilityRegistry.filter((driver)=>driver.category===category);if(drivers.length===0)return[];const limitations=drivers.flatMap((driver)=>driver.limitations.map((limitation)=>`- **\`${driver.name}\`** - ${limitation}`));return[`### ${heading}`,"","| Driver | Status | Topology | Live service | Evidence |","|---|---|---|---|---|",...drivers.map(row),"",...limitations.length>0?["**Limitations**","",...limitations,""]:[]]}function verifiedLine(){return["> **How current is this?** This table is generated from `capabilityRegistry`","> in `@stacksjs/config`, and `docs:capabilities:check` fails CI when the two","> disagree - so it is verified at every commit, not as of some date.",">","> The claims themselves are checked by `capabilities.test.ts`: every cited","> file must exist, anything short of `supported` must give a reason, and a","> `supported` driver on a remote topology must name the provider version it","> was proven against.",""]}export function render(){const statuses=Object.entries(STATUS_NOTE).map(([status,note])=>`- **${status}** - ${note}`);return[BEGIN,"","<!-- Generated by `buddy docs:capabilities` from `@stacksjs/config`'s"," `capabilityRegistry`. Edit that, not this. -->","",...statuses,"",...verifiedLine(),...CATEGORIES.flatMap(([category,heading])=>section(category,heading)),END].join(`
|
|
2
|
+
`)}export const blocks=[{begin:BEGIN,end:END,render},{begin:INTERACTIVE_BEGIN,end:INTERACTIVE_END,render:()=>renderInteractiveCapabilities(loadProbeRecords())}];function current(block){let contents;try{contents=readFileSync(page,"utf8")}catch{return null}const start=contents.indexOf(block.begin),end=contents.indexOf(block.end);if(start===-1||end===-1)return null;return contents.slice(start,end+block.end.length)}function write(){const original=readFileSync(page,"utf8");let contents=original;for(const block of blocks){const start=contents.indexOf(block.begin),end=contents.indexOf(block.end);if(start===-1||end===-1)throw Error(`[docs:capabilities] ${page} is missing the ${block.begin} / ${block.end} markers`);contents=contents.slice(0,start)+block.render()+contents.slice(end+block.end.length)}if(contents===original)return!1;writeFileSync(page,contents);return!0}export async function run(){assertFrameworkRepo(root,"docs:capabilities");if(process.argv.includes("--write")){console.log(write()?"\u2713 rewrote the generated sections of docs/features/capabilities.md":"\u2713 the capability matrix was already current");return}const stale=blocks.filter((block)=>current(block)!==block.render());if(stale.length===0){console.log(`\u2713 the capability matrix is current (${capabilityRegistry.length} drivers, ${loadProbeRecords().length} desktop probe records)`);return}for(const block of stale){const source=block.begin===BEGIN?"capabilityRegistry":"the desktop probe records";console.error(current(block)===null?`\u2717 docs/features/capabilities.md is missing its ${block.begin} section`:`\u2717 docs/features/capabilities.md no longer matches ${source}`)}console.error("\nRun `buddy docs:capabilities` to rewrite it from its sources.");if(process.argv.includes("--check"))process.exit(1)}if(import.meta.main)await run();
|
package/dist/commands/index.d.ts
CHANGED
package/dist/commands/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export*from"./about";export*from"./auth";export*from"./build";export*from"./cd";export*from"./changelog";export*from"./clean";export*from"./cloud";export*from"./comments";export*from"./commit";export*from"./completion";export*from"./config-migrate";export*from"./configure";export*from"./create";export*from"./db";export*from"./storage-backup";export*from"./deploy";export*from"./deploy-preview";export*from"./dev";export*from"./dns";export*from"./docs";export*from"./doctor";export*from"./domains";export*from"./email";export*from"./env";export*from"./features";export*from"./fresh";export*from"./generate";export*from"./http";export*from"./install";export*from"./key";export*from"./libs";export*from"./lint";export*from"./list";export*from"./mail";export*from"./make";export*from"./migrate";export*from"./migrate-project";export*from"./outdated";export*from"./phone";export*from"./ports";export*from"./server";export*from"./link";export*from"./user";export*from"./prepublish";export*from"./projects";export*from"./publish";export*from"./queue";export*from"./release";export*from"./route";export*from"./saas";export*from"./schedule";export*from"./search";export*from"./seed";export*from"./serve";export*from"./setup";export*from"./sms";export*from"./telemetry";export*from"./test";export*from"./tinker";export*from"./types";export*from"./upgrade";export*from"./version";
|
|
1
|
+
export*from"./about";export*from"./auth";export*from"./build";export*from"./cd";export*from"./changelog";export*from"./clean";export*from"./cloud";export*from"./comments";export*from"./commerce-import";export*from"./commit";export*from"./completion";export*from"./config-migrate";export*from"./configure";export*from"./create";export*from"./db";export*from"./storage-backup";export*from"./deploy";export*from"./deploy-preview";export*from"./dev";export*from"./dns";export*from"./docs";export*from"./doctor";export*from"./domains";export*from"./email";export*from"./env";export*from"./features";export*from"./fresh";export*from"./generate";export*from"./http";export*from"./install";export*from"./key";export*from"./libs";export*from"./lint";export*from"./list";export*from"./mail";export*from"./make";export*from"./migrate";export*from"./migrate-project";export*from"./outdated";export*from"./phone";export*from"./ports";export*from"./server";export*from"./link";export*from"./user";export*from"./prepublish";export*from"./projects";export*from"./publish";export*from"./queue";export*from"./release";export*from"./route";export*from"./saas";export*from"./schedule";export*from"./search";export*from"./seed";export*from"./serve";export*from"./setup";export*from"./sms";export*from"./telemetry";export*from"./test";export*from"./tinker";export*from"./types";export*from"./upgrade";export*from"./version";
|
package/dist/lazy-commands.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export async function withTimeout(work,ms){let timeoutId;const deadline=new Promise((_,reject)=>{timeoutId=setTimeout(()=>reject(Error("timeout")),ms)});try{return await Promise.race([work,deadline])}finally{if(timeoutId!==void 0)clearTimeout(timeoutId)}}const commandRegistry={about:{path:"./commands/about.js",exportName:"about"},add:{path:"./commands/add.js",exportName:"add"},"ai:context":{path:"./commands/ai-context.js",exportName:"aiContext"},auth:{path:"./commands/auth.js",exportName:"auth"},build:{path:"./commands/build.js",exportName:"build"},cd:{path:"./commands/cd.js",exportName:"cd"},changelog:{path:"./commands/changelog.js",exportName:"changelog"},clean:{path:"./commands/clean.js",exportName:"clean"},cloud:{path:"./commands/cloud.js",exportName:"cloud"},commit:{path:"./commands/commit.js",exportName:"commit"},completion:{path:"./commands/completion.js",exportName:"completion"},"config:migrate":{path:"./commands/config-migrate.js",exportName:"configMigrate"},configure:{path:"./commands/configure.js",exportName:"configure"},create:{path:"./commands/create.js",exportName:"create"},new:{path:"./commands/create.js",exportName:"create"},deploy:{path:"./commands/deploy.js",exportName:"deploy"},"deploy:rollback":{path:"./commands/deploy.js",exportName:"deploy"},dev:{path:"./commands/dev.js",exportName:"dev"},"desktop:apple:doctor":{path:"./commands/desktop-apple.js",exportName:"desktopApple"},"desktop:apple:csr":{path:"./commands/desktop-apple.js",exportName:"desktopApple"},"desktop:apple:init":{path:"./commands/desktop-apple.js",exportName:"desktopApple"},"desktop:apple:package":{path:"./commands/desktop-apple.js",exportName:"desktopApple"},"desktop:apple:provision":{path:"./commands/desktop-apple.js",exportName:"desktopApple"},"desktop:apple:publish":{path:"./commands/desktop-apple.js",exportName:"desktopApple"},dns:{path:"./commands/dns.js",exportName:"dns"},"dns:pull":{path:"./commands/dns.js",exportName:"dns"},"dns:diff":{path:"./commands/dns.js",exportName:"dns"},"dns:sync":{path:"./commands/dns.js",exportName:"dns"},doctor:{path:"./commands/doctor.js",exportName:"doctor"},domains:{path:"./commands/domains.js",exportName:"domains"},email:{path:"./commands/email.js",exportName:"email"},env:{path:"./commands/env.js",exportName:"env"},"extension:init":{path:"./commands/extension.js",exportName:"extension"},"extension:build":{path:"./commands/extension.js",exportName:"extension"},"extension:package":{path:"./commands/extension.js",exportName:"extension"},"extension:chrome:publish":{path:"./commands/extension.js",exportName:"extension"},"extension:chrome:status":{path:"./commands/extension.js",exportName:"extension"},"extension:firefox:publish":{path:"./commands/extension.js",exportName:"extension"},"extension:safari:init":{path:"./commands/extension.js",exportName:"extension"},"extension:safari:provision":{path:"./commands/extension.js",exportName:"extension"},"extension:safari:app":{path:"./commands/extension.js",exportName:"extension"},"extension:safari:publish":{path:"./commands/extension.js",exportName:"extension"},"dashboard:install":{path:"./commands/features.js",exportName:"features"},"dashboard:uninstall":{path:"./commands/features.js",exportName:"features"},"commerce:install":{path:"./commands/features.js",exportName:"features"},"commerce:uninstall":{path:"./commands/features.js",exportName:"features"},"cms:install":{path:"./commands/features.js",exportName:"features"},"cms:uninstall":{path:"./commands/features.js",exportName:"features"},"marketing:install":{path:"./commands/features.js",exportName:"features"},"marketing:uninstall":{path:"./commands/features.js",exportName:"features"},"monitoring:install":{path:"./commands/features.js",exportName:"features"},"monitoring:uninstall":{path:"./commands/features.js",exportName:"features"},"realtime:install":{path:"./commands/features.js",exportName:"features"},"realtime:uninstall":{path:"./commands/features.js",exportName:"features"},"queue:install":{path:"./commands/features.js",exportName:"features"},"queue:uninstall":{path:"./commands/features.js",exportName:"features"},"db:backup":{path:"./commands/db.js",exportName:"db"},"db:backups":{path:"./commands/db.js",exportName:"db"},"db:restore":{path:"./commands/db.js",exportName:"db"},"storage:backup":{path:"./commands/storage-backup.js",exportName:"storageBackup"},"storage:backups":{path:"./commands/storage-backup.js",exportName:"storageBackup"},"storage:restore":{path:"./commands/storage-backup.js",exportName:"storageBackup"},fresh:{path:"./commands/fresh.js",exportName:"fresh"},generate:{path:"./commands/generate.js",exportName:"generate"},http:{path:"./commands/http.js",exportName:"http"},install:{path:"./commands/install.js",exportName:"install"},key:{path:"./commands/key.js",exportName:"key"},lint:{path:"./commands/lint.js",exportName:"lint"},format:{path:"./commands/lint.js",exportName:"lint"},"format:check":{path:"./commands/lint.js",exportName:"lint"},libs:{path:"./commands/libs.js",exportName:"libs"},libraries:{path:"./commands/libs.js",exportName:"libs"},list:{path:"./commands/list.js",exportName:"list"},mail:{path:"./commands/mail.js",exportName:"mailCommands"},"mail:preview":{path:"./commands/mail.js",exportName:"mailCommands"},maintenance:{path:"./commands/maintenance.js",exportName:"maintenance"},down:{path:"./commands/maintenance.js",exportName:"maintenance"},up:{path:"./commands/maintenance.js",exportName:"maintenance"},status:{path:"./commands/maintenance.js",exportName:"maintenance"},"coming-soon":{path:"./commands/maintenance.js",exportName:"maintenance"},"coming-soon:status":{path:"./commands/maintenance.js",exportName:"maintenance"},launch:{path:"./commands/maintenance.js",exportName:"maintenance"},make:{path:"./commands/make.js",exportName:"make"},"scaffold:crud":{path:"./commands/make.js",exportName:"make"},migrate:{path:"./commands/migrate.js",exportName:"migrate"},"migrate:fresh":{path:"./commands/migrate.js",exportName:"migrate"},"migrate:switch":{path:"./commands/migrate.js",exportName:"migrate"},"migrate:project":{path:"./commands/migrate-project.js",exportName:"migrateProject"},outdated:{path:"./commands/outdated.js",exportName:"outdated"},package:{path:"./commands/package.js",exportName:"packageCommands"},phone:{path:"./commands/phone.js",exportName:"phone"},ports:{path:"./commands/ports.js",exportName:"ports"},"server:flash":{path:"./commands/server.js",exportName:"server"},"server:first-boot":{path:"./commands/server.js",exportName:"server"},"server:doctor":{path:"./commands/server.js",exportName:"server"},"server:setup":{path:"./commands/server.js",exportName:"server"},"server:trust":{path:"./commands/server.js",exportName:"server"},"link:core":{path:"./commands/link.js",exportName:"link"},"comments:list":{path:"./commands/comments.js",exportName:"commentsCommands"},"comments:approve":{path:"./commands/comments.js",exportName:"commentsCommands"},"comments:reject":{path:"./commands/comments.js",exportName:"commentsCommands"},"comments:delete":{path:"./commands/comments.js",exportName:"commentsCommands"},"user:add":{path:"./commands/user.js",exportName:"user"},"user:list":{path:"./commands/user.js",exportName:"user"},"unlink:core":{path:"./commands/link.js",exportName:"link"},prepublish:{path:"./commands/prepublish.js",exportName:"prepublish"},projects:{path:"./commands/projects.js",exportName:"projects"},publish:{path:"./commands/publish.js",exportName:"publish"},"publish:model":{path:"./commands/publish.js",exportName:"publish"},"publish:controller":{path:"./commands/publish.js",exportName:"publish"},"publish:middleware":{path:"./commands/publish.js",exportName:"publish"},"publish:action":{path:"./commands/publish.js",exportName:"publish"},"publish:core":{path:"./commands/publish.js",exportName:"publish"},"core:status":{path:"./commands/publish.js",exportName:"publish"},queue:{path:"./commands/queue.js",exportName:"queue"},release:{path:"./commands/release.js",exportName:"release"},route:{path:"./commands/route.js",exportName:"route"},saas:{path:"./commands/saas.js",exportName:"saas"},"stripe:setup":{path:"./commands/saas.js",exportName:"saas"},schedule:{path:"./commands/schedule.js",exportName:"schedule"},search:{path:"./commands/search.js",exportName:"search"},"search-engine:update":{path:"./commands/search.js",exportName:"search"},"search-engine:settings":{path:"./commands/search.js",exportName:"search"},seed:{path:"./commands/seed.js",exportName:"seed"},"seed:roles":{path:"./commands/seed.js",exportName:"seed"},"roles:seed":{path:"./commands/seed.js",exportName:"seed"},preview:{path:"./commands/serve.js",exportName:"preview"},serve:{path:"./commands/serve.js",exportName:"serve"},"serve:api":{path:"./commands/serve.js",exportName:"serveApi"},setup:{path:"./commands/setup.js",exportName:"setup"},"setup:ai":{path:"./commands/setup.js",exportName:"setup"},"setup:ssl":{path:"./commands/setup.js",exportName:"setup"},"setup:oh-my-zsh":{path:"./commands/setup.js",exportName:"setup"},"ai:setup":{path:"./commands/setup.js",exportName:"setup"},share:{path:"./commands/share.js",exportName:"share"},"simulator:doctor":{path:"./commands/simulator.js",exportName:"simulator"},"simulator:open":{path:"./commands/simulator.js",exportName:"simulator"},stack:{path:"./commands/stacks.js",exportName:"stacks"},sms:{path:"./commands/sms.js",exportName:"sms"},telemetry:{path:"./commands/telemetry.js",exportName:"telemetryCommand"},test:{path:"./commands/test.js",exportName:"test"},tinker:{path:"./commands/tinker.js",exportName:"tinker"},types:{path:"./commands/types.js",exportName:"types"},undeploy:{path:"./commands/cloud.js",exportName:"cloud"},upgrade:{path:"./commands/upgrade.js",exportName:"upgrade"},version:{path:"./commands/version.js",exportName:"version"},"docs:buddy":{path:"./commands/docs.js",exportName:"docs"},"docs:buddy:check":{path:"./commands/docs.js",exportName:"docs"},"docs:artifacts":{path:"./commands/docs.js",exportName:"docs"},"docs:artifacts:check":{path:"./commands/docs.js",exportName:"docs"},"docs:links":{path:"./commands/docs.js",exportName:"docs"},"docs:links:check":{path:"./commands/docs.js",exportName:"docs"}},commandGroups={minimal:["version","help"],development:["dev","build","test","lint"],database:["migrate","seed","fresh"],scaffolding:["make","generate"],deployment:["deploy","release","cloud","server"],info:["about","doctor","list"]},loadedRegistrars=new WeakMap;function loaderKey(loader){return`${loader.path}#${loader.exportName}`}export function markLoaded(buddy,commandName){const loader=commandRegistry[commandName];if(!loader)return;let set=loadedRegistrars.get(buddy);if(!set){set=new Set;loadedRegistrars.set(buddy,set)}set.add(loaderKey(loader))}export async function loadCommand(commandName,buddy){const loader=commandRegistry[commandName];if(!loader)return!1;let set=loadedRegistrars.get(buddy);if(!set){set=new Set;loadedRegistrars.set(buddy,set)}const key=loaderKey(loader);if(set.has(key))return!0;set.add(key);try{const commandFunction=(await import(loader.path))[loader.exportName];if(typeof commandFunction==="function"){commandFunction(buddy);return!0}else return!1}catch{return!1}}export async function loadCommands(commandNames,buddy){const seen=new Set,unique=[];for(const name of commandNames){const loader=commandRegistry[name],key=loader?`${loader.path}#${loader.exportName}`:`name:${name}`;if(seen.has(key))continue;seen.add(key);unique.push(name)}await Promise.all(unique.map(async(name)=>{try{await withTimeout(loadCommand(name,buddy),5000)}catch{}}))}export async function loadCommandGroup(groupName,buddy){const commands=commandGroups[groupName];if(commands)await loadCommands(commands,buddy)}export async function loadAllCommands(buddy){const allCommands=Object.keys(commandRegistry);await loadCommands(allCommands,buddy)}export function getCommandNames(){return Object.keys(commandRegistry)}export function getCommandsToLoad(args){const requestedCommand=args[0],isVersionFlag=requestedCommand==="--version"||requestedCommand==="-v",isHelpFlag=requestedCommand==="--help"||requestedCommand==="-h",isHelpWord=requestedCommand==="help";if(isVersionFlag)return["version"];if(!requestedCommand||isHelpFlag||isHelpWord)return Object.keys(commandRegistry);const baseCommand=requestedCommand.split(":")[0];if(baseCommand==="list")return["list",...Object.keys(commandRegistry).filter((k)=>k!=="list")];if(commandRegistry[requestedCommand])return[requestedCommand];if(commandRegistry[baseCommand])return[baseCommand];return Object.keys(commandRegistry)}
|
|
1
|
+
export async function withTimeout(work,ms){let timeoutId;const deadline=new Promise((_,reject)=>{timeoutId=setTimeout(()=>reject(Error("timeout")),ms)});try{return await Promise.race([work,deadline])}finally{if(timeoutId!==void 0)clearTimeout(timeoutId)}}const commandRegistry={about:{path:"./commands/about.js",exportName:"about"},add:{path:"./commands/add.js",exportName:"add"},"ai:context":{path:"./commands/ai-context.js",exportName:"aiContext"},auth:{path:"./commands/auth.js",exportName:"auth"},build:{path:"./commands/build.js",exportName:"build"},cd:{path:"./commands/cd.js",exportName:"cd"},changelog:{path:"./commands/changelog.js",exportName:"changelog"},clean:{path:"./commands/clean.js",exportName:"clean"},cloud:{path:"./commands/cloud.js",exportName:"cloud"},commit:{path:"./commands/commit.js",exportName:"commit"},completion:{path:"./commands/completion.js",exportName:"completion"},"config:migrate":{path:"./commands/config-migrate.js",exportName:"configMigrate"},configure:{path:"./commands/configure.js",exportName:"configure"},create:{path:"./commands/create.js",exportName:"create"},new:{path:"./commands/create.js",exportName:"create"},deploy:{path:"./commands/deploy.js",exportName:"deploy"},"deploy:rollback":{path:"./commands/deploy.js",exportName:"deploy"},dev:{path:"./commands/dev.js",exportName:"dev"},"desktop:apple:doctor":{path:"./commands/desktop-apple.js",exportName:"desktopApple"},"desktop:apple:csr":{path:"./commands/desktop-apple.js",exportName:"desktopApple"},"desktop:apple:init":{path:"./commands/desktop-apple.js",exportName:"desktopApple"},"desktop:apple:package":{path:"./commands/desktop-apple.js",exportName:"desktopApple"},"desktop:apple:provision":{path:"./commands/desktop-apple.js",exportName:"desktopApple"},"desktop:apple:publish":{path:"./commands/desktop-apple.js",exportName:"desktopApple"},"desktop:probe":{path:"./commands/desktop-probe.js",exportName:"desktopProbe"},dns:{path:"./commands/dns.js",exportName:"dns"},"dns:pull":{path:"./commands/dns.js",exportName:"dns"},"dns:diff":{path:"./commands/dns.js",exportName:"dns"},"dns:sync":{path:"./commands/dns.js",exportName:"dns"},doctor:{path:"./commands/doctor.js",exportName:"doctor"},domains:{path:"./commands/domains.js",exportName:"domains"},email:{path:"./commands/email.js",exportName:"email"},env:{path:"./commands/env.js",exportName:"env"},"extension:init":{path:"./commands/extension.js",exportName:"extension"},"extension:build":{path:"./commands/extension.js",exportName:"extension"},"extension:package":{path:"./commands/extension.js",exportName:"extension"},"extension:chrome:publish":{path:"./commands/extension.js",exportName:"extension"},"extension:chrome:status":{path:"./commands/extension.js",exportName:"extension"},"extension:firefox:publish":{path:"./commands/extension.js",exportName:"extension"},"extension:safari:init":{path:"./commands/extension.js",exportName:"extension"},"extension:safari:provision":{path:"./commands/extension.js",exportName:"extension"},"extension:safari:app":{path:"./commands/extension.js",exportName:"extension"},"extension:safari:publish":{path:"./commands/extension.js",exportName:"extension"},"dashboard:install":{path:"./commands/features.js",exportName:"features"},"dashboard:uninstall":{path:"./commands/features.js",exportName:"features"},"commerce:install":{path:"./commands/features.js",exportName:"features"},"commerce:uninstall":{path:"./commands/features.js",exportName:"features"},"commerce:import":{path:"./commands/commerce-import.js",exportName:"commerceImport"},"cms:install":{path:"./commands/features.js",exportName:"features"},"cms:uninstall":{path:"./commands/features.js",exportName:"features"},"marketing:install":{path:"./commands/features.js",exportName:"features"},"marketing:uninstall":{path:"./commands/features.js",exportName:"features"},"monitoring:install":{path:"./commands/features.js",exportName:"features"},"monitoring:uninstall":{path:"./commands/features.js",exportName:"features"},"realtime:install":{path:"./commands/features.js",exportName:"features"},"realtime:uninstall":{path:"./commands/features.js",exportName:"features"},"queue:install":{path:"./commands/features.js",exportName:"features"},"queue:uninstall":{path:"./commands/features.js",exportName:"features"},"db:backup":{path:"./commands/db.js",exportName:"db"},"db:backups":{path:"./commands/db.js",exportName:"db"},"db:restore":{path:"./commands/db.js",exportName:"db"},"storage:backup":{path:"./commands/storage-backup.js",exportName:"storageBackup"},"storage:backups":{path:"./commands/storage-backup.js",exportName:"storageBackup"},"storage:restore":{path:"./commands/storage-backup.js",exportName:"storageBackup"},fresh:{path:"./commands/fresh.js",exportName:"fresh"},generate:{path:"./commands/generate.js",exportName:"generate"},http:{path:"./commands/http.js",exportName:"http"},install:{path:"./commands/install.js",exportName:"install"},key:{path:"./commands/key.js",exportName:"key"},lint:{path:"./commands/lint.js",exportName:"lint"},format:{path:"./commands/lint.js",exportName:"lint"},"format:check":{path:"./commands/lint.js",exportName:"lint"},libs:{path:"./commands/libs.js",exportName:"libs"},libraries:{path:"./commands/libs.js",exportName:"libs"},list:{path:"./commands/list.js",exportName:"list"},mail:{path:"./commands/mail.js",exportName:"mailCommands"},"mail:preview":{path:"./commands/mail.js",exportName:"mailCommands"},maintenance:{path:"./commands/maintenance.js",exportName:"maintenance"},down:{path:"./commands/maintenance.js",exportName:"maintenance"},up:{path:"./commands/maintenance.js",exportName:"maintenance"},status:{path:"./commands/maintenance.js",exportName:"maintenance"},"coming-soon":{path:"./commands/maintenance.js",exportName:"maintenance"},"coming-soon:status":{path:"./commands/maintenance.js",exportName:"maintenance"},launch:{path:"./commands/maintenance.js",exportName:"maintenance"},make:{path:"./commands/make.js",exportName:"make"},"scaffold:crud":{path:"./commands/make.js",exportName:"make"},migrate:{path:"./commands/migrate.js",exportName:"migrate"},"migrate:fresh":{path:"./commands/migrate.js",exportName:"migrate"},"migrate:switch":{path:"./commands/migrate.js",exportName:"migrate"},"migrate:project":{path:"./commands/migrate-project.js",exportName:"migrateProject"},outdated:{path:"./commands/outdated.js",exportName:"outdated"},package:{path:"./commands/package.js",exportName:"packageCommands"},phone:{path:"./commands/phone.js",exportName:"phone"},ports:{path:"./commands/ports.js",exportName:"ports"},"server:flash":{path:"./commands/server.js",exportName:"server"},"server:first-boot":{path:"./commands/server.js",exportName:"server"},"server:doctor":{path:"./commands/server.js",exportName:"server"},"server:setup":{path:"./commands/server.js",exportName:"server"},"server:trust":{path:"./commands/server.js",exportName:"server"},"link:core":{path:"./commands/link.js",exportName:"link"},"comments:list":{path:"./commands/comments.js",exportName:"commentsCommands"},"comments:approve":{path:"./commands/comments.js",exportName:"commentsCommands"},"comments:reject":{path:"./commands/comments.js",exportName:"commentsCommands"},"comments:delete":{path:"./commands/comments.js",exportName:"commentsCommands"},"user:add":{path:"./commands/user.js",exportName:"user"},"user:list":{path:"./commands/user.js",exportName:"user"},"unlink:core":{path:"./commands/link.js",exportName:"link"},prepublish:{path:"./commands/prepublish.js",exportName:"prepublish"},projects:{path:"./commands/projects.js",exportName:"projects"},publish:{path:"./commands/publish.js",exportName:"publish"},"publish:model":{path:"./commands/publish.js",exportName:"publish"},"publish:controller":{path:"./commands/publish.js",exportName:"publish"},"publish:middleware":{path:"./commands/publish.js",exportName:"publish"},"publish:action":{path:"./commands/publish.js",exportName:"publish"},"publish:core":{path:"./commands/publish.js",exportName:"publish"},"core:status":{path:"./commands/publish.js",exportName:"publish"},queue:{path:"./commands/queue.js",exportName:"queue"},release:{path:"./commands/release.js",exportName:"release"},route:{path:"./commands/route.js",exportName:"route"},saas:{path:"./commands/saas.js",exportName:"saas"},"stripe:setup":{path:"./commands/saas.js",exportName:"saas"},schedule:{path:"./commands/schedule.js",exportName:"schedule"},search:{path:"./commands/search.js",exportName:"search"},"search-engine:update":{path:"./commands/search.js",exportName:"search"},"search-engine:settings":{path:"./commands/search.js",exportName:"search"},seed:{path:"./commands/seed.js",exportName:"seed"},"seed:roles":{path:"./commands/seed.js",exportName:"seed"},"roles:seed":{path:"./commands/seed.js",exportName:"seed"},preview:{path:"./commands/serve.js",exportName:"preview"},serve:{path:"./commands/serve.js",exportName:"serve"},"serve:api":{path:"./commands/serve.js",exportName:"serveApi"},setup:{path:"./commands/setup.js",exportName:"setup"},"setup:ai":{path:"./commands/setup.js",exportName:"setup"},"setup:ssl":{path:"./commands/setup.js",exportName:"setup"},"setup:oh-my-zsh":{path:"./commands/setup.js",exportName:"setup"},"ai:setup":{path:"./commands/setup.js",exportName:"setup"},share:{path:"./commands/share.js",exportName:"share"},"simulator:doctor":{path:"./commands/simulator.js",exportName:"simulator"},"simulator:open":{path:"./commands/simulator.js",exportName:"simulator"},stack:{path:"./commands/stacks.js",exportName:"stacks"},sms:{path:"./commands/sms.js",exportName:"sms"},telemetry:{path:"./commands/telemetry.js",exportName:"telemetryCommand"},test:{path:"./commands/test.js",exportName:"test"},tinker:{path:"./commands/tinker.js",exportName:"tinker"},types:{path:"./commands/types.js",exportName:"types"},undeploy:{path:"./commands/cloud.js",exportName:"cloud"},upgrade:{path:"./commands/upgrade.js",exportName:"upgrade"},version:{path:"./commands/version.js",exportName:"version"},"docs:buddy":{path:"./commands/docs.js",exportName:"docs"},"docs:buddy:check":{path:"./commands/docs.js",exportName:"docs"},"docs:artifacts":{path:"./commands/docs.js",exportName:"docs"},"docs:artifacts:check":{path:"./commands/docs.js",exportName:"docs"},"docs:links":{path:"./commands/docs.js",exportName:"docs"},"docs:links:check":{path:"./commands/docs.js",exportName:"docs"}},commandGroups={minimal:["version","help"],development:["dev","build","test","lint"],database:["migrate","seed","fresh"],scaffolding:["make","generate"],deployment:["deploy","release","cloud","server"],info:["about","doctor","list"]},loadedRegistrars=new WeakMap;function loaderKey(loader){return`${loader.path}#${loader.exportName}`}export function markLoaded(buddy,commandName){const loader=commandRegistry[commandName];if(!loader)return;let set=loadedRegistrars.get(buddy);if(!set){set=new Set;loadedRegistrars.set(buddy,set)}set.add(loaderKey(loader))}export async function loadCommand(commandName,buddy){const loader=commandRegistry[commandName];if(!loader)return!1;let set=loadedRegistrars.get(buddy);if(!set){set=new Set;loadedRegistrars.set(buddy,set)}const key=loaderKey(loader);if(set.has(key))return!0;set.add(key);try{const commandFunction=(await import(loader.path))[loader.exportName];if(typeof commandFunction==="function"){commandFunction(buddy);return!0}else return!1}catch{return!1}}export async function loadCommands(commandNames,buddy){const seen=new Set,unique=[];for(const name of commandNames){const loader=commandRegistry[name],key=loader?`${loader.path}#${loader.exportName}`:`name:${name}`;if(seen.has(key))continue;seen.add(key);unique.push(name)}await Promise.all(unique.map(async(name)=>{try{await withTimeout(loadCommand(name,buddy),5000)}catch{}}))}export async function loadCommandGroup(groupName,buddy){const commands=commandGroups[groupName];if(commands)await loadCommands(commands,buddy)}export async function loadAllCommands(buddy){const allCommands=Object.keys(commandRegistry);await loadCommands(allCommands,buddy)}export function getCommandNames(){return Object.keys(commandRegistry)}export function getCommandsToLoad(args){const requestedCommand=args[0],isVersionFlag=requestedCommand==="--version"||requestedCommand==="-v",isHelpFlag=requestedCommand==="--help"||requestedCommand==="-h",isHelpWord=requestedCommand==="help";if(isVersionFlag)return["version"];if(!requestedCommand||isHelpFlag||isHelpWord)return Object.keys(commandRegistry);const baseCommand=requestedCommand.split(":")[0];if(baseCommand==="list")return["list",...Object.keys(commandRegistry).filter((k)=>k!=="list")];if(commandRegistry[requestedCommand])return[requestedCommand];if(commandRegistry[baseCommand])return[baseCommand];return Object.keys(commandRegistry)}
|
|
@@ -32,7 +32,7 @@ export declare function describeMailDnsRecords(input: {
|
|
|
32
32
|
records: readonly PublicDnsRecord[]
|
|
33
33
|
dkimSelector: string
|
|
34
34
|
dmarcPolicy?: unknown
|
|
35
|
-
|
|
35
|
+
|
|
36
36
|
mxAddresses?: readonly string[]
|
|
37
37
|
}): DoctorCheckResult;
|
|
38
38
|
/**
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@stacksjs/buddy",
|
|
3
3
|
"type": "module",
|
|
4
4
|
"sideEffects": false,
|
|
5
|
-
"version": "0.75.
|
|
5
|
+
"version": "0.75.41",
|
|
6
6
|
"description": "Meet Buddy. The Stacks runtime.",
|
|
7
7
|
"author": "Chris Breuer",
|
|
8
8
|
"contributors": [
|
|
@@ -95,69 +95,70 @@
|
|
|
95
95
|
"prepublishOnly": "bun run build"
|
|
96
96
|
},
|
|
97
97
|
"dependencies": {
|
|
98
|
-
"@stacksjs/actions": "^0.75.
|
|
99
|
-
"@stacksjs/ai": "^0.75.
|
|
100
|
-
"@stacksjs/alias": "^0.75.
|
|
101
|
-
"@stacksjs/analytics": "^0.75.
|
|
102
|
-
"@stacksjs/api": "^0.75.
|
|
103
|
-
"@stacksjs/arrays": "^0.75.
|
|
104
|
-
"@stacksjs/auth": "^0.75.
|
|
105
|
-
"@stacksjs/browser-extension": "^0.75.
|
|
106
|
-
"@stacksjs/build": "^0.75.
|
|
107
|
-
"@stacksjs/cache": "^0.75.
|
|
108
|
-
"@stacksjs/chat": "^0.75.
|
|
109
|
-
"@stacksjs/clapp": "^0.2.
|
|
110
|
-
"@stacksjs/cli": "^0.75.
|
|
111
|
-
"@stacksjs/cloud": "^0.75.
|
|
112
|
-
"@stacksjs/cms": "^0.75.
|
|
113
|
-
"@stacksjs/collections": "^0.75.
|
|
114
|
-
"@stacksjs/
|
|
115
|
-
"@stacksjs/
|
|
116
|
-
"@stacksjs/
|
|
117
|
-
"@stacksjs/
|
|
98
|
+
"@stacksjs/actions": "^0.75.41",
|
|
99
|
+
"@stacksjs/ai": "^0.75.41",
|
|
100
|
+
"@stacksjs/alias": "^0.75.41",
|
|
101
|
+
"@stacksjs/analytics": "^0.75.41",
|
|
102
|
+
"@stacksjs/api": "^0.75.41",
|
|
103
|
+
"@stacksjs/arrays": "^0.75.41",
|
|
104
|
+
"@stacksjs/auth": "^0.75.41",
|
|
105
|
+
"@stacksjs/browser-extension": "^0.75.41",
|
|
106
|
+
"@stacksjs/build": "^0.75.41",
|
|
107
|
+
"@stacksjs/cache": "^0.75.41",
|
|
108
|
+
"@stacksjs/chat": "^0.75.41",
|
|
109
|
+
"@stacksjs/clapp": "^0.2.16",
|
|
110
|
+
"@stacksjs/cli": "^0.75.41",
|
|
111
|
+
"@stacksjs/cloud": "^0.75.41",
|
|
112
|
+
"@stacksjs/cms": "^0.75.41",
|
|
113
|
+
"@stacksjs/collections": "^0.75.41",
|
|
114
|
+
"@stacksjs/commerce": "^0.75.41",
|
|
115
|
+
"@stacksjs/config": "^0.75.41",
|
|
116
|
+
"@stacksjs/database": "^0.75.41",
|
|
117
|
+
"@stacksjs/desktop-build": "^0.75.41",
|
|
118
|
+
"@stacksjs/dns": "^0.75.41",
|
|
118
119
|
"@stacksjs/dnsx": "^0.2.3",
|
|
119
|
-
"@stacksjs/email": "^0.75.
|
|
120
|
-
"@stacksjs/enums": "^0.75.
|
|
121
|
-
"@stacksjs/env": "^0.75.
|
|
122
|
-
"@stacksjs/error-handling": "^0.75.
|
|
123
|
-
"@stacksjs/events": "^0.75.
|
|
124
|
-
"@stacksjs/features": "^0.75.
|
|
125
|
-
"@stacksjs/git": "^0.75.
|
|
120
|
+
"@stacksjs/email": "^0.75.41",
|
|
121
|
+
"@stacksjs/enums": "^0.75.41",
|
|
122
|
+
"@stacksjs/env": "^0.75.41",
|
|
123
|
+
"@stacksjs/error-handling": "^0.75.41",
|
|
124
|
+
"@stacksjs/events": "^0.75.41",
|
|
125
|
+
"@stacksjs/features": "^0.75.41",
|
|
126
|
+
"@stacksjs/git": "^0.75.41",
|
|
126
127
|
"@stacksjs/gitit": "^0.2.5",
|
|
127
|
-
"@stacksjs/health": "^0.75.
|
|
128
|
+
"@stacksjs/health": "^0.75.41",
|
|
128
129
|
"@stacksjs/httx": "^0.1.10",
|
|
129
|
-
"@stacksjs/image": "^0.75.
|
|
130
|
-
"@stacksjs/lint": "^0.75.
|
|
131
|
-
"@stacksjs/logging": "^0.75.
|
|
132
|
-
"@stacksjs/notifications": "^0.75.
|
|
133
|
-
"@stacksjs/objects": "^0.75.
|
|
134
|
-
"@stacksjs/orm": "^0.75.
|
|
135
|
-
"@stacksjs/path": "^0.75.
|
|
136
|
-
"@stacksjs/payments": "^0.75.
|
|
137
|
-
"@stacksjs/realtime": "^0.75.
|
|
138
|
-
"@stacksjs/router": "^0.75.
|
|
130
|
+
"@stacksjs/image": "^0.75.41",
|
|
131
|
+
"@stacksjs/lint": "^0.75.41",
|
|
132
|
+
"@stacksjs/logging": "^0.75.41",
|
|
133
|
+
"@stacksjs/notifications": "^0.75.41",
|
|
134
|
+
"@stacksjs/objects": "^0.75.41",
|
|
135
|
+
"@stacksjs/orm": "^0.75.41",
|
|
136
|
+
"@stacksjs/path": "^0.75.41",
|
|
137
|
+
"@stacksjs/payments": "^0.75.41",
|
|
138
|
+
"@stacksjs/realtime": "^0.75.41",
|
|
139
|
+
"@stacksjs/router": "^0.75.41",
|
|
139
140
|
"@stacksjs/rpx": "^0.11.54",
|
|
140
|
-
"@stacksjs/scheduler": "^0.75.
|
|
141
|
-
"@stacksjs/search-engine": "^0.75.
|
|
142
|
-
"@stacksjs/security": "^0.75.
|
|
143
|
-
"@stacksjs/server": "^0.75.
|
|
144
|
-
"@stacksjs/sites": "^0.75.
|
|
145
|
-
"@stacksjs/skills": "^0.75.
|
|
146
|
-
"@stacksjs/storage": "^0.75.
|
|
147
|
-
"@stacksjs/strings": "^0.75.
|
|
148
|
-
"@stacksjs/stx": "^0.2.
|
|
149
|
-
"@stacksjs/testing": "^0.75.
|
|
150
|
-
"@stacksjs/tinker": "^0.75.
|
|
141
|
+
"@stacksjs/scheduler": "^0.75.41",
|
|
142
|
+
"@stacksjs/search-engine": "^0.75.41",
|
|
143
|
+
"@stacksjs/security": "^0.75.41",
|
|
144
|
+
"@stacksjs/server": "^0.75.41",
|
|
145
|
+
"@stacksjs/sites": "^0.75.41",
|
|
146
|
+
"@stacksjs/skills": "^0.75.41",
|
|
147
|
+
"@stacksjs/storage": "^0.75.41",
|
|
148
|
+
"@stacksjs/strings": "^0.75.41",
|
|
149
|
+
"@stacksjs/stx": "^0.2.348",
|
|
150
|
+
"@stacksjs/testing": "^0.75.41",
|
|
151
|
+
"@stacksjs/tinker": "^0.75.41",
|
|
151
152
|
"@stacksjs/tlsx": "^0.13.19",
|
|
152
153
|
"@stacksjs/ts-cloud": "^0.16.15",
|
|
153
|
-
"@stacksjs/tunnel": "^0.75.
|
|
154
|
-
"@stacksjs/types": "^0.75.
|
|
155
|
-
"@stacksjs/ui": "^0.75.
|
|
156
|
-
"@stacksjs/utils": "^0.75.
|
|
157
|
-
"@stacksjs/validation": "^0.75.
|
|
154
|
+
"@stacksjs/tunnel": "^0.75.41",
|
|
155
|
+
"@stacksjs/types": "^0.75.41",
|
|
156
|
+
"@stacksjs/ui": "^0.75.41",
|
|
157
|
+
"@stacksjs/utils": "^0.75.41",
|
|
158
|
+
"@stacksjs/validation": "^0.75.41",
|
|
158
159
|
"ajv": "^8.20.0",
|
|
159
160
|
"ajv-formats": "^3.0.1",
|
|
160
|
-
"bun-plugin-stx": "^0.2.
|
|
161
|
+
"bun-plugin-stx": "^0.2.348",
|
|
161
162
|
"ts-pantry": "^0.11.35"
|
|
162
163
|
},
|
|
163
164
|
"devDependencies": {
|