Browse Source

Adding Scripting API Extra library

This adds Scripting API Extra library as a dependency and bootstraps the library.
pull/25/head
David Négrier 4 months ago
parent
commit
3cdaf3589e
  1. 103
      package-lock.json
  2. 3
      package.json
  3. 5
      src/index.ts

103
package-lock.json

@ -7,6 +7,9 @@
"": {
"version": "1.0.0",
"license": "MIT",
"dependencies": {
"@workadventure/scripting-api-extra": "^1.0.4"
},
"devDependencies": {
"@workadventure/iframe-api-typings": "^1.4.15",
"eslint": "^7.24.0",
@ -122,6 +125,11 @@
"node": ">=8"
}
},
"node_modules/@fontsource/press-start-2p": {
"version": "4.5.0",
"resolved": "https://registry.npmjs.org/@fontsource/press-start-2p/-/press-start-2p-4.5.0.tgz",
"integrity": "sha512-jxONMLDirtlhFLmVWSWKKUY1m8qSg0JRtKHYXcuYXSGku5psFXzQtsdl6cvsSlWrwugpOYWJrPbswUAM4uxHGg=="
},
"node_modules/@nodelib/fs.scandir": {
"version": "2.1.5",
"resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz",
@ -428,6 +436,26 @@
"integrity": "sha512-p4o5SE7lvK0n8IZVDr27rFRQqFmNm5vRkflC/Mod85JISqX5TjoWJlzh9/1YBWGJbrVhHs3zy/AvsDyFNkS9+Q==",
"dev": true
},
"node_modules/@workadventure/scripting-api-extra": {
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/@workadventure/scripting-api-extra/-/scripting-api-extra-1.0.4.tgz",
"integrity": "sha512-ExUH4Xm65yWhzOKRQidLTkHgXgRHcUS5+hdipD4Totr5prm0gO98B2M7lrcI7r21H+xNtBYjhWvYSHwCCMOgDg==",
"dependencies": {
"@fontsource/press-start-2p": "^4.5.0",
"@workadventure/tiled-map-type-guard": "^1.0.2",
"mustache": "^4.2.0",
"nes.css": "^2.3.0",
"play-dtmf": "^0.1.1"
}
},
"node_modules/@workadventure/tiled-map-type-guard": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/@workadventure/tiled-map-type-guard/-/tiled-map-type-guard-1.0.2.tgz",
"integrity": "sha512-RCtygGV5y9cb7QoyGMINBE9arM5pyXjkxvXgA5uXEv4GDbXKorhFim/rHgwbVR+eFnVF3rDgWbRnk3DIaHt+lQ==",
"dependencies": {
"generic-type-guard": "^3.4.1"
}
},
"node_modules/@xtuc/ieee754": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/@xtuc/ieee754/-/ieee754-1.2.0.tgz",
@ -1989,6 +2017,15 @@
"integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=",
"dev": true
},
"node_modules/generic-type-guard": {
"version": "3.4.1",
"resolved": "https://registry.npmjs.org/generic-type-guard/-/generic-type-guard-3.4.1.tgz",
"integrity": "sha512-sXce0Lz3Wfy2rR1W8O8kUemgEriTeG1x8shqSJeWGb0FwJu2qBEkB1M2qXbdSLmpgDnHcIXo0Dj/1VLNJkK/QA==",
"funding": {
"type": "individual",
"url": "https://github.com/sponsors/mscharley"
}
},
"node_modules/get-intrinsic": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.1.tgz",
@ -3069,6 +3106,14 @@
"integrity": "sha1-iZ8R2WhuXgXLkbNdXw5jt3PPyQE=",
"dev": true
},
"node_modules/mustache": {
"version": "4.2.0",
"resolved": "https://registry.npmjs.org/mustache/-/mustache-4.2.0.tgz",
"integrity": "sha512-71ippSywq5Yb7/tVYyGbkBggbU8H3u5Rz56fH60jGFgr8uHwxs+aSKeqmluIVzM0m0kB7xQjKS6qPfd0b2ZoqQ==",
"bin": {
"mustache": "bin/mustache"
}
},
"node_modules/natural-compare": {
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz",
@ -3090,6 +3135,14 @@
"integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==",
"dev": true
},
"node_modules/nes.css": {
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/nes.css/-/nes.css-2.3.0.tgz",
"integrity": "sha512-lCFZs9vj3f5RVdbvTL/kSxiYsOARwSeAdJaMNo+bCgmWOO9x8ay7QpT4yQVKHy3r5Dttzd0uqVdpt3fvvx6EpQ==",
"engines": {
"node": "10.x"
}
},
"node_modules/no-case": {
"version": "3.0.4",
"resolved": "https://registry.npmjs.org/no-case/-/no-case-3.0.4.tgz",
@ -3480,6 +3533,11 @@
"node": ">=8"
}
},
"node_modules/play-dtmf": {
"version": "0.1.1",
"resolved": "https://registry.npmjs.org/play-dtmf/-/play-dtmf-0.1.1.tgz",
"integrity": "sha1-0Rh4mwujM2VQEM7r8dKAdnbX0ys="
},
"node_modules/portfinder": {
"version": "1.0.28",
"resolved": "https://registry.npmjs.org/portfinder/-/portfinder-1.0.28.tgz",
@ -5094,6 +5152,11 @@
}
}
},
"@fontsource/press-start-2p": {
"version": "4.5.0",
"resolved": "https://registry.npmjs.org/@fontsource/press-start-2p/-/press-start-2p-4.5.0.tgz",
"integrity": "sha512-jxONMLDirtlhFLmVWSWKKUY1m8qSg0JRtKHYXcuYXSGku5psFXzQtsdl6cvsSlWrwugpOYWJrPbswUAM4uxHGg=="
},
"@nodelib/fs.scandir": {
"version": "2.1.5",
"resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz",
@ -5378,6 +5441,26 @@
"integrity": "sha512-p4o5SE7lvK0n8IZVDr27rFRQqFmNm5vRkflC/Mod85JISqX5TjoWJlzh9/1YBWGJbrVhHs3zy/AvsDyFNkS9+Q==",
"dev": true
},
"@workadventure/scripting-api-extra": {
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/@workadventure/scripting-api-extra/-/scripting-api-extra-1.0.4.tgz",
"integrity": "sha512-ExUH4Xm65yWhzOKRQidLTkHgXgRHcUS5+hdipD4Totr5prm0gO98B2M7lrcI7r21H+xNtBYjhWvYSHwCCMOgDg==",
"requires": {
"@fontsource/press-start-2p": "^4.5.0",
"@workadventure/tiled-map-type-guard": "^1.0.2",
"mustache": "^4.2.0",
"nes.css": "^2.3.0",
"play-dtmf": "^0.1.1"
}
},
"@workadventure/tiled-map-type-guard": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/@workadventure/tiled-map-type-guard/-/tiled-map-type-guard-1.0.2.tgz",
"integrity": "sha512-RCtygGV5y9cb7QoyGMINBE9arM5pyXjkxvXgA5uXEv4GDbXKorhFim/rHgwbVR+eFnVF3rDgWbRnk3DIaHt+lQ==",
"requires": {
"generic-type-guard": "^3.4.1"
}
},
"@xtuc/ieee754": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/@xtuc/ieee754/-/ieee754-1.2.0.tgz",
@ -6650,6 +6733,11 @@
"integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=",
"dev": true
},
"generic-type-guard": {
"version": "3.4.1",
"resolved": "https://registry.npmjs.org/generic-type-guard/-/generic-type-guard-3.4.1.tgz",
"integrity": "sha512-sXce0Lz3Wfy2rR1W8O8kUemgEriTeG1x8shqSJeWGb0FwJu2qBEkB1M2qXbdSLmpgDnHcIXo0Dj/1VLNJkK/QA=="
},
"get-intrinsic": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.1.tgz",
@ -7488,6 +7576,11 @@
"integrity": "sha1-iZ8R2WhuXgXLkbNdXw5jt3PPyQE=",
"dev": true
},
"mustache": {
"version": "4.2.0",
"resolved": "https://registry.npmjs.org/mustache/-/mustache-4.2.0.tgz",
"integrity": "sha512-71ippSywq5Yb7/tVYyGbkBggbU8H3u5Rz56fH60jGFgr8uHwxs+aSKeqmluIVzM0m0kB7xQjKS6qPfd0b2ZoqQ=="
},
"natural-compare": {
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz",
@ -7506,6 +7599,11 @@
"integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==",
"dev": true
},
"nes.css": {
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/nes.css/-/nes.css-2.3.0.tgz",
"integrity": "sha512-lCFZs9vj3f5RVdbvTL/kSxiYsOARwSeAdJaMNo+bCgmWOO9x8ay7QpT4yQVKHy3r5Dttzd0uqVdpt3fvvx6EpQ=="
},
"no-case": {
"version": "3.0.4",
"resolved": "https://registry.npmjs.org/no-case/-/no-case-3.0.4.tgz",
@ -7802,6 +7900,11 @@
"find-up": "^4.0.0"
}
},
"play-dtmf": {
"version": "0.1.1",
"resolved": "https://registry.npmjs.org/play-dtmf/-/play-dtmf-0.1.1.tgz",
"integrity": "sha1-0Rh4mwujM2VQEM7r8dKAdnbX0ys="
},
"portfinder": {
"version": "1.0.28",
"resolved": "https://registry.npmjs.org/portfinder/-/portfinder-1.0.28.tgz",

3
package.json

@ -21,5 +21,8 @@
"test": "ts-node node_modules/jasmine/bin/jasmine --config=jasmine.json",
"lint": "node_modules/.bin/eslint src/ . --ext .ts",
"fix": "node_modules/.bin/eslint --fix src/ . --ext .ts"
},
"dependencies": {
"@workadventure/scripting-api-extra": "^1.0.4"
}
}

5
src/index.ts

@ -1,5 +1,10 @@
/// <reference path="../node_modules/@workadventure/iframe-api-typings/iframe_api.d.ts" />
import {bootstrapExtra} from "@workadventure/scripting-api-extra";
// The line below bootstraps the Scripting API Extra library that adds a number of advanced properties/features to WorkAdventure.
bootstrapExtra().catch(e => console.error(e));
let currentPopup: any = undefined;
const today = new Date();
const time = today.getHours() + ":" + today.getMinutes();

Loading…
Cancel
Save