@campfirelearning/sdk-lti
Advanced tools
Comparing version 0.9.2-alpha.2 to 0.10.0
@@ -6,2 +6,13 @@ # Change Log | ||
# [0.10.0](https://github.com/examspark/campfire-sdk/compare/@campfirelearning/sdk-lti@0.9.1...@campfirelearning/sdk-lti@0.10.0) (2024-09-19) | ||
### Features | ||
* pass authority id launch options in results component (ES-1491) ([5e37f2f](https://github.com/examspark/campfire-sdk/commit/5e37f2f79dbbf1ede5933f37689353f5837c996c)) | ||
## [0.9.2-alpha.2](https://github.com/examspark/campfire-sdk/compare/@campfirelearning/sdk-lti@0.9.1...@campfirelearning/sdk-lti@0.9.2-alpha.2) (2024-07-23) | ||
@@ -8,0 +19,0 @@ |
@@ -7,2 +7,7 @@ import { CampfireLTIToolConsumerOptions, LTIToolConsumer } from "./LTIToolConsumer"; | ||
id: string; | ||
launchOptions?: { | ||
userPrefs?: { | ||
objectiveAuthorityIds?: string[]; | ||
}; | ||
}; | ||
}; | ||
@@ -9,0 +14,0 @@ export declare const Events: { |
import { CampfireLTIToolConsumerOptions } from "../LTIToolConsumer"; | ||
export declare const getCampfireApiDomain: (options: CampfireLTIToolConsumerOptions) => `https://${string}`; | ||
export declare const getCampfireApiDomain: (options: CampfireLTIToolConsumerOptions) => `${"https" | "http"}://${string}`; | ||
//# sourceMappingURL=common.d.ts.map |
@@ -1,2 +0,2 @@ | ||
export declare const CAMPFIRE_SDK_VERSION = "0.9.1"; | ||
export declare const CAMPFIRE_SDK_VERSION: any; | ||
//# sourceMappingURL=version.d.ts.map |
@@ -9,5 +9,2 @@ /** @type {import('ts-jest').JestConfigWithTsJest} */ | ||
testEnvironment: "jsdom", | ||
globals: { | ||
CAMPFIRE_SDK_VERSION: "0.0.0-test", | ||
}, | ||
}; |
{ | ||
"name": "@campfirelearning/sdk-lti", | ||
"version": "0.9.2-alpha.2", | ||
"version": "0.10.0", | ||
"main": "./src/index.ts", | ||
@@ -43,3 +43,3 @@ "author": "ExamSpark, LLC", | ||
}, | ||
"gitHead": "36abe81258a3257d9699ec7c0826058f18ab2299" | ||
"gitHead": "11e9b11b62933e8d74fa8d4ad5f55e5af84532f6" | ||
} |
@@ -14,2 +14,7 @@ import { | ||
id: string; | ||
launchOptions?: { | ||
userPrefs?: { | ||
objectiveAuthorityIds?: string[]; | ||
}; | ||
}; | ||
}; | ||
@@ -66,2 +71,10 @@ | ||
const launchUrl = `${domain}/lti/launch/exam/${options.id}`; | ||
const launchOptions = JSON.stringify(options.launchOptions ?? {}); | ||
options.params = { | ||
...options.params, | ||
...basicLTILaunchRequestParams, | ||
launch_options: launchOptions, | ||
}; | ||
super({ ...options, launchUrl }, eventSchema, messageSchema); | ||
@@ -68,0 +81,0 @@ } |
@@ -93,4 +93,4 @@ import { z } from "zod"; | ||
let launchURL = `${domain}/lti/launch/exam-builder-v2`; | ||
if (options.id) launchURL += `/${options.id}`; | ||
let launchUrl = `${domain}/lti/launch/exam-builder-v2`; | ||
if (options.id) launchUrl += `/${options.id}`; | ||
@@ -105,3 +105,3 @@ const launchOptions = JSON.stringify(options.launchOptions ?? {}); | ||
super({ ...options, launchUrl: launchURL }, eventSchema, messageSchema); | ||
super({ ...options, launchUrl }, eventSchema, messageSchema); | ||
} | ||
@@ -108,0 +108,0 @@ |
@@ -5,2 +5,3 @@ import { z } from "zod"; | ||
import { RethrowAsError } from "./util/RethrowAsError"; | ||
import { CAMPFIRE_SDK_VERSION } from "./version"; | ||
@@ -7,0 +8,0 @@ const LTIRequiredLaunchParams = [ |
@@ -5,3 +5,3 @@ import { CampfireLTIToolConsumerOptions } from "../LTIToolConsumer"; | ||
options: CampfireLTIToolConsumerOptions | ||
): `https://${string}` => { | ||
): `${"https" | "http"}://${string}` => { | ||
let domain = options.domain; | ||
@@ -13,2 +13,4 @@ | ||
return domain as `https://${string}`; | ||
} else if (/http?:\/\//.test(domain)) { | ||
return domain as `http://${string}`; | ||
} else { | ||
@@ -15,0 +17,0 @@ return `https://${domain}`; |
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 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 not supported yet
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
314734
7428