Skip to content

Commit

Permalink
Add skiko with version
Browse files Browse the repository at this point in the history
No special error for compose wasm, because we have only one compose server
  • Loading branch information
ilgonmic committed Dec 20, 2024
1 parent 04f24db commit 02e78b9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 21 deletions.
8 changes: 4 additions & 4 deletions src/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,11 @@ export const API_URLS = {
get VERSIONS() {
return `${this.server}/versions`;
},
SKIKO_MJS() {
return `${this.composeServer}/api/resource/skiko.mjs`;
SKIKO_MJS(version) {
return `${this.composeServer}/api/resource/skiko-${version}.mjs`;
},
SKIKO_WASM() {
return `${this.composeServer}/api/resource/skiko.wasm`;
SKIKO_WASM(version) {
return `${this.composeServer}/api/resource/skiko-${version}.wasm`;
},
get JQUERY() {
return `https://cdn.jsdelivr.net/npm/jquery@1/dist/jquery.min.js`;
Expand Down
17 changes: 0 additions & 17 deletions src/webdemo-api.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ export default class WebDemoApi {
const MINIMAL_VERSION_IR = '1.5.0';
const MINIMAL_VERSION_WASM = '1.9.0';
const MINIMAL_VERSION_SWIFT_EXPORT = '2.0.0';
const MAX_VERSION_COMPOSE_EXPORT = '2.0.0';

if (
platform === TargetPlatforms.JS_IR &&
Expand Down Expand Up @@ -90,22 +89,6 @@ export default class WebDemoApi {
});
}

if (
platform === TargetPlatforms.COMPOSE_WASM &&
compilerVersion >= MAX_VERSION_COMPOSE_EXPORT
) {
return Promise.resolve({
output: '',
errors: [
{
severity: 'ERROR',
message: `${TargetPlatforms.COMPOSE_WASM.printableName} compiler backend accessible only less ${MAX_VERSION_COMPOSE_EXPORT} version`,
},
],
jsCode: '',
});
}

if (
platform === TargetPlatforms.SWIFT_EXPORT &&
compilerVersion < MINIMAL_VERSION_SWIFT_EXPORT
Expand Down

0 comments on commit 02e78b9

Please sign in to comment.