@opentray/esbuild-plugin 0.15.0 → 0.17.0

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/README.md CHANGED
@@ -28,3 +28,8 @@ lifecycle, sessions, backend selection, or extension dispatch.
28
28
  `outDir` is resolved from the esbuild `outdir`/`outfile` option, relative to the
29
29
  esbuild `absWorkingDir`. Pass `outDir` or `mode` in the plugin options to override
30
30
  them. `entry` is inferred from `entryPoints` unless given explicitly.
31
+
32
+ `openTrayAppBundlePlugin()` is the Darwin `onEnd` adapter for prebuilding a
33
+ validated app bundle. Pass `packageName`, `appId`, `appName`, `target`,
34
+ `brokerPath`, `templatePath`, and optional `appIcon`; output defaults to
35
+ `<outdir>/<appName>.app`.
package/dist/index.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import { OpenTrayArtifactInput, OpenTrayPackageManifest, OpenTrayPackageResult, OpenTrayPackagingApp } from "@opentray/packaging";
1
+ import { DarwinAppBundleOptions, OpenTrayArtifactInput, OpenTrayDarwinAppBundleResult, OpenTrayPackageManifest, OpenTrayPackageResult, OpenTrayPackagingApp } from "@opentray/packaging";
2
2
 
3
3
  //#region src/index.d.ts
