@stacksjs/desktop-build 0.75.560 → 0.75.562
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/index.d.ts +1 -0
- package/dist/index.js +1 -1
- package/dist/update-feed.d.ts +10 -2
- package/dist/webview-app.d.ts +15 -0
- package/dist/webview-app.js +2 -2
- package/dist/webview-build-record.d.ts +62 -0
- package/dist/webview-build-record.js +3 -0
- package/package.json +10 -10
package/dist/index.d.ts
CHANGED
|
@@ -366,6 +366,7 @@ export * from './webview-agent';
|
|
|
366
366
|
export * from './webview-launcher';
|
|
367
367
|
export * from './webview-app';
|
|
368
368
|
export * from './craft-runtime';
|
|
369
|
+
export * from './webview-build-record';
|
|
369
370
|
export * from './support';
|
|
370
371
|
export * from './macos-app';
|
|
371
372
|
export * from './macos-bundle';
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{closeSync,existsSync,openSync,readSync,statSync}from"node:fs";import{dirname,join}from"node:path";import process from"node:process";import{fileURLToPath}from"node:url";import{craftBinaryNotFoundMessage,resolveCraftBinary as resolveCraftNativeBinary}from"craft-native";export*from"./agent";export*from"./agent-launcher";export*from"./invites";export*from"./updater";export*from"./update-signing";export*from"./update-feed";export*from"./update-install";export*from"./webview-agent";export*from"./webview-launcher";export*from"./webview-app";export*from"./craft-runtime";export*from"./support";export*from"./macos-app";export*from"./macos-bundle";export function resolveCraftBinary(explicit=process.env.CRAFT_BIN){return resolveCraftNativeBinary(explicit)}export function resolveCraftExecutable(explicit=process.env.CRAFT_BIN,findOnPath=(binary)=>Bun.which(binary)){const resolved=resolveCraftBinary(explicit);if(resolved!=="craft")return resolved;const executable=findOnPath(resolved);if(!executable)throw new Error(craftBinaryNotFoundMessage(resolved));return executable}export const USERLAND_LAUNCHER="app/Desktop/launcher.ts";export function hasUserlandDesktopLauncher(projectRoot=process.cwd()){return existsSync(join(projectRoot,USERLAND_LAUNCHER))}export function desktopLauncherCompileArgs(options){return["build","--compile",...options.minify===false?[]:["--minify"],...options.bytecode===false?[]:["--bytecode","--format=esm"],"--no-compile-autoload-bunfig","--no-compile-autoload-dotenv",options.entry,"--outfile",options.outfile]}export function resolveDesktopLauncher(projectRoot=process.cwd()){const userland=join(projectRoot,USERLAND_LAUNCHER);if(existsSync(userland))return userland;const here=dirname(fileURLToPath(import.meta.url));const candidates=[join(here,"launcher.ts"),join(here,"launcher.js")];const launcher=candidates.find((candidate)=>existsSync(candidate));if(!launcher){throw new Error("Desktop launcher entrypoint not found. Reinstall @stacksjs/desktop - the package must ship dist/launcher.js.")}return launcher}export const RESERVED_PLIST_KEYS=new Set(["CFBundleName","CFBundleDisplayName","CFBundleIdentifier","CFBundleVersion","CFBundleShortVersionString","CFBundleExecutable","CFBundlePackageType","CFBundleInfoDictionaryVersion","CFBundleIconFile"]);export function xmlEscape(value){return value.replaceAll("&","&").replaceAll("<","<").replaceAll(">",">").replaceAll('"',""").replaceAll("'","'")}export function plistValue(value,indent=""){if(typeof value==="string")return`<string>${xmlEscape(value)}</string>`;if(typeof value==="boolean")return value?"<true/>":"<false/>";if(typeof value==="number"){if(!Number.isFinite(value))throw new Error(`Unsupported Info.plist number: ${value}`);return Number.isInteger(value)?`<integer>${value}</integer>`:`<real>${value}</real>`}if(Array.isArray(value)){if(value.length===0)return"<array/>";const items=value.map((item)=>`${indent} ${plistValue(item,`${indent} `)}`).join(`
|
|
1
|
+
import{closeSync,existsSync,openSync,readSync,statSync}from"node:fs";import{dirname,join}from"node:path";import process from"node:process";import{fileURLToPath}from"node:url";import{craftBinaryNotFoundMessage,resolveCraftBinary as resolveCraftNativeBinary}from"craft-native";export*from"./agent";export*from"./agent-launcher";export*from"./invites";export*from"./updater";export*from"./update-signing";export*from"./update-feed";export*from"./update-install";export*from"./webview-agent";export*from"./webview-launcher";export*from"./webview-app";export*from"./craft-runtime";export*from"./webview-build-record";export*from"./support";export*from"./macos-app";export*from"./macos-bundle";export function resolveCraftBinary(explicit=process.env.CRAFT_BIN){return resolveCraftNativeBinary(explicit)}export function resolveCraftExecutable(explicit=process.env.CRAFT_BIN,findOnPath=(binary)=>Bun.which(binary)){const resolved=resolveCraftBinary(explicit);if(resolved!=="craft")return resolved;const executable=findOnPath(resolved);if(!executable)throw new Error(craftBinaryNotFoundMessage(resolved));return executable}export const USERLAND_LAUNCHER="app/Desktop/launcher.ts";export function hasUserlandDesktopLauncher(projectRoot=process.cwd()){return existsSync(join(projectRoot,USERLAND_LAUNCHER))}export function desktopLauncherCompileArgs(options){return["build","--compile",...options.minify===false?[]:["--minify"],...options.bytecode===false?[]:["--bytecode","--format=esm"],"--no-compile-autoload-bunfig","--no-compile-autoload-dotenv",options.entry,"--outfile",options.outfile]}export function resolveDesktopLauncher(projectRoot=process.cwd()){const userland=join(projectRoot,USERLAND_LAUNCHER);if(existsSync(userland))return userland;const here=dirname(fileURLToPath(import.meta.url));const candidates=[join(here,"launcher.ts"),join(here,"launcher.js")];const launcher=candidates.find((candidate)=>existsSync(candidate));if(!launcher){throw new Error("Desktop launcher entrypoint not found. Reinstall @stacksjs/desktop - the package must ship dist/launcher.js.")}return launcher}export const RESERVED_PLIST_KEYS=new Set(["CFBundleName","CFBundleDisplayName","CFBundleIdentifier","CFBundleVersion","CFBundleShortVersionString","CFBundleExecutable","CFBundlePackageType","CFBundleInfoDictionaryVersion","CFBundleIconFile"]);export function xmlEscape(value){return value.replaceAll("&","&").replaceAll("<","<").replaceAll(">",">").replaceAll('"',""").replaceAll("'","'")}export function plistValue(value,indent=""){if(typeof value==="string")return`<string>${xmlEscape(value)}</string>`;if(typeof value==="boolean")return value?"<true/>":"<false/>";if(typeof value==="number"){if(!Number.isFinite(value))throw new Error(`Unsupported Info.plist number: ${value}`);return Number.isInteger(value)?`<integer>${value}</integer>`:`<real>${value}</real>`}if(Array.isArray(value)){if(value.length===0)return"<array/>";const items=value.map((item)=>`${indent} ${plistValue(item,`${indent} `)}`).join(`
|
|
2
2
|
`);return`<array>
|
|
3
3
|
${items}
|
|
4
4
|
${indent}</array>`}if(value&&typeof value==="object"){const entries=Object.entries(value);if(entries.length===0)return"<dict/>";const body=entries.map(([key,val])=>`${indent} <key>${xmlEscape(key)}</key>${plistValue(val,`${indent} `)}`).join(`
|
package/dist/update-feed.d.ts
CHANGED
|
@@ -139,8 +139,16 @@ export declare interface AnswerUpdateFeedOptions {
|
|
|
139
139
|
/** One platform and architecture of a release, as release.json lists it. */
|
|
140
140
|
export declare interface ReleaseRecordTarget {
|
|
141
141
|
target: string
|
|
142
|
-
update: { url: string, sha256: string, bytes: number }
|
|
143
|
-
downloads:
|
|
142
|
+
update: { name?: string, format?: string, url: string, sha256: string, bytes: number }
|
|
143
|
+
downloads: ReleaseRecordDownload[]
|
|
144
|
+
}
|
|
145
|
+
/** One installer of a release. `format` is its kind: `dmg`, `msi`, `appimage`, `deb`, `rpm`. */
|
|
146
|
+
export declare interface ReleaseRecordDownload {
|
|
147
|
+
name: string
|
|
148
|
+
format?: string
|
|
149
|
+
url: string
|
|
150
|
+
sha256: string
|
|
151
|
+
bytes: number
|
|
144
152
|
}
|
|
145
153
|
/** release.json: every platform's installers for one version on one channel. What a download page reads. */
|
|
146
154
|
export declare interface ReleaseRecord {
|
package/dist/webview-app.d.ts
CHANGED
|
@@ -71,6 +71,21 @@ export declare function nativeBuildSteps(target: DesktopTargetName): string;
|
|
|
71
71
|
export declare function signtoolArgs(options: { file: string, certificatePath: string, certificatePassword?: string, timestampUrl?: string }): string[];
|
|
72
72
|
/** The file names a release publishes for a target: the one an installed app updates from, and what a person downloads first. */
|
|
73
73
|
export declare function releaseArtifactNames(config: Pick<ResolvedWebviewDesktop, 'appName' | 'version'>, target: DesktopTargetName): { update: string, downloads: string[] };
|
|
74
|
+
/** What kind of file a release artifact is, by its name: `dmg`, `zip`, `msi`, `appimage`, `deb`, `rpm`. */
|
|
75
|
+
export declare function releaseArtifactFormat(name: string): string;
|
|
76
|
+
/**
|
|
77
|
+
* What to say about the identity a Mac build was signed with, when a release
|
|
78
|
+
* could not use it. A build signs with the first identity it finds unless
|
|
79
|
+
* told, and that is often an Apple Development certificate: fine on this Mac,
|
|
80
|
+
* refused by notarization. Nothing when the build was told which to use.
|
|
81
|
+
*/
|
|
82
|
+
export declare function signingIdentityNote(identity: string, chosen: boolean): string | undefined;
|
|
83
|
+
/**
|
|
84
|
+
* Sign an assembled `<App>.app` again with another identity: the runtime
|
|
85
|
+
* first, then the bundle with the app's entitlements, as the build does. What
|
|
86
|
+
* a release does to a bundle that was built with a development identity.
|
|
87
|
+
*/
|
|
88
|
+
export declare function resignWebviewMacosApp(options: { appPath: string, config: Pick<ResolvedWebviewDesktop, 'macos'>, signingIdentity: string, entitlementsPath?: string, run?: BundleCommand }): void;
|
|
74
89
|
/**
|
|
75
90
|
* Why a version must not be published over what a channel already serves, or
|
|
76
91
|
* nothing when it may. A feed that went backwards, or served two different
|
package/dist/webview-app.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import{chmodSync,copyFileSync,existsSync,mkdirSync,readdirSync,readFileSync,rmSync,statSync,writeFileSync}from"node:fs";import{isAbsolute,join,relative,resolve,sep}from"node:path";import process from"node:process";import{codesignArgs,plistValue,renderInfoPlist}from"./index";import{loadDesktopConfig}from"./macos-app";import{makeIcns,runBundleCommand}from"./macos-bundle";import{webviewComponentDirs}from"./webview-agent";import{OPTIONAL_CRAFT_FLAGS,WEBVIEW_RUNTIME_NAME}from"./webview-launcher";export const DESKTOP_TARGETS=["darwin-arm64","darwin-x64","linux-x64","linux-arm64","win32-x64","win32-arm64"];export const WEBVIEW_DEFAULTS={views:"resources/desktop",output:"storage/framework/desktop/webview",width:1280,height:800,minimumSystemVersion:"13.0",category:"public.app-category.developer-tools"};export async function hasWebviewDesktop(root){return Boolean((await loadDesktopConfig(root))?.webview)}export async function loadWebviewDesktop(root,packageVersion="0.0.0"){const config=await loadDesktopConfig(root);return config?.webview?resolveWebviewDesktop(config.webview,packageVersion):null}export function resolveWebviewDesktop(config,packageVersion="0.0.0"){return{...config,version:config.version??packageVersion,window:{...config.window,title:config.window?.title??config.appName,width:config.window?.width??WEBVIEW_DEFAULTS.width,height:config.window?.height??WEBVIEW_DEFAULTS.height},agent:{...config.agent,views:config.agent?.views??WEBVIEW_DEFAULTS.views},output:config.output??WEBVIEW_DEFAULTS.output,executable:config.appName.replace(/[^\w .-]+/g,"").trim()||"App",slug:config.appName.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-|-$/g,"")||"app"}}export function validateWebviewDesktop(config){const errors=[];if(!config.appName?.trim())errors.push("webview.appName is required");if(!/^[a-z0-9-]+(\.[a-z0-9-]+)+$/i.test(config.appId??""))errors.push(`webview.appId must be reverse-DNS, like org.example.app (got ${JSON.stringify(config.appId)})`);if(!/^\d+\.\d+\.\d+(-[0-9A-Za-z.-]+)?$/.test(config.version))errors.push(`webview.version must be a semantic version (got ${JSON.stringify(config.version)})`);for(const scheme of config.urlSchemes??[]){if(!/^[a-z][a-z0-9+.-]*$/i.test(scheme))errors.push(`webview.urlSchemes: ${JSON.stringify(scheme)} is not a URL scheme`)}if(config.updates){try{const url=new URL(config.updates.feedUrl);if(url.protocol!=="https:"&&!["localhost","127.0.0.1"].includes(url.hostname))errors.push("webview.updates.feedUrl must be https")}catch{errors.push(`webview.updates.feedUrl is not a URL (got ${JSON.stringify(config.updates.feedUrl)})`)}const keys=Object.entries(config.updates.publicKeys??{});if(!keys.length)errors.push("webview.updates.publicKeys needs at least one key (run `buddy desktop:update:keypair`)");for(const[id,key]of keys){if(!key.startsWith("ed25519-public:"))errors.push(`webview.updates.publicKeys.${id} is not a public key (it starts with ed25519-public:)`)}}return errors}export function hostDesktopTarget(){return`${process.platform}-${process.arch}`}export function parseDesktopTargets(input,host=hostDesktopTarget()){if(!input?.trim())return[host];if(input.trim()==="all")return[...DESKTOP_TARGETS];const targets=input.split(",").map((part)=>part.trim()).filter(Boolean).map((part)=>{const name=part.replace(/^macos-/,"darwin-").replace(/^windows-/,"win32-");if(!DESKTOP_TARGETS.includes(name))throw new Error(`Unknown desktop target ${JSON.stringify(part)}. Targets: ${DESKTOP_TARGETS.join(", ")}, or all.`);return name});return[...new Set(targets)]}export function splitDesktopTarget(target){const[platform,architecture]=target.split("-");return{platform,architecture}}export function bunCompileTarget(target){const{platform,architecture}=splitDesktopTarget(target);return`bun-${platform==="win32"?"windows":platform}-${architecture}`}export function webviewCompileArgs(options){const cross=options.target!==(options.host??hostDesktopTarget());return["build","--compile",...options.minify===false?[]:["--minify"],...cross?[`--target=${bunCompileTarget(options.target)}`]:["--bytecode","--format=esm"],"--no-compile-autoload-bunfig","--no-compile-autoload-dotenv",...options.target.startsWith("win32-")?["--windows-hide-console"]:[],options.entry,"--outfile",options.outfile]}export function webviewRuntimeFor(config,target,options){const configured=configuredWebviewRuntime(config,target,options);if(configured)return configured;throw new Error(`No Craft runtime for ${target}. Unpack that platform's Craft release and name its binary in desktop.webview.runtime['${target}'] or CRAFT_BIN_${target.replace("-","_").toUpperCase()}.`)}export function configuredWebviewRuntime(config,target,options){const env=options.env??process.env;const variable=`CRAFT_BIN_${target.replace("-","_").toUpperCase()}`;const named=config.runtime?.[target]??env[variable];if(named){const file=isAbsolute(named)?named:resolve(options.root,named);if(!existsSync(file))throw new Error(`The Craft runtime for ${target} does not exist: ${file}`);return file}if(target===(options.host??hostDesktopTarget())&&options.hostRuntime)return options.hostRuntime();return null}export function probeCraftFlags(runtime,flags=OPTIONAL_CRAFT_FLAGS){const binary=readFileSync(runtime);return flags.filter((flag)=>binary.includes(flag))}export function webviewManifest(config,options){return{appName:config.appName,appId:config.appId,version:config.version,runtime:options.runtime,window:{title:config.window.title,width:config.window.width,height:config.window.height,...config.window.darkMode!==undefined?{darkMode:config.window.darkMode}:{},...options.development||config.window.devtools?{devtools:true}:{},...config.window.titlebarHidden?{titlebarHidden:true}:{},...config.window.arguments?.length?{arguments:config.window.arguments}:{}},...config.agent.port?{port:config.agent.port}:{},...config.agent.startPath?{startPath:config.agent.startPath}:{},...config.agent.publicPaths?.length?{publicPaths:config.agent.publicPaths}:{},...config.urlSchemes?.length?{urlSchemes:config.urlSchemes}:{},...config.updates&&!options.development?{updates:{feedUrl:config.updates.feedUrl,publicKeys:config.updates.publicKeys,...config.updates.channel?{channel:config.updates.channel}:{},...config.updates.checkEveryHours!==undefined?{checkEveryHours:config.updates.checkEveryHours}:{}}}:{},...options.runtimeFlags?.length?{runtimeFlags:options.runtimeFlags}:{},...options.sourceRevision?{sourceRevision:options.sourceRevision}:{}}}export function collectViewFiles(directory){const files={};const walk=(current)=>{for(const entry of readdirSync(current).sort()){if(entry===".DS_Store")continue;const file=join(current,entry);if(statSync(file).isDirectory())walk(file);else files[`/${relative(directory,file).split(sep).join("/")}`]=file}};if(existsSync(directory))walk(directory);return files}export const BUN_HARDENED_ENTITLEMENTS={"com.apple.security.cs.allow-jit":true,"com.apple.security.cs.allow-unsigned-executable-memory":true,"com.apple.security.cs.disable-library-validation":true};export function renderWebviewEntitlements(config){return`<?xml version="1.0" encoding="UTF-8"?>
|
|
1
|
+
import{chmodSync,copyFileSync,existsSync,mkdirSync,readdirSync,readFileSync,rmSync,statSync,writeFileSync}from"node:fs";import{basename,dirname,isAbsolute,join,relative,resolve,sep}from"node:path";import process from"node:process";import{codesignArgs,plistValue,renderInfoPlist}from"./index";import{loadDesktopConfig}from"./macos-app";import{makeIcns,runBundleCommand}from"./macos-bundle";import{webviewComponentDirs}from"./webview-agent";import{OPTIONAL_CRAFT_FLAGS,WEBVIEW_RUNTIME_NAME}from"./webview-launcher";export const DESKTOP_TARGETS=["darwin-arm64","darwin-x64","linux-x64","linux-arm64","win32-x64","win32-arm64"];export const WEBVIEW_DEFAULTS={views:"resources/desktop",output:"storage/framework/desktop/webview",width:1280,height:800,minimumSystemVersion:"13.0",category:"public.app-category.developer-tools"};export async function hasWebviewDesktop(root){return Boolean((await loadDesktopConfig(root))?.webview)}export async function loadWebviewDesktop(root,packageVersion="0.0.0"){const config=await loadDesktopConfig(root);return config?.webview?resolveWebviewDesktop(config.webview,packageVersion):null}export function resolveWebviewDesktop(config,packageVersion="0.0.0"){return{...config,version:config.version??packageVersion,window:{...config.window,title:config.window?.title??config.appName,width:config.window?.width??WEBVIEW_DEFAULTS.width,height:config.window?.height??WEBVIEW_DEFAULTS.height},agent:{...config.agent,views:config.agent?.views??WEBVIEW_DEFAULTS.views},output:config.output??WEBVIEW_DEFAULTS.output,executable:config.appName.replace(/[^\w .-]+/g,"").trim()||"App",slug:config.appName.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-|-$/g,"")||"app"}}export function validateWebviewDesktop(config){const errors=[];if(!config.appName?.trim())errors.push("webview.appName is required");if(!/^[a-z0-9-]+(\.[a-z0-9-]+)+$/i.test(config.appId??""))errors.push(`webview.appId must be reverse-DNS, like org.example.app (got ${JSON.stringify(config.appId)})`);if(!/^\d+\.\d+\.\d+(-[0-9A-Za-z.-]+)?$/.test(config.version))errors.push(`webview.version must be a semantic version (got ${JSON.stringify(config.version)})`);for(const scheme of config.urlSchemes??[]){if(!/^[a-z][a-z0-9+.-]*$/i.test(scheme))errors.push(`webview.urlSchemes: ${JSON.stringify(scheme)} is not a URL scheme`)}if(config.updates){try{const url=new URL(config.updates.feedUrl);if(url.protocol!=="https:"&&!["localhost","127.0.0.1"].includes(url.hostname))errors.push("webview.updates.feedUrl must be https")}catch{errors.push(`webview.updates.feedUrl is not a URL (got ${JSON.stringify(config.updates.feedUrl)})`)}const keys=Object.entries(config.updates.publicKeys??{});if(!keys.length)errors.push("webview.updates.publicKeys needs at least one key (run `buddy desktop:update:keypair`)");for(const[id,key]of keys){if(!key.startsWith("ed25519-public:"))errors.push(`webview.updates.publicKeys.${id} is not a public key (it starts with ed25519-public:)`)}}return errors}export function hostDesktopTarget(){return`${process.platform}-${process.arch}`}export function parseDesktopTargets(input,host=hostDesktopTarget()){if(!input?.trim())return[host];if(input.trim()==="all")return[...DESKTOP_TARGETS];const targets=input.split(",").map((part)=>part.trim()).filter(Boolean).map((part)=>{const name=part.replace(/^macos-/,"darwin-").replace(/^windows-/,"win32-");if(!DESKTOP_TARGETS.includes(name))throw new Error(`Unknown desktop target ${JSON.stringify(part)}. Targets: ${DESKTOP_TARGETS.join(", ")}, or all.`);return name});return[...new Set(targets)]}export function splitDesktopTarget(target){const[platform,architecture]=target.split("-");return{platform,architecture}}export function bunCompileTarget(target){const{platform,architecture}=splitDesktopTarget(target);return`bun-${platform==="win32"?"windows":platform}-${architecture}`}export function webviewCompileArgs(options){const cross=options.target!==(options.host??hostDesktopTarget());return["build","--compile",...options.minify===false?[]:["--minify"],...cross?[`--target=${bunCompileTarget(options.target)}`]:["--bytecode","--format=esm"],"--no-compile-autoload-bunfig","--no-compile-autoload-dotenv",...options.target.startsWith("win32-")?["--windows-hide-console"]:[],options.entry,"--outfile",options.outfile]}export function webviewRuntimeFor(config,target,options){const configured=configuredWebviewRuntime(config,target,options);if(configured)return configured;throw new Error(`No Craft runtime for ${target}. Unpack that platform's Craft release and name its binary in desktop.webview.runtime['${target}'] or CRAFT_BIN_${target.replace("-","_").toUpperCase()}.`)}export function configuredWebviewRuntime(config,target,options){const env=options.env??process.env;const variable=`CRAFT_BIN_${target.replace("-","_").toUpperCase()}`;const named=config.runtime?.[target]??env[variable];if(named){const file=isAbsolute(named)?named:resolve(options.root,named);if(!existsSync(file))throw new Error(`The Craft runtime for ${target} does not exist: ${file}`);return file}if(target===(options.host??hostDesktopTarget())&&options.hostRuntime)return options.hostRuntime();return null}export function probeCraftFlags(runtime,flags=OPTIONAL_CRAFT_FLAGS){const binary=readFileSync(runtime);return flags.filter((flag)=>binary.includes(flag))}export function webviewManifest(config,options){return{appName:config.appName,appId:config.appId,version:config.version,runtime:options.runtime,window:{title:config.window.title,width:config.window.width,height:config.window.height,...config.window.darkMode!==undefined?{darkMode:config.window.darkMode}:{},...options.development||config.window.devtools?{devtools:true}:{},...config.window.titlebarHidden?{titlebarHidden:true}:{},...config.window.arguments?.length?{arguments:config.window.arguments}:{}},...config.agent.port?{port:config.agent.port}:{},...config.agent.startPath?{startPath:config.agent.startPath}:{},...config.agent.publicPaths?.length?{publicPaths:config.agent.publicPaths}:{},...config.urlSchemes?.length?{urlSchemes:config.urlSchemes}:{},...config.updates&&!options.development?{updates:{feedUrl:config.updates.feedUrl,publicKeys:config.updates.publicKeys,...config.updates.channel?{channel:config.updates.channel}:{},...config.updates.checkEveryHours!==undefined?{checkEveryHours:config.updates.checkEveryHours}:{}}}:{},...options.runtimeFlags?.length?{runtimeFlags:options.runtimeFlags}:{},...options.sourceRevision?{sourceRevision:options.sourceRevision}:{}}}export function collectViewFiles(directory){const files={};const walk=(current)=>{for(const entry of readdirSync(current).sort()){if(entry===".DS_Store")continue;const file=join(current,entry);if(statSync(file).isDirectory())walk(file);else files[`/${relative(directory,file).split(sep).join("/")}`]=file}};if(existsSync(directory))walk(directory);return files}export const BUN_HARDENED_ENTITLEMENTS={"com.apple.security.cs.allow-jit":true,"com.apple.security.cs.allow-unsigned-executable-memory":true,"com.apple.security.cs.disable-library-validation":true};export function renderWebviewEntitlements(config){return`<?xml version="1.0" encoding="UTF-8"?>
|
|
2
2
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "https://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
3
3
|
<plist version="1.0">
|
|
4
4
|
${plistValue({...BUN_HARDENED_ENTITLEMENTS,...config.macos?.entitlements})}
|
|
5
5
|
</plist>
|
|
6
|
-
`}export function renderWebviewInfoPlist(config,options={}){const schemes=config.urlSchemes??[];return renderInfoPlist({appName:config.appName,bundleId:config.macos?.bundleId??config.appId,version:config.version,executable:config.executable,iconFile:options.iconFile,ownsLauncher:true,declared:{LSMinimumSystemVersion:config.macos?.minimumSystemVersion??WEBVIEW_DEFAULTS.minimumSystemVersion,LSApplicationCategoryType:config.macos?.category??WEBVIEW_DEFAULTS.category,...schemes.length?{CFBundleURLTypes:[{CFBundleURLName:config.appId,CFBundleURLSchemes:schemes}]}:{},...config.macos?.usageDescriptions,...config.macos?.infoPlist}})}export function assembleWebviewMacosApp(options){const{config}=options;const run=options.run??runBundleCommand;const identity=options.signingIdentity??"-";const appPath=join(options.output,`${config.appName}.app`);const macos=join(appPath,"Contents","MacOS");const resources=join(appPath,"Contents","Resources");rmSync(appPath,{recursive:true,force:true});mkdirSync(macos,{recursive:true});mkdirSync(resources,{recursive:true});const executable=join(macos,config.executable);const runtime=join(macos,WEBVIEW_RUNTIME_NAME);copyFileSync(options.agent,executable);copyFileSync(options.runtime,runtime);chmodSync(executable,493);chmodSync(runtime,493);let iconFile;if(config.icon){const icon=resolve(options.root,config.icon);if(!existsSync(icon))throw new Error(`webview.icon does not exist: ${icon}`);if(icon.endsWith(".icns"))copyFileSync(icon,join(resources,"AppIcon.icns"));else makeIcns(icon,join(resources,"AppIcon.icns"),options.output,run);iconFile="AppIcon"}const plist=renderWebviewInfoPlist(config,{iconFile});writeFileSync(join(appPath,"Contents","Info.plist"),plist.xml);const entitlementsPath=join(options.output,`${config.appName}.entitlements`);writeFileSync(entitlementsPath,renderWebviewEntitlements(config));run(codesignArgs({identity,target:runtime}));run(codesignArgs({identity,target:appPath,entitlements:entitlementsPath}));return{appPath,entitlementsPath,ignoredPlistKeys:plist.ignored}}export function webviewPackageConfig(config,target,staged){const{platform,architecture}=splitDesktopTarget(target);const base={name:config.appName,version:config.version,...config.description?{description:config.description}:{},...config.publisher?{author:config.publisher}:{},...config.homepage?{homepage:config.homepage}:{},bundleId:config.appId,binaryPath:staged.binary,...staged.icon?{iconPath:staged.icon}:{},outDir:staged.outDir};if(platform==="win32"){return{...base,platforms:["windows"],windows:{msi:true,zip:true,architecture,...staged.additionalFiles?.length?{additionalFiles:staged.additionalFiles}:{},...config.urlSchemes?.length?{urlSchemes:config.urlSchemes}:{},...config.windows?.certificatePath?{certificatePath:config.windows.certificatePath,...staged.certificatePassword?{certificatePassword:staged.certificatePassword}:{}}:{}}}}return{...base,platforms:["linux"],linux:{appImage:true,deb:true,rpm:true,categories:config.linux?.categories??["Development"],...config.urlSchemes?.length?{urlSchemes:config.urlSchemes}:{},...config.linux?.debDependencies?{debDependencies:config.linux.debDependencies}:{},...config.linux?.rpmDependencies?{rpmDependencies:config.linux.rpmDependencies}:{}}}}export function nativeBuildSteps(target){const{platform}=splitDesktopTarget(target);if(platform==="darwin")return"The .app is assembled and signed with codesign, notarized with notarytool and imaged with hdiutil: macOS only.";if(platform==="win32")return"The MSI is built with WiX (candle, light) and signed with signtool: Windows only.";return"The AppImage (appimagetool), deb (dpkg-deb) and rpm (rpmbuild) are built with Linux tools: Linux only."}export function signtoolArgs(options){return["signtool.exe","sign","/f",options.certificatePath,...options.certificatePassword?["/p",options.certificatePassword]:[],"/fd","SHA256","/tr",options.timestampUrl??"http://timestamp.digicert.com","/td","SHA256",options.file]}export function releaseArtifactNames(config,target){const{platform,architecture}=splitDesktopTarget(target);const base=`${config.appName.replace(/[^\w.-]+/g,"-")}-${config.version}-${architecture}`;if(platform==="darwin")return{update:`${base}.zip`,downloads:[`${base}.dmg`]};if(platform==="win32")return{update:`${base}.msi`,downloads:[]};return{update:`${base}.AppImage`,downloads:[`${base}.deb`,`${base}.rpm`]}}export function releaseVersionProblem(version,published,compare){if(!published)return;const order=compare(version,published);if(order===0)return`${version} is already published. Bump the version; a published build is never replaced under the same number.`;if(order<0)return`${published} is already published, which is newer than ${version}.`;return}export function resolveWebviewComponents(root,components){return(components??[]).map((directory)=>resolve(root,directory))}export function renderViewsBuildScript(options){const pages=relative(options.root,options.viewsDir);const site={name:options.appName,url:"http://127.0.0.1",pagesDir:pages,outDir:options.outDir,publicDir:join(pages,"public"),...webviewComponentDirs(resolveWebviewComponents(options.root,options.components)),sitemap:false,robots:false};return`// Written by buddy build:desktop. Do not edit.
|
|
6
|
+
`}export function renderWebviewInfoPlist(config,options={}){const schemes=config.urlSchemes??[];return renderInfoPlist({appName:config.appName,bundleId:config.macos?.bundleId??config.appId,version:config.version,executable:config.executable,iconFile:options.iconFile,ownsLauncher:true,declared:{LSMinimumSystemVersion:config.macos?.minimumSystemVersion??WEBVIEW_DEFAULTS.minimumSystemVersion,LSApplicationCategoryType:config.macos?.category??WEBVIEW_DEFAULTS.category,...schemes.length?{CFBundleURLTypes:[{CFBundleURLName:config.appId,CFBundleURLSchemes:schemes}]}:{},...config.macos?.usageDescriptions,...config.macos?.infoPlist}})}export function assembleWebviewMacosApp(options){const{config}=options;const run=options.run??runBundleCommand;const identity=options.signingIdentity??"-";const appPath=join(options.output,`${config.appName}.app`);const macos=join(appPath,"Contents","MacOS");const resources=join(appPath,"Contents","Resources");rmSync(appPath,{recursive:true,force:true});mkdirSync(macos,{recursive:true});mkdirSync(resources,{recursive:true});const executable=join(macos,config.executable);const runtime=join(macos,WEBVIEW_RUNTIME_NAME);copyFileSync(options.agent,executable);copyFileSync(options.runtime,runtime);chmodSync(executable,493);chmodSync(runtime,493);let iconFile;if(config.icon){const icon=resolve(options.root,config.icon);if(!existsSync(icon))throw new Error(`webview.icon does not exist: ${icon}`);if(icon.endsWith(".icns"))copyFileSync(icon,join(resources,"AppIcon.icns"));else makeIcns(icon,join(resources,"AppIcon.icns"),options.output,run);iconFile="AppIcon"}const plist=renderWebviewInfoPlist(config,{iconFile});writeFileSync(join(appPath,"Contents","Info.plist"),plist.xml);const entitlementsPath=join(options.output,`${config.appName}.entitlements`);writeFileSync(entitlementsPath,renderWebviewEntitlements(config));run(codesignArgs({identity,target:runtime}));run(codesignArgs({identity,target:appPath,entitlements:entitlementsPath}));return{appPath,entitlementsPath,ignoredPlistKeys:plist.ignored}}export function webviewPackageConfig(config,target,staged){const{platform,architecture}=splitDesktopTarget(target);const base={name:config.appName,version:config.version,...config.description?{description:config.description}:{},...config.publisher?{author:config.publisher}:{},...config.homepage?{homepage:config.homepage}:{},bundleId:config.appId,binaryPath:staged.binary,...staged.icon?{iconPath:staged.icon}:{},outDir:staged.outDir};if(platform==="win32"){return{...base,platforms:["windows"],windows:{msi:true,zip:true,architecture,...staged.additionalFiles?.length?{additionalFiles:staged.additionalFiles}:{},...config.urlSchemes?.length?{urlSchemes:config.urlSchemes}:{},...config.windows?.certificatePath?{certificatePath:config.windows.certificatePath,...staged.certificatePassword?{certificatePassword:staged.certificatePassword}:{}}:{}}}}return{...base,platforms:["linux"],linux:{appImage:true,deb:true,rpm:true,categories:config.linux?.categories??["Development"],...config.urlSchemes?.length?{urlSchemes:config.urlSchemes}:{},...config.linux?.debDependencies?{debDependencies:config.linux.debDependencies}:{},...config.linux?.rpmDependencies?{rpmDependencies:config.linux.rpmDependencies}:{}}}}export function nativeBuildSteps(target){const{platform}=splitDesktopTarget(target);if(platform==="darwin")return"The .app is assembled and signed with codesign, notarized with notarytool and imaged with hdiutil: macOS only.";if(platform==="win32")return"The MSI is built with WiX (candle, light) and signed with signtool: Windows only.";return"The AppImage (appimagetool), deb (dpkg-deb) and rpm (rpmbuild) are built with Linux tools: Linux only."}export function signtoolArgs(options){return["signtool.exe","sign","/f",options.certificatePath,...options.certificatePassword?["/p",options.certificatePassword]:[],"/fd","SHA256","/tr",options.timestampUrl??"http://timestamp.digicert.com","/td","SHA256",options.file]}export function releaseArtifactNames(config,target){const{platform,architecture}=splitDesktopTarget(target);const base=`${config.appName.replace(/[^\w.-]+/g,"-")}-${config.version}-${architecture}`;if(platform==="darwin")return{update:`${base}.zip`,downloads:[`${base}.dmg`]};if(platform==="win32")return{update:`${base}.msi`,downloads:[`${base}.msi`]};return{update:`${base}.AppImage`,downloads:[`${base}.AppImage`,`${base}.deb`,`${base}.rpm`]}}export function releaseArtifactFormat(name){return name.slice(name.lastIndexOf(".")+1).toLowerCase()}export function signingIdentityNote(identity,chosen){if(chosen)return;const fix="Set DESKTOP_SIGNING_IDENTITY (or pass --identity) to a Developer ID Application certificate to build what a release can notarize; `buddy release:desktop --identity` signs it again otherwise.";if(identity==="-")return`Signed ad hoc: it runs on this Mac only. ${fix}`;return`Signed with the Apple Development certificate found on this Mac: it runs here, and cannot be notarized. ${fix}`}export function resignWebviewMacosApp(options){const run=options.run??runBundleCommand;const runtime=join(options.appPath,"Contents","MacOS",WEBVIEW_RUNTIME_NAME);if(!existsSync(runtime))throw new Error(`${options.appPath} has no ${WEBVIEW_RUNTIME_NAME}: it is not a web view app this build made.`);let entitlements=options.entitlementsPath;if(!entitlements||!existsSync(entitlements)){entitlements=join(dirname(options.appPath),`${basename(options.appPath,".app")}.entitlements`);writeFileSync(entitlements,renderWebviewEntitlements(options.config))}run(codesignArgs({identity:options.signingIdentity,target:runtime}));run(codesignArgs({identity:options.signingIdentity,target:options.appPath,entitlements}))}export function releaseVersionProblem(version,published,compare){if(!published)return;const order=compare(version,published);if(order===0)return`${version} is already published. Bump the version; a published build is never replaced under the same number.`;if(order<0)return`${published} is already published, which is newer than ${version}.`;return}export function resolveWebviewComponents(root,components){return(components??[]).map((directory)=>resolve(root,directory))}export function renderViewsBuildScript(options){const pages=relative(options.root,options.viewsDir);const site={name:options.appName,url:"http://127.0.0.1",pagesDir:pages,outDir:options.outDir,publicDir:join(pages,"public"),...webviewComponentDirs(resolveWebviewComponents(options.root,options.components)),sitemap:false,robots:false};return`// Written by buddy build:desktop. Do not edit.
|
|
7
7
|
import { buildStaticSite } from '@stacksjs/stx'
|
|
8
8
|
|
|
9
9
|
await buildStaticSite(${JSON.stringify(site,null,2)})
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import type { DesktopTargetName } from '@stacksjs/types';
|
|
2
|
+
/** A file's entry in a build record. A `.app` is a folder and is recorded by name alone. */
|
|
3
|
+
export declare function describeBuildArtifact(directory: string, name: string): WebviewBuildArtifact;
|
|
4
|
+
/** Installers under a target's `packages` folder, relative to the target's folder. */
|
|
5
|
+
export declare function findPackagedInstallers(directory: string): string[];
|
|
6
|
+
/**
|
|
7
|
+
* The record after targets are added to it: a target already there is
|
|
8
|
+
* replaced, the others stay. A record for another version, app or commit is
|
|
9
|
+
* not added to: its targets are from a different build and are dropped.
|
|
10
|
+
*/
|
|
11
|
+
export declare function mergeBuildRecord(local: WebviewBuildRecord | null, incoming: Pick<WebviewBuildRecord, 'appName' | 'appId' | 'version' | 'sourceRevision' | 'builtOn' | 'bun'>, targets: WebviewBuildTarget[]): { record: WebviewBuildRecord, dropped: DesktopTargetName[] };
|
|
12
|
+
/**
|
|
13
|
+
* Bring targets built on another machine into this project's build record.
|
|
14
|
+
* Refuses anything that is not the same app, version and commit, and any file
|
|
15
|
+
* that is not the one its build recorded. An installer packaged after the
|
|
16
|
+
* record was written (an MSI made from a folder cross-compiled elsewhere) is
|
|
17
|
+
* added as found.
|
|
18
|
+
*/
|
|
19
|
+
export declare function importWebviewBuild(options: ImportWebviewBuildOptions): { imported: ImportedWebviewTarget[], record: WebviewBuildRecord, dropped: DesktopTargetName[], skipped: DesktopTargetName[] };
|
|
20
|
+
/** Add what a packaging step made to a target's entry, and write the record. */
|
|
21
|
+
export declare function recordPackagedInstallers(output: string, target: DesktopTargetName): string[];
|
|
22
|
+
/**
|
|
23
|
+
* `build.json`: what `buddy build:desktop` made, target by target. A release
|
|
24
|
+
* publishes from it, so it is also how a target built on another machine
|
|
25
|
+
* joins a release: its folder and its record are carried over and imported,
|
|
26
|
+
* and every file is checked against the hash its own build wrote down.
|
|
27
|
+
*/
|
|
28
|
+
export declare interface WebviewBuildArtifact {
|
|
29
|
+
name: string
|
|
30
|
+
bytes?: number
|
|
31
|
+
sha256?: string
|
|
32
|
+
}
|
|
33
|
+
export declare interface WebviewBuildTarget {
|
|
34
|
+
target: DesktopTargetName
|
|
35
|
+
directory: string
|
|
36
|
+
artifacts: WebviewBuildArtifact[]
|
|
37
|
+
remaining?: string
|
|
38
|
+
builtOn?: string
|
|
39
|
+
}
|
|
40
|
+
export declare interface WebviewBuildRecord {
|
|
41
|
+
appName: string
|
|
42
|
+
appId: string
|
|
43
|
+
version: string
|
|
44
|
+
sourceRevision: string | null
|
|
45
|
+
builtOn: string
|
|
46
|
+
bun: string
|
|
47
|
+
targets: WebviewBuildTarget[]
|
|
48
|
+
}
|
|
49
|
+
export declare interface ImportWebviewBuildOptions {
|
|
50
|
+
from: string
|
|
51
|
+
output: string
|
|
52
|
+
appId: string
|
|
53
|
+
version: string
|
|
54
|
+
sourceRevision: string
|
|
55
|
+
targets?: readonly DesktopTargetName[]
|
|
56
|
+
host: string
|
|
57
|
+
}
|
|
58
|
+
export declare interface ImportedWebviewTarget {
|
|
59
|
+
target: DesktopTargetName
|
|
60
|
+
directory: string
|
|
61
|
+
unrecorded: string[]
|
|
62
|
+
}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import{createHash}from"node:crypto";import{cpSync,existsSync,mkdirSync,readdirSync,readFileSync,rmSync,writeFileSync}from"node:fs";import{basename,dirname,isAbsolute,join,relative,resolve,sep}from"node:path";export function describeBuildArtifact(directory,name){if(name.endsWith(".app"))return{name};const contents=readFileSync(join(directory,name));return{name,bytes:contents.byteLength,sha256:createHash("sha256").update(contents).digest("hex")}}const INSTALLER_EXTENSIONS=[".msi",".appimage",".deb",".rpm",".dmg"];export function findPackagedInstallers(directory){const packages=join(directory,"packages");if(!existsSync(packages))return[];const found=[];const walk=(folder,depth)=>{for(const entry of readdirSync(folder,{withFileTypes:true})){const file=join(folder,entry.name);if(entry.isDirectory()&&depth<2)walk(file,depth+1);else if(entry.isFile()&&INSTALLER_EXTENSIONS.some((extension)=>entry.name.toLowerCase().endsWith(extension)))found.push(relative(directory,file).split(sep).join("/"))}};walk(packages,0);return found.sort()}function inside(parent,child){const path=relative(parent,child);return path!==""&&!path.startsWith("..")&&!isAbsolute(path)}export function mergeBuildRecord(local,incoming,targets){const same=local&&local.appId===incoming.appId&&local.version===incoming.version&&local.sourceRevision===incoming.sourceRevision;const added=new Set(targets.map((item)=>item.target));const kept=same?local.targets.filter((item)=>!added.has(item.target)):[];const base=same?local:{appName:incoming.appName,appId:incoming.appId,version:incoming.version,sourceRevision:incoming.sourceRevision,builtOn:incoming.builtOn,bun:incoming.bun};return{record:{...base,targets:[...kept,...targets].sort((a,b)=>a.target.localeCompare(b.target))},dropped:!same&&local?local.targets.map((item)=>item.target).filter((target)=>!added.has(target)):[]}}export function importWebviewBuild(options){const from=resolve(options.from);let recordFile=join(from,"build.json");let only;if(!existsSync(recordFile)){recordFile=join(dirname(from),"build.json");only=basename(from);if(!existsSync(recordFile))throw new Error(`${from} has no build.json, and neither does the folder above it. Import the folder \`buddy build:desktop\` wrote on the other machine, with its build.json.`)}const recordDir=dirname(recordFile);let foreign;try{foreign=JSON.parse(readFileSync(recordFile,"utf8"))}catch{throw new Error(`${recordFile} is not a build record.`)}if(!foreign||!Array.isArray(foreign.targets))throw new Error(`${recordFile} is not a build record.`);if(foreign.appId!==options.appId)throw new Error(`${recordFile} is a build of ${foreign.appId}, not ${options.appId}.`);if(foreign.version!==options.version)throw new Error(`${recordFile} is version ${foreign.version}, but this project is at ${options.version}.`);if(foreign.sourceRevision!==options.sourceRevision)throw new Error(`${recordFile} was built from ${String(foreign.sourceRevision).slice(0,12)}, but this checkout is at ${options.sourceRevision.slice(0,12)}. A release is one commit: check out the commit it was built from, or build it again from this one.`);const asked=foreign.targets.filter((item)=>(!only||item.directory===only||item.target===only)&&(!options.targets?.length||options.targets.includes(item.target)));const explicit=Boolean(only||options.targets?.length);const present=(item)=>typeof item.directory==="string"&&inside(recordDir,resolve(recordDir,item.directory))&&existsSync(resolve(recordDir,item.directory));const wanted=explicit?asked:asked.filter(present);const skipped=explicit?[]:asked.filter((item)=>!present(item)).map((item)=>item.target);if(!wanted.length)throw new Error(`${recordFile} lists none of the targets asked for (it has: ${foreign.targets.map((item)=>item.target).join(", ")||"none"}).`);const checked=wanted.map((item)=>{if(!/^[a-z0-9]+-[a-z0-9_]+$/.test(item.target))throw new Error(`${recordFile}: ${String(item.target)} is not a target.`);const source=resolve(recordDir,item.directory);if(!inside(recordDir,source)||!existsSync(source))throw new Error(`${item.target}: its folder ${item.directory} is not beside ${recordFile}.`);for(const artifact of item.artifacts){const file=resolve(source,artifact.name);if(!inside(source,file))throw new Error(`${item.target}: ${artifact.name} is not inside its folder.`);if(!existsSync(file))throw new Error(`${item.target}: ${artifact.name} is in the record but not in ${source}.`);if(!artifact.sha256)continue;const actual=describeBuildArtifact(source,artifact.name);if(actual.sha256!==artifact.sha256||actual.bytes!==artifact.bytes)throw new Error(`${item.target}: ${artifact.name} is not the file that was built (sha256 ${actual.sha256}, the record says ${artifact.sha256}).`)}const listed=new Set(item.artifacts.map((artifact)=>artifact.name));const unrecorded=findPackagedInstallers(source).filter((name)=>!listed.has(name));return{item,source,unrecorded}});const output=resolve(options.output);mkdirSync(output,{recursive:true});const imported=[];const targets=[];for(const{item,source,unrecorded}of checked){const directory=join(output,item.target);if(resolve(source)!==directory){rmSync(directory,{recursive:true,force:true});cpSync(source,directory,{recursive:true,verbatimSymlinks:true})}targets.push({target:item.target,directory:item.target,artifacts:[...item.artifacts,...unrecorded.map((name)=>describeBuildArtifact(directory,name))],...item.remaining&&!unrecorded.length?{remaining:item.remaining}:{},builtOn:item.builtOn??foreign.builtOn});imported.push({target:item.target,directory,unrecorded})}const localFile=join(output,"build.json");let local=null;if(existsSync(localFile)&&resolve(localFile)!==resolve(recordFile)){try{local=JSON.parse(readFileSync(localFile,"utf8"))}catch{local=null}}else if(resolve(localFile)===resolve(recordFile)){local=foreign}const merged=mergeBuildRecord(local&&Array.isArray(local.targets)?local:null,{appName:foreign.appName,appId:foreign.appId,version:foreign.version,sourceRevision:foreign.sourceRevision,builtOn:options.host,bun:foreign.bun},targets);writeFileSync(localFile,`${JSON.stringify(merged.record,null,2)}
|
|
2
|
+
`);return{imported,record:merged.record,dropped:merged.dropped,skipped}}export function recordPackagedInstallers(output,target){const file=join(output,"build.json");const record=JSON.parse(readFileSync(file,"utf8"));const entry=record.targets.find((item)=>item.target===target);if(!entry)throw new Error(`${file} has no ${target}.`);const directory=join(output,entry.directory);const found=findPackagedInstallers(directory);const others=entry.artifacts.filter((artifact)=>!found.includes(artifact.name));const added=found.filter((name)=>!entry.artifacts.some((artifact)=>artifact.name===name));entry.artifacts=[...others,...found.map((name)=>describeBuildArtifact(directory,name))];if(found.length)delete entry.remaining;writeFileSync(file,`${JSON.stringify(record,null,2)}
|
|
3
|
+
`);return added}
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@stacksjs/desktop-build",
|
|
3
3
|
"type": "module",
|
|
4
4
|
"sideEffects": false,
|
|
5
|
-
"version": "0.75.
|
|
5
|
+
"version": "0.75.562",
|
|
6
6
|
"description": "Build and launch Craft desktop applications for Stacks",
|
|
7
7
|
"author": "Chris Breuer",
|
|
8
8
|
"contributors": [
|
|
@@ -73,17 +73,17 @@
|
|
|
73
73
|
"prepublishOnly": "bun run build"
|
|
74
74
|
},
|
|
75
75
|
"dependencies": {
|
|
76
|
-
"@stacksjs/config": "0.75.
|
|
77
|
-
"@stacksjs/router": "0.75.
|
|
78
|
-
"@stacksjs/server": "0.75.
|
|
79
|
-
"@stacksjs/storage": "0.75.
|
|
76
|
+
"@stacksjs/config": "0.75.562",
|
|
77
|
+
"@stacksjs/router": "0.75.562",
|
|
78
|
+
"@stacksjs/server": "0.75.562",
|
|
79
|
+
"@stacksjs/storage": "0.75.562",
|
|
80
80
|
"craft-native": ">=0.0.499"
|
|
81
81
|
},
|
|
82
82
|
"peerDependencies": {
|
|
83
|
-
"@stacksjs/config": "0.75.
|
|
84
|
-
"@stacksjs/router": "0.75.
|
|
85
|
-
"@stacksjs/server": "0.75.
|
|
86
|
-
"@stacksjs/storage": "0.75.
|
|
83
|
+
"@stacksjs/config": "0.75.562",
|
|
84
|
+
"@stacksjs/router": "0.75.562",
|
|
85
|
+
"@stacksjs/server": "0.75.562",
|
|
86
|
+
"@stacksjs/storage": "0.75.562"
|
|
87
87
|
},
|
|
88
88
|
"peerDependenciesMeta": {
|
|
89
89
|
"@stacksjs/config": {
|
|
@@ -100,7 +100,7 @@
|
|
|
100
100
|
}
|
|
101
101
|
},
|
|
102
102
|
"devDependencies": {
|
|
103
|
-
"@stacksjs/build": "0.75.
|
|
103
|
+
"@stacksjs/build": "0.75.562",
|
|
104
104
|
"better-dx": "^0.2.24"
|
|
105
105
|
}
|
|
106
106
|
}
|