@osdk/create-widget 2.1.0-beta.4 → 2.1.0-beta.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/README.md +1 -0
- package/build/esm/{esm-ENH745KN.js → esm-K2BK5VCK.js} +6 -6
- package/build/esm/{esm-ENH745KN.js.map → esm-K2BK5VCK.js.map} +1 -1
- package/build/esm/{esm-C6MU7DAZ.js → esm-VLIVI2T6.js} +6 -6
- package/build/esm/{esm-C6MU7DAZ.js.map → esm-VLIVI2T6.js.map} +1 -1
- package/build/esm/index.js +12 -6
- package/build/esm/index.js.map +1 -1
- package/build/types/generate/generateFoundryConfigJson.d.ts +2 -1
- package/build/types/generate/generateFoundryConfigJson.d.ts.map +1 -1
- package/build/types/run.d.ts +2 -1
- package/build/types/run.d.ts.map +1 -1
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
|
@@ -32,6 +32,7 @@ npx @osdk/create-widget [project] [--<option>]
|
|
|
32
32
|
| --sdkVersion | The SDK version to use (1.x or 2.x), defaults to 2.x [string] |
|
|
33
33
|
| --foundryUrl | URL for the Foundry stack [string] |
|
|
34
34
|
| --widget | Widget resource identifier (rid) [string] |
|
|
35
|
+
| --repository | Repository resource identifier (rid) [string] |
|
|
35
36
|
| --osdkPackage | OSDK package name for application [string] |
|
|
36
37
|
| --osdkRegistryUrl | URL for NPM registry to install OSDK package [string] |
|
|
37
38
|
|
|
@@ -115,8 +115,8 @@ dist-ssr
|
|
|
115
115
|
"@eslint/js": "^9.13.0",
|
|
116
116
|
"@types/react": "^18",
|
|
117
117
|
"@types/react-dom": "^18",
|
|
118
|
-
"@typescript-eslint/eslint-plugin": "^8.
|
|
119
|
-
"@typescript-eslint/parser": "^8.
|
|
118
|
+
"@typescript-eslint/eslint-plugin": "^8.28.0",
|
|
119
|
+
"@typescript-eslint/parser": "^8.28.0",
|
|
120
120
|
"@vitejs/plugin-react": "^4.2.0",
|
|
121
121
|
"eslint": "^9.19.0",
|
|
122
122
|
"eslint-plugin-import": "^2.31.0",
|
|
@@ -126,8 +126,8 @@ dist-ssr
|
|
|
126
126
|
"eslint-plugin-react-refresh": "^0.4.14",
|
|
127
127
|
"globals": "^15.11.0",
|
|
128
128
|
"typescript": "~5.5.4",
|
|
129
|
-
"typescript-eslint": "^8.
|
|
130
|
-
"vite": "^6.0.
|
|
129
|
+
"typescript-eslint": "^8.28.0",
|
|
130
|
+
"vite": "^6.0.12",
|
|
131
131
|
"vitest": "^3.0.5"
|
|
132
132
|
}
|
|
133
133
|
}`
|
|
@@ -236,5 +236,5 @@ export default defineConfig({
|
|
|
236
236
|
}]]);
|
|
237
237
|
|
|
238
238
|
export { files };
|
|
239
|
-
//# sourceMappingURL=esm-
|
|
240
|
-
//# sourceMappingURL=esm-
|
|
239
|
+
//# sourceMappingURL=esm-K2BK5VCK.js.map
|
|
240
|
+
//# sourceMappingURL=esm-K2BK5VCK.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../create-widget.template.minimal-react.v2/build/esm/generatedNoCheck/index.js"],"names":[],"mappings":";AAAO,IAAM,KAAQ,mBAAA,IAAI,GAAI,CAAA,CAAC,CAAC,eAAiB,EAAA;AAAA,EAC9C,IAAM,EAAA,KAAA;AAAA,EACN,IAAM,EAAA,CAAA;;AAAA;;AAAA;;AAAA;;AAAA;AAAA;AAAA;;;AAAA;;AAAA;;AAAA;;AAAA;AAAA;AAAA;;AAAA;;AAAA;;AAAA;AAAA;AAAA;;AAAA;;AAAA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AA0CR,CAAC,CAAA,EAAG,CAAC,YAAc,EAAA;AAAA,EACjB,IAAM,EAAA,KAAA;AAAA,EACN,IAAM,EAAA,CAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AAAA;AAAA;AAAA;AAAA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;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AAA;AAAA,EACnB,MAAQ,EAAA,QAAA;AAAA,EACR,MAAQ,EAAA;AACV,CAAC,CAAA,EAAG,CAAC,cAAgB,EAAA;AAAA,EACnB,IAAM,EAAA,KAAA;AAAA,EACN,IAAM,EAAA,CAAA;;AAAA;AAAA;AAAA;AAAA;;AAAA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAeR,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;AAkBR,CAAC,CAAC,CAAC","file":"esm-ENH745KN.js","sourcesContent":["export const files = new Map([[\"README.md.hbs\", {\n type: \"raw\",\n body: `# {{project}}\n\nThis project was generated with [\\`@osdk/create-widget\\`](https://www.npmjs.com/package/@osdk/create-widget) and demonstrates developing custom widgets to be embedded within Foundry UIs such as Workshop. It uses React on top of Vite. Check out the [Vite](https://vitejs.dev/guide/) docs for further configuration. The Vite plugin [\\`@osdk/widget.vite-plugin.unstable\\`](https://www.npmjs.com/package/@osdk/widget.vite-plugin.unstable) automatically generates a \\`widgets.config.json\\` manifest file containing metadata about widgets inside this project during the build command.\n\n## Developing\n\nRun the following command or equivalent with your preferred package manager to start a local development server and follow the instructions printed to set up developer mode in Foundry:\n\n\\`\\`\\`sh\nnpm run dev\n\\`\\`\\`\n\n\n## Deploying\n\nA \\`foundry.config.json\\` file is included in the root of this project containing the deployment configuration to Foundry.\n\nRun the following command or equivalent with your preferred package manager to create a production build of your widgets:\n\n\\`\\`\\`sh\nnpm run build\n\\`\\`\\`\n\nA \\`.palantir/widgets.config.json\\` manifest file containing metadata about your widgets is created during the build.\n\nRun the following command or equivalent with your preferred package manager to deploy the production build of your widgets:\n\n\\`\\`\\`sh\nnpx @osdk/cli@beta unstable widgetset deploy\n\\`\\`\\`\n\nBy default the \\`package-json\\` strategy is used for determining the version for your widgets from the \\`version\\` field in this project's \\`package.json\\` file. Remember to update this field and rerun the build command to update the manifest file when deploying a new version.\n\nIf you prefer to infer the version from a git tag, you can use the \\`git-describe\\` strategy by setting the \\`autoVersion\\` field in the \\`foundry.config.json\\` file to:\n\n\\`\\`\\`json\n{\n \"type\": \"git-describe\",\n \"tagPrefix\": \"\"\n}\n\\`\\`\\`\n`\n}], [\".gitignore\", {\n type: \"raw\",\n body: `# Logs\nlogs\n*.log\nnpm-debug.log*\nyarn-debug.log*\nyarn-error.log*\npnpm-debug.log*\nlerna-debug.log*\n\nnode_modules\ndist\ndist-ssr\n*.local\n\n# Editor directories and files\n.vscode/*\n!.vscode/extensions.json\n.idea\n.DS_Store\n*.suo\n*.ntvs*\n*.njsproj\n*.sln\n*.sw?\n`\n}], [\"eslint.config.mjs\", {\n \"type\": \"base64\",\n \"body\": \"Ly8gQHRzLWNoZWNrCmltcG9ydCBlc2xpbnQgZnJvbSAiQGVzbGludC9qcyI7CmltcG9ydCB0c1BhcnNlciBmcm9tICJAdHlwZXNjcmlwdC1lc2xpbnQvcGFyc2VyIjsKaW1wb3J0ICogYXMgaW1wb3J0UGx1Z2luIGZyb20gImVzbGludC1wbHVnaW4taW1wb3J0IjsKaW1wb3J0IGpzeEExMXlQbHVnaW4gZnJvbSAiZXNsaW50LXBsdWdpbi1qc3gtYTExeSI7CmltcG9ydCByZWFjdFBsdWdpbiBmcm9tICJlc2xpbnQtcGx1Z2luLXJlYWN0Ijs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YWN0SG9va3NQbHVnaW4pLAogICAgImpzeC1hMTF5IjoganN4QTExeVBsdWdpbiwKICAgICJpbXBvcnQiOiBpbXBvcnRQbHVnaW4sCiAgfSwKICBydWxlczogewogICAgLi4uKAogICAgICAvKiogQHR5cGUgaW1wb3J0KCJlc2xpbnQiKS5MaW50ZXIuUnVsZXNSZWNvcmQgKi8KICAgICAgKHJlYWN0UGx1Z2luLmNvbmZpZ3MuZmxhdD8ucmVjb21tZW5kZWQucnVsZXMpCiAgICApLAogICAgInJlYWN0LWhvb2tzL3J1bGVzLW9mLWhvb2tzIjogImVycm9yIiwKICAgICJyZWFjdC1ob29rcy9leGhhdXN0aXZlLWRlcHMiOiAid2FybiIsCiAgICAuLi5qc3hBMTF5UGx1Z2luLmNvbmZpZ3MucmVjb21tZW5kZWQucnVsZXMsCiAgICAicmVhY3QtcmVmcmVzaC9vbmx5LWV4cG9ydC1jb21wb25lbnRzIjogWyJ3YXJuIiwgewogICAgICBhbGxvd0NvbnN0YW50RXhwb3J0OiB0cnVlLAogICAgfV0sCgogICAgImltcG9ydC9uYW1lZCI6ICJlcnJvciIsCiAgICAiaW1wb3J0L2RlZmF1bHQiOiAiZXJyb3IiLAogICAgImltcG9ydC9uYW1lc3BhY2UiOiAiZXJyb3IiLAogICAgImltcG9ydC9uby1kdXBsaWNhdGVzIjogImVycm9yIiwKICAgICJpbXBvcnQvbm8tZXh0cmFuZW91cy1kZXBlbmRlbmNpZXMiOiAiZXJyb3IiLAoKICAgICJyZWFjdC9yZWFjdC1pbi1qc3gtc2NvcGUiOiAib2ZmIiwKICB9LAp9KTsK\"\n}], [\"index.html\", {\n type: \"raw\",\n body: `<!doctype html>\n<html lang=\"en\">\n <head>\n <meta charset=\"UTF-8\" />\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n <title>Minimal React Custom Widget</title>\n </head>\n <body>\n <script type=\"module\" src=\"/src/main.tsx\"></script>\n </body>\n</html>\n`\n}], [\"package.json.hbs\", {\n type: \"raw\",\n body: `{\n \"name\": \"{{project}}\",\n \"private\": true,\n \"version\": \"0.0.0\",\n \"type\": \"module\",\n \"scripts\": {\n \"dev\": \"vite\",\n \"build\": \"tsc && vite build\",\n \"lint\": \"eslint . --report-unused-disable-directives --max-warnings 0\",\n \"test\": \"vitest run --passWithNoTests\",\n \"preview\": \"vite preview\"\n },\n \"dependencies\": {\n \"@osdk/widget.client-react.unstable\": \"^1.1.0\",\n \"@osdk/widget.client.unstable\": \"^1.1.0\",\n \"@blueprintjs/core\": \"^5.16.0\",\n \"react\": \"^18\",\n \"react-dom\": \"^18\",\n \"react-router-dom\": \"^6.23.1\"\n },\n \"devDependencies\": {\n \"@osdk/widget.vite-plugin.unstable\": \"^1.1.0\",\n \"@eslint/compat\": \"^1.2.1\",\n \"@eslint/js\": \"^9.13.0\",\n \"@types/react\": \"^18\",\n \"@types/react-dom\": \"^18\",\n \"@typescript-eslint/eslint-plugin\": \"^8.21.0\",\n \"@typescript-eslint/parser\": \"^8.21.0\",\n \"@vitejs/plugin-react\": \"^4.2.0\",\n \"eslint\": \"^9.19.0\",\n \"eslint-plugin-import\": \"^2.31.0\",\n \"eslint-plugin-jsx-a11y\": \"^6.10.1\",\n \"eslint-plugin-react\": \"^7.37.2\",\n \"eslint-plugin-react-hooks\": \"^5.0.0\",\n \"eslint-plugin-react-refresh\": \"^0.4.14\",\n \"globals\": \"^15.11.0\",\n \"typescript\": \"~5.5.4\",\n \"typescript-eslint\": \"^8.21.0\",\n \"vite\": \"^6.0.11\",\n \"vitest\": \"^3.0.5\"\n }\n}`\n}], [\"src/Widget.module.css\", {\n \"type\": \"base64\",\n \"body\": \"LmNvbnRhaW5lciB7CiAgICBwYWRkaW5nOiAxNXB4OwogICAgZGlzcGxheTogZmxleDsKICAgIGZsZXgtZGlyZWN0aW9uOiBjb2x1bW47CiAgICBhbGlnbi1pdGVtczogY2VudGVyOwogICAganVzdGlmeS1jb250ZW50OiBjZW50ZXI7CiAgICBoZWlnaHQ6IDEwMCU7Cn0KCi5jYXJkIHsKICAgIGRpc3BsYXk6IGZsZXg7CiAgICBmbGV4LWRpcmVjdGlvbjogY29sdW1uOwogICAgYWxpZ24taXRlbXM6IGNlbnRlcjsKICAgIGdhcDogMTBweDsKICAgIHdpZHRoOiAxNTBweDsKfQ==\"\n}], [\"src/Widget.tsx\", {\n type: \"raw\",\n body: `import { Button, Card, H4 } from \"@blueprintjs/core\";\nimport {\n type FoundryWidgetClientContext,\n useFoundryWidgetContext,\n} from \"@osdk/widget.client-react.unstable\";\nimport React, { useCallback, useEffect } from \"react\";\nimport type MainConfig from \"./main.config.js\";\nimport css from \"./Widget.module.css\";\n\nconst useWidgetContext: () => FoundryWidgetClientContext<typeof MainConfig> =\n useFoundryWidgetContext.withTypes<typeof MainConfig>();\n\nexport const Widget: React.FC = () => {\n const { parameters, emitEvent } = useWidgetContext();\n const greetingName = parameters.values.greetingName ?? \"World\";\n const counterValue = parameters.values.counterValue ?? 0;\n\n const setCounterValue = useCallback(\n (value: number) =>\n emitEvent(\"setCounterValue\", {\n parameterUpdates: { counterValue: value },\n }),\n [emitEvent],\n );\n\n const handleResetCounter = useCallback(() => setCounterValue(0), [\n setCounterValue,\n ]);\n\n useEffect(() => {\n const interval = setInterval(() => setCounterValue(counterValue + 1), 1000);\n return () => clearInterval(interval);\n }, [setCounterValue, counterValue]);\n\n return (\n <div className={css.container}>\n <H4>Hello, {greetingName}!</H4>\n <Card className={css.card} compact={true}>\n <div>Count: {counterValue}</div>\n <Button onClick={handleResetCounter}>Reset</Button>\n </Card>\n </div>\n );\n};\n`\n}], [\"src/main.config.ts\", {\n \"type\": \"base64\",\n \"body\": \"aW1wb3J0IHsgZGVmaW5lQ29uZmlnIH0gZnJvbSAiQG9zZGsvd2lkZ2V0LmNsaWVudC51bnN0YWJsZSI7CgpleHBvcnQgZGVmYXVsdCBkZWZpbmVDb25maWcoewogIGlkOiAid2lkZ2V0SWQiLAogIG5hbWU6ICJDdXN0b20gV2lkZ2V0IiwKICBkZXNjcmlwdGlvbjogIkFuIGV4YW1wbGUgY3VzdG9tIHdpZGdldCBpbXBsZW1lbnRhdGlvbiIsCiAgdHlwZTogIndvcmtzaG9wIiwKICBwYXJhbWV0ZXJzOiB7CiAgICBncmVldGluZ05hbWU6IHsKICAgICAgZGlzcGxheU5hbWU6ICJHcmVldGluZyBuYW1lIiwKICAgICAgdHlwZTogInN0cmluZyIsCiAgICB9LAogICAgY291bnRlclZhbHVlOiB7CiAgICAgIGRpc3BsYXlOYW1lOiAiQ291bnRlciB2YWx1ZSIsCiAgICAgIHR5cGU6ICJudW1iZXIiLAogICAgfSwKICB9LAogIGV2ZW50czogewogICAgc2V0Q291bnRlclZhbHVlOiB7CiAgICAgIGRpc3BsYXlOYW1lOiAiU2V0IGNvdW50ZXIgdmFsdWUiLAogICAgICBwYXJhbWV0ZXJVcGRhdGVJZHM6IFsiY291bnRlclZhbHVlIl0sCiAgICB9LAogIH0sCn0pOwo=\"\n}], [\"src/main.css\", {\n \"type\": \"base64\",\n \"body\": \"aHRtbCwgYm9keSB7CiAgICBoZWlnaHQ6IDEwMCU7CiAgICBtYXJnaW46IDA7Cn0=\"\n}], [\"src/main.tsx\", {\n type: \"raw\",\n body: `import \"@blueprintjs/core/lib/css/blueprint.css\";\n\nimport { FoundryWidget } from \"@osdk/widget.client-react.unstable\";\nimport { createRoot } from \"react-dom/client\";\nimport MainConfig from \"./main.config.js\";\nimport { Widget } from \"./Widget.js\";\n\nconst root = document.querySelector(\"body\")!;\n\ncreateRoot(root).render(\n <FoundryWidget config={MainConfig}>\n <Widget />\n </FoundryWidget>,\n);\n`\n}], [\"src/vite-env.d.ts\", {\n \"type\": \"base64\",\n \"body\": \"Ly8vIDxyZWZlcmVuY2UgdHlwZXM9InZpdGUvY2xpZW50IiAvPgo=\"\n}], [\"tsconfig.json\", {\n \"type\": \"base64\",\n \"body\": \"ewogICJjb21waWxlck9wdGlvbnMiOiB7CiAgICAidGFyZ2V0IjogIkVTMjAyMCIsCiAgICAidXNlRGVmaW5lRm9yQ2xhc3NGaWVsZHMiOiB0cnVlLAogICAgImxpYiI6IFsiRVMyMDIwIiwgIkRPTSIsICJET00uSXRlcmFibGUiXSwKICAgICJtb2R1bGUiOiAiRVNOZXh0IiwKICAgICJza2lwTGliQ2hlY2siOiB0cnVlLAoKICAgIC8qIEJ1bmRsZXIgbW9kZSAqLwogICAgIm1vZHVsZVJlc29sdXRpb24iOiAiYnVuZGxlciIsCiAgICAiYWxsb3dJbXBvcnRpbmdUc0V4dGVuc2lvbnMiOiB0cnVlLAogICAgInJlc29sdmVKc29uTW9kdWxlIjogdHJ1ZSwKICAgICJpc29sYXRlZE1vZHVsZXMiOiB0cnVlLAogICAgIm5vRW1pdCI6IHRydWUsCiAgICAianN4IjogInJlYWN0LWpzeCIsCgogICAgLyogTGludGluZyAqLwogICAgInN0cmljdCI6IHRydWUsCiAgICAibm9VbnVzZWRMb2NhbHMiOiB0cnVlLAogICAgIm5vVW51c2VkUGFyYW1ldGVycyI6IHRydWUsCiAgICAibm9GYWxsdGhyb3VnaENhc2VzSW5Td2l0Y2giOiB0cnVlCiAgfSwKICAiaW5jbHVkZSI6IFsic3JjIl0sCiAgInJlZmVyZW5jZXMiOiBbeyAicGF0aCI6ICIuL3RzY29uZmlnLm5vZGUuanNvbiIgfV0KfQo=\"\n}], [\"tsconfig.node.json\", {\n \"type\": \"base64\",\n \"body\": \"ewogICJjb21waWxlck9wdGlvbnMiOiB7CiAgICAiY29tcG9zaXRlIjogdHJ1ZSwKICAgICJza2lwTGliQ2hlY2siOiB0cnVlLAogICAgIm1vZHVsZSI6ICJFU05leHQiLAogICAgIm1vZHVsZVJlc29sdXRpb24iOiAiYnVuZGxlciIsCiAgICAiYWxsb3dTeW50aGV0aWNEZWZhdWx0SW1wb3J0cyI6IHRydWUKICB9LAogICJpbmNsdWRlIjogWyJ2aXRlLmNvbmZpZy50cyJdCn0K\"\n}], [\"vite.config.ts.hbs\", {\n type: \"raw\",\n body: `import foundryWidgetPlugin from \"@osdk/widget.vite-plugin.unstable\";\nimport react from \"@vitejs/plugin-react\";\nimport { defineConfig } from \"vite\";\n\n// https://vitejs.dev/config/\nexport default defineConfig({\n plugins: [react(), foundryWidgetPlugin()],\n server: {\n port: 8080,\n cors: true,\n },\n build: {\n rollupOptions: {\n input: [\"./index.html\"],\n },\n },\n});\n`\n}]]);"]}
|
|
1
|
+
{"version":3,"sources":["../../../create-widget.template.minimal-react.v2/build/esm/generatedNoCheck/index.js"],"names":[],"mappings":";AAAO,IAAM,KAAQ,mBAAA,IAAI,GAAI,CAAA,CAAC,CAAC,eAAiB,EAAA;AAAA,EAC9C,IAAM,EAAA,KAAA;AAAA,EACN,IAAM,EAAA,CAAA;;AAAA;;AAAA;;AAAA;;AAAA;AAAA;AAAA;;;AAAA;;AAAA;;AAAA;;AAAA;AAAA;AAAA;;AAAA;;AAAA;;AAAA;AAAA;AAAA;;AAAA;;AAAA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AA0CR,CAAC,CAAA,EAAG,CAAC,YAAc,EAAA;AAAA,EACjB,IAAM,EAAA,KAAA;AAAA,EACN,IAAM,EAAA,CAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AAAA;AAAA;AAAA;AAAA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAyBR,CAAC,CAAA,EAAG,CAAC,mBAAqB,EAAA;AAAA,EACxB,MAAQ,EAAA,QAAA;AAAA,EACR,MAAQ,EAAA;AACV,CAAC,CAAA,EAAG,CAAC,YAAc,EAAA;AAAA,EACjB,IAAM,EAAA,KAAA;AAAA,EACN,IAAM,EAAA,CAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAYR,CAAC,CAAA,EAAG,CAAC,kBAAoB,EAAA;AAAA,EACvB,IAAM,EAAA,KAAA;AAAA,EACN,IAAM,EAAA,CAAA;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AA;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;AAkBR,CAAC,CAAC,CAAC","file":"esm-K2BK5VCK.js","sourcesContent":["export const files = new Map([[\"README.md.hbs\", {\n type: \"raw\",\n body: `# {{project}}\n\nThis project was generated with [\\`@osdk/create-widget\\`](https://www.npmjs.com/package/@osdk/create-widget) and demonstrates developing custom widgets to be embedded within Foundry UIs such as Workshop. It uses React on top of Vite. Check out the [Vite](https://vitejs.dev/guide/) docs for further configuration. The Vite plugin [\\`@osdk/widget.vite-plugin.unstable\\`](https://www.npmjs.com/package/@osdk/widget.vite-plugin.unstable) automatically generates a \\`widgets.config.json\\` manifest file containing metadata about widgets inside this project during the build command.\n\n## Developing\n\nRun the following command or equivalent with your preferred package manager to start a local development server and follow the instructions printed to set up developer mode in Foundry:\n\n\\`\\`\\`sh\nnpm run dev\n\\`\\`\\`\n\n\n## Deploying\n\nA \\`foundry.config.json\\` file is included in the root of this project containing the deployment configuration to Foundry.\n\nRun the following command or equivalent with your preferred package manager to create a production build of your widgets:\n\n\\`\\`\\`sh\nnpm run build\n\\`\\`\\`\n\nA \\`.palantir/widgets.config.json\\` manifest file containing metadata about your widgets is created during the build.\n\nRun the following command or equivalent with your preferred package manager to deploy the production build of your widgets:\n\n\\`\\`\\`sh\nnpx @osdk/cli@beta unstable widgetset deploy\n\\`\\`\\`\n\nBy default the \\`package-json\\` strategy is used for determining the version for your widgets from the \\`version\\` field in this project's \\`package.json\\` file. Remember to update this field and rerun the build command to update the manifest file when deploying a new version.\n\nIf you prefer to infer the version from a git tag, you can use the \\`git-describe\\` strategy by setting the \\`autoVersion\\` field in the \\`foundry.config.json\\` file to:\n\n\\`\\`\\`json\n{\n \"type\": \"git-describe\",\n \"tagPrefix\": \"\"\n}\n\\`\\`\\`\n`\n}], [\".gitignore\", {\n type: \"raw\",\n body: `# Logs\nlogs\n*.log\nnpm-debug.log*\nyarn-debug.log*\nyarn-error.log*\npnpm-debug.log*\nlerna-debug.log*\n\nnode_modules\ndist\ndist-ssr\n*.local\n\n# Editor directories and files\n.vscode/*\n!.vscode/extensions.json\n.idea\n.DS_Store\n*.suo\n*.ntvs*\n*.njsproj\n*.sln\n*.sw?\n`\n}], [\"eslint.config.mjs\", {\n \"type\": \"base64\",\n \"body\": \"Ly8gQHRzLWNoZWNrCmltcG9ydCBlc2xpbnQgZnJvbSAiQGVzbGludC9qcyI7CmltcG9ydCB0c1BhcnNlciBmcm9tICJAdHlwZXNjcmlwdC1lc2xpbnQvcGFyc2VyIjsKaW1wb3J0ICogYXMgaW1wb3J0UGx1Z2luIGZyb20gImVzbGludC1wbHVnaW4taW1wb3J0IjsKaW1wb3J0IGpzeEExMXlQbHVnaW4gZnJvbSAiZXNsaW50LXBsdWdpbi1qc3gtYTExeSI7CmltcG9ydCByZWFjdFBsdWdpbiBmcm9tICJlc2xpbnQtcGx1Z2luLXJlYWN0IjsKaW1wb3J0IHJlYWN0SG9va3NQbHVnaW4gZnJvbSAiZXNsaW50LXBsdWdpbi1yZWFjdC1ob29rcyI7CmltcG9ydCByZWFjdFJlZnJlc2ggZnJvbSAiZXNsaW50LXBsdWdpbi1yZWFjdC1yZWZyZXNoIjsKaW1wb3J0IGdsb2JhbHMgZnJvbSAiZ2xvYmFscyI7CmltcG9ydCB0c2VzbGludCBmcm9tICJ0eXBlc2NyaXB0LWVzbGludCI7CgpleHBvcnQgZGVmYXVsdCB0c2VzbGludC5jb25maWcoewogIGZpbGVzOiBbImVzbGludC5jb25maWcubWpzIiwgInNyYy8qKi8qLntqcyxt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y9leGhhdXN0aXZlLWRlcHMiOiAid2FybiIsCiAgICAuLi5qc3hBMTF5UGx1Z2luLmNvbmZpZ3MucmVjb21tZW5kZWQucnVsZXMsCiAgICAicmVhY3QtcmVmcmVzaC9vbmx5LWV4cG9ydC1jb21wb25lbnRzIjogWyJ3YXJuIiwgewogICAgICBhbGxvd0NvbnN0YW50RXhwb3J0OiB0cnVlLAogICAgfV0sCgogICAgImltcG9ydC9uYW1lZCI6ICJlcnJvciIsCiAgICAiaW1wb3J0L2RlZmF1bHQiOiAiZXJyb3IiLAogICAgImltcG9ydC9uYW1lc3BhY2UiOiAiZXJyb3IiLAogICAgImltcG9ydC9uby1kdXBsaWNhdGVzIjogImVycm9yIiwKICAgICJpbXBvcnQvbm8tZXh0cmFuZW91cy1kZXBlbmRlbmNpZXMiOiAiZXJyb3IiLAoKICAgICJyZWFjdC9yZWFjdC1pbi1qc3gtc2NvcGUiOiAib2ZmIiwKICB9LAp9KTsK\"\n}], [\"index.html\", {\n type: \"raw\",\n body: `<!doctype html>\n<html lang=\"en\">\n <head>\n <meta charset=\"UTF-8\" />\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n <title>Minimal React Custom Widget</title>\n </head>\n <body>\n <script type=\"module\" src=\"/src/main.tsx\"></script>\n </body>\n</html>\n`\n}], [\"package.json.hbs\", {\n type: \"raw\",\n body: `{\n \"name\": \"{{project}}\",\n \"private\": true,\n \"version\": \"0.0.0\",\n \"type\": \"module\",\n \"scripts\": {\n \"dev\": \"vite\",\n \"build\": \"tsc && vite build\",\n \"lint\": \"eslint . --report-unused-disable-directives --max-warnings 0\",\n \"test\": \"vitest run --passWithNoTests\",\n \"preview\": \"vite preview\"\n },\n \"dependencies\": {\n \"@osdk/widget.client-react.unstable\": \"^1.1.0\",\n \"@osdk/widget.client.unstable\": \"^1.1.0\",\n \"@blueprintjs/core\": \"^5.16.0\",\n \"react\": \"^18\",\n \"react-dom\": \"^18\",\n \"react-router-dom\": \"^6.23.1\"\n },\n \"devDependencies\": {\n \"@osdk/widget.vite-plugin.unstable\": \"^1.1.0\",\n \"@eslint/compat\": \"^1.2.1\",\n \"@eslint/js\": \"^9.13.0\",\n \"@types/react\": \"^18\",\n \"@types/react-dom\": \"^18\",\n \"@typescript-eslint/eslint-plugin\": \"^8.28.0\",\n \"@typescript-eslint/parser\": \"^8.28.0\",\n \"@vitejs/plugin-react\": \"^4.2.0\",\n \"eslint\": \"^9.19.0\",\n \"eslint-plugin-import\": \"^2.31.0\",\n \"eslint-plugin-jsx-a11y\": \"^6.10.1\",\n \"eslint-plugin-react\": \"^7.37.2\",\n \"eslint-plugin-react-hooks\": \"^5.0.0\",\n \"eslint-plugin-react-refresh\": \"^0.4.14\",\n \"globals\": \"^15.11.0\",\n \"typescript\": \"~5.5.4\",\n \"typescript-eslint\": \"^8.28.0\",\n \"vite\": \"^6.0.12\",\n \"vitest\": \"^3.0.5\"\n }\n}`\n}], [\"src/Widget.module.css\", {\n \"type\": \"base64\",\n \"body\": \"LmNvbnRhaW5lciB7CiAgICBwYWRkaW5nOiAxNXB4OwogICAgZGlzcGxheTogZmxleDsKICAgIGZsZXgtZGlyZWN0aW9uOiBjb2x1bW47CiAgICBhbGlnbi1pdGVtczogY2VudGVyOwogICAganVzdGlmeS1jb250ZW50OiBjZW50ZXI7CiAgICBoZWlnaHQ6IDEwMCU7Cn0KCi5jYXJkIHsKICAgIGRpc3BsYXk6IGZsZXg7CiAgICBmbGV4LWRpcmVjdGlvbjogY29sdW1uOwogICAgYWxpZ24taXRlbXM6IGNlbnRlcjsKICAgIGdhcDogMTBweDsKICAgIHdpZHRoOiAxNTBweDsKfQ==\"\n}], [\"src/Widget.tsx\", {\n type: \"raw\",\n body: `import { Button, Card, H4 } from \"@blueprintjs/core\";\nimport {\n type FoundryWidgetClientContext,\n useFoundryWidgetContext,\n} from \"@osdk/widget.client-react.unstable\";\nimport React, { useCallback, useEffect } from \"react\";\nimport type MainConfig from \"./main.config.js\";\nimport css from \"./Widget.module.css\";\n\nconst useWidgetContext: () => FoundryWidgetClientContext<typeof MainConfig> =\n useFoundryWidgetContext.withTypes<typeof MainConfig>();\n\nexport const Widget: React.FC = () => {\n const { parameters, emitEvent } = useWidgetContext();\n const greetingName = parameters.values.greetingName ?? \"World\";\n const counterValue = parameters.values.counterValue ?? 0;\n\n const setCounterValue = useCallback(\n (value: number) =>\n emitEvent(\"setCounterValue\", {\n parameterUpdates: { counterValue: value },\n }),\n [emitEvent],\n );\n\n const handleResetCounter = useCallback(() => setCounterValue(0), [\n setCounterValue,\n ]);\n\n useEffect(() => {\n const interval = setInterval(() => setCounterValue(counterValue + 1), 1000);\n return () => clearInterval(interval);\n }, [setCounterValue, counterValue]);\n\n return (\n <div className={css.container}>\n <H4>Hello, {greetingName}!</H4>\n <Card className={css.card} compact={true}>\n <div>Count: {counterValue}</div>\n <Button onClick={handleResetCounter}>Reset</Button>\n </Card>\n </div>\n );\n};\n`\n}], [\"src/main.config.ts\", {\n \"type\": \"base64\",\n \"body\": \"aW1wb3J0IHsgZGVmaW5lQ29uZmlnIH0gZnJvbSAiQG9zZGsvd2lkZ2V0LmNsaWVudC51bnN0YWJsZSI7CgpleHBvcnQgZGVmYXVsdCBkZWZpbmVDb25maWcoewogIGlkOiAid2lkZ2V0SWQiLAogIG5hbWU6ICJDdXN0b20gV2lkZ2V0IiwKICBkZXNjcmlwdGlvbjogIkFuIGV4YW1wbGUgY3VzdG9tIHdpZGdldCBpbXBsZW1lbnRhdGlvbiIsCiAgdHlwZTogIndvcmtzaG9wIiwKICBwYXJhbWV0ZXJzOiB7CiAgICBncmVldGluZ05hbWU6IHsKICAgICAgZGlzcGxheU5hbWU6ICJHcmVldGluZyBuYW1lIiwKICAgICAgdHlwZTogInN0cmluZyIsCiAgICB9LAogICAgY291bnRlclZhbHVlOiB7CiAgICAgIGRpc3BsYXlOYW1lOiAiQ291bnRlciB2YWx1ZSIsCiAgICAgIHR5cGU6ICJudW1iZXIiLAogICAgfSwKICB9LAogIGV2ZW50czogewogICAgc2V0Q291bnRlclZhbHVlOiB7CiAgICAgIGRpc3BsYXlOYW1lOiAiU2V0IGNvdW50ZXIgdmFsdWUiLAogICAgICBwYXJhbWV0ZXJVcGRhdGVJZHM6IFsiY291bnRlclZhbHVlIl0sCiAgICB9LAogIH0sCn0pOwo=\"\n}], [\"src/main.css\", {\n \"type\": \"base64\",\n \"body\": \"aHRtbCwgYm9keSB7CiAgICBoZWlnaHQ6IDEwMCU7CiAgICBtYXJnaW46IDA7Cn0=\"\n}], [\"src/main.tsx\", {\n type: \"raw\",\n body: `import \"@blueprintjs/core/lib/css/blueprint.css\";\n\nimport { FoundryWidget } from \"@osdk/widget.client-react.unstable\";\nimport { createRoot } from \"react-dom/client\";\nimport MainConfig from \"./main.config.js\";\nimport { Widget } from \"./Widget.js\";\n\nconst root = document.querySelector(\"body\")!;\n\ncreateRoot(root).render(\n <FoundryWidget config={MainConfig}>\n <Widget />\n </FoundryWidget>,\n);\n`\n}], [\"src/vite-env.d.ts\", {\n \"type\": \"base64\",\n \"body\": \"Ly8vIDxyZWZlcmVuY2UgdHlwZXM9InZpdGUvY2xpZW50IiAvPgo=\"\n}], [\"tsconfig.json\", {\n \"type\": \"base64\",\n \"body\": \"ewogICJjb21waWxlck9wdGlvbnMiOiB7CiAgICAidGFyZ2V0IjogIkVTMjAyMCIsCiAgICAidXNlRGVmaW5lRm9yQ2xhc3NGaWVsZHMiOiB0cnVlLAogICAgImxpYiI6IFsiRVMyMDIwIiwgIkRPTSIsICJET00uSXRlcmFibGUiXSwKICAgICJtb2R1bGUiOiAiRVNOZXh0IiwKICAgICJza2lwTGliQ2hlY2siOiB0cnVlLAoKICAgIC8qIEJ1bmRsZXIgbW9kZSAqLwogICAgIm1vZHVsZVJlc29sdXRpb24iOiAiYnVuZGxlciIsCiAgICAiYWxsb3dJbXBvcnRpbmdUc0V4dGVuc2lvbnMiOiB0cnVlLAogICAgInJlc29sdmVKc29uTW9kdWxlIjogdHJ1ZSwKICAgICJpc29sYXRlZE1vZHVsZXMiOiB0cnVlLAogICAgIm5vRW1pdCI6IHRydWUsCiAgICAianN4IjogInJlYWN0LWpzeCIsCgogICAgLyogTGludGluZyAqLwogICAgInN0cmljdCI6IHRydWUsCiAgICAibm9VbnVzZWRMb2NhbHMiOiB0cnVlLAogICAgIm5vVW51c2VkUGFyYW1ldGVycyI6IHRydWUsCiAgICAibm9GYWxsdGhyb3VnaENhc2VzSW5Td2l0Y2giOiB0cnVlCiAgfSwKICAiaW5jbHVkZSI6IFsic3JjIl0sCiAgInJlZmVyZW5jZXMiOiBbeyAicGF0aCI6ICIuL3RzY29uZmlnLm5vZGUuanNvbiIgfV0KfQo=\"\n}], [\"tsconfig.node.json\", {\n \"type\": \"base64\",\n \"body\": \"ewogICJjb21waWxlck9wdGlvbnMiOiB7CiAgICAiY29tcG9zaXRlIjogdHJ1ZSwKICAgICJza2lwTGliQ2hlY2siOiB0cnVlLAogICAgIm1vZHVsZSI6ICJFU05leHQiLAogICAgIm1vZHVsZVJlc29sdXRpb24iOiAiYnVuZGxlciIsCiAgICAiYWxsb3dTeW50aGV0aWNEZWZhdWx0SW1wb3J0cyI6IHRydWUKICB9LAogICJpbmNsdWRlIjogWyJ2aXRlLmNvbmZpZy50cyJdCn0K\"\n}], [\"vite.config.ts.hbs\", {\n type: \"raw\",\n body: `import foundryWidgetPlugin from \"@osdk/widget.vite-plugin.unstable\";\nimport react from \"@vitejs/plugin-react\";\nimport { defineConfig } from \"vite\";\n\n// https://vitejs.dev/config/\nexport default defineConfig({\n plugins: [react(), foundryWidgetPlugin()],\n server: {\n port: 8080,\n cors: true,\n },\n build: {\n rollupOptions: {\n input: [\"./index.html\"],\n },\n },\n});\n`\n}]]);"]}
|
|
@@ -118,8 +118,8 @@ dist-ssr
|
|
|
118
118
|
"@eslint/js": "^9.13.0",
|
|
119
119
|
"@types/react": "^18",
|
|
120
120
|
"@types/react-dom": "^18",
|
|
121
|
-
"@typescript-eslint/eslint-plugin": "^8.
|
|
122
|
-
"@typescript-eslint/parser": "^8.
|
|
121
|
+
"@typescript-eslint/eslint-plugin": "^8.28.0",
|
|
122
|
+
"@typescript-eslint/parser": "^8.28.0",
|
|
123
123
|
"@vitejs/plugin-react": "^4.2.0",
|
|
124
124
|
"eslint": "^9.19.0",
|
|
125
125
|
"eslint-plugin-import": "^2.31.0",
|
|
@@ -129,8 +129,8 @@ dist-ssr
|
|
|
129
129
|
"eslint-plugin-react-refresh": "^0.4.14",
|
|
130
130
|
"globals": "^15.11.0",
|
|
131
131
|
"typescript": "~5.5.4",
|
|
132
|
-
"typescript-eslint": "^8.
|
|
133
|
-
"vite": "^6.0.
|
|
132
|
+
"typescript-eslint": "^8.28.0",
|
|
133
|
+
"vite": "^6.0.12",
|
|
134
134
|
"vitest": "^3.0.5"
|
|
135
135
|
}
|
|
136
136
|
}`
|
|
@@ -383,5 +383,5 @@ export default defineConfig({
|
|
|
383
383
|
}]]);
|
|
384
384
|
|
|
385
385
|
export { files };
|
|
386
|
-
//# sourceMappingURL=esm-
|
|
387
|
-
//# sourceMappingURL=esm-
|
|
386
|
+
//# sourceMappingURL=esm-VLIVI2T6.js.map
|
|
387
|
+
//# sourceMappingURL=esm-VLIVI2T6.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../create-widget.template.react.v2/build/esm/generatedNoCheck/index.js"],"names":[],"mappings":";AAAO,IAAM,KAAQ,mBAAA,IAAI,GAAI,CAAA,CAAC,CAAC,eAAiB,EAAA;AAAA,EAC9C,IAAM,EAAA,KAAA;AAAA,EACN,IAAM,EAAA,CAAA;;AAAA;;AAAA;;AAAA;;AAAA;AAAA;AAAA;;;AAAA;;AAAA;;AAAA;;AAAA;AAAA;AAAA;;AAAA;;AAAA;;AAAA;AAAA;AAAA;;AAAA;;AAAA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AA0CR,CAAC,CAAA,EAAG,CAAC,YAAc,EAAA;AAAA,EACjB,IAAM,EAAA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AA;AAAA;AAAA;AAmBR,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;AAkBR,CAAC,CAAC,CAAC","file":"esm-C6MU7DAZ.js","sourcesContent":["export const files = new Map([[\"README.md.hbs\", {\n type: \"raw\",\n body: `# {{project}}\n\nThis project was generated with [\\`@osdk/create-widget\\`](https://www.npmjs.com/package/@osdk/create-widget) and demonstrates developing custom widgets to be embedded within Foundry UIs such as Workshop. It uses the Ontology SDK package \\`{{osdkPackage}}\\` with React on top of Vite. Check out the [Vite](https://vitejs.dev/guide/) docs for further configuration. The Vite plugin [\\`@osdk/widget.vite-plugin.unstable\\`](https://www.npmjs.com/package/@osdk/widget.vite-plugin.unstable) automatically generates a \\`widgets.config.json\\` manifest file containing metadata about widgets inside this project during the build command.\n\n## Developing\n\nRun the following command or equivalent with your preferred package manager to start a local development server and follow the instructions printed to set up developer mode in Foundry:\n\n\\`\\`\\`sh\nnpm run dev\n\\`\\`\\`\n\n\n## Deploying\n\nA \\`foundry.config.json\\` file is included in the root of this project containing the deployment configuration to Foundry.\n\nRun the following command or equivalent with your preferred package manager to create a production build of your widgets:\n\n\\`\\`\\`sh\nnpm run build\n\\`\\`\\`\n\nA \\`.palantir/widgets.config.json\\` manifest file containing metadata about your widgets is created during the build.\n\nRun the following command or equivalent with your preferred package manager to deploy the production build of your widgets:\n\n\\`\\`\\`sh\nnpx @osdk/cli@beta unstable widgetset deploy\n\\`\\`\\`\n\nBy default the \\`package-json\\` strategy is used for determining the version for your widgets from the \\`version\\` field in this project's \\`package.json\\` file. Remember to update this field and rerun the build command to update the manifest file when deploying a new version.\n\nIf you prefer to infer the version from a git tag, you can use the \\`git-describe\\` strategy by setting the \\`autoVersion\\` field in the \\`foundry.config.json\\` file to:\n\n\\`\\`\\`json\n{\n \"type\": \"git-describe\",\n \"tagPrefix\": \"\"\n}\n\\`\\`\\`\n`\n}], [\".gitignore\", {\n type: \"raw\",\n body: `# Logs\nlogs\n*.log\nnpm-debug.log*\nyarn-debug.log*\nyarn-error.log*\npnpm-debug.log*\nlerna-debug.log*\n\nnode_modules\ndist\ndist-ssr\n*.local\n\n# Editor directories and files\n.vscode/*\n!.vscode/extensions.json\n.idea\n.DS_Store\n*.suo\n*.ntvs*\n*.njsproj\n*.sln\n*.sw?\n`\n}], [\"eslint.config.mjs\", {\n \"type\": \"base64\",\n \"body\": \"Ly8gQHRzLWNoZWNrCmltcG9ydCBlc2xpbnQgZnJvbSAiQGVzbGludC9qcyI7CmltcG9ydCB0c1BhcnNlciBmcm9tICJAdHlwZXNjcmlwdC1lc2xpbnQvcGFyc2VyIjsKaW1wb3J0ICogYXMgaW1wb3J0UGx1Z2luIGZyb20gImVzbGludC1wbHVnaW4taW1wb3J0IjsKaW1wb3J0IGpzeEExMXlQbHVnaW4gZnJvbSAiZXNsaW50LXBsdWdpbi1qc3gtYTExeSI7CmltcG9ydCByZWFjdFBsdWdpbiBmcm9tICJlc2xpbnQtcGx1Z2luLXJlYWN0IjsKaW1wb3J0IHJlYWN0SG9va3NQbHVnaW4gZnJvbSAiZXNsaW50LXBsdWdpbi1yZWFjdC1ob29rcyI7CmltcG9ydCByZWFjdFJlZnJlc2ggZnJvbSAiZXNsaW50LXBsdWdpbi1yZWFjdC1yZWZyZXNoIjsKaW1wb3J0IGdsb2JhbHMgZnJvbSAiZ2xvYmFscyI7CmltcG9ydCB0c2VzbGludCBmcm9tICJ0eXBlc2NyaXB0LWVzbGludCI7CgpleHBvcnQgZGVmYXVsdCB0c2VzbGludC5jb25maWcoewogIGZpbGVzOiBbImVzbGludC5jb25maWcubWpzIiwgInNyYy8qKi8qLntqcyxtanMsY2pzLHRzLGpzeCx0c3h9Il0sCiAgc2V0dGluZ3M6IHsKICAgIHJlYWN0OiB7CiAgICAgIHZlcnNpb246ICJkZXRlY3QiLAogICAgfSwKCiAgICAiaW1wb3J0L3Jlc29sdmVyIjogewogICAgICBub2RlOiB7CiAgICAgICAgZXh0ZW5zaW9uczogWyIuanMiLCAiLmpzeCIsICIudHMiLCAiLnRzeCJdLAogICAgICB9LAogICAgfSwKICB9LAogIGxhbmd1YWdlT3B0aW9uczogewogICAgZ2xvYmFsczogewogICAgICAuLi5nbG9iYWxzLmJyb3dzZXIsCiAgICB9LAoKICAgIHBhcnNlcjogdHNQYXJzZXIsCiAgfSwKICBleHRlbmRzOiBbCiAgICBlc2xpbnQuY29uZmlncy5yZWNvbW1lbmRlZCwKICAgIC4uLnRzZXNsaW50LmNvbmZpZ3MucmVjb21tZW5kZWQsCiAgXSwKICBwbHVnaW5zOiB7CiAgICAicmVhY3QiOiAvKiogQHR5cGUgaW1wb3J0KCJlc2xpbnQiKS5FU0xpbnQuUGx1Z2luICovIChyZWFjdFBsdWdpbiksCiAgICAicmVhY3QtcmVmcmVzaCI6IHJlYWN0UmVmcmVzaCwKICAgICJyZWFjdC1ob29rcyI6CiAgICAgIC8qKiBAdHlwZSBpbXBvcnQoImVzbGludCIpLkVTTGludC5QbHVnaW4gKi8gKHJlYWN0SG9va3NQbHVnaW4pLAogICAgImpzeC1hMTF5IjoganN4QTExeVBsdWdpbiwKICAgICJpbXBvcnQiOiBpbXBvcnRQbHVnaW4sCiAgfSwKICBydWxlczogewogICAgLi4uKAogICAgICAvKiogQHR5cGUgaW1wb3J0KCJlc2xpbnQiKS5MaW50ZXIuUnVsZXNSZWNvcmQgKi8KICAgICAgKHJlYWN0UGx1Z2luLmNvbmZpZ3MuZmxhdD8ucmVjb21tZW5kZWQucnVsZXMpCiAgICApLAogICAgInJlYWN0LWhvb2tzL3J1bGVzLW9mLWhvb2tzIjogImVycm9yIiwKICAgICJyZWFjdC1ob29rcy9leGhhdXN0aXZlLWRlcHMiOiAid2FybiIsCiAgICAuLi5qc3hBMTF5UGx1Z2luLmNvbmZpZ3MucmVjb21tZW5kZWQucnVsZXMsCiAgICAicmVhY3QtcmVmcmVzaC9vbmx5LWV4cG9ydC1jb21wb25lbnRzIjogWyJ3YXJuIiwgewogICAgICBhbGxvd0NvbnN0YW50RXhwb3J0OiB0cnVlLAogICAgfV0sCgogICAgImltcG9ydC9uYW1lZCI6ICJlcnJvciIsCiAgICAiaW1wb3J0L2RlZmF1bHQiOiAiZXJyb3IiLAogICAgImltcG9ydC9uYW1lc3BhY2UiOiAiZXJyb3IiLAogICAgImltcG9ydC9uby1kdXBsaWNhdGVzIjogImVycm9yIiwKICAgICJpbXBvcnQvbm8tZXh0cmFuZW91cy1kZXBlbmRlbmNpZXMiOiAiZXJyb3IiLAoKICAgICJyZWFjdC9yZWFjdC1pbi1qc3gtc2NvcGUiOiAib2ZmIiwKICB9LAp9KTsK\"\n}], [\"index.html\", {\n type: \"raw\",\n body: `<!doctype html>\n<html lang=\"en\">\n <head>\n <meta charset=\"UTF-8\" />\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n <title>Widget: Ontology SDK + React</title>\n </head>\n <body>\n <script type=\"module\" src=\"/src/main.tsx\"></script>\n </body>\n</html>\n`\n}], [\"package.json.hbs\", {\n type: \"raw\",\n body: `{\n \"name\": \"{{project}}\",\n \"private\": true,\n \"version\": \"0.0.0\",\n \"type\": \"module\",\n \"scripts\": {\n \"dev\": \"vite\",\n \"build\": \"tsc && vite build\",\n \"lint\": \"eslint . --report-unused-disable-directives --max-warnings 0\",\n \"test\": \"vitest run --passWithNoTests\",\n \"preview\": \"vite preview\"\n },\n \"dependencies\": {\n \"{{osdkPackage}}\": \"latest\",\n \"@osdk/client\": \"^2.0.0\",\n \"@osdk/widget.client-react.unstable\": \"^1.1.0\",\n \"@osdk/widget.client.unstable\": \"^1.1.0\",\n \"@radix-ui/react-icons\": \"^1.3.1\",\n \"@radix-ui/themes\": \"^3.1.4\",\n \"react\": \"^18\",\n \"react-dom\": \"^18\",\n \"react-router-dom\": \"^6.23.1\"\n },\n \"devDependencies\": {\n \"@osdk/widget.vite-plugin.unstable\": \"^1.1.0\",\n \"@eslint/compat\": \"^1.2.1\",\n \"@eslint/js\": \"^9.13.0\",\n \"@types/react\": \"^18\",\n \"@types/react-dom\": \"^18\",\n \"@typescript-eslint/eslint-plugin\": \"^8.21.0\",\n \"@typescript-eslint/parser\": \"^8.21.0\",\n \"@vitejs/plugin-react\": \"^4.2.0\",\n \"eslint\": \"^9.19.0\",\n \"eslint-plugin-import\": \"^2.31.0\",\n \"eslint-plugin-jsx-a11y\": \"^6.10.1\",\n \"eslint-plugin-react\": \"^7.37.2\",\n \"eslint-plugin-react-hooks\": \"^5.0.0\",\n \"eslint-plugin-react-refresh\": \"^0.4.14\",\n \"globals\": \"^15.11.0\",\n \"typescript\": \"~5.5.4\",\n \"typescript-eslint\": \"^8.21.0\",\n \"vite\": \"^6.0.11\",\n \"vitest\": \"^3.0.5\"\n }\n}`\n}], [\"src/Widget.tsx.hbs\", {\n type: \"raw\",\n body: `import { \\$Actions, \\$Objects, \\$Queries } from \"{{osdkPackage}}\";\nimport {\n Box,\n Button,\n Checkbox,\n Container,\n Flex,\n Heading,\n Skeleton,\n Table,\n Text,\n TextField,\n} from \"@radix-ui/themes\";\nimport React, { useCallback, useState } from \"react\";\nimport { useWidgetContext } from \"./context.js\";\n\nexport const Widget: React.FC = () => {\n const { parameters, emitEvent } = useWidgetContext();\n const { headerText, todoItems } = parameters.values;\n const [newTodoItem, setNewTodoItem] = useState(\"\");\n\n const handleAddTodoItem = useCallback(() => {\n emitEvent(\"updateTodoItems\", {\n parameterUpdates: {\n todoItems: [...(todoItems ?? []), newTodoItem],\n },\n });\n setNewTodoItem(\"\");\n }, [emitEvent, newTodoItem, todoItems]);\n\n const handleNewTodoItemChange = useCallback(\n (event: React.ChangeEvent<HTMLInputElement>) => {\n setNewTodoItem(event.target.value);\n },\n []\n );\n\n const objectApiNames = Object.keys(\\$Objects);\n const actionApiNames = Object.keys(\\$Actions);\n const queryApiNames = Object.keys(\\$Queries);\n\n return (\n <Box>\n <Container size=\"1\">\n <Flex direction=\"column\" gap=\"4\">\n <Flex p=\"5\" direction=\"column\" gap=\"2\">\n <Heading size=\"4\">\n {parameters.state === \"loading\"\n || parameters.state === \"not-started\"\n ? <Skeleton>Hello, world!</Skeleton>\n : headerText ?? \"{{project}}\"}\n </Heading>\n\n <Table.Root>\n <Table.Header>\n <Table.Row>\n <Table.ColumnHeaderCell>Finished</Table.ColumnHeaderCell>\n <Table.ColumnHeaderCell>Item</Table.ColumnHeaderCell>\n </Table.Row>\n </Table.Header>\n\n <Table.Body>\n {(parameters.state === \"loading\"\n || parameters.state === \"not-started\") && (\n <>\n <Table.Row>\n <Table.Cell>\n <Skeleton>\n <Checkbox />\n </Skeleton>\n </Table.Cell>\n <Table.Cell>\n <Skeleton>Loading cell</Skeleton>\n </Table.Cell>\n </Table.Row>\n <Table.Row>\n <Table.Cell>\n <Skeleton>\n <Checkbox />\n </Skeleton>\n </Table.Cell>\n <Table.Cell>\n <Skeleton>Loading cell</Skeleton>\n </Table.Cell>\n </Table.Row>\n </>\n )}\n {parameters.state === \"loaded\"\n && todoItems?.map((item, index) => (\n <Table.Row key={index}>\n <Table.Cell>\n <Checkbox />\n </Table.Cell>\n <Table.Cell>{item}</Table.Cell>\n </Table.Row>\n ))}\n {parameters.state === \"loaded\"\n && (todoItems ?? []).length === 0 && (\n <Table.Row>\n <Table.Cell colSpan={2}>No items yet</Table.Cell>\n </Table.Row>\n )}\n <Table.Row>\n <Table.Cell colSpan={2}>\n <Flex gap=\"2\">\n <TextField.Root\n value={newTodoItem}\n onChange={handleNewTodoItemChange}\n size=\"2\"\n placeholder=\"Add item…\"\n />\n <Button onClick={handleAddTodoItem}>Add item</Button>\n </Flex>\n </Table.Cell>\n </Table.Row>\n </Table.Body>\n </Table.Root>\n\n </Flex>\n <Box>\n <Flex direction=\"column\" gap=\"2\">\n <Text>\n Try and of the following methods from your Ontology SDK\n </Text>\n <Flex direction=\"column\" gap=\"1\">\n <Heading size=\"4\">Objects ({objectApiNames.length})</Heading>\n <pre>\n {objectApiNames.map((objectApiName) => (\n <div key={objectApiName}>client({objectApiName})</div>\n ))}\n </pre>\n </Flex>\n <Flex direction=\"column\" gap=\"1\">\n <Heading size=\"4\">Actions ({actionApiNames.length})</Heading>\n <pre>\n {actionApiNames.map((actionApiName) => (\n <div key={actionApiName}>client({actionApiName})</div>\n ))}\n </pre>\n </Flex>\n <Flex direction=\"column\" gap=\"1\">\n <Heading size=\"4\">Queries ({queryApiNames.length})</Heading>\n <pre>\n {queryApiNames.map((queryApiName) => (\n <div key={queryApiName}>client({queryApiName})</div>\n ))}\n </pre>\n </Flex>\n </Flex>\n </Box>\n </Flex>\n </Container>\n </Box>\n );\n};\n`\n}], [\"src/context.ts\", {\n \"type\": \"base64\",\n \"body\": \"aW1wb3J0IHsgdXNlRm91bmRyeVdpZGdldENvbnRleHQgfSBmcm9tICJAb3Nkay93aWRnZXQuY2xpZW50LXJlYWN0LnVuc3RhYmxlIjsKaW1wb3J0IHR5cGUgTWFpbkNvbmZpZyBmcm9tICIuL21haW4uY29uZmlnLmpzIjsKCmV4cG9ydCBjb25zdCB1c2VXaWRnZXRDb250ZXh0ID0gdXNlRm91bmRyeVdpZGdldENvbnRleHQud2l0aFR5cGVzPAogIHR5cGVvZiBNYWluQ29uZmlnCj4oKTsK\"\n}], [\"src/main.config.ts.hbs\", {\n type: \"raw\",\n body: `import { defineConfig } from \"@osdk/widget.client.unstable\";\n\nexport default defineConfig({\n id: \"widgetId\",\n name: \"Custom Widget\",\n description: \"An example custom widget implementation\",\n type: \"workshop\",\n parameters: {\n headerText: {\n displayName: \"Widget title\",\n type: \"string\",\n },\n todoItems: {\n displayName: \"Todo items\",\n type: \"array\",\n subType: \"string\",\n },\n },\n events: {\n updateHeader: {\n displayName: \"Update header\",\n parameterUpdateIds: [\"headerText\"],\n },\n updateTodoItems: {\n displayName: \"Update todo items\",\n parameterUpdateIds: [\"todoItems\"],\n },\n },\n});\n`\n}], [\"src/main.css\", {\n \"type\": \"base64\",\n \"body\": \"\"\n}], [\"src/main.tsx\", {\n type: \"raw\",\n body: `import \"@radix-ui/themes/styles.css\";\nimport \"./main.css\";\n\nimport { FoundryWidget } from \"@osdk/widget.client-react.unstable\";\nimport { Theme } from \"@radix-ui/themes\";\nimport { createRoot } from \"react-dom/client\";\nimport MainConfig from \"./main.config.js\";\nimport { Widget } from \"./Widget.js\";\n\nconst root = document.querySelector(\"body\")!;\n\ncreateRoot(root).render(\n <Theme>\n <FoundryWidget config={MainConfig}>\n <Widget />\n </FoundryWidget>\n </Theme>,\n);\n`\n}], [\"src/vite-env.d.ts\", {\n \"type\": \"base64\",\n \"body\": \"Ly8vIDxyZWZlcmVuY2UgdHlwZXM9InZpdGUvY2xpZW50IiAvPgo=\"\n}], [\"tsconfig.json\", {\n \"type\": \"base64\",\n \"body\": \"ewogICJjb21waWxlck9wdGlvbnMiOiB7CiAgICAidGFyZ2V0IjogIkVTMjAyMCIsCiAgICAidXNlRGVmaW5lRm9yQ2xhc3NGaWVsZHMiOiB0cnVlLAogICAgImxpYiI6IFsiRVMyMDIwIiwgIkRPTSIsICJET00uSXRlcmFibGUiXSwKICAgICJtb2R1bGUiOiAiRVNOZXh0IiwKICAgICJza2lwTGliQ2hlY2siOiB0cnVlLAoKICAgIC8qIEJ1bmRsZXIgbW9kZSAqLwogICAgIm1vZHVsZVJlc29sdXRpb24iOiAiYnVuZGxlciIsCiAgICAiYWxsb3dJbXBvcnRpbmdUc0V4dGVuc2lvbnMiOiB0cnVlLAogICAgInJlc29sdmVKc29uTW9kdWxlIjogdHJ1ZSwKICAgICJpc29sYXRlZE1vZHVsZXMiOiB0cnVlLAogICAgIm5vRW1pdCI6IHRydWUsCiAgICAianN4IjogInJlYWN0LWpzeCIsCgogICAgLyogTGludGluZyAqLwogICAgInN0cmljdCI6IHRydWUsCiAgICAibm9VbnVzZWRMb2NhbHMiOiB0cnVlLAogICAgIm5vVW51c2VkUGFyYW1ldGVycyI6IHRydWUsCiAgICAibm9GYWxsdGhyb3VnaENhc2VzSW5Td2l0Y2giOiB0cnVlCiAgfSwKICAiaW5jbHVkZSI6IFsic3JjIl0sCiAgInJlZmVyZW5jZXMiOiBbeyAicGF0aCI6ICIuL3RzY29uZmlnLm5vZGUuanNvbiIgfV0KfQo=\"\n}], [\"tsconfig.node.json\", {\n \"type\": \"base64\",\n \"body\": \"ewogICJjb21waWxlck9wdGlvbnMiOiB7CiAgICAiY29tcG9zaXRlIjogdHJ1ZSwKICAgICJza2lwTGliQ2hlY2siOiB0cnVlLAogICAgIm1vZHVsZSI6ICJFU05leHQiLAogICAgIm1vZHVsZVJlc29sdXRpb24iOiAiYnVuZGxlciIsCiAgICAiYWxsb3dTeW50aGV0aWNEZWZhdWx0SW1wb3J0cyI6IHRydWUKICB9LAogICJpbmNsdWRlIjogWyJ2aXRlLmNvbmZpZy50cyJdCn0K\"\n}], [\"vite.config.ts.hbs\", {\n type: \"raw\",\n body: `import foundryWidgetPlugin from \"@osdk/widget.vite-plugin.unstable\";\nimport react from \"@vitejs/plugin-react\";\nimport { defineConfig } from \"vite\";\n\n// https://vitejs.dev/config/\nexport default defineConfig({\n plugins: [react(), foundryWidgetPlugin()],\n server: {\n port: 8080,\n cors: true,\n },\n build: {\n rollupOptions: {\n input: [\"./index.html\"],\n },\n },\n});\n`\n}]]);"]}
|
|
1
|
+
{"version":3,"sources":["../../../create-widget.template.react.v2/build/esm/generatedNoCheck/index.js"],"names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AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AA8BR,CAAC,CAAA,EAAG,CAAC,cAAgB,EAAA;AAAA,EACnB,MAAQ,EAAA,QAAA;AAAA,EACR,MAAQ,EAAA;AACV,CAAC,CAAA,EAAG,CAAC,cAAgB,EAAA;AAAA,EACnB,IAAM,EAAA,KAAA;AAAA,EACN,IAAM,EAAA,CAAA;AAAA;;AAAA;AAAA;AAAA;AAAA;AAAA;;AAAA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAmBR,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;AAkBR,CAAC,CAAC,CAAC","file":"esm-VLIVI2T6.js","sourcesContent":["export const files = new Map([[\"README.md.hbs\", {\n type: \"raw\",\n body: `# {{project}}\n\nThis project was generated with [\\`@osdk/create-widget\\`](https://www.npmjs.com/package/@osdk/create-widget) and demonstrates developing custom widgets to be embedded within Foundry UIs such as Workshop. It uses the Ontology SDK package \\`{{osdkPackage}}\\` with React on top of Vite. Check out the [Vite](https://vitejs.dev/guide/) docs for further configuration. The Vite plugin [\\`@osdk/widget.vite-plugin.unstable\\`](https://www.npmjs.com/package/@osdk/widget.vite-plugin.unstable) automatically generates a \\`widgets.config.json\\` manifest file containing metadata about widgets inside this project during the build command.\n\n## Developing\n\nRun the following command or equivalent with your preferred package manager to start a local development server and follow the instructions printed to set up developer mode in Foundry:\n\n\\`\\`\\`sh\nnpm run dev\n\\`\\`\\`\n\n\n## Deploying\n\nA \\`foundry.config.json\\` file is included in the root of this project containing the deployment configuration to Foundry.\n\nRun the following command or equivalent with your preferred package manager to create a production build of your widgets:\n\n\\`\\`\\`sh\nnpm run build\n\\`\\`\\`\n\nA \\`.palantir/widgets.config.json\\` manifest file containing metadata about your widgets is created during the build.\n\nRun the following command or equivalent with your preferred package manager to deploy the production build of your widgets:\n\n\\`\\`\\`sh\nnpx @osdk/cli@beta unstable widgetset deploy\n\\`\\`\\`\n\nBy default the \\`package-json\\` strategy is used for determining the version for your widgets from the \\`version\\` field in this project's \\`package.json\\` file. Remember to update this field and rerun the build command to update the manifest file when deploying a new version.\n\nIf you prefer to infer the version from a git tag, you can use the \\`git-describe\\` strategy by setting the \\`autoVersion\\` field in the \\`foundry.config.json\\` file to:\n\n\\`\\`\\`json\n{\n \"type\": \"git-describe\",\n \"tagPrefix\": \"\"\n}\n\\`\\`\\`\n`\n}], [\".gitignore\", {\n type: \"raw\",\n body: `# Logs\nlogs\n*.log\nnpm-debug.log*\nyarn-debug.log*\nyarn-error.log*\npnpm-debug.log*\nlerna-debug.log*\n\nnode_modules\ndist\ndist-ssr\n*.local\n\n# Editor directories and files\n.vscode/*\n!.vscode/extensions.json\n.idea\n.DS_Store\n*.suo\n*.ntvs*\n*.njsproj\n*.sln\n*.sw?\n`\n}], [\"eslint.config.mjs\", {\n \"type\": \"base64\",\n \"body\": \"Ly8gQHRzLWNoZWNrCmltcG9ydCBlc2xpbnQgZnJvbSAiQGVzbGludC9qcyI7CmltcG9ydCB0c1BhcnNlciBmcm9tICJAdHlwZXNjcmlwdC1lc2xpbnQvcGFyc2VyIjsKaW1wb3J0ICogYXMgaW1wb3J0U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xpbnQuUGx1Z2luICovIChyZWFjdFBsdWdpbiksCiAgICAicmVhY3QtcmVmcmVzaCI6IHJlYWN0UmVmcmVzaCwKICAgICJyZWFjdC1ob29rcyI6CiAgICAgIC8qKiBAdHlwZSBpbXBvcnQoImVzbGludCIpLkVTTGludC5QbHVnaW4gKi8gKHJlYWN0SG9va3NQbHVnaW4pLAogICAgImpzeC1hMTF5IjoganN4QTExeVBsdWdpbiwKICAgICJpbXBvcnQiOiBpbXBvcnRQbHVnaW4sCiAgfSwKICBydWxlczogewogICAgLi4uKAogICAgICAvKiogQHR5cGUgaW1wb3J0KCJlc2xpbnQiKS5MaW50ZXIuUnVsZXNSZWNvcmQgKi8KICAgICAgKHJlYWN0UGx1Z2luLmNvbmZpZ3MuZmxhdD8ucmVjb21tZW5kZWQucnVsZXMpCiAgICApLAogICAgInJlYWN0LWhvb2tzL3J1bGVzLW9mLWhvb2tzIjogImVycm9yIiwKICAgICJyZWFjdC1ob29rcy9leGhhdXN0aXZlLWRlcHMiOiAid2FybiIsCiAgICAuLi5qc3hBMTF5UGx1Z2luLmNvbmZpZ3MucmVjb21tZW5kZWQucnVsZXMsCiAgICAicmVhY3QtcmVmcmVzaC9vbmx5LWV4cG9ydC1jb21wb25lbnRzIjogWyJ3YXJuIiwgewogICAgICBhbGxvd0NvbnN0YW50RXhwb3J0OiB0cnVlLAogICAgfV0sCgogICAgImltcG9ydC9uYW1lZCI6ICJlcnJvciIsCiAgICAiaW1wb3J0L2RlZmF1bHQiOiAiZXJyb3IiLAogICAgImltcG9ydC9uYW1lc3BhY2UiOiAiZXJyb3IiLAogICAgImltcG9ydC9uby1kdXBsaWNhdGVzIjogImVycm9yIiwKICAgICJpbXBvcnQvbm8tZXh0cmFuZW91cy1kZXBlbmRlbmNpZXMiOiAiZXJyb3IiLAoKICAgICJyZWFjdC9yZWFjdC1pbi1qc3gtc2NvcGUiOiAib2ZmIiwKICB9LAp9KTsK\"\n}], [\"index.html\", {\n type: \"raw\",\n body: `<!doctype html>\n<html lang=\"en\">\n <head>\n <meta charset=\"UTF-8\" />\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n <title>Widget: Ontology SDK + React</title>\n </head>\n <body>\n <script type=\"module\" src=\"/src/main.tsx\"></script>\n </body>\n</html>\n`\n}], [\"package.json.hbs\", {\n type: \"raw\",\n body: `{\n \"name\": \"{{project}}\",\n \"private\": true,\n \"version\": \"0.0.0\",\n \"type\": \"module\",\n \"scripts\": {\n \"dev\": \"vite\",\n \"build\": \"tsc && vite build\",\n \"lint\": \"eslint . --report-unused-disable-directives --max-warnings 0\",\n \"test\": \"vitest run --passWithNoTests\",\n \"preview\": \"vite preview\"\n },\n \"dependencies\": {\n \"{{osdkPackage}}\": \"latest\",\n \"@osdk/client\": \"^2.0.0\",\n \"@osdk/widget.client-react.unstable\": \"^1.1.0\",\n \"@osdk/widget.client.unstable\": \"^1.1.0\",\n \"@radix-ui/react-icons\": \"^1.3.1\",\n \"@radix-ui/themes\": \"^3.1.4\",\n \"react\": \"^18\",\n \"react-dom\": \"^18\",\n \"react-router-dom\": \"^6.23.1\"\n },\n \"devDependencies\": {\n \"@osdk/widget.vite-plugin.unstable\": \"^1.1.0\",\n \"@eslint/compat\": \"^1.2.1\",\n \"@eslint/js\": \"^9.13.0\",\n \"@types/react\": \"^18\",\n \"@types/react-dom\": \"^18\",\n \"@typescript-eslint/eslint-plugin\": \"^8.28.0\",\n \"@typescript-eslint/parser\": \"^8.28.0\",\n \"@vitejs/plugin-react\": \"^4.2.0\",\n \"eslint\": \"^9.19.0\",\n \"eslint-plugin-import\": \"^2.31.0\",\n \"eslint-plugin-jsx-a11y\": \"^6.10.1\",\n \"eslint-plugin-react\": \"^7.37.2\",\n \"eslint-plugin-react-hooks\": \"^5.0.0\",\n \"eslint-plugin-react-refresh\": \"^0.4.14\",\n \"globals\": \"^15.11.0\",\n \"typescript\": \"~5.5.4\",\n \"typescript-eslint\": \"^8.28.0\",\n \"vite\": \"^6.0.12\",\n \"vitest\": \"^3.0.5\"\n }\n}`\n}], [\"src/Widget.tsx.hbs\", {\n type: \"raw\",\n body: `import { \\$Actions, \\$Objects, \\$Queries } from \"{{osdkPackage}}\";\nimport {\n Box,\n Button,\n Checkbox,\n Container,\n Flex,\n Heading,\n Skeleton,\n Table,\n Text,\n TextField,\n} from \"@radix-ui/themes\";\nimport React, { useCallback, useState } from \"react\";\nimport { useWidgetContext } from \"./context.js\";\n\nexport const Widget: React.FC = () => {\n const { parameters, emitEvent } = useWidgetContext();\n const { headerText, todoItems } = parameters.values;\n const [newTodoItem, setNewTodoItem] = useState(\"\");\n\n const handleAddTodoItem = useCallback(() => {\n emitEvent(\"updateTodoItems\", {\n parameterUpdates: {\n todoItems: [...(todoItems ?? []), newTodoItem],\n },\n });\n setNewTodoItem(\"\");\n }, [emitEvent, newTodoItem, todoItems]);\n\n const handleNewTodoItemChange = useCallback(\n (event: React.ChangeEvent<HTMLInputElement>) => {\n setNewTodoItem(event.target.value);\n },\n []\n );\n\n const objectApiNames = Object.keys(\\$Objects);\n const actionApiNames = Object.keys(\\$Actions);\n const queryApiNames = Object.keys(\\$Queries);\n\n return (\n <Box>\n <Container size=\"1\">\n <Flex direction=\"column\" gap=\"4\">\n <Flex p=\"5\" direction=\"column\" gap=\"2\">\n <Heading size=\"4\">\n {parameters.state === \"loading\"\n || parameters.state === \"not-started\"\n ? <Skeleton>Hello, world!</Skeleton>\n : headerText ?? \"{{project}}\"}\n </Heading>\n\n <Table.Root>\n <Table.Header>\n <Table.Row>\n <Table.ColumnHeaderCell>Finished</Table.ColumnHeaderCell>\n <Table.ColumnHeaderCell>Item</Table.ColumnHeaderCell>\n </Table.Row>\n </Table.Header>\n\n <Table.Body>\n {(parameters.state === \"loading\"\n || parameters.state === \"not-started\") && (\n <>\n <Table.Row>\n <Table.Cell>\n <Skeleton>\n <Checkbox />\n </Skeleton>\n </Table.Cell>\n <Table.Cell>\n <Skeleton>Loading cell</Skeleton>\n </Table.Cell>\n </Table.Row>\n <Table.Row>\n <Table.Cell>\n <Skeleton>\n <Checkbox />\n </Skeleton>\n </Table.Cell>\n <Table.Cell>\n <Skeleton>Loading cell</Skeleton>\n </Table.Cell>\n </Table.Row>\n </>\n )}\n {parameters.state === \"loaded\"\n && todoItems?.map((item, index) => (\n <Table.Row key={index}>\n <Table.Cell>\n <Checkbox />\n </Table.Cell>\n <Table.Cell>{item}</Table.Cell>\n </Table.Row>\n ))}\n {parameters.state === \"loaded\"\n && (todoItems ?? []).length === 0 && (\n <Table.Row>\n <Table.Cell colSpan={2}>No items yet</Table.Cell>\n </Table.Row>\n )}\n <Table.Row>\n <Table.Cell colSpan={2}>\n <Flex gap=\"2\">\n <TextField.Root\n value={newTodoItem}\n onChange={handleNewTodoItemChange}\n size=\"2\"\n placeholder=\"Add item…\"\n />\n <Button onClick={handleAddTodoItem}>Add item</Button>\n </Flex>\n </Table.Cell>\n </Table.Row>\n </Table.Body>\n </Table.Root>\n\n </Flex>\n <Box>\n <Flex direction=\"column\" gap=\"2\">\n <Text>\n Try and of the following methods from your Ontology SDK\n </Text>\n <Flex direction=\"column\" gap=\"1\">\n <Heading size=\"4\">Objects ({objectApiNames.length})</Heading>\n <pre>\n {objectApiNames.map((objectApiName) => (\n <div key={objectApiName}>client({objectApiName})</div>\n ))}\n </pre>\n </Flex>\n <Flex direction=\"column\" gap=\"1\">\n <Heading size=\"4\">Actions ({actionApiNames.length})</Heading>\n <pre>\n {actionApiNames.map((actionApiName) => (\n <div key={actionApiName}>client({actionApiName})</div>\n ))}\n </pre>\n </Flex>\n <Flex direction=\"column\" gap=\"1\">\n <Heading size=\"4\">Queries ({queryApiNames.length})</Heading>\n <pre>\n {queryApiNames.map((queryApiName) => (\n <div key={queryApiName}>client({queryApiName})</div>\n ))}\n </pre>\n </Flex>\n </Flex>\n </Box>\n </Flex>\n </Container>\n </Box>\n );\n};\n`\n}], [\"src/context.ts\", {\n \"type\": \"base64\",\n \"body\": \"aW1wb3J0IHsgdXNlRm91bmRyeVdpZGdldENvbnRleHQgfSBmcm9tICJAb3Nkay93aWRnZXQuY2xpZW50LXJlYWN0LnVuc3RhYmxlIjsKaW1wb3J0IHR5cGUgTWFpbkNvbmZpZyBmcm9tICIuL21haW4uY29uZmlnLmpzIjsKCmV4cG9ydCBjb25zdCB1c2VXaWRnZXRDb250ZXh0ID0gdXNlRm91bmRyeVdpZGdldENvbnRleHQud2l0aFR5cGVzPAogIHR5cGVvZiBNYWluQ29uZmlnCj4oKTsK\"\n}], [\"src/main.config.ts.hbs\", {\n type: \"raw\",\n body: `import { defineConfig } from \"@osdk/widget.client.unstable\";\n\nexport default defineConfig({\n id: \"widgetId\",\n name: \"Custom Widget\",\n description: \"An example custom widget implementation\",\n type: \"workshop\",\n parameters: {\n headerText: {\n displayName: \"Widget title\",\n type: \"string\",\n },\n todoItems: {\n displayName: \"Todo items\",\n type: \"array\",\n subType: \"string\",\n },\n },\n events: {\n updateHeader: {\n displayName: \"Update header\",\n parameterUpdateIds: [\"headerText\"],\n },\n updateTodoItems: {\n displayName: \"Update todo items\",\n parameterUpdateIds: [\"todoItems\"],\n },\n },\n});\n`\n}], [\"src/main.css\", {\n \"type\": \"base64\",\n \"body\": \"\"\n}], [\"src/main.tsx\", {\n type: \"raw\",\n body: `import \"@radix-ui/themes/styles.css\";\nimport \"./main.css\";\n\nimport { FoundryWidget } from \"@osdk/widget.client-react.unstable\";\nimport { Theme } from \"@radix-ui/themes\";\nimport { createRoot } from \"react-dom/client\";\nimport MainConfig from \"./main.config.js\";\nimport { Widget } from \"./Widget.js\";\n\nconst root = document.querySelector(\"body\")!;\n\ncreateRoot(root).render(\n <Theme>\n <FoundryWidget config={MainConfig}>\n <Widget />\n </FoundryWidget>\n </Theme>,\n);\n`\n}], [\"src/vite-env.d.ts\", {\n \"type\": \"base64\",\n \"body\": \"Ly8vIDxyZWZlcmVuY2UgdHlwZXM9InZpdGUvY2xpZW50IiAvPgo=\"\n}], [\"tsconfig.json\", {\n \"type\": \"base64\",\n \"body\": \"ewogICJjb21waWxlck9wdGlvbnMiOiB7CiAgICAidGFyZ2V0IjogIkVTMjAyMCIsCiAgICAidXNlRGVmaW5lRm9yQ2xhc3NGaWVsZHMiOiB0cnVlLAogICAgImxpYiI6IFsiRVMyMDIwIiwgIkRPTSIsICJET00uSXRlcmFibGUiXSwKICAgICJtb2R1bGUiOiAiRVNOZXh0IiwKICAgICJza2lwTGliQ2hlY2siOiB0cnVlLAoKICAgIC8qIEJ1bmRsZXIgbW9kZSAqLwogICAgIm1vZHVsZVJlc29sdXRpb24iOiAiYnVuZGxlciIsCiAgICAiYWxsb3dJbXBvcnRpbmdUc0V4dGVuc2lvbnMiOiB0cnVlLAogICAgInJlc29sdmVKc29uTW9kdWxlIjogdHJ1ZSwKICAgICJpc29sYXRlZE1vZHVsZXMiOiB0cnVlLAogICAgIm5vRW1pdCI6IHRydWUsCiAgICAianN4IjogInJlYWN0LWpzeCIsCgogICAgLyogTGludGluZyAqLwogICAgInN0cmljdCI6IHRydWUsCiAgICAibm9VbnVzZWRMb2NhbHMiOiB0cnVlLAogICAgIm5vVW51c2VkUGFyYW1ldGVycyI6IHRydWUsCiAgICAibm9GYWxsdGhyb3VnaENhc2VzSW5Td2l0Y2giOiB0cnVlCiAgfSwKICAiaW5jbHVkZSI6IFsic3JjIl0sCiAgInJlZmVyZW5jZXMiOiBbeyAicGF0aCI6ICIuL3RzY29uZmlnLm5vZGUuanNvbiIgfV0KfQo=\"\n}], [\"tsconfig.node.json\", {\n \"type\": \"base64\",\n \"body\": \"ewogICJjb21waWxlck9wdGlvbnMiOiB7CiAgICAiY29tcG9zaXRlIjogdHJ1ZSwKICAgICJza2lwTGliQ2hlY2siOiB0cnVlLAogICAgIm1vZHVsZSI6ICJFU05leHQiLAogICAgIm1vZHVsZVJlc29sdXRpb24iOiAiYnVuZGxlciIsCiAgICAiYWxsb3dTeW50aGV0aWNEZWZhdWx0SW1wb3J0cyI6IHRydWUKICB9LAogICJpbmNsdWRlIjogWyJ2aXRlLmNvbmZpZy50cyJdCn0K\"\n}], [\"vite.config.ts.hbs\", {\n type: \"raw\",\n body: `import foundryWidgetPlugin from \"@osdk/widget.vite-plugin.unstable\";\nimport react from \"@vitejs/plugin-react\";\nimport { defineConfig } from \"vite\";\n\n// https://vitejs.dev/config/\nexport default defineConfig({\n plugins: [react(), foundryWidgetPlugin()],\n server: {\n port: 8080,\n cors: true,\n },\n build: {\n rollupOptions: {\n input: [\"./index.html\"],\n },\n },\n});\n`\n}]]);"]}
|
package/build/esm/index.js
CHANGED
|
@@ -160,7 +160,7 @@ var TEMPLATES = [
|
|
|
160
160
|
buildDirectory: "./dist",
|
|
161
161
|
requiresOsdk: true,
|
|
162
162
|
files: {
|
|
163
|
-
"2.x": getPackageFiles(import('./esm-
|
|
163
|
+
"2.x": getPackageFiles(import('./esm-VLIVI2T6.js'))
|
|
164
164
|
}
|
|
165
165
|
},
|
|
166
166
|
// Minimal React
|
|
@@ -171,7 +171,7 @@ var TEMPLATES = [
|
|
|
171
171
|
buildDirectory: "./dist",
|
|
172
172
|
requiresOsdk: false,
|
|
173
173
|
files: {
|
|
174
|
-
"2.x": getPackageFiles(import('./esm-
|
|
174
|
+
"2.x": getPackageFiles(import('./esm-K2BK5VCK.js'))
|
|
175
175
|
}
|
|
176
176
|
}
|
|
177
177
|
];
|
|
@@ -220,12 +220,14 @@ ${italic("(Example: ri.widgetregistry..widget-set.1c66b352-4e00-40d2-995d-061c9d
|
|
|
220
220
|
function generateFoundryConfigJson({
|
|
221
221
|
foundryUrl,
|
|
222
222
|
widgetSet,
|
|
223
|
+
repository,
|
|
223
224
|
directory
|
|
224
225
|
}) {
|
|
225
226
|
return JSON.stringify({
|
|
226
227
|
foundryUrl,
|
|
227
228
|
widgetSet: {
|
|
228
229
|
rid: widgetSet,
|
|
230
|
+
repository,
|
|
229
231
|
directory,
|
|
230
232
|
autoVersion: {
|
|
231
233
|
type: "package-json"
|
|
@@ -255,6 +257,7 @@ async function run({
|
|
|
255
257
|
sdkVersion,
|
|
256
258
|
foundryUrl,
|
|
257
259
|
widgetSet,
|
|
260
|
+
repository,
|
|
258
261
|
osdkPackage,
|
|
259
262
|
osdkRegistryUrl
|
|
260
263
|
}) {
|
|
@@ -332,6 +335,7 @@ async function run({
|
|
|
332
335
|
const foundryConfigJson = generateFoundryConfigJson({
|
|
333
336
|
foundryUrl,
|
|
334
337
|
widgetSet,
|
|
338
|
+
repository,
|
|
335
339
|
directory: template.buildDirectory
|
|
336
340
|
});
|
|
337
341
|
fs2.writeFileSync(path2.join(root, "foundry.config.json"), foundryConfigJson);
|
|
@@ -354,15 +358,12 @@ async function run({
|
|
|
354
358
|
|
|
355
359
|
// src/cli.ts
|
|
356
360
|
async function cli(args = process.argv) {
|
|
357
|
-
const base = yargs(hideBin(args)).version("2.1.0-beta.
|
|
361
|
+
const base = yargs(hideBin(args)).version("2.1.0-beta.6").wrap(Math.min(150, yargs().terminalWidth())).strict().help().command("$0 [project] [--<option>]", "Create a new OSDK widget set based on framework templates. Information may be provided through options to skip interactive prompts.", (yargs2) => yargs2.positional("project", {
|
|
358
362
|
type: "string",
|
|
359
363
|
describe: "Project name to create"
|
|
360
364
|
}).option("overwrite", {
|
|
361
365
|
type: "boolean",
|
|
362
366
|
describe: "Overwrite project directory if already exists"
|
|
363
|
-
}).option("beta", {
|
|
364
|
-
type: "boolean",
|
|
365
|
-
describe: "Use templates compatible with the Beta version of the SDK"
|
|
366
367
|
}).option("template", {
|
|
367
368
|
type: "string",
|
|
368
369
|
describe: "Template name to use"
|
|
@@ -375,6 +376,9 @@ async function cli(args = process.argv) {
|
|
|
375
376
|
}).option("widgetSet", {
|
|
376
377
|
type: "string",
|
|
377
378
|
describe: "Widget set resource identifier (rid)"
|
|
379
|
+
}).option("repository", {
|
|
380
|
+
type: "string",
|
|
381
|
+
describe: "Repository resource identifier (rid)"
|
|
378
382
|
}).option("osdkPackage", {
|
|
379
383
|
type: "string",
|
|
380
384
|
describe: "OSDK package name for application"
|
|
@@ -394,6 +398,7 @@ async function cli(args = process.argv) {
|
|
|
394
398
|
template
|
|
395
399
|
});
|
|
396
400
|
const foundryUrl = await promptFoundryUrl(parsed);
|
|
401
|
+
const repository = parsed.repository;
|
|
397
402
|
const osdkPackage = template.requiresOsdk ? await promptOsdkPackage(parsed) : undefined;
|
|
398
403
|
const osdkRegistryUrl = template.requiresOsdk ? await promptOsdkRegistryUrl(parsed) : undefined;
|
|
399
404
|
const widgetSet = await promptWidgetSetRid(parsed);
|
|
@@ -404,6 +409,7 @@ async function cli(args = process.argv) {
|
|
|
404
409
|
sdkVersion,
|
|
405
410
|
foundryUrl,
|
|
406
411
|
widgetSet,
|
|
412
|
+
repository,
|
|
407
413
|
osdkPackage,
|
|
408
414
|
osdkRegistryUrl
|
|
409
415
|
});
|
package/build/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/consola.ts","../../src/highlight.ts","../../src/prompts/promptFoundryUrl.ts","../../src/prompts/promptOsdkPackage.ts","../../src/prompts/promptOsdkRegistryUrl.ts","../../src/prompts/promptOverwrite.ts","../../src/prompts/promptProject.ts","../../src/prompts/promptSdkVersion.ts","../../src/getPackageFiles.ts","../../src/generatedNoCheck/templates.ts","../../src/prompts/promptTemplate.ts","../../src/prompts/promptWidgetSetRid.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;AAA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AAA,IACtC,GAAG,MAAA;AAAA,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,EAAA,MAAM,cAAc,QAAS,CAAA,YAAA,GAAe,MAAM,iBAAA,CAAkB,MAAM,CAAI,GAAA,SAAA;AAC9E,EAAA,MAAM,kBAAkB,QAAS,CAAA,YAAA,GAAe,MAAM,qBAAA,CAAsB,MAAM,CAAI,GAAA,SAAA;AACtF,EAAM,MAAA,SAAA,GAAY,MAAM,kBAAA,CAAmB,MAAM,CAAA;AACjD,EAAA,MAAM,GAAI,CAAA;AAAA,IACR,OAAA;AAAA,IACA,SAAA;AAAA,IACA,QAAA;AAAA,IACA,UAAA;AAAA,IACA,UAAA;AAAA,IACA,SAAA;AAAA,IACA,WAAA;AAAA,IACA;AAAA,GACD,CAAA;AACH","file":"index.js","sourcesContent":["/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\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 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 { 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 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\";\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 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\";\nimport { italic } from \"../highlight.js\";\nexport async function promptOsdkPackage({\n osdkPackage\n}) {\n while (osdkPackage == null || !/^@[a-z0-9-]+\\/sdk$/.test(osdkPackage)) {\n if (osdkPackage != null) {\n consola.fail(\"Please enter a valid OSDK package name\");\n }\n osdkPackage = await consola.prompt(`Enter the OSDK package name for your widget set:\\n${italic(\"(Example: @my-widget/sdk)\")}`, {\n type: \"text\"\n });\n }\n return osdkPackage;\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\";\nimport { italic } from \"../highlight.js\";\nexport async function promptOsdkRegistryUrl({\n osdkRegistryUrl\n}) {\n while (osdkRegistryUrl == null || !/^https:\\/\\/[^/]+\\/artifacts\\/api\\/repositories\\/ri\\.[^/]+\\/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:\\n${italic(\"(Example: https://example.palantirfoundry.com/artifacts/api/repositories/ri.artifacts.main.repository.a4a7fe1c-486f-4226-b706-7b90005f527d/contents/release/npm)\")}`, {\n type: \"text\"\n });\n }\n return osdkRegistryUrl.replace(/\\/$/, \"\");\n}","/*\n * Copyright 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 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 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\";\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-widget\",\n default: \"my-osdk-widget\"\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\";\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// OSDK React\n{\n id: \"template-widget-react\",\n label: \"OSDK React\",\n envPrefix: \"VITE_\",\n buildDirectory: \"./dist\",\n requiresOsdk: true,\n files: {\n \"2.x\": getPackageFiles(import(\"@osdk/create-widget.template.react.v2\"))\n }\n},\n// Minimal React\n{\n id: \"template-widget-minimal-react\",\n label: \"Minimal React\",\n envPrefix: \"VITE_\",\n buildDirectory: \"./dist\",\n requiresOsdk: false,\n files: {\n \"2.x\": getPackageFiles(import(\"@osdk/create-widget.template.minimal-react.v2\"))\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 { 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 = TEMPLATES.filter(template => !template.hidden && (useBeta ? template.isBeta === true\n // isBeta could be null\n : !template.isBeta));\n if (availableTemplates.length === 0) {\n throw new Error(\"No available templates found for the selected options.\");\n }\n const templateId = await consola.prompt(parsed.template != null ? `The provided template ${green(parsed.template)} is invalid please select a framework:` : \"Select a framework:\", {\n type: \"select\",\n options: availableTemplates.map(template => ({\n value: template.id,\n label: template.label\n }))\n });\n template = TEMPLATES.find(t => t.id === templateId);\n if (template == null) {\n throw new Error(`Template ${templateId} should be found`);\n }\n }\n return template;\n}","/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { consola } from \"../consola.js\";\nimport { italic } from \"../highlight.js\";\nexport async function promptWidgetSetRid({\n widgetSet\n}) {\n while (widgetSet == null || !/^ri\\.widgetregistry\\.\\.widget-set\\.[^.]+$/.test(widgetSet)) {\n if (widgetSet != null) {\n consola.fail(\"Please enter a valid widget resource identifier (rid)\");\n }\n widgetSet = await consola.prompt(`Enter the resource identifier (rid) for your widget set:\\n${italic(\"(Example: ri.widgetregistry..widget-set.1c66b352-4e00-40d2-995d-061c9d533ace)\")}`, {\n type: \"text\"\n });\n }\n return widgetSet;\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 generateFoundryConfigJson({\n foundryUrl,\n widgetSet,\n directory\n}) {\n return JSON.stringify({\n foundryUrl,\n widgetSet: {\n rid: widgetSet,\n directory,\n autoVersion: {\n type: \"package-json\"\n }\n }\n }, null, 2) + \"\\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\nexport function generateNpmRc({\n osdkPackage,\n osdkRegistryUrl\n}) {\n // pnpm requires a trailing slash in .npmrc\n // https://github.com/pnpm/pnpm/issues/5941\n const withTrailingSlash = osdkRegistryUrl.endsWith(\"/\") ? osdkRegistryUrl : osdkRegistryUrl + \"/\";\n const withoutProtocol = withTrailingSlash.replace(/^https:\\/\\//, \"\");\n const packageScope = osdkPackage.split(\"/\")[0];\n return `//${withoutProtocol}:_authToken=\\${FOUNDRY_TOKEN}\\n` + `${packageScope}:registry=${withTrailingSlash}\\n`;\n}","/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport Handlebars from \"handlebars\";\nimport fs from \"node:fs\";\nimport path from \"node:path\";\nimport { consola } from \"./consola.js\";\nimport { 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 widgetSet,\n osdkPackage,\n osdkRegistryUrl\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 templateContext = {\n project,\n osdkPackage\n };\n const processFiles = function (dir) {\n fs.readdirSync(dir).forEach(function (file) {\n file = dir + \"/\" + file;\n const stat = fs.statSync(file);\n if (stat.isDirectory()) {\n processFiles(file);\n return;\n }\n if (file.endsWith(\"/_gitignore\")) {\n fs.renameSync(file, file.replace(/\\/_gitignore$/, \"/.gitignore\"));\n return;\n }\n if (!file.endsWith(\".hbs\")) {\n return;\n }\n const templated = Handlebars.compile(fs.readFileSync(file, \"utf-8\"))(templateContext);\n fs.writeFileSync(file.replace(/.hbs$/, \"\"), templated);\n fs.rmSync(file);\n });\n };\n processFiles(root);\n if (template.requiresOsdk) {\n if (osdkPackage == null || osdkRegistryUrl == null) {\n throw new Error(`Template ${template.id} requires OSDK package and registry URL`);\n }\n const npmRc = generateNpmRc({\n osdkPackage,\n osdkRegistryUrl\n });\n fs.writeFileSync(path.join(root, \".npmrc\"), npmRc);\n }\n const foundryConfigJson = generateFoundryConfigJson({\n foundryUrl,\n widgetSet,\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 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 yargs from \"yargs\";\nimport { hideBin } from \"yargs/helpers\";\nimport { promptFoundryUrl } from \"./prompts/promptFoundryUrl.js\";\nimport { promptOsdkPackage } from \"./prompts/promptOsdkPackage.js\";\nimport { promptOsdkRegistryUrl } from \"./prompts/promptOsdkRegistryUrl.js\";\nimport { promptOverwrite } from \"./prompts/promptOverwrite.js\";\nimport { promptProject } from \"./prompts/promptProject.js\";\nimport { promptSdkVersion } from \"./prompts/promptSdkVersion.js\";\nimport { promptTemplate } from \"./prompts/promptTemplate.js\";\nimport { promptWidgetSetRid } from \"./prompts/promptWidgetSetRid.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 widget set 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(\"widgetSet\", {\n type: \"string\",\n describe: \"Widget set resource identifier (rid)\"\n }).option(\"osdkPackage\", {\n type: \"string\",\n describe: \"OSDK package name for application\"\n }).option(\"osdkRegistryUrl\", {\n type: \"string\",\n describe: \"URL for NPM registry to install OSDK package\"\n }));\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 osdkPackage = template.requiresOsdk ? await promptOsdkPackage(parsed) : undefined;\n const osdkRegistryUrl = template.requiresOsdk ? await promptOsdkRegistryUrl(parsed) : undefined;\n const widgetSet = await promptWidgetSetRid(parsed);\n await run({\n project,\n overwrite,\n template,\n sdkVersion,\n foundryUrl,\n widgetSet,\n osdkPackage,\n osdkRegistryUrl\n });\n}"]}
|
|
1
|
+
{"version":3,"sources":["../../src/consola.ts","../../src/highlight.ts","../../src/prompts/promptFoundryUrl.ts","../../src/prompts/promptOsdkPackage.ts","../../src/prompts/promptOsdkRegistryUrl.ts","../../src/prompts/promptOverwrite.ts","../../src/prompts/promptProject.ts","../../src/prompts/promptSdkVersion.ts","../../src/getPackageFiles.ts","../../src/generatedNoCheck/templates.ts","../../src/prompts/promptTemplate.ts","../../src/prompts/promptWidgetSetRid.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,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EAAA;AAC9B,EAAM,MAAA,OAAA,GAAU,MAAM,aAAA,CAAc,MAAM,CAAA;AAC1C,EAAM,MAAA,SAAA,GAAY,MAAM,eAAgB,CAAA;AAAA,IACtC,GAAG,MAAA;AAAA,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,EAAA,MAAM,aAAa,MAAO,CAAA,UAAA;AAC1B,EAAA,MAAM,cAAc,QAAS,CAAA,YAAA,GAAe,MAAM,iBAAA,CAAkB,MAAM,CAAI,GAAA,SAAA;AAC9E,EAAA,MAAM,kBAAkB,QAAS,CAAA,YAAA,GAAe,MAAM,qBAAA,CAAsB,MAAM,CAAI,GAAA,SAAA;AACtF,EAAM,MAAA,SAAA,GAAY,MAAM,kBAAA,CAAmB,MAAM,CAAA;AACjD,EAAA,MAAM,GAAI,CAAA;AAAA,IACR,OAAA;AAAA,IACA,SAAA;AAAA,IACA,QAAA;AAAA,IACA,UAAA;AAAA,IACA,UAAA;AAAA,IACA,SAAA;AAAA,IACA,UAAA;AAAA,IACA,WAAA;AAAA,IACA;AAAA,GACD,CAAA;AACH","file":"index.js","sourcesContent":["/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\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 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 { 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 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\";\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 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\";\nimport { italic } from \"../highlight.js\";\nexport async function promptOsdkPackage({\n osdkPackage\n}) {\n while (osdkPackage == null || !/^@[a-z0-9-]+\\/sdk$/.test(osdkPackage)) {\n if (osdkPackage != null) {\n consola.fail(\"Please enter a valid OSDK package name\");\n }\n osdkPackage = await consola.prompt(`Enter the OSDK package name for your widget set:\\n${italic(\"(Example: @my-widget/sdk)\")}`, {\n type: \"text\"\n });\n }\n return osdkPackage;\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\";\nimport { italic } from \"../highlight.js\";\nexport async function promptOsdkRegistryUrl({\n osdkRegistryUrl\n}) {\n while (osdkRegistryUrl == null || !/^https:\\/\\/[^/]+\\/artifacts\\/api\\/repositories\\/ri\\.[^/]+\\/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:\\n${italic(\"(Example: https://example.palantirfoundry.com/artifacts/api/repositories/ri.artifacts.main.repository.a4a7fe1c-486f-4226-b706-7b90005f527d/contents/release/npm)\")}`, {\n type: \"text\"\n });\n }\n return osdkRegistryUrl.replace(/\\/$/, \"\");\n}","/*\n * Copyright 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 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 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\";\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-widget\",\n default: \"my-osdk-widget\"\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\";\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// OSDK React\n{\n id: \"template-widget-react\",\n label: \"OSDK React\",\n envPrefix: \"VITE_\",\n buildDirectory: \"./dist\",\n requiresOsdk: true,\n files: {\n \"2.x\": getPackageFiles(import(\"@osdk/create-widget.template.react.v2\"))\n }\n},\n// Minimal React\n{\n id: \"template-widget-minimal-react\",\n label: \"Minimal React\",\n envPrefix: \"VITE_\",\n buildDirectory: \"./dist\",\n requiresOsdk: false,\n files: {\n \"2.x\": getPackageFiles(import(\"@osdk/create-widget.template.minimal-react.v2\"))\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 { 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 = TEMPLATES.filter(template => !template.hidden && (useBeta ? template.isBeta === true\n // isBeta could be null\n : !template.isBeta));\n if (availableTemplates.length === 0) {\n throw new Error(\"No available templates found for the selected options.\");\n }\n const templateId = await consola.prompt(parsed.template != null ? `The provided template ${green(parsed.template)} is invalid please select a framework:` : \"Select a framework:\", {\n type: \"select\",\n options: availableTemplates.map(template => ({\n value: template.id,\n label: template.label\n }))\n });\n template = TEMPLATES.find(t => t.id === templateId);\n if (template == null) {\n throw new Error(`Template ${templateId} should be found`);\n }\n }\n return template;\n}","/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { consola } from \"../consola.js\";\nimport { italic } from \"../highlight.js\";\nexport async function promptWidgetSetRid({\n widgetSet\n}) {\n while (widgetSet == null || !/^ri\\.widgetregistry\\.\\.widget-set\\.[^.]+$/.test(widgetSet)) {\n if (widgetSet != null) {\n consola.fail(\"Please enter a valid widget resource identifier (rid)\");\n }\n widgetSet = await consola.prompt(`Enter the resource identifier (rid) for your widget set:\\n${italic(\"(Example: ri.widgetregistry..widget-set.1c66b352-4e00-40d2-995d-061c9d533ace)\")}`, {\n type: \"text\"\n });\n }\n return widgetSet;\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 generateFoundryConfigJson({\n foundryUrl,\n widgetSet,\n repository,\n directory\n}) {\n return JSON.stringify({\n foundryUrl,\n widgetSet: {\n rid: widgetSet,\n repository,\n directory,\n autoVersion: {\n type: \"package-json\"\n }\n }\n }, null, 2) + \"\\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\nexport function generateNpmRc({\n osdkPackage,\n osdkRegistryUrl\n}) {\n // pnpm requires a trailing slash in .npmrc\n // https://github.com/pnpm/pnpm/issues/5941\n const withTrailingSlash = osdkRegistryUrl.endsWith(\"/\") ? osdkRegistryUrl : osdkRegistryUrl + \"/\";\n const withoutProtocol = withTrailingSlash.replace(/^https:\\/\\//, \"\");\n const packageScope = osdkPackage.split(\"/\")[0];\n return `//${withoutProtocol}:_authToken=\\${FOUNDRY_TOKEN}\\n` + `${packageScope}:registry=${withTrailingSlash}\\n`;\n}","/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport Handlebars from \"handlebars\";\nimport fs from \"node:fs\";\nimport path from \"node:path\";\nimport { consola } from \"./consola.js\";\nimport { 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 widgetSet,\n repository,\n osdkPackage,\n osdkRegistryUrl\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 templateContext = {\n project,\n osdkPackage\n };\n const processFiles = function (dir) {\n fs.readdirSync(dir).forEach(function (file) {\n file = dir + \"/\" + file;\n const stat = fs.statSync(file);\n if (stat.isDirectory()) {\n processFiles(file);\n return;\n }\n if (file.endsWith(\"/_gitignore\")) {\n fs.renameSync(file, file.replace(/\\/_gitignore$/, \"/.gitignore\"));\n return;\n }\n if (!file.endsWith(\".hbs\")) {\n return;\n }\n const templated = Handlebars.compile(fs.readFileSync(file, \"utf-8\"))(templateContext);\n fs.writeFileSync(file.replace(/.hbs$/, \"\"), templated);\n fs.rmSync(file);\n });\n };\n processFiles(root);\n if (template.requiresOsdk) {\n if (osdkPackage == null || osdkRegistryUrl == null) {\n throw new Error(`Template ${template.id} requires OSDK package and registry URL`);\n }\n const npmRc = generateNpmRc({\n osdkPackage,\n osdkRegistryUrl\n });\n fs.writeFileSync(path.join(root, \".npmrc\"), npmRc);\n }\n const foundryConfigJson = generateFoundryConfigJson({\n foundryUrl,\n widgetSet,\n repository,\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 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 yargs from \"yargs\";\nimport { hideBin } from \"yargs/helpers\";\nimport { promptFoundryUrl } from \"./prompts/promptFoundryUrl.js\";\nimport { promptOsdkPackage } from \"./prompts/promptOsdkPackage.js\";\nimport { promptOsdkRegistryUrl } from \"./prompts/promptOsdkRegistryUrl.js\";\nimport { promptOverwrite } from \"./prompts/promptOverwrite.js\";\nimport { promptProject } from \"./prompts/promptProject.js\";\nimport { promptSdkVersion } from \"./prompts/promptSdkVersion.js\";\nimport { promptTemplate } from \"./prompts/promptTemplate.js\";\nimport { promptWidgetSetRid } from \"./prompts/promptWidgetSetRid.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 widget set based on framework templates. Information may be provided through options to skip interactive prompts.\", yargs => yargs.positional(\"project\", {\n type: \"string\",\n describe: \"Project name to create\"\n }).option(\"overwrite\", {\n type: \"boolean\",\n describe: \"Overwrite project directory if already exists\"\n }).option(\"template\", {\n type: \"string\",\n describe: \"Template name to use\"\n }).option(\"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(\"widgetSet\", {\n type: \"string\",\n describe: \"Widget set resource identifier (rid)\"\n }).option(\"repository\", {\n type: \"string\",\n describe: \"Repository resource identifier (rid)\"\n }).option(\"osdkPackage\", {\n type: \"string\",\n describe: \"OSDK package name for application\"\n }).option(\"osdkRegistryUrl\", {\n type: \"string\",\n describe: \"URL for NPM registry to install OSDK package\"\n }));\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 repository = parsed.repository;\n const osdkPackage = template.requiresOsdk ? await promptOsdkPackage(parsed) : undefined;\n const osdkRegistryUrl = template.requiresOsdk ? await promptOsdkRegistryUrl(parsed) : undefined;\n const widgetSet = await promptWidgetSetRid(parsed);\n await run({\n project,\n overwrite,\n template,\n sdkVersion,\n foundryUrl,\n widgetSet,\n repository,\n osdkPackage,\n osdkRegistryUrl\n });\n}"]}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
export declare function generateFoundryConfigJson({ foundryUrl, widgetSet, directory }: {
|
|
1
|
+
export declare function generateFoundryConfigJson({ foundryUrl, widgetSet, repository, directory }: {
|
|
2
2
|
foundryUrl: string
|
|
3
3
|
widgetSet: string
|
|
4
|
+
repository: string | undefined
|
|
4
5
|
directory: string
|
|
5
6
|
}): string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":"AAgBA,OAAO,iBAAS,0BAA0B,EACxC,YACA,WACA,
|
|
1
|
+
{"mappings":"AAgBA,OAAO,iBAAS,0BAA0B,EACxC,YACA,WACA,YACA,WAMD,EALE;CACD;CACA;CACA;CACA;AACD","names":[],"sources":["../../../src/generate/generateFoundryConfigJson.ts"],"version":3,"file":"generateFoundryConfigJson.d.ts"}
|
package/build/types/run.d.ts
CHANGED
|
@@ -6,8 +6,9 @@ interface RunArgs {
|
|
|
6
6
|
sdkVersion: SdkVersion;
|
|
7
7
|
foundryUrl: string;
|
|
8
8
|
widgetSet: string;
|
|
9
|
+
repository: string | undefined;
|
|
9
10
|
osdkPackage?: string;
|
|
10
11
|
osdkRegistryUrl?: string;
|
|
11
12
|
}
|
|
12
|
-
export declare function run({ project, overwrite, template, sdkVersion, foundryUrl, widgetSet, osdkPackage, osdkRegistryUrl }: RunArgs): Promise<void>;
|
|
13
|
+
export declare function run({ project, overwrite, template, sdkVersion, foundryUrl, widgetSet, repository, osdkPackage, osdkRegistryUrl }: RunArgs): Promise<void>;
|
|
13
14
|
export {};
|
package/build/types/run.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":"AAuBA,cAAc,YAAY,gBAAiC,gBAAiB;UAElE,QAAQ;CAChB;CACA;CACA,UAAU;CACV,YAAY;CACZ;CACA;CACA;CACA;AACD;AAED,OAAO,iBAAe,IAAI,EACxB,SACA,WACA,UACA,YACA,YACA,WACA,aACA,iBACQ,EAAP,UAAU","names":[],"sources":["../../src/run.ts"],"version":3,"file":"run.d.ts"}
|
|
1
|
+
{"mappings":"AAuBA,cAAc,YAAY,gBAAiC,gBAAiB;UAElE,QAAQ;CAChB;CACA;CACA,UAAU;CACV,YAAY;CACZ;CACA;CACA;CACA;CACA;AACD;AAED,OAAO,iBAAe,IAAI,EACxB,SACA,WACA,UACA,YACA,YACA,WACA,YACA,aACA,iBACQ,EAAP,UAAU","names":[],"sources":["../../src/run.ts"],"version":3,"file":"run.d.ts"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@osdk/create-widget",
|
|
3
|
-
"version": "2.1.0-beta.
|
|
3
|
+
"version": "2.1.0-beta.6",
|
|
4
4
|
"description": "",
|
|
5
5
|
"access": "public",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -38,11 +38,11 @@
|
|
|
38
38
|
"redent": "^4.0.0",
|
|
39
39
|
"tmp": "^0.2.3",
|
|
40
40
|
"typescript": "~5.5.4",
|
|
41
|
-
"@osdk/create-widget.template.minimal-react.v2": "2.1.0-beta.
|
|
42
|
-
"@osdk/
|
|
43
|
-
"@osdk/generator-utils": "2.2.0-beta.10",
|
|
41
|
+
"@osdk/create-widget.template.minimal-react.v2": "2.1.0-beta.6",
|
|
42
|
+
"@osdk/generator-utils": "2.2.0-beta.13",
|
|
44
43
|
"@osdk/monorepo.api-extractor": "~0.1.0-beta.1",
|
|
45
|
-
"@osdk/monorepo.tsconfig": "~0.1.0-beta.1"
|
|
44
|
+
"@osdk/monorepo.tsconfig": "~0.1.0-beta.1",
|
|
45
|
+
"@osdk/create-widget.template.react.v2": "2.1.0-beta.6"
|
|
46
46
|
},
|
|
47
47
|
"publishConfig": {
|
|
48
48
|
"access": "public"
|