@osdk/create-app 2.5.4 → 2.5.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -0
- package/build/esm/{esm-VX5FZKBE.js → esm-BQBXTION.js} +8 -5
- package/build/esm/esm-BQBXTION.js.map +1 -0
- package/build/esm/{esm-RL6PMHXG.js → esm-DRNISRMJ.js} +6 -4
- package/build/esm/esm-DRNISRMJ.js.map +1 -0
- package/build/esm/{esm-7W5YHMCJ.js → esm-UNJLX2G5.js} +6 -3
- package/build/esm/esm-UNJLX2G5.js.map +1 -0
- package/build/esm/index.js +17 -17
- package/build/esm/index.js.map +1 -1
- package/build/types/generate/generateNpmRc.d.ts +2 -2
- package/package.json +13 -13
- package/build/esm/esm-7W5YHMCJ.js.map +0 -1
- package/build/esm/esm-RL6PMHXG.js.map +0 -1
- package/build/esm/esm-VX5FZKBE.js.map +0 -1
|
@@ -59,6 +59,7 @@ node_modules
|
|
|
59
59
|
dist
|
|
60
60
|
dist-ssr
|
|
61
61
|
*.local
|
|
62
|
+
.pnpm-store
|
|
62
63
|
|
|
63
64
|
# Editor directories and files
|
|
64
65
|
.vscode/*
|
|
@@ -82,8 +83,8 @@ dist-ssr
|
|
|
82
83
|
<meta name="osdk-clientId" content="%VITE_FOUNDRY_CLIENT_ID%" />
|
|
83
84
|
<meta name="osdk-redirectUrl" content="%VITE_FOUNDRY_REDIRECT_URL%" />
|
|
84
85
|
<meta name="osdk-foundryUrl" content="%VITE_FOUNDRY_API_URL%" />
|
|
85
|
-
{{#if osdkPackage}}<meta name="osdk-ontologyRid" content="%VITE_FOUNDRY_ONTOLOGY_RID%" />{{/if}}
|
|
86
86
|
{{#if osdkPackage}}
|
|
87
|
+
<meta name="osdk-ontologyRid" content="%VITE_FOUNDRY_ONTOLOGY_RID%" />
|
|
87
88
|
<title>Ontology SDK + Vue</title>
|
|
88
89
|
{{else}}
|
|
89
90
|
<title>Platform SDK + Vue</title>
|
|
@@ -113,6 +114,7 @@ dist-ssr
|
|
|
113
114
|
"dependencies": {
|
|
114
115
|
"{{osdkPackage}}": "latest",
|
|
115
116
|
"@osdk/client": "{{clientVersion}}",
|
|
117
|
+
"@osdk/foundry": "latest",
|
|
116
118
|
"@osdk/oauth": "^1.1.0",
|
|
117
119
|
"vue": "^3.5.21",
|
|
118
120
|
"vue-router": "^4.5.1"
|
|
@@ -141,6 +143,7 @@ dist-ssr
|
|
|
141
143
|
},
|
|
142
144
|
"dependencies": {
|
|
143
145
|
"@osdk/client": "{{clientVersion}}",
|
|
146
|
+
"@osdk/foundry": "latest",
|
|
144
147
|
"@osdk/oauth": "^1.1.0",
|
|
145
148
|
"vue": "^3.5.21",
|
|
146
149
|
"vue-router": "^4.5.1"
|
|
@@ -487,5 +490,5 @@ export default defineConfig(({ mode }) => {
|
|
|
487
490
|
}]]);
|
|
488
491
|
|
|
489
492
|
export { files };
|
|
490
|
-
//# sourceMappingURL=esm-
|
|
491
|
-
//# sourceMappingURL=esm-
|
|
493
|
+
//# sourceMappingURL=esm-UNJLX2G5.js.map
|
|
494
|
+
//# sourceMappingURL=esm-UNJLX2G5.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../create-app.template.vue.v2/build/esm/generatedNoCheck/index.js"],"names":[],"mappings":";AAAO,IAAM,KAAQ,mBAAA,IAAI,GAAI,CAAA,CAAC,CAAC,yBAA2B,EAAA;AAAA,EACxD,MAAQ,EAAA,QAAA;AAAA,EACR,MAAQ,EAAA;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;AAwC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AAiB,EAAA;AAAA,EACpB,MAAQ,EAAA,QAAA;AAAA,EACR,MAAQ,EAAA;AACV,CAAC,CAAA,EAAG,CAAC,aAAe,EAAA;AAAA,EAClB,MAAQ,EAAA,QAAA;AAAA,EACR,MAAQ,EAAA;AACV,CAAC,CAAA,EAAG,CAAC,eAAiB,EAAA;AAAA,EACpB,MAAQ,EAAA,QAAA;AAAA,EACR,MAAQ,EAAA;AACV,CAAC,CAAA,EAAG,CAAC,mBAAqB,EAAA;AAAA,EACxB,MAAQ,EAAA,QAAA;AAAA,EACR,MAAQ,EAAA;AACV,CAAC,CAAA,EAAG,CAAC,eAAiB,EAAA;AAAA,EACpB,MAAQ,EAAA,QAAA;AAAA,EACR,MAAQ,EAAA;AACV,CAAC,CAAA,EAAG,CAAC,oBAAsB,EAAA;AAAA,EACzB,MAAQ,EAAA,QAAA;AAAA,EACR,MAAQ,EAAA;AACV,CAAC,CAAA,EAAG,CAAC,oBAAsB,EAAA;AAAA,EACzB,IAAM,EAAA,KAAA;AAAA,EACN,IAAM,EAAA,CAAA;AAAA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AA8BR,CAAC,CAAC,CAAC","file":"esm-UNJLX2G5.js","sourcesContent":["export const files = new Map([[\".vscode/extensions.json\", {\n \"type\": \"base64\",\n \"body\": \"ewogICJyZWNvbW1lbmRhdGlvbnMiOiBbIlZ1ZS52b2xhciIsICJWdWUudnNjb2RlLXR5cGVzY3JpcHQtdnVlLXBsdWdpbiJdCn0K\"\n}], [\"README.md.hbs\", {\n type: \"raw\",\n body: `# {{project}}\n\n{{#if osdkPackage}}\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{{else}}\nThis project was generated with [\\`@osdk/create-app\\`](https://www.npmjs.com/package/@osdk/create-app) and demonstrates using the Platform SDK with Vue on top of Vite. Check out the [Vite](https://vitejs.dev/guide/) docs for further configuration.\n{{/if}}\n\n## Developing\n\nRun the following command or equivalent with your preferred package manager to start a local development server on \\`http://localhost:8080\\`:\n\n\\`\\`\\`sh\nnpm run dev\n\\`\\`\\`\n\nDevelopment configuration is stored in \\`.env.development\\`.\n\n{{#if corsProxy}}\nIn order to make API requests to Foundry, a CORS proxy has been set up for local development which may be removed if the stack is configured to allow \\`http://localhost:8080\\` to load resources. The configured OAuth client must also allow \\`http://localhost:8080/auth/callback\\` as a redirect URL.\n{{else}}\nIn order to make API requests to Foundry, CORS must be configured for the stack to allow \\`http://localhost:8080\\` to load resources. If this has not been configured and you are unable to request this, you can alternatively generate your project again with \\`--corsProxy true\\` to use a proxy for API requests during local development. The configured OAuth client must also allow \\`http://localhost:8080/auth/callback\\` as a redirect URL.\n{{/if}}\n\n## Deploying\n\nRun the following command or equivalent with your preferred package manager to create a production build of your application:\n\n\\`\\`\\`sh\nnpm run build\n\\`\\`\\`\n\nProduction configuration is stored in \\`.env.production\\`.\n\nIf you did not fill in the URL your production application will be hosted on you will need to fill in the \\`VITE_FOUNDRY_REDIRECT_URL\\` in \\`.env.production\\`. A default test is included in \\`env.test.ts\\` to verify your production environment variables which you can enable by removing the skip condition or running tests with the environment variable set \\`VERIFY_ENV_PRODUCTION=true\\`.\n\nIn order to make API requests to Foundry, CORS must be configured for the stack to allow the production origin to load resources. This will be automatically done for you if you are using Foundry website hosting. The configured OAuth client must also allow the production origin auth callback as a redirect URL.\n\nA \\`foundry.config.json\\` file is included in the root of this project to make deploying to Foundry website hosting with [\\`@osdk/cli\\`](https://www.npmjs.com/package/@osdk/cli) easier. If you are not using Foundry website hosting for your application you may delete this file.\n`\n}], [\".gitignore\", {\n type: \"raw\",\n body: `# Logs\nlogs\n*.log\nnpm-debug.log*\nyarn-debug.log*\nyarn-error.log*\npnpm-debug.log*\nlerna-debug.log*\n\nnode_modules\ndist\ndist-ssr\n*.local\n.pnpm-store\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.hbs\", {\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 <meta name=\"osdk-clientId\" content=\"%VITE_FOUNDRY_CLIENT_ID%\" />\n <meta name=\"osdk-redirectUrl\" content=\"%VITE_FOUNDRY_REDIRECT_URL%\" />\n <meta name=\"osdk-foundryUrl\" content=\"%VITE_FOUNDRY_API_URL%\" />\n {{#if osdkPackage}}\n <meta name=\"osdk-ontologyRid\" content=\"%VITE_FOUNDRY_ONTOLOGY_RID%\" />\n <title>Ontology SDK + Vue</title>\n {{else}}\n <title>Platform SDK + Vue</title>\n {{/if}}\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.osdk.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 \"test\": \"vitest run\",\n \"preview\": \"vite preview\"\n },\n \"dependencies\": {\n \"{{osdkPackage}}\": \"latest\",\n \"@osdk/client\": \"{{clientVersion}}\",\n \"@osdk/foundry\": \"latest\",\n \"@osdk/oauth\": \"^1.1.0\",\n \"vue\": \"^3.5.21\",\n \"vue-router\": \"^4.5.1\"\n },\n \"devDependencies\": {\n \"@types/node\": \"^18.0.0\",\n \"@vitejs/plugin-vue\": \"^5.2.4\",\n \"typescript\": \"~5.5.4\",\n \"vite\": \"^6.3.6\",\n \"vitest\": \"^3.2.4\",\n \"vue-tsc\": \"^2.2.12\"\n }\n}`\n}], [\"package.json.psdk.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 \"test\": \"vitest run\",\n \"preview\": \"vite preview\"\n },\n \"dependencies\": {\n \"@osdk/client\": \"{{clientVersion}}\",\n \"@osdk/foundry\": \"latest\",\n \"@osdk/oauth\": \"^1.1.0\",\n \"vue\": \"^3.5.21\",\n \"vue-router\": \"^4.5.1\"\n },\n \"devDependencies\": {\n \"@types/node\": \"^18.0.0\",\n \"@vitejs/plugin-vue\": \"^5.2.4\",\n \"typescript\": \"~5.5.4\",\n \"vite\": \"^6.3.6\",\n \"vitest\": \"^3.2.4\",\n \"vue-tsc\": \"^2.2.12\"\n }\n}`\n}], [\"public/book.svg\", {\n \"type\": \"base64\",\n \"body\": \"PHN2ZyB3aWR0aD0iMTIiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxMiAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0wIDFWMTVDMCAxNS41NSAwLjQ1IDE2IDEgMTZIMlYwSDFDMC40NSAwIDAgMC40NSAwIDFaTTExIDBIMTBWN0w4IDVMNiA3VjBIM1YxNkgxMUMxMS41NSAxNiAxMiAxNS41NSAxMiAxNVYxQzEyIDAuNDUgMTEuNTUgMCAxMSAwWiIgZmlsbD0iIzVGNkI3QyIvPgo8L3N2Zz4K\"\n}], [\"public/cloud.svg\", {\n \"type\": \"base64\",\n \"body\": \"PHN2ZyB3aWR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sbD0iIzQxQjg4MyIgZD0iTTIwNC44IDBIMjU2TDEyOCAyMjAuOEwwIDBoOTcuOTJMMTI4IDUxLjJMMTU3LjQ0IDBoNDcuMzZaIj48L3BhdGg+PHBhdGggZmlsbD0iIzQxQjg4MyIgZD0ibTAgMGwxMjggMjIwLjhMMjU2IDBoLTUxLjJMMTI4IDEzMi40OEw1MC41NiAwSDBaIj48L3BhdGg+PHBhdGggZmlsbD0iIzM1NDk1RSIgZD0iTTUwLjU2IDBMMTI4IDEzMy4xMkwyMDQuOCAwaC00Ny4zNkwxMjggNTEuMkw5Ny45MiAwSDUwLjU2WiI+PC9wYXRoPjwvc3ZnPg==\"\n}], [\"src/AuthCallback.vue\", {\n \"type\": \"base64\",\n \"body\": \"PHNjcmlwdCBzZXR1cCBsYW5nPSJ0cyI+CmltcG9ydCB7IG9uTW91bnRlZCwgcmVmIH0gZnJvbSAidnVlIjsKaW1wb3J0IHsgYXV0aCB9IGZyb20gIi4vY2xpZW50IjsKaW1wb3J0IHsgdXNlUm91dGVyIH0gZnJvbSAidnVlLXJvdXRlciI7Cgpjb25zdCByb3V0ZXIgPSB1c2VSb3V0ZXIoKTsKCmNvbnN0IGVycm9yID0gcmVmPHN0cmluZz4oKTsKCm9uTW91bnRlZCgoKSA9PiB7CiAgYXV0aAogICAgLnNpZ25JbigpCiAgICAudGhlbigoKSA9PiByb3V0ZXIucmVwbGFjZSgiLyIpKQogICAgLmNhdGNoKChlOiB1bmtub3duKSA9PiB7CiAgICAgIGVycm9yLnZhbHVlID0gKGUgYXMgRXJyb3IpLm1lc3NhZ2U7CiAgICB9KTsKfSk7Cjwvc2NyaXB0PgoKPHRlbXBsYXRlPgogIDxkaXY+e3sgZXJyb3IgIT0gbnVsbCA\\u002FIGVycm9yIDogIkF1dGhlbnRpY2F0aW5n4oCmIiB9fTwvZGl2Pgo8L3RlbXBsYXRlPgo=\"\n}], [\"src/Home.vue.hbs\", {\n type: \"raw\",\n body: `<script setup lang=\"ts\">\nimport Header from \"./components/Header.vue\";\nimport NextSteps from \"./components/NextSteps.vue\";\n{{#if osdkPackage}}\nimport Osdk from \"./components/Osdk.vue\";\n{{/if}}\n</script>\n\n<template>\n <div class=\"home\">\n <Header />\n {{#if osdkPackage}}\n <Osdk />\n {{/if}}\n <NextSteps />\n </div>\n</template>\n\n<style scoped>\n.home {\n display: flex;\n flex-direction: column;\n gap: 60px;\n width: 800px;\n}\n</style>\n`\n}], [\"src/client.ts.hbs\", {\n type: \"raw\",\n body: `{{#if osdkPackage}}\nimport { createClient, type Client } from \"@osdk/client\";\n{{else}}\nimport { createPlatformClient, type PlatformClient } from \"@osdk/client\";\n{{/if}}\nimport { createPublicOauthClient, type PublicOauthClient } from \"@osdk/oauth\";\n\nfunction getMetaTagContent(tagName: string): string {\n const elements = document.querySelectorAll(\\`meta[name=\"\\${tagName}\"]\\`);\n const element = elements.item(elements.length - 1);\n const value = element ? element.getAttribute(\"content\") : null;\n if (value == null || value === \"\") {\n throw new Error(\\`Meta tag \\${tagName} not found or empty\\`);\n }\n if (value.match(/%.+%/)) {\n throw new Error(\n \\`Meta tag \\${tagName} contains placeholder value. Please add \\${value.replace(\n /%/g,\n \"\"\n )} to your .env files\\`\n );\n }\n return value;\n}\n\nconst foundryUrl = getMetaTagContent(\"osdk-foundryUrl\");\nconst clientId = getMetaTagContent(\"osdk-clientId\");\nconst redirectUrl = getMetaTagContent(\"osdk-redirectUrl\");\n{{#if osdkPackage}}\nconst ontologyRid = getMetaTagContent(\"osdk-ontologyRid\");\n{{/if}}\n\n{{#if scopes}}\nconst scopes = [\n {{#each scopes}}\n \"{{this}}\",\n {{/each}}\n];\n{{/if}}\n\nexport const auth: PublicOauthClient = createPublicOauthClient(\n clientId,\n foundryUrl,\n redirectUrl,\n {{#if scopes}}\n { scopes }\n {{/if}}\n);\n\n{{#if osdkPackage}}\n/**\n * Initialize the client to interact with the Ontology and Platform SDKs\n */\nconst client: Client = createClient(foundryUrl, ontologyRid, auth);\n{{else}}\n/**\n * Initialize the client to interact with the Platform SDK\n */\nconst client: PlatformClient = createPlatformClient(foundryUrl, auth);\n{{/if}}\n\nexport default client;\n`\n}], [\"src/components/Header.vue\", {\n \"type\": \"base64\",\n \"body\": \"PHNjcmlwdCBzZXR1cCBsYW5nPSJ0cyI+PC9zY3JpcHQ+Cgo8dGVtcGxhdGU+CiAgPGRpdiBjbGFzcz0iaGVhZGVyIj4KICAgIDxkaXYgY2xhc3M9ImxvZ29zIj4KICAgICAgPGEKICAgICAgICBocmVmPSJodHRwczovL3d3dy5wYWxhbnRpci5jb20vZG9jcy9mb3VuZHJ5L29udG9sb2d5LXNkay9vdmVydmlldy8iCiAgICAgICAgdGFyZ2V0PSJfYmxhbmsiCiAgICAgICAgcmVsPSJub3JlZmVycmVyIgogICAgICA+CiAgICAgICAgPGltZyBzcmM9Ii9wYWxhbnRpci5zdmciIGNsYXNzPSJsb2dvIiBhbHQ9IlBhbGFudGlyIGxvZ28iIC8+CiAgICAgIDwvYT4KICAgICAgPGEgaHJlZj0iaHR0cHM6Ly9yZWFjdC5kZXYiIHRhcmdldD0iX2JsYW5rIiByZWw9Im5vcmVmZXJyZXIiPgogICAgICAgIDxpbWcgc3JjPSIvdnVlLnN2ZyIgY2xhc3M9ImxvZ28iIGFsdD0iUmVhY3QgbG9nbyIgLz4KICAgICAgPC9hPgogICAgPC9kaXY+CiAgICA8aDIgY2xhc3M9ImhlYWRpbmciPkJ1aWxkIHlvdXIgUmVhY3QgYXBwbGljYXRpb24gd2l0aCBGb3VuZHJ5ITwvaDI+CiAgPC9kaXY+CjwvdGVtcGxhdGU+Cgo8c3R5bGUgc2NvcGVkPgouaGVhZGVyIHsKICBhbGlnbi1pdGVtczogY2VudGVyOwogIGRpc3BsYXk6IGZsZXg7CiAgZmxleC1kaXJlY3Rpb246IGNvbHVtbjsKICBnYXA6IDQwcHg7Cn0KCi5sb2dvcyB7CiAgZGlzcGxheTogZmxleDsKICBnYXA6IDMycHg7Cn0KCi5sb2dvIHsKICBoZWlnaHQ6IDQ4cHg7CiAgdHJhbnNpdGlvbjogZmlsdGVyIDMwMG1zOwogIHdpbGwtY2hhbmdlOiBmaWx0ZXI7Cn0KCi5sb2dvOmhvdmVyIHsKICBmaWx0ZXI6IGRyb3Atc2hhZG93KDAgMCAyZW0gIzY0NmNmZmFhKTsKfQo8L3N0eWxlPgo=\"\n}], [\"src/components/NextSteps.vue.hbs\", {\n type: \"raw\",\n body: `<script setup lang=\"ts\">\ninterface INextStep {\n icon: string;\n title: string;\n subtitle: string;\n}\n\nconst STEPS: INextStep[] = [\n {{^if osdkPackage}}\n {\n icon: \"cube\",\n title: \"Configure your Ontology and Platform SDKs\",\n subtitle:\n \"Use the Ontology SDK to interact with your Ontology and the Platform SDK to access Foundry APIs. Configure your SDKs from the <strong>Ontology SDK</strong> and <strong>Platform SDK</strong> tabs in Developer Console.\",\n },\n {{/if}}\n {{^if applicationUrl}}\n {\n icon: \"cloud\",\n title: \"Request a subdomain to host your application with Foundry\",\n subtitle:\n 'Register a subdomain for your website on the <strong>Website hosting</strong> tab in Developer Console. Then, add this subdomain to your redirect URLs on the <strong>OAuth & scopes</strong> tab and update your <code class=\"code\">.env.production</code> file.',\n },\n {{/if}}\n {\n icon: \"tag\",\n title: \"Deploy your application\",\n subtitle:\n 'To deploy a new version of your application, tag a new version of your repository or use the command line to run <code class=\"code\">npx @osdk/cli@latest site deploy</code>. <a href=\"https://www.npmjs.com/package/@osdk/cli\" class=\"learn-more\" target=\"_blank\" rel=\"noreferrer\">Learn more.</a>',\n },\n];\n</script>\n\n<template>\n <div class=\"next-steps\">\n <h5 class=\"next-steps-header\">Next steps</h5>\n <div v-for=\"step in STEPS\" :key=\"step.title\" class=\"next-step\">\n <img :src=\"\\`/\\${step.icon}.svg\\`\" class=\"icon\" :alt=\"step.icon\" />\n <div class=\"next-step-content\">\n <h6 class=\"title\">\\\\{{ step.title }}</h6>\n <div class=\"subtitle\" v-html=\"step.subtitle\" />\n </div>\n </div>\n </div>\n</template>\n\n<style scoped>\n.next-steps {\n display: flex;\n flex-direction: column;\n gap: 20px;\n}\n\n.next-steps-header {\n align-self: baseline;\n font-size: 16px;\n font-weight: 600;\n}\n\n.next-step {\n border: 1px solid #11141826;\n border-radius: 4px;\n display: flex;\n gap: 15px;\n padding: 16px;\n}\n\n.next-step-content {\n display: flex;\n flex-direction: column;\n gap: 4px;\n text-align: left;\n}\n\n.icon {\n height: 34px;\n}\n\n.title {\n font-weight: 600;\n}\n\n.subtitle {\n color: #5f6b7c;\n line-height: 20px;\n}\n\n.subtitle :deep(.code) {\n background: #8f99a826;\n padding: 2px;\n white-space: nowrap;\n border-radius: 2px;\n}\n\n.subtitle :deep(.learn-more) {\n color: #215db0;\n text-decoration: none;\n}\n\n.subtitle :deep(.learn-more:hover) {\n text-decoration: underline;\n}\n</style>\n`\n}], [\"src/components/Osdk.vue.osdk.hbs\", {\n type: \"raw\",\n body: `<script setup lang=\"ts\"></script>\n\n<template>\n <div class=\"osdk\">\n <div>\n <span>OSDK: </span>\n <span class=\"tag\">{{osdkPackage}}</span>\n </div>\n <a\n href=\"{{foundryUrl}}/workspace/developer-console/app/{{application}}/docs/guide/loading-data?language=typescript\"\n class=\"docs\"\n target=\"_blank\"\n rel=\"noreferrer\"\n >\n <img src=\"/book.svg\" width=\"16\" height=\"16\" alt=\"Book icon\" />\n <span>View documentation</span>\n </a>\n </div>\n</template>\n\n<style scoped>\n.osdk {\n align-self: baseline;\n display: flex;\n justify-content: space-between;\n width: 800px;\n}\n\n.tag {\n border: 1px solid #11141826;\n border-radius: 2px;\n padding: 2px 4px;\n}\n\n.docs {\n align-items: center;\n border-radius: 2px;\n color: #1c2127;\n display: flex;\n gap: 8px;\n height: 30px;\n justify-content: center;\n padding: 0 5px;\n text-decoration: none;\n}\n\n.docs:hover {\n background: #8f99a826;\n}\n</style>\n`\n}], [\"src/env.test.ts\", {\n \"type\": \"base64\",\n \"body\": \"aW1wb3J0IHsgbG9hZEVudiB9IGZyb20gInZpdGUiO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LmVudi5CQVNFX1VSTCksCiAgcm91dGVzOiBbCiAgICB7CiAgICAgIHBhdGg6ICIvIiwKICAgICAgY29tcG9uZW50OiBIb21lLAogICAgfSwKICAgIHsKICAgICAgLy8gVGhpcyBpcyB0aGUgcm91dGUgZGVmaW5lZCBpbiB5b3VyIGFwcGxpY2F0aW9uJ3MgcmVkaXJlY3QgVVJMCiAgICAgIHBhdGg6ICIvYXV0aC9jYWxsYmFjayIsCiAgICAgIGNvbXBvbmVudDogQXV0aENhbGxiYWNrLAogICAgfSwKICBdLAp9KTsK\"\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(({ mode }) => { \n return {\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 define: {\n \"process.env.NODE_ENV\": JSON.stringify(mode),\n },\n };\n});\n`\n}]]);"]}
|
package/build/esm/index.js
CHANGED
|
@@ -309,7 +309,7 @@ var TEMPLATES = [
|
|
|
309
309
|
hidden: false,
|
|
310
310
|
files: {
|
|
311
311
|
"1.x": getPackageFiles(import('./esm-RRX43VDZ.js')),
|
|
312
|
-
"2.x": getPackageFiles(import('./esm-
|
|
312
|
+
"2.x": getPackageFiles(import('./esm-BQBXTION.js'))
|
|
313
313
|
}
|
|
314
314
|
},
|
|
315
315
|
// Expo
|
|
@@ -320,7 +320,7 @@ var TEMPLATES = [
|
|
|
320
320
|
buildDirectory: "./dist",
|
|
321
321
|
hidden: false,
|
|
322
322
|
files: {
|
|
323
|
-
"2.x": getPackageFiles(import('./esm-
|
|
323
|
+
"2.x": getPackageFiles(import('./esm-DRNISRMJ.js'))
|
|
324
324
|
}
|
|
325
325
|
},
|
|
326
326
|
// Vue
|
|
@@ -332,7 +332,7 @@ var TEMPLATES = [
|
|
|
332
332
|
hidden: false,
|
|
333
333
|
files: {
|
|
334
334
|
"1.x": getPackageFiles(import('./esm-BPDOE2XQ.js')),
|
|
335
|
-
"2.x": getPackageFiles(import('./esm-
|
|
335
|
+
"2.x": getPackageFiles(import('./esm-UNJLX2G5.js'))
|
|
336
336
|
}
|
|
337
337
|
},
|
|
338
338
|
// Tutorial: To do App
|
|
@@ -522,13 +522,15 @@ function generateNpmRc({
|
|
|
522
522
|
osdkPackage,
|
|
523
523
|
osdkRegistryUrl
|
|
524
524
|
}) {
|
|
525
|
-
const osdkRegistryUrlWithTrailingSlash = osdkRegistryUrl.endsWith("/") ? osdkRegistryUrl : osdkRegistryUrl + "/";
|
|
525
|
+
const osdkRegistryUrlWithTrailingSlash = osdkRegistryUrl != null ? osdkRegistryUrl.endsWith("/") ? osdkRegistryUrl : osdkRegistryUrl + "/" : null;
|
|
526
526
|
const formattedFoundryUrl = foundryUrl.replace(/^https:\/\//, "").replace(/\/$/, "");
|
|
527
527
|
const artifactsApiUrl = formattedFoundryUrl + "/artifacts/api/";
|
|
528
|
-
const packageScope = osdkPackage
|
|
529
|
-
|
|
530
|
-
${packageScope}:registry=${osdkRegistryUrlWithTrailingSlash}
|
|
528
|
+
const packageScope = osdkPackage?.split("/")[0];
|
|
529
|
+
const credentialsLine = `//${artifactsApiUrl}:_authToken=\${FOUNDRY_TOKEN}
|
|
531
530
|
`;
|
|
531
|
+
const registryLine = packageScope != null && osdkRegistryUrlWithTrailingSlash != null ? `${packageScope}:registry=${osdkRegistryUrlWithTrailingSlash}
|
|
532
|
+
` : "";
|
|
533
|
+
return credentialsLine + registryLine;
|
|
532
534
|
}
|
|
533
535
|
|
|
534
536
|
// src/run.ts
|
|
@@ -587,7 +589,7 @@ async function run({
|
|
|
587
589
|
cwd: fileURLToPath(import.meta.url)
|
|
588
590
|
});
|
|
589
591
|
ourPackageJsonPath ? JSON.parse(fs2.readFileSync(ourPackageJsonPath, "utf-8")).version : void 0;
|
|
590
|
-
const clientVersion = "2.5.
|
|
592
|
+
const clientVersion = "2.5.6";
|
|
591
593
|
const templateContext = {
|
|
592
594
|
application,
|
|
593
595
|
applicationUrl,
|
|
@@ -636,14 +638,12 @@ async function run({
|
|
|
636
638
|
});
|
|
637
639
|
};
|
|
638
640
|
processFiles(root);
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
fs2.writeFileSync(path2.join(root, ".npmrc"), npmRc);
|
|
646
|
-
}
|
|
641
|
+
const npmRc = generateNpmRc({
|
|
642
|
+
osdkPackage,
|
|
643
|
+
osdkRegistryUrl,
|
|
644
|
+
foundryUrl
|
|
645
|
+
});
|
|
646
|
+
fs2.writeFileSync(path2.join(root, ".npmrc"), npmRc);
|
|
647
647
|
const envDevelopment = generateEnvDevelopment({
|
|
648
648
|
envPrefix: template.envPrefix,
|
|
649
649
|
foundryUrl,
|
|
@@ -685,7 +685,7 @@ async function run({
|
|
|
685
685
|
|
|
686
686
|
// src/cli.ts
|
|
687
687
|
async function cli(args = process.argv) {
|
|
688
|
-
const base = yargs(hideBin(args)).version("2.5.
|
|
688
|
+
const base = yargs(hideBin(args)).version("2.5.6").wrap(Math.min(150, yargs().terminalWidth())).strict().help().command("$0 [project] [--<option>]", "Create a new OSDK application based on framework templates. Information may be provided through options to skip interactive prompts.", (yargs2) => yargs2.positional("project", {
|
|
689
689
|
type: "string",
|
|
690
690
|
describe: "Project name to create"
|
|
691
691
|
}).option("overwrite", {
|
package/build/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/consola.ts","../../src/highlight.ts","../../src/prompts/promptApplicationRid.ts","../../src/prompts/promptApplicationUrl.ts","../../src/prompts/promptClientId.ts","../../src/prompts/promptCorsProxy.ts","../../src/prompts/promptFoundryUrl.ts","../../src/prompts/promptOntologyAndOsdkPackageAndOsdkRegistryUrl.ts","../../src/prompts/promptOverwrite.ts","../../src/prompts/promptProject.ts","../../src/prompts/promptScopes.ts","../../src/prompts/promptSdkVersion.ts","../../src/getPackageFiles.ts","../../src/generatedNoCheck/templates.ts","../../src/prompts/promptTemplate.ts","../../../generator-utils/build/esm/changeVersionPrefix.js","../../../../node_modules/.pnpm/tiny-invariant@1.3.3/node_modules/tiny-invariant/dist/esm/tiny-invariant.js","../../src/generate/generateEnv.ts","../../src/generate/generateFoundryConfigJson.ts","../../src/generate/generateNpmRc.ts","../../src/run.ts","../../src/cli.ts"],"names":["defaultConsola","fs","path","sdkVersion","template","yargs"],"mappings":";;;;;;;;;;;AAmBA,IAAM,YAAA,GAAe,MAAO,CAAA,GAAA,CAAI,QAAQ,CAAA;AACjC,IAAM,UAAU,aAAc,CAAA;AAAA,EACnC,MAAM,MAAO,CAAA,OAAA,EAAS,IAAM,EAAA;AAC1B,IAAA,MAAM,QAAW,GAAA,MAAMA,SAAe,CAAA,MAAA,CAAO,OAAS,EAAA;AAAA,MACpD,GAAG,IAAA;AAAA,MACH,MAAA,EAAQ,MAAM,MAAU,IAAA;AAAA,KACzB,CAAA;AACD,IAAA,IAAI,aAAa,YAAc,EAAA;AAC7B,MAAAA,SAAA,CAAe,KAAK,qBAAqB,CAAA;AACzC,MAAA,OAAA,CAAQ,KAAK,CAAC,CAAA;AAAA;AAEhB,IAAO,OAAA,QAAA;AAAA;AAEX,CAAC,CAAA;ACfM,SAAS,MAAM,IAAM,EAAA;AAC1B,EAAO,OAAA,QAAA,CAAS,SAAS,IAAI,CAAA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AAAA,IACH;AAAA,GACD,CAAA;AACD,EAAM,MAAA,SAAA,GAAY,MAAM,eAAA,CAAgB,MAAM,CAAA;AAC9C,EAAM,MAAA,MAAA,GAAS,MAAM,YAAA,CAAa,MAAM,CAAA;AACxC,EAAA,MAAM,GAAI,CAAA;AAAA,IACR,OAAA;AAAA,IACA,SAAA;AAAA,IACA,QAAA;AAAA,IACA,UAAA;AAAA,IACA,UAAA;AAAA,IACA,cAAA;AAAA,IACA,WAAA;AAAA,IACA,QAAA;AAAA,IACA,WAAA;AAAA,IACA,eAAA;AAAA,IACA,SAAA;AAAA,IACA,MAAA;AAAA,IACA;AAAA,GACD,CAAA;AACH","file":"index.js","sourcesContent":["/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { consola as defaultConsola, createConsola } from \"consola\";\n\n// https://github.com/unjs/consola?tab=readme-ov-file#await-promptmessage--type-cancel-\nconst cancelSymbol = Symbol.for(\"cancel\");\nexport const consola = createConsola({\n async prompt(message, opts) {\n const response = await defaultConsola.prompt(message, {\n ...opts,\n cancel: opts?.cancel ?? \"symbol\"\n });\n if (response === cancelSymbol) {\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 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 promptOntologyAndOsdkPackageAndOsdkRegistryUrl({\n ontology,\n osdkPackage,\n osdkRegistryUrl,\n skipOsdk,\n sdkVersion\n}) {\n if (skipOsdk) {\n return {};\n }\n if (sdkVersion !== \"1.x\" && osdkPackage == null && ontology == null && osdkRegistryUrl == null) {\n const skip = await consola.prompt(\"Will you be using an OSDK in your application?\", {\n type: \"select\",\n options: [{\n label: \"Yes, I will be using an OSDK\",\n value: \"yes\"\n }, {\n label: \"No, I will only be using Platform APIs\",\n value: \"no\"\n }]\n });\n if (skip === \"no\") {\n return {};\n }\n }\n while (ontology == null || !/^ri\\.ontology\\.[^.]+\\.ontology\\.[^.]+$/.test(ontology)) {\n if (ontology != null) {\n consola.fail(\"Please enter a valid Ontology resource identifier (rid)\");\n }\n ontology = await consola.prompt(`Enter the Ontology resource identifier (rid) associated with your Developer Console:\\n${italic(\"(Example: ri.ontology.main.ontology.1df1ce4c-f9d2-0f78-a316-287f6ac80bb2)\")}`, {\n type: \"text\"\n });\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 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 {\n ontology,\n osdkPackage,\n osdkRegistryUrl: osdkRegistryUrl.replace(/\\/$/, \"\")\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 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 switch (result) {\n case \"overwrite\":\n return true;\n case \"ignore\":\n return false;\n case \"cancel\":\n consola.fail(\"Operation cancelled\");\n process.exit(0);\n }\n}","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { consola } from \"../consola.js\";\nexport async function promptProject({\n project\n}) {\n while (project == null || !/^[a-zA-Z0-9-_]+$/.test(project)) {\n if (project != null) {\n consola.fail(\"Project name can only contain alphanumeric characters, hyphens and underscores\");\n }\n project = await consola.prompt(\"Project name:\", {\n type: \"text\",\n placeholder: \"my-osdk-app\",\n default: \"my-osdk-app\"\n });\n }\n return project;\n}","/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { consola } from \"../consola.js\";\nconst scopeNameRegex = /^[a-zA-Z-_:]+$/;\nexport async function promptScopes({\n scopes\n}) {\n while (true) {\n if (scopes != null) {\n const invalidScopes = scopes.filter(scope => !scopeNameRegex.test(scope));\n const allValidScopes = invalidScopes.length === 0;\n if (allValidScopes) {\n break;\n }\n const joinedInvalidScopes = invalidScopes.join(\", \");\n consola.fail(`Scopes [ ${joinedInvalidScopes} ] are invalid. Scope names can only contain letters, hyphens, underscores, and colons`);\n }\n const stringScopes = await consola.prompt(\"Enter the scopes to request during OAuth:\", {\n type: \"text\",\n placeholder: \"api:read-data api:write-data api:use-ontologies-read api:use-ontologies-write\",\n default: \"api:read-data api:write-data api:use-ontologies-read api:use-ontologies-write\"\n });\n scopes = stringScopes.split(\" \");\n }\n return deduplicateScopes(scopes);\n}\n\n// Preserving the originally specified scope order\nfunction deduplicateScopes(scopes) {\n const dedupedScopes = [];\n const seen = new Set();\n for (const scope of scopes) {\n if (seen.has(scope)) {\n continue;\n }\n dedupedScopes.push(scope);\n seen.add(scope);\n }\n return dedupedScopes;\n}","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { consola } from \"../consola.js\";\nexport async function promptSdkVersion({\n sdkVersion,\n template\n}) {\n if (sdkVersion == null) {\n // If the SDK version is not provided, default to the earliest template version for backwards-compatibility\n return Object.keys(template.files)[0];\n }\n if (template.files[sdkVersion] == null) {\n consola.fail(`The ${template.label} template does not support a \"${sdkVersion}\" SDK version.`);\n sdkVersion = await consola.prompt(`Please choose which version of the OSDK you'd like to use for the ${template.label} template:`, {\n type: \"select\",\n options: Object.keys(template.files).reverse().map(sdkVersion => ({\n label: sdkVersion,\n value: sdkVersion\n }))\n });\n }\n return sdkVersion;\n}","/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport const getPackageFiles = importPromise => async () => (await importPromise).files;","// THIS FILE IS GENERATED. DO NOT MODIFY.\n// You probably want to modify ../../../codegen.mjs instead.\n\nimport { getPackageFiles } from \"../getPackageFiles.js\";\nexport const TEMPLATES = [\n// React\n{\n id: \"template-react\",\n label: \"React\",\n envPrefix: \"VITE_\",\n buildDirectory: \"./dist\",\n hidden: false,\n files: {\n \"1.x\": getPackageFiles(import(\"@osdk/create-app.template.react\")),\n \"2.x\": getPackageFiles(import(\"@osdk/create-app.template.react.beta\"))\n }\n},\n// Expo\n{\n id: \"template-expo\",\n label: \"Expo\",\n envPrefix: \"EXPO_PUBLIC_\",\n buildDirectory: \"./dist\",\n hidden: false,\n files: {\n \"2.x\": getPackageFiles(import(\"@osdk/create-app.template.expo.v2\"))\n }\n},\n// Vue\n{\n id: \"template-vue\",\n label: \"Vue\",\n envPrefix: \"VITE_\",\n buildDirectory: \"./dist\",\n hidden: false,\n files: {\n \"1.x\": getPackageFiles(import(\"@osdk/create-app.template.vue\")),\n \"2.x\": getPackageFiles(import(\"@osdk/create-app.template.vue.v2\"))\n }\n},\n// Tutorial: To do App\n{\n id: \"template-tutorial-todo-app\",\n label: \"Tutorial: To do App\",\n envPrefix: \"VITE_\",\n buildDirectory: \"./dist\",\n hidden: true,\n files: {\n \"1.x\": getPackageFiles(import(\"@osdk/create-app.template.tutorial-todo-app\")),\n \"2.x\": getPackageFiles(import(\"@osdk/create-app.template.tutorial-todo-app.beta\"))\n }\n},\n// Tutorial: To do AIP App\n{\n id: \"template-tutorial-todo-aip-app\",\n label: \"Tutorial: To do AIP App\",\n envPrefix: \"VITE_\",\n buildDirectory: \"./dist\",\n hidden: true,\n files: {\n \"1.x\": getPackageFiles(import(\"@osdk/create-app.template.tutorial-todo-aip-app\")),\n \"2.x\": getPackageFiles(import(\"@osdk/create-app.template.tutorial-todo-aip-app.beta\"))\n }\n}];","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { consola } from \"../consola.js\";\nimport { TEMPLATES } from \"../generatedNoCheck/templates.js\";\nimport { green } from \"../highlight.js\";\nexport async function promptTemplate(parsed) {\n const useBeta = parsed.beta ?? false;\n let template = TEMPLATES.find(t => t.id === parsed.template || t.id === `template-${parsed.template}`);\n if (template == null) {\n const availableTemplates = getAvailableTemplatesOrThrow(useBeta);\n const templateId = await consola.prompt(parsed.template != null ? `The provided template ${green(parsed.template)} is invalid please select a framework:` : \"Select a framework:\", {\n type: \"select\",\n options: availableTemplates.map(template => ({\n value: template.id,\n label: template.label\n }))\n });\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\n/** Exported for testing only */\nexport function getAvailableTemplatesOrThrow(useBeta) {\n const availableTemplates = TEMPLATES.filter(template => !template.hidden && (useBeta ? template.isBeta === true\n // isBeta could be null\n : !template.isBeta));\n if (availableTemplates.length === 0) {\n throw new Error(\"No available templates found for the selected options.\");\n }\n return availableTemplates;\n}","/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport function changeVersionPrefix(version, prefix) {\n const isWorkspaceProtocol = version.startsWith(\"workspace:\");\n if (isWorkspaceProtocol) {\n version = version.slice(\"workspace:\".length);\n }\n if (version[0] === \"^\" || version[0] === \"~\" || version[0] === \"*\") {\n version = version.slice(1);\n }\n return `${isWorkspaceProtocol ? \"workspace:\" : \"\"}${prefix}${version}`;\n}","var isProduction = process.env.NODE_ENV === 'production';\nvar prefix = 'Invariant failed';\nfunction invariant(condition, message) {\n if (condition) {\n return;\n }\n if (isProduction) {\n throw new Error(prefix);\n }\n var provided = typeof message === 'function' ? message() : message;\n var value = provided ? \"\".concat(prefix, \": \").concat(provided) : prefix;\n throw new Error(value);\n}\nexport { invariant as default };","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport function generateEnvDevelopment({\n envPrefix,\n foundryUrl,\n clientId,\n corsProxy,\n ontology\n}) {\n const foundryApiUrl = corsProxy ? \"http://localhost:8080\" : foundryUrl;\n const applicationUrl = \"http://localhost:8080\";\n const ontologyEnvSection = ontology != null ? `\n\n# This Ontology RID must match the Ontology RID your Developer Console is associated with.\n# You can check the Ontology on the \"Ontology SDK\" tab of Developer Console.\n# It typically does not need to be changed.\n\n${envPrefix}FOUNDRY_ONTOLOGY_RID=${ontology}\n` : \"\";\n return `# This env file is intended for developing on your local computer.\n# To set up development in Foundry's Code Workspaces, see .env.code-workspaces.\n# To deploy your application to production, see .env.production.\n# Note that .env.code-workspaces is only present for projects that were set up\n# using the \"Bootstrap in Foundry\" option in Developer Console.\n\n\n# This URL is the URL your users will be redirected back to after signing in.\n# This URL must exactly match one of the URLs listed in the \"OAuth & scopes\"\n# page of Developer Console.\n#\n# If your application in development is not hosted on port 8080, you will need\n# to change this URL here and in Developer Console.\n\n${envPrefix}FOUNDRY_REDIRECT_URL=${applicationUrl}/auth/callback\n\n\n# This URL is the Foundry host that your OSDK will use. It typically does not\n# need to be changed.\n\n${envPrefix}FOUNDRY_API_URL=${foundryApiUrl}\n\n\n# This client ID must match the client ID given on the \"OAuth & scopes\" page of\n# Developer Console. It typically does not need to be changed.\n\n${envPrefix}FOUNDRY_CLIENT_ID=${clientId}\n${ontologyEnvSection}`;\n}\nexport function generateEnvProduction({\n envPrefix,\n foundryUrl,\n applicationUrl,\n clientId,\n ontology\n}) {\n const applicationUrlOrDefault = applicationUrl ?? \"<Fill in the domain at which you deploy your application>\";\n const ontologyEnvSection = ontology != null ? `\n\n# This Ontology RID must match the Ontology RID your Developer Console is associated with.\n# You can check the Ontology on the \"Ontology SDK\" tab of Developer Console.\n# It typically does not need to be changed.\n\n${envPrefix}FOUNDRY_ONTOLOGY_RID=${ontology}\n` : \"\";\n return `# This env file is intended for deploying your application to production.\n# To set up development on your local computer, see .env.development.\n# To set up development in Foundry's Code Workspaces, see .env.code-workspaces.\n# Note that .env.code-workspaces is only present for projects that were set up\n# using the \"Bootstrap in Foundry\" option in Developer Console.\n\n\n# This URL is the URL your users will be redirected back to after signing in.\n# This URL must exactly match one of the URLs listed in the \"OAuth & scopes\"\n# page of Developer Console.\n#\n# If you change where your application is hosted, you will need to change this\n# URL here and in Developer Console.\n\n${applicationUrl == null ? \"# \" : \"\"}${envPrefix}FOUNDRY_REDIRECT_URL=${applicationUrlOrDefault}/auth/callback\n\n\n# This URL is the Foundry host that your OSDK will use. It typically does not\n# need to be changed.\n\n${envPrefix}FOUNDRY_API_URL=${foundryUrl}\n\n\n# This client ID must match the client ID given on the \"OAuth & scopes\" page of\n# Developer Console. It typically does not need to be changed.\n\n${envPrefix}FOUNDRY_CLIENT_ID=${clientId}\n${ontologyEnvSection}`;\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 foundryUrl,\n osdkPackage,\n osdkRegistryUrl\n}) {\n // pnpm requires a trailing slash in .npmrc\n // https://github.com/pnpm/pnpm/issues/5941\n const osdkRegistryUrlWithTrailingSlash = osdkRegistryUrl.endsWith(\"/\") ? osdkRegistryUrl : osdkRegistryUrl + \"/\";\n const formattedFoundryUrl = foundryUrl.replace(/^https:\\/\\//, \"\").replace(/\\/$/, \"\");\n const artifactsApiUrl = formattedFoundryUrl + \"/artifacts/api/\";\n const packageScope = osdkPackage.split(\"/\")[0];\n return `//${artifactsApiUrl}:_authToken=\\${FOUNDRY_TOKEN}\\n` + `${packageScope}:registry=${osdkRegistryUrlWithTrailingSlash}\\n`;\n}","/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { changeVersionPrefix } from \"@osdk/generator-utils\";\nimport { findUpSync } from \"find-up\";\nimport Handlebars from \"handlebars\";\nimport fs from \"node:fs\";\nimport path from \"node:path\";\nimport { fileURLToPath } from \"node:url\";\nimport { consola } from \"./consola.js\";\nimport { generateEnvDevelopment, generateEnvProduction } from \"./generate/generateEnv.js\";\nimport { generateFoundryConfigJson } from \"./generate/generateFoundryConfigJson.js\";\nimport { generateNpmRc } from \"./generate/generateNpmRc.js\";\nimport { green } from \"./highlight.js\";\nexport async function run({\n project,\n overwrite,\n template,\n sdkVersion,\n foundryUrl,\n applicationUrl,\n application,\n ontology,\n clientId,\n osdkPackage,\n osdkRegistryUrl,\n corsProxy,\n scopes\n}) {\n consola.log(\"\");\n consola.start(`Creating project ${green(project)} using template ${green(template.id)}`);\n const cwd = process.cwd();\n const root = path.join(cwd, project);\n if (fs.existsSync(root)) {\n if (overwrite) {\n consola.info(`Overwriting existing project directory`);\n fs.rmSync(root, {\n recursive: true,\n force: true\n });\n fs.mkdirSync(root, {\n recursive: true\n });\n } else {\n consola.info(`Reusing existing project directory`);\n }\n } else {\n consola.info(`Creating project directory`);\n fs.mkdirSync(root, {\n recursive: true\n });\n }\n consola.info(`Copying files into project directory`);\n if (template.files[sdkVersion] == null) {\n throw new Error(`The ${template.label} template does not support a \"${sdkVersion}\" SDK version.`);\n }\n const files = await template.files[sdkVersion]();\n for (const [filePath, contents] of files) {\n const finalPath = path.join(root, filePath);\n const dirPath = path.dirname(finalPath);\n await fs.promises.mkdir(dirPath, {\n recursive: true\n });\n await fs.promises.writeFile(finalPath, Buffer.from(contents.body, contents.type === \"raw\" ? \"utf-8\" : \"base64\"));\n }\n const ourPackageJsonPath = findUpSync(\"package.json\", {\n cwd: fileURLToPath(import.meta.url)\n });\n const ourPackageJsonVersion = ourPackageJsonPath ? JSON.parse(fs.readFileSync(ourPackageJsonPath, \"utf-8\")).version : undefined;\n const clientVersion = process.env.PACKAGE_CLIENT_VERSION ?? ourPackageJsonVersion;\n if (clientVersion === undefined) {\n throw new Error(\"Could not determine current @osdk/client version\");\n }\n const templateContext = {\n application,\n applicationUrl,\n project,\n foundryUrl,\n osdkPackage,\n corsProxy,\n clientVersion: changeVersionPrefix(clientVersion, \"^\"),\n scopes\n };\n const processFiles = function (dir) {\n fs.readdirSync(dir).forEach(function (file) {\n let fullPath = dir + \"/\" + file;\n const stat = fs.statSync(fullPath);\n if (stat.isDirectory()) {\n processFiles(fullPath);\n return;\n }\n if (fullPath.endsWith(\"/_gitignore\")) {\n fs.renameSync(fullPath, fullPath.replace(/\\/_gitignore$/, \"/.gitignore\"));\n return;\n }\n\n // Files with the `.osdk` extension are only kept if the application uses an OSDK\n if (file.includes(\".osdk\")) {\n if (osdkPackage == null) {\n fs.rmSync(fullPath);\n return;\n } else {\n fs.renameSync(fullPath, fullPath.replace(\".osdk\", \"\"));\n fullPath = fullPath.replace(\".osdk\", \"\");\n }\n // Files with the `.psdk` extension are only kept if the application does not use an OSDK\n } else if (file.includes(\".psdk\")) {\n if (osdkPackage == null) {\n fs.renameSync(fullPath, fullPath.replace(\".psdk\", \"\"));\n fullPath = fullPath.replace(\".psdk\", \"\");\n } else {\n fs.rmSync(fullPath);\n return;\n }\n }\n if (!fullPath.endsWith(\".hbs\")) {\n return;\n }\n const templated = Handlebars.compile(fs.readFileSync(fullPath, \"utf-8\"))(templateContext);\n fs.writeFileSync(fullPath.replace(/.hbs$/, \"\"), templated);\n fs.rmSync(fullPath);\n });\n };\n processFiles(root);\n if (osdkPackage != null && osdkRegistryUrl != null) {\n const npmRc = generateNpmRc({\n osdkPackage,\n osdkRegistryUrl,\n foundryUrl\n });\n fs.writeFileSync(path.join(root, \".npmrc\"), npmRc);\n }\n const envDevelopment = generateEnvDevelopment({\n envPrefix: template.envPrefix,\n foundryUrl,\n clientId,\n corsProxy,\n ontology\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 ontology\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 { promptOntologyAndOsdkPackageAndOsdkRegistryUrl } from \"./prompts/promptOntologyAndOsdkPackageAndOsdkRegistryUrl.js\";\nimport { promptOverwrite } from \"./prompts/promptOverwrite.js\";\nimport { promptProject } from \"./prompts/promptProject.js\";\nimport { promptScopes } from \"./prompts/promptScopes.js\";\nimport { promptSdkVersion } from \"./prompts/promptSdkVersion.js\";\nimport { promptTemplate } from \"./prompts/promptTemplate.js\";\nimport { run } from \"./run.js\";\nexport async function cli(args = process.argv) {\n const base = yargs(hideBin(args)).version(process.env.PACKAGE_VERSION ?? \"\").wrap(Math.min(150, yargs().terminalWidth())).strict().help().command(\"$0 [project] [--<option>]\", \"Create a new OSDK application based on framework templates. Information may be provided through options to skip interactive prompts.\", yargs => yargs.positional(\"project\", {\n type: \"string\",\n describe: \"Project name to create\"\n }).option(\"overwrite\", {\n type: \"boolean\",\n describe: \"Overwrite project directory if already exists\"\n }).option(\"beta\", {\n type: \"boolean\",\n describe: \"Use templates compatible with the Beta version of the SDK\"\n }).option(\"template\", {\n type: \"string\",\n describe: \"Template name to use\"\n }).option(\"sdkVersion\", {\n type: \"string\",\n describe: \"The OSDK version to use\"\n }).option(\"foundryUrl\", {\n type: \"string\",\n describe: \"URL for the Foundry stack\"\n }).option(\"applicationUrl\", {\n type: \"string\",\n describe: \"URL the production application will be hosted on\",\n conflicts: \"skipApplicationUrl\"\n }).option(\"skipApplicationUrl\", {\n type: \"boolean\",\n describe: \"Skip filling in URL the production application will be hosted on\"\n }).option(\"application\", {\n type: \"string\",\n describe: \"Application resource identifier (rid)\"\n }).option(\"ontology\", {\n type: \"string\",\n describe: \"Ontology resource identifier (rid)\",\n conflicts: \"skipOsdk\"\n }).option(\"osdkPackage\", {\n type: \"string\",\n describe: \"OSDK package name for application\",\n conflicts: \"skipOsdk\"\n }).option(\"skipOsdk\", {\n type: \"boolean\",\n describe: \"Skip filling in OSDK options\"\n }).option(\"clientId\", {\n type: \"string\",\n describe: \"OAuth client ID for application\"\n }).option(\"osdkRegistryUrl\", {\n type: \"string\",\n describe: \"URL for NPM registry to install OSDK package\"\n }).option(\"corsProxy\", {\n type: \"boolean\",\n describe: \"Include a CORS proxy for Foundry API requests during local development\"\n }).option(\"scopes\", {\n type: \"string\",\n array: true,\n describe: \"List of client-side scopes to be used when creating a client\"\n }).check(argv => {\n if (argv.skipOsdk && (argv.sdkVersion == null || argv.sdkVersion.startsWith(\"1.\"))) {\n throw new Error(\"The --skipOsdk flag is only allowed when sdkVersion is 2.x. Please set --sdkVersion to 2.x or remove the --skipOsdk flag.\");\n }\n return true;\n }));\n const parsed = base.parseSync();\n const project = await promptProject(parsed);\n const overwrite = await promptOverwrite({\n ...parsed,\n project\n });\n const template = await promptTemplate(parsed);\n const sdkVersion = await promptSdkVersion({\n ...parsed,\n template\n });\n const foundryUrl = await promptFoundryUrl(parsed);\n const applicationUrl = await promptApplicationUrl(parsed);\n const application = await promptApplicationRid(parsed);\n const clientId = await promptClientId(parsed);\n const {\n osdkPackage,\n ontology,\n osdkRegistryUrl\n } = await promptOntologyAndOsdkPackageAndOsdkRegistryUrl({\n ...parsed,\n sdkVersion\n });\n const corsProxy = await promptCorsProxy(parsed);\n const scopes = await promptScopes(parsed);\n await run({\n project,\n overwrite,\n template,\n sdkVersion,\n foundryUrl,\n applicationUrl,\n application,\n clientId,\n osdkPackage,\n osdkRegistryUrl,\n corsProxy,\n scopes,\n ontology\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/promptOntologyAndOsdkPackageAndOsdkRegistryUrl.ts","../../src/prompts/promptOverwrite.ts","../../src/prompts/promptProject.ts","../../src/prompts/promptScopes.ts","../../src/prompts/promptSdkVersion.ts","../../src/getPackageFiles.ts","../../src/generatedNoCheck/templates.ts","../../src/prompts/promptTemplate.ts","../../../generator-utils/build/esm/changeVersionPrefix.js","../../../../node_modules/.pnpm/tiny-invariant@1.3.3/node_modules/tiny-invariant/dist/esm/tiny-invariant.js","../../src/generate/generateEnv.ts","../../src/generate/generateFoundryConfigJson.ts","../../src/generate/generateNpmRc.ts","../../src/run.ts","../../src/cli.ts"],"names":["defaultConsola","fs","path","sdkVersion","template","yargs"],"mappings":";;;;;;;;;;;AAmBA,IAAM,YAAA,GAAe,MAAO,CAAA,GAAA,CAAI,QAAQ,CAAA;AACjC,IAAM,UAAU,aAAc,CAAA;AAAA,EACnC,MAAM,MAAO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IACH;AAAA,GACD,CAAA;AACD,EAAM,MAAA,QAAA,GAAW,MAAM,cAAA,CAAe,MAAM,CAAA;AAC5C,EAAM,MAAA,UAAA,GAAa,MAAM,gBAAiB,CAAA;AAAA,IACxC,GAAG,MAAA;AAAA,IACH;AAAA,GACD,CAAA;AACD,EAAM,MAAA,UAAA,GAAa,MAAM,gBAAA,CAAiB,MAAM,CAAA;AAChD,EAAM,MAAA,cAAA,GAAiB,MAAM,oBAAA,CAAqB,MAAM,CAAA;AACxD,EAAM,MAAA,WAAA,GAAc,MAAM,oBAAA,CAAqB,MAAM,CAAA;AACrD,EAAM,MAAA,QAAA,GAAW,MAAM,cAAA,CAAe,MAAM,CAAA;AAC5C,EAAM,MAAA;AAAA,IACJ,WAAA;AAAA,IACA,QAAA;AAAA,IACA;AAAA,GACF,GAAI,MAAM,8CAA+C,CAAA;AAAA,IACvD,GAAG,MAAA;AAAA,IACH;AAAA,GACD,CAAA;AACD,EAAM,MAAA,SAAA,GAAY,MAAM,eAAA,CAAgB,MAAM,CAAA;AAC9C,EAAM,MAAA,MAAA,GAAS,MAAM,YAAA,CAAa,MAAM,CAAA;AACxC,EAAA,MAAM,GAAI,CAAA;AAAA,IACR,OAAA;AAAA,IACA,SAAA;AAAA,IACA,QAAA;AAAA,IACA,UAAA;AAAA,IACA,UAAA;AAAA,IACA,cAAA;AAAA,IACA,WAAA;AAAA,IACA,QAAA;AAAA,IACA,WAAA;AAAA,IACA,eAAA;AAAA,IACA,SAAA;AAAA,IACA,MAAA;AAAA,IACA;AAAA,GACD,CAAA;AACH","file":"index.js","sourcesContent":["/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { consola as defaultConsola, createConsola } from \"consola\";\n\n// https://github.com/unjs/consola?tab=readme-ov-file#await-promptmessage--type-cancel-\nconst cancelSymbol = Symbol.for(\"cancel\");\nexport const consola = createConsola({\n async prompt(message, opts) {\n const response = await defaultConsola.prompt(message, {\n ...opts,\n cancel: opts?.cancel ?? \"symbol\"\n });\n if (response === cancelSymbol) {\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 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 promptOntologyAndOsdkPackageAndOsdkRegistryUrl({\n ontology,\n osdkPackage,\n osdkRegistryUrl,\n skipOsdk,\n sdkVersion\n}) {\n if (skipOsdk) {\n return {};\n }\n if (sdkVersion !== \"1.x\" && osdkPackage == null && ontology == null && osdkRegistryUrl == null) {\n const skip = await consola.prompt(\"Will you be using an OSDK in your application?\", {\n type: \"select\",\n options: [{\n label: \"Yes, I will be using an OSDK\",\n value: \"yes\"\n }, {\n label: \"No, I will only be using Platform APIs\",\n value: \"no\"\n }]\n });\n if (skip === \"no\") {\n return {};\n }\n }\n while (ontology == null || !/^ri\\.ontology\\.[^.]+\\.ontology\\.[^.]+$/.test(ontology)) {\n if (ontology != null) {\n consola.fail(\"Please enter a valid Ontology resource identifier (rid)\");\n }\n ontology = await consola.prompt(`Enter the Ontology resource identifier (rid) associated with your Developer Console:\\n${italic(\"(Example: ri.ontology.main.ontology.1df1ce4c-f9d2-0f78-a316-287f6ac80bb2)\")}`, {\n type: \"text\"\n });\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 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 {\n ontology,\n osdkPackage,\n osdkRegistryUrl: osdkRegistryUrl.replace(/\\/$/, \"\")\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 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 switch (result) {\n case \"overwrite\":\n return true;\n case \"ignore\":\n return false;\n case \"cancel\":\n consola.fail(\"Operation cancelled\");\n process.exit(0);\n }\n}","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { consola } from \"../consola.js\";\nexport async function promptProject({\n project\n}) {\n while (project == null || !/^[a-zA-Z0-9-_]+$/.test(project)) {\n if (project != null) {\n consola.fail(\"Project name can only contain alphanumeric characters, hyphens and underscores\");\n }\n project = await consola.prompt(\"Project name:\", {\n type: \"text\",\n placeholder: \"my-osdk-app\",\n default: \"my-osdk-app\"\n });\n }\n return project;\n}","/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { consola } from \"../consola.js\";\nconst scopeNameRegex = /^[a-zA-Z-_:]+$/;\nexport async function promptScopes({\n scopes\n}) {\n while (true) {\n if (scopes != null) {\n const invalidScopes = scopes.filter(scope => !scopeNameRegex.test(scope));\n const allValidScopes = invalidScopes.length === 0;\n if (allValidScopes) {\n break;\n }\n const joinedInvalidScopes = invalidScopes.join(\", \");\n consola.fail(`Scopes [ ${joinedInvalidScopes} ] are invalid. Scope names can only contain letters, hyphens, underscores, and colons`);\n }\n const stringScopes = await consola.prompt(\"Enter the scopes to request during OAuth:\", {\n type: \"text\",\n placeholder: \"api:read-data api:write-data api:use-ontologies-read api:use-ontologies-write\",\n default: \"api:read-data api:write-data api:use-ontologies-read api:use-ontologies-write\"\n });\n scopes = stringScopes.split(\" \");\n }\n return deduplicateScopes(scopes);\n}\n\n// Preserving the originally specified scope order\nfunction deduplicateScopes(scopes) {\n const dedupedScopes = [];\n const seen = new Set();\n for (const scope of scopes) {\n if (seen.has(scope)) {\n continue;\n }\n dedupedScopes.push(scope);\n seen.add(scope);\n }\n return dedupedScopes;\n}","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { consola } from \"../consola.js\";\nexport async function promptSdkVersion({\n sdkVersion,\n template\n}) {\n if (sdkVersion == null) {\n // If the SDK version is not provided, default to the earliest template version for backwards-compatibility\n return Object.keys(template.files)[0];\n }\n if (template.files[sdkVersion] == null) {\n consola.fail(`The ${template.label} template does not support a \"${sdkVersion}\" SDK version.`);\n sdkVersion = await consola.prompt(`Please choose which version of the OSDK you'd like to use for the ${template.label} template:`, {\n type: \"select\",\n options: Object.keys(template.files).reverse().map(sdkVersion => ({\n label: sdkVersion,\n value: sdkVersion\n }))\n });\n }\n return sdkVersion;\n}","/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport const getPackageFiles = importPromise => async () => (await importPromise).files;","// THIS FILE IS GENERATED. DO NOT MODIFY.\n// You probably want to modify ../../../codegen.mjs instead.\n\nimport { getPackageFiles } from \"../getPackageFiles.js\";\nexport const TEMPLATES = [\n// React\n{\n id: \"template-react\",\n label: \"React\",\n envPrefix: \"VITE_\",\n buildDirectory: \"./dist\",\n hidden: false,\n files: {\n \"1.x\": getPackageFiles(import(\"@osdk/create-app.template.react\")),\n \"2.x\": getPackageFiles(import(\"@osdk/create-app.template.react.beta\"))\n }\n},\n// Expo\n{\n id: \"template-expo\",\n label: \"Expo\",\n envPrefix: \"EXPO_PUBLIC_\",\n buildDirectory: \"./dist\",\n hidden: false,\n files: {\n \"2.x\": getPackageFiles(import(\"@osdk/create-app.template.expo.v2\"))\n }\n},\n// Vue\n{\n id: \"template-vue\",\n label: \"Vue\",\n envPrefix: \"VITE_\",\n buildDirectory: \"./dist\",\n hidden: false,\n files: {\n \"1.x\": getPackageFiles(import(\"@osdk/create-app.template.vue\")),\n \"2.x\": getPackageFiles(import(\"@osdk/create-app.template.vue.v2\"))\n }\n},\n// Tutorial: To do App\n{\n id: \"template-tutorial-todo-app\",\n label: \"Tutorial: To do App\",\n envPrefix: \"VITE_\",\n buildDirectory: \"./dist\",\n hidden: true,\n files: {\n \"1.x\": getPackageFiles(import(\"@osdk/create-app.template.tutorial-todo-app\")),\n \"2.x\": getPackageFiles(import(\"@osdk/create-app.template.tutorial-todo-app.beta\"))\n }\n},\n// Tutorial: To do AIP App\n{\n id: \"template-tutorial-todo-aip-app\",\n label: \"Tutorial: To do AIP App\",\n envPrefix: \"VITE_\",\n buildDirectory: \"./dist\",\n hidden: true,\n files: {\n \"1.x\": getPackageFiles(import(\"@osdk/create-app.template.tutorial-todo-aip-app\")),\n \"2.x\": getPackageFiles(import(\"@osdk/create-app.template.tutorial-todo-aip-app.beta\"))\n }\n}];","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { consola } from \"../consola.js\";\nimport { TEMPLATES } from \"../generatedNoCheck/templates.js\";\nimport { green } from \"../highlight.js\";\nexport async function promptTemplate(parsed) {\n const useBeta = parsed.beta ?? false;\n let template = TEMPLATES.find(t => t.id === parsed.template || t.id === `template-${parsed.template}`);\n if (template == null) {\n const availableTemplates = getAvailableTemplatesOrThrow(useBeta);\n const templateId = await consola.prompt(parsed.template != null ? `The provided template ${green(parsed.template)} is invalid please select a framework:` : \"Select a framework:\", {\n type: \"select\",\n options: availableTemplates.map(template => ({\n value: template.id,\n label: template.label\n }))\n });\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\n/** Exported for testing only */\nexport function getAvailableTemplatesOrThrow(useBeta) {\n const availableTemplates = TEMPLATES.filter(template => !template.hidden && (useBeta ? template.isBeta === true\n // isBeta could be null\n : !template.isBeta));\n if (availableTemplates.length === 0) {\n throw new Error(\"No available templates found for the selected options.\");\n }\n return availableTemplates;\n}","/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport function changeVersionPrefix(version, prefix) {\n const isWorkspaceProtocol = version.startsWith(\"workspace:\");\n if (isWorkspaceProtocol) {\n version = version.slice(\"workspace:\".length);\n }\n if (version[0] === \"^\" || version[0] === \"~\" || version[0] === \"*\") {\n version = version.slice(1);\n }\n return `${isWorkspaceProtocol ? \"workspace:\" : \"\"}${prefix}${version}`;\n}","var isProduction = process.env.NODE_ENV === 'production';\nvar prefix = 'Invariant failed';\nfunction invariant(condition, message) {\n if (condition) {\n return;\n }\n if (isProduction) {\n throw new Error(prefix);\n }\n var provided = typeof message === 'function' ? message() : message;\n var value = provided ? \"\".concat(prefix, \": \").concat(provided) : prefix;\n throw new Error(value);\n}\nexport { invariant as default };","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport function generateEnvDevelopment({\n envPrefix,\n foundryUrl,\n clientId,\n corsProxy,\n ontology\n}) {\n const foundryApiUrl = corsProxy ? \"http://localhost:8080\" : foundryUrl;\n const applicationUrl = \"http://localhost:8080\";\n const ontologyEnvSection = ontology != null ? `\n\n# This Ontology RID must match the Ontology RID your Developer Console is associated with.\n# You can check the Ontology on the \"Ontology SDK\" tab of Developer Console.\n# It typically does not need to be changed.\n\n${envPrefix}FOUNDRY_ONTOLOGY_RID=${ontology}\n` : \"\";\n return `# This env file is intended for developing on your local computer.\n# To set up development in Foundry's Code Workspaces, see .env.code-workspaces.\n# To deploy your application to production, see .env.production.\n# Note that .env.code-workspaces is only present for projects that were set up\n# using the \"Bootstrap in Foundry\" option in Developer Console.\n\n\n# This URL is the URL your users will be redirected back to after signing in.\n# This URL must exactly match one of the URLs listed in the \"OAuth & scopes\"\n# page of Developer Console.\n#\n# If your application in development is not hosted on port 8080, you will need\n# to change this URL here and in Developer Console.\n\n${envPrefix}FOUNDRY_REDIRECT_URL=${applicationUrl}/auth/callback\n\n\n# This URL is the Foundry host that your OSDK will use. It typically does not\n# need to be changed.\n\n${envPrefix}FOUNDRY_API_URL=${foundryApiUrl}\n\n\n# This client ID must match the client ID given on the \"OAuth & scopes\" page of\n# Developer Console. It typically does not need to be changed.\n\n${envPrefix}FOUNDRY_CLIENT_ID=${clientId}\n${ontologyEnvSection}`;\n}\nexport function generateEnvProduction({\n envPrefix,\n foundryUrl,\n applicationUrl,\n clientId,\n ontology\n}) {\n const applicationUrlOrDefault = applicationUrl ?? \"<Fill in the domain at which you deploy your application>\";\n const ontologyEnvSection = ontology != null ? `\n\n# This Ontology RID must match the Ontology RID your Developer Console is associated with.\n# You can check the Ontology on the \"Ontology SDK\" tab of Developer Console.\n# It typically does not need to be changed.\n\n${envPrefix}FOUNDRY_ONTOLOGY_RID=${ontology}\n` : \"\";\n return `# This env file is intended for deploying your application to production.\n# To set up development on your local computer, see .env.development.\n# To set up development in Foundry's Code Workspaces, see .env.code-workspaces.\n# Note that .env.code-workspaces is only present for projects that were set up\n# using the \"Bootstrap in Foundry\" option in Developer Console.\n\n\n# This URL is the URL your users will be redirected back to after signing in.\n# This URL must exactly match one of the URLs listed in the \"OAuth & scopes\"\n# page of Developer Console.\n#\n# If you change where your application is hosted, you will need to change this\n# URL here and in Developer Console.\n\n${applicationUrl == null ? \"# \" : \"\"}${envPrefix}FOUNDRY_REDIRECT_URL=${applicationUrlOrDefault}/auth/callback\n\n\n# This URL is the Foundry host that your OSDK will use. It typically does not\n# need to be changed.\n\n${envPrefix}FOUNDRY_API_URL=${foundryUrl}\n\n\n# This client ID must match the client ID given on the \"OAuth & scopes\" page of\n# Developer Console. It typically does not need to be changed.\n\n${envPrefix}FOUNDRY_CLIENT_ID=${clientId}\n${ontologyEnvSection}`;\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 foundryUrl,\n osdkPackage,\n osdkRegistryUrl\n}) {\n // pnpm requires a trailing slash in .npmrc\n // https://github.com/pnpm/pnpm/issues/5941\n const osdkRegistryUrlWithTrailingSlash = osdkRegistryUrl != null ? osdkRegistryUrl.endsWith(\"/\") ? osdkRegistryUrl : osdkRegistryUrl + \"/\" : null;\n const formattedFoundryUrl = foundryUrl.replace(/^https:\\/\\//, \"\").replace(/\\/$/, \"\");\n const artifactsApiUrl = formattedFoundryUrl + \"/artifacts/api/\";\n const packageScope = osdkPackage?.split(\"/\")[0];\n const credentialsLine = `//${artifactsApiUrl}:_authToken=\\${FOUNDRY_TOKEN}\\n`;\n const registryLine = packageScope != null && osdkRegistryUrlWithTrailingSlash != null ? `${packageScope}:registry=${osdkRegistryUrlWithTrailingSlash}\\n` : \"\";\n return credentialsLine + registryLine;\n}","/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { changeVersionPrefix } from \"@osdk/generator-utils\";\nimport { findUpSync } from \"find-up\";\nimport Handlebars from \"handlebars\";\nimport fs from \"node:fs\";\nimport path from \"node:path\";\nimport { fileURLToPath } from \"node:url\";\nimport { consola } from \"./consola.js\";\nimport { generateEnvDevelopment, generateEnvProduction } from \"./generate/generateEnv.js\";\nimport { generateFoundryConfigJson } from \"./generate/generateFoundryConfigJson.js\";\nimport { generateNpmRc } from \"./generate/generateNpmRc.js\";\nimport { green } from \"./highlight.js\";\nexport async function run({\n project,\n overwrite,\n template,\n sdkVersion,\n foundryUrl,\n applicationUrl,\n application,\n ontology,\n clientId,\n osdkPackage,\n osdkRegistryUrl,\n corsProxy,\n scopes\n}) {\n consola.log(\"\");\n consola.start(`Creating project ${green(project)} using template ${green(template.id)}`);\n const cwd = process.cwd();\n const root = path.join(cwd, project);\n if (fs.existsSync(root)) {\n if (overwrite) {\n consola.info(`Overwriting existing project directory`);\n fs.rmSync(root, {\n recursive: true,\n force: true\n });\n fs.mkdirSync(root, {\n recursive: true\n });\n } else {\n consola.info(`Reusing existing project directory`);\n }\n } else {\n consola.info(`Creating project directory`);\n fs.mkdirSync(root, {\n recursive: true\n });\n }\n consola.info(`Copying files into project directory`);\n if (template.files[sdkVersion] == null) {\n throw new Error(`The ${template.label} template does not support a \"${sdkVersion}\" SDK version.`);\n }\n const files = await template.files[sdkVersion]();\n for (const [filePath, contents] of files) {\n const finalPath = path.join(root, filePath);\n const dirPath = path.dirname(finalPath);\n await fs.promises.mkdir(dirPath, {\n recursive: true\n });\n await fs.promises.writeFile(finalPath, Buffer.from(contents.body, contents.type === \"raw\" ? \"utf-8\" : \"base64\"));\n }\n const ourPackageJsonPath = findUpSync(\"package.json\", {\n cwd: fileURLToPath(import.meta.url)\n });\n const ourPackageJsonVersion = ourPackageJsonPath ? JSON.parse(fs.readFileSync(ourPackageJsonPath, \"utf-8\")).version : undefined;\n const clientVersion = process.env.PACKAGE_CLIENT_VERSION ?? ourPackageJsonVersion;\n if (clientVersion === undefined) {\n throw new Error(\"Could not determine current @osdk/client version\");\n }\n const templateContext = {\n application,\n applicationUrl,\n project,\n foundryUrl,\n osdkPackage,\n corsProxy,\n clientVersion: changeVersionPrefix(clientVersion, \"^\"),\n scopes\n };\n const processFiles = function (dir) {\n fs.readdirSync(dir).forEach(function (file) {\n let fullPath = dir + \"/\" + file;\n const stat = fs.statSync(fullPath);\n if (stat.isDirectory()) {\n processFiles(fullPath);\n return;\n }\n if (fullPath.endsWith(\"/_gitignore\")) {\n fs.renameSync(fullPath, fullPath.replace(/\\/_gitignore$/, \"/.gitignore\"));\n return;\n }\n\n // Files with the `.osdk` extension are only kept if the application uses an OSDK\n if (file.includes(\".osdk\")) {\n if (osdkPackage == null) {\n fs.rmSync(fullPath);\n return;\n } else {\n fs.renameSync(fullPath, fullPath.replace(\".osdk\", \"\"));\n fullPath = fullPath.replace(\".osdk\", \"\");\n }\n // Files with the `.psdk` extension are only kept if the application does not use an OSDK\n } else if (file.includes(\".psdk\")) {\n if (osdkPackage == null) {\n fs.renameSync(fullPath, fullPath.replace(\".psdk\", \"\"));\n fullPath = fullPath.replace(\".psdk\", \"\");\n } else {\n fs.rmSync(fullPath);\n return;\n }\n }\n if (!fullPath.endsWith(\".hbs\")) {\n return;\n }\n const templated = Handlebars.compile(fs.readFileSync(fullPath, \"utf-8\"))(templateContext);\n fs.writeFileSync(fullPath.replace(/.hbs$/, \"\"), templated);\n fs.rmSync(fullPath);\n });\n };\n processFiles(root);\n const npmRc = generateNpmRc({\n osdkPackage,\n osdkRegistryUrl,\n foundryUrl\n });\n fs.writeFileSync(path.join(root, \".npmrc\"), npmRc);\n const envDevelopment = generateEnvDevelopment({\n envPrefix: template.envPrefix,\n foundryUrl,\n clientId,\n corsProxy,\n ontology\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 ontology\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 { promptOntologyAndOsdkPackageAndOsdkRegistryUrl } from \"./prompts/promptOntologyAndOsdkPackageAndOsdkRegistryUrl.js\";\nimport { promptOverwrite } from \"./prompts/promptOverwrite.js\";\nimport { promptProject } from \"./prompts/promptProject.js\";\nimport { promptScopes } from \"./prompts/promptScopes.js\";\nimport { promptSdkVersion } from \"./prompts/promptSdkVersion.js\";\nimport { promptTemplate } from \"./prompts/promptTemplate.js\";\nimport { run } from \"./run.js\";\nexport async function cli(args = process.argv) {\n const base = yargs(hideBin(args)).version(process.env.PACKAGE_VERSION ?? \"\").wrap(Math.min(150, yargs().terminalWidth())).strict().help().command(\"$0 [project] [--<option>]\", \"Create a new OSDK application based on framework templates. Information may be provided through options to skip interactive prompts.\", yargs => yargs.positional(\"project\", {\n type: \"string\",\n describe: \"Project name to create\"\n }).option(\"overwrite\", {\n type: \"boolean\",\n describe: \"Overwrite project directory if already exists\"\n }).option(\"beta\", {\n type: \"boolean\",\n describe: \"Use templates compatible with the Beta version of the SDK\"\n }).option(\"template\", {\n type: \"string\",\n describe: \"Template name to use\"\n }).option(\"sdkVersion\", {\n type: \"string\",\n describe: \"The OSDK version to use\"\n }).option(\"foundryUrl\", {\n type: \"string\",\n describe: \"URL for the Foundry stack\"\n }).option(\"applicationUrl\", {\n type: \"string\",\n describe: \"URL the production application will be hosted on\",\n conflicts: \"skipApplicationUrl\"\n }).option(\"skipApplicationUrl\", {\n type: \"boolean\",\n describe: \"Skip filling in URL the production application will be hosted on\"\n }).option(\"application\", {\n type: \"string\",\n describe: \"Application resource identifier (rid)\"\n }).option(\"ontology\", {\n type: \"string\",\n describe: \"Ontology resource identifier (rid)\",\n conflicts: \"skipOsdk\"\n }).option(\"osdkPackage\", {\n type: \"string\",\n describe: \"OSDK package name for application\",\n conflicts: \"skipOsdk\"\n }).option(\"skipOsdk\", {\n type: \"boolean\",\n describe: \"Skip filling in OSDK options\"\n }).option(\"clientId\", {\n type: \"string\",\n describe: \"OAuth client ID for application\"\n }).option(\"osdkRegistryUrl\", {\n type: \"string\",\n describe: \"URL for NPM registry to install OSDK package\"\n }).option(\"corsProxy\", {\n type: \"boolean\",\n describe: \"Include a CORS proxy for Foundry API requests during local development\"\n }).option(\"scopes\", {\n type: \"string\",\n array: true,\n describe: \"List of client-side scopes to be used when creating a client\"\n }).check(argv => {\n if (argv.skipOsdk && (argv.sdkVersion == null || argv.sdkVersion.startsWith(\"1.\"))) {\n throw new Error(\"The --skipOsdk flag is only allowed when sdkVersion is 2.x. Please set --sdkVersion to 2.x or remove the --skipOsdk flag.\");\n }\n return true;\n }));\n const parsed = base.parseSync();\n const project = await promptProject(parsed);\n const overwrite = await promptOverwrite({\n ...parsed,\n project\n });\n const template = await promptTemplate(parsed);\n const sdkVersion = await promptSdkVersion({\n ...parsed,\n template\n });\n const foundryUrl = await promptFoundryUrl(parsed);\n const applicationUrl = await promptApplicationUrl(parsed);\n const application = await promptApplicationRid(parsed);\n const clientId = await promptClientId(parsed);\n const {\n osdkPackage,\n ontology,\n osdkRegistryUrl\n } = await promptOntologyAndOsdkPackageAndOsdkRegistryUrl({\n ...parsed,\n sdkVersion\n });\n const corsProxy = await promptCorsProxy(parsed);\n const scopes = await promptScopes(parsed);\n await run({\n project,\n overwrite,\n template,\n sdkVersion,\n foundryUrl,\n applicationUrl,\n application,\n clientId,\n osdkPackage,\n osdkRegistryUrl,\n corsProxy,\n scopes,\n ontology\n });\n}"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@osdk/create-app",
|
|
3
|
-
"version": "2.5.
|
|
3
|
+
"version": "2.5.6",
|
|
4
4
|
"description": "",
|
|
5
5
|
"access": "public",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -38,18 +38,18 @@
|
|
|
38
38
|
"redent": "^4.0.0",
|
|
39
39
|
"tmp": "^0.2.5",
|
|
40
40
|
"typescript": "~5.5.4",
|
|
41
|
-
"@osdk/create-app.template.
|
|
42
|
-
"@osdk/create-app.template.
|
|
43
|
-
"@osdk/create-app.template.react.beta": "2.5.
|
|
44
|
-
"@osdk/create-app.template.tutorial-todo-aip-app": "2.5.
|
|
45
|
-
"@osdk/create-app.template.tutorial-todo-aip-app.beta": "2.5.
|
|
46
|
-
"@osdk/create-app.template.tutorial-todo-app": "2.5.
|
|
47
|
-
"@osdk/create-app.template.
|
|
48
|
-
"@osdk/create-app.template.
|
|
49
|
-
"@osdk/
|
|
50
|
-
"@osdk/
|
|
51
|
-
"@osdk/monorepo.
|
|
52
|
-
"@osdk/monorepo.
|
|
41
|
+
"@osdk/create-app.template.react": "2.5.6",
|
|
42
|
+
"@osdk/create-app.template.expo.v2": "2.5.6",
|
|
43
|
+
"@osdk/create-app.template.react.beta": "2.5.6",
|
|
44
|
+
"@osdk/create-app.template.tutorial-todo-aip-app": "2.5.6",
|
|
45
|
+
"@osdk/create-app.template.tutorial-todo-aip-app.beta": "2.5.6",
|
|
46
|
+
"@osdk/create-app.template.tutorial-todo-app": "2.5.6",
|
|
47
|
+
"@osdk/create-app.template.tutorial-todo-app.beta": "2.5.6",
|
|
48
|
+
"@osdk/create-app.template.vue.v2": "2.5.6",
|
|
49
|
+
"@osdk/generator-utils": "2.5.6",
|
|
50
|
+
"@osdk/create-app.template.vue": "2.5.6",
|
|
51
|
+
"@osdk/monorepo.tsconfig": "~0.4.0",
|
|
52
|
+
"@osdk/monorepo.api-extractor": "~0.4.0"
|
|
53
53
|
},
|
|
54
54
|
"publishConfig": {
|
|
55
55
|
"access": "public"
|