@campfirelearning/sdk-lti
Advanced tools
Comparing version 0.6.1 to 0.6.2
@@ -6,2 +6,13 @@ # Change Log | ||
## [0.6.2](https://github.com/examspark/campfire-sdk/compare/@campfirelearning/sdk-lti@0.6.1...@campfirelearning/sdk-lti@0.6.2) (2024-05-22) | ||
### Bug Fixes | ||
* launch_options was stringifying to undef ([cc78fe1](https://github.com/examspark/campfire-sdk/commit/cc78fe16b4a2c7dd107feac6c30685132dafc4f8)) | ||
## 0.6.1 (2024-05-15) | ||
@@ -8,0 +19,0 @@ |
@@ -9,3 +9,3 @@ import { AuthoringOptions } from "."; | ||
readonly EXAM_SAVED: "examSaved"; | ||
readonly EXAM_CLOSED: "examClosed"; | ||
readonly EXAM_EDITOR_CLOSED: "examEditorClosed"; | ||
readonly LAUNCHED: "launched"; | ||
@@ -15,11 +15,11 @@ }; | ||
type: z.ZodLiteral<"event">; | ||
name: z.ZodUnion<[z.ZodLiteral<"launched">, z.ZodLiteral<"examModified">, z.ZodLiteral<"examClosed">]>; | ||
name: z.ZodUnion<[z.ZodLiteral<"launched">, z.ZodLiteral<"examModified">, z.ZodLiteral<"examEditorClosed">]>; | ||
data: z.ZodOptional<z.ZodUnknown>; | ||
}, "strip", z.ZodTypeAny, { | ||
type: "event"; | ||
name: "launched" | "examModified" | "examClosed"; | ||
name: "launched" | "examModified" | "examEditorClosed"; | ||
data?: unknown; | ||
}, { | ||
type: "event"; | ||
name: "launched" | "examModified" | "examClosed"; | ||
name: "launched" | "examModified" | "examEditorClosed"; | ||
data?: unknown; | ||
@@ -72,11 +72,11 @@ }>, z.ZodObject<{ | ||
type: z.ZodLiteral<"event">; | ||
name: z.ZodLiteral<"launched">; | ||
name: z.ZodUnion<[z.ZodLiteral<"launched">, z.ZodLiteral<"itemEditorClosed">]>; | ||
data: z.ZodOptional<z.ZodUnknown>; | ||
}, "strip", z.ZodTypeAny, { | ||
type: "event"; | ||
name: "launched"; | ||
name: "launched" | "itemEditorClosed"; | ||
data?: unknown; | ||
}, { | ||
type: "event"; | ||
name: "launched"; | ||
name: "launched" | "itemEditorClosed"; | ||
data?: unknown; | ||
@@ -83,0 +83,0 @@ }>, z.ZodObject<{ |
@@ -10,14 +10,15 @@ import { z } from "zod"; | ||
readonly ITEM_CREATED: "itemCreated"; | ||
readonly ITEM_EDITOR_CLOSED: "itemEditorClosed"; | ||
}; | ||
export declare const itemEditorEventSchema: z.ZodUnion<[z.ZodObject<{ | ||
type: z.ZodLiteral<"event">; | ||
name: z.ZodLiteral<"launched">; | ||
name: z.ZodUnion<[z.ZodLiteral<"launched">, z.ZodLiteral<"itemEditorClosed">]>; | ||
data: z.ZodOptional<z.ZodUnknown>; | ||
}, "strip", z.ZodTypeAny, { | ||
type: "event"; | ||
name: "launched"; | ||
name: "launched" | "itemEditorClosed"; | ||
data?: unknown; | ||
}, { | ||
type: "event"; | ||
name: "launched"; | ||
name: "launched" | "itemEditorClosed"; | ||
data?: unknown; | ||
@@ -24,0 +25,0 @@ }>, z.ZodObject<{ |
{ | ||
"name": "@campfirelearning/sdk-lti", | ||
"version": "0.6.1", | ||
"version": "0.6.2", | ||
"main": "./src/index.ts", | ||
@@ -21,4 +21,4 @@ "author": "ExamSpark, LLC", | ||
"test": "jest", | ||
"link:legacy": "mkdir -p $HOME/.config/yarn/link/@campfirelearning && ln -s $PWD $HOME/.config/yarn/link/@campfirelearning/lti-tool-consumer && echo 'Link registered for yarn@1. You can now run yarn link @campfirelearning/lti-tool-consumer.'", | ||
"unlink:legacy": "rm -f $HOME/.config/yarn/link/@campfirelearning/lti-tool-consumer && echo 'Link unregistered for yarn@1.'" | ||
"link:legacy": "mkdir -p $HOME/.config/yarn/link/@campfirelearning && ln -s $PWD $HOME/.config/yarn/link/@campfirelearning/sdk-lti && echo 'Link registered for yarn@1. You can now run yarn link @campfirelearning/sdk-lti.'", | ||
"unlink:legacy": "rm -f $HOME/.config/yarn/link/@campfirelearning/sdk-lti && echo 'Link unregistered for yarn@1.'" | ||
}, | ||
@@ -45,3 +45,3 @@ "devDependencies": { | ||
}, | ||
"gitHead": "9f0aca14d5c9a0b14c73d2f45e9348d1a93505e4" | ||
"gitHead": "6907845c1e22b5503792931b6f29c023709bf5b6" | ||
} |
@@ -19,3 +19,3 @@ import { AuthoringOptions } from "."; | ||
EXAM_SAVED: "examSaved", | ||
EXAM_CLOSED: "examClosed", | ||
EXAM_EDITOR_CLOSED: "examEditorClosed", | ||
LAUNCHED: "launched", | ||
@@ -30,3 +30,3 @@ } as const; | ||
z.literal(Events.EXAM_MODIFIED), | ||
z.literal(Events.EXAM_CLOSED), | ||
z.literal(Events.EXAM_EDITOR_CLOSED), | ||
]), | ||
@@ -58,3 +58,4 @@ data: z.optional(z.unknown()), | ||
const launchURL = `${domain}/lti/launch/author/exam`; | ||
let launchURL = `${domain}/lti/launch/author/exam`; | ||
if (options.id) launchURL += `/${options.id}`; | ||
@@ -61,0 +62,0 @@ options.params = { |
@@ -18,2 +18,3 @@ import { z } from "zod"; | ||
ITEM_CREATED: "itemCreated", | ||
ITEM_EDITOR_CLOSED: "itemEditorClosed", | ||
} as const; | ||
@@ -24,3 +25,6 @@ | ||
type: z.literal("event"), | ||
name: z.literal(Events.LAUNCHED), | ||
name: z.union([ | ||
z.literal(Events.LAUNCHED), | ||
z.literal(Events.ITEM_EDITOR_CLOSED), | ||
]), | ||
data: z.optional(z.unknown()), | ||
@@ -57,7 +61,4 @@ }), | ||
let launchURL = `${domain}/lti/launch/author/item`; | ||
if (options.id) launchURL += `/${options.id}`; | ||
if (options.id) { | ||
launchURL += `/${options.id}`; | ||
} | ||
options.params = { | ||
@@ -64,0 +65,0 @@ ...options.params, |
@@ -117,3 +117,3 @@ import { z } from "zod"; | ||
const launchOptions = JSON.stringify(options.launch_options); | ||
const launch_options = JSON.stringify(options.launch_options ?? {}); | ||
@@ -123,3 +123,3 @@ options.params = { | ||
...basicLTILaunchRequestParams, | ||
launch_options: launchOptions, | ||
launch_options, | ||
}; | ||
@@ -126,0 +126,0 @@ |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
279589
6549