@osdk/widget.vite-plugin 3.57.0 → 3.57.1-main-85cac1160bc1e9ff9bd8b7706514932ae1ef5ff1

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/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # @osdk/widget.vite-plugin
2
2
 
3
+ ## 3.57.1-main-85cac1160bc1e9ff9bd8b7706514932ae1ef5ff1
4
+
5
+ ### Patch Changes
6
+
7
+ - 85cac11: Include the widget Vite plugin version in dev mode request user agents.
8
+ - @osdk/widget.api@3.57.1-main-85cac1160bc1e9ff9bd8b7706514932ae1ef5ff1
9
+
3
10
  ## 3.57.0
4
11
 
5
12
  ### Patch Changes
@@ -15,6 +15,7 @@
15
15
  */
16
16
 
17
17
  import { getFoundryToken } from "./getFoundryToken.js";
18
+ const USER_AGENT = `osdk-widget.vite-plugin/${"3.57.1-main-85cac1160bc1e9ff9bd8b7706514932ae1ef5ff1"}`;
18
19
  export function setWidgetSetManifest(foundryUrl, widgetSetRid, manifest, viteMode) {
19
20
  const url = new URL("api/v2/widgets/devModeSettingsV2/setWidgetSetManifest", foundryUrl);
20
21
  url.searchParams.set("preview", "true");
@@ -27,7 +28,8 @@ export function setWidgetSetManifest(foundryUrl, widgetSetRid, manifest, viteMod
27
28
  headers: {
28
29
  authorization: `Bearer ${getFoundryToken(viteMode)}`,
29
30
  accept: "application/json",
30
- "content-type": "application/json"
31
+ "content-type": "application/json",
32
+ "Fetch-User-Agent": USER_AGENT
31
33
  }
32
34
  });
33
35
  }
@@ -38,7 +40,8 @@ export function enableDevMode(foundryUrl, viteMode) {
38
40
  method: "POST",
39
41
  headers: {
40
42
  authorization: `Bearer ${getFoundryToken(viteMode)}`,
41
- accept: "application/json"
43
+ accept: "application/json",
44
+ "Fetch-User-Agent": USER_AGENT
42
45
  }
43
46
  });
44
47
  }
