@playcademy/sandbox 0.12.0 → 0.12.1-beta.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/dist/config.js CHANGED
@@ -4,29 +4,68 @@ var __getProtoOf = Object.getPrototypeOf;
4
4
  var __defProp = Object.defineProperty;
5
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
6
  var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ function __accessProp(key) {
8
+ return this[key];
9
+ }
10
+ var __toESMCache_node;
11
+ var __toESMCache_esm;
7
12
  var __toESM = (mod, isNodeMode, target) => {
13
+ var canCache = mod != null && typeof mod === "object";
14
+ if (canCache) {
15
+ var cache = isNodeMode ? __toESMCache_node ??= new WeakMap : __toESMCache_esm ??= new WeakMap;
16
+ var cached = cache.get(mod);
17
+ if (cached)
18
+ return cached;
19
+ }
8
20
  target = mod != null ? __create(__getProtoOf(mod)) : {};
9
- const to = isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target;
10
- for (let key of __getOwnPropNames(mod))
11
- if (!__hasOwnProp.call(to, key))
12
- __defProp(to, key, {
13
- get: () => mod[key],
14
- enumerable: true
15
- });
21
+ const to = isNodeMode || !mod || !mod.__esModule || !__hasOwnProp.call(mod, "default") ? __defProp(target, "default", { value: mod, enumerable: true }) : target;
22
+ if (mod && typeof mod === "object" || typeof mod === "function") {
23
+ for (let key of __getOwnPropNames(mod))
24
+ if (!__hasOwnProp.call(to, key))
25
+ __defProp(to, key, {
26
+ get: __accessProp.bind(mod, key),
27
+ enumerable: true
28
+ });
29
+ }
30
+ if (canCache)
31
+ cache.set(mod, to);
16
32
  return to;
17
33
  };
18
34
  var __commonJS = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
35
+ var __returnValue = (v) => v;
36
+ function __exportSetter(name, newValue) {
37
+ this[name] = __returnValue.bind(null, newValue);
38
+ }
19
39
  var __export = (target, all) => {
20
40
  for (var name in all)
21
41
  __defProp(target, name, {
22
42
  get: all[name],
23
43
  enumerable: true,
24
44
  configurable: true,
25
- set: (newValue) => all[name] = () => newValue
45
+ set: __exportSetter.bind(all, name)
26
46
  });
27
47
  };
28
- var __esm = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
48
+ var __esm = (fn, res, err) => () => {
49
+ if (fn)
50
+ try {
51
+ res = fn(fn = 0);
52
+ } catch (e) {
53
+ err = [e];
54
+ }
55
+ if (err)
56
+ throw err[0];
57
+ return res;
58
+ };
29
59
  var __promiseAll = (args) => Promise.all(args);
60
+ var __exportCjs = (target, getters, setters) => {
61
+ for (var name in getters)
62
+ __defProp(target, name, {
63
+ get: getters[name],
64
+ set: setters[name],
65
+ enumerable: true,
66
+ configurable: true
67
+ });
68
+ };
30
69
  var __require = /* @__PURE__ */ createRequire(import.meta.url);
31
70
 
32
71
  // src/config/timeback.ts
@@ -65,14 +104,14 @@ function requireTimebackCredentials() {
65
104
  }
66
105
  const { mode, onerosterApiUrl, caliperApiUrl, clientId, clientSecret, authUrl } = config.timeback;
67
106
  if (mode === "local") {
68
- const missing2 = [];
107
+ const missing = [];
69
108
  if (!onerosterApiUrl) {
70
- missing2.push("TIMEBACK_ONEROSTER_API_URL");
109
+ missing.push("TIMEBACK_ONEROSTER_API_URL");
71
110
  }
72
111
  if (!caliperApiUrl) {
73
- missing2.push("TIMEBACK_CALIPER_API_URL");
112
+ missing.push("TIMEBACK_CALIPER_API_URL");
74
113
  }
75
- throw new Error(`TimeBack local mode missing: ${missing2.join(", ")}`);
114
+ throw new Error(`TimeBack local mode missing: ${missing.join(", ")}`);
76
115
  }
77
116
  const missing = [];
