@team-monolith/pxt-core 0.1.8 → 0.2.0

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/built/pxt.js CHANGED
@@ -98404,7 +98404,7 @@ var pxt;
98404
98404
  headers["authorization"] = `mkcd ${authToken}`;
98405
98405
  }
98406
98406
  */
98407
- const token = pxt.codle.getCookieToken();
98407
+ const token = pxt.cookie.getCookieToken();
98408
98408
  if (token) {
98409
98409
  headers["Authorization"] = `Bearer ${token}`;
98410
98410
  }
@@ -120943,13 +120943,15 @@ var pxt;
120943
120943
  */
120944
120944
  var pxt;
120945
120945
  (function (pxt) {
120946
- var codle;
120947
- (function (codle) {
120946
+ var cookie;
120947
+ (function (cookie_1) {
120948
+ /**
120949
+ * document.cookie에서 name에 해당하는 쿠키 값을 가져옵니다.
120950
+ */
120948
120951
  function getCookie(name) {
120949
- let matches = document.cookie.match(new RegExp("(?:^|; )" +
120950
- name.replace(/([\.$?*|{}\(\)\[\]\\\/\+^])/g, "\\$1") +
120951
- "=([^;]*)"));
120952
- return matches ? decodeURIComponent(matches[1]) : undefined;
120952
+ const cookies = document.cookie.split("; ");
120953
+ const cookie = cookies.find((cookie) => cookie.startsWith(name + "="));
120954
+ return cookie ? decodeURIComponent(cookie.split("=")[1]) : undefined;
120953
120955
  }
120954
120956
  function getEnv() {
120955
120957
  return window.location.hostname === "localhost"
@@ -120958,7 +120960,7 @@ var pxt;
120958
120960
  ? "dev"
120959
120961
  : "prd";
120960
120962
  }
120961
- codle.getEnv = getEnv;
120963
+ cookie_1.getEnv = getEnv;
120962
120964
  function getCookieName(name) {
120963
120965
  if (window.location.hostname === "localhost") {
120964
120966
  return `${name}_localhost_local`;
@@ -120966,12 +120968,12 @@ var pxt;
120966
120968
  const tenant = window.location.hostname.split(".")[1];
120967
120969
  return `${name}_${tenant}_${getEnv()}`;
120968
120970
  }
120969
- codle.getCookieName = getCookieName;
120971
+ cookie_1.getCookieName = getCookieName;
120970
120972
  function getCookieToken() {
120971
120973
  return getCookie(getCookieName("token"));
120972
120974
  }
120973
- codle.getCookieToken = getCookieToken;
120974
- })(codle = pxt.codle || (pxt.codle = {}));
120975
+ cookie_1.getCookieToken = getCookieToken;
120976
+ })(cookie = pxt.cookie || (pxt.cookie = {}));
120975
120977
  })(pxt || (pxt = {}));
120976
120978
  // TODO: add a macro facility to make 8-bit assembly easier?
120977
120979
  var ts;
package/built/pxtlib.d.ts CHANGED
@@ -3496,7 +3496,7 @@ declare namespace pxt.youtube {
3496
3496
  /**
3497
3497
  * Cookie 관련 함수들을 정의합니다.
3498
3498
  */
3499
- declare namespace pxt.codle {
3499
+ declare namespace pxt.cookie {
3500
3500
  function getEnv(): string;
3501
3501
  function getCookieName(name: string): string;
3502
3502
  function getCookieToken(): string | undefined;
package/built/pxtlib.js CHANGED
@@ -718,7 +718,7 @@ var pxt;
718
718
  headers["authorization"] = `mkcd ${authToken}`;
719
719
  }
720
720
  */
721
- const token = pxt.codle.getCookieToken();
721
+ const token = pxt.cookie.getCookieToken();
722
722
  if (token) {
723
723
  headers["Authorization"] = `Bearer ${token}`;
724
724
  }
@@ -23257,13 +23257,15 @@ var pxt;
23257
23257
  */
23258
23258
  var pxt;
23259
23259
  (function (pxt) {
23260
- var codle;
23261
- (function (codle) {
23260
+ var cookie;
23261
+ (function (cookie_1) {
23262
+ /**
23263
+ * document.cookie에서 name에 해당하는 쿠키 값을 가져옵니다.
23264
+ */
23262
23265
  function getCookie(name) {
23263
- let matches = document.cookie.match(new RegExp("(?:^|; )" +
23264
- name.replace(/([\.$?*|{}\(\)\[\]\\\/\+^])/g, "\\$1") +
23265
- "=([^;]*)"));
23266
- return matches ? decodeURIComponent(matches[1]) : undefined;
23266
+ const cookies = document.cookie.split("; ");
23267
+ const cookie = cookies.find((cookie) => cookie.startsWith(name + "="));
23268
+ return cookie ? decodeURIComponent(cookie.split("=")[1]) : undefined;
23267
23269
  }
23268
23270
  function getEnv() {
23269
23271
  return window.location.hostname === "localhost"
@@ -23272,7 +23274,7 @@ var pxt;
23272
23274
  ? "dev"
23273
23275
  : "prd";
23274
23276
  }
23275
- codle.getEnv = getEnv;
23277
+ cookie_1.getEnv = getEnv;
23276
23278
  function getCookieName(name) {
23277
23279
  if (window.location.hostname === "localhost") {
23278
23280
  return `${name}_localhost_local`;
@@ -23280,12 +23282,12 @@ var pxt;
23280
23282
  const tenant = window.location.hostname.split(".")[1];
23281
23283
  return `${name}_${tenant}_${getEnv()}`;
23282
23284
  }
23283
- codle.getCookieName = getCookieName;
23285
+ cookie_1.getCookieName = getCookieName;
23284
23286
  function getCookieToken() {
23285
23287
  return getCookie(getCookieName("token"));
23286
23288
  }
23287
- codle.getCookieToken = getCookieToken;
23288
- })(codle = pxt.codle || (pxt.codle = {}));
23289
+ cookie_1.getCookieToken = getCookieToken;
23290
+ })(cookie = pxt.cookie || (pxt.cookie = {}));
23289
23291
  })(pxt || (pxt = {}));
23290
23292
  // TODO: add a macro facility to make 8-bit assembly easier?
23291
23293
  var ts;
package/built/target.js CHANGED
@@ -380,8 +380,8 @@ var pxtTargetBundle = {
380
380
  },
381
381
  "uploadDocs": false,
382
382
  "versions": {
383
- "target": "0.1.7",
384
- "pxt": "0.1.7"
383
+ "target": "0.2.0",
384
+ "pxt": "0.2.0"
385
385
  },
386
386
  "blocksprj": {
387
387
  "id": "blocksprj",
@@ -4302,7 +4302,7 @@ var pxtTargetBundle = {
4302
4302
  }
4303
4303
  }
4304
4304
  },
4305
- "sha": "eec28a0d26a270954f08593c68e9f0a1182ca6811bf0e6257234061056012268"
4305
+ "sha": "698413e78009e89a8eb1e00e19688ac1c42a9cc3725a1b6fd0fd94857c3afaf9"
4306
4306
  }
4307
4307
  }
4308
4308
  }