@osdk/create-app 2.1.0-beta.9 → 2.2.0-beta.1

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 (189) hide show
  1. package/CHANGELOG.md +52 -0
  2. package/build/esm/{esm-FXURBNU2.js → esm-4SFFV2ZK.js} +6 -6
  3. package/build/esm/esm-4SFFV2ZK.js.map +1 -0
  4. package/build/esm/esm-BFQ5RNHV.js +1249 -0
  5. package/build/esm/esm-BFQ5RNHV.js.map +1 -0
  6. package/build/esm/{esm-G7B67PJ6.js → esm-EXZTN5HA.js} +5 -5
  7. package/build/esm/esm-EXZTN5HA.js.map +1 -0
  8. package/build/{browser/esm-S2OWTMMF.js → esm/esm-FZSV3C5D.js} +73 -53
  9. package/build/esm/esm-FZSV3C5D.js.map +1 -0
  10. package/build/{browser/esm-F6Y6OKER.js → esm/esm-HA4JIHHL.js} +4 -4
  11. package/build/esm/esm-HA4JIHHL.js.map +1 -0
  12. package/build/esm/{esm-LF7OTAKA.js → esm-NFVUE2AE.js} +6 -6
  13. package/build/esm/esm-NFVUE2AE.js.map +1 -0
  14. package/build/{browser/esm-4QSCBEZC.js → esm/esm-WPYEYT7F.js} +31 -34
  15. package/build/esm/esm-WPYEYT7F.js.map +1 -0
  16. package/build/esm/{esm-PQDKPDBA.js → esm-XWXVWZDN.js} +8 -8
  17. package/build/esm/esm-XWXVWZDN.js.map +1 -0
  18. package/build/{browser/esm-Y7D2PCM4.js → esm/esm-YVNV3MQG.js} +8 -8
  19. package/build/esm/esm-YVNV3MQG.js.map +1 -0
  20. package/build/esm/{esm-H2IADGOR.js → esm-ZDKAQEHX.js} +33 -37
  21. package/build/esm/esm-ZDKAQEHX.js.map +1 -0
  22. package/build/esm/{esm-IWXD7ZFP.js → esm-ZXMFAUNZ.js} +8 -8
  23. package/build/esm/esm-ZXMFAUNZ.js.map +1 -0
  24. package/build/esm/index.js +28 -18
  25. package/build/esm/index.js.map +1 -1
  26. package/build/{esm → types}/cli.d.ts +0 -1
  27. package/build/types/cli.d.ts.map +1 -0
  28. package/build/types/cli.test.d.ts +1 -0
  29. package/build/types/cli.test.d.ts.map +1 -0
  30. package/build/{esm → types}/consola.d.ts +0 -1
  31. package/build/types/consola.d.ts.map +1 -0
  32. package/build/types/generate/generateEnv.d.ts +12 -0
  33. package/build/types/generate/generateEnv.d.ts.map +1 -0
  34. package/build/types/generate/generateEnv.test.d.ts +1 -0
  35. package/build/types/generate/generateEnv.test.d.ts.map +1 -0
  36. package/build/types/generate/generateFoundryConfigJson.d.ts +5 -0
  37. package/build/types/generate/generateFoundryConfigJson.d.ts.map +1 -0
  38. package/build/types/generate/generateFoundryConfigJson.test.d.ts +1 -0
  39. package/build/types/generate/generateFoundryConfigJson.test.d.ts.map +1 -0
  40. package/build/types/generate/generateNpmRc.d.ts +4 -0
  41. package/build/types/generate/generateNpmRc.d.ts.map +1 -0
  42. package/build/types/generate/generateNpmRc.test.d.ts +1 -0
  43. package/build/types/generate/generateNpmRc.test.d.ts.map +1 -0
  44. package/build/{esm → types}/generatedNoCheck/templates.d.ts +0 -1
  45. package/build/types/generatedNoCheck/templates.d.ts.map +1 -0
  46. package/build/{esm → types}/getPackageFiles.d.ts +1 -2
  47. package/build/types/getPackageFiles.d.ts.map +1 -0
  48. package/build/{esm → types}/highlight.d.ts +0 -1
  49. package/build/types/highlight.d.ts.map +1 -0
  50. package/build/{esm → types}/index.d.ts +1 -2
  51. package/build/types/index.d.ts.map +1 -0
  52. package/build/{esm → types}/prompts/promptApplicationRid.d.ts +1 -2
  53. package/build/types/prompts/promptApplicationRid.d.ts.map +1 -0
  54. package/build/types/prompts/promptApplicationRid.test.d.ts +1 -0
  55. package/build/types/prompts/promptApplicationRid.test.d.ts.map +1 -0
  56. package/build/{esm → types}/prompts/promptApplicationUrl.d.ts +2 -3
  57. package/build/types/prompts/promptApplicationUrl.d.ts.map +1 -0
  58. package/build/types/prompts/promptApplicationUrl.test.d.ts +1 -0
  59. package/build/types/prompts/promptApplicationUrl.test.d.ts.map +1 -0
  60. package/build/{esm → types}/prompts/promptClientId.d.ts +1 -2
  61. package/build/types/prompts/promptClientId.d.ts.map +1 -0
  62. package/build/types/prompts/promptClientId.test.d.ts +1 -0
  63. package/build/types/prompts/promptClientId.test.d.ts.map +1 -0
  64. package/build/{esm → types}/prompts/promptCorsProxy.d.ts +1 -2
  65. package/build/types/prompts/promptCorsProxy.d.ts.map +1 -0
  66. package/build/types/prompts/promptCorsProxy.test.d.ts +1 -0
  67. package/build/types/prompts/promptCorsProxy.test.d.ts.map +1 -0
  68. package/build/{esm → types}/prompts/promptFoundryUrl.d.ts +1 -2
  69. package/build/types/prompts/promptFoundryUrl.d.ts.map +1 -0
  70. package/build/types/prompts/promptFoundryUrl.test.d.ts +1 -0
  71. package/build/types/prompts/promptFoundryUrl.test.d.ts.map +1 -0
  72. package/build/{esm → types}/prompts/promptOsdkPackage.d.ts +1 -2
  73. package/build/types/prompts/promptOsdkPackage.d.ts.map +1 -0
  74. package/build/types/prompts/promptOsdkPackage.test.d.ts +1 -0
  75. package/build/types/prompts/promptOsdkPackage.test.d.ts.map +1 -0
  76. package/build/{esm → types}/prompts/promptOsdkRegistryUrl.d.ts +1 -2
  77. package/build/types/prompts/promptOsdkRegistryUrl.d.ts.map +1 -0
  78. package/build/types/prompts/promptOsdkRegistryUrl.test.d.ts +1 -0
  79. package/build/types/prompts/promptOsdkRegistryUrl.test.d.ts.map +1 -0
  80. package/build/types/prompts/promptOverwrite.d.ts +4 -0
  81. package/build/types/prompts/promptOverwrite.d.ts.map +1 -0
  82. package/build/types/prompts/promptOverwrite.test.d.ts +1 -0
  83. package/build/types/prompts/promptOverwrite.test.d.ts.map +1 -0
  84. package/build/{esm → types}/prompts/promptProject.d.ts +1 -2
  85. package/build/types/prompts/promptProject.d.ts.map +1 -0
  86. package/build/types/prompts/promptProject.test.d.ts +1 -0
  87. package/build/types/prompts/promptProject.test.d.ts.map +1 -0
  88. package/build/{esm → types}/prompts/promptScopes.d.ts +1 -2
  89. package/build/types/prompts/promptScopes.d.ts.map +1 -0
  90. package/build/{esm → types}/prompts/promptSdkVersion.d.ts +2 -3
  91. package/build/types/prompts/promptSdkVersion.d.ts.map +1 -0
  92. package/build/{esm → types}/prompts/promptTemplate.d.ts +2 -3
  93. package/build/types/prompts/promptTemplate.d.ts.map +1 -0
  94. package/build/types/prompts/promptTemplate.test.d.ts +1 -0
  95. package/build/types/prompts/promptTemplate.test.d.ts.map +1 -0
  96. package/build/types/run.d.ts +17 -0
  97. package/build/types/run.d.ts.map +1 -0
  98. package/build/types/templates.d.ts +25 -0
  99. package/build/types/templates.d.ts.map +1 -0
  100. package/package.json +34 -29
  101. package/build/browser/esm-4QSCBEZC.js.map +0 -1
  102. package/build/browser/esm-F6Y6OKER.js.map +0 -1
  103. package/build/browser/esm-FXURBNU2.js +0 -421
  104. package/build/browser/esm-FXURBNU2.js.map +0 -1
  105. package/build/browser/esm-G7B67PJ6.js +0 -281
  106. package/build/browser/esm-G7B67PJ6.js.map +0 -1
  107. package/build/browser/esm-H2IADGOR.js +0 -1184
  108. package/build/browser/esm-H2IADGOR.js.map +0 -1
  109. package/build/browser/esm-IWXD7ZFP.js +0 -453
  110. package/build/browser/esm-IWXD7ZFP.js.map +0 -1
  111. package/build/browser/esm-LF7OTAKA.js +0 -394
  112. package/build/browser/esm-LF7OTAKA.js.map +0 -1
  113. package/build/browser/esm-PQDKPDBA.js +0 -903
  114. package/build/browser/esm-PQDKPDBA.js.map +0 -1
  115. package/build/browser/esm-S2OWTMMF.js.map +0 -1
  116. package/build/browser/esm-Y7D2PCM4.js.map +0 -1
  117. package/build/browser/index.js +0 -668
  118. package/build/browser/index.js.map +0 -1
  119. package/build/esm/cli.d.ts.map +0 -1
  120. package/build/esm/cli.test.d.ts +0 -2
  121. package/build/esm/cli.test.d.ts.map +0 -1
  122. package/build/esm/consola.d.ts.map +0 -1
  123. package/build/esm/esm-4QSCBEZC.js +0 -916
  124. package/build/esm/esm-4QSCBEZC.js.map +0 -1
  125. package/build/esm/esm-F6Y6OKER.js +0 -260
  126. package/build/esm/esm-F6Y6OKER.js.map +0 -1
  127. package/build/esm/esm-FXURBNU2.js.map +0 -1
  128. package/build/esm/esm-G7B67PJ6.js.map +0 -1
  129. package/build/esm/esm-H2IADGOR.js.map +0 -1
  130. package/build/esm/esm-IWXD7ZFP.js.map +0 -1
  131. package/build/esm/esm-LF7OTAKA.js.map +0 -1
  132. package/build/esm/esm-PQDKPDBA.js.map +0 -1
  133. package/build/esm/esm-S2OWTMMF.js +0 -383
  134. package/build/esm/esm-S2OWTMMF.js.map +0 -1
  135. package/build/esm/esm-Y7D2PCM4.js +0 -1171
  136. package/build/esm/esm-Y7D2PCM4.js.map +0 -1
  137. package/build/esm/generate/generateEnv.d.ts +0 -13
  138. package/build/esm/generate/generateEnv.d.ts.map +0 -1
  139. package/build/esm/generate/generateEnv.test.d.ts +0 -2
  140. package/build/esm/generate/generateEnv.test.d.ts.map +0 -1
  141. package/build/esm/generate/generateFoundryConfigJson.d.ts +0 -6
  142. package/build/esm/generate/generateFoundryConfigJson.d.ts.map +0 -1
  143. package/build/esm/generate/generateFoundryConfigJson.test.d.ts +0 -2
  144. package/build/esm/generate/generateFoundryConfigJson.test.d.ts.map +0 -1
  145. package/build/esm/generate/generateNpmRc.d.ts +0 -5
  146. package/build/esm/generate/generateNpmRc.d.ts.map +0 -1
  147. package/build/esm/generate/generateNpmRc.test.d.ts +0 -2
  148. package/build/esm/generate/generateNpmRc.test.d.ts.map +0 -1
  149. package/build/esm/generatedNoCheck/templates.d.ts.map +0 -1
  150. package/build/esm/getPackageFiles.d.ts.map +0 -1
  151. package/build/esm/highlight.d.ts.map +0 -1
  152. package/build/esm/index.d.ts.map +0 -1
  153. package/build/esm/prompts/promptApplicationRid.d.ts.map +0 -1
  154. package/build/esm/prompts/promptApplicationRid.test.d.ts +0 -2
  155. package/build/esm/prompts/promptApplicationRid.test.d.ts.map +0 -1
  156. package/build/esm/prompts/promptApplicationUrl.d.ts.map +0 -1
  157. package/build/esm/prompts/promptApplicationUrl.test.d.ts +0 -2
  158. package/build/esm/prompts/promptApplicationUrl.test.d.ts.map +0 -1
  159. package/build/esm/prompts/promptClientId.d.ts.map +0 -1
  160. package/build/esm/prompts/promptClientId.test.d.ts +0 -2
  161. package/build/esm/prompts/promptClientId.test.d.ts.map +0 -1
  162. package/build/esm/prompts/promptCorsProxy.d.ts.map +0 -1
  163. package/build/esm/prompts/promptCorsProxy.test.d.ts +0 -2
  164. package/build/esm/prompts/promptCorsProxy.test.d.ts.map +0 -1
  165. package/build/esm/prompts/promptFoundryUrl.d.ts.map +0 -1
  166. package/build/esm/prompts/promptFoundryUrl.test.d.ts +0 -2
  167. package/build/esm/prompts/promptFoundryUrl.test.d.ts.map +0 -1
  168. package/build/esm/prompts/promptOsdkPackage.d.ts.map +0 -1
  169. package/build/esm/prompts/promptOsdkPackage.test.d.ts +0 -2
  170. package/build/esm/prompts/promptOsdkPackage.test.d.ts.map +0 -1
  171. package/build/esm/prompts/promptOsdkRegistryUrl.d.ts.map +0 -1
  172. package/build/esm/prompts/promptOsdkRegistryUrl.test.d.ts +0 -2
  173. package/build/esm/prompts/promptOsdkRegistryUrl.test.d.ts.map +0 -1
  174. package/build/esm/prompts/promptOverwrite.d.ts +0 -5
  175. package/build/esm/prompts/promptOverwrite.d.ts.map +0 -1
  176. package/build/esm/prompts/promptOverwrite.test.d.ts +0 -2
  177. package/build/esm/prompts/promptOverwrite.test.d.ts.map +0 -1
  178. package/build/esm/prompts/promptProject.d.ts.map +0 -1
  179. package/build/esm/prompts/promptProject.test.d.ts +0 -2
  180. package/build/esm/prompts/promptProject.test.d.ts.map +0 -1
  181. package/build/esm/prompts/promptScopes.d.ts.map +0 -1
  182. package/build/esm/prompts/promptSdkVersion.d.ts.map +0 -1
  183. package/build/esm/prompts/promptTemplate.d.ts.map +0 -1
  184. package/build/esm/prompts/promptTemplate.test.d.ts +0 -2
  185. package/build/esm/prompts/promptTemplate.test.d.ts.map +0 -1
  186. package/build/esm/run.d.ts +0 -18
  187. package/build/esm/run.d.ts.map +0 -1
  188. package/build/esm/templates.d.ts +0 -28
  189. package/build/esm/templates.d.ts.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../create-app.template.react/build/esm/generatedNoCheck/index.js"],"names":[],"mappings":";AAAO,IAAM,KAAQ,mBAAA,IAAI,GAAI,CAAA,CAAC,CAAC,eAAiB,EAAA;AAAA,EAC9C,IAAM,EAAA,KAAA;AAAA,EACN,IAAM,EAAA,CAAA;;AAAA;;AAAA;;AAAA;;AAAA;AAAA;AAAA;;AAAA;;AAAA;AAAA;AAAA;AAAA;AAAA;;AAAA;;AAAA;;AAAA;AAAA;AAAA;;AAAA;;AAAA;;AAAA;;AAAA;AAAA;AAoCR,CAAC,CAAA,EAAG,CAAC,YAAc,EAAA;AAAA,EACjB,IAAM,EAAA,KAAA;AAAA,EACN,IAAM,EAAA,CAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AAAA;AAAA;AAAA;AAAA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAyBR,CAAC,CAAA,EAAG,CAAC,mBAAqB,EAAA;AAAA,EACxB,MAAQ,EAAA,QAAA;AAAA,EACR,MAAQ,EAAA;AACV,CAAC,CAAA,EAAG,CAAC,YAAc,EAAA;AAAA,EACjB,IAAM,EAAA,KAAA;AAAA,EACN,IAAM,EAAA,CAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAgBR,CAAC,CAAA,EAAG,CAAC,kBAAoB,EAAA;AAAA,EACvB,IAAM,EAAA,KAAA;AAAA,EACN,IAAM,EAAA,CAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAA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G,CAAC,eAAiB,EAAA;AAAA,EACpB,MAAQ,EAAA,QAAA;AAAA,EACR,MAAQ,EAAA;AACV,CAAC,CAAA,EAAG,CAAC,cAAgB,EAAA;AAAA,EACnB,IAAM,EAAA,KAAA;AAAA,EACN,IAAM,EAAA,CAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AAAA;AAAA;AAAA;AAAA;AAqCR,CAAC,CAAA,EAAG,CAAC,mBAAqB,EAAA;AAAA,EACxB,MAAQ,EAAA,QAAA;AAAA,EACR,MAAQ,EAAA;AACV,CAAC,CAAA,EAAG,CAAC,eAAiB,EAAA;AAAA,EACpB,MAAQ,EAAA,QAAA;AAAA,EACR,MAAQ,EAAA;AACV,CAAC,CAAA,EAAG,CAAC,oBAAsB,EAAA;AAAA,EACzB,MAAQ,EAAA,QAAA;AAAA,EACR,MAAQ,EAAA;AACV,CAAC,CAAA,EAAG,CAAC,oBAAsB,EAAA;AAAA,EACzB,IAAM,EAAA,KAAA;AAAA,EACN,IAAM,EAAA,CAAA;AAAA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAoBR,CAAC,CAAC,CAAC","file":"esm-ZXMFAUNZ.js","sourcesContent":["export const files = new Map([[\"README.md.hbs\", {\n type: \"raw\",\n body: `# {{project}}\n\nThis project was generated with [\\`@osdk/create-app\\`](https://www.npmjs.com/package/@osdk/create-app) and demonstrates using the Ontology SDK package \\`{{osdkPackage}}\\` with React on top of Vite. Check out the [Vite](https://vitejs.dev/guide/) docs for further configuration.\n\n## Developing\n\nRun the following command or equivalent with your preferred package manager to start a local development server on \\`http://localhost:8080\\`:\n\n\\`\\`\\`sh\nnpm run dev\n\\`\\`\\`\n\nDevelopment configuration is stored in \\`.env.development\\`.\n\n{{#if corsProxy}}\nIn order to make API requests to Foundry, a CORS proxy has been set up for local development which may be removed if the stack is configured to allow \\`http://localhost:8080\\` to load resources. The configured OAuth client must also allow \\`http://localhost:8080/auth/callback\\` as a redirect URL.\n{{else}}\nIn order to make API requests to Foundry, CORS must be configured for the stack to allow \\`http://localhost:8080\\` to load resources. If this has not been configured and you are unable to request this, you can alternatively generate your project again with \\`--corsProxy true\\` to use a proxy for API requests during local development. The configured OAuth client must also allow \\`http://localhost:8080/auth/callback\\` as a redirect URL.\n{{/if}}\n\n## Deploying\n\nRun the following command or equivalent with your preferred package manager to create a production build of your application:\n\n\\`\\`\\`sh\nnpm run build\n\\`\\`\\`\n\nProduction configuration is stored in \\`.env.production\\`.\n\nIf you did not fill in the URL your production application will be hosted on you will need to fill in the \\`VITE_FOUNDRY_REDIRECT_URL\\` in \\`.env.production\\`. A default test is included in \\`env.test.ts\\` to verify your production environment variables which you can enable by removing the skip condition or running tests with the environment variable set \\`VERIFY_ENV_PRODUCTION=true\\`.\n\nIn order to make API requests to Foundry, CORS must be configured for the stack to allow the production origin to load resources. This will be automatically done for you if you are using Foundry website hosting. The configured OAuth client must also allow the production origin auth callback as a redirect URL.\n\nA \\`foundry.config.json\\` file is included in the root of this project to make deploying to Foundry website hosting with [\\`@osdk/cli\\`](https://www.npmjs.com/package/@osdk/cli) easier. If you are not using Foundry website hosting for your application you may delete this file.\n`\n}], [\".gitignore\", {\n type: \"raw\",\n body: `# Logs\nlogs\n*.log\nnpm-debug.log*\nyarn-debug.log*\nyarn-error.log*\npnpm-debug.log*\nlerna-debug.log*\n\nnode_modules\ndist\ndist-ssr\n*.local\n\n# Editor directories and files\n.vscode/*\n!.vscode/extensions.json\n.idea\n.DS_Store\n*.suo\n*.ntvs*\n*.njsproj\n*.sln\n*.sw?\n`\n}], [\"eslint.config.mjs\", {\n \"type\": \"base64\",\n \"body\": \"Ly8gQHRzL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0cmFuZW91cy1kZXBlbmRlbmNpZXMiOiAiZXJyb3IiLAoKICAgICJyZWFjdC9yZWFjdC1pbi1qc3gtc2NvcGUiOiAib2ZmIiwKICB9LAp9KTsK\"\n}], [\"index.html\", {\n type: \"raw\",\n body: `<!doctype html>\n<html lang=\"en\">\n <head>\n <meta charset=\"UTF-8\" />\n <link rel=\"icon\" type=\"image/svg+xml\" href=\"/react.svg\" />\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n <title>Ontology SDK + React</title>\n </head>\n <body>\n <div id=\"root-container\">\n <div id=\"root\"></div>\n </div>\n <script type=\"module\" src=\"/src/main.tsx\"></script>\n </body>\n</html>\n`\n}], [\"package.json.hbs\", {\n type: \"raw\",\n body: `{\n \"name\": \"{{project}}\",\n \"private\": true,\n \"version\": \"0.0.0\",\n \"type\": \"module\",\n \"scripts\": {\n \"dev\": \"vite\",\n \"build\": \"tsc && vite build\",\n \"lint\": \"eslint . --report-unused-disable-directives --max-warnings 0\",\n \"test\": \"vitest run\",\n \"preview\": \"vite preview\"\n },\n \"dependencies\": {\n \"{{osdkPackage}}\": \"latest\",\n \"react\": \"^18\",\n \"react-dom\": \"^18\",\n \"react-router-dom\": \"^6.23.1\"\n },\n \"devDependencies\": {\n \"@eslint/compat\": \"^1.2.1\",\n \"@eslint/js\": \"^9.13.0\",\n \"@types/react\": \"^18\",\n \"@types/react-dom\": \"^18\",\n \"@typescript-eslint/eslint-plugin\": \"^8.21.0\",\n \"@typescript-eslint/parser\": \"^8.21.0\",\n \"@vitejs/plugin-react\": \"^4.2.0\",\n \"eslint\": \"^9.19.0\",\n \"eslint-plugin-import\": \"^2.31.0\",\n \"eslint-plugin-jsx-a11y\": \"^6.10.1\",\n \"eslint-plugin-react\": \"^7.37.2\",\n \"eslint-plugin-react-hooks\": \"^5.0.0\",\n \"eslint-plugin-react-refresh\": \"^0.4.14\",\n \"globals\": \"^15.11.0\",\n \"typescript\": \"~5.5.4\",\n \"typescript-eslint\": \"^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0xMjggOTAuODA4YzEyLjYyNSAwIDIyLjg2IDEwLjIzNSAyMi44NiAyMi44NnMtMTAuMjM1IDIyLjg2LTIyLjg2IDIyLjg2cy0yMi44Ni0xMC4yMzUtMjIuODYtMjIuODZzMTAuMjM1LTIyLjg2IDIyLjg2LTIyLjg2WiI+PC9wYXRoPjwvc3ZnPg==\"\n}], [\"src/AuthCallback.tsx\", {\n type: \"raw\",\n body: `import { useEffect, useState } from \"react\";\nimport { useNavigate } from \"react-router-dom\";\nimport client from \"./client\";\n\n/**\n * Component to render at \\`/auth/callback\\`\n * This calls signIn() again to save the token, and then navigates the user back to the home page.\n */\nfunction AuthCallback() {\n const [error, setError] = useState<string | undefined>(undefined);\n const navigate = useNavigate();\n\n // This effect conflicts with React 18 strict mode in development\n // https://react.dev/learn/synchronizing-with-effects#how-to-handle-the-effect-firing-twice-in-development\n useEffect(() => {\n client.auth\n .signIn()\n .then(() => navigate(\"/\", { replace: true }))\n .catch((e: unknown) => setError((e as Error).message ?? e));\n }, [navigate]);\n return <div>{error != null ? error : \"Authenticating…\"}</div>;\n}\n\nexport default AuthCallback;\n`\n}], [\"src/AuthenticatedRoute.tsx\", {\n type: \"raw\",\n body: `import { useEffect, useState } from \"react\";\nimport { Outlet, useNavigate } from \"react-router-dom\";\nimport client from \"./client\";\n\n/**\n * A component that can be used to wrap routes that require authentication.\n * Nested routes may assume that a valid token is present.\n */\nfunction AuthenticatedRoute() {\n const navigate = useNavigate();\n const [token, setToken] = useState(client.auth.token);\n useEffect(() => {\n if (client.auth.token == null || client.auth.token.isExpired) {\n client.auth\n .refresh()\n .then(() => {\n setToken(client.auth.token);\n })\n .catch(() => {\n // If we cannot refresh the token (i.e. the user is not logged in) we redirect to the login page\n navigate(\"/login\");\n });\n }\n }, [navigate]);\n\n if (token == null || token.isExpired) {\n return null;\n }\n\n return <Outlet />;\n}\n\nexport default AuthenticatedRoute;\n`\n}], [\"src/Home.module.css\", {\n \"type\": \"base64\",\n \"body\": \"Lm1ldGhvZHMgewogIHBhZGRpbmc6IDJlbTsKICBnYXA6IDJlbTsKICBkaXNwbGF5OiBmbGV4OwogIGZsZXgtZGlyZWN0aW9uOiByb3c7CiAgZmxleC13cmFwOiB3cmFwOwp9Cg==\"\n}], [\"src/Home.tsx.hbs\", {\n type: \"raw\",\n body: `import client from \"./client\";\nimport css from \"./Home.module.css\";\nimport Layout from \"./Layout\";\n\nfunction Home() {\n const objectApiNames = Object.keys(client.ontology.objects);\n const actionApiNames = Object.keys(client.ontology.actions);\n const queryApiNames = Object.keys(client.ontology.queries);\n\n return (\n <Layout>\n <h1>{{osdkPackage}}</h1>\n <p>\n Welcome to your Ontology SDK! Try using any of the following methods\n now.\n </p>\n <div className={css.methods}>\n <div>\n <h2>Objects ({objectApiNames.length})</h2>\n {objectApiNames.map((objectApiName) => (\n <pre key={objectApiName}>\n client.ontology.objects.{objectApiName}\n </pre>\n ))}\n </div>\n <div>\n <h2>Actions ({actionApiNames.length})</h2>\n {actionApiNames.map((actionApiName) => (\n <pre key={actionApiName}>\n client.ontology.actions.{actionApiName}\n </pre>\n ))}\n </div>\n <div>\n <h2>Queries ({queryApiNames.length})</h2>\n {queryApiNames.map((queryApiName) => (\n <pre key={queryApiName}>\n client.ontology.queries.{queryApiName}\n </pre>\n ))}\n </div>\n </div>\n </Layout>\n );\n}\n\nexport default Home;\n`\n}], [\"src/Layout.module.css\", {\n \"type\": \"base64\",\n \"body\": \"LmxvZ28gewogIGhlaWdodDogNmVtOwogIHBhZGRpbmc6IDEuNWVtOwogIHdpbGwtY2hhbmdlOiBmaWx0ZXI7CiAgdHJhbnNpdGlvbjogZmlsdGVyIDMwMG1zOwp9CgoubG9nbzpob3ZlciB7CiAgZmlsdGVyOiBkcm9wLXNoYWRvdygwIDAgMmVtICM2NDZjZmZhYSk7Cn0K\"\n}], [\"src/Layout.tsx\", {\n type: \"raw\",\n body: `import palantirLogo from \"/palantir.svg\";\nimport reactLogo from \"/react.svg\";\nimport React from \"react\";\nimport css from \"./Layout.module.css\";\n\ninterface LayoutProps {\n children?: React.ReactNode;\n}\n\nfunction Layout({ children }: LayoutProps) {\n return (\n <>\n <div>\n <a\n href=\"https://www.palantir.com/docs/foundry/ontology-sdk/overview/\"\n target=\"_blank\"\n rel=\"noreferrer\"\n >\n <img src={palantirLogo} className={css.logo} alt=\"Palantir logo\" />\n </a>\n <a href=\"https://react.dev\" target=\"_blank\" rel=\"noreferrer\">\n <img src={reactLogo} className={css.logo} alt=\"React logo\" />\n </a>\n </div>\n {children}\n </>\n );\n}\n\nexport default Layout;\n`\n}], [\"src/Login.tsx\", {\n type: \"raw\",\n body: `import { useCallback, useState } from \"react\";\nimport { Navigate } from \"react-router-dom\";\nimport client from \"./client\";\nimport Layout from \"./Layout\";\n\nfunction Login() {\n const [isLoggingIn, setIsLoggingIn] = useState(false);\n const [error, setError] = useState<string | undefined>(undefined);\n const token = client.auth.token;\n\n const handleLogin = useCallback(async () => {\n setIsLoggingIn(true);\n try {\n // Initiate the OAuth flow, which will redirect the user to log into Foundry\n // Once the login has completed, the user will be redirected back to the route defined via the\n // FOUNDRY_REDIRECT_URL variable in .env.development\n await client.auth.signIn();\n } catch (e: unknown) {\n console.error(e);\n setError((e as Error).message ?? e);\n } finally {\n setIsLoggingIn(false);\n }\n }, []);\n\n // If the token exists but a user tries to load /login, redirect to the home page instead\n if (token != null) {\n return <Navigate to=\"/\" replace={true} />;\n }\n\n return (\n <Layout>\n <h1>Ontology SDK</h1>\n <button onClick={handleLogin}>\n {isLoggingIn ? \"Logging in…\" : \"Log in \"}\n </button>\n {error && <div>Unable to log in: {error}</div>}\n </Layout>\n );\n}\n\nexport default Login;\n`\n}], [\"src/client.ts.hbs\", {\n type: \"raw\",\n body: `import { FoundryClient, PublicClientAuth } from \"{{osdkPackage}}\";\n\nconst url = import.meta.env.VITE_FOUNDRY_API_URL;\nconst clientId = import.meta.env.VITE_FOUNDRY_CLIENT_ID;\nconst redirectUrl = import.meta.env.VITE_FOUNDRY_REDIRECT_URL;\ncheckEnv(url, \"VITE_FOUNDRY_API_URL\");\ncheckEnv(clientId, \"VITE_FOUNDRY_CLIENT_ID\");\ncheckEnv(redirectUrl, \"VITE_FOUNDRY_REDIRECT_URL\");\n\nfunction checkEnv(\n value: string | undefined,\n name: string,\n): asserts value is string {\n if (value == null) {\n throw new Error(\\`Missing environment variable: \\${name}\\`);\n }\n}\n\n/**\n * Initialize the client to interact with the Ontology SDK\n */\nconst client = new FoundryClient({\n url,\n auth: new PublicClientAuth({\n clientId,\n url,\n redirectUrl,\n {{#if scopes}}\n scopes: [\n {{#each scopes}}\n \"{{this}}\",\n {{/each}}\n ],\n {{/if}}\n }),\n});\n\nexport default client;\n`\n}], [\"src/env.test.ts\", {\n \"type\": \"base64\",\n \"body\": \"aW1wb3J0IHsgbG9hZEVudiB9IGZyb20gInZpdGUiOwppbXBvcnQgeyBleHBlY3QsIHRlc3QgfSBmcm9tICJ2aXRlc3QiOwoKY29uc3QgRU5WX1ZBUlMgPSBbCiAgIlZJVEVfRk9VTkRSWV9BUElfVVJMIiwKICAiVklURV9GT1VORFJZX0NMSUVOVF9JRCIsCiAgIlZJVEVfRk9VTkRSWV9SRURJUkVDVF9VUkwiLApdOwoKZm9yIChjb25zdCBlbnZWYXIgb2YgRU5WX1ZBUlMpIHsKICB0ZXN0LnNraXBJZihwcm9jZXNzLmVudi5WRVJJRllfRU5WX1BST0RVQ1RJT04gIT09ICJ0cnVlIikoCiAgICBgcHJvZHVjdGlvbiBlbnYgc2hvdWxkIGNvbnRhaW4gJHtlbnZWYXJ9YCwKICAgICgpID0+IHsKICAgICAgY29uc3QgZW52ID0gbG9hZEVudigicHJvZHVjdGlvbiIsIHByb2Nlc3MuY3dkKCkpOwogICAgICBleHBlY3QoZW52W2VudlZhcl0sIGAke2VudlZhcn0gc2hvdWxkIGJlIGRlZmluZWRgKS50b0JlRGVmaW5lZCgpOwogICAgICBleHBlY3QoCiAgICAgICAgZW52W2VudlZhcl0sCiAgICAgICAgYCR7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7CiAgbWluLWhlaWdodDogMTAwdmg7Cn0KCmgxIHsKICBmb250LXNpemU6IDMuMmVtOwogIGxpbmUtaGVpZ2h0OiAxLjE7Cn0KCmJ1dHRvbiB7CiAgYm9yZGVyLXJhZGl1czogOHB4OwogIGJvcmRlcjogMXB4IHNvbGlkIHRyYW5zcGFyZW50OwogIHBhZGRpbmc6IDAuNmVtIDEuMmVtOwogIGZvbnQtc2l6ZTogMWVtOwogIGZvbnQtd2VpZ2h0OiA1MDA7CiAgZm9udC1mYW1pbHk6IGluaGVyaXQ7CiAgYmFja2dyb3VuZC1jb2xvcjogIzFhMWExYTsKICBjdXJzb3I6IHBvaW50ZXI7CiAgdHJhbnNpdGlvbjogYm9yZGVyLWNvbG9yIDAuMjVzOwp9CmJ1dHRvbjpob3ZlciB7CiAgYm9yZGVyLWNvbG9yOiAjNjQ2Y2ZmOwp9CmJ1dHRvbjpmb2N1cywKYnV0dG9uOmZvY3VzLXZpc2libGUgewogIG91dGxpbmU6IDRweCBhdXRvIC13ZWJraXQtZm9jdXMtcmluZy1jb2xvcjsKfQoKQG1lZGlhIChwcmVmZXJzLWNvbG9yLXNjaGVtZTogbGlnaHQpIHsKICA6cm9vdCB7CiAgICBjb2xvcjogIzIxMzU0NzsKICAgIGJhY2tncm91bmQtY29sb3I6ICNmZmZmZmY7CiAgfQogIGE6aG92ZXIgewogICAgY29sb3I6ICM3NDdiZmY7CiAgfQogIGJ1dHRvbiB7CiAgICBiYWNrZ3JvdW5kLWNvbG9yOiAjZjlmOWY5OwogIH0KfQo=\"\n}], [\"src/main.tsx\", {\n type: \"raw\",\n body: `import ReactDOM from \"react-dom/client\";\nimport { createBrowserRouter, RouterProvider } from \"react-router-dom\";\nimport AuthCallback from \"./AuthCallback\";\nimport AuthenticatedRoute from \"./AuthenticatedRoute\";\nimport Home from \"./Home\";\nimport Login from \"./Login\";\nimport \"./index.css\";\n\nconst router = createBrowserRouter(\n [\n {\n path: \"/\",\n element: <AuthenticatedRoute />,\n children: [\n {\n path: \"/\",\n element: <Home />,\n },\n ],\n },\n {\n path: \"/login\",\n element: <Login />,\n },\n {\n // This is the route defined in your application's redirect URL\n path: \"/auth/callback\",\n element: <AuthCallback />,\n },\n ],\n { basename: import.meta.env.BASE_URL },\n);\n\nReactDOM.createRoot(document.getElementById(\"root\")!).render(\n <RouterProvider router={router} />,\n);\n`\n}], [\"src/vite-env.d.ts\", {\n \"type\": \"base64\",\n \"body\": \"Ly8vIDxyZWZlcmVuY2UgdHlwZXM9InZpdGUvY2xpZW50IiAvPgo=\"\n}], [\"tsconfig.json\", {\n \"type\": \"base64\",\n \"body\": \"ewogICJjb21waWxlck9wdGlvbnMiOiB7CiAgICAidGFyZ2V0IjogIkVTMjAyMCIsCiAgICAidXNlRGVmaW5lRm9yQ2xhc3NGaWVsZHMiOiB0cnVlLAogICAgImxpYiI6IFsiRVMyMDIwIiwgIkRPTSIsICJET00uSXRlcmFibGUiXSwKICAgICJtb2R1bGUiOiAiRVNOZXh0IiwKICAgICJza2lwTGliQ2hlY2siOiB0cnVlLAoKICAgIC8qIEJ1bmRsZXIgbW9kZSAqLwogICAgIm1vZHVsZVJlc29sdXRpb24iOiAiYnVuZGxlciIsCiAgICAiYWxsb3dJbXBvcnRpbmdUc0V4dGVuc2lvbnMiOiB0cnVlLAogICAgInJlc29sdmVKc29uTW9kdWxlIjogdHJ1ZSwKICAgICJpc29sYXRlZE1vZHVsZXMiOiB0cnVlLAogICAgIm5vRW1pdCI6IHRydWUsCiAgICAianN4IjogInJlYWN0LWpzeCIsCgogICAgLyogTGludGluZyAqLwogICAgInN0cmljdCI6IHRydWUsCiAgICAibm9VbnVzZWRMb2NhbHMiOiB0cnVlLAogICAgIm5vVW51c2VkUGFyYW1ldGVycyI6IHRydWUsCiAgICAibm9GYWxsdGhyb3VnaENhc2VzSW5Td2l0Y2giOiB0cnVlCiAgfSwKICAiaW5jbHVkZSI6IFsic3JjIl0sCiAgInJlZmVyZW5jZXMiOiBbeyAicGF0aCI6ICIuL3RzY29uZmlnLm5vZGUuanNvbiIgfV0KfQo=\"\n}], [\"tsconfig.node.json\", {\n \"type\": \"base64\",\n \"body\": \"ewogICJjb21waWxlck9wdGlvbnMiOiB7CiAgICAiY29tcG9zaXRlIjogdHJ1ZSwKICAgICJza2lwTGliQ2hlY2siOiB0cnVlLAogICAgIm1vZHVsZSI6ICJFU05leHQiLAogICAgIm1vZHVsZVJlc29sdXRpb24iOiAiYnVuZGxlciIsCiAgICAiYWxsb3dTeW50aGV0aWNEZWZhdWx0SW1wb3J0cyI6IHRydWUKICB9LAogICJpbmNsdWRlIjogWyJ2aXRlLmNvbmZpZy50cyJdCn0K\"\n}], [\"vite.config.ts.hbs\", {\n type: \"raw\",\n body: `import react from \"@vitejs/plugin-react\";\nimport { defineConfig } from \"vite\";\n\n// https://vitejs.dev/config/\nexport default defineConfig({\n plugins: [react()],\n server: {\n port: 8080,\n {{#if corsProxy}}\n proxy: {\n \"^(/multipass/api|/api)\": {\n target: \"{{foundryUrl}}\",\n changeOrigin: true,\n secure: true,\n },\n },\n {{/if}}\n },\n});\n`\n}]]);"]}
@@ -49,7 +49,7 @@ async function promptApplicationUrl({
49
49
  applicationUrl
50
50
  }) {
51
51
  if (skipApplicationUrl) {
52
- return void 0;
52
+ return undefined;
53
53
  }
54
54
  if (applicationUrl == null) {
55
55
  const skip = await consola.prompt(
@@ -68,7 +68,7 @@ async function promptApplicationUrl({
68
68
  // https://github.com/unjs/consola/pull/238
69
69
  );
70
70
  if (skip === "no") {
71
- return void 0;
71
+ return undefined;
72
72
  }
73
73
  }
74
74
  while (applicationUrl == null || !/^https?:\/\//.test(applicationUrl)) {
@@ -222,7 +222,7 @@ async function promptScopes({
222
222
  scopes
223
223
  }) {
224
224
  if (scopes == null) {
225
- return void 0;
225
+ return undefined;
226
226
  }
227
227
  while (true) {
228
228
  const invalidScopes = scopes.filter((scope) => !scopeNameRegex.test(scope));
@@ -234,8 +234,8 @@ async function promptScopes({
234
234
  consola.fail(`Scopes [ ${joinedInvalidScopes} ] are invalid. Scope names can only contain letters, hyphens, underscores, and colons`);
235
235
  const stringScopes = await consola.prompt("Scopes:", {
236
236
  type: "text",
237
- placeholder: "api:ontologies-read api:ontologies-write",
238
- default: "api:ontologies-read api:ontologies-write"
237
+ placeholder: "api:read-data api:write-data",
238
+ default: "api:read-data api:write-data"
239
239
  });
240
240
  scopes = stringScopes.split(" ");
241
241
  }
@@ -292,8 +292,18 @@ var TEMPLATES = [
292
292
  envPrefix: "VITE_",
293
293
  buildDirectory: "./dist",
294
294
  files: {
295
- "1.x": getPackageFiles(import('./esm-IWXD7ZFP.js')),
296
- "2.x": getPackageFiles(import('./esm-S2OWTMMF.js'))
295
+ "1.x": getPackageFiles(import('./esm-ZXMFAUNZ.js')),
296
+ "2.x": getPackageFiles(import('./esm-FZSV3C5D.js'))
297
+ }
298
+ },
299
+ // Expo
300
+ {
301
+ id: "template-expo",
302
+ label: "Expo",
303
+ envPrefix: "EXPO_PUBLIC_",
304
+ buildDirectory: "./dist",
305
+ files: {
306
+ "2.x": getPackageFiles(import('./esm-BFQ5RNHV.js'))
297
307
  }
298
308
  },
299
309
  // Vue
@@ -303,8 +313,8 @@ var TEMPLATES = [
303
313
  envPrefix: "VITE_",
304
314
  buildDirectory: "./dist",
305
315
  files: {
306
- "1.x": getPackageFiles(import('./esm-F6Y6OKER.js')),
307
- "2.x": getPackageFiles(import('./esm-G7B67PJ6.js'))
316
+ "1.x": getPackageFiles(import('./esm-HA4JIHHL.js')),
317
+ "2.x": getPackageFiles(import('./esm-EXZTN5HA.js'))
308
318
  }
309
319
  },
310
320
  // Next (static export)
@@ -314,8 +324,8 @@ var TEMPLATES = [
314
324
  envPrefix: "NEXT_PUBLIC_",
315
325
  buildDirectory: "./out",
316
326
  files: {
317
- "1.x": getPackageFiles(import('./esm-LF7OTAKA.js')),
318
- "2.x": getPackageFiles(import('./esm-FXURBNU2.js'))
327
+ "1.x": getPackageFiles(import('./esm-NFVUE2AE.js')),
328
+ "2.x": getPackageFiles(import('./esm-4SFFV2ZK.js'))
319
329
  }
320
330
  },
321
331
  // Tutorial: To do App
@@ -325,8 +335,8 @@ var TEMPLATES = [
325
335
  envPrefix: "VITE_",
326
336
  buildDirectory: "./dist",
327
337
  files: {
328
- "1.x": getPackageFiles(import('./esm-PQDKPDBA.js')),
329
- "2.x": getPackageFiles(import('./esm-4QSCBEZC.js'))
338
+ "1.x": getPackageFiles(import('./esm-XWXVWZDN.js')),
339
+ "2.x": getPackageFiles(import('./esm-WPYEYT7F.js'))
330
340
  }
331
341
  },
332
342
  // Tutorial: To do AIP App
@@ -336,8 +346,8 @@ var TEMPLATES = [
336
346
  envPrefix: "VITE_",
337
347
  buildDirectory: "./dist",
338
348
  files: {
339
- "1.x": getPackageFiles(import('./esm-Y7D2PCM4.js')),
340
- "2.x": getPackageFiles(import('./esm-H2IADGOR.js'))
349
+ "1.x": getPackageFiles(import('./esm-YVNV3MQG.js')),
350
+ "2.x": getPackageFiles(import('./esm-ZDKAQEHX.js'))
341
351
  }
342
352
  }
343
353
  ];
@@ -508,8 +518,8 @@ async function run({
508
518
  const ourPackageJsonPath = findUpSync("package.json", {
509
519
  cwd: fileURLToPath(import.meta.url)
510
520
  });
511
- ourPackageJsonPath ? JSON.parse(fs2.readFileSync(ourPackageJsonPath, "utf-8")).version : void 0;
512
- const clientVersion = "2.1.0-beta.9";
521
+ ourPackageJsonPath ? JSON.parse(fs2.readFileSync(ourPackageJsonPath, "utf-8")).version : undefined;
522
+ const clientVersion = "2.2.0-beta.1";
513
523
  const templateContext = {
514
524
  project,
515
525
  foundryUrl,
@@ -583,7 +593,7 @@ async function run({
583
593
 
584
594
  // src/cli.ts
585
595
  async function cli(args = process.argv) {
586
- const base = yargs(hideBin(args)).version("2.1.0-beta.9").wrap(Math.min(150, yargs().terminalWidth())).strict().help().command("$0 [project] [--<option>]", "Create a new OSDK application based on framework templates. Information may be provided through options to skip interactive prompts.", (yargs2) => yargs2.positional("project", {
596
+ const base = yargs(hideBin(args)).version("2.2.0-beta.1").wrap(Math.min(150, yargs().terminalWidth())).strict().help().command("$0 [project] [--<option>]", "Create a new OSDK application based on framework templates. Information may be provided through options to skip interactive prompts.", (yargs2) => yargs2.positional("project", {
587
597
  type: "string",
588
598
  describe: "Project name to create"
589
599
  }).option("overwrite", {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/consola.ts","../../src/highlight.ts","../../src/prompts/promptApplicationRid.ts","../../src/prompts/promptApplicationUrl.ts","../../src/prompts/promptClientId.ts","../../src/prompts/promptCorsProxy.ts","../../src/prompts/promptFoundryUrl.ts","../../src/prompts/promptOsdkPackage.ts","../../src/prompts/promptOsdkRegistryUrl.ts","../../src/prompts/promptOverwrite.ts","../../src/prompts/promptProject.ts","../../src/prompts/promptScopes.ts","../../src/prompts/promptSdkVersion.ts","../../src/getPackageFiles.ts","../../src/generatedNoCheck/templates.ts","../../src/prompts/promptTemplate.ts","../../../generator-utils/build/esm/changeVersionPrefix.js","../../../../node_modules/.pnpm/tiny-invariant@1.3.3/node_modules/tiny-invariant/dist/esm/tiny-invariant.js","../../src/generate/generateEnv.ts","../../src/generate/generateFoundryConfigJson.ts","../../src/generate/generateNpmRc.ts","../../src/run.ts","../../src/cli.ts"],"names":["defaultConsola","fs","path","sdkVersion","template","yargs"],"mappings":";;;;;;;;;;;AAiBO,IAAM,UAAU,aAAc,CAAA;AAAA;AAAA,EAEnC,MAAM,UAAU,MAAQ,EAAA;AACtB,IAAA,MAAM,QAAW,GAAA,MAAMA,SAAe,CAAA,MAAA,CAAO,GAAG,MAAM,CAAA,CAAA;AACtD,IAAA,IAAI,OAAO,QAAa,KAAA,QAAA,IAAY,QAAS,CAAA,QAAA,OAAe,sBAAwB,EAAA;AAClF,MAAAA,SAAA,CAAe,KAAK,qBAAqB,CAAA,CAAA;AACzC,MAAA,OAAA,CAAQ,KAAK,CAAC,CAAA,CAAA;AAAA,KAChB;AACA,IAAO,OAAA,QAAA,CAAA;AAAA,GACT;AACF,C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GAAc,MAAM,iBAAA,CAAkB,MAAM,CAAA,CAAA;AAClD,EAAM,MAAA,eAAA,GAAkB,MAAM,qBAAA,CAAsB,MAAM,CAAA,CAAA;AAC1D,EAAM,MAAA,SAAA,GAAY,MAAM,eAAA,CAAgB,MAAM,CAAA,CAAA;AAC9C,EAAM,MAAA,MAAA,GAAS,MAAM,YAAA,CAAa,MAAM,CAAA,CAAA;AACxC,EAAA,MAAM,GAAI,CAAA;AAAA,IACR,OAAA;AAAA,IACA,SAAA;AAAA,IACA,QAAA;AAAA,IACA,UAAA;AAAA,IACA,UAAA;AAAA,IACA,cAAA;AAAA,IACA,WAAA;AAAA,IACA,QAAA;AAAA,IACA,WAAA;AAAA,IACA,eAAA;AAAA,IACA,SAAA;AAAA,IACA,MAAA;AAAA,GACD,CAAA,CAAA;AACH","file":"index.js","sourcesContent":["/*\n * Copyright 2023 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 { consola as defaultConsola, createConsola } from \"consola\";\nexport const consola = createConsola({\n // https://github.com/unjs/consola/issues/251\n async prompt(...params) {\n const response = await defaultConsola.prompt(...params);\n if (typeof response === \"symbol\" && response.toString() === \"Symbol(clack:cancel)\") {\n defaultConsola.fail(\"Operation cancelled\");\n process.exit(0);\n }\n return response;\n }\n});","/*\n * Copyright 2023 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 { colorize } from \"consola/utils\";\nexport function green(text) {\n return colorize(\"green\", text);\n}\nexport function italic(text) {\n return colorize(\"italic\", text);\n}","/*\n * Copyright 2023 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 { consola } from \"../consola.js\";\nimport { italic } from \"../highlight.js\";\nexport async function promptApplicationRid({\n application\n}) {\n while (application == null || !/^ri\\.third-party-applications\\.[^.]+\\.application\\.[^.]+$/.test(application)) {\n if (application != null) {\n consola.fail(\"Please enter a valid application resource identifier (rid)\");\n }\n application = await consola.prompt(`Enter the application resource identifier (rid) for your application from Developer Console:\\n${italic(\"(Example: ri.third-party-applications.main.application.1c66b352-4e00-40d2-995d-061c9d533ace)\")}`, {\n type: \"text\"\n });\n }\n return application;\n}","/*\n * Copyright 2023 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 { consola } from \"../consola.js\";\nimport { italic } from \"../highlight.js\";\nexport async function promptApplicationUrl({\n skipApplicationUrl,\n applicationUrl\n}) {\n if (skipApplicationUrl) {\n return undefined;\n }\n if (applicationUrl == null) {\n const skip = await consola.prompt(`Do you know the URL your production application will be hosted on? This is required to create a production build of your application with the correct OAuth redirect URL.`, {\n type: \"select\",\n options: [{\n label: \"Yes, let me fill it here\",\n value: \"yes\"\n }, {\n label: \"No, I will fill it in later following the instructions in the generated README\",\n value: \"no\"\n }]\n }\n // Types for \"select\" are wrong the value is returned rather than the option object\n // https://github.com/unjs/consola/pull/238\n );\n if (skip === \"no\") {\n return undefined;\n }\n }\n while (applicationUrl == null || !/^https?:\\/\\//.test(applicationUrl)) {\n if (applicationUrl != null) {\n consola.fail(\"Please enter a valid application URL\");\n }\n applicationUrl = await consola.prompt(`Enter the URL your production application will be hosted on:\\n${italic(\"(Example: https://myapp.example.palantirfoundry.com)\")}`, {\n type: \"text\"\n });\n }\n return applicationUrl.replace(/\\/$/, \"\");\n}","/*\n * Copyright 2023 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 { consola } from \"../consola.js\";\nimport { italic } from \"../highlight.js\";\nexport async function promptClientId({\n clientId\n}) {\n while (clientId == null || !/^[0-9a-f]+$/.test(clientId)) {\n if (clientId != null) {\n consola.fail(\"Please enter a valid OAuth client ID\");\n }\n clientId = await consola.prompt(`Enter the OAuth client ID for your application from Developer Console:\\n${italic(\"(Example: 2650385ab6c5e0df3b44aff776b00a42)\")}`, {\n type: \"text\"\n });\n }\n return clientId;\n}","/*\n * Copyright 2023 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 { consola } from \"../consola.js\";\nimport { italic } from \"../highlight.js\";\nexport async function promptCorsProxy({\n corsProxy\n}) {\n if (corsProxy != null) {\n return corsProxy;\n }\n return consola.prompt(`Include a CORS proxy for Foundry API requests during local development?\\n${italic(\"This is required if your enrollment has not allowed localhost for CORS.\")}`, {\n type: \"confirm\",\n initial: false\n });\n}","/*\n * Copyright 2023 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 { consola } from \"../consola.js\";\nimport { italic } from \"../highlight.js\";\nexport async function promptFoundryUrl({\n foundryUrl\n}) {\n while (foundryUrl == null || !foundryUrl.startsWith(\"https://\")) {\n if (foundryUrl != null) {\n consola.fail(\"Please enter a valid Foundry URL\");\n }\n foundryUrl = await consola.prompt(`Enter the URL for your Foundry stack:\\n${italic(\"(Example: https://example.palantirfoundry.com)\")}`, {\n type: \"text\"\n });\n }\n return foundryUrl.replace(/\\/$/, \"\");\n}","/*\n * Copyright 2023 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 { consola } from \"../consola.js\";\nimport { italic } from \"../highlight.js\";\nexport async function promptOsdkPackage({\n osdkPackage\n}) {\n while (osdkPackage == null || !/^@[a-z0-9-]+\\/sdk$/.test(osdkPackage)) {\n if (osdkPackage != null) {\n consola.fail(\"Please enter a valid OSDK package name\");\n }\n osdkPackage = await consola.prompt(`Enter the OSDK package name for your application from Developer Console:\\n${italic(\"(Example: @my-app/sdk)\")}`, {\n type: \"text\"\n });\n }\n return osdkPackage;\n}","/*\n * Copyright 2023 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 { consola } from \"../consola.js\";\nimport { italic } from \"../highlight.js\";\nexport async function promptOsdkRegistryUrl({\n osdkRegistryUrl\n}) {\n while (osdkRegistryUrl == null || !/^https:\\/\\/[^/]+\\/artifacts\\/api\\/repositories\\/ri\\.artifacts\\.[^/]+\\/contents\\/release\\/npm\\/?$/.test(osdkRegistryUrl)) {\n if (osdkRegistryUrl != null) {\n consola.fail(\"Please enter a valid NPM registry URL to install your OSDK package\");\n }\n osdkRegistryUrl = await consola.prompt(`Enter the NPM registry URL to install your OSDK package from Developer Console:\\n${italic(\"(Example: https://example.palantirfoundry.com/artifacts/api/repositories/ri.artifacts.main.repository.a4a7fe1c-486f-4226-b706-7b90005f527d/contents/release/npm)\")}`, {\n type: \"text\"\n });\n }\n return osdkRegistryUrl.replace(/\\/$/, \"\");\n}","/*\n * Copyright 2023 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 fs from \"node:fs\";\nimport path from \"node:path\";\nimport { consola } from \"../consola.js\";\nimport { green } from \"../highlight.js\";\nexport async function promptOverwrite({\n project,\n overwrite\n}) {\n if (overwrite != null) {\n return overwrite;\n }\n if (!fs.existsSync(path.join(process.cwd(), project))) {\n return true;\n }\n const result = await consola.prompt(`The directory ${green(project)} already exists do you want to overwrite or ignore it?`, {\n type: \"select\",\n options: [{\n label: \"Remove existing files and continue\",\n value: \"overwrite\"\n }, {\n label: \"Ignore files and continue\",\n value: \"ignore\"\n }, {\n label: \"Cancel\",\n value: \"cancel\"\n }]\n }\n // Types for \"select\" are wrong the value is returned rather than the option object\n // https://github.com/unjs/consola/pull/238\n );\n switch (result) {\n case \"overwrite\":\n return true;\n case \"ignore\":\n return false;\n case \"cancel\":\n consola.fail(\"Operation cancelled\");\n process.exit(0);\n }\n}","/*\n * Copyright 2023 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 { consola } from \"../consola.js\";\nexport async function promptProject({\n project\n}) {\n while (project == null || !/^[a-zA-Z0-9-_]+$/.test(project)) {\n if (project != null) {\n consola.fail(\"Project name can only contain alphanumeric characters, hyphens and underscores\");\n }\n project = await consola.prompt(\"Project name:\", {\n type: \"text\",\n placeholder: \"my-osdk-app\",\n default: \"my-osdk-app\"\n });\n }\n return project;\n}","/*\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 */\n\nimport { consola } from \"../consola.js\";\nconst scopeNameRegex = /^[a-zA-Z-_:]+$/;\nexport async function promptScopes({\n scopes\n}) {\n if (scopes == null) {\n return undefined;\n }\n while (true) {\n const invalidScopes = scopes.filter(scope => !scopeNameRegex.test(scope));\n const allValidScopes = invalidScopes.length === 0;\n if (allValidScopes) {\n break;\n }\n const joinedInvalidScopes = invalidScopes.join(\", \");\n consola.fail(`Scopes [ ${joinedInvalidScopes} ] are invalid. Scope names can only contain letters, hyphens, underscores, and colons`);\n const stringScopes = await consola.prompt(\"Scopes:\", {\n type: \"text\",\n placeholder: \"api:ontologies-read api:ontologies-write\",\n default: \"api:ontologies-read api:ontologies-write\"\n });\n scopes = stringScopes.split(\" \");\n }\n return deduplicateScopes(scopes);\n}\n\n// Preserving the originally specified scope order\nfunction deduplicateScopes(scopes) {\n const dedupedScopes = [];\n const seen = new Set();\n for (const scope of scopes) {\n if (seen.has(scope)) {\n continue;\n }\n dedupedScopes.push(scope);\n seen.add(scope);\n }\n return dedupedScopes;\n}","/*\n * Copyright 2023 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 { consola } from \"../consola.js\";\nexport async function promptSdkVersion({\n sdkVersion,\n template\n}) {\n if (sdkVersion == null) {\n // If the SDK version is not provided, default to the earliest template version for backwards-compatibility\n return Object.keys(template.files)[0];\n }\n if (template.files[sdkVersion] == null) {\n consola.fail(`The ${template.label} template does not support a \"${sdkVersion}\" SDK version.`);\n sdkVersion = await consola.prompt(`Please choose which version of the OSDK you'd like to use for the ${template.label} template:`, {\n type: \"select\",\n options: Object.keys(template.files).reverse().map(sdkVersion => ({\n label: sdkVersion,\n value: sdkVersion\n }))\n }\n // Types for \"select\" are wrong the value is returned rather than the option object\n // https://github.com/unjs/consola/pull/238\n );\n }\n return sdkVersion;\n}","/*\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 */\n\nexport const getPackageFiles = importPromise => async () => (await importPromise).files;","// THIS FILE IS GENERATED. DO NOT MODIFY.\n// You probably want to modify ../../../codegen.mjs instead.\n\nimport { getPackageFiles } from \"../getPackageFiles.js\";\nexport const TEMPLATES = [\n// React\n{\n id: \"template-react\",\n label: \"React\",\n envPrefix: \"VITE_\",\n buildDirectory: \"./dist\",\n files: {\n \"1.x\": getPackageFiles(import(\"@osdk/create-app.template.react\")),\n \"2.x\": getPackageFiles(import(\"@osdk/create-app.template.react.beta\"))\n }\n},\n// Vue\n{\n id: \"template-vue\",\n label: \"Vue\",\n envPrefix: \"VITE_\",\n buildDirectory: \"./dist\",\n files: {\n \"1.x\": getPackageFiles(import(\"@osdk/create-app.template.vue\")),\n \"2.x\": getPackageFiles(import(\"@osdk/create-app.template.vue.v2\"))\n }\n},\n// Next (static export)\n{\n id: \"template-next-static-export\",\n label: \"Next (static export)\",\n envPrefix: \"NEXT_PUBLIC_\",\n buildDirectory: \"./out\",\n files: {\n \"1.x\": getPackageFiles(import(\"@osdk/create-app.template.next-static-export\")),\n \"2.x\": getPackageFiles(import(\"@osdk/create-app.template.next-static-export.v2\"))\n }\n},\n// Tutorial: To do App\n{\n id: \"template-tutorial-todo-app\",\n label: \"Tutorial: To do App\",\n envPrefix: \"VITE_\",\n buildDirectory: \"./dist\",\n files: {\n \"1.x\": getPackageFiles(import(\"@osdk/create-app.template.tutorial-todo-app\")),\n \"2.x\": getPackageFiles(import(\"@osdk/create-app.template.tutorial-todo-app.beta\"))\n }\n},\n// Tutorial: To do AIP App\n{\n id: \"template-tutorial-todo-aip-app\",\n label: \"Tutorial: To do AIP App\",\n envPrefix: \"VITE_\",\n buildDirectory: \"./dist\",\n files: {\n \"1.x\": getPackageFiles(import(\"@osdk/create-app.template.tutorial-todo-aip-app\")),\n \"2.x\": getPackageFiles(import(\"@osdk/create-app.template.tutorial-todo-aip-app.beta\"))\n }\n}];","/*\n * Copyright 2023 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 { consola } from \"../consola.js\";\nimport { TEMPLATES } from \"../generatedNoCheck/templates.js\";\nimport { green } from \"../highlight.js\";\nexport async function promptTemplate(parsed) {\n let useBeta = parsed.beta ?? false;\n let template = TEMPLATES.find(t => t.id === parsed.template || t.id === `template-${parsed.template}`);\n if (template == null) {\n const availableTemplates = TEMPLATES.filter(template => !template.hidden && (useBeta ? template.isBeta === true\n // isBeta could be null\n : !template.isBeta));\n if (availableTemplates.length === 0) {\n throw new Error(\"No available templates found for the selected options.\");\n }\n const templateId = await consola.prompt(parsed.template != null ? `The provided template ${green(parsed.template)} is invalid please select a framework:` : \"Select a framework:\", {\n type: \"select\",\n options: availableTemplates.map(template => ({\n value: template.id,\n label: template.label\n }))\n // Types for \"select\" are wrong the value is returned rather than the option object\n // https://github.com/unjs/consola/pull/238\n });\n template = TEMPLATES.find(t => t.id === templateId);\n if (template == null) {\n throw new Error(`Template ${templateId} should be found`);\n }\n }\n return template;\n}","/*\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 */\nexport function changeVersionPrefix(version, prefix) {\n const isWorkspaceProtocol = version.startsWith(\"workspace:\");\n if (isWorkspaceProtocol) {\n version = version.slice(\"workspace:\".length);\n }\n if (version[0] === \"^\" || version[0] === \"~\" || version[0] === \"*\") {\n version = version.slice(1);\n }\n return `${isWorkspaceProtocol ? \"workspace:\" : \"\"}${prefix}${version}`;\n}","var isProduction = process.env.NODE_ENV === 'production';\nvar prefix = 'Invariant failed';\nfunction invariant(condition, message) {\n if (condition) {\n return;\n }\n if (isProduction) {\n throw new Error(prefix);\n }\n var provided = typeof message === 'function' ? message() : message;\n var value = provided ? \"\".concat(prefix, \": \").concat(provided) : prefix;\n throw new Error(value);\n}\nexport { invariant as default };","/*\n * Copyright 2023 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\nexport function generateEnvDevelopment({\n envPrefix,\n foundryUrl,\n clientId,\n corsProxy\n}) {\n return generateEnv({\n envPrefix,\n foundryUrl: corsProxy ? \"http://localhost:8080\" : foundryUrl,\n applicationUrl: \"http://localhost:8080\",\n clientId\n });\n}\nexport function generateEnvProduction({\n envPrefix,\n foundryUrl,\n applicationUrl,\n clientId\n}) {\n return generateEnv({\n envPrefix,\n foundryUrl,\n applicationUrl,\n clientId\n });\n}\nfunction generateEnv({\n envPrefix,\n foundryUrl,\n applicationUrl,\n clientId\n}) {\n return `${envPrefix}FOUNDRY_API_URL=${foundryUrl}\\n` + `${applicationUrl == null ? \"# \" : \"\"}${envPrefix}FOUNDRY_REDIRECT_URL=${applicationUrl ?? \"<Fill in the domain at which you deploy your application>\"}/auth/callback\\n` + `${envPrefix}FOUNDRY_CLIENT_ID=${clientId}\\n`;\n}","/*\n * Copyright 2023 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\nexport function generateFoundryConfigJson({\n foundryUrl,\n application,\n directory\n}) {\n return JSON.stringify({\n foundryUrl,\n site: {\n application,\n directory,\n autoVersion: {\n type: \"git-describe\",\n tagPrefix: \"\"\n }\n }\n }, null, 2) + \"\\n\";\n}","/*\n * Copyright 2023 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\nexport function generateNpmRc({\n osdkPackage,\n osdkRegistryUrl\n}) {\n // pnpm requires a trailing slash in .npmrc\n // https://github.com/pnpm/pnpm/issues/5941\n const withTrailingSlash = osdkRegistryUrl.endsWith(\"/\") ? osdkRegistryUrl : osdkRegistryUrl + \"/\";\n const withoutProtocol = withTrailingSlash.replace(/^https:\\/\\//, \"\");\n const packageScope = osdkPackage.split(\"/\")[0];\n return `//${withoutProtocol}:_authToken=\\${FOUNDRY_TOKEN}\\n` + `${packageScope}:registry=${withTrailingSlash}\\n`;\n}","/*\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 */\n\nimport { changeVersionPrefix } from \"@osdk/generator-utils\";\nimport { findUpSync } from \"find-up\";\nimport Handlebars from \"handlebars\";\nimport fs from \"node:fs\";\nimport path from \"node:path\";\nimport { fileURLToPath } from \"node:url\";\nimport { consola } from \"./consola.js\";\nimport { generateEnvDevelopment, generateEnvProduction } from \"./generate/generateEnv.js\";\nimport { generateFoundryConfigJson } from \"./generate/generateFoundryConfigJson.js\";\nimport { generateNpmRc } from \"./generate/generateNpmRc.js\";\nimport { green } from \"./highlight.js\";\nexport async function run({\n project,\n overwrite,\n template,\n sdkVersion,\n foundryUrl,\n applicationUrl,\n application,\n clientId,\n osdkPackage,\n osdkRegistryUrl,\n corsProxy,\n scopes\n}) {\n consola.log(\"\");\n consola.start(`Creating project ${green(project)} using template ${green(template.id)}`);\n const cwd = process.cwd();\n const root = path.join(cwd, project);\n if (fs.existsSync(root)) {\n if (overwrite) {\n consola.info(`Overwriting existing project directory`);\n fs.rmSync(root, {\n recursive: true,\n force: true\n });\n fs.mkdirSync(root, {\n recursive: true\n });\n } else {\n consola.info(`Reusing existing project directory`);\n }\n } else {\n consola.info(`Creating project directory`);\n fs.mkdirSync(root, {\n recursive: true\n });\n }\n consola.info(`Copying files into project directory`);\n if (template.files[sdkVersion] == null) {\n throw new Error(`The ${template.label} template does not support a \"${sdkVersion}\" SDK version.`);\n }\n const files = await template.files[sdkVersion]();\n for (const [filePath, contents] of files) {\n const finalPath = path.join(root, filePath);\n const dirPath = path.dirname(finalPath);\n await fs.promises.mkdir(dirPath, {\n recursive: true\n });\n await fs.promises.writeFile(finalPath, Buffer.from(contents.body, contents.type === \"raw\" ? \"utf-8\" : \"base64\"));\n }\n const ourPackageJsonPath = findUpSync(\"package.json\", {\n cwd: fileURLToPath(import.meta.url)\n });\n const ourPackageJsonVersion = ourPackageJsonPath ? JSON.parse(fs.readFileSync(ourPackageJsonPath, \"utf-8\")).version : undefined;\n const clientVersion = process.env.PACKAGE_CLIENT_VERSION ?? ourPackageJsonVersion;\n if (clientVersion === undefined) {\n throw new Error(\"Could not determine current @osdk/client version\");\n }\n const templateContext = {\n project,\n foundryUrl,\n osdkPackage,\n corsProxy,\n clientVersion: changeVersionPrefix(clientVersion, \"^\"),\n scopes\n };\n const processFiles = function (dir) {\n fs.readdirSync(dir).forEach(function (file) {\n file = dir + \"/\" + file;\n const stat = fs.statSync(file);\n if (stat.isDirectory()) {\n processFiles(file);\n return;\n }\n if (file.endsWith(\"/_gitignore\")) {\n fs.renameSync(file, file.replace(/\\/_gitignore$/, \"/.gitignore\"));\n return;\n }\n if (!file.endsWith(\".hbs\")) {\n return;\n }\n const templated = Handlebars.compile(fs.readFileSync(file, \"utf-8\"))(templateContext);\n fs.writeFileSync(file.replace(/.hbs$/, \"\"), templated);\n fs.rmSync(file);\n });\n };\n processFiles(root);\n const npmRc = generateNpmRc({\n osdkPackage,\n osdkRegistryUrl\n });\n fs.writeFileSync(path.join(root, \".npmrc\"), npmRc);\n const envDevelopment = generateEnvDevelopment({\n envPrefix: template.envPrefix,\n foundryUrl,\n clientId,\n corsProxy\n });\n fs.writeFileSync(path.join(root, \".env.development\"), envDevelopment);\n const envProduction = generateEnvProduction({\n envPrefix: template.envPrefix,\n foundryUrl,\n applicationUrl,\n clientId\n });\n fs.writeFileSync(path.join(root, \".env.production\"), envProduction);\n const foundryConfigJson = generateFoundryConfigJson({\n foundryUrl,\n application,\n directory: template.buildDirectory\n });\n fs.writeFileSync(path.join(root, \"foundry.config.json\"), foundryConfigJson);\n consola.success(\"Success\");\n const cdRelative = path.relative(cwd, root);\n consola.box({\n message: `Done! Run the following commands to get started:\\n` + `\\n` + ` \\`cd ${cdRelative}\\`\\n` + ` \\`export FOUNDRY_TOKEN=<token>\\`\\n` + ` \\`npm install\\`\\n` + ` \\`npm run dev\\``,\n style: {\n padding: 2,\n borderColor: \"green\",\n borderStyle: \"rounded\"\n }\n });\n}","/*\n * Copyright 2023 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 yargs from \"yargs\";\nimport { hideBin } from \"yargs/helpers\";\nimport { promptApplicationRid } from \"./prompts/promptApplicationRid.js\";\nimport { promptApplicationUrl } from \"./prompts/promptApplicationUrl.js\";\nimport { promptClientId } from \"./prompts/promptClientId.js\";\nimport { promptCorsProxy } from \"./prompts/promptCorsProxy.js\";\nimport { promptFoundryUrl } from \"./prompts/promptFoundryUrl.js\";\nimport { promptOsdkPackage } from \"./prompts/promptOsdkPackage.js\";\nimport { promptOsdkRegistryUrl } from \"./prompts/promptOsdkRegistryUrl.js\";\nimport { promptOverwrite } from \"./prompts/promptOverwrite.js\";\nimport { promptProject } from \"./prompts/promptProject.js\";\nimport { promptScopes } from \"./prompts/promptScopes.js\";\nimport { promptSdkVersion } from \"./prompts/promptSdkVersion.js\";\nimport { promptTemplate } from \"./prompts/promptTemplate.js\";\nimport { run } from \"./run.js\";\nexport async function cli(args = process.argv) {\n const base = yargs(hideBin(args)).version(process.env.PACKAGE_VERSION ?? \"\").wrap(Math.min(150, yargs().terminalWidth())).strict().help().command(\"$0 [project] [--<option>]\", \"Create a new OSDK application based on framework templates. Information may be provided through options to skip interactive prompts.\", yargs => yargs.positional(\"project\", {\n type: \"string\",\n describe: \"Project name to create\"\n }).option(\"overwrite\", {\n type: \"boolean\",\n describe: \"Overwrite project directory if already exists\"\n }).option(\"beta\", {\n type: \"boolean\",\n describe: \"Use templates compatible with the Beta version of the SDK\"\n }).option(\"template\", {\n type: \"string\",\n describe: \"Template name to use\"\n }).option(\"sdkVersion\", {\n type: \"string\",\n describe: \"The OSDK version to use\"\n }).option(\"foundryUrl\", {\n type: \"string\",\n describe: \"URL for the Foundry stack\"\n }).option(\"applicationUrl\", {\n type: \"string\",\n describe: \"URL the production application will be hosted on\",\n conflicts: \"skipApplicationUrl\"\n }).option(\"skipApplicationUrl\", {\n type: \"boolean\",\n describe: \"Skip filling in URL the production application will be hosted on\"\n }).option(\"application\", {\n type: \"string\",\n describe: \"Application resource identifier (rid)\"\n }).option(\"clientId\", {\n type: \"string\",\n describe: \"OAuth client ID for application\"\n }).option(\"osdkPackage\", {\n type: \"string\",\n describe: \"OSDK package name for application\"\n }).option(\"osdkRegistryUrl\", {\n type: \"string\",\n describe: \"URL for NPM registry to install OSDK package\"\n }).option(\"corsProxy\", {\n type: \"boolean\",\n describe: \"Include a CORS proxy for Foundry API requests during local development\"\n }).option(\"scopes\", {\n type: \"string\",\n array: true,\n describe: \"List of client-side scopes to be used when creating a client\"\n }));\n const parsed = base.parseSync();\n const project = await promptProject(parsed);\n const overwrite = await promptOverwrite({\n ...parsed,\n project\n });\n const template = await promptTemplate(parsed);\n const sdkVersion = await promptSdkVersion({\n ...parsed,\n template\n });\n const foundryUrl = await promptFoundryUrl(parsed);\n const applicationUrl = await promptApplicationUrl(parsed);\n const application = await promptApplicationRid(parsed);\n const clientId = await promptClientId(parsed);\n const osdkPackage = await promptOsdkPackage(parsed);\n const osdkRegistryUrl = await promptOsdkRegistryUrl(parsed);\n const corsProxy = await promptCorsProxy(parsed);\n const scopes = await promptScopes(parsed);\n await run({\n project,\n overwrite,\n template,\n sdkVersion,\n foundryUrl,\n applicationUrl,\n application,\n clientId,\n osdkPackage,\n osdkRegistryUrl,\n corsProxy,\n scopes\n });\n}"]}
1
+ {"version":3,"sources":["../../src/consola.ts","../../src/highlight.ts","../../src/prompts/promptApplicationRid.ts","../../src/prompts/promptApplicationUrl.ts","../../src/prompts/promptClientId.ts","../../src/prompts/promptCorsProxy.ts","../../src/prompts/promptFoundryUrl.ts","../../src/prompts/promptOsdkPackage.ts","../../src/prompts/promptOsdkRegistryUrl.ts","../../src/prompts/promptOverwrite.ts","../../src/prompts/promptProject.ts","../../src/prompts/promptScopes.ts","../../src/prompts/promptSdkVersion.ts","../../src/getPackageFiles.ts","../../src/generatedNoCheck/templates.ts","../../src/prompts/promptTemplate.ts","../../../generator-utils/build/esm/changeVersionPrefix.js","../../../../node_modules/.pnpm/tiny-invariant@1.3.3/node_modules/tiny-invariant/dist/esm/tiny-invariant.js","../../src/generate/generateEnv.ts","../../src/generate/generateFoundryConfigJson.ts","../../src/generate/generateNpmRc.ts","../../src/run.ts","../../src/cli.ts"],"names":["defaultConsola","fs","path","sdkVersion","template","yargs"],"mappings":";;;;;;;;;;;AAiBO,IAAM,UAAU,aAAc,CAAA;AAAA;AAAA,EAEnC,MAAM,UAAU,MAAQ,EAAA;AACtB,IAAA,MAAM,QAAW,GAAA,MAAMA,SAAe,CAAA,MAAA,CAAO,GAAG,MAAM,CAAA;AACtD,IAAA,IAAI,OAAO,QAAa,KAAA,QAAA,IAAY,QAAS,CAAA,QAAA,OAAe,sBAAwB,EAAA;AAClF,MAAAA,SAAA,CAAe,KAAK,qBAAqB,CAAA;AACzC,MAAA,OAAA,CAAQ,KAAK,CAAC,CAAA;AAAA;AAEhB,IAAO,OAAA,QAAA;AAAA;AAEX,CAAC,CAAA;ACVM,SAAS,MAAM,IAAM,EAAA;AAC1B,EAAO,OAAA,QAAA,CAAS,SAAS,IAAI,CAAA;AAC/B;AACO,SAAS,OAAO,IAAM,EAAA;AAC3B,EAAO,OAAA,QAAA,CAAS,UAAU,IAAI,CAAA;AAChC;;;ACJA,eAAsB,oBAAqB,CAAA;AAAA,EACzC;AACF,CAAG,EAAA;AACD,EAAA,OAAO,eAAe,IAAQ,IAAA,CAAC,2DAA4D,CAAA,IAAA,CAAK,WAAW,CAAG,EAAA;AAC5G,IAAA,IAAI,eAAe,IAAM,EAAA;AACvB,MAAA,OAAA,CAAQ,KAAK,4DAA4D,CAAA;AAAA;AAE3E,IAAc,WAAA,GAAA,MAAM,QAAQ,MAAO,CAAA,CAAA;AAAA,EAAiG,MAAA,CAAO,8FAA8F,CAAC,CAAI,CAAA,EAAA;AAAA,MAC5O,IAAM,EAAA;AAAA,KACP,CAAA;AAAA;AAEH,EAAO,OAAA,WAAA;AACT;;;ACZA,eAAsB,oBAAqB,CAAA;AAAA,EACzC,kBAAA;AAAA,EACA;AACF,CAAG,EAAA;AACD,EAAA,IAAI,kBAAoB,EAAA;AACtB,IAAO,OAAA,SAAA;AAAA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;AACD,EAAM,MAAA,UAAA,GAAa,MAAM,gBAAA,CAAiB,MAAM,CAAA;AAChD,EAAM,MAAA,cAAA,GAAiB,MAAM,oBAAA,CAAqB,MAAM,CAAA;AACxD,EAAM,MAAA,WAAA,GAAc,MAAM,oBAAA,CAAqB,MAAM,CAAA;AACrD,EAAM,MAAA,QAAA,GAAW,MAAM,cAAA,CAAe,MAAM,CAAA;AAC5C,EAAM,MAAA,WAAA,GAAc,MAAM,iBAAA,CAAkB,MAAM,CAAA;AAClD,EAAM,MAAA,eAAA,GAAkB,MAAM,qBAAA,CAAsB,MAAM,CAAA;AAC1D,EAAM,MAAA,SAAA,GAAY,MAAM,eAAA,CAAgB,MAAM,CAAA;AAC9C,EAAM,MAAA,MAAA,GAAS,MAAM,YAAA,CAAa,MAAM,CAAA;AACxC,EAAA,MAAM,GAAI,CAAA;AAAA,IACR,OAAA;AAAA,IACA,SAAA;AAAA,IACA,QAAA;AAAA,IACA,UAAA;AAAA,IACA,UAAA;AAAA,IACA,cAAA;AAAA,IACA,WAAA;AAAA,IACA,QAAA;AAAA,IACA,WAAA;AAAA,IACA,eAAA;AAAA,IACA,SAAA;AAAA,IACA;AAAA,GACD,CAAA;AACH","file":"index.js","sourcesContent":["/*\n * Copyright 2023 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 { consola as defaultConsola, createConsola } from \"consola\";\nexport const consola = createConsola({\n // https://github.com/unjs/consola/issues/251\n async prompt(...params) {\n const response = await defaultConsola.prompt(...params);\n if (typeof response === \"symbol\" && response.toString() === \"Symbol(clack:cancel)\") {\n defaultConsola.fail(\"Operation cancelled\");\n process.exit(0);\n }\n return response;\n }\n});","/*\n * Copyright 2023 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 { colorize } from \"consola/utils\";\nexport function green(text) {\n return colorize(\"green\", text);\n}\nexport function italic(text) {\n return colorize(\"italic\", text);\n}","/*\n * Copyright 2023 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 { consola } from \"../consola.js\";\nimport { italic } from \"../highlight.js\";\nexport async function promptApplicationRid({\n application\n}) {\n while (application == null || !/^ri\\.third-party-applications\\.[^.]+\\.application\\.[^.]+$/.test(application)) {\n if (application != null) {\n consola.fail(\"Please enter a valid application resource identifier (rid)\");\n }\n application = await consola.prompt(`Enter the application resource identifier (rid) for your application from Developer Console:\\n${italic(\"(Example: ri.third-party-applications.main.application.1c66b352-4e00-40d2-995d-061c9d533ace)\")}`, {\n type: \"text\"\n });\n }\n return application;\n}","/*\n * Copyright 2023 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 { consola } from \"../consola.js\";\nimport { italic } from \"../highlight.js\";\nexport async function promptApplicationUrl({\n skipApplicationUrl,\n applicationUrl\n}) {\n if (skipApplicationUrl) {\n return undefined;\n }\n if (applicationUrl == null) {\n const skip = await consola.prompt(`Do you know the URL your production application will be hosted on? This is required to create a production build of your application with the correct OAuth redirect URL.`, {\n type: \"select\",\n options: [{\n label: \"Yes, let me fill it here\",\n value: \"yes\"\n }, {\n label: \"No, I will fill it in later following the instructions in the generated README\",\n value: \"no\"\n }]\n }\n // Types for \"select\" are wrong the value is returned rather than the option object\n // https://github.com/unjs/consola/pull/238\n );\n if (skip === \"no\") {\n return undefined;\n }\n }\n while (applicationUrl == null || !/^https?:\\/\\//.test(applicationUrl)) {\n if (applicationUrl != null) {\n consola.fail(\"Please enter a valid application URL\");\n }\n applicationUrl = await consola.prompt(`Enter the URL your production application will be hosted on:\\n${italic(\"(Example: https://myapp.example.palantirfoundry.com)\")}`, {\n type: \"text\"\n });\n }\n return applicationUrl.replace(/\\/$/, \"\");\n}","/*\n * Copyright 2023 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 { consola } from \"../consola.js\";\nimport { italic } from \"../highlight.js\";\nexport async function promptClientId({\n clientId\n}) {\n while (clientId == null || !/^[0-9a-f]+$/.test(clientId)) {\n if (clientId != null) {\n consola.fail(\"Please enter a valid OAuth client ID\");\n }\n clientId = await consola.prompt(`Enter the OAuth client ID for your application from Developer Console:\\n${italic(\"(Example: 2650385ab6c5e0df3b44aff776b00a42)\")}`, {\n type: \"text\"\n });\n }\n return clientId;\n}","/*\n * Copyright 2023 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 { consola } from \"../consola.js\";\nimport { italic } from \"../highlight.js\";\nexport async function promptCorsProxy({\n corsProxy\n}) {\n if (corsProxy != null) {\n return corsProxy;\n }\n return consola.prompt(`Include a CORS proxy for Foundry API requests during local development?\\n${italic(\"This is required if your enrollment has not allowed localhost for CORS.\")}`, {\n type: \"confirm\",\n initial: false\n });\n}","/*\n * Copyright 2023 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 { consola } from \"../consola.js\";\nimport { italic } from \"../highlight.js\";\nexport async function promptFoundryUrl({\n foundryUrl\n}) {\n while (foundryUrl == null || !foundryUrl.startsWith(\"https://\")) {\n if (foundryUrl != null) {\n consola.fail(\"Please enter a valid Foundry URL\");\n }\n foundryUrl = await consola.prompt(`Enter the URL for your Foundry stack:\\n${italic(\"(Example: https://example.palantirfoundry.com)\")}`, {\n type: \"text\"\n });\n }\n return foundryUrl.replace(/\\/$/, \"\");\n}","/*\n * Copyright 2023 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 { consola } from \"../consola.js\";\nimport { italic } from \"../highlight.js\";\nexport async function promptOsdkPackage({\n osdkPackage\n}) {\n while (osdkPackage == null || !/^@[a-z0-9-]+\\/sdk$/.test(osdkPackage)) {\n if (osdkPackage != null) {\n consola.fail(\"Please enter a valid OSDK package name\");\n }\n osdkPackage = await consola.prompt(`Enter the OSDK package name for your application from Developer Console:\\n${italic(\"(Example: @my-app/sdk)\")}`, {\n type: \"text\"\n });\n }\n return osdkPackage;\n}","/*\n * Copyright 2023 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 { consola } from \"../consola.js\";\nimport { italic } from \"../highlight.js\";\nexport async function promptOsdkRegistryUrl({\n osdkRegistryUrl\n}) {\n while (osdkRegistryUrl == null || !/^https:\\/\\/[^/]+\\/artifacts\\/api\\/repositories\\/ri\\.artifacts\\.[^/]+\\/contents\\/release\\/npm\\/?$/.test(osdkRegistryUrl)) {\n if (osdkRegistryUrl != null) {\n consola.fail(\"Please enter a valid NPM registry URL to install your OSDK package\");\n }\n osdkRegistryUrl = await consola.prompt(`Enter the NPM registry URL to install your OSDK package from Developer Console:\\n${italic(\"(Example: https://example.palantirfoundry.com/artifacts/api/repositories/ri.artifacts.main.repository.a4a7fe1c-486f-4226-b706-7b90005f527d/contents/release/npm)\")}`, {\n type: \"text\"\n });\n }\n return osdkRegistryUrl.replace(/\\/$/, \"\");\n}","/*\n * Copyright 2023 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 fs from \"node:fs\";\nimport path from \"node:path\";\nimport { consola } from \"../consola.js\";\nimport { green } from \"../highlight.js\";\nexport async function promptOverwrite({\n project,\n overwrite\n}) {\n if (overwrite != null) {\n return overwrite;\n }\n if (!fs.existsSync(path.join(process.cwd(), project))) {\n return true;\n }\n const result = await consola.prompt(`The directory ${green(project)} already exists do you want to overwrite or ignore it?`, {\n type: \"select\",\n options: [{\n label: \"Remove existing files and continue\",\n value: \"overwrite\"\n }, {\n label: \"Ignore files and continue\",\n value: \"ignore\"\n }, {\n label: \"Cancel\",\n value: \"cancel\"\n }]\n }\n // Types for \"select\" are wrong the value is returned rather than the option object\n // https://github.com/unjs/consola/pull/238\n );\n switch (result) {\n case \"overwrite\":\n return true;\n case \"ignore\":\n return false;\n case \"cancel\":\n consola.fail(\"Operation cancelled\");\n process.exit(0);\n }\n}","/*\n * Copyright 2023 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 { consola } from \"../consola.js\";\nexport async function promptProject({\n project\n}) {\n while (project == null || !/^[a-zA-Z0-9-_]+$/.test(project)) {\n if (project != null) {\n consola.fail(\"Project name can only contain alphanumeric characters, hyphens and underscores\");\n }\n project = await consola.prompt(\"Project name:\", {\n type: \"text\",\n placeholder: \"my-osdk-app\",\n default: \"my-osdk-app\"\n });\n }\n return project;\n}","/*\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 */\n\nimport { consola } from \"../consola.js\";\nconst scopeNameRegex = /^[a-zA-Z-_:]+$/;\nexport async function promptScopes({\n scopes\n}) {\n if (scopes == null) {\n return undefined;\n }\n while (true) {\n const invalidScopes = scopes.filter(scope => !scopeNameRegex.test(scope));\n const allValidScopes = invalidScopes.length === 0;\n if (allValidScopes) {\n break;\n }\n const joinedInvalidScopes = invalidScopes.join(\", \");\n consola.fail(`Scopes [ ${joinedInvalidScopes} ] are invalid. Scope names can only contain letters, hyphens, underscores, and colons`);\n const stringScopes = await consola.prompt(\"Scopes:\", {\n type: \"text\",\n placeholder: \"api:read-data api:write-data\",\n default: \"api:read-data api:write-data\"\n });\n scopes = stringScopes.split(\" \");\n }\n return deduplicateScopes(scopes);\n}\n\n// Preserving the originally specified scope order\nfunction deduplicateScopes(scopes) {\n const dedupedScopes = [];\n const seen = new Set();\n for (const scope of scopes) {\n if (seen.has(scope)) {\n continue;\n }\n dedupedScopes.push(scope);\n seen.add(scope);\n }\n return dedupedScopes;\n}","/*\n * Copyright 2023 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 { consola } from \"../consola.js\";\nexport async function promptSdkVersion({\n sdkVersion,\n template\n}) {\n if (sdkVersion == null) {\n // If the SDK version is not provided, default to the earliest template version for backwards-compatibility\n return Object.keys(template.files)[0];\n }\n if (template.files[sdkVersion] == null) {\n consola.fail(`The ${template.label} template does not support a \"${sdkVersion}\" SDK version.`);\n sdkVersion = await consola.prompt(`Please choose which version of the OSDK you'd like to use for the ${template.label} template:`, {\n type: \"select\",\n options: Object.keys(template.files).reverse().map(sdkVersion => ({\n label: sdkVersion,\n value: sdkVersion\n }))\n }\n // Types for \"select\" are wrong the value is returned rather than the option object\n // https://github.com/unjs/consola/pull/238\n );\n }\n return sdkVersion;\n}","/*\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 */\n\nexport const getPackageFiles = importPromise => async () => (await importPromise).files;","// THIS FILE IS GENERATED. DO NOT MODIFY.\n// You probably want to modify ../../../codegen.mjs instead.\n\nimport { getPackageFiles } from \"../getPackageFiles.js\";\nexport const TEMPLATES = [\n// React\n{\n id: \"template-react\",\n label: \"React\",\n envPrefix: \"VITE_\",\n buildDirectory: \"./dist\",\n files: {\n \"1.x\": getPackageFiles(import(\"@osdk/create-app.template.react\")),\n \"2.x\": getPackageFiles(import(\"@osdk/create-app.template.react.beta\"))\n }\n},\n// Expo\n{\n id: \"template-expo\",\n label: \"Expo\",\n envPrefix: \"EXPO_PUBLIC_\",\n buildDirectory: \"./dist\",\n files: {\n \"2.x\": getPackageFiles(import(\"@osdk/create-app.template.expo.v2\"))\n }\n},\n// Vue\n{\n id: \"template-vue\",\n label: \"Vue\",\n envPrefix: \"VITE_\",\n buildDirectory: \"./dist\",\n files: {\n \"1.x\": getPackageFiles(import(\"@osdk/create-app.template.vue\")),\n \"2.x\": getPackageFiles(import(\"@osdk/create-app.template.vue.v2\"))\n }\n},\n// Next (static export)\n{\n id: \"template-next-static-export\",\n label: \"Next (static export)\",\n envPrefix: \"NEXT_PUBLIC_\",\n buildDirectory: \"./out\",\n files: {\n \"1.x\": getPackageFiles(import(\"@osdk/create-app.template.next-static-export\")),\n \"2.x\": getPackageFiles(import(\"@osdk/create-app.template.next-static-export.v2\"))\n }\n},\n// Tutorial: To do App\n{\n id: \"template-tutorial-todo-app\",\n label: \"Tutorial: To do App\",\n envPrefix: \"VITE_\",\n buildDirectory: \"./dist\",\n files: {\n \"1.x\": getPackageFiles(import(\"@osdk/create-app.template.tutorial-todo-app\")),\n \"2.x\": getPackageFiles(import(\"@osdk/create-app.template.tutorial-todo-app.beta\"))\n }\n},\n// Tutorial: To do AIP App\n{\n id: \"template-tutorial-todo-aip-app\",\n label: \"Tutorial: To do AIP App\",\n envPrefix: \"VITE_\",\n buildDirectory: \"./dist\",\n files: {\n \"1.x\": getPackageFiles(import(\"@osdk/create-app.template.tutorial-todo-aip-app\")),\n \"2.x\": getPackageFiles(import(\"@osdk/create-app.template.tutorial-todo-aip-app.beta\"))\n }\n}];","/*\n * Copyright 2023 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 { consola } from \"../consola.js\";\nimport { TEMPLATES } from \"../generatedNoCheck/templates.js\";\nimport { green } from \"../highlight.js\";\nexport async function promptTemplate(parsed) {\n let useBeta = parsed.beta ?? false;\n let template = TEMPLATES.find(t => t.id === parsed.template || t.id === `template-${parsed.template}`);\n if (template == null) {\n const availableTemplates = TEMPLATES.filter(template => !template.hidden && (useBeta ? template.isBeta === true\n // isBeta could be null\n : !template.isBeta));\n if (availableTemplates.length === 0) {\n throw new Error(\"No available templates found for the selected options.\");\n }\n const templateId = await consola.prompt(parsed.template != null ? `The provided template ${green(parsed.template)} is invalid please select a framework:` : \"Select a framework:\", {\n type: \"select\",\n options: availableTemplates.map(template => ({\n value: template.id,\n label: template.label\n }))\n // Types for \"select\" are wrong the value is returned rather than the option object\n // https://github.com/unjs/consola/pull/238\n });\n template = TEMPLATES.find(t => t.id === templateId);\n if (template == null) {\n throw new Error(`Template ${templateId} should be found`);\n }\n }\n return template;\n}","/*\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 */\n\nexport function changeVersionPrefix(version, prefix) {\n const isWorkspaceProtocol = version.startsWith(\"workspace:\");\n if (isWorkspaceProtocol) {\n version = version.slice(\"workspace:\".length);\n }\n if (version[0] === \"^\" || version[0] === \"~\" || version[0] === \"*\") {\n version = version.slice(1);\n }\n return `${isWorkspaceProtocol ? \"workspace:\" : \"\"}${prefix}${version}`;\n}","var isProduction = process.env.NODE_ENV === 'production';\nvar prefix = 'Invariant failed';\nfunction invariant(condition, message) {\n if (condition) {\n return;\n }\n if (isProduction) {\n throw new Error(prefix);\n }\n var provided = typeof message === 'function' ? message() : message;\n var value = provided ? \"\".concat(prefix, \": \").concat(provided) : prefix;\n throw new Error(value);\n}\nexport { invariant as default };","/*\n * Copyright 2023 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\nexport function generateEnvDevelopment({\n envPrefix,\n foundryUrl,\n clientId,\n corsProxy\n}) {\n return generateEnv({\n envPrefix,\n foundryUrl: corsProxy ? \"http://localhost:8080\" : foundryUrl,\n applicationUrl: \"http://localhost:8080\",\n clientId\n });\n}\nexport function generateEnvProduction({\n envPrefix,\n foundryUrl,\n applicationUrl,\n clientId\n}) {\n return generateEnv({\n envPrefix,\n foundryUrl,\n applicationUrl,\n clientId\n });\n}\nfunction generateEnv({\n envPrefix,\n foundryUrl,\n applicationUrl,\n clientId\n}) {\n return `${envPrefix}FOUNDRY_API_URL=${foundryUrl}\\n` + `${applicationUrl == null ? \"# \" : \"\"}${envPrefix}FOUNDRY_REDIRECT_URL=${applicationUrl ?? \"<Fill in the domain at which you deploy your application>\"}/auth/callback\\n` + `${envPrefix}FOUNDRY_CLIENT_ID=${clientId}\\n`;\n}","/*\n * Copyright 2023 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\nexport function generateFoundryConfigJson({\n foundryUrl,\n application,\n directory\n}) {\n return JSON.stringify({\n foundryUrl,\n site: {\n application,\n directory,\n autoVersion: {\n type: \"git-describe\",\n tagPrefix: \"\"\n }\n }\n }, null, 2) + \"\\n\";\n}","/*\n * Copyright 2023 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\nexport function generateNpmRc({\n osdkPackage,\n osdkRegistryUrl\n}) {\n // pnpm requires a trailing slash in .npmrc\n // https://github.com/pnpm/pnpm/issues/5941\n const withTrailingSlash = osdkRegistryUrl.endsWith(\"/\") ? osdkRegistryUrl : osdkRegistryUrl + \"/\";\n const withoutProtocol = withTrailingSlash.replace(/^https:\\/\\//, \"\");\n const packageScope = osdkPackage.split(\"/\")[0];\n return `//${withoutProtocol}:_authToken=\\${FOUNDRY_TOKEN}\\n` + `${packageScope}:registry=${withTrailingSlash}\\n`;\n}","/*\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 */\n\nimport { changeVersionPrefix } from \"@osdk/generator-utils\";\nimport { findUpSync } from \"find-up\";\nimport Handlebars from \"handlebars\";\nimport fs from \"node:fs\";\nimport path from \"node:path\";\nimport { fileURLToPath } from \"node:url\";\nimport { consola } from \"./consola.js\";\nimport { generateEnvDevelopment, generateEnvProduction } from \"./generate/generateEnv.js\";\nimport { generateFoundryConfigJson } from \"./generate/generateFoundryConfigJson.js\";\nimport { generateNpmRc } from \"./generate/generateNpmRc.js\";\nimport { green } from \"./highlight.js\";\nexport async function run({\n project,\n overwrite,\n template,\n sdkVersion,\n foundryUrl,\n applicationUrl,\n application,\n clientId,\n osdkPackage,\n osdkRegistryUrl,\n corsProxy,\n scopes\n}) {\n consola.log(\"\");\n consola.start(`Creating project ${green(project)} using template ${green(template.id)}`);\n const cwd = process.cwd();\n const root = path.join(cwd, project);\n if (fs.existsSync(root)) {\n if (overwrite) {\n consola.info(`Overwriting existing project directory`);\n fs.rmSync(root, {\n recursive: true,\n force: true\n });\n fs.mkdirSync(root, {\n recursive: true\n });\n } else {\n consola.info(`Reusing existing project directory`);\n }\n } else {\n consola.info(`Creating project directory`);\n fs.mkdirSync(root, {\n recursive: true\n });\n }\n consola.info(`Copying files into project directory`);\n if (template.files[sdkVersion] == null) {\n throw new Error(`The ${template.label} template does not support a \"${sdkVersion}\" SDK version.`);\n }\n const files = await template.files[sdkVersion]();\n for (const [filePath, contents] of files) {\n const finalPath = path.join(root, filePath);\n const dirPath = path.dirname(finalPath);\n await fs.promises.mkdir(dirPath, {\n recursive: true\n });\n await fs.promises.writeFile(finalPath, Buffer.from(contents.body, contents.type === \"raw\" ? \"utf-8\" : \"base64\"));\n }\n const ourPackageJsonPath = findUpSync(\"package.json\", {\n cwd: fileURLToPath(import.meta.url)\n });\n const ourPackageJsonVersion = ourPackageJsonPath ? JSON.parse(fs.readFileSync(ourPackageJsonPath, \"utf-8\")).version : undefined;\n const clientVersion = process.env.PACKAGE_CLIENT_VERSION ?? ourPackageJsonVersion;\n if (clientVersion === undefined) {\n throw new Error(\"Could not determine current @osdk/client version\");\n }\n const templateContext = {\n project,\n foundryUrl,\n osdkPackage,\n corsProxy,\n clientVersion: changeVersionPrefix(clientVersion, \"^\"),\n scopes\n };\n const processFiles = function (dir) {\n fs.readdirSync(dir).forEach(function (file) {\n file = dir + \"/\" + file;\n const stat = fs.statSync(file);\n if (stat.isDirectory()) {\n processFiles(file);\n return;\n }\n if (file.endsWith(\"/_gitignore\")) {\n fs.renameSync(file, file.replace(/\\/_gitignore$/, \"/.gitignore\"));\n return;\n }\n if (!file.endsWith(\".hbs\")) {\n return;\n }\n const templated = Handlebars.compile(fs.readFileSync(file, \"utf-8\"))(templateContext);\n fs.writeFileSync(file.replace(/.hbs$/, \"\"), templated);\n fs.rmSync(file);\n });\n };\n processFiles(root);\n const npmRc = generateNpmRc({\n osdkPackage,\n osdkRegistryUrl\n });\n fs.writeFileSync(path.join(root, \".npmrc\"), npmRc);\n const envDevelopment = generateEnvDevelopment({\n envPrefix: template.envPrefix,\n foundryUrl,\n clientId,\n corsProxy\n });\n fs.writeFileSync(path.join(root, \".env.development\"), envDevelopment);\n const envProduction = generateEnvProduction({\n envPrefix: template.envPrefix,\n foundryUrl,\n applicationUrl,\n clientId\n });\n fs.writeFileSync(path.join(root, \".env.production\"), envProduction);\n const foundryConfigJson = generateFoundryConfigJson({\n foundryUrl,\n application,\n directory: template.buildDirectory\n });\n fs.writeFileSync(path.join(root, \"foundry.config.json\"), foundryConfigJson);\n consola.success(\"Success\");\n const cdRelative = path.relative(cwd, root);\n consola.box({\n message: `Done! Run the following commands to get started:\\n` + `\\n` + ` \\`cd ${cdRelative}\\`\\n` + ` \\`export FOUNDRY_TOKEN=<token>\\`\\n` + ` \\`npm install\\`\\n` + ` \\`npm run dev\\``,\n style: {\n padding: 2,\n borderColor: \"green\",\n borderStyle: \"rounded\"\n }\n });\n}","/*\n * Copyright 2023 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 yargs from \"yargs\";\nimport { hideBin } from \"yargs/helpers\";\nimport { promptApplicationRid } from \"./prompts/promptApplicationRid.js\";\nimport { promptApplicationUrl } from \"./prompts/promptApplicationUrl.js\";\nimport { promptClientId } from \"./prompts/promptClientId.js\";\nimport { promptCorsProxy } from \"./prompts/promptCorsProxy.js\";\nimport { promptFoundryUrl } from \"./prompts/promptFoundryUrl.js\";\nimport { promptOsdkPackage } from \"./prompts/promptOsdkPackage.js\";\nimport { promptOsdkRegistryUrl } from \"./prompts/promptOsdkRegistryUrl.js\";\nimport { promptOverwrite } from \"./prompts/promptOverwrite.js\";\nimport { promptProject } from \"./prompts/promptProject.js\";\nimport { promptScopes } from \"./prompts/promptScopes.js\";\nimport { promptSdkVersion } from \"./prompts/promptSdkVersion.js\";\nimport { promptTemplate } from \"./prompts/promptTemplate.js\";\nimport { run } from \"./run.js\";\nexport async function cli(args = process.argv) {\n const base = yargs(hideBin(args)).version(process.env.PACKAGE_VERSION ?? \"\").wrap(Math.min(150, yargs().terminalWidth())).strict().help().command(\"$0 [project] [--<option>]\", \"Create a new OSDK application based on framework templates. Information may be provided through options to skip interactive prompts.\", yargs => yargs.positional(\"project\", {\n type: \"string\",\n describe: \"Project name to create\"\n }).option(\"overwrite\", {\n type: \"boolean\",\n describe: \"Overwrite project directory if already exists\"\n }).option(\"beta\", {\n type: \"boolean\",\n describe: \"Use templates compatible with the Beta version of the SDK\"\n }).option(\"template\", {\n type: \"string\",\n describe: \"Template name to use\"\n }).option(\"sdkVersion\", {\n type: \"string\",\n describe: \"The OSDK version to use\"\n }).option(\"foundryUrl\", {\n type: \"string\",\n describe: \"URL for the Foundry stack\"\n }).option(\"applicationUrl\", {\n type: \"string\",\n describe: \"URL the production application will be hosted on\",\n conflicts: \"skipApplicationUrl\"\n }).option(\"skipApplicationUrl\", {\n type: \"boolean\",\n describe: \"Skip filling in URL the production application will be hosted on\"\n }).option(\"application\", {\n type: \"string\",\n describe: \"Application resource identifier (rid)\"\n }).option(\"clientId\", {\n type: \"string\",\n describe: \"OAuth client ID for application\"\n }).option(\"osdkPackage\", {\n type: \"string\",\n describe: \"OSDK package name for application\"\n }).option(\"osdkRegistryUrl\", {\n type: \"string\",\n describe: \"URL for NPM registry to install OSDK package\"\n }).option(\"corsProxy\", {\n type: \"boolean\",\n describe: \"Include a CORS proxy for Foundry API requests during local development\"\n }).option(\"scopes\", {\n type: \"string\",\n array: true,\n describe: \"List of client-side scopes to be used when creating a client\"\n }));\n const parsed = base.parseSync();\n const project = await promptProject(parsed);\n const overwrite = await promptOverwrite({\n ...parsed,\n project\n });\n const template = await promptTemplate(parsed);\n const sdkVersion = await promptSdkVersion({\n ...parsed,\n template\n });\n const foundryUrl = await promptFoundryUrl(parsed);\n const applicationUrl = await promptApplicationUrl(parsed);\n const application = await promptApplicationRid(parsed);\n const clientId = await promptClientId(parsed);\n const osdkPackage = await promptOsdkPackage(parsed);\n const osdkRegistryUrl = await promptOsdkRegistryUrl(parsed);\n const corsProxy = await promptCorsProxy(parsed);\n const scopes = await promptScopes(parsed);\n await run({\n project,\n overwrite,\n template,\n sdkVersion,\n foundryUrl,\n applicationUrl,\n application,\n clientId,\n osdkPackage,\n osdkRegistryUrl,\n corsProxy,\n scopes\n });\n}"]}
@@ -1,2 +1 @@
1
1
  export declare function cli(args?: string[]): Promise<void>;
2
- //# sourceMappingURL=cli.d.ts.map
@@ -0,0 +1 @@
1
+ {"mappings":"AAoDA,OAAO,iBAAe,IAAIA,kBAAgC","names":["args: string[]"],"sources":["../../src/cli.ts"],"version":3,"file":"cli.d.ts"}
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ {"mappings":"","names":[],"sources":["../../src/cli.test.ts"],"version":3,"file":"cli.test.d.ts"}
@@ -1,3 +1,2 @@
1
1
  import type { ConsolaInstance } from "consola";
2
2
  export declare const consola: ConsolaInstance;
3
- //# sourceMappingURL=consola.d.ts.map
@@ -0,0 +1 @@
1
+ {"mappings":"AAgBA,cAAc,uBAAuB,SAAU;AAG/C,OAAO,cAAMA,SAAS","names":["consola: ConsolaInstance"],"sources":["../../src/consola.ts"],"version":3,"file":"consola.d.ts"}
@@ -0,0 +1,12 @@
1
+ export declare function generateEnvDevelopment({ envPrefix, foundryUrl, clientId, corsProxy }: {
2
+ envPrefix: string
3
+ foundryUrl: string
4
+ clientId: string
5
+ corsProxy: boolean
6
+ }): string;
7
+ export declare function generateEnvProduction({ envPrefix, foundryUrl, applicationUrl, clientId }: {
8
+ envPrefix: string
9
+ foundryUrl: string
10
+ applicationUrl: string | undefined
11
+ clientId: string
12
+ }): string;
@@ -0,0 +1 @@
1
+ {"mappings":"AAgBA,OAAO,iBAAS,uBAAuB,EACrC,WACA,YACA,UACA,WAMD,EALE;CACD;CACA;CACA;CACA;AACD;AASD,OAAO,iBAAS,sBAAsB,EACpC,WACA,YACA,gBACA,UAMD,EALE;CACD;CACA;CACA;CACA;AACD","names":[],"sources":["../../../src/generate/generateEnv.ts"],"version":3,"file":"generateEnv.d.ts"}
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ {"mappings":"","names":[],"sources":["../../../src/generate/generateEnv.test.ts"],"version":3,"file":"generateEnv.test.d.ts"}
@@ -0,0 +1,5 @@
1
+ export declare function generateFoundryConfigJson({ foundryUrl, application, directory }: {
2
+ foundryUrl: string
3
+ application: string
4
+ directory: string
5
+ }): string;
@@ -0,0 +1 @@
1
+ {"mappings":"AAgBA,OAAO,iBAAS,0BAA0B,EACxC,YACA,aACA,WAKD,EAJE;CACD;CACA;CACA;AACD","names":[],"sources":["../../../src/generate/generateFoundryConfigJson.ts"],"version":3,"file":"generateFoundryConfigJson.d.ts"}
@@ -0,0 +1 @@
1
+ {"mappings":"","names":[],"sources":["../../../src/generate/generateFoundryConfigJson.test.ts"],"version":3,"file":"generateFoundryConfigJson.test.d.ts"}
@@ -0,0 +1,4 @@
1
+ export declare function generateNpmRc({ osdkPackage, osdkRegistryUrl }: {
2
+ osdkPackage: string
3
+ osdkRegistryUrl: string
4
+ }): string;
@@ -0,0 +1 @@
1
+ {"mappings":"AAgBA,OAAO,iBAAS,cAAc,EAC5B,aACA,iBAID,EAHE;CACD;CACA;AACD","names":[],"sources":["../../../src/generate/generateNpmRc.ts"],"version":3,"file":"generateNpmRc.d.ts"}
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ {"mappings":"","names":[],"sources":["../../../src/generate/generateNpmRc.test.ts"],"version":3,"file":"generateNpmRc.test.d.ts"}
@@ -1,3 +1,2 @@
1
1
  import type { Template } from "../templates.js";
2
2
  export declare const TEMPLATES: readonly Template[];
3
- //# sourceMappingURL=templates.d.ts.map
@@ -0,0 +1 @@
1
+ {"mappings":"AAEA,cAAc,gBAAgB,iBAAkB;AAGhD,OAAO,cAAMA,oBAAoB","names":["TEMPLATES: readonly Template[]"],"sources":["../../../src/generatedNoCheck/templates.ts"],"version":3,"file":"templates.d.ts"}
@@ -1,5 +1,4 @@
1
1
  import type { ModuleImportFiles } from "./templates.js";
2
2
  export declare const getPackageFiles: (importPromise: Promise<{
3
- files: ModuleImportFiles;
3
+ files: ModuleImportFiles
4
4
  }>) => () => Promise<ModuleImportFiles>;
5
- //# sourceMappingURL=getPackageFiles.d.ts.map
@@ -0,0 +1 @@
1
+ {"mappings":"AAgBA,cAAc,yBAAyB,gBAAiB;AAExD,OAAO,cAAM,kBACXA,eAAe,QAAQ;CAAE,OAAO;AAAmB,aAC5C,QAAQ","names":["importPromise: Promise<{ files: ModuleImportFiles }>"],"sources":["../../src/getPackageFiles.ts"],"version":3,"file":"getPackageFiles.d.ts"}
@@ -1,3 +1,2 @@
1
1
  export declare function green(text: string): string;
2
2
  export declare function italic(text: string): string;
3
- //# sourceMappingURL=highlight.d.ts.map
@@ -0,0 +1 @@
1
+ {"mappings":"AAkBA,OAAO,iBAAS,MAAMA;AAItB,OAAO,iBAAS,OAAOA","names":["text: string"],"sources":["../../src/highlight.ts"],"version":3,"file":"highlight.d.ts"}