@osdk/create-app 0.16.0 → 0.16.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # @osdk/create-app
2
2
 
3
+ ## 0.16.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 1ee2d4f: Fix runtime warnings on AipNow template
8
+ - 843f932: update the mock objects to the new TypeScript 1.1.1 syntax version
9
+
3
10
  ## 0.16.0
4
11
 
5
12
  ### Minor 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.0").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.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", {
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.0").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.1").wrap(Math.min(150, yargs__default.default().terminalWidth())).strict().help().command("$0 [project] [--<option>]", "Create a new OSDK application based on framework templates. Information may be provided through options to skip interactive prompts.", (yargs2) => yargs2.positional("project", {
465
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.0").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.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", {
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.0",
3
+ "version": "0.16.1",
4
4
  "description": "",
5
5
  "access": "public",
6
6
  "license": "Apache-2.0",
@@ -39,10 +39,10 @@ function CreateProjectDialog({
39
39
  <Dialog
40
40
  isOpen={isOpen}
41
41
  buttons={[
42
- <button disabled={isCreating} onClick={handleSubmit}>
42
+ <button disabled={isCreating} onClick={handleSubmit} key="create">
43
43
  Create project
44
44
  </button>,
45
- <button disabled={isCreating} onClick={onClose}>
45
+ <button disabled={isCreating} onClick={onClose} key="cancel">
46
46
  Cancel
47
47
  </button>,
48
48
  ]}
@@ -35,10 +35,10 @@ function CreateTaskDialog({ project, isOpen, onClose }: CreateTaskDialogProps) {
35
35
  <Dialog
36
36
  isOpen={isOpen}
37
37
  buttons={[
38
- <button disabled={isCreating} onClick={handleSubmit}>
38
+ <button disabled={isCreating} onClick={handleSubmit} key="create">
39
39
  Create task
40
40
  </button>,
41
- <button disabled={isCreating} onClick={onClose}>
41
+ <button disabled={isCreating} onClick={onClose} key="cancel">
42
42
  Cancel
43
43
  </button>,
44
44
  ]}
@@ -31,10 +31,10 @@ function DeleteProjectDialog({
31
31
  <Dialog
32
32
  isOpen={isOpen}
33
33
  buttons={[
34
- <button disabled={isDeleting} onClick={handleSubmit}>
34
+ <button disabled={isDeleting} onClick={handleSubmit} key="delete">
35
35
  Delete
36
36
  </button>,
37
- <button disabled={isDeleting} onClick={onClose}>
37
+ <button disabled={isDeleting} onClick={onClose} key="cancel">
38
38
  Cancel
39
39
  </button>,
40
40
  ]}
@@ -24,7 +24,7 @@ function ProjectSelect({
24
24
 
25
25
  return (
26
26
  <select value={project?.id} onChange={handleSelect}>
27
- <option hidden disabled selected>
27
+ <option hidden disabled value="">
28
28
  -- select a project --
29
29
  </option>
30
30
 
@@ -1,54 +1,54 @@
1
1
  export interface MockProject {
2
- __apiName: string;
3
- __primaryKey: string;
2
+ $apiName: string;
3
+ $primaryKey: string;
4
4
  id: string;
5
5
  name: string;
6
6
  tasks: MockTask[];
7
7
  }
8
8
 
9
9
  export interface MockTask {
10
- __apiName: string;
11
- __primaryKey: string;
10
+ $apiName: string;
11
+ $primaryKey: string;
12
12
  id: string;
13
13
  title: string;
14
14
  }
15
15
 
16
16
  const projects: MockProject[] = [
17
17
  {
18
- __apiName: "MockProject",
19
- __primaryKey: "1",
18
+ $apiName: "MockProject",
19
+ $primaryKey: "1",
20
20
  id: "1",
21
21
  name: "Fake Project",
22
22
  tasks: [
23
23
  {
24
- __apiName: "MockTask",
25
- __primaryKey: "1",
24
+ $apiName: "MockTask",
25
+ $primaryKey: "1",
26
26
  id: "1",
27
27
  title: "Try to",
28
28
  },
29
29
  {
30
- __apiName: "MockTask",
31
- __primaryKey: "2",
30
+ $apiName: "MockTask",
31
+ $primaryKey: "2",
32
32
  id: "2",
33
33
  title: "Implement this",
34
34
  },
35
35
  {
36
- __apiName: "MockTask",
37
- __primaryKey: "3",
36
+ $apiName: "MockTask",
37
+ $primaryKey: "3",
38
38
  id: "3",
39
39
  title: "With the Ontology SDK!",
40
40
  },
41
41
  ],
42
42
  },
43
43
  {
44
- __apiName: "MockProject",
45
- __primaryKey: "2",
44
+ $apiName: "MockProject",
45
+ $primaryKey: "2",
46
46
  id: "2",
47
47
  name: "Yet Another Fake Project",
48
48
  tasks: [
49
49
  {
50
- __apiName: "MockTask",
51
- __primaryKey: "4",
50
+ $apiName: "MockTask",
51
+ $primaryKey: "4",
52
52
  id: "4",
53
53
  title: "More tasks here",
54
54
  },
@@ -78,12 +78,12 @@ async function createProject({
78
78
  name,
79
79
  }: {
80
80
  name: string;
81
- }): Promise<MockTask["__primaryKey"]> {
81
+ }): Promise<MockTask["$primaryKey"]> {
82
82
  await delay();
83
83
  const id = randomId();
84
84
  projects.push({
85
- __apiName: "MockProject",
86
- __primaryKey: id,
85
+ $apiName: "MockProject",
86
+ $primaryKey: id,
87
87
  id,
88
88
  name,
89
89
  tasks: [],
@@ -105,14 +105,14 @@ async function createTask({
105
105
  }: {
106
106
  title: string;
107
107
  projectId: string;
108
- }): Promise<MockTask["__primaryKey"]> {
108
+ }): Promise<MockTask["$primaryKey"]> {
109
109
  await delay();
110
110
  const project = projects.find((p) => p.id === projectId);
111
111
  if (project == null) {
112
112
  throw new Error(`Project ${projectId} not found!`);
113
113
  }
114
114
  const id = randomId();
115
- project.tasks.unshift({ __apiName: "MockTask", __primaryKey: id, id, title });
115
+ project.tasks.unshift({ $apiName: "MockTask", $primaryKey: id, id, title });
116
116
  return id;
117
117
  }
118
118
 
@@ -16,7 +16,7 @@ export function useProjectTasks(project: MockProject | undefined) {
16
16
 
17
17
  const createTask: (
18
18
  title: string,
19
- ) => Promise<MockTask["__primaryKey"] | undefined> = useCallback(
19
+ ) => Promise<MockTask["$primaryKey"] | undefined> = useCallback(
20
20
  async (title) => {
21
21
  if (project == null) {
22
22
  return undefined;
@@ -24,7 +24,7 @@ export function useProjectTasks(project: MockProject | undefined) {
24
24
  // Try to implement this with the Ontology SDK!
25
25
  const id = await Mocks.createTask({
26
26
  title,
27
- projectId: project.__primaryKey,
27
+ projectId: project.$primaryKey,
28
28
  });
29
29
  await mutate();
30
30
  return id;
@@ -38,7 +38,7 @@ export function useProjectTasks(project: MockProject | undefined) {
38
38
  return;
39
39
  }
40
40
  // Try to implement this with the Ontology SDK!
41
- await Mocks.deleteTask(task.__primaryKey);
41
+ await Mocks.deleteTask(task.$primaryKey);
42
42
  await mutate();
43
43
  },
44
44
  [project, mutate],
@@ -10,7 +10,7 @@ function useProjects() {
10
10
  return Mocks.getProjects();
11
11
  });
12
12
 
13
- const createProject: (name: string) => Promise<MockProject["__primaryKey"]> =
13
+ const createProject: (name: string) => Promise<MockProject["$primaryKey"]> =
14
14
  useCallback(
15
15
  async (name) => {
16
16
  // Try to implement this with the Ontology SDK!
@@ -24,7 +24,7 @@ function useProjects() {
24
24
  const deleteProject: (project: MockProject) => Promise<void> = useCallback(
25
25
  async (project) => {
26
26
  // Try to implement this with the Ontology SDK!
27
- await Mocks.deleteProject(project.__primaryKey);
27
+ await Mocks.deleteProject(project.$primaryKey);
28
28
  await mutate();
29
29
  },
30
30
  [mutate],