@salesforce/ui-bundle 12.16.0 → 12.18.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.
@@ -5,7 +5,7 @@
5
5
  */
6
6
  export type { OrgInfo } from './org';
7
7
  export { getOrgInfo, refreshOrgAuth } from './org';
8
- export type { UIBundleManifest, UIBundleTarget, RoutingConfig, RewriteRule, RedirectRule, } from './manifest';
8
+ export type { UIBundleManifest, UIBundleTarget, RoutingConfig, RewriteRule, RedirectRule, UIBundleComposition, UIBundleScreen, } from './manifest';
9
9
  export { loadManifest, resolveMetaTarget, UI_BUNDLE_TARGETS } from './manifest';
10
10
  export type { DevProxyConfig } from './dev-config';
11
11
  export { loadDevProxyConfig } from './dev-config';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/app/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,YAAY,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AACrC,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AACnD,YAAY,EACX,gBAAgB,EAChB,cAAc,EACd,aAAa,EACb,WAAW,EACX,YAAY,GACZ,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAChF,YAAY,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AACnD,OAAO,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAClD,YAAY,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,EAAE,uBAAuB,EAAE,MAAM,YAAY,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/app/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,YAAY,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AACrC,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AACnD,YAAY,EACX,gBAAgB,EAChB,cAAc,EACd,aAAa,EACb,WAAW,EACX,YAAY,EACZ,mBAAmB,EACnB,cAAc,GACd,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAChF,YAAY,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AACnD,OAAO,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAClD,YAAY,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,EAAE,uBAAuB,EAAE,MAAM,YAAY,CAAC"}
@@ -10,9 +10,9 @@
10
10
  *
11
11
  * @remarks
12
12
  * This is a build-time concept, not a field of the deployed `ui-bundle.json`
13
- * manifest. The platform's manifest schema accepts only `outputDir`, `routing`,
14
- * and `headers`. If you declare `target` in the manifest, the bundle fails to
15
- * deploy with `InvalidUiBundleConfigError`.
13
+ * manifest. The platform's manifest schema accepts only `apiVersion`,
14
+ * `outputDir`, `routing`, and `headers`. If you declare `target` in the
15
+ * manifest, the bundle fails to deploy with `InvalidUiBundleConfigError`.
16
16
  *
17
17
  * You therefore supply the target to the build (see the Vite plugin's
18
18
  * `generateMetaXml` option). The build emits the target into the
@@ -32,6 +32,21 @@ export interface UIBundleManifest {
32
32
  name?: string;
33
33
  outputDir: string;
34
34
  routing?: RoutingConfig;
35
+ appNamespace?: string;
36
+ appName?: string;
37
+ composition?: UIBundleComposition;
38
+ }
39
+ export interface UIBundleComposition {
40
+ screens?: UIBundleScreen[];
41
+ screenDependencies?: string[];
42
+ }
43
+ export interface UIBundleScreen {
44
+ mount: string;
45
+ section?: string;
46
+ label?: string;
47
+ order?: number;
48
+ icon?: string;
49
+ access?: string[];
35
50
  }
36
51
  export declare const UI_BUNDLE_TARGETS: readonly UIBundleTarget[];