78
117
  if (!onerosterApiUrl) {
@@ -215,12 +254,12 @@ var init_config = __esm(() => {
215
254
  init_config();
216
255
 
217
256
  export {
218
- setEmbeddedMode,
219
- requireTimebackCredentials,
220
- isTimebackEnabled,
221
- hasTimebackFullConfig,
222
- hasTimebackCredentials,
223
- getTimebackDisplayMode,
257
+ config,
224
258
  configureTimeback,
225
- config
259
+ getTimebackDisplayMode,
260
+ hasTimebackCredentials,
261
+ hasTimebackFullConfig,
262
+ isTimebackEnabled,
263
+ requireTimebackCredentials,
264
+ setEmbeddedMode
226
265
  };
package/dist/constants.js CHANGED
@@ -4,29 +4,68 @@ var __getProtoOf = Object.getPrototypeOf;
4
4
  var __defProp = Object.defineProperty;
5
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
6
  var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ function __accessProp(key) {
8
+ return this[key];
9
+ }
10
+ var __toESMCache_node;
11
+ var __toESMCache_esm;
7
12
  var __toESM = (mod, isNodeMode, target) => {
13
+ var canCache = mod != null && typeof mod === "object";
14
+ if (canCache) {
15
+ var cache = isNodeMode ? __toESMCache_node ??= new WeakMap : __toESMCache_esm ??= new WeakMap;
16
+ var cached = cache.get(mod);
17
+ if (cached)
18
+ return cached;
19
+ }
8
20
  target = mod != null ? __create(__getProtoOf(mod)) : {};
9
- const to = isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target;
10
- for (let key of __getOwnPropNames(mod))
11
- if (!__hasOwnProp.call(to, key))
12
- __defProp(to, key, {
13
- get: () => mod[key],
14
- enumerable: true
15
- });
21
+ const to = isNodeMode || !mod || !mod.__esModule || !__hasOwnProp.call(mod, "default") ? __defProp(target, "default", { value: mod, enumerable: true }) : target;
22
+ if (mod && typeof mod === "object" || typeof mod === "function") {
23
+ for (let key of __getOwnPropNames(mod))
24
+ if (!__hasOwnProp.call(to, key))
25
+ __defProp(to, key, {
26
+ get: __accessProp.bind(mod, key),
27
+ enumerable: true
28
+ });
29
+ }
30
+ if (canCache)
31
+ cache.set(mod, to);
16
32
  return to;
17
33
  };
18
34
  var __commonJS = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
35
+ var __returnValue = (v) => v;
36
+ function __exportSetter(name, newValue) {
37
+ this[name] = __returnValue.bind(null, newValue);
38
+ }
19
39
  var __export = (target, all) => {
20
40
  for (var name in all)
21
41
  __defProp(target, name, {
22
42
  get: all[name],
23
43
  enumerable: true,
24
44
  configurable: true,
25
- set: (newValue) => all[name] = () => newValue
45
+ set: __exportSetter.bind(all, name)
26
46
  });
27
47
  };
28
- var __esm = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
48
+ var __esm = (fn, res, err) => () => {
49
+ if (fn)
50
+ try {
51
+ res = fn(fn = 0);
52
+ } catch (e) {
53
+ err = [e];
54
+ }
55
+ if (err)
56
+ throw err[0];
57
+ return res;
58
+ };
29
59
  var __promiseAll = (args) => Promise.all(args);
60
+ var __exportCjs = (target, getters, setters) => {
61
+ for (var name in getters)
62
+ __defProp(target, name, {
63
+ get: getters[name],
64
+ set: setters[name],
65
+ enumerable: true,
66
+ configurable: true
67
+ });
68
+ };
30
69
  var __require = /* @__PURE__ */ createRequire(import.meta.url);
31
70
 
32
71
  // ../constants/src/auth.ts
@@ -330,11 +369,11 @@ var init_constants = __esm(() => {
330
369
  init_constants();
331
370
 
332
371
  export {
333
- SANDBOX_TOKENS,
334
- MOCK_GAME_ID,
335
- DEMO_USER_IDS,
336
- DEMO_USERS,
337
- DEMO_USER,
372
+ DEMO_TOKEN,
338
373
  DEMO_TOKENS,
339
- DEMO_TOKEN
374
+ DEMO_USER,
375
+ DEMO_USERS,
376
+ DEMO_USER_IDS,
377
+ MOCK_GAME_ID,
378
+ SANDBOX_TOKENS
340
379
  };