@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 +13 -11
- package/built/pxtlib.d.ts +1 -1
- package/built/pxtlib.js +13 -11
- package/built/target.js +3 -3
- package/built/web/main.js +2 -2
- package/built/web/pxtapp.js +13 -11
- package/built/web/pxtembed.js +13 -11
- package/built/web/pxtlib.js +13 -11
- package/built/web/pxtworker.js +13 -11
- package/package.json +1 -1
package/built/web/pxtapp.js
CHANGED
|
@@ -724,7 +724,7 @@ var pxt;
|
|
|
724
724
|
headers["authorization"] = `mkcd ${authToken}`;
|
|
725
725
|
}
|
|
726
726
|
*/
|
|
727
|
-
const token = pxt.
|
|
727
|
+
const token = pxt.cookie.getCookieToken();
|
|
728
728
|
if (token) {
|
|
729
729
|
headers["Authorization"] = `Bearer ${token}`;
|
|
730
730
|
}
|
|
@@ -23263,13 +23263,15 @@ var pxt;
|
|
|
23263
23263
|
*/
|
|
23264
23264
|
var pxt;
|
|
23265
23265
|
(function (pxt) {
|
|
23266
|
-
var
|
|
23267
|
-
(function (
|
|
23266
|
+
var cookie;
|
|
23267
|
+
(function (cookie_1) {
|
|
23268
|
+
/**
|
|
23269
|
+
* document.cookie에서 name에 해당하는 쿠키 값을 가져옵니다.
|
|
23270
|
+
*/
|
|
23268
23271
|
function getCookie(name) {
|
|
23269
|
-
|
|
23270
|
-
|
|
23271
|
-
|
|
23272
|
-
return matches ? decodeURIComponent(matches[1]) : undefined;
|
|
23272
|
+
const cookies = document.cookie.split("; ");
|
|
23273
|
+
const cookie = cookies.find((cookie) => cookie.startsWith(name + "="));
|
|
23274
|
+
return cookie ? decodeURIComponent(cookie.split("=")[1]) : undefined;
|
|
23273
23275
|
}
|
|
23274
23276
|
function getEnv() {
|
|
23275
23277
|
return window.location.hostname === "localhost"
|
|
@@ -23278,7 +23280,7 @@ var pxt;
|
|
|
23278
23280
|
? "dev"
|
|
23279
23281
|
: "prd";
|
|
23280
23282
|
}
|
|
23281
|
-
|
|
23283
|
+
cookie_1.getEnv = getEnv;
|
|
23282
23284
|
function getCookieName(name) {
|
|
23283
23285
|
if (window.location.hostname === "localhost") {
|
|
23284
23286
|
return `${name}_localhost_local`;
|
|
@@ -23286,12 +23288,12 @@ var pxt;
|
|
|
23286
23288
|
const tenant = window.location.hostname.split(".")[1];
|
|
23287
23289
|
return `${name}_${tenant}_${getEnv()}`;
|
|
23288
23290
|
}
|
|
23289
|
-
|
|
23291
|
+
cookie_1.getCookieName = getCookieName;
|
|
23290
23292
|
function getCookieToken() {
|
|
23291
23293
|
return getCookie(getCookieName("token"));
|
|
23292
23294
|
}
|
|
23293
|
-
|
|
23294
|
-
})(
|
|
23295
|
+
cookie_1.getCookieToken = getCookieToken;
|
|
23296
|
+
})(cookie = pxt.cookie || (pxt.cookie = {}));
|
|
23295
23297
|
})(pxt || (pxt = {}));
|
|
23296
23298
|
// TODO: add a macro facility to make 8-bit assembly easier?
|
|
23297
23299
|
var ts;
|
package/built/web/pxtembed.js
CHANGED
|
@@ -98405,7 +98405,7 @@ var pxt;
|
|
|
98405
98405
|
headers["authorization"] = `mkcd ${authToken}`;
|
|
98406
98406
|
}
|
|
98407
98407
|
*/
|
|
98408
|
-
const token = pxt.
|
|
98408
|
+
const token = pxt.cookie.getCookieToken();
|
|
98409
98409
|
if (token) {
|
|
98410
98410
|
headers["Authorization"] = `Bearer ${token}`;
|
|
98411
98411
|
}
|
|
@@ -120944,13 +120944,15 @@ var pxt;
|
|
|
120944
120944
|
*/
|
|
120945
120945
|
var pxt;
|
|
120946
120946
|
(function (pxt) {
|
|
120947
|
-
var
|
|
120948
|
-
(function (
|
|
120947
|
+
var cookie;
|
|
120948
|
+
(function (cookie_1) {
|
|
120949
|
+
/**
|
|
120950
|
+
* document.cookie에서 name에 해당하는 쿠키 값을 가져옵니다.
|
|
120951
|
+
*/
|
|
120949
120952
|
function getCookie(name) {
|
|
120950
|
-
|
|
120951
|
-
|
|
120952
|
-
|
|
120953
|
-
return matches ? decodeURIComponent(matches[1]) : undefined;
|
|
120953
|
+
const cookies = document.cookie.split("; ");
|
|
120954
|
+
const cookie = cookies.find((cookie) => cookie.startsWith(name + "="));
|
|
120955
|
+
return cookie ? decodeURIComponent(cookie.split("=")[1]) : undefined;
|
|
120954
120956
|
}
|
|
120955
120957
|
function getEnv() {
|
|
120956
120958
|
return window.location.hostname === "localhost"
|
|
@@ -120959,7 +120961,7 @@ var pxt;
|
|
|
120959
120961
|
? "dev"
|
|
120960
120962
|
: "prd";
|
|
120961
120963
|
}
|
|
120962
|
-
|
|
120964
|
+
cookie_1.getEnv = getEnv;
|
|
120963
120965
|
function getCookieName(name) {
|
|
120964
120966
|
if (window.location.hostname === "localhost") {
|
|
120965
120967
|
return `${name}_localhost_local`;
|
|
@@ -120967,12 +120969,12 @@ var pxt;
|
|
|
120967
120969
|
const tenant = window.location.hostname.split(".")[1];
|
|
120968
120970
|
return `${name}_${tenant}_${getEnv()}`;
|
|
120969
120971
|
}
|
|
120970
|
-
|
|
120972
|
+
cookie_1.getCookieName = getCookieName;
|
|
120971
120973
|
function getCookieToken() {
|
|
120972
120974
|
return getCookie(getCookieName("token"));
|
|
120973
120975
|
}
|
|
120974
|
-
|
|
120975
|
-
})(
|
|
120976
|
+
cookie_1.getCookieToken = getCookieToken;
|
|
120977
|
+
})(cookie = pxt.cookie || (pxt.cookie = {}));
|
|
120976
120978
|
})(pxt || (pxt = {}));
|
|
120977
120979
|
// TODO: add a macro facility to make 8-bit assembly easier?
|
|
120978
120980
|
var ts;
|
package/built/web/pxtlib.js
CHANGED
|
@@ -718,7 +718,7 @@ var pxt;
|
|
|
718
718
|
headers["authorization"] = `mkcd ${authToken}`;
|
|
719
719
|
}
|
|
720
720
|
*/
|
|
721
|
-
const token = pxt.
|
|
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
|
|
23261
|
-
(function (
|
|
23260
|
+
var cookie;
|
|
23261
|
+
(function (cookie_1) {
|
|
23262
|
+
/**
|
|
23263
|
+
* document.cookie에서 name에 해당하는 쿠키 값을 가져옵니다.
|
|
23264
|
+
*/
|
|
23262
23265
|
function getCookie(name) {
|
|
23263
|
-
|
|
23264
|
-
|
|
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
|
-
|
|
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
|
-
|
|
23285
|
+
cookie_1.getCookieName = getCookieName;
|
|
23284
23286
|
function getCookieToken() {
|
|
23285
23287
|
return getCookie(getCookieName("token"));
|
|
23286
23288
|
}
|
|
23287
|
-
|
|
23288
|
-
})(
|
|
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/web/pxtworker.js
CHANGED
|
@@ -98415,7 +98415,7 @@ var pxt;
|
|
|
98415
98415
|
headers["authorization"] = `mkcd ${authToken}`;
|
|
98416
98416
|
}
|
|
98417
98417
|
*/
|
|
98418
|
-
const token = pxt.
|
|
98418
|
+
const token = pxt.cookie.getCookieToken();
|
|
98419
98419
|
if (token) {
|
|
98420
98420
|
headers["Authorization"] = `Bearer ${token}`;
|
|
98421
98421
|
}
|
|
@@ -120954,13 +120954,15 @@ var pxt;
|
|
|
120954
120954
|
*/
|
|
120955
120955
|
var pxt;
|
|
120956
120956
|
(function (pxt) {
|
|
120957
|
-
var
|
|
120958
|
-
(function (
|
|
120957
|
+
var cookie;
|
|
120958
|
+
(function (cookie_1) {
|
|
120959
|
+
/**
|
|
120960
|
+
* document.cookie에서 name에 해당하는 쿠키 값을 가져옵니다.
|
|
120961
|
+
*/
|
|
120959
120962
|
function getCookie(name) {
|
|
120960
|
-
|
|
120961
|
-
|
|
120962
|
-
|
|
120963
|
-
return matches ? decodeURIComponent(matches[1]) : undefined;
|
|
120963
|
+
const cookies = document.cookie.split("; ");
|
|
120964
|
+
const cookie = cookies.find((cookie) => cookie.startsWith(name + "="));
|
|
120965
|
+
return cookie ? decodeURIComponent(cookie.split("=")[1]) : undefined;
|
|
120964
120966
|
}
|
|
120965
120967
|
function getEnv() {
|
|
120966
120968
|
return window.location.hostname === "localhost"
|
|
@@ -120969,7 +120971,7 @@ var pxt;
|
|
|
120969
120971
|
? "dev"
|
|
120970
120972
|
: "prd";
|
|
120971
120973
|
}
|
|
120972
|
-
|
|
120974
|
+
cookie_1.getEnv = getEnv;
|
|
120973
120975
|
function getCookieName(name) {
|
|
120974
120976
|
if (window.location.hostname === "localhost") {
|
|
120975
120977
|
return `${name}_localhost_local`;
|
|
@@ -120977,12 +120979,12 @@ var pxt;
|
|
|
120977
120979
|
const tenant = window.location.hostname.split(".")[1];
|
|
120978
120980
|
return `${name}_${tenant}_${getEnv()}`;
|
|
120979
120981
|
}
|
|
120980
|
-
|
|
120982
|
+
cookie_1.getCookieName = getCookieName;
|
|
120981
120983
|
function getCookieToken() {
|
|
120982
120984
|
return getCookie(getCookieName("token"));
|
|
120983
120985
|
}
|
|
120984
|
-
|
|
120985
|
-
})(
|
|
120986
|
+
cookie_1.getCookieToken = getCookieToken;
|
|
120987
|
+
})(cookie = pxt.cookie || (pxt.cookie = {}));
|
|
120986
120988
|
})(pxt || (pxt = {}));
|
|
120987
120989
|
// TODO: add a macro facility to make 8-bit assembly easier?
|
|
120988
120990
|
var ts;
|