37
52
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"manifest.d.ts","sourceRoot":"","sources":["../../src/app/manifest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AG,GAAG,CAAC;CAClC;AAsBD;;;;;;GAMG;AACH,wBAAsB,YAAY,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAclF"}
@@ -1,4 +1,4 @@
1
- const version = "12.16.0";
1
+ const version = "12.18.0";
2
2
  export {
3
3
  version
4
4
  };
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Copyright (c) 2026, Salesforce, Inc.,
3
+ * All rights reserved.
4
+ * For full license text, see the LICENSE.txt file
5
+ */
6
+ export type { SingleFilePluginsOptions } from './single-file';
7
+ export { singleFilePlugins } from './single-file';
8
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/vite/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,YAAY,EAAE,wBAAwB,EAAE,MAAM,eAAe,CAAC;AAC9D,OAAO,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { singleFilePlugins } from "./single-file.js";
2
+ export {
3
+ singleFilePlugins
4
+ };
@@ -0,0 +1,16 @@
1
+ import { Plugin } from 'vite';
2
+ export interface SingleFilePluginsOptions {
3
+ /** Calling plugin package, used in error messages and the warning plugin name. */
4
+ owner: string;
5
+ /** The option that enabled single-file output, used in error messages. */
6
+ option: string;
7
+ }
8
+ /**
9
+ * The plugins for single-file output: the `public/` warning and singlefile, the
10
+ * latter scoped to `vite build` so its config hook (`base: "./"`) never touches
11
+ * the dev server. Required here rather than imported at the top because it's an
12
+ * optional peer. `T` lets the caller
13
+ * type the result with its own vite's `Plugin`, which may be a different copy.
14
+ */
15
+ export declare function singleFilePlugins<T = Plugin>({ owner, option }: SingleFilePluginsOptions): T[];
16
+ //# sourceMappingURL=single-file.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"single-file.d.ts","sourceRoot":"","sources":["../../src/vite/single-file.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAmCnC,MAAM,WAAW,wBAAwB;IACxC,kFAAkF;IAClF,KAAK,EAAE,MAAM,CAAC;IACd,0EAA0E;IAC1E,MAAM,EAAE,MAAM,CAAC;CACf;AAED;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAAC,CAAC,GAAG,MAAM,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,wBAAwB,GAAG,CAAC,EAAE,CAmB9F"}
@@ -0,0 +1,44 @@
1
+ import { existsSync, readdirSync, statSync } from "node:fs";
2
+ import { createRequire } from "node:module";
3
+ import path from "node:path";
4
+ const PACKAGE = "vite-plugin-singlefile";
5
+ function listFiles(dir) {
6
+ return readdirSync(dir, { recursive: true, encoding: "utf8" }).filter((file) => statSync(path.join(dir, file)).isFile()).map((file) => file.split(path.sep).join("/")).sort();
7
+ }
8
+ function warnPublicFiles(owner) {
9
+ let publicDir = "";
10
+ return {
11
+ name: `${owner}:single-file-public-warning`,
12
+ apply: "build",
13
+ configResolved(config) {
14
+ publicDir = config.build.copyPublicDir ? config.publicDir : "";
15
+ },
16
+ generateBundle() {
17
+ if (!publicDir || !existsSync(publicDir)) return;
18
+ const files = listFiles(publicDir);
19
+ if (files.length === 0) return;
20
+ this.warn(
21
+ `[singleFile] public/ files are copied as separate files, not inlined: ${files.join(", ")} — import them from src/ to inline them`
22
+ );
23
+ }
24
+ };
25
+ }
26
+ function singleFilePlugins({ owner, option }) {
27
+ let plugin;
28
+ try {
29
+ const { viteSingleFile } = createRequire(import.meta.url)(PACKAGE);
30
+ plugin = viteSingleFile();
31
+ } catch (error) {
32
+ throw new Error(
33
+ `${owner}: \`${option}\` requires \`${PACKAGE}\` (and vite >= 5.4.21), but it failed to load. Install it: npm install -D ${PACKAGE}`,
34
+ { cause: error }
35
+ );
36
+ }
37
+ if (!plugin || typeof plugin !== "object" || Array.isArray(plugin) || "then" in plugin) {
38
+ throw new Error(`${owner}: unsupported ${PACKAGE} version (expected a single plugin object).`);
39
+ }
40
+ return [warnPublicFiles(owner), { ...plugin, apply: "build" }];
41
+ }
42
+ export {
43
+ singleFilePlugins
44
+ };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@salesforce/ui-bundle",
3
3
  "description": "Core package for Salesforce UI Bundles",
4
- "version": "12.16.0",
4
+ "version": "12.18.0",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "type": "module",
7
7
  "main": "./dist/index.js",
@@ -24,6 +24,10 @@
24
24
  "types": "./dist/proxy/index.d.ts",
25
25
  "import": "./dist/proxy/index.js"
26
26
  },
27
+ "./vite": {
28
+ "types": "./dist/vite/index.d.ts",
29
+ "import": "./dist/vite/index.js"
30
+ },
27
31
  "./package.json": "./package.json"
28
32
  },
29
33
  "files": [
@@ -39,15 +43,28 @@
39
43
  },
40
44
  "dependencies": {
41
45
  "@salesforce/core": "^8.23.4",
42
- "@salesforce/platform-sdk": "^12.16.0",
46
+ "@salesforce/platform-sdk": "^12.18.0",
43
47
  "micromatch": "^4.0.8",
44
48
  "path-to-regexp": "^8.4.2"
45
49
  },
50
+ "peerDependencies": {
51
+ "vite": "^5.4.21 || ^6.0.0 || ^7.0.0 || ^8.0.0",
52
+ "vite-plugin-singlefile": "^2.3.4"
53
+ },
54
+ "peerDependenciesMeta": {
55
+ "vite": {
56
+ "optional": true
57
+ },
58
+ "vite-plugin-singlefile": {
59
+ "optional": true
60
+ }
61
+ },
46
62
  "devDependencies": {
47
63
  "@types/micromatch": "^4.0.10",
48
64
  "esbuild": "^0.28.1",
49
65
  "vite": "^7.3.5",
50
66
  "vite-plugin-dts": "^4.5.4",
67
+ "vite-plugin-singlefile": "^2.3.4",
51
68
  "vitest": "^4.1.11"
52
69
  },
53
70
  "engines": {