@@ -1 +1 @@
1
- {"version":3,"file":"network.js","names":["getFoundryToken","setWidgetSetManifest","foundryUrl","widgetSetRid","manifest","viteMode","url","URL","searchParams","set","fetch","body","JSON","stringify","method","headers","authorization","accept","enableDevMode"],"sources":["network.ts"],"sourcesContent":["/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { DevModeManifest } from \"./buildDevModeManifest.js\";\nimport { getFoundryToken } from \"./getFoundryToken.js\";\n\nexport function setWidgetSetManifest(\n foundryUrl: string,\n widgetSetRid: string,\n manifest: DevModeManifest,\n viteMode: string | undefined,\n): Promise<Response> {\n const url = new URL(\n \"api/v2/widgets/devModeSettingsV2/setWidgetSetManifest\",\n foundryUrl,\n );\n url.searchParams.set(\"preview\", \"true\");\n return fetch(url, {\n body: JSON.stringify({\n widgetSetRid,\n manifest,\n }),\n method: \"POST\",\n headers: {\n authorization: `Bearer ${getFoundryToken(viteMode)}`,\n accept: \"application/json\",\n \"content-type\": \"application/json\",\n },\n });\n}\n\nexport function enableDevMode(\n foundryUrl: string,\n viteMode: string | undefined,\n): Promise<Response> {\n const url = new URL(\"api/v2/widgets/devModeSettingsV2/enable\", foundryUrl);\n url.searchParams.set(\"preview\", \"true\");\n return fetch(url, {\n method: \"POST\",\n headers: {\n authorization: `Bearer ${getFoundryToken(viteMode)}`,\n accept: \"application/json\",\n },\n });\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA,SAASA,eAAe,QAAQ,sBAAsB;AAEtD,OAAO,SAASC,oBAAoBA,CAClCC,UAAkB,EAClBC,YAAoB,EACpBC,QAAyB,EACzBC,QAA4B,EACT;EACnB,MAAMC,GAAG,GAAG,IAAIC,GAAG,CACjB,uDAAuD,EACvDL,UACF,CAAC;EACDI,GAAG,CAACE,YAAY,CAACC,GAAG,CAAC,SAAS,EAAE,MAAM,CAAC;EACvC,OAAOC,KAAK,CAACJ,GAAG,EAAE;IAChBK,IAAI,EAAEC,IAAI,CAACC,SAAS,CAAC;MACnBV,YAAY;MACZC;IACF,CAAC,CAAC;IACFU,MAAM,EAAE,MAAM;IACdC,OAAO,EAAE;MACPC,aAAa,EAAE,UAAUhB,eAAe,CAACK,QAAQ,CAAC,EAAE;MACpDY,MAAM,EAAE,kBAAkB;MAC1B,cAAc,EAAE;IAClB;EACF,CAAC,CAAC;AACJ;AAEA,OAAO,SAASC,aAAaA,CAC3BhB,UAAkB,EAClBG,QAA4B,EACT;EACnB,MAAMC,GAAG,GAAG,IAAIC,GAAG,CAAC,yCAAyC,EAAEL,UAAU,CAAC;EAC1EI,GAAG,CAACE,YAAY,CAACC,GAAG,CAAC,SAAS,EAAE,MAAM,CAAC;EACvC,OAAOC,KAAK,CAACJ,GAAG,EAAE;IAChBQ,MAAM,EAAE,MAAM;IACdC,OAAO,EAAE;MACPC,aAAa,EAAE,UAAUhB,eAAe,CAACK,QAAQ,CAAC,EAAE;MACpDY,MAAM,EAAE;IACV;EACF,CAAC,CAAC;AACJ","ignoreList":[]}
1
+ {"version":3,"file":"network.js","names":["getFoundryToken","USER_AGENT","setWidgetSetManifest","foundryUrl","widgetSetRid","manifest","viteMode","url","URL","searchParams","set","fetch","body","JSON","stringify","method","headers","authorization","accept","enableDevMode"],"sources":["network.ts"],"sourcesContent":["/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { DevModeManifest } from \"./buildDevModeManifest.js\";\nimport { getFoundryToken } from \"./getFoundryToken.js\";\n\nconst USER_AGENT = `osdk-widget.vite-plugin/${process.env.PACKAGE_VERSION}`;\n\nexport function setWidgetSetManifest(\n foundryUrl: string,\n widgetSetRid: string,\n manifest: DevModeManifest,\n viteMode: string | undefined,\n): Promise<Response> {\n const url = new URL(\n \"api/v2/widgets/devModeSettingsV2/setWidgetSetManifest\",\n foundryUrl,\n );\n url.searchParams.set(\"preview\", \"true\");\n return fetch(url, {\n body: JSON.stringify({\n widgetSetRid,\n manifest,\n }),\n method: \"POST\",\n headers: {\n authorization: `Bearer ${getFoundryToken(viteMode)}`,\n accept: \"application/json\",\n \"content-type\": \"application/json\",\n \"Fetch-User-Agent\": USER_AGENT,\n },\n });\n}\n\nexport function enableDevMode(\n foundryUrl: string,\n viteMode: string | undefined,\n): Promise<Response> {\n const url = new URL(\"api/v2/widgets/devModeSettingsV2/enable\", foundryUrl);\n url.searchParams.set(\"preview\", \"true\");\n return fetch(url, {\n method: \"POST\",\n headers: {\n authorization: `Bearer ${getFoundryToken(viteMode)}`,\n accept: \"application/json\",\n \"Fetch-User-Agent\": USER_AGENT,\n },\n });\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA,SAASA,eAAe,QAAQ,sBAAsB;AAEtD,MAAMC,UAAU,GAAG,mFAAwD;AAE3E,OAAO,SAASC,oBAAoBA,CAClCC,UAAkB,EAClBC,YAAoB,EACpBC,QAAyB,EACzBC,QAA4B,EACT;EACnB,MAAMC,GAAG,GAAG,IAAIC,GAAG,CACjB,uDAAuD,EACvDL,UACF,CAAC;EACDI,GAAG,CAACE,YAAY,CAACC,GAAG,CAAC,SAAS,EAAE,MAAM,CAAC;EACvC,OAAOC,KAAK,CAACJ,GAAG,EAAE;IAChBK,IAAI,EAAEC,IAAI,CAACC,SAAS,CAAC;MACnBV,YAAY;MACZC;IACF,CAAC,CAAC;IACFU,MAAM,EAAE,MAAM;IACdC,OAAO,EAAE;MACPC,aAAa,EAAE,UAAUjB,eAAe,CAACM,QAAQ,CAAC,EAAE;MACpDY,MAAM,EAAE,kBAAkB;MAC1B,cAAc,EAAE,kBAAkB;MAClC,kBAAkB,EAAEjB;IACtB;EACF,CAAC,CAAC;AACJ;AAEA,OAAO,SAASkB,aAAaA,CAC3BhB,UAAkB,EAClBG,QAA4B,EACT;EACnB,MAAMC,GAAG,GAAG,IAAIC,GAAG,CAAC,yCAAyC,EAAEL,UAAU,CAAC;EAC1EI,GAAG,CAACE,YAAY,CAACC,GAAG,CAAC,SAAS,EAAE,MAAM,CAAC;EACvC,OAAOC,KAAK,CAACJ,GAAG,EAAE;IAChBQ,MAAM,EAAE,MAAM;IACdC,OAAO,EAAE;MACPC,aAAa,EAAE,UAAUjB,eAAe,CAACM,QAAQ,CAAC,EAAE;MACpDY,MAAM,EAAE,kBAAkB;MAC1B,kBAAkB,EAAEjB;IACtB;EACF,CAAC,CAAC;AACJ","ignoreList":[]}
@@ -1 +1 @@
1
- {"mappings":"AAgBA,cAAc,uBAAuB,2BAA4B;AAGjE,OAAO,iBAAS,qBACdA,oBACAC,sBACAC,UAAU,iBACVC,+BACC,QAAQ;AAoBX,OAAO,iBAAS,cACdH,oBACAG,+BACC,QAAQ","names":["foundryUrl: string","widgetSetRid: string","manifest: DevModeManifest","viteMode: string | undefined"],"sources":["../../../src/dev-plugin/network.ts"],"version":3,"file":"network.d.ts"}
1
+ {"mappings":"AAgBA,cAAc,uBAAuB,2BAA4B;AAKjE,OAAO,iBAAS,qBACdA,oBACAC,sBACAC,UAAU,iBACVC,+BACC,QAAQ;AAqBX,OAAO,iBAAS,cACdH,oBACAG,+BACC,QAAQ","names":["foundryUrl: string","widgetSetRid: string","manifest: DevModeManifest","viteMode: string | undefined"],"sources":["../../../src/dev-plugin/network.ts"],"version":3,"file":"network.d.ts"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@osdk/widget.vite-plugin",
3
- "version": "3.57.0",
3
+ "version": "3.57.1-main-85cac1160bc1e9ff9bd8b7706514932ae1ef5ff1",
4
4
  "description": "A vite plugin that will extract parameter definitions from TS/JS files + entrypoint info into a manifest file to be uploaded to Foundry ",
5
5
  "access": "public",
6
6
  "license": "Apache-2.0",
@@ -31,7 +31,7 @@
31
31
  "resolve-package-path": "^4.0.3",
32
32
  "sirv": "^3.0.2",
33
33
  "@osdk/foundry-config-json": "~1.12.0",
34
- "@osdk/widget.api": "~3.57.0"
34
+ "@osdk/widget.api": "~3.57.1-main-85cac1160bc1e9ff9bd8b7706514932ae1ef5ff1"
35
35
  },
36
36
  "peerDependencies": {
37
37
  "vite": "^6.3.6 || ^7.3.1"