@osdk/oauth 1.1.0-beta.6 → 1.1.0-beta.8

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.
Files changed (44) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/build/browser/common.d.ts +9 -10
  3. package/build/browser/common.d.ts.map +1 -1
  4. package/build/browser/common.js +23 -6
  5. package/build/browser/common.js.map +1 -1
  6. package/build/browser/common.test.d.ts +2 -0
  7. package/build/browser/common.test.d.ts.map +1 -0
  8. package/build/browser/common.test.js +64 -0
  9. package/build/browser/common.test.js.map +1 -0
  10. package/build/browser/createConfidentialOauthClient.d.ts.map +1 -1
  11. package/build/browser/createConfidentialOauthClient.js +1 -1
  12. package/build/browser/createConfidentialOauthClient.js.map +1 -1
  13. package/build/browser/createPublicOauthClient.d.ts +4 -0
  14. package/build/browser/createPublicOauthClient.d.ts.map +1 -1
  15. package/build/browser/createPublicOauthClient.js +28 -16
  16. package/build/browser/createPublicOauthClient.js.map +1 -1
  17. package/build/browser/publicOauth.test.js +109 -34
  18. package/build/browser/publicOauth.test.js.map +1 -1
  19. package/build/browser/utils.d.ts +4 -2
  20. package/build/browser/utils.d.ts.map +1 -1
  21. package/build/browser/utils.js +2 -1
  22. package/build/browser/utils.js.map +1 -1
  23. package/build/esm/common.d.ts +9 -10
  24. package/build/esm/common.d.ts.map +1 -1
  25. package/build/esm/common.js +23 -6
  26. package/build/esm/common.js.map +1 -1
  27. package/build/esm/common.test.d.ts +2 -0
  28. package/build/esm/common.test.d.ts.map +1 -0
  29. package/build/esm/common.test.js +64 -0
  30. package/build/esm/common.test.js.map +1 -0
  31. package/build/esm/createConfidentialOauthClient.d.ts.map +1 -1
  32. package/build/esm/createConfidentialOauthClient.js +1 -1
  33. package/build/esm/createConfidentialOauthClient.js.map +1 -1
  34. package/build/esm/createPublicOauthClient.d.ts +4 -0
  35. package/build/esm/createPublicOauthClient.d.ts.map +1 -1
  36. package/build/esm/createPublicOauthClient.js +28 -16
  37. package/build/esm/createPublicOauthClient.js.map +1 -1
  38. package/build/esm/publicOauth.test.js +109 -34
  39. package/build/esm/publicOauth.test.js.map +1 -1
  40. package/build/esm/utils.d.ts +4 -2
  41. package/build/esm/utils.d.ts.map +1 -1
  42. package/build/esm/utils.js +2 -1
  43. package/build/esm/utils.js.map +1 -1
  44. package/package.json +4 -3
@@ -1 +1 @@
1
- {"version":3,"file":"utils.js","names":["invariant","processOptionsAndAssignDefaults","url","redirect_uri","useHistory","loginPage","postLoginPage","scopes","fetchFn","ctxPath","options","process","env","NODE_ENV","window","location","toString","globalThis","fetch"],"sources":["utils.js"],"sourcesContent":["/*\n * Copyright 2024 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 */\nimport invariant from \"tiny-invariant\";\nexport function processOptionsAndAssignDefaults(url, redirect_uri, useHistory, loginPage, postLoginPage, scopes, fetchFn, ctxPath) {\n let options = {};\n if (typeof useHistory === \"object\") {\n invariant(!loginPage && !postLoginPage && !scopes && !fetchFn && !ctxPath, \"If useHistory is an object, other options should not be provided\");\n options = useHistory;\n }\n else {\n options = {\n useHistory,\n loginPage,\n postLoginPage,\n scopes,\n fetchFn,\n ctxPath,\n };\n }\n invariant(url, \"url is required\");\n invariant(redirect_uri, \"redirectUrl is required\");\n // Assign defaults\n return {\n useHistory: options.useHistory ?? true,\n loginPage: options.loginPage,\n postLoginPage: options.postLoginPage || window.location.toString(),\n scopes: options.scopes ?? [\"api:read-data\", \"api:write-data\"],\n fetchFn: options.fetchFn ?? globalThis.fetch,\n ctxPath: options.ctxPath ?? \"multipass\",\n };\n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O,CAACD,OAAO,IAAI;EAChC,CAAC;AACL","ignoreList":[]}
1
+ {"version":3,"file":"utils.js","names":["invariant","processOptionsAndAssignDefaults","url","redirect_uri","useHistory","loginPage","postLoginPage","scopes","fetchFn","ctxPath","options","process","env","NODE_ENV","window","location","toString","globalThis","fetch","refreshTokenMarker"],"sources":["utils.js"],"sourcesContent":["/*\n * Copyright 2024 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 */\nimport invariant from \"tiny-invariant\";\nexport function processOptionsAndAssignDefaults(url, redirect_uri, useHistory, loginPage, postLoginPage, scopes, fetchFn, ctxPath) {\n let options = {};\n if (typeof useHistory === \"object\") {\n invariant(!loginPage && !postLoginPage && !scopes && !fetchFn && !ctxPath, \"If useHistory is an object, other options should not be provided\");\n options = useHistory;\n }\n else {\n options = {\n useHistory,\n loginPage,\n postLoginPage,\n scopes,\n fetchFn,\n ctxPath,\n };\n }\n invariant(url, \"url is required\");\n invariant(redirect_uri, \"redirectUrl is required\");\n // Assign defaults\n return {\n useHistory: options.useHistory ?? true,\n loginPage: options.loginPage,\n postLoginPage: options.postLoginPage || window.location.toString(),\n scopes: options.scopes ?? [\"api:read-data\", \"api:write-data\"],\n fetchFn: options.fetchFn ?? globalThis.fetch,\n ctxPath: options.ctxPath ?? \"multipass\",\n refreshTokenMarker: options.refreshTokenMarker,\n };\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAOA,SAAS,MAAM,gBAAgB;AACtC,OAAO,SAASC,+BAA+BA,CAACC,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3
- "version": "1.1.0-beta.6",
3
+ "version": "1.1.0-beta.8",
4
4
  "license": "Apache-2.0",
5
5
  "repository": {
6
6
  "type": "git",
@@ -28,8 +28,8 @@
28
28
  "jest-extended": "^4.0.2",
29
29
  "typescript": "~5.5.4",
30
30
  "@osdk/monorepo.api-extractor": "~0.0.0",
31
- "@osdk/monorepo.tsconfig": "~0.0.0",
32
- "@osdk/monorepo.tsup": "~0.0.0"
31
+ "@osdk/monorepo.tsup": "~0.0.0",
32
+ "@osdk/monorepo.tsconfig": "~0.0.0"
33
33
  },
34
34
  "publishConfig": {
35
35
  "access": "public"
@@ -52,6 +52,7 @@
52
52
  "clean": "rm -rf lib dist types build tsconfig.tsbuildinfo",
53
53
  "fix-lint": "eslint . --fix && dprint fmt --config $(find-up dprint.json)",
54
54
  "lint": "eslint . && dprint check --config $(find-up dprint.json)",
55
+ "test": "vitest run --pool=forks",
55
56
  "transpile": "monorepo.tool.transpile"
56
57
  }
57
58
  }