@gridland/demo 0.2.49 → 0.2.51
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/chunk-4VNS5WPM.js +42 -0
- package/dist/chunk-DTDQ3HF4.js +494 -0
- package/dist/demo-names.json +1 -1
- package/dist/landing.js +245 -344
- package/dist/run.js +1376 -1235
- package/dist/token-M3ULGZTY.js +62 -0
- package/dist/token-util-FKUIR5UM.js +5 -0
- package/package.json +4 -4
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import {
|
|
2
|
+
require_token_error,
|
|
3
|
+
require_token_util
|
|
4
|
+
} from "./chunk-DTDQ3HF4.js";
|
|
5
|
+
import {
|
|
6
|
+
__commonJS
|
|
7
|
+
} from "./chunk-4VNS5WPM.js";
|
|
8
|
+
|
|
9
|
+
// ../../node_modules/.bun/@vercel+oidc@3.1.0/node_modules/@vercel/oidc/dist/token.js
|
|
10
|
+
var require_token = __commonJS({
|
|
11
|
+
"../../node_modules/.bun/@vercel+oidc@3.1.0/node_modules/@vercel/oidc/dist/token.js"(exports, module) {
|
|
12
|
+
var __defProp = Object.defineProperty;
|
|
13
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
14
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
15
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
16
|
+
var __export = (target, all) => {
|
|
17
|
+
for (var name in all)
|
|
18
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
19
|
+
};
|
|
20
|
+
var __copyProps = (to, from, except, desc) => {
|
|
21
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
22
|
+
for (let key of __getOwnPropNames(from))
|
|
23
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
24
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
25
|
+
}
|
|
26
|
+
return to;
|
|
27
|
+
};
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
var token_exports = {};
|
|
30
|
+
__export(token_exports, {
|
|
31
|
+
refreshToken: () => refreshToken
|
|
32
|
+
});
|
|
33
|
+
module.exports = __toCommonJS(token_exports);
|
|
34
|
+
var import_token_error = require_token_error();
|
|
35
|
+
var import_token_util = require_token_util();
|
|
36
|
+
async function refreshToken() {
|
|
37
|
+
const { projectId, teamId } = (0, import_token_util.findProjectInfo)();
|
|
38
|
+
let maybeToken = (0, import_token_util.loadToken)(projectId);
|
|
39
|
+
if (!maybeToken || (0, import_token_util.isExpired)((0, import_token_util.getTokenPayload)(maybeToken.token))) {
|
|
40
|
+
const authToken = await (0, import_token_util.getVercelCliToken)();
|
|
41
|
+
if (!authToken) {
|
|
42
|
+
throw new import_token_error.VercelOidcTokenError(
|
|
43
|
+
"Failed to refresh OIDC token: Log in to Vercel CLI and link your project with `vc link`"
|
|
44
|
+
);
|
|
45
|
+
}
|
|
46
|
+
if (!projectId) {
|
|
47
|
+
throw new import_token_error.VercelOidcTokenError(
|
|
48
|
+
"Failed to refresh OIDC token: Try re-linking your project with `vc link`"
|
|
49
|
+
);
|
|
50
|
+
}
|
|
51
|
+
maybeToken = await (0, import_token_util.getVercelOidcToken)(authToken, projectId, teamId);
|
|
52
|
+
if (!maybeToken) {
|
|
53
|
+
throw new import_token_error.VercelOidcTokenError("Failed to refresh OIDC token");
|
|
54
|
+
}
|
|
55
|
+
(0, import_token_util.saveToken)(maybeToken, projectId);
|
|
56
|
+
}
|
|
57
|
+
process.env.VERCEL_OIDC_TOKEN = maybeToken.token;
|
|
58
|
+
return;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
});
|
|
62
|
+
export default require_token();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gridland/demo",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.51",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Run gridland component demos from anywhere",
|
|
6
6
|
"exports": {
|
|
@@ -18,11 +18,11 @@
|
|
|
18
18
|
],
|
|
19
19
|
"scripts": {
|
|
20
20
|
"build": "tsup",
|
|
21
|
-
"test": "bun test"
|
|
21
|
+
"test": "bun test --preload ../web/test/preload.ts"
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@gridland/bun": "0.2.
|
|
25
|
-
"@gridland/utils": "0.2.
|
|
24
|
+
"@gridland/bun": "0.2.51",
|
|
25
|
+
"@gridland/utils": "0.2.51",
|
|
26
26
|
"figlet": "^1.10.0",
|
|
27
27
|
"react": "^19.0.0"
|
|
28
28
|
},
|