@osdk/create-app 0.17.0-main-20240530094422 → 0.17.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 (134) hide show
  1. package/CHANGELOG.md +60 -1
  2. package/build/browser/esm-5B4R5BF5.js +248 -0
  3. package/build/browser/esm-5B4R5BF5.js.map +1 -0
  4. package/build/browser/esm-7ZL7DCMH.js +451 -0
  5. package/build/browser/esm-7ZL7DCMH.js.map +1 -0
  6. package/build/browser/esm-WPXIOIG2.js +1170 -0
  7. package/build/browser/esm-WPXIOIG2.js.map +1 -0
  8. package/build/browser/esm-ZCTE2SEE.js +377 -0
  9. package/build/browser/esm-ZCTE2SEE.js.map +1 -0
  10. package/build/browser/esm-ZDRBH2ME.js +901 -0
  11. package/build/browser/esm-ZDRBH2ME.js.map +1 -0
  12. package/build/browser/index.js +26 -19
  13. package/build/browser/index.js.map +1 -1
  14. package/build/cjs/esm-2ZIGIHPI.cjs +379 -0
  15. package/build/cjs/esm-2ZIGIHPI.cjs.map +1 -0
  16. package/build/cjs/esm-JBGUEJ46.cjs +250 -0
  17. package/build/cjs/esm-JBGUEJ46.cjs.map +1 -0
  18. package/build/cjs/esm-RRFVZF4X.cjs +1172 -0
  19. package/build/cjs/esm-RRFVZF4X.cjs.map +1 -0
  20. package/build/cjs/esm-VSENADXB.cjs +903 -0
  21. package/build/cjs/esm-VSENADXB.cjs.map +1 -0
  22. package/build/cjs/esm-YRGJOBTV.cjs +453 -0
  23. package/build/cjs/esm-YRGJOBTV.cjs.map +1 -0
  24. package/build/cjs/index.cjs +26 -20
  25. package/build/cjs/index.cjs.map +1 -1
  26. package/build/esm/esm-5B4R5BF5.js +248 -0
  27. package/build/esm/esm-5B4R5BF5.js.map +1 -0
  28. package/build/esm/esm-7ZL7DCMH.js +451 -0
  29. package/build/esm/esm-7ZL7DCMH.js.map +1 -0
  30. package/build/esm/esm-WPXIOIG2.js +1170 -0
  31. package/build/esm/esm-WPXIOIG2.js.map +1 -0
  32. package/build/esm/esm-ZCTE2SEE.js +377 -0
  33. package/build/esm/esm-ZCTE2SEE.js.map +1 -0
  34. package/build/esm/esm-ZDRBH2ME.js +901 -0
  35. package/build/esm/esm-ZDRBH2ME.js.map +1 -0
  36. package/build/esm/index.js +26 -19
  37. package/build/esm/index.js.map +1 -1
  38. package/build/esm/run.d.ts.map +1 -1
  39. package/build/esm/templates.d.ts +7 -0
  40. package/build/esm/templates.d.ts.map +1 -1
  41. package/package.json +18 -9
  42. package/templates/template-next-static-export/.eslintrc.json +0 -4
  43. package/templates/template-next-static-export/README.md.hbs +0 -35
  44. package/templates/template-next-static-export/_gitignore +0 -36
  45. package/templates/template-next-static-export/next.config.js.hbs +0 -17
  46. package/templates/template-next-static-export/package.json.hbs +0 -25
  47. package/templates/template-next-static-export/public/next.svg +0 -20
  48. package/templates/template-next-static-export/public/palantir.svg +0 -3
  49. package/templates/template-next-static-export/src/app/auth/callback/page.tsx +0 -25
  50. package/templates/template-next-static-export/src/app/globals.css +0 -81
  51. package/templates/template-next-static-export/src/app/icon.svg +0 -20
  52. package/templates/template-next-static-export/src/app/layout.module.css +0 -11
  53. package/templates/template-next-static-export/src/app/layout.tsx +0 -51
  54. package/templates/template-next-static-export/src/app/login/page.tsx +0 -43
  55. package/templates/template-next-static-export/src/app/page.module.css +0 -7
  56. package/templates/template-next-static-export/src/app/page.tsx.hbs +0 -53
  57. package/templates/template-next-static-export/src/lib/client.ts.hbs +0 -31
  58. package/templates/template-next-static-export/src/lib/useAuthenticated.ts +0 -25
  59. package/templates/template-next-static-export/tsconfig.json +0 -27
  60. package/templates/template-react/.eslintrc.cjs +0 -18
  61. package/templates/template-react/README.md.hbs +0 -35
  62. package/templates/template-react/_gitignore +0 -24
  63. package/templates/template-react/index.html +0 -15
  64. package/templates/template-react/package.json.hbs +0 -30
  65. package/templates/template-react/public/palantir.svg +0 -3
  66. package/templates/template-react/public/react.svg +0 -1
  67. package/templates/template-react/src/AuthCallback.tsx +0 -24
  68. package/templates/template-react/src/AuthenticatedRoute.tsx +0 -33
  69. package/templates/template-react/src/Home.module.css +0 -7
  70. package/templates/template-react/src/Home.tsx.hbs +0 -47
  71. package/templates/template-react/src/Layout.module.css +0 -10
  72. package/templates/template-react/src/Layout.tsx +0 -29
  73. package/templates/template-react/src/Login.tsx +0 -40
  74. package/templates/template-react/src/client.ts.hbs +0 -31
  75. package/templates/template-react/src/index.css +0 -81
  76. package/templates/template-react/src/main.tsx +0 -33
  77. package/templates/template-react/src/vite-env.d.ts +0 -1
  78. package/templates/template-react/tsconfig.json +0 -25
  79. package/templates/template-react/tsconfig.node.json +0 -10
  80. package/templates/template-react/vite.config.ts.hbs +0 -19
  81. package/templates/template-tutorial-todo-app/.eslintrc.cjs +0 -18
  82. package/templates/template-tutorial-todo-app/README.md.hbs +0 -33
  83. package/templates/template-tutorial-todo-app/index.html +0 -15
  84. package/templates/template-tutorial-todo-app/package.json.hbs +0 -31
  85. package/templates/template-tutorial-todo-app/public/todo-app.svg +0 -4
  86. package/templates/template-tutorial-todo-app/src/AuthCallback.tsx +0 -24
  87. package/templates/template-tutorial-todo-app/src/AuthenticatedRoute.tsx +0 -33
  88. package/templates/template-tutorial-todo-app/src/CreateProjectButton.tsx +0 -33
  89. package/templates/template-tutorial-todo-app/src/CreateProjectDialog.tsx +0 -56
  90. package/templates/template-tutorial-todo-app/src/CreateTaskButton.tsx +0 -35
  91. package/templates/template-tutorial-todo-app/src/CreateTaskDialog.tsx +0 -52
  92. package/templates/template-tutorial-todo-app/src/DeleteProjectButton.tsx +0 -34
  93. package/templates/template-tutorial-todo-app/src/DeleteProjectDialog.tsx +0 -46
  94. package/templates/template-tutorial-todo-app/src/Dialog.module.css +0 -5
  95. package/templates/template-tutorial-todo-app/src/Dialog.tsx +0 -19
  96. package/templates/template-tutorial-todo-app/src/Home.module.css +0 -35
  97. package/templates/template-tutorial-todo-app/src/Home.tsx +0 -62
  98. package/templates/template-tutorial-todo-app/src/Layout.module.css +0 -16
  99. package/templates/template-tutorial-todo-app/src/Layout.tsx +0 -21
  100. package/templates/template-tutorial-todo-app/src/Login.module.css +0 -5
  101. package/templates/template-tutorial-todo-app/src/Login.tsx +0 -42
  102. package/templates/template-tutorial-todo-app/src/ProjectSelect.tsx +0 -40
  103. package/templates/template-tutorial-todo-app/src/TaskList.module.css +0 -6
  104. package/templates/template-tutorial-todo-app/src/TaskList.tsx +0 -38
  105. package/templates/template-tutorial-todo-app/src/TaskListItem.module.css +0 -3
  106. package/templates/template-tutorial-todo-app/src/TaskListItem.tsx +0 -37
  107. package/templates/template-tutorial-todo-app/src/client.ts.hbs +0 -31
  108. package/templates/template-tutorial-todo-app/src/index.css +0 -80
  109. package/templates/template-tutorial-todo-app/src/main.tsx +0 -33
  110. package/templates/template-tutorial-todo-app/src/mocks.ts +0 -137
  111. package/templates/template-tutorial-todo-app/src/useProjectTasks.ts +0 -55
  112. package/templates/template-tutorial-todo-app/src/useProjects.ts +0 -43
  113. package/templates/template-tutorial-todo-app/src/vite-env.d.ts +0 -1
  114. package/templates/template-tutorial-todo-app/tsconfig.json +0 -25
  115. package/templates/template-tutorial-todo-app/tsconfig.node.json +0 -10
  116. package/templates/template-tutorial-todo-app/vite.config.ts.hbs +0 -19
  117. package/templates/template-vue/.vscode/extensions.json +0 -3
  118. package/templates/template-vue/README.md.hbs +0 -35
  119. package/templates/template-vue/_gitignore +0 -24
  120. package/templates/template-vue/index.html +0 -15
  121. package/templates/template-vue/package.json.hbs +0 -22
  122. package/templates/template-vue/public/palantir.svg +0 -3
  123. package/templates/template-vue/public/vue.svg +0 -1
  124. package/templates/template-vue/src/AuthCallback.vue +0 -22
  125. package/templates/template-vue/src/Home.vue.hbs +0 -38
  126. package/templates/template-vue/src/Layout.vue +0 -26
  127. package/templates/template-vue/src/Login.vue +0 -36
  128. package/templates/template-vue/src/client.ts.hbs +0 -31
  129. package/templates/template-vue/src/main.ts +0 -35
  130. package/templates/template-vue/src/style.css +0 -81
  131. package/templates/template-vue/src/vite-env.d.ts +0 -1
  132. package/templates/template-vue/tsconfig.json +0 -25
  133. package/templates/template-vue/tsconfig.node.json +0 -10
  134. package/templates/template-vue/vite.config.ts.hbs +0 -24
