@salesforce/webapp-experimental 1.114.0 → 1.116.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.
@@ -1 +1 @@
1
- {"version":3,"file":"org.d.ts","sourceRoot":"","sources":["../../src/app/org.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,MAAM,WAAW,OAAO;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,cAAc,EAAE,MAAM,CAAC;IACvB,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;CAClB;AAED;;;;;GAKG;AACH,wBAAsB,UAAU,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,GAAG,SAAS,CAAC,CAmBhF;AAcD;;;;GAIG;AACH,wBAAsB,cAAc,CAAC,QAAQ,EAAE,MAAM,gCAKpD"}
1
+ {"version":3,"file":"org.d.ts","sourceRoot":"","sources":["../../src/app/org.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,MAAM,WAAW,OAAO;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,cAAc,EAAE,MAAM,CAAC;IACvB,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;CAClB;AAED;;;;;GAKG;AACH,wBAAsB,UAAU,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,GAAG,SAAS,CAAC,CAmBhF;AAuBD;;;;GAIG;AACH,wBAAsB,cAAc,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,GAAG,SAAS,CAAC,CAQnF"}
package/dist/app/org.js CHANGED
@@ -24,11 +24,23 @@ async function createOrg(orgAlias) {
24
24
  }
25
25
  return await Org.create({ aliasOrUsername: orgAlias });
26
26
  } catch (error) {
27
- console.error("Failed to get SF org info:", error);
27
+ const target = orgAlias ? `org "${orgAlias}"` : "default org";
28
+ if (error instanceof Error && error.name === "NoUsernameFoundError") {
29
+ console.warn(
30
+ `No ${target} found. Run "sf org login" to authenticate an org, or "sf config set target-org=<username>" to set a default.`
31
+ );
32
+ } else {
33
+ console.warn(
34
+ `Failed to connect to ${target}: ${error instanceof Error ? error.message : error}`
35
+ );
36
+ }
28
37
  }
29
38
  }
30
39
  async function refreshOrgAuth(orgAlias) {
31
- const org = await Org.create({ aliasOrUsername: orgAlias });
40
+ const org = await createOrg(orgAlias);
41
+ if (!org) {
42
+ return;
43
+ }
32
44
  await org.refreshAuth();
33
45
  return getOrgInfo(orgAlias);
34
46
  }
@@ -1,4 +1,4 @@
1
- const version = "1.114.0";
1
+ const version = "1.116.0";
2
2
  export {
3
3
  version
4
4
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@salesforce/webapp-experimental",
3
3
  "description": "[experimental] Core package for Salesforce Web Applications",
4
- "version": "1.114.0",
4
+ "version": "1.116.0",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "type": "module",
7
7
  "main": "./dist/index.js",
@@ -44,7 +44,7 @@
44
44
  },
45
45
  "dependencies": {
46
46
  "@salesforce/core": "^8.23.4",
47
- "@salesforce/sdk-data": "^1.114.0",
47
+ "@salesforce/sdk-data": "^1.116.0",
48
48
  "axios": "^1.7.7",
49
49
  "micromatch": "^4.0.8",
50
50
  "path-to-regexp": "^8.3.0"