4
4
  interface OpenTrayEsbuildPluginOptions {
@@ -41,8 +41,17 @@ interface OpenTrayEsbuildPlugin extends EsbuildPlugin {
41
41
  /** Returns the last staging result. Only populated after `onEnd` runs. */
42
42
  readonly getLastResult: () => OpenTrayPackageResult | undefined;
43
43
  }
44
+ interface OpenTrayEsbuildAppBundlePluginOptions extends Omit<DarwinAppBundleOptions, "bundlePath" | "reinitialize"> {
45
+ readonly bundlePath?: string;
46
+ }
47
+ interface OpenTrayEsbuildAppBundlePlugin extends EsbuildPlugin {
48
+ readonly name: "opentray-app-bundle";
49
+ readonly getLastResult: () => OpenTrayDarwinAppBundleResult | undefined;
50
+ }
51
+ /** esbuild lifecycle adapter for the shared Darwin app bundle contract. */
52
+ declare const openTrayAppBundlePlugin: (options: OpenTrayEsbuildAppBundlePluginOptions) => OpenTrayEsbuildAppBundlePlugin;
44
53
  declare const openTrayEsbuildPlugin: (options: OpenTrayEsbuildPluginOptions) => OpenTrayEsbuildPlugin;
45
54
  declare const resolveEsbuildEntry: (initialOptions: EsbuildInitialOptionsLike) => string;
46
55
  //#endregion
47
- export { EsbuildBuildLike, EsbuildInitialOptionsLike, EsbuildPlugin, OpenTrayEsbuildPlugin, OpenTrayEsbuildPluginOptions, type OpenTrayPackageManifest, type OpenTrayPackageResult, openTrayEsbuildPlugin, resolveEsbuildEntry };
56
+ export { EsbuildBuildLike, EsbuildInitialOptionsLike, EsbuildPlugin, OpenTrayEsbuildAppBundlePlugin, OpenTrayEsbuildAppBundlePluginOptions, OpenTrayEsbuildPlugin, OpenTrayEsbuildPluginOptions, type OpenTrayPackageManifest, type OpenTrayPackageResult, openTrayAppBundlePlugin, openTrayEsbuildPlugin, resolveEsbuildEntry };
48
57
  //# sourceMappingURL=index.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.mts","names":[],"sources":["../src/index.ts"],"mappings":";;;UAUiB,4BAAA;EAAA,SACN,GAAA,EAAK,oBAAA;EAAA,SACL,WAAA,EAAa,qBAAA;EAAA,SACb,eAAA,GAAkB,QAAA,CAAS,MAAA,SAAe,qBAAA;EAAA,SAC1C,eAAA,GAAkB,QAAA,CAAS,MAAA,SAAe,qBAAA;EAAA,SAC1C,KAAA;EAAA,SACA,YAAA;EAH0C;;;;EAAA,SAQ1C,MAAA;EAPkB;;;EAAA,SAWlB,IAAA;AAAA;;;;;UAOM,yBAAA;EAAA,SACN,MAAA;EAAA,SACA,OAAA;EAAA,SACA,WAAA,uBAAkC,QAAQ,CAAC,MAAA;EAAA,SAC3C,aAAA;AAAA;AAAA,UAGM,gBAAA;EAAA,SACN,cAAA,EAAgB,yBAAA;EACzB,KAAA,CAAM,QAAA,GAAW,MAAA,cAAoB,OAAO;AAAA;AAAA,UAG7B,aAAA;EAAA,SACN,IAAA;EAAA,SACA,KAAA,GAAQ,KAAA,EAAO,gBAAgB;AAAA;AAAA,UAGzB,qBAAA,SAA8B,aAAa;EAAA,SACjD,IAAA;EAjBA;EAAA,SAmBA,aAAA,QAAqB,qBAAA;AAAA;AAAA,cAGnB,qBAAA,GACX,OAAA,EAAS,4BAAA,KACR,qBA+BF;AAAA,cAmBY,mBAAA,GAAuB,cAAyC,EAAzB,yBAAyB"}
1
+ {"version":3,"file":"index.d.mts","names":[],"sources":["../src/index.ts"],"mappings":";;;UAaiB,4BAAA;EAAA,SACN,GAAA,EAAK,oBAAA;EAAA,SACL,WAAA,EAAa,qBAAA;EAAA,SACb,eAAA,GAAkB,QAAA,CAAS,MAAA,SAAe,qBAAA;EAAA,SAC1C,eAAA,GAAkB,QAAA,CAAS,MAAA,SAAe,qBAAA;EAAA,SAC1C,KAAA;EAAA,SACA,YAAA;EAH0C;;;;EAAA,SAQ1C,MAAA;EAPkB;;;EAAA,SAWlB,IAAA;AAAA;;;;;UAOM,yBAAA;EAAA,SACN,MAAA;EAAA,SACA,OAAA;EAAA,SACA,WAAA,uBAAkC,QAAQ,CAAC,MAAA;EAAA,SAC3C,aAAA;AAAA;AAAA,UAGM,gBAAA;EAAA,SACN,cAAA,EAAgB,yBAAA;EACzB,KAAA,CAAM,QAAA,GAAW,MAAA,cAAoB,OAAO;AAAA;AAAA,UAG7B,aAAA;EAAA,SACN,IAAA;EAAA,SACA,KAAA,GAAQ,KAAA,EAAO,gBAAgB;AAAA;AAAA,UAGzB,qBAAA,SAA8B,aAAa;EAAA,SACjD,IAAA;EAjBA;EAAA,SAmBA,aAAA,QAAqB,qBAAA;AAAA;AAAA,UAGf,qCAAA,SACP,IAAI,CAAC,sBAAA;EAAA,SACJ,UAAA;AAAA;AAAA,UAGM,8BAAA,SAAuC,aAAa;EAAA,SAC1D,IAAA;EAAA,SACA,aAAA,QAAqB,6BAAA;AAAA;;cAInB,uBAAA,GACX,OAAA,EAAS,qCAAA,KACR,8BAgBF;AAAA,cAEY,qBAAA,GACX,OAAA,EAAS,4BAAA,KACR,qBA+BF;AAAA,cAgCY,mBAAA,GAAuB,cAAyC,EAAzB,yBAAyB"}
package/dist/index.mjs CHANGED
@@ -1,6 +1,24 @@
1
- import { dirname, resolve } from "node:path";
2
- import { stageOpenTrayPackage } from "@opentray/packaging";
1
+ import { dirname, join, resolve } from "node:path";
2
+ import { buildDarwinAppBundle, stageOpenTrayPackage } from "@opentray/packaging";
3
3
  //#region src/index.ts
4
+ /** esbuild lifecycle adapter for the shared Darwin app bundle contract. */
5
+ const openTrayAppBundlePlugin = (options) => {
6
+ let lastResult;
7
+ return {
8
+ name: "opentray-app-bundle",
9
+ setup(build) {
10
+ build.onEnd(async () => {
11
+ const cwd = build.initialOptions.absWorkingDir ?? process.cwd();
12
+ const bundlePath = options.bundlePath === void 0 ? join(resolveEsbuildBundleOutputDir(build.initialOptions, cwd), `${options.appName}.app`) : resolve(cwd, options.bundlePath);
13
+ lastResult = await buildDarwinAppBundle({
14
+ ...options,
15
+ bundlePath
16
+ });
17
+ });
18
+ },
19
+ getLastResult: () => lastResult
20
+ };
21
+ };
4
22
  const openTrayEsbuildPlugin = (options) => {
5
23
  let lastResult;
6
24
  const plugin = {
@@ -34,6 +52,11 @@ const resolveEsbuildOutDir = (options, initialOptions) => {
34
52
  if (initialOptions.outfile !== void 0 && initialOptions.outfile.length > 0) return resolve(cwd, dirname(initialOptions.outfile));
35
53
  return resolve(process.cwd(), "dist");
36
54
  };
55
+ const resolveEsbuildBundleOutputDir = (initialOptions, cwd) => {
56
+ if (initialOptions.outdir !== void 0 && initialOptions.outdir.length > 0) return resolve(cwd, initialOptions.outdir);
57
+ if (initialOptions.outfile !== void 0 && initialOptions.outfile.length > 0) return resolve(cwd, dirname(initialOptions.outfile));
58
+ return resolve(cwd, "dist");
59
+ };
37
60
  const resolveEsbuildEntry = (initialOptions) => {
38
61
  const entryPoints = initialOptions.entryPoints;
39
62
  if (entryPoints === void 0) throw new Error("OpenTray esbuild packaging requires esbuild entryPoints or an explicit entry option");
@@ -46,6 +69,6 @@ const resolveEsbuildEntry = (initialOptions) => {
46
69
  return first;
47
70
  };
48
71
  //#endregion
49
- export { openTrayEsbuildPlugin, resolveEsbuildEntry };
72
+ export { openTrayAppBundlePlugin, openTrayEsbuildPlugin, resolveEsbuildEntry };
50
73
 
51
74
  //# sourceMappingURL=index.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","names":[],"sources":["../src/index.ts"],"sourcesContent":["import { dirname, resolve } from \"node:path\";\n\nimport {\n stageOpenTrayPackage,\n type OpenTrayArtifactInput,\n type OpenTrayPackagingApp,\n type OpenTrayPackageManifest,\n type OpenTrayPackageResult,\n} from \"@opentray/packaging\";\n\nexport interface OpenTrayEsbuildPluginOptions {\n readonly app: OpenTrayPackagingApp;\n readonly runtimeHost: OpenTrayArtifactInput;\n readonly nativeArtifacts?: Readonly<Record<string, OpenTrayArtifactInput>>;\n readonly companionAssets?: Readonly<Record<string, OpenTrayArtifactInput>>;\n readonly entry?: string;\n readonly manifestPath?: string;\n /**\n * Explicit outDir override. When omitted, resolved from the esbuild\n * `outdir`/`outfile` option or defaults to `dist`.\n */\n readonly outDir?: string;\n /**\n * Explicit mode override. Defaults to `production`.\n */\n readonly mode?: string;\n}\n\n/**\n * Structural view of the esbuild initial options the adapter consumes. Only the\n * staging-relevant fields are declared, so esbuild never has to be imported.\n */\nexport interface EsbuildInitialOptionsLike {\n readonly outdir?: string;\n readonly outfile?: string;\n readonly entryPoints?: readonly string[] | Readonly<Record<string, string>>;\n readonly absWorkingDir?: string;\n}\n\nexport interface EsbuildBuildLike {\n readonly initialOptions: EsbuildInitialOptionsLike;\n onEnd(callback: (result: unknown) => Promise<void> | void): void;\n}\n\nexport interface EsbuildPlugin {\n readonly name: string;\n readonly setup: (build: EsbuildBuildLike) => void;\n}\n\nexport interface OpenTrayEsbuildPlugin extends EsbuildPlugin {\n readonly name: \"opentray-packaging\";\n /** Returns the last staging result. Only populated after `onEnd` runs. */\n readonly getLastResult: () => OpenTrayPackageResult | undefined;\n}\n\nexport const openTrayEsbuildPlugin = (\n options: OpenTrayEsbuildPluginOptions,\n): OpenTrayEsbuildPlugin => {\n let lastResult: OpenTrayPackageResult | undefined;\n\n // esbuild validates the enumerable own keys of a plugin object and rejects\n // anything beyond { name, setup }. Keep `getLastResult` non-enumerable so the\n // adapter can still expose the staging result to programmatic callers without\n // tripping esbuild's plugin validation.\n const plugin: OpenTrayEsbuildPlugin = {\n name: \"opentray-packaging\",\n setup(build) {\n build.onEnd(async () => {\n lastResult = await stageOpenTrayPackage({\n app: options.app,\n outDir: resolveEsbuildOutDir(options, build.initialOptions),\n entry: options.entry ?? resolveEsbuildEntry(build.initialOptions),\n adapter: { name: \"esbuild\", mode: options.mode ?? \"production\" },\n runtimeHost: options.runtimeHost,\n ...(options.nativeArtifacts === undefined\n ? {}\n : { nativeArtifacts: options.nativeArtifacts }),\n ...(options.companionAssets === undefined\n ? {}\n : { companionAssets: options.companionAssets }),\n ...(options.manifestPath === undefined ? {} : { manifestPath: options.manifestPath }),\n });\n });\n },\n getLastResult: () => lastResult,\n };\n Object.defineProperty(plugin, \"getLastResult\", { enumerable: false });\n return plugin;\n};\n\nconst resolveEsbuildOutDir = (\n options: OpenTrayEsbuildPluginOptions,\n initialOptions: EsbuildInitialOptionsLike,\n): string => {\n const cwd = initialOptions.absWorkingDir ?? process.cwd();\n if (options.outDir !== undefined) {\n return resolve(cwd, options.outDir);\n }\n if (initialOptions.outdir !== undefined && initialOptions.outdir.length > 0) {\n return resolve(cwd, initialOptions.outdir);\n }\n if (initialOptions.outfile !== undefined && initialOptions.outfile.length > 0) {\n return resolve(cwd, dirname(initialOptions.outfile));\n }\n return resolve(process.cwd(), \"dist\");\n};\n\nexport const resolveEsbuildEntry = (initialOptions: EsbuildInitialOptionsLike): string => {\n const entryPoints = initialOptions.entryPoints;\n if (entryPoints === undefined) {\n throw new Error(\n \"OpenTray esbuild packaging requires esbuild entryPoints or an explicit entry option\",\n );\n }\n if (Array.isArray(entryPoints)) {\n if (entryPoints.length === 0) {\n throw new Error(\n \"OpenTray esbuild packaging requires esbuild entryPoints or an explicit entry option\",\n );\n }\n return entryPoints[0] as string;\n }\n const first = Object.values(entryPoints)[0];\n if (first === undefined) {\n throw new Error(\n \"OpenTray esbuild packaging requires esbuild entryPoints or an explicit entry option\",\n );\n }\n return first;\n};\n\nexport type { OpenTrayPackageManifest, OpenTrayPackageResult };\n"],"mappings":";;;AAuDA,MAAa,yBACX,YAC0B;CAC1B,IAAI;CAMJ,MAAM,SAAgC;EACpC,MAAM;EACN,MAAM,OAAO;GACX,MAAM,MAAM,YAAY;IACtB,aAAa,MAAM,qBAAqB;KACtC,KAAK,QAAQ;KACb,QAAQ,qBAAqB,SAAS,MAAM,cAAc;KAC1D,OAAO,QAAQ,SAAS,oBAAoB,MAAM,cAAc;KAChE,SAAS;MAAE,MAAM;MAAW,MAAM,QAAQ,QAAQ;KAAa;KAC/D,aAAa,QAAQ;KACrB,GAAI,QAAQ,oBAAoB,KAAA,IAC5B,CAAC,IACD,EAAE,iBAAiB,QAAQ,gBAAgB;KAC/C,GAAI,QAAQ,oBAAoB,KAAA,IAC5B,CAAC,IACD,EAAE,iBAAiB,QAAQ,gBAAgB;KAC/C,GAAI,QAAQ,iBAAiB,KAAA,IAAY,CAAC,IAAI,EAAE,cAAc,QAAQ,aAAa;IACrF,CAAC;GACH,CAAC;EACH;EACA,qBAAqB;CACvB;CACA,OAAO,eAAe,QAAQ,iBAAiB,EAAE,YAAY,MAAM,CAAC;CACpE,OAAO;AACT;AAEA,MAAM,wBACJ,SACA,mBACW;CACX,MAAM,MAAM,eAAe,iBAAiB,QAAQ,IAAI;CACxD,IAAI,QAAQ,WAAW,KAAA,GACrB,OAAO,QAAQ,KAAK,QAAQ,MAAM;CAEpC,IAAI,eAAe,WAAW,KAAA,KAAa,eAAe,OAAO,SAAS,GACxE,OAAO,QAAQ,KAAK,eAAe,MAAM;CAE3C,IAAI,eAAe,YAAY,KAAA,KAAa,eAAe,QAAQ,SAAS,GAC1E,OAAO,QAAQ,KAAK,QAAQ,eAAe,OAAO,CAAC;CAErD,OAAO,QAAQ,QAAQ,IAAI,GAAG,MAAM;AACtC;AAEA,MAAa,uBAAuB,mBAAsD;CACxF,MAAM,cAAc,eAAe;CACnC,IAAI,gBAAgB,KAAA,GAClB,MAAM,IAAI,MACR,qFACF;CAEF,IAAI,MAAM,QAAQ,WAAW,GAAG;EAC9B,IAAI,YAAY,WAAW,GACzB,MAAM,IAAI,MACR,qFACF;EAEF,OAAO,YAAY;CACrB;CACA,MAAM,QAAQ,OAAO,OAAO,WAAW,EAAE;CACzC,IAAI,UAAU,KAAA,GACZ,MAAM,IAAI,MACR,qFACF;CAEF,OAAO;AACT"}
1
+ {"version":3,"file":"index.mjs","names":[],"sources":["../src/index.ts"],"sourcesContent":["import { dirname, join, resolve } from \"node:path\";\n\nimport {\n buildDarwinAppBundle,\n stageOpenTrayPackage,\n type DarwinAppBundleOptions,\n type OpenTrayArtifactInput,\n type OpenTrayPackagingApp,\n type OpenTrayPackageManifest,\n type OpenTrayPackageResult,\n type OpenTrayDarwinAppBundleResult,\n} from \"@opentray/packaging\";\n\nexport interface OpenTrayEsbuildPluginOptions {\n readonly app: OpenTrayPackagingApp;\n readonly runtimeHost: OpenTrayArtifactInput;\n readonly nativeArtifacts?: Readonly<Record<string, OpenTrayArtifactInput>>;\n readonly companionAssets?: Readonly<Record<string, OpenTrayArtifactInput>>;\n readonly entry?: string;\n readonly manifestPath?: string;\n /**\n * Explicit outDir override. When omitted, resolved from the esbuild\n * `outdir`/`outfile` option or defaults to `dist`.\n */\n readonly outDir?: string;\n /**\n * Explicit mode override. Defaults to `production`.\n */\n readonly mode?: string;\n}\n\n/**\n * Structural view of the esbuild initial options the adapter consumes. Only the\n * staging-relevant fields are declared, so esbuild never has to be imported.\n */\nexport interface EsbuildInitialOptionsLike {\n readonly outdir?: string;\n readonly outfile?: string;\n readonly entryPoints?: readonly string[] | Readonly<Record<string, string>>;\n readonly absWorkingDir?: string;\n}\n\nexport interface EsbuildBuildLike {\n readonly initialOptions: EsbuildInitialOptionsLike;\n onEnd(callback: (result: unknown) => Promise<void> | void): void;\n}\n\nexport interface EsbuildPlugin {\n readonly name: string;\n readonly setup: (build: EsbuildBuildLike) => void;\n}\n\nexport interface OpenTrayEsbuildPlugin extends EsbuildPlugin {\n readonly name: \"opentray-packaging\";\n /** Returns the last staging result. Only populated after `onEnd` runs. */\n readonly getLastResult: () => OpenTrayPackageResult | undefined;\n}\n\nexport interface OpenTrayEsbuildAppBundlePluginOptions\n extends Omit<DarwinAppBundleOptions, \"bundlePath\" | \"reinitialize\"> {\n readonly bundlePath?: string;\n}\n\nexport interface OpenTrayEsbuildAppBundlePlugin extends EsbuildPlugin {\n readonly name: \"opentray-app-bundle\";\n readonly getLastResult: () => OpenTrayDarwinAppBundleResult | undefined;\n}\n\n/** esbuild lifecycle adapter for the shared Darwin app bundle contract. */\nexport const openTrayAppBundlePlugin = (\n options: OpenTrayEsbuildAppBundlePluginOptions,\n): OpenTrayEsbuildAppBundlePlugin => {\n let lastResult: OpenTrayDarwinAppBundleResult | undefined;\n return {\n name: \"opentray-app-bundle\",\n setup(build) {\n build.onEnd(async () => {\n const cwd = build.initialOptions.absWorkingDir ?? process.cwd();\n const bundlePath =\n options.bundlePath === undefined\n ? join(resolveEsbuildBundleOutputDir(build.initialOptions, cwd), `${options.appName}.app`)\n : resolve(cwd, options.bundlePath);\n lastResult = await buildDarwinAppBundle({ ...options, bundlePath });\n });\n },\n getLastResult: () => lastResult,\n };\n};\n\nexport const openTrayEsbuildPlugin = (\n options: OpenTrayEsbuildPluginOptions,\n): OpenTrayEsbuildPlugin => {\n let lastResult: OpenTrayPackageResult | undefined;\n\n // esbuild validates the enumerable own keys of a plugin object and rejects\n // anything beyond { name, setup }. Keep `getLastResult` non-enumerable so the\n // adapter can still expose the staging result to programmatic callers without\n // tripping esbuild's plugin validation.\n const plugin: OpenTrayEsbuildPlugin = {\n name: \"opentray-packaging\",\n setup(build) {\n build.onEnd(async () => {\n lastResult = await stageOpenTrayPackage({\n app: options.app,\n outDir: resolveEsbuildOutDir(options, build.initialOptions),\n entry: options.entry ?? resolveEsbuildEntry(build.initialOptions),\n adapter: { name: \"esbuild\", mode: options.mode ?? \"production\" },\n runtimeHost: options.runtimeHost,\n ...(options.nativeArtifacts === undefined\n ? {}\n : { nativeArtifacts: options.nativeArtifacts }),\n ...(options.companionAssets === undefined\n ? {}\n : { companionAssets: options.companionAssets }),\n ...(options.manifestPath === undefined ? {} : { manifestPath: options.manifestPath }),\n });\n });\n },\n getLastResult: () => lastResult,\n };\n Object.defineProperty(plugin, \"getLastResult\", { enumerable: false });\n return plugin;\n};\n\nconst resolveEsbuildOutDir = (\n options: OpenTrayEsbuildPluginOptions,\n initialOptions: EsbuildInitialOptionsLike,\n): string => {\n const cwd = initialOptions.absWorkingDir ?? process.cwd();\n if (options.outDir !== undefined) {\n return resolve(cwd, options.outDir);\n }\n if (initialOptions.outdir !== undefined && initialOptions.outdir.length > 0) {\n return resolve(cwd, initialOptions.outdir);\n }\n if (initialOptions.outfile !== undefined && initialOptions.outfile.length > 0) {\n return resolve(cwd, dirname(initialOptions.outfile));\n }\n return resolve(process.cwd(), \"dist\");\n};\n\nconst resolveEsbuildBundleOutputDir = (\n initialOptions: EsbuildInitialOptionsLike,\n cwd: string,\n): string => {\n if (initialOptions.outdir !== undefined && initialOptions.outdir.length > 0) {\n return resolve(cwd, initialOptions.outdir);\n }\n if (initialOptions.outfile !== undefined && initialOptions.outfile.length > 0) {\n return resolve(cwd, dirname(initialOptions.outfile));\n }\n return resolve(cwd, \"dist\");\n};\n\nexport const resolveEsbuildEntry = (initialOptions: EsbuildInitialOptionsLike): string => {\n const entryPoints = initialOptions.entryPoints;\n if (entryPoints === undefined) {\n throw new Error(\n \"OpenTray esbuild packaging requires esbuild entryPoints or an explicit entry option\",\n );\n }\n if (Array.isArray(entryPoints)) {\n if (entryPoints.length === 0) {\n throw new Error(\n \"OpenTray esbuild packaging requires esbuild entryPoints or an explicit entry option\",\n );\n }\n return entryPoints[0] as string;\n }\n const first = Object.values(entryPoints)[0];\n if (first === undefined) {\n throw new Error(\n \"OpenTray esbuild packaging requires esbuild entryPoints or an explicit entry option\",\n );\n }\n return first;\n};\n\nexport type { OpenTrayPackageManifest, OpenTrayPackageResult };\n"],"mappings":";;;;AAqEA,MAAa,2BACX,YACmC;CACnC,IAAI;CACJ,OAAO;EACL,MAAM;EACN,MAAM,OAAO;GACX,MAAM,MAAM,YAAY;IACtB,MAAM,MAAM,MAAM,eAAe,iBAAiB,QAAQ,IAAI;IAC9D,MAAM,aACJ,QAAQ,eAAe,KAAA,IACnB,KAAK,8BAA8B,MAAM,gBAAgB,GAAG,GAAG,GAAG,QAAQ,QAAQ,KAAK,IACvF,QAAQ,KAAK,QAAQ,UAAU;IACrC,aAAa,MAAM,qBAAqB;KAAE,GAAG;KAAS;IAAW,CAAC;GACpE,CAAC;EACH;EACA,qBAAqB;CACvB;AACF;AAEA,MAAa,yBACX,YAC0B;CAC1B,IAAI;CAMJ,MAAM,SAAgC;EACpC,MAAM;EACN,MAAM,OAAO;GACX,MAAM,MAAM,YAAY;IACtB,aAAa,MAAM,qBAAqB;KACtC,KAAK,QAAQ;KACb,QAAQ,qBAAqB,SAAS,MAAM,cAAc;KAC1D,OAAO,QAAQ,SAAS,oBAAoB,MAAM,cAAc;KAChE,SAAS;MAAE,MAAM;MAAW,MAAM,QAAQ,QAAQ;KAAa;KAC/D,aAAa,QAAQ;KACrB,GAAI,QAAQ,oBAAoB,KAAA,IAC5B,CAAC,IACD,EAAE,iBAAiB,QAAQ,gBAAgB;KAC/C,GAAI,QAAQ,oBAAoB,KAAA,IAC5B,CAAC,IACD,EAAE,iBAAiB,QAAQ,gBAAgB;KAC/C,GAAI,QAAQ,iBAAiB,KAAA,IAAY,CAAC,IAAI,EAAE,cAAc,QAAQ,aAAa;IACrF,CAAC;GACH,CAAC;EACH;EACA,qBAAqB;CACvB;CACA,OAAO,eAAe,QAAQ,iBAAiB,EAAE,YAAY,MAAM,CAAC;CACpE,OAAO;AACT;AAEA,MAAM,wBACJ,SACA,mBACW;CACX,MAAM,MAAM,eAAe,iBAAiB,QAAQ,IAAI;CACxD,IAAI,QAAQ,WAAW,KAAA,GACrB,OAAO,QAAQ,KAAK,QAAQ,MAAM;CAEpC,IAAI,eAAe,WAAW,KAAA,KAAa,eAAe,OAAO,SAAS,GACxE,OAAO,QAAQ,KAAK,eAAe,MAAM;CAE3C,IAAI,eAAe,YAAY,KAAA,KAAa,eAAe,QAAQ,SAAS,GAC1E,OAAO,QAAQ,KAAK,QAAQ,eAAe,OAAO,CAAC;CAErD,OAAO,QAAQ,QAAQ,IAAI,GAAG,MAAM;AACtC;AAEA,MAAM,iCACJ,gBACA,QACW;CACX,IAAI,eAAe,WAAW,KAAA,KAAa,eAAe,OAAO,SAAS,GACxE,OAAO,QAAQ,KAAK,eAAe,MAAM;CAE3C,IAAI,eAAe,YAAY,KAAA,KAAa,eAAe,QAAQ,SAAS,GAC1E,OAAO,QAAQ,KAAK,QAAQ,eAAe,OAAO,CAAC;CAErD,OAAO,QAAQ,KAAK,MAAM;AAC5B;AAEA,MAAa,uBAAuB,mBAAsD;CACxF,MAAM,cAAc,eAAe;CACnC,IAAI,gBAAgB,KAAA,GAClB,MAAM,IAAI,MACR,qFACF;CAEF,IAAI,MAAM,QAAQ,WAAW,GAAG;EAC9B,IAAI,YAAY,WAAW,GACzB,MAAM,IAAI,MACR,qFACF;EAEF,OAAO,YAAY;CACrB;CACA,MAAM,QAAQ,OAAO,OAAO,WAAW,EAAE;CACzC,IAAI,UAAU,KAAA,GACZ,MAAM,IAAI,MACR,qFACF;CAEF,OAAO;AACT"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opentray/esbuild-plugin",
3
- "version": "0.15.0",
3
+ "version": "0.17.0",
4
4
  "description": "esbuild adapter for the OpenTray runtime artifact packaging contract.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -21,7 +21,7 @@
21
21
  ],
22
22
  "sideEffects": false,
23
23
  "dependencies": {
24
- "@opentray/packaging": "0.15.0"
24
+ "@opentray/packaging": "0.17.0"
25
25
  },
26
26
  "peerDependencies": {
27
27
  "esbuild": ">=0.20"