@@ -6,11 +6,8 @@ var consola$1 = require('consola');
6
6
  var utils = require('consola/utils');
7
7
  var fs2 = require('fs');
8
8
  var path2 = require('path');
9
- var findUp = require('find-up');
10
9
  var Handlebars = require('handlebars');
11
- var url = require('url');
12
10
 
13
- var _documentCurrentScript = typeof document !== 'undefined' ? document.currentScript : null;
14
11
  function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
15
12
 
16
13
  var yargs__default = /*#__PURE__*/_interopDefault(yargs);
@@ -231,23 +228,34 @@ var TEMPLATES = [{
231
228
  id: "template-react",
232
229
  label: "React",
233
230
  envPrefix: "VITE_",
234
- buildDirectory: "./dist"
231
+ buildDirectory: "./dist",
232
+ getFiles: async () => (await import('./esm-YRGJOBTV.cjs')).files
235
233
  }, {
236
234
  id: "template-vue",
237
235
  label: "Vue",
238
236
  envPrefix: "VITE_",
239
- buildDirectory: "./dist"
237
+ buildDirectory: "./dist",
238
+ getFiles: async () => (await import('./esm-JBGUEJ46.cjs')).files
240
239
  }, {
241
240
  id: "template-next-static-export",
242
241
  label: "Next (static export)",
243
242
  envPrefix: "NEXT_PUBLIC_",
244
- buildDirectory: "./out"
243
+ buildDirectory: "./out",
244
+ getFiles: async () => (await import('./esm-2ZIGIHPI.cjs')).files
245
245
  }, {
246
246
  id: "template-tutorial-todo-app",
247
- label: "Tutorial: Todo App",
247
+ label: "Tutorial: To do App",
248
+ envPrefix: "VITE_",
249
+ buildDirectory: "./dist",
250
+ hidden: true,
251
+ getFiles: async () => (await import('./esm-VSENADXB.cjs')).files
252
+ }, {
253
+ id: "template-tutorial-todo-aip-app",
254
+ label: "Tutorial: To do AIP App",
248
255
  envPrefix: "VITE_",
249
256
  buildDirectory: "./dist",
250
- hidden: true
257
+ hidden: true,
258
+ getFiles: async () => (await import('./esm-RRFVZF4X.cjs')).files
251
259
  }];
252
260
 
253
261
  // src/prompts/promptTemplate.ts
@@ -379,17 +387,15 @@ async function run({
379
387
  });
380
388
  }
381
389
  consola.info(`Copying files into project directory`);
