@osdk/create-app 0.16.1 → 0.16.2

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 CHANGED
@@ -1,5 +1,13 @@
1
1
  # @osdk/create-app
2
2
 
3
+ ## 0.16.2
4
+
5
+ ### Patch Changes
6
+
7
+ - 524f1fe: Update global layout styles
8
+ - 524f1fe: Remove platform specific commands in template scripts
9
+ - 524f1fe: React/Vue router respects vite base path
10
+
3
11
  ## 0.16.1
4
12
 
5
13
  ### Patch Changes
@@ -451,7 +451,7 @@ async function run({
451
451
 
452
452
  // src/cli.ts
453
453
  async function cli(args = process.argv) {
454
- const base = yargs(hideBin(args)).version("0.16.1").wrap(Math.min(150, yargs().terminalWidth())).strict().help().command("$0 [project] [--<option>]", "Create a new OSDK application based on framework templates. Information may be provided through options to skip interactive prompts.", (yargs2) => yargs2.positional("project", {
454
+ const base = yargs(hideBin(args)).version("0.16.2").wrap(Math.min(150, yargs().terminalWidth())).strict().help().command("$0 [project] [--<option>]", "Create a new OSDK application based on framework templates. Information may be provided through options to skip interactive prompts.", (yargs2) => yargs2.positional("project", {
455
455
  type: "string",
456
456
  describe: "Project name to create"
457
457
  }).option("overwrite", {
@@ -461,7 +461,7 @@ async function run({
461
461
 
462
462
  // src/cli.ts
463
463
  async function cli(args = process.argv) {
464
- const base = yargs__default.default(helpers.hideBin(args)).version("0.16.1").wrap(Math.min(150, yargs__default.default().terminalWidth())).strict().help().command("$0 [project] [--<option>]", "Create a new OSDK application based on framework templates. Information may be provided through options to skip interactive prompts.", (yargs2) => yargs2.positional("project", {
464
+ const base = yargs__default.default(helpers.hideBin(args)).version("0.16.2").wrap(Math.min(150, yargs__default.default().terminalWidth())).strict().help().command("$0 [project] [--<option>]", "Create a new OSDK application based on framework templates. Information may be provided through options to skip interactive prompts.", (yargs2) => yargs2.positional("project", {
465
465
  type: "string",
466
466
  describe: "Project name to create"
467
467
  }).option("overwrite", {
@@ -451,7 +451,7 @@ async function run({
451
451
 
452
452
  // src/cli.ts
453
453
  async function cli(args = process.argv) {
454
- const base = yargs(hideBin(args)).version("0.16.1").wrap(Math.min(150, yargs().terminalWidth())).strict().help().command("$0 [project] [--<option>]", "Create a new OSDK application based on framework templates. Information may be provided through options to skip interactive prompts.", (yargs2) => yargs2.positional("project", {
454
+ const base = yargs(hideBin(args)).version("0.16.2").wrap(Math.min(150, yargs().terminalWidth())).strict().help().command("$0 [project] [--<option>]", "Create a new OSDK application based on framework templates. Information may be provided through options to skip interactive prompts.", (yargs2) => yargs2.positional("project", {
455
455
  type: "string",
456
456
  describe: "Project name to create"
457
457
  }).option("overwrite", {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@osdk/create-app",
3
- "version": "0.16.1",
3
+ "version": "0.16.2",
4
4
  "description": "",
5
5
  "access": "public",
6
6
  "license": "Apache-2.0",
@@ -13,6 +13,12 @@
13
13
  -moz-osx-font-smoothing: grayscale;
14
14
  }
15
15
 
16
+ #root-container {
17
+ display: flex;
18
+ flex: 1;
19
+ align-items: center;
20
+ }
21
+
16
22
  #root {
17
23
  max-width: 1280px;
18
24
  margin: 0 auto;
@@ -32,7 +38,7 @@ a:hover {
32
38
  body {
33
39
  margin: 0;
34
40
  display: flex;
35
- place-items: center;
41
+ flex-direction: column;
36
42
  min-width: 320px;
37
43
  min-height: 100vh;
38
44
  }
@@ -15,31 +15,33 @@ function RootLayout({ children }: { children: React.ReactNode }) {
15
15
  return (
16
16
  <html lang="en">
17
17
  <body className={inter.className}>
18
- <div id="root">
19
- <a
20
- href="https://www.palantir.com/docs/foundry/ontology-sdk/overview/"
21
- target="_blank"
22
- >
23
- <Image
24
- src="/palantir.svg"
25
- alt="Palantir logo"
26
- className={css.logo}
27
- width={16}
28
- height={16}
29
- priority
30
- />
31
- </a>
32
- <a href="https://nextjs.org/" target="_blank">
33
- <Image
34
- src="/next.svg"
35
- alt="Next logo"
36
- className={css.logo}
37
- width={16}
38
- height={16}
39
- priority
40
- />
41
- </a>
42
- {children}
18
+ <div id="root-container">
19
+ <div id="root">
20
+ <a
21
+ href="https://www.palantir.com/docs/foundry/ontology-sdk/overview/"
22
+ target="_blank"
23
+ >
24
+ <Image
25
+ src="/palantir.svg"
26
+ alt="Palantir logo"
27
+ className={css.logo}
28
+ width={16}
29
+ height={16}
30
+ priority
31
+ />
32
+ </a>
33
+ <a href="https://nextjs.org/" target="_blank">
34
+ <Image
35
+ src="/next.svg"
36
+ alt="Next logo"
37
+ className={css.logo}
38
+ width={16}
39
+ height={16}
40
+ priority
41
+ />
42
+ </a>
43
+ {children}
44
+ </div>
43
45
  </div>
44
46
  </body>
45
47
  </html>
@@ -7,7 +7,9 @@
7
7
  <title>Ontology SDK + React</title>
8
8
  </head>
9
9
  <body>
10
- <div id="root"></div>
10
+ <div id="root-container">
11
+ <div id="root"></div>
12
+ </div>
11
13
  <script type="module" src="/src/main.tsx"></script>
12
14
  </body>
13
15
  </html>
@@ -6,7 +6,7 @@
6
6
  "scripts": {
7
7
  "dev": "vite",
8
8
  "build": "tsc && vite build",
9
- "lint": "ESLINT_USE_FLAT_CONFIG=false eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
9
+ "lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
10
10
  "preview": "vite preview"
11
11
  },
12
12
  "dependencies": {
@@ -13,6 +13,12 @@
13
13
  -moz-osx-font-smoothing: grayscale;
14
14
  }
15
15
 
16
+ #root-container {
17
+ display: flex;
18
+ flex: 1;
19
+ align-items: center;
20
+ }
21
+
16
22
  #root {
17
23
  max-width: 1280px;
18
24
  margin: 0 auto;
@@ -32,7 +38,7 @@ a:hover {
32
38
  body {
33
39
  margin: 0;
34
40
  display: flex;
35
- place-items: center;
41
+ flex-direction: column;
36
42
  min-width: 320px;
37
43
  min-height: 100vh;
38
44
  }
@@ -6,27 +6,30 @@ import Home from "./Home";
6
6
  import Login from "./Login";
7
7
  import "./index.css";
8
8
 
9
- const router = createBrowserRouter([
10
- {
11
- path: "/",
12
- element: <AuthenticatedRoute />,
13
- children: [
14
- {
15
- path: "/",
16
- element: <Home />,
17
- },
18
- ],
19
- },
20
- {
21
- path: "/login",
22
- element: <Login />,
23
- },
24
- {
25
- // This is the route defined in your application's redirect URL
26
- path: "/auth/callback",
27
- element: <AuthCallback />,
28
- },
29
- ]);
9
+ const router = createBrowserRouter(
10
+ [
11
+ {
12
+ path: "/",
13
+ element: <AuthenticatedRoute />,
14
+ children: [
15
+ {
16
+ path: "/",
17
+ element: <Home />,
18
+ },
19
+ ],
20
+ },
21
+ {
22
+ path: "/login",
23
+ element: <Login />,
24
+ },
25
+ {
26
+ // This is the route defined in your application's redirect URL
27
+ path: "/auth/callback",
28
+ element: <AuthCallback />,
29
+ },
30
+ ],
31
+ { basename: import.meta.env.BASE_URL },
32
+ );
30
33
 
31
34
  ReactDOM.createRoot(document.getElementById("root")!).render(
32
35
  <RouterProvider router={router} />,
@@ -7,7 +7,9 @@
7
7
  <title>Ontology SDK Tutorial - Todo App</title>
8
8
  </head>
9
9
  <body>
10
- <div id="root"></div>
10
+ <div id="root-container">
11
+ <div id="root"></div>
12
+ </div>
11
13
  <script type="module" src="/src/main.tsx"></script>
12
14
  </body>
13
15
  </html>
@@ -6,7 +6,7 @@
6
6
  "scripts": {
7
7
  "dev": "vite",
8
8
  "build": "tsc && vite build",
9
- "lint": "ESLINT_USE_FLAT_CONFIG=false eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
9
+ "lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
10
10
  "preview": "vite preview"
11
11
  },
12
12
  "dependencies": {
@@ -13,6 +13,12 @@
13
13
  -moz-osx-font-smoothing: grayscale;
14
14
  }
15
15
 
16
+ #root-container {
17
+ display: flex;
18
+ flex: 1;
19
+ align-items: center;
20
+ }
21
+
16
22
  #root {
17
23
  max-width: 1280px;
18
24
  margin: 2rem auto;
@@ -31,6 +37,7 @@ a:hover {
31
37
  body {
32
38
  margin: 0;
33
39
  display: flex;
40
+ flex-direction: column;
34
41
  min-width: 320px;
35
42
  min-height: 100vh;
36
43
  }
@@ -6,27 +6,30 @@ import Home from "./Home";
6
6
  import Login from "./Login";
7
7
  import "./index.css";
8
8
 
9
- const router = createBrowserRouter([
10
- {
11
- path: "/",
12
- element: <AuthenticatedRoute />,
13
- children: [
14
- {
15
- path: "/",
16
- element: <Home />,
17
- },
18
- ],
19
- },
20
- {
21
- path: "/login",
22
- element: <Login />,
23
- },
24
- {
25
- // This is the route defined in your application's redirect URL
26
- path: "/auth/callback",
27
- element: <AuthCallback />,
28
- },
29
- ]);
9
+ const router = createBrowserRouter(
10
+ [
11
+ {
12
+ path: "/",
13
+ element: <AuthenticatedRoute />,
14
+ children: [
15
+ {
16
+ path: "/",
17
+ element: <Home />,
18
+ },
19
+ ],
20
+ },
21
+ {
22
+ path: "/login",
23
+ element: <Login />,
24
+ },
25
+ {
26
+ // This is the route defined in your application's redirect URL
27
+ path: "/auth/callback",
28
+ element: <AuthCallback />,
29
+ },
30
+ ],
31
+ { basename: import.meta.env.BASE_URL },
32
+ );
30
33
 
31
34
  ReactDOM.createRoot(document.getElementById("root")!).render(
32
35
  <RouterProvider router={router} />,
@@ -7,7 +7,9 @@
7
7
  <title>Ontology SDK + Vue</title>
8
8
  </head>
9
9
  <body>
10
- <div id="app"></div>
10
+ <div id="app-container">
11
+ <div id="app"></div>
12
+ </div>
11
13
  <script type="module" src="/src/main.ts"></script>
12
14
  </body>
13
15
  </html>
@@ -14,21 +14,15 @@ const queryApiNames = Object.keys(client.ontology.queries);
14
14
  <div class="methods">
15
15
  <div>
16
16
  <h2>Objects (\{{ objectApiNames.length }})</h2>
17
- <pre v-for="objectApiName in objectApiNames" key="objectApiName">
18
- client.ontology.objects.\{{ objectApiName }}
19
- </pre>
17
+ <pre v-for="objectApiName in objectApiNames" key="objectApiName">client.ontology.objects.\{{ objectApiName }}</pre>
20
18
  </div>
21
19
  <div>
22
20
  <h2>Actions (\{{ actionApiNames.length }})</h2>
23
- <pre v-for="actionApiName in actionApiNames" key="actionApiName">
24
- client.ontology.actions.\{{ actionApiName }}
25
- </pre>
21
+ <pre v-for="actionApiName in actionApiNames" key="actionApiName">client.ontology.actions.\{{ actionApiName }}</pre>
26
22
  </div>
27
23
  <div>
28
24
  <h2>Queries (\{{ queryApiNames.length }})</h2>
29
- <pre v-for="queryApiName in queryApiNames" key="queryApiName">
30
- client.ontology.queries.\{{ queryApiName }}
31
- </pre>
25
+ <pre v-for="queryApiName in queryApiNames" key="queryApiName">client.ontology.queries.\{{ queryApiName }}</pre>
32
26
  </div>
33
27
  </div>
34
28
  </template>
@@ -14,7 +14,7 @@ const routes = [
14
14
  ];
15
15
 
16
16
  const router = createRouter({
17
- history: createWebHistory(),
17
+ history: createWebHistory(import.meta.env.BASE_URL),
18
18
  routes,
19
19
  });
20
20
 
@@ -13,6 +13,12 @@
13
13
  -moz-osx-font-smoothing: grayscale;
14
14
  }
15
15
 
16
+ #app-container {
17
+ display: flex;
18
+ flex: 1;
19
+ align-items: center;
20
+ }
21
+
16
22
  #app {
17
23
  max-width: 1280px;
18
24
  margin: 0 auto;
@@ -32,7 +38,7 @@ a:hover {
32
38
  body {
33
39
  margin: 0;
34
40
  display: flex;
35
- place-items: center;
41
+ flex-direction: column;
36
42
  min-width: 320px;
37
43
  min-height: 100vh;
38
44
  }