382
- const templatesDir = findUp.findUpSync("templates", {
383
- cwd: path2__default.default.dirname(url.fileURLToPath((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.src || new URL('out.js', document.baseURI).href)))),
384
- type: "directory"
385
- });
386
- if (templatesDir == null) {
387
- throw new Error(`Could not find templates directory`);
390
+ const files = await template.getFiles();
391
+ for (const [filePath, contents] of files) {
392
+ const finalPath = path2__default.default.join(root, filePath);
393
+ const dirPath = path2__default.default.dirname(finalPath);
394
+ await fs2__default.default.promises.mkdir(dirPath, {
395
+ recursive: true
396
+ });
397
+ await fs2__default.default.promises.writeFile(finalPath, Buffer.from(contents.body, contents.type === "raw" ? "utf-8" : "base64"));
388
398
  }
389
- const templateDir = path2__default.default.resolve(templatesDir, template.id);
390
- fs2__default.default.cpSync(templateDir, root, {
391
- recursive: true
392
- });
393
399
  const templateContext = {
394
400
  project,
395
401
  foundryUrl,
@@ -461,7 +467,7 @@ async function run({
461
467
 
462
468
  // src/cli.ts
463
469
  async function cli(args = process.argv) {
464
- const base = yargs__default.default(helpers.hideBin(args)).version("0.17.0-main-20240530094422").wrap(Math.min(150, yargs__default.default().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", {
470
+ const base = yargs__default.default(helpers.hideBin(args)).version("0.17.1").wrap(Math.min(150, yargs__default.default().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", {
465
471
  type: "string",
466
472
  describe: "Project name to create"
467
473
  }).option("overwrite", {
@@ -527,5 +533,5 @@ async function cli(args = process.argv) {
527
533
  exports.TEMPLATES = TEMPLATES;
528
534
  exports.cli = cli;
529
535
  exports.run = run;
530
- //# sourceMappingURL=out.js.map
536
+ //# sourceMappingURL=index.cjs.map
531
537
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/cli.ts","../../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/templates.ts","../../src/prompts/promptTemplate.ts","../../src/run.ts","../../src/generate/generateEnv.ts","../../src/generate/generateFoundryConfigJson.ts","../../src/generate/generateNpmRc.ts"],"names":["template","fs","path","yargs"],"mappings":";AAgBA,OAAO,WAAW;AAClB,SAAS,eAAe;;;ACDxB,SAAS,WAAW,gBAAgB,qBAAqB;AAClD,IAAM,UAAU,cAAc;AAAA;AAAA,EAEnC,MAAM,UAAU,QAAQ;AACtB,UAAM,WAAW,MAAM,eAAe,OAAO,GAAG,MAAM;AACtD,QAAI,OAAO,aAAa,YAAY,SAAS,SAAS,MAAM,wBAAwB;AAClF,qBAAe,KAAK,qBAAqB;AACzC,cAAQ,KAAK,CAAC;AAAA,IAChB;AACA,WAAO;AAAA,EACT;AACF,CAAC;;;ACXD,SAAS,gBAAgB;AAClB,SAAS,MAAM,MAAM;AAC1B,SAAO,SAAS,SAAS,IAAI;AAC/B;AACO,SAAS,OAAO,MAAM;AAC3B,SAAO,SAAS,UAAU,IAAI;AAChC;;;ACJA,eAAsB,qBAAqB;AAAA,EACzC;AACF,GAAG;AACD,SAAO,eAAe,QAAQ,CAAC,4DAA4D,KAAK,WAAW,GAAG;AAC5G,QAAI,eAAe,MAAM;AACvB,cAAQ,KAAK,4DAA4D;AAAA,IAC3E;AACA,kBAAc,MAAM,QAAQ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ights 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 { 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(\"template\", {\n type: \"string\",\n describe: \"Template name 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 }));\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 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 await run({\n project,\n overwrite,\n template,\n foundryUrl,\n applicationUrl,\n application,\n clientId,\n osdkPackage,\n osdkRegistryUrl,\n corsProxy\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 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 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 const TEMPLATES = [{\n id: \"template-react\",\n label: \"React\",\n envPrefix: \"VITE_\",\n buildDirectory: \"./dist\"\n}, {\n id: \"template-vue\",\n label: \"Vue\",\n envPrefix: \"VITE_\",\n buildDirectory: \"./dist\"\n}, {\n id: \"template-next-static-export\",\n label: \"Next (static export)\",\n envPrefix: \"NEXT_PUBLIC_\",\n buildDirectory: \"./out\"\n}, {\n id: \"template-tutorial-todo-app\",\n label: \"Tutorial: Todo App\",\n envPrefix: \"VITE_\",\n buildDirectory: \"./dist\",\n hidden: true\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 { green } from \"../highlight.js\";\nimport { TEMPLATES } from \"../templates.js\";\nexport async function promptTemplate(parsed) {\n let template = TEMPLATES.find(t => t.id === parsed.template || t.id === `template-${parsed.template}`);\n if (template == null) {\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: TEMPLATES.filter(template => template.hidden !== true).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\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 foundryUrl,\n applicationUrl,\n application,\n clientId,\n osdkPackage,\n osdkRegistryUrl,\n corsProxy\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 const templatesDir = findUpSync(\"templates\", {\n cwd: path.dirname(fileURLToPath(import.meta.url)),\n type: \"directory\"\n });\n if (templatesDir == null) {\n throw new Error(`Could not find templates directory`);\n }\n const templateDir = path.resolve(templatesDir, template.id);\n fs.cpSync(templateDir, root, {\n recursive: true\n });\n const templateContext = {\n project,\n foundryUrl,\n osdkPackage,\n corsProxy\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\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}"]}
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/templates.ts","../../src/prompts/promptTemplate.ts","../../src/generate/generateEnv.ts","../../src/generate/generateFoundryConfigJson.ts","../../src/generate/generateNpmRc.ts","../../src/run.ts","../../src/cli.ts"],"names":["createConsola","defaultConsola","colorize","fs","path","template","Handlebars","yargs","hideBin"],"mappings":";;;;;;;;;;;;;;;;;;AAiBO,IAAM,UAAUA,uBAAc,CAAA;AAAA;AAAA,EAEnC,MAAM,UAAU,MAAQ,EAAA;AACtB,IAAA,MAAM,QAAW,GAAA,MAAMC,iBAAe,CAAA,MAAA,CAAO,GAAG,MAAM,CAAA,CAAA;AACtD,IAAA,IAAI,OAAO,QAAa,KAAA,QAAA,IAAY,QAAS,CAAA,QAAA,OAAe,sBAAwB,EAAA;AAClF,MAAAA,iBAAA,CAAe,KAAK,qBAAqB,CAAA,CAAA;AACzC,MAAA,OAAA,CAAQ,KAAK,CAAC,CAAA,CAAA;AAAA,KAChB;AACA,IAAO,OAAA,QAAA,CAAA;AAAA,GACT;AACF,CAAC,CAAA,CAAA;ACVM,SAAS,MAAM,IAAM,EAAA;AAC1B,EAAO,OAAAC,cAAA,CAAS,SAAS,IAAI,CAAA,CAAA;AAC/B,CAAA;AACO,SAAS,OAAO,IAAM,EAAA;AAC3B,EAAO,OAAAA,cAAA,CAAS,UAAU,IAAI,CAAA,CAAA;AAChC,CAAA;;;ACJA,eAAsB,oBAAqB,CAAA;AAAA,EACzC,WAAA;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,CAAA;AAAA,KAC3E;AACA,IAAc,WAAA,GAAA,MAAM,QAAQ,MAAO,CAAA,CAAA;AAAA,EAAiG,MAAA,CAAO,8FAA8F,CAAC,CAAI,CAAA,EAAA;AAAA,MAC5O,IAAM,EAAA,MAAA;AAAA,KACP,CAAA,CAAA;AAAA,GACH;AACA,EAA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AA;AAAA,GACX,CAAE,CAAA,MAAA,CAAO,WAAa,EAAA;AAAA,IACrB,IAAM,EAAA,SAAA;AAAA,IACN,QAAU,EAAA,wEAAA;AAAA,GACX,CAAC,CAAA,CAAA;AACF,EAAM,MAAA,MAAA,GAAS,KAAK,SAAU,EAAA,CAAA;AAC9B,EAAM,MAAA,OAAA,GAAU,MAAM,aAAA,CAAc,MAAM,CAAA,CAAA;AAC1C,EAAM,MAAA,SAAA,GAAY,MAAM,eAAgB,CAAA;AAAA,IACtC,GAAG,MAAA;AAAA,IACH,OAAA;AAAA,GACD,CAAA,CAAA;AACD,EAAM,MAAA,QAAA,GAAW,MAAM,cAAA,CAAe,MAAM,CAAA,CAAA;AAC5C,EAAM,MAAA,UAAA,GAAa,MAAM,gBAAA,CAAiB,MAAM,CAAA,CAAA;AAChD,EAAM,MAAA,cAAA,GAAiB,MAAM,oBAAA,CAAqB,MAAM,CAAA,CAAA;AACxD,EAAM,MAAA,WAAA,GAAc,MAAM,oBAAA,CAAqB,MAAM,CAAA,CAAA;AACrD,EAAM,MAAA,QAAA,GAAW,MAAM,cAAA,CAAe,MAAM,CAAA,CAAA;AAC5C,EAAM,MAAA,WAAA,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,EAAA,MAAM,GAAI,CAAA;AAAA,IACR,OAAA;AAAA,IACA,SAAA;AAAA,IACA,QAAA;AAAA,IACA,UAAA;AAAA,IACA,cAAA;AAAA,IACA,WAAA;AAAA,IACA,QAAA;AAAA,IACA,WAAA;AAAA,IACA,eAAA;AAAA,IACA,SAAA;AAAA,GACD,CAAA,CAAA;AACH","file":"index.cjs","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 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 const TEMPLATES = [{\n id: \"template-react\",\n label: \"React\",\n envPrefix: \"VITE_\",\n buildDirectory: \"./dist\",\n getFiles: async () => (await import(`@osdk/create-app.template.react`)).files\n}, {\n id: \"template-vue\",\n label: \"Vue\",\n envPrefix: \"VITE_\",\n buildDirectory: \"./dist\",\n getFiles: async () => (await import(`@osdk/create-app.template.vue`)).files\n}, {\n id: \"template-next-static-export\",\n label: \"Next (static export)\",\n envPrefix: \"NEXT_PUBLIC_\",\n buildDirectory: \"./out\",\n getFiles: async () => (await import(`@osdk/create-app.template.next-static-export`)).files\n}, {\n id: \"template-tutorial-todo-app\",\n label: \"Tutorial: To do App\",\n envPrefix: \"VITE_\",\n buildDirectory: \"./dist\",\n hidden: true,\n getFiles: async () => (await import(`@osdk/create-app.template.tutorial-todo-app`)).files\n}, {\n id: \"template-tutorial-todo-aip-app\",\n label: \"Tutorial: To do AIP App\",\n envPrefix: \"VITE_\",\n buildDirectory: \"./dist\",\n hidden: true,\n getFiles: async () => (await import(`@osdk/create-app.template.tutorial-todo-aip-app`)).files\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 { green } from \"../highlight.js\";\nimport { TEMPLATES } from \"../templates.js\";\nexport async function promptTemplate(parsed) {\n let template = TEMPLATES.find(t => t.id === parsed.template || t.id === `template-${parsed.template}`);\n if (template == null) {\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: TEMPLATES.filter(template => template.hidden !== true).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 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 Handlebars from \"handlebars\";\nimport fs from \"node:fs\";\nimport path from \"node:path\";\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 foundryUrl,\n applicationUrl,\n application,\n clientId,\n osdkPackage,\n osdkRegistryUrl,\n corsProxy\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 const files = await template.getFiles();\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 templateContext = {\n project,\n foundryUrl,\n osdkPackage,\n corsProxy\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 { 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(\"template\", {\n type: \"string\",\n describe: \"Template name 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 }));\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 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 await run({\n project,\n overwrite,\n template,\n foundryUrl,\n applicationUrl,\n application,\n clientId,\n osdkPackage,\n osdkRegistryUrl,\n corsProxy\n });\n}"]}
@@ -0,0 +1,248 @@
1
+ // ../create-app.template.vue/build/esm/index.js
2
+ var files = /* @__PURE__ */ new Map([[".vscode/extensions.json", {
3
+ "type": "base64",
4
+ "body": "ewogICJyZWNvbW1lbmRhdGlvbnMiOiBbIlZ1ZS52b2xhciIsICJWdWUudnNjb2RlLXR5cGVzY3JpcHQtdnVlLXBsdWdpbiJdCn0K"
5
+ }], ["README.md.hbs", {
6
+ type: "raw",
7
+ body: `# {{project}}
8
+
9
+ This project was generated with [\`@osdk/create-app\`](https://www.npmjs.com/package/@osdk/create-app) and demonstrates using the Ontology SDK package \`{{osdkPackage}}\` with Vue on top of Vite. Check out the [Vite](https://vitejs.dev/guide/) docs for further configuration.
10
+
11
+ ## Developing
12
+
13
+ Run the following command or equivalent with your preferred package manager to start a local development server on \`http://localhost:8080\`:
14
+
15
+ \`\`\`sh
16
+ npm run dev
17
+ \`\`\`
18
+
19
+ Development configuration is stored in \`.env.development\`.
20
+
21
+ {{#if corsProxy}}
22
+ In 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.
23
+ {{else}}
24
+ In 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.
25
+ {{/if}}
26
+
27
+ ## Deploying
28
+
29
+ Run the following command or equivalent with your preferred package manager to create a production build of your application:
30
+
31
+ \`\`\`sh
32
+ npm run build
33
+ \`\`\`
34
+
35
+ Production configuration is stored in \`.env.production\`.
36
+
37
+ If 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\`.
38
+
39
+ In 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.
40
+
41
+ A \`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.
42
+ `
43
+ }], [".gitignore", {
44
+ type: "raw",
45
+ body: `# Logs
46
+ logs
47
+ *.log
48
+ npm-debug.log*
49
+ yarn-debug.log*
50
+ yarn-error.log*
51
+ pnpm-debug.log*
52
+ lerna-debug.log*
53
+
54
+ node_modules
55
+ dist
56
+ dist-ssr
57
+ *.local
58
+
59
+ # Editor directories and files
60
+ .vscode/*
61
+ !.vscode/extensions.json
62
+ .idea
63
+ .DS_Store
64
+ *.suo
65
+ *.ntvs*
66
+ *.njsproj
67
+ *.sln
68
+ *.sw?
69
+ `
70
+ }], ["index.html", {
71
+ type: "raw",
72
+ body: `<!doctype html>
73
+ <html lang="en">
74
+ <head>
75
+ <meta charset="UTF-8" />
76
+ <link rel="icon" type="image/svg+xml" href="/vue.svg" />
77
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
78
+ <title>Ontology SDK + Vue</title>
79
+ </head>
80
+ <body>
81
+ <div id="app-container">
82
+ <div id="app"></div>
83
+ </div>
84
+ <script type="module" src="/src/main.ts"></script>
85
+ </body>
86
+ </html>
87
+ `
88
+ }], ["package.json.hbs", {
89
+ type: "raw",
90
+ body: `{
91
+ "name": "{{project}}",
92
+ "private": true,
93
+ "version": "0.0.0",
94
+ "type": "module",
95
+ "scripts": {
96
+ "dev": "vite",
97
+ "build": "vue-tsc && vite build",
98
+ "preview": "vite preview"
99
+ },
100
+ "dependencies": {
101
+ "{{osdkPackage}}": "latest",
102
+ "vue": "^3.4.27",
103
+ "vue-router": "^4.2.5"
104
+ },
105
+ "devDependencies": {
106
+ "@vitejs/plugin-vue": "^4.5.0",
107
+ "typescript": "^5.5.4",
108
+ "vite": "^5.3.4",
109
+ "vue-tsc": "^2"
110
+ }
111
+ }`
112
+ }], ["public/palantir.svg", {
113
+ "type": "base64",
114
+ "body": "PHN2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C9zY3JpcHQ+Cgo8dGVtcGxhdGU+CiAgPGRpdj57eyBlcnJvciAhPSBudWxsID8gZXJyb3IgOiAiQXV0aGVudGljYXRpbmfigKYiIH19PC9kaXY+CjwvdGVtcGxhdGU+Cg=="
121
+ }], ["src/Home.vue.hbs", {
122
+ type: "raw",
123
+ body: `<script setup lang="ts">
124
+ import client from "./client";
125
+
126
+ const objectApiNames = Object.keys(client.ontology.objects);
127
+ const actionApiNames = Object.keys(client.ontology.actions);
128
+ const queryApiNames = Object.keys(client.ontology.queries);
129
+ </script>
130
+
131
+ <template>
132
+ <h1>{{osdkPackage}}</h1>
133
+ <p>
134
+ Welcome to your Ontology SDK! Try using any of the following methods now.
135
+ </p>
136
+ <div class="methods">
137
+ <div>
138
+ <h2>Objects (\\{{ objectApiNames.length }})</h2>
139
+ <pre v-for="objectApiName in objectApiNames" key="objectApiName">client.ontology.objects.\\{{ objectApiName }}</pre>
140
+ </div>
141
+ <div>
142
+ <h2>Actions (\\{{ actionApiNames.length }})</h2>
143
+ <pre v-for="actionApiName in actionApiNames" key="actionApiName">client.ontology.actions.\\{{ actionApiName }}</pre>
144
+ </div>
145
+ <div>
146
+ <h2>Queries (\\{{ queryApiNames.length }})</h2>
147
+ <pre v-for="queryApiName in queryApiNames" key="queryApiName">client.ontology.queries.\\{{ queryApiName }}</pre>
148
+ </div>
149
+ </div>
150
+ </template>
151
+
152
+ <style scoped>
153
+ .methods {
154
+ padding: 2em;
155
+ gap: 2em;
156
+ display: flex;
157
+ flex-direction: row;
158
+ flex-wrap: wrap;
159
+ }
160
+ </style>
161
+ `
162
+ }], ["src/Layout.vue", {
163
+ "type": "base64",
164
+ "body": "PHRlbXBsYXRlPgogIDxkaXY+CiAgICA8YQogICAgICBocmVmPSJodHRwczovL3d3dy5wYWxhbnRpci5jb20vZG9jcy9mb3VuZHJ5L29udG9sb2d5LXNkay9vdmVydmlldy8iCiAgICAgIHRhcmdldD0iX2JsYW5rIgogICAgPgogICAgICA8aW1nIHN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nJvcikubWVzc2FnZTsKICB9IGZpbmFsbHkgewogICAgaXNMb2dnaW5nSW4udmFsdWUgPSBmYWxzZTsKICB9Cn07CgpvblVwZGF0ZWQoKCkgPT4gewogIC8vIElmIHRoZSB0b2tlbiBleGlzdHMgYnV0IGEgdXNlciB0cmllcyB0byBsb2FkIC9sb2dpbiwgcmVkaXJlY3QgdG8gdGhlIGhvbWUgcGFnZSBpbnN0ZWFkCiAgaWYgKGNsaWVudC5hdXRoLnRva2VuICE9IG51bGwpIHsKICAgIHJvdXRlci5yZXBsYWNlKCIvIik7CiAgfQp9KTsKPC9zY3JpcHQ+Cgo8dGVtcGxhdGU+CiAgPGgxPk9udG9sb2d5IFNESzwvaDE+CiAgPGJ1dHRvbiBAY2xpY2s9ImxvZ2luIj4KICAgIHt7IGlzTG9nZ2luZ0luID8gIkxvZ2dpbmcgaW7igKYiIDogIkxvZyBpbiAiIH19CiAgPC9idXR0b24+CiAgPGRpdiB2LWlmPSJlcnJvciI+VW5hYmxlIHRvIGxvZyBpbjoge3sgZXJyb3IgfX08L2Rpdj4KPC90ZW1wbGF0ZT4K"
168
+ }], ["src/client.ts.hbs", {
169
+ type: "raw",
170
+ body: `import { FoundryClient, PublicClientAuth } from "{{osdkPackage}}";
171
+
172
+ const url = import.meta.env.VITE_FOUNDRY_API_URL;
173
+ const clientId = import.meta.env.VITE_FOUNDRY_CLIENT_ID;
174
+ const redirectUrl = import.meta.env.VITE_FOUNDRY_REDIRECT_URL;
175
+ checkEnv(url, "VITE_FOUNDRY_API_URL");
176
+ checkEnv(clientId, "VITE_FOUNDRY_CLIENT_ID");
177
+ checkEnv(redirectUrl, "VITE_FOUNDRY_REDIRECT_URL");
178
+
179
+ function checkEnv(
180
+ value: string | undefined,
181
+ name: string,
182
+ ): asserts value is string {
183
+ if (value == null) {
184
+ throw new Error(\`Missing environment variable: \${name}\`);
185
+ }
186
+ }
187
+
188
+ /**
189
+ * Initialize the client to interact with the Ontology SDK
190
+ */
191
+ const client = new FoundryClient({
192
+ url,
193
+ auth: new PublicClientAuth({
194
+ clientId,
195
+ url,
196
+ redirectUrl,
197
+ }),
198
+ });
199
+
200
+ export default client;
201
+ `
202
+ }], ["src/main.ts", {
203
+ "type": "base64",
204
+ "body": "aW1wb3J0IHsgY3JlYXRlQXBwIH0gZnJvbSAidnVlIjsKaW1wb3J0IHsgY3JlYXRlUm91dGVyLCBjcmVhdGVXZWJIaXN0b3J5IH0gZnJvbSAidnVlLXJvdXRlciI7CmltcG9ydCBBdXRoQ2FsbGJhY2sgZnJvbSAiLi9BdXRoQ2FsbGJhY2sudnVlIjsKaW1wb3J0IGNsaWVudCBmcm9tICIuL2NsaWVudCI7CmltcG9ydCBIb21lIGZyb20gIi4vSG9tZS52dWUiOwppbXBvcnQgTGF5b3V0IGZyb20gIi4vTGF5b3V0LnZ1ZSI7CmltcG9ydCBMb2dpbiBmcm9tICIuL0xvZ2luLnZ1ZSI7CmltcG9ydCAiLi9zdHlsZS5jc3MiOwoKY29uc3Qgcm91dGVzID0gWwogIHsgcGF0aDogIi8iLCBjb21wb25lbnQ6IEhvbWUsIG1ldGE6IHsgcmVxdWlyZXNBdXRoOiB0cnVlIH0gfSwKICB7IHBhdGg6ICIvbG9naW4iLCBjb21wb25lbnQ6IExvZ2luIH0sCiAgeyBwYXRoOiAiL2F1dGgvY2FsbGJhY2siLCBjb21wb25lbnQ6IEF1dGhDYWxsYmFjayB9LApdOwoKY29uc3Qgcm91dGVyID0gY3JlYXRlUm91dGVyKHsKICBoaXN0b3J5OiBjcmVhdGVXZWJIaXN0b3J5KGltcG9ydC5tZXRhLmVudi5CQVNFX1VSTCksCiAgcm91dGVzLAp9KTsKCnJvdXRlci5iZWZvcmVFYWNoKGFzeW5jICh0bykgPT4gewogIGlmICgKICAgIHRvLm1ldGEucmVxdWlyZXNBdXRoCiAgICAmJiAoY2xpZW50LmF1dGgudG9rZW4gPT0gbnVsbCB8fCBjbGllbnQuYXV0aC50b2tlbi5pc0V4cGlyZWQpCiAgKSB7CiAgICB0cnkgewogICAgICBhd2FpdCBjbGllbnQuYXV0aC5yZWZyZXNoKCk7CiAgICB9IGNhdGNoIChlOiB1bmtub3duKSB7CiAgICAgIC8vIElmIHdlIGNhbm5vdCByZWZyZXNoIHRoZSB0b2tlbiAoaS5lLiB0aGUgdXNlciBpcyBub3QgbG9nZ2VkIGluKSB3ZSByZWRpcmVjdCB0byB0aGUgbG9naW4gcGFnZQogICAgICByZXR1cm4gIi9sb2dpbiI7CiAgICB9CiAgfQp9KTsKCmNyZWF0ZUFwcChMYXlvdXQpLnVzZShyb3V0ZXIpLm1vdW50KCIjYXBwIik7Cg=="
205
+ }], ["src/style.css", {
206
+ "type": "base64",
207
+ "body": "OnJvb3QgewogIGZvbnQtZmFtaWx5OiBJbnRlciwgc3lzdGVtLXVpLCBBdmVuaXIsIEhlbHZldGljYSwgQXJpYWwsIHNhbnMtc2VyaWY7CiAgbGluZS1oZWlnaHQ6IDEuNTsKICBmb250LXdlaWdodDogNDAwOwoKICBjb2xvci1zY2hlbWU6IGxpZ2h0IGRhcms7CiAgY29sb3I6IHJnYmEoMjU1LCAyNTUsIDI1NSwgMC44Nyk7CiAgYmFja2dyb3VuZC1jb2xvcjogIzI0MjQyNDsKCiAgZm9udC1zeW50aGVzaXM6IG5vbmU7CiAgdGV4dC1yZW5kZXJpbmc6IG9wdGltaXplTGVnaWJpbGl0eTsKICAtd2Via2l0LWZvbnQtc21vb3RoaW5nOiBhbnRpYWxpYXNlZDsKICAtbW96LW9zeC1mb250LXNtb290aGluZzogZ3JheXNjYWxlOwp9CgojYXBwLWNvbnRhaW5lciB7CiAgZGlzcGxheTogZmxleDsKICBmbGV4OiAxOwogIGFsaWduLWl0ZW1zOiBjZW50ZXI7Cn0KCiNhcHAgewogIG1heC13aWR0aDogMTI4MHB4OwogIG1hcmdpbjogMCBhdXRvOwogIHBhZGRpbmc6IDJyZW07CiAgdGV4dC1hbGlnbjogY2VudGVyOwp9CgphIHsKICBmb250LXdlaWdodDogNTAwOwogIGNvbG9yOiAjNjQ2Y2ZmOwogIHRleHQtZGVjb3JhdGlvbjogaW5oZXJpdDsKfQphOmhvdmVyIHsKICBjb2xvcjogIzUzNWJmMjsKfQoKYm9keSB7CiAgbWFyZ2luOiAwOwogIGRpc3BsYXk6IGZsZXg7CiAgZmxleC1kaXJlY3Rpb246IGNvbHVtbjsKICBtaW4td2lkdGg6IDMyMHB4OwogIG1pbi1oZWlnaHQ6IDEwMHZoOwp9CgpoMSB7CiAgZm9udC1zaXplOiAzLjJlbTsKICBsaW5lLWhlaWdodDogMS4xOwp9CgpidXR0b24gewogIGJvcmRlci1yYWRpdXM6IDhweDsKICBib3JkZXI6IDFweCBzb2xpZCB0cmFuc3BhcmVudDsKICBwYWRkaW5nOiAwLjZlbSAxLjJlbTsKICBmb250LXNpemU6IDFlbTsKICBmb250LXdlaWdodDogNTAwOwogIGZvbnQtZmFtaWx5OiBpbmhlcml0OwogIGJhY2tncm91bmQtY29sb3I6ICMxYTFhMWE7CiAgY3Vyc29yOiBwb2ludGVyOwogIHRyYW5zaXRpb246IGJvcmRlci1jb2xvciAwLjI1czsKfQpidXR0b246aG92ZXIgewogIGJvcmRlci1jb2xvcjogIzY0NmNmZjsKfQpidXR0b246Zm9jdXMsCmJ1dHRvbjpmb2N1cy12aXNpYmxlIHsKICBvdXRsaW5lOiA0cHggYXV0byAtd2Via2l0LWZvY3VzLXJpbmctY29sb3I7Cn0KCkBtZWRpYSAocHJlZmVycy1jb2xvci1zY2hlbWU6IGxpZ2h0KSB7CiAgOnJvb3QgewogICAgY29sb3I6ICMyMTM1NDc7CiAgICBiYWNrZ3JvdW5kLWNvbG9yOiAjZmZmZmZmOwogIH0KICBhOmhvdmVyIHsKICAgIGNvbG9yOiAjNzQ3YmZmOwogIH0KICBidXR0b24gewogICAgYmFja2dyb3VuZC1jb2xvcjogI2Y5ZjlmOTsKICB9Cn0K"
208
+ }], ["src/vite-env.d.ts", {
209
+ "type": "base64",
210
+ "body": "Ly8vIDxyZWZlcmVuY2UgdHlwZXM9InZpdGUvY2xpZW50IiAvPgo="
211
+ }], ["tsconfig.json", {
212
+ "type": "base64",
213
+ "body": "ewogICJjb21waWxlck9wdGlvbnMiOiB7CiAgICAidGFyZ2V0IjogIkVTMjAyMCIsCiAgICAidXNlRGVmaW5lRm9yQ2xhc3NGaWVsZHMiOiB0cnVlLAogICAgIm1vZHVsZSI6ICJFU05leHQiLAogICAgImxpYiI6IFsiRVMyMDIwIiwgIkRPTSIsICJET00uSXRlcmFibGUiXSwKICAgICJza2lwTGliQ2hlY2siOiB0cnVlLAoKICAgIC8qIEJ1bmRsZXIgbW9kZSAqLwogICAgIm1vZHVsZVJlc29sdXRpb24iOiAiYnVuZGxlciIsCiAgICAiYWxsb3dJbXBvcnRpbmdUc0V4dGVuc2lvbnMiOiB0cnVlLAogICAgInJlc29sdmVKc29uTW9kdWxlIjogdHJ1ZSwKICAgICJpc29sYXRlZE1vZHVsZXMiOiB0cnVlLAogICAgIm5vRW1pdCI6IHRydWUsCiAgICAianN4IjogInByZXNlcnZlIiwKCiAgICAvKiBMaW50aW5nICovCiAgICAic3RyaWN0IjogdHJ1ZSwKICAgICJub1VudXNlZExvY2FscyI6IHRydWUsCiAgICAibm9VbnVzZWRQYXJhbWV0ZXJzIjogdHJ1ZSwKICAgICJub0ZhbGx0aHJvdWdoQ2FzZXNJblN3aXRjaCI6IHRydWUKICB9LAogICJpbmNsdWRlIjogWyJzcmMvKiovKi50cyIsICJzcmMvKiovKi50c3giLCAic3JjLyoqLyoudnVlIl0sCiAgInJlZmVyZW5jZXMiOiBbeyAicGF0aCI6ICIuL3RzY29uZmlnLm5vZGUuanNvbiIgfV0KfQo="
214
+ }], ["tsconfig.node.json", {
215
+ "type": "base64",
216
+ "body": "ewogICJjb21waWxlck9wdGlvbnMiOiB7CiAgICAiY29tcG9zaXRlIjogdHJ1ZSwKICAgICJza2lwTGliQ2hlY2siOiB0cnVlLAogICAgIm1vZHVsZSI6ICJFU05leHQiLAogICAgIm1vZHVsZVJlc29sdXRpb24iOiAiYnVuZGxlciIsCiAgICAiYWxsb3dTeW50aGV0aWNEZWZhdWx0SW1wb3J0cyI6IHRydWUKICB9LAogICJpbmNsdWRlIjogWyJ2aXRlLmNvbmZpZy50cyJdCn0K"
217
+ }], ["vite.config.ts.hbs", {
218
+ type: "raw",
219
+ body: `import vue from "@vitejs/plugin-vue";
220
+ import { defineConfig } from "vite";
221
+
222
+ // https://vitejs.dev/config/
223
+ export default defineConfig({
224
+ plugins: [vue()],
225
+ server: {
226
+ port: 8080,
227
+ {{#if corsProxy}}
228
+ proxy: {
229
+ "^(/multipass/api|/api)": {
230
+ target: "{{foundryUrl}}",
231
+ changeOrigin: true,
232
+ secure: true,
233
+ },
234
+ },
235
+ {{/if}}
236
+ },
237
+ resolve: {
238
+ alias: {
239
+ vue: "vue/dist/vue.esm-bundler",
240
+ },
241
+ },
242
+ });
243
+ `
244
+ }]]);
245
+
246
+ export { files };
247
+ //# sourceMappingURL=esm-5B4R5BF5.js.map
248
+ //# sourceMappingURL=esm-5B4R5BF5.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../create-app.template.vue/build/esm/index.js"],"names":[],"mappings":";AACA,IAAI,KAAuB,mBAAA,IAAI,GAAI,CAAA,CAAC,CAAC,yBAA2B,EAAA;AAAA,EAC9D,MAAQ,EAAA,QAAA;AAAA,EACR,MAAQ,EAAA,sGAAA;AACV,CAAC,CAAA,EAAG,CAAC,eAAiB,EAAA;AAAA,EACpB,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;AAAA,CAAA;AAoCR,CAAC,CAAA,EAAG,C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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,CAAA;AAyBR,CAAC,CAAC,CAAC","file":"esm-5B4R5BF5.js","sourcesContent":["// src/generatedNoCheck/index.ts\nvar files = /* @__PURE__ */new Map([[\".vscode/extensions.json\", {\n \"type\": \"base64\",\n \"body\": \"ewogICJyZWNvbW1lbmRhdGlvbnMiOiBbIlZ1ZS52b2xhciIsICJWdWUudnNjb2RlLXR5cGVzY3JpcHQtdnVlLXBsdWdpbiJdCn0K\"\n}], [\"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 Vue 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\\`.\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}], [\"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=\"/vue.svg\" />\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n <title>Ontology SDK + Vue</title>\n </head>\n <body>\n <div id=\"app-container\">\n <div id=\"app\"></div>\n </div>\n <script type=\"module\" src=\"/src/main.ts\"></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\": \"vue-tsc && vite build\",\n \"preview\": \"vite preview\"\n },\n \"dependencies\": {\n \"{{osdkPackage}}\": \"latest\",\n \"vue\": \"^3.4.27\",\n \"vue-router\": \"^4.2.5\"\n },\n \"devDependencies\": {\n \"@vitejs/plugin-vue\": \"^4.5.0\",\n \"typescript\": \"^5.5.4\",\n \"vite\": \"^5.3.4\",\n \"vue-tsc\": \"^2\"\n }\n}`\n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AoZSBhcyBFcnJvcikubWVzc2FnZTsKICAgIH0pOwp9KTsKPC9zY3JpcHQ+Cgo8dGVtcGxhdGU+CiAgPGRpdj57eyBlcnJvciAhPSBudWxsID8gZXJyb3IgOiAiQXV0aGVudGljYXRpbmfigKYiIH19PC9kaXY+CjwvdGVtcGxhdGU+Cg==\"\n}], [\"src/Home.vue.hbs\", {\n type: \"raw\",\n body: `<script setup lang=\"ts\">\nimport client from \"./client\";\n\nconst objectApiNames = Object.keys(client.ontology.objects);\nconst actionApiNames = Object.keys(client.ontology.actions);\nconst queryApiNames = Object.keys(client.ontology.queries);\n</script>\n\n<template>\n <h1>{{osdkPackage}}</h1>\n <p>\n Welcome to your Ontology SDK! Try using any of the following methods now.\n </p>\n <div class=\"methods\">\n <div>\n <h2>Objects (\\\\{{ objectApiNames.length }})</h2>\n <pre v-for=\"objectApiName in objectApiNames\" key=\"objectApiName\">client.ontology.objects.\\\\{{ objectApiName }}</pre>\n </div>\n <div>\n <h2>Actions (\\\\{{ actionApiNames.length }})</h2>\n <pre v-for=\"actionApiName in actionApiNames\" key=\"actionApiName\">client.ontology.actions.\\\\{{ actionApiName }}</pre>\n </div>\n <div>\n <h2>Queries (\\\\{{ queryApiNames.length }})</h2>\n <pre v-for=\"queryApiName in queryApiNames\" key=\"queryApiName\">client.ontology.queries.\\\\{{ queryApiName }}</pre>\n </div>\n </div>\n</template>\n\n<style scoped>\n.methods {\n padding: 2em;\n gap: 2em;\n display: flex;\n flex-direction: row;\n flex-wrap: wrap;\n}\n</style>\n`\n}], [\"src/Layout.vue\", {\n \"type\": \"base64\",\n \"body\": \"PHRlbXBsYXRlPgogIDxkaXY+CiAgICA8YQogICAgICBocmVmPSJodHRwczovL3d3dy5wYWxhbnRpci5jb20vZG9jcy9mb3VuZHJ5L29udG9sb2d5LXNkay9vdmVydmlldy8iCiAgICAgIHRhcmdldD0iX2JsYW5rIgogICAgPgogICAgICA8aW1nIHNyYz0iL3BhbGFudGlyLnN2ZyIgY2xh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sbHkgewogICAgaXNMb2dnaW5nSW4udmFsdWUgPSBmYWxzZTsKICB9Cn07CgpvblVwZGF0ZWQoKCkgPT4gewogIC8vIElmIHRoZSB0b2tlbiBleGlzdHMgYnV0IGEgdXNlciB0cmllcyB0byBsb2FkIC9sb2dpbiwgcmVkaXJlY3QgdG8gdGhlIGhvbWUgcGFnZSBpbnN0ZWFkCiAgaWYgKGNsaWVudC5hdXRoLnRva2VuICE9IG51bGwpIHsKICAgIHJvdXRlci5yZXBsYWNlKCIvIik7CiAgfQp9KTsKPC9zY3JpcHQ+Cgo8dGVtcGxhdGU+CiAgPGgxPk9udG9sb2d5IFNESzwvaDE+CiAgPGJ1dHRvbiBAY2xpY2s9ImxvZ2luIj4KICAgIHt7IGlzTG9nZ2luZ0luID8gIkxvZ2dpbmcgaW7igKYiIDogIkxvZyBpbiAiIH19CiAgPC9idXR0b24+CiAgPGRpdiB2LWlmPSJlcnJvciI+VW5hYmxlIHRvIGxvZyBpbjoge3sgZXJyb3IgfX08L2Rpdj4KPC90ZW1wbGF0ZT4K\"\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 }),\n});\n\nexport default client;\n`\n}], [\"src/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zNWJmMjsKfQoKYm9keSB7CiAgbWFyZ2luOiAwOwogIGRpc3BsYXk6IGZsZXg7CiAgZmxleC1kaXJlY3Rpb246IGNvbHVtbjsKICBtaW4td2lkdGg6IDMyMHB4OwogIG1pbi1oZWlnaHQ6IDEwMHZoOwp9CgpoMSB7CiAgZm9udC1zaXplOiAzLjJlbTsKICBsaW5lLWhlaWdodDogMS4xOwp9CgpidXR0b24gewogIGJvcmRlci1yYWRpdXM6IDhweDsKICBib3JkZXI6IDFweCBzb2xpZCB0cmFuc3BhcmVudDsKICBwYWRkaW5nOiAwLjZlbSAxLjJlbTsKICBmb250LXNpemU6IDFlbTsKICBmb250LXdlaWdodDogNTAwOwogIGZvbnQtZmFtaWx5OiBpbmhlcml0OwogIGJhY2tncm91bmQtY29sb3I6ICMxYTFhMWE7CiAgY3Vyc29yOiBwb2ludGVyOwogIHRyYW5zaXRpb246IGJvcmRlci1jb2xvciAwLjI1czsKfQpidXR0b246aG92ZXIgewogIGJvcmRlci1jb2xvcjogIzY0NmNmZjsKfQpidXR0b246Zm9jdXMsCmJ1dHRvbjpmb2N1cy12aXNpYmxlIHsKICBvdXRsaW5lOiA0cHggYXV0byAtd2Via2l0LWZvY3VzLXJpbmctY29sb3I7Cn0KCkBtZWRpYSAocHJlZmVycy1jb2xvci1zY2hlbWU6IGxpZ2h0KSB7CiAgOnJvb3QgewogICAgY29sb3I6ICMyMTM1NDc7CiAgICBiYWNrZ3JvdW5kLWNvbG9yOiAjZmZmZmZmOwogIH0KICBhOmhvdmVyIHsKICAgIGNvbG9yOiAjNzQ3YmZmOwogIH0KICBidXR0b24gewogICAgYmFja2dyb3VuZC1jb2xvcjogI2Y5ZjlmOTsKICB9Cn0K\"\n}], [\"src/vite-env.d.ts\", {\n \"type\": \"base64\",\n \"body\": \"Ly8vIDxyZWZlcmVuY2UgdHlwZXM9InZpdGUvY2xpZW50IiAvPgo=\"\n}], [\"tsconfig.json\", {\n \"type\": \"base64\",\n \"body\": \"ewogICJjb21waWxlck9wdGlvbnMiOiB7CiAgICAidGFyZ2V0IjogIkVTMjAyMCIsCiAgICAidXNlRGVmaW5lRm9yQ2xhc3NGaWVsZHMiOiB0cnVlLAogICAgIm1vZHVsZSI6ICJFU05leHQiLAogICAgImxpYiI6IFsiRVMyMDIwIiwgIkRPTSIsICJET00uSXRlcmFibGUiXSwKICAgICJza2lwTGliQ2hlY2siOiB0cnVlLAoKICAgIC8qIEJ1bmRsZXIgbW9kZSAqLwogICAgIm1vZHVsZVJlc29sdXRpb24iOiAiYnVuZGxlciIsCiAgICAiYWxsb3dJbXBvcnRpbmdUc0V4dGVuc2lvbnMiOiB0cnVlLAogICAgInJlc29sdmVKc29uTW9kdWxlIjogdHJ1ZSwKICAgICJpc29sYXRlZE1vZHVsZXMiOiB0cnVlLAogICAgIm5vRW1pdCI6IHRydWUsCiAgICAianN4IjogInByZXNlcnZlIiwKCiAgICAvKiBMaW50aW5nICovCiAgICAic3RyaWN0IjogdHJ1ZSwKICAgICJub1VudXNlZExvY2FscyI6IHRydWUsCiAgICAibm9VbnVzZWRQYXJhbWV0ZXJzIjogdHJ1ZSwKICAgICJub0ZhbGx0aHJvdWdoQ2FzZXNJblN3aXRjaCI6IHRydWUKICB9LAogICJpbmNsdWRlIjogWyJzcmMvKiovKi50cyIsICJzcmMvKiovKi50c3giLCAic3JjLyoqLyoudnVlIl0sCiAgInJlZmVyZW5jZXMiOiBbeyAicGF0aCI6ICIuL3RzY29uZmlnLm5vZGUuanNvbiIgfV0KfQo=\"\n}], [\"tsconfig.node.json\", {\n \"type\": \"base64\",\n \"body\": \"ewogICJjb21waWxlck9wdGlvbnMiOiB7CiAgICAiY29tcG9zaXRlIjogdHJ1ZSwKICAgICJza2lwTGliQ2hlY2siOiB0cnVlLAogICAgIm1vZHVsZSI6ICJFU05leHQiLAogICAgIm1vZHVsZVJlc29sdXRpb24iOiAiYnVuZGxlciIsCiAgICAiYWxsb3dTeW50aGV0aWNEZWZhdWx0SW1wb3J0cyI6IHRydWUKICB9LAogICJpbmNsdWRlIjogWyJ2aXRlLmNvbmZpZy50cyJdCn0K\"\n}], [\"vite.config.ts.hbs\", {\n type: \"raw\",\n body: `import vue from \"@vitejs/plugin-vue\";\nimport { defineConfig } from \"vite\";\n\n// https://vitejs.dev/config/\nexport default defineConfig({\n plugins: [vue()],\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 resolve: {\n alias: {\n vue: \"vue/dist/vue.esm-bundler\",\n },\n },\n});\n`\n}]]);\nexport { files };"]}